https://www.deta.studio/_next/static/chunks/5f753a935e222ac0.js?dpl=dpl_24V9Vw9kM12FuJtVbqdtQn2KgNhJ
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,978502,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={callServer:function(){return a.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}};for(var i in s)Object.defineProperty(r,i,{enumerable:!0,get:s[i]});let a=e.r(111562),n=e.r(50560),o=e.r(344735)},374274,646807,e=>{"use strict";var t=e.i(378259),r=e.i(549651);e.i(925916);var s=e.i(921007),i=e.i(520911),a=e.i(779643),n=class extends a.Removable{#e;#t;#r;#s;#i;#a;#n;constructor(e){super(),this.#n=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=u(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=u(this.options);void 0!==e.data&&(this.setState(l(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#r.remove(this)}setData(e,t){let r=(0,s.replaceData)(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(s.noop).catch(s.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>!1!==(0,s.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===s.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,s.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,s.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#n?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){let r;if("idle"!==this.state.fetchStatus&&this.#i?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let a=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#n=!0,a.signal)})},o=()=>{let e,r=(0,s.ensureQueryFn)(this.options,t),i=(n(e={client:this.#s,queryKey:this.queryKey,meta:this.meta}),e);return(this.#n=!1,this.options.persister)?this.options.persister(r,i,this):r(i)},l=(n(r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o}),r);this.options.behavior?.onFetch(l,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#i=(0,i.createRetryer)({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:e=>{e instanceof i.CancelledError&&e.revert&&this.setState({...this.#t,fetchStatus:"idle"}),a.abort()},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof i.CancelledError){if(e.silent)return this.#i.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#o({type:"error",error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#o(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...o(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...l(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":let s=e.error;
1return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function o(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,i.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function l(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function u(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>n,"fetchState",()=>o],646807);var c=e.i(659396),h=e.i(950276),d=e.i(151881),p=class extends c.Subscribable{constructor(e,t){super(),this.options=t,this.#s=e,this.#l=null,this.#u=(0,h.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#s;#c=void 0;#h=void 0;#d=void 0;#p;#f;#u;#l;#m;#y;#g;#v;#_;#b;#R=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#c.addObserver(this),f(this.#c,this.options)?this.#S():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return m(this.#c,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return m(this.#c,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#T(),this.#c.removeObserver(this)}setOptions(e){let t=this.options,r=this.#c;if(this.options=this.#s.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,s.resolveEnabled)(this.options.enabled,this.#c))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#c.setOptions(this.options),t._defaulted&&!(0,s.shallowEqualObjects)(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#c,observer:this});let i=this.hasListeners();i&&y(this.#c,r,this.options,t)&&this.#S(),this.updateResult(),i&&(this.#c!==r||(0,s.resolveEnabled)(this.options.enabled,this.#c)!==(0,s.resolveEnabled)(t.enabled,this.#c)||(0,s.resolveStaleTime)(this.options.staleTime,this.#c)!==(0,s.resolveStaleTime)(t.staleTime,this.#c))&&this.#D();let a=this.#O();i&&(this.#c!==r||(0,s.resolveEnabled)(this.options.enabled,this.#c)!==(0,s.resolveEnabled)(t.enabled,this.#c)||a!==this.#b)&&this.#A(a)}getOptimisticResult(e){var t,r;let i=this.#s.getQueryCache().build(this.#s,e),a=this.createResult(i,e);return t=this,r=a,(0,s.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#d=a,this.#f=this.options,this.#p=this.#c.state),a}getCurrentResult(){return this.#d}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#u.status||this.#u.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#R.add(e)}getCurrentQuery(){return this.#c}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#s.defaultQueryOptions(e),r=this.#s.getQueryCache().build(this.#s,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#S({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#d))}#S(e){this.#C();let t=this.#c.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s.noop)),t}#D(){this.#w();let e=(0,s.resolveStaleTime)(this.options.staleTime,this.#c);if(s.isServer||this.#d.isStale||!(0,s.isValidTimeout)(e))return;let t=(0,s.timeUntilStale)(this.#d.dataUpdatedAt,e);this.#v=d.timeoutManager.setTimeout(()=>{this.#d.isStale||this.updateResult()},t+1)}#O(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#c):this.options.refetchInterval)??!1}#A(e){this.#T(),this.#b=e,!s.isServer&&!1!==(0,s.resolveEnabled)(this.options.enabled,this.#c)&&(0,s.isValidTimeout)(this.#b)&&0!==this.#b&&(this.#_=d.timeoutManager.setInterval(()=>
1{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#S()},this.#b))}#x(){this.#D(),this.#A(this.#O())}#w(){this.#v&&(d.timeoutManager.clearTimeout(this.#v),this.#v=void 0)}#T(){this.#_&&(d.timeoutManager.clearInterval(this.#_),this.#_=void 0)}createResult(e,t){let r,i=this.#c,a=this.options,n=this.#d,l=this.#p,u=this.#f,c=e!==i?e.state:this.#h,{state:d}=e,p={...d},m=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&f(e,t),n=r&&y(e,i,t,a);(s||n)&&(p={...p,...o(d.data,e.options)}),"isRestoring"===t._optimisticResults&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:b}=p;r=p.data;let R=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===b){let e;n?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(e=n.data,R=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,void 0!==e&&(b="success",r=(0,s.replaceData)(n?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!R)if(n&&r===l?.data&&t.select===this.#m)r=this.#y;else try{this.#m=t.select,r=t.select(r),r=(0,s.replaceData)(n?.data,r,t),this.#y=r,this.#l=null}catch(e){this.#l=e}this.#l&&(v=this.#l,r=this.#y,_=Date.now(),b="error");let S="fetching"===p.fetchStatus,x="pending"===b,w="error"===b,T=x&&S,C=void 0!==r,D={status:b,fetchStatus:p.fetchStatus,isPending:x,isSuccess:"success"===b,isError:w,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:S,isRefetching:S&&!x,isLoadingError:w&&!C,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:w&&C,isStale:g(e,t),refetch:this.refetch,promise:this.#u,isEnabled:!1!==(0,s.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===D.status?e.reject(D.error):void 0!==D.data&&e.resolve(D.data)},r=()=>{t(this.#u=D.promise=(0,h.pendingThenable)())},s=this.#u;switch(s.status){case"pending":e.queryHash===i.queryHash&&t(s);break;case"fulfilled":("error"===D.status||D.data!==s.value)&&r();break;case"rejected":("error"!==D.status||D.error!==s.reason)&&r()}}return D}updateResult(){let e=this.#d,t=this.createResult(this.#c,this.options);if(this.#p=this.#c.state,this.#f=this.options,void 0!==this.#p.data&&(this.#g=this.#c),(0,s.shallowEqualObjects)(t,e))return;this.#d=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#R.size)return!0;let s=new Set(r??this.#R);return this.options.throwOnError&&s.add("error"),Object.keys(this.#d).some(t=>this.#d[t]!==e[t]&&s.has(t))};this.#Q({listeners:r()})}#C(){let e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#c)return;let t=this.#c;this.#c=e,this.#h=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#Q(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#d)}),this.#s.getQueryCache().notify({query:this.#c,type:"observerResultsUpdated"})})}};function f(e,t){return!1!==(0,s.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&m(e,t,t.refetchOnMount)}function m(e,t,r){if(!1!==(0,s.resolveEnabled)(t.enabled,e)&&"static"!==(0,s.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&g(e,t)}return!1}function y(e,t,r,i){return(e!==t||!1===(0,s.resolveEnabled)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&g(e,r)}function g(e,t){return!1!==(0,s.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,s.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",()=>p],374274)},537366,565342,e=>{"use strict";let t;var r=e.i(138415);e.i(391610);var s=r.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),i=()=>r.useContext(s);e.s(["useQueryErrorResetBoundary",()=>i],537366);var a=e.i(921007),n=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOn
1Mount=!1)},o=e=>{r.useEffect(()=>{e.clearReset()},[e])},l=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,a.shouldThrowError)(r,[e.error,s]));e.s(["ensurePreventErrorBoundaryRetry",()=>n,"getHasError",()=>l,"useClearResetErrorBoundary",()=>o],565342)},301713,e=>{"use strict";var t=e.i(138415),r=t.createContext(!1),s=()=>t.useContext(r);r.Provider,e.s(["useIsRestoring",()=>s])},272875,423228,654596,e=>{"use strict";var t=e.i(374274);e.i(925916);var r=e.i(138415),s=e.i(921007),i=e.i(549651),a=e.i(735924),n=e.i(537366),o=e.i(565342),l=e.i(301713),u=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},c=(e,t)=>e.isLoading&&e.isFetching&&!t,h=(e,t)=>e?.suspense&&t.isPending,d=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function p(e,t,p){let f=(0,l.useIsRestoring)(),m=(0,n.useQueryErrorResetBoundary)(),y=(0,a.useQueryClient)(p),g=y.defaultQueryOptions(e);y.getDefaultOptions().queries?._experimental_beforeQuery?.(g),g._optimisticResults=f?"isRestoring":"optimistic",u(g),(0,o.ensurePreventErrorBoundaryRetry)(g,m),(0,o.useClearResetErrorBoundary)(m);let v=!y.getQueryCache().get(g.queryHash),[_]=r.useState(()=>new t(y,g)),b=_.getOptimisticResult(g),R=!f&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{let t=R?_.subscribe(i.notifyManager.batchCalls(e)):s.noop;return _.updateResult(),t},[_,R]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),r.useEffect(()=>{_.setOptions(g)},[g,_]),h(g,b))throw d(g,_,m);if((0,o.getHasError)({result:b,errorResetBoundary:m,throwOnError:g.throwOnError,query:y.getQueryCache().get(g.queryHash),suspense:g.suspense}))throw b.error;if(y.getDefaultOptions().queries?._experimental_afterQuery?.(g,b),g.experimental_prefetchInRender&&!s.isServer&&c(b,f)){let e=v?d(g,_,m):y.getQueryCache().get(g.queryHash)?.promise;e?.catch(s.noop).finally(()=>{_.updateResult()})}return g.notifyOnChangeProps?b:_.trackResult(b)}function f(e,r){return p(e,t.QueryObserver,r)}e.s(["ensureSuspenseTimers",()=>u,"fetchOptimistic",()=>d,"shouldSuspend",()=>h,"willFetch",()=>c],423228),e.s(["useBaseQuery",()=>p],654596),e.s(["useQuery",()=>f],272875)},389820,216116,156561,565629,e=>{"use strict";let t=new Set(["unexpected_error","validation_error","not_found","forbidden","conflict","timeout","offline","server_error","rate_limited","invalid_input","invalid_page","invalid_move","name_collision","file_too_large","unsupported_file_type","blank_source","password_protected","plan_limit_documents","plan_limit_workspaces","plan_limit_integrations","plan_limit_members","plan_limit_seats","no_workspace","no_current_version","version_failed","download_failed","upload_failed","import_failed","merge_failed","compose_failed","attachment_failed","integration_not_found","integration_session_expired","integration_unavailable","share_not_found","share_not_owner","share_not_external","share_already_in_workspace","share_not_in_workspace","share_update_failed","seq_mismatch"]);function r(e){return"string"==typeof e&&t.has(e)}let s={unexpected_error:"Something went wrong. Please try again.",validation_error:"Some of the details entered are invalid.",not_found:"That item no longer exists.",forbidden:"You do not have permission to do that.",conflict:"That already exists.",timeout:"That took too long. Please try again.",offline:"You appear to be offline. Reconnect and try again.",server_error:"The server is having trouble. Please try again.",rate_limited:"Too many requests. Please wait a moment and try again.",invalid_input:"Some of the details entered are invalid.",invalid_page:"That page is not available.",invalid_move:"That item cannot be moved there.",name_collision:"That name is already taken.",file_too_large:"That file is too large.",unsupported_file_type:"That file type is not supported.",blank_source:"That file appears to be empty.",password_protected:"That PDF is password-protected and cannot be imported. Remove the password and try again.",plan_limit_documents:"You have reached your planâs document limit.",plan_limit_workspaces:"You have reached your planâs team limit.",plan_limit_integrations:"You have reached your planâs integration limit.",plan_limit_members:"You have reached your planâs member limit.",plan_limit_seats:"You have reached your planâs seat limit.",no_workspace:"No team available. Create one before continuing.",no_current_version:"This drawing has no current version.",version_failed:"A new version could not be created.",download_failed:"The download failed. Please try again.",upload_failed:"The upload failed. Please try again.",import_failed:"The import failed. Please try again.",merge_failed:"The merge failed. Please try again.",compose_failed:"The export failed. Please try again.",attachment_failed:"The attachment could not be saved.",integration_not_found:"That connection is no longer available.",integration_session_expired:"Your session has expired. Please reconnect the account.",integration_unavailable:"That service is not responding. Please try again shortly.",share_not_found:"That drawing is not available.",share_not_owner:"Only the owner can change sharing.",share_not_external:"Only externally synced drawings can be shared this way.",share_already_in_workspace:"That drawing is already in a team.",share_not_in_workspace:"That drawing is not in a team.",share_update_failed:"Sharing could not be updated. Please try again.",seq_mismatch:"Could not sync
1with other users. Please reload and try again."},i={max_documents:"plan_limit_documents",max_workspaces:"plan_limit_workspaces",max_integrations:"plan_limit_integrations",max_members:"plan_limit_members",max_seats:"plan_limit_seats"},a={plan_limit_documents:["document","documents"],plan_limit_workspaces:["workspace","workspaces"],plan_limit_integrations:["integration","integrations"],plan_limit_members:["member","members"],plan_limit_seats:["seat","seats"]};function n(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function o(e){return"string"==typeof e&&""!==e.trim()?e:null}function l(e,t){let r=s[e];if(!t)return r;let i=a[e];if(i){let e=n(t.limit);if(null!==e){let t=1===e?i[0]:i[1];return`You have reached your planâs limit of ${e} ${t}. Upgrade to add more.`}return r}if("name_collision"===e){let e=o(t.existingName);return e?`An item named â${e}â already exists here.`:r}if("invalid_page"===e){let e=n(t.page),s=n(t.pageCount);return null!==e&&null!==s?`Page ${e} is out of range â this file has ${s} pages.`:r}if("file_too_large"===e){let e=n(t.limitMb);return null!==e?`That file is too large. The maximum is ${e} MB.`:r}if("unsupported_file_type"===e){let e=o(t.extension);return e?`Files of type .${e.replace(/^\./,"")} are not supported.`:r}if("integration_session_expired"===e){let e=o(t.provider);return e?`Your ${e} session has expired. Please reconnect the account.`:r}return r}function u(e,t){return{code:e,message:l(e,t),...t?{meta:t}:{}}}e.s(["PLAN_LIMIT_CODES",0,i,"appError",()=>u,"copyFor",()=>l,"isErrorCode",()=>r],216116);let c=/PLAN_LIMIT:(\w+):(\d+):(\d+)/,h=[/PLAN_LIMIT:/,/PGRST\d+/,/\bviolates\b.*\bconstraint\b/i,/null value in column/i,/duplicate key value/i,/permission denied for/i,/row-level security/i,/^\s*[[{]/,/\bat\s+\w+\s+\(.*:\d+:\d+\)/,/^Error:\s/,/\[object \w+\]/];function d(e){return h.some(t=>t.test(e))}function p(e){let t=c.exec(e);if(!t)return null;let[,r,s,a]=t,n=i[r];return n?u(n,{current:Number(s),limit:Number(a)}):null}function f(e){return"object"==typeof e&&null!==e?e:null}let m={"share.not_found":"share_not_found","share.not_owner":"share_not_owner","share.not_external":"share_not_external","share.already_in_workspace":"share_already_in_workspace","share.update_failed":"share_update_failed","unshare.not_found":"share_not_found","unshare.not_owner":"share_not_owner","unshare.not_external":"share_not_external","unshare.not_in_workspace":"share_not_in_workspace"},y=/^[a-z][a-z0-9_]*(\.[a-z0-9_]+)*$/;function g(e){let t;if(null==e)return u("unexpected_error");if("string"==typeof e){let t=p(e);return t||(""===e.trim()||d(e)?(v(e),u("unexpected_error")):{code:"unexpected_error",message:e})}if(e instanceof DOMException&&"TimeoutError"===e.name)return u("timeout");let s=f(e);if(!s)return v(e),u("unexpected_error");let i=function(e){let t=f(e.meta);if(r(e.code))return"unexpected_error"!==e.code||"string"!=typeof e.message||""===e.message.trim()||e.message===l("unexpected_error")||d(e.message)?u(e.code,t??void 0):{code:"unexpected_error",message:e.message,...t?{meta:t}:{}};if(!("string"==typeof e.code&&"string"==typeof e.message&&!("status"in e)&&!("statusCode"in e)&&!("details"in e)&&!("hint"in e)&&y.test(e.code)))return null;let s=m[e.code];if(s)return u(s,t??void 0);let i=e.message;return d(i)?(v(e),u("unexpected_error")):{code:"unexpected_error",message:i,...t?{meta:t}:{}}}(s)??(Array.isArray(s.issues)?u("validation_error",{issues:s.issues.map(e=>{let t=f(e);return t?{path:Array.isArray(t.path)?t.path.join("."):"",message:"string"==typeof t.message?t.message:"Invalid"}:null}).filter(Boolean)}):null)??function(e){let t="string"==typeof e.code?e.code:null;if(!t)return null;if("P0429"===t)return p("string"==typeof e.message?e.message:"")??u("forbidden");switch(t){case"23505":return u("conflict");case"23503":case"PGRST116":return u("not_found");case"42501":case"PGRST301":return u("forbidden");default:return null}}(s)??(null===(t="number"==typeof s.status?s.status:"number"==typeof s.statusCode?s.statusCode:null)?null:401===t||403===t?u("forbidden"):404===t?u("not_found"):409===t?u("conflict"):413===t?u("file_too_large"):429===t?u("rate_limited"):t>=500?u("server_error"):null);if(i)return i;if("string"==typeof s.message){let e=p(s.message);if(e)return e}return v(e),u("unexpected_error")}function v(e){console.error("[errors] unmapped",e)}e.s(["classifyError",()=>g],156561);
1class _ extends Error{code;meta;constructor(e){super(e.message),this.name="ActionResultError",this.code=e.code,this.meta=e.meta}}function b(e){if(!e.ok)throw new _(e.error);return e.data}e.s(["ActionResultError",()=>_,"unwrapAction",()=>b],565629),e.s([],389820)},146258,e=>{"use strict";var t=e.i(391610),r=e.i(138415),s=e.i(194185),i=e.i(789268),a=e.i(23337),n=e.i(291967),o=e.i(468018),l="AlertDialog",[u,c]=(0,s.createContextScope)(l,[a.createDialogScope]),h=(0,a.createDialogScope)(),d=e=>{let{__scopeAlertDialog:r,...s}=e,i=h(r);return(0,t.jsx)(a.Root,{...i,...s,modal:!0})};d.displayName=l;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...i}=e,n=h(s);return(0,t.jsx)(a.Trigger,{...n,...i,ref:r})});p.displayName="AlertDialogTrigger";var f=e=>{let{__scopeAlertDialog:r,...s}=e,i=h(r);return(0,t.jsx)(a.Portal,{...i,...s})};f.displayName="AlertDialogPortal";var m=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...i}=e,n=h(s);return(0,t.jsx)(a.Overlay,{...n,...i,ref:r})});m.displayName="AlertDialogOverlay";var y="AlertDialogContent",[g,v]=u(y),_=(0,o.createSlottable)("AlertDialogContent"),b=r.forwardRef((e,s)=>{let{__scopeAlertDialog:o,children:l,...u}=e,c=h(o),d=r.useRef(null),p=(0,i.useComposedRefs)(s,d),f=r.useRef(null);return(0,t.jsx)(a.WarningProvider,{contentName:y,titleName:R,docsSlug:"alert-dialog",children:(0,t.jsx)(g,{scope:o,cancelRef:f,children:(0,t.jsxs)(a.Content,{role:"alertdialog",...c,...u,ref:p,onOpenAutoFocus:(0,n.composeEventHandlers)(u.onOpenAutoFocus,e=>{e.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,t.jsx)(_,{children:l}),(0,t.jsx)(O,{contentRef:d})]})})})});b.displayName=y;var R="AlertDialogTitle",S=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...i}=e,n=h(s);return(0,t.jsx)(a.Title,{...n,...i,ref:r})});S.displayName=R;var x="AlertDialogDescription",w=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...i}=e,n=h(s);return(0,t.jsx)(a.Description,{...n,...i,ref:r})});w.displayName=x;var T=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...i}=e,n=h(s);return(0,t.jsx)(a.Close,{...n,...i,ref:r})});T.displayName="AlertDialogAction";var C="AlertDialogCancel",D=r.forwardRef((e,r)=>{let{__scopeAlertDialog:s,...n}=e,{cancelRef:o}=v(C,s),l=h(s),u=(0,i.useComposedRefs)(r,o);return(0,t.jsx)(a.Close,{...l,...n,ref:u})});D.displayName=C;var O=({contentRef:e})=>{let t=`\`${y}\` requires a description for the component to be accessible for screen reader users. 2 3You can add a description to the \`${y}\` by passing a \`${x}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 4 5Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${y}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 6 7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",()=>T,"AlertDialog",()=>d,"AlertDialogAction",()=>T,"AlertDialogCancel",()=>D,"AlertDialogContent",()=>b,"AlertDialogDescription",()=>w,"AlertDialogOverlay",()=>m,"AlertDialogPortal",()=>f,"AlertDialogTitle",()=>S,"AlertDialogTrigger",()=>p,"Cancel",()=>D,"Content",()=>b,"Description",()=>w,"Overlay",()=>m,"Portal",()=>f,"Root",()=>d,"Title",()=>S,"Trigger",()=>p,"createAlertDialogScope",()=>c],95850);var A=e.i(95850),A=A;e.i(53759);var Q=e.i(541048),E=e.i(7205);let I=A.Root,P=A.Trigger,F=A.Portal,k=({className:e,...r})=>(0,t.jsx)(A.Overlay,{className:(0,Q.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...r});k.displayName=A.Overlay.displayName;let U=({className:e,...r})=>(0,t.jsxs)(F,{children:[(0,t.jsx)(k,{}),(0,t.jsx)(A.Content,{className:(0,Q.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...r})]});U.displayName=A.Content.displayName;let N=({className:e,...r})=>(0,t.jsx)("div",{className:(0,Q.cn)("flex flex-col gap-y-3 text-center sm:text-left",e),...r});N.displayName="AlertDialogHeader";let j=({className:e,...r})=>(0,t.jsx)("div",{className:(0,Q.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});j.displayName="AlertDialogFooter";let q=({className:e,...r})=>(0,t.jsx)(A.Title,{className:(0,Q.cn)("text-lg font-semibold",e),...r});q.displayName=A.Title.displayName;let M=({className:e,...r})=>(0,t.jsx)(A.Description,{className:(0,Q.cn)("text-muted-foreground text-sm",e),...r});M.displayName=A.Description.displayName;let L=({className:e,...r})=>(0,t.jsx)(A.Action,{className:(0,Q.cn)((0,E.buttonVariants)(),e),...r});L.displayName=A.Action.displayName;let B=({className:e,...r})=>(0,t.jsx)(A.Cancel,{className:(0,Q.cn)((0,E.buttonVariants)({variant:"outline"}),"mt-2 sm:mt-0",e),...r});B.displayName=A.Cancel.displayName,e.s(["AlertDialog",()=>I,"AlertDialogAction",()=>L,"AlertDialogCancel",()=>B,"AlertDialogContent",()=>U,"AlertDialogDescription",()=>M,"AlertDialogFooter",()=>j,"AlertDialogHeader",()=>N,"AlertDialogTitle",()=>q,"AlertDialogTrigger",()=>P],146258)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.