1import{t as e}from"./fetchAuthSession-hnwntX5I.js";import{_ as t}from"./api-BHISi-Qb.js";import{t as n}from"./preload-helper-zJ_50EbN.js";import{t as r}from"./apiFetch-BJlXLtTC.js";var i=`This free allowance is complete. Your existing work stays available, and Anchor Pro adds unlimited access.`,a=`This was already created, and nothing was used. Go back to this job to open it.`;async function o(){try{let t=(await e()).tokens?.idToken?.toString();return t?{"X-Anchor-Id-Token":t}:{}}catch{return{}}}async function s(e){return{...await o(),...e?{"X-Anchor-Meter-Key":e}:{}}}var c=`/demo`;function l(){if(typeof window>`u`)return!1;let e=window.location.pathname;return e===c||e.startsWith(`${c}/`)}function u(){return l()?`/demo/org`:`/org`}function d(){return l()?`/demo/coach`:`/coach`}var f=()=>n(()=>import(`./demoApi-DsrYAKWG.js`),[]),p=class extends Error{status;code;constructor(e,t){super(`org api ${e}: ${t}`),this.status=e,this.code=t}};async function m(e,n={}){let i=await r(`${t().replace(/\/$/,``)}${e}`,{method:n.method??`GET`,headers:{"Content-Type":`application/json`,...await o()},...n.body===void 0?{}:{body:JSON.stringify(n.body)}}),a=await i.json().catch(()=>({}));if(!i.ok){let t=a&&typeof a==`object`&&`error`in a?String(a.error):`unknown`;throw console.error(`[orgApi] ${e.split(`?`)[0]} failed: ${i.status} ${t}`),new p(i.status,t)}return a}function h(){return l()?f().then(e=>e.demoCoachClients()):m(`/coach/clients`)}function g(){return l()?f().then(e=>e.demoOrgMe()):m(`/org/me`)}function _(e){return l()?f().then(e=>e.demoPeople()):m(`/org/${encodeURIComponent(e)}/people`)}function v(e,t,n=null){if(l())return f().then(e=>e.demoStatsForOrg(t,n));let r=new URLSearchParams({range:t.range});return t.range===`custom`&&(t.since&&r.set(`since`,t.since),t.until&&r.set(`until`,t.until)),n&&r.set(`coach`,n),m(`/org/${encodeURIComponent(e)}/stats?${r.toString()}`)}function y(e,t){return l()?f().then(e=>e.demoInvite(t)):m(`/org/${encodeURIComponent(e)}/invite`,{method:`POST`,body:t})}function b(e,t,n){return l()?f().then(e=>e.demoAssign(t,n)):m(`/org/${encodeURIComponent(e)}/assign`,{method:`POST`,body:{coachSub:t,clientSubs:n}})}function x(e,t,n){return l()?f().then(e=>e.demoUnassign(t,n)):m(`/org/${encodeURIComponent(e)}/unassign`,{method:`POST`,body:{coachSub:t,clientSubs:n}})}function S(e,t){return l()?f().then(e=>e.demoRemoveMember(t)):m(`/org/${encodeURIComponent(e)}/remove`,{method:`POST`,body:{userSub:t}})}function C(e,t){return l()?f().then(e=>e.demoRevokeInvite(t)):m(`/org/${encodeURIComponent(e)}/invite/revoke`,{method:`POST`,body:{email:t}})}function w(e,t){return l()?f().then(e=>e.demoRename(t)):m(`/org/${encodeURIComponent(e)}/rename`,{method:`POST`,body:t})}function T(e){return l()?f().then(t=>t.demoClientResumesFor(e)):m(`/client/${encodeURIComponent(e)}/resumes`)}function E(e,t){if(l())return f().then(n=>n.demoClientStatsFor(e,t));let n=new URLSearchParams({range:t.range});return t.range===`custom`&&(t.since&&n.set(`since`,t.since),t.until&&n.set(`until`,t.until)),m(`/client/${encodeURIComponent(e)}/stats?${n.toString()}`)}function D(e){return l()?f().then(t=>t.demoClientStarsFor(e)):m(`/client/${encodeURIComponent(e)}/stars`)}function O(e,t){if(l())return f().then(n=>n.demoClientDocumentsFor(e,t));let n=new URLSearchParams({jobId:t});return m(`/client/${encodeURIComponent(e)}/documents?${n.toString()}`)}export{s as S,l as _,D as a,i as b,g as c,y as d,S as f,d as g,x as h,T as i,_ as l,C as m,b as n,E as o,w as p,O as r,h as s,p as t,v as u,u as v,o as x,a as y};
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.