1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2071],{1157:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},1876:(e,t,n)=>{"use strict";let r;n.d(t,{FV:()=>oB,BQ:()=>iw,Jq:()=>ix,U:()=>iS});var i,o,s=n(38776),a=n(84176),l=n(62453),u=n(12020),c=n(80757),d=n(78743),h=n(90575),p=n(69118),f=n(66048);function g(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):m.test(t=e)?Number(t):t})}let m=/^-?\d+$/;function y(e){return"string"==typeof e?._key}function v(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function b(e){return"number"==typeof e||v(e)}let x=/^[a-z_$]+/;function w(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:v(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&x.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function S(e){return Array.isArray(e)?e:[e]}function k(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 t,n,r,i,o,s,a;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:g(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in(r=t)?Object.keys(r.setIfMissing).map(e=>({path:g(e),op:{type:"setIfMissing",value:r.setIfMissing[e]}})):[],..."unset"in(i=t)?i.unset.map(e=>({path:g(e),op:{type:"unset"}})):[],..."inc"in(o=t)?Object.keys(o.inc).map(e=>({path:g(e),op:{type:"inc",amount:o.inc[e]}})):[],..."inc"in(s=t)?Object.keys(s.dec).map(e=>({path:g(e),op:{type:"dec",amount:s.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=E.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${E.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=g(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t),..."diffMatchPatch"in(a=t)?Object.keys(a.diffMatchPatch).map(e=>({path:g(e),op:{type:"diffMatchPatch",value:a.diffMatchPatch[e]}})):[]]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let E=["before","replace","after"];function _(e){return A(e)}function T(e){return e.flatMap(_)}function j(e){return{transactionId:e.id,mutations:T(e.mutations)}}function A(e){switch(e.type){case"create":case"createIfNotExists":case"createOrReplace":return{[e.type]:e.document};case"delete":return{delete:{id:e.id}};case"patch":{let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...C(n)}}))}}}function C(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[w(t)]};if("insert"===n.type)return{insert:{[n.position]:w([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[w(t)]:n.value}};if("inc"===n.type)return{inc:{[w(t)]:n.amount}};if("dec"===n.type)return{dec:{[w(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[w(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${w(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>w([...t,{_key:e._key}])),insert:{[n.position]:w([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[w(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>w(t.concat(e)))};if("replace"===n.type)return{insert:{replace:w(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[w(t.concat(n.referenceItem))]};throw"insertIfMissing"===n.type?Error("Patch type insertIfMissing is not supported by Sanity"):Error(`Unknown operation type ${n.type}`)}
1function M(e,t){return{path:"string"==typeof e?g(e):e,op:t}}function P(e,t,n){return{type:"insert",referenceItem:n,position:t,items:S(e)}}function I(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function R(e){return{type:"remove",referenceItem:e}}var O=Object.freeze({__proto__:null,decode:function(e){return k(e)},decodeAll:function(e){return e.map(k)},encode:_,encodeAll:T,encodeMutation:A,encodePatch:C,encodeTransaction:j}),$=n(25467);let D=(0,$.H6)(),L=D,V=new Set,N=/_key\s*==\s*['"](.*)['"]/,z=/^\d*:\d*$/;function B(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function F(e){return"string"==typeof e?N.test(e.trim()):"object"==typeof e&&"_key"in e}let U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/_key\s*==\s*['"](.*)['"]/;function W(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(U);if(!t)throw Error("Invalid path string");return t.map(q)}(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(B(t)){if(!Array.isArray(i))return n;i=i[t]}if(F(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 q(e){return B(e)?Number(e.replace(/[^\d]/g,"")):F(e)?{_key:e.match(H)[1]}:!function(e){if("string"==typeof e&&z.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 G(){return(0,u.useSyncExternalStore)(K,X,Y)}function Y(){return D}function X(){return L}function K(e){return V.add(e),()=>V.delete(e)}function Z(){let e,t=(0,a.c)(2),n=G();return t[0]!==n?(e=n===D,t[0]=n,t[1]=e):e=t[1],!e}function J(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function Q(e,t){let n=(0,l.Fk)(),r=(0,l.v$)();if(t===D||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,d.T4)(e),o=(0,d.IM)(e),s=t.getSnapshot().context?.documents,a=s?.[i],u=s?.[o],c=a||u;if(!c)throw Error(`Document "${e}" not found`);let h=a.getSnapshot().context?.local||u.getSnapshot().context?.local,p=new Promise(e=>{if(h)e(h);else{let t=c.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:a,draftId:i,getSnapshot:()=>p,publishedDoc:u,publishedId:o,get snapshot(){if(!h)throw Error(`Snapshot for document "${e}" not found`);return h}}}function ee(){let e,t,n,r=(0,a.c)(7),i=G();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=Q(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=Q(e,i);return t?W(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=Q(e,t);return n}(e,i),patch:async(t,n)=>{let r=Q(e,i),{draftDoc:o,draftId:s,getSnapshot:a,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:s,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:a}):t),d=await a();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:s}},{type:"patch",id:s,patches:S(c),...{}}]}),u&&("object"==typeof u&&"debounce"in u?J(()=>o.send({type:"submit"}),u.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}=Q(e,i),{commit:o}=n||{},s=void 0===o||o;r.send({type:"mutate",mutations:t}),s&&("object"==typeof s&&"debounce"in s?J(()=>r.send({type:"submit"}),s.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let s=t;return r[4]!==o||r[5]!==s?(n={getDocument:o,mutateDocument:s},r[4]=o,r[5]=s,r[6]=n):n=r[6],n}let et=(()=>{let e;return()=>{if(e)return e;e=[];for(let t=0;t<256;++t)e[t]=(t+256).toString(16).slice(1);return e}})();function en(e){let t=et();return(function(e=16){let t=new Uint8Array(e);return crypto.getRandomValues(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function er(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 s=r.lastIndexOf("["),a=r.substring(0,s);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(!a||!t)throw Error("Invalid path");return{path:a,key:t,hasExplicitKey:n}}
1async function ei(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=er(e),o=await t.getSnapshot(),s=W(o,r),a=W(o,e.path),l=s.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===s.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===s.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[M(r,I(l,l+1)),M(r,P(a,c,u))]}var eo=n(52223);let es=(0,eo.FsL)((0,eo.YjP)(),(0,eo.BpQ)(1)),ea=(0,eo.lqM)(es),el=(0,eo.Ikc)({baseUrl:es,dataset:ea,id:es,path:es,projectId:ea,tool:ea,type:ea,workspace:ea,perspective:(0,eo.NpB)((0,eo.YjP)(),"drafts")}),eu=/^([\w-]+):(0|[1-9][0-9]{0,8})$/,ec=/^([\w-]+):([0-9]+),([0-9]+)$/,ed=/^([\w-]+):([\w-]+)$/,eh=(0,eo.FsL)((0,eo.YjP)(),(0,eo.BpQ)(1)),ep=(0,eo.Ikc)({origin:eh,href:eh,data:(0,eo.lqM)((0,eo.g1P)((0,eo.YjP)(),(0,eo.L5J)()))});function ef(e){let t=e.indexOf("/intent/edit/");if(-1!==t)try{let n=e.slice(t+13),r=n.indexOf("?"),i=-1===r?n:n.slice(0,r),o={};for(let e of i.split(";")){let t=e.indexOf("=");if(-1===t)continue;let n=e.slice(0,t);("id"===n||"type"===n||"path"===n||"tool"===n)&&(o[n]=decodeURIComponent(e.slice(t+1)))}-1!==r&&Object.assign(o,Object.fromEntries(new URLSearchParams(n.slice(r+1)))),o.baseUrl??=e.slice(0,t)||"/";let s=(0,eo.xLC)(el,o);return s.success?s.output:void 0}catch{return}}function eg(e){let t=(0,eo.xLC)(el,e);if(t.success)return t.output;let n=(0,eo.xLC)(ep,e);if(n.success){let{href:e}=n.output;try{let t=new URL(e,typeof document>"u"?"https://example.com":location.origin);return t.searchParams.size>0?(0,eo.qgA)(el,Object.fromEntries(t.searchParams.entries())):ef(e)??n.output}catch(t){return ef(e)||(console.error("Failed to parse sanity node",t),n.output)}}}var em={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},ey={0:8203,1:8204,2:8205,3:65279},ev={0:String.fromCodePoint(ey[0]),1:String.fromCodePoint(ey[1]),2:String.fromCodePoint(ey[2]),3:String.fromCodePoint(ey[3])},eb=[,,,,].fill(String.fromCodePoint(ey[0])).join(""),ex=Object.fromEntries(Object.entries(ev).map(e=>[e[1],+e[0]])),ew=Object.fromEntries(Object.entries(em).map(e=>e.reverse())),eS=`${Object.values(em).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ek=RegExp(`[${eS}]{4,}`,"gu");let eE=[];for(let e=0;e<256;++e)eE.push((e+256).toString(16).slice(1));let e_=new Uint8Array(16);var eT={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ej(e,t,n){if(eT.randomUUID&&!e)return eT.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(e_)}();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(eE[e[t+0]]+eE[e[t+1]]+eE[e[t+2]]+eE[e[t+3]]+"-"+eE[e[t+4]]+eE[e[t+5]]+"-"+eE[e[t+6]]+eE[e[t+7]]+"-"+eE[e[t+8]]+eE[e[t+9]]+"-"+eE[e[t+10]]+eE[e[t+11]]+eE[e[t+12]]+eE[e[t+13]]+eE[e[t+14]]+eE[e[t+15]]).toLowerCase()}(i)}function eA(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eC(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 eM(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eP(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eI(e,t,n){let r,i,o={x:e.x1,y:e.y1};if(t.some(e=>(function(e,t){let n=e.x>=t.x&&e.x<=t.x+t.w,r=e.y>=t.y&&e.y<=t.y+t.h;return n&&r})(o,eC(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let s 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:s,y1:a,x2:l,y2:u}=t;if(n===i&&r===o||s===l&&a===u)return!1;let c=(u-a)*(i-n)-(l-s)*(o-r);if(0===c)return!1;let d=((l-s)*(r-a)-(u-a)*(n-s))/c,h=((i-n)*(r-a)-(o-r)*(n-s))/c;return!(d<0)&&!(d>1)&&!(h<0)&&!(h>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)=>eP(t,{x:e.x1,y:e.y1})-eP(n,{x:e.x1,y:e.y1}))}(e,eC(s,Math.min(s.w,s.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eP(o,e)<eP(o,r)&&(r=e,i=s):(r=e,i=s)}}return i||null}function eR(e,t,n){let{x:r,y:i,w:o,h:s}=e,{x:a,y:l}=n;return{x:a+(r-a)*t,y:l+(i-l)*t,w:o*t,h:s*t}}function eO(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 e$(e,t){return t.find(t=>eM(eA(t.elements.element),e))?.sanity}function eD(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:e$(t.left,e)}:null,right:t.right?{rect:t.right,sanity:e$(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:e$(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:e$(t.bottom,e)}:null}}function eL(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 eV(e,t,n){let r=eA(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=eR(eA(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 eN(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 ez(e){let t=function(e){let t=Math.max(0,Math.min(...e.map(e=>e.x))),n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w)));return{min:t,max:n,width:n-t}}(e),n=eO(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,i=n.min>8&&n.min+n.height<=document.body.scrollHeight-8,o=r&&i;return{x:o?t.min-8:t.min,y:o?n.min-8:n.min,w:o?t.width+16:t.width,h:o?n.height+16:n.height}}async function eB(e,t,n,r,i,o){return new Promise(s=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let a=n-window.innerHeight,l=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),s()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-a+l)}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 eF=!1,eU={y:0},eH={x:0,y:0},eW=typeof document>"u"?0:document.documentElement.scrollHeight,eq=null,eG=e=>e instanceof HTMLElement||e instanceof SVGElement,eY=e=>e&&eG(e)?e.dataset?.sanityOverlayElement?e:eY(e.parentElement):null;function eX(e){return ek.lastIndex=0,ek.test(e)}function eK(e,t=!1){return eX(e)?function(e,t=!1){try{let n=function(e){let t=e.match(ek);if(t)return function(e,t=!1){let n=Array.from(e),r=1/0,i=-1;for(let e=0;e<n.length;++e)n[e]===eb[0]&&n[e+1]===eb[1]&&n[e+2]===eb[2]&&n[e+3]===eb[3]&&(r=Math.min(r,e),i=Math.max(i,e));if(-1===i)return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${ew[e[2*t].codePointAt(0)]}${ew[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],s=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!s--)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);for(let e=r;e<=i;++e)if(!((n.length-e)%4))try{let r=n.slice(e+4),i=new Uint8Array(r.length/4);for(let e=0;e<i.length;e++)i[e]=ex[r[4*e]]<<6|ex[r[4*e+1]]<<4|ex[r[4*e+2]]<<2|ex[r[4*e+3]];let o=new TextDecoder().decode(i);if(t){let e=o.indexOf("\0");return -1===e&&(e=o.length),[JSON.parse(o.slice(0,e))]}
1return o.split("\0").filter(Boolean).map(e=>JSON.parse(e))}catch{}return[]}(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 eZ(e){return"path"in e}function eJ(e){if(!e.length||!e.map(e=>eZ(e)).every((e,t,n)=>e===n[0]))return;if(!eZ(e[0]))return e[0];let t=e.filter(eZ),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 e0(e){if(!eQ(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function e1(e,t){return!!eQ(e.path)&&!!eQ(t.path)&&e0(e.path)===e0(t.path)}function e2(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!eZ(t)||!eQ(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),s=n.getAttribute("data-sanity-drag-disable"),a=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!s&&eZ(o.sanity)&&e1(t,o.sanity)&&(null===i||i===a)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let e5=(0,u.createContext)(null),e3=(0,u.forwardRef)(function(e,t){return(0,s.jsx)("svg",{"data-sanity-icon":"search",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,s.jsx)("path",{d:"M15.0355 15.0355L20 20M16.5 11.5C16.5 14.2614 14.2614 16.5 11.5 16.5C8.73858 16.5 6.5 14.2614 6.5 11.5C6.5 8.73858 8.73858 6.5 11.5 6.5C14.2614 6.5 16.5 8.73858 16.5 11.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),e4=(0,u.forwardRef)(function(e,t){return(0,s.jsx)("svg",{"data-sanity-icon":"th-large",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,s.jsx)("path",{d:"M12.5 6.5V12.5M12.5 12.5V18.5M12.5 12.5H19.5M12.5 12.5H5.5M19.5 12.5V6.5H5.5V12.5M19.5 12.5V18.5H5.5V12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})}),e6=(0,u.forwardRef)(function(e,t){return(0,s.jsxs)("svg",{"data-sanity-icon":"ulist",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:[(0,s.jsx)("path",{d:"M7.10153 17.5C7.10153 17.8322 6.83221 18.1016 6.5 18.1016C6.16778 18.1016 5.89847 17.8322 5.89847 17.5C5.89847 17.1678 6.16778 16.8985 6.5 16.8985C6.83221 16.8985 7.10153 17.1678 7.10153 17.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M7.10153 7.49997C7.10153 7.83218 6.83221 8.1015 6.5 8.1015C6.16778 8.1015 5.89847 7.83218 5.89847 7.49997C5.89847 7.16775 6.16778 6.89844 6.5 6.89844C6.83221 6.89844 7.10153 7.16775 7.10153 7.49997Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M7.10153 12.5C7.10153 12.8322 6.83221 13.1015 6.5 13.1015C6.16778 13.1015 5.89847 12.8322 5.89847 12.5C5.89847 12.1678 6.16778 11.8984 6.5 11.8984C6.83221 11.8984 7.10153 12.1678 7.10153 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M10 7.5H19M10 17.5H19M10 12.5H19",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})}),e8=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n};var e9=function(e){return function(t){return null==e?void 0:e[t]}}({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"}),e7="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,tt=(e7||te||Function("return this")()).Symbol;let tn=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var tr=Array.isArray,ti=Object.prototype,to=ti.hasOwnProperty,ts=ti.toString,ta=tt?tt.toStringTag:void 0;let tl=function(e){var t=to.call(e,ta),n=e[ta];try{e[ta]=void 0;var r=!0}catch(e){}var i=ts.call(e);return r&&(t?e[ta]=n:delete e[ta]),i};var tu=Object.prototype.toString,tc=tt?tt.toStringTag:void 0;
1let td=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":tc&&tc in Object(e)?tl(e):tu.call(e)},th=function(e){return"symbol"==typeof e||null!=e&&"object"==typeof e&&"[object Symbol]"==td(e)};var tp=1/0,tf=tt?tt.prototype:void 0,tg=tf?tf.toString:void 0;let tm=function e(t){if("string"==typeof t)return t;if(tr(t))return tn(t,e)+"";if(th(t))return tg?tg.call(t):"";var n=t+"";return"0"==n&&1/t==-tp?"-0":n},ty=function(e){return null==e?"":tm(e)};var tv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tb=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),tx=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tS="\ud800-\udfff",tk="\\u2700-\\u27bf",tE="a-z\\xdf-\\xf6\\xf8-\\xff",t_="A-Z\\xc0-\\xd6\\xd8-\\xde",tT="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tj="['â]",tA="["+tT+"]",tC="["+tE+"]",tM="[^"+tS+tT+"\\d+"+tk+tE+t_+"]",tP="(?:\ud83c[\udde6-\uddff]){2}",tI="[\ud800-\udbff][\udc00-\udfff]",tR="["+t_+"]",tO="(?:"+tC+"|"+tM+")",t$="(?:"+tR+"|"+tM+")",tD="(?:"+tj+"(?:d|ll|m|re|s|t|ve))?",tL="(?:"+tj+"(?:D|LL|M|RE|S|T|VE))?",tV="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",tN="[\\ufe0e\\ufe0f]?",tz="(?:\\u200d(?:"+["[^"+tS+"]",tP,tI].join("|")+")"+tN+tV+")*",tB="(?:"+["["+tk+"]",tP,tI].join("|")+")"+(tN+tV+tz),tF=RegExp([tR+"?"+tC+"+"+tD+"(?="+[tA,tR,"$"].join("|")+")",t$+"+"+tL+"(?="+[tA,tR+tO,"$"].join("|")+")",tR+"?"+tO+"+"+tD,tR+"+"+tL,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",tB].join("|"),"g");let tU=function(e,t,n){if(e=ty(e),void 0===(t=n?void 0:t)){var r;return(r=e,tw.test(r))?e.match(tF)||[]:e.match(tx)||[]}return e.match(t)||[]};var tH=RegExp("['â]","g");let tW=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o},tq=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:tW(e,t,n)};var tG=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let tY=function(e){return tG.test(e)};var tX="\ud800-\udfff",tK="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",tZ="\ud83c[\udffb-\udfff]",tJ="[^"+tX+"]",tQ="(?:\ud83c[\udde6-\uddff]){2}",t0="[\ud800-\udbff][\udc00-\udfff]",t1="(?:"+tK+"|"+tZ+")?",t2="[\\ufe0e\\ufe0f]?",t5="(?:\\u200d(?:"+[tJ,tQ,t0].join("|")+")"+t2+t1+")*",t3=RegExp(tZ+"(?="+tZ+")|"+("(?:"+[tJ+tK+"?",tK,tQ,t0,"["+tX+"]"].join("|"))+")"+(t2+t1+t5),"g");let t4=function(e){var t,n=tY(e=ty(e))?tY(t=e)?t.match(t3)||[]:t.split(""):void 0,r=n?n[0]:e.charAt(0),i=n?tq(n,1).join(""):e.slice(1);return r.toUpperCase()+i};var t6=(i=function(e,t,n){return e+(n?" ":"")+t4(t)},function(e){var t;return e8(tU(((t=ty(t=e))&&t.replace(tv,e9).replace(tb,"")).replace(tH,"")),i,"")}),t8=n(99739);function t9(e){let t=function e(t){var n;return!!(n=t)&&("object"==typeof n||"function"==typeof n)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function t7(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let ne="all-items",nt={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",alignItems:"start"};function nn(e){let t,n,r,i,o,l,c,d,p,f,g,m,y,v,b,x,w=(0,a.c)(54),S=void 0===e.showIcons||e.showIcons,k=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;w[0]!==e.groups||w[1]!==e.labels?(t=e.groups?[{name:ne,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(no)]:[],w[0]=e.groups,w[1]=e.labels,w[2]=t):t=w[2],w[3]!==e.views?(n=e.views??[{name:"list"}],w[3]=e.views,w[4]=n):n=w[4],w[5]!==n?(r=n.map(ni),w[5]=n,w[6]=r):r=w[6],w[7]!==t||w[8]!==r?(i={query:"",groups:t,views:r},w[7]=t,w[8]=r,w[9]=i):i=w[9];let[E,_]=(0,u.useReducer)(t7,i);if(w[10]!==e||w[11]!==k||w[12]!==S||w[13]!==E.groups||w[14]!==E.query||w[15]!==E.views){var T,j,A;let t,n,r,i=(T=e.schemaTypes,j=E.query,A=E.groups,T.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===ne||n.of?.includes(e.name)})(e,A)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,j))),a=E.views.find(nr),u=k||E.views.length>1,v=E.groups&&E.groups.length>0,b=u||v;c=h.p,y=0,l=h.at,f="column",g="fill",w[25]!==b?(t=b?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},w[25]=b,w[26]=t):t=w[26],w[27]!==e.labels||w[28]!==k||w[29]!==u||w[30]!==E.query||w[31]!==E.views?(n=u?(0,s.jsxs)(h.at,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[k?(0,s.jsx)(h.lt,{flex:1,children:(0,s.jsx)(h.b,{autoFocus:!0,border:!1,fontSize:1,icon:e3,onChange:e=>{_({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:E.query})}):null,E.views.length>1?(0,s.jsx)(h.lt,{flex:"none",children:(0,s.jsx)(nl,{views:E.views,onToggle:e=>{_({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,w[27]=e.labels,w[28]=k,w[29]=u,w[30]=E.query,w[31]=E.views,w[32]=n):n=w[32],w[33]!==v||w[34]!==E.groups?(r=v?(0,s.jsx)(h.lt,{paddingTop:1,paddingX:1,children:(0,s.jsx)(h.c,{space:1,children:E.groups.map(e=>(0,s.jsx)(h.l,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??t6(e.name),selected:e.selected,onClick:()=>{_({type:"select group",name:e.name})}},e.name))})}):null,w[33]=v,w[34]=E.groups,w[35]=r):r=w[35],w[36]!==t||w[37]!==n||w[38]!==r?(m=(0,s.jsxs)(h.lt,{...t,children:[n,r]}),w[36]=t,w[37]=n,w[38]=r,w[39]=m):m=w[39],o=h.lt,d=1,p=0===i.length?(0,s.jsx)(h.lt,{padding:2,children:(0,s.jsx)(h.et,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):a?"grid"===a.name?(0,s.jsx)(h.s,{autoRows:"auto",flex:1,gap:1,style:nt,children:i.map(t=>(0,s.jsx)(nc,{icon:S?t9(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:a.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,s.jsx)(h.O,{flex:1,space:1,children:i.map(t=>(0,s.jsx)(h.u,{icon:S?t9(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??t6(t.name)},t.name))}):null,w[10]=e,w[11]=k,w[12]=S,w[13]=E.groups,w[14]=E.query,w[15]=E.views,w[16]=o,w[17]=l,w[18]=c,w[19]=d,w[20]=p,w[21]=f,w[22]=g,w[23]=m,w[24]=y}else o=w[16],l=w[17],c=w[18],d=w[19],p=w[20],f=w[21],g=w[22],m=w[23],y=w[24];return w[40]!==o||w[41]!==d||w[42]!==p?(v=(0,s.jsx)(o,{padding:d,children:p}),w[40]=o,w[41]=d,w[42]=p,w[43]=v):v=w[43],w[44]!==l||w[45]!==v||w[46]!==f||w[47]!==g||w[48]!==m?(b=(0,s.jsxs)(l,{direction:f,height:g,children:[m,v]}),w[44]=l,w[45]=v,w[46]=f,w[47]=g,w[48]=m,w[49]=b):b=w[49],w[50]!==c||w[51]!==b||w[52]!==y?(x=(0,s.jsx)(c,{padding:y,children:b}),w[50]=c,w[51]=b,w[52]=y,w[53]=x):x=w[53],x}function nr(e){return e.selected}function ni(e,t){return{...e,selected:0===t}}function no(e){return{...e,selected:!1}}let ns={grid:e4,list:e6},na={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function nl(e){let t,n,r,i,o=(0,a.c)(11),l=e.views.findIndex(nu),u=e.views[l+1]??e.views[0],c=e.labels[na[u.name]];o[0]!==c?(t=(0,s.jsx)(h.et,{size:1,children:c}),o[0]=c,o[1]=t):t=o[1];let d=ns[u.name];return o[2]!==u.name||o[3]!==e?(n=()=>{e.onToggle(u.name)},o[2]=u.name,o[3]=e,o[4]=n):n=o[4],o[5]!==d||o[6]!==n?(r=(0,s.jsx)(h.Y,{mode:"bleed",icon:d,onClick:n}),o[5]=d,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,s.jsx)(h.n,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function nu(e){return e.selected}function nc(e){let t,n,r,i,o,l,c,d,p,f=(0,a.c)(20),[g,m]=(0,u.useState)(!1),y=e.icon,v=!!e.previewImageUrl&&!g;f[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},f[0]=t):t=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},f[1]=n):n=f[1],f[2]!==y||f[3]!==v?(r=(0,t8.Hy)(y)&&!v?(0,s.jsx)(h.at,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,s.jsx)(h.et,{size:1,children:(0,s.jsx)(y,{})})}):null,f[2]=y,f[3]=v,f[4]=r):r=f[4],f[5]!==v||f[6]!==e.previewImageUrl?(i=v?(0,s.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{m(!0)}}):null,f[5]=v,f[6]=e.previewImageUrl,f[7]=i):i=f[7],f[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}),f[8]=o):o=f[8],f[9]!==r||f[10]!==i?(l=(0,s.jsxs)(h.lt,{flex:"none",style:n,children:[r,i,o]}),f[9]=r,f[10]=i,f[11]=l):l=f[11];let b=e.schemaType.title??e.schemaType.name;return f[12]!==b?(c=(0,s.jsx)(h.lt,{flex:"none",paddingX:2,paddingY:1,children:(0,s.jsx)(h.et,{size:1,weight:"medium",children:b})}),f[12]=b,f[13]=c):c=f[13],f[14]!==l||f[15]!==c?(d=(0,s.jsxs)(h.at,{direction:"column",gap:1,padding:1,children:[l,c]}),f[14]=l,f[15]=c,f[16]=d):d=f[16],f[17]!==e.onClick||f[18]!==d?(p=(0,s.jsx)(h.u,{padding:0,radius:2,onClick:e.onClick,style:t,children:d}),f[17]=e.onClick,f[18]=d,f[19]=p):p=f[19],p}var nd=n(63981);function nh(e){if(!e)return(0,s.jsx)(nd.XRf,{});if("string"===e.type)return(0,s.jsx)(nd.H3M,{});if("number"===e.type)return(0,s.jsx)(nd.bZn,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,s.jsx)(nd.H3M,{});if("boolean"===n)return(0,s.jsx)(nd.Dee,{});if("number"===n)return(0,s.jsx)(nd.bZn,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,s.jsx)(nd.a1,{}):(0,s.jsx)(nd.Ss4,{});if("object"===n){if("image"===e.name)return(0,s.jsx)(nd.xfq,{});if("block"===e.name)return(0,s.jsx)(nd.H3M,{})}return(0,s.jsx)(nd.XRf,{})}let np=(0,p.AH)` 2 overflow-y: scroll; 3 overscroll-behavior: contain; 4 -ms-overflow-style: none; 5 scrollbar-width: none; 6 7 &:before { 8 content: ''; 9 display: block; 10 height: calc(100% + 1px); 11 position: absolute; 12 top: 0; 13 width: 100%; 14 z-index: -1; 15 } 16`,nf=p.I4.div` 17 height: 100%; 18 inset: 0; 19 pointer-events: all; 20 position: fixed; 21 width: 100%; 22 display: flex; 23 justify-content: center; 24 align-items: center; 25 26 ${e=>e.$blockScroll&&np} 27`,ng=p.I4.div` 28 background: transparent; 29 height: 100%; 30 inset: 0; 31 position: absolute; 32 width: 100%; 33`,nm=e=>{let t,n=(0,a.c)(2);return n[0]!==e?(t=(0,s.jsx)(h.j,{children:(0,s.jsx)(ny,{...e})}),n[0]=e,n[1]=t):t=n[1],t},ny=e=>{let t,n,r=(0,a.c)(7),{children:i,onDismiss:o,setBoundaryElement:l,blockScroll:u}=e,c=void 0===u||u;return r[0]!==o?(t=(0,s.jsx)(ng,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==c||r[3]!==i||r[4]!==l||r[5]!==t?(n=(0,s.jsxs)(nf,{"data-sanity-overlay-element":!0,ref:l,onClick:nv,$blockScroll:c,children:[t,i]}),r[2]=c,r[3]=i,r[4]=l,r[5]=t,r[6]=n):n=r[6],n};function nv(e){e.stopPropagation()}function nb(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let nx={"Visual Editing Drag Sequence Completed":nb({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":nb({name:"Visual Editing Drag Minimap Enabled",description:"The zoomed-out minimap view is enabled during a drag sequence.",version:1}),"Visual Editing Context Menu Item Removed":nb({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":nb({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":nb({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":nb({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":nb({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":nb({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},nw=(0,u.createContext)(void 0);function nS(){let e=(0,u.useContext)(nw);if(!e)throw Error("Telemetry context is missing");return e}let nk={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter typesâ¦","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},nE=e=>{let t,n,r,i,o=(0,a.c)(11),{node:l,onSelect:u}=e;o[0]!==l.options?.insertMenu?(t=l.options?.insertMenu||{},o[0]=l.options?.insertMenu,o[1]=t):t=o[1];let c=t;o[2]!==c.views?(n=c.views?.map(n_),o[2]=c.views,o[3]=n):n=o[3];let d=n;return o[4]!==l.of?(r=l.of.map(nT),o[4]=l.of,o[5]=r):r=o[5],o[6]!==c||o[7]!==u||o[8]!==r||o[9]!==d?(i=(0,s.jsx)(nn,{...c,labels:nk,schemaTypes:r,onSelect:u,views:d}),o[6]=c,o[7]=u,o[8]=r,o[9]=d,o[10]=i):i=o[10],i};function n_(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function nT(e){return{...e,icon:nh(e)}}let nj=e=>{let t,n,r,i,o,l=(0,a.c)(10);return l[0]!==e?({children:t,style:r,...n}=e,l[0]=e,l[1]=t,l[2]=n,l[3]=r):(t=l[1],n=l[2],r=l[3]),l[4]!==r?(i={...r,pointerEvents:"all"},l[4]=r,l[5]=i):i=l[5],l[6]!==t||l[7]!==n||l[8]!==i?(o=(0,s.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),l[6]=t,l[7]=n,l[8]=i,l[9]=o):o=l[9],o};var nA=n(19708);let nC=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nM=(e,t)=>
33(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,nP=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nM(n.overflowY,t)||nM(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},nI=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,nR=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},nO=(e,t)=>{var n,r,i,o;if("undefined"==typeof document)return[];let{scrollMode:s,block:a,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!nC(e))throw TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,p=[],f=e;for(;nC(f)&&d(f);){if((f=nR(f))===h){p.push(f);break}null!=f&&f===document.body&&nP(f)&&!nP(document.documentElement)||null!=f&&nP(f,c)&&p.push(f)}let g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,m=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:y,scrollY:v}=window,{height:b,width:x,top:w,right:S,bottom:k,left:E}=e.getBoundingClientRect(),{top:_,right:T,bottom:j,left:A}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),C="start"===a||"nearest"===a?w-_:"end"===a?k+j:w+b/2-_+j,M="center"===l?E+x/2-A+T:"end"===l?S+T:E-A,P=[];for(let e=0;e<p.length;e++){let t=p[e],{height:n,width:r,top:i,right:o,bottom:u,left:c}=t.getBoundingClientRect();if("if-needed"===s&&w>=0&&E>=0&&k<=m&&S<=g&&(t===h&&!nP(t)||w>=i&&k<=u&&E>=c&&S<=o))break;let d=getComputedStyle(t),f=parseInt(d.borderLeftWidth,10),_=parseInt(d.borderTopWidth,10),T=parseInt(d.borderRightWidth,10),j=parseInt(d.borderBottomWidth,10),A=0,I=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-T:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-_-j:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)A="start"===a?C:"end"===a?C-m:"nearest"===a?nI(v,v+m,m,_,j,v+C,v+C+b,b):C-m/2,I="start"===l?M:"center"===l?M-g/2:"end"===l?M-g:nI(y,y+g,g,f,T,y+M,y+M+x,x),A=Math.max(0,A+v),I=Math.max(0,I+y);else{A="start"===a?C-i-_:"end"===a?C-u+j+O:"nearest"===a?nI(i,u,n,_,j+O,C,C+b,b):C-(i+n/2)+O/2,I="start"===l?M-c-f:"center"===l?M-(c+r/2)+R/2:"end"===l?M-o+T+R:nI(c,o,r,f,T+R,M,M+x,x);let{scrollLeft:e,scrollTop:s}=t;A=0===D?0:Math.max(0,Math.min(s+A/D,t.scrollHeight-n/D+O)),I=0===$?0:Math.max(0,Math.min(e+I/$,t.scrollWidth-r/$+R)),C+=s-A,M+=e-I}P.push({el:t,top:A,left:I})}return P};var n$=n(66415),nD=n(17643),nL=n(35329),nV=n(10398),nN=n(37402);let nz=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function nB(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function nF(e){let[t,n]=e;return[t,n]}function nU(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let s=Math.min(i,o);if(n===r)return s;let a=0,l=1;for(let e=0;-1!==e;){let t=n.substring(s-l);if(-1===(e=r.indexOf(t)))break;l+=e,(0===e||n.substring(s-l)===r.substring(0,l))&&(a=l,l++)}return a}function nH(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nW(e,t){if(!e||!t||e[e.length-1]!==t[t.length-1])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nq(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nG(e,t,n,r,i){let o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=n1(o,s,{checkLines:!1,deadline:i}),c=n1(a,l,{checkLines:!1,deadline:i});return u.concat(c)}function nY(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",s,a,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=nH(e.slice(n),t.slice(i)),c=nW(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),s=e.slice(0,n-c),a=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[s||"",a||"",l||"",u||"",o||""]:null}var nX=Object.defineProperty,nK=Object.getOwnPropertySymbols,nZ=Object.prototype.hasOwnProperty,nJ=Object.prototype.propertyIsEnumerable,nQ=(e,t,n)=>t in e?nX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function n0(e,t,n){if(null===e||null===t)throw Error("Null input. (diff)");let r=n1(e,t,function(e){let t;var n,r={checkLines:!0,deadline:(n=e.timeout||1,t=1,"u">typeof n&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+1e3*t)},i=e;for(var o in i||(i={}))nZ.call(i,o)&&nQ(r,o,i[o]);if(nK)for(var o of nK(i))nJ.call(i,o)&&nQ(r,o,i[o]);return r}(n||{}));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let i=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&n3(e,t,1),nq(i)&&0===n&&n3(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(r),r}function n1(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=nH(r,i),s=r.substring(0,o);o=nW(r=r.substring(o),i=i.substring(o));let a=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,s=i.indexOf(o);if(-1!==s)return r=[[1,i.substring(0,s)],[0,o],[1,i.substring(s+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let a=function(e,t,n=1){let r,i,o,s,a;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;
33let c=nY(l,u,Math.ceil(l.length/4)),d=nY(l,u,Math.ceil(l.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(i=r[0],o=r[1],s=r[2],a=r[3]):(s=r[0],a=r[1],i=r[2],o=r[3]),[i,o,s,a,r[4]]}(e,t);if(a){let e=a[0],t=a[1],r=a[2],i=a[3],o=a[4],s=n1(e,r,n),l=n1(t,i,n);return s.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,s=-1,a=n.length;for(;s<e.length-1;){-1===(s=e.indexOf(` 34`,i))&&(s=e.length-1);let l=e.slice(i,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a===o&&(l=e.slice(i),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),i=s+1}return t}n[0]="";let o=4e4,s=i(e);return o=65535,{chars1:s,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let s=o.lineArray,a=n1(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(a,s),(a=n4(a)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<a.length;){switch(a[l][0]){case 1:c++,h+=a[l][1];break;case -1:u++,d+=a[l][1];break;case 0:if(u>=1&&c>=1){a.splice(l-u-c,u+c),l=l-u-c;let e=n1(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)a.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return a.pop(),a}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),s=2*o,a=Array(s),l=Array(s);for(let e=0;e<s;e++)a[e]=-1,l[e]=-1;a[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,h=0,p=0,f=0;for(let g=0;g<o&&!(Date.now()>n);g++){for(let p=-g+d;p<=g-h;p+=2){let f,m=o+p,y=(f=p===-g||p!==g&&a[m-1]<a[m+1]?a[m+1]:a[m-1]+1)-p;for(;f<r&&y<i&&e.charAt(f)===t.charAt(y);)f++,y++;if(a[m]=f,f>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-p;if(i>=0&&i<s&&-1!==l[i]&&f>=r-l[i])return nG(e,t,f,y,n)}}for(let d=-g+p;d<=g-f;d+=2){let h,m=o+d,y=(h=d===-g||d!==g&&l[m-1]<l[m+1]?l[m+1]:l[m-1]+1)-d;for(;h<r&&y<i&&e.charAt(r-h-1)===t.charAt(i-y-1);)h++,y++;if(l[m]=h,h>r)f+=2;else if(y>i)p+=2;else if(!c){let i=o+u-d;if(i>=0&&i<s&&-1!==a[i]){let s=a[i],l=o+s-i;if(s>=(h=r-h))return nG(e,t,s,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return s&&l.unshift([0,s]),a&&l.push([0,a]),l=rn(l)}function n2(e,t,n){return 1===n?e+t:t+e}function n5(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function n3(e,t,n){var r,i;let o=1===n?-1:1,s=null,a=null,l=t+n;for(;l>=0&&l<e.length&&(null===s||null===a);l+=n){let[r,i]=e[l];if(0!==i.length){if(1===r){null===s&&(s=l);continue}else if(-1===r){null===a&&(a=l);continue}else if(0===r){if(null===s&&null===a){let[r,i]=n5(e[t][1],n);e[t][1]=r,e[l][1]=n2(e[l][1],i,o);return}break}}}if(null!==s&&null!==a&&(r=s,i=a,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=n5(e[s][1],o),[l]=n5(e[a][1],o);e[s][1]=r,e[a][1]=l,e[t][1]=n2(e[t][1],i,n);return}let[u,c]=n5(e[t][1],n);e[t][1]=u,null===s?(e.splice(l,0,[1,c]),null!==a&&a>=l&&a++):e[s][1]=n2(e[s][1],c,o),null===a?e.splice(l,0,[-1,c]):e[a][1]=n2(e[a][1],c,o)}function n4(e){let t=e.map(e=>nF(e)),n=!1,r=[],i=0,o=null,s=0,a=0,l=0,u=0,c=0;for(;s<t.length;)0===t[s][0]?(r[i++]=s,a=u,l=c,u=0,c=0,o=t[s][1]):(1===t[s][0]?u+=t[s][1].length:c+=t[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,s=--i>0?r[i-1]:-1,a=0,l=0,u=0,c=0,o=null,n=!0)),s++;for(n&&(t=rn(t)),t=rt(t),s=1;s<t.length;){if(-1===t[s-1][0]&&1===t[s][0]){let e=t[s-1][1],n=t[s][1],r=nU(e,n),i=nU(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(s,0,[0,n.substring(0,r)]),t[s-1][1]=e.substring(0,e.length-r),t[s+1][1]=n.substring(r),s++):(i>=e.length/2||i>=n.length/2)&&(t.splice(s,0,[0,e.substring(0,i)]),t[s-1][0]=1,t[s-1][1]=n.substring(0,n.length-i),t[s+1][0]=-1,t[s+1][1]=e.substring(i),s++),s++}s++}return t}let n6=/[^a-zA-Z0-9]/,n8=/\s/,n9=/[\r\n]/,n7=/\n\r?\n$/,re=/^\r?\n\r?\n/;function rt(e){let t=e.map(e=>nF(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(n6),o=r.match(n6),s=i&&n.match(n8),a=o&&r.match(n8),l=s&&n.match(n9),u=a&&r.match(n9),c=l&&e.match(n7),d=u&&t.match(re);return c||d?5:l||u?4:i&&!s&&a?3:s||a?2:i||o?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],i=t[r][1],o=t[r+1][1],s=nW(e,i);if(s){let t=i.substring(i.length-s);e=e.substring(0,e.length-s),i=t+i.substring(0,i.length-s),o=t+o}let a=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>=c&&(c=t,a=e,l=i,u=o)}t[r-1][1]!==a&&(a?t[r-1][1]=a:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function rn(e){let t=e.map(e=>nF(e));t.push([0,""]);let n=0,r=0,i=0,o="",s="",a;for(;n<t.length;)switch(t[n][0]){case 1:i++,s+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(a=nH(s,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=s.substring(0,a):(t.splice(0,0,[0,s.substring(0,a)]),n++),s=s.substring(a),o=o.substring(a)),0!==(a=nW(s,o))&&(t[n][1]=s.substring(s.length-a)+t[n][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),s.length&&(t.splice(n,0,[1,s]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",s="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),l=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),l=!0)),n++;return l&&(t=rn(t)),t}var rr=Object.defineProperty,ri=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,ra=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rl=(e,t)=>
34{for(var n in t||(t={}))ro.call(t,n)&&ra(e,n,t[n]);if(ri)for(var n of ri(t))rs.call(t,n)&&ra(e,n,t[n]);return e};let ru={threshold:.5,distance:1e3};function rc(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let i=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(i,i+t.length)===t?i:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let i=rl(rl({},ru),r),o=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function s(e,r){let o=e/t.length,s=Math.abs(n-r);return i.distance?o+s/i.distance:s?1:o}let a=i.threshold,l=e.indexOf(t,n);-1!==l&&(a=Math.min(s(0,l),a),-1!==(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(s(0,l),a)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,p=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)s(r,n+d)<=a?c=d:h=d,d=Math.floor((h-c)/2+c);h=d;let i=Math.max(1,n-d+1),f=Math.min(n+d,e.length)+t.length,g=Array(f+2);g[f+1]=(1<<r)-1;for(let t=f;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?g[t]=(g[t+1]<<1|1)&c:g[t]=(g[t+1]<<1|1)&c|((p[t+1]|p[t])<<1|1)|p[t+1],g[t]&u){let e=s(r,t-1);if(e<=a)if(a=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}if(s(r+1,n)>a)break;p=g}return l}(e,t,i,r):-1}function rd(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function rh(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function rp(e,t){let n=0,r=0,i=0,o=0,s;for(s=0;s<e.length&&(1!==e[s][0]&&(n+=e[s][1].length),-1!==e[s][0]&&(r+=e[s][1].length),!(n>t));s++)i=n,o=r;return e.length!==s&&-1===e[s][0]?o:o+(t-i)}function rf(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=rg(r)}return t}function rg(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function rm(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var ry=Object.defineProperty,rv=Object.getOwnPropertySymbols,rb=Object.prototype.hasOwnProperty,rx=Object.prototype.propertyIsEnumerable,rw=(e,t,n)=>t in e?ry(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rS=(e,t)=>{for(var n in t||(t={}))rb.call(t,n)&&rw(e,n,t[n]);if(rv)for(var n of rv(t))rx.call(t,n)&&rw(e,n,t[n]);return e};let rk={margin:4};function rE(e={}){return rS(rS({},rk),e)}function r_(e,t,n){if(0===t.length)return[];let r=[],i=rm(0,0),o=0,s=0,a=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[p,f]=h,g=f.length,m=rf(f);switch(!o&&0!==p&&(i.start1=s,i.start2=a,i.utf8Start1=l,i.utf8Start2=u),p){case 1:i.diffs[o++]=h,i.length2+=g,i.utf8Length2+=m,d=d.substring(0,a)+f+d.substring(a);break;case -1:i.length1+=g,i.utf8Length1+=m,i.diffs[o++]=h,d=d.substring(0,a)+d.substring(a+g);break;case 0:g<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=h,i.length1+=g,i.length2+=g,i.utf8Length1+=m,i.utf8Length2+=m):g>=2*n.margin&&o&&(rT(i,c,n),r.push(i),i=rm(-1,-1),o=0,c=d,s=a,l=u);break;default:throw Error("Unknown diff type")}1!==p&&(s+=g,l+=m),-1!==p&&(a+=g,u+=m)}return o&&(rT(i,c,n),r.push(i)),r}function rT(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),i=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)i+=n.margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=n.margin;let o=e.start2-i;o>=1&&nq(t[o])&&o--;let s=t.substring(o,e.start2);s&&e.diffs.unshift([0,s]);let a=s.length,l=rf(s),u=e.start2+e.length1+i;u<t.length&&nq(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=rf(c);e.start1-=a,e.start2-=a,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=a+d,e.length2+=a+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let rj=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function rA(e){return parseInt(e,10)}function rC(e){let t,n,r,{utf8Length1:i,utf8Length2:o,utf8Start1:s,utf8Start2:a,diffs:l}=e;t=0===i?`${s},0`:1===i?`${s+1}`:`${s+1},${i}`,n=0===o?`${a},0`:1===o?`${a+1}`:`${a+1},${o}`;let u=[`@@ -${t} +${n} @@ 35`];for(let e=0;e<l.length;e++){switch(l[e][0]){case 1:r="+";break;case -1:r="-";break;case 0:r=" ";break;default:throw Error("Unknown patch operation.")}u[e+1]=`${r+encodeURI(l[e][1])} 36`}return u.join("").replace(/%20/g," ")}function rM(e,t){if("number"==typeof t){var n=e.length,r=t;if(0===n&&(-1===r||0===r))return 0;let i=r<0?n+r:r;return i>=n||i<0?null:i}if(v(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function rP(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function rI(e,t){let n={...e};for(let e of t)delete n[e];return n}function rR(e,t){var n;if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let r=rM(t,e.referenceItem);if(null===r)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:rP(t,(n=e.position,"before"===n?r:r+1),0,e.
36items)}let rO=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var r$=Object.freeze({__proto__:null,assign:function(e,t){if(!nB(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(rO(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let i=function(e,t,n={}){let r=0,i=0;function o(e){for(;r<e;){let e=t.codePointAt(i);if(typeof e>"u")return i;r+=rg(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let s=[];for(let t of e)s.push({diffs:t.diffs.map(e=>nF(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return s}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,s=n.deleteThreshold||.4,a=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],i=r.diffs;if(0===i.length||0!==i[0][0])i.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=a+r+a,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let i=r.start1,o=r.start2,s="";for(;0!==r.diffs.length;){let a=rm(i-s.length,o-s.length),l=!0;if(""!==s){let e=rf(s);a.length1=s.length,a.utf8Length1=e,a.length2=s.length,a.utf8Length2=e,a.diffs.push([0,s])}for(;0!==r.diffs.length&&a.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],s=rf(n);if(1===e){a.length2+=n.length,a.utf8Length2+=s,o+=n.length;let e=r.diffs.shift();e&&a.diffs.push(e),l=!1}else -1===e&&1===a.diffs.length&&0===a.diffs[0][0]&&n.length>64?(a.length1+=n.length,a.utf8Length1+=s,i+=n.length,l=!1,a.diffs.push([e,n]),r.diffs.shift()):(s=rf(n=n.substring(0,32-a.length1-t)),a.length1+=n.length,a.utf8Length1+=s,i+=n.length,0===e?(a.length2+=n.length,a.utf8Length2+=s,o+=n.length):l=!1,a.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}s=(s=rh(a.diffs)).substring(s.length-t);let u=rd(r.diffs).substring(0,t),c=rf(u);""!==u&&(a.length1+=u.length,a.length2+=u.length,a.utf8Length1+=c,a.utf8Length2+=c,0!==a.diffs.length&&0===a.diffs[a.diffs.length-1][0]?a.diffs[a.diffs.length-1][1]+=u:a.diffs.push([0,u])),l||e.splice(++n,0,a)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=rd(i[e].diffs),o,a=-1;if(n.length>32?-1!==(o=rc(r,n.substring(0,32),t))&&(-1===(a=rc(r,n.substring(n.length-32),t+n.length-32))||o>=a)&&(o=-1):o=rc(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===a?r.substring(o,o+n.length):r.substring(o,a+32),n===c)r=r.substring(0,o)+rh(i[e].diffs)+r.substring(o+n.length);else{let t=n0(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case -1:r+=s.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>s)u[e]=!1;else{t=rt(t);let n=0,s=0;for(let a=0;a<i[e].diffs.length;a++){let l=i[e].diffs[a];0!==l[0]&&(s=rp(t,n)),1===l[0]?r=r.substring(0,o+s)+l[1]+r.substring(o+s):-1===l[0]&&(r=r.substring(0,o+s)+r.
36substring(o+rp(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(a.length,r.length-a.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(` 37`),r=0;for(;r<n.length;){let e=n[r].match(rj);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=rm(rA(e[1]),rA(e[3]));for(t.push(i),""===e[2]?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):"0"===e[2]?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=rA(e[2]),i.length1=i.utf8Length1),""===e[4]?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):"0"===e[4]?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=rA(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e,t=n[r],o=t.charAt(0);if("@"===o)break;if(""===o){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let s=rf(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=s;else if("+"===o)i.diffs.push([1,e]),i.length2-=s;else if(" "===o)i.diffs.push([0,e]),i.length1-=s,i.length2-=s;else throw Error(`Invalid patch mode "${o}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:rR,insertIfMissing:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insertIfMissing()" on non-array value');
37if(0===e.items.length)return t;let n=e.items.filter(e=>!t.find(t=>e._key===t?._key));return 0===n.length?t:rR({items:n,referenceItem:e.referenceItem,position:e.position},t)},remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=rM(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return rP(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=rM(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return rP(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!nB(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:rI(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
37if(0===e.items.length)return t;let n={},r=[];e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)});let i=Object.keys(n);if(0===i.length&&0==r.length)return t;let o=[...t];for(let t of i){let r=Number(t);o[r]=e.items[n[r]]}return rR({items:r,referenceItem:e.referenceItem,position:e.position},o)}});function rD(e,t){return e.reduce((e,t)=>rL(t,e),t)}function rL(e,t){return function e(t,n,r){if(!(t.length>0)){if(!(n.type in r$))throw Error(`Invalid operation type: "${n.type}"`);return r$[n.type](n,r)}let[i,...o]=t;if(b(i)&&Array.isArray(r)){var s=i,a=o,l=n,u=r;let t=rM(u,s);if(null===t||-1===t)return u;let c=u[t],d=e(a,l,c);return d===c?u:rP(u,t,1,void 0===d?[]:[d])}if("string"==typeof i&&nB(r)){var c=i,d=o,h=n,p=r;let t=p[c];if(void 0===t&&d.length>0)return p;let s=e(d,h,t);return void 0===s?rI(p,[c]):s===t?p:{...p,[c]:s}}throw Error(`Cannot apply operation of type "${n.type}" to path ${w(t)} on ${typeof r} value`)}(e.path,e.op,t)}function rV(e){return"_id"in e}var rN=n(70750);function rz(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(b(t)){if(!Array.isArray(n))return;if(v(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}var rB=n(68095);function rF(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}function rU(e,t){return t.reduce((e,t)=>{let n=rH(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function rH(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=(n=t.document,rV(n)?n:{...n,_id:nz()});return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type){return n=e,rV((r=t).document)?n?{status:"noop"}:{status:"created",id:r.document._id,after:r.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("delete"===t.type){return i=e,o=t,i?o.id!==i._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:o.id,before:i,after:void 0}:{status:"noop"}}if("createOrReplace"===t.type){return s=e,rV((a=t).document)?s?{status:"updated",id:a.document._id,before:s,after:a.document}:{status:"created",id:a.document._id,after:a.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("patch"===t.type){var n,r,i,o,s,a,l=e,u=t;if(!l)return{status:"error",message:"Cannot apply patch on nonexistent document"};let c=function(e,t){if(e.options?.ifRevision&&t._rev!==e.options.ifRevision)throw Error("Revision mismatch");if(e.id!==t._id)throw Error(`Document id mismatch. Refusing to apply mutation for document with id="${e.id}" on the given document with id="${t._id}"`);return rD(e.patches,t)}(u,l);return l===c?{status:"noop"}:{status:"updated",id:u.id,before:l,after:c}}throw Error(`Invalid mutation type: ${t.type}`)}function rW(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function rq(e,t){return w(e)===w(t)}function rG(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=rL(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=rz(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t,n){if("string"==typeof e&&"string"==typeof t){let n=n0(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>nF(e)),r=!1,i=[],o=0,s=null,a=0,l=!1,u=!1,c=!1,d=!1;for(;a<n.length;)0===n[a][0]?(n[a][1].length<t&&(c||d)?(i[o++]=a,l=c,u=d,s=n[a][1]):(o=0,s=null),c=!1,d=!1):(-1===n[a][0]?d=!0:c=!0,s&&(l&&u&&c&&d||s.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+ +!!t,0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,s]),n[i[o-1]+1][0]=1,o--,s=null,l&&u?(c=!0,d=!0,o=0):(a=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),a++;return r&&(n=rn(n)),n}(n=n4(n))),r_(e,n,rE(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return r_(rd(e),e,rE(void 0));if("string"==typeof e&&t&&Array.isArray(t))return r_(e,t,rE(n));throw Error("Unknown call format to make()")})(n,t.op.value).map(rC).join("")}};return e.flatMap(e=>rq(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function rY(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(rF(t)!==e)return[];let n=i;return i=rU(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:rG(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),s=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{s=rD(t.mutation.dmpPatches,s),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{s=rD(t.mutation.original,s),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else s=rU(s,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||rF(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:rz(e.path,s)}})})})),s]}let rX=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class rK{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=rX[e];if(!t)throw Error(`Unknown opcode: ${e}`);this[`process${t}`].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||(e.keys=this.model.objectGetKeys(e.value).sort()),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyArray(e.value)),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyObject(e.value)),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyString(e.value)),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}}function rZ(e){return e>>16?4:e>>11?3:e>>7?2:1}function rJ(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){let t=rZ(e.codePointAt(i));4===t&&i++,r+=t}return i}class rQ{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}
37objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let i=rJ(t,n),o=rJ(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var r0=n(48977),r1=n(27236),r2=n(10506),r5=n(84474),r3=n(67975),r4=n(83717),r6=n(43447),r8=1,r9={};function r7(e){return e in r9&&(delete r9[e],!0)}var ie={setImmediate:function(e){var t=r8++;return r9[t]=!0,o||(o=Promise.resolve()),o.then(function(){return r7(t)&&e()}),t},clearImmediate:function(e){r7(e)}},it=ie.setImmediate,ir=ie.clearImmediate,ii={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ii.delegate;return((null==n?void 0:n.setImmediate)||it).apply(void 0,(0,r4.fX)([],(0,r4.zs)(e)))},clearImmediate:function(e){var t=ii.delegate;return((null==t?void 0:t.clearImmediate)||ir)(e)},delegate:void 0},io=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,r4.C6)(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=ii.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i,o=t.actions;null!=n&&(null==(i=o[o.length-1])?void 0:i.id)!==n&&(ii.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(r6.R),is=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r4.C6)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(76140).q))(io),ia=n(97293),il=n(61267),iu=n(40785);function ic(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,r0.u)({resetOnRefCountZero:!0})),n=t.pipe((0,r1.p)(e=>"reconnect"===e.type)),r=t.pipe((0,r1.p)(e=>"welcome"===e.type)),i=t.pipe((0,r1.p)(e=>"mutation"===e.type)),o=(0,nN.h)(r,n).pipe((0,r2.t)({bufferSize:1,refCount:!0})).pipe((0,r1.p)(e=>"welcome"===e.type));return(0,nN.h)(o,i,n)}let id=(0,ia.mj)({types:{},actions:{"assign error to context":(0,il.a)({error:({event:e})=>e}),"clear error from context":(0,il.a)({error:void 0}),"connect to server-sent events":(0,nD.r)({type:"connect"}),"listen to server-sent events":(0,nD.d)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||ic(e.client),id:e.id})}),"stop listening to server-sent events":(0,nD.s)("listener"),"buffer remote mutation events":(0,il.a)({mutationEvents:({event:e,context:t})=>((0,ia.DT)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,il.a)({stagedChanges:({event:e,context:t})=>((0,ia.DT)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,iu.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,ia.DT)(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,i=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(i||e.previousRev!==r?._rev||(i=!0),i&&(r=ih(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[o,s]=rY(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:s,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,il.a)(({event:e,context:t})=>{(0,ia.DT)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=ih(n,e.effects.apply,e.resultRev);t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.i
37d,r);let[i,o]=rY(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":(0,il.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,il.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,il.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,il.a)({submitTransactionsAttempts:0}),"stage mutation":(0,il.a)({stagedChanges:({event:e,context:t})=>((0,ia.DT)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,il.a)({stashedChanges:({event:e,context:t})=>((0,ia.DT)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,iu.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,ia.DT)(e,"mutate");let n=new Map;return t.local&&n.set(t.id,t.local),function(e,t){e.forEach(e=>{("created"===e.status||"updated"===e.status)&&t.set(e.id,e.after),"deleted"===e.status&&t.delete(e.id)})}(function(e,t,n){let r=Object.create(null);for(let n of e){let e=rF(n);if(!e)throw Error("Unable to get document id from mutation");let i=r[e]?.after||t.get(e),o=rH(i,n);if("error"===o.status)throw Error(o.message);let s=r[e];s||(s={before:i,after:i,mutations:[]},r[e]=s);let a="noop"===o.status?i:o.after;t.set(e,a),s.after=a,s.mutations.push(n)}return Object.entries(r).map(([e,{before:t,after:n,mutations:r}])=>({id:e,status:n?t?"updated":"created":"deleted",mutations:r,before:t,after:n}))}(e.mutations,n),n),n.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":(0,iu.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,iu.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,iu.b)(({context:e,event:t})=>((0,ia.DT)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,$.OX)(({input:e})=>{let{listener:t,id:n}=e;return(0,r5.v)(()=>t).pipe((0,r1.p)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,r3.Q)(is))}),"fetch remote snapshot":(0,$.Sx)(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":(0,$.Sx)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",j(e),{visibility:"async",returnDocuments:!1,signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}})},delays:{fetchRemoteSnapshotTimeout:({context:e})=>1e3*Math.pow(2,e.fetchRemoteSnapshotAttempts),submitTransactionsTimeout:({context:e})=>1e3*Math.pow(2,e.submitTransactionsAttempts)}}).createMachine({id:"document-mutator",context:({input:e})=>({client:e.client.withConfig({allowReconfigure:!1}),sharedListener:e.sharedListener,id:e.id,remote:void 0,local:void 0,mutationEvents:[],stagedChanges:[],stashedChanges:[],error:void 0,fetchRemoteSnapshotAttempts:0,submitTransactionsAttempts:0,cache:e.cache}),entry:["connect to server-sent events"],on:{mutate:{actions:["rebase local snapshot","stage mutation"]}},initial:"disconnected",states:{disconnected:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}}},connecting:{on:{welcome:"connected",reconnect:"reconnecting",error:"connectFailure"},tags:["busy"]},connectFailure:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}},entry:["stop listening to server-sent events","assign error to context"],exit:["clear error from context"],tags:["error"]},reconnecting:{on:{welcome:{target:"connected"},error:{target:"connectFailure"}},tags:["busy","error"]},connected:{on:{mutation:{actions:["buffer remote mutation events"]},reconnect:"reconnecting"},entry:["clear error from context"],initial:"loading",states:{loading:{invoke:{src:"fetch remote snapshot",id:"getDocument",input:({context:e})=>({client:e.client,id:e.id}),onError:{target:"loadFailure"},onDone:{target:"loaded",actions:["rebase fetched remote snapshot","reset fetch attempts"]}},tags:["busy"]},loaded:{entry:["send sync event to parent"],on:{mutation:{actions:["apply mendoza patch","send mutation event to parent"]}},initial:"pristine",states:{pristine:{on:{mutate:{actions:["rebase local snapshot","stage mutation"],target:"dirty"}},tags:["ready"]},dirty:{on:{submit:"submitting"},tags:["ready"]},submitting:{on:{mutate:{actions:["rebase local snapshot","stash mutation"]}},invoke:{src:"submit mutations as transactions",id:"submitTransactions",input:({context:e})=>{let t=new Map;return t.set(e.id,e.remote),{client:e.client,transactions:(function(e,t){let n=[],r=[];
37return e.forEach(e=>{t(e)?r.push(e):(r.length>0&&n.push(r),r=[],n.push([e]))}),r.length>0&&n.push(r),n})(e.stagedChanges,e=>!e.transaction).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>({...e,mutations:Object.values(rB(e.mutations,rF)).flatMap(e=>{var t,n;return(0===(n=0===(t=e).length?t:t.reduce((e,t)=>"delete"===t.type?[t]:(e.push(t),e),[])).length?n:n.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):rW(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])})})).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n,i;return n=e,i=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),y(n)&&y(i)?n._key===i._key:"number"==typeof n?Number(n)===Number(i):n===i}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&rq(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):rW(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&rq(e.path,t.path))||e.push(t),e),[])})})).map(e=>{var n;return{...e,mutations:(n=t,e.mutations.map((e,t)=>{var r,i;if("patch"!==e.type)return e;let o=n.get(e.id);return o?(r=o,{...i=e,patches:rG(r,i.patches)}):e}))}}).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{id:(0,rN.A)(),mutations:e.mutations})}},onError:{target:"submitFailure"},onDone:{target:"pristine",actions:["restore stashed changes","reset submit attempts","send pristine event to parent"]}},tags:["busy","ready"]},submitFailure:{exit:["clear error from context"],after:{submitTransactionsTimeout:{actions:["increment submit attempts"],target:"submitting"}},on:{retry:"submitting"},tags:["error","ready"]}}},loadFailure:{exit:["clear error from context"],after:{fetchRemoteSnapshotTimeout:{actions:["increment fetch attempts"],target:"loading"}},on:{retry:"loading"},tags:["error"]}}}}});function ih(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new rK(new rQ,r,t).process());return i?Object.assign(i,{_rev:n}):null}let ip=(0,ia.mj)({types:{},actions:{"emit sync event":(0,iu.a)(({event:e})=>((0,ia.DT)(e,"sync"),e)),"emit mutation event":(0,iu.a)(({event:e})=>((0,ia.DT)(e,"mutation"),e)),"emit rebased event":(0,iu.a)(({event:e})=>((0,ia.DT)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,iu.a)(({event:e})=>((0,ia.DT)(e,["pristine"]),e)),"add document actor":(0,il.a)({documents:({context:e,event:t,spawn:n})=>{(0,ia.DT)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
37:{id:r,client:e.client,sharedListener:e.sharedListener||ic(e.client)},id:r})}}}),"stop remote snapshot":(0,nD.s)(({context:e,event:t})=>((0,ia.DT)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,il.a)({documents:({context:e,event:t})=>{if((0,ia.DT)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:id}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),ig=new Set,im=null;function iy(e){if(im!==e)for(let t of(im=e,ig))t()}let iv=e=>{let t,n,r,i,o=(0,a.c)(8),{comlink:s,history:l}=e;return o[0]!==s||o[1]!==l?(t=()=>s?.on("presentation/navigate",e=>{l?.update(e)}),n=[s,l],o[0]=s,o[1]=l,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,u.useEffect)(t,n),o[4]!==s||o[5]!==l?(r=()=>{if(l)return l.subscribe(e=>{e.title=e.title||document.title,s?.post("visual-editing/navigate",e)})},i=[s,l],o[4]=s,o[5]=l,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,u.useEffect)(r,i),null},ib=new Set;function ix(e){for(let e of ib)e()}function iw(e,t){for(let e of ib)e()}function iS(e){for(let e of ib)e()}let ik=new Set;function iE(e){return ik.add(e),()=>ik.delete(e)}function i_(){return!1}let iT=e=>{let t,n,r=(0,a.c)(3),{comlink:i}=e;return r[0]!==i?(t=()=>{let e=()=>{i.post("visual-editing/meta",{title:document.title})},t=new MutationObserver(t=>{let[n]=t;"TITLE"===n.target.nodeName&&e()});return t.observe(document.head,{subtree:!0,characterData:!0,childList:!0}),e(),()=>t.disconnect()},n=[i],r[0]=i,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,u.useEffect)(t,n),null};function ij(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let iA=(0,u.createContext)(null);function iC(){let e=(0,u.useContext)(iA);if(!e)throw Error("Schema context is missing");return e}function iM(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>(function(e,t,n){let{path:r,key:i}=er(e);return[M(r,P([{_type:t,_key:en()}],n,{_key:i}))]})(e,n,r))}function iP(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:nd.TdU,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t,n="after"){let{path:r,key:i}=er(e);return[M(r,P({...W(t,e.path),_key:en()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function iI(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:nd.YPx,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t){let{path:n,key:r}=er(e),i=W(t,n).findIndex(e=>e._key===r);return[M(n,I(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function iR(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[s,a,l,u]=await Promise.all([ei(n,r,"previous"),ei(n,r,"next"),ei(n,r,"first"),ei(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:nd.VQ$,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Up",icon:nd.Kpk,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Down",icon:nd.ZLN,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:nd.wvk,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:nd.ycB,items:o}),t&&i.push({type:"divider"})),i}async function iO(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...iP(e)),i.push(...iI(e)),i.push(...await iR(e)),i.push({type:"action",label:"Insert before",icon:nd.SKY,action:iM(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:nd.amD,action:iM(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let i$=e=>{let t,n,r,i,o,l=(0,a.c)(12),{label:u,parent:c,width:d,onSelect:p,boundaryElement:f}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],l[0]=t):t=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],l[1]=n):n=l[1],l[2]!==f||l[3]!==d?(r={arrow:!1,constrainSize:!0,floatingBoundary:f,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:d,__unstable_margins:n},l[2]=f,l[3]=d,l[4]=r):r=l[4],l[5]!==p||l[6]!==c?(i=(0,s.jsx)(nE,{node:c,onSelect:p}),l[5]=p,l[6]=c,l[7]=i):i=l[7],l[8]!==u||l[9]!==r||l[10]!==i?(o=(0,s.jsx)(h.d,{fontSize:1,icon:nd.amD,padding:2,popover:r,space
37:2,text:u,children:i}),l[8]=u,l[9]=r,l[10]=i,l[11]=o):o=l[11],o};async function iD(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...iP(e)),i.push(...iI(e)),i.push(...await iR(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,s.jsx)(i$,{label:"Insert before",onSelect:e=>{iM(n,t,e.name,"before")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})}),i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,s.jsx)(i$,{label:"Insert after",onSelect:e=>{iM(n,t,e.name,"after")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})})}else i.push({type:"group",label:"Insert before",icon:nd.SKY,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:nh(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:iM(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:nd.amD,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:nh(e),action:iM(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let iL=[-4,4,-4,4];function iV(e){let t,n=(0,a.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,l=nS();n[0]!==r||n[1]!==i||n[2]!==l?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&l(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=l,n[3]=t):t=n[3];let u=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(h.f,{}),n[4]=e):e=n[4],e}if("action"===r.type){let e,t=!r.action;return n[5]!==r.hotkeys||n[6]!==r.icon||n[7]!==r.label||n[8]!==u||n[9]!==t?(e=(0,s.jsx)(h.u,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:u}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=u,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,a,l=r.icon;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:iL},n[11]=e):e=n[11];let u=r.label;if(n[12]!==o||n[13]!==r.items||n[14]!==i){let e;n[16]!==o||n[17]!==i?(e=(e,t)=>(0,s.jsx)(iV,{node:e,onDismiss:i,boundaryElement:o},t),n[16]=o,n[17]=i,n[18]=e):e=n[18],t=r.items.map(e),n[12]=o,n[13]=r.items,n[14]=i,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(a=(0,s.jsx)(h.d,{fontSize:1,icon:l,padding:2,popover:e,space:2,text:u,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=a):a=n[22],a}if("custom"===r.type){let e,{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==l?(e=(0,s.jsx)(t,{boundaryElement:o,sendTelemetry:l}),n[23]=t,n[24]=o,n[25]=l,n[26]=e):e=n[26],e}return null}let iN=e=>{let t,n,r,i,o,l,c,d,p,f,g,m,y,v,b,x=(0,a.c)(43),{node:w,onDismiss:S,position:k}=e,{x:E,y:_}=k,[T,j]=(0,u.useState)(null),{getField:A}=iC(),{getDocument:C}=ee();x[0]!==A||x[1]!==w?(t=A(w),x[0]=A,x[1]=w,x[2]=t):t=x[2];let{field:M,parent:P}=t,I=M?.title||M?.name||"Unknown type",[R,O]=(0,u.useState)(void 0);x[3]!==M||x[4]!==C||x[5]!==w||x[6]!==P?(n=()=>{(async()=>{let e=C(w.id);e&&O(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?iO({node:t,field:n,doc:i}):r?.type==="union"?iD({node:t,parent:r,doc:i}):Promise.resolve([])}({node:w,field:M,parent:P,doc:e}))})()},r=[M,w,P,C],x[3]=M,x[4]=C,x[5]=w,x[6]=P,x[7]=n,x[8]=r):(n=x[7],r=x[8]),(0,u.useEffect)(n,r),x[9]!==E||x[10]!==_?(i={getBoundingClientRect:()=>({bottom:_,left:E,right:E,top:_,width:0,height:0})},x[9]=E,x[10]=_,x[11]=i):i=x[11];let $=i;x[12]!==M?(o=nh(M),x[12]=M,x[13]=o):o=x[13];let D=o;x[14]===Symbol.for("react.memo_cache_sentinel")?(l={minWidth:120,maxWidth:160},x[14]=l):l=x[14],x[15]!==D||x[16]!==R?(c=(0,s.jsx)(h.lt,{flex:"none",children:R?(0,s.jsx)(h.et,{size:1,children:D}):(0,s.jsx)(h.$,{size:1})}),x[15]=D,x[16]=R,x[17]=c):c=x[17];let L=R?I:"Loading...";x[18]!==L?(d=(0,s.jsx)(h.O,{flex:1,space:2,children:(0,s.jsx)(h.et,{size:1,weight:"semibold",children:L})}),x[18]=L,x[19]=d):d=x[19],x[20]!==c||x[21]!==d?(p=(0,s.jsxs)(h.at,{gap:2,padding:2,children:[c,d]}),x[20]=c,x[21]=d,x[22]=p):p=x[22],x[23]!==T||x[24]!==R||x[25]!==S?(f=R&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.f,{}),R.map((e,t)=>(0,s.jsx)(iV,{node:e,onDismiss:S,boundaryElement:T},t))]}
37),x[23]=T,x[24]=R,x[25]=S,x[26]=f):f=x[26],x[27]!==p||x[28]!==f?(g=(0,s.jsxs)(h.p,{style:l,children:[p,f]}),x[27]=p,x[28]=f,x[29]=g):g=x[29];let V=`${E}-${_}`;return x[30]!==E||x[31]!==_?(m={position:"absolute",left:E,top:_},x[30]=E,x[31]=_,x[32]=m):m=x[32],x[33]!==V||x[34]!==m?(y=(0,s.jsx)("div",{style:m},V),x[33]=V,x[34]=m,x[35]=y):y=x[35],x[36]!==$||x[37]!==g||x[38]!==y?(v=(0,s.jsx)(h.k,{__unstable_margins:iL,arrow:!1,open:!0,placement:"right-start",referenceElement:$,content:g,children:y}),x[36]=$,x[37]=g,x[38]=y,x[39]=v):v=x[39],x[40]!==S||x[41]!==v?(b=(0,s.jsx)(nm,{setBoundaryElement:j,onDismiss:S,children:v}),x[40]=S,x[41]=v,x[42]=b):b=x[42],b},iz=(0,u.createContext)(null),iB=(0,p.I4)(h.W)` 38 background-color: var(--overlay-bg); 39 border-radius: 3px; 40 pointer-events: none; 41 position: absolute; 42 will-change: transform; 43 box-shadow: var(--overlay-box-shadow); 44 transition: none; 45 46 --overlay-bg: transparent; 47 --overlay-box-shadow: inset 0 0 0 1px transparent; 48 49 [data-overlays] & { 50 --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color)); 51 --overlay-box-shadow: inset 0 0 0 2px 52 color-mix(in srgb, transparent 50%, var(--card-focus-ring-color)); 53 } 54 55 [data-fading-out] & { 56 transition: 57 box-shadow 1550ms, 58 background-color 1550ms; 59 60 --overlay-bg: rgba(0, 0, 255, 0); 61 --overlay-box-shadow: inset 0 0 0 1px transparent; 62 } 63 64 &[data-focused] { 65 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 66 } 67 68 &[data-hovered]:not([data-focused]) { 69 transition: none; 70 --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color); 71 } 72 73 /* [data-unmounted] & { 74 --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color); 75 } */ 76 77 :link { 78 text-decoration: none; 79 } 80`,iF=(0,p.I4)(h.at)` 81 bottom: 100%; 82 cursor: pointer; 83 pointer-events: none; 84 position: absolute; 85 right: 0; 86 87 [data-hovered]:not([data-menu-open]) & { 88 pointer-events: all; 89 } 90 91 [data-flipped] & { 92 bottom: auto; 93 top: 100%; 94 } 95`,iU=(0,p.I4)(h.at)` 96 top: 100%; 97 cursor: pointer; 98 pointer-events: none; 99 position: absolute; 100 left: 0; 101 102 gap: 4px; 103 padding: 4px 0; 104 flex-wrap: wrap; 105 106 [data-hovered]:not([data-menu-open]) & { 107 pointer-events: all; 108 } 109 110 [data-flipped] & { 111 top: calc(100% + 2rem); 112 } 113`,iH=(0,p.I4)(h.at)` 114 margin: -0.5rem; 115 116 [data-hovered]:not([data-menu-open]) & { 117 pointer-events: all; 118 } 119`,iW=(0,p.I4)(h.at)` 120 bottom: 100%; 121 cursor: pointer; 122 pointer-events: none; 123 position: absolute; 124 left: 0; 125 126 [data-hovered]:not([data-menu-open]) & { 127 pointer-events: all; 128 } 129 130 [data-flipped] & { 131 bottom: auto; 132 top: 100%; 133 } 134`,iq=(0,p.I4)(h.W)` 135 cursor: pointer; 136 background-color: var(--card-focus-ring-color); 137 right: 0; 138 border-radius: 3px; 139 140 & [data-ui='Text'] { 141 color: #fff; 142 white-space: nowrap; 143 } 144`,iG=(0,p.I4)(h.at)` 145 display: flex; 146 align-items: center; 147 background-color: var(--card-focus-ring-color); 148 right: 0; 149 border-radius: 3px; 150 & [data-ui='Text'], 151 & [data-sanity-icon] { 152 color: #fff; 153 white-space: nowrap; 154 } 155`,iY=p.I4.div` 156 position: absolute; 157 inset: 0; 158 pointer-events: all; 159`,iX=e=>{let t,n,r,i,o,l,c,p,f,g,m,y,v,b,x,w,S,k=(0,a.c)(60),{id:E,element:_,focused:T,componentResolver:j,node:A,showActions:C,draggable:M,targets:P,elementType:I,comlink:R,onActivateExclusivePlugin:O,onMenuOpenChange:$,inFrame:D}=e,{getField:L,getType:V}=iC();k[0]!==V||k[1]!==A?(t=V(A),k[0]=V,k[1]=A,k[2]=t):t=k[2];let N=t;k[3]!==A?(n="path"in A?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:s,perspective:a}=e,[l,u]=(0,d.iz)({baseUrl:i,workspace:s,tool:o,type:n,id:t,path:r?function(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}(d.C.fromString(r)):[]}).split("?"),c=new URLSearchParams(u),h=a||c.get("perspective");return"drafts"===h?c.delete("perspective"):h&&c.set("perspective",h),`${l}?${c}`}(A):A.href,k[3]=A,k[4]=n):n=k[4];let z=n,B=function(){let e=(0,u.useContext)(iz);
159if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in A)){r=void 0;break e}k[5]!==A||k[6]!==B?(e=B.find(e=>e._id===A.id)?.title,k[5]=A,k[6]=B,k[7]=e):e=k[7],r=e}let F=r;k[8]!==_||k[9]!==T||k[10]!==L||k[11]!==V?(i=function(e,t){let n=V(e),{field:r,parent:i}=L(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:_,targetElement:t||_,field:r,focused:!!T,node:e,parent:i,type:o}},k[8]=_,k[9]=T,k[10]=L,k[11]=V,k[12]=i):i=k[12];let U=i;if(k[13]!==I||k[14]!==U||k[15]!==A?(o="element"===I?U(A):void 0,k[13]=I,k[14]=U,k[15]=A,k[16]=o):o=k[16],k[17]!==U||k[18]!==P){let e;k[20]!==U?(e=e=>U(e.sanity,e.element),k[20]=U,k[21]=e):e=k[21],l=P.map(e).filter(iQ),k[17]=U,k[18]=P,k[19]=l}else l=k[19];k[22]!==o||k[23]!==l?(c={legacyComponentContext:o,pluginContexts:l},k[22]=o,k[23]=l,k[24]=c):c=k[24];let H=c,W=function(e,t){let n,r=(0,a.c)(3);if(r[0]!==e||r[1]!==t){e:{if(!e){n=void 0;break e}let r=t?.(e);if(!r){n=void 0;break e}if((0,u.isValidElement)(r)){n=r;break e}n=(Array.isArray(r)?r:[r]).map(iZ)}r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(H.legacyComponentContext,j),q=function(e,t){let n,r=(0,a.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:ej(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},r[3]=t,r[4]=i):i=r[4],n=e.map(i),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(H.pluginContexts,e.plugins);k[25]!==N?(p=N?.icon?(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:N.icon}}):(0,s.jsx)(nd.pyG,{}),k[25]=N,k[26]=p):p=k[26];let G=p,Y=(0,u.useId)();k[27]!==q?(f=q?.some(i0),k[27]=q,k[28]=f):f=k[28];let X=f||q?.length>1;k[29]!==E?(g=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:E}}))},k[29]=E,k[30]=g):g=k[30];let K=g;return k[31]!==z||k[32]!==D||k[33]!==C?(m=C?(0,s.jsx)(iF,{gap:1,paddingY:1,children:(0,s.jsx)(iJ,{inFrame:D,href:z})}):null,k[31]=z,k[32]=D,k[33]=C,k[34]=m):m=k[34],k[35]!==R||k[36]!==M||k[37]!==K||k[38]!==G||k[39]!==Y||k[40]!==q||k[41]!==O||k[42]!==$||k[43]!==X||k[44]!==F?(y=(F||X)&&(0,s.jsx)(iW,{gap:1,paddingY:1,onClick:K,children:(0,s.jsxs)(iG,{gap:2,padding:2,children:[M&&(0,s.jsx)(h.lt,{marginRight:1,children:(0,s.jsx)(h.et,{className:"drag-handle",size:0,children:(0,s.jsx)(nd.GG1,{})})}),(0,s.jsx)(h.et,{size:0,children:G}),F&&(0,s.jsx)(h.et,{size:1,weight:"medium",children:F}),X&&(0,s.jsx)(h.lt,{paddingLeft:2,onClick:i1,children:(0,s.jsx)(iH,{children:(0,s.jsx)(nA.IU,{id:Y,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{$?.(!0)},onClose:()=>{$?.(!1)},button:(0,s.jsx)(h.Y,{icon:nd.Lz$,tone:"primary",padding:2}),menu:(0,s.jsx)(h.p,{paddingY:0,children:(0,s.jsx)(nj,{children:q?.map((e,t)=>(0,s.jsxs)(u.Fragment,{children:[(0,s.jsxs)(h.O,{role:"group",paddingY:1,space:0,children:[(0,s.jsx)(h.u,{paddingY:2,text:(0,s.jsx)(h.lt,{paddingY:2,children:(0,s.jsx)(h.et,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&R?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?(0,s.jsx)(h.u,{paddingY:2,icon:t.icon||(0,s.jsx)(nd.gP2,{}),text:(0,s.jsx)(h.lt,{paddingY:2,children:(0,s.jsx)(h.et,{size:1,children:t.title||t.name})}),onClick:()=>O?.(t,e.context)},t.name):null)]}),t<q.length-1&&(0,s.jsx)(h.f,{})]},e.id))})})})})})]})}),k[35]=R,k[36]=M,k[37]=K,k[38]=G,k[39]=Y,k[40]=q,k[41]=O,k[42]=$,k[43]=X,k[44]=F,k[45]=y):y=k[45],k[46]!==q?(v=q?.map(i2),k[46]=q,k[47]=v):v=k[47],k[48]!==v?(b=(0,s.jsx)(iU,{children:v}),k[48]=v,k[49]=b):b=k[49],k[50]!==m||k[51]!==y||k[52]!==b?(x=(0,s.jsxs)(nj,{children:[m,y,b]}),k[50]=m,k[51]=y,k[52]=b,k[53]=x):x=k[53],k[54]!==W||k[55]!==H.legacyComponentContext?(w=Array.isArray(W)?W.map((e,t)=>{let{component:n,props:r}=e;return(0,s.jsx)(n,{PointerEvents:nj,...H.legacyComponentContext,...r},t)}):W,k[54]=W,k[55]=H.legacyComponentContext,k[56]=w):w=k[56],k[57]!==x||k[58]!==w?(S=(0,s.jsxs)(s.Fragment,{children:[x,w]}),k[57]=x,k[58]=w,k[59]=S):S=k[59],S},iK=(0,u.memo)(function(e){let t,n,r,i,o,l,c,d,h,p,f,g,m,y=(0,a.c)(39),{draggable:v,focused:b,hovered:x,rect:w,wasMaybeCollapsed:S,enableScrollIntoView:k,inFrame:E}=e,_=(0,u.useRef)(null),T=(0,u.useRef)(!1),j=`${w.w}px`,A=`${w.h}px`,C=`translate(${w.x}px, ${w.y}px)`;y[0]!==j||y[1]!==A||y[2]!==C?(t={width:j,height:A,transform:C},y[0]=j,y[1]=A,y[2]=C,y[3]=t):t=y[3];let M=t;y[4]!==k||y[5]!==b||y[6]!==S?(n=()=>
159{if(!T.current&&!S&&!0===b&&_.current&&k){let e=_.current;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(nO(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:s}of nO(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=o-n.top+n.bottom,t=s-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}(_.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}T.current=!0===b},r=[b,S,k],y[4]=k,y[5]=b,y[6]=S,y[7]=n,y[8]=r):(n=y[7],r=y[8]),(0,u.useEffect)(n,r);let[P,I]=(0,u.useState)(!1);y[9]!==x?(i=()=>{if(!_.current||!x)return;let e=new IntersectionObserver(e=>{let[t]=e;I(t.boundingClientRect.top<0)},{threshold:1});return e.observe(_.current),()=>e.disconnect()},y[9]=x,y[10]=i):i=y[10],y[11]!==x||y[12]!==P?(o=[x,P],y[11]=x,y[12]=P,y[13]=o):o=y[13],(0,u.useEffect)(i,o);let[R,O]=(0,u.useState)(null);y[14]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{O(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},y[14]=l):l=y[14];let $=l;y[15]===Symbol.for("react.memo_cache_sentinel")?(c=(e,t)=>{O({plugin:e,context:t})},y[15]=c):c=y[15];let D=c,L=R?.plugin.component,[V,N]=(0,u.useState)(!1);y[16]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{(0,u.startTransition)(()=>N(!1))},y[16]=d):d=y[16],y[17]!==x?(h=[x],y[17]=x,y[18]=h):h=y[18],(0,u.useEffect)(d,h),y[19]!==L||y[20]!==V?(p=V||L?(0,s.jsx)(ny,{onDismiss:$,blockScroll:V}):null,y[19]=L,y[20]=V,y[21]=p):p=y[21];let z=b?"":void 0,B=x?"":void 0,F=P?"":void 0,U=v?"":void 0,H=V?"":void 0;return y[22]!==L||y[23]!==R||y[24]!==x||y[25]!==E||y[26]!==e?(f=L?(0,s.jsx)(iY,{"data-sanity-overlay-element":!0,onClick:i5,children:(0,s.jsx)(L,{...R.context,closeExclusiveView:$})}):x?(0,s.jsx)(iX,{...e,inFrame:E,onActivateExclusivePlugin:D,onMenuOpenChange:N}):null,y[22]=L,y[23]=R,y[24]=x,y[25]=E,y[26]=e,y[27]=f):f=y[27],y[28]!==M||y[29]!==z||y[30]!==B||y[31]!==F||y[32]!==U||y[33]!==H||y[34]!==f?(g=(0,s.jsx)(iB,{"data-focused":z,"data-hovered":B,"data-flipped":F,"data-draggable":U,"data-menu-open":H,ref:_,style:M,children:f}),y[28]=M,y[29]=z,y[30]=B,y[31]=F,y[32]=U,y[33]=H,y[34]=f,y[35]=g):g=y[35],y[36]!==p||y[37]!==g?(m=(0,s.jsxs)(s.Fragment,{children:[p,g]}),y[36]=p,y[37]=g,y[38]=m):m=y[38],m});function iZ(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let iJ=(0,u.memo)(function(e){let t,n,r,i=(0,a.c)(8),{inFrame:o}=e,l=(0,u.useSyncExternalStore)(i3,i4);i[0]!==e.href||i[1]!==l?(t=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,l),i[0]=e.href,i[1]=l,i[2]=t):t=i[2];let c=t,d=o?void 0:"_blank",p=o?"noopener":"noopener noreferrer";return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(iq,{padding:2,children:(0,s.jsx)(h.et,{size:1,weight:"medium",children:"Open in Studio"})}),i[3]=n):n=i[3],i[4]!==c||i[5]!==d||i[6]!==p?(r=(0,s.jsx)(h.lt,{as:"a",href:c,target:d,rel:p,children:n}),i[4]=c,i[5]=d,i[6]=p,i[7]=r):r=i[7],r});function iQ(e){return void 0!==e}function i0(e){return e.exclusive.length>0}function i1(e){e.stopPropagation()}function i2(e){return(0,s.jsx)(u.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,s.jsx)(n,{...e.context},t.name):null})},e.id)}function i5(e){e.stopPropagation()}function i3(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function i4(){return window.location.href}let i6=e=>{let t,n=(0,a.c)(5),{dragGroupRect:r}
159=e,i=`${r.y}px`,o=`${r.x}px`,l=`${r.w-1}px`,u=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==l||n[3]!==u?(t=(0,s.jsx)("div",{style:{position:"absolute",top:i,left:o,width:l,height:u,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=l,n[3]=u,n[4]=t):t=n[4],t},i8=e=>{let t,n=(0,a.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,l=0,u=0,c=0;if("horizontal"===i){let{left:e,right:t}=r;if(u=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,i=.0125*Math.min(t.rect.h,e.rect.h);o=.5*n+.5*r-3,l=e.rect.y+i,c=Math.min(t.rect.h,e.rect.h)-2*i}else if(t&&!e){let e=.0125*t.rect.h;o=t.rect.x-3,l=t.rect.y+e,c=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;o=e.rect.x+e.rect.w-3,l=e.rect.y+t,c=e.rect.h-2*t}}else{let{bottom:e,top:t}=r;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,i=e.rect.y,s=.0125*Math.min(e.rect.w,t.rect.w);c=6,o=n+s,l=.5*r+.5*i-3,u=Math.max(e.rect.w,t.rect.w)-2*s}else if(e&&!t){let t=.0125*e.rect.w;o=e.rect.x+t,l=e.rect.y-3,u=e.rect.w-2*t,c=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,l=t.rect.y+t.rect.h-3,u=t.rect.w-2*e,c=6}}let d=`${u}px`,h=`${c}px`,p=`translate(${o}px, ${l}px)`;return n[0]!==d||n[1]!==h||n[2]!==p?(t=(0,s.jsx)("div",{style:{position:"absolute",width:d,height:h,transform:p,background:"#556bfc",border:"2px solid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=d,n[1]=h,n[2]=p,n[3]=t):t=n[3],t},i9=p.I4.div` 160 --drag-preview-opacity: 0.98; 161 --drag-preview-skeleton-stroke: #ffffff; 162 163 @media (prefers-color-scheme: dark) { 164 --drag-preview-skeleton-stroke: #383d51; 165 } 166 167 position: fixed; 168 display: grid; 169 transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`}; 170 width: ${({$width:e})=>`${e}px`}; 171 height: ${({$height:e})=>`${e}px`}; 172 z-index: 9999999; 173 opacity: var(--drag-preview-opacity); 174 cursor: move; 175 176 .drag-preview-content-wrapper { 177 position: relative; 178 width: 100%; 179 height: 100%; 180 container-type: inline-size; 181 } 182 183 [data-ui='card'] { 184 position: relative; 185 width: 100%; 186 height: 100%; 187 } 188 189 .drag-preview-skeleton { 190 position: absolute; 191 inset: 0; 192 193 rect { 194 stroke: var(--drag-preview-skeleton-stroke); 195 } 196 } 197 198 .drag-preview-handle { 199 position: absolute; 200 top: 4cqmin; 201 left: 4cqmin; 202 width: 6cqmin; 203 fill: var(--drag-preview-handle-fill); 204 } 205`,i7=e=>{let t,n,r,i,o,l,u,c,d,p,f,g,m,y,v,b,x,w,S,k,E,_=(0,a.c)(50),{skeleton:T}=e,j=Math.min(T.maxWidth,window.innerWidth/2),A=T.w>j?j/T.w:1,C=T.offsetX*A,M=T.offsetY*A,P=(0,h.o)(),I=(0,h.st)(),R=I.radius[~~function(e,t,n,r,i){var o;return o=(e-0)*(i-1)/1920+1,o<r?r:o>i?i:o}(T.w,0,0,1,I.radius.length-2)];if(_[0]!==C||_[1]!==M||_[2]!==P||_[3]!==R||_[4]!==A||_[5]!==T.childRects||_[6]!==T.h||_[7]!==T.w){let e=T.childRects.filter(oe),s=T.childRects.filter(ot);n=i9,i=T.w,o=T.h,l=C,u=M,c=A,t=h.W,g=R,m=4,y="hidden",v="transparent",b=P?"dark":"light",f="drag-preview-content-wrapper",d="drag-preview-skeleton",p=`0 0 ${T.w} ${T.h}`,r=[...e,...s],_[0]=C,_[1]=M,_[2]=P,_[3]=R,_[4]=A,_[5]=T.childRects,_[6]=T.h,_[7]=T.w,_[8]=t,_[9]=n,_[10]=r,_[11]=i,_[12]=o,_[13]=l,_[14]=u,_[15]=c,_[16]=d,_[17]=p,_[18]=f,_[19]=g,_[20]=m,_[21]=y,_[22]=v,_[23]=b}else t=_[8],n=_[9],r=_[10],i=_[11],o=_[12],l=_[13],u=_[14],c=_[15],d=_[16],p=_[17],f=_[18],g=_[19],m=_[20],y=_[21],v=_[22],b=_[23];return _[24]!==r||_[25]!==I.color?(x=r.map((e,t)=>(0,s.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:I.color.skeleton.from},t)),_[24]=r,_[25]=I.color,_[26]=x):x=_[26],_[27]!==x||_[28]!==d||_[29]!==p?(w=(0,s.jsx)("svg",{className:d,viewBox:p,children:x}),_[27]=x,_[28]=d,_[29]=p,_[30]=w):w=_[30],_[31]!==w||_[32]!==f?(S=(0,s.jsx)("div",{className:f,children:w}),_[31]=w,_[32]=f,_[33]=S):S=_[33],_[34]!==t||_[35]!==S||_[36]!==g||_[37]!==m||_[38]!==y||_[39]!==v||_[40]!==b?(k=(0,s.jsx)(t,{radius:g,shadow:m,overflow:y,tone:v,scheme:b,children:S}),_[34]=t,_[35]=S,_[36]=g,_[37]=m,_[38]=y,_[39]=v,_[40]=b,_[41]=k):k=_[41],_[42]!==n||_[43]!==i||_[44]!==o||_[45]!==l||_[46]!==u||_[47]!==c||_[48]!==k?(E=(0,s.jsx)(n,{$width:i,$height:o,$offsetX:l,$offsetY:u,$scaleFactor:c,children:k}),_[42]=n,_[43]=i,_[44]=o,_[45]=l,_[46]=u,_[47]=c,_[48]=k,_[49]=E):E=_[49],E};function oe(e){return"IMG"===e.tagName}function ot(e){return"IMG"!==e.tagName}let on=(0,p.I4)(h.W)` 206 position: fixed; 207 bottom: 2rem; 208 left: 2rem; 209`,or=()=>{let e,t,n=(0,a.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={zIndex:"999999"},n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)(on,{padding:2,shadow:2,radius:2,style:e,children:(0,s.jsxs)(h.at,{align:"center",gap:2,children:[(0,s.jsx)(h.m,{keys:["Shift"]}),(0,s.jsx)(h.et,{size:1,children:"Zoom Out"}),(0,s.jsx)(nd.mSu,{})]})}),n[1]=t):t=n[1],t};function oi(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:s,dragInsertPosition:a,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:h}=e,p=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(p=n.slice(i.length).startsWith("["))}return"presentation/perspective"===n&&(o=t.data.perspective),"element/contextmenu"===n&&(r="sanity"in t?{node:t.sanity,position:t.position}:null),("element/click"===n||"element/mouseleave"===n||"overlay/blur"===n||"presentation/blur"===n||"presentation/focus"===n)&&(r=null),"overlay/dragUpdateInsertPosition"===n&&(a=t.insertPosition),"overlay/dragStart"===n&&(s=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(s=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(h=t.groupRect),"overlay/dragToggleMinimap"===n&&(l=t.display),{...e,contextMenu:r,elements:((e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>
209{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}})(e.elements,t),dragInsertPosition:a,dragSkeleton:c,dragGroupRect:h,isDragging:s,focusPath:i,perspective:o,wasMaybeCollapsed:p,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let oo=function(e){let t,n,r,i,o,l,c,d=(0,a.c)(13),{comlink:h,children:p}=e;d[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],d[0]=t):t=d[0];let[f,g]=(0,u.useState)(t);d[1]!==h?(n=async e=>{if(h)try{let t=await h.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});g(t.snapshots)}catch{}},d[1]=h,d[2]=n):n=d[2];let m=n;return d[3]!==h||d[4]!==m?(r=()=>{if(!h)return;let e=new AbortController,t=h.onStatus(()=>{m(e.signal)},"connected");return()=>{e.abort(),t()}},i=[h,m],d[3]=h,d[4]=m,d[5]=r,d[6]=i):(r=d[5],i=d[6]),(0,u.useEffect)(r,i),d[7]!==h?(o=()=>h?.on("presentation/preview-snapshots",e=>{g(e.snapshots)}),l=[h],d[7]=h,d[8]=o,d[9]=l):(o=d[8],l=d[9]),(0,u.useEffect)(o,l),d[10]!==p||d[11]!==f?(c=(0,s.jsx)(iz.Provider,{value:f,children:p}),d[10]=p,d[11]=f,d[12]=c):c=d[12],c};function os(e){return"document"===e.type}function oa(e){return"type"===e.type}let ol=function(e){let t,n,r,i,o,l,c,d,h,p,f,g=(0,a.c)(22),{comlink:m,children:y,elements:v}=e;g[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,g[0]=t):t=g[0];let[b,x]=(0,u.useState)(t),[w,S]=(0,u.useState)(null);g[1]!==m?(n=()=>{if(!m)return;let e=async function(e){if(m)try{let t=await m.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});S(t.schema)}catch{}},t=new AbortController,n=m.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[m],g[1]=m,g[2]=n,g[3]=r):(n=g[2],r=g[3]),(0,u.useEffect)(n,r),g[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],g[4]=i):i=g[4];let k=(0,u.useRef)(i),E=(0,u.useDeferredValue)(v);g[5]!==E?(o=E.reduce((e,t)=>{let{sanity:n}=t;if(!("id"in n)||!n.path.includes("[_key=="))return e;let r=n.path.split(".").toReversed().reduce((e,t)=>e.length?[t,...e]:t.includes("[_key==")?[t]:[],[]).join(".");return e.find(e=>e.id===n.id&&e.path===r)||e.push({id:n.id,path:r}),e},[]),g[5]=E,g[6]=o):o=g[6];let _=o,T=(0,u.useRef)(null);g[7]!==m||g[8]!==_?(l=()=>{if(!_.length||!m)return;let e=async(e,t)=>{let n=k.current;try{k.current=e;let n=await m.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;x(n.types),T.current=null}catch{}t.aborted&&(k.current=n)};_.some(e=>!k.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(T.current?.abort(),T.current=new AbortController,e(_,T.current.signal))},c=[m,_],g[7]=m,g[8]=_,g[9]=l,g[10]=c):(l=g[9],c=g[10]),(0,u.useEffect)(l,c),g[11]!==w?(d=(e,t)=>{if(!w||"string"!=typeof e&&(!("path"in e)||!Array.isArray(w)))return;let n="string"==typeof e?e:e.type;return w.filter("document"===(t||"document")?os:oa).find(e=>e.name===n)},g[11]=w,g[12]=d):d=g[12];let j=d;g[13]!==j||g[14]!==b?(h=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=j(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(ou);try{return function t(n,r,i,o){let s=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[a,...l]=r;if("fields"in n){let e=n.fields[a];if(!e&&"rest"in n)return t(n.rest,r,n,s);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`);return t(e.value,l,n,[...s,a])}if("array"===n.type)return t(n.of,r,n,s);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...s,a]):{field:n,parent:i};if("union"===n.type){let r=a.startsWith("[_key==")?b?.get(e.id)?.get([s.join("."),a].filter(Boolean).join("")):a;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...s,a])}if("unionOption"===n.type)return a?t(n.value,r,n,s):{field:n,parent:i};if("inline"===n.type)return t(j(n.name,"type").value,r,n,s);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...s,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},g[13]=j,g[14]=b,g[15]=h):h=g[15];let A=h;g[16]!==A||g[17]!==j?(p={getField:A,getType:j},g[16]=A,g[17]=j,g[18]=p):p=g[18];let C=p;return g[19]!==y||g[20]!==C?(f=(0,s.jsx)(iA.Provider,{value:C,children:y}),g[19]=y,g[20]=C,g[21]=f):f=g[21],f};function ou(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let oc=(e=>{let t=e,n=new Set;return{getState:()=>t,setState:e=>
209{t=e(t),n.forEach(e=>e())},subscribe:e=>(n.add(e),()=>n.delete(e))}})({}),od=e=>{let t,n,r,i,o,l,c=(0,a.c)(11),{comlink:d,children:h}=e;c[0]!==d?(t=()=>d?.on("presentation/shared-state",oh),n=[d],c[0]=d,c[1]=t,c[2]=n):(t=c[1],n=c[2]),(0,u.useEffect)(t,n),c[3]!==d?(r=()=>{(async function(){let e=await d?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&oc.setState(()=>e.state)})().catch(op)},i=[d],c[3]=d,c[4]=r,c[5]=i):(r=c[4],i=c[5]),(0,u.useEffect)(r,i),c[6]!==d?(o={comlink:d,store:oc},c[6]=d,c[7]=o):o=c[7];let p=o;return c[8]!==h||c[9]!==p?(l=(0,s.jsx)(e5.Provider,{value:p,children:h}),c[8]=h,c[9]=p,c[10]=l):l=c[10],l};function oh(e){"value"in e?oc.setState(t=>({...t,[e.key]:e.value})):oc.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function op(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let of=e=>{let t,n,r=(0,a.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=nx[e];if(n)o.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=o,r[1]=t):t=r[1];let l=t;
209return r[2]!==i||r[3]!==l?(n=(0,s.jsx)(nw.Provider,{value:l,children:i}),r[2]=i,r[3]=l,r[4]=n):n=r[4],n};function og(){}function om(e){return e.id}function oy(e){return!!e}function ov(e){let{sanity:t}=e;return t&&"id"in t?t:null}let ob=p.I4.div` 210 background-color: transparent; 211 direction: ltr; 212 inset: 0; 213 pointer-events: none; 214 position: absolute; 215 width: 100%; 216 height: 100%; 217 z-index: ${({$zIndex:e})=>e??"9999999"}; 218`;function ox(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let ow=e=>{let t,n,r,i,o,s=(0,a.c)(8),{documentIds:l}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],s[0]=t):t=s[0];let[c,h]=(0,u.useState)(t);s[1]!==l?(n=()=>{(0,u.startTransition)(()=>h(e=>{let t=Array.from(new Set(l));return e.length===t.length&&e.reduce(o$,t)?.length===0?e:t}))},r=[l],s[1]=l,s[2]=n,s[3]=r):(n=s[2],r=s[3]),(0,u.useEffect)(n,r);let p=G();return s[4]!==p||s[5]!==c?(i=()=>{for(let e of c)p.send({type:"observe",documentId:(0,d.T4)(e)}),p.send({type:"observe",documentId:(0,d.IM)(e)});return()=>{for(let e of c)p.send({type:"unobserve",documentId:(0,d.T4)(e)}),p.send({type:"unobserve",documentId:(0,d.IM)(e)})}},o=[p,c],s[4]=p,s[5]=c,s[6]=i,s[7]=o):(i=s[6],o=s[7]),(0,u.useEffect)(i,o),null},oS=e=>{let t,n,r,i=(0,a.c)(12),{comlink:o,dispatch:s,inFrame:l,inPopUp:c,onDrag:h,overlayEnabled:p,rootElement:f}=e,{dispatchDragEndEvent:g}=function(){let e,t,n,r=(0,a.c)(4),{getDocument:i}=ee();return r[0]!==i?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=i(n.id),{node:t,position:r}=o,{key:s,hasExplicitKey:a}=er(n),{path:l,key:u}=er(t);l&&u&&u!==s&&e.patch(async e=>{let{getSnapshot:t}=e,i=W(await t(),n.path);return a?[M(l,R({_key:s})),M(l,P(i,r,{_key:u}))]:[M(l,R(~~s)),M(l,P(i,r,u>s?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[i],r[0]=i,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,u.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:ij},r[3]=n):n=r[3],n}(),m=nS();i[0]!==o||i[1]!==s||i[2]!==g||i[3]!==h||i[4]!==m?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),m("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)o?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)o?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;g({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&m("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type)return void h(e.x,e.y);else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)m("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}s(e)},i[0]=o,i[1]=s,i[2]=g,i[3]=h,i[4]=m,i[5]=t):t=i[5];let y=function(e,t,n,r){let i,o,s=(0,a.c)(7),l=(0,u.useRef)(void 0),c=Z();return s[0]!==e||s[1]!==t||s[2]!==n||s[3]!==r||s[4]!==c?(i=()=>{if(e)return l.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,s=new Map,a=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,h,p,f,g=!1,m=[],y=()=>m[m.length-1];function v(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 b({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}),h.observe(o),e({type:"element/activate",id:t})}function x({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;v(i,r),h.unobserve(o),m=m.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of m){if(t===n){let n=a.get(t)?.sanity;if(!n||!eZ(n))return;if(e2(t,n,l,a)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}S(n)}}function S(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function k(c){for(let h of function e(t){let n=[];function r(e,t,n,r){let i=function(e){if("object"==typeof e&&e)return eg(e);try{return eg(JSON.parse(e))}catch{let t=e.split(";").reduce((e,t)=>
218{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=d.C.toString(function(e){let t=[];for(let n of e.split(".")){let e=eu.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=ec.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=ed.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"perspective":e.perspective=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((0,eo.is)(el,t))return t;return}}(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 s=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=eJ(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=eK(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&&eX(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eX(t.textContent)));if("IMG"===t.tagName){let e=eK(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=eK(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=eK(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),a=o;if(i.nodeType===Node.ELEMENT_NODE&&i.dataset?.sanityEditGroup!==void 0&&(a={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(a)),s){let e={elements:s.elements,sanity:s.sanity,reason:s.reason};a&&!s.preventGrouping?a.targets.push(e):n.push({elements:s.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,a)}(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:eJ(e.targets.map(({sanity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===h.type){for(let e of h.targets){let t=a.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===h.targets.length&&E(h.elements.element)}if(!h.commonSanity)continue;let{element:c}=h.elements;a.has(c)?function(t){let{element:n}=t.elements,r=a.get(n);r&&(a.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:eA(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(h):function({type:c,elements:d,commonSanity:h,targets:f}){let{element:v,measureElement:x}=d,k={click(t){let r=t.target;if(v===y()&&v.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=a.get(v)?.sanity;r&&!g&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in h)||!n&&!r||!i||!h.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;v===y()&&v.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:h}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==m.at(-1)||v.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=a.get(v)?.sanity;if(!o||!eZ(o)||!eQ(o.path))return;let s=e2(v,h,l,a);s&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:s,onSequenceStart:a,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>eA(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eM(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minima
218p-disable"),p=!!r.getAttribute("data-sanity-drag-prevent-default"),f=r.getAttribute("data-unstable_sanity-drag-document-height"),g=r.getAttribute("data-unstable_sanity-drag-group-height"),m=null,y=eL(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eO(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eO(e.map(e=>eR(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,g?~~g:null),w=!1,S=!1,k=!0;eF||(eq={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}},eW=f?~~f:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>eA(e.elements.element))},150),_=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eV(eH,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eN(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:ez(u)})},300)}))},T=e=>{Math.abs(e.deltaY)>=10&&x<1&&!eF&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{_()},50))},j=e=>{if(e.preventDefault(),eU=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}}(eH=eL(e)),4>Math.abs(eP(eH,y)))return;if(!w){let e=ez(u),t=eV(eH,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,a()}o({type:"overlay/dragUpdateCursorPosition",x:eH.x,y:eH.y}),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{_()},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:eI(r,t,n),right:eI(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:eI(r,t,n),bottom:eI(i,t,n)}}}(eH,u,c);JSON.stringify(m)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:eD(i,m=t,c)})},A=()=>{k=!1,o({type:"overlay/dragEnd",target:s,insertPosition:m?eD(i,m,c):null,dragGroup:d,flow:c,preventInsertDefault:p}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eF||(clearInterval(E),l(),R(),I()),P()},C=e=>{"Shift"===e.key&&eF&&(eF=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eV(eH,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eB(eU.y,v,eW,o,150,eq)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),P(),R(),I(),l()))},M=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eB(eU.y,v,eW,o,150,eq).then(()=>{eF=!1})},50),clearInterval(E),P(),R(),I(),l()},P=()=>{window.removeEventListener("mousemove",j),window.removeEventListener("wheel",T),window.removeEventListener("mouseup",A)},I=()=>{window.removeEventListener("keyup",C)},R=()=>{window.removeEventListener("blur",M)};window.addEventListener("blur",M),window.addEventListener("keyup",C),window.addEventListener("wheel",T),window.addEventListener("mousemove",j),window.addEventListener("mouseup",A)}({element:v,handler:e,mouseEvent:t,overlayGroup:s,target:o,onSequenceStart:()=>{g=!0},onSequenceEnd:()=>{setTimeout(()=>{g=!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")&&v.closest("[data-vercel-edit-info]")||v.closest("[data-vercel-edit-target]")||(m.push(v),e({type:"element/mouseenter",id:E,rect:eA(v)}),w(v))},mouseleave(n){function r(){m.pop();let t=y();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=a.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:eA(t)})}S(v)}let{relatedTarget:i}=n,o=eY(i),s=t.contains(o);if(eG(o)&&s)return function e(t){let n=i=>{let{relatedTarget:o}=i;eY(o)?o&&eG(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=ej(),_={type:c,id:E,elements:d,sanity:h,handlers:k};l.add(v),u.set(x,v),s.set(E,v),a.set(v,_),p?.observe(v),e({type:"element/register",elementType:c,id:E,element:v,rect:eA(v),sanity:h,dragDisabled:!!v.getAttribute("data-sanity-drag-disable"),targets:f.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&b(_)}(h)}}function E(t){let n=a.get(t);if(n){let{id:r,handlers:i}=n;v(t,i),h.unobserve(t),a.delete(t),l.delete(t),s.delete(r),e({type:"element/unregister",id:r})}}function _(t){let n=a.get(t);n&&e({type:"element/updateRect",id:n.id,rect:eA(t)})}function T(e){if(o)for(let t of e){let{target:e}=t,n=eG(e)&&a.get(e);n&&(t.isIntersecting?b(n):x(n))}}function j(t){let n=eY(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}m=[],e({type:"overlay/blur"})}function A(){m=[],e({type:"overlay/reset-mouse-state"})}function C(){for(let e of l)_(e)}function M(t){"Escape"===t.key&&(m=[],e({type:"overlay/blur"}))}function P(e){let{target:t}=e;if(!(t===window.document||!eG(t)))for(let e of l)t.contains(e)&&_(e)}function I(){o||(p=new IntersectionObserver(T,{threshold:.3}
218),l.forEach(e=>p.observe(e)),e({type:"overlay/activate"}),o=!0)}function R(){o&&(p?.disconnect(),l.forEach(e=>{let t=a.get(e);t&&x(t)}),e({type:"overlay/deactivate"}),o=!1)}function O(t){let{id:n}=t.detail,r=s.get(n);if(!r)return;let i=a.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)_(e)}),window.addEventListener("click",j),window.addEventListener("contextmenu",j),window.addEventListener("sanity-overlay/exclusive-plugin-closed",A),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",M),window.addEventListener("resize",C),window.addEventListener("scroll",P,{capture:!0,passive:!0}),h=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eG(e)){let t=u.get(e);if(!t)return;_(t)}}}),(f=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,eG(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;k({childNodes:[eG(e)?e:o]})}}if(n)for(let e of l)e.isConnected||E(e),a.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),k(document.body),I(),{activate:I,deactivate:R,destroy:function(){window.removeEventListener("click",j),window.removeEventListener("contextmenu",j),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",A),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",M),window.removeEventListener("resize",C),window.removeEventListener("scroll",P),f.disconnect(),h.disconnect(),l.forEach(e=>{E(e)}),s.clear(),l.clear(),m=[],R()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:c}),()=>{l.current?.destroy(),l.current=void 0}},o=[e,t,n,r,c],s[0]=e,s[1]=t,s[2]=n,s[3]=r,s[4]=c,s[5]=i,s[6]=o):(i=s[5],o=s[6]),(0,u.useEffect)(i,o),l}(f,t,l,c);return i[6]!==y.current||i[7]!==p?(n=()=>{p?y.current?.activate():y.current?.deactivate()},i[6]=y.current,i[7]=p,i[8]=n):n=i[8],i[9]!==y||i[10]!==p?(r=[y,p],i[9]=y,i[10]=p,i[11]=r):r=i[11],(0,u.useEffect)(n,r),null};function ok(e){let t,n,r,i,o,l,c,d,p,f,g,m,y,v,b,x,w,S,k,E,_,T,j,A,C,M=(0,a.c)(81),{comlink:P,comlinkStatus:I,componentResolver:R,inFrame:O,inPopUp:$,zIndex:D,onPerspectiveChange:L}=e,V=(0,h.o)();M[0]===Symbol.for("react.memo_cache_sentinel")?(t={contextMenu:null,dragInsertPosition:null,dragShowMinimap:!1,dragShowMinimapPrompt:!1,dragSkeleton:null,elements:[],focusPath:"",isDragging:!1,perspective:"published",wasMaybeCollapsed:!1,dragMinimapTransition:!1,dragGroupRect:null},M[0]=t):t=M[0];let[N,z]=(0,u.useReducer)(oi,t),{contextMenu:B,dragInsertPosition:F,dragShowMinimap:U,dragShowMinimapPrompt:H,dragSkeleton:W,elements:q,isDragging:G,perspective:Y,wasMaybeCollapsed:X,dragMinimapTransition:K,dragGroupRect:J}=N,[Q,ee]=(0,u.useState)(null),[et,en]=(0,u.useState)(!0);M[1]!==P?(n=()=>{let e=[P?.on("presentation/focus",e=>{z({type:"presentation/focus",data:e})}),P?.on("presentation/blur",e=>{z({type:"presentation/blur",data:e})}),P?.on("presentation/toggle-overlay",()=>{en(oI)})].filter(Boolean);return()=>e.forEach(oP)},r=[P],M[1]=P,M[2]=n,M[3]=r):(n=M[2],r=M[3]),(0,u.useEffect)(n,r),function(e,t){let n,r,i=(0,a.c)(4);i[0]!==e||i[1]!==t?(n=()=>{let n=new AbortController;e?.fetch("visual-editing/fetch-perspective",void 0,{signal:n.signal,suppressWarnings:!0}).then(e=>{t({type:"presentation/perspective",data:e})}).catch(og);let r=e?.on("presentation/perspective",e=>{t({type:"presentation/perspective",data:e})});return()=>{r?.(),n.abort()}},r=[e,t],i[0]=e,i[1]=t,i[2]=n,i[3]=r):(n=i[2],r=i[3]),(0,u.useEffect)(n,r)}(P,z),M[4]!==L||M[5]!==Y?(i=()=>{if(!L)return;let e=requestAnimationFrame(()=>(0,u.startTransition)(()=>L(Y)));return()=>cancelAnimationFrame(e)},o=[L,Y],M[4]=L,M[5]=Y,M[6]=i,M[7]=o):(i=M[6],o=M[7]),(0,u.useEffect)(i,o),function(e,t,n){let r,i,o,s=(0,a.c)(7),l=(0,u.useRef)(void 0);s[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},s[0]=e,s[1]=r):r=s[1];let c=r;s[2]!==t||s[3]!==n||s[4]!==c?(i=()=>{let e=t.map(ov).filter(oy),r=new Set(e.map(om));if(!l.current||!function(e,t){if(e===t)return!0;
218if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(r,l.current.nodeIds)||n!==l.current.perspective){let t=Array.from(r).map(t=>{let{type:n,projectId:r,dataset:i}=e.find(e=>e.id===t);return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}});l.current={nodeIds:r,perspective:n},c(t,n)}},o=[t,n,c],s[2]=t,s[3]=n,s[4]=c,s[5]=i,s[6]=o):(i=s[5],o=s[6]),(0,u.useEffect)(i,o)}(P,q,Y),M[8]!==Q?(l=(e,t)=>{Q&&(Q.style.setProperty("--drag-preview-x",`${e}px`),Q.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},M[8]=Q,M[9]=l):l=M[9];let er=l;M[10]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{let e=!1,t=t=>{oO(t)&&e&&(e=!1,en(oC))},n=t=>{var n,r;if(oO(t)){if(t.ctrlKey||t.metaKey||t.shiftKey)return;e||(e=!0,en(oA))}n=["mod","\\"],r=t,n.every(e=>oR[e]?r[oR[e]]:r.key===e.toUpperCase())&&en(oj)},r=()=>{e&&(e=!1,en(oT))};return window.addEventListener("click",oM),window.addEventListener("keydown",n),window.addEventListener("keyup",t),window.addEventListener("blur",r),()=>{window.removeEventListener("click",oM),window.removeEventListener("keydown",n),window.removeEventListener("keyup",t),window.removeEventListener("blur",r)}},d=[en],M[10]=c,M[11]=d):(c=M[10],d=M[11]),(0,u.useEffect)(c,d);let[ei,eo]=(0,u.useState)(!1),[es,ea]=(0,u.useState)(!1),el=(0,u.useRef)(void 0);M[12]!==et?(f=()=>{if(et)return ox(()=>{eo(!0),ox(()=>{ea(!0),el.current=setTimeout(()=>{ea(!1),eo(!1)},1500)})});el.current&&(clearTimeout(el.current),(0,u.startTransition)(()=>{eo(!1),ea(!1)}))},p=[et],M[12]=et,M[13]=p,M[14]=f):(p=M[13],f=M[14]),(0,u.useEffect)(f,p),M[15]!==q?(g=q.flatMap(o_),M[15]=q,M[16]=g):g=M[16];let eu=g;M[17]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{z({type:"overlay/blur"})},M[17]=m):m=M[17];let ec=m,ed=Z(),eh=ed?R:void 0,[ep,ef]=(0,u.useState)(!1);!ep&&O&&"connected"===I&&ef(!0);e:{let t;if(G){let e;M[18]===Symbol.for("react.memo_cache_sentinel")?(e=[],M[18]=e):e=M[18],y=e;break e}M[19]!==P||M[20]!==eh||M[21]!==K||M[22]!==U||M[23]!==q||M[24]!==O||M[25]!==G||M[26]!==ed||M[27]!==e.plugins||M[28]!==ep||M[29]!==X?(t=q.filter(oE).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:a,sanity:l,dragDisabled:u,targets:c,elementType:d}=t,h=!u&&!!r.getAttribute("data-sanity")&&ed&&q.some(e=>"id"in e.sanity&&"id"in l&&e1(e.sanity,l)&&e.sanity.path!==l.path);return(0,s.jsx)(iK,{comlink:P,componentResolver:eh,plugins:e.plugins,element:r,enableScrollIntoView:!G&&!K&&!U,id:n,focused:i,hovered:o,node:l,rect:a,showActions:!ep,draggable:h,isDragging:G||K,wasMaybeCollapsed:i&&X,targets:c,elementType:d,inFrame:O},n)}),M[19]=P,M[20]=eh,M[21]=K,M[22]=U,M[23]=q,M[24]=O,M[25]=G,M[26]=ed,M[27]=e.plugins,M[28]=ep,M[29]=X,M[30]=t):t=M[30],y=t}let eg=y,em=V?"dark":"light",ey=es?"":void 0,ev=ei?"":void 0;return M[31]!==eu||M[32]!==Y?(v=(0,s.jsx)(ow,{documentIds:eu,perspective:Y}),M[31]=eu,M[32]=Y,M[33]=v):v=M[33],M[34]!==P||M[35]!==O||M[36]!==$||M[37]!==et||M[38]!==Q||M[39]!==er?(b=(0,s.jsx)(oS,{comlink:P,dispatch:z,inFrame:O,inPopUp:$,onDrag:er,overlayEnabled:et,rootElement:Q}),M[34]=P,M[35]=O,M[36]=$,M[37]=et,M[38]=Q,M[39]=er,M[40]=b):b=M[40],M[41]!==B?(x=B&&(0,s.jsx)(iN,{...B,onDismiss:ec}),M[41]=B,M[42]=x):x=M[42],M[43]!==J||M[44]!==F||M[45]!==K||M[46]!==H||M[47]!==G?(w=G&&!K&&(0,s.jsxs)(s.Fragment,{children:[F&&(0,s.jsx)(i8,{dragInsertPosition:F}),H&&(0,s.jsx)(or,{}),J&&(0,s.jsx)(i6,{dragGroupRect:J})]}),M[43]=J,M[44]=F,M[45]=K,M[46]=H,M[47]=G,M[48]=w):w=M[48],M[49]!==W||M[50]!==G?(S=G&&W&&(0,s.jsx)(i7,{skeleton:W}),M[49]=W,M[50]=G,M[51]=S):S=M[51],M[52]!==eg||M[53]!==ey||M[54]!==ev||M[55]!==v||M[56]!==b||M[57]!==x||M[58]!==w||M[59]!==S||M[60]!==D?(k=(0,s.jsxs)(ob,{"data-fading-out":ey,"data-overlays":ev,ref:ee,$zIndex:D,children:[v,b,x,eg,w,S]}),M[52]=eg,M[53]=ey,M[54]=ev,M[55]=v,M[56]=b,M[57]=x,M[58]=w,M[59]=S,M[60]=D,M[61]=k):k=M[61],M[62]!==P||M[63]!==k?(E=(0,s.jsx)(od,{comlink:P,children:k}),M[62]=P,M[63]=k,M[64]=E):E=M[64],M[65]!==P||M[66]!==E?(_=(0,s.jsx)(oo,{comlink:P,children:E}),M[65]=P,M[66]=E,M[67]=_):_=M[67],M[68]!==P||M[69]!==q||M[70]!==_?(T=(0,s.jsx)(ol,{comlink:P,elements:q,children:_}),M[68]=P,M[69]=q,M[70]=_,M[71]=T):T=M[71],M[72]!==Q||M[73]!==T?(j=(0,s.jsx)(h.P,{children:(0,s.jsx)(h.t,{element:Q,children:T})}),M[72]=Q,M[73]=T,M[74]=j):j=M[74],M[75]!==em||M[76]!==j?(A=(0,s.jsx)(h.q,{scheme:em,theme:h.Ft,tone:"transparent",children:j}),M[75]=em,M[76]=j,M[77]=A):A=M[77],M[78]!==P||M[79]!==A?(C=(0,s.jsx)(of,{comlink:P,children:A}),M[78]=P,M[79]=A,M[80]=C):C=M[80],C}function oE(e){return e.activated||e.focused}function o_(e){return"id"in e.sanity?[e.sanity.id]:[]}function oT(e){return!e}function oj(e){return!e}function oA(e){return!e}function oC(e){return!e}function oM(e){let t=e.target;if(((0,h.vt)(t)||(0,h.bt)(t)&&t.closest("a"))&&e.altKey){e.preventDefault(),e.stopPropagation();let t=new MouseEvent(e.type,{...e,altKey:!1,bubbles:!0,cancelable:!0});e.target?.dispatchEvent(t)}}function oP(e){return e()}function oI(e){return!e}let oR={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function oO(e){return"Alt"===e.key}function o$(e,t){return e.filter(e=>e!==t)}let oD=e=>{let t,n,r=(0,a.c)(4),{comlink:i,refresh:o}=e,s=(0,u.useRef)(0),l=(0,u.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(s.current);
218let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;s.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(s.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(l.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),l.current=window.setTimeout(()=>{let t=o(e);!1!==t&&(i.post("visual-editing/refreshing",e),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e)}}),n=[i,o],r[0]=i,r[1]=o,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,u.useEffect)(t,n),null};function oL(e){let{data:t,origin:n}=e;t&&"object"==typeof t&&"domain"in t&&"sanity/channels"===t.domain&&"from"in t&&"presentation"===t.from&&"type"in t&&"presentation/status"===t.type&&window.parent.postMessage({domain:"sanity/channels",type:"visual-editing/status",data:{origin:location.origin}},n)}function oV(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function oN(){}let oz=(0,u.lazy)(()=>n.e(6144).then(n.bind(n,86144))),oB=e=>{let t,n,r,i,o,d,h,p,f,g,m,y=(0,a.c)(33),{components:v,plugins:b,history:x,portal:w,refresh:S,zIndex:k,onPerspectiveChange:E}=e,_=void 0===w||w,[T,j]=(0,u.useState)(null),[A,C]=(0,u.useState)(null);y[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{(0,u.startTransition)(()=>{j((0,l.Fk)()),C((0,l.v$)())})},n=[],y[0]=t,y[1]=n):(t=y[0],n=y[1]),(0,u.useEffect)(t,n);let[M,P]=(0,u.useState)(null);y[2]!==_?(r=()=>{if(!1===_)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),(0,u.startTransition)(()=>P(e)),()=>{(0,u.startTransition)(()=>P(null)),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},i=[_],y[2]=_,y[3]=r,y[4]=i):(r=y[3],i=y[4]),(0,u.useEffect)(r,i);let[I,R]=function(e){let t,n,r,i,o,s=(0,a.c)(9),c=void 0===e||e,[d,h]=(0,u.useState)(),[p,f]=(0,u.useState)("idle");return s[0]!==c?(t=()=>{if(!c)return;let e=(0,n$.RM)({name:"visual-editing",connectTo:"presentation"},(0,n$.Uc)().provide({actors:(0,l.jF)()})),t=e.onStatus(()=>f("connected"),"connected");(0,u.startTransition)(()=>h(e));let n=e.start();return()=>{t(),n(),(0,u.startTransition)(()=>h(void 0))}},n=[c],s[0]=c,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,u.useEffect)(t,n),s[3]!==p?(r=()=>{if("connected"===p)return;let e=new AbortController;return window.addEventListener("message",oL,{signal:e.signal}),()=>{e.abort()}},i=[p],s[3]=p,s[4]=r,s[5]=i):(r=s[4],i=s[5]),(0,u.useEffect)(r,i),s[6]!==d||s[7]!==p?(o=[d,p],s[6]=d,s[7]=p,s[8]=o):o=s[8],o}(!0===T||!0===A);!function(e){let t,n,r=(0,a.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nL.m(1),n=new nV.B;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
218),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nN.h)(t,n)}(e),n=ip.provide({actors:{documentMutatorMachine:(e=>{let t=(0,$.Sx)(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:i}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),n=(0,$.Sx)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=O.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return id.provide({actions:{"send sync event to parent":(0,iu.e)(({enqueue:e})=>{e.sendParent(({context:e})=>({type:"sync",id:e.id,document:e.remote})),e.emit(({context:e})=>({type:"ready",snapshot:e.local}))})},actors:{"fetch remote snapshot":t,"submit mutations as transactions":n}})})(e)}}),r=(0,nD.c)(n,{input:{client:{withConfig:oN},sharedListener:t}});r.start();let i=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:i.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(L=e,V))t()}(r)}).catch(oV),()=>{r.stop(),i.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,u.useEffect)(t,n)}("connected"===R?I:void 0);let D=(0,u.useDeferredValue)((0,u.useSyncExternalStore)(iE,i_,oF),!1);y[5]!==R||y[6]!==T||y[7]!==A?(o=()=>{if("connected"===R)iy(A?"presentation-window":"presentation-iframe");else if(T||A){let e=setTimeout(oU,1e3);return()=>{clearTimeout(e),iy(null)}}else iy("standalone");return oH},d=[R,A,T],y[5]=R,y[6]=T,y[7]=A,y[8]=o,y[9]=d):(o=y[8],d=y[9]),(0,u.useEffect)(o,d),y[10]!==I||y[11]!==R||y[12]!==v||y[13]!==T||y[14]!==A||y[15]!==E||y[16]!==b||y[17]!==k?(h=null!==T&&null!==A&&(0,s.jsx)(ok,{comlink:I,comlinkStatus:R,componentResolver:v,onPerspectiveChange:E,plugins:b,inFrame:T,inPopUp:A,zIndex:k}),y[10]=I,y[11]=R,y[12]=v,y[13]=T,y[14]=A,y[15]=E,y[16]=b,y[17]=k,y[18]=h):h=y[18],y[19]!==I||y[20]!==x||y[21]!==S?(p=I&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(iv,{comlink:I,history:x}),(0,s.jsx)(iT,{comlink:I}),S&&(0,s.jsx)(oD,{comlink:I,refresh:S})]}),y[19]=I,y[20]=x,y[21]=S,y[22]=p):p=y[22],y[23]!==R||y[24]!==D?(f="connected"===R&&D&&(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(oz,{})}),y[23]=R,y[24]=D,y[25]=f):f=y[25],y[26]!==h||y[27]!==p||y[28]!==f?(g=(0,s.jsxs)(s.Fragment,{children:[h,p,f]}),y[26]=h,y[27]=p,y[28]=f,y[29]=g):g=y[29];let N=g;return!1!==_&&M?(y[30]!==N||y[31]!==M?(m=(0,c.createPortal)(N,M),y[30]=N,y[31]=M,y[32]=m):m=y[32],m):N};function oF(){return!1}function oU(){return iy("standalone")}function oH(){return iy(null)}oB.displayName="VisualEditing"},2357:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},2359:(e,t,n)=>{e.exports=n(88499)(Object,"create")},2534:(e,t,n)=>{"use strict";n.d(t,{K:()=>h});var r=n(49397),i=n(97096),o=n(99492),s=n(53585),a=n(18613),l=n(60042),u=n(33210),c=n(40416);let d={linear:i.l,easeIn:u.a6,easeInOut:u.am,easeOut:u.vT,circIn:a.po,circInOut:a.tn,circOut:a.yT,backIn:s.dg,backInOut:s.ZZ,backOut:s.Sz,anticipate:o.b},h=e=>{if((0,c.D)(e)){(0,r.V)(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,o]=e;return(0,l.A)(t,n,i,o)}return"string"==typeof e?((0,r.V)(void 0!==d[e],`Invalid easing type '${e}'`,"invalid-easing-type"),d[e]):e}},2805:(e,t,n)=>{var r=n(14412),i=n(65856),o=n(6624),s=n(49476);e.exports=function(e,t){return function(n,a){var l=s(n)?r:i,u=t?t():{};return l(n,e,o(a,2),u)}}},4280:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}},6253:(e,t,n)=>{e=n.nmd(e);var r=n(38416),i=n(51906),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},6624:(e,t,n)=>{var r=n(18834),i=n(53839),o=n(24197),s=n(49476),a=n(93098);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},7069:(e,t,n)=>{var r=n(28031),i=n(35156),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:r(s(e=Object(e)),function(t){return o.call(e,t)})}:i},7171:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(12020),i=n(38776);let o=(0,r.forwardRef)(function(e,t){return(0,i.jsx)("svg",{"data-sanity-icon":"chevron-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,i.jsx)("path",{d:"M10 8L14.5 12.5L10 17",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})},7642:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});let r=e=>"object"==typeof e&&null!==e},8920:e=>{e.exports=function(e){return this.__data__.get(e)}},9279:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},9386:(e,t,n)=>{var r=n(1157),i=n(49476);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},9723:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},10940:(e,t,n)=>{e.exports=n(4280)()},11922:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},12932:(e,t,n)=>{var r=n(14935),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=l;++d<c;){var y=e[h=u[d]],v=t[h];if(o)var b=l?o(v,y,h,t,e,a):o(y,v,h,e,t,a);if(!(void 0===b?y===v||s(y,v,n,o,a):b)){g=!1;break}
218m||(m="constructor"==h)}if(g&&!m){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(g=!1)}return a.delete(e),a.delete(t),g}},13762:(e,t,n)=>{e.exports=n(88499)(n(38416),"WeakMap")},14412:e=>{e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}},14935:(e,t,n)=>{var r=n(9386),i=n(7069),o=n(98515);e.exports=function(e){return r(e,o,i)}},15663:(e,t,n)=>{var r=n(59573),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;e.exports=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t})},16865:(e,t,n)=>{var r=n(25858);e.exports=function(){this.__data__=new r,this.size=0}},17643:(e,t,n)=>{"use strict";n.d(t,{$:()=>C,B:()=>en,C:()=>x,D:()=>et,E:()=>H,F:()=>k,G:()=>ee,H:()=>ei,I:()=>Q,J:()=>er,K:()=>e_,L:()=>Y,M:()=>eP,N:()=>o,O:()=>Z,P:()=>function e(t,n,r,i){if("string"==typeof n){let e=eu(t,n).next(r,i);return e&&e.length?e:t.next(r,i)}if(1===Object.keys(n).length){let o=Object.keys(n),s=e(eu(t,o[0]),n[o[0]],r,i);return s&&s.length?s:t.next(r,i)}let o=[];for(let s of Object.keys(n)){let a=n[s];if(!a)continue;let l=e(eu(t,s),a,r,i);l&&o.push(...l)}return o.length?o:t.next(r,i)},Q:()=>ew,R:()=>eI,S:()=>i,T:()=>f,U:()=>J,V:()=>ec,W:()=>eR,X:()=>l,Y:()=>E,Z:()=>a,_:()=>c,a0:()=>M,b:()=>D,c:()=>R,d:()=>N,e:()=>eS,f:()=>d,g:()=>ey,m:()=>_,q:()=>ed,r:()=>eD,s:()=>F,t:()=>y,z:()=>m});class r{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){let t={value:e,next:null};if(this._current){this._last.next=t,this._last=t;return}this._current=t,this._last=t,this._active&&this.flush()}flush(){for(;this._current;){let e=this._current;this._process(e.value),this._current=e.next}this._last=null}}let i=".",o="",s="xstate.init",a="xstate.error",l="xstate.stop";function u(e,t){return{type:`xstate.done.state.${e}`,output:t}}function c(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function d(e){return{type:s,input:e}}function h(e){setTimeout(()=>{throw e})}let p="function"==typeof Symbol&&Symbol.observable||"@@observable";function f(e){if(b(e))return e;let t=[],n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function g(e){var t;return(t=e)&&"object"==typeof t&&"machine"in t&&"value"in t?e.value:"string"!=typeof e?e:function(e){if(1===e.length)return e[0];let t={},n=t;for(let t=0;t<e.length-1;t++)if(t===e.length-2)n[e[t]]=e[t+1];else{let r=n;n={},r[e[t]]=n}return t}(f(e))}function m(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let o=r[i];n[o]=t(e[o],o,e,i)}return n}function y(e){var t;return void 0===e?[]:b(t=e)?t:[t]}function v(e,t,n,r){return"function"==typeof e?e({context:t,event:n,self:r}):e}function b(e){return Array.isArray(e)}function x(e){var t;return(b(t=e)?t:[t]).map(e=>void 0===e||"string"==typeof e?{target:e}:e)}function w(e){if(void 0!==e&&""!==e)return y(e)}function S(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function k(e,t){return`${t}.${e}`}function E(e,t){let n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];let[,r,i]=n,o=e.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function _(e,t){if(t===e||"*"===t)return!0;if(!t.endsWith(".*"))return!1;let n=t.split("."),r=e.split(".");for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if("*"===t)return e===n.length-1;if(t!==i)return!1}return!0}function T(e,t){return`${e.sessionId}.${t}`}let j=0,A=!1,C=1,M=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({}),P={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class I{constructor(e,t){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new r(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=M.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];let n={...P,...t},{clock:i,logger:o,parent:s,syncSnapshot:a,id:l,systemId:u,inspect:c}=n;this.system=s?s.system:function(e,t){let n=new Map,r=new Map,i=new WeakMap,o=new Set,s={},{clock:a,logger:l}=t,u={schedule:(e,t,n,r,i=Math.random().toString(36).slice(2))=>{let o={source:e,target:t,event:n,delay:r,id:i,startedAt:Date.now()},l=T(e,i);c._snapshot._scheduledEvents[l]=o;let u=a.setTimeout(()=>{delete s[l],delete c._snapshot._scheduledEvents[l],c._relay(e,t,n)},r);s[l]=u},cancel:(e,t)=>
218{let n=T(e,t),r=s[n];delete s[n],delete c._snapshot._scheduledEvents[n],void 0!==r&&a.clearTimeout(r)},cancelAll:e=>{for(let t in c._snapshot._scheduledEvents){let n=c._snapshot._scheduledEvents[t];n.source===e&&u.cancel(e,n.id)}}},c={_snapshot:{_scheduledEvents:(t?.snapshot&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${j++}`,_register:(e,t)=>(n.set(e,t),e),_unregister:e=>{n.delete(e.sessionId);let t=i.get(e);void 0!==t&&(r.delete(t),i.delete(e))},get:e=>r.get(e),getAll:()=>Object.fromEntries(r.entries()),_set:(e,t)=>{let n=r.get(e);if(n&&n!==t)throw Error(`Actor with system ID '${e}' already exists.`);r.set(e,t),i.set(t,e)},inspect:e=>{let t=S(e);return o.add(t),{unsubscribe(){o.delete(t)}}},_sendInspectionEvent:t=>{if(!o.size)return;let n={...t,rootId:e.sessionId};o.forEach(e=>e.next?.(n))},_relay:(e,t,n)=>{c._sendInspectionEvent({type:"@xstate.event",sourceRef:e,actorRef:t,event:n}),t._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...c._snapshot._scheduledEvents}}),start:()=>{let e=c._snapshot._scheduledEvents;for(let t in c._snapshot._scheduledEvents={},e){let{source:n,target:r,event:i,delay:o,id:s}=e[t];u.schedule(n,r,i,o,s)}},_clock:a,_logger:l};return c}(this,{clock:i,logger:o}),c&&!s&&this.system.inspect(S(c)),this.sessionId=this.system._bookId(),this.id=l??this.sessionId,this.logger=t?.logger??this.system._logger,this.clock=t?.clock??this.system._clock,this._parent=s,this._syncSnapshot=a,this.options=n,this.src=n.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:e=>{this._deferred.push(e)},system:this.system,stopChild:e=>{if(e._parent!==this)throw Error(`Cannot stop child actor ${e.id} of ${this.id} because it is not a child`);e._stop()},emit:e=>{let t=this.eventListeners.get(e.type),n=this.eventListeners.get("*");if(t||n)for(let r of[...t?t.values():[],...n?n.values():[]])try{r(e)}catch(e){h(e)}},actionExecutor:e=>{let t=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:e.type,params:e.params}}),!e.exec)return;let t=A;try{A=!0,e.exec(e.info,e.params)}finally{A=t}};this._processingStatus===M.Running?t():this._deferred.push(t)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this.systemId=u,this.system._set(u,this)),this._initState(t?.snapshot??t?.state),u&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(e){this._snapshot={status:"error",output:void 0,error:e}}}update(e,t){let n;for(this._snapshot=e;n=this._deferred.shift();)try{n()}catch(t){this._deferred.length=0,this._snapshot={...e,status:"error",error:t}}switch(this._snapshot.status){case"active":for(let t of this.observers)try{t.next?.(e)}catch(e){h(e)}break;case"done":var r;for(let t of this.observers)try{t.next?.(e)}catch(e){h(e)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:t,snapshot:e})}subscribe(e,t,n){let r=S(e,t,n);if(this._processingStatus!==M.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(e){h(e)}break;case"error":{let e=this._snapshot.error;if(r.error)try{r.error(e)}catch(e){h(e)}else h(e)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(e,t){let n=this.eventListeners.get(e);n||(n=new Set,this.eventListeners.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}select(e,t=Object.is){return{subscribe:n=>{let r=S(n),i=e(this.getSnapshot());return this.subscribe(n=>{let o=e(n);t(i,o)||(i=o,r.next?.(o))})},get:()=>e(this.getSnapshot())}}start(){if(this._processingStatus===M.Running)return this;this._syncSnapshot&&this.subscribe({next:e=>{"active"===e.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:e})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=M.Running;let e=d(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let t,n;try{t=this.logic.transition(this._snapshot,e,this._actorScope)}catch(e){n={err:e}}if(n){let{err:e}=n;this._snapshot={...this._snapshot,status:"error",error:e},this._error(e);return}this.update(t,e),e.type===l&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===M.Stopped||((this.mailbox.clear(),this._processingStatus===M.NotStarted)?this._processingStatus=M.Stopped:this.mailbox.enqueue({type:l})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let e of this.observers)try{e.complete?.()}catch(e){h(e)}this.observers.clear(),this.eventListeners.clear()}_reportError(e){if(!this.observers.size){this._parent||h(e),this.eventListeners.clear();return}let t=!1;for(let n of this.observers){let r=n.error;t||=!r;try{r?.(e)}catch(e){h(e)}}this.observers.clear(),this.eventListeners.clear(),t&&h(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,c(this.id,e))}_stopProcedure(){return this._processingStatus!==M.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new r(this._process.bind(this)),this._processingStatus=M.Stopped,this.system._unregister(this)),this}_send(e){this._processingStatus!==M.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){let{devTools:e}=this.options;e&&("function"==typeof e?e:e=>{if("undefined"==typeof window)return;let t=function(){let e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void 0;if(e.__xstate__)return e.__xstate__}();t&&t.register(e)})(this)}toJSON(){return{xstate$$type:C,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[p](){return this}getSnapshot(){return this._snapshot}}function R(e,...[t]){return new I(e,t)}function O(e,t,n,r,{sendId:i}){return[t,{sendId:"function"==typeof i?i(n,r):i},void 0]}function $(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function D(e){function t(e,t){}return t.type="xstate.cancel",t.sendId=e,t.resolve=O,t.execute=$,t}function L(e,t,n,r,{id:i,systemId:o,src:s,input:a,syncSnapshot:l}){let u,c,d="string"==typeof s?E(t.machine,s):s,h="function"==typeof i?i(n):i;return d&&(c="function"==typeof a?a({context:t.context,event:n.event,self:e.self}):a,u=R(d,{id:h,src:s,parent:e.self,syncSnapshot:l,systemId:o,input:c})),[eI(t,{children:{...t.children,[h]:u}}),{id:i,systemId:o,actorRef:u,src:s,input:c},void 0]}function V(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==M.Stopped&&t.start()})}function N(...[e,{id:t,systemId:n,input:r,syncSnapshot:i=!1}={}]){function o(e,t){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=i,o.resolve=L,o.execute=V,o}function z(e,t,n,r,{actorRef:i}){let o="function"==typeof i?i(n,r):i,s="string"==typeof o?t.children[o]:o,a=t.children;return s&&(a={...a},delete a[s.id]),[eI(t,{children:a}),s,void 0]}function B(e,t){if(t){if(!function e(t,n){let r=n.getSnapshot();if(r&&"children"in r)for(let n of Object.values(r.children))e(t,n);t.system._unregister(n)}(e,t),t._processingStatus!==M.Running)return void e.stopChild(t);e.defer(()=>{e.stopChild(t)})}}function F(e){function t(e,t){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=z,t.execute=B,t}function U(e,{context:t,event:n},{guards:r}){return r.every(r=>H(r,t,n,e))}function H(e,t,n,r){let{machine:i}=r,o="function"==typeof e,s=o?e:i.implementations.guards["string"==typeof e?e:e.type];if(!o&&!s)throw Error(`Guard '${"string"==typeof e?e:e.type}' is not implemented.'.`);if("function"!=typeof s)return H(s,t,n,r);let a={context:t,event:n},l=o||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:t,event:n}):e.params:void 0;return"check"in s?s.check(r,a,s):s(a,l)}function W(e){return"atomic"===e.type||"final"===e.type}function q(e){return Object.values(e.states).filter(e=>"history"!==e.type)}function G(e,t){let n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function Y(e){let t=new Set(e),n=X(t);for(let e of t)if("compound"!==e.type||n.get(e)&&n.get(e).length){if("parallel"===e.type){for(let n of q(e))if("history"!==n.type&&!t.has(n))for(let e of ea(n))t.add(e)}}
218else ea(e).forEach(e=>t.add(e));for(let e of t){let n=e.parent;for(;n;)t.add(n),n=n.parent}return t}function X(e){let t=new Map;for(let n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function K(e,t){return function e(t,n){let r=n.get(t);if(!r)return{};if("compound"===t.type){let e=r[0];if(!e)return{};if(W(e))return e.key}let i={};for(let t of r)i[t.key]=e(t,n);return i}(e,X(Y(t)))}function Z(e,t){return"compound"===t.type?q(t).some(t=>"final"===t.type&&e.has(t)):"parallel"===t.type?q(t).every(t=>Z(e,t)):"final"===t.type}let J=e=>"#"===e[0];function Q(e,t){let n=e.transitions.get(t),r=[...e.transitions.keys()].filter(e=>e!==t&&_(t,e)).sort((e,t)=>t.length-e.length).flatMap(t=>e.transitions.get(t));return n?[...n,...r]:r}function ee(e){let t=e.config.after;return t?Object.keys(t).flatMap(n=>{let r=t[n],i=Number.isNaN(+n)?n:+n,o=(t=>{var n;let r=(n=e.id,{type:`xstate.after.${t}.${n}`}),i=r.type;return e.entry.push(eD(r,{id:i,delay:t})),e.exit.push(D(i)),i})(i);return y("string"==typeof r?{target:r}:r).map(e=>({...e,event:o,delay:i}))}).map(t=>{let{delay:n}=t;return{...et(e,t.event,t),delay:n}}):[]}function et(e,t,n){let r=w(n.target),o=n.reenter??!1,s=function(e,t){if(void 0!==t)return t.map(t=>{if("string"!=typeof t)return t;if(J(t))return e.machine.getStateNodeById(t);let n=t[0]===i;if(n&&!e.parent)return ec(e,t.slice(1));let r=n?e.key+t:t;if(e.parent)try{return ec(e.parent,r)}catch(t){throw Error(`Invalid transition definition for state node '${e.id}': 219${t.message}`)}throw Error(`Invalid target: "${t}" is not a valid target from the root node. Did you mean ".${t}"?`)})}(e,r),a={...n,actions:y(n.actions),guard:n.guard,target:s,source:e,reenter
219:o,eventType:t,toJSON:()=>({...a,source:`#${e.id}`,target:s?s.map(e=>`#${e.id}`):void 0})};return a}function en(e){let t=new Map;if(e.config.on)for(let n of Object.keys(e.config.on)){if(n===o)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=e.config.on[n];t.set(n,x(r).map(t=>et(e,n,t)))}if(e.config.onDone){let n=`xstate.done.state.${e.id}`;t.set(n,x(e.config.onDone).map(t=>et(e,n,t)))}for(let n of e.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;t.set(r,x(n.onDone).map(t=>et(e,r,t)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;t.set(r,x(n.onError).map(t=>et(e,r,t)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;t.set(r,x(n.onSnapshot).map(t=>et(e,r,t)))}}for(let n of e.after){let e=t.get(n.eventType);e||(e=[],t.set(n.eventType,e)),e.push(n)}return t}function er(e){let t=[],n=r=>{Object.values(r).forEach(r=>{if(r.config.route&&r.config.id){let n=r.config.id,i=r.config.route.guard,o=({event:e})=>e.to===`#${n}`,s={...r.config.route,guard:i?function(e){function t(e,t){return!1}return t.check=U,t.guards=e,t}([o,i]):o,target:`#${n}`};t.push(et(e,"xstate.route",s))}r.states&&n(r.states)})};n(e.states),t.length>0&&e.transitions.set("xstate.route",t)}function ei(e,t){let n="string"==typeof t?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw Error(`Initial state node "${t}" not found on parent state node #${e.id}`);let r={source:e,actions:t&&"string"!=typeof t?y(t.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function eo(e){let t=w(e.config.target);return t?{target:t.map(t=>"string"==typeof t?ec(e.parent,t):t)}:"parallel"===e.parent.type?{target:[e.parent]}:e.parent.initial}function es(e){return"history"===e.type}function ea(e){let t=el(e);for(let n of t)for(let r of G(n,e))t.add(r);return t}function el(e){let t=new Set;return!function e(n){if(!t.has(n)){if(t.add(n),"compound"===n.type)e(n.initial.target[0]);else if("parallel"===n.type)for(let t of q(n))e(t)}}(e),t}function eu(e,t){if(J(t))return e.machine.getStateNodeById(t);if(!e.states)throw Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);let n=e.states[t];if(!n)throw Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function ec(e,t){if("string"==typeof t&&J(t))try{return e.machine.getStateNodeById(t)}catch{}let n=f(t).slice(),r=e;for(;n.length;){let e=n.shift();if(!e.length)break;r=eu(r,e)}return r}function ed(e,t){if("string"==typeof t){let n=e.states[t];if(!n)throw Error(`State '${t}' does not exist on '${e.id}'`);return[e,n]}let n=Object.keys(t),r=n.map(t=>eu(e,t)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((n,r)=>{let i=eu(e,r);if(!i)return n;let o=ed(i,t[r]);return n.concat(o)},[]))}function eh(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function ep(e,t,n){let r=new Set;for(let i of e){let e=!1,o=new Set;for(let s of r)if(function(e,t){let n=new Set(e),r=new Set(t);for(let e of n)if(r.has(e))return!0;for(let e of r)if(n.has(e))return!0;return!1}(em([i],t,n),em([s],t,n)))if(eh(i.source,s.source))o.add(s);else{e=!0;break}if(!e){for(let e of o)r.delete(e);r.add(i)}}return Array.from(r)}function ef(e,t){if(!e.target)return[];let n=new Set;for(let r of e.target)if(es(r))if(t[r.id])for(let e of t[r.id])n.add(e);else for(let e of ef(eo(r),t))n.add(e);else n.add(r);return[...n]}function eg(e,t){let n=ef(e,t);if(!n)return;if(!e.reenter&&n.every(t=>t===e.source||eh(t,e.source)))return e.source;let r=function(e){let[t,...n]=e;for(let e of G(t,void 0))if(n.every(t=>eh(t,e)))return e}(n.concat(e.source));return r||(e.reenter?void 0:e.source.machine.root)}function em(e,t,n){let r=new Set;for(let i of e)if(i.target?.length){let e=eg(i,n);for(let n of(i.reenter&&i.source===e&&r.add(e),t))eh(n,e)&&r.add(n)}return[...r]}function ey(e,t,n,r,i){return ev([{target:[...el(e)],source:e,reenter
219:!0,actions:[],eventType:null,toJSON:null}],t,n,r,!0,i)}function ev(e,t,n,r,i,o){let s=[];if(!e.length)return[t,s];let a=n.actionExecutor;n.actionExecutor=e=>{s.push(e),a(e)};try{let a=new Set(t._nodes),l=t.historyValue,c=ep(e,a,l),d=t;i||([d,l]=function(e,t,n,r,i,o,s,a){let l,u=e,c=em(r,i,o);for(let e of(c.sort((e,t)=>t.order-e.order),c))for(let t of function(e){return Object.keys(e.states).map(t=>e.states[t]).filter(e=>"history"===e.type)}(e)){let n;n="deep"===t.history?t=>W(t)&&eh(t,e):t=>t.parent===e,(l??={...o})[t.id]=Array.from(i).filter(n)}for(let e of c)u=ew(u,t,n,[...e.exit,...e.invoke.map(e=>F(e.id))],s,void 0),i.delete(e);return[u,l||o]}(d,r,n,c,a,l,o,n.actionExecutor)),d=ew(d,r,n,c.flatMap(e=>e.actions),o,void 0),d=function(e,t,n,r,i,o,s,a){let l=e,c=new Set,d=new Set;(function(e,t,n,r){for(let i of e){let e=eg(i,t);for(let o of i.target||[])!es(o)&&(i.source!==o||i.source!==e||i.reenter)&&(r.add(o),n.add(o)),eb(o,t,n,r);for(let o of ef(i,t)){let s=G(o,e);e?.type==="parallel"&&s.push(e),ex(r,t,n,s,!i.source.parent&&i.reenter?void 0:e)}}})(r,s,d,c),a&&d.add(e.machine.root);let h=new Set;for(let e of[...c].sort((e,t)=>e.order-t.order)){i.add(e);let r=[];for(let t of(r.push(...e.entry),e.invoke))r.push(N(t.src,{...t,syncSnapshot:!!t.onSnapshot}));if(d.has(e)){let t=e.initial.actions;r.push(...t)}if(l=ew(l,t,n,r,o,e.invoke.map(e=>e.id)),"final"===e.type){let r=e.parent,s=r?.type==="parallel"?r:r?.parent,a=s||e;for(r?.type==="compound"&&o.push(u(r.id,void 0!==e.output?v(e.output,l.context,t,n.self):void 0));s?.type==="parallel"&&!h.has(s)&&Z(i,s);)h.add(s),o.push(u(s.id)),a=s,s=s.parent;if(s)continue;l=eI(l,{status:"done",output:function(e,t,n,r,i){if(void 0===r.output)return;let o=u(i.id,void 0!==i.output&&i.parent?v(i.output,e.context,t,n.self):void 0);return v(r.output,e.context,o,n.self)}(l,t,n,l.machine.root,a)})}}return l}(d,r,n,c,a,o,l,i);let h=[...a];"done"===d.status&&(d=ew(d,r,n,h.sort((e,t)=>t.order-e.order).flatMap(e=>e.exit),o,void 0));try{if(l===t.historyValue&&function(e,t){if(e.length!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(t._nodes,a))return[d,s];return[eI(d,{_nodes:h,historyValue:l}),s]}catch(e){throw e}}finally{n.actionExecutor=a}}function eb(e,t,n,r){var i,o,s,a;if(es(e))if(t[e.id]){let s=t[e.id];for(let e of s)r.add(e),eb(e,t,n,r);for(let a of s){i=a,o=e.parent,ex(r,t,n,G(i,o))}}else{let i=eo(e);for(let o of i.target)r.add(o),i===e.parent?.initial&&n.add(e.parent),eb(o,t,n,r);for(let o of i.target){s=o,a=e.parent,ex(r,t,n,G(s,a))}}else if("compound"===e.type){let[i]=e.initial.target;es(i)||(r.add(i),n.add(i)),eb(i,t,n,r),ex(r,t,n,G(i,e))}else if("parallel"===e.type)for(let i of q(e).filter(e=>!es(e)))[...r].some(e=>eh(e,i))||(es(i)||(r.add(i),n.add(i)),eb(i,t,n,r))}function ex(e,t,n,r,i){for(let o of r)if((!i||eh(o,i))&&e.add(o),"parallel"===o.type)for(let r of q(o).filter(e=>!es(e)))[...e].some(e=>eh(e,r))||(e.add(r),eb(r,t,n,e))}function ew(e,t,n,r,i,o){let s=o?[]:void 0,a=function e(t,n,r,i,o,s){let{machine:a}=t,l=t;for(let t of i){var u;let i="function"==typeof t,c=i?t:(u="string"==typeof t?t:t.type,a.implementations.actions[u]),d={context:l.context,event:n,self:r.self,system:r.system},h=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:l.context,event:n}):t.params:void 0;if(!c||!("resolve"in c)){r.actionExecutor({type:"string"==typeof t?t:"object"==typeof t?t.type:t.name||"(anonymous)",info:d,params:h,exec:c}
219);continue}let[p,f,g]=c.resolve(r,l,d,h,c,o);l=p,"retryResolve"in c&&s?.push([c,f]),"execute"in c&&r.actionExecutor({type:c.type,info:d,params:f,exec:c.execute.bind(null,r,f)}),g&&(l=e(l,n,r,g,o,s))}return l}(e,t,n,r,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([e,t])=>{e.retryResolve(n,a,t)}),a}function eS(e,t,n,r){let i=e,o=[];function a(e,t,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:t,snapshot:e[0],_transitions:r}),o.push(e)}if(t.type===l)return a([i=eI(ek(i,t,n),{status:"stopped"}),[]],t,[]),{snapshot:i,microsteps:o};let u=t;if(u.type!==s){let t=u,s=t.type.startsWith("xstate.error.actor"),l=eE(t,i);if(s&&!l.length)return a([i=eI(e,{status:"error",error:t.error}),[]],t,[]),{snapshot:i,microsteps:o};let c=ev(l,e,n,u,!1,r);i=c[0],a(c,t,l)}let c=!0,d=e.machine.options?.maxIterations??1/0,h=0;for(;"active"===i.status;){if(++h>d)throw Error(`Infinite loop detected: the machine has processed more than ${d} microsteps without reaching a stable state. This usually happens when there's a cycle of transitions (e.g., eventless transitions or raised events causing state A -> B -> C -> A).`);let e=c?function(e,t){let n=new Set;for(let r of e._nodes.filter(W))t:for(let i of[r].concat(G(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||H(r.guard,e.context,t,e)){n.add(r);break t}}return ep(Array.from(n),new Set(e._nodes),e.historyValue)}(i,u):[],t=e.length?i:void 0;if(!e.length){if(!r.length)break;e=eE(u=r.shift(),i)}let o=ev(e,i,n,u,!1,r);c=(i=o[0])!==t,a(o,u,e)}return"active"!==i.status&&ek(i,u,n),{snapshot:i,microsteps:o}}function ek(e,t,n){return ew(e,t,n,Object.values(e.children).map(e=>F(e)),[],void 0)}function eE(e,t){return t.machine.getTransitionData(t,e)}function e_(e,t){let n=Y(ed(e,t));return K(e,[...n])}let eT=function(e){return function e(t,n){let r=g(t),i=g(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(t=>t in i&&e(r[t],i[t]))}(e,this.value)},ej=function(e){return this.tags.has(e)},eA=function(e){let t=this.machine.getTransitionData(this,e);return!!t?.length&&t.some(e=>void 0!==e.target||e.actions.length)},eC=function(){let{_nodes:e,tags:t,machine:n,getMeta:r,toJSON:i,can:o,hasTag:s,matches:a,...l}=this;return{...l,tags:Array.from(t)}},eM=function(){return this._nodes.reduce((e,t)=>(void 0!==t.meta&&(e[t.id]=t.meta),e),{})};function eP(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:K(t.root,e._nodes),tags:new Set(e._nodes.flatMap(e=>e.tags)),children:e.children,historyValue:e.historyValue||{},matches:eT,hasTag:ej,can:eA,getMeta:eM,toJSON:eC}}function eI(e,t={}){return eP({...e,...t},e.machine)}function eR(e,t){let{_nodes:n,tags:r,machine:i,children:o,context:s,can:a,hasTag:l,matches:u,getMeta:c,toJSON:d,...h}=e,p={};for(let e in o){let n=o[e];p[e]={snapshot:n.getPersistedSnapshot(t),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...h,context:function e(t){let n;for(let r in t){let i=t[r];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(t)?t.slice():{...t})[r]={xstate$$type:C,id:i.id};else{let o=e(i);o!==i&&((n??=Array.isArray(t)?t.slice():{...t})[r]=o)}}return n??t}(s),children:p,historyValue:function(e){if("object"!=typeof e||null===e)return{};let t={};for(let n in e){let r=e[n];Array.isArray(r)&&(t[n]=r.map(e=>({id:e.id})))}return t}(h.historyValue)}}function eO(e,t,n,r,{event:i,id:o,delay:s},{internalQueue:a}){let l,u=t.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let c="function"==typeof i?i(n,r):i;if("string"==typeof s){let e=u&&u[s];l="function"==typeof e?e(n,r):e}else l="function"==typeof s?s(n,r):s;return"number"!=typeof l&&a.push(c),[t,{event:c,id:o,delay:l},void 0]}function e$(e,t){let{event:n,delay:r,id:i}=t;if("number"==typeof r)return void e.defer(()=>{let t=e.self;e.system.scheduler.schedule(t,t,n,r,i)})}function eD(e,t){function n(e,t){}return n.type="xstate.raise",n.event=e,n.id=t?.id,n.delay=t?.delay,n.resolve=eO,n.execute=e$,n}}
219,18102:(e,t,n)=>{"use strict";var r=n(12020).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return r.H.useMemoCache(e)}},18554:(e,t,n)=>{var r=n(84908);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},18613:(e,t,n)=>{"use strict";n.d(t,{po:()=>o,tn:()=>a,yT:()=>s});var r=n(76784),i=n(82331);let o=e=>1-Math.sin(Math.acos(e)),s=(0,i.G)(o),a=(0,r.V)(o)},18834:(e,t,n)=>{var r=n(92666),i=n(93053),o=n(62176);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},18922:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},19356:e=>{e.exports=function(e){return this.__data__.has(e)}},20010:(e,t,n)=>{var r=n(33166),i=n(29773),o=n(35414);e.exports=function(e,t,n,s,a,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var y=e[f],v=t[f];if(s)var b=u?s(v,y,f,t,e,l):s(y,v,f,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!i(t,function(e,t){if(!o(m,t)&&(y===e||a(y,e,n,s,l)))return m.push(t)})){g=!1;break}}else if(!(y===v||a(y,v,n,s,l))){g=!1;break}}return l.delete(e),l.delete(t),g}},21078:(e,t,n)=>{var r=n(50948),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},24197:e=>{e.exports=function(e){return e}},24314:(e,t,n)=>{var r=n(70659);e.exports=function(e){return function(t){return r(t,e)}}},25467:(e,t,n)=>{"use strict";n.d(t,{H6:()=>f,OX:()=>l,SP:()=>o,Sx:()=>h});var r=n(17643);let i=new WeakMap;function o(e){return{config:e,start:(t,n)=>{let{self:r,system:o,emit:s}=n,a={receivers:void 0,dispose:void 0};i.set(r,a),a.dispose=e({input:t.input,system:o,self:r,sendBack:e=>{"stopped"!==r.getSnapshot().status&&r._parent&&o._relay(r,r._parent,e)},receive:e=>{a.receivers??=new Set,a.receivers.add(e)},emit:s})},transition:(e,t,n)=>{let o=i.get(n.self);return t.type===r.X?(e={...e,status:"stopped",error:void 0},i.delete(n.self),o.receivers?.clear(),o.dispose?.()):o.receivers?.forEach(e=>e(t)),e},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let s="xstate.observable.error",a="xstate.observable.complete";function l(e){return{config:e,transition:(e,t)=>{if("active"!==e.status)return e;switch(t.type){case s:return{...e,status:"error",error:t.data,input:void 0,_subscription:void 0};case a:return{...e,status:"done",input:void 0,_subscription:void 0};case r.X:return e._subscription.unsubscribe(),{...e,status:"stopped",input:void 0,_subscription:void 0};default:return e}},getInitialSnapshot:(e,t)=>({status:"active",output:void 0,error:void 0,context:void 0,input:t,_subscription:void 0}),start:(t,{self:n,system:r,emit:i})=>{"done"!==t.status&&(t._subscription=e({input:t.input,system:r,self:n,emit:i}).subscribe({next:e=>{n._parent&&r._relay(n,n._parent,e)},error:e=>{r._relay(n,n,{type:s,data:e})},complete:()=>{r._relay(n,n,{type:a})}}))},getPersistedSnapshot:({_subscription:e,...t})=>t,restoreSnapshot:e=>({...e,_subscription:void 0})}}let u="xstate.promise.resolve",c="xstate.promise.reject",d=new WeakMap;function h(e){return{config:e,transition:(e,t,n)=>{if("active"!==e.status)return e;switch(t.type){case u:{let n=t.data;return{...e,status:"done",output:n,input:void 0}}case c:return{...e,status:"error",error:t.data,input:void 0};case r.X:return d.get(n.self)?.abort(),d.delete(n.self),{...e,status:"stopped",input:void 0};default:return e}},start:(t,{self:n,system:r,emit:i})=>{if("active"!==t.status)return;let o=new AbortController;d.set(n,o),Promise.resolve(e({input:t.input,system:r,self:n,signal:o.signal,emit:i})).then(e=>{"active"===n.getSnapshot().status&&(d.delete(n),r._relay(n,n,{type:u,data:e}))},e=>{"active"===n.getSnapshot().status&&(d.delete(n),r._relay(n,n,{type:c,data:e}))})},getInitialSnapshot:(e,t)=>
219({status:"active",output:void 0,error:void 0,input:t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}let p=function(e,t){return{config:e,transition:(t,n,r)=>({...t,context:e(t.context,n,r)}),getInitialSnapshot:(e,n)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof t?t({input:n}):t}),getPersistedSnapshot:e=>e,restoreSnapshot:e=>e}}(e=>void 0,void 0);function f(){return(0,r.c)(p)}},25858:(e,t,n)=>{var r=n(88123),i=n(41925),o=n(64806),s=n(89730),a=n(18554);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},25865:(e,t,n)=>{e.exports=n(88499)(n(38416),"Promise")},26318:(e,t,n)=>{var r=n(52559);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},26516:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},26653:(e,t,n)=>{e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},28031:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},29773:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},30179:(e,t,n)=>{var r=n(65567),i=n(73915);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},30681:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},31019:(e,t,n)=>{var r=n(26318);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},31997:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},32440:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(12020);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},33166:(e,t,n)=>{var r=n(68928),i=n(30681),o=n(36473);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},33210:(e,t,n)=>{"use strict";n.d(t,{a6:()=>i,am:()=>s,vT:()=>
219o});var r=n(60042);let i=(0,r.A)(.42,0,1,1),o=(0,r.A)(0,0,.58,1),s=(0,r.A)(.42,0,.58,1)},33289:(e,t,n)=>{"use strict";n.d(t,{tb:()=>W});var r,i,o=[],s="ResizeObserver loop completed with undelivered notifications.",a=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:s}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=s),window.dispatchEvent(e)};!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(r||(r={}));var l=function(e){return Object.freeze(e)},u=function(e,t){this.inlineSize=e,this.blockSize=t,l(this)},c=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,l(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),d=function(e){return e instanceof SVGElement&&"getBBox"in e},h=function(e){if(d(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},p=function(e){if(e instanceof Element)return!0;var t,n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},f=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},g="undefined"!=typeof window?window:{},m=new WeakMap,y=/auto|scroll/,v=/^tb|vertical/,b=/msie|trident/i.test(g.navigator&&g.navigator.userAgent),x=function(e){return parseFloat(e||"0")},w=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new u((n?t:e)||0,(n?e:t)||0)},S=l({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new c(0,0,0,0)}),k=function(e,t){if(void 0===t&&(t=!1),m.has(e)&&!t)return m.get(e);if(h(e))return m.set(e,S),S;var n=getComputedStyle(e),r=d(e)&&e.ownerSVGElement&&e.getBBox(),i=!b&&"border-box"===n.boxSizing,o=v.test(n.writingMode||""),s=!r&&y.test(n.overflowY||""),a=!r&&y.test(n.overflowX||""),u=r?0:x(n.paddingTop),p=r?0:x(n.paddingRight),f=r?0:x(n.paddingBottom),g=r?0:x(n.paddingLeft),k=r?0:x(n.borderTopWidth),E=r?0:x(n.borderRightWidth),_=r?0:x(n.borderBottomWidth),T=r?0:x(n.borderLeftWidth),j=g+p,A=u+f,C=T+E,M=k+_,P=a?e.offsetHeight-M-e.clientHeight:0,I=s?e.offsetWidth-C-e.clientWidth:0,R=r?r.width:x(n.width)-(i?j+C:0)-I,O=r?r.height:x(n.height)-(i?A+M:0)-P,$=R+j+I+C,D=O+A+P+M,L=l({devicePixelContentBoxSize:w(Math.round(R*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:w($,D,o),contentBoxSize:w(R,O,o),contentRect:new c(g,u,R,O)});return m.set(e,L),L},E=function(e,t,n){var i=k(e,n),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return a;case r.BORDER_BOX:return o;default:return s}},_=function(e){var t=k(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=l([t.borderBoxSize]),this.contentBoxSize=l([t.contentBoxSize]),this.devicePixelContentBoxSize=l([t.devicePixelContentBoxSize])},T=function(e){if(h(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},j=function(){var e=1/0,t=[];o.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new _(t.target),i=T(t.target);r.push(n),t.lastReportedSize=E(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},A=function(e){o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(T(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},C=function(){var e=0;for(A(0);o.some(function(e){return e.activeTargets.length>0});)A(e=j());return o.some(function(e){return e.skippedTargets.length>0})&&a(),e>0},M=[],P=function(e){if(!i){var t=0,n=document.createTextNode("");
219new MutationObserver(function(){return M.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),i=function(){n.textContent="".concat(t?t--:t++)}}M.push(e),i()},I=function(e){P(function(){requestAnimationFrame(e)})},R=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},$=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],D=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,V=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=D(e);I(function(){var r=!1;try{r=C()}finally{if(L=!1,e=n-D(),!R)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,O)};document.body?t():g.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$.forEach(function(t){return g.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),$.forEach(function(t){return g.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),N=function(e){!R&&e>0&&V.start(),(R+=e)||V.stop()},z=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=E(this.target,this.observedBox,!0);return d(e=this.target)||f(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),B=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},F=new WeakMap,U=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},H=function(){function e(){}return e.connect=function(e,t){var n=new B(e,t);F.set(e,n)},e.observe=function(e,t,n){var r=F.get(e),i=0===r.observationTargets.length;0>U(r.observationTargets,t)&&(i&&o.push(r),r.observationTargets.push(new z(t,n&&n.box)),N(1),V.schedule())},e.unobserve=function(e,t){var n=F.get(e),r=U(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&o.splice(o.indexOf(n),1),n.observationTargets.splice(r,1),N(-1))},e.disconnect=function(e){var t=this,n=F.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),W=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");H.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");H.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");H.unobserve(this,e)},e.prototype.disconnect=function(){H.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},34261:(e,t,n)=>{"use strict";n.d(t,{N:()=>o});var r=n(12020),i=n(38776);let o=(0,r.forwardRef)(function(e,t){return(0,i.jsx)("svg",{"data-sanity-icon":"spinner",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,i.jsx)("path",{d:"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9
219183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})},35156:e=>{e.exports=function(){return[]}},35414:e=>{e.exports=function(e,t){return e.has(t)}},35545:(e,t,n)=>{var r=n(50948),i=n(61273),o=n(49476),s=n(73231),a=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-a?"-0":n}},36433:(e,t,n)=>{var r=n(70659);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},36473:e=>{e.exports=function(e){return this.__data__.has(e)}},38400:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},38416:(e,t,n)=>{var r=n(26653),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},39399:(e,t,n)=>{var r=n(50948),i=n(49161),o=n(54461),s=n(20010),a=n(38400),l=n(18922),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)break;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=s(p(e),p(t),r,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},39742:(e,t,n)=>{var r=n(65567),i=n(88837),o=n(66048),s=n(26516),a=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},39792:(e,t,n)=>{var r=n(59508);e.exports=n(78876)(r)},40211:(e,t,n)=>{var r=n(94012),i=n(45169),o=n(49476),s=n(80892),a=n(73915),l=n(69960);e.exports=function(e,t,n){t=r(t,e);for(var u=-1,c=t.length,d=!1;++u<c;){var h=l(t[u]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(h,c)&&(o(e)||i(e))}},40416:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});let r=e=>Array.isArray(e)&&"number"==typeof e[0]},40785:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,b:()=>p,e:()=>g,l:()=>v,s:()=>h});var r=n(17643),i=n(61267);function o(e,t,n,r,{event:i}){return[t,{event:"function"==typeof i?i(n,r):i},void 0]}function s(e,{event:t}){e.defer(()=>e.emit(t))}function a(e){function t(e,t){}return t.type="xstate.emit",t.event=e,t.resolve=o,t.execute=s,t}let l=function(e){return e.Parent="#_parent",e.Internal="#_internal",e}({});function u(e,t,n,r,{to:i,event:o,id:s,delay:a},u){let c,d,h=t.machine.implementations.delays;if("string"==typeof o)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);let p="function"==typeof o?o(n,r):o;if("string"==typeof a){let e=h&&h[a];c="function"==typeof e?e(n,r):e}else c="function"==typeof a?a(n,r):a;let f="function"==typeof i?i(n,r):i;if("string"==typeof f){if(!(d=f===l.Parent?e.self._parent:f===l.Internal?e.self:f.startsWith("#_")?t.children[f.slice(2)]:u.deferredActorIds?.includes(f)?f:t.children[f]))throw Error(`Unable to send event to actor '${f}' from machine '${t.machine.id}'.`)}else d=f||e.self;return[t,{to:d,targetId:"string"==typeof f?f:void 0,event:p,id:s,delay:c},void 0]}function c(e,t,n){"string"==typeof n.to&&(n.to=t.children[n.to])}function d(e,t){e.defer(()=>{let{to:n,event:i,delay:o,id:s}=t;if("number"==typeof o)return void e.system.scheduler.schedule(e.self,n,i,o,s);e.system._relay(e.self,n,i.type===r.Z?(0,r._)(e.self.id,i.data):i)})}function h(e,t,n){function r(e,t){}return r.type="xstate.sendTo",r.to=e,r.event=t,r.id=n?.id,r.delay=n?.delay,r.resolve=u,r.retryResolve=c,r.execute=d,r}function p(e,t){return h(l.Parent,e,t)}function f(e,t,n,o,{collect:s}){let l=[],u=function(e){l.push(e)};return u.assign=(...e)=>{l.push((0,i.a)(...e))},u.cancel=(...e)=>{l.push((0,r.b)(...e))},u.raise=(...e)=>{l.push((0,r.r)(...e))},u.sendTo=(...e)=>{l.push(h(...e))},u.sendParent=(...e)=>{l.push(p(...e))},u.spawnChild=(...e)=>{l.push((0,r.d)(...e))},u.stopChild=(...e)=>{l.push((0,r.s)(...e))},u.emit=(...e)=>{l.push(a(...e))},s({context:n.context,event:n.event,enqueue:u,check:e=>(0,r.E)(e,t.context,n.event,t),self:e.self,system:e.system},o),[t,void 0,l]}function g(e){function t(e,t){}return t.type="xstate.enqueueActions",t.collect=e,t.resolve=f,t}function m(e,t,n,r,{value:i,label:o}){return[t,{value:"function"==typeof i?i(n,r):i,label:o},void 0]}function y({logger:e},{value:t,label:n}){n?e(n,t):e(t)}function v(e=({context:e,event:t})=>({context:e,event:t}),t){function n(e,t){}return n.type="xstate.log",n.value=e,n.label=t,n.resolve=m,n.execute=y,n}},41001:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>o});var r=n(12020),i=n(96110);function o(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,r.useContext)(i.t);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:o,register:s}=t,a=(0,r.useId)();(0,r.useEffect)(()=>
219{if(e)return s(a)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,l]:[!0]}},41925:(e,t,n)=>{var r=n(84908),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},43307:(e,t,n)=>{var r=n(35545);e.exports=function(e){return null==e?"":r(e)}},43827:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(12020);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},45169:(e,t,n)=>{var r=n(81427),i=n(95583),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},45320:(e,t,n)=>{var r=n(69485),i=n(73915),o=n(95583),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},49061:(e,t,n)=>{var r=n(53584),i=n(25858),o=n(73522);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},49161:(e,t,n)=>{e.exports=n(38416).Uint8Array},49390:(e,t,n)=>{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{_:()=>r})},49397:(e,t,n)=>{"use strict";n.d(t,{$:()=>r,V:()=>i}),n(40074);let r=()=>{},i=()=>{}},49476:e=>{e.exports=Array.isArray},50948:(e,t,n)=>{e.exports=n(38416).Symbol},51906:e=>{e.exports=function(){return!1}},52559:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},52609:(e,t,n)=>{var r=n(95236),i=n(20010),o=n(39399),s=n(12932),a=n(82344),l=n(49476),u=n(6253),c=n(85410),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var v=l(e),b=l(t),x=v?h:a(e),w=b?h:a(t);x=x==d?p:x,w=w==d?p:w;var S=x==p,k=w==p,E=x==w;if(E&&u(e)){if(!u(t))return!1;v=!0,S=!1}if(E&&!S)return y||(y=new r),v||c(e)?i(e,t,n,g,m,y):o(e,t,x,n,g,m,y);if(!(1&n)){var _=S&&f.call(e,"__wrapped__"),T=k&&f.call(t,"__wrapped__");
219if(_||T){var j=_?e.value():e,A=T?t.value():t;return y||(y=new r),m(j,A,n,g,y)}}return!!E&&(y||(y=new r),s(e,t,n,g,m,y))}},53308:(e,t,n)=>{e.exports=n(38416)["__core-js_shared__"]},53584:(e,t,n)=>{var r=n(96501),i=n(9723),o=n(78980),s=n(58096),a=n(68200);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},53585:(e,t,n)=>{"use strict";n.d(t,{Sz:()=>s,ZZ:()=>l,dg:()=>a});var r=n(60042),i=n(76784),o=n(82331);let s=(0,r.A)(.33,1.53,.69,.99),a=(0,o.G)(s),l=(0,i.V)(a)},53839:(e,t,n)=>{var r=n(98451),i=n(36433),o=n(89354),s=n(82255),a=n(85769),l=n(62176),u=n(69960);e.exports=function(e,t){return s(e)&&a(t)?l(u(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,3)}}},54141:(e,t,n)=>{var r=n(68928);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},54461:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},54497:(e,t,n)=>{e.exports=n(88499)(n(38416),"DataView")},54944:(e,t,n)=>{var r=n(26318);e.exports=function(e){return r(this,e).has(e)}},56424:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},58096:(e,t,n)=>{var r=n(2359),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},58460:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var r=n(12020),i=n(38776);let o=(0,r.forwardRef)(function(e,t){return(0,i.jsx)("svg",{"data-sanity-icon":"close",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,i.jsx)("path",{d:"M18 7L7 18M7 7L18 18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})},58996:(e,t,n)=>{"use strict";n.r(t),n.d(t,{renderVisualEditing:()=>c});var r=n(38776),i=n(12020),o=n(66060),s=n(1876);let a=null,l=null,u=null;function c(e,{components:t,history:n,refresh:c,zIndex:d,plugins:h,onPerspectiveChange:p}){u&&clearTimeout(u),e.addEventListener("abort",()=>{u=setTimeout(()=>{l&&(l.unmount(),l=null),a&&(a.parentNode.removeChild(a),a=null)},1e3)}),a||(a=document.createElement("sanity-visual-editing"),document.body.parentNode.insertBefore(a,document.body.nextSibling)),l||(l=(0,o.createRoot)(a)),l.render((0,r.jsx)(i.StrictMode,{children:(0,r.jsx)(s.FV,{components:t,plugins:h,history:n,refresh:c,zIndex:d,onPerspectiveChange:p,portal:!1})}))}},59508:(e,t,n)=>{var r=n(10940),i=n(98515);e.exports=function(e,t){return e&&r(e,t,i)}},59573:(e,t,n)=>{var r=n(54141);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},60042:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(97096);let i=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function o(e,t,n,o){return e===t&&n===o?r.l:r=>0===r||1===r?r:i(function(e,t,n,r,o){let s,a,l=0;do(s=i(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a;while(Math.abs(s)>1e-7&&++l<12);return a}(r,0,1,e,n),t,o)}},60239:(e,t,n)=>{"use strict";var r,i,o=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))c.call(e,i)||i===n||s(e,i,{get:()=>t[i],enumerable:!(r=a(t,i))||r.enumerable});return e},h={};((e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})})(h,{$dispatcherGuard:()=>E,$makeReadOnly:()=>T,$reset:()=>_,$structuralCheck:()=>P,c:()=>b,clearRenderCounterRegistry:()=>A,renderCounterRegistry:()=>j,useRenderCounter:()=>C}),e.exports=d(s({},"__esModule",{value:!0}),h);var p=((e,t,n)=>(n=null!=e?o(u(e)):{},d(!t&&e&&e.__esModule?n:s(n,"default",{value:e,enumerable:!0}),e)))(n(12020)),{useRef:f,useEffect:g,isValidElement:m}=p,y=null!=(r=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?r:p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),b="function"==typeof(null==(i=p.__COMPILER_RUNTIME)?void 0:i.c)?p.__COMPILER_RUNTIME.c:function(e){return p.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=v;return t[v]=!0,t},[])},x={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e
219=>{x[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var w=null;function S(e){return y.ReactCurrentDispatcher.current=e,y.ReactCurrentDispatcher.current}x.useMemoCache=e=>{if(null!=w)return w.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var k=[];function E(e){let t=y.ReactCurrentDispatcher.current;if(0===e){if(k.push(t),1===k.length&&(w=t),t===x)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");S(x)}else if(1===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===k.length&&(w=null),S(e)}else if(2===e)k.push(t),S(w);else if(3===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");S(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function _(e){for(let t=0;t<e.length;t++)e[t]=v}function T(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var j=new Map;function A(){for(let e of j.values())e.forEach(e=>{e.count=0})}function C(e){let t=f(null);null!=t.current&&(t.current.count+=1),g(()=>{if(null==t.current){let n,r={count:0};null==(n=j.get(e))&&(n=new Set,j.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=j.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var M=new Set;function P(e,t,n,r,i,o){function s(e,t,s,a){let l=`${r}:${o} [${i}] ${n}${s} changed from ${e} to ${t} at depth ${a}`;M.has(l)||(M.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)){if(t!==n)if(typeof t!=typeof n)s(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),a=Array.isArray(n);if(null===t&&null!==n)s("null",`type ${typeof n}`,r,i);else if(null===n)s(`type ${typeof t}`,"null",r,i);else if(t instanceof Map)if(n instanceof Map)if(t.size!==n.size)s(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,a]of t)n.has(o)?e(a,n.get(o),`${r}.get(${o})`,i+1):s(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i);else s("Map instance","other value",r,i);else if(n instanceof Map)s("other value","Map instance",r,i);else if(t instanceof Set)if(n instanceof Set)if(t.size!==n.size)s(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||s(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i);else s("Set instance","other value",r,i);else if(n instanceof Set)s("other value","Set instance",r,i);else if(o||a)if(o!==a)s(`type ${o?"array":"object"}`,`type ${a?"array":"object"}`,r,i);else if(t.length!==n.length)s(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1);else if(m(t)||m(n))m(t)!==m(n)?s(`type ${m(t)?"React element":"object"}`,`type ${m(n)?"React element":"object"}`,r,i):t.type!==n.type?s(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||s(`object without key ${e}`,`object with key ${e}`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):s(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&s(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&s(t,n,r,i)}}}(e,t,"",0)}},60574:(e,t,n)=>{"use strict";n.d(t,{N:()=>b});var r=n(38776),i=n(12020),o=n(88720),s=n(32440),a=n(43827),l=n(96110),u=n(67901),c=n(78783);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,u.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,u.s)(e)&&e.offsetWidth||0,r=(0,u.s)(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function p(e){var t,n;let{children:o,isPresent:s,anchorX:a,anchorY:l,root:u,pop:p}=e,f=(0,i.useId)(),g=(0,i.useRef)(null),m=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=(0,i.useContext)(c.Q),v=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d(e[t],null)}}}}(...e),e)}(g,!1!==p?null!=(n=null==(t=o.props)?void 0:t.ref)?n:null==o?void 0:o.ref:void 0);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:n,left:r,right:i,bottom:o,direction:c}=m.current;if(s||!1===p||!g.current||!e||!t)return;let d="rtl"===c;g.current.dataset.motionPopId=f;let h=document.createElement("style");y&&(h.nonce=y);let v=null!=u?u:document.head;return v.appendChild(h),h.sheet&&h.sheet.insertRule('\n [data-motion-pop-id="'.concat(f,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;
219\n ").concat("left"===a?d?"right: ".concat(i):"left: ".concat(r):d?"left: ".concat(r):"right: ".concat(i),"px !important;\n ").concat("bottom"===l?"bottom: ".concat(o):"top: ".concat(n),"px !important;\n }\n ")),()=>{var e;null==(e=g.current)||e.removeAttribute("data-motion-pop-id"),v.contains(h)&&v.removeChild(h)}},[s]),(0,r.jsx)(h,{isPresent:s,childRef:g,sizeRef:m,pop:p,children:!1===p?o:i.cloneElement(o,{ref:v})})}let f=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:u,custom:c,presenceAffectsLayout:d,mode:h,anchorX:f,anchorY:m,root:y}=e,v=(0,s.M)(g),b=(0,i.useId)(),x=(0,i.useRef)(o),w=(0,i.useRef)(u);(0,a.E)(()=>{x.current=o,w.current=u});let S=!0,k=(0,i.useMemo)(()=>(S=!1,{id:b,initial:n,isPresent:o,custom:c,onExitComplete:e=>{for(let t of(v.set(e,!0),v.values()))if(!t)return;u&&u()},register:e=>(v.set(e,!1),()=>{var t;v.delete(e),x.current||v.size||null==(t=w.current)||t.call(w)})}),[o,v,u]);return d&&S&&(k={...k}),(0,i.useMemo)(()=>{v.forEach((e,t)=>v.set(t,!1))},[o]),i.useEffect(()=>{o||v.size||!u||u()},[o]),t=(0,r.jsx)(p,{pop:"popLayout"===h,isPresent:o,anchorX:f,anchorY:m,root:y,children:t}),(0,r.jsx)(l.t.Provider,{value:k,children:t})};function g(){return new Map}var m=n(41001);let y=e=>e.key||"";function v(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}let b=e=>{let{children:t,custom:n,initial:l=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:d="sync",propagate:h=!1,anchorX:p="left",anchorY:g="top",root:b}=e,[x,w]=(0,m.xQ)(h),S=(0,i.useMemo)(()=>v(t),[t]),k=h&&!x?[]:S.map(y),E=(0,i.useRef)(!0),_=(0,i.useRef)(S),T=(0,s.M)(()=>new Map),j=(0,i.useRef)(new Set),[A,C]=(0,i.useState)(S),[M,P]=(0,i.useState)(S);(0,a.E)(()=>{!h||x||M.length||null==w||w()},[x,h,M.length,w]),(0,a.E)(()=>{E.current=!1,_.current=S;for(let e=0;e<M.length;e++){let t=y(M[e]);k.includes(t)?(T.delete(t),j.current.delete(t)):!0!==T.get(t)&&T.set(t,!1)}},[M,k.length,k.join("-")]);let I=[];if(S!==A){let e=[...S],t=0;for(let n of M){let r=k.indexOf(y(n));-1===r?(e.splice(t++,0,n),I.push(n)):t=r+I.length+1}return"wait"===d&&I.length&&(e=I),P(v(e)),C(S),null}let{forceRender:R}=(0,i.useContext)(o.L);return(0,r.jsx)(r.Fragment,{children:M.map(e=>{let t=y(e),i=(!h||!!x)&&(S===M||k.includes(t));return(0,r.jsx)(f,{isPresent:i,initial:(!E.current||!!l)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:b,onExitComplete:i?void 0:()=>{if(j.current.has(t)||!T.has(t))return;j.current.add(t),T.set(t,!0);let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(null==R||R(),P(_.current),h&&(null==w||w()),u&&u())},anchorX:p,anchorY:g,children:e},t)})})}},61267:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});var r=n(17643);function i(e,t,n,i,{assignment:o}){if(!t.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let s={},a={context:t.context,event:n.event,spawn:function(e,{machine:t,context:n},i,o){return(s,a)=>{let l=((s,a)=>
219{if("string"!=typeof s)return(0,r.c)(s,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:s,systemId:a?.systemId});{let l=(0,r.Y)(t,s);if(!l)throw Error(`Actor logic '${s}' not implemented in machine '${t.id}'`);let u=(0,r.c)(l,{id:a?.id,parent:e.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:n,event:i,self:e.self}):a?.input,src:s,systemId:a?.systemId});return o[u.id]=u,u}})(s,a);return o[l.id]=l,e.defer(()=>{l._processingStatus!==r.a0.Stopped&&l.start()}),l}}(e,t,n.event,s),self:e.self,system:e.system},l={};if("function"==typeof o)l=o(a,i);else for(let e of Object.keys(o)){let t=o[e];l[e]="function"==typeof t?t(a,i):t}let u=Object.assign({},t.context,l);return[(0,r.R)(t,{context:u,children:Object.keys(s).length?{...t.children,...s}:t.children}),void 0,void 0]}function o(e){function t(e,t){}return t.type="xstate.assign",t.assignment=e,t.resolve=i,t}},61273:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},62176:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},62453:(e,t,n)=>{"use strict";n.d(t,{Fk:()=>u,jF:()=>l,v$:()=>c});var r=n(66415);let i={"handshake/syn":r.Tx,"handshake/syn-ack":r.Rr,"handshake/ack":r.IM,"channel/response":r._K,"channel/heartbeat":r.vd,"channel/disconnect":r.FS,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},o={[r.Tx]:"handshake/syn",[r.Rr]:"handshake/syn-ack",[r.IM]:"handshake/ack",[r._K]:"channel/response",[r.vd]:"channel/heartbeat",[r.FS]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},s=e=>{let{data:t}=e;return t&&"object"==typeof t&&"domain"in t&&"type"in t&&"from"in t&&"to"in t&&("sanity/channels"===t.domain&&(t.domain=r.V2),"overlays"===t.to&&(t.to="visual-editing"),"overlays"===t.from&&(t.from="visual-editing"),t.channelId=t.connectionId,delete t.connectionId,t.type=i[t.type]??t.type),e},a=({context:e},t)=>{let{sources:n,targetOrigin:i}=e,s=(e=>{let{channelId:t,...n}=e,i={...n,connectionId:t};return i.domain===r.V2&&(i.domain="sanity/channels"),"visual-editing"===i.to&&(i.to="overlays"),"visual-editing"===i.from&&(i.from="overlays"),i.type=o[i.type]??i.type,"channel/response"===i.type&&i.responseTo&&!i.data&&(i.data={responseTo:i.responseTo}),("handshake/syn"===i.type||"handshake/syn-ack"===i.type||"handshake/ack"===i.type)&&(i.data={id:i.connectionId}),i})(t.message);n.forEach(e=>{e.postMessage(s,{targetOrigin:i})})},l=()=>({listen:(0,r.CC)(s),requestMachine:(0,r.tP)().provide({actions:{"send message":a}})});function u(){return window.self!==window.top}function c(){return!!window.opener}},63014:(e,t,n)=>{"use strict";let r,i,o;n.d(t,{PY1:()=>o_});let s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set([...s,"pathRotation"]),l=(e,t,n)=>n>t?t:n<e?e:n,u={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},c={...u,transform:e=>l(0,1,e)},d={...u,default:1},h=e=>Math.round(1e5*e)/1e5,p=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,f=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,g=(e,t)=>n=>!!("string"==typeof n&&f.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),m=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,s,a]=r.match(p);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},y={...u,transform:e=>Math.round(l(0,255,e))},v={test:g("rgb","red"),parse:m("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+y.transform(e)+", "+y.transform(t)+", "+y.transform(n)+", "+h(c.transform(r))+")"},b={test:g("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
219a:i?parseInt(i,16)/255:1}},transform:v.transform},x=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),w=x("deg"),S=x("%"),k=x("px"),E=x("vh"),_=x("vw"),T={...S,parse:e=>S.parse(e)/100,transform:e=>S.transform(100*e)},j={test:g("hsl","hue"),parse:m("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+S.transform(h(t))+", "+S.transform(h(n))+", "+h(c.transform(r))+")"},A={test:e=>v.test(e)||b.test(e)||j.test(e),parse:e=>v.test(e)?v.parse(e):j.test(e)?j.parse(e):b.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?v.transform(e):j.transform(e),getAnimatableNone:e=>{let t=A.parse(e);return t.alpha=0,A.transform(t)}},C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,M="number",P="color",I=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function R(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,s=t.replace(I,e=>(A.test(e)?(r.color.push(o),i.push(P),n.push(A.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(M),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function O({split:e,types:t}){let n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){let e=t[o];e===M?i+=h(r[o]):e===P?i+=A.transform(r[o]):i+=r[o]}return i}}let $={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(p)?.length||0)+(e.match(C)?.length||0)>0},parse:function(e){return R(e).values},createTransformer:function(e){return O(R(e))},getAnimatableNone:function(e){let t=R(e);return O(t)(t.values.map((e,n)=>{var r;let i;return r=t.split[n],"number"==typeof e?r?.trim().endsWith("/")?e:0:"number"==typeof(i=e)?0:A.test(i)?A.getAnimatableNone(i):i}))}},D=new Set(["brightness","contrast","saturate","opacity"]);function L(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(p)||[];if(!r)return e;let i=n.replace(r,""),o=+!!D.has(t);return r!==n&&(o*=100),t+"("+o+i+")"}let V=/\b([a-z-]*)\(.*?\)/gu,N={...$,getAnimatableNone:e=>{let t=e.match(V);return t?t.map(L).join(" "):e}},z={...$,getAnimatableNone:e=>{let t=$.parse(e);return $.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},B={...u,transform:Math.round},F={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,inset:k,insetBlock:k,insetBlockStart:k,insetBlockEnd:k,insetInline:k,insetInlineStart:k,insetInlineEnd:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,paddingBlock:k,paddingBlockStart:k,paddingBlockEnd:k,paddingInline:k,paddingInlineStart:k,paddingInlineEnd:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,marginBlock:k,marginBlockStart:k,marginBlockEnd:k,marginInline:k,marginInlineStart:k,marginInlineEnd:k,fontSize:k,backgroundPositionX:k,backgroundPositionY:k,rotate:w,pathRotation:w,rotateX:w,rotateY:w,rotateZ:w,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:w,skewX:w,skewY:w,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:c,originX:T,originY:T,originZ:k,zIndex:B,fillOpacity:c,strokeOpacity:c,numOctaves:B},U={...F,color:A,backgroundColor:A,outlineColor:A,fill:A,stroke:A,borderColor:A,borderTopColor:A,borderRightColor:A,borderBottomColor:A,borderLeftColor:A,filter:N,WebkitFilter:N,mask:z,WebkitMask:z},H=e=>U[e],W=()=>({translate:0,scale:1,origin:0,originPoint:0}),q=()=>({x:W(),y:W()}),G=()=>({min:0,max:0}),Y=()=>({x:G(),y:G()}),X=e=>!!(e&&e.getVelocity),K=new Set(["width","height","top","left","right","bottom",...s]),Z=e=>t=>t.test(e),J=[u,k,S,w,_,E,{test:e=>"auto"===e,parse:e=>e}],Q=e=>J.find(Z(e));var ee=n(49397);let et=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),en=e=>t=>"string"==typeof t&&t.startsWith(e),er=en("--"),ei=en("var(--"),eo=e=>!!ei(e)&&es.test(e.split("/*")[0].trim()),es=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ea(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let el=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,eu=e=>180*e/Math.PI,ec=e=>eh(eu(Math.atan2(e[1],e[0]))),ed={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ec,rotateZ:ec,skewX:e=>
219eu(Math.atan(e[1])),skewY:e=>eu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},eh=e=>((e%=360)<0&&(e+=360),e),ep=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ef=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),eg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ep,scaleY:ef,scale:e=>(ep(e)+ef(e))/2,rotateX:e=>eh(eu(Math.atan2(e[6],e[5]))),rotateY:e=>eh(eu(Math.atan2(-e[2],e[0]))),rotateZ:ec,rotate:ec,skewX:e=>eu(Math.atan(e[4])),skewY:e=>eu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function em(e){return+!!e.includes("scale")}function ey(e,t){let n,r;if(!e||"none"===e)return em(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=eg,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ed,r=t}if(!r)return em(t);let o=n[t],s=r[1].split(",").map(ev);return"function"==typeof o?o(s):s[o]}function ev(e){return parseFloat(e.trim())}let eb=e=>e===u||e===k,ex=new Set(["x","y","z"]),ew=s.filter(e=>!ex.has(e)),eS={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ey(t,"x"),y:(e,{transform:t})=>ey(t,"y")};eS.translateX=eS.x,eS.translateY=eS.y;var ek=n(97096);let eE={},e_=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eT(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=e_.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&r?t:n;return i&&o.add(e),a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,g=()=>{let o=eE.useManualTiming,s=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1)),i.timestamp=s,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),p.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))};return{schedule:e_.reduce((t,o)=>{let a=s[o];return t[o]=(t,o=!1,s=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||e(g)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<e_.length;t++)s[e_[t]].cancel(e)},state:i,steps:s}}let{schedule:ej,cancel:eA,state:eC,steps:eM}=eT("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ek.l,!0),eP=new Set,eI=!1,eR=!1,eO=!1;function e$(){if(eR){let e=Array.from(eP).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return ew.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(+!!n.startsWith("scale")))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eR=!1,eI=!1,eP.forEach(e=>e.complete(eO)),eP.clear()}function eD(){eP.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eR=!0)})}class eL{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(eP.add(this),eI||(eI=!0,ej.read(eD),ej.resolveKeyframes(e$))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){let i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eP.delete(this)}cancel(){"scheduled"===this.state&&(eP.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eV=e=>/^0[^.\s]+$/u.test(e),eN=new Set([N,z]);function ez(e,t){let n=H(e);return eN.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
219let eB=new Set(["auto","none","0"]);class eF extends eL{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&eo(r=r.trim())){let i=function e(t,n,r=1){(0,ee.V)(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,o]=function(e){let t=el.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let s=window.getComputedStyle(n).getPropertyValue(i);if(s){let e=s.trim();return et(e)?parseFloat(e):e}return eo(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!K.has(n)||2!==e.length)return;let[r,i]=e,o=Q(r),s=Q(i);if(ea(r)!==ea(i)&&eS[n]){this.needsMeasurement=!0;return}if(o!==s)if(eb(o)&&eb(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else eS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var r;(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||eV(r)))&&n.push(t)}n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!eB.has(t)&&R(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=ez(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eS[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=eS[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
219h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let eU=e=>1e3*e;function eH(e,t){-1===e.indexOf(t)&&e.push(t)}function eW(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class eq{constructor(){this.subscriptions=[]}add(e){return eH(this.subscriptions,e),()=>eW(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eG(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}function eY(e){let t;return()=>(void 0===t&&(t=e()),t)}let eX={};function eK(e,t){let n=eY(e);return()=>eX[t]??n()}let eZ=eK(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),eJ=e=>null!==e;function eQ(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(eJ),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}class e0{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}var e1=n(40416);let e2=eK(()=>{try{document.createElement("div").animate({opacity:0}
219,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e5=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},e3=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,e4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e3([0,.65,.55,1]),circOut:e3([.55,0,1,.45]),backIn:e3([.31,.01,.66,-.59]),backOut:e3([.33,1.53,.69,.99])};function e6(e){return"function"==typeof e&&"applyToOptions"in e}class e8 extends e0{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,(0,ee.V)("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return e6(e)&&e2()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?e2()?e5(t,n):"ease-out":(0,e1.D)(t)?e3(t):Array.isArray(t)?t.map(t=>e(t,n)||e4.easeOut):e4[t]}(a,i);Array.isArray(d)&&(c.easing=d);let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=eQ(r,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eG(t,n,e),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eU(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&eZ())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ek.l):r(this)}}let e9=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),{schedule:e7}=eT(queueMicrotask,!1);function te(){r=void 0}let tt={now:()=>(void 0===r&&tt.set(eC.isProcessing||eE.useManualTiming?eC.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(te)}},tn=(e,t)=>t?1e3/t*e:0,tr={current:void 0};class ti{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tt.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=tt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eq);let n=this.events[e].add(t);return"change"===e?()=>{n(),ej.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
219setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return tr.current&&tr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=tt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return tn(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function to(e,t){return new ti(e,t)}let ts=[...J,A,$],ta=new WeakMap;function tl(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}let tc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],td=["initial",...tc];function th(e){return tl(e.animate)||td.some(t=>tu(e[t]))}function tp(e){return!!(th(e)||e.variants)}let tf={current:null},tg={current:!1},tm="undefined"!=typeof window;function ty(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function tv(e,t,n,r){if("function"==typeof t){let[i,o]=ty(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=ty(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tx={};class tw{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=eL,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=tt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ej.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=th(t),this.isVariantNode=tp(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&X(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ta.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
219h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tg.current||function(){if(tg.current=!0,tm)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tf.current=e.matches;e.addEventListener("change",t),t()}else tf.current=!1}(),this.shouldReduceMotion=tf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eA(this.notifyUpdate),eA(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&e9.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:o,duration:s}=t.accelerate,a=new e8({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:eU(s)}),l=n(a);this.valueSubscriptions.set(e,()=>{l(),a.cancel()});return}let r=a.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ej.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tx){let t=tx[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tb.length;t++){let n=tb[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if(X(i))e.addValue(r,i);else if(X(o))e.addValue(r,to(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,to(void 0!==t?t:i,{owner:e}))}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=to(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=n){if("string"==typeof n&&(et(n)||eV(n)))n=parseFloat(n);else{let r;r=n,!ts.find(Z(r))&&$.test(t)&&(n=ez(e,t))}this.setBaseTarget(e,X(n)?n.get():n)}return X(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=tv(this.props,n,this.presenceContext?.custom);r&&(t=r[e])}if(n&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||X(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new eq),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){e7.render(this.render)}}
219class tS extends tw{constructor(){super(...arguments),this.KeyframeResolver=eF}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tk(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tE=(e,t)=>t&&"number"==typeof e?t.transform(e):e,t_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tT=s.length;function tj(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(a.has(e)){l=!0;continue}if(er(e)){i[e]=n;continue}{let t=tE(n,F[e]);e.startsWith("origin")?(u=!0,o[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<tT;o++){let a=s[o],l=e[a];if(void 0===l)continue;let u=!0;if("number"==typeof l)u=l===+!!a.startsWith("scale");else{let e=parseFloat(l);u=a.startsWith("scale")?1===e:0===e}if(!u||n){let e=tE(l,F[a]);if(!u){i=!1;let t=t_[a]||a;r+=`${t}(${e}) `}n&&(t[a]=e)}}let o=e.pathRotation;return o&&(i=!1,r+=`rotate(${tE(o,F.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}let tA={offset:"stroke-dashoffset",array:"stroke-dasharray"},tC={offset:"strokeDashoffset",array:"strokeDasharray"},tM=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(tj(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of tM)void 0!==d[e]&&(h[e]=d[e],delete d[e]);(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?tA:tC;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}(d,i,o,s,!1)}let tI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tR=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tO(e,{style:t,vars:n},r,i){let o,s=e.style;for(o in t)s[o]=t[o];for(o in i?.applyProjectionStyles(s,r),n)s.setProperty(o,n[o])}let t$=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function tD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tL={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!k.test(e))return e;else e=parseFloat(e);let n=tD(e,t.target.x),r=tD(e,t.target.y);return`${n}% ${r}%`}},tV=(e,t,n)=>e+(t-e)*n,tN={borderRadius:{...tL,applyTo:[...t$]},borderTopLeftRadius:tL,borderTopRightRadius:tL,borderBottomLeftRadius:tL,borderBottomRightRadius:tL,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=$.parse(e);if(r.length>5)return e;let i=$.createTransformer(e),o=+("number"!=typeof r[0]),s=n.x.scale*t.x,a=n.y.scale*t.y;r[0+o]/=s,r[1+o]/=a;let l=tV(s,a,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};function tz(e,{layout:t,layoutId:n}){return a.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tN[e]||"opacity"===e)}function tB(e,t,n){let r=e.style,i=t?.style,o={};if(!r)return o;for(let t in r)(X(r[t])||i&&X(i[t])||tz(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(o[t]=r[t]);return o}function tF(e,t,n){let r=tB(e,t,n);for(let n in e)(X(e[n])||X(t[n]))&&(r[-1!==s.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tU extends tS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(a.has(t)){let e=H(t);return e&&e.default||0}if(tM.includes(t)){let n=getComputedStyle(e)[t];if("string"==typeof n&&n)return n.trim()}return t=tI.has(t)?t:tk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tF(e,t,n)}
219build(e,t,n){tP(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){for(let n in tO(e,t,void 0,r),t.attrs)e.setAttribute(tI.has(n)?n:tk(n),t.attrs[n])}mount(e){this.isSVGTag=tR(e.tagName),super.mount(e)}}function tH({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tW(e){return void 0===e||1===e}function tq({scale:e,scaleX:t,scaleY:n}){return!tW(e)||!tW(t)||!tW(n)}function tG(e){return tq(e)||tY(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tY(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function tX(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function tK(e,t=0,n=1,r,i){e.min=tX(e.min,t,n,r,i),e.max=tX(e.max,t,n,r,i)}function tZ(e,{x:t,y:n}){tK(e.x,t.translate,t.scale,t.originPoint),tK(e.y,n.translate,n.scale,n.originPoint)}function tJ(e,t){e.min+=t,e.max+=t}function tQ(e,t,n,r,i=.5){let o=tV(e.min,e.max,i);tK(e,t,n,o,r)}function t0(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t1(e,t,n){let r=n??e;tQ(e.x,t0(t.x,r.x),t.scaleX,t.scale,t.originX),tQ(e.y,t0(t.y,r.y),t.scaleY,t.scale,t.originY)}function t2(e,t){return tH(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class t5 extends tS{constructor(){super(...arguments),this.type="html",this.renderInstance=tO}mount(e){(0,ee.V)(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,t){if(a.has(t))return this.projection?.isProjecting?em(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return ey(n,t)})(e,t);{let n=window.getComputedStyle(e),r=(er(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t2(e,t)}build(e,t,n){tj(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tB(e,t,n)}}var t3=n(12020);let t4=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function t6(e){if("string"!=typeof e||e.includes("-"));else if(t4.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var t8=n(38776),t9=n(88720);let t7=(0,t3.createContext)({strict:!1});var ne=n(78783);let nt=(0,t3.createContext)({});function nn(e){return Array.isArray(e)?e.join(" "):e}let nr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ni(e,t,n){for(let r in t)X(t[r])||tz(r,n)||(e[r]=t[r])}let no=()=>({...nr(),attrs:{}}),ns=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function na(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ns.has(e)}function nl(e){return X(e)?e.get():e}var nu=n(96110),nc=n(32440);let nd=e=>(t,n)=>{let r=(0,t3.useContext)(nt),i=(0,t3.useContext)(nu.t),o=()=>(function(e,t,n,r){let{scrapeMotionValuesFromProps:i,createRenderState:o}=e;return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=nl(o[e]);let{initial:s,animate:a}=e,l=th(e),u=tp(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===s)?a:s;if(d&&"boolean"!=typeof d&&!tl(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=tv(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}(t,n,r,i),renderState:o()}})(e,t,r,i);return n?o():(0,nc.M)(o)},nh=nd({scrapeMotionValuesFromProps:tB,createRenderState:nr}),np=nd({scrapeMotionValuesFromProps:tF,createRenderState:no}),nf={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ng=!1;function nm(){return!function(){if(ng)return;let e={};for(let t in nf)e[t]={isEnabled:e=>nf[t].some(t=>!!e[t])};tx=e,ng=!0}(),tx}let ny=Symbol.for("motionComponentSymbol"),nv="data-"+tk("framerAppearId"),nb=(0,t3.createContext)({});function nx(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var nw=n(43827);function nS(e){var t,n;let{forwardMotionProps:r=!1,type:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;o&&function(e){let t=nm();for(let n in e)t[n]={...t[n],...e[n]};tx=t}(o);let a=i?"svg"===i:t6(e),l=a?np:nh;function u(t,n){let i,o={...(0,t3.useContext)(ne.Q),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,t3.useContext)(t9.L).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:u,isValidProp:c}=o,d=function(e){let{initial:t,animate:n}=function(e,t){if(th(e)){let{initial:t,animate:n}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,t3.useContext)(nt));return(0,t3.useMemo)(()=>({initial:t,animate:n}),[nn(t),nn(n)])}(t),h=l(t,u);if(!u&&"undefined"!=typeof window){(0,t3.useContext)(t7).strict;let t=function(e){let{drag:t,layout:n}=nm();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
219(o);i=t.MeasureLayout,d.visualElement=function(e,t,n,r,i,o){var s,a,l,u;let{visualElement:c}=(0,t3.useContext)(nt),d=(0,t3.useContext)(t7),h=(0,t3.useContext)(nu.t),p=(0,t3.useContext)(ne.Q),f=p.reducedMotion,g=p.skipAnimations,m=(0,t3.useRef)(null),y=(0,t3.useRef)(!1);r=r||d.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:f,skipAnimations:g,isSVG:o}),y.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));let v=m.current,b=(0,t3.useContext)(nb);v&&!v.projection&&i&&("html"===v.type||"svg"===v.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&nx(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(m.current,n,i,b);let x=(0,t3.useRef)(!1);(0,t3.useInsertionEffect)(()=>{v&&x.current&&v.update(n,h)});let w=n[nv],S=(0,t3.useRef)(!!w&&"undefined"!=typeof window&&!(null==(s=(a=window).MotionHandoffIsComplete)?void 0:s.call(a,w))&&(null==(l=(u=window).MotionHasOptimisedAnimation)?void 0:l.call(u,w)));return(0,nw.E)(()=>{y.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),(0,t3.useEffect)(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var e,t;null==(e=(t=window).MotionHandoffMarkAsComplete)||e.call(t,w)}),S.current=!1),v.enteringChildren=void 0)}),v}(e,h,o,s,t.ProjectionNode,a)}return(0,t8.jsxs)(nt.Provider,{value:d,children:[i&&d.visualElement?(0,t8.jsx)(i,{visualElement:d.visualElement,...o}):null,function(e,t,n,r,i){let{latestValues:o}=r,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,u=((null!=a?a:t6(e))?function(e,t,n,r){let i=(0,t3.useMemo)(()=>{let n=no();return tP(n,t,tR(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ni(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return ni(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,t3.useMemo)(()=>{let e=nr();return tj(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,o,i,e),c=function(e,t,n,r){let i={};for(let o in e)("values"!==o||"object"!=typeof e.values)&&!X(e[o])&&((o.startsWith("on")?!na(o):r?.(o)??!na(o))||!0===n&&na(o)||!t&&!na(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}(t,"string"==typeof e,s,l),d=e!==t3.Fragment?{...c,...u,ref:n}:{},{children:h}=t,p=(0,t3.useMemo)(()=>X(h)?h.get():h,[h]);return(0,t3.createElement)(e,{...d,children:p})}(e,t,function(e,t,n){let r=(0,t3.useRef)(n);(0,t3.useInsertionEffect)(()=>{r.current=n});let i=(0,t3.useRef)(null);return(0,t3.useCallback)(n=>{if(n){var o;null==(o=e.onMount)||o.call(e,n)}t&&(n?t.mount(n):t.unmount());let s=r.current;if("function"==typeof s)if(n){let e=s(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):s(n);else s&&(s.current=n)},[t])}(h,d.visualElement,n),h,u,r,a,c)]})}u.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!=(n=null!=(t=e.displayName)?t:e.name)?n:"",")"));let c=(0,t3.forwardRef)(u);return c[ny]=e,c}class nk{constructor(e){this.isMounted=!1,this.node=e}update(){}}function nE(e,t,n){let r=e.getProps();return tv(r,t,void 0!==n?n:r.custom,e)}function n_(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function nT(e,t){let n=e?.[t]??e?.default??e;return n!==e?n_(n,e):n}let nj=e=>Array.isArray(e);function nA(e,t){let n=e.getValue("willChange");if(X(n)&&n.add)return n.add(t);if(!n&&eE.WillChange){let n=new eE.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let nC=(...e)=>e.reduce((e,t)=>
219n=>t(e(n)));function nM(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function nP(e,t){return n=>n>0?t:e}let nI=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nR=[b,v,j];function nO(e){let t=nR.find(t=>t.test(e));if((0,ee.$)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===j&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=nM(a,r,e+1/3),o=nM(a,r,e),s=nM(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let n$=(e,t)=>{let n=nO(e),r=nO(t);if(!n||!r)return nP(e,t);let i={...n};return e=>(i.red=nI(n.red,r.red,e),i.green=nI(n.green,r.green,e),i.blue=nI(n.blue,r.blue,e),i.alpha=tV(n.alpha,r.alpha,e),v.transform(i))},nD=new Set(["none","hidden"]);function nL(e,t){return n=>tV(e,t,n)}function nV(e){return"number"==typeof e?nL:"string"==typeof e?eo(e)?nP:A.test(e)?n$:nB:Array.isArray(e)?nN:"object"==typeof e?A.test(e)?n$:nz:nP}function nN(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nV(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nz(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=nV(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let nB=(e,t)=>{let n=$.createTransformer(t),r=R(e),i=R(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nD.has(e)&&!i.values.length||nD.has(t)&&!r.values.length?function(e,t){return nD.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):nC(nN(function(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}(r,i),i.values),n):((0,ee.$)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nP(e,t))};function nF(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?tV(e,t,n):nV(e)(e,t)}let nU=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ej.update(t,e),stop:()=>eA(t),now:()=>eC.isProcessing?eC.timestamp:tt.now()}};function nH(e,t=50,n=2e4,r){let i=0,o=e.next(i);for(r?.push(o.value);!o.done&&i<n;)i+=t,o=e.next(i),r?.push(o.value);return i>=n?1/0:i}let nW={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nq(e,t){return e*Math.sqrt(1-t*t)}let nG=["duration","bounce"],nY=["stiffness","damping","mass"];function nX(e,t){return t.some(t=>void 0!==e[t])}function nK(e=nW.visualDuration,t=nW.bounce){let n,r,i="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:s}=i,a=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],c={done:!1,value:a},{stiffness:d,damping:h,mass:p,duration:f,velocity:g,isResolvedFromDuration:m}=function(e){let t={velocity:nW.velocity,stiffness:nW.stiffness,damping:nW.damping,mass:nW.mass,isResolvedFromDuration:!1,...e};if(!nX(e,nY)&&nX(e,nG))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nW.mass,stiffness:r,damping:i}}else{let n=function({duration:e=nW.duration,bounce:t=nW.bounce,velocity:n=nW.velocity,mass:r=nW.mass}){let i,o;(0,ee.$)(e<=eU(nW.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=l(nW.minDamping,nW.maxDamping,s),e=l(nW.minDuration,nW.maxDuration,e/1e3),s<1?(i=t=>{let r=t*s,i=r*e;return .001-(r-n)/nq(t,s)*Math.exp(-i)},o=t=>{let r=t*s*e,o=s*s*t*t*e,a=Math.exp(-r),l=nq(t*t,s);return(r*n+n-o)*a*(-i(t)+.001>0?-1:1)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let a=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=eU(e),isNaN(a))return{stiffness:nW.stiffness,damping:nW.damping,duration:e};{let t=a*a*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:nW.mass}).isResolvedFromDuration=!0}return t}({...i,velocity:-((i.velocity||0)/1e3)}),y=g||0,v=h/(2*Math.sqrt(d*p)),b=u-a,x=Math.sqrt(d/p)/1e3,w=v*x,S=5>Math.abs(b);
219if(o||(o=S?nW.restSpeed.granular:nW.restSpeed.default),s||(s=S?nW.restDelta.granular:nW.restDelta.default),v<1){let e=nq(x,v),t=(y+w*b)/e,i=w*t+b*e,o=w*b-t*e,s=-1,a=0,l=0,c=n=>{if(n!==s){s=n;let r=Math.exp(-w*n),c=Math.sin(e*n),d=Math.cos(e*n);a=u-r*(t*c+b*d),l=r*(i*c+o*d)}};n=e=>(c(e),a),r=e=>(c(e),l)}else if(1===v){n=e=>u-Math.exp(-x*e)*(b+(y+x*b)*e);let e=y+x*b;r=t=>Math.exp(-x*t)*(x*e*t-y)}else{let e=x*Math.sqrt(v*v-1);n=t=>{let n=Math.exp(-w*t),r=Math.min(e*t,300);return u-n*((y+w*b)*Math.sinh(r)+e*b*Math.cosh(r))/e};let t=(y+w*b)/e,i=w*t-b*e,o=w*b-t*e;r=t=>{let n=Math.exp(-w*t),r=Math.min(e*t,300);return n*(i*Math.sinh(r)+o*Math.cosh(r))}}let k={calculatedDuration:m&&f||null,velocity:e=>eU(r(e)),next:e=>{let t=n(e);return m?c.done=e>=f:c.done=Math.abs(eU(r(e)))<=o&&Math.abs(u-t)<=s,c.value=c.done?u:t,c},toString:()=>{let e=Math.min(nH(k),2e4),t=e5(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}function nZ({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let d,h,p=e[0],f={done:!1,value:p},g=n*t,m=p+g,y=void 0===s?m:s(m);y!==m&&(g=y-p);let v=e=>-g*Math.exp(-e/r),b=e=>{let t=v(e);f.done=Math.abs(t)<=u,f.value=f.done?y:y+t},x=e=>{let t;if((t=f.value)<a||t>l){var n;d=e,h=nK({keyframes:[f.value,(n=f.value,void 0===a?l:void 0===l||Math.abs(a-n)<Math.abs(l-n)?a:l)],velocity:-v(e)/r*1e3,damping:i,stiffness:o,restDelta:u,restSpeed:c})}};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,b(e),x(e)),void 0!==d&&e>=d)?h.next(e-d):(t||b(e),f)}}}nK.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nH(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:i/1e3}}(e,100,nK);return e.ease=t.ease,e.duration=eU(t.duration),e.type="keyframes",e};var nJ=n(33210),nQ=n(2534);let n0=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1};function n1({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){var i;let o=Array.isArray(r)&&"number"!=typeof r[0]?r.map(nQ.K):(0,nQ.K)(r),s={done:!1,value:t[0]},a=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if((0,ee.V)(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=function(e,t,n){let r=[],i=n||eE.mix||nF,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=nC(Array.isArray(t)?t[n]||ek.l:t,o)),r.push(o)}return r}(t,r,i),u=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(u>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=n0(e[r],e[r+1],n);return a[r](i)};return n?t=>c(l(e[0],e[o-1],t)):c}((i=n&&n.length===t.length?n:function(e){let t=[0];return!function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=n0(0,t,r);e.push(tV(n,1,i))}}(t,e.length-1),t}(t),i.map(t=>t*e)),t,{ease:Array.isArray(o)?o:t.map(()=>o||nJ.am).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=a(t),s.done=t>=e,s)}}let n2={decay:nZ,inertia:nZ,tween:n1,keyframes:n1,spring:nK};function n5(e){"string"==typeof e.type&&(e.type=n2[e.type])}let n3=e=>e/100;class n4 extends e0{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;n5(e);let{type:t=n1,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:s}=e,a=t||n1;a!==n1&&"number"!=typeof s[0]&&(this.mixKeyframes=nC(n3,nF(s[0],s[1])),s=[0,100]);let l=a({...e,keyframes:s});"mirror"===i&&(this.mirroredGenerator=a({...e,keyframes:[...s].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=nH(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let n,{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:u}=this;if(null===this.startTime)return r.next(0);let{delay:c=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:f,type:g,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,w=r;if(h){let e=Math.min(this.currentTime,i)/a,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,h+1))%2&&("reverse"===p?(n=1-n,f&&(n-=f/a)):"mirror"===p&&(w=s)),x=l(0,1,n)*
219a}b?(this.delayState.value=d[0],n=this.delayState):n=w.next(x),o&&!b&&(n.value=o(n.value));let{done:S}=n;b||null===u||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return k&&g!==nZ&&(n.value=eQ(d,this.options,y,this.speed)),m&&m(n.value),k&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=eU(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value,n=Math.max(e-5,0);return tn(t-(e=>this.generator.next(e).value)(n),e-n)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tt.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=nU,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}var n6=n(99492),n8=n(53585),n9=n(18613);let n7={anticipate:n6.b,backInOut:n8.ZZ,circInOut:n9.tn};class re extends e8{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in n7&&(e.ease=n7[e.ease])}(e),n5(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new n4({...o,autoplay:!1}),a=Math.max(10,tt.now()-this.startTime),u=l(0,10,a-10),c=s.sample(a).value,{name:d}=this.options;i&&d&&eG(i,d,c),t.setWithVelocity(s.sample(Math.max(0,a-u)).value,c,u),s.stop()}}let rt=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&($.test(e)||"0"===e)&&!e.startsWith("url("));function rn(e){e.duration=0,e.type="keyframes"}let rr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,ri=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ro=eY(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rs extends e0{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:a,motionValue:l,element:u,...c},h=u?.KeyframeResolver||eL;this.keyframeResolver=new h(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){let i;this.keyframeResolver=void 0;let{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=tt.now();let d=!0;!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=rt(i,t),a=rt(o,t);return(0,ee.$)(s===a,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||e6(n))&&r)}(e,o,s,a)&&(d=!1,(eE.instantAnimations||!l)&&c?.(eQ(e,n,t)),e[0]=e[e.length-1],rn(n),n.repeat=0);let h={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=d&&!u&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:a}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;
219let{onUpdate:u,transformTemplate:c}=t.owner.getProps();return ro()&&n&&(e9.has(n)||ri.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&rr.test(e[t]))return!0;return!1}(a))&&("transform"!==n||!c)&&!u&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}(h),f=h.motionValue?.owner?.current;if(p)try{i=new re({...h,element:f})}catch{i=new n4(h)}else i=new n4(h);i.finished.then(()=>{this.notifyFinished()}).catch(ek.l),this.pendingTimeline&&(this.stopTimeline=i.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=i}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eO=!0,eD(),e$(),eO=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let ra={type:"spring",stiffness:500,damping:25,restSpeed:10},rl={type:"keyframes",duration:.8},ru={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),rd=(e,t,n,r={},i,o)=>s=>{let l=nT(r,e)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c-=eU(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function(e){for(let t in e)if(!rc.has(t))return!0;return!1}(l)&&Object.assign(d,((e,{keyframes:t})=>t.length>2?rl:a.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ra:ru)(e,d)),d.duration&&(d.duration=eU(d.duration)),d.repeatDelay&&(d.repeatDelay=eU(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(rn(d),0===d.delay&&(h=!0)),(eE.instantAnimations||eE.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(h=!0,rn(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&void 0!==t.get()){let e=eQ(d.keyframes,l);if(void 0!==e)return void ej.update(()=>{d.onUpdate(e),d.onComplete()})}return l.isSync?new n4(d):new rs(d)},rh="undefined"!=typeof window;function rp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...a}=t,l=e.getDefaultTransition();o=o?n_(o,l):l;let u=o?.reduceMotion,c=o?.skipAnimations;r&&(o=r);let d=[],h=i&&e.animationState&&e.animationState.getState()[i],p=o?.path;for(let t in p&&p.animateVisualElement(e,a,o,n,d),a){let r=e.getValue(t,e.latestValues[t]??null),i=a[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let s={delay:n,...nT(o||{},t)};c&&(s.skipAnimations=!0);let l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!s.velocity){ej.update(()=>r.set(i));continue}let p=!1;if(rh&&window.MotionHandoffAnimation){let n=e.props[nv];if(n){let e=window.MotionHandoffAnimation(n,t,ej);null!==e&&(s.startTime=e,p=!0)}}nA(e,t);let f=u??e.shouldReduceMotion;r.start(rd(t,r,i,f&&K.has(t)?{type:!1}:s,e,p));let g=r.animation;g&&d.push(g)}if(s){let t=()=>ej.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=nE(e,t)||{};for(let t in i={...i,...n}){var o;let n=nj(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,to(n))}}(e,s)});d.length?Promise.all(d).then(t):t()}return d}function rf(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
219e.sortNodePosition(t)).indexOf(t),s=e.size,a=(s-1)*r;return"function"==typeof n?n(o,s):1===i?o*r:a-o*r}function rg(e,t,n={}){let r=nE(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let o=r?()=>Promise.all(rp(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,i=0,o=1,s){let a=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),a.push(rg(l,t,{...s,delay:n+("function"==typeof r?0:r)+rf(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,r,o,s,a,n)}:()=>Promise.resolve(),{when:a}=i;if(!a)return Promise.all([o(),s(n.delay)]);{let[e,t]="beforeChildren"===a?[o,s]:[s,o];return e().then(()=>t())}}let rm=td.length;function ry(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}let rv=[...tc].reverse(),rb=tc.length;function rx(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rw(){return{animate:rx(!0),whileInView:rx(),whileHover:rx(),whileTap:rx(),whileDrag:rx(),whileFocus:rx(),exit:rx()}}class rS extends nk{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>rg(e,t,n)));else if("string"==typeof t)r=rg(e,t,n);else{let i="function"==typeof t?nE(e,t,n.custom):t;r=Promise.all(rp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=rw(),r=!0,i=!1,o=t=>(n,r)=>{let i=nE(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function s(s){let{props:a}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<rm;e++){let r=td[e],i=t.props[r];(tu(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<rb;t++){var p,f;let g=rv[t],m=n[g],y=void 0!==a[g]?a[g]:l[g],v=tu(y),b=g===s?m.isActive:null;!1===b&&(h=t);let x=y===l[g]&&y!==a[g]&&v;if(x&&(r||i)&&e.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...d},!m.isActive&&null===b||!y&&!m.prevProp||tl(y)||"boolean"==typeof y)continue;if("exit"===g&&m.isActive&&!0!==b){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let w=(p=m.prevProp,"string"==typeof(f=y)?f!==p:!!Array.isArray(f)&&!ry(f,p)),S=w||g===s&&m.isActive&&!x&&v||t>h&&v,k=!1,E=Array.isArray(y)?y:[y],_=E.reduce(o(g),{});!1===b&&(_={});let{prevResolvedValues:T={}}=m,j={...T,..._},A=t=>{S=!0,c.has(t)&&(k=!0,c.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in j){let t=_[e],n=T[e];if(!d.hasOwnProperty(e))(nj(t)&&nj(n)?!ry(t,n)||w:t!==n)?null!=t?A(e):c.add(e):void 0!==t&&c.has(e)?A(e):m.protectedKeys[e]=!0}m.prevProp=y,m.prevResolvedValues=_,m.isActive&&(d={...d,..._}),(r||i)&&e.blockInitialAnimation&&(S=!1);let C=x&&w,M=!C||k;S&&M&&u.push(...E.map(t=>{let n={type:g};if("string"==typeof t&&(r||i)&&!C&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=nE(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rf(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof a.initial){let n=nE(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let g=!!u.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,i=!1,g?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rw(),i=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let rk=0;class rE extends nk{constructor(){super(...arguments),this.id=rk++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let n=nE(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
219{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let r_={x:!1,y:!1};function rT(e){return[e("x"),e("y")]}function rj(e){return e.max-e.min}function rA(e,t,n,r=.5){e.origin=r,e.originPoint=tV(t.min,t.max,e.origin),e.scale=rj(n)/rj(t),e.translate=tV(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rC(e,t,n,r){rA(e.x,t.x,n.x,r?r.originX:void 0),rA(e.y,t.y,n.y,r?r.originY:void 0)}function rM(e,t,n,r=0){e.min=(r?tV(n.min,n.max,r):n.min)+t.min,e.max=e.min+rj(t)}function rP(e,t,n,r=0){let i=r?tV(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+rj(t)}function rI(e,t,n,r){rP(e.x,t.x,n.x,r?.x),rP(e.y,t.y,n.y,r?.y)}let rR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rO=new Set(["INPUT","SELECT","TEXTAREA"]);function r$(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var rD=n(7642);function rL(e){return(0,rD.G)(e)&&"ownerSVGElement"in e}function rV(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}let rN=new WeakMap,rz=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:rL(r)&&"getBBox"in r?r.getBBox()[t]:r[n],rB=rz("inline","width","offsetWidth"),rF=rz("block","height","offsetHeight");function rU({target:e,borderBoxSize:t}){rN.get(e)?.forEach(n=>{n(e,{get width(){return rB(e,t)},get height(){return rF(e,t)}})})}function rH(e){e.forEach(rU)}let rW=new Set;function rq(e,t){return"function"==typeof e?(rW.add(e),o||(o=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};rW.forEach(t=>t(e))},window.addEventListener("resize",o)),()=>{rW.delete(e),rW.size||"function"!=typeof o||(window.removeEventListener("resize",o),o=void 0)}):function(e,t){i||"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(rH));let n=rV(e);return n.forEach(e=>{let n=rN.get(e);n||(n=new Set,rN.set(e,n)),n.add(t),i?.observe(e)}),()=>{n.forEach(e=>{let n=rN.get(e);n?.delete(t),n?.size||i?.unobserve(e)})}}(e,t)}let rG=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rY(e){return{point:{x:e.pageX,y:e.pageY}}}function rX(e,t,n,r){return r$(e,t,e=>rG(e)&&n(e,rY(e)),r)}let rK=({current:e})=>e?e.ownerDocument.defaultView:null,rZ=(e,t)=>Math.abs(e-t),rJ=new Set(["auto","scroll"]);class rQ{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=r0(this.lastRawMoveEventInfo,this.transformPagePoint));let e=r2(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){return Math.sqrt(rZ(e.x,t.x)**2+rZ(e.y,t.y)**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=eC;this.history.push({...r,timestamp:i});let{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=r0(t,this.transformPagePoint),ej.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=r2("pointercancel"===e.type?this.lastMoveEventInfo:r0(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!rG(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let a=r0(rY(e),this.transformPagePoint),{point:l}=a,{timestamp:u}=eC;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=t;c&&c(e,r2(a,this.history));let d={passive:!0,capture:!0};this.removeListeners=nC(rX(this.contextWindow,"pointermove",this.handlePointerMove,d),rX(this.contextWindow,"pointerup",this.handlePointerUp,d),rX(this.contextWindow,"pointercancel",this.handlePointerUp,d)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(rJ.has(e.overflowX)||rJ.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(0!==i.x||0!==i.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ej.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eA(this.updatePoint)}}function r0(e,t){return t?{point:t(e.point)}:e}function r1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function r2({point:e},t){return{point:e,delta:r1(e,r5(t)),offset:r1(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=r5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>eU(.1)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*eU(t)&&(r=e[1]);let o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};let s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,.1)}}function r5(e){return e[e.length-1]}function r3(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function r4(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}
219function r6(e,t,n){return{min:r8(e,t),max:r8(e,n)}}function r8(e,t){return"number"==typeof e?e:e[t]||0}let r9=new WeakMap;class r7{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let i=e=>{t&&this.snapToCursor(rY(e).point),this.stopAnimation()},o=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(r_[e])return null;else return r_[e]=!0,()=>{r_[e]=!1};return r_.x||r_.y?null:(r_.x=r_.y=!0,()=>{r_.x=r_.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rT(e=>{let t=this.getAxisMotionValue(e).get()||0;if(S.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rj(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ej.update(()=>i(e,t),!1,!0),nA(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&ej.update(()=>o(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new rQ(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:rK(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:s}=this.getProps();s&&ej.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!it(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?tV(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?tV(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&nx(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:r3(e.x,n,i),y:r3(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:r6(e,"left","right"),y:r6(e,"top","bottom")}}(t),r!==this.constraints&&!nx(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&rT(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nx(t))return!1;let r=t.current;(0,ee.V)(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let o=function(e,t,n){let r=t2(e,n),{scroll:i}=t;return i&&(tJ(r.x,i.offset.x),tJ(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),s=(e=i.layout.layoutBox,{x:r4(e.x,o.x),y:r4(e.y,o.y)});if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=tH(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(rT(s=>{if(!it(s,t,this.currentDirection))return;let l=a&&a[s]||{};(!0===o||o===s)&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nA(this.visualElement,e),n.start(rd(e,n,0,t,this.visualElement,!1))}stopAnimation(){rT(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}
219snapToCursor(e){rT(t=>{let{drag:n}=this.getProps();if(!it(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t],s=i.get()||0;i.set(e[t]-tV(n,o,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nx(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rT(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=rj(e),i=rj(t);return i>r?n=n0(t.min,t.max-r,e.min):r>i&&(n=n0(e.min,e.max-i,t.min)),l(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),rT(t=>{if(!it(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tV(i,o,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;r9.set(this.visualElement,this);let t=this.visualElement.current,n=rX(t,"pointerdown",e=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=e.target,o=i!==t&&(rO.has(i.tagName)||!0===i.isContentEditable);n&&r&&!o&&this.start(e)}),r=()=>{let{dragConstraints:n}=this.getProps();nx(n)&&n.current&&(this.constraints=this.resolveRefConstraints(),e||(e=function(e,t,n){let r=rq(e,ie(n)),i=rq(t,ie(n));return()=>{r(),i()}}(t,n.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ej.read(r);let s=r$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rT(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function ie(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function it(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class ir extends nk{constructor(e){super(e),this.removeGroupControls=ek.l,this.removeListeners=ek.l,this.controls=new r7(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ek.l}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let ii=e=>(t,n)=>{e&&ej.update(()=>e(t,n),!1,!0)};class io extends nk{constructor(){super(...arguments),this.removePointerDownListener=ek.l}onPointerDown(e){this.session=new rQ(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rK(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ii(e),onStart:ii(t),onMove:ii(n),onEnd:(e,t)=>{delete this.session,r&&ej.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=rX(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let is={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var ia=n(41001);let il=!1;class iu extends t3.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),il&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),is.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),il=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ej.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),e7.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;il=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ic(e){let[t,n]=(0,ia.xQ)(),r=(0,t3.useContext)(t9.L);return(0,t8.jsx)(iu,{...e,layoutGroup:r,switchLayoutGroup:(0,t3.useContext)(nb),isPresent:t,safeToRemove:n})}let id={value:null,addProjectionMetrics:null},ih=t$.length,ip=e=>"string"==typeof e?parseFloat(e):e,ig=e=>"number"==typeof e||k.test(e);function im(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let iy=ib(0,.5,n9.yT),iv=ib(.5,.95,ek.l);function ib(e,t,n){return r=>r<e?0:r>t?1:n(n0(e,t,r))}function ix(e,t){e.min=t.min,e.max=t.max}function iw(e,t){ix(e.x,t.x),ix(e.y,t.y)}function iS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ik(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}
219function iE(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(S.test(t)&&(t=parseFloat(t),t=tV(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=tV(o.min,o.max,r);e===o&&(a-=t),e.min=ik(e.min,t,n,a,i),e.max=ik(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let i_=["x","scaleX","originX"],iT=["y","scaleY","originY"];function ij(e,t,n,r){iE(e.x,t,i_,n?n.x:void 0,r?r.x:void 0),iE(e.y,t,iT,n?n.y:void 0,r?r.y:void 0)}function iA(e){return 0===e.translate&&1===e.scale}function iC(e){return iA(e.x)&&iA(e.y)}function iM(e,t){return e.min===t.min&&e.max===t.max}function iP(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iI(e,t){return iP(e.x,t.x)&&iP(e.y,t.y)}function iR(e){return rj(e.x)/rj(e.y)}function iO(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class i${constructor(){this.members=[]}add(e){eH(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&!1!==r.isConnected||n.snapshot||(eW(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(eW(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(void 0===r||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let iD=(e,t)=>e.depth-t.depth;class iL{constructor(){this.children=[],this.isDirty=!1}add(e){eH(this.children,e),this.isDirty=!0}remove(e){eW(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(iD),this.isDirty=!1,this.children.forEach(e)}}let iV={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},iN=["","X","Y","Z"],iz=0;function iB(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iF({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=iz++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,id.value&&(iV.nodes=iV.calculatedTargetDeltas=iV.calculatedProjections=0),this.nodes.forEach(iW),this.nodes.forEach(i0),this.nodes.forEach(i1),this.nodes.forEach(iq),id.addProjectionMetrics&&id.addProjectionMetrics(iV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iL)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eq),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=rL(t)&&!(rL(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ej.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=tt.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(eA(r),e(i-250))};return ej.setup(r,!0),()=>eA(r)}(i,250),is.hasAnimatedSinceResize&&(is.hasAnimatedSinceResize=!1,this.nodes.forEac
219h(iQ)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||i.getDefaultTransition()||i8,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!iI(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...nT(o,"layout"),onPlay:s,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||iQ(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eA(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i2),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[nv];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",ej,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(iX),this.nodes.forEach(iY);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(iK);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(iZ),this.nodes.forEach(iJ),this.nodes.forEach(iU),this.nodes.forEach(iH)):this.nodes.forEach(iK),this.clearAllSnapshots();let e=tt.now();eC.delta=l(0,1e3/60,e-eC.timestamp),eC.timestamp=e,eC.isProcessing=!0,eM.update.process(eC),eM.preRender.process(eC),eM.render.process(eC),eC.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,e7.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iG),this.sharedNodes.forEach(i5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ej.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ej.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||rj(this.snapshot.measuredBox.x)||rj(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Y()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!iC(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||tG(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),oe((t=r).x),oe(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(on))){let{scroll:e}=this.root;e&&(tJ(t.x,e.offset.x),tJ(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(iw(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&iw(t,e),tJ(t.x,i.offset.x),tJ(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Y();iw(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(tJ(r.x,-n.scroll.offset.x),tJ(r.y,-n.scroll.offset.y)),tG(n.latestValues)&&t1(r,n.latestValues,n.layout?.layoutBox)}return tG(this.latestValues)&&t1(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Y();iw(t,e);for(let e=0;e<this.path.length;e++){let n,r=this.path[e];tG(r.latestValues)&&(r.instance&&(tq(r.latestValues)&&r.updateSnapshot(),iw(n=Y(),r.measurePageBox())),ij(t,r.latestValues,r.snapshot?.layoutBox,n))}return tG(this.latestValues)&&ij(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eC.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
219isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=eC.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,a,l,u;this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,rM(s.x,a.x,l.x,u?.x),rM(s.y,a.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):iw(this.target,this.layout.layoutBox),tZ(this.target,this.targetDelta)):iw(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),id.value&&iV.calculatedTargetDeltas++}}getClosestProjectingParent(){if(!(!this.parent||tq(this.parent.latestValues)||tY(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),rI(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),iw(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===eC.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;iw(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){let i,o,s=n.length;if(s){t.x=t.y=1;for(let a=0;a<s;a++){o=(i=n[a]).projectionDelta;let{visualElement:s}=i.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(tJ(e.x,-i.scroll.offset.x),tJ(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,tZ(e,o)),r&&tG(i.latestValues)&&t1(e,i.latestValues,i.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:a}=e;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(iS(this.prevProjectionDelta.x,this.projectionDelta.x),iS(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rC(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&iO(this.projectionDelta.x,this.prevProjectionDelta.x)&&iO(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),id.value&&iV.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=q(),this.projectionDelta=q(),this.projectionDeltaWithTransform=q()}setAnimationOrigin(e,t=!1,n){let r,i=this.snapshot,o=i?i.latestValues:{},s={...this.latestValues},a=q();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=Y(),u=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,h=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(i6));this.animationProgress=0;let p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,i=p?.(n);if(i?(a.x.translate=i.x,a.x.scale=tV(e.x.scale,1,n),a.x.origin=e.x.origin,a.x.originPoint=e.x.originPoint,a.y.translate=i.y,a.y.scale=tV(e.y.scale,1,n),a.y.origin=e.y.origin,a.y.originPoint=e.y.originPoint):(i3(a.x,e.x,n),i3(a.y,e.y,n)),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,f,g,m,y,v;rI(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),g=this.relativeTarget,m=this.relativeTargetOrigin,y=l,v=n,i4(g.x,m.x,y.x,v),i4(g.y,m.y,y.y,v),r&&(c=this.relativeTarget,f=r,iM(c.x,f.x)&&iM(c.y,f.y))&&(this.isProjectionDirty=!1),r||(r=Y()),iw(r,this.relativeTarget)}u&&(this.animationValues=s,function(e,t,n,r,i,o){i?(e.opacity=tV(0,n.opacity??1,iy(r)),e.opacityExit=tV(t.opacity??1,0,iv(r))):o&&(e.opacity=tV(t.opacity??1,n.opacity??1,r));for(let i=0;i<ih;i++){let o=t$[i],s=im(t,o),a=im(n,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||ig(s)===ig(a)?(e[o]=Math.max(tV(ip(s),ip(a),r),0),(S.test(a)||S.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=tV(t.rotate||0,n.rotate||0,r))}(s,o,this.latestValues,n,h,d)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=s),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eA(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ej.update(()=>{is.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=to(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){let r=X(e)?e:to(e);return r.start(rd("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ot(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=rj(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rj(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}iw(t,n),t1(t,i),rC(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
219)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new i$),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&iB("z",e,r,this.animationValues);for(let t=0;t<iN.length;t++)iB(`rotate${iN[t]}`,e,r,this.animationValues),iB(`skew${iN[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=nl(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=nl(t?.pointerEvents)||""),this.hasProjected&&!tG(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
219let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:o,rotateY:s,skewX:a,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),o&&(r+=`rotateX(${o}deg) `),s&&(r+=`rotateY(${s}deg) `),a&&(r+=`skewX(${a}deg) `),l&&(r+=`skewY(${l}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:s,y:a}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*a.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,tN){if(void 0===i[t])continue;let{correct:n,applyTo:s,isCSSVariable:a}=tN[t],l="none"===o?i[t]:n(i[t],r);if(s){let t=s.length;for(let n=0;n<t;n++)e[s[n]]=l}else a?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?nl(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iY),this.root.sharedNodes.clear()}}}function iU(e){e.updateLayout()}function iH(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)rT(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=rj(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){let e="x"===i?"y":"x";ix(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else ot(i,t.layoutBox,n)&&rT(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],s=rj(n[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=q();rC(s,n,t.layoutBox);let a=q();o?rC(a,e.applyTransform(r,!0),t.measuredBox):rC(a,n,t.layoutBox);let l=!iC(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=e.options.layoutAnchor||void 0,a=Y();rI(a,t.layoutBox,i.layoutBox,s);let l=Y();rI(l,n,o.layoutBox,s),iI(a,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function iW(e){id.value&&iV.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function iq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iG(e){e.clearSnapshot()}function iY(e){e.clearMeasurements()}function iX(e){e.isLayoutDirty=!0,e.updateLayout()}function iK(e){e.isLayoutDirty=!1}function iZ(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function iJ(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function iQ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function i0(e){e.resolveTargetDelta()}function i1(e){e.calcProjection()}function i2(e){e.resetSkewAndRotation()}function i5(e){e.removeLeadSnapshot()}function i3(e,t,n){e.translate=tV(t.translate,0,n),e.scale=tV(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function i4(e,t,n,r){e.min=tV(t.min,n.min,r),e.max=tV(t.max,n.max,r)}function i6(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let i8={duration:.45,ease:[.4,0,.1,1]},i9=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),i7=i9("applewebkit/")&&!i9("chrome/")?Math.round:ek.l;
219function oe(e){e.min=i7(e.min),e.max=i7(e.max)}function ot(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(iR(t)-iR(n)))}function on(e){return e!==e.root&&e.scroll?.wasRoot}let or=iF({attachResizeListener:(e,t)=>r$(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),oi={current:void 0},oo=iF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oi.current){let e=new or({});e.mount(window),e.setOptions({layoutScroll:!0}),oi.current=e}return oi.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function os(e,t){let n=rV(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function oa(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&ej.postRender(()=>i(t,rY(t)))}class ol extends nk{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=os(e,n);return r.forEach(e=>{let n,r=!1,o=!1,s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},a=e=>{r=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(r){o=!0;return}s(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||r_.x||r_.y)return;o=!1;let s=t(e,r);"function"==typeof s&&(n=s,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",a,i)},i)}),o}(e,(e,t)=>(oa(this.node,t,"Start"),e=>oa(this.node,e,"End"))))}unmount(){}}class ou extends nk{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=nC(r$(this.node.current,"focus",()=>this.onFocus()),r$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var oc=n(67901);let od=(e,t)=>!!t&&(e===t||od(e,t.parentElement)),oh=new WeakSet;function op(e){return t=>{"Enter"===t.key&&e(t)}}function of(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function og(e){return rG(e)&&!(r_.x||r_.y)}let om=new WeakSet;function oy(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&ej.postRender(()=>i(t,rY(t)))}class ov extends nk{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[r,i,o]=os(e,n),s=e=>{let r=e.currentTarget;if(!og(e)||om.has(e))return;oh.add(r),n.stopPropagation&&om.add(e);let o=t(r,e),s={...i,capture:!0},a=(e,t)=>{window.removeEventListener("pointerup",l,s),window.removeEventListener("pointercancel",u,s),oh.has(r)&&oh.delete(r),og(e)&&"function"==typeof o&&o(e,{success:t})},l=e=>{a(e,r===window||r===document||n.useGlobalTarget||od(r,e.target))},u=e=>{a(e,!1)};window.addEventListener("pointerup",l,s),window.addEventListener("pointercancel",u,s)};return r.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),(0,oc.s)(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let r=op(()=>{if(oh.has(n))return;of(n,"down");let e=op(()=>{of(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>of(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),rR.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(oy(this.node,t,"Start"),(e,{success:t})=>oy(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}let ob=new WeakMap,ox=new WeakMap,ow=e=>
219{let t=ob.get(e.target);t&&t(e)},oS=e=>{e.forEach(ow)},ok={some:0,all:1};class oE extends nk{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:ok[r]},s=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)};this.stopObserver=function(e,t,n){let r=function({root:e,...t}){let n=e||document;ox.has(n)||ox.set(n,{});let r=ox.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(oS,{root:e,...t})),r[i]}(t);return ob.set(e,n),r.observe(e),()=>{ob.delete(e),r.unobserve(e)}}(this.node.current,o,s)}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let o_=function(e,t){if("undefined"==typeof Proxy)return nS;let n=new Map,r=(n,r)=>nS(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,nS(o,void 0,e,t)),n.get(o))})}({animation:{Feature:rS},exit:{Feature:rE},inView:{Feature:oE},tap:{Feature:ov},focus:{Feature:ou},hover:{Feature:ol},pan:{Feature:io},drag:{Feature:ir,ProjectionNode:oo,MeasureLayout:ic},layout:{ProjectionNode:oo,MeasureLayout:ic}},(e,t)=>t.isSVG??t6(e)?new tU(t):new t5(t,{allowProjection:e!==t3.Fragment}))},63428:(e,t,n)=>{e.exports=n(88499)(n(38416),"Set")},63572:(e,t,n)=>{var r=n(26318);e.exports=function(e){return r(this,e).get(e)}},64806:(e,t,n)=>{var r=n(84908);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},65567:(e,t,n)=>{var r=n(69485),i=n(66048);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},65856:(e,t,n)=>{var r=n(39792);e.exports=function(e,t,n,i){return r(e,function(e,r,o){t(i,e,n(e),o)}),i}},66048:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},66415:(e,t,n)=>{"use strict";n.d(t,{V2:()=>L,FS:()=>z,IM:()=>U,Tx:()=>B,Rr:()=>F,vd:()=>N,_K:()=>V,CC:()=>D,RM:()=>q,Uc:()=>W,tP:()=>H});let r=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let o=function(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){let o=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(r);if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=o[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(o)}(e,t,n):crypto.randomUUID()};var s=n(25467),a=n(97293),l=n(40785),u=n(61267),c=n(17643),d=n(84474),h=n(83717),p=n(54182),f=n(38293),g=n(60745),m=n(71721),y=n(54865),v=n(10728),b=["addListener","removeListener"],x=["addEventListener","removeEventListener"],w=["on","off"];function S(e,t,n,r){if((0,y.T)(n)&&(r=n,n=void 0),r)return S(e,t,n).pipe((0,v.I)(r));var i,o,s,a=(0,h.zs)((i=e,(0,y.T)(i.addEventListener)&&(0,y.T)(i.removeEventListener))?x.map(function(r){return function(i){return e[r](t,i,n)}}):(o=e,(0,y.T)(o.addListener)&&(0,y.T)(o.removeListener))?b.map(k(e,t)):(s=e,(0,y.T)(s.on)&&(0,y.T)(s.off))?w.map(k(e,t)):[],2),l=a[0],u=a[1];if(!l&&(0,m.X)(e))return(0,g.Z)(function(e){return S(e,t,n)})((0,p.Tg)(e));if(!l)throw TypeError("Invalid event target");return new f.c(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return l(t),function(){return u(t)}})}function k(e,t){return function(n){return function(r){return e[n](t,r)}}}var E=n(36144),_=n(35041),T=n(27236),j=n(37724),A=n(57272),C=n(94676),M=n(74200),P=n(65571);function I(e){return e<=0?function(){return P.w}:(0,j.N)(function(t,n){var r=0;t.subscribe((0,A._)(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}var R=n(45633);let O=e=>({context:t})=>{let{count:n,include:r,exclude:i,responseType:o="message.received"}=e;return{count:n,domain:t.domain,from:t.connectTo,include:r?Array.isArray(r)?r:[r]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:t.target,to:t.name}},$=(0,d.v)(()=>S(window,"message")),D=e=>(0,s.OX)(({input:t})=>{let n;return $.pipe(e?(0,E.T)(e):(0,_.F)(),(0,T.p)((e=>t=>{let{data:n}=t;
219return(!e.include.length||e.include.includes(n.type))&&(!e.exclude.length||!e.exclude.includes(n.type))&&n.domain===e.domain&&n.from===e.from&&n.to===e.to&&(!e.target||t.source===e.target)})(t)),(0,E.T)((n=t.responseType,e=>({type:n,message:e}))),t.count?(0,_.F)(function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,(0,j.N)(function(n,r){var i=[],o=0;n.subscribe((0,A._)(r,function(n){var s,a,l,u,c=null;o++%t==0&&i.push([]);try{for(var d=(0,h.Ju)(i),p=d.next();!p.done;p=d.next()){var f=p.value;f.push(n),e<=f.length&&(c=null!=c?c:[]).push(f)}}catch(e){s={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(s)throw s.error}}if(c)try{for(var g=(0,h.Ju)(c),m=g.next();!m.done;m=g.next()){var f=m.value;(0,C.o)(i,f),r.next(f)}}catch(e){l={error:e}}finally{try{m&&!m.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}},function(){var e,t;try{for(var n=(0,h.Ju)(i),o=n.next();!o.done;o=n.next()){var s=o.value;r.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}r.complete()},void 0,function(){i=null}))})}(t.count),(0,M.H)(e=>e),I(t.count)):(0,_.F)())}),L="sanity/comlink",V="comlink/response",N="comlink/heartbeat",z="comlink/disconnect",B="comlink/handshake/syn",F="comlink/handshake/syn-ack",U="comlink/handshake/ack",H=()=>(0,a.mj)({types:{},actors:{listen:(0,s.OX)(({input:e})=>{let t,n=e.signal?S(e.signal,"abort").pipe((t=`Request ${e.requestId} aborted`,e=>e.pipe(I(1),(0,E.T)(()=>{throw Error(t)})))):P.w;return S(window,"message").pipe((0,T.p)(t=>t.data?.type==="comlink/response"&&t.data?.responseTo===e.requestId&&!!t.source&&e.sources.has(t.source)),I(e.sources.size),(0,j.N)(function(e,t){(0,p.Tg)(n).subscribe((0,A._)(t,function(){return t.complete()},R.l)),t.closed||e.subscribe(t)}))})},actions:{"send message":({context:e},t)=>{let{sources:n,targetOrigin:r}=e,{message:i}=t;n.forEach(e=>{e.postMessage(i,{targetOrigin:r})})},"on success":(0,l.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.response&&e.resolvable?.resolve(e.response),{type:"request.success",requestId:t.id,response:e.response,responseTo:e.responseTo})),"on fail":(0,l.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${e.type}' on client '${e.from}' (ID: '${e.id}').`),e.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:t.id})),"on abort":(0,l.s)(({context:e})=>e.parentRef,({context:e,self:t})=>(e.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:t.id}))},guards:{expectsResponse:({context:e})=>e.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:e})=>e.responseTimeout??3e3}}).createMachine({context:({input:e})=>({channelId:e.channelId,data:e.data,domain:e.domain,expectResponse:e.expectResponse??!1,from:e.from,id:`msg-${o()}`,parentRef:e.parentRef,resolvable:e.resolvable,response:null,responseTimeout:e.responseTimeout,responseTo:e.responseTo,signal:e.signal,sources:e.sources instanceof Set?e.sources:new Set([e.sources]),suppressWarnings:e.suppressWarnings,targetOrigin:e.targetOrigin,to:e.to,type:e.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:e})=>{let{channelId:t,data:n,domain:r,from:i,id:o,responseTo:s,to:a,type:l}=e;return{message:{channelId:t,data:n,domain:r,from:i,id:o,to:a,type:l,responseTo:s}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:e})=>({requestId:e.id,sources:e.sources,signal:e.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:(0,u.a)({response:({event:e})=>e.data.data,responseTo:({event:e})=>e.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:e,self:t})=>({requestId:t.id,response:e.response,responseTo:e.responseTo})});(0,s.SP)(({sendBack:e,input:t})=>{let n=()=>{e(t.event)};t.immediate&&n();let r=setInterval(n,t.interval);return()=>{clearInterval(r)}});let W=()=>(0,a.mj)({types:{},actors:{requestMachine:H(),listen:D()},actions:{"buffer handshake":(0,u.a)({handshakeBuffer:({event:e,context:t})=>((0,a.DT)(e,"message.received"),[...t.handshakeBuffer,e])}),"buffer message":(0,l.e)(({enqueue:e})=>{e.assign({buffer:({event:e,context:t})=>((0,a.DT)(e,"post"),[...t.buffer,{data:e.data,resolvable:e.resolvable,options:e.options}])}),e.emit(({event:e})=>((0,a.DT)(e,"post"),{type:"buffer.added",message:e.data}))}),"create request":(0,u.a)({requests:({context:e,event:t,self:n,spawn:r})=>{(0,a.DT)(t,"request");let i=(Array.isArray(t.data)?t.data:[t.data]).map(t=>r("requestMachine",{id:`req-${o()}`,input:{channelId:e.channelId,data:t.data,domain:e.domain,expectResponse:t.expectResponse,from:e.name,parentRef:n,resolvable:t.resolvable,responseTimeout:t.options?.responseTimeout,responseTo:t.responseTo,signal:t.options?.signal,sources:e.target,suppressWarnings:t.o
219ptions?.suppressWarnings,targetOrigin:e.targetOrigin,to:e.connectTo,type:t.type}}));return[...e.requests,...i]}}),"emit heartbeat":(0,l.a)(()=>({type:"heartbeat"})),"emit received message":(0,l.e)(({enqueue:e})=>{e.emit(({event:e})=>((0,a.DT)(e,"message.received"),{type:"message",message:e.message.data}))}),"emit status":(0,l.a)((e,t)=>({type:"status",status:t.status})),"post message":(0,c.r)(({event:e})=>((0,a.DT)(e,"post"),{type:"request",data:{data:e.data.data,expectResponse:!!e.resolvable,type:e.data.type,resolvable:e.resolvable,options:e.options}})),"process pending handshakes":(0,l.e)(({context:e,enqueue:t})=>{e.handshakeBuffer.forEach(e=>t.raise(e)),t.assign({handshakeBuffer:[]})}),"remove request":(0,l.e)(({context:e,enqueue:t,event:n})=>{(0,a.DT)(n,["request.success","request.failed","request.aborted"]),(0,c.s)(n.requestId),t.assign({requests:e.requests.filter(({id:e})=>e!==n.requestId)})}),"send response":(0,c.r)(({event:e})=>((0,a.DT)(e,["message.received","heartbeat.received"]),{type:"request",data:{type:V,responseTo:e.message.data.id,data:void 0}})),"send handshake syn ack":(0,c.r)({type:"request",data:{type:F}}),"send pending messages":(0,l.e)(({enqueue:e})=>{e.raise(({context:e})=>({type:"request",data:e.buffer.map(({data:e,resolvable:t,options:n})=>({data:e.data,type:e.type,expectResponse:!!t,resolvable:t,options:n}))})),e.emit(({context:e})=>({type:"buffer.flushed",messages:e.buffer.map(({data:e})=>e)})),e.assign({buffer:[]})}),"set connection config":(0,u.a)({channelId:({event:e})=>((0,a.DT)(e,"handshake.syn"),e.message.data.channelId),target:({event:e})=>((0,a.DT)(e,"handshake.syn"),e.message.source||void 0),targetOrigin:({event:e})=>((0,a.DT)(e,"handshake.syn"),e.message.origin)})},guards:{hasSource:({context:e})=>null!==e.target}}).createMachine({id:"node",context:({input:e})=>({buffer:[],channelId:null,connectTo:e.connectTo,domain:e.domain??"sanity/comlink",handshakeBuffer:[],name:e.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:O({include:B,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}},initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:O({include:U,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:O({include:z,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:O({exclude:[z,B,U,N,V]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:O({exclude:[z,B,U,N,V]})},{id:"listen for heartbeat",src:"listen",input:O({include:N,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:O({include:z,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}}),q=(e,t=W())=>{let n=(0,c.c)(t,{input:e}),r=new Map,i=new Map,o;n.on("message",({message:e})=>{let t=r.get(e.type);if(t)return void t.forEach(t=>t(e.data));let n=i.get(e.type);n?n.add(e):i.set(e.type,new Set([e]))});let s=()=>{n.stop()};return{actor:n,fetch:(e,t,r)=>{let{responseTimeout:i=1e4,signal:o,suppressWarnings:s}=r||{},a=function(){let e,t;return"function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}();return n.send({type:"post",data:{type:e,data:t},resolvable:a,options:{responseTimeout:i,signal:o,suppressWarnings:s}}),a.promise},machine:t,on:(e,t,n)=>{let o=r.get(e)||new Set;r.has(e)||r.set(e,o),o.add(t);let s=i.get(e);if(s){let r=n?.replay??1;Array.from(s).slice(-r).forEach(({data:e})=>t(e)),i.delete(e)}return()=>{o.delete(t)}},onStatus:(e,t)=>{let r=n.on("status",n=>{o=n.status,t&&n.status!==t||e(n.status)});return o&&e(o),()=>r.unsubscribe()},post:(e,t)=>
219{n.send({type:"post",data:{type:e,data:t}})},start:()=>(n.start(),s),stop:s}}},67699:(e,t,n)=>{"use strict";n.d(t,{i:()=>ed,o:()=>en,t:()=>eg});let r=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],i=["50","100","200","300","400","500","600","700","800","900","950"],o={black:{title:"Black",hex:"#0d0e12"},white:{title:"White",hex:"#ffffff"},gray:{50:{title:"Gray 50",hex:"#f6f6f8"},100:{title:"Gray 100",hex:"#eeeef1"},200:{title:"Gray 200",hex:"#e3e4e8"},300:{title:"Gray 300",hex:"#bbbdc9"},400:{title:"Gray 400",hex:"#9499ad"},500:{title:"Gray 500",hex:"#727892"},600:{title:"Gray 600",hex:"#515870"},700:{title:"Gray 700",hex:"#383d51"},800:{title:"Gray 800",hex:"#252837"},900:{title:"Gray 900",hex:"#1b1d27"},950:{title:"Gray 950",hex:"#13141b"}},blue:{50:{title:"Blue 50",hex:"#f5f8ff"},100:{title:"Blue 100",hex:"#e5edff"},200:{title:"Blue 200",hex:"#dbe5ff"},300:{title:"Blue 300",hex:"#a8bfff"},400:{title:"Blue 400",hex:"#7595ff"},500:{title:"Blue 500",hex:"#556bfc"},600:{title:"Blue 600",hex:"#4043e7"},700:{title:"Blue 700",hex:"#2927aa"},800:{title:"Blue 800",hex:"#192457"},900:{title:"Blue 900",hex:"#161a41"},950:{title:"Blue 950",hex:"#101228"}},purple:{50:{title:"Purple 50",hex:"#f8f5ff"},100:{title:"Purple 100",hex:"#f1ebff"},200:{title:"Purple 200",hex:"#ece1fe"},300:{title:"Purple 300",hex:"#ccb1fc"},400:{title:"Purple 400",hex:"#b087f7"},500:{title:"Purple 500",hex:"#8f57ef"},600:{title:"Purple 600",hex:"#721fe5"},700:{title:"Purple 700",hex:"#4c1a9e"},800:{title:"Purple 800",hex:"#2f1862"},900:{title:"Purple 900",hex:"#23173f"},950:{title:"Purple 950",hex:"#181128"}},magenta:{50:{title:"Magenta 50",hex:"#fef6f9"},100:{title:"Magenta 100",hex:"#fde8ef"},200:{title:"Magenta 200",hex:"#fcdee9"},300:{title:"Magenta 300",hex:"#f7abc5"},400:{title:"Magenta 400",hex:"#f0709b"},500:{title:"Magenta 500",hex:"#e72767"},600:{title:"Magenta 600",hex:"#b11651"},700:{title:"Magenta 700",hex:"#7c1342"},800:{title:"Magenta 800",hex:"#4b1130"},900:{title:"Magenta 900",hex:"#341325"},950:{title:"Magenta 950",hex:"#1f0f14"}},red:{50:{title:"Red 50",hex:"#fff6f5"},100:{title:"Red 100",hex:"#ffe7e5"},200:{title:"Red 200",hex:"#ffdedc"},300:{title:"Red 300",hex:"#fdada5"},400:{title:"Red 400",hex:"#f77769"},500:{title:"Red 500",hex:"#ef4434"},600:{title:"Red 600",hex:"#cc2819"},700:{title:"Red 700",hex:"#8b2018"},800:{title:"Red 800",hex:"#4d1714"},900:{title:"Red 900",hex:"#321615"},950:{title:"Red 950",hex:"#1e1011"}},orange:{50:{title:"Orange 50",hex:"#fff7f0"},100:{title:"Orange 100",hex:"#ffeadb"},200:{title:"Orange 200",hex:"#ffddc7"},300:{title:"Orange 300",hex:"#ffb685"},400:{title:"Orange 400",hex:"#ff8e42"},500:{title:"Orange 500",hex:"#fa6400"},600:{title:"Orange 600",hex:"#b14802"},700:{title:"Orange 700",hex:"#7c3404"},800:{title:"Orange 800",hex:"#461e07"},900:{title:"Orange 900",hex:"#32160b"},950:{title:"Orange 950",hex:"#21120d"}},yellow:{50:{title:"Yellow 50",hex:"#fefae1"},100:{title:"Yellow 100",hex:"#fcf3bb"},200:{title:"Yellow 200",hex:"#f9e994"},300:{title:"Yellow 300",hex:"#f7d455"},400:{title:"Yellow 400",hex:"#f9bc15"},500:{title:"Yellow 500",hex:"#d28a04"},600:{title:"Yellow 600",hex:"#965908"},700:{title:"Yellow 700",hex:"#653a0b"},800:{title:"Yellow 800",hex:"#3b220c"},900:{title:"Yellow 900",hex:"#271a11"},950:{title:"Yellow 950",hex:"#181410"}},green:{50:{title:"Green 50",hex:"#e7fef5"},100:{title:"Green 100",hex:"#c5fce8"},200:{title:"Green 200",hex:"#a9f9dc"},300:{title:"Green 300",hex:"#59f3ba"},400:{title:"Green 400",hex:"#0ff0a1"},500:{title:"Green 500",hex:"#04b97a"},600:{title:"Green 600",hex:"#01794f"},700:{title:"Green 700",hex:"#015133"},800:{title:"Green 800",hex:"#023120"},900:{title:"Green 900",hex:"#06231a"},950:{title:"Green 950",hex:"#071715"}},cyan:{50:{title:"Cyan 50",hex:"#e7fefe"},100:{title:"Cyan 100",hex:"#c5fcfc"},200:{title:"Cyan 200",hex:"#96f8f8"},300:{title:"Cyan 300",hex:"#62efef"},400:{title:"Cyan 400",hex:"#18e2e2"},500:{title:"Cyan 500",hex:"#04b8be"},600:{title:"Cyan 600",hex:"#037782"},700:{title:"Cyan 700",hex:"#024950"},800:{title:"Cyan 800",hex:"#042f34"},900:{title:"Cyan 900",hex:"#072227"},950:{title:"Cyan 950",hex:"#0d181c"}}},s={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}}
219,radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},a={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}};function l(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!1,configurable:!1}),r},enumerable:!0,configurable:!0})}let u=new WeakMap,c=["transparent","default","primary","positive","caution","critical"];function d(e,t){let n={};for(let r of c)l(n,r,()=>{var n;return{base:{bg:(n=t[e][r]).bg,fg:n.fg,border:n.border,focusRing:n.focusRing,shadow:n.shadow},button:n.button,card:n.selectable.default,dark:n._dark,input:{default:p(n.input.default),invalid:p(n.input.invalid)},muted:{...n.button.ghost,transparent:n.button.ghost.default},solid:{...n.button.default,transparent:n.button.default.default},selectable:n.selectable,spot:{gray:n.avatar.gray.bg,blue:n.avatar.blue.bg,purple:n.avatar.purple.bg,magenta:n.avatar.magenta.bg,red:n.avatar.red.bg,orange:n.avatar.orange.bg,yellow:n.avatar.yellow.bg,green:n.avatar.green.bg,cyan:n.avatar.cyan.bg},syntax:n.syntax}});return n}function h(e){let t=u.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:s,input:a,media:c,radius:h,shadow:p,space:f,style:g}=e,m={};l(m,"light",()=>d("light",i)),l(m,"dark",()=>d("dark",i));let y={_version:0,avatar:n,button:r,container:o,color:m,focusRing:a.text.focusRing,fonts:s,input:a,media:c,radius:h,shadows:p,space:f,styles:g,v2:e};return u.set(e,y),y}function p(e){return{enabled:f(e.enabled),disabled:f(e.disabled),readOnly:f(e.readOnly),hovered:f(e.hovered)}}function f(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let g=["multiply","screen"],m=["transparent","default","neutral","primary","suggest","positive","caution","critical"],y=["default","neutral","primary","suggest","positive","caution","critical"],v=["enabled","hovered","pressed","selected","disabled"],b=["default","ghost","bleed"],x=["default","invali
219d"],w=["enabled","hovered","readOnly","disabled"];function S(e){return i.includes(e)}function k(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}function E(e){return/^\d+%$/.test(e)}function _(e){let t=e.split("/"),n=t.shift()||"",[i,o]=n.split(" ");if(S(i)){let e=t.shift()||"";return E(o)?{type:"color",tint:i,mix:Number(o.slice(0,-1))/100}:k(e)?{type:"color",tint:i,opacity:Number(e)}:{type:"color",tint:i}}if("black"===i||"white"===i){let e=t.shift()||"";return E(o)?{type:"color",key:i,mix:Number(o.slice(0,-1))/100}:k(e)?{type:"color",key:i,opacity:Number(e)}:{type:"color",key:i}}if(r.includes(i)){let[e,r]=(n=t.shift()||"").split(" ");if(S(e)){let n=t.shift()||"";return E(r)?{type:"color",hue:i,tint:e,mix:Number(r.slice(0,-1))/100}:k(n)?{type:"color",hue:i,tint:e,opacity:Number(n)}:{type:"color",hue:i,tint:e}}return{type:"hue",value:i}}if(g.includes(i))return{type:"blendMode",value:i}}[...r],[...m],[...y],[...v],[...x],[...w];let T=["500","500"];function j(e,t=T){var n;let r,{hue:i,scheme:o}=e,s=_(t[+("light"!==o)]);if(!s||"color"!==s.type)throw Error(`Invalid color token: ${t[0]}`);return n={...s,hue:s.hue||i},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0===n.mix?(void 0!==n.opacity&&(r+=`/${n.opacity}`),r):`${r} ${100*n.mix}%`}let A={base:{"*":{_blend:["multiply","screen"],accent:{fg:["purple/600","purple/400"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},backdrop:["gray/200/0.5","black/0.5"],badge:{"*":{bg:["100","900"],fg:["600","400"],icon:["500","500"],dot:["500","500"]},positive:{bg:["200 50%","900"],fg:["600","500"]},caution:{bg:["200 50%","900"],fg:["600","500"]}},bg:["50","950"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["800","200"],focusRing:["blue/500","blue/500"],icon:["600","400"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/600","blue/300"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},shadow:{outline:["500/0.3","500/0.4"],umbra:["gray/500/0.1","black/0.2"],penumbra:["gray/500/0.07","black/0.14"],ambient:["gray/500/0.06","black/0.12"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},transparent:{bg:["50","black"]},default:{bg:["white","950"],fg:["800","200"],muted:{fg:["600","400"]}},primary:{_hue:"blue"},suggest:{_hue:"purple"},positive:{_hue:"green",shadow:{outline:["500/0.4","500/0.4"]}},caution:{_hue:"yellow",shadow:{outline:["600/0.3","500/0.4"]}},critical:{_hue:"red"}},button:{default:{"*":{"*":{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500/0","400/0"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["950","50"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},hovered:{bg:["600","300"],border:["700/0","300/0"]},pressed:{bg:["700","300"]},selected:{bg:["700","300"]},disabled:{_hue:"gray",accent:{fg:["100 70%","900 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/500","gray/400"],fg:["white","black"]}},badge:{"*":{bg:["gray/700","gray/300"],fg:["white","black"],dot:["white","black"],icon:["white","black"]}},bg:["300","600"],code:{bg:["950","50"],fg:["300","600"]},fg:["300","600"],muted:{bg:["950","50"],fg:["300","600"]},kbd:{bg:["black","white"],fg:["white","black"],border:["700","300"]},link:{fg:["100 70%","900 70%"]}}},default:{"*":{avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},bg:["800","200"],muted:{bg:["950","50"],fg:["400","600"]}},hovered:{bg:["900","100"]},pressed:{bg:["black","white"]},selected:{bg:["black","white"]}}},ghost:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 60%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["50","950"],border:["100","900"],code:{bg:["500 10%","400 10%"],fg:["700 60%","400 60%"]},fg:["600","400"],icon:["700 60%","300 60%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 60%","blue/300 60%"]},muted:{bg:["100","950"],fg:["700 60%","300 60%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["100","900"],fg:["700","300"]},pressed:{bg:["200","800"],fg:["800","200"]},selected:{bg:["200","800"],fg:["800","200"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}}
219,badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["300","700"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}},positive:{"*":{border:["600 20%","800"]}},caution:{"*":{border:["600 20%","800"]}}},bleed:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["white/0","black/0"],code:{bg:["50","950"],fg:["700 75%","300 75%"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["700","300"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["100","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","900"],fg:["800","200"],icon:["800 70%","300 70%"]},pressed:{bg:["100","800"],fg:["800","200"],icon:["800 70%","200 70%"]},selected:{bg:["100","900"],fg:["800","200"],icon:["800 60%","200 60%"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["400","600"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}}}},input:{"*":{"*":{_blend:["multiply","screen"],bg:["white","black"],border:["200","700"],fg:["black","200"],muted:{bg:["50","950"]},placeholder:["400","600"]},hovered:{border:["300","700"]},readOnly:{bg:["50","950"],border:["200","800"],fg:["800","200"]},disabled:{bg:["50","950"],fg:["400","600"],border:["100","900"],placeholder:["200","800 50%"]}},invalid:{"*":{_hue:"red",bg:["100","950"]}}},selectable:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","950"]},pressed:{bg:["100","900"]},selected:{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["multiply","screen"],bg:["white","black"],fg:["black","white"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500 20%","400 20%"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["500 10%","400 10%"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["200","800"],icon:["200","800"],kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]},muted:{bg:["50 50%","950 50%"],fg:["200","800"]}}},default:{selected:{_hue:"blue"}},critical:{disabled:{bg:["50 50%","950 50%"]}}},syntax:{atrule:["purple/600","purple/400"],attrName:["green/600","green/400"],attrValue:["yellow/600","yellow/400"],attribute:["yellow/600","yellow/400"],boolean:["purple/600","purple/400"],builtin:["purple/600","purple/400"],c
219data:["yellow/600","yellow/400"],char:["yellow/600","yellow/400"],class:["orange/600","orange/400"],className:["cyan/600","cyan/400"],comment:["gray/400","gray/600"],constant:["purple/600","purple/400"],deleted:["red/600","red/400"],entity:["red/600","red/400"],function:["green/600","green/400"],hexcode:["blue/600","blue/400"],id:["purple/600","purple/400"],important:["purple/600","purple/400"],inserted:["yellow/600","yellow/400"],keyword:["magenta/600","magenta/400"],number:["purple/600","purple/400"],operator:["magenta/600","magenta/400"],property:["blue/600","blue/400"],pseudoClass:["yellow/600","yellow/400"],pseudoElement:["yellow/600","yellow/400"],punctuation:["gray/600","gray/400"],regex:["blue/600","blue/400"],selector:["red/600","red/400"],string:["yellow/600","yellow/400"],symbol:["purple/600","purple/400"],tag:["red/600","red/400"],unit:["orange/600","orange/400"],url:["red/600","red/400"],variable:["red/600","red/400"]}};function C(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function M(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(P,{})}function P(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];e[n]=C(r)&&C(i)?M(r,i):i}return e}function I(e,t){let{scheme:n}=e,r={};for(let e of m)l(r,e,()=>(function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])[+("light"!==n)],_dark:"dark"===n,accent:{fg:j(o,i?.accent?.fg)},avatar:R({scheme:n},i),backdrop:j(o,i?.backdrop),badge:$(i?.badge,{scheme:n},t),bg:j(o,i?.bg),border:j(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of b)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of y)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,s={};for(let e of v)s[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:s}=e,a=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[s],u=l?._hue||a?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c[+("light"!==o)],accent:{fg:j(d,l?.accent?.fg)},avatar:R({scheme:o},l),badge:$(l?.badge,{scheme:o},t),bg:j(d,l?.bg),border:j(d,l?.border),code:{bg:j(d,l?.code?.bg),fg:j(d,l?.code?.fg)},fg:j(d,l?.fg),icon:j(d,l?.icon),muted:{bg:j(d,l?.muted?.bg),fg:j(d,l?.muted?.fg)},kbd:{bg:j(d,l?.kbd?.bg),fg:j(d,l?.kbd?.fg),border:j(d,l?.kbd?.border)},link:{fg:j(d,l?.link?.fg)},skeleton:{from:j(d,l?.skeleton?.from),to:j(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return s}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:j(o,i?.code?.bg),fg:j(o,i?.code?.fg)},fg:j(o,i?.fg),focusRing:j(o,i?.focusRing),icon:j(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:D({mode:"default",scheme:n,tone:r},t),invalid:D({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:j(o,i?.kbd?.bg),fg:j(o,i?.kbd?.fg),border:j(o,i?.kbd?.border)},link:{fg:j(o,i?.link?.fg)},muted:{bg:j(o,i?.muted?.bg),fg:j(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of y)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of v)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,s=t?.color?.base?.[n],a=t?.color?.selectable?.[o]?.[i],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u[+("light"!==r)],accent:{fg:j(c,a?.accent?.fg)},avatar:R({scheme:r},a),badge:$(a?.badge,{scheme:r},t),bg:j(c,a?.bg),border:j(c,a?.border),code:{bg:j(c,a?.code?.bg),fg:j(c,a?.code?.fg)},fg:j(c,a?.fg),icon:j(c,a?.icon),muted:{bg:j(c,a?.muted?.bg),fg:j(c,a?.muted?.fg)},kbd:{bg:j(c,a?.kbd?.bg),fg:j(c,a?.kbd?.fg),border:j(c,a?.kbd?.border)},link:{fg:j(c,a?.link?.fg)},skeleton:{from:j(c,a?.skeleton?.from),to:j(c,a?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:j(o,i?.shadow?.outline),umbra:j(o,i?.shadow?.umbra),penumbra:j(o,i?.shadow?.penumbra),ambient:j(o,i?.shadow?.ambient)}}
219({scheme:n,tone:r},t),skeleton:{from:j(o,i?.skeleton?.from),to:j(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:j(i,r?.atrule),attrName:j(i,r?.attrName),attrValue:j(i,r?.attrValue),attribute:j(i,r?.attribute),boolean:j(i,r?.boolean),builtin:j(i,r?.builtin),cdata:j(i,r?.cdata),char:j(i,r?.char),class:j(i,r?.class),className:j(i,r?.className),comment:j(i,r?.comment),constant:j(i,r?.constant),deleted:j(i,r?.deleted),doctype:j(i,r?.doctype),entity:j(i,r?.entity),function:j(i,r?.function),hexcode:j(i,r?.hexcode),id:j(i,r?.id),important:j(i,r?.important),inserted:j(i,r?.inserted),keyword:j(i,r?.keyword),number:j(i,r?.number),operator:j(i,r?.operator),prolog:j(i,r?.prolog),property:j(i,r?.property),pseudoClass:j(i,r?.pseudoClass),pseudoElement:j(i,r?.pseudoElement),punctuation:j(i,r?.punctuation),regex:j(i,r?.regex),selector:j(i,r?.selector),string:j(i,r?.string),symbol:j(i,r?.symbol),tag:j(i,r?.tag),unit:j(i,r?.unit),url:j(i,r?.url),variable:j(i,r?.variable)}}({scheme:n},t)}})({scheme:n,tone:e},t));return r}function R(e,t){let{scheme:n}=e;return{gray:O({color:"gray",scheme:n},t),blue:O({color:"blue",scheme:n},t),purple:O({color:"purple",scheme:n},t),magenta:O({color:"magenta",scheme:n},t),red:O({color:"red",scheme:n},t),orange:O({color:"orange",scheme:n},t),yellow:O({color:"yellow",scheme:n},t),green:O({color:"green",scheme:n},t),cyan:O({color:"cyan",scheme:n},t)}}function O(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])[+("light"!==r)],bg:j(o,i?.bg),fg:j(o,i?.fg)}}function $(e,t,n){let{scheme:r}=t,i={};for(let t of y)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],s={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:j(s,o?.bg),fg:j(s,o?.fg),dot:j(s,o?.dot),icon:j(s,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function D(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:L({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:L({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:L({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:L({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function L(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,s=t?.color?.base?.[n],a=t?.color?.input?.[r]?.[o],l=a?._hue||s?._hue||"gray",u=a?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u[+("light"!==i)],bg:j(c,a?.bg),border:j(c,a?.border),fg:j(c,a?.fg),muted:{bg:j(c,a?.muted?.bg)},placeholder:j(c,a?.placeholder)}}function V(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function N(e,t,n,r,i){var o;return n*(1-(o=V((i-e)/(t-e))))+r*o}function z(e){return Math.round(e)}function B(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function F(e){let t=z(V(Math.round(e.r),0,255)),n=z(V(Math.round(e.g),0,255)),r=z(V(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(0x1000000+(t<<16)+(n<<8)+r).toString(16).slice(1)}let U=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function H(e){var t;if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return B(e);if(e.startsWith("hsl(")){let n,r,i,o,s,a,l,u;return n=(t=function(e){let t=U.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e)).s/100,o=(i=(1-Math.abs(2*(r=t.l/100)-1))*n)*(1-Math.abs(t.h/60%2-1)),s=r-i/2,a=0,l=0,u=0,0<=t.h&&t.h<60?(a=i,l=o,u=0):60<=t.h&&t.h<120?(a=o,l=i,u=0):120<=t.h&&t.h<180?(a=0,l=i,u=o):180<=t.h&&t.h<240?(a=0,l=o,u=i):240<=t.h&&t.h<300?(a=o,l=0,u=i):300<=t.h&&t.h<360&&(a=i,l=0,u=o),{r:Math.round((a+s)*255),g:Math.round((l+s)*255),b:Math.round((u+s)*255)}}if(e.startsWith("rgba(")){let t;return{r:parseInt((t=e.replace(/rgba\(|\)/g,"").split(","))[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}throw Error(`parseColor: unexpected color format: "${e}"`)}let W=[0,255];function q(e,t){var n,r,i,o,s,a,l,u,c,d,h;let p,{bg:f,blendMode:g,colorPalette:m}=t;if("white"===f)throw Error("Cannot blend with white background");let y=_(e);if(!y||"color"!==y.type)throw Error(`Invalid color token value: ${e}`);let v="";if("black"===y.key&&(v=G(m.black)),"white"===y.key&&(v=G(m.white)),y.hue&&y.tint&&(v=G(m[y.hue][y.tint])),!v)throw Error(`Invalid color token value: ${e}`);let b=v,x={blendMode:g,bg:f,black:G(m.black),white:G(m.white)};try{v=function(e,t){var n,r,i,o,s,a;let{blendMode:l}=t,u=H(e),c=H(t.black),d=H(t.white),h=t.bg?H(t.bg):"multiply"===l?d:c,p={r:[c.r,d.r],g:[c.g,d.g],b:[c.b,d.b]},f={r:V(N(...p.r,...W,h.r),...W),g:V(N(...p.g,...W,h.g),...W),b:V(N(...p.b,...W,h.b),...W)},g={r:V(N(...p.r,...W,u.r),...W),g:V(N(...p.g,...W,u.g),...W),b:V(N(...p.b,...W,u.b),...W)},m="multiply"===l?{r:255*(f.r/255*(g.r/255)),g:255*(f.g/255*(g.g/255)),b:255*(f.b/255*(g.b/255))}:{r:255*((n=f.r/255)+(r=g.r/255)-n*r),g:255*((i=f.g/255)+(o=g.g/255)-i*o),b:255*((s=f.b/255)+(a=g.b/255)-s*a)};return F({r:V(N(...W,...p.r,m.r),...p.r),g:V(N(...W,...p.g,m.g),...p.g),b:V(N(...W,...p.b,m.b),...p.b)})}(v,x),f&&void 0!==y.mix&&(v=F((n=B(f),r=B(v),i=y.mix,{r:(o=n.r,s=r.r,o+(s-o)*i),g:(a=n.g,l=r.g,a+(l-a)*i),b:(u=n.b,c=r.b,u+(c-u)*i)})))}catch(e){throw console.warn("could not blend",v,x),e}
219return"#aN"===v&&(console.warn(`invalid color token value: ${e}`),v=b),void 0!==y.opacity&&(d=v,h=y.opacity,p=H(d),v=`rgba(${p.r},${p.g},${p.b},${h})`),v}function G(e){return"string"==typeof e?e:e.hex}function Y(e,t){let n=X(t.default,{colorPalette:e}),r=n.bg;if("white"===r)throw Error("Cannot blend with white background");let i={default:n};for(let n of m){if("default"===n)continue;let o="transparent"===n?{colorPalette:e}:{bg:r,colorPalette:e};l(i,n,()=>X(t[n],o))}return i}function X(e,t){var n,r,i,o;let{colorPalette:s,bg:a}=t,l=e._blend||"multiply",u=q(e.bg,{colorPalette:s,bg:a,blendMode:l}),c={colorPalette:s,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:s},{default:J(n.default,r),ghost:J(n.ghost,r),bleed:J(n.bleed,r)}),h=function(e,t){let n={};for(let o of y){var r,i;n[o]=(r=e[o],i=t,{enabled:Q(r.enabled,i),hovered:Q(r.hovered,i),pressed:Q(r.pressed,i),selected:Q(r.selected,i),disabled:Q(r.disabled,i)})}return n}(e.selectable,{colorPalette:s,baseBg:u,blendMode:l}),p={outline:q(e.shadow.outline,c),umbra:q(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),penumbra:q(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}}),ambient:q(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...s,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:q(e.accent.fg,c)},avatar:K(e.avatar,{baseBg:u,colorPalette:s,blendMode:l}),backdrop:q(e.backdrop,c),badge:Z(e.badge,{baseBg:u,colorPalette:s,blendMode:l}),bg:u,border:q(e.border,c),button:d,code:{bg:q(e.code.bg,c),fg:q(e.code.fg,c)},fg:q(e.fg,c),focusRing:q(e.focusRing,c),icon:q(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:s,blendMode:l},{default:ee(i.default,o),invalid:ee(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=q(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:q(e.fg,s),border:q(e.border,s)}}(e.kbd,{baseBg:u,colorPalette:s,blendMode:l}),link:{fg:q(e.link.fg,c)},muted:{bg:q(e.muted.bg,c),fg:q(e.muted.fg,c)},shadow:p,skeleton:{from:q(e.skeleton.from,c),to:q(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:q(e.atrule,o),attrName:q(e.attrName,o),attrValue:q(e.attrValue,o),attribute:q(e.attribute,o),boolean:q(e.boolean,o),builtin:q(e.builtin,o),cdata:q(e.cdata,o),char:q(e.char,o),class:q(e.class,o),className:q(e.className,o),comment:q(e.comment,o),constant:q(e.constant,o),deleted:q(e.deleted,o),doctype:q(e.doctype,o),entity:q(e.entity,o),function:q(e.function,o),hexcode:q(e.hexcode,o),id:q(e.id,o),important:q(e.important,o),inserted:q(e.inserted,o),keyword:q(e.keyword,o),number:q(e.number,o),operator:q(e.operator,o),prolog:q(e.prolog,o),property:q(e.property,o),pseudoClass:q(e.pseudoClass,o),pseudoElement:q(e.pseudoElement,o),punctuation:q(e.punctuation,o),regex:q(e.regex,o),selector:q(e.selector,o),string:q(e.string,o),symbol:q(e.symbol,o),tag:q(e.tag,o),unit:q(e.unit,o),url:q(e.url,o),variable:q(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:s,blendMode:l}),selectable:h}}function K(e,t){let n={};for(let i of r)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=q(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:s,fg:q(e.fg,{bg:s,blendMode:o,colorPalette:i})}}(e[i],t);return n}function Z(e,t){let n={};for(let r of y)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=q(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:q(e.dot,s),fg:q(e.fg,s),icon:q(e.icon,s)}}(e[r],t);return n}function J(e,t){let n={};for(let o of y){var r,i;n[o]=(r=e[o],i=t,{enabled:Q(r.enabled,i),hovered:Q(r.hovered,i),pressed:Q(r.pressed,i),selected:Q(r.selected,i),disabled:Q(r.disabled,i)})}return n}function Q(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=q(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:s,blendMode:o,colorPalette:i};return{_blend:o,accent:{fg:q(e.accent.fg,a)},avatar:K(e.avatar,{baseBg:s,colorPalette:i,blendMode:o}),badge:Z(e.badge,{baseBg:s,colorPalette:i,blendMode:o}),bg:s,border:q(e.border,a),code:{bg:q(e.code.bg,a),fg:q(e.code.fg,a)},fg:q(e.fg,a),icon:q(e.icon,a),link:{fg:q(e.link.fg,a)},muted:{bg:q(e.muted.bg,a),fg:q(e.muted.fg,a)},kbd:{bg:q(e.kbd.bg,a),fg:q(e.kbd.fg,a),border:q(e.kbd.border,a)},skeleton:{from:q(e.skeleton?.from,a),to:q(e.skeleton?.to,a)}}}function ee(e,t){return{enabled:et(e.enabled,t),hovered:et(e.hovered,t),readOnly:et(e.readOnly,t),disabled:et(e.disabled,t)}}function et(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",s=q(e.bg,{colorPalette:i,bg:n,blendMode:r}),a={colorPalette:i,bg:s,blendMode:o};return{_blend:o,bg:s,border:q(e.border,a),fg:q(e.fg,a),muted:{bg:q(e.muted.bg,a)},placeholder:q(e.placeholder,a)}}function en(e){var t;
219let n,i,u,c,d,p=(i={...t=e,color:{base:function(e){let t={};for(let n of m)t[n]=function(e,t){let n=M(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:M({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:y.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...n.badge?.["*"],...n.badge?.[r]}}),{})}}(e,n);return t}(n=M(A,t?.color)),button:function(e){let t={};for(let n of b)t[n]=function(e,t){let n={};for(let i of y)n[i]=function(e,t,n){let i={};for(let o of v)i[o]=function(e,t,n,i){let o=M(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),s=o._hue||e?.base?.[t]?._hue;return{...o,_hue:s,avatar:r.reduce((e,t)=>({...e,[t]:M({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:y.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||s,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(n),input:function(e){let t={};for(let n of x)t[n]=function(e,t){let n={};for(let r of w)n[r]=function(e,t,n){let r=M(e?.input?.["*"]?.["*"],e?.
219input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(e,t,r);return n}(e,n);return t}(n),selectable:function(e){let t={};for(let n of y)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of v)n[i]=function(e,t,n){let i=M(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:r.reduce((e,t)=>({...e,[t]:M({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:y.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(n),syntax:n.syntax}},l(u={},"light",()=>I({scheme:"light"},i)),l(u,"dark",()=>I({scheme:"dark"},i)),u);return h({_version:2,avatar:e?.avatar??s.avatar,button:e?.button??s.button,card:e?.card??s.card,color:(c=e?.palette??o,l(d={},"light",()=>Y(c,p.light)),l(d,"dark",()=>Y(c,p.dark)),d),container:e?.container??s.container,font:e?.font??a,input:e?.input??s.input,layer:e?.layer??s.layer,media:e?.media??s.media,radius:e?.radius??s.radius,shadow:e?.shadow??s.shadow,space:e?.space??s.space,style:e?.style??s.style})}let er={transparent:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},primary:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},positive:{lightest:"hsl(120, 100%, 95%)",lighter:"hsl(120, 100%, 70%)",light:"hsl(120, 100%, 65%)",base:"hsl(120, 100%, 50%)",dark:"hsl(120, 100%, 35%)",darker:"hsl(120, 100%, 20%)",darkest:"hsl(120, 100%, 5%)"},caution:{lightest:"hsl(60, 100%, 95%)",lighter:"hsl(60, 100%, 70%)",light:"hsl(60, 100%, 65%)",base:"hsl(60, 100%, 50%)",dark:"hsl(60, 100%, 35%)",darker:"hsl(60, 100%, 20%)",darkest:"hsl(60, 100%, 5%)"},critical:{lightest:"hsl(0, 100%, 95%)",lighter:"hsl(0, 100%, 70%)",light:"hsl(0, 100%, 65%)",base:"hsl(0, 100%, 50%)",dark:"hsl(0, 100%, 35%)",darker:"hsl(0, 100%, 20%)",darkest:"hsl(0, 100%, 5%)"}};er.transparent.darkest,er.transparent.lightest,er.transparent.lightest,er.transparent.darkest,er.transparent.darker,er.transparent.lighter,er.transparent.base,er.transparent.base,er.primary.darkest,er.primary.lightest,er.primary.lightest,er.primary.darkest,er.primary.darker,er.primary.lighter,er.primary.base,er.primary.base,er.positive.darkest,er.positive.lightest,er.positive.lightest,er.positive.darkest,er.positive.darker,er.positive.lighter,er.positive.base,er.positive.base,er.caution.darkest,er.caution.lightest,er.caution.lightest,er.caution.darkest,er.caution.darker,er.caution.lighter,er.caution.base,er.caution.base,er.critical.darkest,er.critical.lightest,er.critical.lightest,er.critical.darkest,er.critical.darker,er.critical.lighter,er.critical.base,er.critical.base;let ei=new WeakMap;function eo(e){let t=ei.get(e);if(t)return t;let n=ea(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:es(e,e.button.default),ghost:es(e,e.button.ghost),bleed:es(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:el(e.input.default),invalid:el(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:es(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return ei.set(e,r),r}function es(e,t){return{default:{enabled:ea(e,t.default.enabled),hovered:ea(e,t.default.hovered),pressed:ea(e,t.default.pressed),selected:ea(e,t.default.selected),disabled:ea(e,t.default.disabled)},neutral:{enabled:ea(e,t.default.enabled),hovered:ea(e,t.default.hovered),pressed:ea(e,t.default.pressed),selected:ea(e,t.default.selected),disabled:ea(e,t.default.disabled)},primary:{enabled:ea(e,t.primary.enabled),hovered:ea(e,t.primary.hovered),pressed:ea(e,t.primary.pressed),selected:ea(e,t.primary.selected),disabled:ea(e,t.primary.disabled)},suggest:{enabled:ea(e,t.primary.enabled),hovered:ea(e,t.primary.hovered),pressed:ea(e,t.primary.pressed),selected:ea(e,t.primary.selected),disabled:ea(e,t.primary.disabled)},positive:{enabled:ea(e,t.positive.enabled),hovered:ea(e,t.positive.hovered),pressed:ea(e,t.positive.pressed),selected:ea(e,t.positive.selected),disabled:ea(e,t.positive.disabled)},caution:{enabled:ea(e,t.caution.enabled),hovered:ea(e,t.caution.hovered),pressed:ea(e,t.caution.pressed),selected:ea(e,t.caution.selected),disabled:ea(e,t.caution.disabled)},critical:{enabled:ea(e,t.critical.enabled),hovered:ea(e,t.critical.hovered),pressed:ea(e,t.critical.pressed),selected:ea(e,t.critical.selected),disabled:ea(e,t.critical.disabled)}}}function ea(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg}
219,cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function el(e){return{enabled:eu(e.enabled),disabled:eu(e.disabled),readOnly:eu(e.readOnly),hovered:eu(e.hovered)}}function eu(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let ec=new WeakMap;function ed(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=ec.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...s.avatar,...e.sanity.avatar},button:{...s.button,...e.sanity.button},card:s.card,color:eo(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...s.input,...e.sanity.input,checkbox:{...s.input.checkbox,...e.sanity.input.checkbox},radio:{...s.input.radio,...e.sanity.input.radio},switch:{...s.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??s.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return ec.set(e,n),n}function eh(e){return 2===e._version}let ep=new WeakMap,ef=new Map;function eg(e,t,n){var r,i,o,a,u;let c,d=function(e,t,n){let r=ef.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(d)return d;let p=eh(e)?h(e):e,f=eh(e)?e:function(e){if(e.v2)return e.v2;let t=ep.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,focusRing:a,fonts:l,input:u,layer:c,media:d,radius:h,shadows:p,space:f,styles:g}=e,m={_version:2,avatar:{...s.avatar,...n},button:{...s.button,...r},card:s.card,color:{light:{transparent:eo(i.light.transparent),default:eo(i.light.default),neutral:eo(i.light.transparent),primary:eo(i.light.primary),suggest:eo(i.light.primary),positive:eo(i.light.positive),caution:eo(i.light.caution),critical:eo(i.light.critical)},dark:{transparent:eo(i.dark.transparent),default:eo(i.dark.default),neutral:eo(i.dark.transparent),primary:eo(i.dark.primary),suggest:eo(i.dark.primary),positive:eo(i.dark.positive),caution:eo(i.dark.caution),critical:eo(i.dark.critical)}},container:o,font:l,input:{...s.input,...u,checkbox:{...s.input.checkbox,...u.checkbox},radio:{...s.input.radio,...u.radio},switch:{...s.input.switch,...u.switch}},layer:c??s.layer,media:d,radius:h,shadow:p,space:f,style:g};return ep.set(e,m),m}(e),g=p.layer||s.layer,m=f.color[t]||f.color.light,y="neutral"in(r=m[n]||m.default).badge?r:{...r,badge:{...r.badge,neutral:r.badge.default,suggest:r.badge.primary},button:{bleed:{...r.button.bleed,neutral:r.button.bleed.default,suggest:r.button.bleed.primary},default:{...r.button.default,neutral:r.button.default.default,suggest:r.button.default.primary},ghost:{...r.button.ghost,neutral:r.button.ghost.default,suggest:r.button.ghost.primary}},selectable:{...r.selectable,neutral:r.selectable.default,suggest:r.selectable.primary}},v=f.layer||s.layer,{color:b,...x}=p,w={...x,layer:g,v2:{...f,_resolved:!0,color:y,layer:v}};l(w,"color",()=>{let e=p.color[t]||p.color.light;return e[n]||e.default});let S={sanity:w};return i=e,o=t,a=n,u=S,ef.has(o)||ef.set(o,new Map),(c=ef.get(o)).has(a)||c.set(a,new WeakMap),c.get(a).set(i,u),S}},67717:(e,t,n)=>{var r=n(80542);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},67901:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(7642);function i(e){return(0,r.G)(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}},68095:(e,t,n)=>{var r=n(67717),i=n(2805),o=Object.prototype.hasOwnProperty;e.exports=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])})},68200:(e,t,n)=>{var r=n(2359);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}}
219,68928:(e,t,n)=>{var r=n(49061),i=n(31019),o=n(63572),s=n(54944),a=n(95256);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},69118:(e,t,n)=>{"use strict";n.d(t,{NP:()=>ts,AH:()=>td,i7:()=>tf,I4:()=>tp,DP:()=>to});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.create;function i(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,"function"==typeof SuppressedError&&SuppressedError;var o=n(12020),s=n(90369),a=n.n(s),l="-ms-",u="-moz-",c="-webkit-",d="comm",h="rule",p="decl",f="@keyframes",g=Math.abs,m=String.fromCharCode,y=Object.assign;function v(e,t){return(e=t.exec(e))?e[0]:e}function b(e,t,n){return e.replace(t,n)}function x(e,t,n){return e.indexOf(t,n)}function w(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function k(e){return e.length}function E(e,t){return t.push(e),e}function _(e,t){return e.filter(function(e){return!v(e,t)})}var T=1,j=1,A=0,C=0,M=0,P="";function I(e,t,n,r,i,o,s,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:T,column:j,length:s,return:"",siblings:a}}function R(e,t){return y(I("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function O(e){for(;e.root;)e=R(e.root,{children:[e]});E(e,e.siblings)}function $(){return M=C<A?w(P,C++):0,j++,10===M&&(j=1,T++),M}function D(){return w(P,C)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V(e){var t,n;return(t=C-1,n=function e(t){for(;$();)switch(M){case t:return C;case 34:case 39:34!==t&&39!==t&&e(M);break;case 40:41===t&&e(t);break;case 92:$()}return C}(91===e?e+2:40===e?e+1:e),S(P,t,n)).trim()}function N(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case p:return e.return=e.return||e.value;case d:return"";case f:return e.return=e.value+"{"+N(e.children,r)+"}";case h:if(!k(e.value=e.props.join(",")))return""}return k(n=N(e.children,r))?e.return=e.value+"{"+n+"}":""}function B(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case p:e.return=function e(t,n,r){var i;switch(i=n,45^w(t,0)?(((i<<2^w(t,0))<<2^w(t,1))<<2^w(t,2))<<2^w(t,3):0){case 5103:return c+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+t+t;case 4789:return u+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return c+t+u+t+l+t+t;case 5936:switch(w(t,n+11)){case 114:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 11,540 bytes, line 219
219case 108:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return c+t+l+t+t;case 6165:return c+t+l+"flex-"+t+t;case 5187:return c+t+b(t,/(\w+).+(:[^]+)/,c+"box-$1$2"+l+"flex-$1$2")+t;case 5443:return c+t+l+"flex-item-"+b(t,/flex-|-self/g,"")+(v(t,/flex-|baseline/)?"":l+"grid-row-"+b(t,/flex-|-self/g,""))+t;case 4675:return c+t+l+"flex-line-pack"+b(t,/align-content|flex-|-self/g,"")+t;case 5548:return c+t+l+b(t,"shrink","negative")+t;case 5292:return c+t+l+b(t,"basis","preferred-size")+t;case 6060:return c+"box-"+b(t,"-grow","")+c+t+l+b(t,"grow","positive")+t;case 4554:return c+b(t,/([^-])(transform)/g,"$1"+c+"$2")+t;case 6187:return b(b(b(t,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),t,"")+t;case 5495:case 3959:return b(t,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return b(b(t,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+l+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+t+t;case 4200:if(!v(t,/flex-|baseline/))return l+"grid-column-align"+S(t,n)+t;break;case 2592:case 3360:return l+b(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,v(e.props,/grid-\w+-end/)}))return~x(t+(r=r[n].value),"span",0)?t:l+b(t,"-start","")+t+l+"grid-row-span:"+(~x(r,"span",0)?v(r,/\d+/):v(r,/\d+/)-v(t,/\d+/))+";";return l+b(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return v(e.props,/grid-\w+-start/)})?t:l+b(b(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return b(t,/(.+)-inline(.+)/,c+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(k(t)-1-n>6)switch(w(t,n+1)){case 109:if(45!==w(t,n+4))break;case 102:return b(t,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+u+(108==w(t,n+3)?"$3":"$2-$3"))+t;case 115:return~x(t,"stretch",0)?e(b(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return b(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,o,s,a){return l+n+":"+r+a+(i?l+n+"-span:"+(o?s:s-r)+a:"")+t});case 4949:if(121===w(t,n+6))return b(t,":",":"+c)+t;break;case 6444:switch(w(t,45===w(t,14)?18:11)){case 120:return b(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===w(t,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+l+"$2box$3")+t;case 100:return b(t,":",":"+l)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return b(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case f:return N([R(e,{value:b(e.value,"@","@"+c)})],r);case h:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(v(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":O(R(e,{props:[b(t,/:(read-\w+)/,":"+u+"$1")]})),O(R(e,{props:[t]})),y(e,{props:_(n,r)});break;case"::placeholder":O(R(e,{props:[b(t,/:(plac\w+)/,":"+c+"input-$1")]})),O(R(e,{props:[b(t,/:(plac\w+)/,":"+u+"$1")]})),O(R(e,{props:[b(t,/:(plac\w+)/,l+"input-$1")]})),O(R(e,{props:[t]})),y(e,{props:_(n,r)})}return""},i.map(o).join("")}}}function F(e,t,n,r,i,o,s,a,l,u,c,d){for(var p=i-1,f=0===i?o:[""],m=f.length,y=0,v=0,x=0;y<r;++y)for(var w=0,k=S(e,p+1,p=g(v=s[y])),E=e;w<m;++w)(E=(v>0?f[w]+" "+k:b(k,/&\f/g,f[w])).trim())&&(l[x++]=E);return I(e,t,n,0===i?h:a,l,u,c,d)}function U(e,t,n,r,i){return I(e,t,n,p,S(e,0,r),S(e,r+1,-1),r,i)}var H={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},W=n(40074),q=void 0!==W&&void 0!==W.env&&(W.env.REACT_APP_SC_ATTR||W.env.SC_ATTR)||"data-styled",G="active",Y="data-styled-version",X="6.1.19",K="/*!sc*/\n",Z="undefined"!=typeof window&&"undefined"!=typeof document,J=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==W.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&W.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.SC_DISABLE_SPEEDY&&""!==W.env.SC_DISABLE_SPEEDY&&"false"!==W.env.SC_DISABLE_SPEEDY&&W.env.SC_DISABLE_SPEEDY),Q=Object.freeze([]),ee=Object.freeze({}),et=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),en=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,er=/(^-|-$)/g;function ei(e){return e.replace(en,"-").replace(er,"")}var eo=/(a)(d)/gi,es=function(e){return String.fromCharCode(e+(e>25?39:97))};function ea(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=es(t%52)+n;return(es(t%52)+n).replace(eo,"$1-$2")}var el,eu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ec=function(e){return eu(5381,e)};function ed(e){return"string"==typeof e}var eh="function"==typeof Symbol&&Symbol.for,ep=eh?Symbol.for("react.memo"):60115,ef=eh?Symbol.for("react.forward_ref"):60112,eg={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},em={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ey={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ev=((el={})[ef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},el[ep]=ey,el);function eb(e){return("type"in e&&e.type.$$typeof)===ep?ey:"$$typeof"in e?ev[e.$$typeof]:eg}var ex=Object.defineProperty,ew=Object.getOwnPropertyNames,eS=Object.getOwnPropertySymbols,ek=Object.getOwnPropertyDescriptor,eE=Object.getPrototypeOf,e_=Object.prototype;function eT(e){return"function"==typeof e}function ej(e){return"object"==typeof e&&"styledComponentId"in e}function eA(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eC(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function eM(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eP(e,t){Object.defineProperty(e,"toString",{value:t})}function eI(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eR=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw eI(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var s=this.indexOfGroup(e+1),a=(o=0,t.length);o<a;o++)this.tag.insertRule(s,t[o])&&(this.groupSizes[e]++,s++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(K);return t},e}(),eO=new Map,e$=new Map,eD=1,eL=function(e){if(eO.has(e))return eO.get(e);for(;e$.has(eD);)eD++;var t=eD++;return eO.set(e,t),e$.set(t,e),t},eV=function(e,t){eD=t+1,eO.set(e,t),e$.set(t,e)},eN="style[".concat(q,"][").concat(Y,'="').concat(X,'"]'),ez=new RegExp("^".concat(q,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eB=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&e.registerName(t,r)},eF=function(e,t){for(var n,r=(null!=(n=t.textContent)?n:"").split(K),i=[],o=0,s=r.length;o<s;o++){var a=r[o].trim();if(a){var l=a.match(ez);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(eV(c,u),eB(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(a)}}},eU=function(e){for(var t=document.querySelectorAll(eN),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(q)!==G&&(eF(e,i),i.parentNode&&i.parentNode.removeChild(i))}},eH=function(e){var t,r=document.head,i=e||r,o=document.createElement("style"),s=(t=Array.from(i.querySelectorAll("style[".concat(q,"]"))))[t.length-1],a=void 0!==s?s.nextSibling:null;o.setAttribute(q,G),o.setAttribute(Y,X);var l=n.nc;return l&&o.setAttribute("nonce",l),i.insertBefore(o,a),o},eW=function(){function e(e){this.element=eH(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw eI(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eq=function(){function e(e){this.element=eH(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eG=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eY=Z,eX={isServer:!Z,useCSSOMInjection:!J},eK=function(){function e(e,t,n){void 0===e&&(e=ee),void 0===t&&(t={});var i=this;this.options=r(r({},eX),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Z&&eY&&(eY=!1,eU(this)),eP(this,function(){for(var e=i.getTag(),t=e.length,n="",r=0;r<t;r++)!function(t){var r=e$.get(t);if(void 0===r)return;var o=i.names.get(r),s=e.getGroup(t);
219if(void 0!==o&&o.size&&0!==s.length){var a="".concat(q,".g").concat(t,'[id="').concat(r,'"]'),l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(s).concat(a,'{content:"').concat(l,'"}').concat(K)}}(r);return n})}return e.registerId=function(e){return eL(e)},e.prototype.rehydrate=function(){!this.server&&Z&&eU(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,n;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,n=e.target,new eR(e.isServer?new eG(n):t?new eW(n):new eq(n))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eL(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eL(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eL(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eZ=/&/g,eJ=/^\s*\/\/.*$/gm;function eQ(e){var t,n,r,i=void 0===e?ee:e,o=i.options,s=void 0===o?ee:o,a=i.plugins,l=void 0===a?Q:a,u=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(t):e},c=l.slice();c.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(eZ,n).replace(r,u))}),s.prefix&&c.push(B),c.push(z);var p=function(e,i,o,a){void 0===i&&(i=""),void 0===o&&(o=""),void 0===a&&(a="&"),t=a,n=i,r=RegExp("\\".concat(n,"\\b"),"g");var l,u,h,p,f,y,v=e.replace(eJ,""),_=(f=function e(t,n,r,i,o,s,a,l,u){for(var c,h,p,f,y=0,v=0,_=a,A=0,R=0,O=0,N=1,z=1,B=1,H=0,W="",q=o,G=s,Y=i,X=W;z;)switch(O=H,H=$()){case 40:if(108!=O&&58==w(X,_-1)){-1!=x(X+=b(V(H),"&","&\f"),"&\f",g(y?l[y-1]:0))&&(B=-1);break}case 34:case 39:case 91:X+=V(H);break;case 9:case 10:case 13:case 32:X+=function(e){for(;M=D();)if(M<33)$();else break;return L(e)>2||L(M)>3?"":" "}(O);break;case 92:X+=function(e,t){for(var n;--t&&$()&&!(M<48)&&!(M>102)&&(!(M>57)||!(M<65))&&(!(M>70)||!(M<97)););return n=C+(t<6&&32==D()&&32==$()),S(P,e,n)}(C-1,7);continue;case 47:switch(D()){case 42:case 47:E((c=function(e,t){for(;$();)if(e+M===57)break;else if(e+M===84&&47===D())break;return"/*"+S(P,t,C-1)+"*"+m(47===e?e:$())}($(),C),h=n,p=r,f=u,I(c,h,p,d,m(M),S(c,2,-2),0,f)),u);break;default:X+="/"}break;case 123*N:l[y++]=k(X)*B;case 125*N:case 59:case 0:switch(H){case 0:case 125:z=0;case 59+v:-1==B&&(X=b(X,/\f/g,"")),R>0&&k(X)-_&&E(R>32?U(X+";",i,r,_-1,u):U(b(X," ","")+";",i,r,_-2,u),u);break;case 59:X+=";";default:if(E(Y=F(X,n,r,y,v,o,l,W,q=[],G=[],_,s),s),123===H)if(0===v)e(X,n,Y,Y,q,s,_,l,G);else switch(99===A&&110===w(X,3)?100:A){case 100:case 108:case 109:case 115:e(t,Y,Y,i&&E(F(t,Y,Y,0,0,o,l,W,o,q=[],_,G),G),o,G,_,l,i?q:G);break;default:e(X,Y,Y,Y,[""],G,0,l,G)}}y=v=R=0,N=B=1,W=X="",_=a;break;case 58:_=1+k(X),R=O;default:if(N<1){if(123==H)--N;else if(125==H&&0==N++&&125==(M=C>0?w(P,--C):0,j--,10===M&&(j=1,T--),M))continue}switch(X+=m(H),H*N){case 38:B=v>0?1:(X+="\f",-1);break;case 44:l[y++]=(k(X)-1)*B,B=1;break;case 64:45===D()&&(X+=V($())),A=D(),v=_=k(W=X+=function(e){for(;!L(D());)$();return S(P,e,C)}(C)),H++;break;case 45:45===O&&2==k(X)&&(N=0)}}return s}("",null,null,null,[""],(p=h=o||i?"".concat(o," ").concat(i," { ").concat(v," }"):v,T=j=1,A=k(P=p),C=0,h=[]),0,[0],h),P="",f);s.namespace&&(_=function e(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(e){return"".concat(n," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,n)),t})}(_,s.namespace));var R=[];return N(_,(u=(l=c.concat((y=function(e){return R.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,n,r){for(var i="",o=0;o<u;o++)i+=l[o](e,t,n,r)||"";return i})),R};return p.hash=l.length?l.reduce(function(e,t){return t.name||eI(15),eu(e,t.name)},5381).toString():"",p}var e0=new eK,e1=eQ(),e2=o.createContext({shouldForwardProp:void 0,styleSheet:e0,stylis:e1}),e5=(e2.Consumer,o.createContext(void 0));function e3(){return(0,o.useContext)(e2)}function e4(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=e3().styleSheet,s=(0,o.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,i]),l=(0,o.useMemo)(function(){return eQ({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,o.useEffect)(function(){a()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,o.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:l}},[e.shouldForwardProp,s,l]);return o.createElement(e2.Provider,{value:u},o.createElement(e5.Provider,{value:l},e.children))}var e6=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=e1);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eP(this,function(){throw eI(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e1),this.name+e.hash},e}();function e8(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;r>="A"&&r<="Z"?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var e9=function(e){return null==e||!1===e||""===e},e7=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!e9(r)&&(Array.isArray(r)&&r.isCss||eT(r)?t.push("".concat(e8(n),":"),r,";"):eM(r)?t.push.apply(t,i(i(["".concat(n," {")],e7(r),!1),["}"],!1)):t.push("".concat(e8(n),": ").concat(null==r||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in H||n.startsWith("--")?String(r).trim():"".concat(r,"px"),";")))}return t};function te(e,t,n,r){if(e9(e))return[];if(ej(e))return[".".concat(e.styledComponentId)];if(eT(e))return!eT(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:te(e(t),t,n,r);return e instanceof e6?n?(e.inject(n,r),[e.getName(r)]):[e]:eM(e)?e7(e):Array.isArray(e)?Array.prototype.concat.apply(Q,e.map(function(e){return te(e,t,n,r)})):[e.toString()]}function tt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(eT(n)&&!ej(n))return!1}return!0}var tn=ec(X),tr=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&tt(e),this.componentId=t,this.baseHash=eu(tn,t),this.baseStyle=n,eK.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
vendor: 4,525 bytes, line 219
219):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=eA(r,this.staticRulesId);else{var i=eC(te(this.rules,e,t,n)),o=ea(eu(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var s=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,s)}r=eA(r,o),this.staticRulesId=o}else{for(var a=eu(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=eC(te(c,e,t,n));a=eu(a,d+u),l+=d}}if(l){var h=ea(a>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=eA(r,h)}}return r},e}(),ti=o.createContext(void 0);function to(){var e=(0,o.useContext)(ti);if(!e)throw eI(18);return e}function ts(e){var t=o.useContext(ti),n=(0,o.useMemo)(function(){var n=e.theme;if(!n)throw eI(14);if(eT(n))return n(t);if(Array.isArray(n)||"object"!=typeof n)throw eI(8);return t?r(r({},t),n):n},[e.theme,t]);return e.children?o.createElement(ti.Provider,{value:n},e.children):null}ti.Consumer;var ta={};function tl(e,t,n){var i,s,a,l,u=ej(e),c=!ed(e),d=t.attrs,h=void 0===d?Q:d,p=t.componentId,f=void 0===p?(i=t.displayName,s=t.parentComponentId,ta[a="string"!=typeof i?"sc":ei(i)]=(ta[a]||0)+1,l="".concat(a,"-").concat(ea(ec(X+a+ta[a])>>>0)),s?"".concat(s,"-").concat(l):l):p,g=t.displayName,m=void 0===g?ed(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):g,y=t.displayName&&t.componentId?"".concat(ei(t.displayName),"-").concat(t.componentId):t.componentId||f,v=u&&e.attrs?e.attrs.concat(h).filter(Boolean):h,b=t.shouldForwardProp;if(u&&e.shouldForwardProp){var x=e.shouldForwardProp;if(t.shouldForwardProp){var w=t.shouldForwardProp;b=function(e,t){return x(e,t)&&w(e,t)}}else b=x}var S=new tr(n,y,u?e.componentStyle:void 0);function k(e,t){return function(e,t,n){var i,s,a=e.attrs,l=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,h=e.target,p=o.useContext(ti),f=e3(),g=e.shouldForwardProp||f.shouldForwardProp,m=(void 0===(i=u)&&(i=ee),t.theme!==i.theme&&t.theme||p||i.theme||ee),y=function(e,t,n){for(var i,o=r(r({},t),{className:void 0,theme:n}),s=0;s<e.length;s+=1){var a=eT(i=e[s])?i(o):i;for(var l in a)o[l]="className"===l?eA(o[l],a[l]):"style"===l?r(r({},o[l]),a[l]):a[l]}return t.className&&(o.className=eA(o.className,t.className)),o}(a,t,m),v=y.as||h,b={};for(var x in y)void 0===y[x]||"$"===x[0]||"as"===x||"theme"===x&&y.theme===m||("forwardedAs"===x?b.as=y.forwardedAs:g&&!g(x,v)||(b[x]=y[x]));var w=(s=e3(),l.generateAndInjectStyles(y,s.styleSheet,s.stylis)),S=eA(c,d);return w&&(S+=" "+w),y.className&&(S+=" "+y.className),b[ed(v)&&!et.has(v)?"class":"className"]=S,n&&(b.ref=n),(0,o.createElement)(v,b)}(E,e,t)}k.displayName=m;var E=o.forwardRef(k);return E.attrs=v,E.componentStyle=S,E.displayName=m,E.shouldForwardProp=b,E.foldedComponentIds=u?eA(e.foldedComponentIds,e.styledComponentId):"",E.styledComponentId=y,E.target=u?e.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=u?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)!function e(t,n,r){if(void 0===r&&(r=!1),!r&&!eM(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var i=0;i<n.length;i++)t[i]=e(t[i],n[i]);else if(eM(n))for(var i in n)t[i]=e(t[i],n[i]);return t}(e,t[r],!0);return e}({},e.defaultProps,t):t}}),eP(E,function(){return".".concat(E.styledComponentId)}),c&&function e(t,n,r){if("string"!=typeof n){if(e_){var i=eE(n);i&&i!==e_&&e(t,i,r)}var o=ew(n);eS&&(o=o.concat(eS(n)));for(var s=eb(t),a=eb(n),l=0;l<o.length;++l){var u=o[l];if(!(u in em||r&&r[u]||a&&u in a||s&&u in s)){var c=ek(n,u);try{ex(t,u,c)}catch(e){}}}}return t}(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function tu(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var tc=function(e){return Object.assign(e,{isCss:!0})};function td(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return eT(e)||eM(e)?tc(te(tu(Q,i([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?te(e):tc(te(tu(e,t)))}var th=function(e){return function e(t,n,o){if(void 0===o&&(o=ee),!n)throw eI(1,n);var s=function(e){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];return t(n,o,td.apply(void 0,i([e],r,!1)))};return s.attrs=function(i){return e(t,n,r(r({}
219,o),{attrs:Array.prototype.concat(o.attrs,i).filter(Boolean)}))},s.withConfig=function(i){return e(t,n,r(r({},o),i))},s}(tl,e)},tp=th;function tf(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=eC(td.apply(void 0,i([e],t,!1)));return new e6(ea(ec(r)>>>0),r)}et.forEach(function(e){tp[e]=th(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=tt(e),eK.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var i=r(eC(te(this.rules,t,n,r)),""),o=this.componentId+e;n.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eK.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=n.nc,i=eC([r&&'nonce="'.concat(r,'"'),"".concat(q,'="true"'),"".concat(Y,'="').concat(X,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eI(2);return e._emitSheetCSS()}
219,this.getStyleElement=function(){if(e.sealed)throw eI(2);var t,i=e.instance.toString();if(!i)return[];var s=((t={})[q]="",t[Y]=X,t.dangerouslySetInnerHTML={__html:i},t),a=n.nc;return a&&(s.nonce=a),[o.createElement("style",r({},s,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eK({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eI(2);return o.createElement(e4,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eI(3)}}()},69485:(e,t,n)=>{var r=n(50948),i=n(21078),o=n(89307),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},69960:(e,t,n)=>{var r=n(73231),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},70544:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},70659:(e,t,n)=>{var r=n(94012),i=n(69960);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},70750:(e,t,n)=>{"use strict";let r;n.d(t,{A:()=>a});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},o=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let a=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let a=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(o)}();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return function(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}(a)}},71421:(e,t,n)=>{var r=n(94490),i=n(79815),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},73231:(e,t,n)=>{var r=n(69485),i=n(95583);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},73522:(e,t,n)=>{e.exports=n(88499)(n(38416),"Map")},73915:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},76784:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});let r=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2},77236:(e,t,n)=>{var r=n(25858),i=n(73522),o=n(68928);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},77338:(e,t,n)=>{var r=n(2357),i=n(45169),o=n(49476),s=n(6253),a=n(80892),l=n(85410),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),d=!n&&!c&&s(e),h=!n&&!c&&!d&&l(e),p=n||c||d||h,f=p?r(e.length,String):[],g=f.length;for(var m in e)(t||u.call(e,m))&&!(p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g)))&&f.push(m);return f}},78783:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});let r=(0,n(12020).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},78876:(e,t,n)=>{var r=n(30179);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},78980:(e,t,n)=>{var r=n(2359),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},79815:(e,t,n)=>{e.exports=n(11922)(Object.keys,Object)},80542:(e,t,n)=>{var r=n(88499);e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},80892:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},81427:(e,t,n)=>{var r=n(69485),i=n(95583);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},82255:(e,t,n)=>{var r=n(49476),i=n(73231),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},82331:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});let r=e=>t=>1-e(1-t)},82344:(e,t,n)=>{var r=n(54497),i=n(73522),o=n(25865),s=n(63428),a=n(13762),l=n(69485),u=n(26516),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(r),m=u(i),y=u(o),v=u(s),b=u(a),x=l;(r&&x(new r(new ArrayBuffer(1)))!=f||i&&x(new i)!=c||o&&x(o.resolve())!=d||s&&x(new s)!=h||a&&x(new a)!=p)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return f;case m:return c;case y:return d;case v:return h;case b:return p}return t}),e.exports=x},84176:(e,t,n)=>{"use strict";e.exports=n(18102)},84908:(e,t,n)=>{var r=n(54461);e.exports=function(e,t){for(var n=e.length;n--;
219)if(r(e[n][0],t))return n;return -1}},85410:(e,t,n)=>{var r=n(45320),i=n(89224),o=n(90844),s=o&&o.isTypedArray;e.exports=s?i(s):r},85769:(e,t,n)=>{var r=n(66048);e.exports=function(e){return e==e&&!r(e)}},88123:e=>{e.exports=function(){this.__data__=[],this.size=0}},88499:(e,t,n)=>{var r=n(39742),i=n(31997);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},88720:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});let r=(0,n(12020).createContext)({})},88837:(e,t,n)=>{var r=n(53308),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},89224:e=>{e.exports=function(e){return function(t){return e(t)}}},89307:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},89354:(e,t,n)=>{var r=n(70544),i=n(40211);e.exports=function(e,t){return null!=e&&i(e,t,r)}},89730:(e,t,n)=>{var r=n(84908);e.exports=function(e){return r(this.__data__,e)>-1}},90369:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!a(u))return!1;var c=e[u],d=t[u];if(!1===(i=n?n.call(r,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0}},90844:(e,t,n)=>{e=n.nmd(e);var r=n(26653),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},92265:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(2534);function i(e=.1,{startDelay:t=0,from:n=0,ease:o}={}){return(i,s)=>{let a=e*Math.abs(("number"==typeof n?n:function(e,t){if("first"===e)return 0;{let n=t-1;return"last"===e?n:n/2}}(n,s))-i);if(o){let t=s*e;a=(0,r.K)(o)(a/t)*t}return t+a}}},92666:(e,t,n)=>{var r=n(95236),i=n(98451);e.exports=function(e,t,n,o){var s=n.length,a=s,l=!o;if(null==e)return!a;for(e=Object(e);s--;){var u=n[s];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<a;){var c=(u=n[s])[0],d=e[c],h=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var p=new r;if(o)var f=o(d,h,c,e,t,p);if(!(void 0===f?i(h,d,3,o,p):f))return!1}}return!0}},93053:(e,t,n)=>{var r=n(85769),i=n(98515);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},93098:(e,t,n)=>{var r=n(56424),i=n(24314),o=n(82255),s=n(69960);e.exports=function(e){return o(e)?r(s(e)):i(e)}},94012:(e,t,n)=>{var r=n(49476),i=n(82255),o=n(15663),s=n(43307);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},94490:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},95236:(e,t,n)=>{var r=n(25858),i=n(16865),o=n(9279),s=n(8920),a=n(19356),l=n(77236);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=l,e.exports=u},95256:(e,t,n)=>{var r=n(26318);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},95536:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var r=n(12020);let i=r.createContext(!0);function o(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}function s(e){let t=r.useRef(o);r.useInsertionEffect(()=>{t.current=e},[e]);let[n]=r.useState(()=>(...e)=>((()=>{try{return r.use(i)}catch{return!1}})()&&o(),(0,t.current)(...e)));return n}},95583:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},96110:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});let r=(0,n(12020).createContext)(null)},96501:(e,t,n)=>{var r=n(2359);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},97096:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});let r=e=>e},97293:(e,t,n)=>{"use strict";n.d(t,{DT:()=>h,mj:()=>function e({schemas:t,actors:n,actions:o,guards:s,delays:a}){return{assign:i.a,sendTo:d.s,raise:r.r,log:d.l,cancel:r.b,stopChild:r.s,enqueueActions:d.e,emit:d.a,spawnChild:r.d,createStateConfig:e=>e,createAction:e=>e,createMachine:e=>new c({...e,schemas:t},{actors:n,actions:o,guards:s,delays:a}),extend:r=>e({schemas:t,actors:n,actions:{...o,...r.actions},guards:{...s,...r.guards},delays:{...a,...r.delays}})}}});var r=n(17643),i=n(61267);let o=new WeakMap;function s(e,t,n){let r=o.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},o.set(e,r)),r[t]}let a={},l=e=>"string"==typeof e?{type:e}:"function"==typeof e?"resolve"in e?{type:e.type}:{type:e.name}:e;class u{constructor(e,t){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=t._parent,this.key=t._key,this.machine=t._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(r.S),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?(0,r.z)(this.config.states,(e,t)=>new u(e,{_parent:this,_key:t,_machine:this.machine})):a,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
219ompound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,r.t)(this.config.entry).slice(),this.exit=(0,r.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,r.t)(e.tags).slice()}_initialize(){this.transitions=(0,r.B)(this),this.config.always&&(this.always=(0,r.C)(this.config.always).map(e=>(0,r.D)(this,r.N,e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(l),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(l),eventType:null})}:void 0,history:this.history,states:(0,r.z)(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(l)})),entry:this.entry.map(l),exit:this.exit.map(l),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return s(this,"invoke",()=>(0,r.t)(this.config.invoke).map((e,t)=>{let{src:n,systemId:i}=e,o=e.id??(0,r.F)(this.id,t),s="string"==typeof n?n:`xstate.invoke.${(0,r.F)(this.id,t)}`;return{...e,src:s,id:o,systemId:i,toJSON(){let{onDone:t,onError:n,...r}=e;return{...r,type:"xstate.invoke",src:s,id:o}}}}))}get on(){return s(this,"on",()=>[...this.transitions].flatMap(([e,t])=>t.map(t=>[e,t])).reduce((e,[t,n])=>(e[t]=e[t]||[],e[t].push(n),e),{}))}get after(){return s(this,"delayedTransitions",()=>(0,r.G)(this))}get initial(){return s(this,"initial",()=>(0,r.H)(this,this.config.initial))}next(e,t){let n,i=t.type,o=[];for(let a of s(this,`candidates-${i}`,()=>(0,r.I)(this,i))){let{guard:s}=a,l=e.context,u=!1;try{u=!s||(0,r.E)(s,l,t,e)}catch(t){let e="string"==typeof s?s:"object"==typeof s?s.type:void 0;throw Error(`Unable to evaluate guard ${e?`'${e}' `:""}in transition for event '${i}' in state node '${this.id}': 220${t.message}`)}if(u){o.push(...a.actions),n=a;break}}return n?[n]:void 0}get events(){return s(this,"events",()=>{let{states:e}=this,t=new Set(this.ownEvents);if(e)for(let n of Object.keys(e)){let r=e[n];if(r.states)for(let e of r.events)t.add(`${e}`)}return Array.from(t)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(e=>this.transitions.get(e).some(e=>!(!e.target&&!e.actions.length&&!e.reenter)))))}}class c{constructor(e,t){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.options=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:t?.actors??{},actions:t?.actions??{},delays:t?.delays??{},guards:t?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.options={maxIterations:1/0,...this.config.options},this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new u(e,{_key:this.id,_machine:this}),this.root._initialize(),(0,r.J)(this.root),this.states=this.root.states,this.events=this.root.events}provide(e){let{actions:t,guards:n,actors:r,delays:i}=this.implementations;return new c(this.config,{actions:{...t,...e.actions},guards:{...n,...e.guards},actors:{...r,...e.actors},delays:{...i,...e.delays}})}resolveState(e){let t=(0,r.K)(this.root,e.value),n=(0,r.L)((0,r.q)(this.root,t));return(0,r.M)({_nodes:[...n],context:e.context||{},children:{},status:(0,r.O)(n,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,t,n){return(0,r.e)(e,t,n,[]).snapshot}microstep(e,t,n){return(0,r.e)(e,t,n,[]).microsteps.map(([e])=>e)}getTransitionData(e,t){return(0,r.P)(this.root,e.value,e,t)||[]}_getPreInitialState(e,t,n){let{context:o}=this.config,s=(0,r.M)({context:"function"!=typeof o&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof o?(0,r.Q)(s,t,e,[(0,i.a)(({spawn:e,event:t,self:n})=>o({spawn:e,input:t.input,self:n}))],n,void 0):s}getInitialSnapshot(e,t){let n=(0,r.f)(t),i=[],o=(0,r.M)({context:"function"!=typeof this.config.context&&this.config.context?this.config.context:{},_nodes:[this.root],children:{},status:"active"},this);try{o=this._getPreInitialState(e,n,i);let[t]=(0,r.g)(this.root,o,e,n,i),{snapshot:s}=(0,r.e)(t,n,e,i);return s}catch(e){return(0,r.R)(o,{status:"error",error:e})}}
220start(e){Object.values(e.children).forEach(e=>{"active"===e.getSnapshot().status&&e.start()})}getStateNodeById(e){let t=(0,r.T)(e),n=t.slice(1),i=(0,r.U)(t[0])?t[0].slice(1):t[0],o=this.idMap.get(i);if(!o)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,r.V)(o,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,t){return(0,r.W)(e,t)}restoreSnapshot(e,t){let n={},i=e.children;Object.keys(i).forEach(e=>{let o=i[e],s=o.snapshot,a=o.src,l="string"==typeof a?(0,r.Y)(this,a):a;if(!l)return;let u=(0,r.c)(l,{id:e,parent:t.self,syncSnapshot:o.syncSnapshot,snapshot:s,src:a,systemId:o.systemId});n[e]=u});let o=function(e,t){if(!t||"object"!=typeof t)return{};let n={};for(let r in t)for(let i of t[r]){let t=function(e,t){if(t instanceof u)return t;try{return e.machine.getStateNodeById(t.id)}catch{}}(e,i);t&&(n[r]??=[],n[r].push(t))}return n}(this.root,e.historyValue),s=(0,r.M)({...e,children:n,_nodes:Array.from((0,r.L)((0,r.q)(this.root,e.value))),historyValue:o},this),a=new Set;return!function e(t,n){if(!a.has(t))for(let i in a.add(t),t){let o=t[i];if(o&&"object"==typeof o){if("xstate$$type"in o&&o.xstate$$type===r.$){t[i]=n[o.id];continue}e(o,n)}}}(s.context,n),s}}var d=n(40785);function h(e,t){let n=(0,r.t)(t);if(!n.some(t=>(0,r.m)(e.type,t))){let t=1===n.length?`type matching "${n[0]}"`:`one of types matching "${n.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(e)} to have ${t}`)}}},98451:(e,t,n)=>{var r=n(52609),i=n(95583);e.exports=function e(t,n,o,s,a){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,s,e,a):t!=t&&n!=n)}},98515:(e,t,n)=>{var r=n(77338),i=n(71421),o=n(30179);e.exports=function(e){return o(e)?r(e):i(e)}},99492:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var r=n(53585);let i=e=>e>=1?1:(e*=2)<1?.5*(0,r.dg)(e):.5*(2-Math.pow(2,-10*(e-1)))},99739:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");t.Hy=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===o||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||void 0!==e.getModuleId)||!1}}}]);
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.