1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,739750,e=>{"use strict";let t=(0,e.i(812135).createEmptyActor)(),n=t,r=new Set;function i(e){return e===t}function o(e){for(let t of(n=e,r))t()}e.s(["actor",()=>n,"emptyActor",()=>t,"isEmptyActor",()=>i,"listeners",()=>r,"setActor",()=>o])},209206,e=>{"use strict";function t(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>{var t;return e.includes("==")?function(e){let[t,n]=e.split("==");if("_key"!==t)throw Error(`Currently only "_key" is supported as path segment. Found ${t}`);if(typeof n>"u")throw Error('Invalid path segment, expected `key=="value"`');return{_key:n.replace(/^['"]/,"").replace(/['"]$/,"")}}(e):n.test(t=e)?Number(t):t})}let n=/^-?\d+$/,r=/^[a-z_$]+/;function i(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:"object"==typeof e&&"_key"in e&&"string"==typeof e._key?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&r.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function o(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var n,r,i,o,s,u;return{type:"patch",id:e.patch.id,patches:[..."set"in(r=n=e.patch)?Object.keys(r.set).map(e=>({path:t(e),op:{type:"set",value:r.set[e]}})):[],..."setIfMissing"in(i=n)?Object.keys(i.setIfMissing).map(e=>({path:t(e),op:{type:"setIfMissing",value:i.setIfMissing[e]}})):[],..."unset"in(o=n)?o.unset.map(e=>({path:t(e),op:{type:"unset"}})):[],..."inc"in(s=n)?Object.keys(s.inc).map(e=>({path:t(e),op:{type:"inc",amount:s.inc[e]}})):[],..."inc"in(u=n)?Object.keys(u.dec).map(e=>({path:t(e),op:{type:"dec",amount:u.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let n=function(e){let t=a.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${a.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!n)throw Error("Insert patch missing position");let r=t(e.insert[n]),i=r.pop();return[{path:r,op:{type:"insert",position:n,referenceItem:i,items:e.insert.items}}]}(n)]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let a=["before","replace","after"];function s(e){return l(e)}function u(e){return e.flatMap(s)}function l(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[i(t)]};if("insert"===n.type)return{insert:{[n.position]:i([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[i(t)]:n.value}};if("inc"===n.type)return{inc:{[i(t)]:n.amount}};if("dec"===n.type)return{dec:{[i(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[i(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${i(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>i([...t,{_key:e._key}])),insert:{[n.position]:i([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[i(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>i(t.concat(e)))};if("replace"===n.type)return{insert:{replace:i(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[i(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function c(e){return Array.isArray(e)?e:[e]}var d=Object.freeze({__proto__:null,decode:function(e){return o(e)},decodeAll:function(e){return e.map(o)},encode:s,encodeAll:u,encodeMutation:l,encodeTransaction:function(e){return{transactionId:e.id,mutations:u(e.mutations)}}});function p(e,t,n){return{type:"insert",referenceItem:n,position:t,items:c(e)}}function y(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function f(e){return{type:"remove",referenceItem:e}}function m(e,t,n){return{type:"patch",id:e,patches:c(t),...n?{options:n}:{}}}
1function h(e,n){return{path:"string"==typeof e?t(e):e,op:n}}function g(e){return{type:"createIfNotExists",document:e}}e.s(["SanityEncoder",()=>d,"at",()=>h,"createIfNotExists",()=>g,"insert",()=>p,"patch",()=>m,"remove",()=>f,"truncate",()=>y],209206)},346678,449883,366422,e=>{"use strict";let t,n;var r,i,o,a,s=e.i(524448),u=e.i(85205),l=e.i(826734),c=e.i(861582),d=e.i(739750),p=e.i(209206),y=e.i(644209);let f=/_key\s*==\s*['"](.*)['"]/,m=/^\d*:\d*$/;function h(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function g(e){return"string"==typeof e?f.test(e.trim()):"object"==typeof e&&"_key"in e}let v=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/_key\s*==\s*['"](.*)['"]/;function b(e,t,n){let r="string"==typeof t?function(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(v);if(!t)throw Error("Invalid path string");return t.map(x)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(h(t)){if(!Array.isArray(i))return n;i=i[t]}if(g(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i}function x(e){return h(e)?Number(e.replace(/[^\d]/g,"")):g(e)?{_key:e.match(w)[1]}:!function(e){if("string"==typeof e&&m.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}(e)?e:function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e)}function E(){return(0,l.useSyncExternalStore)(S,I,k)}function k(){return d.emptyActor}function I(){return d.actor}function S(e){return d.listeners.add(e),()=>d.listeners.delete(e)}function A(){let e=E();return!(0,d.isEmptyActor)(e)}function O(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function M(e,t){let n=(0,y.isMaybePreviewIframe)(),r=(0,y.isMaybePreviewWindow)();if((0,d.isEmptyActor)(t)||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,u.getDraftId)(e),o=(0,u.getPublishedId)(e),a=t.getSnapshot().context?.documents,s=a?.[i],l=a?.[o],c=s||l;if(!c)throw Error(`Document "${e}" not found`);let p=s.getSnapshot().context?.local||l.getSnapshot().context?.local,f=new Promise(e=>{if(p)e(p);else{let t=c.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:s,draftId:i,getSnapshot:()=>f,publishedDoc:l,publishedId:o,get snapshot(){if(!p)throw Error(`Snapshot for document "${e}" not found`);return p}}}function T(){let e,t,n,r=(0,s.c)(7),i=E();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=M(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=M(e,i);return t?b(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=M(e,t);return n}(e,i),patch:async(t,n)=>{let r=M(e,i),{draftDoc:o,draftId:a,getSnapshot:s,publishedId:u}=r,{commit:l=!0}=n||{},c=await ("function"==typeof t?t({draftId:a,publishedId:u,get snapshot(){return r.snapshot},getSnapshot:s}):t),d=await s();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[(0,p.createIfNotExists)({...d,_id:a}),(0,p.patch)(a,c)]}),l&&("object"==typeof l&&"debounce"in l?O(()=>o.send({type:"submit"}),l.debounce)():o.send({type:"submit"}))}}),r[0]=i,r[1]=e):e=r[1];let o=e;r[2]!==i?(t=(e,t,n)=>{let{draftDoc:r}=M(e,i),{commit:o}=n||{},a=void 0===o||o;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?O(()=>r.send({type:"submit"}),a.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let a=t;return r[4]!==o||r[5]!==a?(n={getDocument:o,mutateDocument:a},r[4]=o,r[5]=a,r[6]=n):n=r[6],n}function N(e){let t=(()=>{if(n)return n;n=[];for(let e=0;e<256;++e)n[e]=(e+256).toString(16).slice(1);return n})();return(function(e=16){let t=new Uint8Array(e);return function(e){let t="undefined"!=typeof window&&"crypto"in window?window.crypto:globalThis.crypto;if(!t||!t.getRandomValues)throw Error("WebCrypto not available in this environment");t.getRandomValues(e)}(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function j(e){let t,n,r="string"==typeof e?e:e.path,i=r.lastIndexOf("."),o=r.substring(i+1,r.length);if(!o.indexOf("["))throw Error("Invalid path: not an array");let a=r.lastIndexOf("["),s=r.substring(0,a);if(o.includes("_key")){let e=o.indexOf('"')+1,r=o.indexOf('"',e);t=o.substring(e,r),n=!0}else{let e=o.indexOf("[")+1,r=o.indexOf("]",e);t=o.substring(e,r),n=!1}if(!s||!t)throw Error("Invalid path");return{path:s,key:t,hasExplicitKey:n}}function L(e,t,n="after"){let{path:r,key:i}=j(e),o={...b(t,e.path),_key:N()};return[(0,p.at)(r,(0,p.insert)(o,n,{_key:i}))]}function P(e,t){let{path:n,key:r}=j(e),i=b(t,n).findIndex(e=>e._key===r);return[(0,p.at)(n,(0,p.truncate)(i,i+1))]}function _(e,t,n){let{path:r,key:i}=j(e),o=N();return[(0,p.at)(r,(0,p.insert)([{_type:t,_key:o}],n,{_key:i}))]}async function $(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=j(e),o=await t.getSnapshot(),a=b(o,r),s=b(o,e.path),u=a.findIndex(e=>e._key===i),l=-1,c="before";if("first"===n){if(0===u)return[];l=0,c="before"}else if("last"===n){if(u===a.length-1)return[];l=-1,c="after"}else if("next"===n){if(u===a.length-1)return[];l=u,c="after"}else if("previous"===n){if(0===u)return[];l=u-1,c="before"}return[(0,p.at)(r,(0,p.truncate)(u,u+1)),(0,p.at)(r,(0,p.insert)(s,c,l))]}function C(e){return{lang:e?.lang??r?.lang,message:e?.message,abortEarly:e?.abortEarly??r?.abortEarly,abortPipeEarly:e?.abortPipeEarly??r?.abortPipeEarly}}
1function R(e,t,n,r,s){var u,l,c,d;let p,y=s&&"input"in s?s.input:n.value,f=s?.expected??e.expects??null,m=s?.received??("string"==(p=typeof y)?`"${y}"`:"number"===p||"bigint"===p||"boolean"===p?`${y}`:"object"===p||"function"===p?(y&&Object.getPrototypeOf(y)?.constructor?.name)??"null":p),h={kind:e.kind,type:e.type,input:y,expected:f,received:m,message:`Invalid ${t}: ${f?`Expected ${f} but r`:"R"}eceived ${m}`,requirement:e.requirement,path:s?.path,issues:s?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},g="schema"===e.kind,v=s?.message??e.message??(u=e.reference,l=h.lang,a?.get(u)?.get(l))??(g?(c=h.lang,o?.get(c)):null)??r.message??(d=h.lang,i?.get(d));void 0!==v&&(h.message="function"==typeof v?v(h):v),g&&(n.typed=!1),n.issues?n.issues.push(h):n.issues=[h]}function U(e){return{version:1,vendor:"valibot",validate:t=>e["~run"]({value:t},C())}}e.s(["get",()=>b,"getArrayDuplicatePatches",()=>L,"getArrayInsertPatches",()=>_,"getArrayItemKeyAndParentPath",()=>j,"getArrayMovePatches",()=>$,"getArrayRemovePatches",()=>P,"useDocuments",()=>T,"useOptimisticActor",()=>E,"useOptimisticActorReady",()=>A],449883);var D=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function G(e,t){return{kind:"validation",type:"min_length",reference:G,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(e,t){return e.typed&&e.value.length<this.requirement&&R(this,"length",e,t,{received:`${e.value.length}`}),e}}}function Y(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function q(e,t){return{kind:"schema",type:"object",reference:q,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return U(this)},"~run"(e,t){let n=e.value;if(n&&"object"==typeof n)for(let r in e.typed=!0,e.value={},this.entries){let i=this.entries[r];if(r in n||("exact_optional"===i.type||"optional"===i.type||"nullish"===i.type)&&void 0!==i.default){let o=r in n?n[r]:Y(i),a=i["~run"]({value:o},t);if(a.issues){let i={type:"object",origin:"value",input:n,key:r,value:o};for(let t of a.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value[r]=a.value}else if(void 0!==i.fallback)e.value[r]="function"==typeof i.fallback?i.fallback(void 0,void 0):i.fallback;else if("exact_optional"!==i.type&&"optional"!==i.type&&"nullish"!==i.type&&(R(this,"key",e,t,{input:void 0,expected:`"${r}"`,path:[{type:"object",origin:"key",input:n,key:r,value:n[r]}]}),t.abortEarly))break}else R(this,"type",e,t);return e}}}function z(e,t){return{kind:"schema",type:"optional",reference:z,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return U(this)},"~run"(e,t){return void 0===e.value&&(void 0!==this.default&&(e.value=Y(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped["~run"](e,t)}}}function V(e){return{kind:"schema",type:"string",reference:V,expects:"string",async:!1,message:e,get"~standard"(){return U(this)},"~run"(e,t){return"string"==typeof e.value?e.typed=!0:R(this,"type",e,t),e}}}function W(...e){return{...e[0],pipe:e,get"~standard"(){return U(this)},"~run"(t,n){for(let r of e)if("metadata"!==r.kind){if(t.issues&&("schema"===r.kind||"transformation"===r.kind)){t.typed=!1;break}t.issues&&(n.abortEarly||n.abortPipeEarly)||(t=r["~run"](t,n))}return t}}}function H(e,t,n){let r=e["~run"]({value:t},C(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}let J=W(V(),G(1)),B=z(J),K=q({baseUrl:J,dataset:B,id:J,path:J,projectId:B,tool:B,type:B,workspace:B});function X(e){return!K["~run"]({value:e},{abortEarly:!0}).issues}function F(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}
1let Q=/^([\w-]+):(0|[1-9][0-9]*)$/,Z=/^([\w-]+):([0-9]+),([0-9]+)$/,ee=/^([\w-]+):([\w-]+)$/,et=W(V(),G(1)),en=q({origin:et,href:et,data:z(function e(t,n,r){return{kind:"schema",type:"record",reference:e,expects:"Object",async:!1,key:t,value:n,message:r,get"~standard"(){return U(this)},"~run"(e,t){let n=e.value;if(n&&"object"==typeof n){for(let r in e.typed=!0,e.value={},n)if(Object.hasOwn(n,r)&&"__proto__"!==r&&"prototype"!==r&&"constructor"!==r){let i=n[r],o=this.key["~run"]({value:r},t);if(o.issues){let a={type:"object",origin:"key",input:n,key:r,value:i};for(let t of o.issues)t.path=[a],e.issues?.push(t);if(e.issues||(e.issues=o.issues),t.abortEarly){e.typed=!1;break}}let a=this.value["~run"]({value:i},t);if(a.issues){let o={type:"object",origin:"value",input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}o.typed&&a.typed||(e.typed=!1),o.typed&&(e.value[o.value]=a.value)}}else R(this,"type",e,t);return e}}}(V(),function e(){return{kind:"schema",type:"unknown",reference:e,expects:"unknown",async:!1,get"~standard"(){return U(this)},"~run":e=>(e.typed=!0,e)}}()))});function er(e){let t=H(K,e);if(t.success)return t.output;let n=H(en,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>0?function(e,t,n){let r=e["~run"]({value:t},C(void 0));if(r.issues)throw new D(r.issues);return r.value}(K,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}function ei(e){if("object"==typeof e&&null!==e)return er(e);try{let t=JSON.parse(e);return er(t)}catch{let t=e.split(";").reduce((e,t)=>{let[n,r]=t.split("=");if(!n||t.includes("=")&&!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=u.studioPath.toString(function(e){let t=[];for(let n of e.split(".")){let e=Q.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=Z.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=ee.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"tool":e.tool=r;break;case"workspace":e.workspace=r;break;case"projectId":e.projectId=r;break;case"dataset":e.dataset=r}return e},{});if(X(t))return t;return}}e.s(["createDataAttribute",()=>function e(t){function n(e){return e?"string"==typeof e?u.studioPath.fromString(e):e:[]}function r(e){if(!e.id)throw Error("`id` is required to create a data attribute");if(!e.type)throw Error("`type` is required to create a data attribute");if(!e.path||!e.path.length)throw Error("`path` is required to create a data attribute");return function(e){let{id:t,path:n,baseUrl:r,tool:i,workspace:o,type:a}=e;return X(e)?[["id",(0,u.getPublishedId)(t)],["type",a],["path",F(u.studioPath.fromString(n))],["base",encodeURIComponent(r)],["workspace",o],["tool",i]].filter(([,e])=>!!e).map(e=>e.join("=")).join(";"):void 0}({baseUrl:e.baseUrl||"/",workspace:e.workspace,tool:e.tool,type:e.type,id:e.id,path:"string"==typeof e.path?e.path:u.studioPath.toString(e.path)})}let i=e=>r({...t,path:[...n(t.path),...n(e)]});return i.toString=function(){return r(t)},i.combine=function(n){return e({...t,...n})},i.scope=function(r){return e({...t,path:[...n(t.path),...n(r)]})},i},"decodeSanityNodeData",()=>ei,"pathToUrlString",()=>F],366422);var eo={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},ea={0:8203,1:8204,2:8205,3:65279},es=[,,,,].fill(String.fromCodePoint(ea[0])).join(""),eu=Object.fromEntries(Object.entries(ea).map(e=>e.reverse())),el=Object.fromEntries(Object.entries(eo).map(e=>
1e.reverse())),ec=`${Object.values(eo).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ed=RegExp(`[${ec}]{4,}`,"gu");function ep(e,t){let n,r,i,o,a,p,y=(0,s.c)(21),[f,m]=(0,l.useState)(!0),[h,g]=(0,l.useState)(e),[v,w]=(0,l.useState)(null),[b,x]=(0,l.useState)(e),k=E();y[0]!==t?(n=(e,n)=>(Array.isArray(t)?t:[t]).reduce((t,n)=>n(t,{document:e.document,id:(0,u.getPublishedId)(e.id),originalId:e.id,type:e.type}),n),y[0]=t,y[1]=n):n=y[1];let I=(0,c.useEffectEvent)(n);y[2]!==e?(r=()=>x(e),y[2]=e,y[3]=r):r=y[3];let S=(0,c.useEffectEvent)(r);return y[4]!==k||y[5]!==I||y[6]!==S?(i=()=>{let e;if((0,d.isEmptyActor)(k))return;let t=k.on("rebased.local",t=>{let n={document:t.document,id:t.id,originalId:(0,u.getPublishedId)(t.id),type:"mutate"};g(e=>I(n,e)),w(n),S(),m(!1),clearTimeout(e)}),n=k.on("pristine",()=>{e=setTimeout(()=>{(0,l.startTransition)(()=>m(!0))},15e3)});return()=>{t.unsubscribe(),n.unsubscribe()}},y[4]=k,y[5]=I,y[6]=S,y[7]=i):i=y[7],y[8]!==k?(o=[k],y[8]=k,y[9]=o):o=y[9],(0,l.useEffect)(i,o),y[10]!==v||y[11]!==b||y[12]!==e||y[13]!==f||y[14]!==I?(a=()=>{if(!f){if(!v)throw Error("No last event found when syncing passthrough");b!==e&&(0,l.startTransition)(()=>{g(I(v,e)),x(e)})}},y[10]=v,y[11]=b,y[12]=e,y[13]=f,y[14]=I,y[15]=a):a=y[15],y[16]!==v||y[17]!==b||y[18]!==e||y[19]!==f?(p=[v,b,e,f],y[16]=v,y[17]=b,y[18]=e,y[19]=f,y[20]=p):p=y[20],(0,l.useEffect)(a,p),f?e:h}let ey=[];for(let e=0;e<256;++e)ey.push((e+256).toString(16).slice(1));let ef=new Uint8Array(16);var em="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function eh(e,n,r){if(em&&!e)return em();let i=(e=e||{}).random??e.rng?.()??function(){if(!t){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");t=crypto.getRandomValues.bind(crypto)}return t(ef)}();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(ey[e[t+0]]+ey[e[t+1]]+ey[e[t+2]]+ey[e[t+3]]+"-"+ey[e[t+4]]+ey[e[t+5]]+"-"+ey[e[t+6]]+ey[e[t+7]]+"-"+ey[e[t+8]]+ey[e[t+9]]+"-"+ey[e[t+10]]+ey[e[t+11]]+ey[e[t+12]]+ey[e[t+13]]+ey[e[t+14]]+ey[e[t+15]]).toLowerCase()}(i)}function eg(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function ev(e,t,n){return"x"===n?{x:e.x+t,y:e.y,w:e.w-2*t,h:e.h}:{x:e.x,y:e.y+t,w:e.w,h:e.h-2*t}}function ew(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eb(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function ex(e,t,n){let r,i,o={x:e.x1,y:e.y1};if(t.some(e=>{var t;let r,i;return t=ev(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"),r=o.x>=t.x&&o.x<=t.x+t.w,i=o.y>=t.y&&o.y<=t.y+t.h,r&&i}))return null;for(let a of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:a,y1:s,x2:u,y2:l}=t;if(n===i&&r===o||a===u&&s===l)return!1;let c=(l-s)*(i-n)-(u-a)*(o-r);if(0===c)return!1;let d=((u-a)*(r-s)-(l-s)*(n-a))/c,p=((i-n)*(r-s)-(o-r)*(n-a))/c;return!(d<0)&&!(d>1)&&!(p<0)&&!(p>1)&&{x:n+d*(i-n),y:r+d*(o-r)}}(e,n[t]);if(i){let e=!1;for(let t=0;t<r.length;t++)r[t].x===i.x&&r[t].y===i.y&&(e=!0);e||r.push(i)}}return 0!==r.length&&r.sort((t,n)=>eb(t,{x:e.x1,y:e.y1})-eb(n,{x:e.x1,y:e.y1}))}(e,ev(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eb(o,e)<eb(o,r)&&(r=e,i=a):(r=e,i=a)}}return i||null}function eE(e,t,n){let{x:r,y:i,w:o,h:a}=e,{x:s,y:u}=n;return{x:s+(r-s)*t,y:u+(i-u)*t,w:o*t,h:a*t}}function ek(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function eI(e,t){return t.find(t=>ew(eg(t.elements.element),e))?.sanity}function eS(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:eI(t.left,e)}:null,right:t.right?{rect:t.right,sanity:eI(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:eI(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:eI(t.bottom,e)}:null}}function eA(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}function eO(e,t,n){let r=eg(t),i=[...t.querySelectorAll(":where(h1, h2, h3, h4, p, a, img, span, button):not(:has(*))")];e.x<=r.x&&(e.x=r.x),e.x>=r.x+r.w&&(e.x=r.x+r.w),e.y>=r.y+r.h&&(e.y=r.y+r.h),e.y<=r.y&&(e.y=r.y);let o=i.map(e=>{let t=eE(eg(e),n,{x:r.x,y:r.y});return{x:t.x-r.x,y:t.y-r.y,w:t.w,h:t.h,tagName:e.tagName}});return{offsetX:(r.x-e.x)*n,offsetY:(r.y-e.y)*n,w:r.w*n,h:r.h*n,maxWidth:r.w*n*.75,childRects:o}}async function eM(e,t,n,r,i){return new Promise(o=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*i),o()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!0}),document.body.style.overflow="hidden",document.body.style.height="100%",document.documentElement.style.overflow="initial",document.documentElement.style.height="100%",setTimeout(()=>{e.style.transformOrigin="50% 0px",e.style.transition="transform 150ms ease",e.style.transform=`translate3d(0px, ${-n+scrollY}px, 0px) scale(${t})`},25)})}function eT(e){let t,n,r=(t=Math.max(0,Math.min(...e.map(e=>e.x))),{min:t,max:n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w))),width:n-t}),i=ek(e),o=r.min>8&&r.min+r.width<=window.innerWidth-8,a=i.min>8&&i.min+i.height<=document.body.scrollHeight-8,s=o&&a;return{x:s?r.min-8:r.min,y:s?i.min-8:i.min,w:s?r.width+16:r.width,h:s?i.height+16:i.height}}async function eN(e,t,n,r,i,o){return new Promise(a=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let s=n-window.innerHeight,u=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*i),a()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(u-e,-s+u)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let ej=!1,eL={y:0},eP={x:0,y:0},e_=typeof document>"u"?0:document.documentElement.scrollHeight,e$=null,eC=e=>e instanceof HTMLElement||e instanceof SVGElement,eR=e=>e&&eC(e)?e.dataset?.sanityOverlayElement?e:eR(e.parentElement):null;function eU(e){return ed.lastIndex=0,ed.test(e)}function eD(e,t=!1){return eU(e)?function(e,t=!1){try{let n=function(e){let t=e.match(ed);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(es))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${el[e[2*t].codePointAt(0)]}${el[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],a=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!a--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}
1else throw Error("Encoded data has invalid length");let r=[];for(let e=.25*n.length;e--;){let t=n.slice(4*e,4*e+4).map(e=>eu[e.codePointAt(0)]).join("");r.unshift(String.fromCharCode(parseInt(t,4)))}if(t){r.shift();let e=r.indexOf("\0");return -1===e&&(e=r.length),[JSON.parse(r.slice(0,e).join(""))]}return r.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}function eG(e){return"path"in e}function eY(e){if(!e.length||!e.map(e=>eG(e)).every((e,t,n)=>e===n[0]))return;if(!eG(e[0]))return e[0];let t=e.filter(eG),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function eq(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function ez(e){if(!eq(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function eV(e,t){return!!eq(e.path)&&!!eq(t.path)&&ez(e.path)===ez(t.path)}function eW(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!eG(t)||!eq(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),a=n.getAttribute("data-sanity-drag-disable"),s=n.getAttribute("data-sanity-drag-group"),u=null!==n.getAttribute("data-sanity");return o?.sanity&&!a&&eG(o.sanity)&&eV(t,o.sanity)&&(null===i||i===s)&&u&&e.push(o),e},[]);return o.length<=1?null:o}function eH({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,a=new Map,s=new WeakMap,u=new Set,l=new WeakMap,c=new WeakMap,d,p,y,f=!1,m=[],h=()=>m[m.length-1];function g(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function v({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(o),e({type:"element/activate",id:t})}function w({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;g(i,r),d.unobserve(o),m=m.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function b(t){if(!(!n&&!r||!i))for(let n of m){if(t===n){let n=s.get(t)?.sanity;if(!n||!eG(n))return;if(eW(t,n,u,s)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}x(n)}}function x(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function E(c){for(let d of function e(t){let n=[];function r(e,t,n,r){let i=ei(t);if(!i)return;let o=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);if(o)return{elements:{element:e,measureElement:o},sanity:i,reason:n,preventGrouping:r}}if(t)for(let i of t.childNodes)!function t(i,o){let a=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=eY(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&i&&o){let e=eD(o);return e?r(i,e,"stega-text",!0):void 0}else if(t.nodeType===Node.ELEMENT_NODE){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&eU(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eU(t.textContent)));if("IMG"===t.tagName){let e=eD(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=eD(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=eD(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),s=o;if(i.nodeType===Node.ELEMENT_NODE&&i.dataset?.sanityEditGroup!==void 0&&(s={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(s)),a){let e={elements:a.elements,sanity:a.sanity,reason:a.reason};s&&!a.preventGrouping?s.targets.push(e):n.push({elements:a.elements,type:"element",targets:[e]})}if(i.nodeType===Node.ELEMENT_NODE&&"IMG"!==i.tagName&&"SCRIPT"!==i.tagName&&"SANITY-VISUAL-EDITING"!==i.tagName)for(let e of i.childNodes)t(e,s)}(i,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:eY(e.targets.map(({s
1anity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=s.get(e.elements.element);t&&"element"===t.type&&k(e.elements.element)}0===d.targets.length&&k(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;s.has(c)?function(t){let{element:n}=t.elements,r=s.get(n);r&&(s.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:eg(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:y,targets:g}){let{element:w,measureElement:E}=d,k={click(t){let r=t.target;if(w===h()&&w.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=s.get(w)?.sanity;r&&!f&&e({type:"element/click",id:I,sanity:r})}},contextmenu(t){if(!("path"in y)||!n&&!r||!i||!y.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;w===h()&&w.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:I,position:{x:t.clientX,y:t.clientY},sanity:y}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==m.at(-1)||w.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=s.get(w)?.sanity;if(!o||!eG(o)||!eq(o.path))return;let a=eW(w,y,u,s);a&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:a,onSequenceStart:s,onSequenceEnd:u}=e;if(0!==n.button)return;window.focus();let l=i.map(e=>eg(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=l).some(e=>t.filter(t=>!ew(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),p=!!r.getAttribute("data-sanity-drag-minimap-disable"),y=!!r.getAttribute("data-sanity-drag-prevent-default"),f=r.getAttribute("data-unstable_sanity-drag-document-height"),m=r.getAttribute("data-unstable_sanity-drag-group-height"),h=null,g=eA(n),v=document.body,{minYScaled:w,scaleFactor:b}=function(e,t){let n=t||ek(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=ek(e.map(e=>eE(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(l,m?~~m:null),x=!1,E=!1,k=!0;ej||(e$={body:{overflow:window.getComputedStyle(document.body).overflow,height:window.getComputedStyle(document.body).height},documentElement:{overflow:window.getComputedStyle(document.documentElement).overflow,height:window.getComputedStyle(document.documentElement).height}},e_=f?~~f:document.documentElement.scrollHeight);let I=setInterval(()=>{l=i.map(e=>eg(e.elements.element))},150),S=()=>{b>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eO(eP,r,b)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eM(v,b,w,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:eT(l)})},300)}))},A=e=>{Math.abs(e.deltaY)>=10&&b<1&&!ej&&!E&&!p&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),E=!0),!e.shiftKey||ej||p||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),ej=!0,setTimeout(()=>{S()},50))},O=e=>{if(e.preventDefault(),eL=function(e){let t=document.body,n=window.getComputedStyle(t).transform;if("none"===n)return{x:e.x,y:e.y};let r=new DOMMatrix(n).inverse(),i=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:i.x,y:i.y}}(eP=eA(e)),4>Math.abs(eb(eP,g)))return;if(!x){let e=eT(l),t=eO(eP,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),x=!0,s()}o({type:"overlay/dragUpdateCursorPosition",x:eP.x,y:eP.y}),!e.shiftKey||ej||p||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),ej=!0,setTimeout(()=>{S()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:ex(r,t,n),right:ex(i,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},i={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:ex(r,t,n),bottom:ex(i,t,n)}}}(eP,l,c);JSON.stringify(h)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:eS(i,h=t,c)})},M=()=>{k=!1,o({type:"overlay/dragEnd",target:a,insertPosition:h?eS(i,h,c):null,dragGroup:d,flow:c,preventInsertDefault:y}),E&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),ej||(clearInterval(I),u(),P(),L()),j()},T=e=>{"Shift"===e.key&&ej&&(ej=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eO(eP,r,1/b)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eN(eL.y,v,e_,o,150,e$)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(I),j(),P(),L(),u()))},N=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eN(eL.y,v,e_,o,150,e$).then(()=>{ej=!1})},50),clearInterval(I),j(),P(),L(),u()},j=()=>{window.removeEventListener("mousemove",O),window.removeEventListener("wheel",A),window.removeEventListener("mouseup",M)},L=()=>{window.removeEventListener("keyup",T)},P=()=>{window.removeEventListener("blur",N)};window.addEventListener("blur",N),window.addEventListener("keyup",T),window.addEventListener("wheel",A),window.addEventListener("mousemove",O),window.addEventListener("mouseup",M)}({element:w,handler:e,mouseEvent:t,overlayGroup:a,target:o,onSequenceStart:()=>{f=!0},onSequenceEnd:()=>{setTimeout(()=>{f=!1},250)}})},mousemove(e){k.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",k.mouseenter),t.addEventListener("mouseleave",k.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&w.closest("[data-vercel-edit-info]")||w.closest("[data-vercel-edit-target]")||(m.push(w),e({type:"element/mouseenter",id:I,rect:eg(w)}),b(w))},mouseleave(n){function r(){m.pop();let t=h();if(e({type:"element/mouseleave",id:I}),t){b(t);let n=s.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eg(t)})}x(w)}let{relatedTarget:i}=n,o=eR(i),a=t.contains(o);if(eC(o)&&a)return function e(t){let n=i=>{let{relatedTarget:o}=i;eR(o)?o&&eC(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},I=eh(),S={type:c,id:I,elements:d,sanity:y,handlers:k};u.add(w),l.set(E,w),a.set(I,w),s.set(w,S),p?.observe(w),e({type:"element/register",elementType:c,id:I,element:w,rect:eg(w),sanity:y,dragDisabled:!!w.getAttribute("data-sanity-drag-disable"),targets:g.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&v(S)}(d)}}function k(t){let n=s.get(t);if(n){let{id:r,handlers:i}=n;g(t,i),d.unobserve(t),s.delete(t),u.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function I(t){let n=s.get(t);n&&e({type:"element/updateRect",id:n.id,rect:eg(t)})}function S(e){if(o)for(let t of e){let{target:e}=t,n=eC(e)&&s.get(e);n&&(t.isIntersecting?v(n):w(n))}}function A(t){let n=eR(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}m=[],e({type:"overlay/blur"})}function O(){m=[],e({type:"overlay/reset-mouse-state"})}function M(){for(let e of u)I(e)}function T(t){"Escape"===t.key&&(m=[],e({type:"overlay/blur"}))}function N(e){let{target:t}=e;if(!(t===window.document||!eC(t)))for(let e of u)t.contains(e)&&I(e)}function j(){o||(p=new IntersectionObserver(S,{threshold:.3}
1),u.forEach(e=>p.observe(e)),e({type:"overlay/activate"}),o=!0)}function L(){o&&(p?.disconnect(),u.forEach(e=>{let t=s.get(e);t&&w(t)}),e({type:"overlay/deactivate"}),o=!1)}function P(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let i=s.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of u)I(e)}),window.addEventListener("click",A),window.addEventListener("contextmenu",A),window.addEventListener("sanity-overlay/exclusive-plugin-closed",O),window.addEventListener("sanity-overlay/label-click",P),window.addEventListener("keydown",T),window.addEventListener("resize",M),window.addEventListener("scroll",N,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eC(e)){let t=l.get(e);if(!t)return;I(t)}}}),(y=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:i}=r,o="characterData"===i?e.parentElement:e;if(!(o===t||t.contains(o))&&(n=!0,eC(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;E({childNodes:[eC(e)?e:o]})}}if(n)for(let e of u)e.isConnected||k(e),s.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||k(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),E(document.body),j(),{activate:j,deactivate:L,destroy:function(){window.removeEventListener("click",A),window.removeEventListener("contextmenu",A),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",O),window.removeEventListener("sanity-overlay/label-click",P),window.removeEventListener("keydown",T),window.removeEventListener("resize",M),window.removeEventListener("scroll",N),y.disconnect(),d.disconnect(),u.forEach(e=>{k(e)}),a.clear(),u.clear(),m=[],L()}}}let eJ=(0,l.createContext)(null);e.s(["SharedStateContext",()=>eJ,"createOverlayController",()=>eH,"sanityNodesExistInSameArray",()=>eV,"useOptimistic",()=>ep,"v4",()=>eh],346678)}]);
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.