PageSourceSearch

https://www.trademania.io/_next/static/chunks/19ac70fa0981ab44.js?dpl=dpl_8mWyVn7eH6joUDjyfEpjyBsNU9rx

js trademania.io collected 2026-10-09 22:45:18 UTC 60,440 bytes, 14 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,132784,e=>{"use strict";var t=e.i(480645),r=e.i(548827);function i(){return false}function s(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}var n="https://va.vercel-scripts.com/v1/speed-insights",a=`${n}/script.js`,o=`${n}/script.debug.js`;function u(e){let r=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(r.current)e.route&&r.current(e.route);else{let t=function(e={}){var t;if("undefined"==typeof window||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let r=!!e.dsn,s=e.scriptSrc||(i()?o:r?a:"/_vercel/speed-insights/script.js");if(document.head.querySelector(`script[src*="${s}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let n=document.createElement("script");return n.src=s,n.defer=!0,n.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.0.11",e.sampleRate&&(n.dataset.sampleRate=e.sampleRate.toString()),e.route&&(n.dataset.route=e.route),e.endpoint&&(n.dataset.endpoint=e.endpoint),e.dsn&&(n.dataset.dsn=e.dsn),i()&&!1===e.debug&&(n.dataset.debug="false"),n.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${s}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(n),{setRoute:e=>{n.dataset.route=e??void 0}}}({framework:e.framework||"react",...e});t&&(r.current=t.setRoute)}},[e.route]),null}function l(e){let i,n,a,o,l=(i=(0,r.useParams)(),n=(0,r.useSearchParams)(),a=(0,r.usePathname)(),o={...Object.fromEntries(n.entries()),...i||{}},i?function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,i]of e)if(!Array.isArray(i)){let e=s(i);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,i]of e)if(Array.isArray(i)){let e=s(i.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(a,o):null);return t.default.createElement(u,{route:l,...e,framework:"next"})}function c(e){return t.default.createElement(t.Suspense,{fallback:null},t.default.createElement(l,{...e}))}e.s(["SpeedInsights",()=>c])},237308,e=>{"use strict";var t=e.i(480645);function r(){return"undefined"!=typeof window}function i(){return"production"}function s(){return(r()?window.vam:i())||"production"}function n(){return"production"===s()}function a(){return"development"===s()}function o(e,t,i){var s,o;if(!r()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(n())console.warn(e);else throw Error(e);return}if(!t){null==(s=window.va)||s.call(window,"event",{name:e,options:i});return}try{let r=function(e,t){if(!e)return;let r=e,i=[];for(let[s,n]of Object.entries(e))"object"==typeof n&&null!==n&&(t.strip?r=function(e,{[e]:t,...r}){return r}(s,r):i.push(s));if(i.length>0&&!t.strip)throw Error(`The following properties are not valid: ${i.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return r}(t,{strip:n()});null==(o=window.va)||o.call(window,"event",{name:e,data:r,options:i})}catch(e){e instanceof Error&&a()&&console.error(e)}}function u(e){return(0,t.useEffect)(()=>{!function(e={debug:!0}){var t;if(!r())return;!function(e="auto"){if("auto"===e){window.vam=i();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let s=e.scriptSrc||(a()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.js");if(document.head.querySelector(`script[src*="${s}"]`))return;let n=document.createElement("script");n.src=s,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.3.1",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint&&(n.dataset.endpoint=e.endpoint),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=a()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${s}. ${e}`)},a()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,t.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}e.s(["Analytics",()=>u,"track",()=>o])},680723,e=>{"use strict";var t,r,i=e.i(980995),s=e.i(843788),n={scriptHostname:("u">typeof s.default?s.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST??s.default.env.VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_BRANCH:void 0},a=e.i(412544),o={scriptHostname:("u">typeof s.default?s.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_HOST??s.default.env.VERCEL_TOOLBAR_HOST:void 0)??"https://vercel.live",ownerId:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_OWNER_ID:void 0,projectId:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_PROJECT_ID:void 0,branch:"u">typeof s.default?s.default.env.VERCEL_TOOLBAR_BRANCH:void 0},u=e.i(480645),l=!1;function c({shouldMount:e}){return(0,u.useEffect)(()=>(e&&l&&function(e={}){if(typeof window>"u"||null===document.querySelector("vercel-live-feedback")){Object.assign(o,e);let t=document.createElement("script");for(let[e,i]of(t.src=`${o.scriptHostname}/_next-live/feedback/feedback.js`,t.setAttribute("data-explicit-opt-in","true"),Object.entries(function(){if(o.ownerId&&o.projectId)return{"data-owner-id":o.ownerId,"data-project-id":o.projectId,"data-branch":r??o.branch}}()??{})))i&&t.setAttribute(e,i);(document.head||document.documentElement).appendChild(t)}}(),l=!0,()=>{(typeof window>"u"?void 0:window.__vercel_toolbar)?.unmount()}),[]),null}function d(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.default,{strategy:"afterInteractive",...e,...function(){if(n.ownerId&&n.projectId)return{"data-owner-id":n.ownerId,"data-project-id":n.projectId,"data-branch":t??n.branch}}(),id:"vercel-toolbar",src:`${n.scriptHostname}/_next-live/feedback/feedback.js`,"data-explicit-opt-in":"true"}),(0,i.jsx)(c,{shouldMount:!0})]})}["1","true"].includes(s.default.env.NEXT_PUBLIC_VERCEL_TOOLBAR_INJECT_IN_DEVELOPMENT??s.default.env.VERCEL_TOOLBAR_INJECT_IN_DEVELOPMENT??"");var h=e.i(548827),p=e.i(394998);let f=(0,p.createServerReference)("00faf7737173bd598185bf5158940620c1b396d968",p.callServer,void 0,p.findSourceMapURL,"handleMakeDraft");function m({isDraftMode:e}){let t=(0,h.useSearchParams)(),r=t.has("preview");return(t.has("__vercel_draft")||t.has("draft"))&&!e?(setTimeout(()=>{f()},1e3),null):r||e?(0,i.jsx)(d,{}):null}e.s(["StaffToolbar",()=>m],680723)},392720,e=>{"use strict";var t=e.i(980995),r=e.i(480645);let i=(0,r.createContext)(void 0),s={setTheme:e=>{},themes:[]};var n=e.i(482001);let a=({...e})=>{var a;let{theme:o="system"}=null!=(a=(0,r.useContext)(i))?a:s;return(0,t.jsx)(n.Toaster,{theme:o,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};e.s(["Toaster",()=>a],392720)},793474,e=>{"use strict";var t=e.i(480645),r=e.i(548827),i=e.i(776159);let s=["/studio","/shop","/vsl-short","/vsl-long","trading-ausbildung","/customers","/bastian-keller"],n=["bastiankeller"];e.s(["default",0,()=>{let e=(0,r.usePathname)(),a=(0,t.useRef)(!1);return(0,t.useEffect)(()=>
1{if(n.includes(i.normalizedDomain)||s.some(t=>e.includes(t))){window.Intercom&&(window.Intercom("shutdown"),a.current=!0);return}let t={api_base:"https://api-iam.intercom.io",app_id:"u9mmze7f"};if(window.intercomSettings=t,window.Intercom)a.current?(window.Intercom("boot",t),a.current=!1):(window.Intercom("reattach_activator"),window.Intercom("update",t));else{let e=document.createElement("script");if(!e)return void console.error("Intercom script could not be created.");e.type="text/javascript",e.async=!0,e.src="https://widget.intercom.io/widget/u9mmze7f",e.onload=()=>window.Intercom("update",t),document.body.appendChild(e)}},[e]),null}])},433035,e=>{"use strict";var t=e.i(480645);function r(){return(0,t.useEffect)(()=>{if(!window.profitwellScriptLoaded){var e,t,r,i,s;let n=document.createElement("script");n.id="profitwell-js",n.setAttribute("data-pw-auth","8071fa85e8a78dd829e5f6897cc84946"),document.body.appendChild(n),e=window,t=document,e[r="profitwell"]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},i=t.createElement("script"),s=t.getElementsByTagName("script")[0],i.async=1,i.src="https://public.profitwell.com/js/profitwell.js?auth="+t.getElementById(r+"-js").getAttribute("data-pw-auth"),s.parentNode.insertBefore(i,s),window.profitwellScriptLoaded=!0}},[]),(0,t.useEffect)(()=>{window.profitwell&&(window.profitwellFired=!0,window.profitwell("start",{}))},[]),null}e.s(["default",()=>r])},561448,e=>{"use strict";var t=e.i(980995),r=e.i(480645);let i=(0,r.lazy)(()=>e.A(319798));function s(e){return(0,t.jsx)(r.Suspense,{fallback:null,children:(0,t.jsx)(i,{...e})})}e.s(["default",()=>s])},364716,e=>{"use strict";e.i(843788);var t,r=e.i(980995),i=e.i(107894),s=e.i(16917),n=e.i(142164),a=e.i(145356),o=e.i(408593),u=e.i(750430),l=e.i(821976),c=e.i(552133),d=e.i(387300),h=e.i(548915),p=e.i(153766),f=e.i(400286),m=e.i(671539),g=e.i(346648),y=e.i(548833),w=e.i(901306),v=e.i(709537),b=e.i(590873),R=e.i(684616),E=e.i(163383),q=e.i(378922),I=e.i(64348),$=e.i(92535);let j="drafts.",T="versions.";function A(e){return e.startsWith(j)}function C(e){return e.startsWith(T)}function x(e){return C(e)?j+_(e):A(e)?e:j+e}function O(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${T}${t}.${_(e)}`}function S(e){if(!C(e))return;let[t,r,...i]=e.split(".");return r}function _(e){return C(e)?e.split(".").slice(2).join("."):A(e)?e.slice(j.length):e}var V=e.i(326674);let D=/\r\n|[\n\r\u2028\u2029]/;function P(e,t){let r=0;for(let i=0;i<t.length;i++){let s=t[i].length+1;if(r+s>e)return{line:i+1,column:e-r};r+=s}return{line:t.length,column:t[t.length-1]?.length??0}}class k extends Error{response;statusCode=400;responseBody;details;constructor(e,t){const r=M(e,t);super(r.message),Object.assign(this,r)}}class L extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=M(e);super(t.message),Object.assign(this,t)}}function M(e,t){var r,i,s;let n=e.body,a={response:e,statusCode:e.statusCode,responseBody:(r=n,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,q.isRecord)(n))return a.message=U(e,n),a;let o=n.error;if("string"==typeof o&&"string"==typeof n.message)return a.message=`${o} - ${n.message}`,a;if("object"!=typeof o||null===o)return"string"==typeof o?a.message=o:"string"==typeof n.message?a.message=n.message:a.message=U(e,n),a;if("type"in(i=o)&&"mutationError"===i.type&&"description"in i&&"string"==typeof i.description||"type"in(s=o)&&"actionError"===s.type&&"description"in s&&"string"==typeof s.description){let e=o.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`:
2- ${t.join(`
3- `)}`:"";return e.length>5&&(r+=`
4...and ${e.length-5} more`),a.message=`${o.description}${r}`,a.details=n.error,a}return F(o)?(a.message=N(o,t?.options?.query?.tag),a.details=n.error):"description"in o&&"string"==typeof o.description?(a.message=o.description,a.details=o):a.message=U(e,n),a}function F(e){return(0,q.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function N(e,t){let{query:r,start:i,end:s,description:n}=e;if(!r||typeof i>"u")return`GROQ query parse error: ${n}`;let a=t?`
5
6Tag: ${t}`:"";return`GROQ query parse error:
7${function(e,t,r){let i=e.split(D),{start:s,end:n,markerLines:a}=function(e,t){let r={...e.start},i={...r,...e.end},s=r.line??-1,n=r.column??0,a=i.line,o=i.column,u=Math.max(s-3,0),l=Math.min(t.length,a+3);-1===s&&(u=0),-1===a&&(l=t.length);let c=a-s,d={};if(c)for(let e=0;e<=c;e++){let r=e+s;if(n)if(0===e){let e=t[r-1].length;d[r]=[n,e-n+1]}else if(e===c)d[r]=[0,o];else{let i=t[r-e].length;d[r]=[0,i]}else d[r]=!0}
7else n===o?n?d[s]=[n,0]:d[s]=!0:d[s]=[n,o-n];return{start:u,end:l,markerLines:d}}({start:P(t.start,i),end:t.end?P(t.end,i):void 0},i),o=`${n}`.length;return e.split(D,n).slice(s,n).map((e,t)=>{let i=s+1+t,n=` ${` ${i}`.slice(-o)} |`,u=a[i],l=!a[i+1];if(!u)return` ${n}${e.length>0?` ${e}`:""}`;let c="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),i=u[1]||1;c=`
8 `+n.replace(/\d/g," ")+" "+t+"^".repeat(i),l&&r&&(c+=" "+r)}return">"+n+(e.length>0?` ${e}`:"")+c}).join(`
9`)}(r,{start:i,end:s},n)}${a}`}function U(e,t){var r;let i="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",s=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${s}${i}`}class B extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;const t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){const{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let z={onResponse:(e,t)=>{if(e.statusCode>=500)throw new L(e);if(e.statusCode>=400)throw new k(e,t);return e}};function H(e,t={}){return(0,i.getIt)([(0,s.retry)({shouldRetry:W}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let i=e.headers["x-sanity-warning"];for(let e of Array.isArray(i)?i:[i])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),(0,s.jsonRequest)(),(0,s.jsonResponse)(),(0,s.progress)(),z,(0,s.observable)({implementation:n.Observable})])}function W(e,t,r){if(0===r.maxRetries)return!1;let i="GET"===r.method||"HEAD"===r.method,n=(r.uri||r.url).startsWith("/data/query"),a=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!i||!!n)&&!!a||s.retry.shouldRetry(e,t,r)}function G(e){return"https://www.sanity.io/help/"+e}let J=["image","file"],Y=["before","after","replace"],Q=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},X=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},K=(e,t)=>{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},Z=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);K(e,t._id)},ee=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);var r=t._type;if("string"!=typeof r)throw Error(`\`${e}()\`: \`${r}\` is not a valid document type`)},et=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},er=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},ei=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:i}=t;switch(r){case"dataset":if(2!==i.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},es=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},en=e=>{var t;let r,i;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(i=t(...e),r=!0),i)},ea=en(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),eo=en(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),eu=en(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),el=en(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),ec=en(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${G("js-client-browser-token")} for more information and how to hide this warning.`]),ed=en(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),eh=en(["Using the Sanity client without specifying an API version is deprecated.",`See ${G("js-client-api-version")}`]),ep=(en(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),en(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),ef=en(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),em={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eg=["localhost","127.0.0.1","0.0.0.0"];function ey(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let ew=(e,t)=>{let r,i={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||em.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};i.apiVersion||eh();let s={...em,...i};s["~experimental_resource"]&&!s.resource&&(ef(),s.resource=s["~experimental_resource"]);let n=s.resource,a=s.useProjectHostname&&!n;if(typeof Promise>"u"){let e=G("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(a&&!s.projectId)throw Error("Configuration must contain `projectId`");if(n&&ei(s),"u">typeof s.perspective&&ey(s.perspective),"encodeSourceMap"in s)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in s)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");
9if("boolean"!=typeof s.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${s.stega.enabled}`);if(s.stega.enabled&&void 0===s.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(s.stega.enabled&&"string"!=typeof s.stega.studioUrl&&"function"!=typeof s.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${s.stega.studioUrl}`);let o="u">typeof window&&window.location&&window.location.hostname,u=o&&(r=window.location.hostname,-1!==eg.indexOf(r)),l=!!s.token;s.withCredentials&&l&&(ed(),s.withCredentials=!1),o&&u&&l&&!0!==s.ignoreBrowserTokenWarning?ec():typeof s.useCdn>"u"&&eo(),a&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(s.projectId),s.dataset&&Q(s.dataset),"requestTagPrefix"in s&&(s.requestTagPrefix=s.requestTagPrefix?er(s.requestTagPrefix).replace(/\.+$/,""):void 0),s.apiVersion=`${s.apiVersion}`.replace(/^v/,""),s.isDefaultApi=s.apiHost===em.apiHost,!0===s.useCdn&&s.withCredentials&&ea(),s.useCdn=!1!==s.useCdn&&!s.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(s.apiVersion);let c=s.apiHost.split("://",2),d=c[0],h=c[1],p=s.isDefaultApi?"apicdn.sanity.io":h;return a?(s.url=`${d}://${s.projectId}.${h}/v${s.apiVersion}`,s.cdnUrl=`${d}://${s.projectId}.${p}/v${s.apiVersion}`):(s.url=`${s.apiHost}/v${s.apiVersion}`,s.cdnUrl=s.url),s};class ev extends Error{name="ConnectionFailedError"}class eb extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}
9class eR extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class eE extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class eq extends Error{name="MessageParseError"}let eI=["channelError","disconnect"];function e$(e,t){return(0,a.defer)(()=>{let t=e();return(0,u.isObservable)(t)?t:(0,o.of)(t)}).pipe((0,l.mergeMap)(e=>{var r,i;return r=e,i=t,new n.Observable(e=>{let t=i.includes("open"),s=i.includes("reconnect");function n(t){if("data"in t){let[r,i]=ej(t);e.error(r?new eq("Unable to parse EventSource error message",{cause:i}):new eE((i?.data).message,i));return}r.readyState===r.CLOSED?e.error(new ev("EventSource connection failed")):s&&e.next({type:"reconnect"})}function a(){e.next({type:"open"})}function o(t){let[i,s]=ej(t);if(i)return void e.error(new eq("Unable to parse EventSource message",{cause:i}));if("channelError"===t.type){var n,a;let t,i=new URL(r.url).searchParams.get("tag");e.error(new eR((n=s?.data,a=i,(t=n.error)?F(t)?N(t,a):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):n.message||"Unknown listener error"),s.data));return}"disconnect"===t.type?e.error(new eb(`Server disconnected client: ${s.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...s.data?{data:s.data}:{}})}r.addEventListener("error",n),t&&r.addEventListener("open",a);let u=[...new Set([...eI,...i])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,o)),()=>{r.removeEventListener("error",n),t&&r.removeEventListener("open",a),u.forEach(e=>r.removeEventListener(e,o)),r.close()}})}))}function ej(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function eT(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(`
10`);throw Error(`Unknown selection - must be one of:
11
12${t}`)}class eA{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return X("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return((e,t,r)=>{let i="insert(at, selector, items)";if(-1===Y.indexOf(e)){let e=Y.map(e=>`"${e}"`).join(", ");throw Error(`${i} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${i} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${i} takes an "items"-argument which must be an array`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,i){let s=t<0?t-1:t,n=typeof r>"u"||-1===r?-1:Math.max(0,t+r),a=`${e}[${s}:${s<0&&n>=0?"":n}]`;return this.insert("replace",a,i||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...eT(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return X(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class eC extends eA{#e;constructor(e,t,r){super(e,t),this.#e=r}clone(){return new eC(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},t)}}class ex extends eA{#e;
12constructor(e,t,r){super(e,t),this.#e=r}clone(){return new ex(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},t)}}let eO={returnDocuments:!1};class eS{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return X("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return X(t,e),Z(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return X(t,e),Z(t,e),this._add({[t]:e})}delete(e){return K("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class e_ extends eS{#e;constructor(e,t,r){super(e,r),this.#e=t}clone(){return new e_([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eO,e||{}))}patch(e,t){let r="function"==typeof t,i="string"!=typeof e&&e instanceof ex,s="object"==typeof e&&("query"in e||"id"in e);if(i)return this._add({patch:e.serialize()});if(r){let r=t(new ex(e,{},this.#e));if(!(r instanceof ex))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(s){let r=new ex(e,t||{},this.#e);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class eV extends eS{#e;constructor(e,t,r){super(e,r),this.#e=t}clone(){return new eV([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eO,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof eC)return this._add({patch:e.serialize()});if(r){let r=t(new eC(e,{},this.#e));if(!(r instanceof eC))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let eD=({query:e,params:t={},options:r={}})=>{let i=new URLSearchParams,{tag:s,includeMutations:n,returnQuery:a,...o}=r;for(let[r,n]of(s&&i.append("tag",s),i.append("query",e),Object.entries(t)))void 0!==n&&i.append(`$${r}`,JSON.stringify(n));for(let[e,t]of Object.entries(o))t&&i.append(e,`${t}`);return!1===a&&i.append("returnQuery","false"),!1===n&&i.append("includeMutations","false"),`?${i}`},eP=e=>"response"===e.type,ek=e=>e.body;function eL(t,r,i,s,n={},a={}){let o="stega"in a?{...i||{},..."boolean"==typeof a.stega?{enabled:a.stega}:a.stega||{}}:i,u=o.enabled?(0,q.stegaClean)(n):n,l=!1===a.filterResponse?e=>e:e=>e.result,{cache:d,next:h,...p}={useAbortSignal:"u">typeof a.signal,resultSourceMap:o.enabled?"withKeyArraySelector":a.resultSourceMap,...a,returnQuery:!1===a.filterResponse&&!1!==a.returnQuery},f=eK(t,r,"query",{query:s,params:u},"u">typeof d||"u">typeof h?{...p,fetch:{cache:d,next:h}}:p);return o.enabled?f.pipe((0,I.combineLatestWith)((0,c.from)(e.A(882405).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,R.map)(([e,t])=>{let r=t(e.result,e.resultSourceMap,o);return l({...e,result:r})})):f.pipe((0,R.map)(l))}function eM(e,t,r,i={}){let s={uri:e9(e,"doc",(()=>{if(!i.releaseId)return r;let e=S(r);if(!e){if(A(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${i.releaseId}\``);return O(r,i.releaseId)}if(e!==i.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${i.releaseId}\`)`);return r})()),json:!0,tag:i.tag,signal:i.signal,query:void 0!==i.includeAllVersions?{includeAllVersions:i.includeAllVersions}:void 0};return e4(e,t,s).pipe((0,$.filter)(eP),(0,R.map)(e=>{let t=e.body.documents;return t?i.includeAllVersions?t:t[0]:i.includeAllVersions?[]:void 0}))}function eF(e,t,r,i={}){let s={uri:e9(e,"doc",r.join(",")),json:!0,tag:i.tag,signal:i.signal};return e4(e,t,s).pipe((0,$.filter)(eP),(0,R.map)(e=>{let t,i,s=(t=e.body.documents||[],i=e=>e._id,t.reduce((e,t)=>
12(e[i(t)]=t,e),Object.create(null)));return r.map(e=>s[e]||null)}))}function eN(e,t,r,i={}){return eK(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},i)}function eU(e,t,r,i){return Z("createIfNotExists",r),eZ(e,t,r,"createIfNotExists",i)}function eB(e,t,r,i){return Z("createOrReplace",r),eZ(e,t,r,"createOrReplace",i)}function ez(e,t,r,i,s){return Z("createVersion",r),ee("createVersion",r),ep(),eX(e,t,{actionType:"sanity.action.document.version.create",publishedId:i,document:r},s)}function eH(e,t,r,i,s,n,a){if(!i)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return K("createVersion",i),K("createVersion",r),eX(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:i,versionId:s?O(r,s):x(r),ifBaseRevisionId:n},a)}function eW(e,t,r,i){return eK(e,t,"mutate",{mutations:[{delete:eT(r)}]},i)}function eG(e,t,r,i=!1,s){return eX(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:i},s)}function eJ(e,t,r,i){return Z("replaceVersion",r),ee("replaceVersion",r),eX(e,t,{actionType:"sanity.action.document.version.replace",document:r},i)}function eY(e,t,r,i,s){return eX(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:i},s)}function eQ(e,t,r,i){let s;return eK(e,t,"mutate",{mutations:Array.isArray(s=r instanceof ex||r instanceof eC?{patch:r.serialize()}:r instanceof e_||r instanceof eV?r.serialize():r)?s:[s],transactionId:i&&i.transactionId||void 0},i)}function eX(e,t,r,i){let s=Array.isArray(r)?r:[r],n=i&&i.transactionId||void 0;return eK(e,t,"actions",{actions:s,transactionId:n,skipCrossDatasetReferenceValidation:i&&i.skipCrossDatasetReferenceValidation||void 0,dryRun:i&&i.dryRun||void 0},i)}function eK(e,t,r,i,s={}){let n="mutate"===r,a="actions"===r,o=n||a?"":eD(i),u=!n&&!a&&o.length<11264,l=u?o:"",c=s.returnFirst,{timeout:d,token:h,tag:p,headers:f,returnQuery:m,lastLiveEventId:g,cacheMode:y}=s,w={method:u?"GET":"POST",uri:e9(e,r,l),json:!0,body:u?void 0:i,query:n&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(s),timeout:d,headers:f,token:h,tag:p,returnQuery:m,perspective:s.perspective,resultSourceMap:s.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:y,canUseCdn:"query"===r,signal:s.signal,fetch:s.fetch,useAbortSignal:s.useAbortSignal,useCdn:s.useCdn};return e4(e,t,w).pipe((0,$.filter)(eP),(0,R.map)(ek),(0,R.map)(e=>{if(!n)return e;let t=e.results||[];if(s.returnDocuments)return c?t[0]&&t[0].document:t.map(e=>e.document);let r=c?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[c?"documentId":"documentIds"]:r}}))}function eZ(e,t,r,i,s={}){return eK(e,t,"mutate",{mutations:[{[i]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},s))}let e0=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},e1=(e,t)=>e0(e)&&t.startsWith(e9(e,"query"));function e4(e,t,r){var i;let s=r.url||r.uri,a=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(s.startsWith("/data/")||e1(e,s)||e0(e)&&s.startsWith(e9(e,"mutate"))||e0(e)&&s.startsWith(e9(e,"doc",""))||e0(e)&&s.startsWith(e9(e,"listen"))||e0(e)&&s.startsWith(e9(e,"history",""))):r.canUseCdn,u=(r.useCdn??a.useCdn)&&o,l=r.tag&&a.requestTagPrefix?[a.requestTagPrefix,r.tag].join("."):r.tag||a.requestTagPrefix;if(l&&null!==r.tag&&(r.query={tag:er(l),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&e1(e,s)){let e=r.resultSourceMap??a.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||a.perspective;"u">typeof t&&("previewDrafts"===t&&el(),ey(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&u&&(u=!1,eu())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),u&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let i=t.token||e.token;i&&(r.Authorization=`Bearer ${i}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let s=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),n=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof n>"u"?3e5:n,proxy:t.proxy||e.proxy,json:!0,withCredentials:s,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(a,Object.assign({},r,{url:e5(e,s,u)})),d=new n.Observable(e=>t(c,a.requester).subscribe(e));return r.signal?d.pipe((i=r.signal,e=>new n.Observable(t=>{let r=()=>t.error(function(e){if(e2)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(i));if(i&&i.aborted)return void r();let s=e.subscribe(t);return i.addEventListener("abort",r),()=>{i.removeEventListener("abort",r),s.unsubscribe()}}))):d}function e8(e,t,r){return e4(e,t,r).pipe((0,$.filter)(e=>"response"===e.type),(0,R.map)(e=>e.body))}function e9(e,t,r){let i=e.config();if(i.resource){ei(i);let e=e3(i),s=void 0!==r?`${t}/${r}`:t;return`${e}/${s}`.replace(/\/($|\?)/,"$1")}let s=et(i),n=`/${t}/${s}`;return`/data${void 0!==r?`${n}/${r}`:n}`.replace(/\/($|\?)/,"$1")}function e5(e,t,r=!1){let{url:i,cdnUrl:s}=e.config();return`${r?s:i}/${t.replace(/^\//,"")}`}let e2=!!globalThis.DOMException,e3=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:i}=t;switch(r){case"dataset":{let e=i.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${i}`;case"media-library":return`/media-libraries/${i}`;case"dashboard":return`/dashboards/${i}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function e6(e,t,r){let i=et(e.config());return e8(e,t,{method:"POST",uri:`/agent/action/generate/${i}`,body:r})}function e7(e,t,r){let i=et(e.config());return e8(e,t,{method:"POST",uri:`/agent/action/transform/${i}`,body:r})}function te(e,t,r){let i=et(e.config());return e8(e,t,{method:"POST",uri:`/agent/action/translate/${i}`,body:r})}class tt{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return e6(this.#e,this.#t,e)}transform(e){return e7(this.#e,this.#t,e)}translate(e){return te(this.#e,this.#t,e)}}class tr{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return(0,d.lastValueFrom)(e6(this.#e,this.#t,e))}transform(e){return(0,d.lastValueFrom)(e7(this.#e,this.#t,e))}translate(e){return(0,d.lastValueFrom)(te(this.#e,this.#t,e))}prompt(e){var t,r;let i;return(0,d.lastValueFrom)((t=this.#e,r=this.#t,i=et(t.config()),e8(t,r,{method:"POST",uri:`/agent/action/prompt/${i}`,body:e})))}patch(e){var t,r;let i;return(0,d.lastValueFrom)((t=this.#e,r=this.#t,i=et(t.config()),e8(t,r,{method:"POST",uri:`/agent/action/patch/${i}`,body:e})))}}class ti{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,r){return tn(this.#e,this.#t,e,t,r)}}class ts{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,r){let i=tn(this.#e,this.#t,e,t,r);return(0,d.lastValueFrom)(i.pipe((0,$.filter)(e=>"response"===e.type),(0,R.map)(e=>e.body.document)))}}function tn(e,t,r,i,s={}){var n,a;if(-1===J.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${J.join(", ")}`);let o=s.extract||void 0;o&&!o.length&&(o=["none"]);let u=e.config(),l=(n=s,a=i,!(typeof File>"u")&&a instanceof File?Object.assign({filename:!1===n.preserveFilename?void 0:a.name,contentType:a.type},n):n),{tag:c,label:d,title:h,description:p,creditLine:f,filename:m,source:g}=l,y=u.resource?.type==="media-library",w=y?{title:h,filename:m}:{label:d,title:h,description:p,filename:m,meta:o,creditLine:f};return g&&!y&&(w.sourceId=g.id,w.sourceName=g.name,w.sourceUrl=g.url),e4(e,t,{tag:c,method:"POST",timeout:l.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",i=e.resource;if(i){let{type:e,id:t}=i;
12switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${t}/assets/${r}`;case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let s=et(e);return`assets/${r}/${s}`}(u,r),headers:l.contentType?{"Content-Type":l.contentType}:{},query:w,body:i})}let ta=(0,a.defer)(()=>e.A(440574)).pipe((0,R.map)(({default:e})=>e),(0,h.shareReplay)(1));function to(){return function(e){return e.pipe((0,p.catchError)((e,t)=>e instanceof ev?(0,f.concat)((0,o.of)({type:"reconnect"}),(0,g.timer)(1e3).pipe((0,l.mergeMap)(()=>t))):(0,m.throwError)(()=>e)))}}let tu=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],tl={includeResult:!0};function tc(e,t,r={}){let{url:i,token:s,withCredentials:n,requestTagPrefix:a,headers:u}=this.config(),l=r.tag&&a?[a,r.tag].join("."):r.tag,c={...Object.keys(tl).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?tl[t]:r[t],e),{}),tag:l},d=eD({query:e,params:t,options:{tag:l,...tu.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${i}${e9(this,"listen",d)}`;if(h.length>14800)return(0,m.throwError)(()=>Error("Query too large for listener"));let p=c.events?c.events:["mutation"],f={};return n&&(f.withCredentials=!0),(s||u)&&(f.headers={},s&&(f.headers.Authorization=`Bearer ${s}`),u&&Object.assign(f.headers,u)),e$(()=>(typeof EventSource>"u"||f.headers?ta:(0,o.of)(EventSource)).pipe((0,R.map)(e=>new e(h,f))),p).pipe(to(),(0,$.filter)(e=>p.includes(e.type)),(0,R.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let td="2021-03-25";class th{#e;constructor(e){this.#e=e}events({includeDrafts:e=!1,tag:t}={}){var r,i,s,a;let{projectId:u,apiVersion:c,token:d,withCredentials:h,requestTagPrefix:f,headers:m}=this.#e.config(),g=c.replace(/^v/,"");if("X"!==g&&g<td)throw Error(`The live events API requires API version ${td} or later. The current API version is ${g}. Please update your API version to use this feature.`);if(e&&!d&&!h)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let E=e9(this.#e,"live/events"),q=new URL(this.#e.getUrl(E,!1)),I=t&&f?[f,t].join("."):t;I&&q.searchParams.set("tag",I),e&&q.searchParams.set("includeDrafts","true");let $={};e&&h&&($.withCredentials=!0),(e&&d||m)&&($.headers={},e&&d&&($.headers.Authorization=`Bearer ${d}`),m&&Object.assign($.headers,m));let j=`${q.href}::${JSON.stringify($)}`,T=tp.get(j);if(T)return T;let A=e$(()=>(typeof EventSource>"u"||$.headers?ta:(0,o.of)(EventSource)).pipe((0,R.map)(e=>new e(q.href,$))),["message","restart","welcome","reconnect","goaway"]),C=(i=q,s={method:"OPTIONS",mode:"cors",credentials:$.withCredentials?"include":"omit",headers:$.headers},new n.Observable(e=>{let t=new AbortController,r=t.signal;return fetch(i,{...s,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe((0,p.catchError)(()=>{throw new B({projectId:u})})),x=A.pipe(to(),(0,l.mergeMap)(e=>"reconnect"===e.type?C.pipe((0,l.mergeMap)(()=>(0,o.of)(e))):(0,o.of)(e)),(0,p.catchError)(e=>C.pipe((0,l.mergeMap)(()=>{throw e}))),(0,R.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,w.finalize)(()=>tp.delete(j)),(a="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{let t,r=!1,{predicate:i,...s}=a,o=e.pipe((0,y.tap)(e=>{a.predicate(e)&&(r=!0,t=e)}),(0,w.finalize)(()=>{r=!1,t=void 0}),(0,v.share)(s)),u=new n.Observable(e=>{r&&e.next(t),e.complete()});return(0,b.merge)(o,u)}));return tp.set(j,x),x}}let tp=new Map;class tf{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return tg(this.#e,this.#t,"PUT",e,t)}edit(e,t){return tg(this.#e,this.#t,"PATCH",e,t)}delete(e){return tg(this.#e,this.#t,"DELETE",e)}list(){es("dataset",this.#e.config());let e=this.#e.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),e8(this.#e,this.#t,{uri:r,tag:null})}}class tm{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return es("dataset",this.#e.config()),(0,d.lastValueFrom)(tg(this.#e,this.#t,"PUT",e,t))}edit(e,t){return es("dataset",this.#e.config()),(0,d.lastValueFrom)(tg(this.#e,this.#t,"PATCH",e,t))}delete(e){return es("dataset",this.#e.config()),(0,d.lastValueFrom)(tg(this.#e,this.#t,"DELETE",e))}list(){es("dataset",this.#e.config());let e=this.#e.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,d.lastValueFrom)(e8(this.#e,this.#t,{uri:r,tag:null}))}}function tg(e,t,r,i,s){return es("dataset",e.config()),Q(i),e8(e,t,{method:r,uri:`/datasets/${i}`,body:s,tag:null})}class ty{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){var r,i;let s=this.#e.config(),n=(s.resource||s["~experimental_resource"])?.id,{instanceId:a,library
12Id:o}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=tv.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(e),u=o||n;if(!u)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let l=(r=a,i=u,`/media-libraries/${i}/video/${r}/playback-info`),c=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:i,storyboard:s}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),i&&(i.width&&(t.animatedWidth=i.width),i.height&&(t.animatedHeight=i.height),void 0!==i.start&&(t.animatedStart=i.start),void 0!==i.end&&(t.animatedEnd=i.end),i.fps&&(t.animatedFps=i.fps),i.format&&(t.animatedFormat=i.format)),s&&s.format&&(t.storyboardFormat=s.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return e8(this.#e,this.#t,{method:"GET",uri:l,query:c})}}class tw{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){return(0,d.lastValueFrom)(new ty(this.#e.observable,this.#t).getPlaybackInfo(e,t))}}let tv=/^media-library:(ml[^:]+):([^:]+)$/;class tb{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),e8(this.#e,this.#t,{uri:"/projects",query:t})}getById(e){return e8(this.#e,this.#t,{uri:`/projects/${e}`})}}class tR{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),(0,d.lastValueFrom)(e8(this.#e,this.#t,{uri:"/projects",query:t}))}getById(e){return(0,d.lastValueFrom)(e8(this.#e,this.#t,{uri:`/projects/${e}`}))}}let tE=(0,V.customAlphabet)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),tq=(e,t)=>t?O(e,t):x(e);function tI(e,{releaseId:t,publishedId:r,document:i}){if(r&&i._id){let e=tq(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)})(e,i),e}if(i._id){let r=A(i._id),s=C(i._id);if(!r&&!s)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${i._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let s=S(i._id);if(s!==t)throw Error(`\`${e}()\` was called with a document ID (\`${i._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${s}\`).`)}return i._id}if(r)return tq(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let t$=(e,t)=>{let[r,i,s]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=tE(),metadata:i={}}=e;return[r,i,t]}return[tE(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...i,releaseType:i.releaseType||"undecided"}},options:s}};class tj{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return eM(this.#e,this.#t,`_.releases.${e}`,t)}create(e,t){let{action:r,options:i}=t$(e,t),{releaseId:s,metadata:n}=r;return eX(this.#e,this.#t,r,i).pipe((0,R.map)(e=>({...e,releaseId:s,metadata:n})))}edit({releaseId:e,patch:t},r){return eX(this.#e,this.#t,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return eX(this.#e,this.#t,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return eX(this.#e,this.#t,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return eX(this.#e,this.#t,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return eX(this.#e,this.#t,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return eX(this.#e,this.#t,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return eX(this.#e,this.#t,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return eN(this.#e,this.#t,e,t)}}class tT{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return(0,d.lastValueFrom)(eM(this.#e,this.#t,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:i}=t$(e,t),{releaseId:s,metadata:n}=r;return{...await (0,d.lastValueFrom)(eX(this.#e,this.#t,r,i)),releaseId:s,metadata:n}}edit({releaseId:e,patch:t},r){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,d.lastValueFrom)(eX(this.#e,this.#t,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,d.lastValueFrom)(eN(this.#e,this.#t,e,t))}}class tA{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return e8(this.#e,this.#t,{uri:`/users/${e}`})}}class tC{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return(0,d.lastValueFrom)(e8(this.#e,this.#t,{uri:`/users/${e}`}))}}class tx{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#r;#t;listen=tc;constructor(e,t=em){this.config(t),this.#t=e,this.assets=new ti(this,this.#t),this.datasets=new tf(this,this.#t),this.live=new th(this),this.mediaLibrary={video:new ty(this,this.#t)},this.projects=new tb(this,this.#t),this.users=new tA(this,this.#t),this.agent={action:new tt(this,this.#t)},this.releases=new tj(this,this.#t)}clone(){return new tx(this.#t,this.config())}config(e){if(void 0===e)return{...this.#r};if(this.#r&&!1===this.#r.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#r=ew(e,this.#r||{}),this}withConfig(e){let t=this.config();return new tx(this.#t,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return eL(this,this.#t,this.#r.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eM(this,this.#t,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eM(this,this.#t,e,r)}getDocuments(e,t){return eF(this,this.#t,e,t)}create(e,t){return eZ(this,this.#t,e,"create",t)}createIfNotExists(e,t){return eU(this,this.#t,e,t)}createOrReplace(e,t){return eB(this,this.#t,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:i,ifBaseRevisionId:s},n){if(!e)return eH(this,this.#t,t,i,r,s,n);let a=tI("createVersion",{document:e,publishedId:t,releaseId:r}),o={...e,_id:a},u=t||_(e._id);return ez(this,this.#t,o,u,n)}delete(e,t){return eW(this,this.#t,e,t)}discardVersion({releaseId:e,publishedId:t},r,i){let s=tq(t,e);return eG(this,this.#t,s,r,i)}replaceVersion({document:e,publishedId:t,releaseId:r},i){let s=tI("replaceVersion",{document:e,publishedId:t,releaseId:r}),n={...e,_id:s};return eJ(this,this.#t,n,i)}unpublishVersion({releaseId:e,publishedId:t},r){let i=O(t,e);return eY(this,this.#t,i,t,r)}mutate(e,t){return eQ(this,this.#t,e,t)}patch(e,t){return new eC(e,t,this)}transaction(e){return new eV(e,this)}action(e,t){return eX(this,this.#t,e,t)}request(e){return e8(this,this.#t,e)}getUrl(e,t){return e5(this,e,t)}getDataUrl(e,t){return e9(this,e,t)}}class tO{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#r;#t;listen=tc;constructor(e,t=em){this.config(t),this.#t=e,this.assets=new ts(this,this.#t),this.datasets=new tm(this,this.#t),this.live=new th(this),this.mediaLibrary={video:new tw(this,this.#t)},this.projects=new tR(this,this.#t),this.users=new tC(this,this.#t),this.agent={action:new tr(this,this.#t)},this.releases=new tT(this,this.#t),this.observable=new tx(e,t)}clone(){return new tO(this.#t,this.config())}config(e){if(void 0===e)return{...this.#r};if(this.#r&&!1===this.#r.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#r=ew(e,this.#r||{}),this}withConfig(e){let t=this.config();return new tO(this.#t,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,d.lastValueFrom)(eL(this,this.#t,this.#r.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,d.lastValueFrom)(eM(this,this.#t,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return(0,d.lastValueFrom)(eM(this,this.#t,e,r))}getDocuments(e,t){return(0,d.lastValueFrom)(eF(this,this.#t,e,t))}create(e,t){return(0,d.lastValueFrom)(eZ(this,this.#t,e,"create",t))}createIfNotExists(e,t){return(0,d.lastValueFrom)(eU(this,this.#t,e,t))}createOrReplace(e,t){return(0,d.lastValueFrom)(eB(this,this.#t,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:i,ifBaseRevisionId:s},n){if(!e)return(0,E.firstValueFrom)(eH(this,this.#t,t,i,r,s,n));let a=tI("createVersion",{document:e,publishedId:t,releaseId:r}),o={...e,_id:a},u=t||_(e._id);return(0,E.firstValueFrom)(ez(this,this.#t,o,u,n))}delete(e,t){return(0,d.lastValueFrom)(eW(this,this.#t,e,t))}discardVersion({releaseId:e,publishedId:t},r,i){let s=tq(t,e);return(0,d.lastValueFrom)(eG(this,this.#t,s,r,i))}replaceVersion({document:e,publishedId:t,releaseId:r},i){let s=tI("replaceVersion",{document:e,publishedId:t,releaseId:r}),n={...e,_id:s};return(0,E.firstValueFrom)(eJ(this,this.#t,n,i))}unpublishVersion({releaseId:e,publishedId:t},r){let i=O(t,e);return(0,d.lastValueFrom)(eY(this,this.#t,i,t,r))}mutate(e,t){return(0,d.lastValueFrom)(eQ(this,this.#t,e,t))}patch(e,t){return new ex(e,t,this)}transaction(e){return new e_(e,this)}action(e,t){return(0,d.lastValueFrom)(eX(this,this.#t,e,t))}request(e){return(0,d.lastValueFrom)(e8(this,this.#t,e))}dataRequest(e,t,r){return(0,d.lastValueFrom)(eK(this,this.#t,e,t,r))}getUrl(e,t){return e5(this,e,t)}getDataUrl(e,t){return e9(this,e,t)}}let tS={requester:H(t=[]),createClient:e=>{let r=H(t,{ignoreWarnings:e.ignoreWarnings});return new tO((t,i)=>(i||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...t}),e)}},t_=(tS.requester,tS.createClient);var tV=e.i(394998);let tD=(0,tV.createServerReference)("405b4aa2ae6570db940cb291bce5d939ae267086af",tV.callServer,void 0,tV.findSourceMapURL,"revalidateSyncTags");var tP=e.i(129672),tk=e.i(342126),tL=e.i(548827),tM=e.i(480645),tF=e.i(925265),tN=e.i(211612);let tU=(0,tk.default)(()=>e.A(401686),{ssr:!1}),tB=(0,tk.default)(()=>e.A(971497),{ssr:!1}),tz=(0,tk.default)(()=>e.A(505250),{ssr:!1}),tH=(0,tk.default)(()=>e.A(218693),{ssr:!1});function tW(e){e instanceof B?console.warn(`Sanity Live is unable to connect to the Sanity API as the current origin - ${window.origin} - is not in the list of allowed CORS origins for this Sanity Project.`,e.addOriginUrl&&"Add it here:",e.addOriginUrl?.toString()):console.error(e)}
12function tG(e,t){t?console.warn("Sanity Live connection closed, switching to long polling set to a interval of",t/1e3,"seconds and the server gave this reason:",e.reason):console.error("Sanity Live connection closed, automatic revalidation is disabled, the server gave this reason:",e.reason)}function tJ(e){let{projectId:t,dataset:i,apiHost:s,apiVersion:n,useProjectHostname:a,token:o,requestTagPrefix:u,draftModeEnabled:l,draftModePerspective:c,refreshOnMount:d=!1,refreshOnFocus:h=!l&&(typeof window>"u"||window.self===window.top),refreshOnReconnect:p=!0,intervalOnGoAway:f=3e4,requestTag:m="next-loader.live",onError:g=tW,onGoAway:y=tG,revalidateSyncTags:w=tD}=e,v=(0,tM.useMemo)(()=>t_({projectId:t,dataset:i,apiHost:s,apiVersion:n,useProjectHostname:a,ignoreBrowserTokenWarning:!0,token:o,useCdn:!1,requestTagPrefix:u}),[s,n,i,t,u,o,a]),[b,R]=(0,tM.useState)(!1),E=(0,tL.useRouter)(),q=(0,tF.useEffectEvent)(e=>{"message"===e.type?w(e.tags):"restart"===e.type||"reconnect"===e.type?E.refresh():"goaway"===e.type&&(y(e,f),R(f))});(0,tM.useEffect)(()=>{let e=v.live.events({includeDrafts:!!o,tag:m}).subscribe({next:q,error:e=>{g(e)}});return()=>e.unsubscribe()},[v.live,g,m,o]),(0,tM.useEffect)(()=>{l&&c?(0,tN.setPerspective)(c):(0,tN.setPerspective)("unknown")},[l,c]);let[I,$]=(0,tM.useState)(!1);(0,tM.useEffect)(()=>{if(!(0,tP.isMaybePresentation)()){if(l&&o)return void(0,tN.setEnvironment)("live");if(l)return void(0,tN.setEnvironment)("static");(0,tN.setEnvironment)("unknown")}},[l,o]),(0,tM.useEffect)(()=>{if(!(0,tP.isMaybePresentation)())return;let e=new AbortController,t=setTimeout(()=>(0,tN.setEnvironment)("live"),3e3);return window.addEventListener("message",({data:r})=>{r&&"object"==typeof r&&"domain"in r&&"sanity/channels"===r.domain&&"from"in r&&"presentation"===r.from&&(clearTimeout(t),(0,tN.setEnvironment)((0,tP.isMaybePreviewWindow)()?"presentation-window":"presentation-iframe"),$(!0),e.abort())},{signal:e.signal}),()=>{clearTimeout(t),e.abort()}},[]);let j=(0,tM.useRef)(void 0);return(0,tM.useEffect)(()=>{if(l)return clearTimeout(j.current),()=>{j.current=setTimeout(()=>{console.warn("Sanity Live: Draft mode was enabled, but is now being disabled")})}},[l]),(0,tM.useEffect)(()=>{if(!b)return;let e=setInterval(()=>E.refresh(),b);return()=>clearInterval(e)},[b,E]),(0,r.jsxs)(r.Fragment,{children:[l&&I&&(0,r.jsx)(tU,{projectId:t,dataset:i,draftModeEnabled:l,draftModePerspective:c}),!l&&d&&(0,r.jsx)(tB,{}),!l&&h&&(0,r.jsx)(tz,{}),!l&&p&&(0,r.jsx)(tH,{})]})}tJ.displayName="SanityLive",e.s(["default",()=>tJ],364716)},40043,e=>{"use strict";var t=e.i(980995);let r=(0,e.i(342126).default)(()=>e.A(384736),{ssr:!1});function i(e){return(0,t.jsx)(r,{...e})}e.s(["default",()=>i])},850668,e=>{"use strict";var t=e.i(980995),r=e.i(480645),i=e.i(548827),s=e.i(394998);let n=(0,s.createServerReference)("001e53ecbec85b86e5d5aeb6a7263b0987ec99284e",s.callServer,void 0,s.findSourceMapURL,"disableDraftMode");function a(){let e=(0,i.useRouter)(),[s,a]=(0,r.useTransition)();return window!==window.parent||window.opener?null:(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-50 group",children:s?(0,t.jsx)("div",{className:"bg-black text-white px-4 py-2 rounded-full text-sm font-medium",children:"Disabling draft mode..."}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{type:"button",onClick:()=>a(async()=>{await n(),e.refresh()}),className:"bg-black text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-gray-800 transition-colors",children:"Disable draft mode"}),(0,t.jsxs)("div",{className:"invisible group-hover:visible absolute bottom-full left-0 mb-2 px-3 py-2 bg-black text-white text-sm rounded-lg shadow-lg whitespace-nowrap",children:["Draft mode shows changes from Sanity IMMEDIATELY",(0,t.jsx)("div",{className:"absolute top-full left-4 w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-black"})]})]})})}e.s(["DisableDraftMode",()=>a],850668)}]);
13
14//# sourceMappingURL=0964a9e267b99caf.js.map

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.