moi-computer 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/moi.mjs +3 -1
- package/client/components/BottomPanel.tsx +2 -2
- package/client/components/ChatInput.tsx +2 -2
- package/client/components/ChatPanel.tsx +3 -3
- package/client/components/ChatPopup.tsx +1 -1
- package/client/components/CustomizePanel.tsx +8 -8
- package/client/components/HiddenPanel.tsx +1 -1
- package/client/components/HomePage.tsx +1 -1
- package/client/components/MarkdownContent.tsx +2 -2
- package/client/components/TurnView.tsx +41 -41
- package/client/components/WidgetErrorBoundary.tsx +2 -2
- package/client/components/WidgetFrame.tsx +1 -1
- package/client/components/WidgetShell.tsx +1 -1
- package/client/components/Widgets.tsx +2 -2
- package/client/components/WorkspacePreview.tsx +3 -3
- package/client/components/WorkspacesPage.tsx +17 -17
- package/client/components/layout/SidebarLayout.tsx +8 -8
- package/client/components/playground/PixelPainter.tsx +2 -2
- package/client/components/playground/PlaygroundPage.tsx +1 -1
- package/client/components/ui/button.tsx +4 -4
- package/client/components/ui/dropdown-menu.tsx +9 -9
- package/client/components/ui/popover.tsx +1 -1
- package/client/externalize-react.ts +5 -5
- package/client/index.css +1 -1
- package/client/index.html +13 -13
- package/dist/atlassian-b3tq39hs.png +0 -0
- package/dist/chunk-4615fa69.js +67 -0
- package/dist/chunk-582xmy05.css +1 -0
- package/dist/claude-z2xnay0d.svg +3 -0
- package/dist/discord-vejhptwx.png +0 -0
- package/dist/favicon-nbmyjfjh.png +0 -0
- package/dist/figma-y9898rry.png +0 -0
- package/dist/github-av5r5y3e.png +0 -0
- package/dist/gitlab-4pv5vm6b.png +0 -0
- package/dist/granola-7j3b0nk2.png +0 -0
- package/dist/hermes-nous-pznd63x9.png +0 -0
- package/dist/hubspot-hghcmc2t.png +0 -0
- package/dist/index.html +43 -0
- package/dist/linear-v9s3az2d.png +0 -0
- package/dist/neon-zj4qar44.png +0 -0
- package/dist/notion-w034c0b8.png +0 -0
- package/dist/openclaw-a2pyfhpn.svg +22 -0
- package/dist/sentry-hdwpmvek.png +0 -0
- package/dist/slack-1c1wj62s.png +0 -0
- package/dist/stripe-zrfaqbj3.png +0 -0
- package/dist/supabase-4vg33zf2.png +0 -0
- package/dist/vercel-7d0ssw28.png +0 -0
- package/package.json +14 -28
- package/server/cli.ts +7 -1
- package/server/web.ts +40 -5
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var nd=Object.create;var{getPrototypeOf:td,defineProperty:RG,getOwnPropertyNames:ed}=Object;var Zl=Object.prototype.hasOwnProperty;function Jl(Z){return this[Z]}var $l,Ql,P=(Z,J,$)=>{var Q=Z!=null&&typeof Z==="object";if(Q){var X=J?$l??=new WeakMap:Ql??=new WeakMap,Y=X.get(Z);if(Y)return Y}$=Z!=null?nd(td(Z)):{};let w=J||!Z||!Z.__esModule?RG($,"default",{value:Z,enumerable:!0}):$;for(let z of ed(Z))if(!Zl.call(w,z))RG(w,z,{get:Jl.bind(Z,z),enumerable:!0});if(Q)X.set(Z,w);return w};var F1=(Z,J)=>()=>(J||Z((J={exports:{}}).exports,J),J.exports);var Xl=(Z)=>Z;function wl(Z,J){this[Z]=Xl.bind(null,J)}var N9=(Z,J)=>{for(var $ in J)RG(Z,$,{get:J[$],enumerable:!0,configurable:!0,set:wl.bind(J,$)})};var U=(Z,J)=>()=>(Z&&(J=Z(Z=0)),J);var Yl=((Z)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Z,{get:(J,$)=>(typeof require<"u"?require:J)[$]}):Z)(function(Z){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Z+'" is not supported')});var k2=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(Z){return this.listeners.add(Z),this.onSubscribe(),()=>{this.listeners.delete(Z),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var a8=()=>{};var zl,_9;var MQ=U(()=>{a8();zl=class extends k2{#Z;#J;#$;constructor(){super();this.#$=(Z)=>{if(typeof window<"u"&&window.addEventListener){let J=()=>Z();return window.addEventListener("visibilitychange",J,!1),()=>{window.removeEventListener("visibilitychange",J)}}return}}onSubscribe(){if(!this.#J)this.setEventListener(this.#$)}onUnsubscribe(){if(!this.hasListeners())this.#J?.(),this.#J=void 0}setEventListener(Z){this.#$=Z,this.#J?.(),this.#J=Z((J)=>{if(typeof J==="boolean")this.setFocused(J);else this.onFocus()})}setFocused(Z){if(this.#Z!==Z)this.#Z=Z,this.onFocus()}onFocus(){let Z=this.isFocused();this.listeners.forEach((J)=>{J(Z)})}isFocused(){if(typeof this.#Z==="boolean")return this.#Z;return globalThis.document?.visibilityState!=="hidden"}},_9=new zl});function JL(Z){setTimeout(Z,0)}var Hl,Gl=class{#Z=Hl;#J=!1;setTimeoutProvider(Z){this.#Z=Z}setTimeout(Z,J){return this.#Z.setTimeout(Z,J)}clearTimeout(Z){this.#Z.clearTimeout(Z)}setInterval(Z,J){return this.#Z.setInterval(Z,J)}clearInterval(Z){this.#Z.clearInterval(Z)}},O4;var _Z=U(()=>{Hl={setTimeout:(Z,J)=>setTimeout(Z,J),clearTimeout:(Z)=>clearTimeout(Z),setInterval:(Z,J)=>setInterval(Z,J),clearInterval:(Z)=>clearInterval(Z)},O4=new Gl});function i1(){}function XL(Z,J){return typeof Z==="function"?Z(J):Z}function LZ(Z){return typeof Z==="number"&&Z>=0&&Z!==1/0}function OQ(Z,J){return Math.max(Z+(J||0)-Date.now(),0)}function a2(Z,J){return typeof Z==="function"?Z(J):Z}function i5(Z,J){return typeof Z==="function"?Z(J):Z}function jQ(Z,J){let{type:$="all",exact:Q,fetchStatus:X,predicate:Y,queryKey:w,stale:z}=Z;if(w){if(Q){if(J.queryHash!==AZ(w,J.options))return!1}else if(!s8(J.queryKey,w))return!1}if($!=="all"){let H=J.isActive();if($==="active"&&!H)return!1;if($==="inactive"&&H)return!1}if(typeof z==="boolean"&&J.isStale()!==z)return!1;if(X&&X!==J.state.fetchStatus)return!1;if(Y&&!Y(J))return!1;return!0}function bQ(Z,J){let{exact:$,status:Q,predicate:X,mutationKey:Y}=Z;if(Y){if(!J.options.mutationKey)return!1;if($){if(j4(J.options.mutationKey)!==j4(Y))return!1}else if(!s8(J.options.mutationKey,Y))return!1}if(Q&&J.state.status!==Q)return!1;if(X&&!X(J))return!1;return!0}function AZ(Z,J){return(J?.queryKeyHashFn||j4)(Z)}function j4(Z){return JSON.stringify(Z,(J,$)=>xG($)?Object.keys($).sort().reduce((Q,X)=>{return Q[X]=$[X],Q},{}):$)}function s8(Z,J){if(Z===J)return!0;if(typeof Z!==typeof J)return!1;if(Z&&J&&typeof Z==="object"&&typeof J==="object")return Object.keys(J).every(($)=>s8(Z[$],J[$]));return!1}function vG(Z,J,$=0){if(Z===J)return Z;if($>500)return J;let Q=$L(Z)&&$L(J);if(!Q&&!(xG(Z)&&xG(J)))return J;let Y=(Q?Z:Object.keys(Z)).length,w=Q?J:Object.keys(J),z=w.length,H=Q?Array(z):{},G=0;for(let W=0;W<z;W++){let q=Q?W:w[W],K=Z[q],B=J[q];if(K===B){if(H[q]=K,Q?W<Y:Wl.call(Z,q))G++;continue}if(K===null||B===null||typeof K!=="object"||typeof B!=="object"){H[q]=B;continue}let V=vG(K,B,$+1);if(H[q]=V,V===K)G++}return Y===z&&G===Y?Z:H}function L9(Z,J){if(!J||Object.keys(Z).length!==Object.keys(J).length)return!1;for(let $ in Z)if(Z[$]!==J[$])return!1;return!0}function $L(Z){return Array.isArray(Z)&&Z.length===Object.keys(Z).length}function xG(Z){if(!QL(Z))return!1;let J=Z.constructor;if(J===void 0)return!0;let $=J.prototype;if(!QL($))return!1;if(!$.hasOwnProperty("isPrototypeOf"))return!1;if(Object.getPrototypeOf(Z)!==Object.prototype)return!1;return!0}function QL(Z){return Object.prototype.toString.call(Z)==="[object Object]"}function wL(Z){return new Promise((J)=>{O4.setTimeout(J,Z)})}function DZ(Z,J,$){if(typeof $.structuralSharing==="function")return $.structuralSharing(Z,J);else if($.structuralSharing!==!1)return vG(Z,J);return J}function YL(Z,J,$=0){let Q=[...Z,J];return $&&Q.length>$?Q.slice(1):Q}function zL(Z,J,$=0){let Q=[J,...Z];return $&&Q.length>$?Q.slice(0,-1):Q}function PQ(Z,J){if(!Z.queryFn&&J?.initialPromise)return()=>J.initialPromise;if(!Z.queryFn||Z.queryFn===A9)return()=>Promise.reject(Error(`Missing queryFn: '${Z.queryHash}'`));return Z.queryFn}function D9(Z,J){if(typeof Z==="function")return Z(...J);return!!Z}function HL(Z,J,$){let Q=!1,X;return Object.defineProperty(Z,"signal",{enumerable:!0,get:()=>{if(X??=J(),Q)return X;if(Q=!0,X.aborted)$();else X.addEventListener("abort",$,{once:!0});return X}}),Z}var yG,Wl,A9;var C2=U(()=>{_Z();yG=typeof window>"u"||"Deno"in globalThis;Wl=Object.prototype.hasOwnProperty;A9=Symbol()});var b4;var MZ=U(()=>{C2();b4=(()=>{let Z=()=>yG;return{isServer(){return Z()},setIsServer(J){Z=J}}})()});function OZ(){let Z,J,$=new Promise((X,Y)=>{Z=X,J=Y});$.status="pending",$.catch(()=>{});function Q(X){Object.assign($,X),delete $.resolve,delete $.reject}return $.resolve=(X)=>{Q({status:"fulfilled",value:X}),Z(X)},$.reject=(X)=>{Q({status:"rejected",reason:X}),J(X)},$}var gG=()=>{};function ql(){let Z=[],J=0,$=(z)=>{z()},Q=(z)=>{z()},X=GL,Y=(z)=>{if(J)Z.push(z);else X(()=>{$(z)})},w=()=>{let z=Z;if(Z=[],z.length)X(()=>{Q(()=>{z.forEach((H)=>{$(H)})})})};return{batch:(z)=>{let H;J++;try{H=z()}finally{if(J--,!J)w()}return H},batchCalls:(z)=>{return(...H)=>{Y(()=>{z(...H)})}},schedule:Y,setNotifyFunction:(z)=>{$=z},setBatchNotifyFunction:(z)=>{Q=z},setScheduler:(z)=>{X=z}}}var GL,N1;var z6=U(()=>{_Z();GL=JL;N1=ql()});var Kl,M9;var fG=U(()=>{a8();Kl=class extends k2{#Z=!0;#J;#$;constructor(){super();this.#$=(Z)=>{if(typeof window<"u"&&window.addEventListener){let J=()=>Z(!0),$=()=>Z(!1);return window.addEventListener("online",J,!1),window.addEventListener("offline",$,!1),()=>{window.removeEventListener("online",J),window.removeEventListener("offline",$)}}return}}onSubscribe(){if(!this.#J)this.setEventListener(this.#$)}onUnsubscribe(){if(!this.hasListeners())this.#J?.(),this.#J=void 0}setEventListener(Z){this.#$=Z,this.#J?.(),this.#J=Z(this.setOnline.bind(this))}setOnline(Z){if(this.#Z!==Z)this.#Z=Z,this.listeners.forEach(($)=>{$(Z)})}isOnline(){return this.#Z}},M9=new Kl});function Bl(Z){return Math.min(1000*2**Z,30000)}function mG(Z){return(Z??"online")==="online"?M9.isOnline():!0}function TQ(Z){let J=!1,$=0,Q,X=OZ(),Y=()=>X.status!=="pending",w=(F)=>{if(!Y()){let _=new IQ(F);K(_),Z.onCancel?.(_)}},z=()=>{J=!0},H=()=>{J=!1},G=()=>_9.isFocused()&&(Z.networkMode==="always"||M9.isOnline())&&Z.canRun(),W=()=>mG(Z.networkMode)&&Z.canRun(),q=(F)=>{if(!Y())Q?.(),X.resolve(F)},K=(F)=>{if(!Y())Q?.(),X.reject(F)},B=()=>{return new Promise((F)=>{Q=(_)=>{if(Y()||G())F(_)},Z.onPause?.()}).then(()=>{if(Q=void 0,!Y())Z.onContinue?.()})},V=()=>{if(Y())return;let F,_=$===0?Z.initialPromise:void 0;try{F=_??Z.fn()}catch(N){F=Promise.reject(N)}Promise.resolve(F).then(q).catch((N)=>{if(Y())return;let L=Z.retry??(b4.isServer()?0:3),M=Z.retryDelay??Bl,A=typeof M==="function"?M($,N):M,O=L===!0||typeof L==="number"&&$<L||typeof L==="function"&&L($,N);if(J||!O){K(N);return}$++,Z.onFail?.($,N),wL(A).then(()=>{return G()?void 0:B()}).then(()=>{if(J)K(N);else V()})})};return{promise:X,status:()=>X.status,cancel:w,continue:()=>{return Q?.(),X},cancelRetry:z,continueRetry:H,canStart:W,start:()=>{if(W())V();else B().then(V);return X}}}var IQ;var pG=U(()=>{MQ();fG();gG();MZ();C2();IQ=class extends Error{constructor(Z){super("CancelledError");this.revert=Z?.revert,this.silent=Z?.silent}}});var kQ=class{#Z;destroy(){this.clearGcTimeout()}scheduleGc(){if(this.clearGcTimeout(),LZ(this.gcTime))this.#Z=O4.setTimeout(()=>{this.optionalRemove()},this.gcTime)}updateGcTime(Z){this.gcTime=Math.max(this.gcTime||0,Z??(b4.isServer()?1/0:300000))}clearGcTimeout(){if(this.#Z!==void 0)O4.clearTimeout(this.#Z),this.#Z=void 0}};var uG=U(()=>{_Z();MZ();C2()});function cG(Z,J){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mG(J.networkMode)?"fetching":"paused",...Z===void 0&&{error:null,status:"pending"}}}function WL(Z,J){return{data:Z,dataUpdatedAt:J??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qL(Z){let J=typeof Z.initialData==="function"?Z.initialData():Z.initialData,$=J!==void 0,Q=$?typeof Z.initialDataUpdatedAt==="function"?Z.initialDataUpdatedAt():Z.initialDataUpdatedAt:0;return{data:J,dataUpdateCount:0,dataUpdatedAt:$?Q??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:$?"success":"pending",fetchStatus:"idle"}}var KL;var dG=U(()=>{C2();z6();pG();uG();KL=class extends kQ{#Z;#J;#$;#X;#Q;#w;#Y;constructor(Z){super();this.#Y=!1,this.#w=Z.defaultOptions,this.setOptions(Z.options),this.observers=[],this.#X=Z.client,this.#$=this.#X.getQueryCache(),this.queryKey=Z.queryKey,this.queryHash=Z.queryHash,this.#Z=qL(this.options),this.state=Z.state??this.#Z,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#Q?.promise}setOptions(Z){if(this.options={...this.#w,...Z},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let J=qL(this.options);if(J.data!==void 0)this.setState(WL(J.data,J.dataUpdatedAt)),this.#Z=J}}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle")this.#$.remove(this)}setData(Z,J){let $=DZ(this.state.data,Z,this.options);return this.#H({data:$,type:"success",dataUpdatedAt:J?.updatedAt,manual:J?.manual}),$}setState(Z,J){this.#H({type:"setState",state:Z,setStateOptions:J})}cancel(Z){let J=this.#Q?.promise;return this.#Q?.cancel(Z),J?J.then(i1).catch(i1):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#Z}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some((Z)=>i5(Z.options.enabled,this)!==!1)}isDisabled(){if(this.getObserversCount()>0)return!this.isActive();return this.options.queryFn===A9||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){if(this.getObserversCount()>0)return this.observers.some((Z)=>a2(Z.options.staleTime,this)==="static");return!1}isStale(){if(this.getObserversCount()>0)return this.observers.some((Z)=>Z.getCurrentResult().isStale);return this.state.data===void 0||this.state.isInvalidated}isStaleByTime(Z=0){if(this.state.data===void 0)return!0;if(Z==="static")return!1;if(this.state.isInvalidated)return!0;return!OQ(this.state.dataUpdatedAt,Z)}onFocus(){this.observers.find((J)=>J.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#Q?.continue()}onOnline(){this.observers.find((J)=>J.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#Q?.continue()}addObserver(Z){if(!this.observers.includes(Z))this.observers.push(Z),this.clearGcTimeout(),this.#$.notify({type:"observerAdded",query:this,observer:Z})}removeObserver(Z){if(this.observers.includes(Z)){if(this.observers=this.observers.filter((J)=>J!==Z),!this.observers.length){if(this.#Q)if(this.#Y||this.#z())this.#Q.cancel({revert:!0});else this.#Q.cancelRetry();this.scheduleGc()}this.#$.notify({type:"observerRemoved",query:this,observer:Z})}}getObserversCount(){return this.observers.length}#z(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){if(!this.state.isInvalidated)this.#H({type:"invalidate"})}async fetch(Z,J){if(this.state.fetchStatus!=="idle"&&this.#Q?.status()!=="rejected"){if(this.state.data!==void 0&&J?.cancelRefetch)this.cancel({silent:!0});else if(this.#Q)return this.#Q.continueRetry(),this.#Q.promise}if(Z)this.setOptions(Z);if(!this.options.queryFn){let z=this.observers.find((H)=>H.options.queryFn);if(z)this.setOptions(z.options)}let $=new AbortController,Q=(z)=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>{return this.#Y=!0,$.signal}})},X=()=>{let z=PQ(this.options,J),G=(()=>{let W={client:this.#X,queryKey:this.queryKey,meta:this.meta};return Q(W),W})();if(this.#Y=!1,this.options.persister)return this.options.persister(z,G,this);return z(G)},w=(()=>{let z={fetchOptions:J,options:this.options,queryKey:this.queryKey,client:this.#X,state:this.state,fetchFn:X};return Q(z),z})();if(this.options.behavior?.onFetch(w,this),this.#J=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==w.fetchOptions?.meta)this.#H({type:"fetch",meta:w.fetchOptions?.meta});this.#Q=TQ({initialPromise:J?.initialPromise,fn:w.fetchFn,onCancel:(z)=>{if(z instanceof IQ&&z.revert)this.setState({...this.#J,fetchStatus:"idle"});$.abort()},onFail:(z,H)=>{this.#H({type:"failed",failureCount:z,error:H})},onPause:()=>{this.#H({type:"pause"})},onContinue:()=>{this.#H({type:"continue"})},retry:w.options.retry,retryDelay:w.options.retryDelay,networkMode:w.options.networkMode,canRun:()=>!0});try{let z=await this.#Q.start();if(z===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(z),this.#$.config.onSuccess?.(z,this),this.#$.config.onSettled?.(z,this.state.error,this),z}catch(z){if(z instanceof IQ){if(z.silent)return this.#Q.promise;else if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw this.#H({type:"error",error:z}),this.#$.config.onError?.(z,this),this.#$.config.onSettled?.(this.state.data,z,this),z}finally{this.scheduleGc()}}#H(Z){let J=($)=>{switch(Z.type){case"failed":return{...$,fetchFailureCount:Z.failureCount,fetchFailureReason:Z.error};case"pause":return{...$,fetchStatus:"paused"};case"continue":return{...$,fetchStatus:"fetching"};case"fetch":return{...$,...cG($.data,this.options),fetchMeta:Z.meta??null};case"success":let Q={...$,...WL(Z.data,Z.dataUpdatedAt),dataUpdateCount:$.dataUpdateCount+1,...!Z.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#J=Z.manual?Q:void 0,Q;case"error":let X=Z.error;return{...$,error:X,errorUpdateCount:$.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:$.fetchFailureCount+1,fetchFailureReason:X,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...$,isInvalidated:!0};case"setState":return{...$,...Z.state}}};this.state=J(this.state),N1.batch(()=>{this.observers.forEach(($)=>{$.onQueryUpdate()}),this.#$.notify({query:this,type:"updated",action:Z})})}}});function Ul(Z,J){return i5(J.enabled,Z)!==!1&&Z.state.data===void 0&&!(Z.state.status==="error"&&i5(J.retryOnMount,Z)===!1)}function BL(Z,J){return Ul(Z,J)||Z.state.data!==void 0&&lG(Z,J,J.refetchOnMount)}function lG(Z,J,$){if(i5(J.enabled,Z)!==!1&&a2(J.staleTime,Z)!=="static"){let Q=typeof $==="function"?$(Z):$;return Q==="always"||Q!==!1&&iG(Z,J)}return!1}function UL(Z,J,$,Q){return(Z!==J||i5(Q.enabled,Z)===!1)&&(!$.suspense||Z.state.status!=="error")&&iG(Z,$)}function iG(Z,J){return i5(J.enabled,Z)!==!1&&Z.isStaleByTime(a2(J.staleTime,Z))}function Vl(Z,J){if(!L9(Z.getCurrentResult(),J))return!0;return!1}var rG;var VL=U(()=>{MQ();MZ();z6();dG();a8();gG();C2();_Z();rG=class extends k2{constructor(Z,J){super();this.options=J,this.#Z=Z,this.#z=null,this.#Y=OZ(),this.bindMethods(),this.setOptions(J)}#Z;#J=void 0;#$=void 0;#X=void 0;#Q;#w;#Y;#z;#H;#B;#U;#W;#q;#G;#V=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){if(this.#J.addObserver(this),BL(this.#J,this.options))this.#K();else this.updateResult();this.#L()}}onUnsubscribe(){if(!this.hasListeners())this.destroy()}shouldFetchOnReconnect(){return lG(this.#J,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lG(this.#J,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#A(),this.#D(),this.#J.removeObserver(this)}setOptions(Z){let J=this.options,$=this.#J;if(this.options=this.#Z.defaultQueryOptions(Z),this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof i5(this.options.enabled,this.#J)!=="boolean")throw Error("Expected enabled to be a boolean or a callback that returns a boolean");if(this.#M(),this.#J.setOptions(this.options),J._defaulted&&!L9(this.options,J))this.#Z.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#J,observer:this});let Q=this.hasListeners();if(Q&&UL(this.#J,$,this.options,J))this.#K();if(this.updateResult(),Q&&(this.#J!==$||i5(this.options.enabled,this.#J)!==i5(J.enabled,this.#J)||a2(this.options.staleTime,this.#J)!==a2(J.staleTime,this.#J)))this.#F();let X=this.#N();if(Q&&(this.#J!==$||i5(this.options.enabled,this.#J)!==i5(J.enabled,this.#J)||X!==this.#G))this.#_(X)}getOptimisticResult(Z){let J=this.#Z.getQueryCache().build(this.#Z,Z),$=this.createResult(J,Z);if(Vl(this,$))this.#X=$,this.#w=this.options,this.#Q=this.#J.state;return $}getCurrentResult(){return this.#X}trackResult(Z,J){return new Proxy(Z,{get:($,Q)=>{if(this.trackProp(Q),J?.(Q),Q==="promise"){if(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#Y.status==="pending")this.#Y.reject(Error("experimental_prefetchInRender feature flag is not enabled"))}return Reflect.get($,Q)}})}trackProp(Z){this.#V.add(Z)}getCurrentQuery(){return this.#J}refetch({...Z}={}){return this.fetch({...Z})}fetchOptimistic(Z){let J=this.#Z.defaultQueryOptions(Z),$=this.#Z.getQueryCache().build(this.#Z,J);return $.fetch().then(()=>this.createResult($,J))}fetch(Z){return this.#K({...Z,cancelRefetch:Z.cancelRefetch??!0}).then(()=>{return this.updateResult(),this.#X})}#K(Z){this.#M();let J=this.#J.fetch(this.options,Z);if(!Z?.throwOnError)J=J.catch(i1);return J}#F(){this.#A();let Z=a2(this.options.staleTime,this.#J);if(b4.isServer()||this.#X.isStale||!LZ(Z))return;let $=OQ(this.#X.dataUpdatedAt,Z)+1;this.#W=O4.setTimeout(()=>{if(!this.#X.isStale)this.updateResult()},$)}#N(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#J):this.options.refetchInterval)??!1}#_(Z){if(this.#D(),this.#G=Z,b4.isServer()||i5(this.options.enabled,this.#J)===!1||!LZ(this.#G)||this.#G===0)return;this.#q=O4.setInterval(()=>{if(this.options.refetchIntervalInBackground||_9.isFocused())this.#K()},this.#G)}#L(){this.#F(),this.#_(this.#N())}#A(){if(this.#W!==void 0)O4.clearTimeout(this.#W),this.#W=void 0}#D(){if(this.#q!==void 0)O4.clearInterval(this.#q),this.#q=void 0}createResult(Z,J){let $=this.#J,Q=this.options,X=this.#X,Y=this.#Q,w=this.#w,H=Z!==$?Z.state:this.#$,{state:G}=Z,W={...G},q=!1,K;if(J._optimisticResults){let b=this.hasListeners(),h=!b&&BL(Z,J),I=b&&UL(Z,$,J,Q);if(h||I)W={...W,...cG(G.data,Z.options)};if(J._optimisticResults==="isRestoring")W.fetchStatus="idle"}let{error:B,errorUpdatedAt:V,status:F}=W;K=W.data;let _=!1;if(J.placeholderData!==void 0&&K===void 0&&F==="pending"){let b;if(X?.isPlaceholderData&&J.placeholderData===w?.placeholderData)b=X.data,_=!0;else b=typeof J.placeholderData==="function"?J.placeholderData(this.#U?.state.data,this.#U):J.placeholderData;if(b!==void 0)F="success",K=DZ(X?.data,b,J),q=!0}if(J.select&&K!==void 0&&!_)if(X&&K===Y?.data&&J.select===this.#H)K=this.#B;else try{this.#H=J.select,K=J.select(K),K=DZ(X?.data,K,J),this.#B=K,this.#z=null}catch(b){this.#z=b}if(this.#z)B=this.#z,K=this.#B,V=Date.now(),F="error";let N=W.fetchStatus==="fetching",L=F==="pending",M=F==="error",A=L&&N,O=K!==void 0,k={status:F,fetchStatus:W.fetchStatus,isPending:L,isSuccess:F==="success",isError:M,isInitialLoading:A,isLoading:A,data:K,dataUpdatedAt:W.dataUpdatedAt,error:B,errorUpdatedAt:V,failureCount:W.fetchFailureCount,failureReason:W.fetchFailureReason,errorUpdateCount:W.errorUpdateCount,isFetched:Z.isFetched(),isFetchedAfterMount:W.dataUpdateCount>H.dataUpdateCount||W.errorUpdateCount>H.errorUpdateCount,isFetching:N,isRefetching:N&&!L,isLoadingError:M&&!O,isPaused:W.fetchStatus==="paused",isPlaceholderData:q,isRefetchError:M&&O,isStale:iG(Z,J),refetch:this.refetch,promise:this.#Y,isEnabled:i5(J.enabled,Z)!==!1};if(this.options.experimental_prefetchInRender){let b=k.data!==void 0,h=k.status==="error"&&!b,I=(C)=>{if(h)C.reject(k.error);else if(b)C.resolve(k.data)},d=()=>{let C=this.#Y=k.promise=OZ();I(C)},v=this.#Y;switch(v.status){case"pending":if(Z.queryHash===$.queryHash)I(v);break;case"fulfilled":if(h||k.data!==v.value)d();break;case"rejected":if(!h||k.error!==v.reason)d();break}}return k}updateResult(){let Z=this.#X,J=this.createResult(this.#J,this.options);if(this.#Q=this.#J.state,this.#w=this.options,this.#Q.data!==void 0)this.#U=this.#J;if(L9(J,Z))return;this.#X=J;let $=()=>{if(!Z)return!0;let{notifyOnChangeProps:Q}=this.options,X=typeof Q==="function"?Q():Q;if(X==="all"||!X&&!this.#V.size)return!0;let Y=new Set(X??this.#V);if(this.options.throwOnError)Y.add("error");return Object.keys(this.#X).some((w)=>{let z=w;return this.#X[z]!==Z[z]&&Y.has(z)})};this.#O({listeners:$()})}#M(){let Z=this.#Z.getQueryCache().build(this.#Z,this.options);if(Z===this.#J)return;let J=this.#J;if(this.#J=Z,this.#$=Z.state,this.hasListeners())J?.removeObserver(this),Z.addObserver(this)}onQueryUpdate(){if(this.updateResult(),this.hasListeners())this.#L()}#O(Z){N1.batch(()=>{if(Z.listeners)this.listeners.forEach((J)=>{J(this.#X)});this.#Z.getQueryCache().notify({query:this.#J,type:"observerResultsUpdated"})})}}});function aG(Z){return{onFetch:(J,$)=>{let Q=J.options,X=J.fetchOptions?.meta?.fetchMore?.direction,Y=J.state.data?.pages||[],w=J.state.data?.pageParams||[],z={pages:[],pageParams:[]},H=0,G=async()=>{let W=!1,q=(V)=>{HL(V,()=>J.signal,()=>W=!0)},K=PQ(J.options,J.fetchOptions),B=async(V,F,_)=>{if(W)return Promise.reject();if(F==null&&V.pages.length)return Promise.resolve(V);let L=(()=>{let D={client:J.client,queryKey:J.queryKey,pageParam:F,direction:_?"backward":"forward",meta:J.options.meta};return q(D),D})(),M=await K(L),{maxPages:A}=J.options,O=_?zL:YL;return{pages:O(V.pages,M,A),pageParams:O(V.pageParams,F,A)}};if(X&&Y.length){let V=X==="backward",F=V?Fl:FL,_={pages:Y,pageParams:w},N=F(Q,_);z=await B(_,N,V)}else{let V=Z??Y.length;do{let F=H===0?w[0]??Q.initialPageParam:FL(Q,z);if(H>0&&F==null)break;z=await B(z,F),H++}while(H<V)}return z};if(J.options.persister)J.fetchFn=()=>{return J.options.persister?.(G,{client:J.client,queryKey:J.queryKey,meta:J.options.meta,signal:J.signal},$)};else J.fetchFn=G}}}function FL(Z,{pages:J,pageParams:$}){let Q=J.length-1;return J.length>0?Z.getNextPageParam(J[Q],J,$[Q],$):void 0}function Fl(Z,{pages:J,pageParams:$}){return J.length>0?Z.getPreviousPageParam?.(J[0],J,$[0],$):void 0}var NL=U(()=>{C2()});function sG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _L;var oG=U(()=>{z6();uG();pG();_L=class extends kQ{#Z;#J;#$;#X;constructor(Z){super();this.#Z=Z.client,this.mutationId=Z.mutationId,this.#$=Z.mutationCache,this.#J=[],this.state=Z.state||sG(),this.setOptions(Z.options),this.scheduleGc()}setOptions(Z){this.options=Z,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(Z){if(!this.#J.includes(Z))this.#J.push(Z),this.clearGcTimeout(),this.#$.notify({type:"observerAdded",mutation:this,observer:Z})}removeObserver(Z){this.#J=this.#J.filter((J)=>J!==Z),this.scheduleGc(),this.#$.notify({type:"observerRemoved",mutation:this,observer:Z})}optionalRemove(){if(!this.#J.length)if(this.state.status==="pending")this.scheduleGc();else this.#$.remove(this)}continue(){return this.#X?.continue()??this.execute(this.state.variables)}async execute(Z){let J=()=>{this.#Q({type:"continue"})},$={client:this.#Z,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#X=TQ({fn:()=>{if(!this.options.mutationFn)return Promise.reject(Error("No mutationFn found"));return this.options.mutationFn(Z,$)},onFail:(Y,w)=>{this.#Q({type:"failed",failureCount:Y,error:w})},onPause:()=>{this.#Q({type:"pause"})},onContinue:J,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#$.canRun(this)});let Q=this.state.status==="pending",X=!this.#X.canStart();try{if(Q)J();else{if(this.#Q({type:"pending",variables:Z,isPaused:X}),this.#$.config.onMutate)await this.#$.config.onMutate(Z,this,$);let w=await this.options.onMutate?.(Z,$);if(w!==this.state.context)this.#Q({type:"pending",context:w,variables:Z,isPaused:X})}let Y=await this.#X.start();return await this.#$.config.onSuccess?.(Y,Z,this.state.context,this,$),await this.options.onSuccess?.(Y,Z,this.state.context,$),await this.#$.config.onSettled?.(Y,null,this.state.variables,this.state.context,this,$),await this.options.onSettled?.(Y,null,Z,this.state.context,$),this.#Q({type:"success",data:Y}),Y}catch(Y){try{await this.#$.config.onError?.(Y,Z,this.state.context,this,$)}catch(w){Promise.reject(w)}try{await this.options.onError?.(Y,Z,this.state.context,$)}catch(w){Promise.reject(w)}try{await this.#$.config.onSettled?.(void 0,Y,this.state.variables,this.state.context,this,$)}catch(w){Promise.reject(w)}try{await this.options.onSettled?.(void 0,Y,Z,this.state.context,$)}catch(w){Promise.reject(w)}throw this.#Q({type:"error",error:Y}),Y}finally{this.#$.runNext(this)}}#Q(Z){let J=($)=>{switch(Z.type){case"failed":return{...$,failureCount:Z.failureCount,failureReason:Z.error};case"pause":return{...$,isPaused:!0};case"continue":return{...$,isPaused:!1};case"pending":return{...$,context:Z.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:Z.isPaused,status:"pending",variables:Z.variables,submittedAt:Date.now()};case"success":return{...$,data:Z.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...$,data:void 0,error:Z.error,failureCount:$.failureCount+1,failureReason:Z.error,isPaused:!1,status:"error"}}};this.state=J(this.state),N1.batch(()=>{this.#J.forEach(($)=>{$.onMutationUpdate(Z)}),this.#$.notify({mutation:this,type:"updated",action:Z})})}}});function CQ(Z){return Z.options.scope?.id}var LL;var AL=U(()=>{z6();oG();C2();a8();LL=class extends k2{constructor(Z={}){super();this.config=Z,this.#Z=new Set,this.#J=new Map,this.#$=0}#Z;#J;#$;build(Z,J,$){let Q=new _L({client:Z,mutationCache:this,mutationId:++this.#$,options:Z.defaultMutationOptions(J),state:$});return this.add(Q),Q}add(Z){this.#Z.add(Z);let J=CQ(Z);if(typeof J==="string"){let $=this.#J.get(J);if($)$.push(Z);else this.#J.set(J,[Z])}this.notify({type:"added",mutation:Z})}remove(Z){if(this.#Z.delete(Z)){let J=CQ(Z);if(typeof J==="string"){let $=this.#J.get(J);if($){if($.length>1){let Q=$.indexOf(Z);if(Q!==-1)$.splice(Q,1)}else if($[0]===Z)this.#J.delete(J)}}}this.notify({type:"removed",mutation:Z})}canRun(Z){let J=CQ(Z);if(typeof J==="string"){let Q=this.#J.get(J)?.find((X)=>X.state.status==="pending");return!Q||Q===Z}else return!0}runNext(Z){let J=CQ(Z);if(typeof J==="string")return this.#J.get(J)?.find((Q)=>Q!==Z&&Q.state.isPaused)?.continue()??Promise.resolve();else return Promise.resolve()}clear(){N1.batch(()=>{this.#Z.forEach((Z)=>{this.notify({type:"removed",mutation:Z})}),this.#Z.clear(),this.#J.clear()})}getAll(){return Array.from(this.#Z)}find(Z){let J={exact:!0,...Z};return this.getAll().find(($)=>bQ(J,$))}findAll(Z={}){return this.getAll().filter((J)=>bQ(Z,J))}notify(Z){N1.batch(()=>{this.listeners.forEach((J)=>{J(Z)})})}resumePausedMutations(){let Z=this.getAll().filter((J)=>J.state.isPaused);return N1.batch(()=>Promise.all(Z.map((J)=>J.continue().catch(i1))))}}});var nG;var DL=U(()=>{oG();z6();a8();C2();nG=class extends k2{#Z;#J=void 0;#$;#X;constructor(Z,J){super();this.#Z=Z,this.setOptions(J),this.bindMethods(),this.#Q()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(Z){let J=this.options;if(this.options=this.#Z.defaultMutationOptions(Z),!L9(this.options,J))this.#Z.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#$,observer:this});if(J?.mutationKey&&this.options.mutationKey&&j4(J.mutationKey)!==j4(this.options.mutationKey))this.reset();else if(this.#$?.state.status==="pending")this.#$.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners())this.#$?.removeObserver(this)}onMutationUpdate(Z){this.#Q(),this.#w(Z)}getCurrentResult(){return this.#J}reset(){this.#$?.removeObserver(this),this.#$=void 0,this.#Q(),this.#w()}mutate(Z,J){return this.#X=J,this.#$?.removeObserver(this),this.#$=this.#Z.getMutationCache().build(this.#Z,this.options),this.#$.addObserver(this),this.#$.execute(Z)}#Q(){let Z=this.#$?.state??sG();this.#J={...Z,isPending:Z.status==="pending",isSuccess:Z.status==="success",isError:Z.status==="error",isIdle:Z.status==="idle",mutate:this.mutate,reset:this.reset}}#w(Z){N1.batch(()=>{if(this.#X&&this.hasListeners()){let J=this.#J.variables,$=this.#J.context,Q={client:this.#Z,meta:this.options.meta,mutationKey:this.options.mutationKey};if(Z?.type==="success"){try{this.#X.onSuccess?.(Z.data,J,$,Q)}catch(X){Promise.reject(X)}try{this.#X.onSettled?.(Z.data,null,J,$,Q)}catch(X){Promise.reject(X)}}else if(Z?.type==="error"){try{this.#X.onError?.(Z.error,J,$,Q)}catch(X){Promise.reject(X)}try{this.#X.onSettled?.(void 0,Z.error,J,$,Q)}catch(X){Promise.reject(X)}}}this.listeners.forEach((J)=>{J(this.#J)})})}}});var ML;var OL=U(()=>{C2();dG();z6();a8();ML=class extends k2{constructor(Z={}){super();this.config=Z,this.#Z=new Map}#Z;build(Z,J,$){let Q=J.queryKey,X=J.queryHash??AZ(Q,J),Y=this.get(X);if(!Y)Y=new KL({client:Z,queryKey:Q,queryHash:X,options:Z.defaultQueryOptions(J),state:$,defaultOptions:Z.getQueryDefaults(Q)}),this.add(Y);return Y}add(Z){if(!this.#Z.has(Z.queryHash))this.#Z.set(Z.queryHash,Z),this.notify({type:"added",query:Z})}remove(Z){let J=this.#Z.get(Z.queryHash);if(J){if(Z.destroy(),J===Z)this.#Z.delete(Z.queryHash);this.notify({type:"removed",query:Z})}}clear(){N1.batch(()=>{this.getAll().forEach((Z)=>{this.remove(Z)})})}get(Z){return this.#Z.get(Z)}getAll(){return[...this.#Z.values()]}find(Z){let J={exact:!0,...Z};return this.getAll().find(($)=>jQ(J,$))}findAll(Z={}){let J=this.getAll();return Object.keys(Z).length>0?J.filter(($)=>jQ(Z,$)):J}notify(Z){N1.batch(()=>{this.listeners.forEach((J)=>{J(Z)})})}onFocus(){N1.batch(()=>{this.getAll().forEach((Z)=>{Z.onFocus()})})}onOnline(){N1.batch(()=>{this.getAll().forEach((Z)=>{Z.onOnline()})})}}});var tG=class{#Z;#J;#$;#X;#Q;#w;#Y;#z;constructor(Z={}){this.#Z=Z.queryCache||new ML,this.#J=Z.mutationCache||new LL,this.#$=Z.defaultOptions||{},this.#X=new Map,this.#Q=new Map,this.#w=0}mount(){if(this.#w++,this.#w!==1)return;this.#Y=_9.subscribe(async(Z)=>{if(Z)await this.resumePausedMutations(),this.#Z.onFocus()}),this.#z=M9.subscribe(async(Z)=>{if(Z)await this.resumePausedMutations(),this.#Z.onOnline()})}unmount(){if(this.#w--,this.#w!==0)return;this.#Y?.(),this.#Y=void 0,this.#z?.(),this.#z=void 0}isFetching(Z){return this.#Z.findAll({...Z,fetchStatus:"fetching"}).length}isMutating(Z){return this.#J.findAll({...Z,status:"pending"}).length}getQueryData(Z){let J=this.defaultQueryOptions({queryKey:Z});return this.#Z.get(J.queryHash)?.state.data}ensureQueryData(Z){let J=this.defaultQueryOptions(Z),$=this.#Z.build(this,J),Q=$.state.data;if(Q===void 0)return this.fetchQuery(Z);if(Z.revalidateIfStale&&$.isStaleByTime(a2(J.staleTime,$)))this.prefetchQuery(J);return Promise.resolve(Q)}getQueriesData(Z){return this.#Z.findAll(Z).map(({queryKey:J,state:$})=>{let Q=$.data;return[J,Q]})}setQueryData(Z,J,$){let Q=this.defaultQueryOptions({queryKey:Z}),Y=this.#Z.get(Q.queryHash)?.state.data,w=XL(J,Y);if(w===void 0)return;return this.#Z.build(this,Q).setData(w,{...$,manual:!0})}setQueriesData(Z,J,$){return N1.batch(()=>this.#Z.findAll(Z).map(({queryKey:Q})=>[Q,this.setQueryData(Q,J,$)]))}getQueryState(Z){let J=this.defaultQueryOptions({queryKey:Z});return this.#Z.get(J.queryHash)?.state}removeQueries(Z){let J=this.#Z;N1.batch(()=>{J.findAll(Z).forEach(($)=>{J.remove($)})})}resetQueries(Z,J){let $=this.#Z;return N1.batch(()=>{return $.findAll(Z).forEach((Q)=>{Q.reset()}),this.refetchQueries({type:"active",...Z},J)})}cancelQueries(Z,J={}){let $={revert:!0,...J},Q=N1.batch(()=>this.#Z.findAll(Z).map((X)=>X.cancel($)));return Promise.all(Q).then(i1).catch(i1)}invalidateQueries(Z,J={}){return N1.batch(()=>{if(this.#Z.findAll(Z).forEach(($)=>{$.invalidate()}),Z?.refetchType==="none")return Promise.resolve();return this.refetchQueries({...Z,type:Z?.refetchType??Z?.type??"active"},J)})}refetchQueries(Z,J={}){let $={...J,cancelRefetch:J.cancelRefetch??!0},Q=N1.batch(()=>this.#Z.findAll(Z).filter((X)=>!X.isDisabled()&&!X.isStatic()).map((X)=>{let Y=X.fetch(void 0,$);if(!$.throwOnError)Y=Y.catch(i1);return X.state.fetchStatus==="paused"?Promise.resolve():Y}));return Promise.all(Q).then(i1)}fetchQuery(Z){let J=this.defaultQueryOptions(Z);if(J.retry===void 0)J.retry=!1;let $=this.#Z.build(this,J);return $.isStaleByTime(a2(J.staleTime,$))?$.fetch(J):Promise.resolve($.state.data)}prefetchQuery(Z){return this.fetchQuery(Z).then(i1).catch(i1)}fetchInfiniteQuery(Z){return Z.behavior=aG(Z.pages),this.fetchQuery(Z)}prefetchInfiniteQuery(Z){return this.fetchInfiniteQuery(Z).then(i1).catch(i1)}ensureInfiniteQueryData(Z){return Z.behavior=aG(Z.pages),this.ensureQueryData(Z)}resumePausedMutations(){if(M9.isOnline())return this.#J.resumePausedMutations();return Promise.resolve()}getQueryCache(){return this.#Z}getMutationCache(){return this.#J}getDefaultOptions(){return this.#$}setDefaultOptions(Z){this.#$=Z}setQueryDefaults(Z,J){this.#X.set(j4(Z),{queryKey:Z,defaultOptions:J})}getQueryDefaults(Z){let J=[...this.#X.values()],$={};return J.forEach((Q)=>{if(s8(Z,Q.queryKey))Object.assign($,Q.defaultOptions)}),$}setMutationDefaults(Z,J){this.#Q.set(j4(Z),{mutationKey:Z,defaultOptions:J})}getMutationDefaults(Z){let J=[...this.#Q.values()],$={};return J.forEach((Q)=>{if(s8(Z,Q.mutationKey))Object.assign($,Q.defaultOptions)}),$}defaultQueryOptions(Z){if(Z._defaulted)return Z;let J={...this.#$.queries,...this.getQueryDefaults(Z.queryKey),...Z,_defaulted:!0};if(!J.queryHash)J.queryHash=AZ(J.queryKey,J);if(J.refetchOnReconnect===void 0)J.refetchOnReconnect=J.networkMode!=="always";if(J.throwOnError===void 0)J.throwOnError=!!J.suspense;if(!J.networkMode&&J.persister)J.networkMode="offlineFirst";if(J.queryFn===A9)J.enabled=!1;return J}defaultMutationOptions(Z){if(Z?._defaulted)return Z;return{...this.#$.mutations,...Z?.mutationKey&&this.getMutationDefaults(Z.mutationKey),...Z,_defaulted:!0}}clear(){this.#Z.clear(),this.#J.clear()}};var jL=U(()=>{C2();OL();AL();MQ();fG();z6();NL()});var bL=()=>{};var O9=U(()=>{MZ();DL();z6();jL();VL();C2();bL()});var f=F1((CJ0,PL)=>{PL.exports=globalThis.__esm.react});var G0=F1((SJ0,IL)=>{IL.exports=globalThis.__esm["react/jsx-runtime"]});var j9,TL,eG,S2=(Z)=>{let J=j9.useContext(eG);if(Z)return Z;if(!J)throw Error("No QueryClient set, use QueryClientProvider to set one");return J},ZW=({client:Z,children:J})=>{return j9.useEffect(()=>{return Z.mount(),()=>{Z.unmount()}},[Z]),TL.jsx(eG.Provider,{value:Z,children:J})};var SQ=U(()=>{j9=P(f(),1),TL=P(G0(),1),eG=j9.createContext(void 0)});function _l(){let Z=!1;return{clearReset:()=>{Z=!1},reset:()=>{Z=!0},isReset:()=>{return Z}}}var jZ,Nl,Ll,kL=()=>jZ.useContext(Ll);var CL=U(()=>{jZ=P(f(),1),Nl=P(G0(),1);Ll=jZ.createContext(_l())});var SL,EL=(Z,J,$)=>{let Q=$?.state.error&&typeof Z.throwOnError==="function"?D9(Z.throwOnError,[$.state.error,$]):Z.throwOnError;if(Z.suspense||Z.experimental_prefetchInRender||Q){if(!J.isReset())Z.retryOnMount=!1}},hL=(Z)=>{SL.useEffect(()=>{Z.clearReset()},[Z])},RL=({result:Z,errorResetBoundary:J,throwOnError:$,query:Q,suspense:X})=>{return Z.isError&&!J.isReset()&&!Z.isFetching&&Q&&(X&&Z.data===void 0||D9($,[Z.error,Q]))};var xL=U(()=>{O9();SL=P(f(),1)});var EQ,yL,vL=()=>EQ.useContext(yL),yJ0;var gL=U(()=>{EQ=P(f(),1),yL=EQ.createContext(!1),yJ0=yL.Provider});var fL=(Z)=>{if(Z.suspense){let $=(X)=>X==="static"?X:Math.max(X??1000,1000),Q=Z.staleTime;if(Z.staleTime=typeof Q==="function"?(...X)=>$(Q(...X)):$(Q),typeof Z.gcTime==="number")Z.gcTime=Math.max(Z.gcTime,1000)}},mL=(Z,J)=>Z.isLoading&&Z.isFetching&&!J,pL=(Z,J)=>Z?.suspense&&J.isPending,JW=(Z,J,$)=>J.fetchOptimistic(Z).catch(()=>{$.clearReset()});var uL=()=>{};function cL(Z,J,$){let Q=vL(),X=kL(),Y=S2($),w=Y.defaultQueryOptions(Z);Y.getDefaultOptions().queries?._experimental_beforeQuery?.(w);let z=Y.getQueryCache().get(w.queryHash);w._optimisticResults=Q?"isRestoring":"optimistic",fL(w),EL(w,X,z),hL(X);let H=!Y.getQueryCache().get(w.queryHash),[G]=f6.useState(()=>new J(Y,w)),W=G.getOptimisticResult(w),q=!Q&&Z.subscribed!==!1;if(f6.useSyncExternalStore(f6.useCallback((K)=>{let B=q?G.subscribe(N1.batchCalls(K)):i1;return G.updateResult(),B},[G,q]),()=>G.getCurrentResult(),()=>G.getCurrentResult()),f6.useEffect(()=>{G.setOptions(w)},[w,G]),pL(w,W))throw JW(w,G,X);if(RL({result:W,errorResetBoundary:X,throwOnError:w.throwOnError,query:z,suspense:w.suspense}))throw W.error;if(Y.getDefaultOptions().queries?._experimental_afterQuery?.(w,W),w.experimental_prefetchInRender&&!b4.isServer()&&mL(W,Q))(H?JW(w,G,X):z?.promise)?.catch(i1).finally(()=>{G.updateResult()});return!w.notifyOnChangeProps?G.trackResult(W):W}var f6;var dL=U(()=>{O9();SQ();CL();xL();gL();uL();f6=P(f(),1)});function m6(Z,J){return cL(Z,rG,J)}var lL=U(()=>{O9();dL()});function bZ(Z,J){let $=S2(J),[Q]=H6.useState(()=>new nG($,Z));H6.useEffect(()=>{Q.setOptions(Z)},[Q,Z]);let X=H6.useSyncExternalStore(H6.useCallback((w)=>Q.subscribe(N1.batchCalls(w)),[Q]),()=>Q.getCurrentResult(),()=>Q.getCurrentResult()),Y=H6.useCallback((w,z)=>{Q.mutate(w,z).catch(i1)},[Q]);if(X.error&&D9(Q.options.throwOnError,[X.error]))throw X.error;return{...X,mutate:Y,mutateAsync:X.mutate}}var H6;var rL=U(()=>{O9();SQ();H6=P(f(),1)});var PZ=U(()=>{lL();SQ();rL();O9()});var s2=F1((v$0,iL)=>{iL.exports=globalThis.__esm["react-dom"]});var sL=F1((g$0,aL)=>{aL.exports=globalThis.__esm["react-dom/client"]});function oL(Z,J){if(Z instanceof RegExp)return{keys:!1,pattern:Z};var $,Q,X,Y,w=[],z="",H=Z.split("/");H[0]||H.shift();while(X=H.shift())if($=X[0],$==="*")w.push($),z+=X[1]==="?"?"(?:/(.*))?":"/(.*)";else if($===":"){if(Q=X.indexOf("?",1),Y=X.indexOf(".",1),w.push(X.substring(1,~Q?Q:~Y?Y:X.length)),z+=!!~Q&&!~Y?"(?:/([^/]+?))?":"/([^/]+?)",~Y)z+=(~Q?"?":"")+"\\"+X.substring(Y)}else z+="/"+X;return{keys:w,pattern:new RegExp("^"+z+(J?"(?=$|/)":"/?$"),"i")}}var nL=()=>{};var hQ=F1((kl)=>{var o2=P(f());function Al(Z,J){return Z===J&&(Z!==0||1/Z===1/J)||Z!==Z&&J!==J}var Dl=typeof Object.is==="function"?Object.is:Al,Ml=o2.useState,Ol=o2.useEffect,jl=o2.useLayoutEffect,bl=o2.useDebugValue;function Pl(Z,J){var $=J(),Q=Ml({inst:{value:$,getSnapshot:J}}),X=Q[0].inst,Y=Q[1];return jl(function(){X.value=$,X.getSnapshot=J,$W(X)&&Y({inst:X})},[Z,$,J]),Ol(function(){return $W(X)&&Y({inst:X}),Z(function(){$W(X)&&Y({inst:X})})},[Z]),bl($),$}function $W(Z){var J=Z.getSnapshot;Z=Z.value;try{var $=J();return!Dl(Z,$)}catch(Q){return!0}}function Il(Z,J){return J()}var Tl=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Il:Pl;kl.useSyncExternalStore=o2.useSyncExternalStore!==void 0?o2.useSyncExternalStore:Tl});var RQ;var tL=U(()=>{RQ=P(hQ(),1)});var o8,$1,Sl,El,eL,hl,QW=(Z)=>{let J=o8.useRef([Z,(...$)=>J[0](...$)]).current;return hl(()=>{J[0]=Z}),J[1]};var XW=U(()=>{tL();o8=P(f(),1),$1=P(f(),1),Sl=o8.useInsertionEffect,El=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eL=El?o8.useLayoutEffect:o8.useEffect,hl=Sl||eL});var Rl="popstate",wW="pushState",YW="replaceState",xl="hashchange",ZA,yl=(Z)=>{for(let J of ZA)addEventListener(J,Z);return()=>{for(let J of ZA)removeEventListener(J,Z)}},XA=(Z,J)=>RQ.useSyncExternalStore(yl,Z,J),JA=()=>location.search,wA=({ssrSearch:Z}={})=>XA(JA,Z!=null?()=>Z:JA),$A=()=>location.pathname,vl=({ssrPath:Z}={})=>XA($A,Z!=null?()=>Z:$A),gl=(Z,{replace:J=!1,state:$=null}={})=>history[J?YW:wW]($,"",Z),YA=(Z={})=>[vl(Z),gl],QA;var zA=U(()=>{XW();ZA=[Rl,wW,YW,xl],QA=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[QA]>"u"){for(let Z of[wW,YW]){let J=history[Z];history[Z]=function(){let $=J.apply(this,arguments),Q=new Event(Z);return Q.arguments=arguments,dispatchEvent(Q),$}}Object.defineProperty(window,QA,{value:!0})}});var fl=(Z,J)=>!J.toLowerCase().indexOf(Z.toLowerCase())?J.slice(Z.length)||"/":"~"+J,GA=(Z="")=>Z==="/"?"":Z,WA=(Z,J)=>Z[0]==="~"?Z.slice(1):GA(J)+Z,qA=(Z="",J)=>fl(HA(GA(Z)),HA(J)),HA=(Z)=>{try{return decodeURI(Z)}catch(J){return Z}};var BA,UA,IZ=()=>$1.useContext(UA),VA,FA,ml=()=>$1.useContext(FA),xQ=(Z)=>{let[J,$]=Z.hook(Z);return[qA(Z.base,J),QW((Q,X)=>Z.aroundNav($,WA(Q,Z.base),X))]},NA=()=>xQ(IZ()),_A=(Z,J,$,Q)=>{let{pattern:X,keys:Y}=J instanceof RegExp?{keys:!1,pattern:J}:Z(J||"*",Q),w=X.exec($)||[],[z,...H]=w;return z!==void 0?[!0,(()=>{let G=Y!==!1?Object.fromEntries(Y.map((q,K)=>[q,H[K]])):w.groups,W={...H};return G&&Object.assign(W,G),W})(),...Q?[z]:[]]:[!1,null]},zW=({children:Z,...J})=>{let $=IZ(),Q=J.hook?BA:$,X=Q,[Y,w=J.ssrSearch??""]=J.ssrPath?.split("?")??[];if(Y)J.ssrSearch=w,J.ssrPath=Y;J.hrefs=J.hrefs??J.hook?.hrefs,J.searchHook=J.searchHook??J.hook?.searchHook;let z=$1.useRef({}),H=z.current,G=H;for(let W in Q){let q=W==="base"?Q[W]+(J[W]??""):J[W]??Q[W];if(H===G&&q!==G[W])z.current=G={...G};if(G[W]=q,q!==Q[W]||q!==X[W])X=G}return $1.createElement(UA.Provider,{value:X,children:Z})},KA=({children:Z,component:J},$)=>{if(J)return $1.createElement(J,{params:$});return typeof Z==="function"?Z($):Z},pl=(Z)=>{let J=$1.useRef(VA),$=J.current;return J.current=Object.keys(Z).length!==Object.keys($).length||Object.entries(Z).some(([Q,X])=>X!==$[Q])?Z:$},yQ=({path:Z,nest:J,match:$,...Q})=>{let X=IZ(),[Y]=xQ(X),[w,z,H]=$??_A(X.parser,Z,Y,J),G=pl({...ml(),...z});if(!w)return null;let W=H?$1.createElement(zW,{base:H},KA(Q,G)):KA(Q,G);return $1.createElement(FA.Provider,{value:G,children:W})},HW,LA=(Z)=>Array.isArray(Z)?Z.flatMap((J)=>LA(J&&J.type===$1.Fragment?J.props.children:J)):[Z],AA=({children:Z,location:J})=>{let $=IZ(),[Q]=xQ($);for(let X of LA(Z)){let Y=0;if($1.isValidElement(X)&&(Y=_A($.parser,X.props.path,J||Q,X.props.nest))[0])return $1.cloneElement(X,{match:Y})}return null};var vQ=U(()=>{nL();zA();XW();BA={hook:YA,searchHook:wA,parser:oL,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:(Z)=>Z,aroundNav:(Z,J,$)=>Z(J,$)},UA=$1.createContext(BA),VA={},FA=$1.createContext(VA),HW=$1.forwardRef((Z,J)=>{let $=IZ(),[Q,X]=xQ($),{to:Y="",href:w=Y,onClick:z,asChild:H,children:G,className:W,replace:q,state:K,transition:B,...V}=Z,F=QW((N)=>{if(N.ctrlKey||N.metaKey||N.altKey||N.shiftKey||N.button!==0)return;if(z?.(N),!N.defaultPrevented)N.preventDefault(),X(w,Z)}),_=$.hrefs(w[0]==="~"?w.slice(1):$.base+w,$);return H&&$1.isValidElement(G)?$1.cloneElement(G,{onClick:F,href:_}):$1.createElement("a",{...V,onClick:F,href:_,className:W?.call?W(Q===w):W,children:G,ref:J})})});function WW(Z,J){if(P4&&gQ!==Z)KW();if(G6=J,P4)return;if(gQ=Z,n8)clearTimeout(n8),n8=null;let $=new WebSocket(`ws://${location.host}/ws?workspace=${encodeURIComponent(Z)}`);$.onopen=()=>{P4=$;for(let Q of fQ)$.send(JSON.stringify(Q));if(fQ.length=0,GW&&G6){let Q=G6.getState().activeSessionId;if(Q)G6.getState().loadEvents(gQ,Q)}GW=!0},$.onmessage=(Q)=>{let X=JSON.parse(Q.data);if(!G6)return;let Y=G6.getState();if(X.type==="status"){Y.setProcessing(X.sessionId,X.processing);return}if(X.type==="session_renamed"){let{from:z,to:H}=X;if(Y.renameSession(z,H),Y.activeSessionId===z)Y.setActiveSession(H);return}if(X.type==="workspace:switch"){DA?.(X.workspaceId);return}let w=X.sessionId;if(!w)return;if(X.kind==="snapshot"||X.kind==="turn"||X.kind==="notice"||X.kind==="result")Y.append(w,X);if(X.kind==="error"&&typeof X.content==="string")Y.setError(w,X.content);if(X.kind==="stopped")Y.setProcessing(w,!1)},$.onclose=()=>{P4=null,n8=setTimeout(()=>{if(G6)WW(gQ,G6)},1000)},$.onerror=()=>{$.close()}}function qW(Z){if(P4&&P4.readyState===WebSocket.OPEN)P4.send(JSON.stringify(Z));else fQ.push(Z)}function KW(){if(n8)clearTimeout(n8),n8=null;if(P4)P4.close(),P4=null;fQ.length=0,GW=!1,G6=null}function BW(Z){DA=Z}var P4=null,n8=null,gQ="",GW=!1,G6=null,fQ,DA=null;var UW=U(()=>{fQ=[]});var MA;var OA=U(()=>{MA={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}}});var b9,S0=(Z,J,$,Q)=>{let X=b9.forwardRef(({color:Y="currentColor",size:w=24,stroke:z=2,title:H,className:G,children:W,...q},K)=>b9.createElement("svg",{ref:K,...MA[Z],width:w,height:w,className:["tabler-icon",`tabler-icon-${J}`,G].join(" "),...Z==="filled"?{fill:Y}:{strokeWidth:z,stroke:Y},...q},[H&&b9.createElement("title",{key:"svg-title"},H),...Q.map(([B,V])=>b9.createElement(B,V)),...Array.isArray(W)?W:[W]]));return X.displayName=`${$}`,X};var j1=U(()=>{OA();b9=P(f(),1)});var ul,P9;var jA=U(()=>{j1();ul=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],P9=S0("outline","alert-triangle","AlertTriangle",ul)});var cl,VW;var bA=U(()=>{j1();cl=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],VW=S0("outline","arrow-up","ArrowUp",cl)});var dl,FW;var PA=U(()=>{j1();dl=[["path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8",key:"svg-0"}],["path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8",key:"svg-1"}],["path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5",key:"svg-2"}],["path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0",key:"svg-3"}],["path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5",key:"svg-4"}],["path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10",key:"svg-5"}]],FW=S0("outline","brain","Brain",dl)});var ll,NW;var IA=U(()=>{j1();ll=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],NW=S0("outline","check","Check",ll)});var rl,_W;var TA=U(()=>{j1();rl=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],_W=S0("outline","chevron-down","ChevronDown",rl)});var il,I9;var kA=U(()=>{j1();il=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],I9=S0("outline","chevron-right","ChevronRight",il)});var al,LW;var CA=U(()=>{j1();al=[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]],LW=S0("outline","chevrons-right","ChevronsRight",al)});var sl,AW;var SA=U(()=>{j1();sl=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],AW=S0("outline","dots","Dots",sl)});var ol,DW;var EA=U(()=>{j1();ol=[["path",{d:"M5 12l-2 0l9 -9l9 9l-2 0",key:"svg-0"}],["path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7",key:"svg-1"}],["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6",key:"svg-2"}]],DW=S0("outline","home","Home",ol)});var nl,MW;var hA=U(()=>{j1();nl=[["path",{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-1"}],["path",{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-2"}],["path",{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-3"}]],MW=S0("outline","layout-dashboard","LayoutDashboard",nl)});var tl,OW;var RA=U(()=>{j1();tl=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],OW=S0("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",tl)});var el,jW;var xA=U(()=>{j1();el=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M14 10l2 2l-2 2",key:"svg-2"}]],jW=S0("outline","layout-sidebar-left-expand","LayoutSidebarLeftExpand",el)});var Zr,bW;var yA=U(()=>{j1();Zr=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4l0 16",key:"svg-1"}]],bW=S0("outline","layout-sidebar","LayoutSidebar",Zr)});var Jr,W6;var vA=U(()=>{j1();Jr=[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]],W6=S0("outline","loader-2","Loader2",Jr)});var $r,PW;var gA=U(()=>{j1();$r=[["path",{d:"M5 12l14 0",key:"svg-0"}]],PW=S0("outline","minus","Minus",$r)});var Qr,IW;var fA=U(()=>{j1();Qr=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],IW=S0("outline","palette","Palette",Qr)});var Xr,TW;var mA=U(()=>{j1();Xr=[["path",{d:"M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10",key:"svg-0"}]],TW=S0("outline","player-stop","PlayerStop",Xr)});var wr,kW;var pA=U(()=>{j1();wr=[["path",{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054",key:"svg-0"}],["path",{d:"M4 20l3.5 -3.5",key:"svg-1"}],["path",{d:"M15 4l-3.5 3.5",key:"svg-2"}],["path",{d:"M20 9l-3.5 3.5",key:"svg-3"}]],kW=S0("outline","plug","Plug",wr)});var Yr,q6;var uA=U(()=>{j1();Yr=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],q6=S0("outline","plus","Plus",Yr)});var zr,TZ;var cA=U(()=>{j1();zr=[["path",{d:"M6 5h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M9 16c1 .667 2 1 3 1s2 -.333 3 -1",key:"svg-1"}],["path",{d:"M9 7l-1 -4",key:"svg-2"}],["path",{d:"M15 7l1 -4",key:"svg-3"}],["path",{d:"M9 12v-1",key:"svg-4"}],["path",{d:"M15 12v-1",key:"svg-5"}]],TZ=S0("outline","robot-face","RobotFace",zr)});var Hr,CW;var dA=U(()=>{j1();Hr=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],CW=S0("outline","selector","Selector",Hr)});var Gr,SW;var lA=U(()=>{j1();Gr=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],SW=S0("outline","settings","Settings",Gr)});var Wr,EW;var rA=U(()=>{j1();Wr=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],EW=S0("outline","sparkles","Sparkles",Wr)});var qr,hW;var iA=U(()=>{j1();qr=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],hW=S0("outline","trash","Trash",qr)});var Kr,mQ;var aA=U(()=>{j1();Kr=[["path",{d:"M10 13a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M8 21v-1a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v1",key:"svg-1"}],["path",{d:"M15 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-2"}],["path",{d:"M17 10h2a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M5 5a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-4"}],["path",{d:"M3 13v-1a2 2 0 0 1 2 -2h2",key:"svg-5"}]],mQ=S0("outline","users-group","UsersGroup",Kr)});var Br,t8;var sA=U(()=>{j1();Br=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],t8=S0("outline","x","X",Br)});var N2=U(()=>{jA();bA();PA();IA();TA();kA();CA();SA();EA();hA();RA();xA();yA();vA();gA();fA();mA();pA();uA();cA();dA();lA();rA();iA();aA();sA()});function pQ(){return m6({queryKey:a5.all,queryFn:()=>fetch("/api/workspaces").then((Z)=>Z.json()),staleTime:1/0,refetchOnMount:"always"})}function oA(Z){return m6({queryKey:a5.preview(Z),queryFn:()=>fetch(`/api/workspaces/${Z}/preview`).then((J)=>J.json()),staleTime:60000})}function nA(Z){return m6({queryKey:a5.layout(Z),queryFn:()=>fetch(`/api/workspaces/${Z}/layout`).then((J)=>J.json()),...RW})}function tA(Z){return m6({queryKey:a5.widgets(Z),queryFn:()=>fetch(`/api/workspaces/${Z}/widgets`).then((J)=>J.json()).then((J)=>J.widgets),...RW})}function uQ(Z){return m6({queryKey:a5.sessions(Z),queryFn:()=>fetch(`/api/workspaces/${Z}/sessions`).then((J)=>J.json()),...RW})}function eA(Z){return bZ({mutationFn:async(J)=>{if(!(await fetch(`/api/workspaces/${Z}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)})).ok)throw Error("Failed to save layout")}})}function ZD(){return m6({queryKey:a5.discover,queryFn:()=>fetch("/api/workspaces/discover").then((Z)=>Z.json())})}function JD(){let Z=S2();return bZ({mutationFn:async(J)=>{return(await fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)})).json()},onSuccess:(J,$)=>{Z.setQueryData(a5.all,(Q)=>[...Q??[],J]),Z.setQueryData(a5.discover,(Q)=>(Q??[]).filter((X)=>X.path!==$.path))}})}function $D(){let Z=S2();return bZ({mutationFn:async(J)=>{if(!(await fetch(`/api/workspaces/${J.id}`,{method:"DELETE"})).ok)throw Error("Failed to remove workspace")},onSuccess:(J,$)=>{Z.setQueryData(a5.all,(Q)=>(Q??[]).filter((X)=>X.id!==$.id)),Z.invalidateQueries({queryKey:a5.discover})}})}var a5,RW;var e8=U(()=>{PZ();a5={all:["workspaces"],discover:["workspaces","discover"],preview:(Z)=>["workspaces","preview",Z],layout:(Z)=>["workspaces","layout",Z],widgets:(Z)=>["workspaces","widgets",Z],sessions:(Z)=>["workspaces","sessions",Z]};RW={staleTime:0,gcTime:300000,refetchOnMount:!0,refetchOnWindowFocus:!0}});var cQ="/claude-z2xnay0d.svg";var xW=()=>{};var dQ="/hermes-nous-pznd63x9.png";var yW=()=>{};var lQ="/openclaw-a2pyfhpn.svg";var vW=()=>{};function iQ(){return typeof window<"u"}function n2(Z){if(aQ(Z))return(Z.nodeName||"").toLowerCase();return"#document"}function k1(Z){var J;return(Z==null||(J=Z.ownerDocument)==null?void 0:J.defaultView)||window}function t2(Z){var J;return(J=(aQ(Z)?Z.ownerDocument:Z.document)||window.document)==null?void 0:J.documentElement}function aQ(Z){if(!iQ())return!1;return Z instanceof Node||Z instanceof k1(Z).Node}function l0(Z){if(!iQ())return!1;return Z instanceof Element||Z instanceof k1(Z).Element}function w1(Z){if(!iQ())return!1;return Z instanceof HTMLElement||Z instanceof k1(Z).HTMLElement}function rQ(Z){if(!iQ()||typeof ShadowRoot>"u")return!1;return Z instanceof ShadowRoot||Z instanceof k1(Z).ShadowRoot}function I4(Z){let{overflow:J,overflowX:$,overflowY:Q,display:X}=O5(Z);return/auto|scroll|overlay|hidden|clip/.test(J+Q+$)&&X!=="inline"&&X!=="contents"}function QD(Z){return/^(table|td|th)$/.test(n2(Z))}function kZ(Z){try{if(Z.matches(":popover-open"))return!0}catch(J){}try{return Z.matches(":modal")}catch(J){return!1}}function sQ(Z){let J=l0(Z)?O5(Z):Z;return Z7(J.transform)||Z7(J.translate)||Z7(J.scale)||Z7(J.rotate)||Z7(J.perspective)||!T9()&&(Z7(J.backdropFilter)||Z7(J.filter))||Nr.test(J.willChange||"")||_r.test(J.contain||"")}function XD(Z){let J=_2(Z);while(w1(J)&&!A2(J)){if(sQ(J))return J;else if(kZ(J))return null;J=_2(J)}return null}function T9(){if(gW==null)gW=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return gW}function A2(Z){return/^(html|body|#document)$/.test(n2(Z))}function O5(Z){return k1(Z).getComputedStyle(Z)}function CZ(Z){if(l0(Z))return{scrollLeft:Z.scrollLeft,scrollTop:Z.scrollTop};return{scrollLeft:Z.scrollX,scrollTop:Z.scrollY}}function _2(Z){if(n2(Z)==="html")return Z;let J=Z.assignedSlot||Z.parentNode||rQ(Z)&&Z.host||t2(Z);return rQ(J)?J.host:J}function wD(Z){let J=_2(Z);if(A2(J))return Z.ownerDocument?Z.ownerDocument.body:Z.body;if(w1(J)&&I4(J))return J;return wD(J)}function L2(Z,J,$){var Q;if(J===void 0)J=[];if($===void 0)$=!0;let X=wD(Z),Y=X===((Q=Z.ownerDocument)==null?void 0:Q.body),w=k1(X);if(Y){let z=oQ(w);return J.concat(w,w.visualViewport||[],I4(X)?X:[],z&&$?L2(z):[])}else return J.concat(X,L2(X,[],$))}function oQ(Z){return Z.parent&&Object.getPrototypeOf(Z.parent)?Z.frameElement:null}var Nr,_r,Z7=(Z)=>!!Z&&Z!=="none",gW;var a1=U(()=>{Nr=/transform|translate|scale|rotate|perspective|filter/,_r=/paint|layout|strict|content/});function D1(Z,J){let $=zD.useRef(YD);if($.current===YD)$.current=Z(J);return $}var zD,YD;var Y2=U(()=>{zD=P(f(),1),YD={}});function U0(Z){let J=D1(Ar).current;return J.next=Z,Lr(J.effect),J.trampoline}function Ar(){let Z={next:void 0,callback:Dr,trampoline:(...J)=>Z.callback?.(...J),effect:()=>{Z.callback=Z.next}};return Z}function Dr(){}var mW,fW,Lr;var y1=U(()=>{Y2();mW=P(f(),1),fW=mW[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Lr=fW&&fW!==mW.useLayoutEffect?fW:(Z)=>Z()});var Mr,HD;var GD=U(()=>{Mr=P(f(),1),HD={...Mr}});var WD,Or=()=>{},F0;var M1=U(()=>{WD=P(f(),1),F0=typeof document<"u"?WD.useLayoutEffect:Or});function SZ(Z,J){if(Z&&!J)return Z;if(!Z&&J)return J;if(Z||J)return{...Z,...J};return}function K6(Z,J,$,Q,X){let Y={...pW(Z,hZ)};if(J)Y=EZ(Y,J);if($)Y=EZ(Y,$);if(Q)Y=EZ(Y,Q);if(X)Y=EZ(Y,X);return Y}function qD(Z){if(Z.length===0)return hZ;if(Z.length===1)return pW(Z[0],hZ);let J={...pW(Z[0],hZ)};for(let $=1;$<Z.length;$+=1)J=EZ(J,Z[$]);return J}function EZ(Z,J){if(KD(J))return J(Z);return jr(Z,J)}function jr(Z,J){if(!J)return Z;for(let $ in J){let Q=J[$];switch($){case"style":{Z[$]=SZ(Z.style,Q);break}case"className":{Z[$]=uW(Z.className,Q);break}default:if(br($,Q))Z[$]=Pr(Z[$],Q);else Z[$]=Q}}return Z}function br(Z,J){let $=Z.charCodeAt(0),Q=Z.charCodeAt(1),X=Z.charCodeAt(2);return $===111&&Q===110&&X>=65&&X<=90&&(typeof J==="function"||typeof J>"u")}function KD(Z){return typeof Z==="function"}function pW(Z,J){if(KD(Z))return Z(J);return Z??hZ}function Pr(Z,J){if(!J)return Z;if(!Z)return J;return($)=>{if(Ir($)){let X=$;nQ(X);let Y=J(X);if(!X.baseUIHandlerPrevented)Z?.(X);return Y}let Q=J($);return Z?.($),Q}}function nQ(Z){return Z.preventBaseUIHandler=()=>{Z.baseUIHandlerPrevented=!0},Z}function uW(Z,J){if(J){if(Z)return J+" "+Z;return J}return Z}function Ir(Z){return Z!=null&&typeof Z==="object"&&"nativeEvent"in Z}var hZ;var BD=U(()=>{hZ={}});var RZ=U(()=>{BD()});function g0(Z,...J){let $=new URL("https://base-ui.com/production-error");return $.searchParams.set("code",Z.toString()),J.forEach((Q)=>$.searchParams.append("args[]",Q)),`Base UI error #${Z}; visit ${$} for the full message.`}function k9(Z=!1){let J=tQ.useContext(Tr);if(J===void 0&&!Z)throw Error(g0(16));return J}var tQ,Tr;var eQ=U(()=>{tQ=P(f(),1),Tr=tQ.createContext(void 0)});function VD(Z){let{focusableWhenDisabled:J,disabled:$,composite:Q=!1,tabIndex:X=0,isNativeButton:Y}=Z,w=Q&&J!==!1,z=Q&&J===!1;return{props:UD.useMemo(()=>{let G={onKeyDown(W){if($&&J&&W.key!=="Tab")W.preventDefault()}};if(!Q){if(G.tabIndex=X,!Y&&$)G.tabIndex=J?X:-1}if(Y&&(J||w)||!Y&&$)G["aria-disabled"]=$;if(Y&&(!J||z))G.disabled=$;return G},[Q,$,J,w,z,Y,X])}}var UD;var FD=U(()=>{UD=P(f(),1)});function e2(Z={}){let{disabled:J=!1,focusableWhenDisabled:$,tabIndex:Q=0,native:X=!0}=Z,Y=C9.useRef(null),w=k9(!0)!==void 0,z=U0(()=>{let K=Y.current;return Boolean(K?.tagName==="A"&&K?.href)}),{props:H}=VD({focusableWhenDisabled:$,disabled:J,composite:w,tabIndex:Q,isNativeButton:X}),G=C9.useCallback(()=>{let K=Y.current;if(!kr(K))return;if(w&&J&&H.disabled===void 0&&K.disabled)K.disabled=!1},[J,H.disabled,w]);F0(G,[G]);let W=C9.useCallback((K={})=>{let{onClick:B,onMouseDown:V,onKeyUp:F,onKeyDown:_,onPointerDown:N,...L}=K;return K6({type:X?"button":void 0,onClick(A){if(J){A.preventDefault();return}B?.(A)},onMouseDown(A){if(!J)V?.(A)},onKeyDown(A){if(!J)nQ(A),_?.(A);if(A.baseUIHandlerPrevented)return;let O=A.target===A.currentTarget&&!X&&!z()&&!J,D=A.key==="Enter",k=A.key===" ";if(O){if(k||D)A.preventDefault();if(D)B?.(A)}},onKeyUp(A){if(!J)nQ(A),F?.(A);if(A.baseUIHandlerPrevented)return;if(A.target===A.currentTarget&&!X&&!J&&A.key===" ")B?.(A)},onPointerDown(A){if(J){A.preventDefault();return}N?.(A)}},!X?{role:"button"}:void 0,H,L)},[J,H,X,z]),q=U0((K)=>{Y.current=K,G()});return{getButtonProps:W,buttonRef:q}}function kr(Z){return w1(Z)&&Z.tagName==="BUTTON"}var C9;var xZ=U(()=>{a1();y1();M1();RZ();eQ();FD();C9=P(f(),1)});function T4(Z,J,$,Q){let X=D1(_D).current;if(Cr(X,Z,J,$,Q))LD(X,[Z,J,$,Q]);return X.callback}function ND(Z){let J=D1(_D).current;if(Sr(J,Z))LD(J,Z);return J.callback}function _D(){return{callback:null,cleanup:null,refs:[]}}function Cr(Z,J,$,Q,X){return Z.refs[0]!==J||Z.refs[1]!==$||Z.refs[2]!==Q||Z.refs[3]!==X}function Sr(Z,J){return Z.refs.length!==J.length||Z.refs.some(($,Q)=>$!==J[Q])}function LD(Z,J){if(Z.refs=J,J.every(($)=>$==null)){Z.callback=null;return}Z.callback=($)=>{if(Z.cleanup)Z.cleanup(),Z.cleanup=null;if($!=null){let Q=Array(J.length).fill(null);for(let X=0;X<J.length;X+=1){let Y=J[X];if(Y==null)continue;switch(typeof Y){case"function":{let w=Y($);if(typeof w==="function")Q[X]=w;break}case"object":{Y.current=$;break}default:}}Z.cleanup=()=>{for(let X=0;X<J.length;X+=1){let Y=J[X];if(Y==null)continue;switch(typeof Y){case"function":{let w=Q[X];if(typeof w==="function")w();else Y(null);break}case"object":{Y.current=null;break}default:}}}}}}var yZ=U(()=>{Y2()});function S9(Z){return Er>=Z}var AD,Er;var ZX=U(()=>{AD=P(f(),1),Er=parseInt(AD.version,10)});function cW(Z){if(!DD.isValidElement(Z))return null;let J=Z,$=J.props;return(S9(19)?$?.ref:J.ref)??null}var DD;var MD=U(()=>{ZX();DD=P(f(),1)});function OD(Z,J){let $={};for(let Q in Z){let X=Z[Q];if(J?.hasOwnProperty(Q)){let Y=J[Q](X);if(Y!=null)Object.assign($,Y);continue}if(X===!0)$[`data-${Q.toLowerCase()}`]="";else if(X)$[`data-${Q.toLowerCase()}`]=X.toString()}return $}function jD(Z,J){return typeof Z==="function"?Z(J):Z}function bD(Z,J){return typeof Z==="function"?Z(J):Z}function Z4(){}var E9,q1;var p6=U(()=>{E9=Object.freeze([]),q1=Object.freeze({})});var PD=500,JX=500,ID,$X="data-base-ui-click-trigger",TD,QX,kD;var j5=U(()=>{p6();ID={style:{transition:"none"}},TD={fallbackAxisSide:"none"},QX={fallbackAxisSide:"end"},kD={clipPath:"inset(50%)",position:"fixed",top:0,left:0}});function T0(Z,J,$={}){let Q=J.render,X=hr(J,$);if($.enabled===!1)return null;let Y=$.state??q1;return xr(Z,Q,X,Y)}function hr(Z,J={}){let{className:$,style:Q,render:X}=Z,{state:Y=q1,ref:w,props:z,stateAttributesMapping:H,enabled:G=!0}=J,W=G?jD($,Y):void 0,q=G?bD(Q,Y):void 0,K=G?OD(Y,H):q1,B=G?SZ(K,Array.isArray(z)?qD(z):z)??q1:q1;if(typeof document<"u")if(!G)T4(null,null);else if(Array.isArray(w))B.ref=ND([B.ref,cW(X),...w]);else B.ref=T4(B.ref,cW(X),w);if(!G)return q1;if(W!==void 0)B.className=uW(B.className,W);if(q!==void 0)B.style=SZ(B.style,q);return B}function xr(Z,J,$,Q){if(J){if(typeof J==="function")return J($,Q);let X=K6($,J.props);X.ref=$.ref;let Y=J;if(Y?.$$typeof===Rr)Y=u6.Children.toArray(J)[0];return u6.cloneElement(Y,X)}if(Z){if(typeof Z==="string")return yr(Z,$)}throw Error(g0(8))}function yr(Z,J){if(Z==="button")return dW.createElement("button",{type:"button",...J,key:J.key});if(Z==="img")return dW.createElement("img",{alt:"",...J,key:J.key});return u6.createElement(Z,J)}var u6,dW,Rr;var _1=U(()=>{yZ();MD();RZ();j5();u6=P(f(),1),dW=P(f(),1);Rr=Symbol.for("react.lazy")});var CD,lW;var SD=U(()=>{xZ();_1();CD=P(f(),1),lW=CD.forwardRef(function(J,$){let{render:Q,className:X,disabled:Y=!1,focusableWhenDisabled:w=!1,nativeButton:z=!0,...H}=J,{getButtonProps:G,buttonRef:W}=e2({disabled:Y,focusableWhenDisabled:w,native:z});return T0("button",J,{state:{disabled:Y},ref:[$,W],props:[H,G]})})});var ED=U(()=>{SD()});function hD(Z){var J,$,Q="";if(typeof Z=="string"||typeof Z=="number")Q+=Z;else if(typeof Z=="object")if(Array.isArray(Z)){var X=Z.length;for(J=0;J<X;J++)Z[J]&&($=hD(Z[J]))&&(Q&&(Q+=" "),Q+=$)}else for($ in Z)Z[$]&&(Q&&(Q+=" "),Q+=$);return Q}function vZ(){for(var Z,J,$=0,Q="",X=arguments.length;$<X;$++)(Z=arguments[$])&&(J=hD(Z))&&(Q&&(Q+=" "),Q+=J);return Q}var rW;var XX=U(()=>{rW=vZ});var RD=(Z)=>typeof Z==="boolean"?`${Z}`:Z===0?"0":Z,xD,yD=(Z,J)=>($)=>{var Q;if((J===null||J===void 0?void 0:J.variants)==null)return xD(Z,$===null||$===void 0?void 0:$.class,$===null||$===void 0?void 0:$.className);let{variants:X,defaultVariants:Y}=J,w=Object.keys(X).map((G)=>{let W=$===null||$===void 0?void 0:$[G],q=Y===null||Y===void 0?void 0:Y[G];if(W===null)return null;let K=RD(W)||RD(q);return X[G][K]}),z=$&&Object.entries($).reduce((G,W)=>{let[q,K]=W;if(K===void 0)return G;return G[q]=K,G},{}),H=J===null||J===void 0?void 0:(Q=J.compoundVariants)===null||Q===void 0?void 0:Q.reduce((G,W)=>{let{class:q,className:K,...B}=W;return Object.entries(B).every((V)=>{let[F,_]=V;return Array.isArray(_)?_.includes({...Y,...z}[F]):{...Y,...z}[F]===_})?[...G,q,K]:G},[]);return xD(Z,w,H,$===null||$===void 0?void 0:$.class,$===null||$===void 0?void 0:$.className)};var vD=U(()=>{XX();xD=vZ});var vr=(Z,J)=>{let $=Array(Z.length+J.length);for(let Q=0;Q<Z.length;Q++)$[Q]=Z[Q];for(let Q=0;Q<J.length;Q++)$[Z.length+Q]=J[Q];return $},gr=(Z,J)=>({classGroupId:Z,validator:J}),cD=(Z=new Map,J=null,$)=>({nextPart:Z,validators:J,classGroupId:$}),gD,fr=(Z)=>{let J=pr(Z),{conflictingClassGroups:$,conflictingClassGroupModifiers:Q}=Z;return{getClassGroupId:(w)=>{if(w.startsWith("[")&&w.endsWith("]"))return mr(w);let z=w.split("-"),H=z[0]===""&&z.length>1?1:0;return dD(z,H,J)},getConflictingClassGroupIds:(w,z)=>{if(z){let H=Q[w],G=$[w];if(H){if(G)return vr(G,H);return H}return G||gD}return $[w]||gD}}},dD=(Z,J,$)=>{if(Z.length-J===0)return $.classGroupId;let X=Z[J],Y=$.nextPart.get(X);if(Y){let G=dD(Z,J+1,Y);if(G)return G}let w=$.validators;if(w===null)return;let z=J===0?Z.join("-"):Z.slice(J).join("-"),H=w.length;for(let G=0;G<H;G++){let W=w[G];if(W.validator(z))return W.classGroupId}return},mr=(Z)=>Z.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let J=Z.slice(1,-1),$=J.indexOf(":"),Q=J.slice(0,$);return Q?"arbitrary.."+Q:void 0})(),pr=(Z)=>{let{theme:J,classGroups:$}=Z;return ur($,J)},ur=(Z,J)=>{let $=cD();for(let Q in Z){let X=Z[Q];aW(X,$,Q,J)}return $},aW=(Z,J,$,Q)=>{let X=Z.length;for(let Y=0;Y<X;Y++){let w=Z[Y];cr(w,J,$,Q)}},cr=(Z,J,$,Q)=>{if(typeof Z==="string"){dr(Z,J,$);return}if(typeof Z==="function"){lr(Z,J,$,Q);return}rr(Z,J,$,Q)},dr=(Z,J,$)=>{let Q=Z===""?J:lD(J,Z);Q.classGroupId=$},lr=(Z,J,$,Q)=>{if(ir(Z)){aW(Z(Q),J,$,Q);return}if(J.validators===null)J.validators=[];J.validators.push(gr($,Z))},rr=(Z,J,$,Q)=>{let X=Object.entries(Z),Y=X.length;for(let w=0;w<Y;w++){let[z,H]=X[w];aW(H,lD(J,z),$,Q)}},lD=(Z,J)=>{let $=Z,Q=J.split("-"),X=Q.length;for(let Y=0;Y<X;Y++){let w=Q[Y],z=$.nextPart.get(w);if(!z)z=cD(),$.nextPart.set(w,z);$=z}return $},ir=(Z)=>("isThemeGetter"in Z)&&Z.isThemeGetter===!0,ar=(Z)=>{if(Z<1)return{get:()=>{return},set:()=>{}};let J=0,$=Object.create(null),Q=Object.create(null),X=(Y,w)=>{if($[Y]=w,J++,J>Z)J=0,Q=$,$=Object.create(null)};return{get(Y){let w=$[Y];if(w!==void 0)return w;if((w=Q[Y])!==void 0)return X(Y,w),w},set(Y,w){if(Y in $)$[Y]=w;else X(Y,w)}}},sr,fD=(Z,J,$,Q,X)=>({modifiers:Z,hasImportantModifier:J,baseClassName:$,maybePostfixModifierPosition:Q,isExternal:X}),or=(Z)=>{let{prefix:J,experimentalParseClassName:$}=Z,Q=(X)=>{let Y=[],w=0,z=0,H=0,G,W=X.length;for(let F=0;F<W;F++){let _=X[F];if(w===0&&z===0){if(_===":"){Y.push(X.slice(H,F)),H=F+1;continue}if(_==="/"){G=F;continue}}if(_==="[")w++;else if(_==="]")w--;else if(_==="(")z++;else if(_===")")z--}let q=Y.length===0?X:X.slice(H),K=q,B=!1;if(q.endsWith("!"))K=q.slice(0,-1),B=!0;else if(q.startsWith("!"))K=q.slice(1),B=!0;let V=G&&G>H?G-H:void 0;return fD(Y,B,K,V)};if(J){let X=J+":",Y=Q;Q=(w)=>w.startsWith(X)?Y(w.slice(X.length)):fD(sr,!1,w,void 0,!0)}if($){let X=Q;Q=(Y)=>$({className:Y,parseClassName:X})}return Q},nr=(Z)=>{let J=new Map;return Z.orderSensitiveModifiers.forEach(($,Q)=>{J.set($,1e6+Q)}),($)=>{let Q=[],X=[];for(let Y=0;Y<$.length;Y++){let w=$[Y],z=w[0]==="[",H=J.has(w);if(z||H){if(X.length>0)X.sort(),Q.push(...X),X=[];Q.push(w)}else X.push(w)}if(X.length>0)X.sort(),Q.push(...X);return Q}},tr=(Z)=>({cache:ar(Z.cacheSize),parseClassName:or(Z),sortModifiers:nr(Z),...fr(Z)}),er,Zi=(Z,J)=>{let{parseClassName:$,getClassGroupId:Q,getConflictingClassGroupIds:X,sortModifiers:Y}=J,w=[],z=Z.trim().split(er),H="";for(let G=z.length-1;G>=0;G-=1){let W=z[G],{isExternal:q,modifiers:K,hasImportantModifier:B,baseClassName:V,maybePostfixModifierPosition:F}=$(W);if(q){H=W+(H.length>0?" "+H:H);continue}let _=!!F,N=Q(_?V.substring(0,F):V);if(!N){if(!_){H=W+(H.length>0?" "+H:H);continue}if(N=Q(V),!N){H=W+(H.length>0?" "+H:H);continue}_=!1}let L=K.length===0?"":K.length===1?K[0]:Y(K).join(":"),M=B?L+"!":L,A=M+N;if(w.indexOf(A)>-1)continue;w.push(A);let O=X(N,_);for(let D=0;D<O.length;++D){let k=O[D];w.push(M+k)}H=W+(H.length>0?" "+H:H)}return H},Ji=(...Z)=>{let J=0,$,Q,X="";while(J<Z.length)if($=Z[J++]){if(Q=rD($))X&&(X+=" "),X+=Q}return X},rD=(Z)=>{if(typeof Z==="string")return Z;let J,$="";for(let Q=0;Q<Z.length;Q++)if(Z[Q]){if(J=rD(Z[Q]))$&&($+=" "),$+=J}return $},$i=(Z,...J)=>{let $,Q,X,Y,w=(H)=>{let G=J.reduce((W,q)=>q(W),Z());return $=tr(G),Q=$.cache.get,X=$.cache.set,Y=z,z(H)},z=(H)=>{let G=Q(H);if(G)return G;let W=Zi(H,$);return X(H,W),W};return Y=w,(...H)=>Y(Ji(...H))},Qi,K5=(Z)=>{let J=($)=>$[Z]||Qi;return J.isThemeGetter=!0,J},iD,aD,Xi,wi,Yi,zi,Hi,Gi,c6=(Z)=>Xi.test(Z),o0=(Z)=>!!Z&&!Number.isNaN(Number(Z)),d6=(Z)=>!!Z&&Number.isInteger(Number(Z)),iW=(Z)=>Z.endsWith("%")&&o0(Z.slice(0,-1)),B6=(Z)=>wi.test(Z),sD=()=>!0,Wi=(Z)=>Yi.test(Z)&&!zi.test(Z),sW=()=>!1,qi=(Z)=>Hi.test(Z),Ki=(Z)=>Gi.test(Z),Bi=(Z)=>!j0(Z)&&!b0(Z),Ui=(Z)=>l6(Z,tD,sW),j0=(Z)=>iD.test(Z),J7=(Z)=>l6(Z,eD,Wi),mD=(Z)=>l6(Z,Mi,o0),Vi=(Z)=>l6(Z,JM,sD),Fi=(Z)=>l6(Z,ZM,sW),pD=(Z)=>l6(Z,oD,sW),Ni=(Z)=>l6(Z,nD,Ki),wX=(Z)=>l6(Z,$M,qi),b0=(Z)=>aD.test(Z),gZ=(Z)=>$7(Z,eD),_i=(Z)=>$7(Z,ZM),uD=(Z)=>$7(Z,oD),Li=(Z)=>$7(Z,tD),Ai=(Z)=>$7(Z,nD),YX=(Z)=>$7(Z,$M,!0),Di=(Z)=>$7(Z,JM,!0),l6=(Z,J,$)=>{let Q=iD.exec(Z);if(Q){if(Q[1])return J(Q[1]);return $(Q[2])}return!1},$7=(Z,J,$=!1)=>{let Q=aD.exec(Z);if(Q){if(Q[1])return J(Q[1]);return $}return!1},oD=(Z)=>Z==="position"||Z==="percentage",nD=(Z)=>Z==="image"||Z==="url",tD=(Z)=>Z==="length"||Z==="size"||Z==="bg-size",eD=(Z)=>Z==="length",Mi=(Z)=>Z==="number",ZM=(Z)=>Z==="family-name",JM=(Z)=>Z==="number"||Z==="weight",$M=(Z)=>Z==="shadow",Oi=()=>{let Z=K5("color"),J=K5("font"),$=K5("text"),Q=K5("font-weight"),X=K5("tracking"),Y=K5("leading"),w=K5("breakpoint"),z=K5("container"),H=K5("spacing"),G=K5("radius"),W=K5("shadow"),q=K5("inset-shadow"),K=K5("text-shadow"),B=K5("drop-shadow"),V=K5("blur"),F=K5("perspective"),_=K5("aspect"),N=K5("ease"),L=K5("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...A(),b0,j0],D=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],b=()=>[b0,j0,H],h=()=>[c6,"full","auto",...b()],I=()=>[d6,"none","subgrid",b0,j0],d=()=>["auto",{span:["full",d6,b0,j0]},d6,b0,j0],v=()=>[d6,"auto",b0,j0],C=()=>["auto","min","max","fr",b0,j0],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],g=()=>["start","end","center","stretch","center-safe","end-safe"],S=()=>["auto",...b()],x=()=>[c6,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],E=()=>[c6,"screen","full","dvw","lvw","svw","min","max","fit",...b()],m=()=>[c6,"screen","full","lh","dvh","lvh","svh","min","max","fit",...b()],j=()=>[Z,b0,j0],H0=()=>[...A(),uD,pD,{position:[b0,j0]}],w0=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Li,Ui,{size:[b0,j0]}],$0=()=>[iW,gZ,J7],V0=()=>["","none","full",G,b0,j0],l=()=>["",o0,gZ,J7],Z0=()=>["solid","dashed","dotted","double"],q0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],s=()=>[o0,iW,uD,pD],X0=()=>["","none",V,b0,j0],z0=()=>["none",o0,b0,j0],p=()=>["none",o0,b0,j0],o=()=>[o0,b0,j0],t=()=>[c6,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[B6],breakpoint:[B6],color:[sD],container:[B6],"drop-shadow":[B6],ease:["in","out","in-out"],font:[Bi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[B6],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[B6],shadow:[B6],spacing:["px",o0],text:[B6],"text-shadow":[B6],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",c6,j0,b0,_]}],container:["container"],columns:[{columns:[o0,j0,b0,z]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:h()}],"inset-x":[{"inset-x":h()}],"inset-y":[{"inset-y":h()}],start:[{"inset-s":h(),start:h()}],end:[{"inset-e":h(),end:h()}],"inset-bs":[{"inset-bs":h()}],"inset-be":[{"inset-be":h()}],top:[{top:h()}],right:[{right:h()}],bottom:[{bottom:h()}],left:[{left:h()}],visibility:["visible","invisible","collapse"],z:[{z:[d6,"auto",b0,j0]}],basis:[{basis:[c6,"full","auto",z,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[o0,c6,"auto","initial","none",j0]}],grow:[{grow:["",o0,b0,j0]}],shrink:[{shrink:["",o0,b0,j0]}],order:[{order:[d6,"first","last","none",b0,j0]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:d()}],"col-start":[{"col-start":v()}],"col-end":[{"col-end":v()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:d()}],"row-start":[{"row-start":v()}],"row-end":[{"row-end":v()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...g(),"normal"]}],"justify-self":[{"justify-self":["auto",...g()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...g(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...g(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...g(),"baseline"]}],"place-self":[{"place-self":["auto",...g()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pbs:[{pbs:b()}],pbe:[{pbe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mbs:[{mbs:S()}],mbe:[{mbe:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:x()}],"inline-size":[{inline:["auto",...E()]}],"min-inline-size":[{"min-inline":["auto",...E()]}],"max-inline-size":[{"max-inline":["none",...E()]}],"block-size":[{block:["auto",...m()]}],"min-block-size":[{"min-block":["auto",...m()]}],"max-block-size":[{"max-block":["none",...m()]}],w:[{w:[z,"screen",...x()]}],"min-w":[{"min-w":[z,"screen","none",...x()]}],"max-w":[{"max-w":[z,"screen","none","prose",{screen:[w]},...x()]}],h:[{h:["screen","lh",...x()]}],"min-h":[{"min-h":["screen","lh","none",...x()]}],"max-h":[{"max-h":["screen","lh",...x()]}],"font-size":[{text:["base",$,gZ,J7]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[Q,Di,Vi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iW,j0]}],"font-family":[{font:[_i,Fi,J]}],"font-features":[{"font-features":[j0]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[X,b0,j0]}],"line-clamp":[{"line-clamp":[o0,"none",b0,mD]}],leading:[{leading:[Y,...b()]}],"list-image":[{"list-image":["none",b0,j0]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",b0,j0]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z0(),"wavy"]}],"text-decoration-thickness":[{decoration:[o0,"from-font","auto",b0,J7]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[o0,"auto",b0,j0]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b0,j0]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b0,j0]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H0()}],"bg-repeat":[{bg:w0()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},d6,b0,j0],radial:["",b0,j0],conic:[d6,b0,j0]},Ai,Ni]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:$0()}],"gradient-via-pos":[{via:$0()}],"gradient-to-pos":[{to:$0()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:V0()}],"rounded-s":[{"rounded-s":V0()}],"rounded-e":[{"rounded-e":V0()}],"rounded-t":[{"rounded-t":V0()}],"rounded-r":[{"rounded-r":V0()}],"rounded-b":[{"rounded-b":V0()}],"rounded-l":[{"rounded-l":V0()}],"rounded-ss":[{"rounded-ss":V0()}],"rounded-se":[{"rounded-se":V0()}],"rounded-ee":[{"rounded-ee":V0()}],"rounded-es":[{"rounded-es":V0()}],"rounded-tl":[{"rounded-tl":V0()}],"rounded-tr":[{"rounded-tr":V0()}],"rounded-br":[{"rounded-br":V0()}],"rounded-bl":[{"rounded-bl":V0()}],"border-w":[{border:l()}],"border-w-x":[{"border-x":l()}],"border-w-y":[{"border-y":l()}],"border-w-s":[{"border-s":l()}],"border-w-e":[{"border-e":l()}],"border-w-bs":[{"border-bs":l()}],"border-w-be":[{"border-be":l()}],"border-w-t":[{"border-t":l()}],"border-w-r":[{"border-r":l()}],"border-w-b":[{"border-b":l()}],"border-w-l":[{"border-l":l()}],"divide-x":[{"divide-x":l()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":l()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z0(),"hidden","none"]}],"divide-style":[{divide:[...Z0(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Z0(),"none","hidden"]}],"outline-offset":[{"outline-offset":[o0,b0,j0]}],"outline-w":[{outline:["",o0,gZ,J7]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",W,YX,wX]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",q,YX,wX]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:l()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[o0,J7]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":l()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",K,YX,wX]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[o0,b0,j0]}],"mix-blend":[{"mix-blend":[...q0(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q0()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[o0]}],"mask-image-linear-from-pos":[{"mask-linear-from":s()}],"mask-image-linear-to-pos":[{"mask-linear-to":s()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":s()}],"mask-image-t-to-pos":[{"mask-t-to":s()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":s()}],"mask-image-r-to-pos":[{"mask-r-to":s()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":s()}],"mask-image-b-to-pos":[{"mask-b-to":s()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":s()}],"mask-image-l-to-pos":[{"mask-l-to":s()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":s()}],"mask-image-x-to-pos":[{"mask-x-to":s()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":s()}],"mask-image-y-to-pos":[{"mask-y-to":s()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[b0,j0]}],"mask-image-radial-from-pos":[{"mask-radial-from":s()}],"mask-image-radial-to-pos":[{"mask-radial-to":s()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[o0]}],"mask-image-conic-from-pos":[{"mask-conic-from":s()}],"mask-image-conic-to-pos":[{"mask-conic-to":s()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H0()}],"mask-repeat":[{mask:w0()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",b0,j0]}],filter:[{filter:["","none",b0,j0]}],blur:[{blur:X0()}],brightness:[{brightness:[o0,b0,j0]}],contrast:[{contrast:[o0,b0,j0]}],"drop-shadow":[{"drop-shadow":["","none",B,YX,wX]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",o0,b0,j0]}],"hue-rotate":[{"hue-rotate":[o0,b0,j0]}],invert:[{invert:["",o0,b0,j0]}],saturate:[{saturate:[o0,b0,j0]}],sepia:[{sepia:["",o0,b0,j0]}],"backdrop-filter":[{"backdrop-filter":["","none",b0,j0]}],"backdrop-blur":[{"backdrop-blur":X0()}],"backdrop-brightness":[{"backdrop-brightness":[o0,b0,j0]}],"backdrop-contrast":[{"backdrop-contrast":[o0,b0,j0]}],"backdrop-grayscale":[{"backdrop-grayscale":["",o0,b0,j0]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[o0,b0,j0]}],"backdrop-invert":[{"backdrop-invert":["",o0,b0,j0]}],"backdrop-opacity":[{"backdrop-opacity":[o0,b0,j0]}],"backdrop-saturate":[{"backdrop-saturate":[o0,b0,j0]}],"backdrop-sepia":[{"backdrop-sepia":["",o0,b0,j0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",b0,j0]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[o0,"initial",b0,j0]}],ease:[{ease:["linear","initial",N,b0,j0]}],delay:[{delay:[o0,b0,j0]}],animate:[{animate:["none",L,b0,j0]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[F,b0,j0]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:z0()}],"rotate-x":[{"rotate-x":z0()}],"rotate-y":[{"rotate-y":z0()}],"rotate-z":[{"rotate-z":z0()}],scale:[{scale:p()}],"scale-x":[{"scale-x":p()}],"scale-y":[{"scale-y":p()}],"scale-z":[{"scale-z":p()}],"scale-3d":["scale-3d"],skew:[{skew:o()}],"skew-x":[{"skew-x":o()}],"skew-y":[{"skew-y":o()}],transform:[{transform:[b0,j0,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:t()}],"translate-x":[{"translate-x":t()}],"translate-y":[{"translate-y":t()}],"translate-z":[{"translate-z":t()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b0,j0]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mbs":[{"scroll-mbs":b()}],"scroll-mbe":[{"scroll-mbe":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pbs":[{"scroll-pbs":b()}],"scroll-pbe":[{"scroll-pbe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b0,j0]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[o0,gZ,J7,mD]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},QM;var XM=U(()=>{gD=[],sr=[],er=/\s+/,Qi=[],iD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xi=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,wi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,QM=$i(Oi)});function v0(...Z){return QM(vZ(Z))}var k5=U(()=>{XX();XM()});function $5({className:Z,variant:J="default",size:$="default",...Q}){return wM.jsx(lW,{"data-slot":"button",className:v0(ji({variant:J,size:$,className:Z})),...Q})}var wM,ji;var r6=U(()=>{ED();vD();k5();wM=P(G0(),1),ji=yD("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-sm text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100",secondary:"bg-muted text-foreground hover:bg-muted/80",outline:"bg-background shadow-sm hover:bg-muted hover:text-foreground",ghost:"hover:bg-muted"},size:{sm:"h-6 gap-1 rounded-xs px-2 text-xs has-[>svg]:px-1.5 [&_svg]:size-4",default:"h-8 px-3 has-[>svg]:px-2.5 [&_svg]:size-5",lg:"h-10 rounded-lg px-4 has-[>svg]:px-3 [&_svg]:size-5","icon-sm":"size-6 rounded-xs [&_svg]:size-4",icon:"size-8 [&_svg]:size-5","icon-lg":"size-10 rounded-lg [&_svg]:size-5"}},defaultVariants:{variant:"default",size:"default"}})});function z2(Z){let J=zX.useContext(oW);if(J===void 0&&!Z)throw Error(g0(33));return J}var zX,oW;var U6=U(()=>{zX=P(f(),1),oW=zX.createContext(void 0)});function b1(Z){let J=HX.useContext(nW);if(J===void 0&&!Z)throw Error(g0(36));return J}var HX,nW;var H2=U(()=>{HX=P(f(),1),nW=HX.createContext(void 0)});var Q7,bi,Pi,k4;var i6=U(()=>{Q7=function(Z){return Z.startingStyle="data-starting-style",Z.endingStyle="data-ending-style",Z}({}),bi={[Q7.startingStyle]:""},Pi={[Q7.endingStyle]:""},k4={transitionStatus(Z){if(Z==="starting")return bi;if(Z==="ending")return Pi;return null}}});var eW,tW,Ii,Ti,ki,Ci,Si,GX,fZ,v5;var E2=U(()=>{i6();eW=function(Z){return Z.open="data-open",Z.closed="data-closed",Z[Z.startingStyle=Q7.startingStyle]="startingStyle",Z[Z.endingStyle=Q7.endingStyle]="endingStyle",Z.anchorHidden="data-anchor-hidden",Z.side="data-side",Z.align="data-align",Z}({}),tW=function(Z){return Z.popupOpen="data-popup-open",Z.pressed="data-pressed",Z}({}),Ii={[tW.popupOpen]:""},Ti={[tW.popupOpen]:"",[tW.pressed]:""},ki={[eW.open]:""},Ci={[eW.closed]:""},Si={[eW.anchorHidden]:""},GX={open(Z){if(Z)return Ii;return null}},fZ={open(Z){if(Z)return Ti;return null}},v5={open(Z){if(Z)return ki;return Ci},anchorHidden(Z){if(Z)return Si;return null}}});var YM,zM;var HM=U(()=>{U6();H2();_1();E2();YM=P(f(),1),zM=YM.forwardRef(function(J,$){let{className:Q,render:X,...Y}=J,{store:w}=b1(),{arrowRef:z,side:H,align:G,arrowUncentered:W,arrowStyles:q}=z2(),B={open:w.useState("open"),side:H,align:G,uncentered:W};return T0("div",J,{ref:[z,$],stateAttributesMapping:v5,state:B,props:{style:q,"aria-hidden":!0,...Y}})})});function C4(Z=!0){let J=WX.useContext(Ei);if(J===void 0&&!Z)throw Error(g0(25));return J}var WX,Ei;var h9=U(()=>{WX=P(f(),1),Ei=WX.createContext(void 0)});var K0={};N9(K0,{windowResize:()=>qa,wheel:()=>Xa,triggerPress:()=>Ri,triggerHover:()=>xi,triggerFocus:()=>yi,trackPress:()=>ci,swipe:()=>Wa,siblingOpen:()=>za,scrub:()=>wa,pointer:()=>$a,outsidePress:()=>vi,none:()=>hi,listNavigation:()=>Za,linkPress:()=>mi,keyboard:()=>Ja,itemPress:()=>gi,inputPress:()=>oi,inputPaste:()=>si,inputClear:()=>ii,inputChange:()=>ri,inputBlur:()=>ai,incrementPress:()=>di,imperativeAction:()=>Ga,focusOut:()=>ni,escapeKey:()=>ti,drag:()=>Qa,disabled:()=>Ha,decrementPress:()=>li,closeWatcher:()=>ei,closePress:()=>fi,clearPress:()=>pi,chipRemovePress:()=>ui,cancelOpen:()=>Ya});var hi="none",Ri="trigger-press",xi="trigger-hover",yi="trigger-focus",vi="outside-press",gi="item-press",fi="close-press",mi="link-press",pi="clear-press",ui="chip-remove-press",ci="track-press",di="increment-press",li="decrement-press",ri="input-change",ii="input-clear",ai="input-blur",si="input-paste",oi="input-press",ni="focus-out",ti="escape-key",ei="close-watcher",Za="list-navigation",Ja="keyboard",$a="pointer",Qa="drag",Xa="wheel",wa="scrub",Ya="cancel-open",za="sibling-open",Ha="disabled",Ga="imperative-action",Wa="swipe",qa="window-resize";var C1=()=>{};var GM,Ka,WM;var qM=U(()=>{H2();_1();E2();i6();h9();C1();GM=P(f(),1),Ka={...v5,...k4},WM=GM.forwardRef(function(J,$){let{className:Q,render:X,...Y}=J,{store:w}=b1(),z=w.useState("open"),H=w.useState("mounted"),G=w.useState("transitionStatus"),W=w.useState("lastOpenChangeReason"),q=C4(),K={open:z,transitionStatus:G};return T0("div",J,{ref:q?.backdropRef?[$,q.backdropRef]:$,state:K,stateAttributesMapping:Ka,props:[{role:"presentation",hidden:!H,style:{pointerEvents:W===K0.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},Y]})})});function qX({controlled:Z,default:J,name:$,state:Q="value"}){let{current:X}=X7.useRef(Z!==void 0),[Y,w]=X7.useState(J),z=X?Z:Y,H=X7.useCallback((G)=>{if(!X)w(G)},[]);return[z,H]}var X7;var Zq=U(()=>{X7=P(f(),1)});function KM(){let Z=KX.useContext(Jq);if(Z===void 0)throw Error(g0(30));return Z}var KX,Jq;var $q=U(()=>{KX=P(f(),1),Jq=KX.createContext(void 0)});var Qq=U(()=>{xZ()});function BX(Z){let{closeOnClick:J,highlighted:$,id:Q,nodeId:X,store:Y,itemRef:w,itemMetadata:z}=Z,{events:H}=Y.useState("floatingTreeRoot"),G=C4(!0),W=G!==void 0;return BM.useMemo(()=>({id:Q,role:"menuitem",tabIndex:$?0:-1,onMouseMove(q){if(!X)return;H.emit("itemhover",{nodeId:X,target:q.currentTarget})},onClick(q){if(J)H.emit("close",{domEvent:q,reason:K0.itemPress})},onMouseUp(q){if(G){let K=G.initialCursorPointRef.current;if(G.initialCursorPointRef.current=null,W&&K&&Math.abs(q.clientX-K.x)<=1&&Math.abs(q.clientY-K.y)<=1)return}if(w.current&&Y.context.allowMouseUpTriggerRef.current&&(!W||q.button===2)){if(!z||z.type==="regular-item")w.current.click()}}}),[J,$,Q,H,X,Y,w,G,W,z])}var BM;var Xq=U(()=>{C1();h9();BM=P(f(),1)});function a6(Z){let{closeOnClick:J,disabled:$=!1,highlighted:Q,id:X,store:Y,nativeButton:w,itemMetadata:z,nodeId:H}=Z,G=R9.useRef(null),{getButtonProps:W,buttonRef:q}=e2({disabled:$,focusableWhenDisabled:!0,native:w}),K=BX({closeOnClick:J,highlighted:Q,id:X,nodeId:H,store:Y,itemRef:G,itemMetadata:z}),B=R9.useCallback((F)=>{return K6(K,{onMouseEnter(){if(z.type!=="submenu-trigger")return;z.setActive()},onKeyUp(_){if(_.key===" "&&Y.context.typingRef.current)_.preventBaseUIHandler()}},F,W)},[K,W,Y,z]),V=T4(G,q);return R9.useMemo(()=>({getItemProps:B,itemRef:V}),[B,V])}var R9,x9;var mZ=U(()=>{yZ();Qq();RZ();Xq();R9=P(f(),1),x9={type:"regular-item"}});function UM(){return UX.useContext(wq)}var UX,wq;var Yq=U(()=>{UX=P(f(),1),wq=UX.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>{return()=>{}},elementsRef:{current:[]},nextIndexRef:{current:0}})});function h2(Z={}){let{label:J,metadata:$,textRef:Q,indexGuessBehavior:X,index:Y}=Z,{register:w,unregister:z,subscribeMapChange:H,elementsRef:G,labelsRef:W,nextIndexRef:q}=UM(),K=V6.useRef(-1),[B,V]=V6.useState(Y??(X===Ba.GuessFromOrder?()=>{if(K.current===-1){let N=q.current;q.current+=1,K.current=N}return K.current}:-1)),F=V6.useRef(null),_=V6.useCallback((N)=>{if(F.current=N,B!==-1&&N!==null){if(G.current[B]=N,W){let L=J!==void 0;W.current[B]=L?J:Q?.current?.textContent??N.textContent}}},[B,G,W,J,Q]);return F0(()=>{if(Y!=null)return;let N=F.current;if(N)return w(N,$),()=>{z(N)};return},[Y,w,z,$]),F0(()=>{if(Y!=null)return;return H((N)=>{let L=F.current?N.get(F.current)?.index:null;if(L!=null)V(L)})},[Y,H,V]),V6.useMemo(()=>({ref:_,index:B}),[B,_])}var V6,Ba;var w7=U(()=>{M1();Yq();V6=P(f(),1),Ba=function(Z){return Z[Z.None=0]="None",Z[Z.GuessFromOrder=1]="GuessFromOrder",Z}({})});function Ua(Z,J="mui"){let[$,Q]=VX.useState(Z),X=Z||$;return VX.useEffect(()=>{if($==null)VM+=1,Q(`${J}-${VM}`)},[$,J]),X}function G2(Z,J){if(FM!==void 0){let $=FM();return Z??(J?`${J}-${$}`:$)}return Ua(Z,J)}var VX,VM=0,FM;var s6=U(()=>{GD();VX=P(f(),1);FM=HD.useId});function Q5(Z){return G2(Z,"base-ui")}var J4=U(()=>{s6()});var zq;var NM=U(()=>{zq=function(Z){return Z.checked="data-checked",Z.unchecked="data-unchecked",Z.disabled="data-disabled",Z.highlighted="data-highlighted",Z}({})});var o6;var pZ=U(()=>{i6();NM();o6={checked(Z){if(Z)return{[zq.checked]:""};return{[zq.unchecked]:""}},...k4}});function P0(Z,J,$,Q){let X=!1,Y=!1,w=Q??q1;return{reason:Z,event:J??new Event("base-ui"),cancel(){X=!0},allowPropagation(){Y=!0},get isCanceled(){return X},get isPropagationAllowed(){return Y},trigger:$,...w}}var X5=U(()=>{j5()});var FX,_M,LM;var AM=U(()=>{y1();Zq();$q();mZ();w7();H2();_1();J4();pZ();U6();X5();C1();FX=P(f(),1),_M=P(G0(),1),LM=FX.forwardRef(function(J,$){let{render:Q,className:X,id:Y,label:w,nativeButton:z=!1,disabled:H=!1,closeOnClick:G=!1,checked:W,defaultChecked:q,onCheckedChange:K,...B}=J,V=h2({label:w}),F=z2(!0),_=Q5(Y),{store:N}=b1(),L=N.useState("isActive",V.index),M=N.useState("itemProps"),[A,O]=qX({controlled:W,default:q??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:D,itemRef:k}=a6({closeOnClick:G,disabled:H,highlighted:L,id:_,store:N,nativeButton:z,nodeId:F?.nodeId,itemMetadata:x9}),b=FX.useMemo(()=>({disabled:H,highlighted:L,checked:A}),[H,L,A]),h=U0((d)=>{let v={...P0(K0.itemPress,d.nativeEvent),preventUnmountOnClose:()=>{}};if(K?.(!A,v),v.isCanceled)return;O((C)=>!C)}),I=T0("div",J,{state:b,stateAttributesMapping:o6,props:[M,{role:"menuitemcheckbox","aria-checked":A,onClick:h},B,D],ref:[k,$,V.ref]});return _M.jsx(Jq.Provider,{value:b,children:I})})});function n6(Z){DM.useEffect(Z,Va)}var DM,Va;var uZ=U(()=>{DM=P(f(),1),Va=[]});class MM{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=(Z)=>{this.isScheduled=!1;let J=this.callbacks,$=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,$>0)for(let Q=0;Q<J.length;Q+=1)J[Q]?.(Z)};request(Z){let J=this.nextId;this.nextId+=1,this.callbacks.push(Z),this.callbacksCount+=1;let $=!1;if(!this.isScheduled||$)requestAnimationFrame(this.tick),this.isScheduled=!0;return J}cancel(Z){let J=Z-this.startId;if(J<0||J>=this.callbacks.length)return;this.callbacks[J]=null,this.callbacksCount-=1}}class R2{static create(){return new R2}static request(Z){return _X.request(Z)}static cancel(Z){return _X.cancel(Z)}currentId=NX;request(Z){this.cancel(),this.currentId=_X.request(()=>{this.currentId=NX,Z()})}cancel=()=>{if(this.currentId!==NX)_X.cancel(this.currentId),this.currentId=NX};disposeEffect=()=>{return this.cancel}}function S4(){let Z=D1(R2.create).current;return n6(Z.disposeEffect),Z}var NX=null,$m2,_X;var t6=U(()=>{Y2();uZ();$m2=globalThis.requestAnimationFrame;_X=new MM});function y9(Z,J=!1,$=!1){let[Q,X]=cZ.useState(Z&&J?"idle":void 0),[Y,w]=cZ.useState(Z);if(Z&&!Y)w(!0),X("starting");if(!Z&&Y&&Q!=="ending"&&!$)X("ending");if(!Z&&!Y&&Q==="ending")X(void 0);return F0(()=>{if(!Z&&Y&&Q!=="ending"&&$){let z=R2.request(()=>{X("ending")});return()=>{R2.cancel(z)}}return},[Z,Y,Q,$]),F0(()=>{if(!Z||J)return;let z=R2.request(()=>{X(void 0)});return()=>{R2.cancel(z)}},[J,Z]),F0(()=>{if(!Z||!J)return;if(Z&&Y&&Q!=="idle")X("starting");let z=R2.request(()=>{X("idle")});return()=>{R2.cancel(z)}},[J,Z,Y,X,Q]),cZ.useMemo(()=>({mounted:Y,setMounted:w,transitionStatus:Q}),[Y,Q])}var cZ;var LX=U(()=>{M1();t6();cZ=P(f(),1)});function $4(Z){if(Z==null)return Z;return"current"in Z?Z.current:Z}function e6(Z,J=!1,$=!0){let Q=S4();return U0((X,Y=null)=>{Q.cancel();function w(){OM.flushSync(X)}let z=$4(Z);if(z==null)return;let H=z;if(typeof H.getAnimations!=="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)X();else{let G=function(){let q=Q7.startingStyle;if(!H.hasAttribute(q)){Q.request(W);return}let K=new MutationObserver(()=>{if(!H.hasAttribute(q))K.disconnect(),W()});K.observe(H,{attributes:!0,attributeFilter:[q]}),Y?.addEventListener("abort",()=>K.disconnect(),{once:!0})},W=function(){Promise.all(H.getAnimations().map((q)=>q.finished)).then(()=>{if(Y?.aborted)return;w()}).catch(()=>{let q=H.getAnimations();if($){if(Y?.aborted)return;w()}else if(q.length>0&&q.some((K)=>K.pending||K.playState!=="finished"))W()})};if(J){G();return}Q.request(W)}})}var OM;var dZ=U(()=>{t6();y1();i6();OM=P(s2(),1)});function E4(Z){let{enabled:J=!0,open:$,ref:Q,onComplete:X}=Z,Y=U0(X),w=e6(Q,$,!1);jM.useEffect(()=>{if(!J)return;let z=new AbortController;return w(Y,z.signal),()=>{z.abort()}},[J,$,Y,w])}var jM;var v9=U(()=>{y1();dZ();jM=P(f(),1)});var AX,bM;var PM=U(()=>{$q();_1();pZ();LX();v9();AX=P(f(),1),bM=AX.forwardRef(function(J,$){let{render:Q,className:X,keepMounted:Y=!1,...w}=J,z=KM(),H=AX.useRef(null),{transitionStatus:G,setMounted:W}=y9(z.checked);E4({open:z.checked,ref:H,onComplete(){if(!z.checked)W(!1)}});let q={checked:z.checked,disabled:z.disabled,highlighted:z.highlighted,transitionStatus:G};return T0("span",J,{state:q,ref:[$,H],stateAttributesMapping:o6,props:{"aria-hidden":!0,...w},enabled:Y||z.checked})})});function IM(){let Z=DX.useContext(Hq);if(Z===void 0)throw Error(g0(31));return Z}var DX,Hq;var Gq=U(()=>{DX=P(f(),1),Hq=DX.createContext(void 0)});var g9,TM,kM;var CM=U(()=>{_1();Gq();g9=P(f(),1),TM=P(G0(),1),kM=g9.forwardRef(function(J,$){let{render:Q,className:X,...Y}=J,[w,z]=g9.useState(void 0),H=g9.useMemo(()=>({setLabelId:z}),[z]),G=T0("div",J,{ref:$,props:{role:"group","aria-labelledby":w,...Y}});return TM.jsx(Hq.Provider,{value:H,children:G})})});var SM,EM;var hM=U(()=>{M1();_1();J4();Gq();SM=P(f(),1),EM=SM.forwardRef(function(J,$){let{className:Q,render:X,id:Y,...w}=J,z=Q5(Y),{setLabelId:H}=IM();return F0(()=>{return H(z),()=>{H(void 0)}},[H,z]),T0("div",J,{ref:$,props:{id:z,role:"presentation",...w}})})});var RM,xM;var yM=U(()=>{mZ();H2();_1();J4();w7();U6();RM=P(f(),1),xM=RM.forwardRef(function(J,$){let{render:Q,className:X,id:Y,label:w,nativeButton:z=!1,disabled:H=!1,closeOnClick:G=!0,...W}=J,q=h2({label:w}),K=z2(!0),B=Q5(Y),{store:V}=b1(),F=V.useState("isActive",q.index),_=V.useState("itemProps"),{getItemProps:N,itemRef:L}=a6({closeOnClick:G,disabled:H,highlighted:F,id:B,store:V,nativeButton:z,nodeId:K?.nodeId,itemMetadata:x9});return T0("div",J,{state:{disabled:H,highlighted:F},props:[_,W,N],ref:[L,$,q.ref]})})});var f9,vM;var gM=U(()=>{H2();_1();J4();w7();U6();Xq();f9=P(f(),1),vM=f9.forwardRef(function(J,$){let{render:Q,className:X,id:Y,label:w,closeOnClick:z=!1,...H}=J,G=f9.useRef(null),W=h2({label:w}),K=z2(!0)?.nodeId,B=Q5(Y),{store:V}=b1(),F=V.useState("isActive",W.index),_=V.useState("itemProps"),N=BX({closeOnClick:z,highlighted:F,id:B,nodeId:K,store:V,itemRef:G}),L=f9.useMemo(()=>({highlighted:F}),[F]);return T0("a",J,{state:L,props:[_,H,N],ref:[G,$,W.ref]})})});var Fa,MX,mM,m9,OX,jX=function(J,$){var Q;if($===void 0)$=!0;var X=J===null||J===void 0?void 0:(Q=J.getAttribute)===null||Q===void 0?void 0:Q.call(J,"inert"),Y=X===""||X==="true",w=Y||$&&J&&(typeof J.closest==="function"?J.closest("[inert]"):jX(J.parentNode));return w},Na=function(J){var $,Q=J===null||J===void 0?void 0:($=J.getAttribute)===null||$===void 0?void 0:$.call(J,"contenteditable");return Q===""||Q==="true"},pM=function(J,$,Q){if(jX(J))return[];var X=Array.prototype.slice.apply(J.querySelectorAll(MX));if($&&m9.call(J,MX))X.unshift(J);return X=X.filter(Q),X},bX=function(J,$,Q){var X=[],Y=Array.from(J);while(Y.length){var w=Y.shift();if(jX(w,!1))continue;if(w.tagName==="SLOT"){var z=w.assignedElements(),H=z.length?z:w.children,G=bX(H,!0,Q);if(Q.flatten)X.push.apply(X,G);else X.push({scopeParent:w,candidates:G})}else{var W=m9.call(w,MX);if(W&&Q.filter(w)&&($||!J.includes(w)))X.push(w);var q=w.shadowRoot||typeof Q.getShadowRoot==="function"&&Q.getShadowRoot(w),K=!jX(q,!1)&&(!Q.shadowRootFilter||Q.shadowRootFilter(w));if(q&&K){var B=bX(q===!0?w.children:q.children,!0,Q);if(Q.flatten)X.push.apply(X,B);else X.push({scopeParent:w,candidates:B})}else Y.unshift.apply(Y,w.children)}}return X},uM=function(J){return!isNaN(parseInt(J.getAttribute("tabindex"),10))},cM=function(J){if(!J)throw Error("No node provided");if(J.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(J.tagName)||Na(J))&&!uM(J))return 0}return J.tabIndex},_a=function(J,$){var Q=cM(J);if(Q<0&&$&&!uM(J))return 0;return Q},La=function(J,$){return J.tabIndex===$.tabIndex?J.documentOrder-$.documentOrder:J.tabIndex-$.tabIndex},dM=function(J){return J.tagName==="INPUT"},Aa=function(J){return dM(J)&&J.type==="hidden"},Da=function(J){var $=J.tagName==="DETAILS"&&Array.prototype.slice.apply(J.children).some(function(Q){return Q.tagName==="SUMMARY"});return $},Ma=function(J,$){for(var Q=0;Q<J.length;Q++)if(J[Q].checked&&J[Q].form===$)return J[Q]},Oa=function(J){if(!J.name)return!0;var $=J.form||OX(J),Q=function(z){return $.querySelectorAll('input[type="radio"][name="'+z+'"]')},X;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape==="function")X=Q(window.CSS.escape(J.name));else try{X=Q(J.name)}catch(w){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",w.message),!1}var Y=Ma(X,J.form);return!Y||Y===J},ja=function(J){return dM(J)&&J.type==="radio"},ba=function(J){return ja(J)&&!Oa(J)},Pa=function(J){var $,Q=J&&OX(J),X=($=Q)===null||$===void 0?void 0:$.host,Y=!1;if(Q&&Q!==J){var w,z,H;Y=!!((w=X)!==null&&w!==void 0&&(z=w.ownerDocument)!==null&&z!==void 0&&z.contains(X)||J!==null&&J!==void 0&&(H=J.ownerDocument)!==null&&H!==void 0&&H.contains(J));while(!Y&&X){var G,W,q;Q=OX(X),X=(G=Q)===null||G===void 0?void 0:G.host,Y=!!((W=X)!==null&&W!==void 0&&(q=W.ownerDocument)!==null&&q!==void 0&&q.contains(X))}}return Y},fM=function(J){var $=J.getBoundingClientRect(),Q=$.width,X=$.height;return Q===0&&X===0},Ia=function(J,$){var{displayCheck:Q,getShadowRoot:X}=$;if(Q==="full-native"){if("checkVisibility"in J){var Y=J.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!Y}}if(getComputedStyle(J).visibility==="hidden")return!0;var w=m9.call(J,"details>summary:first-of-type"),z=w?J.parentElement:J;if(m9.call(z,"details:not([open]) *"))return!0;if(!Q||Q==="full"||Q==="full-native"||Q==="legacy-full"){if(typeof X==="function"){var H=J;while(J){var G=J.parentElement,W=OX(J);if(G&&!G.shadowRoot&&X(G)===!0)return fM(J);else if(J.assignedSlot)J=J.assignedSlot;else if(!G&&W!==J.ownerDocument)J=W.host;else J=G}J=H}if(Pa(J))return!J.getClientRects().length;if(Q!=="legacy-full")return!0}else if(Q==="non-zero-area")return fM(J);return!1},Ta=function(J){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(J.tagName)){var $=J.parentElement;while($){if($.tagName==="FIELDSET"&&$.disabled){for(var Q=0;Q<$.children.length;Q++){var X=$.children.item(Q);if(X.tagName==="LEGEND")return m9.call($,"fieldset[disabled] *")?!0:!X.contains(J)}return!0}$=$.parentElement}}return!1},Wq=function(J,$){if($.disabled||Aa($)||Ia($,J)||Da($)||Ta($))return!1;return!0},qq=function(J,$){if(ba($)||cM($)<0||!Wq(J,$))return!1;return!0},ka=function(J){var $=parseInt(J.getAttribute("tabindex"),10);if(isNaN($)||$>=0)return!0;return!1},lM=function(J){var $=[],Q=[];return J.forEach(function(X,Y){var w=!!X.scopeParent,z=w?X.scopeParent:X,H=_a(z,w),G=w?lM(X.candidates):z;if(H===0)w?$.push.apply($,G):$.push(z);else Q.push({documentOrder:Y,tabIndex:H,item:X,isScope:w,content:G})}),Q.sort(La).reduce(function(X,Y){return Y.isScope?X.push.apply(X,Y.content):X.push(Y.content),X},[]).concat($)},Y7=function(J,$){$=$||{};var Q;if($.getShadowRoot)Q=bX([J],$.includeContainer,{filter:qq.bind(null,$),flatten:!1,getShadowRoot:$.getShadowRoot,shadowRootFilter:ka});else Q=pM(J,$.includeContainer,qq.bind(null,$));return lM(Q)},rM=function(J,$){$=$||{};var Q;if($.getShadowRoot)Q=bX([J],$.includeContainer,{filter:Wq.bind(null,$),flatten:!0,getShadowRoot:$.getShadowRoot});else Q=pM(J,$.includeContainer,Wq.bind(null,$));return Q},Kq=function(J,$){if($=$||{},!J)throw Error("No node provided");if(m9.call(J,MX)===!1)return!1;return qq($,J)};var Bq=U(()=>{/*!
|
|
2
|
+
* tabbable 6.4.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/Fa=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],MX=Fa.join(","),mM=typeof Element>"u",m9=mM?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,OX=!mM&&Element.prototype.getRootNode?function(Z){var J;return Z===null||Z===void 0?void 0:(J=Z.getRootNode)===null||J===void 0?void 0:J.call(Z)}:function(Z){return Z===null||Z===void 0?void 0:Z.ownerDocument}});function B5(Z){let J=D1(Ca,Z).current;return J.next=Z,F0(J.effect),J}function Ca(Z){let J={current:Z,next:Z,effect:()=>{J.current=J.next}};return J}var lZ=U(()=>{M1();Y2()});var iM,PX,om2;var Uq=U(()=>{iM={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},PX={...iM,position:"fixed",top:0,left:0},om2={...iM,position:"absolute"}});class s5{static create(){return new s5}currentId=rZ;start(Z,J){this.clear(),this.currentId=setTimeout(()=>{this.currentId=rZ,J()},Z)}isStarted(){return this.currentId!==rZ}clear=()=>{if(this.currentId!==rZ)clearTimeout(this.currentId),this.currentId=rZ};disposeEffect=()=>{return this.clear}}function b5(){let Z=D1(s5.create).current;return n6(Z.disposeEffect),Z}var rZ=0;var x2=U(()=>{Y2();uZ()});function Sa(){if(!Z8)return{platform:"",maxTouchPoints:-1};let Z=navigator.userAgentData;if(Z?.platform)return{platform:Z.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Ea(){if(!Z8)return"";let Z=navigator.userAgentData;if(Z&&Array.isArray(Z.brands))return Z.brands.map(({brand:J,version:$})=>`${J}/${$}`).join(" ");return navigator.userAgent}function ha(){if(!Z8)return"";let Z=navigator.userAgentData;if(Z?.platform)return Z.platform;return navigator.platform??""}var Z8,Vq,aM,IX,TX,kX,Jp2,CX,$p2,SX,sM,EX;var J8=U(()=>{Z8=typeof navigator<"u",Vq=Sa(),aM=ha(),IX=Ea(),TX=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),kX=Vq.platform==="MacIntel"&&Vq.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Vq.platform),Jp2=Z8&&/firefox/i.test(IX),CX=Z8&&/apple/i.test(navigator.vendor),$p2=Z8&&/Edg/i.test(IX),SX=Z8&&/android/i.test(aM)||/android/i.test(IX),sM=Z8&&aM.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,EX=IX.includes("jsdom/")});function f0(Z){return Z?.ownerDocument||document}var W2=U(()=>{a1()});var hX,oM,y2;var iZ=U(()=>{M1();J8();Uq();hX=P(f(),1),oM=P(G0(),1),y2=hX.forwardRef(function(J,$){let[Q,X]=hX.useState();return F0(()=>{if(CX)X("button")},[]),oM.jsx("span",{...J,ref:$,style:PX,"aria-hidden":Q?void 0:!0,...{tabIndex:0,role:Q},"data-base-ui-focus-guard":""})})});var aZ="data-base-ui-focusable",Fq="active",Nq="selected",p9="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",h4="ArrowLeft",R4="ArrowRight",sZ="ArrowUp",z7="ArrowDown";function o5(Z){let J=Z.activeElement;while(J?.shadowRoot?.activeElement!=null)J=J.shadowRoot.activeElement;return J}function R0(Z,J){if(!Z||!J)return!1;let $=J.getRootNode?.();if(Z.contains(J))return!0;if($&&rQ($)){let Q=J;while(Q){if(Z===Q)return!0;Q=Q.parentNode||Q.host}}return!1}function H7(Z,J){if(!l0(Z))return!1;let $=Z;if(J.hasElement($))return!$.hasAttribute("data-trigger-disabled");for(let[,Q]of J.entries())if(R0(Q,$))return!Q.hasAttribute("data-trigger-disabled");return!1}function w5(Z){if("composedPath"in Z)return Z.composedPath()[0];return Z.target}function v2(Z,J){if(J==null)return!1;if("composedPath"in Z)return Z.composedPath().includes(J);let $=Z;return $.target!=null&&J.contains($.target)}function nM(Z){return Z.matches("html,body")}function G7(Z){return w1(Z)&&Z.matches(p9)}function oZ(Z){if(!Z)return!1;return Z.getAttribute("role")==="combobox"&&G7(Z)}function tM(Z){if(!Z||EX)return!0;try{return Z.matches(":focus-visible")}catch(J){return!0}}function W7(Z){if(!Z)return null;return Z.hasAttribute(aZ)?Z:Z.querySelector(`[${aZ}]`)||Z}var RX=U(()=>{a1();J8()});function x4(Z,J,$=!0){return Z.filter((X)=>X.parentId===J&&(!$||X.context?.open)).flatMap((X)=>[X,...x4(Z,X.id,$)])}function _q(Z,J){let $=[],Q=Z.find((X)=>X.id===J)?.parentId;while(Q){let X=Z.find((Y)=>Y.id===Q);if(Q=X?.parentId,X)$=$.concat(X)}return $}function Y5(Z){Z.preventDefault(),Z.stopPropagation()}function eM(Z){return"nativeEvent"in Z}function xX(Z){if(Z.pointerType===""&&Z.isTrusted)return!0;if(SX&&Z.pointerType)return Z.type==="click"&&Z.buttons===1;return Z.detail===0&&!Z.pointerType}function yX(Z){if(EX)return!1;return!SX&&Z.width===0&&Z.height===0||SX&&Z.width===1&&Z.height===1&&Z.pressure===0&&Z.detail===0&&Z.pointerType==="mouse"||Z.width<1&&Z.height<1&&Z.pressure===0&&Z.detail===0&&Z.pointerType==="touch"}function y4(Z,J){let $=["mouse","pen"];if(!J)$.push("",void 0);return $.includes(Z)}function vX(Z){let J=Z.type;return J==="click"||J==="mousedown"||J==="keydown"||J==="keyup"}var Lq=U(()=>{J8()});function tZ(Z,J,$){return n5(Z,$8(J,$))}function X4(Z,J){return typeof Z==="function"?Z(J):Z}function C5(Z){return Z.split("-")[0]}function w4(Z){return Z.split("-")[1]}function fX(Z){return Z==="x"?"y":"x"}function eZ(Z){return Z==="y"?"height":"width"}function q2(Z){let J=Z[0];return J==="t"||J==="b"?"y":"x"}function ZJ(Z){return fX(q2(Z))}function QO(Z,J,$){if($===void 0)$=!1;let Q=w4(Z),X=ZJ(Z),Y=eZ(X),w=X==="x"?Q===($?"end":"start")?"right":"left":Q==="start"?"bottom":"top";if(J.reference[Y]>J.floating[Y])w=nZ(w);return[w,nZ(w)]}function XO(Z){let J=nZ(Z);return[gX(Z),J,gX(J)]}function gX(Z){return Z.includes("start")?Z.replace("start","end"):Z.replace("end","start")}function va(Z,J,$){switch(Z){case"top":case"bottom":if($)return J?JO:ZO;return J?ZO:JO;case"left":case"right":return J?xa:ya;default:return[]}}function wO(Z,J,$,Q){let X=w4(Z),Y=va(C5(Z),$==="start",Q);if(X){if(Y=Y.map((w)=>w+"-"+X),J)Y=Y.concat(Y.map(gX))}return Y}function nZ(Z){let J=C5(Z);return Ra[J]+Z.slice(J.length)}function ga(Z){return{top:0,right:0,bottom:0,left:0,...Z}}function mX(Z){return typeof Z!=="number"?ga(Z):{top:Z,right:Z,bottom:Z,left:Z}}function q7(Z){let{x:J,y:$,width:Q,height:X}=Z;return{width:Q,height:X,top:$,left:J,right:J+Q,bottom:$+X,x:J,y:$}}var $O,$8,n5,Q8,X8,Q4=(Z)=>({x:Z,y:Z}),Ra,ZO,JO,xa,ya;var F6=U(()=>{$O=["top","right","bottom","left"],$8=Math.min,n5=Math.max,Q8=Math.round,X8=Math.floor,Ra={left:"right",right:"left",bottom:"top",top:"bottom"};ZO=["left","right"],JO=["right","left"],xa=["top","bottom"],ya=["bottom","top"]});function pX(Z,J,$){return Math.floor(Z/J)!==$}function u9(Z,J){return J<0||J>=Z.current.length}function uX(Z,J){return S5(Z,{disabledIndices:J})}function Aq(Z,J){return S5(Z,{decrement:!0,startingIndex:Z.current.length,disabledIndices:J})}function S5(Z,{startingIndex:J=-1,decrement:$=!1,disabledIndices:Q,amount:X=1}={}){let Y=J;do Y+=$?-X:X;while(Y>=0&&Y<=Z.current.length-1&&c9(Z,Y,Q));return Y}function YO(Z,{event:J,orientation:$,loopFocus:Q,rtl:X,cols:Y,disabledIndices:w,minIndex:z,maxIndex:H,prevIndex:G,stopEvent:W=!1}){let q=G,K=[],B={},V=!1;{let N=null,L=-1;Z.current.forEach((M,A)=>{if(M==null)return;let O=M.closest('[role="row"]');if(O)V=!0;if(O!==N||L===-1)N=O,L+=1,K[L]=[];K[L].push(A),B[A]=L})}let F=V&&K.length>0&&K.some((N)=>N.length!==Y);function _(N){if(!F||G===-1)return;let L=B[G];if(L==null)return;let M=K[L].indexOf(G),A=N==="up"?L-1:L+1;if(Q){if(A<0)A=K.length-1;else if(A>=K.length)A=0}let O=new Set;while(A>=0&&A<K.length&&!O.has(A)){O.add(A);let D=K[A];if(D.length===0){A=N==="up"?A-1:A+1;continue}let k=Math.min(M,D.length-1);for(let b=k;b>=0;b-=1){let h=D[b];if(!c9(Z,h,w))return h}if(A=N==="up"?A-1:A+1,Q){if(A<0)A=K.length-1;else if(A>=K.length)A=0}}return}if(J.key===sZ){let N=_("up");if(N!==void 0){if(W)Y5(J);q=N}else{if(W)Y5(J);if(G===-1)q=H;else if(q=S5(Z,{startingIndex:q,amount:Y,decrement:!0,disabledIndices:w}),Q&&(G-Y<z||q<0)){let L=G%Y,M=H%Y,A=H-(M-L);if(M===L)q=H;else q=M>L?A:A-Y}if(u9(Z,q))q=G}}if(J.key===z7){let N=_("down");if(N!==void 0){if(W)Y5(J);q=N}else{if(W)Y5(J);if(G===-1)q=z;else if(q=S5(Z,{startingIndex:G,amount:Y,disabledIndices:w}),Q&&G+Y>H)q=S5(Z,{startingIndex:G%Y-Y,amount:Y,disabledIndices:w});if(u9(Z,q))q=G}}if($==="both"){let N=X8(G/Y);if(J.key===(X?h4:R4)){if(W)Y5(J);if(G%Y!==Y-1){if(q=S5(Z,{startingIndex:G,disabledIndices:w}),Q&&pX(q,Y,N))q=S5(Z,{startingIndex:G-G%Y-1,disabledIndices:w})}else if(Q)q=S5(Z,{startingIndex:G-G%Y-1,disabledIndices:w});if(pX(q,Y,N))q=G}if(J.key===(X?R4:h4)){if(W)Y5(J);if(G%Y!==0){if(q=S5(Z,{startingIndex:G,decrement:!0,disabledIndices:w}),Q&&pX(q,Y,N))q=S5(Z,{startingIndex:G+(Y-G%Y),decrement:!0,disabledIndices:w})}else if(Q)q=S5(Z,{startingIndex:G+(Y-G%Y),decrement:!0,disabledIndices:w});if(pX(q,Y,N))q=G}let L=X8(H/Y)===N;if(u9(Z,q))if(Q&&L)q=J.key===(X?R4:h4)?H:S5(Z,{startingIndex:G-G%Y-1,disabledIndices:w});else q=G}return q}function zO(Z,J,$){let Q=[],X=0;return Z.forEach(({width:Y,height:w},z)=>{if(Y>J);let H=!1;if($)X=0;while(!H){let G=[];for(let W=0;W<Y;W+=1)for(let q=0;q<w;q+=1)G.push(X+W+q*J);if(X%J+Y<=J&&G.every((W)=>Q[W]==null))G.forEach((W)=>{Q[W]=z}),H=!0;else X+=1}}),[...Q]}function HO(Z,J,$,Q,X){if(Z===-1)return-1;let Y=$.indexOf(Z),w=J[Z];switch(X){case"tl":return Y;case"tr":if(!w)return Y;return Y+w.width-1;case"bl":if(!w)return Y;return Y+(w.height-1)*Q;case"br":return $.lastIndexOf(Z);default:return-1}}function GO(Z,J){return J.flatMap(($,Q)=>Z.includes($)?[Q]:[])}function c9(Z,J,$){if(typeof $==="function")return $(J);if($)return $.includes(J);let Q=Z.current[J];if(!Q)return!1;return Q.hasAttribute("disabled")||Q.getAttribute("aria-disabled")==="true"}var WO=U(()=>{F6();Lq()});function qO(Z,J){let $=Y7(Z,K7()),Q=$.length;if(Q===0)return;let X=o5(f0(Z)),Y=$.indexOf(X),w=Y===-1?J===1?0:Q-1:Y+J;return $[w]}function w8(Z){return qO(f0(Z).body,1)||Z}function cX(Z){return qO(f0(Z).body,-1)||Z}function KO(Z,J){if(!Z)return null;let $=Y7(f0(Z).body,K7()),Q=$.length;if(Q===0)return null;let X=$.indexOf(Z);if(X===-1)return null;let Y=(X+J+Q)%Q;return $[Y]}function dX(Z){return KO(Z,1)}function lX(Z){return KO(Z,-1)}function Y4(Z,J){let $=J||Z.currentTarget,Q=Z.relatedTarget;return!Q||!R0($,Q)}function BO(Z){Y7(Z,K7()).forEach(($)=>{$.dataset.tabindex=$.getAttribute("tabindex")||"",$.setAttribute("tabindex","-1")})}function Dq(Z){Z.querySelectorAll("[data-tabindex]").forEach(($)=>{let Q=$.dataset.tabindex;if(delete $.dataset.tabindex,Q)$.setAttribute("tabindex",Q);else $.removeAttribute("tabindex")})}var K7=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});var UO=U(()=>{Bq();W2();RX()});var t5=U(()=>{RX();Lq();WO();UO()});function D2(Z){return`data-base-ui-${Z}`}function B7(Z,J={}){let{preventScroll:$=!1,cancelPrevious:Q=!0,sync:X=!1}=J;if(Q)cancelAnimationFrame(VO);let Y=()=>Z?.focus({preventScroll:$});if(X)Y();else VO=requestAnimationFrame(Y)}var VO=0;function FO(Z){if(Z==="inert")return d9.inert;if(Z==="aria-hidden")return d9["aria-hidden"];return d9.none}function ma(Z,J,$,Q){let Y=Q?"inert":$?"aria-hidden":null,w=fa(J,Z),z=new Set,H=new Set(w),G=[];if(!iX["data-base-ui-inert"])iX["data-base-ui-inert"]=new WeakMap;let W=iX["data-base-ui-inert"];w.forEach(q),K(J),z.clear();function q(B){if(!B||z.has(B))return;if(z.add(B),B.parentNode)q(B.parentNode)}function K(B){if(!B||H.has(B))return;[].forEach.call(B.children,(V)=>{if(n2(V)==="script")return;if(z.has(V))K(V);else{let F=Y?V.getAttribute(Y):null,_=F!==null&&F!=="false",N=FO(Y),L=(N.get(V)||0)+1,M=(W.get(V)||0)+1;if(N.set(V,L),W.set(V,M),G.push(V),L===1&&_)rX.add(V);if(M===1)V.setAttribute("data-base-ui-inert","");if(!_&&Y)V.setAttribute(Y,Y==="inert"?"":"true")}})}return Mq+=1,()=>{if(G.forEach((B)=>{let V=FO(Y),_=(V.get(B)||0)-1,N=(W.get(B)||0)-1;if(V.set(B,_),W.set(B,N),!_){if(!rX.has(B)&&Y)B.removeAttribute(Y);rX.delete(B)}if(!N)B.removeAttribute("data-base-ui-inert")}),Mq-=1,!Mq)d9.inert=new WeakMap,d9["aria-hidden"]=new WeakMap,d9.none=new WeakMap,rX=new WeakSet,iX={}}}function _O(Z,J=!1,$=!1){let Q=f0(Z[0]).body;return ma(Z.concat(Array.from(Q.querySelectorAll("[aria-live]"))),Q,J,$)}var d9,rX,iX,Mq=0,NO=(Z)=>Z&&(Z.host||NO(Z.parentNode)),fa=(Z,J)=>J.map(($)=>{if(Z.contains($))return $;let Q=NO($);if(Z.contains(Q))return Q;return null}).filter(($)=>$!=null);var LO=U(()=>{a1();W2();d9={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};rX=new WeakSet,iX={}});function DO(Z={}){let{ref:J,container:$,componentProps:Q=q1,elementProps:X}=Z,Y=G2(),z=jq()?.portalNode,[H,G]=u1.useState(null),[W,q]=u1.useState(null),K=U0((_)=>{if(_!==null)q(_)}),B=u1.useRef(null);F0(()=>{if($===null){if(B.current)B.current=null,q(null),G(null);return}if(Y==null)return;let _=($&&(aQ($)?$:$.current))??z??document.body;if(_==null){if(B.current)B.current=null,q(null),G(null);return}if(B.current!==_)B.current=_,q(null),G(_)},[$,z,Y]);let V=T0("div",Q,{ref:[J,K],props:[{id:Y,[pa]:""},X]});return{portalNode:W,portalSubtree:H&&V?Oq.createPortal(V,H):null}}var u1,Oq,U7,AO,jq=()=>u1.useContext(AO),pa,JJ;var bq=U(()=>{a1();s6();M1();y1();iZ();t5();X5();C1();_1();j5();u1=P(f(),1),Oq=P(s2(),1),U7=P(G0(),1),AO=u1.createContext(null),pa=D2("portal");JJ=u1.forwardRef(function(J,$){let{children:Q,container:X,className:Y,render:w,renderGuards:z,...H}=J,{portalNode:G,portalSubtree:W}=DO({container:X,ref:$,componentProps:J,elementProps:H}),q=u1.useRef(null),K=u1.useRef(null),B=u1.useRef(null),V=u1.useRef(null),[F,_]=u1.useState(null),N=F?.modal,L=F?.open,M=typeof z==="boolean"?z:!!F&&!F.modal&&F.open&&!!G;u1.useEffect(()=>{if(!G||N)return;function O(D){if(G&&D.relatedTarget&&Y4(D))(D.type==="focusin"?Dq:BO)(G)}return G.addEventListener("focusin",O,!0),G.addEventListener("focusout",O,!0),()=>{G.removeEventListener("focusin",O,!0),G.removeEventListener("focusout",O,!0)}},[G,N]),u1.useEffect(()=>{if(!G||L)return;Dq(G)},[L,G]);let A=u1.useMemo(()=>({beforeOutsideRef:q,afterOutsideRef:K,beforeInsideRef:B,afterInsideRef:V,portalNode:G,setFocusManagerState:_}),[G]);return U7.jsxs(u1.Fragment,{children:[W,U7.jsxs(AO.Provider,{value:A,children:[M&&G&&U7.jsx(y2,{"data-type":"outside",ref:q,onFocus:(O)=>{if(Y4(O,G))B.current?.focus();else{let D=F?F.domReference:null;cX(D)?.focus()}}}),M&&G&&U7.jsx("span",{"aria-owns":G.id,style:kD}),G&&Oq.createPortal(Q,G),M&&G&&U7.jsx(y2,{"data-type":"outside",ref:K,onFocus:(O)=>{if(Y4(O,G))V.current?.focus();else{let D=F?F.domReference:null;if(w8(D)?.focus(),F?.closeOnFocusOut)F?.onOpenChange(!1,P0(K0.focusOut,O.nativeEvent))}}})]})]})})});function aX(){let Z=new Map;return{emit(J,$){Z.get(J)?.forEach((Q)=>Q($))},on(J,$){if(!Z.has(J))Z.set(J,new Set);Z.get(J).add($)},off(J,$){Z.get(J)?.delete($)}}}class V7{nodesRef={current:[]};events=aX();addNode(Z){this.nodesRef.current.push(Z)}removeNode(Z){let J=this.nodesRef.current.findIndex(($)=>$===Z);if(J!==-1)this.nodesRef.current.splice(J,1)}}var sX=()=>{};function F7(Z){let J=G2(),$=g5(Z),Q=U5();return F0(()=>{if(!J)return;let X={id:J,parentId:Q};return $?.addNode(X),()=>{$?.removeNode(X)}},[$,J,Q]),J}function $J(Z){let{children:J,id:$}=Z,Q=U5();return Pq.jsx(MO.Provider,{value:Y8.useMemo(()=>({id:$,parentId:Q}),[$,Q]),children:J})}function QJ(Z){let{children:J,externalTree:$}=Z,Q=D1(()=>$??new V7).current;return Pq.jsx(OO.Provider,{value:Q,children:J})}var Y8,Pq,MO,OO,U5=()=>Y8.useContext(MO)?.id||null,g5=(Z)=>{let J=Y8.useContext(OO);return Z??J};var z4=U(()=>{s6();M1();Y2();sX();Y8=P(f(),1),Pq=P(G0(),1),MO=Y8.createContext(null),OO=Y8.createContext(null)});function ua(Z,J){let $=k1(Z.target);if(Z instanceof $.KeyboardEvent)return"keyboard";if(Z instanceof $.FocusEvent)return J||"keyboard";if("pointerType"in Z)return Z.pointerType||"keyboard";if("touches"in Z)return"touch";if(Z instanceof $.MouseEvent)return J||(Z.detail===0?"keyboard":"mouse");return""}function Tq(){z8=z8.filter((Z)=>{return Z.deref()?.isConnected})}function ca(Z){if(Tq(),Z&&n2(Z)!=="body"){if(z8.push(new WeakRef(Z)),z8.length>jO)z8=z8.slice(-jO)}}function Iq(){return Tq(),z8[z8.length-1]?.deref()}function da(Z){if(!Z)return null;let J=K7();if(Kq(Z,J))return Z;return Y7(Z,J)[0]||Z}function la(Z){if(!Z||!Z.isConnected)return!1;if(typeof Z.checkVisibility==="function")return Z.checkVisibility();return O5(Z).display!=="none"}function bO(Z,J){if(!J.current.includes("floating")&&!Z.getAttribute("role")?.includes("dialog"))return;let $=K7(),X=rM(Z,$).filter((w)=>{let z=w.getAttribute("data-tabindex")||"";return Kq(w,$)||w.hasAttribute("data-tabindex")&&!z.startsWith("-")}),Y=Z.getAttribute("tabindex");if(J.current.includes("floating")||X.length===0){if(Y!=="0")Z.setAttribute("tabindex","0")}else if(Y!=="-1"||Z.hasAttribute("data-tabindex")&&Z.getAttribute("data-tabindex")!=="-1")Z.setAttribute("tabindex","-1"),Z.setAttribute("data-tabindex","-1")}function wJ(Z){let{context:J,children:$,disabled:Q=!1,initialFocus:X=!0,returnFocus:Y=!0,restoreFocus:w=!1,modal:z=!0,closeOnFocusOut:H=!0,openInteractionType:G="",nextFocusableElement:W,previousFocusableElement:q,beforeContentFocusGuardRef:K,externalTree:B}=Z,V="rootStore"in J?J.rootStore:J,F=V.useState("open"),_=V.useState("domReferenceElement"),N=V.useState("floatingElement"),{events:L,dataRef:M}=V.context,A=U0(()=>M.current.floatingContext?.nodeId),O=X===!1,D=oZ(_)&&O,k=V5.useRef(["content"]),b=B5(X),h=B5(Y),I=B5(G),d=g5(B),v=jq(),C=V5.useRef(null),y=V5.useRef(null),g=V5.useRef(!1),S=V5.useRef(!1),x=V5.useRef(!1),E=V5.useRef(-1),m=V5.useRef(""),j=V5.useRef(""),H0=V5.useRef(null),w0=V5.useRef(null),T=T4(H0,K,v?.beforeInsideRef),$0=T4(w0,v?.afterInsideRef),V0=b5(),l=b5(),Z0=S4(),q0=v!=null,s=W7(N),X0=U0((o=s)=>{return o?Y7(o,K7()):[]}),z0=U0((o)=>{let t=X0(o);return k.current.map(()=>t).filter(Boolean).flat()});V5.useEffect(()=>{if(Q||!z)return;function o(N0){if(N0.key==="Tab"){if(R0(s,o5(f0(s)))&&X0().length===0&&!D)Y5(N0)}}let t=f0(s);return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},[Q,_,s,z,k,D,X0,z0]),V5.useEffect(()=>{if(Q||!F)return;let o=f0(s);function t(){x.current=!1}function N0(J0){let r=w5(J0),n=R0(N,r)||R0(_,r)||R0(v?.portalNode,r);if(x.current=!n,j.current=J0.pointerType||"keyboard",r?.closest(`[${$X}]`))S.current=!0}function a(){j.current="keyboard"}return o.addEventListener("pointerdown",N0,!0),o.addEventListener("pointerup",t,!0),o.addEventListener("pointercancel",t,!0),o.addEventListener("keydown",a,!0),()=>{o.removeEventListener("pointerdown",N0,!0),o.removeEventListener("pointerup",t,!0),o.removeEventListener("pointercancel",t,!0),o.removeEventListener("keydown",a,!0)}},[Q,N,_,s,F,v]),V5.useEffect(()=>{if(Q||!H)return;let o=f0(s);function t(){S.current=!0,l.start(0,()=>{S.current=!1})}function N0(Q0){let i=w5(Q0),I0=X0().indexOf(i);if(I0!==-1)E.current=I0}function a(Q0){let{relatedTarget:i,currentTarget:L0}=Q0,I0=w5(Q0);queueMicrotask(()=>{let n0=A(),W1=V.context.triggerElements,R=i?.hasAttribute(D2("focus-guard"))&&[H0.current,w0.current,v?.beforeInsideRef.current,v?.afterInsideRef.current,v?.beforeOutsideRef.current,v?.afterOutsideRef.current,$4(q),$4(W)].includes(i),u=!(R0(_,i)||R0(N,i)||R0(i,N)||R0(v?.portalNode,i)||i!=null&&W1.hasElement(i)||W1.hasMatchingElement((e)=>R0(e,i))||R||d&&(x4(d.nodesRef.current,n0).find((e)=>R0(e.context?.elements.floating,i)||R0(e.context?.elements.domReference,i))||_q(d.nodesRef.current,n0).find((e)=>[e.context?.elements.floating,W7(e.context?.elements.floating)].includes(i)||e.context?.elements.domReference===i)));if(L0===_&&s)bO(s,k);if(w&&L0!==_&&!la(I0)&&o5(o)===o.body){if(w1(s)){if(s.focus(),w==="popup"){Z0.request(()=>{s.focus()});return}}let e=E.current,B0=X0(),M0=B0[e]||B0[B0.length-1]||s;if(w1(M0))M0.focus()}if(M.current.insideReactTree){M.current.insideReactTree=!1;return}if((D?!0:!z)&&i&&u&&!S.current&&(D||i!==Iq()))g.current=!0,V.setOpen(!1,P0(K0.focusOut,Q0))})}function J0(){if(x.current)return;M.current.insideReactTree=!0,V0.start(0,()=>{M.current.insideReactTree=!1})}let r=w1(_)?_:null,n=[];if(!N&&!r)return;if(r)r.addEventListener("focusout",a),r.addEventListener("pointerdown",t),n.push(()=>{r.removeEventListener("focusout",a),r.removeEventListener("pointerdown",t)});if(N){if(N.addEventListener("focusin",N0),N.addEventListener("focusout",a),v)N.addEventListener("focusout",J0,!0),n.push(()=>{N.removeEventListener("focusout",J0,!0)});n.push(()=>{N.removeEventListener("focusin",N0),N.removeEventListener("focusout",a)})}return()=>{n.forEach((Q0)=>{Q0()})}},[Q,_,N,s,z,d,v,V,H,w,X0,D,A,k,M,V0,l,Z0,W,q]),V5.useEffect(()=>{if(Q||!N||!F)return;let o=Array.from(v?.portalNode?.querySelectorAll(`[${D2("portal")}]`)||[]),N0=(d?_q(d.nodesRef.current,A()):[]).find((J0)=>oZ(J0.context?.elements.domReference||null))?.context?.elements.domReference,a=[N,N0,...o,C.current,y.current,H0.current,w0.current,v?.beforeOutsideRef.current,v?.afterOutsideRef.current,$4(q),$4(W),D?_:null].filter((J0)=>J0!=null);return _O(a,z||D)},[F,Q,_,N,z,k,v,D,d,A,W,q]),F0(()=>{if(!F||Q||!w1(s))return;let o=f0(s),t=o5(o);queueMicrotask(()=>{let N0=z0(s),a=b.current,J0=typeof a==="function"?a(I.current||""):a;if(J0===void 0||J0===!1)return;let r;if(J0===!0||J0===null)r=N0[0]||s;else r=$4(J0);if(r=r||N0[0]||s,R0(s,t))return;B7(r,{preventScroll:r===s})})},[Q,F,s,O,z0,b,I]),F0(()=>{if(Q||!s)return;let o=f0(s),t=o5(o);ca(t);function N0(r){if(!r.open)m.current=ua(r.nativeEvent,j.current);if(r.reason===K0.triggerHover&&r.nativeEvent.type==="mouseleave")g.current=!0;if(r.reason!==K0.outsidePress)return;if(r.nested)g.current=!1;else if(xX(r.nativeEvent)||yX(r.nativeEvent))g.current=!1;else{let n=!1;if(document.createElement("div").focus({get preventScroll(){return n=!0,!1}}),n)g.current=!1;else g.current=!0}}L.on("openchange",N0);let a=o.createElement("span");if(a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,PX),q0&&_)_.insertAdjacentElement("afterend",a);function J0(){let r=h.current,n=typeof r==="function"?r(m.current):r;if(n===void 0||n===!1)return null;if(n===null)n=!0;if(typeof n==="boolean"){let i=_||Iq();return i&&i.isConnected?i:a}let Q0=_||Iq()||a;return $4(n)||Q0}return()=>{L.off("openchange",N0);let r=o5(o),n=R0(N,r)||d&&x4(d.nodesRef.current,A(),!1).some((i)=>R0(i.context?.elements.floating,r)),Q0=J0();queueMicrotask(()=>{let i=da(Q0),L0=typeof h.current!=="boolean";if(h.current&&!g.current&&w1(i)&&(!L0&&i!==r&&r!==o.body?n:!0))i.focus({preventScroll:!0});a.remove(),g.current=!1})}},[Q,N,s,h,M,L,d,q0,_,A]),F0(()=>{if(!TX||F||!N)return;let o=o5(f0(N));if(!w1(o)||!G7(o))return;if(R0(N,o))o.blur()},[F,N]),F0(()=>{if(Q||!v)return;return v.setFocusManagerState({modal:z,closeOnFocusOut:H,open:F,onOpenChange:V.setOpen,domReference:_}),()=>{v.setFocusManagerState(null)}},[Q,v,z,F,V,H,_]),F0(()=>{if(Q||!s)return;return bO(s,k),()=>{queueMicrotask(Tq)}},[Q,s,k]);let p=!Q&&(z?!D:!0)&&(q0||z);return XJ.jsxs(V5.Fragment,{children:[p&&XJ.jsx(y2,{"data-type":"inside",ref:T,onFocus:(o)=>{if(z){let t=z0();B7(t[t.length-1])}else if(v?.portalNode)if(g.current=!1,Y4(o,v.portalNode))w8(_)?.focus();else $4(q??v.beforeOutsideRef)?.focus()}}),$,p&&XJ.jsx(y2,{"data-type":"inside",ref:$0,onFocus:(o)=>{if(z)B7(z0()[0]);else if(v?.portalNode){if(H)g.current=!0;if(Y4(o,v.portalNode))cX(_)?.focus();else $4(W??v.afterOutsideRef)?.focus()}}})]})}var V5,XJ,jO=20,z8;var PO=U(()=>{Bq();a1();yZ();lZ();y1();M1();Uq();x2();J8();t6();W2();iZ();t5();X5();C1();LO();bq();z4();j5();V5=P(f(),1),XJ=P(G0(),1);z8=[]});function N7(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,Q=$.context.dataRef,{enabled:X=!0,event:Y="click",toggle:w=!0,ignoreMouse:z=!1,stickIfOpen:H=!0,touchOpenDelay:G=0,reason:W=K0.triggerPress}=J,q=YJ.useRef(void 0),K=S4(),B=b5(),V=YJ.useMemo(()=>({onPointerDown(F){q.current=F.pointerType},onMouseDown(F){let _=q.current,N=F.nativeEvent,L=$.select("open");if(F.button!==0||Y==="click"||y4(_,!0)&&z)return;let M=Q.current.openEvent,A=M?.type,O=$.select("domReferenceElement")!==F.currentTarget,D=L&&O||!(L&&w&&(M&&H?A==="click"||A==="mousedown":!0));if(G7(N.target)){let b=P0(W,N,N.target);if(D&&_==="touch"&&G>0)B.start(G,()=>{$.setOpen(!0,b)});else $.setOpen(D,b);return}let k=F.currentTarget;K.request(()=>{let b=P0(W,N,k);if(D&&_==="touch"&&G>0)B.start(G,()=>{$.setOpen(!0,b)});else $.setOpen(D,b)})},onClick(F){if(Y==="mousedown-only")return;let _=q.current;if(Y==="mousedown"&&_){q.current=void 0;return}if(y4(_,!0)&&z)return;let N=$.select("open"),L=Q.current.openEvent,M=$.select("domReferenceElement")!==F.currentTarget,A=N&&M||!(N&&w&&(L&&H?vX(L):!0)),O=P0(W,F.nativeEvent,F.currentTarget);if(A&&_==="touch"&&G>0)B.start(G,()=>{$.setOpen(!0,O)});else $.setOpen(A,O)},onKeyDown(){q.current=void 0}}),[Q,Y,z,$,H,w,K,B,G,W]);return YJ.useMemo(()=>X?{reference:V}:q1,[X,V])}var YJ;var IO=U(()=>{t6();x2();j5();t5();X5();C1();YJ=P(f(),1)});function TO(Z,J,$){let{reference:Q,floating:X}=Z,Y=q2(J),w=ZJ(J),z=eZ(w),H=C5(J),G=Y==="y",W=Q.x+Q.width/2-X.width/2,q=Q.y+Q.height/2-X.height/2,K=Q[z]/2-X[z]/2,B;switch(H){case"top":B={x:W,y:Q.y-X.height};break;case"bottom":B={x:W,y:Q.y+Q.height};break;case"right":B={x:Q.x+Q.width,y:q};break;case"left":B={x:Q.x-X.width,y:q};break;default:B={x:Q.x,y:Q.y}}switch(w4(J)){case"start":B[w]-=K*($&&G?-1:1);break;case"end":B[w]+=K*($&&G?-1:1);break}return B}async function SO(Z,J){var $;if(J===void 0)J={};let{x:Q,y:X,platform:Y,rects:w,elements:z,strategy:H}=Z,{boundary:G="clippingAncestors",rootBoundary:W="viewport",elementContext:q="floating",altBoundary:K=!1,padding:B=0}=X4(J,Z),V=mX(B),_=z[K?q==="floating"?"reference":"floating":q],N=q7(await Y.getClippingRect({element:(($=await(Y.isElement==null?void 0:Y.isElement(_)))!=null?$:!0)?_:_.contextElement||await(Y.getDocumentElement==null?void 0:Y.getDocumentElement(z.floating)),boundary:G,rootBoundary:W,strategy:H})),L=q==="floating"?{x:Q,y:X,width:w.floating.width,height:w.floating.height}:w.reference,M=await(Y.getOffsetParent==null?void 0:Y.getOffsetParent(z.floating)),A=await(Y.isElement==null?void 0:Y.isElement(M))?await(Y.getScale==null?void 0:Y.getScale(M))||{x:1,y:1}:{x:1,y:1},O=q7(Y.convertOffsetParentRelativeRectToViewportRelativeRect?await Y.convertOffsetParentRelativeRectToViewportRelativeRect({elements:z,rect:L,offsetParent:M,strategy:H}):L);return{top:(N.top-O.top+V.top)/A.y,bottom:(O.bottom-N.bottom+V.bottom)/A.y,left:(N.left-O.left+V.left)/A.x,right:(O.right-N.right+V.right)/A.x}}function kO(Z,J){return{top:Z.top-J.height,right:Z.right-J.width,bottom:Z.bottom-J.height,left:Z.left-J.width}}function CO(Z){return $O.some((J)=>Z[J]>=0)}async function ia(Z,J){let{placement:$,platform:Q,elements:X}=Z,Y=await(Q.isRTL==null?void 0:Q.isRTL(X.floating)),w=C5($),z=w4($),H=q2($)==="y",G=xO.has(w)?-1:1,W=Y&&H?-1:1,q=X4(J,Z),{mainAxis:K,crossAxis:B,alignmentAxis:V}=typeof q==="number"?{mainAxis:q,crossAxis:0,alignmentAxis:null}:{mainAxis:q.mainAxis||0,crossAxis:q.crossAxis||0,alignmentAxis:q.alignmentAxis};if(z&&typeof V==="number")B=z==="end"?V*-1:V;return H?{x:B*W,y:K*G}:{x:K*G,y:B*W}}var ra=50,EO=async(Z,J,$)=>{let{placement:Q="bottom",strategy:X="absolute",middleware:Y=[],platform:w}=$,z=w.detectOverflow?w:{...w,detectOverflow:SO},H=await(w.isRTL==null?void 0:w.isRTL(J)),G=await w.getElementRects({reference:Z,floating:J,strategy:X}),{x:W,y:q}=TO(G,Q,H),K=Q,B=0,V={};for(let F=0;F<Y.length;F++){let _=Y[F];if(!_)continue;let{name:N,fn:L}=_,{x:M,y:A,data:O,reset:D}=await L({x:W,y:q,initialPlacement:Q,placement:K,strategy:X,middlewareData:V,rects:G,platform:z,elements:{reference:Z,floating:J}});if(W=M!=null?M:W,q=A!=null?A:q,V[N]={...V[N],...O},D&&B<ra){if(B++,typeof D==="object"){if(D.placement)K=D.placement;if(D.rects)G=D.rects===!0?await w.getElementRects({reference:Z,floating:J,strategy:X}):D.rects;({x:W,y:q}=TO(G,K,H))}F=-1}}return{x:W,y:q,placement:K,strategy:X,middlewareData:V}},hO=function(Z){if(Z===void 0)Z={};return{name:"flip",options:Z,async fn(J){var $,Q;let{placement:X,middlewareData:Y,rects:w,initialPlacement:z,platform:H,elements:G}=J,{mainAxis:W=!0,crossAxis:q=!0,fallbackPlacements:K,fallbackStrategy:B="bestFit",fallbackAxisSideDirection:V="none",flipAlignment:F=!0,..._}=X4(Z,J);if(($=Y.arrow)!=null&&$.alignmentOffset)return{};let N=C5(X),L=q2(z),M=C5(z)===z,A=await(H.isRTL==null?void 0:H.isRTL(G.floating)),O=K||(M||!F?[nZ(z)]:XO(z)),D=V!=="none";if(!K&&D)O.push(...wO(z,F,V,A));let k=[z,...O],b=await H.detectOverflow(J,_),h=[],I=((Q=Y.flip)==null?void 0:Q.overflows)||[];if(W)h.push(b[N]);if(q){let y=QO(X,w,A);h.push(b[y[0]],b[y[1]])}if(I=[...I,{placement:X,overflows:h}],!h.every((y)=>y<=0)){var d,v;let y=(((d=Y.flip)==null?void 0:d.index)||0)+1,g=k[y];if(g){if(!(q==="alignment"?L!==q2(g):!1)||I.every((E)=>q2(E.placement)===L?E.overflows[0]>0:!0))return{data:{index:y,overflows:I},reset:{placement:g}}}let S=(v=I.filter((x)=>x.overflows[0]<=0).sort((x,E)=>x.overflows[1]-E.overflows[1])[0])==null?void 0:v.placement;if(!S)switch(B){case"bestFit":{var C;let x=(C=I.filter((E)=>{if(D){let m=q2(E.placement);return m===L||m==="y"}return!0}).map((E)=>[E.placement,E.overflows.filter((m)=>m>0).reduce((m,j)=>m+j,0)]).sort((E,m)=>E[1]-m[1])[0])==null?void 0:C[0];if(x)S=x;break}case"initialPlacement":S=z;break}if(X!==S)return{reset:{placement:S}}}return{}}}},RO=function(Z){if(Z===void 0)Z={};return{name:"hide",options:Z,async fn(J){let{rects:$,platform:Q}=J,{strategy:X="referenceHidden",...Y}=X4(Z,J);switch(X){case"referenceHidden":{let w=await Q.detectOverflow(J,{...Y,elementContext:"reference"}),z=kO(w,$.reference);return{data:{referenceHiddenOffsets:z,referenceHidden:CO(z)}}}case"escaped":{let w=await Q.detectOverflow(J,{...Y,altBoundary:!0}),z=kO(w,$.floating);return{data:{escapedOffsets:z,escaped:CO(z)}}}default:return{}}}}},xO,yO=function(Z){if(Z===void 0)Z=0;return{name:"offset",options:Z,async fn(J){var $,Q;let{x:X,y:Y,placement:w,middlewareData:z}=J,H=await ia(J,Z);if(w===(($=z.offset)==null?void 0:$.placement)&&(Q=z.arrow)!=null&&Q.alignmentOffset)return{};return{x:X+H.x,y:Y+H.y,data:{...H,placement:w}}}}},vO=function(Z){if(Z===void 0)Z={};return{name:"shift",options:Z,async fn(J){let{x:$,y:Q,placement:X,platform:Y}=J,{mainAxis:w=!0,crossAxis:z=!1,limiter:H={fn:(N)=>{let{x:L,y:M}=N;return{x:L,y:M}}},...G}=X4(Z,J),W={x:$,y:Q},q=await Y.detectOverflow(J,G),K=q2(C5(X)),B=fX(K),V=W[B],F=W[K];if(w){let N=B==="y"?"top":"left",L=B==="y"?"bottom":"right",M=V+q[N],A=V-q[L];V=tZ(M,V,A)}if(z){let N=K==="y"?"top":"left",L=K==="y"?"bottom":"right",M=F+q[N],A=F-q[L];F=tZ(M,F,A)}let _=H.fn({...J,[B]:V,[K]:F});return{..._,data:{x:_.x-$,y:_.y-Q,enabled:{[B]:w,[K]:z}}}}}},gO=function(Z){if(Z===void 0)Z={};return{options:Z,fn(J){let{x:$,y:Q,placement:X,rects:Y,middlewareData:w}=J,{offset:z=0,mainAxis:H=!0,crossAxis:G=!0}=X4(Z,J),W={x:$,y:Q},q=q2(X),K=fX(q),B=W[K],V=W[q],F=X4(z,J),_=typeof F==="number"?{mainAxis:F,crossAxis:0}:{mainAxis:0,crossAxis:0,...F};if(H){let M=K==="y"?"height":"width",A=Y.reference[K]-Y.floating[M]+_.mainAxis,O=Y.reference[K]+Y.reference[M]-_.mainAxis;if(B<A)B=A;else if(B>O)B=O}if(G){var N,L;let M=K==="y"?"width":"height",A=xO.has(C5(X)),O=Y.reference[q]-Y.floating[M]+(A?((N=w.offset)==null?void 0:N[q])||0:0)+(A?0:_.crossAxis),D=Y.reference[q]+Y.reference[M]+(A?0:((L=w.offset)==null?void 0:L[q])||0)-(A?_.crossAxis:0);if(V<O)V=O;else if(V>D)V=D}return{[K]:B,[q]:V}}}},fO=function(Z){if(Z===void 0)Z={};return{name:"size",options:Z,async fn(J){var $,Q;let{placement:X,rects:Y,platform:w,elements:z}=J,{apply:H=()=>{},...G}=X4(Z,J),W=await w.detectOverflow(J,G),q=C5(X),K=w4(X),B=q2(X)==="y",{width:V,height:F}=Y.floating,_,N;if(q==="top"||q==="bottom")_=q,N=K===(await(w.isRTL==null?void 0:w.isRTL(z.floating))?"start":"end")?"left":"right";else N=q,_=K==="end"?"top":"bottom";let L=F-W.top-W.bottom,M=V-W.left-W.right,A=$8(F-W[_],L),O=$8(V-W[N],M),D=!J.middlewareData.shift,k=A,b=O;if(($=J.middlewareData.shift)!=null&&$.enabled.x)b=M;if((Q=J.middlewareData.shift)!=null&&Q.enabled.y)k=L;if(D&&!K){let I=n5(W.left,0),d=n5(W.right,0),v=n5(W.top,0),C=n5(W.bottom,0);if(B)b=V-2*(I!==0||d!==0?I+d:n5(W.left,W.right));else k=F-2*(v!==0||C!==0?v+C:n5(W.top,W.bottom))}await H({...J,availableWidth:b,availableHeight:k});let h=await w.getDimensions(z.floating);if(V!==h.width||F!==h.height)return{reset:{rects:!0}};return{}}}};var mO=U(()=>{F6();F6();xO=new Set(["left","top"])});function dO(Z){let J=O5(Z),$=parseFloat(J.width)||0,Q=parseFloat(J.height)||0,X=w1(Z),Y=X?Z.offsetWidth:$,w=X?Z.offsetHeight:Q,z=Q8($)!==Y||Q8(Q)!==w;if(z)$=Y,Q=w;return{width:$,height:Q,$:z}}function Cq(Z){return!l0(Z)?Z.contextElement:Z}function l9(Z){let J=Cq(Z);if(!w1(J))return Q4(1);let $=J.getBoundingClientRect(),{width:Q,height:X,$:Y}=dO(J),w=(Y?Q8($.width):$.width)/Q,z=(Y?Q8($.height):$.height)/X;if(!w||!Number.isFinite(w))w=1;if(!z||!Number.isFinite(z))z=1;return{x:w,y:z}}function lO(Z){let J=k1(Z);if(!T9()||!J.visualViewport)return aa;return{x:J.visualViewport.offsetLeft,y:J.visualViewport.offsetTop}}function sa(Z,J,$){if(J===void 0)J=!1;if(!$||J&&$!==k1(Z))return!1;return J}function _7(Z,J,$,Q){if(J===void 0)J=!1;if($===void 0)$=!1;let X=Z.getBoundingClientRect(),Y=Cq(Z),w=Q4(1);if(J)if(Q){if(l0(Q))w=l9(Q)}else w=l9(Z);let z=sa(Y,$,Q)?lO(Y):Q4(0),H=(X.left+z.x)/w.x,G=(X.top+z.y)/w.y,W=X.width/w.x,q=X.height/w.y;if(Y){let K=k1(Y),B=Q&&l0(Q)?k1(Q):Q,V=K,F=oQ(V);while(F&&Q&&B!==V){let _=l9(F),N=F.getBoundingClientRect(),L=O5(F),M=N.left+(F.clientLeft+parseFloat(L.paddingLeft))*_.x,A=N.top+(F.clientTop+parseFloat(L.paddingTop))*_.y;H*=_.x,G*=_.y,W*=_.x,q*=_.y,H+=M,G+=A,V=k1(F),F=oQ(V)}}return q7({width:W,height:q,x:H,y:G})}function oX(Z,J){let $=CZ(Z).scrollLeft;if(!J)return _7(t2(Z)).left+$;return J.left+$}function rO(Z,J){let $=Z.getBoundingClientRect(),Q=$.left+J.scrollLeft-oX(Z,$),X=$.top+J.scrollTop;return{x:Q,y:X}}function oa(Z){let{elements:J,rect:$,offsetParent:Q,strategy:X}=Z,Y=X==="fixed",w=t2(Q),z=J?kZ(J.floating):!1;if(Q===w||z&&Y)return $;let H={scrollLeft:0,scrollTop:0},G=Q4(1),W=Q4(0),q=w1(Q);if(q||!q&&!Y){if(n2(Q)!=="body"||I4(w))H=CZ(Q);if(q){let B=_7(Q);G=l9(Q),W.x=B.x+Q.clientLeft,W.y=B.y+Q.clientTop}}let K=w&&!q&&!Y?rO(w,H):Q4(0);return{width:$.width*G.x,height:$.height*G.y,x:$.x*G.x-H.scrollLeft*G.x+W.x+K.x,y:$.y*G.y-H.scrollTop*G.y+W.y+K.y}}function na(Z){return Array.from(Z.getClientRects())}function ta(Z){let J=t2(Z),$=CZ(Z),Q=Z.ownerDocument.body,X=n5(J.scrollWidth,J.clientWidth,Q.scrollWidth,Q.clientWidth),Y=n5(J.scrollHeight,J.clientHeight,Q.scrollHeight,Q.clientHeight),w=-$.scrollLeft+oX(Z),z=-$.scrollTop;if(O5(Q).direction==="rtl")w+=n5(J.clientWidth,Q.clientWidth)-X;return{width:X,height:Y,x:w,y:z}}function ea(Z,J){let $=k1(Z),Q=t2(Z),X=$.visualViewport,Y=Q.clientWidth,w=Q.clientHeight,z=0,H=0;if(X){Y=X.width,w=X.height;let W=T9();if(!W||W&&J==="fixed")z=X.offsetLeft,H=X.offsetTop}let G=oX(Q);if(G<=0){let W=Q.ownerDocument,q=W.body,K=getComputedStyle(q),B=W.compatMode==="CSS1Compat"?parseFloat(K.marginLeft)+parseFloat(K.marginRight)||0:0,V=Math.abs(Q.clientWidth-q.clientWidth-B);if(V<=pO)Y-=V}else if(G<=pO)Y+=G;return{width:Y,height:w,x:z,y:H}}function Zs(Z,J){let $=_7(Z,!0,J==="fixed"),Q=$.top+Z.clientTop,X=$.left+Z.clientLeft,Y=w1(Z)?l9(Z):Q4(1),w=Z.clientWidth*Y.x,z=Z.clientHeight*Y.y,H=X*Y.x,G=Q*Y.y;return{width:w,height:z,x:H,y:G}}function uO(Z,J,$){let Q;if(J==="viewport")Q=ea(Z,$);else if(J==="document")Q=ta(t2(Z));else if(l0(J))Q=Zs(J,$);else{let X=lO(Z);Q={x:J.x-X.x,y:J.y-X.y,width:J.width,height:J.height}}return q7(Q)}function iO(Z,J){let $=_2(Z);if($===J||!l0($)||A2($))return!1;return O5($).position==="fixed"||iO($,J)}function Js(Z,J){let $=J.get(Z);if($)return $;let Q=L2(Z,[],!1).filter((z)=>l0(z)&&n2(z)!=="body"),X=null,Y=O5(Z).position==="fixed",w=Y?_2(Z):Z;while(l0(w)&&!A2(w)){let z=O5(w),H=sQ(w);if(!H&&z.position==="fixed")X=null;if(Y?!H&&!X:!H&&z.position==="static"&&!!X&&(X.position==="absolute"||X.position==="fixed")||I4(w)&&!H&&iO(Z,w))Q=Q.filter((W)=>W!==w);else X=z;w=_2(w)}return J.set(Z,Q),Q}function $s(Z){let{element:J,boundary:$,rootBoundary:Q,strategy:X}=Z,w=[...$==="clippingAncestors"?kZ(J)?[]:Js(J,this._c):[].concat($),Q],z=uO(J,w[0],X),H=z.top,G=z.right,W=z.bottom,q=z.left;for(let K=1;K<w.length;K++){let B=uO(J,w[K],X);H=n5(B.top,H),G=$8(B.right,G),W=$8(B.bottom,W),q=n5(B.left,q)}return{width:G-q,height:W-H,x:q,y:H}}function Qs(Z){let{width:J,height:$}=dO(Z);return{width:J,height:$}}function Xs(Z,J,$){let Q=w1(J),X=t2(J),Y=$==="fixed",w=_7(Z,!0,Y,J),z={scrollLeft:0,scrollTop:0},H=Q4(0);function G(){H.x=oX(X)}if(Q||!Q&&!Y){if(n2(J)!=="body"||I4(X))z=CZ(J);if(Q){let B=_7(J,!0,Y,J);H.x=B.x+J.clientLeft,H.y=B.y+J.clientTop}else if(X)G()}if(Y&&!Q&&X)G();let W=X&&!Q&&!Y?rO(X,z):Q4(0),q=w.left+z.scrollLeft-H.x-W.x,K=w.top+z.scrollTop-H.y-W.y;return{x:q,y:K,width:w.width,height:w.height}}function kq(Z){return O5(Z).position==="static"}function cO(Z,J){if(!w1(Z)||O5(Z).position==="fixed")return null;if(J)return J(Z);let $=Z.offsetParent;if(t2(Z)===$)$=$.ownerDocument.body;return $}function aO(Z,J){let $=k1(Z);if(kZ(Z))return $;if(!w1(Z)){let X=_2(Z);while(X&&!A2(X)){if(l0(X)&&!kq(X))return X;X=_2(X)}return $}let Q=cO(Z,J);while(Q&&QD(Q)&&kq(Q))Q=cO(Q,J);if(Q&&A2(Q)&&kq(Q)&&!sQ(Q))return $;return Q||XD(Z)||$}function Ys(Z){return O5(Z).direction==="rtl"}function sO(Z,J){return Z.x===J.x&&Z.y===J.y&&Z.width===J.width&&Z.height===J.height}function zs(Z,J){let $=null,Q,X=t2(Z);function Y(){var z;clearTimeout(Q),(z=$)==null||z.disconnect(),$=null}function w(z,H){if(z===void 0)z=!1;if(H===void 0)H=1;Y();let G=Z.getBoundingClientRect(),{left:W,top:q,width:K,height:B}=G;if(!z)J();if(!K||!B)return;let V=X8(q),F=X8(X.clientWidth-(W+K)),_=X8(X.clientHeight-(q+B)),N=X8(W),M={rootMargin:-V+"px "+-F+"px "+-_+"px "+-N+"px",threshold:n5(0,$8(1,H))||1},A=!0;function O(D){let k=D[0].intersectionRatio;if(k!==H){if(!A)return w();if(!k)Q=setTimeout(()=>{w(!1,0.0000001)},1000);else w(!1,k)}if(k===1&&!sO(G,Z.getBoundingClientRect()))w();A=!1}try{$=new IntersectionObserver(O,{...M,root:X.ownerDocument})}catch(D){$=new IntersectionObserver(O,M)}$.observe(Z)}return w(!0),Y}function zJ(Z,J,$,Q){if(Q===void 0)Q={};let{ancestorScroll:X=!0,ancestorResize:Y=!0,elementResize:w=typeof ResizeObserver==="function",layoutShift:z=typeof IntersectionObserver==="function",animationFrame:H=!1}=Q,G=Cq(Z),W=X||Y?[...G?L2(G):[],...J?L2(J):[]]:[];W.forEach((N)=>{X&&N.addEventListener("scroll",$,{passive:!0}),Y&&N.addEventListener("resize",$)});let q=G&&z?zs(G,$):null,K=-1,B=null;if(w){if(B=new ResizeObserver((N)=>{let[L]=N;if(L&&L.target===G&&B&&J)B.unobserve(J),cancelAnimationFrame(K),K=requestAnimationFrame(()=>{var M;(M=B)==null||M.observe(J)});$()}),G&&!H)B.observe(G);if(J)B.observe(J)}let V,F=H?_7(Z):null;if(H)_();function _(){let N=_7(Z);if(F&&!sO(F,N))$();F=N,V=requestAnimationFrame(_)}return $(),()=>{var N;if(W.forEach((L)=>{X&&L.removeEventListener("scroll",$),Y&&L.removeEventListener("resize",$)}),q==null||q(),(N=B)==null||N.disconnect(),B=null,H)cancelAnimationFrame(V)}}var aa,pO=25,ws=async function(Z){let J=this.getOffsetParent||aO,$=this.getDimensions,Q=await $(Z.floating);return{reference:Xs(Z.reference,await J(Z.floating),Z.strategy),floating:{x:0,y:0,width:Q.width,height:Q.height}}},Sq,oO,nO,tO,eO,Zj,Jj,nX=(Z,J,$)=>{let Q=new Map,X={platform:Sq,...$},Y={...X.platform,_c:Q};return EO(Z,J,{...X,platform:Y})};var Eq=U(()=>{mO();F6();a1();a1();aa=Q4(0);Sq={convertOffsetParentRelativeRectToViewportRelativeRect:oa,getDocumentElement:t2,getClippingRect:$s,getOffsetParent:aO,getElementRects:ws,getClientRects:na,getDimensions:Qs,getScale:l9,isElement:l0,isRTL:Ys};oO=yO,nO=vO,tO=hO,eO=fO,Zj=RO,Jj=gO});function eX(Z,J){if(Z===J)return!0;if(typeof Z!==typeof J)return!1;if(typeof Z==="function"&&Z.toString()===J.toString())return!0;let $,Q,X;if(Z&&J&&typeof Z==="object"){if(Array.isArray(Z)){if($=Z.length,$!==J.length)return!1;for(Q=$;Q--!==0;)if(!eX(Z[Q],J[Q]))return!1;return!0}if(X=Object.keys(Z),$=X.length,$!==Object.keys(J).length)return!1;for(Q=$;Q--!==0;)if(!{}.hasOwnProperty.call(J,X[Q]))return!1;for(Q=$;Q--!==0;){let Y=X[Q];if(Y==="_owner"&&Z.$$typeof)continue;if(!eX(Z[Y],J[Y]))return!1}return!0}return Z!==Z&&J!==J}function wj(Z){if(typeof window>"u")return 1;return(Z.ownerDocument.defaultView||window).devicePixelRatio||1}function $j(Z,J){let $=wj(Z);return Math.round(J*$)/$}function hq(Z){let J=z5.useRef(Z);return tX(()=>{J.current=Z}),J}function Yj(Z){if(Z===void 0)Z={};let{placement:J="bottom",strategy:$="absolute",middleware:Q=[],platform:X,elements:{reference:Y,floating:w}={},transform:z=!0,whileElementsMounted:H,open:G}=Z,[W,q]=z5.useState({x:0,y:0,strategy:$,placement:J,middlewareData:{},isPositioned:!1}),[K,B]=z5.useState(Q);if(!eX(K,Q))B(Q);let[V,F]=z5.useState(null),[_,N]=z5.useState(null),L=z5.useCallback((E)=>{if(E!==D.current)D.current=E,F(E)},[]),M=z5.useCallback((E)=>{if(E!==k.current)k.current=E,N(E)},[]),A=Y||V,O=w||_,D=z5.useRef(null),k=z5.useRef(null),b=z5.useRef(W),h=H!=null,I=hq(H),d=hq(X),v=hq(G),C=z5.useCallback(()=>{if(!D.current||!k.current)return;let E={placement:J,strategy:$,middleware:K};if(d.current)E.platform=d.current;nX(D.current,k.current,E).then((m)=>{let j={...m,isPositioned:v.current!==!1};if(y.current&&!eX(b.current,j))b.current=j,Xj.flushSync(()=>{q(j)})})},[K,J,$,d,v]);tX(()=>{if(G===!1&&b.current.isPositioned)b.current.isPositioned=!1,q((E)=>({...E,isPositioned:!1}))},[G]);let y=z5.useRef(!1);tX(()=>{return y.current=!0,()=>{y.current=!1}},[]),tX(()=>{if(A)D.current=A;if(O)k.current=O;if(A&&O){if(I.current)return I.current(A,O,C);C()}},[A,O,C,I,h]);let g=z5.useMemo(()=>({reference:D,floating:k,setReference:L,setFloating:M}),[L,M]),S=z5.useMemo(()=>({reference:A,floating:O}),[A,O]),x=z5.useMemo(()=>{let E={position:$,left:0,top:0};if(!S.floating)return E;let m=$j(S.floating,W.x),j=$j(S.floating,W.y);if(z)return{...E,transform:"translate("+m+"px, "+j+"px)",...wj(S.floating)>=1.5&&{willChange:"transform"}};return{position:$,left:m,top:j}},[$,z,S.floating,W.x,W.y]);return z5.useMemo(()=>({...W,update:C,refs:g,elements:S,floatingStyles:x}),[W,C,g,S,x])}var z5,Qj,Xj,Gs,Ws=function(){},tX,Rq=(Z,J)=>{let $=oO(Z);return{name:$.name,fn:$.fn,options:[Z,J]}},xq=(Z,J)=>{let $=nO(Z);return{name:$.name,fn:$.fn,options:[Z,J]}},yq=(Z,J)=>{return{fn:Jj(Z).fn,options:[Z,J]}},vq=(Z,J)=>{let $=tO(Z);return{name:$.name,fn:$.fn,options:[Z,J]}},gq=(Z,J)=>{let $=eO(Z);return{name:$.name,fn:$.fn,options:[Z,J]}},fq=(Z,J)=>{let $=Zj(Z);return{name:$.name,fn:$.fn,options:[Z,J]}};var HJ=U(()=>{Eq();Eq();z5=P(f(),1),Qj=P(f(),1),Xj=P(s2(),1),Gs=typeof document<"u",tX=Gs?Qj.useLayoutEffect:Ws});function Ks(Z){return{escapeKey:typeof Z==="boolean"?Z:Z?.escapeKey??!1,outsidePress:typeof Z==="boolean"?Z:Z?.outsidePress??!0}}function GJ(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,Q=$.useState("open"),X=$.useState("floatingElement"),Y=$.useState("referenceElement"),w=$.useState("domReferenceElement"),{onOpenChange:z,dataRef:H}=$.context,{enabled:G=!0,escapeKey:W=!0,outsidePress:q=!0,outsidePressEvent:K="sloppy",referencePress:B=!1,referencePressEvent:V="sloppy",ancestorScroll:F=!1,bubbles:_,externalTree:N}=J,L=g5(N),M=U0(typeof q==="function"?q:()=>!1),A=typeof q==="function"?M:q,O=g2.useRef(!1),{escapeKey:D,outsidePress:k}=Ks(_),b=g2.useRef(null),h=b5(),I=b5(),d=U0(()=>{I.clear(),H.current.insideReactTree=!1}),v=g2.useRef(!1),C=g2.useRef(""),y=U0((p)=>{C.current=p.pointerType}),g=U0(()=>{let p=C.current,o=p==="pen"||!p?"mouse":p,t=typeof K==="function"?K():K;if(typeof t==="string")return t;return t[o]}),S=U0((p)=>{if(!Q||!G||!W||p.key!=="Escape")return;if(v.current)return;let o=H.current.floatingContext?.nodeId,t=L?x4(L.nodesRef.current,o):[];if(!D){if(t.length>0){let J0=!0;if(t.forEach((r)=>{if(r.context?.open&&!r.context.dataRef.current.__escapeKeyBubbles)J0=!1}),!J0)return}}let N0=eM(p)?p.nativeEvent:p,a=P0(K0.escapeKey,N0);if($.setOpen(!1,a),!D&&!a.isPropagationAllowed)p.stopPropagation()}),x=U0((p)=>{let o=g();return o==="intentional"&&p.type!=="click"||o==="sloppy"&&p.type==="click"}),E=U0(()=>{H.current.insideReactTree=!0,I.start(0,d)}),m=U0((p,o=!1)=>{if(x(p)){d();return}if(H.current.insideReactTree){d();return}if(g()==="intentional"&&o)return;if(typeof A==="function"&&!A(p))return;let t=w5(p),N0=`[${D2("inert")}]`,a=f0($.select("floatingElement")).querySelectorAll(N0),J0=$.context.triggerElements;if(t&&(J0.hasElement(t)||J0.hasMatchingElement((L0)=>R0(L0,t))))return;let r=l0(t)?t:null;while(r&&!A2(r)){let L0=_2(r);if(A2(L0)||!l0(L0))break;r=L0}if(a.length&&l0(t)&&!nM(t)&&!R0(t,$.select("floatingElement"))&&Array.from(a).every((L0)=>!R0(r,L0)))return;if(w1(t)&&!("touches"in p)){let L0=A2(t),I0=O5(t),n0=/auto|scroll/,W1=L0||n0.test(I0.overflowX),R=L0||n0.test(I0.overflowY),u=W1&&t.clientWidth>0&&t.scrollWidth>t.clientWidth,e=R&&t.clientHeight>0&&t.scrollHeight>t.clientHeight,B0=I0.direction==="rtl",M0=e&&(B0?p.offsetX<=t.offsetWidth-t.clientWidth:p.offsetX>t.clientWidth),i0=u&&p.offsetY>t.clientHeight;if(M0||i0)return}let n=H.current.floatingContext?.nodeId,Q0=L&&x4(L.nodesRef.current,n).some((L0)=>v2(p,L0.context?.elements.floating));if(v2(p,$.select("floatingElement"))||v2(p,$.select("domReferenceElement"))||Q0)return;let i=L?x4(L.nodesRef.current,n):[];if(i.length>0){let L0=!0;if(i.forEach((I0)=>{if(I0.context?.open&&!I0.context.dataRef.current.__outsidePressBubbles)L0=!1}),!L0)return}$.setOpen(!1,P0(K0.outsidePress,p)),d()}),j=U0((p)=>{if(g()!=="sloppy"||p.pointerType==="touch"||!$.select("open")||!G||v2(p,$.select("floatingElement"))||v2(p,$.select("domReferenceElement")))return;m(p)}),H0=U0((p)=>{if(g()!=="sloppy"||!$.select("open")||!G||v2(p,$.select("floatingElement"))||v2(p,$.select("domReferenceElement")))return;let o=p.touches[0];if(o)b.current={startTime:Date.now(),startX:o.clientX,startY:o.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},h.start(1000,()=>{if(b.current)b.current.dismissOnTouchEnd=!1,b.current.dismissOnMouseDown=!1})}),w0=U0((p)=>{let o=w5(p);function t(){H0(p),o?.removeEventListener(p.type,t)}o?.addEventListener(p.type,t)}),T=U0((p)=>{let o=O.current;if(O.current=!1,h.clear(),p.type==="mousedown"&&b.current&&!b.current.dismissOnMouseDown)return;let t=w5(p);function N0(){if(p.type==="pointerdown")j(p);else m(p,o);t?.removeEventListener(p.type,N0)}t?.addEventListener(p.type,N0)}),$0=U0((p)=>{if(g()!=="sloppy"||!b.current||v2(p,$.select("floatingElement"))||v2(p,$.select("domReferenceElement")))return;let o=p.touches[0];if(!o)return;let t=Math.abs(o.clientX-b.current.startX),N0=Math.abs(o.clientY-b.current.startY),a=Math.sqrt(t*t+N0*N0);if(a>5)b.current.dismissOnTouchEnd=!0;if(a>10)m(p),h.clear(),b.current=null}),V0=U0((p)=>{let o=w5(p);function t(){$0(p),o?.removeEventListener(p.type,t)}o?.addEventListener(p.type,t)}),l=U0((p)=>{if(g()!=="sloppy"||!b.current||v2(p,$.select("floatingElement"))||v2(p,$.select("domReferenceElement")))return;if(b.current.dismissOnTouchEnd)m(p);h.clear(),b.current=null}),Z0=U0((p)=>{let o=w5(p);function t(){l(p),o?.removeEventListener(p.type,t)}o?.addEventListener(p.type,t)});g2.useEffect(()=>{if(!Q||!G)return;H.current.__escapeKeyBubbles=D,H.current.__outsidePressBubbles=k;let p=new s5;function o(r){$.setOpen(!1,P0(K0.none,r))}function t(){p.clear(),v.current=!0}function N0(){p.start(T9()?5:0,()=>{v.current=!1})}let a=f0(X);if(a.addEventListener("pointerdown",y,!0),W)a.addEventListener("keydown",S),a.addEventListener("compositionstart",t),a.addEventListener("compositionend",N0);if(A)a.addEventListener("click",T,!0),a.addEventListener("pointerdown",T,!0),a.addEventListener("touchstart",w0,!0),a.addEventListener("touchmove",V0,!0),a.addEventListener("touchend",Z0,!0),a.addEventListener("mousedown",T,!0);let J0=[];if(F){if(l0(w))J0=L2(w);if(l0(X))J0=J0.concat(L2(X));if(!l0(Y)&&Y&&Y.contextElement)J0=J0.concat(L2(Y.contextElement))}return J0=J0.filter((r)=>r!==a.defaultView?.visualViewport),J0.forEach((r)=>{r.addEventListener("scroll",o,{passive:!0})}),()=>{if(a.removeEventListener("pointerdown",y,!0),W)a.removeEventListener("keydown",S),a.removeEventListener("compositionstart",t),a.removeEventListener("compositionend",N0);if(A)a.removeEventListener("click",T,!0),a.removeEventListener("pointerdown",T,!0),a.removeEventListener("touchstart",w0,!0),a.removeEventListener("touchmove",V0,!0),a.removeEventListener("touchend",Z0,!0),a.removeEventListener("mousedown",T,!0);J0.forEach((r)=>{r.removeEventListener("scroll",o)}),p.clear(),O.current=!1}},[H,X,Y,w,W,A,Q,z,F,G,D,k,S,m,T,j,w0,V0,Z0,y,$]),g2.useEffect(d,[A,d]);let q0=g2.useMemo(()=>({onKeyDown:S,...B&&{[qs[V]]:(p)=>{$.setOpen(!1,P0(K0.triggerPress,p.nativeEvent))},...V!=="intentional"&&{onClick(p){$.setOpen(!1,P0(K0.triggerPress,p.nativeEvent))}}}}),[S,$,B,V]),s=U0((p)=>{let o=w5(p.nativeEvent);if(!R0($.select("floatingElement"),o)||p.button!==0)return;O.current=!0}),X0=U0((p)=>{if(!Q||!G||p.button!==0)return;O.current=!0}),z0=g2.useMemo(()=>({onKeyDown:S,onPointerDown:s,onMouseDown:s,onMouseUp:s,onClickCapture:E,onMouseDownCapture(p){E(),X0(p)},onPointerDownCapture(p){E(),X0(p)},onMouseUpCapture:E,onTouchEndCapture:E,onTouchMoveCapture:E}),[S,s,E,X0]);return g2.useMemo(()=>G?{reference:q0,floating:z0,trigger:q0}:{},[G,q0,z0])}var g2,qs;var zj=U(()=>{HJ();a1();x2();y1();W2();t5();z4();X5();C1();g2=P(f(),1),qs={intentional:"onClick",sloppy:"onPointerDown"}});function Bs(Z,J=`expected a function, instead received ${typeof Z}`){if(typeof Z!=="function")throw TypeError(J)}function Us(Z,J=`expected an object, instead received ${typeof Z}`){if(typeof Z!=="object")throw TypeError(J)}function Vs(Z,J="expected all items to be functions, instead received the following types: "){if(!Z.every(($)=>typeof $==="function")){let $=Z.map((Q)=>typeof Q==="function"?`function ${Q.name||"unnamed"}()`:typeof Q).join(", ");throw TypeError(`${J}[${$}]`)}}function Fs(Z){let J=Array.isArray(Z[0])?Z[0]:Z;return Vs(J,"createSelector expects all input-selectors to be functions, but received the following types: "),J}function Ns(Z,J){let $=[],{length:Q}=Z;for(let X=0;X<Q;X++)$.push(Z[X].apply(null,J));return $}function mq(Z,J){return Z===J}function pq(Z){if(!(Z instanceof qj))console.warn("Not a valid cell! ",Z);return Z.value}function Ls(Z,J=mq){return new qj(Z,J)}function $w(){return Ls(null,As)}function bs(Z){if(Array.isArray(Z))return new Os(Z);return new Ms(Z)}function Ps(Z){let J;return{get($){if(J&&Z(J.key,$))return J.value;return Jw},put($,Q){J={key:$,value:Q}},getEntries(){return J?[J]:[]},clear(){J=void 0}}}function Is(Z,J){let $=[];function Q(z){let H=$.findIndex((G)=>J(z,G.key));if(H>-1){let G=$[H];if(H>0)$.splice(H,1),$.unshift(G);return G.value}return Jw}function X(z,H){if(Q(z)===Jw){if($.unshift({key:z,value:H}),$.length>Z)$.pop()}}function Y(){return $}function w(){$=[]}return{get:Q,put:X,getEntries:Y,clear:w}}function ks(Z){return function($,Q){if($===null||Q===null||$.length!==Q.length)return!1;let{length:X}=$;for(let Y=0;Y<X;Y++)if(!Z($[Y],Q[Y]))return!1;return!0}}function Uj(Z,J){let $=typeof J==="object"?J:{equalityCheck:J},{equalityCheck:Q=Ts,maxSize:X=1,resultEqualityCheck:Y}=$,w=ks(Q),z=0,H=X<=1?Ps(w):Is(X,w);function G(){let W=H.get(arguments);if(W===Jw){if(W=Z.apply(null,arguments),z++,Y){let K=H.getEntries().find((B)=>Y(B.value,W));if(K)W=K.value,z!==0&&z--}H.put(arguments,W)}return W}return G.clearCache=()=>{H.clear(),G.resetResultsCount()},G.resultsCount=()=>z,G.resetResultsCount=()=>{z=0},G}function Zw(){return{s:Es,v:void 0,o:null,p:null}}function Vj(Z,J={}){let $=Zw(),{resultEqualityCheck:Q}=J,X,Y=0;function w(){let z=$,{length:H}=arguments;for(let q=0,K=H;q<K;q++){let B=arguments[q];if(typeof B==="function"||typeof B==="object"&&B!==null){let V=z.o;if(V===null)z.o=V=new WeakMap;let F=V.get(B);if(F===void 0)z=Zw(),V.set(B,z);else z=F}else{let V=z.p;if(V===null)z.p=V=new Map;let F=V.get(B);if(F===void 0)z=Zw(),V.set(B,z);else z=F}}let G=z,W;if(z.s===Wj)W=z.v;else if(W=Z.apply(null,arguments),Y++,Q){let q=X?.deref?.()??X;if(q!=null&&Q(q,W))W=q,Y!==0&&Y--;X=typeof W==="object"&&W!==null||typeof W==="function"?new Ss(W):W}return G.s=Wj,G.v=W,W}return w.clearCache=()=>{$=Zw(),w.resetResultsCount()},w.resultsCount=()=>Y,w.resetResultsCount=()=>{Y=0},w}function uq(Z,...J){let $=typeof Z==="function"?{memoize:Z,memoizeOptions:J}:Z,Q=(...X)=>{let Y=0,w=0,z,H={},G=X.pop();if(typeof G==="object")H=G,G=X.pop();Bs(G,`createSelector expects an output function after the inputs, but received: [${typeof G}]`);let W={...$,...H},{memoize:q,memoizeOptions:K=[],argsMemoize:B=Vj,argsMemoizeOptions:V=[],devModeChecks:F={}}=W,_=Hj(K),N=Hj(V),L=Fs(X),M=q(function(){return Y++,G.apply(null,arguments)},..._),A=!0,O=B(function(){w++;let k=Ns(L,arguments);return z=M.apply(null,k),z},...N);return Object.assign(O,{resultFunc:G,memoizedResultFunc:M,dependencies:L,dependencyRecomputations:()=>w,resetDependencyRecomputations:()=>{w=0},lastResult:()=>z,recomputations:()=>Y,resetRecomputations:()=>{Y=0},memoize:q,argsMemoize:B})};return Object.assign(Q,{withTypes:()=>Q}),Q}var Jw,Hj=(Z)=>{return Array.isArray(Z)?Z:[Z]},Gj=0,_s=null,qj=class{revision=Gj;_value;_lastValue;_isEqual=mq;constructor(Z,J=mq){this._value=this._lastValue=Z,this._isEqual=J}get value(){return _s?.add(this),this._value}set value(Z){if(this.value===Z)return;this._value=Z,this.revision=++Gj}},As=(Z,J)=>!1,Kj=(Z)=>{let J=Z.collectionTag;if(J===null)J=Z.collectionTag=$w();pq(J)},Gc2,Bj=0,Ds,Ms=class{constructor(Z){this.value=Z,this.value=Z,this.tag.value=Z}proxy=new Proxy(this,WJ);tag=$w();tags={};children={};collectionTag=null;id=Bj++},WJ,Os=class{constructor(Z){this.value=Z,this.value=Z,this.tag.value=Z}proxy=new Proxy([this],js);tag=$w();tags={};children={};collectionTag=null;id=Bj++},js,Ts=(Z,J)=>Z===J,Cs=class{constructor(Z){this.value=Z}deref(){return this.value}},Ss,Es=0,Wj=1,hs,Rs;var Fj=U(()=>{Jw=Symbol("NOT_FOUND");Gc2=Symbol(),Ds=Object.getPrototypeOf({}),WJ={get(Z,J){function $(){let{value:X}=Z,Y=Reflect.get(X,J);if(typeof J==="symbol")return Y;if(J in Ds)return Y;if(typeof Y==="object"&&Y!==null){let w=Z.children[J];if(w===void 0)w=Z.children[J]=bs(Y);if(w.tag)pq(w.tag);return w.proxy}else{let w=Z.tags[J];if(w===void 0)w=Z.tags[J]=$w(),w.value=Y;return pq(w),Y}}return $()},ownKeys(Z){return Kj(Z),Reflect.ownKeys(Z.value)},getOwnPropertyDescriptor(Z,J){return Reflect.getOwnPropertyDescriptor(Z.value,J)},has(Z,J){return Reflect.has(Z.value,J)}},js={get([Z],J){if(J==="length")Kj(Z);return WJ.get(Z,J)},ownKeys([Z]){return WJ.ownKeys(Z)},getOwnPropertyDescriptor([Z],J){return WJ.getOwnPropertyDescriptor(Z,J)},has([Z],J){return WJ.has(Z,J)}};Ss=typeof WeakRef<"u"?WeakRef:Cs;hs=uq(Vj),Rs=Object.assign((Z,J=hs)=>{Us(Z,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof Z}`);let $=Object.keys(Z),Q=$.map((Y)=>Z[Y]);return J(Q,(...Y)=>{return Y.reduce((w,z,H)=>{return w[$[H]]=z,w},{})})},{withTypes:()=>Rs})});var Nc2,E0=(Z,J,$,Q,X,Y,...w)=>{if(w.length>0)throw Error(g0(1));let z;if(Z&&J&&$&&Q&&X&&Y)z=(H,G,W,q)=>{let K=Z(H,G,W,q),B=J(H,G,W,q),V=$(H,G,W,q),F=Q(H,G,W,q),_=X(H,G,W,q);return Y(K,B,V,F,_,G,W,q)};else if(Z&&J&&$&&Q&&X)z=(H,G,W,q)=>{let K=Z(H,G,W,q),B=J(H,G,W,q),V=$(H,G,W,q),F=Q(H,G,W,q);return X(K,B,V,F,G,W,q)};else if(Z&&J&&$&&Q)z=(H,G,W,q)=>{let K=Z(H,G,W,q),B=J(H,G,W,q),V=$(H,G,W,q);return Q(K,B,V,G,W,q)};else if(Z&&J&&$)z=(H,G,W,q)=>{let K=Z(H,G,W,q),B=J(H,G,W,q);return $(K,B,G,W,q)};else if(Z&&J)z=(H,G,W,q)=>{let K=Z(H,G,W,q);return J(K,G,W,q)};else if(Z)z=Z;else throw Error("Missing arguments");return z};var Nj=U(()=>{Fj();Nc2=uq({memoize:Uj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}})});function ys(Z,J){return Z===J&&(Z!==0||1/Z===1/J)||Z!==Z&&J!==J}var H8,xs,vs,gs,fs,ms,ps,us,cq=function(Z,J,$,Q,X){var Y=fs(null);if(Y.current===null){var w={hasValue:!1,value:null};Y.current=w}else w=Y.current;Y=ps(function(){function H(B){if(!G){if(G=!0,W=B,B=Q(B),X!==void 0&&w.hasValue){var V=w.value;if(X(V,B))return q=V}return q=B}if(V=q,vs(W,B))return V;var F=Q(B);if(X!==void 0&&X(V,F))return W=B,V;return W=B,q=F}var G=!1,W,q,K=$===void 0?null:$;return[function(){return H(J())},K===null?void 0:function(){return H(K())}]},[J,$,Q,X]);var z=gs(Z,Y[0],Y[1]);return ms(function(){w.hasValue=!0,w.value=z},[z]),us(z),z};var _j=U(()=>{H8=P(f(),1),xs=hQ();vs=typeof Object.is==="function"?Object.is:ys,gs=xs.useSyncExternalStore,fs=H8.useRef,ms=H8.useEffect,ps=H8.useMemo,us=H8.useDebugValue});function Aj(){return lq}function Dj(Z){dq.push(Z)}function rq(Z){let J=($,Q)=>{let X=D1(cs).current,Y;try{lq=X;for(let w of dq)w.before(X);Y=Z($,Q);for(let w of dq)w.after(X);X.didInitialize=!0}finally{lq=void 0}return Y};return J.displayName=Z.displayName||Z.name,J}function Mj(Z){return Lj.forwardRef(rq(Z))}function cs(){return{didInitialize:!1}}var Lj,dq,lq=void 0;var Qw=U(()=>{Y2();Lj=P(f(),1),dq=[]});function Xw(Z,J,$,Q,X){return ls(Z,J,$,Q,X)}function rs(Z,J,$,Q,X){let Y=Oj.useCallback(()=>J(Z.getSnapshot(),$,Q,X),[Z,J,$,Q,X]);return iq.useSyncExternalStore(Z.subscribe,Y,Y)}function is(Z,J,$,Q,X){let Y=Aj();if(!Y)return rs(Z,J,$,Q,X);let w=Y.syncIndex;Y.syncIndex+=1;let z;if(!Y.didInitialize)z={store:Z,selector:J,a1:$,a2:Q,a3:X,value:J(Z.getSnapshot(),$,Q,X),didChange:!1},Y.syncHooks.push(z);else if(z=Y.syncHooks[w],z.store!==Z||z.selector!==J||!Object.is(z.a1,$)||!Object.is(z.a2,Q)||!Object.is(z.a3,X)){if(z.store!==Z)Y.didChangeStore=!0;z.store=Z,z.selector=J,z.a1=$,z.a2=Q,z.a3=X,z.didChange=!0}return z.value}function as(Z,J,$,Q,X){return cq(Z.subscribe,Z.getSnapshot,Z.getSnapshot,(Y)=>J(Y,$,Q,X))}var Oj,iq,ds,ls;var ww=U(()=>{_j();ZX();Qw();Oj=P(f(),1),iq=P(hQ(),1),ds=S9(19),ls=ds?is:as;Dj({before(Z){if(Z.syncIndex=0,!Z.didInitialize)Z.syncTick=1,Z.syncHooks=[],Z.didChangeStore=!0,Z.getSnapshot=()=>{let J=!1;for(let $=0;$<Z.syncHooks.length;$+=1){let Q=Z.syncHooks[$],X=Q.selector(Q.store.state,Q.a1,Q.a2,Q.a3);if(Q.didChange||!Object.is(Q.value,X))J=!0,Q.value=X,Q.didChange=!1}if(J)Z.syncTick+=1;return Z.syncTick}},after(Z){if(Z.syncHooks.length>0){if(Z.didChangeStore)Z.didChangeStore=!1,Z.subscribe=(J)=>{let $=new Set;for(let X of Z.syncHooks)$.add(X.store);let Q=[];for(let X of $)Q.push(X.subscribe(J));return()=>{for(let X of Q)X()}};iq.useSyncExternalStore(Z.subscribe,Z.getSnapshot,Z.getSnapshot)}}})});class aq{constructor(Z){this.state=Z,this.listeners=new Set,this.updateTick=0}subscribe=(Z)=>{return this.listeners.add(Z),()=>{this.listeners.delete(Z)}};getSnapshot=()=>{return this.state};setState(Z){if(this.state===Z)return;this.state=Z,this.updateTick+=1;let J=this.updateTick;for(let $ of this.listeners){if(J!==this.updateTick)return;$(Z)}}update(Z){for(let J in Z)if(!Object.is(this.state[J],Z[J])){this.setState({...this.state,...Z});return}}set(Z,J){if(!Object.is(this.state[Z],J))this.setState({...this.state,[Z]:J})}notifyAll(){let Z={...this.state};this.setState(Z)}use(Z,J,$,Q){return Xw(this,Z,J,$,Q)}}var sq=U(()=>{ww()});var L7,A7;var jj=U(()=>{sq();ww();y1();M1();p6();L7=P(f(),1);A7=class A7 extends aq{constructor(Z,J={},$){super(Z);this.context=J,this.selectors=$}useSyncedValue(Z,J){L7.useDebugValue(Z),F0(()=>{if(this.state[Z]!==J)this.set(Z,J)},[Z,J])}useSyncedValueWithCleanup(Z,J){let $=this;F0(()=>{if($.state[Z]!==J)$.set(Z,J);return()=>{$.set(Z,void 0)}},[$,Z,J])}useSyncedValues(Z){let J=this,$=Object.values(Z);F0(()=>{J.update(Z)},[J,...$])}useControlledProp(Z,J){L7.useDebugValue(Z);let $=J!==void 0;F0(()=>{if($&&!Object.is(this.state[Z],J))super.setState({...this.state,[Z]:J})},[Z,J,$])}select(Z,J,$,Q){let X=this.selectors[Z];return X(this.state,J,$,Q)}useState(Z,J,$,Q){return L7.useDebugValue(Z),Xw(this,this.selectors[Z],J,$,Q)}useContextCallback(Z,J){L7.useDebugValue(Z);let $=U0(J??Z4);this.context[Z]=$}useStateSetter(Z){let J=L7.useRef(void 0);if(J.current===void 0)J.current=($)=>{this.set(Z,$)};return J.current}observe(Z,J){let $;if(typeof Z==="function")$=Z;else $=this.selectors[Z];let Q=$(this.state);return J(Q,Q,this),this.subscribe((X)=>{let Y=$(X);if(!Object.is(Q,Y)){let w=Q;Q=Y,J(Y,w,this)}})}}});var oq,ss,bj;var Pj=U(()=>{oq=P(f(),1),ss=P(s2(),1),bj=P(G0(),1)});var qJ=U(()=>{Nj();ww();sq();jj();Pj()});var os,D7;var Yw=U(()=>{qJ();t5();os={open:E0((Z)=>Z.open),domReferenceElement:E0((Z)=>Z.domReferenceElement),referenceElement:E0((Z)=>Z.positionReference??Z.referenceElement),floatingElement:E0((Z)=>Z.floatingElement),floatingId:E0((Z)=>Z.floatingId)};D7=class D7 extends A7{constructor(Z){let{nested:J,noEmit:$,onOpenChange:Q,triggerElements:X,...Y}=Z;super({...Y,positionReference:Y.referenceElement,domReferenceElement:Y.referenceElement},{onOpenChange:Q,dataRef:{current:{}},events:aX(),nested:J,noEmit:$,triggerElements:X},os)}setOpen=(Z,J)=>{if(!Z||!this.state.open||vX(J.event))this.context.dataRef.current.openEvent=Z?J.event:void 0;if(!this.context.noEmit){let $={open:Z,reason:J.reason,nativeEvent:J.event,nested:this.context.nested,triggerElement:J.trigger};this.context.events.emit("openchange",$)}this.context.onOpenChange?.(Z,J)}}});function nq(Z,J){let $=KJ.useRef(null),Q=KJ.useRef(null);return KJ.useCallback((X)=>{if(Z===void 0)return;if($.current!==null){let Y=$.current,w=Q.current,z=J.context.triggerElements.getById(Y);if(w&&z===w)J.context.triggerElements.delete(Y);$.current=null,Q.current=null}if(X!==null)$.current=Z,Q.current=X,J.context.triggerElements.add(Z,X)},[J,Z])}function zw(Z,J,$,Q){let X=$.useState("isMountedByTrigger",Z),Y=nq(Z,$),w=U0((z)=>{if(Y(z),!z||!$.select("open"))return;let H=$.select("activeTriggerId");if(H===Z){$.update({activeTriggerElement:z,...Q});return}if(H==null)$.update({activeTriggerId:Z,activeTriggerElement:z,...Q})});return F0(()=>{if(X)$.update({activeTriggerElement:J.current,...Q})},[X,$,J,...Object.values(Q)]),{registerTrigger:w,isMountedByThisTrigger:X}}function Hw(Z){let J=Z.useState("open");F0(()=>{if(J&&!Z.select("activeTriggerId")&&Z.context.triggerElements.size===1){let $=Z.context.triggerElements.entries().next();if(!$.done){let[Q,X]=$.value;Z.update({activeTriggerId:Q,activeTriggerElement:X})}}},[J,Z])}function Gw(Z,J,$){let{mounted:Q,setMounted:X,transitionStatus:Y}=y9(Z);J.useSyncedValues({mounted:Q,transitionStatus:Y});let w=U0(()=>{X(!1),J.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),$?.(),J.context.onOpenChangeComplete?.(!1)}),z=J.useState("preventUnmountingOnClose");return E4({enabled:!z,open:Z,ref:J.context.popupRef,onComplete(){if(!Z)w()}}),{forceUnmount:w,transitionStatus:Y}}var KJ;var Ij=U(()=>{y1();M1();LX();v9();KJ=P(f(),1)});class N6{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(Z,J){let $=this.idMap.get(Z);if($===J)return;if($!==void 0)this.elementsSet.delete($);this.elementsSet.add(J),this.idMap.set(Z,J)}delete(Z){let J=this.idMap.get(Z);if(J)this.elementsSet.delete(J),this.idMap.delete(Z)}hasElement(Z){return this.elementsSet.has(Z)}hasMatchingElement(Z){for(let J of this.elementsSet)if(Z(J))return!0;return!1}getById(Z){return this.idMap.get(Z)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Tj(){return new D7({open:!1,floatingElement:null,referenceElement:null,triggerElements:new N6,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}var kj=U(()=>{v4();Yw()});function qw(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:Tj(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:q1,inactiveTriggerProps:q1,popupProps:q1}}var Ww,Kw;var Cj=U(()=>{qJ();kj();j5();Ww=E0((Z)=>Z.triggerIdProp??Z.activeTriggerId),Kw={open:E0((Z)=>Z.openProp??Z.open),mounted:E0((Z)=>Z.mounted),transitionStatus:E0((Z)=>Z.transitionStatus),floatingRootContext:E0((Z)=>Z.floatingRootContext),preventUnmountingOnClose:E0((Z)=>Z.preventUnmountingOnClose),payload:E0((Z)=>Z.payload),activeTriggerId:Ww,activeTriggerElement:E0((Z)=>Z.mounted?Z.activeTriggerElement:null),isTriggerActive:E0((Z,J)=>J!==void 0&&Ww(Z)===J),isOpenedByTrigger:E0((Z,J)=>J!==void 0&&Ww(Z)===J&&Z.open),isMountedByTrigger:E0((Z,J)=>J!==void 0&&Ww(Z)===J&&Z.mounted),triggerProps:E0((Z,J)=>J?Z.activeTriggerProps:Z.inactiveTriggerProps),popupProps:E0((Z)=>Z.popupProps),popupElement:E0((Z)=>Z.popupElement),positionerElement:E0((Z)=>Z.positionerElement)}});var v4=U(()=>{Ij();Cj()});function Sj(Z){let{open:J=!1,onOpenChange:$,elements:Q={}}=Z,X=G2(),Y=U5()!=null,w=D1(()=>new D7({open:J,onOpenChange:$,referenceElement:Q.reference??null,floatingElement:Q.floating??null,triggerElements:new N6,floatingId:X,nested:Y,noEmit:!1})).current;return F0(()=>{let z={open:J,floatingId:X};if(Q.reference!==void 0)z.referenceElement=Q.reference,z.domReferenceElement=l0(Q.reference)?Q.reference:null;if(Q.floating!==void 0)z.floatingElement=Q.floating;w.update(z)},[J,X,Q.reference,Q.floating,w]),w.context.onOpenChange=$,w.context.nested=Y,w.context.noEmit=!1,w}var Ej=U(()=>{a1();s6();Y2();M1();z4();Yw();v4()});function tq(Z={}){let{nodeId:J,externalTree:$}=Z,Q=Sj(Z),X=Z.rootContext||Q,Y={reference:X.useState("referenceElement"),floating:X.useState("floatingElement"),domReference:X.useState("domReferenceElement")},[w,z]=e5.useState(null),H=e5.useRef(null),G=g5($);F0(()=>{if(Y.domReference)H.current=Y.domReference},[Y.domReference]);let W=Yj({...Z,elements:{...Y,...w&&{reference:w}}}),q=e5.useCallback((k)=>{let b=l0(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;z(b),W.refs.setReference(b)},[W.refs]),[K,B]=e5.useState(null),[V,F]=e5.useState(null);X.useSyncedValue("referenceElement",K),X.useSyncedValue("domReferenceElement",l0(K)?K:null),X.useSyncedValue("floatingElement",V);let _=e5.useCallback((k)=>{if(l0(k)||k===null)H.current=k,B(k);if(l0(W.refs.reference.current)||W.refs.reference.current===null||k!==null&&!l0(k))W.refs.setReference(k)},[W.refs,B]),N=e5.useCallback((k)=>{F(k),W.refs.setFloating(k)},[W.refs]),L=e5.useMemo(()=>({...W.refs,setReference:_,setFloating:N,setPositionReference:q,domReference:H}),[W.refs,_,N,q]),M=e5.useMemo(()=>({...W.elements,domReference:Y.domReference}),[W.elements,Y.domReference]),A=X.useState("open"),O=X.useState("floatingId"),D=e5.useMemo(()=>({...W,dataRef:X.context.dataRef,open:A,onOpenChange:X.setOpen,events:X.context.events,floatingId:O,refs:L,elements:M,nodeId:J,rootStore:X}),[W,L,M,J,X,A,O]);return F0(()=>{X.context.dataRef.current.floatingContext=D;let k=G?.nodesRef.current.find((b)=>b.id===J);if(k)k.context=D}),e5.useMemo(()=>({...W,context:D,refs:L,elements:M,rootStore:X}),[W,L,M,D,X])}var e5;var hj=U(()=>{HJ();a1();M1();z4();Ej();e5=P(f(),1)});function BJ(Z){let{popupStore:J,noEmit:$=!1,treatPopupAsFloatingElement:Q=!1,onOpenChange:X}=Z,Y=G2(),w=U5()!=null,z=J.useState("open"),H=J.useState("activeTriggerElement"),G=J.useState(Q?"popupElement":"positionerElement"),W=J.context.triggerElements,q=D1(()=>new D7({open:z,referenceElement:H,floatingElement:G,triggerElements:W,onOpenChange:X,floatingId:Y,nested:w,noEmit:$})).current;return F0(()=>{let K={open:z,floatingId:Y,referenceElement:H,floatingElement:G};if(l0(H))K.domReferenceElement=H;if(q.state.positionReference===q.state.referenceElement)K.positionReference=H;q.update(K)},[z,Y,H,G,q]),q.context.onOpenChange=X,q.context.nested=w,q.context.noEmit=$,q}var Rj=U(()=>{s6();Y2();M1();a1();z4();Yw()});function ZK(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,{events:Q,dataRef:X}=$.context,{enabled:Y=!0,delay:w}=J,z=g4.useRef(!1),H=g4.useRef(null),G=b5(),W=g4.useRef(!0);g4.useEffect(()=>{let K=$.select("domReferenceElement");if(!Y)return;let B=k1(K);function V(){let N=$.select("domReferenceElement");if(!$.select("open")&&w1(N)&&N===o5(f0(N)))z.current=!0}function F(){W.current=!0}function _(){W.current=!1}if(B.addEventListener("blur",V),eq)B.addEventListener("keydown",F,!0),B.addEventListener("pointerdown",_,!0);return()=>{if(B.removeEventListener("blur",V),eq)B.removeEventListener("keydown",F,!0),B.removeEventListener("pointerdown",_,!0)}},[$,Y]),g4.useEffect(()=>{if(!Y)return;function K(B){if(B.reason===K0.triggerPress||B.reason===K0.escapeKey){let V=$.select("domReferenceElement");if(l0(V))H.current=V,z.current=!0}}return Q.on("openchange",K),()=>{Q.off("openchange",K)}},[Q,Y,$]);let q=g4.useMemo(()=>({onMouseLeave(){z.current=!1,H.current=null},onFocus(K){let B=K.currentTarget;if(z.current){if(H.current===B)return;z.current=!1,H.current=null}let V=w5(K.nativeEvent);if(l0(V)){if(eq&&!K.relatedTarget){if(!W.current&&!G7(V))return}else if(!tM(V))return}let F=H7(K.relatedTarget,$.context.triggerElements),{nativeEvent:_,currentTarget:N}=K,L=typeof w==="function"?w():w;if($.select("open")&&F||L===0||L===void 0){$.setOpen(!0,P0(K0.triggerFocus,_,N));return}G.start(L,()=>{if(z.current)return;$.setOpen(!0,P0(K0.triggerFocus,_,N))})},onBlur(K){z.current=!1,H.current=null;let{relatedTarget:B,nativeEvent:V}=K,F=l0(B)&&B.hasAttribute(D2("focus-guard"))&&B.getAttribute("data-type")==="outside";G.start(0,()=>{let _=$.select("domReferenceElement"),N=o5(_?_.ownerDocument:document);if(!B&&N===_)return;if(R0(X.current.floatingContext?.refs.floating.current,N)||R0(_,N)||F)return;if(H7(B??N,$.context.triggerElements))return;$.setOpen(!1,P0(K0.triggerFocus,V))})}}),[X,$,G,w]);return g4.useMemo(()=>Y?{reference:q,trigger:q}:{},[Y,q])}var g4,eq;var xj=U(()=>{a1();J8();x2();W2();t5();X5();C1();g4=P(f(),1),eq=sM&&CX});function yj(Z){return Z?Boolean(Z.closest(ns)):!1}class JK{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new s5,this.restTimeout=new s5,this.handleCloseOptions=void 0}static create(){return new JK}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>{return this.dispose}}function Bw(Z){let J=D1(JK.create).current,$=Z.context.dataRef.current;if(!$.hoverInteractionState)$.hoverInteractionState=J;return n6($.hoverInteractionState.disposeEffect),$.hoverInteractionState}var UJ,ns;var $K=U(()=>{uZ();Y2();x2();UJ=D2("safe-polygon"),ns=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${p9}`});function VJ(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,Q=$.useState("open"),X=$.useState("floatingElement"),Y=$.useState("domReferenceElement"),{dataRef:w}=$.context,{enabled:z=!0,closeDelay:H=0}=J,G=Bw($),W=g5(),q=U5(),K=U0(()=>{if(G.interactedInside)return!0;return w.current.openEvent?ts.has(w.current.openEvent.type):!1}),B=U0(()=>{let M=w.current.openEvent?.type;return M?.includes("mouse")&&M!=="mousedown"}),V=U0((M)=>{return H7(M,$.context.triggerElements)}),F=r9.useCallback((M,A=!0)=>{let O=es(H,G.pointerType);if(O&&!G.handler)G.openChangeTimeout.start(O,()=>$.setOpen(!1,P0(K0.triggerHover,M)));else if(A)G.openChangeTimeout.clear(),$.setOpen(!1,P0(K0.triggerHover,M))},[H,$,G]),_=U0(()=>{G.unbindMouseMove(),G.handler=void 0}),N=U0(()=>{if(G.performedPointerEventsMutation){let M=f0(X).body;M.style.pointerEvents="",M.removeAttribute(UJ),G.performedPointerEventsMutation=!1}}),L=U0((M)=>{let A=w5(M);if(!yj(A)){G.interactedInside=!1;return}G.interactedInside=!0});F0(()=>{if(!Q)G.pointerType=void 0,G.restTimeoutPending=!1,G.interactedInside=!1,_(),N()},[Q,G,_,N]),r9.useEffect(()=>{return()=>{_()}},[_]),r9.useEffect(()=>{return N},[N]),F0(()=>{if(!z)return;if(Q&&G.handleCloseOptions?.blockPointerEvents&&B()&&l0(Y)&&X){G.performedPointerEventsMutation=!0;let M=f0(X).body;M.setAttribute(UJ,"");let A=Y,O=X,D=W?.nodesRef.current.find((k)=>k.id===q)?.context?.elements.floating;if(D)D.style.pointerEvents="";return M.style.pointerEvents="none",A.style.pointerEvents="auto",O.style.pointerEvents="auto",()=>{M.style.pointerEvents="",A.style.pointerEvents="",O.style.pointerEvents=""}}return},[z,Q,Y,X,G,B,W,q]),r9.useEffect(()=>{if(!z)return;function M(k){if(K()||!w.current.floatingContext||!$.select("open"))return;if(V(k.relatedTarget))return;if(N(),_(),!K())F(k)}function A(k){G.openChangeTimeout.clear(),N(),G.handler?.(k),_()}function O(k){if(!K())F(k,!1)}let D=X;if(D)D.addEventListener("mouseleave",M),D.addEventListener("mouseenter",A),D.addEventListener("mouseleave",O),D.addEventListener("pointerdown",L,!0);return()=>{if(D)D.removeEventListener("mouseleave",M),D.removeEventListener("mouseenter",A),D.removeEventListener("mouseleave",O),D.removeEventListener("pointerdown",L,!0)}},[z,X,$,w,K,V,F,N,_,L,G])}function es(Z,J){if(J&&!y4(J))return 0;if(typeof Z==="function")return Z();return Z}var r9,ts;var vj=U(()=>{a1();y1();M1();W2();t5();X5();C1();z4();$K();r9=P(f(),1),ts=new Set(["click","mousedown"])});function Vw(Z,J,$){if($&&!y4($))return 0;if(typeof Z==="number")return Z;if(typeof Z==="function"){let Q=Z();if(typeof Q==="number")return Q;return Q?.[J]}return Z?.[J]}var Uw,Ql2,Xl2;var gj=U(()=>{t5();Uw=P(f(),1),Ql2=D2("safe-polygon"),Xl2=`button,[role="button"],select,[tabindex]:not([tabindex="-1"]),${p9}`});function QK(Z){if(typeof Z==="function")return Z();return Z}function O7(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,{dataRef:Q,events:X}=$.context,{enabled:Y=!0,delay:w=0,handleClose:z=null,mouseOnly:H=!1,restMs:G=0,move:W=!0,triggerElementRef:q=Zo,externalTree:K,isActiveTrigger:B=!0}=J,V=g5(K),F=Bw($),_=B5(z),N=B5(w),L=B5(G),M=B5(Y);if(B)F.handleCloseOptions=_.current?.__options;let A=U0(()=>{if(F.interactedInside)return!0;return Q.current.openEvent?["click","mousedown"].includes(Q.current.openEvent.type):!1}),O=U0((I)=>{return H7(I,$.context.triggerElements)}),D=M7.useCallback((I,d=!0)=>{let v=Vw(N.current,"close",F.pointerType);if(v&&!F.handler)F.openChangeTimeout.start(v,()=>$.setOpen(!1,P0(K0.triggerHover,I)));else if(d)F.openChangeTimeout.clear(),$.setOpen(!1,P0(K0.triggerHover,I))},[N,$,F]),k=U0(()=>{F.unbindMouseMove(),F.handler=void 0}),b=U0(()=>{if(F.performedPointerEventsMutation){let I=f0($.select("domReferenceElement")).body;I.style.pointerEvents="",I.removeAttribute(UJ),F.performedPointerEventsMutation=!1}});M7.useEffect(()=>{if(!Y)return;function I(d){if(!d.open)F.openChangeTimeout.clear(),F.restTimeout.clear(),F.blockMouseMove=!0,F.restTimeoutPending=!1}return X.on("openchange",I),()=>{X.off("openchange",I)}},[Y,X,F]);let h=U0((I)=>{if(A())return;if(!Q.current.floatingContext)return;if(O(I.relatedTarget))return;let d=q.current;_.current?.({...Q.current.floatingContext,tree:V,x:I.clientX,y:I.clientY,onClose(){if(b(),k(),!A()&&d===$.select("domReferenceElement"))D(I)}})(I)});return M7.useEffect(()=>{if(!Y)return;let I=q.current??(B?$.select("domReferenceElement"):null);if(!l0(I))return;function d(y){if(F.openChangeTimeout.clear(),F.blockMouseMove=!1,H&&!y4(F.pointerType))return;if(QK(L.current)>0&&!Vw(N.current,"open"))return;let g=Vw(N.current,"open",F.pointerType),S=$.select("domReferenceElement"),x=$.context.triggerElements,E=(x.hasElement(y.target)||x.hasMatchingElement((w0)=>R0(w0,y.target)))&&(!S||!R0(S,y.target)),m=y.currentTarget??null,j=$.select("open"),H0=!j||E;if(E&&j)$.setOpen(!0,P0(K0.triggerHover,y,m));else if(g)F.openChangeTimeout.start(g,()=>{if(H0)$.setOpen(!0,P0(K0.triggerHover,y,m))});else if(H0)$.setOpen(!0,P0(K0.triggerHover,y,m))}function v(y){if(A()){b();return}F.unbindMouseMove();let g=$.select("domReferenceElement"),S=f0(g);if(F.restTimeout.clear(),F.restTimeoutPending=!1,O(y.relatedTarget))return;if(_.current&&Q.current.floatingContext){if(!$.select("open"))F.openChangeTimeout.clear();let E=q.current;F.handler=_.current({...Q.current.floatingContext,tree:V,x:y.clientX,y:y.clientY,onClose(){if(b(),k(),M.current&&!A()&&E===$.select("domReferenceElement"))D(y,!0)}});let m=F.handler;m(y),S.addEventListener("mousemove",m),F.unbindMouseMove=()=>{S.removeEventListener("mousemove",m)};return}if(F.pointerType==="touch"?!R0($.select("floatingElement"),y.relatedTarget):!0)D(y)}function C(y){h(y)}if($.select("open"))I.addEventListener("mouseleave",C);if(W)I.addEventListener("mousemove",d,{once:!0});return I.addEventListener("mouseenter",d),I.addEventListener("mouseleave",v),()=>{if(I.removeEventListener("mouseleave",C),W)I.removeEventListener("mousemove",d);I.removeEventListener("mouseenter",d),I.removeEventListener("mouseleave",v)}},[k,b,Q,N,D,$,Y,_,h,F,B,A,O,H,W,L,q,V,M]),M7.useMemo(()=>{if(!Y)return;function I(d){F.pointerType=d.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(d){let{nativeEvent:v}=d,C=d.currentTarget,y=$.select("domReferenceElement"),g=$.context.triggerElements,S=$.select("open"),x=(g.hasElement(d.target)||g.hasMatchingElement((m)=>R0(m,d.target)))&&(!y||!R0(y,d.target));if(H&&!y4(F.pointerType))return;if(S&&!x||QK(L.current)===0)return;if(!x&&F.restTimeoutPending&&d.movementX**2+d.movementY**2<2)return;F.restTimeout.clear();function E(){if(F.restTimeoutPending=!1,A())return;let m=$.select("open");if(!F.blockMouseMove&&(!m||x))$.setOpen(!0,P0(K0.triggerHover,v,C))}if(F.pointerType==="touch")fj.flushSync(()=>{E()});else if(x&&S)E();else F.restTimeoutPending=!0,F.restTimeout.start(QK(L.current),E)}}},[Y,F,A,H,$,L])}var M7,fj,Zo;var mj=U(()=>{a1();lZ();y1();W2();t5();X5();C1();gj();z4();$K();M7=P(f(),1),fj=P(s2(),1);Zo={current:null}});function H4(Z=[]){let J=Z.map((G)=>G?.reference),$=Z.map((G)=>G?.floating),Q=Z.map((G)=>G?.item),X=Z.map((G)=>G?.trigger),Y=j7.useCallback((G)=>Fw(G,Z,"reference"),J),w=j7.useCallback((G)=>Fw(G,Z,"floating"),$),z=j7.useCallback((G)=>Fw(G,Z,"item"),Q),H=j7.useCallback((G)=>Fw(G,Z,"trigger"),X);return j7.useMemo(()=>({getReferenceProps:Y,getFloatingProps:w,getItemProps:z,getTriggerProps:H}),[Y,w,z,H])}function Fw(Z,J,$){let Q=new Map,X=$==="item",Y={};if($==="floating")Y.tabIndex=-1,Y[aZ]="";for(let w in Z){if(X&&Z){if(w===Fq||w===Nq)continue}Y[w]=Z[w]}for(let w=0;w<J.length;w+=1){let z,H=J[w]?.[$];if(typeof H==="function")z=Z?H(Z):null;else z=H;if(!z)continue;pj(Y,z,X,Q)}return pj(Y,Z,X,Q),Y}function pj(Z,J,$,Q){for(let X in J){let Y=J[X];if($&&(X===Fq||X===Nq))continue;if(!X.startsWith("on"))Z[X]=Y;else{if(!Q.has(X))Q.set(X,[]);if(typeof Y==="function")Q.get(X)?.push(Y),Z[X]=(...w)=>{return Q.get(X)?.map((z)=>z(...w)).find((z)=>z!==void 0)}}}}var j7;var uj=U(()=>{j7=P(f(),1)});function _w(Z,J,$){switch(Z){case"vertical":return J;case"horizontal":return $;default:return J||$}}function Nw(Z,J){return _w(J,Z===sZ||Z===z7,Z===h4||Z===R4)}function XK(Z,J,$){return _w(J,Z===z7,$?Z===h4:Z===R4)||Z==="Enter"||Z===" "||Z===""}function $o(Z,J,$){return _w(J,$?Z===h4:Z===R4,Z===z7)}function Qo(Z,J,$,Q){let X=$?Z===R4:Z===h4,Y=Z===sZ;if(J==="both"||J==="horizontal"&&Q&&Q>1)return Z===Jo;return _w(J,X,Y)}function wK(Z,J){let $="rootStore"in Z?Z.rootStore:Z,Q=$.useState("open"),X=$.useState("floatingElement"),Y=$.useState("domReferenceElement"),w=$.context.dataRef,{listRef:z,activeIndex:H,onNavigate:G=()=>{},enabled:W=!0,selectedIndex:q=null,allowEscape:K=!1,loopFocus:B=!1,nested:V=!1,rtl:F=!1,virtual:_=!1,focusItemOnOpen:N="auto",focusItemOnHover:L=!0,openOnArrowKeyDown:M=!0,disabledIndices:A=void 0,orientation:O="vertical",parentOrientation:D,cols:k=1,id:b,resetOnPointerLeave:h=!0,externalTree:I}=J,d=W7(X),v=B5(d),C=U5(),y=g5(I);F0(()=>{w.current.orientation=O},[w,O]);let g=oZ(Y),S=F5.useRef(N),x=F5.useRef(q??-1),E=F5.useRef(null),m=F5.useRef(!0),j=U0((n)=>{G(x.current===-1?null:x.current,n)}),H0=F5.useRef(j),w0=F5.useRef(!!X),T=F5.useRef(Q),$0=F5.useRef(!1),V0=F5.useRef(!1),l=B5(A),Z0=B5(Q),q0=B5(q),s=B5(h),X0=U0(()=>{function n(I0){if(_)y?.events.emit("virtualfocus",I0);else B7(I0,{sync:$0.current,preventScroll:!0})}let Q0=z.current[x.current],i=V0.current;if(Q0)n(Q0);($0.current?(I0)=>I0():requestAnimationFrame)(()=>{let I0=z.current[x.current]||Q0;if(!I0)return;if(!Q0)n(I0);if(p&&(i||!m.current))I0.scrollIntoView?.({block:"nearest",inline:"nearest"})})});F0(()=>{if(!W)return;if(Q&&X){if(x.current=q??-1,S.current&&q!=null)V0.current=!0,j()}else if(w0.current)x.current=-1,H0.current()},[W,Q,X,q,j]),F0(()=>{if(!W)return;if(!Q){$0.current=!1;return}if(!X)return;if(H==null){if($0.current=!1,q0.current!=null)return;if(w0.current)x.current=-1,X0();if((!T.current||!w0.current)&&S.current&&(E.current!=null||S.current===!0&&E.current==null)){let n=0,Q0=()=>{if(z.current[0]==null){if(n<2)(n?requestAnimationFrame:queueMicrotask)(Q0);n+=1}else x.current=E.current==null||XK(E.current,O,F)||V?uX(z):Aq(z),E.current=null,j()};Q0()}}else if(!u9(z,H))x.current=H,X0(),V0.current=!1},[W,Q,X,H,q0,V,z,O,F,j,X0,l]),F0(()=>{if(!W||X||!y||_||!w0.current)return;let n=y.nodesRef.current,Q0=n.find((I0)=>I0.id===C)?.context?.elements.floating,i=o5(f0(X)),L0=n.some((I0)=>I0.context&&R0(I0.context.elements.floating,i));if(Q0&&!L0&&m.current)Q0.focus({preventScroll:!0})},[W,X,y,C,_]),F0(()=>{H0.current=j,T.current=Q,w0.current=!!X}),F0(()=>{if(!Q)E.current=null,S.current=N},[Q,N]);let z0=H!=null,p=F5.useMemo(()=>{function n(i){if(!Z0.current)return;let L0=z.current.indexOf(i.currentTarget);if(L0!==-1&&x.current!==L0)x.current=L0,j(i)}return{onFocus(i){$0.current=!0,n(i)},onClick:({currentTarget:i})=>i.focus({preventScroll:!0}),onMouseMove(i){if($0.current=!0,V0.current=!1,L)n(i)},onPointerLeave(i){if(!Z0.current||!m.current||i.pointerType==="touch")return;$0.current=!0;let L0=i.relatedTarget;if(!L||z.current.includes(L0))return;if(!s.current)return;if(B7(null,{sync:!0}),x.current=-1,j(i),!_)v.current?.focus({preventScroll:!0})}}},[Z0,v,L,z,j,s,_]),o=F5.useCallback(()=>{return D??y?.nodesRef.current.find((n)=>n.id===C)?.context?.dataRef?.current.orientation},[C,y,D]),t=U0((n)=>{if(m.current=!1,$0.current=!0,n.which===229)return;if(!Z0.current&&n.currentTarget===v.current)return;if(V&&Qo(n.key,O,F,k)){if(!Nw(n.key,o()))Y5(n);if($.setOpen(!1,P0(K0.listNavigation,n.nativeEvent)),w1(Y))if(_)y?.events.emit("virtualfocus",Y);else Y.focus();return}let Q0=x.current,i=uX(z,A),L0=Aq(z,A);if(!g){if(n.key==="Home")Y5(n),x.current=i,j(n);if(n.key==="End")Y5(n),x.current=L0,j(n)}if(k>1){let I0=Array.from({length:z.current.length},()=>({width:1,height:1})),n0=zO(I0,k,!1),W1=n0.findIndex((e)=>e!=null&&!c9(z,e,A)),R=n0.reduce((e,B0,M0)=>B0!=null&&!c9(z,B0,A)?M0:e,-1),u=n0[YO({current:n0.map((e)=>e!=null?z.current[e]:null)},{event:n,orientation:O,loopFocus:B,rtl:F,cols:k,disabledIndices:GO([...(typeof A!=="function"?A:null)||z.current.map((e,B0)=>c9(z,B0,A)?B0:void 0),void 0],n0),minIndex:W1,maxIndex:R,prevIndex:HO(x.current>L0?i:x.current,I0,n0,k,n.key===z7?"bl":n.key===(F?h4:R4)?"tr":"tl"),stopEvent:!0})];if(u!=null)x.current=u,j(n);if(O==="both")return}if(Nw(n.key,O)){if(Y5(n),Q&&!_&&o5(n.currentTarget.ownerDocument)===n.currentTarget){x.current=XK(n.key,O,F)?i:L0,j(n);return}if(XK(n.key,O,F))if(B)if(Q0>=L0)if(K&&Q0!==z.current.length)x.current=-1;else $0.current=!1,x.current=i;else x.current=S5(z,{startingIndex:Q0,disabledIndices:A});else x.current=Math.min(L0,S5(z,{startingIndex:Q0,disabledIndices:A}));else if(B)if(Q0<=i)if(K&&Q0!==-1)x.current=z.current.length;else $0.current=!1,x.current=L0;else x.current=S5(z,{startingIndex:Q0,decrement:!0,disabledIndices:A});else x.current=Math.max(i,S5(z,{startingIndex:Q0,decrement:!0,disabledIndices:A}));if(u9(z,x.current))x.current=-1;j(n)}}),N0=F5.useMemo(()=>{return _&&Q&&z0&&{"aria-activedescendant":`${b}-${H}`}},[_,Q,z0,b,H]),a=F5.useMemo(()=>{return{"aria-orientation":O==="both"?void 0:O,...!g?N0:{},onKeyDown(n){if(n.key==="Tab"&&n.shiftKey&&Q&&!_){let Q0=w5(n.nativeEvent);if(Q0&&!R0(v.current,Q0))return;if(Y5(n),$.setOpen(!1,P0(K0.focusOut,n.nativeEvent)),w1(Y))Y.focus();return}t(n)},onPointerMove(){m.current=!0}}},[N0,t,v,O,g,$,Q,_,Y]),J0=F5.useMemo(()=>{function n(i){if(N==="auto"&&xX(i.nativeEvent))S.current=!_}function Q0(i){if(S.current=N,N==="auto"&&yX(i.nativeEvent))S.current=!0}return{onKeyDown(i){let L0=$.select("open");m.current=!1;let I0=i.key.startsWith("Arrow"),n0=$o(i.key,o(),F),W1=Nw(i.key,O),R=(V?n0:W1)||i.key==="Enter"||i.key.trim()==="";if(_&&L0)return t(i);if(!L0&&!M&&I0)return;if(R){let u=Nw(i.key,o());E.current=V&&u?null:i.key}if(V){if(n0)if(Y5(i),L0)x.current=uX(z,l.current),j(i);else $.setOpen(!0,P0(K0.listNavigation,i.nativeEvent,i.currentTarget));return}if(W1){if(q0.current!=null)x.current=q0.current;if(Y5(i),!L0&&M)$.setOpen(!0,P0(K0.listNavigation,i.nativeEvent,i.currentTarget));else t(i);if(L0)j(i)}return},onFocus(i){if($.select("open")&&!_)x.current=-1,j(i)},onPointerDown:Q0,onPointerEnter:Q0,onMouseDown:n,onClick:n}},[t,l,N,z,V,j,$,M,O,o,F,q0,_]),r=F5.useMemo(()=>{return{...N0,...J0}},[N0,J0]);return F5.useMemo(()=>W?{reference:r,floating:a,item:p,trigger:J0}:{},[W,r,a,J0,p])}var F5,Jo="Escape";var cj=U(()=>{a1();lZ();y1();M1();W2();t5();z4();X5();C1();F5=P(f(),1)});function FJ(Z,J={}){let $="rootStore"in Z?Z.rootStore:Z,Q=$.useState("open"),X=$.useState("floatingId"),Y=$.useState("domReferenceElement"),w=$.useState("floatingElement"),{role:z="dialog"}=J,H=G2(),G=Y?.id||H,W=G8.useMemo(()=>W7(w)?.id||X,[w,X]),q=Xo.get(z)??z,B=U5()!=null,V=G8.useMemo(()=>{if(q==="tooltip"||z==="label")return q1;return{"aria-haspopup":q==="alertdialog"?"dialog":q,"aria-expanded":"false",...q==="listbox"&&{role:"combobox"},...q==="menu"&&B&&{role:"menuitem"},...z==="select"&&{"aria-autocomplete":"none"},...z==="combobox"&&{"aria-autocomplete":"list"}}},[q,B,z]),F=G8.useMemo(()=>{if(q==="tooltip"||z==="label")return{[`aria-${z==="label"?"labelledby":"describedby"}`]:Q?W:void 0};return{...V,"aria-expanded":Q?"true":"false","aria-controls":Q?W:void 0,...q==="menu"&&{id:G}}},[q,W,Q,G,z,V]),_=G8.useMemo(()=>{let L={id:W,...q&&{role:q}};if(q==="tooltip"||z==="label")return L;return{...L,...q==="menu"&&{"aria-labelledby":G}}},[q,W,G,z]),N=G8.useCallback(({active:L,selected:M})=>{let A={role:"option",...L&&{id:`${W}-fui-option`}};switch(z){case"select":case"combobox":return{...A,"aria-selected":M};default:}return{}},[W,z]);return G8.useMemo(()=>({reference:F,floating:_,item:N,trigger:V}),[F,_,V,N])}var G8,Xo;var dj=U(()=>{s6();t5();z4();j5();G8=P(f(),1),Xo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]])});function YK(Z,J){let $="rootStore"in Z?Z.rootStore:Z,Q=$.context.dataRef,X=$.useState("open"),{listRef:Y,activeIndex:w,onMatch:z,onTypingChange:H,enabled:G=!0,resetMs:W=750,selectedIndex:q=null}=J,K=b5(),B=W8.useRef(""),V=W8.useRef(q??w??-1),F=W8.useRef(null);F0(()=>{if(!X&&q!==null)return;if(K.clear(),F.current=null,B.current!=="")B.current=""},[X,q,K]),F0(()=>{if(X&&B.current==="")V.current=q??w??-1},[X,q,w]);let _=U0((O)=>{if(O){if(!Q.current.typing)Q.current.typing=O,H?.(O)}else if(Q.current.typing)Q.current.typing=O,H?.(O)}),N=U0((O)=>{function D(v,C,y){let g=C.find((S)=>S?.toLocaleLowerCase().indexOf(y.toLocaleLowerCase())===0);return g?v.indexOf(g):-1}let k=Y.current;if(B.current.length>0&&B.current[0]!==" "){if(D(k,k,B.current)===-1)_(!1);else if(O.key===" ")Y5(O)}if(k==null||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;if(X&&O.key!==" ")Y5(O),_(!0);let b=B.current==="";if(b)V.current=q??w??-1;if(k.every((v)=>v?v[0]?.toLocaleLowerCase()!==v[1]?.toLocaleLowerCase():!0)&&B.current===O.key)B.current="",V.current=F.current;B.current+=O.key,K.start(W,()=>{B.current="",V.current=F.current,_(!1)});let I=b?q??w??-1:V.current,d=D(k,[...k.slice((I||0)+1),...k.slice(0,(I||0)+1)],B.current);if(d!==-1)z?.(d),F.current=d;else if(O.key!==" ")B.current="",_(!1)}),L=U0((O)=>{let D=O.relatedTarget,k=$.select("domReferenceElement"),b=$.select("floatingElement"),h=R0(k,D),I=R0(b,D);if(h||I)return;K.clear(),B.current="",V.current=F.current,_(!1)}),M=W8.useMemo(()=>({onKeyDown:N,onBlur:L}),[N,L]),A=W8.useMemo(()=>{return{onKeyDown:N,onKeyUp(O){if(O.key===" ")_(!1)},onBlur:L}},[N,L,_]);return W8.useMemo(()=>G?{reference:M,floating:A}:{},[G,M,A])}var W8;var lj=U(()=>{y1();M1();x2();t5();W8=P(f(),1)});function rj(Z,J){let[$,Q]=Z,X=!1,Y=J.length;for(let w=0,z=Y-1;w<Y;z=w++){let[H,G]=J[w]||[0,0],[W,q]=J[z]||[0,0];if(G>=Q!==q>=Q&&$<=(W-H)*(Q-G)/(q-G)+H)X=!X}return X}function wo(Z,J){return Z[0]>=J.x&&Z[0]<=J.x+J.width&&Z[1]>=J.y&&Z[1]<=J.y+J.height}function b7(Z={}){let{buffer:J=0.5,blockPointerEvents:$=!1,requireIntent:Q=!0}=Z,X=new s5,Y=!1,w=null,z=null,H=typeof performance<"u"?performance.now():0;function G(q,K){let B=performance.now(),V=B-H;if(w===null||z===null||V===0)return w=q,z=K,H=B,null;let F=q-w,_=K-z,L=Math.sqrt(F*F+_*_)/V;return w=q,z=K,H=B,L}let W=({x:q,y:K,placement:B,elements:V,onClose:F,nodeId:_,tree:N})=>{return function(M){function A(){X.clear(),F()}if(X.clear(),!V.domReference||!V.floating||B==null||q==null||K==null)return;let{clientX:O,clientY:D}=M,k=[O,D],b=w5(M),h=M.type==="mouseleave",I=R0(V.floating,b),d=R0(V.domReference,b),v=V.domReference.getBoundingClientRect(),C=V.floating.getBoundingClientRect(),y=B.split("-")[0],g=q>C.right-C.width/2,S=K>C.bottom-C.height/2,x=wo(k,v),E=C.width>v.width,m=C.height>v.height,j=(E?v:C).left,H0=(E?v:C).right,w0=(m?v:C).top,T=(m?v:C).bottom;if(I){if(Y=!0,!h)return}if(d)Y=!1;if(d&&!h){Y=!0;return}if(h&&l0(M.relatedTarget)&&R0(V.floating,M.relatedTarget))return;if(N&&x4(N.nodesRef.current,_).some(({context:l})=>l?.open))return;if(y==="top"&&K>=v.bottom-1||y==="bottom"&&K<=v.top+1||y==="left"&&q>=v.right-1||y==="right"&&q<=v.left+1)return A();let $0=[];switch(y){case"top":$0=[[j,v.top+1],[j,C.bottom-1],[H0,C.bottom-1],[H0,v.top+1]];break;case"bottom":$0=[[j,C.top+1],[j,v.bottom-1],[H0,v.bottom-1],[H0,C.top+1]];break;case"left":$0=[[C.right-1,T],[C.right-1,w0],[v.left+1,w0],[v.left+1,T]];break;case"right":$0=[[v.right-1,T],[v.right-1,w0],[C.left+1,w0],[C.left+1,T]];break;default:}function V0([l,Z0]){switch(y){case"top":{let q0=[E?l+J/2:g?l+J*4:l-J*4,Z0+J+1],s=[E?l-J/2:g?l+J*4:l-J*4,Z0+J+1],X0=[[C.left,g?C.bottom-J:E?C.bottom-J:C.top],[C.right,g?E?C.bottom-J:C.top:C.bottom-J]];return[q0,s,...X0]}case"bottom":{let q0=[E?l+J/2:g?l+J*4:l-J*4,Z0-J],s=[E?l-J/2:g?l+J*4:l-J*4,Z0-J],X0=[[C.left,g?C.top+J:E?C.top+J:C.bottom],[C.right,g?E?C.top+J:C.bottom:C.top+J]];return[q0,s,...X0]}case"left":{let q0=[l+J+1,m?Z0+J/2:S?Z0+J*4:Z0-J*4],s=[l+J+1,m?Z0-J/2:S?Z0+J*4:Z0-J*4];return[...[[S?C.right-J:m?C.right-J:C.left,C.top],[S?m?C.right-J:C.left:C.right-J,C.bottom]],q0,s]}case"right":{let q0=[l-J,m?Z0+J/2:S?Z0+J*4:Z0-J*4],s=[l-J,m?Z0-J/2:S?Z0+J*4:Z0-J*4],X0=[[S?C.left+J:m?C.left+J:C.right,C.top],[S?m?C.left+J:C.right:C.left+J,C.bottom]];return[q0,s,...X0]}default:return[]}}if(rj([O,D],$0))return;if(Y&&!x)return A();if(!h&&Q){let l=G(M.clientX,M.clientY),Z0=0.1;if(l!==null&&l<0.1)return A()}if(!rj([O,D],V0([q,K])))A();else if(!Y&&Q)X.start(40,A);return}};return W.__options={blockPointerEvents:$},W}var ij=U(()=>{a1();x2();RX()});var M2=U(()=>{PO();bq();z4();IO();zj();hj();Rj();xj();vj();mj();uj();cj();dj();lj();ij();HJ()});function Aw(Z){let J=Lw.useContext(Yo);if(J===void 0&&!Z)throw Error(g0(69));return J}var Lw,Yo;var zK=U(()=>{Lw=P(f(),1),Yo=Lw.createContext(void 0)});var aj="ArrowUp",sj="ArrowDown",oj="ArrowLeft",nj="ArrowRight",tj="Home",ej="End",zo,Ho,Go,br2,Dw;var HK=U(()=>{zo=new Set([oj,nj]),Ho=new Set([aj,sj]),Go=new Set([...zo,...Ho]),br2=new Set([...Go,tj,ej]),Dw=new Set([aj,sj,oj,nj,tj,ej])});function q8(Z){return Z==="starting"?ID:q1}var NJ=U(()=>{j5()});var Mw,Zb,Wo,Jb;var $b=U(()=>{M2();H2();U6();_1();E2();i6();v9();X5();C1();zK();HK();NJ();Mw=P(f(),1),Zb=P(G0(),1),Wo={...v5,...k4},Jb=Mw.forwardRef(function(J,$){let{render:Q,className:X,finalFocus:Y,...w}=J,{store:z}=b1(),{side:H,align:G}=z2(),W=Aw(!0)!=null,q=z.useState("open"),K=z.useState("transitionStatus"),B=z.useState("popupProps"),V=z.useState("mounted"),F=z.useState("instantType"),_=z.useState("activeTriggerElement"),N=z.useState("parent"),L=z.useState("lastOpenChangeReason"),M=z.useState("rootId"),A=z.useState("floatingRootContext"),O=z.useState("floatingTreeRoot"),D=z.useState("closeDelay"),k=z.useState("activeTriggerElement"),b=N.type==="context-menu";E4({open:q,ref:z.context.popupRef,onComplete(){if(q)z.context.onOpenChangeComplete?.(!0)}}),Mw.useEffect(()=>{function y(g){z.setOpen(!1,P0(g.reason,g.domEvent))}return O.events.on("close",y),()=>{O.events.off("close",y)}},[O.events,z]);let h=z.useState("hoverEnabled"),I=z.useState("disabled");VJ(A,{enabled:h&&!I&&!b&&N.type!=="menubar",closeDelay:D});let d={transitionStatus:K,side:H,align:G,open:q,nested:N.type==="menu",instant:F},v=T0("div",J,{state:d,ref:[$,z.context.popupRef],stateAttributesMapping:Wo,props:[B,{onKeyDown(y){if(W&&Dw.has(y.key))y.stopPropagation()}},q8(K),w,{"data-rootownerid":M}]}),C=N.type===void 0||b;if(_||N.type==="menubar"&&L!==K0.outsidePress)C=!0;return Zb.jsx(wJ,{context:A,modal:b,disabled:!V,returnFocus:Y===void 0?C:Y,initialFocus:N.type!=="menu",restoreFocus:!0,externalTree:N.type!=="menubar"?O:void 0,previousFocusableElement:k,nextFocusableElement:N.type===void 0?z.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:N.type===void 0?z.context.beforeContentFocusGuardRef:void 0,children:v})})});function Qb(){let Z=Ow.useContext(GK);if(Z===void 0)throw Error(g0(32));return Z}var Ow,GK;var WK=U(()=>{Ow=P(f(),1),GK=Ow.createContext(void 0)});var Xb,qK,wb;var Yb=U(()=>{M2();H2();WK();Xb=P(f(),1),qK=P(G0(),1),wb=Xb.forwardRef(function(J,$){let{keepMounted:Q=!1,...X}=J,{store:Y}=b1();if(!(Y.useState("mounted")||Q))return null;return qK.jsx(GK.Provider,{value:Q,children:qK.jsx(JJ,{ref:$,...X})})})});function i9(Z){if(S9(19))return Z;return Z?"true":void 0}var jw=U(()=>{ZX()});function K8(){return bw.useContext(qo)?.direction??"ltr"}var bw,qo;var Pw=U(()=>{bw=P(f(),1),qo=bw.createContext(void 0)});var Ko=(Z)=>({name:"arrow",options:Z,async fn(J){let{x:$,y:Q,placement:X,rects:Y,platform:w,elements:z,middlewareData:H}=J,{element:G,padding:W=0,offsetParent:q="real"}=X4(Z,J)||{};if(G==null)return{};let K=mX(W),B={x:$,y:Q},V=ZJ(X),F=eZ(V),_=await w.getDimensions(G),N=V==="y",L=N?"top":"left",M=N?"bottom":"right",A=N?"clientHeight":"clientWidth",O=Y.reference[F]+Y.reference[V]-B[V]-Y.floating[F],D=B[V]-Y.reference[V],k=q==="real"?await w.getOffsetParent?.(G):z.floating,b=z.floating[A]||Y.floating[F];if(!b||!await w.isElement?.(k))b=z.floating[A]||Y.floating[F];let h=O/2-D/2,I=b/2-_[F]/2-1,d=Math.min(K[L],I),v=Math.min(K[M],I),C=d,y=b-_[F]-v,g=b/2-_[F]/2+h,S=tZ(C,g,y),x=!H.arrow&&w4(X)!=null&&g!==S&&Y.reference[F]/2-(g<C?d:v)-_[F]/2<0,E=x?g<C?g-C:g-y:0;return{[V]:B[V]+E,data:{[V]:S,centerOffset:g-S-E,...x&&{alignmentOffset:E}},reset:x}}}),zb=(Z,J)=>({...Ko(Z),options:[Z,J]});var Hb=U(()=>{F6()});var Gb;var Wb=U(()=>{HJ();Gb={name:"hide",async fn(Z){let{width:J,height:$,x:Q,y:X}=Z.rects.reference,Y=J===0&&$===0&&Q===0&&X===0;return{data:{referenceHidden:(await fq().fn(Z)).data?.referenceHidden||Y}}}}});var _J,qb;var KK=U(()=>{W2();F6();_J={sideX:"left",sideY:"top"},qb={name:"adaptiveOrigin",async fn(Z){let{x:J,y:$,rects:{floating:Q},elements:{floating:X},platform:Y,strategy:w,placement:z}=Z,H=k1(X),G=H.getComputedStyle(X);if(!(G.transitionDuration!=="0s"&&G.transitionDuration!==""))return{x:J,y:$,data:_J};let q=await Y.getOffsetParent?.(X),K={width:0,height:0};if(w==="fixed"&&H?.visualViewport)K={width:H.visualViewport.width,height:H.visualViewport.height};else if(q===H){let L=f0(X);K={width:L.documentElement.clientWidth,height:L.documentElement.clientHeight}}else if(await Y.isElement?.(q))K=await Y.getDimensions(q);let B=C5(z),V=J,F=$;if(B==="left")V=K.width-(J+Q.width);if(B==="top")F=K.height-($+Q.height);let _=B==="left"?"right":_J.sideX,N=B==="top"?"bottom":_J.sideY;return{x:V,y:F,data:{sideX:_,sideY:N}}}}});function Ub(Z,J,$){let Q=Z==="inline-start"||Z==="inline-end";return{top:"top",right:Q?$?"inline-start":"inline-end":"right",bottom:"bottom",left:Q?$?"inline-end":"inline-start":"left"}[J]}function Kb(Z,J,$){let{rects:Q,placement:X}=Z;return{side:Ub(J,C5(X),$),align:w4(X)||"center",anchor:{width:Q.reference.width,height:Q.reference.height},positioner:{width:Q.floating.width,height:Q.floating.height}}}function Iw(Z){let{anchor:J,positionMethod:$="absolute",side:Q="bottom",sideOffset:X=0,align:Y="center",alignOffset:w=0,collisionBoundary:z,collisionPadding:H=5,sticky:G=!1,arrowPadding:W=5,disableAnchorTracking:q=!1,keepMounted:K=!1,floatingRootContext:B,mounted:V,collisionAvoidance:F,shiftCrossAxis:_=!1,nodeId:N,adaptiveOrigin:L,lazyFlip:M=!1,externalTree:A}=Z,[O,D]=O2.useState(null);if(!V&&O!==null)D(null);let k=F.side||"flip",b=F.align||"flip",h=F.fallbackAxisSide||"end",I=typeof J==="function"?J:void 0,d=U0(I),v=I?d:J,C=B5(J),g=K8()==="rtl",S=O||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":g?"left":"right","inline-start":g?"right":"left"}[Q],x=Y==="center"?S:`${S}-${Y}`,E=H,m=1,j=Q==="bottom"?m:0,H0=Q==="top"?m:0,w0=Q==="right"?m:0,T=Q==="left"?m:0;if(typeof E==="number")E={top:E+j,right:E+T,bottom:E+H0,left:E+w0};else if(E)E={top:(E.top||0)+j,right:(E.right||0)+T,bottom:(E.bottom||0)+H0,left:(E.left||0)+w0};let $0={boundary:z==="clipping-ancestors"?"clippingAncestors":z,padding:E},V0=O2.useRef(null),l=B5(X),Z0=B5(w),X0=[Rq((y0)=>{let G1=Kb(y0,Q,g),A5=typeof l.current==="function"?l.current(G1):l.current,m1=typeof Z0.current==="function"?Z0.current(G1):Z0.current;return{mainAxis:A5,crossAxis:m1,alignmentAxis:m1}},[typeof X!=="function"?X:0,typeof w!=="function"?w:0,g,Q])],z0=b==="none"&&k!=="shift",p=!z0&&(G||_||k==="shift"),o=k==="none"?null:vq({...$0,padding:{top:E.top+m,right:E.right+m,bottom:E.bottom+m,left:E.left+m},mainAxis:!_&&k==="flip",crossAxis:b==="flip"?"alignment":!1,fallbackAxisSideDirection:h}),t=z0?null:xq((y0)=>{let G1=f0(y0.elements.floating).documentElement;return{...$0,rootBoundary:_?{x:0,y:0,width:G1.clientWidth,height:G1.clientHeight}:void 0,mainAxis:b!=="none",crossAxis:p,limiter:G||_?void 0:yq((A5)=>{if(!V0.current)return{};let{width:m1,height:D5}=V0.current.getBoundingClientRect(),t0=q2(C5(A5.placement)),Z1=t0==="y"?m1:D5,I1=t0==="y"?E.left+E.right:E.top+E.bottom;return{offset:Z1/2+I1/2}})}},[$0,G,_,E,b]);if(k==="shift"||b==="shift"||Y==="center")X0.push(t,o);else X0.push(o,t);X0.push(gq({...$0,apply({elements:{floating:y0},rects:{reference:G1},availableWidth:A5,availableHeight:m1}){let D5=y0.style;D5.setProperty("--available-width",`${A5}px`),D5.setProperty("--available-height",`${m1}px`),D5.setProperty("--anchor-width",`${G1.width}px`),D5.setProperty("--anchor-height",`${G1.height}px`)}}),zb(()=>({element:V0.current||document.createElement("div"),padding:W,offsetParent:"floating"}),[W]),{name:"transformOrigin",fn(y0){let{elements:G1,middlewareData:A5,placement:m1,rects:D5,y:t0}=y0,Z1=C5(m1),I1=q2(Z1),U1=V0.current,J5=A5.arrow?.x||0,I5=A5.arrow?.y||0,R5=U1?.clientWidth||0,T5=U1?.clientHeight||0,x5=J5+R5/2,r5=I5+T5/2,D4=Math.abs(A5.shift?.y||0),M4=D5.reference.height/2,O0=typeof X==="function"?X(Kb(y0,Q,g)):X,d0=D4>O0,h0={top:`${x5}px calc(100% + ${O0}px)`,bottom:`${x5}px ${-O0}px`,left:`calc(100% + ${O0}px) ${r5}px`,right:`${-O0}px ${r5}px`}[Z1],X1=`${x5}px ${D5.reference.y+M4-t0}px`;return G1.floating.style.setProperty("--transform-origin",p&&I1==="y"&&d0?X1:h0),{}}},Gb,L),F0(()=>{if(!V&&B)B.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[V,B]);let N0=O2.useMemo(()=>({elementResize:!q&&typeof ResizeObserver<"u",layoutShift:!q&&typeof IntersectionObserver<"u"}),[q]),{refs:a,elements:J0,x:r,y:n,middlewareData:Q0,update:i,placement:L0,context:I0,isPositioned:n0,floatingStyles:W1}=tq({rootContext:B,placement:x,middleware:X0,strategy:$,whileElementsMounted:K?void 0:(...y0)=>zJ(...y0,N0),nodeId:N,externalTree:A}),{sideX:R,sideY:u}=Q0.adaptiveOrigin||_J,e=n0?$:"fixed",B0=O2.useMemo(()=>{let y0=L?{position:e,[R]:r,[u]:n}:{position:e,...W1};if(!n0)y0.opacity=0;return y0},[L,e,R,r,u,n,W1,n0]),M0=O2.useRef(null);F0(()=>{if(!V)return;let y0=C.current,G1=typeof y0==="function"?y0():y0,m1=(Bb(G1)?G1.current:G1)||null||null;if(m1!==M0.current)a.setPositionReference(m1),M0.current=m1},[V,a,v,C]),O2.useEffect(()=>{if(!V)return;let y0=C.current;if(typeof y0==="function")return;if(Bb(y0)&&y0.current!==M0.current)a.setPositionReference(y0.current),M0.current=y0.current},[V,a,v,C]),O2.useEffect(()=>{if(K&&V&&J0.domReference&&J0.floating)return zJ(J0.domReference,J0.floating,i,N0);return},[K,V,J0,i,N0]);let i0=C5(L0),T1=Ub(Q,i0,g),f1=w4(L0)||"center",x0=Boolean(Q0.hide?.referenceHidden);F0(()=>{if(M&&V&&n0)D(i0)},[M,V,n0,i0]);let s0=O2.useMemo(()=>({position:"absolute",top:Q0.arrow?.y,left:Q0.arrow?.x}),[Q0.arrow]),J1=Q0.arrow?.centerOffset!==0;return O2.useMemo(()=>({positionerStyles:B0,arrowStyles:s0,arrowRef:V0,arrowUncentered:J1,side:T1,align:f1,physicalSide:i0,anchorHidden:x0,refs:a,context:I0,isPositioned:n0,update:i}),[B0,s0,V0,J1,T1,f1,i0,x0,a,I0,n0,i])}function Bb(Z){return Z!=null&&"current"in Z}var O2;var BK=U(()=>{F6();W2();M1();lZ();y1();M2();Pw();Hb();Wb();KK();O2=P(f(),1)});function Fb(Z){let{children:J,elementsRef:$,labelsRef:Q,onMapChange:X}=Z,Y=U0(X),w=B8.useRef(0),z=D1(Uo).current,H=D1(Bo).current,[G,W]=B8.useState(0),q=B8.useRef(G),K=U0((N,L)=>{H.set(N,L??null),q.current+=1,W(q.current)}),B=U0((N)=>{H.delete(N),q.current+=1,W(q.current)}),V=B8.useMemo(()=>{Fo(G);let N=new Map;return Array.from(H.keys()).filter((M)=>M.isConnected).sort(Vo).forEach((M,A)=>{let O=H.get(M)??{};N.set(M,{...O,index:A})}),N},[H,G]);F0(()=>{if(typeof MutationObserver!=="function"||V.size===0)return;let N=new MutationObserver((L)=>{let M=new Set,A=(O)=>M.has(O)?M.delete(O):M.add(O);if(L.forEach((O)=>{O.removedNodes.forEach(A),O.addedNodes.forEach(A)}),M.size===0)q.current+=1,W(q.current)});return V.forEach((L,M)=>{if(M.parentElement)N.observe(M.parentElement,{childList:!0})}),()=>{N.disconnect()}},[V]),F0(()=>{if(q.current===G){if($.current.length!==V.size)$.current.length=V.size;if(Q&&Q.current.length!==V.size)Q.current.length=V.size;w.current=V.size}Y(V)},[Y,V,$,Q,G]),F0(()=>{return()=>{$.current=[]}},[$]),F0(()=>{return()=>{if(Q)Q.current=[]}},[Q]);let F=U0((N)=>{return z.add(N),()=>{z.delete(N)}});F0(()=>{z.forEach((N)=>N(V))},[z,V]);let _=B8.useMemo(()=>({register:K,unregister:B,subscribeMapChange:F,elementsRef:$,labelsRef:Q,nextIndexRef:w}),[K,B,F,$,Q,w]);return Vb.jsx(wq.Provider,{value:_,children:J})}function Bo(){return new Map}function Uo(){return new Set}function Vo(Z,J){let $=Z.compareDocumentPosition(J);if($&Node.DOCUMENT_POSITION_FOLLOWING||$&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if($&Node.DOCUMENT_POSITION_PRECEDING||$&Node.DOCUMENT_POSITION_CONTAINS)return 1;return 0}function Fo(Z){}var B8,Vb;var Nb=U(()=>{Y2();y1();M1();Yq();B8=P(f(),1),Vb=P(G0(),1)});var _b,Lb,Tw;var UK=U(()=>{_b=P(f(),1),Lb=P(G0(),1),Tw=_b.forwardRef(function(J,$){let{cutout:Q,...X}=J,Y;if(Q){let w=Q?.getBoundingClientRect();Y=`polygon(
|
|
5
|
+
0% 0%,
|
|
6
|
+
100% 0%,
|
|
7
|
+
100% 100%,
|
|
8
|
+
0% 100%,
|
|
9
|
+
0% 0%,
|
|
10
|
+
${w.left}px ${w.top}px,
|
|
11
|
+
${w.left}px ${w.bottom}px,
|
|
12
|
+
${w.right}px ${w.bottom}px,
|
|
13
|
+
${w.right}px ${w.top}px,
|
|
14
|
+
${w.left}px ${w.top}px
|
|
15
|
+
)`}return Lb.jsx("div",{ref:$,role:"presentation","data-base-ui-inert":"",...X,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:Y}})})});var f4,a9,Ab;var Db=U(()=>{jw();M2();U6();H2();BK();_1();E2();Nb();UK();WK();j5();NJ();h9();X5();C1();f4=P(f(),1),a9=P(G0(),1),Ab=f4.forwardRef(function(J,$){let{anchor:Q,positionMethod:X="absolute",className:Y,render:w,side:z,align:H,sideOffset:G=0,alignOffset:W=0,collisionBoundary:q="clipping-ancestors",collisionPadding:K=5,arrowPadding:B=5,sticky:V=!1,disableAnchorTracking:F=!1,collisionAvoidance:_=TD,...N}=J,{store:L}=b1(),M=Qb(),A=C4(!0),O=L.useState("parent"),D=L.useState("floatingRootContext"),k=L.useState("floatingTreeRoot"),b=L.useState("mounted"),h=L.useState("open"),I=L.useState("modal"),d=L.useState("activeTriggerElement"),v=L.useState("transitionStatus"),C=L.useState("lastOpenChangeReason"),y=L.useState("floatingNodeId"),g=L.useState("floatingParentNodeId"),S=Q,x=G,E=W,m=H,j=_;if(O.type==="context-menu"){if(S=Q??O.context?.anchor,m=m??"start",!z&&m!=="center")E=J.alignOffset??2,x=J.sideOffset??-5}let H0=z,w0=m;if(O.type==="menu")H0=H0??"inline-end",w0=w0??"start",j=J.collisionAvoidance??QX;else if(O.type==="menubar")H0=H0??"bottom",w0=w0??"start";let T=O.type==="context-menu",$0=Iw({anchor:S,floatingRootContext:D,positionMethod:A?"fixed":X,mounted:b,side:H0,sideOffset:x,align:w0,alignOffset:E,arrowPadding:T?0:B,collisionBoundary:q,collisionPadding:K,sticky:V,nodeId:y,keepMounted:M,disableAnchorTracking:F,collisionAvoidance:j,shiftCrossAxis:T&&!(("side"in j)&&j.side==="flip"),externalTree:k}),V0=f4.useMemo(()=>{let z0={};if(!h)z0.pointerEvents="none";return{role:"presentation",hidden:!b,style:{...$0.positionerStyles,...z0}}},[h,b,$0.positionerStyles]);f4.useEffect(()=>{function z0(p){if(p.open){if(p.parentNodeId===y)L.set("hoverEnabled",!1);if(p.nodeId!==y&&p.parentNodeId===L.select("floatingParentNodeId"))L.setOpen(!1,P0(K0.siblingOpen))}}return k.events.on("menuopenchange",z0),()=>{k.events.off("menuopenchange",z0)}},[L,k.events,y]),f4.useEffect(()=>{if(L.select("floatingParentNodeId")==null)return;function z0(p){if(p.open||p.nodeId!==L.select("floatingParentNodeId"))return;let o=p.reason??K0.siblingOpen;L.setOpen(!1,P0(o))}return k.events.on("menuopenchange",z0),()=>{k.events.off("menuopenchange",z0)}},[k.events,L]),f4.useEffect(()=>{function z0(p){if(!h||p.nodeId!==L.select("floatingParentNodeId"))return;if(p.target&&d&&d!==p.target)L.setOpen(!1,P0(K0.siblingOpen))}return k.events.on("itemhover",z0),()=>{k.events.off("itemhover",z0)}},[k.events,h,d,L]),f4.useEffect(()=>{let z0={open:h,nodeId:y,parentNodeId:g,reason:L.select("lastOpenChangeReason")};k.events.emit("menuopenchange",z0)},[k.events,h,L,y,g]);let l={open:h,side:$0.side,align:$0.align,anchorHidden:$0.anchorHidden,nested:O.type==="menu"},Z0=f4.useMemo(()=>({side:$0.side,align:$0.align,arrowRef:$0.arrowRef,arrowUncentered:$0.arrowUncentered,arrowStyles:$0.arrowStyles,nodeId:$0.context.nodeId}),[$0.side,$0.align,$0.arrowRef,$0.arrowUncentered,$0.arrowStyles,$0.context.nodeId]),q0=T0("div",J,{state:l,stateAttributesMapping:v5,ref:[$,L.useStateSetter("positionerElement")],props:[V0,q8(v),N]}),s=b&&O.type!=="menu"&&(O.type!=="menubar"&&I&&C!==K0.triggerHover||O.type==="menubar"&&O.context.modal),X0=null;if(O.type==="menubar")X0=O.context.contentElement;else if(O.type===void 0)X0=d;return a9.jsxs(oW.Provider,{value:Z0,children:[s&&a9.jsx(Tw,{ref:O.type==="context-menu"||O.type==="nested-context-menu"?O.context.internalBackdropRef:null,inert:i9(!h),cutout:X0}),a9.jsx($J,{id:y,children:a9.jsx(Fb,{elementsRef:L.context.itemDomElements,labelsRef:L.context.itemLabels,children:q0})})]})})});function Mb(){let Z=kw.useContext(VK);if(Z===void 0)throw Error(g0(34));return Z}var kw,VK;var FK=U(()=>{kw=P(f(),1),VK=kw.createContext(void 0)});var s9,Ob,jb;var bb=U(()=>{Zq();y1();FK();_1();s9=P(f(),1),Ob=P(G0(),1),jb=s9.memo(s9.forwardRef(function(J,$){let{render:Q,className:X,value:Y,defaultValue:w,onValueChange:z,disabled:H=!1,...G}=J,[W,q]=qX({controlled:Y,default:w,name:"MenuRadioGroup"}),K=U0(z),B=U0((N,L)=>{if(K?.(N,L),L.isCanceled)return;q(N)}),F=T0("div",J,{state:{disabled:H},ref:$,props:{role:"group","aria-disabled":H||void 0,...G}}),_=s9.useMemo(()=>({value:W,setValue:B,disabled:H}),[W,B,H]);return Ob.jsx(VK.Provider,{value:_,children:F})}))});function Pb(){let Z=Cw.useContext(NK);if(Z===void 0)throw Error(g0(35));return Z}var Cw,NK;var _K=U(()=>{Cw=P(f(),1),NK=Cw.createContext(void 0)});var Sw,Ib,Tb;var kb=U(()=>{y1();H2();_1();J4();FK();_K();pZ();w7();mZ();U6();X5();C1();Sw=P(f(),1),Ib=P(G0(),1),Tb=Sw.forwardRef(function(J,$){let{render:Q,className:X,id:Y,label:w,nativeButton:z=!1,disabled:H=!1,closeOnClick:G=!1,value:W,...q}=J,K=h2({label:w}),B=z2(!0),V=Q5(Y),{store:F}=b1(),_=F.useState("isActive",K.index),N=F.useState("itemProps"),{value:L,setValue:M,disabled:A}=Mb(),O=A||H,D=L===W,{getItemProps:k,itemRef:b}=a6({closeOnClick:G,disabled:O,highlighted:_,id:V,store:F,nativeButton:z,nodeId:B?.nodeId,itemMetadata:x9}),h=Sw.useMemo(()=>({disabled:O,highlighted:_,checked:D}),[O,_,D]),I=U0((v)=>{let C={...P0(K0.itemPress,v.nativeEvent),preventUnmountOnClose:()=>{}};M(W,C)}),d=T0("div",J,{state:h,stateAttributesMapping:o6,props:[N,{role:"menuitemradio","aria-checked":D,onClick:I},q,k],ref:[b,$,K.ref]});return Ib.jsx(NK.Provider,{value:h,children:d})})});var Ew,Cb;var Sb=U(()=>{_K();_1();pZ();LX();v9();Ew=P(f(),1),Cb=Ew.forwardRef(function(J,$){let{render:Q,className:X,keepMounted:Y=!1,...w}=J,z=Pb(),H=Ew.useRef(null),{transitionStatus:G,setMounted:W}=y9(z.checked);E4({open:z.checked,ref:H,onComplete(){if(!z.checked)W(!1)}});let q={checked:z.checked,disabled:z.disabled,highlighted:z.highlighted,transitionStatus:G};return T0("span",J,{state:q,stateAttributesMapping:o6,ref:[$,H],props:{"aria-hidden":!0,...w},enabled:Y||z.checked})})});function hw(Z){let J=Eb.useRef(!0);if(J.current)J.current=!1,Z()}var Eb;var LK=U(()=>{Eb=P(f(),1)});function No(Z){if(typeof document>"u")return!1;let J=f0(Z);return k1(J).innerWidth-J.documentElement.clientWidth>0}function _o(Z){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;let $=f0(Z),Q=$.documentElement,X=$.body,Y=I4(Q)?Q:X,w=Y.style.overflowY,z=Q.style.scrollbarGutter;Q.style.scrollbarGutter="stable",Y.style.overflowY="scroll";let H=Y.offsetWidth;Y.style.overflowY="hidden";let G=Y.offsetWidth;return Y.style.overflowY=w,Q.style.scrollbarGutter=z,H===G}function Lo(Z){let J=f0(Z),$=J.documentElement,Q=J.body,X=I4($)?$:Q,Y={overflowY:X.style.overflowY,overflowX:X.style.overflowX};return Object.assign(X.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(X.style,Y)}}function Ao(Z){let J=f0(Z),$=J.documentElement,Q=J.body,X=k1($),Y=0,w=0,z=!1,H=R2.create();if(TX&&(X.visualViewport?.scale??1)!==1)return()=>{};function G(){let K=X.getComputedStyle($),B=X.getComputedStyle(Q),_=(K.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";Y=$.scrollTop,w=$.scrollLeft,hb={scrollbarGutter:$.style.scrollbarGutter,overflowY:$.style.overflowY,overflowX:$.style.overflowX},xb=$.style.scrollBehavior,Rb={position:Q.style.position,height:Q.style.height,width:Q.style.width,boxSizing:Q.style.boxSizing,overflowY:Q.style.overflowY,overflowX:Q.style.overflowX,scrollBehavior:Q.style.scrollBehavior};let N=$.scrollHeight>$.clientHeight,L=$.scrollWidth>$.clientWidth,M=K.overflowY==="scroll"||B.overflowY==="scroll",A=K.overflowX==="scroll"||B.overflowX==="scroll",O=Math.max(0,X.innerWidth-Q.clientWidth),D=Math.max(0,X.innerHeight-Q.clientHeight),k=parseFloat(B.marginTop)+parseFloat(B.marginBottom),b=parseFloat(B.marginLeft)+parseFloat(B.marginRight),h=I4($)?$:Q;if(z=_o(Z),z){$.style.scrollbarGutter=_,h.style.overflowY="hidden",h.style.overflowX="hidden";return}if(Object.assign($.style,{scrollbarGutter:_,overflowY:"hidden",overflowX:"hidden"}),N||M)$.style.overflowY="scroll";if(L||A)$.style.overflowX="scroll";Object.assign(Q.style,{position:"relative",height:k||D?`calc(100dvh - ${k+D}px)`:"100dvh",width:b||O?`calc(100vw - ${b+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),Q.scrollTop=Y,Q.scrollLeft=w,$.setAttribute("data-base-ui-scroll-locked",""),$.style.scrollBehavior="unset"}function W(){if(Object.assign($.style,hb),Object.assign(Q.style,Rb),!z)$.scrollTop=Y,$.scrollLeft=w,$.removeAttribute("data-base-ui-scroll-locked"),$.style.scrollBehavior=xb}function q(){W(),H.request(G)}return G(),X.addEventListener("resize",q),()=>{if(H.cancel(),W(),typeof X.removeEventListener==="function")X.removeEventListener("resize",q)}}class yb{lockCount=0;restore=null;timeoutLock=s5.create();timeoutUnlock=s5.create();acquire(Z){if(this.lockCount+=1,this.lockCount===1&&this.restore===null)this.timeoutLock.start(0,()=>this.lock(Z));return this.release}release=()=>{if(this.lockCount-=1,this.lockCount===0&&this.restore)this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{if(this.lockCount===0&&this.restore)this.restore?.(),this.restore=null};lock(Z){if(this.lockCount===0||this.restore!==null)return;let $=f0(Z).documentElement,Q=k1($).getComputedStyle($).overflowY;if(Q==="hidden"||Q==="clip"){this.restore=Z4;return}let X=kX||!No(Z);this.restore=X?Lo(Z):Ao(Z)}}function Rw(Z=!0,J=null){F0(()=>{if(!Z)return;return Do.acquire(J)},[Z,J])}var hb,Rb,xb="",Do;var AK=U(()=>{a1();J8();W2();M1();x2();t6();p6();hb={},Rb={};Do=new yb});function yw(Z){let J=xw.useContext(Mo);if(J===null&&!Z)throw Error(g0(5));return J}var xw,Mo;var DK=U(()=>{xw=P(f(),1),Mo=xw.createContext(null)});function vb(Z){let J=LJ.useRef(""),$=LJ.useCallback((X)=>{if(X.defaultPrevented)return;J.current=X.pointerType,Z(X,X.pointerType)},[Z]);return{onClick:LJ.useCallback((X)=>{if(X.detail===0){Z(X,"keyboard");return}if("pointerType"in X)Z(X,X.pointerType);else Z(X,J.current);J.current=""},[Z]),onPointerDown:$}}var LJ;var gb=U(()=>{LJ=P(f(),1)});function vw(Z){let[J,$]=o9.useState(null),Q=U0((z,H)=>{if(!Z)$(H||(kX?"touch":""))}),X=o9.useCallback(()=>{$(null)},[]),{onClick:Y,onPointerDown:w}=vb(Q);return o9.useMemo(()=>({openMethod:J,reset:X,triggerProps:{onClick:Y,onPointerDown:w}}),[J,X,Y,w])}var o9;var MK=U(()=>{y1();gb();J8();o9=P(f(),1)});function jo(){return{...qw(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new V7,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:q1,keyboardEventRelay:void 0,closeDelay:0}}var AJ,Oo,n9;var OK=U(()=>{qJ();p6();Y2();sX();v4();AJ=P(f(),1),Oo={...Kw,disabled:E0((Z)=>Z.parent.type==="menubar"?Z.parent.context.disabled||Z.disabled:Z.disabled),modal:E0((Z)=>(Z.parent.type===void 0||Z.parent.type==="context-menu")&&(Z.modal??!0)),allowMouseEnter:E0((Z)=>Z.allowMouseEnter),stickIfOpen:E0((Z)=>Z.stickIfOpen),parent:E0((Z)=>Z.parent),rootId:E0((Z)=>{if(Z.parent.type==="menu")return Z.parent.store.select("rootId");return Z.parent.type!==void 0?Z.parent.context.rootId:Z.rootId}),activeIndex:E0((Z)=>Z.activeIndex),isActive:E0((Z,J)=>Z.activeIndex===J),hoverEnabled:E0((Z)=>Z.hoverEnabled),instantType:E0((Z)=>Z.instantType),lastOpenChangeReason:E0((Z)=>Z.openChangeReason),floatingTreeRoot:E0((Z)=>{if(Z.parent.type==="menu")return Z.parent.store.select("floatingTreeRoot");return Z.floatingTreeRoot}),floatingNodeId:E0((Z)=>Z.floatingNodeId),floatingParentNodeId:E0((Z)=>Z.floatingParentNodeId),itemProps:E0((Z)=>Z.itemProps),closeDelay:E0((Z)=>Z.closeDelay),keyboardEventRelay:E0((Z)=>{if(Z.keyboardEventRelay)return Z.keyboardEventRelay;if(Z.parent.type==="menu")return Z.parent.store.select("keyboardEventRelay");return})};n9=class n9 extends A7{constructor(Z){super({...jo(),...Z},{positionerRef:AJ.createRef(),popupRef:AJ.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:AJ.createRef(),beforeContentFocusGuardRef:AJ.createRef(),onOpenChangeComplete:void 0,triggerElements:new N6},Oo);this.unsubscribeParentListener=this.observe("parent",(J)=>{if(this.unsubscribeParentListener?.(),J.type==="menu"){this.unsubscribeParentListener=J.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=J.store.context.allowMouseUpTriggerRef;return}if(J.type!==void 0)this.context.allowMouseUpTriggerRef=J.context.allowMouseUpTriggerRef;this.unsubscribeParentListener=null})}setOpen(Z,J){this.state.floatingRootContext.context.events.emit("setOpen",{open:Z,eventDetails:J})}static useStore(Z,J){let $=D1(()=>{return new n9(J)}).current;return Z??$}unsubscribeParentListener=null}});function fw(){return gw.useContext(jK)}var gw,jK;var mw=U(()=>{gw=P(f(),1),jK=gw.createContext(void 0)});var c1,bK,pw;var PK=U(()=>{x2();y1();s6();M1();LK();AK();p6();Qw();M2();H2();DK();j5();Pw();MK();X5();C1();h9();RZ();OK();v4();mw();c1=P(f(),1),bK=P(G0(),1),pw=rq(function(J){let{children:$,open:Q,onOpenChange:X,onOpenChangeComplete:Y,defaultOpen:w=!1,disabled:z=!1,modal:H,loopFocus:G=!0,orientation:W="vertical",actionsRef:q,closeParentOnEsc:K=!1,handle:B,triggerId:V,defaultTriggerId:F=null,highlightItemOnHover:_=!0}=J,N=C4(!0),L=b1(!0),M=yw(!0),A=fw(),O=c1.useMemo(()=>{if(A&&L)return{type:"menu",store:L.store};if(M)return{type:"menubar",context:M};if(N&&!L)return{type:"context-menu",context:N};return{type:void 0}},[N,L,M,A]),D=n9.useStore(B?.store,{open:w,openProp:Q,activeTriggerId:F,triggerIdProp:V,parent:O});hw(()=>{if(Q===void 0&&D.state.open===!1&&w===!0)D.update({open:!0,activeTriggerId:F})}),D.useControlledProp("openProp",Q),D.useControlledProp("triggerIdProp",V),D.useContextCallback("onOpenChangeComplete",Y);let k=D.useState("floatingTreeRoot"),b=F7(k),h=U5();F0(()=>{if(N&&!L)D.update({parent:{type:"context-menu",context:N},floatingNodeId:b,floatingParentNodeId:h});else if(L)D.update({floatingNodeId:b,floatingParentNodeId:h})},[N,L,b,h,D]);let I=D.useState("open"),d=D.useState("activeTriggerElement"),v=D.useState("positionerElement"),C=D.useState("hoverEnabled"),y=D.useState("modal"),g=D.useState("disabled"),S=D.useState("lastOpenChangeReason"),x=D.useState("parent"),E=D.useState("activeIndex"),m=D.useState("payload"),j=D.useState("floatingParentNodeId"),H0=c1.useRef(null),w0=j!=null,T;D.useSyncedValues({disabled:z,modal:x.type===void 0?H:void 0,rootId:G2()});let{openMethod:$0,triggerProps:V0,reset:l}=vw(I);Hw(D);let{forceUnmount:Z0}=Gw(I,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),l()}),q0=c1.useRef(x.type!=="context-menu"),s=b5();c1.useEffect(()=>{if(!I)H0.current=null;if(x.type!=="context-menu")return;if(!I){s.clear(),q0.current=!1;return}s.start(500,()=>{q0.current=!0})},[s,I,x.type]),Rw(I&&y&&S!==K0.triggerHover&&$0!=="touch",v),F0(()=>{if(!I&&!C)D.set("hoverEnabled",!0)},[I,C,D]);let X0=c1.useRef(!0),z0=b5(),p=U0((x0,s0)=>{let J1=s0.reason;if(I===x0&&s0.trigger===d&&S===J1)return;if(s0.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!x0&&s0.trigger==null)s0.trigger=d??void 0;if(X?.(x0,s0),s0.isCanceled)return;let y0={open:x0,nativeEvent:s0.event,reason:s0.reason,nested:w0};T?.emit("openchange",y0);let G1=s0.event;if(x0===!1&&G1?.type==="click"&&G1.pointerType==="touch"&&!X0.current)return;if(!x0&&E!==null){let Z1=D.context.itemDomElements.current[E];queueMicrotask(()=>{Z1?.setAttribute("tabindex","-1")})}if(x0&&J1===K0.triggerFocus)X0.current=!1,z0.start(300,()=>{X0.current=!0});else X0.current=!0,z0.clear();let A5=(J1===K0.triggerPress||J1===K0.itemPress)&&G1.detail===0&&G1?.isTrusted,m1=!x0&&(J1===K0.escapeKey||J1==null),D5={open:x0,openChangeReason:J1};H0.current=s0.event??null;let t0=s0.trigger?.id??null;if(t0||x0)D5.activeTriggerId=t0,D5.activeTriggerElement=s0.trigger??null;if(D.update(D5),x.type==="menubar"&&(J1===K0.triggerFocus||J1===K0.focusOut||J1===K0.triggerHover||J1===K0.listNavigation||J1===K0.siblingOpen))D.set("instantType","group");else if(A5||m1)D.set("instantType",A5?"click":"dismiss");else D.set("instantType",void 0)}),o=c1.useCallback((x0)=>{let s0=P0(x0);return s0.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},s0},[D]),t=c1.useCallback(()=>{D.setOpen(!1,o(K0.imperativeAction))},[D,o]);c1.useImperativeHandle(q,()=>({unmount:Z0,close:t}),[Z0,t]);let N0;if(x.type==="context-menu")N0=x.context;c1.useImperativeHandle(N0?.positionerRef,()=>v,[v]),c1.useImperativeHandle(N0?.actionsRef,()=>({setOpen:p}),[p]);let a=BJ({popupStore:D,onOpenChange:p});T=a.context.events,c1.useEffect(()=>{let x0=({open:s0,eventDetails:J1})=>p(s0,J1);return T.on("setOpen",x0),()=>{T?.off("setOpen",x0)}},[T,p]);let J0=GJ(a,{enabled:!g,bubbles:{escapeKey:K&&x.type==="menu"},outsidePress(){if(x.type!=="context-menu"||H0.current?.type==="contextmenu")return!0;return q0.current},externalTree:w0?k:void 0}),r=FJ(a,{role:"menu"}),n=K8(),Q0=c1.useCallback((x0)=>{if(D.select("activeIndex")===x0)return;D.set("activeIndex",x0)},[D]),i=wK(a,{enabled:!g,listRef:D.context.itemDomElements,activeIndex:E,nested:x.type!==void 0,loopFocus:G,orientation:W,parentOrientation:x.type==="menubar"?x.context.orientation:void 0,rtl:n==="rtl",disabledIndices:E9,onNavigate:Q0,openOnArrowKeyDown:x.type!=="context-menu",externalTree:w0?k:void 0,focusItemOnHover:_}),L0=c1.useCallback((x0)=>{D.context.typingRef.current=x0},[D]),I0=YK(a,{listRef:D.context.itemLabels,activeIndex:E,resetMs:PD,onMatch:(x0)=>{if(I&&x0!==E)D.set("activeIndex",x0)},onTypingChange:L0}),{getReferenceProps:n0,getFloatingProps:W1,getItemProps:R,getTriggerProps:u}=H4([J0,r,i,I0]),e=c1.useMemo(()=>{let x0=K6(n0(),{onMouseMove(){D.set("allowMouseEnter",!0)}},V0);return delete x0.role,x0},[n0,D,V0]),B0=c1.useMemo(()=>{let x0=u();if(!x0)return x0;let s0=K6(x0,V0);return delete s0.role,delete s0["aria-controls"],s0},[u,V0]),M0=c1.useMemo(()=>W1({onMouseMove(){if(D.set("allowMouseEnter",!0),x.type==="menu")D.set("hoverEnabled",!1)},onClick(){if(D.select("hoverEnabled"))D.set("hoverEnabled",!1)},onKeyDown(x0){let s0=D.select("keyboardEventRelay");if(s0&&!x0.isPropagationStopped())s0(x0)}}),[W1,x.type,D]),i0=c1.useMemo(()=>R(),[R]);D.useSyncedValues({floatingRootContext:a,activeTriggerProps:e,inactiveTriggerProps:B0,popupProps:M0,itemProps:i0});let T1=c1.useMemo(()=>({store:D,parent:O}),[D,O]),f1=bK.jsx(nW.Provider,{value:T1,children:typeof $==="function"?$({payload:m}):$});if(x.type===void 0||x.type==="context-menu")return bK.jsx(QJ,{externalTree:k,children:f1});return f1})});function mb(Z){let J=b1().store,$=fb.useMemo(()=>({parentMenu:J}),[J]);return IK.jsx(jK.Provider,{value:$,children:IK.jsx(pw,{...Z})})}var fb,IK;var pb=U(()=>{PK();H2();mw();fb=P(f(),1),IK=P(G0(),1)});function ub(Z){let J=Z.getBoundingClientRect(),$=window.getComputedStyle(Z,"::before"),Q=window.getComputedStyle(Z,"::after");if(!($.content!=="none"||Q.content!=="none"))return J;let Y=parseFloat($.width)||0,w=parseFloat($.height)||0,z=parseFloat(Q.width)||0,H=parseFloat(Q.height)||0,G=Math.max(J.width,Y,z),W=Math.max(J.height,w,H),q=G-J.width,K=W-J.height;return{left:J.left-q/2,right:J.right+q/2,top:J.top-K/2,bottom:J.bottom+K/2}}function cb(Z={}){let{highlightItemOnHover:J,highlightedIndex:$,onHighlightedIndexChange:Q}=k9(),{ref:X,index:Y}=h2(Z),w=$===Y,z=uw.useRef(null),H=T4(X,z);return{compositeProps:uw.useMemo(()=>({tabIndex:w?0:-1,onFocus(){Q(Y)},onMouseMove(){let W=z.current;if(!J||!W)return;let q=W.hasAttribute("disabled")||W.ariaDisabled==="true";if(!w&&!q)W.focus()}}),[w,Q,Y,J]),compositeRef:H,index:Y}}var uw;var db=U(()=>{yZ();eQ();w7();uw=P(f(),1)});function lb(Z){let{render:J,className:$,state:Q=q1,props:X=E9,refs:Y=E9,metadata:w,stateAttributesMapping:z,tag:H="div",...G}=Z,{compositeProps:W,compositeRef:q}=cb({metadata:w});return T0(H,Z,{state:Q,ref:[...Y,q],props:[W,...X,G],stateAttributesMapping:z})}var rb=U(()=>{_1();db();j5()});function TK(Z){if(w1(Z)&&Z.hasAttribute("data-rootownerid"))return Z.getAttribute("data-rootownerid")??void 0;if(A2(Z))return;return TK(_2(Z))}var ib=U(()=>{a1()});function ab(Z){let{enabled:J=!0,mouseDownAction:$,open:Q}=Z,X=cw.useRef(!1);return cw.useMemo(()=>{if(!J)return q1;return{onMouseDown:(Y)=>{if($==="open"&&!Q||$==="close"&&Q)X.current=!0,f0(Y.currentTarget).addEventListener("click",()=>{X.current=!1},{once:!0})},onClick:(Y)=>{if(X.current)X.current=!1,Y.preventBaseUIHandler()}}},[J,$,Q])}var cw;var sb=U(()=>{W2();j5();cw=P(f(),1)});function bo(Z,J){let $=b5(),[Q,X]=f5.useState(!1);return F0(()=>{if(Z&&J==="trigger-hover")X(!0),$.start(JX,()=>{X(!1)});else if(!Z)$.clear(),X(!1)},[Z,J,$]),Q}function Po(){let Z=C4(!0),J=b1(!0),$=yw(!0);return f5.useMemo(()=>{if($)return{type:"menubar",context:$};if(Z&&!J)return{type:"context-menu",context:Z};return{type:void 0}},[Z,J,$])}var f5,kK,U8,dw=2,ob;var nb=U(()=>{x2();W2();Qw();y1();M1();p6();M2();sX();t5();H2();E2();_1();xZ();rb();eQ();ib();v4();J4();C1();sb();h9();DK();j5();iZ();X5();f5=P(f(),1),kK=P(s2(),1),U8=P(G0(),1),ob=Mj(function(J,$){let{render:Q,className:X,disabled:Y=!1,nativeButton:w=!0,id:z,openOnHover:H,delay:G=100,closeDelay:W=0,handle:q,payload:K,...B}=J,V=b1(!0),F=q?.store??V?.store;if(!F)throw Error(g0(85));let _=Q5(z),N=F.useState("isTriggerActive",_),L=F.useState("floatingRootContext"),M=F.useState("isOpenedByTrigger",_),A=f5.useRef(null),O=Po(),D=k9(!0),k=g5(),b=f5.useMemo(()=>{return k??new V7},[k]),h=F7(b),I=U5(),{registerTrigger:d,isMountedByThisTrigger:v}=zw(_,A,F,{payload:K,closeDelay:W,parent:O,floatingTreeRoot:b,floatingNodeId:h,floatingParentNodeId:I,keyboardEventRelay:D?.relayKeyboardEvent}),C=O.type==="menubar",y=F.useState("disabled"),g=Y||y||C&&O.context.disabled,{getButtonProps:S,buttonRef:x}=e2({disabled:g,native:w});f5.useEffect(()=>{if(!M&&O.type===void 0)F.context.allowMouseUpTriggerRef.current=!1},[F,M,O.type]);let E=f5.useRef(null),m=b5(),j=U0((J0)=>{if(!E.current)return;m.clear(),F.context.allowMouseUpTriggerRef.current=!1;let r=J0.target;if(R0(E.current,r)||R0(F.select("positionerElement"),r)||r===E.current)return;if(r!=null&&TK(r)===F.select("rootId"))return;let n=ub(E.current);if(J0.clientX>=n.left-dw&&J0.clientX<=n.right+dw&&J0.clientY>=n.top-dw&&J0.clientY<=n.bottom+dw)return;b.events.emit("close",{domEvent:J0,reason:K0.cancelOpen})});f5.useEffect(()=>{if(M&&F.select("lastOpenChangeReason")===K0.triggerHover)f0(E.current).addEventListener("mouseup",j,{once:!0})},[M,j,F]);let H0=C&&O.context.hasSubmenuOpen,T=O7(L,{enabled:(H??H0)&&!g&&O.type!=="context-menu"&&(!C||H0&&!v),handleClose:b7({blockPointerEvents:!C}),mouseOnly:!0,move:!1,restMs:O.type===void 0?G:void 0,delay:{close:W},triggerElementRef:A,externalTree:b,isActiveTrigger:N}),$0=bo(M,F.select("lastOpenChangeReason")),V0=N7(L,{enabled:!g&&O.type!=="context-menu",event:M&&C?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:O.type===void 0?$0:!1}),l=ZK(L,{enabled:!g&&H0}),Z0=ab({open:M,enabled:C,mouseDownAction:"open"}),q0=H4([V0,l]),s={disabled:g,open:M},X0=F.useState("triggerProps",v),z0=[E,$,x,d,A],p=[q0.getReferenceProps(),T??q1,X0,{"aria-haspopup":"menu",id:_,onMouseDown:(J0)=>{if(F.select("open"))return;m.start(200,()=>{F.context.allowMouseUpTriggerRef.current=!0}),f0(J0.currentTarget).addEventListener("mouseup",j,{once:!0})}},C?{role:"menuitem"}:{},Z0,B,S],o=f5.useRef(null),t=U0((J0)=>{kK.flushSync(()=>{F.setOpen(!1,P0(K0.focusOut,J0.nativeEvent,J0.currentTarget))}),lX(o.current)?.focus()}),N0=U0((J0)=>{let r=F.select("positionerElement");if(r&&Y4(J0,r))F.context.beforeContentFocusGuardRef.current?.focus();else{kK.flushSync(()=>{F.setOpen(!1,P0(K0.focusOut,J0.nativeEvent,J0.currentTarget))});let n=dX(F.context.triggerFocusTargetRef.current||A.current);while(n!==null&&R0(r,n)){let Q0=n;if(n=w8(n),n===Q0)break}n?.focus()}}),a=T0("button",J,{enabled:!C,stateAttributesMapping:fZ,state:s,ref:z0,props:p});if(C)return U8.jsx(lb,{tag:"button",render:Q,className:X,state:s,refs:z0,props:p,stateAttributesMapping:fZ});if(M)return U8.jsxs(f5.Fragment,{children:[U8.jsx(y2,{ref:o,onFocus:t},`${_}-pre-focus-guard`),U8.jsx(f5.Fragment,{children:a},_),U8.jsx(y2,{ref:F.context.triggerFocusTargetRef,onFocus:N0},`${_}-post-focus-guard`)]});return U8.jsx(f5.Fragment,{children:a},_)})});var tb,eb;var ZP=U(()=>{_1();tb=P(f(),1),eb=tb.forwardRef(function(J,$){let{className:Q,render:X,orientation:Y="horizontal",...w}=J;return T0("div",J,{state:{orientation:Y},ref:$,props:[{role:"separator","aria-orientation":Y},w]})})});var _6,JP;var $P=U(()=>{M2();H2();J4();E2();w7();mZ();_1();U6();v4();mw();_6=P(f(),1),JP=_6.forwardRef(function(J,$){let{render:Q,className:X,label:Y,id:w,nativeButton:z=!1,openOnHover:H=!0,delay:G=100,closeDelay:W=0,disabled:q=!1,...K}=J,B=h2(),V=z2(),{store:F}=b1(),_=Q5(w),N=F.useState("open"),L=F.useState("floatingRootContext"),M=F.useState("floatingTreeRoot"),A=nq(_,F),O=_6.useCallback((V0)=>{let l=A(V0);if(V0!==null&&F.select("open")&&F.select("activeTriggerId")==null)F.update({activeTriggerId:_,activeTriggerElement:V0,closeDelay:W});return l},[A,W,F,_]),D=_6.useRef(null),k=_6.useCallback((V0)=>{D.current=V0,F.set("activeTriggerElement",V0)},[F]),b=fw();if(!b?.parentMenu)throw Error(g0(37));F.useSyncedValue("closeDelay",W);let h=b.parentMenu,I=h.useState("itemProps"),d=h.useState("isActive",B.index),v=_6.useMemo(()=>({type:"submenu-trigger",setActive(){h.set("activeIndex",B.index)}}),[h,B.index]),C=F.useState("disabled"),y=q||C,{getItemProps:g,itemRef:S}=a6({closeOnClick:!1,disabled:y,highlighted:d,id:_,store:F,nativeButton:z,itemMetadata:v,nodeId:V?.nodeId}),x=F.useState("hoverEnabled"),E=h.useState("allowMouseEnter"),m=O7(L,{enabled:x&&H&&!y,handleClose:b7({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:G,delay:E?{open:G,close:W}:0,triggerElementRef:D,externalTree:M}),j=N7(L,{enabled:!y,event:"mousedown",toggle:!H,ignoreMouse:H,stickIfOpen:!1}),H0=H4([j]),w0=F.useState("triggerProps",!0);return delete w0.id,T0("div",J,{state:{disabled:y,highlighted:d,open:N},stateAttributesMapping:GX,props:[H0.getReferenceProps(),m,w0,I,{tabIndex:N||d?0:-1,onBlur(){if(d)h.set("activeIndex",null)}},K,g],ref:[$,B.ref,S,O,k]})})});class lw{constructor(){this.store=new n9}open(Z){let J=Z?this.store.context.triggerElements.getById(Z):void 0;if(Z&&!J)throw Error(g0(83,Z));this.store.setOpen(!0,P0("imperative-action",void 0,J))}close(){this.store.setOpen(!1,P0("imperative-action",void 0,void 0))}get isOpen(){return this.store.state.open}}function QP(){return new lw}var XP=U(()=>{X5();OK()});var j2={};N9(j2,{createHandle:()=>QP,Trigger:()=>ob,SubmenuTrigger:()=>JP,SubmenuRoot:()=>mb,Separator:()=>eb,Root:()=>pw,RadioItemIndicator:()=>Cb,RadioItem:()=>Tb,RadioGroup:()=>jb,Positioner:()=>Ab,Portal:()=>wb,Popup:()=>Jb,LinkItem:()=>vM,Item:()=>xM,Handle:()=>lw,GroupLabel:()=>EM,Group:()=>kM,CheckboxItemIndicator:()=>bM,CheckboxItem:()=>LM,Backdrop:()=>WM,Arrow:()=>zM});var wP=U(()=>{HM();qM();AM();PM();CM();hM();yM();gM();$b();Yb();Db();bb();kb();Sb();PK();pb();nb();ZP();$P();XP()});var YP=U(()=>{wP()});function t9({...Z}){return Z2.jsx(j2.Root,{"data-slot":"dropdown-menu",...Z})}function e9({...Z}){return Z2.jsx(j2.Trigger,{"data-slot":"dropdown-menu-trigger",...Z})}function Z3({align:Z="start",alignOffset:J=0,side:$="bottom",sideOffset:Q=4,className:X,...Y}){return Z2.jsx(j2.Portal,{children:Z2.jsx(j2.Positioner,{className:"isolate z-50 outline-none",align:Z,alignOffset:J,side:$,sideOffset:Q,children:Z2.jsx(j2.Popup,{"data-slot":"dropdown-menu-content",className:v0("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",X),...Y})})})}function zP({...Z}){return Z2.jsx(j2.Group,{"data-slot":"dropdown-menu-group",...Z})}function DJ({className:Z,inset:J,variant:$="default",...Q}){return Z2.jsx(j2.Item,{"data-slot":"dropdown-menu-item","data-inset":J,"data-variant":$,className:v0("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-xs px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",Z),...Q})}function HP({...Z}){return Z2.jsx(j2.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...Z})}function CK({className:Z,children:J,inset:$,...Q}){return Z2.jsxs(j2.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":$,className:v0("relative flex cursor-default items-center gap-2 rounded-xs py-1 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",Z),...Q,children:[Z2.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:Z2.jsx(j2.RadioItemIndicator,{children:Z2.jsx(NW,{stroke:1.5})})}),J]})}function GP({className:Z,...J}){return Z2.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:v0("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",Z),...J})}var Z2;var rw=U(()=>{YP();N2();k5();Z2=P(G0(),1)});function WP({workspaceId:Z}){let J=oA(Z),$=J.data?.items??[],Q=J.data?.cols??4,X=$.length?Math.max(...$.map((z)=>z.y+z.h)):0,Y=$.length>0&&X>0,w=J.data!==void 0&&!Y;return J3.jsxs("div",{className:"flex size-24 shrink-0 items-center justify-center rounded-lg bg-muted p-2",children:[Y&&J3.jsx("svg",{viewBox:`0 0 ${Q} ${X}`,preserveAspectRatio:"none",className:"size-full animate-in duration-300 fade-in",children:$.map((z,H)=>J3.jsx("rect",{x:z.x+0.06,y:z.y+0.06,width:z.w-0.12,height:z.h-0.12,rx:0.12,className:"fill-muted-foreground/30"},H))}),w&&J3.jsx(TZ,{size:20,stroke:1.5,className:"animate-in text-muted-foreground/40 duration-300 fade-in"})]})}var J3;var qP=U(()=>{N2();e8();J3=P(G0(),1)});function KP({type:Z,className:J}){return c0.jsx("img",{src:Io[Z],alt:"","aria-label":To[Z],className:v0("size-4 shrink-0",J)})}function BP(){let Z=pQ(),J=ZD(),$=JD(),Q=$D();if(Z.isPending||J.isPending)return c0.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:c0.jsx(W6,{size:20,stroke:1.5,className:"animate-spin text-muted-foreground"})});if(Z.isError||J.isError)return c0.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:c0.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load workspaces."})});let X=Z.data,Y=J.data,w=X.length,z=$.isPending&&$.variables?$.variables.path:null;return c0.jsxs("div",{className:"mx-auto w-full max-w-3xl px-8 pt-14 pb-16",children:[w>0&&c0.jsx("div",{className:"mb-10 grid grid-cols-2 gap-3",children:X.map((H)=>c0.jsx(ko,{workspace:H,onRemove:(G)=>Q.mutate(G)},H.id))}),w===0&&Y.length===0&&c0.jsxs("p",{className:"mb-10 text-sm text-muted-foreground",children:["No workspaces yet. Run"," ",c0.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-xs",children:"moi start"})," in a project directory."]}),Y.length>0&&c0.jsxs("section",{children:[c0.jsxs("div",{className:"mb-4",children:[c0.jsx("h2",{className:"mb-1.5 text-sm font-semibold text-foreground",children:"Found on your machine"}),c0.jsx("p",{className:"text-xs text-muted-foreground",children:"Discovered via Claude Code and OpenClaw"})]}),c0.jsx("ul",{className:"border-t border-border",children:Y.map((H)=>c0.jsx(Co,{suggestion:H,onAdd:(G)=>$.mutate(G),loading:z===H.path},H.path))})]})]})}function ko({workspace:Z,onRemove:J}){let $=UP(Z),Q=So(Z.addedAt);function X(){let Y=`Remove "${$}" from your workspaces?
|
|
16
|
+
|
|
17
|
+
This only removes it from your list. The folder and its sessions stay on disk — you can add it back any time.`;if(window.confirm(Y))J(Z)}return c0.jsxs("a",{href:`/workspace/${Z.id}`,className:v0("group flex gap-3.5 rounded-xl border border-border bg-card p-2 hover:bg-muted/40","transition-colors"),children:[c0.jsx(WP,{workspaceId:Z.id}),c0.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5 py-1 pr-2 pl-1",children:[c0.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c0.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c0.jsx(KP,{type:Z.type??"claude-code"}),c0.jsx("span",{className:"truncate text-sm font-semibold text-foreground",children:$})]}),c0.jsxs(t9,{children:[c0.jsx(e9,{render:c0.jsx($5,{variant:"ghost",size:"icon-sm",onClick:(Y)=>{Y.preventDefault(),Y.stopPropagation()},className:"-mt-0.5 -mr-1 text-muted-foreground","aria-label":"More actions",children:c0.jsx(AW,{stroke:1.5})})}),c0.jsx(Z3,{align:"end",sideOffset:4,className:"min-w-40",children:c0.jsxs(DJ,{variant:"destructive",onClick:(Y)=>{Y.preventDefault(),Y.stopPropagation(),X()},children:[c0.jsx(hW,{stroke:1.5}),"Remove"]})})]})]}),c0.jsx("div",{title:Z.path,className:"truncate font-mono text-xs text-muted-foreground",children:Z.displayPath??Z.path}),c0.jsx("div",{className:"flex-1"}),c0.jsx("div",{className:"text-xs text-muted-foreground",children:Q})]})]})}function Co({suggestion:Z,onAdd:J,loading:$}){let{path:Q,type:X}=Z,Y=UP(Z);return c0.jsxs("li",{className:"flex items-center gap-3 border-b border-border px-1 py-2.5",children:[c0.jsx(KP,{type:X,className:"opacity-70"}),c0.jsx("span",{className:"shrink-0 text-sm font-medium text-foreground/80",children:Y}),c0.jsx("span",{title:Q,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:Z.displayPath??Q}),c0.jsxs($5,{variant:"outline",size:"sm",onClick:()=>J(Z),disabled:$,children:[$?c0.jsx(W6,{stroke:1.5,className:"animate-spin"}):c0.jsx(q6,{stroke:1.5}),"Add"]})]})}function UP(Z){if(Z.name)return Z.name;if(Z.type==="openclaw")return Z.agentId??"OpenClaw agent";return Z.path.split("/").pop()||Z.path}function So(Z){let J=Date.now()-new Date(Z).getTime(),$=Math.floor(J/60000);if($<1)return"Added just now";if($<60)return`Added ${$} min${$===1?"":"s"} ago`;let Q=Math.floor($/60);if(Q<24)return`Added ${Q} hour${Q===1?"":"s"} ago`;let X=Math.floor(Q/24);if(X<30)return`Added ${X} day${X===1?"":"s"} ago`;return`Added ${new Date(Z).toLocaleDateString()}`}var c0,Io,To;var VP=U(()=>{N2();e8();xW();yW();vW();r6();rw();k5();qP();c0=P(G0(),1),Io={"claude-code":cQ,openclaw:lQ,hermes:dQ},To={"claude-code":"Claude Code",openclaw:"OpenClaw",hermes:"Hermes"}});var FP,L6;var MJ=U(()=>{FP=P(f(),1),L6=FP.createContext({})});function $3(Z){let J=NP.useRef(null);if(J.current===null)J.current=Z();return J.current}var NP;var iw=U(()=>{NP=P(f(),1)});var _P;var LP=U(()=>{_P=typeof window<"u"});var aw,Q3;var sw=U(()=>{LP();aw=P(f(),1),Q3=_P?aw.useLayoutEffect:aw.useEffect});var AP,V8;var OJ=U(()=>{AP=P(f(),1),V8=AP.createContext(null)});function P7(Z,J){if(Z.indexOf(J)===-1)Z.push(J)}function F8(Z,J){let $=Z.indexOf(J);if($>-1)Z.splice($,1)}var SK=()=>{};var H5=(Z,J,$)=>{if($>J)return J;if($<Z)return Z;return $};var DP=()=>{};function EK(Z,J){return J?`${Z}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${J}`:Z}var MP=()=>{};var m4=()=>{},K2=()=>{};var hK=U(()=>{MP();if(typeof process<"u"&&process.env?.NODE_ENV!=="production")m4=(Z,J,$)=>{if(!Z&&typeof console<"u")console.warn(EK(J,$))},K2=(Z,J,$)=>{if(!Z)throw Error(EK(J,$))}});var m5;var OP=U(()=>{m5={}});var jJ=(Z)=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(Z);var jP=()=>{};function bJ(Z){return typeof Z==="object"&&Z!==null}var bP=()=>{};var PJ=(Z)=>/^0[^.\s]+$/u.test(Z);var PP=()=>{};function IJ(Z){let J;return()=>{if(J===void 0)J=Z();return J}}var IP=()=>{};var d1=(Z)=>Z;var ow=()=>{};var Eo=(Z,J)=>($)=>J(Z($)),G4=(...Z)=>Z.reduce(Eo);var TP=()=>{};var p4=(Z,J,$)=>{let Q=J-Z;return Q===0?1:($-Z)/Q};var kP=()=>{};class N8{constructor(){this.subscriptions=[]}add(Z){return P7(this.subscriptions,Z),()=>F8(this.subscriptions,Z)}notify(Z,J,$){let Q=this.subscriptions.length;if(!Q)return;if(Q===1)this.subscriptions[0](Z,J,$);else for(let X=0;X<Q;X++){let Y=this.subscriptions[X];Y&&Y(Z,J,$)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}var CP=U(()=>{SK()});var G5=(Z)=>Z*1000,N5=(Z)=>Z/1000;var SP=()=>{};function TJ(Z,J){return J?Z*(1000/J):0}var EP=()=>{};function xo(Z,J,$,Q,X){let Y,w,z=0;do if(w=J+($-J)/2,Y=hP(w,Q,X)-Z,Y>0)$=w;else J=w;while(Math.abs(Y)>ho&&++z<Ro);return w}function _8(Z,J,$,Q){if(Z===J&&$===Q)return d1;let X=(Y)=>xo(Y,0,1,Z,$);return(Y)=>Y===0||Y===1?Y:hP(X(Y),J,Q)}var hP=(Z,J,$)=>(((1-3*$+3*J)*Z+(3*$-6*J))*Z+3*J)*Z,ho=0.0000001,Ro=12;var nw=U(()=>{ow()});var tw=(Z)=>(J)=>J<=0.5?Z(2*J)/2:(2-Z(2*(1-J)))/2;var RK=()=>{};var ew=(Z)=>(J)=>1-Z(1-J);var xK=()=>{};var ZY,X3,kJ;var JY=U(()=>{nw();RK();xK();ZY=_8(0.33,1.53,0.69,0.99),X3=ew(ZY),kJ=tw(X3)});var CJ=(Z)=>(Z*=2)<1?0.5*X3(Z):0.5*(2-Math.pow(2,-10*(Z-1)));var yK=U(()=>{JY()});var SJ=(Z)=>1-Math.sin(Math.acos(Z)),EJ,hJ;var vK=U(()=>{RK();xK();EJ=ew(SJ),hJ=tw(SJ)});var gK,fK,RJ;var mK=U(()=>{nw();gK=_8(0.42,0,1,1),fK=_8(0,0,0.58,1),RJ=_8(0.42,0,0.58,1)});var pK=(Z)=>{return Array.isArray(Z)&&typeof Z[0]!=="number"};var RP=()=>{};var xJ=(Z)=>Array.isArray(Z)&&typeof Z[0]==="number";var uK=()=>{};var xP,yo=(Z)=>{return typeof Z==="string"},$Y=(Z)=>{if(xJ(Z)){K2(Z.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[J,$,Q,X]=Z;return _8(J,$,Q,X)}else if(yo(Z))return K2(xP[Z]!==void 0,`Invalid easing type '${Z}'`,"invalid-easing-type"),xP[Z];return Z};var yP=U(()=>{hK();ow();yK();JY();vK();nw();mK();uK();xP={linear:d1,easeIn:gK,easeInOut:RJ,easeOut:fK,circIn:SJ,circInOut:hJ,circOut:EJ,backIn:X3,backInOut:kJ,backOut:ZY,anticipate:CJ}});var m0=U(()=>{SK();DP();hK();OP();jP();bP();PP();IP();ow();TP();kP();CP();SP();EP();yK();JY();vK();mK();uK();RP();yP()});var yJ;var vP=U(()=>{yJ=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"]});var b2;var QY=U(()=>{b2={value:null,addProjectionMetrics:null}});function gP(Z,J){let $=new Set,Q=new Set,X=!1,Y=!1,w=new WeakSet,z={delta:0,timestamp:0,isProcessing:!1},H=0;function G(q){if(w.has(q))W.schedule(q),Z();H++,q(z)}let W={schedule:(q,K=!1,B=!1)=>{let F=B&&X?$:Q;if(K)w.add(q);if(!F.has(q))F.add(q);return q},cancel:(q)=>{Q.delete(q),w.delete(q)},process:(q)=>{if(z=q,X){Y=!0;return}if(X=!0,[$,Q]=[Q,$],$.forEach(G),J&&b2.value)b2.value.frameloop[J].push(H);if(H=0,$.clear(),X=!1,Y)Y=!1,W.process(q)}};return W}var fP=U(()=>{QY()});function XY(Z,J){let $=!1,Q=!0,X={delta:0,timestamp:0,isProcessing:!1},Y=()=>$=!0,w=yJ.reduce((M,A)=>{return M[A]=gP(Y,J?A:void 0),M},{}),{setup:z,read:H,resolveKeyframes:G,preUpdate:W,update:q,preRender:K,render:B,postRender:V}=w,F=()=>{let M=m5.useManualTiming?X.timestamp:performance.now();if($=!1,!m5.useManualTiming)X.delta=Q?16.666666666666668:Math.max(Math.min(M-X.timestamp,vo),1);if(X.timestamp=M,X.isProcessing=!0,z.process(X),H.process(X),G.process(X),W.process(X),q.process(X),K.process(X),B.process(X),V.process(X),X.isProcessing=!1,$&&J)Q=!1,Z(F)},_=()=>{if($=!0,Q=!0,!X.isProcessing)Z(F)};return{schedule:yJ.reduce((M,A)=>{let O=w[A];return M[A]=(D,k=!1,b=!1)=>{if(!$)_();return O.schedule(D,k,b)},M},{}),cancel:(M)=>{for(let A=0;A<yJ.length;A++)w[yJ[A]].cancel(M)},state:X,steps:w}}var vo=40;var cK=U(()=>{m0();vP();fP()});var p0,B2,s1,vJ;var W4=U(()=>{m0();cK();({schedule:p0,cancel:B2,state:s1,steps:vJ}=XY(typeof requestAnimationFrame<"u"?requestAnimationFrame:d1,!0))});function go(){wY=void 0}var wY,l1;var A6=U(()=>{m0();W4();l1={now:()=>{if(wY===void 0)l1.set(s1.isProcessing||m5.useManualTiming?s1.timestamp:performance.now());return wY},set:(Z)=>{wY=Z,queueMicrotask(go)}}});var u4;var YY=U(()=>{u4={layout:0,mainThread:0,waapi:0}});function dK(Z){if(typeof Z!=="string")return!1;return Z.split("/*")[0].includes("var(--")}var mP=(Z)=>(J)=>typeof J==="string"&&J.startsWith(Z),zY,fo,w3=(Z)=>{if(!fo(Z))return!1;return mo.test(Z.split("/*")[0].trim())},mo;var Y3=U(()=>{zY=mP("--"),fo=mP("var(--"),mo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu});var c4,D6,gJ;var L8=U(()=>{m0();c4={test:(Z)=>typeof Z==="number",parse:parseFloat,transform:(Z)=>Z},D6={...c4,transform:(Z)=>H5(0,1,Z)},gJ={...c4,default:1}});var A8=(Z)=>Math.round(Z*1e5)/1e5;var HY=()=>{};var z3;var GY=U(()=>{z3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu});function pP(Z){return Z==null}var uP=()=>{};var cP;var dP=U(()=>{cP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu});var H3=(Z,J)=>($)=>{return Boolean(typeof $==="string"&&cP.test($)&&$.startsWith(Z)||J&&!pP($)&&Object.prototype.hasOwnProperty.call($,J))},WY=(Z,J,$)=>(Q)=>{if(typeof Q!=="string")return Q;let[X,Y,w,z]=Q.match(z3);return{[Z]:parseFloat(X),[J]:parseFloat(Y),[$]:parseFloat(w),alpha:z!==void 0?parseFloat(z):1}};var qY=U(()=>{GY();uP();dP()});var po=(Z)=>H5(0,255,Z),lK,d4;var KY=U(()=>{m0();L8();HY();qY();lK={...c4,transform:(Z)=>Math.round(po(Z))},d4={test:H3("rgb","red"),parse:WY("red","green","blue"),transform:({red:Z,green:J,blue:$,alpha:Q=1})=>"rgba("+lK.transform(Z)+", "+lK.transform(J)+", "+lK.transform($)+", "+A8(D6.transform(Q))+")"}});function uo(Z){let J="",$="",Q="",X="";if(Z.length>5)J=Z.substring(1,3),$=Z.substring(3,5),Q=Z.substring(5,7),X=Z.substring(7,9);else J=Z.substring(1,2),$=Z.substring(2,3),Q=Z.substring(3,4),X=Z.substring(4,5),J+=J,$+=$,Q+=Q,X+=X;return{red:parseInt(J,16),green:parseInt($,16),blue:parseInt(Q,16),alpha:X?parseInt(X,16)/255:1}}var fJ;var rK=U(()=>{KY();qY();fJ={test:H3("#"),parse:uo,transform:d4.transform}});var mJ=(Z)=>({test:(J)=>typeof J==="string"&&J.endsWith(Z)&&J.split(" ").length===1,parse:parseFloat,transform:(J)=>`${J}${Z}`}),q4,p5,D0,iK,aK,BY;var l4=U(()=>{q4=mJ("deg"),p5=mJ("%"),D0=mJ("px"),iK=mJ("vh"),aK=mJ("vw"),BY=(()=>({...p5,parse:(Z)=>p5.parse(Z)/100,transform:(Z)=>p5.transform(Z*100)}))()});var D8;var sK=U(()=>{L8();l4();HY();qY();D8={test:H3("hsl","hue"),parse:WY("hue","saturation","lightness"),transform:({hue:Z,saturation:J,lightness:$,alpha:Q=1})=>{return"hsla("+Math.round(Z)+", "+p5.transform(A8(J))+", "+p5.transform(A8($))+", "+A8(D6.transform(Q))+")"}}});var v1;var pJ=U(()=>{rK();sK();KY();v1={test:(Z)=>d4.test(Z)||fJ.test(Z)||D8.test(Z),parse:(Z)=>{if(d4.test(Z))return d4.parse(Z);else if(D8.test(Z))return D8.parse(Z);else return fJ.parse(Z)},transform:(Z)=>{return typeof Z==="string"?Z:Z.hasOwnProperty("red")?d4.transform(Z):D8.transform(Z)},getAnimatableNone:(Z)=>{let J=v1.parse(Z);return J.alpha=0,v1.transform(J)}}});var lP;var rP=U(()=>{lP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu});function co(Z){return isNaN(Z)&&typeof Z==="string"&&(Z.match(z3)?.length||0)+(Z.match(lP)?.length||0)>0}function I7(Z){let J=Z.toString(),$=[],Q={color:[],number:[],var:[]},X=[],Y=0,z=J.replace(io,(H)=>{if(v1.test(H))Q.color.push(Y),X.push(sP),$.push(v1.parse(H));else if(H.startsWith(ro))Q.var.push(Y),X.push(lo),$.push(H);else Q.number.push(Y),X.push(aP),$.push(parseFloat(H));return++Y,iP}).split(iP);return{values:$,split:z,indexes:Q,types:X}}function oP(Z){return I7(Z).values}function nP(Z){let{split:J,types:$}=I7(Z),Q=J.length;return(X)=>{let Y="";for(let w=0;w<Q;w++)if(Y+=J[w],X[w]!==void 0){let z=$[w];if(z===aP)Y+=A8(X[w]);else if(z===sP)Y+=v1.transform(X[w]);else Y+=X[w]}return Y}}function so(Z){let J=oP(Z);return nP(Z)(J.map(ao))}var aP="number",sP="color",lo="var",ro="var(",iP="${}",io,ao=(Z)=>typeof Z==="number"?0:v1.test(Z)?v1.getAnimatableNone(Z):Z,_5;var r4=U(()=>{pJ();rP();GY();HY();io=/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;_5={test:co,parse:oP,createTransformer:nP,getAnimatableNone:so}});function oK(Z,J,$){if($<0)$+=1;if($>1)$-=1;if($<0.16666666666666666)return Z+(J-Z)*6*$;if($<0.5)return J;if($<0.6666666666666666)return Z+(J-Z)*(0.6666666666666666-$)*6;return Z}function tP({hue:Z,saturation:J,lightness:$,alpha:Q}){Z/=360,J/=100,$/=100;let X=0,Y=0,w=0;if(!J)X=Y=w=$;else{let z=$<0.5?$*(1+J):$+J-$*J,H=2*$-z;X=oK(H,z,Z+0.3333333333333333),Y=oK(H,z,Z),w=oK(H,z,Z-0.3333333333333333)}return{red:Math.round(X*255),green:Math.round(Y*255),blue:Math.round(w*255),alpha:Q}}var eP=()=>{};function G3(Z,J){return($)=>$>0?J:Z}var nK=()=>{};var Q1=(Z,J,$)=>{return Z+(J-Z)*$};var f2=()=>{};function ZI(Z){let J=no(Z);if(m4(Boolean(J),`'${Z}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(J))return!1;let $=J.parse(Z);if(J===D8)$=tP($);return $}var tK=(Z,J,$)=>{let Q=Z*Z,X=$*(J*J-Q)+Q;return X<0?0:Math.sqrt(X)},oo,no=(Z)=>oo.find((J)=>J.test(Z)),eK=(Z,J)=>{let $=ZI(Z),Q=ZI(J);if(!$||!Q)return G3(Z,J);let X={...$};return(Y)=>{return X.red=tK($.red,Q.red,Y),X.green=tK($.green,Q.green,Y),X.blue=tK($.blue,Q.blue,Y),X.alpha=Q1($.alpha,Q.alpha,Y),d4.transform(X)}};var JI=U(()=>{m0();rK();sK();eP();KY();nK();f2();oo=[fJ,d4,D8]});function $I(Z,J){if(UY.has(Z))return($)=>$<=0?Z:J;else return($)=>$>=1?J:Z}var UY;var QI=U(()=>{UY=new Set(["none","hidden"])});function to(Z,J){return($)=>Q1(Z,J,$)}function VY(Z){if(typeof Z==="number")return to;else if(typeof Z==="string")return w3(Z)?G3:v1.test(Z)?eK:Jn;else if(Array.isArray(Z))return XI;else if(typeof Z==="object")return v1.test(Z)?eK:eo;return G3}function XI(Z,J){let $=[...Z],Q=$.length,X=Z.map((Y,w)=>VY(Y)(Y,J[w]));return(Y)=>{for(let w=0;w<Q;w++)$[w]=X[w](Y);return $}}function eo(Z,J){let $={...Z,...J},Q={};for(let X in $)if(Z[X]!==void 0&&J[X]!==void 0)Q[X]=VY(Z[X])(Z[X],J[X]);return(X)=>{for(let Y in Q)$[Y]=Q[Y](X);return $}}function Zn(Z,J){let $=[],Q={color:0,var:0,number:0};for(let X=0;X<J.values.length;X++){let Y=J.types[X],w=Z.indexes[Y][Q[Y]],z=Z.values[w]??0;$[X]=z,Q[Y]++}return $}var Jn=(Z,J)=>{let $=_5.createTransformer(J),Q=I7(Z),X=I7(J);if(Q.indexes.var.length===X.indexes.var.length&&Q.indexes.color.length===X.indexes.color.length&&Q.indexes.number.length>=X.indexes.number.length){if(UY.has(Z)&&!X.values.length||UY.has(J)&&!Q.values.length)return $I(Z,J);return G4(XI(Zn(Q,X),X.values),$)}else return m4(!0,`Complex values '${Z}' and '${J}' 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"),G3(Z,J)};var wI=U(()=>{m0();Y3();pJ();r4();JI();nK();f2();QI()});function FY(Z,J,$){if(typeof Z==="number"&&typeof J==="number"&&typeof $==="number")return Q1(Z,J,$);return VY(Z)(Z,J)}var ZB=U(()=>{wI();f2()});var YI=(Z)=>{let J=({timestamp:$})=>Z($);return{start:($=!0)=>p0.update(J,$),stop:()=>B2(J),now:()=>s1.isProcessing?s1.timestamp:l1.now()}};var zI=U(()=>{A6();W4()});var NY=(Z,J,$=10)=>{let Q="",X=Math.max(Math.round(J/$),2);for(let Y=0;Y<X;Y++)Q+=Math.round(Z(Y/(X-1))*1e4)/1e4+", ";return`linear(${Q.substring(0,Q.length-2)})`};var JB=()=>{};function W3(Z){let J=0,$=50,Q=Z.next(J);while(!Q.done&&J<20000)J+=$,Q=Z.next(J);return J>=20000?1/0:J}var _Y=20000;var LY=()=>{};function HI(Z,J=100,$){let Q=$({...Z,keyframes:[0,J]}),X=Math.min(W3(Q),_Y);return{type:"keyframes",ease:(Y)=>{return Q.next(X*Y).value/J},duration:N5(X)}}var GI=U(()=>{m0();LY()});function AY(Z,J,$){let Q=Math.max(J-$n,0);return TJ($-Z(Q),J-Q)}var $n=5;var $B=U(()=>{m0()});var S1;var QB=U(()=>{S1={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:0.3,visualDuration:0.3,restSpeed:{granular:0.01,default:2},restDelta:{granular:0.005,default:0.5},minDuration:0.01,maxDuration:10,minDamping:0.05,maxDamping:1}});function WI({duration:Z=S1.duration,bounce:J=S1.bounce,velocity:$=S1.velocity,mass:Q=S1.mass}){let X,Y;m4(Z<=G5(S1.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let w=1-J;if(w=H5(S1.minDamping,S1.maxDamping,w),Z=H5(S1.minDuration,S1.maxDuration,N5(Z)),w<1)X=(G)=>{let W=G*w,q=W*Z,K=W-$,B=DY(G,w),V=Math.exp(-q);return XB-K/B*V},Y=(G)=>{let q=G*w*Z,K=q*$+$,B=Math.pow(w,2)*Math.pow(G,2)*Z,V=Math.exp(-q),F=DY(Math.pow(G,2),w);return(-X(G)+XB>0?-1:1)*((K-B)*V)/F};else X=(G)=>{let W=Math.exp(-G*Z),q=(G-$)*Z+1;return-XB+W*q},Y=(G)=>{let W=Math.exp(-G*Z),q=($-G)*(Z*Z);return W*q};let z=5/Z,H=Xn(X,Y,z);if(Z=G5(Z),isNaN(H))return{stiffness:S1.stiffness,damping:S1.damping,duration:Z};else{let G=Math.pow(H,2)*Q;return{stiffness:G,damping:w*2*Math.sqrt(Q*G),duration:Z}}}function Xn(Z,J,$){let Q=$;for(let X=1;X<Qn;X++)Q=Q-Z(Q)/J(Q);return Q}function DY(Z,J){return Z*Math.sqrt(1-J*J)}var XB=0.001,Qn=12;var qI=U(()=>{m0();QB()});function KI(Z,J){return J.some(($)=>Z[$]!==void 0)}function zn(Z){let J={velocity:S1.velocity,stiffness:S1.stiffness,damping:S1.damping,mass:S1.mass,isResolvedFromDuration:!1,...Z};if(!KI(Z,Yn)&&KI(Z,wn))if(J.velocity=0,Z.visualDuration){let $=Z.visualDuration,Q=2*Math.PI/($*1.2),X=Q*Q,Y=2*H5(0.05,1,1-(Z.bounce||0))*Math.sqrt(X);J={...J,mass:S1.mass,stiffness:X,damping:Y}}else{let $=WI({...Z,velocity:0});J={...J,...$,mass:S1.mass},J.isResolvedFromDuration=!0}return J}function q3(Z=S1.visualDuration,J=S1.bounce){let $=typeof Z!=="object"?{visualDuration:Z,keyframes:[0,1],bounce:J}:Z,{restSpeed:Q,restDelta:X}=$,Y=$.keyframes[0],w=$.keyframes[$.keyframes.length-1],z={done:!1,value:Y},{stiffness:H,damping:G,mass:W,duration:q,velocity:K,isResolvedFromDuration:B}=zn({...$,velocity:-N5($.velocity||0)}),V=K||0,F=G/(2*Math.sqrt(H*W)),_=w-Y,N=N5(Math.sqrt(H/W)),L=Math.abs(_)<5;Q||(Q=L?S1.restSpeed.granular:S1.restSpeed.default),X||(X=L?S1.restDelta.granular:S1.restDelta.default);let M;if(F<1){let O=DY(N,F);M=(D)=>{let k=Math.exp(-F*N*D);return w-k*((V+F*N*_)/O*Math.sin(O*D)+_*Math.cos(O*D))}}else if(F===1)M=(O)=>w-Math.exp(-N*O)*(_+(V+N*_)*O);else{let O=N*Math.sqrt(F*F-1);M=(D)=>{let k=Math.exp(-F*N*D),b=Math.min(O*D,300);return w-k*((V+F*N*_)*Math.sinh(b)+O*_*Math.cosh(b))/O}}let A={calculatedDuration:B?q||null:null,next:(O)=>{let D=M(O);if(!B){let k=O===0?V:0;if(F<1)k=O===0?G5(V):AY(M,O,D);let b=Math.abs(k)<=Q,h=Math.abs(w-D)<=X;z.done=b&&h}else z.done=O>=q;return z.value=z.done?w:D,z},toString:()=>{let O=Math.min(W3(A),_Y),D=NY((k)=>A.next(O*k).value,O,30);return O+"ms "+D},toTransition:()=>{}};return A}var wn,Yn;var wB=U(()=>{m0();JB();LY();GI();$B();QB();qI();wn=["duration","bounce"],Yn=["stiffness","damping","mass"];q3.applyToOptions=(Z)=>{let J=HI(Z,100,q3);return Z.ease=J.ease,Z.duration=G5(J.duration),Z.type="keyframes",Z}});function uJ({keyframes:Z,velocity:J=0,power:$=0.8,timeConstant:Q=325,bounceDamping:X=10,bounceStiffness:Y=500,modifyTarget:w,min:z,max:H,restDelta:G=0.5,restSpeed:W}){let q=Z[0],K={done:!1,value:q},B=(b)=>z!==void 0&&b<z||H!==void 0&&b>H,V=(b)=>{if(z===void 0)return H;if(H===void 0)return z;return Math.abs(z-b)<Math.abs(H-b)?z:H},F=$*J,_=q+F,N=w===void 0?_:w(_);if(N!==_)F=N-q;let L=(b)=>-F*Math.exp(-b/Q),M=(b)=>N+L(b),A=(b)=>{let h=L(b),I=M(b);K.done=Math.abs(h)<=G,K.value=K.done?N:I},O,D,k=(b)=>{if(!B(K.value))return;O=b,D=q3({keyframes:[K.value,V(K.value)],velocity:AY(M,b,K.value),damping:X,stiffness:Y,restDelta:G,restSpeed:W})};return k(0),{calculatedDuration:null,next:(b)=>{let h=!1;if(!D&&O===void 0)h=!0,A(b),k(b);if(O!==void 0&&b>=O)return D.next(b-O);else return!h&&A(b),K}}}var YB=U(()=>{wB();$B()});function Hn(Z,J,$){let Q=[],X=$||m5.mix||FY,Y=Z.length-1;for(let w=0;w<Y;w++){let z=X(Z[w],Z[w+1]);if(J){let H=Array.isArray(J)?J[w]||d1:J;z=G4(H,z)}Q.push(z)}return Q}function BI(Z,J,{clamp:$=!0,ease:Q,mixer:X}={}){let Y=Z.length;if(K2(Y===J.length,"Both input and output ranges must be the same length","range-length"),Y===1)return()=>J[0];if(Y===2&&J[0]===J[1])return()=>J[1];let w=Z[0]===Z[1];if(Z[0]>Z[Y-1])Z=[...Z].reverse(),J=[...J].reverse();let z=Hn(J,Q,X),H=z.length,G=(W)=>{if(w&&W<Z[0])return J[0];let q=0;if(H>1){for(;q<Z.length-2;q++)if(W<Z[q+1])break}let K=p4(Z[q],Z[q+1],W);return z[q](K)};return $?(W)=>G(H5(Z[0],Z[Y-1],W)):G}var UI=U(()=>{m0();ZB()});function VI(Z,J){let $=Z[Z.length-1];for(let Q=1;Q<=J;Q++){let X=p4(0,J,Q);Z.push(Q1($,1,X))}}var FI=U(()=>{m0();f2()});function NI(Z){let J=[0];return VI(J,Z.length-1),J}var _I=U(()=>{FI()});function LI(Z,J){return Z.map(($)=>$*J)}var AI=()=>{};function Gn(Z,J){return Z.map(()=>J||RJ).splice(0,Z.length-1)}function T7({duration:Z=300,keyframes:J,times:$,ease:Q="easeInOut"}){let X=pK(Q)?Q.map($Y):$Y(Q),Y={done:!1,value:J[0]},w=LI($&&$.length===J.length?$:NI(J),Z),z=BI(w,J,{ease:Array.isArray(X)?X:Gn(J,X)});return{calculatedDuration:Z,next:(H)=>{return Y.value=z(H),Y.done=H>=Z,Y}}}var zB=U(()=>{m0();UI();_I();AI()});function K3(Z,{repeat:J,repeatType:$="loop"},Q,X=1){let Y=Z.filter(Wn),z=X<0||J&&$!=="loop"&&J%2===1?0:Y.length-1;return!z||Q===void 0?Y[z]:Q}var Wn=(Z)=>Z!==null;var MY=()=>{};function OY(Z){if(typeof Z.type==="string")Z.type=qn[Z.type]}var qn;var HB=U(()=>{YB();zB();wB();qn={decay:uJ,inertia:uJ,tween:T7,keyframes:T7,spring:q3}});class k7{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise((Z)=>{this.resolve=Z})}notifyFinished(){this.resolve()}then(Z,J){return this.finished.then(Z,J)}}var jY=()=>{};var Kn=(Z)=>Z/100,C7;var bY=U(()=>{m0();A6();YY();ZB();zI();YB();zB();LY();MY();HB();jY();C7=class C7 extends k7{constructor(Z){super();if(this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:J}=this.options;if(J&&J.updatedAt!==l1.now())this.tick(l1.now());if(this.isStopped=!0,this.state==="idle")return;this.teardown(),this.options.onStop?.()},u4.mainThread++,this.options=Z,this.initAnimation(),this.play(),Z.autoplay===!1)this.pause()}initAnimation(){let{options:Z}=this;OY(Z);let{type:J=T7,repeat:$=0,repeatDelay:Q=0,repeatType:X,velocity:Y=0}=Z,{keyframes:w}=Z,z=J||T7;if(z!==T7&&typeof w[0]!=="number")this.mixKeyframes=G4(Kn,FY(w[0],w[1])),w=[0,100];let H=z({...Z,keyframes:w});if(X==="mirror")this.mirroredGenerator=z({...Z,keyframes:[...w].reverse(),velocity:-Y});if(H.calculatedDuration===null)H.calculatedDuration=W3(H);let{calculatedDuration:G}=H;this.calculatedDuration=G,this.resolvedDuration=G+Q,this.totalDuration=this.resolvedDuration*($+1)-Q,this.generator=H}updateTime(Z){let J=Math.round(Z-this.startTime)*this.playbackSpeed;if(this.holdTime!==null)this.currentTime=this.holdTime;else this.currentTime=J}tick(Z,J=!1){let{generator:$,totalDuration:Q,mixKeyframes:X,mirroredGenerator:Y,resolvedDuration:w,calculatedDuration:z}=this;if(this.startTime===null)return $.next(0);let{delay:H=0,keyframes:G,repeat:W,repeatType:q,repeatDelay:K,type:B,onUpdate:V,finalKeyframe:F}=this.options;if(this.speed>0)this.startTime=Math.min(this.startTime,Z);else if(this.speed<0)this.startTime=Math.min(Z-Q/this.speed,this.startTime);if(J)this.currentTime=Z;else this.updateTime(Z);let _=this.currentTime-H*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?_<0:_>Q;if(this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null)this.currentTime=Q;let L=this.currentTime,M=$;if(W){let k=Math.min(this.currentTime,Q)/w,b=Math.floor(k),h=k%1;if(!h&&k>=1)h=1;if(h===1&&b--,b=Math.min(b,W+1),Boolean(b%2)){if(q==="reverse"){if(h=1-h,K)h-=K/w}else if(q==="mirror")M=Y}L=H5(0,1,h)*w}let A=N?{done:!1,value:G[0]}:M.next(L);if(X&&!N)A.value=X(A.value);let{done:O}=A;if(!N&&z!==null)O=this.playbackSpeed>=0?this.currentTime>=Q:this.currentTime<=0;let D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);if(D&&B!==uJ)A.value=K3(G,this.options,F,this.speed);if(V)V(A.value);if(D)this.finish();return A}then(Z,J){return this.finished.then(Z,J)}get duration(){return N5(this.calculatedDuration)}get iterationDuration(){let{delay:Z=0}=this.options||{};return this.duration+N5(Z)}get time(){return N5(this.currentTime)}set time(Z){if(Z=G5(Z),this.currentTime=Z,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0)this.holdTime=Z;else if(this.driver)this.startTime=this.driver.now()-Z/this.playbackSpeed;if(this.driver)this.driver.start(!1);else this.startTime=0,this.state="paused",this.holdTime=Z,this.tick(Z)}get speed(){return this.playbackSpeed}set speed(Z){let J=this.playbackSpeed!==Z;if(J&&this.driver)this.updateTime(l1.now());if(this.playbackSpeed=Z,J&&this.driver)this.time=N5(this.currentTime)}play(){if(this.isStopped)return;let{driver:Z=YI,startTime:J}=this.options;if(!this.driver)this.driver=Z((Q)=>this.tick(Q));this.options.onPlay?.();let $=this.driver.now();if(this.state==="finished")this.updateFinished(),this.startTime=$;else if(this.holdTime!==null)this.startTime=$-this.holdTime;else if(!this.startTime)this.startTime=J??$;if(this.state==="finished"&&this.speed<0)this.startTime+=this.calculatedDuration;this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(l1.now()),this.holdTime=this.currentTime}complete(){if(this.state!=="running")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,u4.mainThread--}stopDriver(){if(!this.driver)return;this.driver.stop(),this.driver=void 0}sample(Z){return this.startTime=0,this.tick(Z,!0)}attachTimeline(Z){if(this.options.allowFlatten)this.options.type="keyframes",this.options.ease="linear",this.initAnimation();return this.driver?.stop(),Z.observe(this)}}});function DI(Z){for(let J=1;J<Z.length;J++)Z[J]??(Z[J]=Z[J-1])}var MI=()=>{};function PY(Z){return Z.includes("scale")?1:0}function IY(Z,J){if(!Z||Z==="none")return PY(J);let $=Z.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),Q,X;if($)Q=Un,X=$;else{let z=Z.match(/^matrix\(([-\d.e\s,]+)\)$/u);Q=Bn,X=z}if(!X)return PY(J);let Y=Q[J],w=X[1].split(",").map(Vn);return typeof Y==="function"?Y(w):w[Y]}function Vn(Z){return parseFloat(Z.trim())}var S7=(Z)=>Z*180/Math.PI,GB=(Z)=>{let J=S7(Math.atan2(Z[1],Z[0]));return WB(J)},Bn,WB=(Z)=>{if(Z=Z%360,Z<0)Z+=360;return Z},OI,jI=(Z)=>Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1]),bI=(Z)=>Math.sqrt(Z[4]*Z[4]+Z[5]*Z[5]),Un,PI=(Z,J)=>{let{transform:$="none"}=getComputedStyle(Z);return IY($,J)};var qB=U(()=>{Bn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:(Z)=>(Math.abs(Z[0])+Math.abs(Z[3]))/2,rotate:GB,rotateZ:GB,skewX:(Z)=>S7(Math.atan(Z[1])),skewY:(Z)=>S7(Math.atan(Z[2])),skew:(Z)=>(Math.abs(Z[1])+Math.abs(Z[2]))/2},OI=GB,Un={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jI,scaleY:bI,scale:(Z)=>(jI(Z)+bI(Z))/2,rotateX:(Z)=>WB(S7(Math.atan2(Z[6],Z[5]))),rotateY:(Z)=>WB(S7(Math.atan2(-Z[2],Z[0]))),rotateZ:OI,rotate:OI,skewX:(Z)=>S7(Math.atan(Z[4])),skewY:(Z)=>S7(Math.atan(Z[1])),skew:(Z)=>(Math.abs(Z[1])+Math.abs(Z[4]))/2}});var i4,m2;var K4=U(()=>{i4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],m2=(()=>new Set(i4))()});function II(Z){let J=[];return Nn.forEach(($)=>{let Q=Z.getValue($);if(Q!==void 0)J.push([$,Q.get()]),Q.set($.startsWith("scale")?1:0)}),J}var KB=(Z)=>Z===c4||Z===D0,Fn,Nn,M6;var BB=U(()=>{qB();K4();L8();l4();Fn=new Set(["x","y","z"]),Nn=i4.filter((Z)=>!Fn.has(Z));M6={width:({x:Z},{paddingLeft:J="0",paddingRight:$="0"})=>Z.max-Z.min-parseFloat(J)-parseFloat($),height:({y:Z},{paddingTop:J="0",paddingBottom:$="0"})=>Z.max-Z.min-parseFloat(J)-parseFloat($),top:(Z,{top:J})=>parseFloat(J),left:(Z,{left:J})=>parseFloat(J),bottom:({y:Z},{top:J})=>parseFloat(J)+(Z.max-Z.min),right:({x:Z},{left:J})=>parseFloat(J)+(Z.max-Z.min),x:(Z,{transform:J})=>IY(J,"x"),y:(Z,{transform:J})=>IY(J,"y")};M6.translateX=M6.x;M6.translateY=M6.y});function TI(){if(VB){let Z=Array.from(E7).filter((Q)=>Q.needsMeasurement),J=new Set(Z.map((Q)=>Q.element)),$=new Map;J.forEach((Q)=>{let X=II(Q);if(!X.length)return;$.set(Q,X),Q.render()}),Z.forEach((Q)=>Q.measureInitialState()),J.forEach((Q)=>{Q.render();let X=$.get(Q);if(X)X.forEach(([Y,w])=>{Q.getValue(Y)?.set(w)})}),Z.forEach((Q)=>Q.measureEndState()),Z.forEach((Q)=>{if(Q.suspendedScrollY!==void 0)window.scrollTo(0,Q.suspendedScrollY)})}VB=!1,UB=!1,E7.forEach((Z)=>Z.complete(FB)),E7.clear()}function kI(){E7.forEach((Z)=>{if(Z.readKeyframes(),Z.needsMeasurement)VB=!0})}function CI(){FB=!0,kI(),TI(),FB=!1}class h7{constructor(Z,J,$,Q,X,Y=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...Z],this.onComplete=J,this.name=$,this.motionValue=Q,this.element=X,this.isAsync=Y}scheduleResolve(){if(this.state="scheduled",this.isAsync){if(E7.add(this),!UB)UB=!0,p0.read(kI),p0.resolveKeyframes(TI)}else this.readKeyframes(),this.complete()}readKeyframes(){let{unresolvedKeyframes:Z,name:J,element:$,motionValue:Q}=this;if(Z[0]===null){let X=Q?.get(),Y=Z[Z.length-1];if(X!==void 0)Z[0]=X;else if($&&J){let w=$.readValue(J,Y);if(w!==void 0&&w!==null)Z[0]=w}if(Z[0]===void 0)Z[0]=Y;if(Q&&X===void 0)Q.set(Z[0])}DI(Z)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(Z=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,Z),E7.delete(this)}cancel(){if(this.state==="scheduled")E7.delete(this),this.state="pending"}resume(){if(this.state==="pending")this.scheduleResolve()}}var E7,UB=!1,VB=!1,FB=!1;var TY=U(()=>{MI();BB();W4();E7=new Set});var SI=(Z)=>Z.startsWith("--");var EI=()=>{};function kY(Z,J,$){SI(J)?Z.style.setProperty(J,$):Z.style[J]=$}var NB=U(()=>{EI()});var hI;var RI=U(()=>{hI={}});function CY(Z,J){let $=IJ(Z);return()=>hI[J]??$()}var _B=U(()=>{m0();RI()});var xI;var yI=U(()=>{_B();xI=CY(()=>window.ScrollTimeline!==void 0,"scrollTimeline")});var SY;var LB=U(()=>{_B();SY=CY(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(Z){return!1}return!0},"linearEasing")});var R7=([Z,J,$,Q])=>`cubic-bezier(${Z}, ${J}, ${$}, ${Q})`;var AB=()=>{};var DB;var vI=U(()=>{AB();DB={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:R7([0,0.65,0.55,1]),circOut:R7([0.55,0,1,0.45]),backIn:R7([0.31,0.01,0.66,-0.59]),backOut:R7([0.33,1.53,0.69,0.99])}});function MB(Z,J){if(!Z)return;else if(typeof Z==="function")return SY()?NY(Z,J):"ease-out";else if(xJ(Z))return R7(Z);else if(Array.isArray(Z))return Z.map(($)=>MB($,J)||DB.easeOut);else return DB[Z]}var gI=U(()=>{m0();LB();JB();AB();vI()});function fI(Z,J,$,{delay:Q=0,duration:X=300,repeat:Y=0,repeatType:w="loop",ease:z="easeOut",times:H}={},G=void 0){let W={[J]:$};if(H)W.offset=H;let q=MB(z,X);if(Array.isArray(q))W.easing=q;if(b2.value)u4.waapi++;let K={delay:Q,duration:X,easing:!Array.isArray(q)?q:"linear",fill:"both",iterations:Y+1,direction:w==="reverse"?"alternate":"normal"};if(G)K.pseudoElement=G;let B=Z.animate(W,K);if(b2.value)B.finished.finally(()=>{u4.waapi--});return B}var mI=U(()=>{YY();QY();gI()});function EY(Z){return typeof Z==="function"&&"applyToOptions"in Z}var OB=()=>{};function pI({type:Z,...J}){if(EY(Z)&&SY())return Z.applyToOptions(J);else J.duration??(J.duration=300),J.ease??(J.ease="easeOut");return J}var uI=U(()=>{LB();OB()});var cJ;var jB=U(()=>{m0();NB();yI();MY();jY();mI();uI();cJ=class cJ extends k7{constructor(Z){super();if(this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!Z)return;let{element:J,name:$,keyframes:Q,pseudoElement:X,allowFlatten:Y=!1,finalKeyframe:w,onComplete:z}=Z;this.isPseudoElement=Boolean(X),this.allowFlatten=Y,this.options=Z,K2(typeof Z.type!=="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let H=pI(Z);if(this.animation=fI(J,$,Q,H,X),H.autoplay===!1)this.animation.pause();this.animation.onfinish=()=>{if(this.finishedTime=this.time,!X){let G=K3(Q,this.options,w,this.speed);if(this.updateMotionValue)this.updateMotionValue(G);kY(J,$,G),this.animation.cancel()}z?.(),this.notifyFinished()}}play(){if(this.isStopped)return;if(this.manualStartTime=null,this.animation.play(),this.state==="finished")this.updateFinished()}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(Z){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:Z}=this;if(Z==="idle"||Z==="finished")return;if(this.updateMotionValue)this.updateMotionValue();else this.commitStyles();if(!this.isPseudoElement)this.cancel()}commitStyles(){let Z=this.options?.element;if(!this.isPseudoElement&&Z?.isConnected)this.animation.commitStyles?.()}get duration(){let Z=this.animation.effect?.getComputedTiming?.().duration||0;return N5(Number(Z))}get iterationDuration(){let{delay:Z=0}=this.options||{};return this.duration+N5(Z)}get time(){return N5(Number(this.animation.currentTime)||0)}set time(Z){let J=this.finishedTime!==null;if(this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=G5(Z),J)this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(Z){if(Z<0)this.finishedTime=null;this.animation.playbackRate=Z}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(Z){this.manualStartTime=this.animation.startTime=Z}attachTimeline({timeline:Z,rangeStart:J,rangeEnd:$,observe:Q}){if(this.allowFlatten)this.animation.effect?.updateTiming({easing:"linear"});if(this.animation.onfinish=null,Z&&xI()){if(this.animation.timeline=Z,J)this.animation.rangeStart=J;if($)this.animation.rangeEnd=$;return d1}else return Q(this)}}});function _n(Z){return Z in cI}function dI(Z){if(typeof Z.ease==="string"&&_n(Z.ease))Z.ease=cI[Z.ease]}var cI;var lI=U(()=>{m0();cI={anticipate:CJ,backInOut:kJ,circInOut:hJ}});var bB=10,PB;var rI=U(()=>{m0();A6();NB();bY();jB();HB();lI();PB=class PB extends cJ{constructor(Z){dI(Z),OY(Z);super(Z);if(Z.startTime!==void 0)this.startTime=Z.startTime;this.options=Z}updateMotionValue(Z){let{motionValue:J,onUpdate:$,onComplete:Q,element:X,...Y}=this.options;if(!J)return;if(Z!==void 0){J.set(Z);return}let w=new C7({...Y,autoplay:!1}),z=Math.max(bB,l1.now()-this.startTime),H=H5(0,bB,z-bB),G=w.sample(z).value,{name:W}=this.options;if(X&&W)kY(X,W,G);J.setWithVelocity(w.sample(Math.max(0,z-H)).value,G,H),w.stop()}}});var IB=(Z,J)=>{if(J==="zIndex")return!1;if(typeof Z==="number"||Array.isArray(Z))return!0;if(typeof Z==="string"&&(_5.test(Z)||Z==="0")&&!Z.startsWith("url("))return!0;return!1};var iI=U(()=>{r4()});function Ln(Z){let J=Z[0];if(Z.length===1)return!0;for(let $=0;$<Z.length;$++)if(Z[$]!==J)return!0}function aI(Z,J,$,Q){let X=Z[0];if(X===null)return!1;if(J==="display"||J==="visibility")return!0;let Y=Z[Z.length-1],w=IB(X,J),z=IB(Y,J);if(m4(w===z,`You are trying to animate ${J} from "${X}" to "${Y}". "${w?Y:X}" is not an animatable value.`,"value-not-animatable"),!w||!z)return!1;return Ln(Z)||($==="spring"||EY($))&&Q}var sI=U(()=>{m0();OB();iI()});function dJ(Z){Z.duration=0,Z.type="keyframes"}var TB=()=>{};function oI(Z){let{motionValue:J,name:$,repeatDelay:Q,repeatType:X,damping:Y,type:w}=Z;if(!(J?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:H,transformTemplate:G}=J.owner.getProps();return Dn()&&$&&An.has($)&&($!=="transform"||!G)&&!H&&!Q&&X!=="mirror"&&Y!==0&&w!=="inertia"}var An,Dn;var nI=U(()=>{m0();An=new Set(["opacity","clipPath","filter","transform"]),Dn=IJ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"))});var Mn=40,kB;var tI=U(()=>{m0();A6();bY();MY();TY();rI();sI();TB();jY();nI();kB=class kB extends k7{constructor({autoplay:Z=!0,delay:J=0,type:$="keyframes",repeat:Q=0,repeatDelay:X=0,repeatType:Y="loop",keyframes:w,name:z,motionValue:H,element:G,...W}){super();this.stop=()=>{if(this._animation)this._animation.stop(),this.stopTimeline?.();this.keyframeResolver?.cancel()},this.createdAt=l1.now();let q={autoplay:Z,delay:J,type:$,repeat:Q,repeatDelay:X,repeatType:Y,name:z,motionValue:H,element:G,...W},K=G?.KeyframeResolver||h7;this.keyframeResolver=new K(w,(B,V,F)=>this.onKeyframesResolved(B,V,q,!F),z,H,G),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(Z,J,$,Q){this.keyframeResolver=void 0;let{name:X,type:Y,velocity:w,delay:z,isHandoff:H,onUpdate:G}=$;if(this.resolvedAt=l1.now(),!aI(Z,X,Y,w)){if(m5.instantAnimations||!z)G?.(K3(Z,$,J));Z[0]=Z[Z.length-1],dJ($),$.repeat=0}let q={startTime:Q?!this.resolvedAt?this.createdAt:this.resolvedAt-this.createdAt>Mn?this.resolvedAt:this.createdAt:void 0,finalKeyframe:J,...$,keyframes:Z},K=!H&&oI(q),B=q.motionValue?.owner?.current,V=K?new PB({...q,element:B}):new C7(q);if(V.finished.then(()=>{this.notifyFinished()}).catch(d1),this.pendingTimeline)this.stopTimeline=V.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0;this._animation=V}get finished(){if(!this._animation)return this._finished;else return this.animation.finished}then(Z,J){return this.finished.finally(Z).then(()=>{})}get animation(){if(!this._animation)this.keyframeResolver?.resume(),CI();return this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(Z){this.animation.time=Z}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(Z){this.animation.speed=Z}get startTime(){return this.animation.startTime}attachTimeline(Z){if(this._animation)this.stopTimeline=this.animation.attachTimeline(Z);else this.pendingTimeline=Z;return()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){if(this._animation)this.animation.cancel();this.keyframeResolver?.cancel()}}});function hY(Z,J,$,Q=0,X=1){let Y=Array.from(Z).sort((G,W)=>G.sortNodePosition(W)).indexOf(J),w=Z.size,z=(w-1)*Q;return typeof $==="function"?$(Y,w):X===1?Y*Q:z-Y*Q}var CB=()=>{};function jn(Z){let J=On.exec(Z);if(!J)return[,];let[,$,Q,X]=J;return[`--${$??Q}`,X]}function SB(Z,J,$=1){K2($<=bn,`Max CSS variable fallback depth detected in property "${Z}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[Q,X]=jn(Z);if(!Q)return;let Y=window.getComputedStyle(J).getPropertyValue(Q);if(Y){let w=Y.trim();return jJ(w)?parseFloat(w):w}return w3(X)?SB(X,J,$+1):X}var On,bn=4;var eI=U(()=>{m0();Y3();On=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u});var Pn,In=(Z)=>({type:"spring",stiffness:550,damping:Z===0?2*Math.sqrt(550):30,restSpeed:10}),Tn,kn,ZT=(Z,{keyframes:J})=>{if(J.length>2)return Tn;else if(m2.has(Z))return Z.startsWith("scale")?In(J[1]):Pn;return kn};var JT=U(()=>{K4();Pn={type:"spring",stiffness:500,damping:25,restSpeed:10},Tn={type:"keyframes",duration:0.8},kn={type:"keyframes",ease:[0.25,0.1,0.35,1],duration:0.3}});function $T(Z,{repeat:J,repeatType:$="loop"},Q){let X=Z.filter(Cn),Y=J&&$!=="loop"&&J%2===1?0:X.length-1;return!Y||Q===void 0?X[Y]:Q}var Cn=(Z)=>Z!==null;var QT=()=>{};function RY(Z,J){if(Z?.inherit&&J){let{inherit:$,...Q}=Z;return{...J,...Q}}return Z}var EB=()=>{};function B3(Z,J){let $=Z?.[J]??Z?.default??Z;if($!==Z)return RY($,Z);return $}var xY=U(()=>{EB()});function XT({when:Z,delay:J,delayChildren:$,staggerChildren:Q,staggerDirection:X,repeat:Y,repeatType:w,repeatDelay:z,from:H,elapsed:G,...W}){return!!Object.keys(W).length}var wT=()=>{};var x7=(Z,J,$,Q={},X,Y)=>(w)=>{let z=B3(Q,Z)||{},H=z.delay||Q.delay||0,{elapsed:G=0}=Q;G=G-G5(H);let W={keyframes:Array.isArray($)?$:[null,$],ease:"easeOut",velocity:J.getVelocity(),...z,delay:-G,onUpdate:(K)=>{J.set(K),z.onUpdate&&z.onUpdate(K)},onComplete:()=>{w(),z.onComplete&&z.onComplete()},name:Z,motionValue:J,element:Y?void 0:X};if(!XT(z))Object.assign(W,ZT(Z,W));if(W.duration&&(W.duration=G5(W.duration)),W.repeatDelay&&(W.repeatDelay=G5(W.repeatDelay)),W.from!==void 0)W.keyframes[0]=W.from;let q=!1;if(W.type===!1||W.duration===0&&!W.repeatDelay){if(dJ(W),W.delay===0)q=!0}if(m5.instantAnimations||m5.skipAnimations||X?.shouldSkipAnimations)q=!0,dJ(W),W.delay=0;if(W.allowFlatten=!z.type&&!z.ease,q&&!Y&&J.get()!==void 0){let K=$T(W.keyframes,z);if(K!==void 0){p0.update(()=>{W.onUpdate(K),W.onComplete()});return}}return z.isSync?new C7(W):new kB(W)};var yY=U(()=>{m0();tI();bY();xY();TB();JT();QT();wT();W4()});function YT(Z){let J=[{},{}];return Z?.values.forEach(($,Q)=>{J[0][Q]=$.get(),J[1][Q]=$.getVelocity()}),J}function y7(Z,J,$,Q){if(typeof J==="function"){let[X,Y]=YT(Q);J=J($!==void 0?$:Z.custom,X,Y)}if(typeof J==="string")J=Z.variants&&Z.variants[J];if(typeof J==="function"){let[X,Y]=YT(Q);J=J($!==void 0?$:Z.custom,X,Y)}return J}var vY=()=>{};function a4(Z,J,$){let Q=Z.getProps();return y7(Q,J,$!==void 0?$:Q.custom,Z)}var lJ=U(()=>{vY()});var gY;var hB=U(()=>{K4();gY=new Set(["width","height","top","left","right","bottom",...i4])});class GT{constructor(Z,J={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=($)=>{let Q=l1.now();if(this.updatedAt!==Q)this.setPrevFrameValue();if(this.prev=this.current,this.setCurrent($),this.current!==this.prev){if(this.events.change?.notify(this.current),this.dependents)for(let X of this.dependents)X.dirty()}},this.hasAnimated=!1,this.setCurrent(Z),this.owner=J.owner}setCurrent(Z){if(this.current=Z,this.updatedAt=l1.now(),this.canTrackVelocity===null&&Z!==void 0)this.canTrackVelocity=En(this.current)}setPrevFrameValue(Z=this.current){this.prevFrameValue=Z,this.prevUpdatedAt=this.updatedAt}onChange(Z){return this.on("change",Z)}on(Z,J){if(!this.events[Z])this.events[Z]=new N8;let $=this.events[Z].add(J);if(Z==="change")return()=>{$(),p0.read(()=>{if(!this.events.change.getSize())this.stop()})};return $}clearListeners(){for(let Z in this.events)this.events[Z].clear()}attach(Z,J){this.passiveEffect=Z,this.stopPassiveEffect=J}set(Z){if(!this.passiveEffect)this.updateAndNotify(Z);else this.passiveEffect(Z,this.updateAndNotify)}setWithVelocity(Z,J,$){this.set(J),this.prev=void 0,this.prevFrameValue=Z,this.prevUpdatedAt=this.updatedAt-$}jump(Z,J=!0){if(this.updateAndNotify(Z),this.prev=Z,this.prevUpdatedAt=this.prevFrameValue=void 0,J&&this.stop(),this.stopPassiveEffect)this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(Z){if(!this.dependents)this.dependents=new Set;this.dependents.add(Z)}removeDependent(Z){if(this.dependents)this.dependents.delete(Z)}get(){if(HT.current)HT.current.push(this);return this.current}getPrevious(){return this.prev}getVelocity(){let Z=l1.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||Z-this.updatedAt>zT)return 0;let J=Math.min(this.updatedAt-this.prevUpdatedAt,zT);return TJ(parseFloat(this.current)-parseFloat(this.prevFrameValue),J)}start(Z){return this.stop(),new Promise((J)=>{if(this.hasAnimated=!0,this.animation=Z(J),this.events.animationStart)this.events.animationStart.notify()}).then(()=>{if(this.events.animationComplete)this.events.animationComplete.notify();this.clearAnimation()})}stop(){if(this.animation){if(this.animation.stop(),this.events.animationCancel)this.events.animationCancel.notify()}this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){if(this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect)this.stopPassiveEffect()}}function B4(Z,J){return new GT(Z,J)}var zT=30,En=(Z)=>{return!isNaN(parseFloat(Z))},HT;var U3=U(()=>{m0();A6();W4();HT={current:void 0}});var rJ=(Z)=>{return Array.isArray(Z)};var RB=()=>{};function hn(Z,J,$){if(Z.hasValue(J))Z.getValue(J).set($);else Z.addValue(J,B4($))}function Rn(Z){return rJ(Z)?Z[Z.length-1]||0:Z}function WT(Z,J){let $=a4(Z,J),{transitionEnd:Q={},transition:X={},...Y}=$||{};Y={...Y,...Q};for(let w in Y){let z=Rn(Y[w]);hn(Z,w,z)}}var qT=U(()=>{U3();lJ();RB()});var P1=(Z)=>Boolean(Z&&Z.getVelocity);var s4=()=>{};function KT(Z){return Boolean(P1(Z)&&Z.add)}var BT=U(()=>{s4()});function V3(Z,J){let $=Z.getValue("willChange");if(KT($))return $.add(J);else if(!$&&m5.WillChange){let Q=new m5.WillChange("auto");Z.addValue("willChange",Q),Q.add(J)}}var xB=U(()=>{m0();BT()});function F3(Z){return Z.replace(/([A-Z])/g,(J)=>`-${J.toLowerCase()}`)}var fY=()=>{};var UT="framerAppearId",iJ;var yB=U(()=>{fY();iJ="data-"+F3(UT)});function mY(Z){return Z.props[iJ]}var vB=U(()=>{yB()});function xn({protectedKeys:Z,needsAnimating:J},$){let Q=Z.hasOwnProperty($)&&J[$]!==!0;return J[$]=!1,Q}function pY(Z,J,{delay:$=0,transitionOverride:Q,type:X}={}){let{transition:Y,transitionEnd:w,...z}=J,H=Z.getDefaultTransition();Y=Y?RY(Y,H):H;let G=Y?.reduceMotion;if(Q)Y=Q;let W=[],q=X&&Z.animationState&&Z.animationState.getState()[X];for(let K in z){let B=Z.getValue(K,Z.latestValues[K]??null),V=z[K];if(V===void 0||q&&xn(q,K))continue;let F={delay:$,...B3(Y||{},K)},_=B.get();if(_!==void 0&&!B.isAnimating&&!Array.isArray(V)&&V===_&&!F.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){let A=mY(Z);if(A){let O=window.MotionHandoffAnimation(A,K,p0);if(O!==null)F.startTime=O,N=!0}}V3(Z,K);let L=G??Z.shouldReduceMotion;B.start(x7(K,B,V,L&&gY.has(K)?{type:!1}:F,Z,N));let M=B.animation;if(M)W.push(M)}if(w){let K=()=>p0.update(()=>{w&&WT(Z,w)});if(W.length)Promise.all(W).then(K);else K()}return W}var gB=U(()=>{xY();EB();hB();qT();xB();vB();yY();W4()});function uY(Z,J,$={}){let Q=a4(Z,J,$.type==="exit"?Z.presenceContext?.custom:void 0),{transition:X=Z.getDefaultTransition()||{}}=Q||{};if($.transitionOverride)X=$.transitionOverride;let Y=Q?()=>Promise.all(pY(Z,Q,$)):()=>Promise.resolve(),w=Z.variantChildren&&Z.variantChildren.size?(H=0)=>{let{delayChildren:G=0,staggerChildren:W,staggerDirection:q}=X;return yn(Z,J,H,G,W,q,$)}:()=>Promise.resolve(),{when:z}=X;if(z){let[H,G]=z==="beforeChildren"?[Y,w]:[w,Y];return H().then(()=>G())}else return Promise.all([Y(),w($.delay)])}function yn(Z,J,$=0,Q=0,X=0,Y=1,w){let z=[];for(let H of Z.variantChildren)H.notify("AnimationStart",J),z.push(uY(H,J,{...w,delay:$+(typeof Q==="function"?0:Q)+hY(Z.variantChildren,H,Q,X,Y)}).then(()=>H.notify("AnimationComplete",J)));return Promise.all(z)}var VT=U(()=>{lJ();CB();gB()});function FT(Z,J,$={}){Z.notify("AnimationStart",J);let Q;if(Array.isArray(J)){let X=J.map((Y)=>uY(Z,Y,$));Q=Promise.all(X)}else if(typeof J==="string")Q=uY(Z,J,$);else{let X=typeof J==="function"?a4(Z,J,$.custom):J;Q=Promise.all(pY(Z,X,$))}return Q.then(()=>{Z.notify("AnimationComplete",J)})}var NT=U(()=>{lJ();gB();VT()});var _T;var LT=U(()=>{_T={test:(Z)=>Z==="auto",parse:(Z)=>Z}});var cY=(Z)=>(J)=>J.test(Z);var fB=()=>{};var mB,pB=(Z)=>mB.find(cY(Z));var uB=U(()=>{LT();L8();l4();fB();mB=[c4,D0,p5,q4,aK,iK,_T]});function AT(Z){if(typeof Z==="number")return Z===0;else if(Z!==null)return Z==="none"||Z==="0"||PJ(Z);else return!0}var DT=U(()=>{m0()});function gn(Z){let[J,$]=Z.slice(0,-1).split("(");if(J==="drop-shadow")return Z;let[Q]=$.match(z3)||[];if(!Q)return Z;let X=$.replace(Q,""),Y=vn.has(J)?1:0;if(Q!==$)Y*=100;return J+"("+Y+X+")"}var vn,fn,aJ;var cB=U(()=>{r4();GY();vn=new Set(["brightness","contrast","saturate","opacity"]);fn=/\b([a-z-]*)\(.*?\)/gu,aJ={..._5,getAnimatableNone:(Z)=>{let J=Z.match(fn);return J?J.map(gn).join(" "):Z}}});var sJ;var dB=U(()=>{r4();sJ={..._5,getAnimatableNone:(Z)=>{let J=_5.parse(Z);return _5.createTransformer(Z)(J.map((Q)=>typeof Q==="number"?0:typeof Q==="object"?{...Q,alpha:1}:Q))}}});var lB;var MT=U(()=>{L8();lB={...c4,transform:Math.round}});var OT;var jT=U(()=>{L8();l4();OT={rotate:q4,rotateX:q4,rotateY:q4,rotateZ:q4,scale:gJ,scaleX:gJ,scaleY:gJ,scaleZ:gJ,skew:q4,skewX:q4,skewY:q4,distance:D0,translateX:D0,translateY:D0,translateZ:D0,x:D0,y:D0,z:D0,perspective:D0,transformPerspective:D0,opacity:D6,originX:BY,originY:BY,originZ:D0}});var N3;var dY=U(()=>{MT();L8();l4();jT();N3={borderWidth:D0,borderTopWidth:D0,borderRightWidth:D0,borderBottomWidth:D0,borderLeftWidth:D0,borderRadius:D0,borderTopLeftRadius:D0,borderTopRightRadius:D0,borderBottomRightRadius:D0,borderBottomLeftRadius:D0,width:D0,maxWidth:D0,height:D0,maxHeight:D0,top:D0,right:D0,bottom:D0,left:D0,inset:D0,insetBlock:D0,insetBlockStart:D0,insetBlockEnd:D0,insetInline:D0,insetInlineStart:D0,insetInlineEnd:D0,padding:D0,paddingTop:D0,paddingRight:D0,paddingBottom:D0,paddingLeft:D0,paddingBlock:D0,paddingBlockStart:D0,paddingBlockEnd:D0,paddingInline:D0,paddingInlineStart:D0,paddingInlineEnd:D0,margin:D0,marginTop:D0,marginRight:D0,marginBottom:D0,marginLeft:D0,marginBlock:D0,marginBlockStart:D0,marginBlockEnd:D0,marginInline:D0,marginInlineStart:D0,marginInlineEnd:D0,fontSize:D0,backgroundPositionX:D0,backgroundPositionY:D0,...OT,zIndex:lB,fillOpacity:D6,strokeOpacity:D6,numOctaves:lB}});var mn,lY=(Z)=>mn[Z];var rB=U(()=>{pJ();cB();dB();dY();mn={...N3,color:v1,backgroundColor:v1,outlineColor:v1,fill:v1,stroke:v1,borderColor:v1,borderTopColor:v1,borderRightColor:v1,borderBottomColor:v1,borderLeftColor:v1,filter:aJ,WebkitFilter:aJ,mask:sJ,WebkitMask:sJ}});function rY(Z,J){let $=lY(Z);if(!pn.has($))$=_5;return $.getAnimatableNone?$.getAnimatableNone(J):void 0}var pn;var iB=U(()=>{r4();cB();dB();rB();pn=new Set([aJ,sJ])});function bT(Z,J,$){let Q=0,X=void 0;while(Q<Z.length&&!X){let Y=Z[Q];if(typeof Y==="string"&&!un.has(Y)&&I7(Y).values.length)X=Z[Q];Q++}if(X&&$)for(let Y of J)Z[Y]=rY($,X)}var un;var PT=U(()=>{r4();iB();un=new Set(["auto","none","0"])});var aB;var IT=U(()=>{hB();uB();eI();Y3();TY();DT();PT();BB();aB=class aB extends h7{constructor(Z,J,$,Q,X){super(Z,J,$,Q,X,!0)}readKeyframes(){let{unresolvedKeyframes:Z,element:J,name:$}=this;if(!J||!J.current)return;super.readKeyframes();for(let G=0;G<Z.length;G++){let W=Z[G];if(typeof W==="string"){if(W=W.trim(),w3(W)){let q=SB(W,J.current);if(q!==void 0)Z[G]=q;if(G===Z.length-1)this.finalKeyframe=W}}}if(this.resolveNoneKeyframes(),!gY.has($)||Z.length!==2)return;let[Q,X]=Z,Y=pB(Q),w=pB(X),z=dK(Q),H=dK(X);if(z!==H&&M6[$]){this.needsMeasurement=!0;return}if(Y===w)return;if(KB(Y)&&KB(w))for(let G=0;G<Z.length;G++){let W=Z[G];if(typeof W==="string")Z[G]=parseFloat(W)}else if(M6[$])this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:Z,name:J}=this,$=[];for(let Q=0;Q<Z.length;Q++)if(Z[Q]===null||AT(Z[Q]))$.push(Q);if($.length)bT(Z,$,J)}measureInitialState(){let{element:Z,unresolvedKeyframes:J,name:$}=this;if(!Z||!Z.current)return;if($==="height")this.suspendedScrollY=window.pageYOffset;this.measuredOrigin=M6[$](Z.measureViewportBox(),window.getComputedStyle(Z.current)),J[0]=this.measuredOrigin;let Q=J[J.length-1];if(Q!==void 0)Z.getValue($,Q).jump(Q,!1)}measureEndState(){let{element:Z,name:J,unresolvedKeyframes:$}=this;if(!Z||!Z.current)return;let Q=Z.getValue(J);Q&&Q.jump(this.measuredOrigin,!1);let X=$.length-1,Y=$[X];if($[X]=M6[J](Z.measureViewportBox(),window.getComputedStyle(Z.current)),Y!==null&&this.finalKeyframe===void 0)this.finalKeyframe=Y;if(this.removedTransforms?.length)this.removedTransforms.forEach(([w,z])=>{Z.getValue(w).set(z)});this.resolveNoneKeyframes()}}});var TT;var kT=U(()=>{TT=new Set(["opacity","clipPath","filter","transform"])});function iY(Z,J,$){if(Z==null)return[];if(Z instanceof EventTarget)return[Z];else if(typeof Z==="string"){let Q=document;if(J)Q=J.current;let X=$?.[Z]??Q.querySelectorAll(Z);return X?Array.from(X):[]}return Array.from(Z).filter((Q)=>Q!=null)}var sB=()=>{};var aY=(Z,J)=>{return J&&typeof Z==="number"?J.transform(Z):Z};var oB=()=>{};function _3(Z){return bJ(Z)&&"offsetHeight"in Z}var nB=U(()=>{m0()});var v7,cn;var sY=U(()=>{cK();({schedule:v7,cancel:cn}=XY(queueMicrotask,!1))});function oY(){return p2.x||p2.y}var p2;var nY=U(()=>{p2={x:!1,y:!1}});function tB(Z){if(Z==="x"||Z==="y")if(p2[Z])return null;else return p2[Z]=!0,()=>{p2[Z]=!1};else if(p2.x||p2.y)return null;else return p2.x=p2.y=!0,()=>{p2.x=p2.y=!1}}var CT=U(()=>{nY()});function tY(Z,J){let $=iY(Z),Q=new AbortController,X={passive:!0,...J,signal:Q.signal};return[$,X,()=>Q.abort()]}var eB=U(()=>{sB()});function dn(Z){return!(Z.pointerType==="touch"||oY())}function ZU(Z,J,$={}){let[Q,X,Y]=tY(Z,$);return Q.forEach((w)=>{let z=!1,H=!1,G,W=()=>{w.removeEventListener("pointerleave",V)},q=(_)=>{if(G)G(_),G=void 0;W()},K=(_)=>{if(z=!1,window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K),H)H=!1,q(_)},B=()=>{z=!0,window.addEventListener("pointerup",K,X),window.addEventListener("pointercancel",K,X)},V=(_)=>{if(_.pointerType==="touch")return;if(z){H=!0;return}q(_)},F=(_)=>{if(!dn(_))return;H=!1;let N=J(w,_);if(typeof N!=="function")return;G=N,w.addEventListener("pointerleave",V,X)};w.addEventListener("pointerenter",F,X),w.addEventListener("pointerdown",B,X)}),Y}var ST=U(()=>{nY();eB()});var JU=(Z,J)=>{if(!J)return!1;else if(Z===J)return!0;else return JU(Z,J.parentElement)};var ET=()=>{};var g7=(Z)=>{if(Z.pointerType==="mouse")return typeof Z.button!=="number"||Z.button<=0;else return Z.isPrimary!==!1};var $U=()=>{};function QU(Z){return ln.has(Z.tagName)||Z.isContentEditable===!0}function XU(Z){return rn.has(Z.tagName)||Z.isContentEditable===!0}var ln,rn;var wU=U(()=>{ln=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);rn=new Set(["INPUT","SELECT","TEXTAREA"])});var L3;var YU=U(()=>{L3=new WeakSet});function hT(Z){return(J)=>{if(J.key!=="Enter")return;Z(J)}}function zU(Z,J){Z.dispatchEvent(new PointerEvent("pointer"+J,{isPrimary:!0,bubbles:!0}))}var RT=(Z,J)=>{let $=Z.currentTarget;if(!$)return;let Q=hT(()=>{if(L3.has($))return;zU($,"down");let X=hT(()=>{zU($,"up")}),Y=()=>zU($,"cancel");$.addEventListener("keyup",X,J),$.addEventListener("blur",Y,J)});$.addEventListener("keydown",Q,J),$.addEventListener("blur",()=>$.removeEventListener("keydown",Q),J)};var xT=U(()=>{YU()});function yT(Z){return g7(Z)&&!oY()}function HU(Z,J,$={}){let[Q,X,Y]=tY(Z,$),w=(z)=>{let H=z.currentTarget;if(!yT(z))return;if(vT.has(z))return;if(L3.add(H),$.stopPropagation)vT.add(z);let G=J(H,z),W=(B,V)=>{if(window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",K),L3.has(H))L3.delete(H);if(!yT(B))return;if(typeof G==="function")G(B,{success:V})},q=(B)=>{W(B,H===window||H===document||$.useGlobalTarget||JU(H,B.target))},K=(B)=>{W(B,!1)};window.addEventListener("pointerup",q,X),window.addEventListener("pointercancel",K,X)};return Q.forEach((z)=>{if(($.useGlobalTarget?window:z).addEventListener("pointerdown",w,X),_3(z)){if(z.addEventListener("focus",(G)=>RT(G,X)),!QU(z)&&!z.hasAttribute("tabindex"))z.tabIndex=0}}),Y}var vT;var gT=U(()=>{nB();nY();ET();$U();eB();wU();xT();YU();vT=new WeakSet});function A3(Z){return bJ(Z)&&"ownerSVGElement"in Z}var eY=U(()=>{m0()});function on({target:Z,borderBoxSize:J}){Zz.get(Z)?.forEach(($)=>{$(Z,{get width(){return an(Z,J)},get height(){return sn(Z,J)}})})}function nn(Z){Z.forEach(on)}function tn(){if(typeof ResizeObserver>"u")return;Jz=new ResizeObserver(nn)}function mT(Z,J){if(!Jz)tn();let $=iY(Z);return $.forEach((Q)=>{let X=Zz.get(Q);if(!X)X=new Set,Zz.set(Q,X);X.add(J),Jz?.observe(Q)}),()=>{$.forEach((Q)=>{let X=Zz.get(Q);if(X?.delete(J),!X?.size)Jz?.unobserve(Q)})}}var Zz,Jz,fT=(Z,J,$)=>(Q,X)=>{if(X&&X[0])return X[0][Z+"Size"];else if(A3(Q)&&"getBBox"in Q)return Q.getBBox()[J];else return Q[$]},an,sn;var pT=U(()=>{eY();sB();Zz=new WeakMap,an=fT("inline","width","offsetWidth"),sn=fT("block","height","offsetHeight")});function en(){D3=()=>{let Z={get width(){return window.innerWidth},get height(){return window.innerHeight}};$z.forEach((J)=>J(Z))},window.addEventListener("resize",D3)}function uT(Z){if($z.add(Z),!D3)en();return()=>{if($z.delete(Z),!$z.size&&typeof D3==="function")window.removeEventListener("resize",D3),D3=void 0}}var $z,D3;var cT=U(()=>{$z=new Set});function Qz(Z,J){return typeof Z==="function"?uT(Z):mT(Z,J)}var dT=U(()=>{pT();cT()});function lT(Z){return A3(Z)&&Z.tagName==="svg"}var rT=U(()=>{eY()});var Zt,iT=(Z)=>Zt.find(cY(Z));var aT=U(()=>{pJ();r4();uB();fB();Zt=[...mB,v1,_5]});var GU=()=>({translate:0,scale:1,origin:0,originPoint:0}),M8=()=>({x:GU(),y:GU()}),WU=()=>({min:0,max:0}),g1=()=>({x:WU(),y:WU()});var oJ=()=>{};var sT;var oT=U(()=>{sT=new WeakMap});function O6(Z){return Z!==null&&typeof Z==="object"&&typeof Z.start==="function"}var Xz=()=>{};function o4(Z){return typeof Z==="string"||Array.isArray(Z)}var nJ=()=>{};var wz,tJ;var Yz=U(()=>{wz=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tJ=["initial",...wz]});function O8(Z){return O6(Z.animate)||tJ.some((J)=>o4(Z[J]))}function eJ(Z){return Boolean(O8(Z)||Z.variants)}var qU=U(()=>{Xz();nJ();Yz()});function nT(Z,J,$){for(let Q in J){let X=J[Q],Y=$[Q];if(P1(X))Z.addValue(Q,X);else if(P1(Y))Z.addValue(Q,B4(X,{owner:Z}));else if(Y!==X)if(Z.hasValue(Q)){let w=Z.getValue(Q);if(w.liveStyle===!0)w.jump(X);else if(!w.hasAnimated)w.set(X)}else{let w=Z.getStaticValue(Q);Z.addValue(Q,B4(w!==void 0?w:X,{owner:Z}))}}for(let Q in $)if(J[Q]===void 0)Z.removeValue(Q);return J}var tT=U(()=>{U3();s4()});var Z$,zz;var KU=U(()=>{Z$={current:null},zz={current:!1}});function eT(){if(zz.current=!0,!Jt)return;if(window.matchMedia){let Z=window.matchMedia("(prefers-reduced-motion)"),J=()=>Z$.current=Z.matches;Z.addEventListener("change",J),J()}else Z$.current=!1}var Jt;var Zk=U(()=>{KU();Jt=typeof window<"u"});function J$(Z){Hz=Z}function BU(){return Hz}class Gz{scrapeMotionValuesFromProps(Z,J,$){return{}}constructor({parent:Z,props:J,presenceContext:$,reducedMotionConfig:Q,skipAnimations:X,blockInitialAnimation:Y,visualState:w},z={}){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=h7,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{if(!this.current)return;this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection)},this.renderScheduledAt=0,this.scheduleRender=()=>{let K=l1.now();if(this.renderScheduledAt<K)this.renderScheduledAt=K,p0.render(this.render,!1,!0)};let{latestValues:H,renderState:G}=w;if(this.latestValues=H,this.baseTarget={...H},this.initialValues=J.initial?{...H}:{},this.renderState=G,this.parent=Z,this.props=J,this.presenceContext=$,this.depth=Z?Z.depth+1:0,this.reducedMotionConfig=Q,this.skipAnimationsConfig=X,this.options=z,this.blockInitialAnimation=Boolean(Y),this.isControllingVariants=O8(J),this.isVariantNode=eJ(J),this.isVariantNode)this.variantChildren=new Set;this.manuallyAnimateOnMount=Boolean(Z&&Z.current);let{willChange:W,...q}=this.scrapeMotionValuesFromProps(J,{},this);for(let K in q){let B=q[K];if(H[K]!==void 0&&P1(B))B.set(H[K])}}mount(Z){if(this.hasBeenMounted)for(let J in this.initialValues)this.values.get(J)?.jump(this.initialValues[J]),this.latestValues[J]=this.initialValues[J];if(this.current=Z,sT.set(Z,this),this.projection&&!this.projection.instance)this.projection.mount(Z);if(this.parent&&this.isVariantNode&&!this.isControllingVariants)this.removeFromVariantTree=this.parent.addVariantChild(this);if(this.values.forEach((J,$)=>this.bindToMotionValue($,J)),this.reducedMotionConfig==="never")this.shouldReduceMotion=!1;else if(this.reducedMotionConfig==="always")this.shouldReduceMotion=!0;else{if(!zz.current)eT();this.shouldReduceMotion=Z$.current}this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),B2(this.notifyUpdate),B2(this.render),this.valueSubscriptions.forEach((Z)=>Z()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let Z in this.events)this.events[Z].clear();for(let Z in this.features){let J=this.features[Z];if(J)J.unmount(),J.isMounted=!1}this.current=null}addChild(Z){this.children.add(Z),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(Z)}removeChild(Z){this.children.delete(Z),this.enteringChildren&&this.enteringChildren.delete(Z)}bindToMotionValue(Z,J){if(this.valueSubscriptions.has(Z))this.valueSubscriptions.get(Z)();if(J.accelerate&&TT.has(Z)&&this.current instanceof HTMLElement){let{factory:Y,keyframes:w,times:z,ease:H,duration:G}=J.accelerate,W=new cJ({element:this.current,name:Z,keyframes:w,times:z,ease:H,duration:G5(G)}),q=Y(W);this.valueSubscriptions.set(Z,()=>{q(),W.cancel()});return}let $=m2.has(Z);if($&&this.onBindTransform)this.onBindTransform();let Q=J.on("change",(Y)=>{if(this.latestValues[Z]=Y,this.props.onUpdate&&p0.preRender(this.notifyUpdate),$&&this.projection)this.projection.isTransformDirty=!0;this.scheduleRender()}),X;if(typeof window<"u"&&window.MotionCheckAppearSync)X=window.MotionCheckAppearSync(this,Z,J);this.valueSubscriptions.set(Z,()=>{if(Q(),X)X();if(J.owner)J.stop()})}sortNodePosition(Z){if(!this.current||!this.sortInstanceNodePosition||this.type!==Z.type)return 0;return this.sortInstanceNodePosition(this.current,Z.current)}updateFeatures(){let Z="animation";for(Z in Hz){let J=Hz[Z];if(!J)continue;let{isEnabled:$,Feature:Q}=J;if(!this.features[Z]&&Q&&$(this.props))this.features[Z]=new Q(this);if(this.features[Z]){let X=this.features[Z];if(X.isMounted)X.update();else X.mount(),X.isMounted=!0}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):g1()}getStaticValue(Z){return this.latestValues[Z]}setStaticValue(Z,J){this.latestValues[Z]=J}update(Z,J){if(Z.transformTemplate||this.props.transformTemplate)this.scheduleRender();this.prevProps=this.props,this.props=Z,this.prevPresenceContext=this.presenceContext,this.presenceContext=J;for(let $=0;$<Jk.length;$++){let Q=Jk[$];if(this.propEventSubscriptions[Q])this.propEventSubscriptions[Q](),delete this.propEventSubscriptions[Q];let X="on"+Q,Y=Z[X];if(Y)this.propEventSubscriptions[Q]=this.on(Q,Y)}if(this.prevMotionValues=nT(this,this.scrapeMotionValuesFromProps(Z,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue)this.handleChildMotionValue()}getProps(){return this.props}getVariant(Z){return this.props.variants?this.props.variants[Z]: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(Z){let J=this.getClosestVariantNode();if(J)return J.variantChildren&&J.variantChildren.add(Z),()=>J.variantChildren.delete(Z)}addValue(Z,J){let $=this.values.get(Z);if(J!==$){if($)this.removeValue(Z);this.bindToMotionValue(Z,J),this.values.set(Z,J),this.latestValues[Z]=J.get()}}removeValue(Z){this.values.delete(Z);let J=this.valueSubscriptions.get(Z);if(J)J(),this.valueSubscriptions.delete(Z);delete this.latestValues[Z],this.removeValueFromRenderState(Z,this.renderState)}hasValue(Z){return this.values.has(Z)}getValue(Z,J){if(this.props.values&&this.props.values[Z])return this.props.values[Z];let $=this.values.get(Z);if($===void 0&&J!==void 0)$=B4(J===null?void 0:J,{owner:this}),this.addValue(Z,$);return $}readValue(Z,J){let $=this.latestValues[Z]!==void 0||!this.current?this.latestValues[Z]:this.getBaseTargetFromProps(this.props,Z)??this.readValueFromInstance(this.current,Z,this.options);if($!==void 0&&$!==null){if(typeof $==="string"&&(jJ($)||PJ($)))$=parseFloat($);else if(!iT($)&&_5.test(J))$=rY(Z,J);this.setBaseTarget(Z,P1($)?$.get():$)}return P1($)?$.get():$}setBaseTarget(Z,J){this.baseTarget[Z]=J}getBaseTarget(Z){let{initial:J}=this.props,$;if(typeof J==="string"||typeof J==="object"){let X=y7(this.props,J,this.presenceContext?.custom);if(X)$=X[Z]}if(J&&$!==void 0)return $;let Q=this.getBaseTargetFromProps(this.props,Z);if(Q!==void 0&&!P1(Q))return Q;return this.initialValues[Z]!==void 0&&$===void 0?void 0:this.baseTarget[Z]}on(Z,J){if(!this.events[Z])this.events[Z]=new N8;return this.events[Z].add(J)}notify(Z,...J){if(this.events[Z])this.events[Z].notify(...J)}scheduleRenderMicrotask(){v7.render(this.render)}}var Jk,Hz;var UU=U(()=>{m0();TY();jB();kT();sY();A6();oJ();U3();r4();iB();aT();s4();oT();qU();K4();tT();Zk();vY();KU();W4();Jk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Hz={}});var $$;var VU=U(()=>{s4();IT();UU();$$=class $$ extends Gz{constructor(){super(...arguments);this.KeyframeResolver=aB}sortInstanceNodePosition(Z,J){return Z.compareDocumentPosition(J)&2?1:-1}getBaseTargetFromProps(Z,J){let $=Z.style;return $?$[J]:void 0}removeValueFromRenderState(Z,{vars:J,style:$}){delete J[Z],delete $[Z]}handleChildMotionValue(){if(this.childSubscription)this.childSubscription(),delete this.childSubscription;let{children:Z}=this.props;if(P1(Z))this.childSubscription=Z.on("change",(J)=>{if(this.current)this.current.textContent=`${J}`})}}});class P5{constructor(Z){this.isMounted=!1,this.node=Z}update(){}}var $k=()=>{};function Q$({top:Z,left:J,right:$,bottom:Q}){return{x:{min:J,max:$},y:{min:Z,max:Q}}}function FU({x:Z,y:J}){return{top:J.min,right:Z.max,bottom:J.max,left:Z.min}}function NU(Z,J){if(!J)return Z;let $=J({x:Z.left,y:Z.top}),Q=J({x:Z.right,y:Z.bottom});return{top:$.y,left:$.x,bottom:Q.y,right:Q.x}}var _U=()=>{};function LU(Z){return Z===void 0||Z===1}function Wz({scale:Z,scaleX:J,scaleY:$}){return!LU(Z)||!LU(J)||!LU($)}function j6(Z){return Wz(Z)||AU(Z)||Z.z||Z.rotate||Z.rotateX||Z.rotateY||Z.skewX||Z.skewY}function AU(Z){return Qk(Z.x)||Qk(Z.y)}function Qk(Z){return Z&&Z!=="0%"}var DU=()=>{};function X$(Z,J,$){let Q=Z-$,X=J*Q;return $+X}function Xk(Z,J,$,Q,X){if(X!==void 0)Z=X$(Z,X,Q);return X$(Z,$,Q)+J}function MU(Z,J=0,$=1,Q,X){Z.min=Xk(Z.min,J,$,Q,X),Z.max=Xk(Z.max,J,$,Q,X)}function OU(Z,{x:J,y:$}){MU(Z.x,J.translate,J.scale,J.originPoint),MU(Z.y,$.translate,$.scale,$.originPoint)}function Gk(Z,J,$,Q=!1){let X=$.length;if(!X)return;J.x=J.y=1;let Y,w;for(let z=0;z<X;z++){Y=$[z],w=Y.projectionDelta;let{visualElement:H}=Y.options;if(H&&H.props.style&&H.props.style.display==="contents")continue;if(Q&&Y.options.layoutScroll&&Y.scroll&&Y!==Y.root)f7(Z,{x:-Y.scroll.offset.x,y:-Y.scroll.offset.y});if(w)J.x*=w.x.scale,J.y*=w.y.scale,OU(Z,w);if(Q&&j6(Y.latestValues))f7(Z,Y.latestValues)}if(J.x<Yk&&J.x>wk)J.x=1;if(J.y<Yk&&J.y>wk)J.y=1}function j8(Z,J){Z.min=Z.min+J,Z.max=Z.max+J}function zk(Z,J,$,Q,X=0.5){let Y=Q1(Z.min,Z.max,X);MU(Z,J,$,Y,Q)}function Hk(Z,J){if(typeof Z==="string")return parseFloat(Z)/100*(J.max-J.min);return Z}function f7(Z,J){zk(Z.x,Hk(J.x,Z.x),J.scaleX,J.scale,J.originX),zk(Z.y,Hk(J.y,Z.y),J.scaleY,J.scale,J.originY)}var wk=0.999999999999,Yk=1.0000000000001;var qz=U(()=>{f2();DU()});function Kz(Z,J){return Q$(NU(Z.getBoundingClientRect(),J))}function jU(Z,J,$){let Q=Kz(Z,$),{scroll:X}=J;if(X)j8(Q.x,X.offset.x),j8(Q.y,X.offset.y);return Q}var bU=U(()=>{_U();qz()});function Wk(Z,J,$){let Q="",X=!0;for(let Y=0;Y<Qt;Y++){let w=i4[Y],z=Z[w];if(z===void 0)continue;let H=!0;if(typeof z==="number")H=z===(w.startsWith("scale")?1:0);else{let G=parseFloat(z);H=w.startsWith("scale")?G===1:G===0}if(!H||$){let G=aY(z,N3[w]);if(!H){X=!1;let W=$t[w]||w;Q+=`${W}(${G}) `}if($)J[w]=G}}if(Q=Q.trim(),$)Q=$(J,X?"":Q);else if(X)Q="none";return Q}var $t,Qt;var qk=U(()=>{oB();dY();K4();$t={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qt=i4.length});function m7(Z,J,$){let{style:Q,vars:X,transformOrigin:Y}=Z,w=!1,z=!1;for(let H in J){let G=J[H];if(m2.has(H)){w=!0;continue}else if(zY(H)){X[H]=G;continue}else{let W=aY(G,N3[H]);if(H.startsWith("origin"))z=!0,Y[H]=W;else Q[H]=W}}if(!J.transform){if(w||$)Q.transform=Wk(J,Z.transform,$);else if(Q.transform)Q.transform="none"}if(z){let{originX:H="50%",originY:G="50%",originZ:W=0}=Y;Q.transformOrigin=`${H} ${G} ${W}`}}var Bz=U(()=>{oB();dY();K4();Y3();qk()});function Uz(Z,{style:J,vars:$},Q,X){let Y=Z.style,w;for(w in J)Y[w]=J[w];X?.applyProjectionStyles(Y,Q);for(w in $)Y.setProperty(w,$[w])}var PU=()=>{};function Kk(Z,J){if(J.max===J.min)return 0;return Z/(J.max-J.min)*100}var M3;var Bk=U(()=>{l4();M3={correct:(Z,J)=>{if(!J.target)return Z;if(typeof Z==="string")if(D0.test(Z))Z=parseFloat(Z);else return Z;let $=Kk(Z,J.target.x),Q=Kk(Z,J.target.y);return`${$}% ${Q}%`}}});var Uk;var Vk=U(()=>{r4();f2();Uk={correct:(Z,{treeScale:J,projectionDelta:$})=>{let Q=Z,X=_5.parse(Z);if(X.length>5)return Q;let Y=_5.createTransformer(Z),w=typeof X[0]!=="number"?1:0,z=$.x.scale*J.x,H=$.y.scale*J.y;X[0+w]/=z,X[1+w]/=H;let G=Q1(z,H,0.5);if(typeof X[2+w]==="number")X[2+w]/=G;if(typeof X[3+w]==="number")X[3+w]/=G;return Y(X)}}});var w$;var IU=U(()=>{Bk();Vk();w$={borderRadius:{...M3,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:M3,borderTopRightRadius:M3,borderBottomLeftRadius:M3,borderBottomRightRadius:M3,boxShadow:Uk}});function Y$(Z,{layout:J,layoutId:$}){return m2.has(Z)||Z.startsWith("origin")||(J||$!==void 0)&&(!!w$[Z]||Z==="opacity")}var TU=U(()=>{K4();IU()});function p7(Z,J,$){let Q=Z.style,X=J?.style,Y={};if(!Q)return Y;for(let w in Q)if(P1(Q[w])||X&&P1(X[w])||Y$(w,Z)||$?.getValue(w)?.liveStyle!==void 0)Y[w]=Q[w];return Y}var Vz=U(()=>{s4();TU()});function Xt(Z){return window.getComputedStyle(Z)}var Fz;var Fk=U(()=>{Y3();K4();qB();bU();VU();Bz();PU();Vz();Fz=class Fz extends $${constructor(){super(...arguments);this.type="html",this.renderInstance=Uz}readValueFromInstance(Z,J){if(m2.has(J))return this.projection?.isProjecting?PY(J):PI(Z,J);else{let $=Xt(Z),Q=(zY(J)?$.getPropertyValue(J):$[J])||0;return typeof Q==="string"?Q.trim():Q}}measureInstanceViewportBox(Z,{transformPagePoint:J}){return Kz(Z,J)}build(Z,J,$){m7(Z,J,$.transformTemplate)}scrapeMotionValuesFromProps(Z,J,$){return p7(Z,J,$)}}});function Nk(Z,J,$=1,Q=0,X=!0){Z.pathLength=1;let Y=X?wt:Yt;Z[Y.offset]=`${-Q}`,Z[Y.array]=`${J} ${$}`}var wt,Yt;var _k=U(()=>{wt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yt={offset:"strokeDashoffset",array:"strokeDasharray"}});function z$(Z,{attrX:J,attrY:$,attrScale:Q,pathLength:X,pathSpacing:Y=1,pathOffset:w=0,...z},H,G,W){if(m7(Z,z,G),H){if(Z.style.viewBox)Z.attrs.viewBox=Z.style.viewBox;return}Z.attrs=Z.style,Z.style={};let{attrs:q,style:K}=Z;if(q.transform)K.transform=q.transform,delete q.transform;if(K.transform||q.transformOrigin)K.transformOrigin=q.transformOrigin??"50% 50%",delete q.transformOrigin;if(K.transform)K.transformBox=W?.transformBox??"fill-box",delete q.transformBox;for(let B of zt)if(q[B]!==void 0)K[B]=q[B],delete q[B];if(J!==void 0)q.x=J;if($!==void 0)q.y=$;if(Q!==void 0)q.scale=Q;if(X!==void 0)Nk(q,X,Y,w,!1)}var zt;var kU=U(()=>{Bz();_k();zt=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"]});var Nz;var CU=U(()=>{Nz=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"])});var H$=(Z)=>typeof Z==="string"&&Z.toLowerCase()==="svg";var SU=()=>{};function Lk(Z,J,$,Q){Uz(Z,J,void 0,Q);for(let X in J.attrs)Z.setAttribute(!Nz.has(X)?F3(X):X,J.attrs[X])}var Ak=U(()=>{fY();PU();CU()});function G$(Z,J,$){let Q=p7(Z,J,$);for(let X in Z)if(P1(Z[X])||P1(J[X])){let Y=i4.indexOf(X)!==-1?"attr"+X.charAt(0).toUpperCase()+X.substring(1):X;Q[Y]=Z[X]}return Q}var EU=U(()=>{s4();K4();Vz()});var _z;var Dk=U(()=>{K4();rB();oJ();VU();fY();kU();CU();SU();Ak();EU();_z=class _z extends $${constructor(){super(...arguments);this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=g1}getBaseTargetFromProps(Z,J){return Z[J]}readValueFromInstance(Z,J){if(m2.has(J)){let $=lY(J);return $?$.default||0:0}return J=!Nz.has(J)?F3(J):J,Z.getAttribute(J)}scrapeMotionValuesFromProps(Z,J,$){return G$(Z,J,$)}build(Z,J,$){z$(Z,J,this.isSVGTag,$.transformTemplate,$.style)}renderInstance(Z,J,$,Q){Lk(Z,J,$,Q)}mount(Z){this.isSVGTag=H$(Z.tagName),super.mount(Z)}}});function hU(Z){if(!Z)return;if(!Z.isControllingVariants){let $=Z.parent?hU(Z.parent)||{}:{};if(Z.props.initial!==void 0)$.initial=Z.props.initial;return $}let J={};for(let $=0;$<Ht;$++){let Q=tJ[$],X=Z.props[Q];if(o4(X)||X===!1)J[Q]=X}return J}var Ht;var Mk=U(()=>{nJ();Yz();Ht=tJ.length});function RU(Z,J){if(!Array.isArray(J))return!1;let $=J.length;if($!==Z.length)return!1;for(let Q=0;Q<$;Q++)if(J[Q]!==Z[Q])return!1;return!0}var Ok=()=>{};function qt(Z){return(J)=>{return Promise.all(J.map(({animation:$,options:Q})=>FT(Z,$,Q)))}}function xU(Z){let J=qt(Z),$=jk(),Q=!0,X=!1,Y=(G)=>(W,q)=>{let K=a4(Z,q,G==="exit"?Z.presenceContext?.custom:void 0);if(K){let{transition:B,transitionEnd:V,...F}=K;W={...W,...F,...V}}return W};function w(G){J=G(Z)}function z(G){let{props:W}=Z,q=hU(Z.parent)||{},K=[],B=new Set,V={},F=1/0;for(let N=0;N<Wt;N++){let L=Gt[N],M=$[L],A=W[L]!==void 0?W[L]:q[L],O=o4(A),D=L===G?M.isActive:null;if(D===!1)F=N;let k=A===q[L]&&A!==W[L]&&O;if(k&&(Q||X)&&Z.manuallyAnimateOnMount)k=!1;if(M.protectedKeys={...V},!M.isActive&&D===null||!A&&!M.prevProp||O6(A)||typeof A==="boolean")continue;if(L==="exit"&&M.isActive&&D!==!0){if(M.prevResolvedValues)V={...V,...M.prevResolvedValues};continue}let b=bk(M.prevProp,A),h=b||L===G&&M.isActive&&!k&&O||N>F&&O,I=!1,d=Array.isArray(A)?A:[A],v=d.reduce(Y(L),{});if(D===!1)v={};let{prevResolvedValues:C={}}=M,y={...C,...v},g=(E)=>{if(h=!0,B.has(E))I=!0,B.delete(E);M.needsAnimating[E]=!0;let m=Z.getValue(E);if(m)m.liveStyle=!1};for(let E in y){let m=v[E],j=C[E];if(V.hasOwnProperty(E))continue;let H0=!1;if(rJ(m)&&rJ(j))H0=!RU(m,j);else H0=m!==j;if(H0)if(m!==void 0&&m!==null)g(E);else B.add(E);else if(m!==void 0&&B.has(E))g(E);else M.protectedKeys[E]=!0}if(M.prevProp=A,M.prevResolvedValues=v,M.isActive)V={...V,...v};if((Q||X)&&Z.blockInitialAnimation)h=!1;let S=k&&b;if(h&&(!S||I))K.push(...d.map((E)=>{let m={type:L};if(typeof E==="string"&&(Q||X)&&!S&&Z.manuallyAnimateOnMount&&Z.parent){let{parent:j}=Z,H0=a4(j,E);if(j.enteringChildren&&H0){let{delayChildren:w0}=H0.transition||{};m.delay=hY(j.enteringChildren,Z,w0)}}return{animation:E,options:m}}))}if(B.size){let N={};if(typeof W.initial!=="boolean"){let L=a4(Z,Array.isArray(W.initial)?W.initial[0]:W.initial);if(L&&L.transition)N.transition=L.transition}B.forEach((L)=>{let M=Z.getBaseTarget(L),A=Z.getValue(L);if(A)A.liveStyle=!0;N[L]=M??null}),K.push({animation:N})}let _=Boolean(K.length);if(Q&&(W.initial===!1||W.initial===W.animate)&&!Z.manuallyAnimateOnMount)_=!1;return Q=!1,X=!1,_?J(K):Promise.resolve()}function H(G,W){if($[G].isActive===W)return Promise.resolve();Z.variantChildren?.forEach((K)=>K.animationState?.setActive(G,W)),$[G].isActive=W;let q=z(G);for(let K in $)$[K].protectedKeys={};return q}return{animateChanges:z,setActive:H,setAnimateFunction:w,getState:()=>$,reset:()=>{$=jk(),X=!0}}}function bk(Z,J){if(typeof J==="string")return J!==Z;else if(Array.isArray(J))return!RU(J,Z);return!1}function u7(Z=!1){return{isActive:Z,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jk(){return{animate:u7(!0),whileInView:u7(),whileHover:u7(),whileTap:u7(),whileDrag:u7(),whileFocus:u7(),exit:u7()}}var Gt,Wt;var Pk=U(()=>{NT();CB();Mk();Xz();RB();nJ();lJ();Ok();Yz();Gt=[...wz].reverse(),Wt=wz.length});function Ik(Z,J){Z.min=J.min,Z.max=J.max}function u2(Z,J){Ik(Z.x,J.x),Ik(Z.y,J.y)}function yU(Z,J){Z.translate=J.translate,Z.scale=J.scale,Z.originPoint=J.originPoint,Z.origin=J.origin}var Tk=()=>{};function W5(Z){return Z.max-Z.min}function mU(Z,J,$){return Math.abs(Z-J)<=$}function vU(Z,J,$,Q=0.5){if(Z.origin=Q,Z.originPoint=Q1(J.min,J.max,Z.origin),Z.scale=W5($)/W5(J),Z.translate=Q1($.min,$.max,Z.origin)-Z.originPoint,Z.scale>=Kt&&Z.scale<=Bt||isNaN(Z.scale))Z.scale=1;if(Z.translate>=Ut&&Z.translate<=Vt||isNaN(Z.translate))Z.translate=0}function c7(Z,J,$,Q){vU(Z.x,J.x,$.x,Q?Q.originX:void 0),vU(Z.y,J.y,$.y,Q?Q.originY:void 0)}function gU(Z,J,$){Z.min=$.min+J.min,Z.max=Z.min+W5(J)}function pU(Z,J,$){gU(Z.x,J.x,$.x),gU(Z.y,J.y,$.y)}function fU(Z,J,$){Z.min=J.min-$.min,Z.max=Z.min+W5(J)}function O3(Z,J,$){fU(Z.x,J.x,$.x),fU(Z.y,J.y,$.y)}var kk=0.0001,Kt,Bt,Ck=0.01,Ut,Vt;var Lz=U(()=>{f2();Kt=1-kk,Bt=1+kk,Ut=0-Ck,Vt=0+Ck});function Sk(Z,J,$,Q,X){if(Z-=J,Z=X$(Z,1/$,Q),X!==void 0)Z=X$(Z,1/X,Q);return Z}function Ft(Z,J=0,$=1,Q=0.5,X,Y=Z,w=Z){if(p5.test(J))J=parseFloat(J),J=Q1(w.min,w.max,J/100)-w.min;if(typeof J!=="number")return;let z=Q1(Y.min,Y.max,Q);if(Z===Y)z-=J;Z.min=Sk(Z.min,J,$,z,X),Z.max=Sk(Z.max,J,$,z,X)}function Ek(Z,J,[$,Q,X],Y,w){Ft(Z,J[$],J[Q],J[X],J.scale,Y,w)}function uU(Z,J,$,Q){Ek(Z.x,J,Nt,$?$.x:void 0,Q?Q.x:void 0),Ek(Z.y,J,_t,$?$.y:void 0,Q?Q.y:void 0)}var Nt,_t;var hk=U(()=>{f2();l4();qz();Nt=["x","scaleX","originX"],_t=["y","scaleY","originY"]});function Rk(Z){return Z.translate===0&&Z.scale===1}function cU(Z){return Rk(Z.x)&&Rk(Z.y)}function xk(Z,J){return Z.min===J.min&&Z.max===J.max}function vk(Z,J){return xk(Z.x,J.x)&&xk(Z.y,J.y)}function yk(Z,J){return Math.round(Z.min)===Math.round(J.min)&&Math.round(Z.max)===Math.round(J.max)}function dU(Z,J){return yk(Z.x,J.x)&&yk(Z.y,J.y)}function lU(Z){return W5(Z.x)/W5(Z.y)}function rU(Z,J){return Z.translate===J.translate&&Z.scale===J.scale&&Z.originPoint===J.originPoint}var gk=U(()=>{Lz()});function P2(Z){return[Z("x"),Z("y")]}var iU=()=>{};function fk(Z,J,$){let Q="",X=Z.x.translate/J.x,Y=Z.y.translate/J.y,w=$?.z||0;if(X||Y||w)Q=`translate3d(${X}px, ${Y}px, ${w}px) `;if(J.x!==1||J.y!==1)Q+=`scale(${1/J.x}, ${1/J.y}) `;if($){let{transformPerspective:G,rotate:W,rotateX:q,rotateY:K,skewX:B,skewY:V}=$;if(G)Q=`perspective(${G}px) ${Q}`;if(W)Q+=`rotate(${W}deg) `;if(q)Q+=`rotateX(${q}deg) `;if(K)Q+=`rotateY(${K}deg) `;if(B)Q+=`skewX(${B}deg) `;if(V)Q+=`skewY(${V}deg) `}let z=Z.x.scale*J.x,H=Z.y.scale*J.y;if(z!==1||H!==1)Q+=`scale(${z}, ${H})`;return Q||"none"}var mk=()=>{};function lk(Z,J,$,Q,X,Y){if(X)Z.opacity=Q1(0,$.opacity??1,At(Q)),Z.opacityExit=Q1(J.opacity??1,0,Dt(Q));else if(Y)Z.opacity=Q1(J.opacity??1,$.opacity??1,Q);for(let w=0;w<Lt;w++){let z=`border${dk[w]}Radius`,H=ck(J,z),G=ck($,z);if(H===void 0&&G===void 0)continue;if(H||(H=0),G||(G=0),H===0||G===0||uk(H)===uk(G)){if(Z[z]=Math.max(Q1(pk(H),pk(G),Q),0),p5.test(G)||p5.test(H))Z[z]+="%"}else Z[z]=G}if(J.rotate||$.rotate)Z.rotate=Q1(J.rotate||0,$.rotate||0,Q)}function ck(Z,J){return Z[J]!==void 0?Z[J]:Z.borderRadius}function rk(Z,J,$){return(Q)=>{if(Q<Z)return 0;if(Q>J)return 1;return $(p4(Z,J,Q))}}var dk,Lt,pk=(Z)=>typeof Z==="string"?parseFloat(Z):Z,uk=(Z)=>typeof Z==="number"||D0.test(Z),At,Dt;var ik=U(()=>{f2();l4();m0();dk=["TopLeft","TopRight","BottomLeft","BottomRight"],Lt=dk.length;At=rk(0,0.5,EJ),Dt=rk(0.5,0.95,d1)});function ak(Z,J,$){let Q=P1(Z)?Z:B4(Z);return Q.start(x7("",Q,J,$)),Q.animation}var sk=U(()=>{yY();U3();s4()});function n4(Z,J,$,Q={passive:!0}){return Z.addEventListener(J,$,Q),()=>Z.removeEventListener(J,$)}var aU=()=>{};var ok=(Z,J)=>Z.depth-J.depth;var nk=()=>{};class sU{constructor(){this.children=[],this.isDirty=!1}add(Z){P7(this.children,Z),this.isDirty=!0}remove(Z){F8(this.children,Z),this.isDirty=!0}forEach(Z){this.isDirty&&this.children.sort(ok),this.isDirty=!1,this.children.forEach(Z)}}var tk=U(()=>{m0();nk()});function ek(Z,J){let $=l1.now(),Q=({timestamp:X})=>{let Y=X-$;if(Y>=J)B2(Q),Z(Y-J)};return p0.setup(Q,!0),()=>B2(Q)}var ZC=U(()=>{A6();W4()});function d7(Z){return P1(Z)?Z.get():Z}var oU=U(()=>{s4()});class nU{constructor(){this.members=[]}add(Z){P7(this.members,Z);for(let J=this.members.length-1;J>=0;J--){let $=this.members[J];if($===Z||$===this.lead||$===this.prevLead)continue;let Q=$.instance;if((!Q||Q.isConnected===!1)&&!$.snapshot)F8(this.members,$),$.unmount()}Z.scheduleRender()}remove(Z){if(F8(this.members,Z),Z===this.prevLead)this.prevLead=void 0;if(Z===this.lead){let J=this.members[this.members.length-1];if(J)this.promote(J)}}relegate(Z){for(let J=this.members.indexOf(Z)-1;J>=0;J--){let $=this.members[J];if($.isPresent!==!1&&$.instance?.isConnected!==!1)return this.promote($),!0}return!1}promote(Z,J){let $=this.lead;if(Z===$)return;if(this.prevLead=$,this.lead=Z,Z.show(),$){$.updateSnapshot(),Z.scheduleRender();let{layoutDependency:Q}=$.options,{layoutDependency:X}=Z.options;if(Q===void 0||Q!==X){if(Z.resumeFrom=$,J)$.preserveOpacity=!0;if($.snapshot)Z.snapshot=$.snapshot,Z.snapshot.latestValues=$.animationValues||$.latestValues;if(Z.root?.isUpdating)Z.isLayoutDirty=!0}if(Z.options.crossfade===!1)$.hide()}}exitAnimationComplete(){this.members.forEach((Z)=>{Z.options.onExitComplete?.(),Z.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach((Z)=>Z.instance&&Z.scheduleRender(!1))}removeLeadSnapshot(){if(this.lead?.snapshot)this.lead.snapshot=void 0}}var JC=U(()=>{m0()});var l7;var tU=U(()=>{l7={hasAnimatedSinceResize:!0,hasEverUpdated:!1}});function ZV(Z,J,$,Q){let{latestValues:X}=J;if(X[Z]){if($[Z]=X[Z],J.setStaticValue(Z,0),Q)Q[Z]=0}}function WC(Z){if(Z.hasCheckedOptimisedAppear=!0,Z.root===Z)return;let{visualElement:J}=Z.options;if(!J)return;let $=mY(J);if(window.MotionHasOptimisedAnimation($,"transform")){let{layout:X,layoutId:Y}=Z.options;window.MotionCancelOptimisedAnimation($,"transform",p0,!(X||Y))}let{parent:Q}=Z;if(Q&&!Q.hasCheckedOptimisedAppear)WC(Q)}function Az({attachResizeListener:Z,defaultParent:J,measureScroll:$,checkIsScrollRoot:Q,resetTransform:X}){return class{constructor(w={},z=J?.()){this.id=Ot++,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=()=>{if(this.isUpdating)this.isUpdating=!1,this.clearAllSnapshots()},this.updateProjection=()=>{if(this.projectionUpdateScheduled=!1,b2.value)r7.nodes=r7.calculatedTargetDeltas=r7.calculatedProjections=0;if(this.nodes.forEach(Pt),this.nodes.forEach(Ct),this.nodes.forEach(St),this.nodes.forEach(It),b2.addProjectionMetrics)b2.addProjectionMetrics(r7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=w,this.root=z?z.root||z:this,this.path=z?[...z.path,z]:[],this.parent=z,this.depth=z?z.depth+1:0;for(let H=0;H<this.path.length;H++)this.path[H].shouldResetTransform=!0;if(this.root===this)this.nodes=new sU}addEventListener(w,z){if(!this.eventHandlers.has(w))this.eventHandlers.set(w,new N8);return this.eventHandlers.get(w).add(z)}notifyListeners(w,...z){let H=this.eventHandlers.get(w);H&&H.notify(...z)}hasListeners(w){return this.eventHandlers.has(w)}mount(w){if(this.instance)return;this.isSVG=A3(w)&&!lT(w),this.instance=w;let{layoutId:z,layout:H,visualElement:G}=this.options;if(G&&!G.current)G.mount(w);if(this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(H||z))this.isLayoutDirty=!0;if(Z){let W,q=0,K=()=>this.root.updateBlockedByResize=!1;p0.read(()=>{q=window.innerWidth}),Z(w,()=>{let B=window.innerWidth;if(B===q)return;if(q=B,this.root.updateBlockedByResize=!0,W&&W(),W=ek(K,250),l7.hasAnimatedSinceResize)l7.hasAnimatedSinceResize=!1,this.nodes.forEach(XC)})}if(z)this.root.registerSharedNode(z,this);if(this.options.animate!==!1&&G&&(z||H))this.addEventListener("didUpdate",({delta:W,hasLayoutChanged:q,hasRelativeLayoutChanged:K,layout:B})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let V=this.options.transition||G.getDefaultTransition()||yt,{onLayoutAnimationStart:F,onLayoutAnimationComplete:_}=G.getProps(),N=!this.targetLayout||!dU(this.targetLayout,B),L=!q&&K;if(this.options.layoutRoot||this.resumeFrom||L||q&&(N||!this.currentAnimation)){if(this.resumeFrom)this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0;let M={...B3(V,"layout"),onPlay:F,onComplete:_};if(G.shouldReduceMotion||this.options.layoutRoot)M.delay=0,M.type=!1;this.startAnimation(M),this.setAnimationOrigin(W,L)}else{if(!q)XC(this);if(this.isLead()&&this.options.onExitComplete)this.options.onExitComplete()}this.targetLayout=B})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let w=this.getStack();w&&w.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),B2(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(){if(this.isUpdateBlocked())return;this.isUpdating=!0,this.nodes&&this.nodes.forEach(Et),this.animationId++}getTransformTemplate(){let{visualElement:w}=this.options;return w&&w.getProps().transformTemplate}willUpdate(w=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear)WC(this);if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let W=0;W<this.path.length;W++){let q=this.path[W];if(q.shouldResetTransform=!0,q.updateScroll("snapshot"),q.options.layoutRoot)q.willUpdate(!1)}let{layoutId:z,layout:H}=this.options;if(z===void 0&&!H)return;let G=this.getTransformTemplate();this.prevTransformTemplateValue=G?G(this.latestValues,""):void 0,this.updateSnapshot(),w&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($C);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(QC);return}if(this.animationCommitId=this.animationId,!this.isUpdating)this.nodes.forEach(QC);else this.isUpdating=!1,this.nodes.forEach(kt),this.nodes.forEach(jt),this.nodes.forEach(bt);this.clearAllSnapshots();let z=l1.now();s1.delta=H5(0,16.666666666666668,z-s1.timestamp),s1.timestamp=z,s1.isProcessing=!0,vJ.update.process(s1),vJ.preRender.process(s1),vJ.render.process(s1),s1.isProcessing=!1}didUpdate(){if(!this.updateScheduled)this.updateScheduled=!0,v7.read(this.scheduleUpdate)}clearAllSnapshots(){this.nodes.forEach(Tt),this.sharedNodes.forEach(ht)}scheduleUpdateProjection(){if(!this.projectionUpdateScheduled)this.projectionUpdateScheduled=!0,p0.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){p0.postRender(()=>{if(this.isLayoutDirty)this.root.didUpdate();else this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;if(this.snapshot=this.measure(),this.snapshot&&!W5(this.snapshot.measuredBox.x)&&!W5(this.snapshot.measuredBox.y))this.snapshot=void 0}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let H=0;H<this.path.length;H++)this.path[H].updateScroll();let w=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=g1(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:z}=this.options;z&&z.notify("LayoutMeasure",this.layout.layoutBox,w?w.layoutBox:void 0)}updateScroll(w="measure"){let z=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===w)z=!1;if(z&&this.instance){let H=Q(this.instance);this.scroll={animationId:this.root.animationId,phase:w,isRoot:H,offset:$(this.instance),wasRoot:this.scroll?this.scroll.isRoot:H}}}resetTransform(){if(!X)return;let w=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,z=this.projectionDelta&&!cU(this.projectionDelta),H=this.getTransformTemplate(),G=H?H(this.latestValues,""):void 0,W=G!==this.prevTransformTemplateValue;if(w&&this.instance&&(z||j6(this.latestValues)||W))X(this.instance,G),this.shouldResetTransform=!1,this.scheduleRender()}measure(w=!0){let z=this.measurePageBox(),H=this.removeElementScroll(z);if(w)H=this.removeTransform(H);return vt(H),{animationId:this.root.animationId,measuredBox:z,layoutBox:H,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:w}=this.options;if(!w)return g1();let z=w.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(gt))){let{scroll:G}=this.root;if(G)j8(z.x,G.offset.x),j8(z.y,G.offset.y)}return z}removeElementScroll(w){let z=g1();if(u2(z,w),this.scroll?.wasRoot)return z;for(let H=0;H<this.path.length;H++){let G=this.path[H],{scroll:W,options:q}=G;if(G!==this.root&&W&&q.layoutScroll){if(W.wasRoot)u2(z,w);j8(z.x,W.offset.x),j8(z.y,W.offset.y)}}return z}applyTransform(w,z=!1){let H=g1();u2(H,w);for(let G=0;G<this.path.length;G++){let W=this.path[G];if(!z&&W.options.layoutScroll&&W.scroll&&W!==W.root)f7(H,{x:-W.scroll.offset.x,y:-W.scroll.offset.y});if(!j6(W.latestValues))continue;f7(H,W.latestValues)}if(j6(this.latestValues))f7(H,this.latestValues);return H}removeTransform(w){let z=g1();u2(z,w);for(let H=0;H<this.path.length;H++){let G=this.path[H];if(!G.instance)continue;if(!j6(G.latestValues))continue;Wz(G.latestValues)&&G.updateSnapshot();let W=g1(),q=G.measurePageBox();u2(W,q),uU(z,G.latestValues,G.snapshot?G.snapshot.layoutBox:void 0,W)}if(j6(this.latestValues))uU(z,this.latestValues);return z}setTargetDelta(w){this.targetDelta=w,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(w){this.options={...this.options,...w,crossfade:w.crossfade!==void 0?w.crossfade:!0}}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(){if(!this.relativeParent)return;if(this.relativeParent.resolvedRelativeTargetAt!==s1.timestamp)this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(w=!1){let z=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=z.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=z.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=z.isSharedProjectionDirty);let H=Boolean(this.resumingFrom)||this!==z;if(!(w||H&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:W,layoutId:q}=this.options;if(!this.layout||!(W||q))return;this.resolvedRelativeTargetAt=s1.timestamp;let K=this.getClosestProjectingParent();if(K&&this.linkedParentVersion!==K.layoutVersion&&!K.options.layoutRoot)this.removeRelativeTarget();if(!this.targetDelta&&!this.relativeTarget)if(K&&K.layout)this.createRelativeTarget(K,this.layout.layoutBox,K.layout.layoutBox);else this.removeRelativeTarget();if(!this.relativeTarget&&!this.targetDelta)return;if(!this.target)this.target=g1(),this.targetWithTransforms=g1();if(this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)this.forceRelativeParentToResolveTarget(),pU(this.target,this.relativeTarget,this.relativeParent.target);else if(this.targetDelta){if(Boolean(this.resumingFrom))this.target=this.applyTransform(this.layout.layoutBox);else u2(this.target,this.layout.layoutBox);OU(this.target,this.targetDelta)}else u2(this.target,this.layout.layoutBox);if(this.attemptToResolveRelativeTarget)if(this.attemptToResolveRelativeTarget=!1,K&&Boolean(K.resumingFrom)===Boolean(this.resumingFrom)&&!K.options.layoutScroll&&K.target&&this.animationProgress!==1)this.createRelativeTarget(K,this.target,K.target);else this.relativeParent=this.relativeTarget=void 0;if(b2.value)r7.calculatedTargetDeltas++}getClosestProjectingParent(){if(!this.parent||Wz(this.parent.latestValues)||AU(this.parent.latestValues))return;if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(w,z,H){this.relativeParent=w,this.linkedParentVersion=w.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=g1(),this.relativeTargetOrigin=g1(),O3(this.relativeTargetOrigin,z,H),u2(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let w=this.getLead(),z=Boolean(this.resumingFrom)||this!==w,H=!0;if(this.isProjectionDirty||this.parent?.isProjectionDirty)H=!1;if(z&&(this.isSharedProjectionDirty||this.isTransformDirty))H=!1;if(this.resolvedRelativeTargetAt===s1.timestamp)H=!1;if(H)return;let{layout:G,layoutId:W}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),!this.isTreeAnimating)this.targetDelta=this.relativeTarget=void 0;if(!this.layout||!(G||W))return;u2(this.layoutCorrected,this.layout.layoutBox);let q=this.treeScale.x,K=this.treeScale.y;if(Gk(this.layoutCorrected,this.treeScale,this.path,z),w.layout&&!w.target&&(this.treeScale.x!==1||this.treeScale.y!==1))w.target=w.layout.layoutBox,w.targetWithTransforms=g1();let{target:B}=w;if(!B){if(this.prevProjectionDelta)this.createProjectionDeltas(),this.scheduleRender();return}if(!this.projectionDelta||!this.prevProjectionDelta)this.createProjectionDeltas();else yU(this.prevProjectionDelta.x,this.projectionDelta.x),yU(this.prevProjectionDelta.y,this.projectionDelta.y);if(c7(this.projectionDelta,this.layoutCorrected,B,this.latestValues),this.treeScale.x!==q||this.treeScale.y!==K||!rU(this.projectionDelta.x,this.prevProjectionDelta.x)||!rU(this.projectionDelta.y,this.prevProjectionDelta.y))this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",B);if(b2.value)r7.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(w=!0){if(this.options.visualElement?.scheduleRender(),w){let z=this.getStack();z&&z.scheduleRender()}if(this.resumingFrom&&!this.resumingFrom.instance)this.resumingFrom=void 0}createProjectionDeltas(){this.prevProjectionDelta=M8(),this.projectionDelta=M8(),this.projectionDeltaWithTransform=M8()}setAnimationOrigin(w,z=!1){let H=this.snapshot,G=H?H.latestValues:{},W={...this.latestValues},q=M8();if(!this.relativeParent||!this.relativeParent.options.layoutRoot)this.relativeTarget=this.relativeTargetOrigin=void 0;this.attemptToResolveRelativeTarget=!z;let K=g1(),B=H?H.source:void 0,V=this.layout?this.layout.source:void 0,F=B!==V,_=this.getStack(),N=!_||_.members.length<=1,L=Boolean(F&&!N&&this.options.crossfade===!0&&!this.path.some(xt));this.animationProgress=0;let M;this.mixTargetDelta=(A)=>{let O=A/1000;if(wC(q.x,w.x,O),wC(q.y,w.y,O),this.setTargetDelta(q),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){if(O3(K,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Rt(this.relativeTarget,this.relativeTargetOrigin,K,O),M&&vk(this.relativeTarget,M))this.isProjectionDirty=!1;if(!M)M=g1();u2(M,this.relativeTarget)}if(F)this.animationValues=W,lk(W,G,this.latestValues,O,L,N);this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1000:0)}startAnimation(w){if(this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation)B2(this.pendingAnimation),this.pendingAnimation=void 0;this.pendingAnimation=p0.update(()=>{if(l7.hasAnimatedSinceResize=!0,u4.layout++,this.motionValue||(this.motionValue=B4(0)),this.motionValue.jump(0,!1),this.currentAnimation=ak(this.motionValue,[0,1000],{...w,velocity:0,isSync:!0,onUpdate:(z)=>{this.mixTargetDelta(z),w.onUpdate&&w.onUpdate(z)},onStop:()=>{u4.layout--},onComplete:()=>{u4.layout--,w.onComplete&&w.onComplete(),this.completeAnimation()}}),this.resumingFrom)this.resumingFrom.currentAnimation=this.currentAnimation;this.pendingAnimation=void 0})}completeAnimation(){if(this.resumingFrom)this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0;let w=this.getStack();w&&w.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){if(this.currentAnimation)this.mixTargetDelta&&this.mixTargetDelta(Mt),this.currentAnimation.stop();this.completeAnimation()}applyTransformsToTarget(){let w=this.getLead(),{targetWithTransforms:z,target:H,layout:G,latestValues:W}=w;if(!z||!H||!G)return;if(this!==w&&this.layout&&G&&qC(this.options.animationType,this.layout.layoutBox,G.layoutBox)){H=this.target||g1();let q=W5(this.layout.layoutBox.x);H.x.min=w.target.x.min,H.x.max=H.x.min+q;let K=W5(this.layout.layoutBox.y);H.y.min=w.target.y.min,H.y.max=H.y.min+K}u2(z,H),f7(z,W),c7(this.projectionDeltaWithTransform,this.layoutCorrected,z,W)}registerSharedNode(w,z){if(!this.sharedNodes.has(w))this.sharedNodes.set(w,new nU);this.sharedNodes.get(w).add(z);let G=z.options.initialPromotionConfig;z.promote({transition:G?G.transition:void 0,preserveFollowOpacity:G&&G.shouldPreserveFollowOpacity?G.shouldPreserveFollowOpacity(z):void 0})}isLead(){let w=this.getStack();return w?w.lead===this:!0}getLead(){let{layoutId:w}=this.options;return w?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:w}=this.options;return w?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:w}=this.options;if(w)return this.root.sharedNodes.get(w)}promote({needsReset:w,transition:z,preserveFollowOpacity:H}={}){let G=this.getStack();if(G)G.promote(this,H);if(w)this.projectionDelta=void 0,this.needsReset=!0;if(z)this.setOptions({transition:z})}relegate(){let w=this.getStack();if(w)return w.relegate(this);else return!1}resetSkewAndRotation(){let{visualElement:w}=this.options;if(!w)return;let z=!1,{latestValues:H}=w;if(H.z||H.rotate||H.rotateX||H.rotateY||H.rotateZ||H.skewX||H.skewY)z=!0;if(!z)return;let G={};if(H.z)ZV("z",w,G,this.animationValues);for(let W=0;W<eU.length;W++)ZV(`rotate${eU[W]}`,w,G,this.animationValues),ZV(`skew${eU[W]}`,w,G,this.animationValues);w.render();for(let W in G)if(w.setStaticValue(W,G[W]),this.animationValues)this.animationValues[W]=G[W];w.scheduleRender()}applyProjectionStyles(w,z){if(!this.instance||this.isSVG)return;if(!this.isVisible){w.visibility="hidden";return}let H=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,w.visibility="",w.opacity="",w.pointerEvents=d7(z?.pointerEvents)||"",w.transform=H?H(this.latestValues,""):"none";return}let G=this.getLead();if(!this.projectionDelta||!this.layout||!G.target){if(this.options.layoutId)w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=d7(z?.pointerEvents)||"";if(this.hasProjected&&!j6(this.latestValues))w.transform=H?H({},""):"none",this.hasProjected=!1;return}w.visibility="";let W=G.animationValues||G.latestValues;this.applyTransformsToTarget();let q=fk(this.projectionDeltaWithTransform,this.treeScale,W);if(H)q=H(W,q);w.transform=q;let{x:K,y:B}=this.projectionDelta;if(w.transformOrigin=`${K.origin*100}% ${B.origin*100}% 0`,G.animationValues)w.opacity=G===this?W.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:W.opacityExit;else w.opacity=G===this?W.opacity!==void 0?W.opacity:"":W.opacityExit!==void 0?W.opacityExit:0;for(let V in w$){if(W[V]===void 0)continue;let{correct:F,applyTo:_,isCSSVariable:N}=w$[V],L=q==="none"?W[V]:F(W[V],G);if(_){let M=_.length;for(let A=0;A<M;A++)w[_[A]]=L}else if(N)this.options.visualElement.renderState.vars[V]=L;else w[V]=L}if(this.options.layoutId)w.pointerEvents=G===this?d7(z?.pointerEvents)||"":"none"}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((w)=>w.currentAnimation?.stop()),this.root.nodes.forEach($C),this.root.sharedNodes.clear()}}}function jt(Z){Z.updateLayout()}function bt(Z){let J=Z.resumeFrom?.snapshot||Z.snapshot;if(Z.isLead()&&Z.layout&&J&&Z.hasListeners("didUpdate")){let{layoutBox:$,measuredBox:Q}=Z.layout,{animationType:X}=Z.options,Y=J.source!==Z.layout.source;if(X==="size")P2((W)=>{let q=Y?J.measuredBox[W]:J.layoutBox[W],K=W5(q);q.min=$[W].min,q.max=q.min+K});else if(qC(X,J.layoutBox,$))P2((W)=>{let q=Y?J.measuredBox[W]:J.layoutBox[W],K=W5($[W]);if(q.max=q.min+K,Z.relativeTarget&&!Z.currentAnimation)Z.isProjectionDirty=!0,Z.relativeTarget[W].max=Z.relativeTarget[W].min+K});let w=M8();c7(w,$,J.layoutBox);let z=M8();if(Y)c7(z,Z.applyTransform(Q,!0),J.measuredBox);else c7(z,$,J.layoutBox);let H=!cU(w),G=!1;if(!Z.resumeFrom){let W=Z.getClosestProjectingParent();if(W&&!W.resumeFrom){let{snapshot:q,layout:K}=W;if(q&&K){let B=g1();O3(B,J.layoutBox,q.layoutBox);let V=g1();if(O3(V,$,K.layoutBox),!dU(B,V))G=!0;if(W.options.layoutRoot)Z.relativeTarget=V,Z.relativeTargetOrigin=B,Z.relativeParent=W}}}Z.notifyListeners("didUpdate",{layout:$,snapshot:J,delta:z,layoutDelta:w,hasLayoutChanged:H,hasRelativeLayoutChanged:G})}else if(Z.isLead()){let{onExitComplete:$}=Z.options;$&&$()}Z.options.transition=void 0}function Pt(Z){if(b2.value)r7.nodes++;if(!Z.parent)return;if(!Z.isProjecting())Z.isProjectionDirty=Z.parent.isProjectionDirty;Z.isSharedProjectionDirty||(Z.isSharedProjectionDirty=Boolean(Z.isProjectionDirty||Z.parent.isProjectionDirty||Z.parent.isSharedProjectionDirty)),Z.isTransformDirty||(Z.isTransformDirty=Z.parent.isTransformDirty)}function It(Z){Z.isProjectionDirty=Z.isSharedProjectionDirty=Z.isTransformDirty=!1}function Tt(Z){Z.clearSnapshot()}function $C(Z){Z.clearMeasurements()}function QC(Z){Z.isLayoutDirty=!1}function kt(Z){let{visualElement:J}=Z.options;if(J&&J.getProps().onBeforeLayoutMeasure)J.notify("BeforeLayoutMeasure");Z.resetTransform()}function XC(Z){Z.finishAnimation(),Z.targetDelta=Z.relativeTarget=Z.target=void 0,Z.isProjectionDirty=!0}function Ct(Z){Z.resolveTargetDelta()}function St(Z){Z.calcProjection()}function Et(Z){Z.resetSkewAndRotation()}function ht(Z){Z.removeLeadSnapshot()}function wC(Z,J,$){Z.translate=Q1(J.translate,0,$),Z.scale=Q1(J.scale,1,$),Z.origin=J.origin,Z.originPoint=J.originPoint}function YC(Z,J,$,Q){Z.min=Q1(J.min,$.min,Q),Z.max=Q1(J.max,$.max,Q)}function Rt(Z,J,$,Q){YC(Z.x,J.x,$.x,Q),YC(Z.y,J.y,$.y,Q)}function xt(Z){return Z.animationValues&&Z.animationValues.opacityExit!==void 0}function GC(Z){Z.min=HC(Z.min),Z.max=HC(Z.max)}function vt(Z){GC(Z.x),GC(Z.y)}function qC(Z,J,$){return Z==="position"||Z==="preserve-aspect"&&!mU(lU(J),lU($),0.2)}function gt(Z){return Z!==Z.root&&Z.scroll?.wasRoot}var r7,eU,Mt=1000,Ot=0,yt,zC=(Z)=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(Z),HC;var JV=U(()=>{m0();sk();vB();xY();sY();A6();IU();YY();QY();ZC();eY();rT();f2();U3();oU();ik();Tk();qz();Lz();hk();oJ();gk();JC();mk();iU();tk();DU();tU();W4();r7={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},eU=["","X","Y","Z"];yt={duration:0.45,ease:[0.4,0,0.1,1]},HC=zC("applewebkit/")&&!zC("chrome/")?Math.round:d1});var KC;var BC=U(()=>{aU();JV();KC=Az({attachResizeListener:(Z,J)=>n4(Z,"resize",J),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0})});function Dz(){let Z=new Set,J=new WeakMap,$=()=>Z.forEach(ft);return{add:(Q)=>{Z.add(Q),J.set(Q,Q.addEventListener("willUpdate",$))},remove:(Q)=>{Z.delete(Q);let X=J.get(Q);if(X)X(),J.delete(Q);$()},dirty:$}}var ft=(Z)=>!Z.isLayoutDirty&&Z.willUpdate(!1);var UC=()=>{};var Mz,W$;var VC=U(()=>{JV();BC();Mz={current:void 0},W$=Az({measureScroll:(Z)=>({x:Z.scrollLeft,y:Z.scrollTop}),defaultParent:()=>{if(!Mz.current){let Z=new KC({});Z.mount(window),Z.setOptions({layoutScroll:!0}),Mz.current=Z}return Mz.current},resetTransform:(Z,J)=>{Z.style.transform=J!==void 0?J:"none"},checkIsScrollRoot:(Z)=>Boolean(window.getComputedStyle(Z).position==="fixed")})});var K1=U(()=>{yY();yB();sY();CT();ST();gT();wU();$U();dT();nB();f2();l4();s4();xB();$k();Fk();Dk();UU();Pk();Xz();qU();TU();nJ();vY();_U();Lz();oJ();iU();bU();aU();oU();UC();VC();tU();Bz();Vz();kU();SU();EU();W4()});var FC,j3;var Oz=U(()=>{FC=P(f(),1),j3=FC.createContext({transformPagePoint:(Z)=>Z,isStatic:!1,reducedMotion:"never"})});function NC(Z,J){if(typeof Z==="function")return Z(J);else if(Z!==null&&Z!==void 0)Z.current=J}function mt(...Z){return(J)=>{let $=!1,Q=Z.map((X)=>{let Y=NC(X,J);if(!$&&typeof Y==="function")$=!0;return Y});if($)return()=>{for(let X=0;X<Q.length;X++){let Y=Q[X];if(typeof Y==="function")Y();else NC(Z[X],null)}}}}function LC(...Z){return _C.useCallback(mt(...Z),Z)}var _C;var AC=U(()=>{_C=P(f(),1)});function OC({children:Z,isPresent:J,anchorX:$,anchorY:Q,root:X,pop:Y}){let w=b6.useId(),z=b6.useRef(null),H=b6.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:G}=b6.useContext(j3),W=Z.props?.ref??Z?.ref,q=LC(z,W);return b6.useInsertionEffect(()=>{let{width:K,height:B,top:V,left:F,right:_,bottom:N}=H.current;if(J||Y===!1||!z.current||!K||!B)return;let L=$==="left"?`left: ${F}`:`right: ${_}`,M=Q==="bottom"?`bottom: ${N}`:`top: ${V}`;z.current.dataset.motionPopId=w;let A=document.createElement("style");if(G)A.nonce=G;let O=X??document.head;if(O.appendChild(A),A.sheet)A.sheet.insertRule(`
|
|
18
|
+
[data-motion-pop-id="${w}"] {
|
|
19
|
+
position: absolute !important;
|
|
20
|
+
width: ${K}px !important;
|
|
21
|
+
height: ${B}px !important;
|
|
22
|
+
${L}px !important;
|
|
23
|
+
${M}px !important;
|
|
24
|
+
}
|
|
25
|
+
`);return()=>{if(O.contains(A))O.removeChild(A)}},[J]),DC.jsx(MC,{isPresent:J,childRef:z,sizeRef:H,pop:Y,children:Y===!1?Z:jz.cloneElement(Z,{ref:q})})}var DC,jz,b6,MC;var jC=U(()=>{K1();Oz();AC();DC=P(G0(),1),jz=P(f(),1),b6=P(f(),1);MC=class MC extends jz.Component{getSnapshotBeforeUpdate(Z){let J=this.props.childRef.current;if(J&&Z.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let $=J.offsetParent,Q=_3($)?$.offsetWidth||0:0,X=_3($)?$.offsetHeight||0:0,Y=this.props.sizeRef.current;Y.height=J.offsetHeight||0,Y.width=J.offsetWidth||0,Y.top=J.offsetTop,Y.left=J.offsetLeft,Y.right=Q-Y.width-Y.left,Y.bottom=X-Y.height-Y.top}return null}componentDidUpdate(){}render(){return this.props.children}}});function pt(){return new Map}var $V,bC,q$,PC=({children:Z,initial:J,isPresent:$,onExitComplete:Q,custom:X,presenceAffectsLayout:Y,mode:w,anchorX:z,anchorY:H,root:G})=>{let W=$3(pt),q=q$.useId(),K=!0,B=q$.useMemo(()=>{return K=!1,{id:q,initial:J,isPresent:$,custom:X,onExitComplete:(V)=>{W.set(V,!0);for(let F of W.values())if(!F)return;Q&&Q()},register:(V)=>{return W.set(V,!1),()=>W.delete(V)}}},[$,W,Q]);if(Y&&K)B={...B};return q$.useMemo(()=>{W.forEach((V,F)=>W.set(F,!1))},[$]),bC.useEffect(()=>{!$&&!W.size&&Q&&Q()},[$]),Z=$V.jsx(OC,{pop:w==="popLayout",isPresent:$,anchorX:z,anchorY:H,root:G,children:Z}),$V.jsx(V8.Provider,{value:B,children:Z})};var IC=U(()=>{OJ();iw();jC();$V=P(G0(),1),bC=P(f(),1),q$=P(f(),1)});function bz(Z=!0){let J=b8.useContext(V8);if(J===null)return[!0,null];let{isPresent:$,onExitComplete:Q,register:X}=J,Y=b8.useId();b8.useEffect(()=>{if(Z)return X(Y)},[Z]);let w=b8.useCallback(()=>Z&&Q&&Q(Y),[Y,Q,Z]);return!$&&Q?[!1,w]:[!0]}var b8;var QV=U(()=>{OJ();b8=P(f(),1)});function XV(Z){let J=[];return Pz.Children.forEach(Z,($)=>{if(Pz.isValidElement($))J.push($)}),J}var Pz,K$=(Z)=>Z.key||"";var TC=U(()=>{Pz=P(f(),1)});var B$,U4,c2=({children:Z,custom:J,initial:$=!0,onExitComplete:Q,presenceAffectsLayout:X=!0,mode:Y="sync",propagate:w=!1,anchorX:z="left",anchorY:H="top",root:G})=>{let[W,q]=bz(w),K=U4.useMemo(()=>XV(Z),[Z]),B=w&&!W?[]:K.map(K$),V=U4.useRef(!0),F=U4.useRef(K),_=$3(()=>new Map),N=U4.useRef(new Set),[L,M]=U4.useState(K),[A,O]=U4.useState(K);Q3(()=>{V.current=!1,F.current=K;for(let b=0;b<A.length;b++){let h=K$(A[b]);if(!B.includes(h)){if(_.get(h)!==!0)_.set(h,!1)}else _.delete(h),N.current.delete(h)}},[A,B.length,B.join("-")]);let D=[];if(K!==L){let b=[...K];for(let h=0;h<A.length;h++){let I=A[h],d=K$(I);if(!B.includes(d))b.splice(h,0,I),D.push(I)}if(Y==="wait"&&D.length)b=D;return O(XV(b)),M(K),null}let{forceRender:k}=U4.useContext(L6);return B$.jsx(B$.Fragment,{children:A.map((b)=>{let h=K$(b),I=w&&!W?!1:K===A||B.includes(h),d=()=>{if(N.current.has(h))return;if(N.current.add(h),_.has(h))_.set(h,!0);else return;let v=!0;if(_.forEach((C)=>{if(!C)v=!1}),v)k?.(),O(F.current),w&&q?.(),Q&&Q()};return B$.jsx(PC,{isPresent:I,initial:!V.current||$?void 0:!1,custom:J,presenceAffectsLayout:X,mode:Y,root:G,onExitComplete:I?void 0:d,anchorX:z,anchorY:H,children:b},h)})})};var kC=U(()=>{MJ();iw();sw();IC();QV();TC();B$=P(G0(),1),U4=P(f(),1)});var CC,SC;var EC=U(()=>{CC=P(f(),1),SC=CC.createContext(null)});function RC(){let Z=hC.useRef(!1);return Q3(()=>{return Z.current=!0,()=>{Z.current=!1}},[]),Z}var hC;var xC=U(()=>{sw();hC=P(f(),1)});function yC(){let Z=RC(),[J,$]=U$.useState(0),Q=U$.useCallback(()=>{Z.current&&$(J+1)},[J]);return[U$.useCallback(()=>p0.postRender(Q),[Q]),J]}var U$;var vC=U(()=>{K1();xC();U$=P(f(),1)});var gC,i7,fC=(Z)=>Z===!0,ut=(Z)=>fC(Z===!0)||Z==="id",wV=({children:Z,id:J,inherit:$=!0})=>{let Q=i7.useContext(L6),X=i7.useContext(SC),[Y,w]=yC(),z=i7.useRef(null),H=Q.id||X;if(z.current===null){if(ut($)&&H)J=J?H+"-"+J:H;z.current={id:J,group:fC($)?Q.group||Dz():Dz()}}let G=i7.useMemo(()=>({...z.current,forceRender:Y}),[w]);return gC.jsx(L6.Provider,{value:G,children:Z})};var mC=U(()=>{MJ();EC();vC();K1();gC=P(G0(),1),i7=P(f(),1)});var pC,Iz;var YV=U(()=>{pC=P(f(),1),Iz=pC.createContext({strict:!1})});function ct(){if(cC)return;let Z={};for(let J in uC)Z[J]={isEnabled:($)=>uC[J].some((Q)=>!!$[Q])};J$(Z),cC=!0}function Tz(){return ct(),BU()}var uC,cC=!1;var zV=U(()=>{K1();uC={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"]}});function dC(Z){let J=Tz();for(let $ in Z)J[$]={...J[$],...Z[$]};J$(J)}var lC=U(()=>{K1();zV()});function V$(Z){return Z.startsWith("while")||Z.startsWith("drag")&&Z!=="draggable"||Z.startsWith("layout")||Z.startsWith("onTap")||Z.startsWith("onPan")||Z.startsWith("onLayout")||dt.has(Z)}var dt;var rC=U(()=>{dt=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 lt(Z){if(typeof Z!=="function")return;iC=(J)=>J.startsWith("on")?!V$(J):Z(J)}function aC(Z,J,$){let Q={};for(let X in Z){if(X==="values"&&typeof Z.values==="object")continue;if(iC(X)||$===!0&&V$(X)||!J&&!V$(X)||Z.draggable&&X.startsWith("onDrag"))Q[X]=Z[X]}return Q}var iC=(Z)=>!V$(Z);var sC=U(()=>{rC();try{lt((()=>{throw new Error("Cannot require module "+"@emotion/is-prop-valid");})().default)}catch{}});var oC,P8;var F$=U(()=>{oC=P(f(),1),P8=oC.createContext({})});function nC(Z,J){if(O8(Z)){let{initial:$,animate:Q}=Z;return{initial:$===!1||o4($)?$:void 0,animate:o4(Q)?Q:void 0}}return Z.inherit!==!1?J:{}}var tC=U(()=>{K1()});function ZS(Z){let{initial:J,animate:$}=nC(Z,kz.useContext(P8));return kz.useMemo(()=>({initial:J,animate:$}),[eC(J),eC($)])}function eC(Z){return Array.isArray(Z)?Z.join(" "):Z}var kz;var JS=U(()=>{F$();tC();kz=P(f(),1)});var b3=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var Cz=()=>{};function HV(Z,J,$){for(let Q in J)if(!P1(J[Q])&&!Y$(Q,$))Z[Q]=J[Q]}function rt({transformTemplate:Z},J){return $S.useMemo(()=>{let $=b3();return m7($,J,Z),Object.assign({},$.vars,$.style)},[J])}function it(Z,J){let $=Z.style||{},Q={};return HV(Q,$,Z),Object.assign(Q,rt(Z,J)),Q}function QS(Z,J){let $={},Q=it(Z,J);if(Z.drag&&Z.dragListener!==!1)$.draggable=!1,Q.userSelect=Q.WebkitUserSelect=Q.WebkitTouchCallout="none",Q.touchAction=Z.drag===!0?"none":`pan-${Z.drag==="x"?"y":"x"}`;if(Z.tabIndex===void 0&&(Z.onTap||Z.onTapStart||Z.whileTap))$.tabIndex=0;return $.style=Q,$}var $S;var GV=U(()=>{K1();Cz();$S=P(f(),1)});var Sz=()=>({...b3(),attrs:{}});var WV=U(()=>{Cz()});function wS(Z,J,$,Q){let X=XS.useMemo(()=>{let Y=Sz();return z$(Y,J,H$(Q),Z.transformTemplate,Z.style),{...Y.attrs,style:{...Y.style}}},[J]);if(Z.style){let Y={};HV(Y,Z.style,Z),X.style={...Y,...X.style}}return X}var XS;var YS=U(()=>{K1();GV();WV();XS=P(f(),1)});var zS;var HS=U(()=>{zS=["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 P3(Z){if(typeof Z!=="string"||Z.includes("-"))return!1;else if(zS.indexOf(Z)>-1||/[A-Z]/u.test(Z))return!0;return!1}var Ez=U(()=>{HS()});function GS(Z,J,$,{latestValues:Q},X,Y=!1,w){let H=(w??P3(Z)?wS:QS)(J,Q,X,Z),G=aC(J,typeof Z==="string",Y),W=Z!==I3.Fragment?{...G,...H,ref:$}:{},{children:q}=J,K=I3.useMemo(()=>P1(q)?q.get():q,[q]);return I3.createElement(Z,{...W,children:K})}var I3;var WS=U(()=>{K1();GV();YS();sC();Ez();I3=P(f(),1)});function at({scrapeMotionValuesFromProps:Z,createRenderState:J},$,Q,X){return{latestValues:st($,Q,X,Z),renderState:J()}}function st(Z,J,$,Q){let X={},Y=Q(Z,{});for(let K in Y)X[K]=d7(Y[K]);let{initial:w,animate:z}=Z,H=O8(Z),G=eJ(Z);if(J&&G&&!H&&Z.inherit!==!1){if(w===void 0)w=J.initial;if(z===void 0)z=J.animate}let W=$?$.initial===!1:!1;W=W||w===!1;let q=W?z:w;if(q&&typeof q!=="boolean"&&!O6(q)){let K=Array.isArray(q)?q:[q];for(let B=0;B<K.length;B++){let V=y7(Z,K[B]);if(V){let{transitionEnd:F,transition:_,...N}=V;for(let L in N){let M=N[L];if(Array.isArray(M)){let A=W?M.length-1:0;M=M[A]}if(M!==null)X[L]=M}for(let L in F)X[L]=F[L]}}}return X}var qV,hz=(Z)=>(J,$)=>{let Q=qV.useContext(P8),X=qV.useContext(V8),Y=()=>at(Z,J,Q,X);return $?Y():$3(Y)};var KV=U(()=>{K1();F$();OJ();iw();qV=P(f(),1)});var qS;var KS=U(()=>{K1();KV();Cz();qS=hz({scrapeMotionValuesFromProps:p7,createRenderState:b3})});var BS;var US=U(()=>{K1();KV();WV();BS=hz({scrapeMotionValuesFromProps:G$,createRenderState:Sz})});var VS;var FS=U(()=>{VS=Symbol.for("motionComponentSymbol")});function NS(Z,J,$){let Q=a7.useRef($);a7.useInsertionEffect(()=>{Q.current=$});let X=a7.useRef(null);return a7.useCallback((Y)=>{if(Y)Z.onMount?.(Y);let w=Q.current;if(typeof w==="function")if(Y){let z=w(Y);if(typeof z==="function")X.current=z}else if(X.current)X.current(),X.current=null;else w(Y);else if(w)w.current=Y;if(J)Y?J.mount(Y):J.unmount()},[J])}var a7;var _S=U(()=>{a7=P(f(),1)});var LS,Rz;var BV=U(()=>{LS=P(f(),1),Rz=LS.createContext({})});function I8(Z){return Z&&typeof Z==="object"&&Object.prototype.hasOwnProperty.call(Z,"current")}var UV=()=>{};function AS(Z,J,$,Q,X,Y){let{visualElement:w}=J2.useContext(P8),z=J2.useContext(Iz),H=J2.useContext(V8),G=J2.useContext(j3),W=G.reducedMotion,q=G.skipAnimations,K=J2.useRef(null),B=J2.useRef(!1);if(Q=Q||z.renderer,!K.current&&Q){if(K.current=Q(Z,{visualState:J,parent:w,props:$,presenceContext:H,blockInitialAnimation:H?H.initial===!1:!1,reducedMotionConfig:W,skipAnimations:q,isSVG:Y}),B.current&&K.current)K.current.manuallyAnimateOnMount=!0}let V=K.current,F=J2.useContext(Rz);if(V&&!V.projection&&X&&(V.type==="html"||V.type==="svg"))ot(K.current,$,X,F);let _=J2.useRef(!1);J2.useInsertionEffect(()=>{if(V&&_.current)V.update($,H)});let N=$[iJ],L=J2.useRef(Boolean(N)&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(N)&&window.MotionHasOptimisedAnimation?.(N));return Q3(()=>{if(B.current=!0,!V)return;if(_.current=!0,window.MotionIsMounted=!0,V.updateFeatures(),V.scheduleRenderMicrotask(),L.current&&V.animationState)V.animationState.animateChanges()}),J2.useEffect(()=>{if(!V)return;if(!L.current&&V.animationState)V.animationState.animateChanges();if(L.current)queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(N)}),L.current=!1;V.enteringChildren=void 0}),V}function ot(Z,J,$,Q){let{layoutId:X,layout:Y,drag:w,dragConstraints:z,layoutScroll:H,layoutRoot:G,layoutCrossfade:W}=J;Z.projection=new $(Z.latestValues,J["data-framer-portal-id"]?void 0:DS(Z.parent)),Z.projection.setOptions({layoutId:X,layout:Y,alwaysMeasureLayout:Boolean(w)||z&&I8(z),visualElement:Z,animationType:typeof Y==="string"?Y:"both",initialPromotionConfig:Q,crossfade:W,layoutScroll:H,layoutRoot:G})}function DS(Z){if(!Z)return;return Z.options.allowProjection!==!1?Z.projection:DS(Z.parent)}var J2;var MS=U(()=>{K1();YV();Oz();F$();OJ();BV();UV();sw();J2=P(f(),1)});function yz(Z,{forwardMotionProps:J=!1,type:$}={},Q,X){Q&&dC(Q);let Y=$?$==="svg":P3(Z),w=Y?BS:qS;function z(G,W){let q,K={...T3.useContext(j3),...G,layoutId:nt(G)},{isStatic:B}=K,V=ZS(G),F=w(G,B);if(!B&&typeof window<"u"){tt(K,Q);let _=et(K);q=_.MeasureLayout,V.visualElement=AS(Z,F,K,X,_.ProjectionNode,Y)}return xz.jsxs(P8.Provider,{value:V,children:[q&&V.visualElement?xz.jsx(q,{visualElement:V.visualElement,...K}):null,GS(Z,G,NS(F,V.visualElement,W),F,B,J,Y)]})}z.displayName=`motion.${typeof Z==="string"?Z:`create(${Z.displayName??Z.name??""})`}`;let H=T3.forwardRef(z);return H[VS]=Z,H}function nt({layoutId:Z}){let J=T3.useContext(L6).id;return J&&Z!==void 0?J+"-"+Z:Z}function tt(Z,J){let $=T3.useContext(Iz).strict}function et(Z){let J=Tz(),{drag:$,layout:Q}=J;if(!$&&!Q)return{};let X={...$,...Q};return{MeasureLayout:$?.isEnabled(Z)||Q?.isEnabled(Z)?X.MeasureLayout:void 0,ProjectionNode:X.ProjectionNode}}var xz,T3;var OS=U(()=>{MJ();YV();Oz();F$();JS();WS();Ez();KS();US();zV();lC();FS();_S();MS();xz=P(G0(),1),T3=P(f(),1)});function jS(Z,J){if(typeof Proxy>"u")return yz;let $=new Map,Q=(Y,w)=>{return yz(Y,w,Z,J)};return new Proxy((Y,w)=>{return Q(Y,w)},{get:(Y,w)=>{if(w==="create")return Q;if(!$.has(w))$.set(w,yz(w,void 0,Z,J));return $.get(w)}})}var bS=U(()=>{OS()});var PS,IS=(Z,J)=>{return J.isSVG??P3(Z)?new _z(J):new Fz(J,{allowProjection:Z!==PS.Fragment})};var TS=U(()=>{K1();Ez();PS=P(f(),1)});var VV;var kS=U(()=>{K1();VV=class VV extends P5{constructor(Z){super(Z);Z.animationState||(Z.animationState=xU(Z))}updateAnimationControlsSubscription(){let{animate:Z}=this.node.getProps();if(O6(Z))this.unmountControls=Z.subscribe(this.node)}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:Z}=this.node.getProps(),{animate:J}=this.node.prevProps||{};if(Z!==J)this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}});var Ze=0,FV;var CS=U(()=>{K1();FV=class FV extends P5{constructor(){super(...arguments);this.id=Ze++}update(){if(!this.node.presenceContext)return;let{isPresent:Z,onExitComplete:J}=this.node.presenceContext,{isPresent:$}=this.node.prevPresenceContext||{};if(!this.node.animationState||Z===$)return;let Q=this.node.animationState.setActive("exit",!Z);if(J&&!Z)Q.then(()=>{J(this.id)})}mount(){let{register:Z,onExitComplete:J}=this.node.presenceContext||{};if(J)J(this.id);if(Z)this.unmount=Z(this.id)}unmount(){}}});var SS;var ES=U(()=>{kS();CS();SS={animation:{Feature:VV},exit:{Feature:FV}}});function P6(Z){return{point:{x:Z.pageX,y:Z.pageY}}}var hS=(Z)=>{return(J)=>g7(J)&&Z(J,P6(J))};var k3=U(()=>{K1()});function T8(Z,J,$,Q){return n4(Z,J,hS($),Q)}var vz=U(()=>{K1();k3()});var gz=({current:Z})=>{return Z?Z.ownerDocument.defaultView:null};var NV=()=>{};function xS(Z,J){let $=RS(Z.x,J.x),Q=RS(Z.y,J.y);return Math.sqrt($**2+Q**2)}var RS=(Z,J)=>Math.abs(Z-J);var yS=()=>{};class N${constructor(Z,J,{transformPagePoint:$,contextWindow:Q=window,dragSnapToOrigin:X=!1,distanceThreshold:Y=3,element:w}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=(K)=>{this.handleScroll(K.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let K=LV(this.lastMoveEventInfo,this.history),B=this.startEvent!==null,V=xS(K.offset,{x:0,y:0})>=this.distanceThreshold;if(!B&&!V)return;let{point:F}=K,{timestamp:_}=s1;this.history.push({...F,timestamp:_});let{onStart:N,onMove:L}=this.handlers;if(!B)N&&N(this.lastMoveEvent,K),this.startEvent=this.lastMoveEvent;L&&L(this.lastMoveEvent,K)},this.handlePointerMove=(K,B)=>{this.lastMoveEvent=K,this.lastMoveEventInfo=_V(B,this.transformPagePoint),p0.update(this.updatePoint,!0)},this.handlePointerUp=(K,B)=>{this.end();let{onEnd:V,onSessionEnd:F,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin||!this.startEvent)_&&_();if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let N=LV(K.type==="pointercancel"?this.lastMoveEventInfo:_V(B,this.transformPagePoint),this.history);if(this.startEvent&&V)V(K,N);F&&F(K,N)},!g7(Z))return;this.dragSnapToOrigin=X,this.handlers=J,this.transformPagePoint=$,this.distanceThreshold=Y,this.contextWindow=Q||window;let z=P6(Z),H=_V(z,this.transformPagePoint),{point:G}=H,{timestamp:W}=s1;this.history=[{...G,timestamp:W}];let{onSessionStart:q}=J;if(q&&q(Z,LV(H,this.history)),this.removeListeners=G4(T8(this.contextWindow,"pointermove",this.handlePointerMove),T8(this.contextWindow,"pointerup",this.handlePointerUp),T8(this.contextWindow,"pointercancel",this.handlePointerUp)),w)this.startScrollTracking(w)}startScrollTracking(Z){let J=Z.parentElement;while(J){let $=getComputedStyle(J);if(vS.has($.overflowX)||vS.has($.overflowY))this.scrollPositions.set(J,{x:J.scrollLeft,y:J.scrollTop});J=J.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(Z){let J=this.scrollPositions.get(Z);if(!J)return;let $=Z===window,Q=$?{x:window.scrollX,y:window.scrollY}:{x:Z.scrollLeft,y:Z.scrollTop},X={x:Q.x-J.x,y:Q.y-J.y};if(X.x===0&&X.y===0)return;if($){if(this.lastMoveEventInfo)this.lastMoveEventInfo.point.x+=X.x,this.lastMoveEventInfo.point.y+=X.y}else if(this.history.length>0)this.history[0].x-=X.x,this.history[0].y-=X.y;this.scrollPositions.set(Z,Q),p0.update(this.updatePoint,!0)}updateHandlers(Z){this.handlers=Z}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),B2(this.updatePoint)}}function _V(Z,J){return J?{point:J(Z.point)}:Z}function gS(Z,J){return{x:Z.x-J.x,y:Z.y-J.y}}function LV({point:Z},J){return{point:Z,delta:gS(Z,fS(J)),offset:gS(Z,Je(J)),velocity:$e(J,0.1)}}function Je(Z){return Z[0]}function fS(Z){return Z[Z.length-1]}function $e(Z,J){if(Z.length<2)return{x:0,y:0};let $=Z.length-1,Q=null,X=fS(Z);while($>=0){if(Q=Z[$],X.timestamp-Q.timestamp>G5(J))break;$--}if(!Q)return{x:0,y:0};if(Q===Z[0]&&Z.length>2&&X.timestamp-Q.timestamp>G5(J)*2)Q=Z[1];let Y=N5(X.timestamp-Q.timestamp);if(Y===0)return{x:0,y:0};let w={x:(X.x-Q.x)/Y,y:(X.y-Q.y)/Y};if(w.x===1/0)w.x=0;if(w.y===1/0)w.y=0;return w}var vS;var AV=U(()=>{K1();m0();vz();k3();yS();vS=new Set(["auto","scroll"])});function dS(Z,{min:J,max:$},Q){if(J!==void 0&&Z<J)Z=Q?Q1(J,Z,Q.min):Math.max(Z,J);else if($!==void 0&&Z>$)Z=Q?Q1($,Z,Q.max):Math.min(Z,$);return Z}function mS(Z,J,$){return{min:J!==void 0?Z.min+J:void 0,max:$!==void 0?Z.max+$-(Z.max-Z.min):void 0}}function lS(Z,{top:J,left:$,bottom:Q,right:X}){return{x:mS(Z.x,$,X),y:mS(Z.y,J,Q)}}function pS(Z,J){let $=J.min-Z.min,Q=J.max-Z.max;if(J.max-J.min<Z.max-Z.min)[$,Q]=[Q,$];return{min:$,max:Q}}function rS(Z,J){return{x:pS(Z.x,J.x),y:pS(Z.y,J.y)}}function iS(Z,J){let $=0.5,Q=W5(Z),X=W5(J);if(X>Q)$=p4(J.min,J.max-Q,Z.min);else if(Q>X)$=p4(Z.min,Z.max-X,J.min);return H5(0,1,$)}function aS(Z,J){let $={};if(J.min!==void 0)$.min=J.min-Z.min;if(J.max!==void 0)$.max=J.max-Z.min;return $}function sS(Z=fz){if(Z===!1)Z=0;else if(Z===!0)Z=fz;return{x:uS(Z,"left","right"),y:uS(Z,"top","bottom")}}function uS(Z,J,$){return{min:cS(Z,J),max:cS(Z,$)}}function cS(Z,J){return typeof Z==="number"?Z:Z[J]||0}var fz=0.35;var oS=U(()=>{K1();m0()});class DV{constructor(Z){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=g1(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=Z}start(Z,{snapToCursor:J=!1,distanceThreshold:$}={}){let{presenceContext:Q}=this.visualElement;if(Q&&Q.isPresent===!1)return;let X=(W)=>{if(J)this.snapToCursor(P6(W).point);this.stopAnimation()},Y=(W,q)=>{let{drag:K,dragPropagation:B,onDragStart:V}=this.getProps();if(K&&!B){if(this.openDragLock)this.openDragLock();if(this.openDragLock=tB(K),!this.openDragLock)return}if(this.latestPointerEvent=W,this.latestPanInfo=q,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection)this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0;if(P2((_)=>{let N=this.getAxisMotionValue(_).get()||0;if(p5.test(N)){let{projection:L}=this.visualElement;if(L&&L.layout){let M=L.layout.layoutBox[_];if(M)N=W5(M)*(parseFloat(N)/100)}}this.originPoint[_]=N}),V)p0.update(()=>V(W,q),!1,!0);V3(this.visualElement,"transform");let{animationState:F}=this.visualElement;F&&F.setActive("whileDrag",!0)},w=(W,q)=>{this.latestPointerEvent=W,this.latestPanInfo=q;let{dragPropagation:K,dragDirectionLock:B,onDirectionLock:V,onDrag:F}=this.getProps();if(!K&&!this.openDragLock)return;let{offset:_}=q;if(B&&this.currentDirection===null){if(this.currentDirection=we(_),this.currentDirection!==null)V&&V(this.currentDirection);return}if(this.updateAxis("x",q.point,_),this.updateAxis("y",q.point,_),this.visualElement.render(),F)p0.update(()=>F(W,q),!1,!0)},z=(W,q)=>{this.latestPointerEvent=W,this.latestPanInfo=q,this.stop(W,q),this.latestPointerEvent=null,this.latestPanInfo=null},H=()=>{let{dragSnapToOrigin:W}=this.getProps();if(W||this.constraints)this.startAnimation({x:0,y:0})},{dragSnapToOrigin:G}=this.getProps();this.panSession=new N$(Z,{onSessionStart:X,onStart:Y,onMove:w,onSessionEnd:z,resumeAnimation:H},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:G,distanceThreshold:$,contextWindow:gz(this.visualElement),element:this.visualElement.current})}stop(Z,J){let $=Z||this.latestPointerEvent,Q=J||this.latestPanInfo,X=this.isDragging;if(this.cancel(),!X||!Q||!$)return;let{velocity:Y}=Q;this.startAnimation(Y);let{onDragEnd:w}=this.getProps();if(w)p0.postRender(()=>w($,Q))}cancel(){this.isDragging=!1;let{projection:Z,animationState:J}=this.visualElement;if(Z)Z.isAnimationBlocked=!1;this.endPanSession();let{dragPropagation:$}=this.getProps();if(!$&&this.openDragLock)this.openDragLock(),this.openDragLock=null;J&&J.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(Z,J,$){let{drag:Q}=this.getProps();if(!$||!mz(Z,Q,this.currentDirection))return;let X=this.getAxisMotionValue(Z),Y=this.originPoint[Z]+$[Z];if(this.constraints&&this.constraints[Z])Y=dS(Y,this.constraints[Z],this.elastic[Z]);X.set(Y)}resolveConstraints(){let{dragConstraints:Z,dragElastic:J}=this.getProps(),$=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,Q=this.constraints;if(Z&&I8(Z)){if(!this.constraints)this.constraints=this.resolveRefConstraints()}else if(Z&&$)this.constraints=lS($.layoutBox,Z);else this.constraints=!1;if(this.elastic=sS(J),Q!==this.constraints&&!I8(Z)&&$&&this.constraints&&!this.hasMutatedConstraints)P2((X)=>{if(this.constraints!==!1&&this.getAxisMotionValue(X))this.constraints[X]=aS($.layoutBox[X],this.constraints[X])})}resolveRefConstraints(){let{dragConstraints:Z,onMeasureDragConstraints:J}=this.getProps();if(!Z||!I8(Z))return!1;let $=Z.current;K2($!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:Q}=this.visualElement;if(!Q||!Q.layout)return!1;let X=jU($,Q.root,this.visualElement.getTransformPagePoint()),Y=rS(Q.layout.layoutBox,X);if(J){let w=J(FU(Y));if(this.hasMutatedConstraints=!!w,w)Y=Q$(w)}return Y}startAnimation(Z){let{drag:J,dragMomentum:$,dragElastic:Q,dragTransition:X,dragSnapToOrigin:Y,onDragTransitionEnd:w}=this.getProps(),z=this.constraints||{},H=P2((G)=>{if(!mz(G,J,this.currentDirection))return;let W=z&&z[G]||{};if(Y)W={min:0,max:0};let q=Q?200:1e6,K=Q?40:1e7,B={type:"inertia",velocity:$?Z[G]:0,bounceStiffness:q,bounceDamping:K,timeConstant:750,restDelta:1,restSpeed:10,...X,...W};return this.startAxisValueAnimation(G,B)});return Promise.all(H).then(w)}startAxisValueAnimation(Z,J){let $=this.getAxisMotionValue(Z);return V3(this.visualElement,Z),$.start(x7(Z,$,0,J,this.visualElement,!1))}stopAnimation(){P2((Z)=>this.getAxisMotionValue(Z).stop())}getAxisMotionValue(Z){let J=`_drag${Z.toUpperCase()}`,$=this.visualElement.getProps(),Q=$[J];return Q?Q:this.visualElement.getValue(Z,($.initial?$.initial[Z]:void 0)||0)}snapToCursor(Z){P2((J)=>{let{drag:$}=this.getProps();if(!mz(J,$,this.currentDirection))return;let{projection:Q}=this.visualElement,X=this.getAxisMotionValue(J);if(Q&&Q.layout){let{min:Y,max:w}=Q.layout.layoutBox[J],z=X.get()||0;X.set(Z[J]-Q1(Y,w,0.5)+z)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:Z,dragConstraints:J}=this.getProps(),{projection:$}=this.visualElement;if(!I8(J)||!$||!this.constraints)return;this.stopAnimation();let Q={x:0,y:0};P2((Y)=>{let w=this.getAxisMotionValue(Y);if(w&&this.constraints!==!1){let z=w.get();Q[Y]=iS({min:z,max:z},this.constraints[Y])}});let{transformTemplate:X}=this.visualElement.getProps();this.visualElement.current.style.transform=X?X({},""):"none",$.root&&$.root.updateScroll(),$.updateLayout(),this.constraints=!1,this.resolveConstraints(),P2((Y)=>{if(!mz(Y,Z,null))return;let w=this.getAxisMotionValue(Y),{min:z,max:H}=this.constraints[Y];w.set(Q1(z,H,Q[Y]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Qe.set(this.visualElement,this);let Z=this.visualElement.current,J=T8(Z,"pointerdown",(H)=>{let{drag:G,dragListener:W=!0}=this.getProps(),q=H.target,K=q!==Z&&XU(q);if(G&&W&&!K)this.start(H)}),$,Q=()=>{let{dragConstraints:H}=this.getProps();if(I8(H)&&H.current){if(this.constraints=this.resolveRefConstraints(),!$)$=Xe(Z,H.current,()=>this.scalePositionWithinConstraints())}},{projection:X}=this.visualElement,Y=X.addEventListener("measure",Q);if(X&&!X.layout)X.root&&X.root.updateScroll(),X.updateLayout();p0.read(Q);let w=n4(window,"resize",()=>this.scalePositionWithinConstraints()),z=X.addEventListener("didUpdate",({delta:H,hasLayoutChanged:G})=>{if(this.isDragging&&G)P2((W)=>{let q=this.getAxisMotionValue(W);if(!q)return;this.originPoint[W]+=H[W].translate,q.set(q.get()+H[W].translate)}),this.visualElement.render()});return()=>{w(),J(),Y(),z&&z(),$&&$()}}getProps(){let Z=this.visualElement.getProps(),{drag:J=!1,dragDirectionLock:$=!1,dragPropagation:Q=!1,dragConstraints:X=!1,dragElastic:Y=fz,dragMomentum:w=!0}=Z;return{...Z,drag:J,dragDirectionLock:$,dragPropagation:Q,dragConstraints:X,dragElastic:Y,dragMomentum:w}}}function nS(Z){let J=!0;return()=>{if(J){J=!1;return}Z()}}function Xe(Z,J,$){let Q=Qz(Z,nS($)),X=Qz(J,nS($));return()=>{Q(),X()}}function mz(Z,J,$){return(J===!0||J===Z)&&($===null||$===Z)}function we(Z,J=10){let $=null;if(Math.abs(Z.y)>J)$="y";else if(Math.abs(Z.x)>J)$="x";return $}var Qe;var tS=U(()=>{K1();m0();vz();k3();NV();UV();AV();oS();Qe=new WeakMap});var MV;var eS=U(()=>{K1();m0();tS();MV=class MV extends P5{constructor(Z){super(Z);this.removeGroupControls=d1,this.removeListeners=d1,this.controls=new DV(Z)}mount(){let{dragControls:Z}=this.node.getProps();if(Z)this.removeGroupControls=Z.subscribe(this.controls);this.removeListeners=this.controls.addListeners()||d1}update(){let{dragControls:Z}=this.node.getProps(),{dragControls:J}=this.node.prevProps||{};if(Z!==J){if(this.removeGroupControls(),Z)this.removeGroupControls=Z.subscribe(this.controls)}}unmount(){if(this.removeGroupControls(),this.removeListeners(),!this.controls.isDragging)this.controls.endPanSession()}}});var OV=(Z)=>(J,$)=>{if(Z)p0.update(()=>Z(J,$),!1,!0)},jV;var ZE=U(()=>{K1();m0();vz();NV();AV();jV=class jV extends P5{constructor(){super(...arguments);this.removePointerDownListener=d1}onPointerDown(Z){this.session=new N$(Z,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gz(this.node)})}createPanHandlers(){let{onPanSessionStart:Z,onPanStart:J,onPan:$,onPanEnd:Q}=this.node.getProps();return{onSessionStart:OV(Z),onStart:OV(J),onMove:OV($),onEnd:(X,Y)=>{if(delete this.session,Q)p0.postRender(()=>Q(X,Y))}}}mount(){this.removePointerDownListener=T8(this.node.current,"pointerdown",(Z)=>this.onPointerDown(Z))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}});function pz(Z){let[J,$]=bz(),Q=_$.useContext(L6);return JE.jsx($E,{...Z,layoutGroup:Q,switchLayoutGroup:_$.useContext(Rz),isPresent:J,safeToRemove:$})}var JE,_$,bV=!1,$E;var PV=U(()=>{K1();QV();MJ();BV();JE=P(G0(),1),_$=P(f(),1);$E=class $E extends _$.Component{componentDidMount(){let{visualElement:Z,layoutGroup:J,switchLayoutGroup:$,layoutId:Q}=this.props,{projection:X}=Z;if(X){if(J.group)J.group.add(X);if($&&$.register&&Q)$.register(X);if(bV)X.root.didUpdate();X.addEventListener("animationComplete",()=>{this.safeToRemove()}),X.setOptions({...X.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})}l7.hasEverUpdated=!0}getSnapshotBeforeUpdate(Z){let{layoutDependency:J,visualElement:$,drag:Q,isPresent:X}=this.props,{projection:Y}=$;if(!Y)return null;if(Y.isPresent=X,Z.layoutDependency!==J)Y.setOptions({...Y.options,layoutDependency:J});if(bV=!0,Q||Z.layoutDependency!==J||J===void 0||Z.isPresent!==X)Y.willUpdate();else this.safeToRemove();if(Z.isPresent!==X){if(X)Y.promote();else if(!Y.relegate())p0.postRender(()=>{let w=Y.getStack();if(!w||!w.members.length)this.safeToRemove()})}return null}componentDidUpdate(){let{projection:Z}=this.props.visualElement;if(Z)Z.root.didUpdate(),v7.postRender(()=>{if(!Z.currentAnimation&&Z.isLead())this.safeToRemove()})}componentWillUnmount(){let{visualElement:Z,layoutGroup:J,switchLayoutGroup:$}=this.props,{projection:Q}=Z;if(bV=!0,Q){if(Q.scheduleCheckAfterUnmount(),J&&J.group)J.group.remove(Q);if($&&$.deregister)$.deregister(Q)}}safeToRemove(){let{safeToRemove:Z}=this.props;Z&&Z()}render(){return null}}});var QE;var XE=U(()=>{eS();ZE();PV();K1();QE={pan:{Feature:jV},drag:{Feature:MV,ProjectionNode:W$,MeasureLayout:pz}}});function wE(Z,J,$){let{props:Q}=Z;if(Z.animationState&&Q.whileHover)Z.animationState.setActive("whileHover",$==="Start");let X="onHover"+$,Y=Q[X];if(Y)p0.postRender(()=>Y(J,P6(J)))}var IV;var YE=U(()=>{K1();k3();IV=class IV extends P5{mount(){let{current:Z}=this.node;if(!Z)return;this.unmount=ZU(Z,(J,$)=>{return wE(this.node,$,"Start"),(Q)=>wE(this.node,Q,"End")})}unmount(){}}});var TV;var zE=U(()=>{K1();m0();TV=class TV extends P5{constructor(){super(...arguments);this.isActive=!1}onFocus(){let Z=!1;try{Z=this.node.current.matches(":focus-visible")}catch(J){Z=!0}if(!Z||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",!0),this.isActive=!0}onBlur(){if(!this.isActive||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",!1),this.isActive=!1}mount(){this.unmount=G4(n4(this.node.current,"focus",()=>this.onFocus()),n4(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}});function HE(Z,J,$){let{props:Q}=Z;if(Z.current instanceof HTMLButtonElement&&Z.current.disabled)return;if(Z.animationState&&Q.whileTap)Z.animationState.setActive("whileTap",$==="Start");let X="onTap"+($==="End"?"":$),Y=Q[X];if(Y)p0.postRender(()=>Y(J,P6(J)))}var kV;var GE=U(()=>{K1();k3();kV=class kV extends P5{mount(){let{current:Z}=this.node;if(!Z)return;let{globalTapTarget:J,propagate:$}=this.node.props;this.unmount=HU(Z,(Q,X)=>{return HE(this.node,X,"Start"),(Y,{success:w})=>HE(this.node,Y,w?"End":"Cancel")},{useGlobalTarget:J,stopPropagation:$?.tap===!1})}unmount(){}}});function He({root:Z,...J}){let $=Z||document;if(!CV.has($))CV.set($,{});let Q=CV.get($),X=JSON.stringify(J);if(!Q[X])Q[X]=new IntersectionObserver(ze,{root:Z,...J});return Q[X]}function WE(Z,J,$){let Q=He(J);return SV.set(Z,$),Q.observe(Z),()=>{SV.delete(Z),Q.unobserve(Z)}}var SV,CV,Ye=(Z)=>{let J=SV.get(Z.target);J&&J(Z)},ze=(Z)=>{Z.forEach(Ye)};var qE=U(()=>{SV=new WeakMap,CV=new WeakMap});function We({viewport:Z={}},{viewport:J={}}={}){return($)=>Z[$]!==J[$]}var Ge,EV;var KE=U(()=>{K1();qE();Ge={some:0,all:1};EV=class EV extends P5{constructor(){super(...arguments);this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:Z={}}=this.node.getProps(),{root:J,margin:$,amount:Q="some",once:X}=Z,Y={root:J?J.current:void 0,rootMargin:$,threshold:typeof Q==="number"?Q:Ge[Q]},w=(z)=>{let{isIntersecting:H}=z;if(this.isInView===H)return;if(this.isInView=H,X&&!H&&this.hasEnteredView)return;else if(H)this.hasEnteredView=!0;if(this.node.animationState)this.node.animationState.setActive("whileInView",H);let{onViewportEnter:G,onViewportLeave:W}=this.node.getProps(),q=H?G:W;q&&q(z)};return WE(this.node.current,Y,w)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:Z,prevProps:J}=this.node;if(["amount","margin","root"].some(We(Z,J)))this.startObserver()}unmount(){}}});var BE;var UE=U(()=>{YE();zE();GE();KE();BE={inView:{Feature:EV},tap:{Feature:kV},focus:{Feature:TV},hover:{Feature:IV}}});var VE;var FE=U(()=>{K1();PV();VE={layout:{ProjectionNode:W$,MeasureLayout:pz}}});var NE;var _E=U(()=>{ES();XE();UE();FE();NE={...SS,...BE,...QE,...VE}});var r1;var LE=U(()=>{TS();bS();_E();r1=jS(NE,IS)});var hV=U(()=>{kC();mC();LE();K1();m0()});var t4=U(()=>{hV();hV()});function OE(Z,J,$){let Q=[];for(let X=0;X<J;X++){let Y=[];for(let w=0;w<Z;w++)Y.push($(w,X));Q.push(Y)}return Q}function AE(Z,J,$){let Q=Math.sin(Z*12.9898+J*78.233+$*37.719)*43758.5453;return Q-Math.floor(Q)}function Fe(Z,J,$){return OE(J,$,(Q,X)=>{let Y=AE(Q,X,0)*Math.PI*2,w=5+AE(Q,X,1)*6,z=0.5+0.5*Math.sin(Z*w+Y);return z*z})}function Ne(Z,J,$){return OE(J,$,(X,Y)=>0.5+0.5*Math.sin(X*0.5+Y*0.32-Z*6.5))}function _e(Z,J){let $=Z.length,Q=Z.reduce((H,G)=>Math.max(H,G.length),0),X=Math.min(J/jE,1),Y=1-Math.pow(1-X,3),w=Math.round((1-Y)*$),z=[];for(let H=0;H<$;H++){let G=[];for(let W=0;W<Q;W++)G.push(Z[H-w]?.[W]??0);z.push(G)}return z}function DE(Z,J,$){let Q=Ve[Z];if(J===void 0)return _e(Q,$);let X=Q.length,Y=Q[0]?.length??0;return J==="wave"?Ne($,Y,X):Fe($,Y,X)}function Ae(Z,J,$){let[Q,X]=uz.useState(()=>DE(Z,J,0));return uz.useEffect(()=>{let Y=0,w=null,z=0,H=1000/$,G=(W)=>{if(w===null)w=W;let q=(W-w)/1000;if(W-z>=H){if(z=W,X(DE(Z,J,q)),J===void 0&&q>=jE)return}Y=requestAnimationFrame(G)};return Y=requestAnimationFrame(G),()=>cancelAnimationFrame(Y)},[Z,J,$]),Q}function De(Z){return`rgba(23, 23, 23, ${(0.1+Math.max(0,Math.min(1,Z))*0.9).toFixed(3)})`}function C3({sprite:Z="moi",effect:J,fps:$=Le,pixelSize:Q=3,gap:X=1,className:Y}){let w=Ae(Z,J,$),z=w[0]?.length??0,H=J!==void 0;return RV.jsx("div",{className:v0("grid",Y),style:{gridTemplateColumns:`repeat(${z}, ${Q}px)`,gap:`${X}px`},children:w.flatMap((G,W)=>G.map((q,K)=>RV.jsx("div",{className:"rounded-[2px]",style:{width:Q,height:Q,background:De(q),boxShadow:H?`0 0 ${(Q*(0.4+q)).toFixed(1)}px rgba(23, 23, 23, ${(q*0.35).toFixed(3)})`:void 0}},`${W}-${K}`)))})}var uz,RV,ME=(Z)=>Z.map((J)=>[...J].map(($)=>$==="#"?1:0)),qe,Ke,Be,Ue,Ve,jE=0.55,Le=24;var cz=U(()=>{k5();uz=P(f(),1),RV=P(G0(),1),qe=["####.","#.#.#","#.#.#","#.#.#","#.#.#"],Ke=["###.#","#.#.#","#.#.#","#.#.#","###.#"],Be=ME([".....","####.","#.#.#","#.#.#","#.#.#"]),Ue=ME(qe.map((Z,J)=>`${Z}.${Ke[J]}`)),Ve={moi:Be,"moi-full":Ue}});var bE=(Z)=>{let J,$=new Set,Q=(G,W)=>{let q=typeof G==="function"?G(J):G;if(!Object.is(q,J)){let K=J;J=(W!=null?W:typeof q!=="object"||q===null)?q:Object.assign({},J,q),$.forEach((B)=>B(J,K))}},X=()=>J,z={setState:Q,getState:X,getInitialState:()=>H,subscribe:(G)=>{return $.add(G),()=>$.delete(G)}},H=J=Z(Q,X,z);return z},dz=(Z)=>Z?bE(Z):bE;var lz=()=>{};function xV(Z,J=Me){let $=L$.default.useSyncExternalStore(Z.subscribe,L$.default.useCallback(()=>J(Z.getState()),[Z,J]),L$.default.useCallback(()=>J(Z.getInitialState()),[Z,J]));return L$.default.useDebugValue($),$}var L$,Me=(Z)=>Z,PE=(Z)=>{let J=dz(Z),$=(Q)=>xV(J,Q);return Object.assign($,J),$},IE=(Z)=>Z?PE(Z):PE;var TE=U(()=>{lz();L$=P(f(),1)});var yV=U(()=>{lz();TE()});function Oe(Z,J){let $;try{$=Z()}catch(X){return}return{getItem:(X)=>{var Y;let w=(H)=>{if(H===null)return null;return JSON.parse(H,J==null?void 0:J.reviver)},z=(Y=$.getItem(X))!=null?Y:null;if(z instanceof Promise)return z.then(w);return w(z)},setItem:(X,Y)=>$.setItem(X,JSON.stringify(Y,J==null?void 0:J.replacer)),removeItem:(X)=>$.removeItem(X)}}var vV=(Z)=>(J)=>{try{let $=Z(J);if($ instanceof Promise)return $;return{then(Q){return vV(Q)($)},catch(Q){return this}}}catch($){return{then(Q){return this},catch(Q){return vV(Q)($)}}}},je=(Z,J)=>($,Q,X)=>{let Y={storage:Oe(()=>window.localStorage),partialize:(_)=>_,version:0,merge:(_,N)=>({...N,..._}),...J},w=!1,z=0,H=new Set,G=new Set,W=Y.storage;if(!W)return Z((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${Y.name}', the given storage is currently unavailable.`),$(..._)},Q,X);let q=()=>{let _=Y.partialize({...Q()});return W.setItem(Y.name,{state:_,version:Y.version})},K=X.setState;X.setState=(_,N)=>{return K(_,N),q()};let B=Z((..._)=>{return $(..._),q()},Q,X);X.getInitialState=()=>B;let V,F=()=>{var _,N;if(!W)return;let L=++z;w=!1,H.forEach((A)=>{var O;return A((O=Q())!=null?O:B)});let M=((N=Y.onRehydrateStorage)==null?void 0:N.call(Y,(_=Q())!=null?_:B))||void 0;return vV(W.getItem.bind(W))(Y.name).then((A)=>{if(A)if(typeof A.version==="number"&&A.version!==Y.version){if(Y.migrate){let O=Y.migrate(A.state,A.version);if(O instanceof Promise)return O.then((D)=>[!0,D]);return[!0,O]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,A.state];return[!1,void 0]}).then((A)=>{var O;if(L!==z)return;let[D,k]=A;if(V=Y.merge(k,(O=Q())!=null?O:B),$(V,!0),D)return q()}).then(()=>{if(L!==z)return;M==null||M(Q(),void 0),V=Q(),w=!0,G.forEach((A)=>A(V))}).catch((A)=>{if(L!==z)return;M==null||M(void 0,A)})};if(X.persist={setOptions:(_)=>{if(Y={...Y,..._},_.storage)W=_.storage},clearStorage:()=>{W==null||W.removeItem(Y.name)},getOptions:()=>Y,rehydrate:()=>F(),hasHydrated:()=>w,onHydrate:(_)=>{return H.add(_),()=>{H.delete(_)}},onFinishHydration:(_)=>{return G.add(_),()=>{G.delete(_)}}},!Y.skipHydration)F();return V||B},kE;var CE=U(()=>{kE=je});var rz;var SE=U(()=>{yV();CE();rz=IE()(kE((Z)=>({sidebarCollapsed:!1,toggleSidebar:()=>Z((J)=>({sidebarCollapsed:!J.sidebarCollapsed})),setSidebarCollapsed:(J)=>Z({sidebarCollapsed:J})}),{name:"moi:ui"}))});function Pe(Z){if(Z.name)return Z.name;if(Z.type==="openclaw")return Z.agentId??"OpenClaw agent";return Z.path.split("/").pop()||Z.path}function az({children:Z}){let J=rz((Y)=>Y.sidebarCollapsed),{data:$}=pQ(),[Q,X]=iz.useState(!0);return iz.useEffect(()=>{let Y=setTimeout(()=>X(!1),750);return()=>clearTimeout(Y)},[]),Y1.jsxs("div",{className:"flex h-dvh bg-[#f6f7f8]",children:[Y1.jsx(r1.div,{className:"relative shrink-0 overflow-hidden",initial:!1,animate:{width:J?Te:Ie},transition:{type:"spring",visualDuration:0.2,bounce:0},children:Y1.jsx(c2,{initial:!1,children:Y1.jsx(r1.div,{className:"absolute inset-y-0 left-0",initial:J?!1:{opacity:0},animate:{opacity:1,transition:{duration:0.15,ease:"easeOut"}},exit:{opacity:0,transition:J?{delay:0.15,duration:0.2,ease:"easeIn"}:{duration:0.2,ease:"easeIn"}},children:Y1.jsx(ke,{collapsed:J,workspaces:$??[],logoEffect:Q?"chaos":void 0})},J?"collapsed":"expanded")})}),Y1.jsx("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden rounded-l-md border-l border-gray-200 bg-background shadow-[1px_0px_3px_0px_rgba(0,0,0,0.1)]",children:Z})]})}function sz({children:Z}){return Y1.jsx("header",{className:"flex h-12 shrink-0 items-center gap-2.5 border-b border-border px-3",children:Z})}function A$(){let Z=rz((Q)=>Q.sidebarCollapsed),J=rz((Q)=>Q.toggleSidebar),$=Z?jW:OW;return Y1.jsx("button",{type:"button","aria-label":Z?"Expand sidebar":"Collapse sidebar",title:Z?"Expand sidebar":"Collapse sidebar",onClick:J,className:v0("flex size-7 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",Z?"cursor-e-resize":"cursor-w-resize"),children:Y1.jsx($,{size:20,strokeWidth:1.5})})}function ke({collapsed:Z,workspaces:J,logoEffect:$}){return Y1.jsxs("aside",{className:v0("flex h-full shrink-0 flex-col px-2.5",Z?"w-[54px]":"w-60"),children:[Y1.jsx("div",{className:"mb-3.5 flex h-12 items-center px-2",children:Y1.jsx(C3,{pixelSize:3,gap:0.5,sprite:Z?"moi":"moi-full",effect:$})}),Y1.jsx("nav",{className:"flex flex-col gap-0.5",children:Y1.jsx(EE,{href:"/",icon:Y1.jsx(DW,{size:18,className:"shrink-0 text-foreground"}),label:"Home",collapsed:Z})}),Y1.jsxs("div",{className:"mt-5 flex flex-col gap-2",children:[Y1.jsxs("div",{className:v0("flex items-center justify-between pl-2",Z&&"invisible"),children:[Y1.jsx("span",{className:"text-[13px] font-medium text-muted-foreground",children:"Workspaces"}),Y1.jsx(HW,{href:"/","aria-label":"Add workspace",className:"flex size-6 items-center justify-center rounded-[6px] border border-border bg-background text-foreground/60 hover:bg-muted hover:text-foreground",children:Y1.jsx(q6,{size:16})})]}),Y1.jsx("nav",{className:"flex flex-col gap-0.5",children:J.map((Q)=>Y1.jsx(EE,{href:`/workspace/${Q.id}`,icon:Y1.jsx("img",{src:be[Q.type??"claude-code"],alt:"",className:"size-[18px] shrink-0"}),label:Pe(Q),collapsed:Z},Q.id))})]}),Y1.jsx("div",{className:"flex-1"}),Y1.jsxs("div",{className:"flex items-center justify-between gap-2 py-3",children:[Y1.jsxs("button",{type:"button",className:v0("flex h-8 items-center gap-2 rounded-sm pl-1.5 text-sm text-foreground hover:bg-foreground/[0.05] hover:text-foreground",Z?"pr-1.5":"pr-2.5"),children:[Y1.jsx(SW,{size:18,className:"shrink-0"}),!Z&&Y1.jsx("span",{children:"Settings"})]}),Y1.jsx("button",{type:"button","aria-label":"Toggle sidebar",className:"hidden size-7 items-center justify-center rounded-[6px] text-foreground/45 hover:bg-foreground/[0.06] hover:text-foreground/80",children:Y1.jsx(bW,{size:16})})]})]})}function EE({href:Z,icon:J,label:$,collapsed:Q}){return Y1.jsxs(HW,{href:Z,"aria-label":$,className:(X)=>v0("flex h-8 items-center gap-2.5 rounded-sm px-2 text-sm font-medium",X?"bg-foreground/[0.07] text-foreground":"text-foreground/65 hover:bg-foreground/[0.04] hover:text-foreground"),children:[J,!Q&&Y1.jsx("span",{className:"truncate",children:$})]})}var iz,Y1,be,Ie=240,Te=54;var gV=U(()=>{t4();N2();vQ();e8();xW();yW();vW();cz();k5();SE();iz=P(f(),1),Y1=P(G0(),1),be={"claude-code":cQ,openclaw:lQ,hermes:dQ}});function hE(){return k8.jsxs(az,{children:[k8.jsxs(sz,{children:[k8.jsx(A$,{}),k8.jsx("span",{className:"text-sm font-medium text-foreground",children:"Home"})]}),k8.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:k8.jsx(BP,{})})]})}var k8;var RE=U(()=>{VP();gV();k8=P(G0(),1)});function yE(Z){return Z.map((J)=>[...J].map(($)=>$==="#"))}function Ee(){return Array.from({length:Se},()=>Array.from({length:Ce},()=>!1))}function vE(){let[Z,J]=C8.useState(()=>yE(xE)),[$,Q]=C8.useState(!1),X=C8.useRef(!0),[Y,w]=C8.useState(!1);C8.useEffect(()=>{let K=()=>Q(!1);return window.addEventListener("mouseup",K),()=>window.removeEventListener("mouseup",K)},[]);function z(K,B,V){J((F)=>{if(F[K][B]===V)return F;let _=F.map((N)=>N.slice());return _[K][B]=V,_})}function H(K,B){let V=!Z[K][B];X.current=V,Q(!0),z(K,B,V)}function G(K,B){if($)z(K,B,X.current)}let W=Z.map((K)=>K.map((B)=>B?"#":".").join("")).join(`
|
|
26
|
+
`);async function q(){await navigator.clipboard.writeText(W),w(!0),setTimeout(()=>w(!1),1200)}return e4.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e4.jsx("div",{className:"grid w-fit grid-cols-[repeat(5,28px)] gap-px bg-black/15 p-px select-none",children:Z.map((K,B)=>K.map((V,F)=>e4.jsx("div",{onMouseDown:()=>H(B,F),onMouseEnter:()=>G(B,F),className:v0("size-7 cursor-pointer",V?"bg-neutral-900":"bg-white")},`${B}-${F}`)))}),e4.jsx("pre",{className:"rounded-md border border-border bg-white px-3 py-2 text-center font-mono text-sm leading-snug text-neutral-900",children:W}),e4.jsxs("div",{className:"flex gap-2",children:[e4.jsx("button",{type:"button",onClick:q,className:"rounded-md bg-neutral-900 px-3 py-1 text-xs font-medium text-white",children:Y?"Copied!":"Copy"}),e4.jsx("button",{type:"button",onClick:()=>J(Ee()),className:"rounded-md bg-black/[0.06] px-3 py-1 text-xs font-medium text-black/60 hover:text-black/80",children:"Clear"}),e4.jsx("button",{type:"button",onClick:()=>J(yE(xE)),className:"rounded-md bg-black/[0.06] px-3 py-1 text-xs font-medium text-black/60 hover:text-black/80",children:"Reset"})]})]})}var C8,e4,Ce=5,Se=5,xE;var gE=U(()=>{k5();C8=P(f(),1),e4=P(G0(),1),xE=[".....","####.","#.#.#","#.#.#","#.#.#"]});function fE({options:Z,value:J,onChange:$}){return V4.jsx("div",{className:"flex gap-1 rounded-lg bg-black/[0.04] p-1",children:Z.map((Q)=>V4.jsx("button",{type:"button",onClick:()=>$(Q.value),className:v0("rounded-md px-3 py-1 text-xs transition-colors",J===Q.value?"bg-neutral-900 text-white":"text-black/50 hover:text-black/80"),children:Q.label},String(Q.value)))})}function mE(){let[Z,J]=fV.useState("moi"),[$,Q]=fV.useState("none");return V4.jsxs("div",{className:"relative flex min-h-dvh flex-col items-center justify-center gap-8 bg-[#f2f1ee]",children:[V4.jsx("span",{className:"absolute top-5 left-5 text-[11px] font-medium tracking-widest text-black/30 uppercase",children:"Playground"}),V4.jsx(vE,{}),V4.jsx(C3,{sprite:Z,effect:$==="none"?void 0:$,pixelSize:3,gap:0.5}),V4.jsxs("div",{className:"flex flex-col items-center gap-2",children:[V4.jsx(fE,{options:he,value:Z,onChange:J}),V4.jsx(fE,{options:Re,value:$,onChange:Q})]})]})}var fV,V4,he,Re;var pE=U(()=>{k5();cz();gE();fV=P(f(),1),V4=P(G0(),1),he=[{value:"moi",label:"M"},{value:"moi-full",label:"MOI"}],Re=[{value:"none",label:"None"},{value:"wave",label:"Wave"},{value:"chaos",label:"Random"}]});function uE(){let Z=s7.useRef(null),[J,$]=s7.useState(!1),[Q,X]=s7.useState(!1);return s7.useEffect(()=>{let Y=Z.current;if(!Y)return;let w=()=>{let z=Y.scrollTop<=1,H=Y.scrollTop+Y.clientHeight>=Y.scrollHeight-1,G=Y.scrollHeight>Y.clientHeight+1;$(G&&!z),X(G&&!H)};return w(),Y.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),()=>{Y.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[]),{ref:Z,showTopFade:J,showBottomFade:Q}}var s7;var cE=U(()=>{s7=P(f(),1)});function xe(Z){return Z.some((J)=>J.type==="text")}function dE(Z){let J=[];for(let $ of Z){if($.role!=="assistant"){J.push($);continue}let Q=J.length>0?J[J.length-1]:null;if(!xe($.parts)&&Q!==null&&Q.role==="assistant")J[J.length-1]={...Q,parts:[...Q.parts,...$.parts]};else J.push($)}return J}function rE({value:Z,onChange:J,onSend:$,onStop:Q,processing:X}){let Y=lE.useRef(null);return I6.jsxs("form",{onSubmit:(w)=>{w.preventDefault(),$()},onMouseDown:(w)=>{if(w.target instanceof HTMLElement&&w.target.closest("button"))return;w.preventDefault(),Y.current?.focus()},className:"flex w-full cursor-text flex-col gap-1 rounded-lg bg-white p-2 shadow-xs transition-[color,box-shadow] outline-none focus-within:shadow-sm",children:[I6.jsx("textarea",{ref:Y,id:"chat-input",name:"message",value:Z,onChange:(w)=>J(w.target.value),onKeyDown:(w)=>{if(w.key==="Enter"&&!w.shiftKey)w.preventDefault(),$()},placeholder:"Ask anything...",disabled:X,autoFocus:!0,rows:1,className:"field-sizing-content max-h-40 w-full resize-none bg-transparent px-2 py-1 text-sm leading-relaxed outline-none placeholder:text-muted-foreground disabled:opacity-50"}),I6.jsx("div",{className:"flex justify-end",children:X?I6.jsx($5,{type:"button",size:"icon",onClick:Q,"aria-label":"Stop agent",children:I6.jsx(TW,{stroke:1.5})}):I6.jsx($5,{type:"submit",size:"icon",disabled:!Z.trim(),"aria-label":"Send message",children:I6.jsx(VW,{stroke:1.5})})})]})}var lE,I6;var iE=U(()=>{N2();r6();lE=P(f(),1),I6=P(G0(),1)});function E3(){return S3.useContext(aE)}function sE({id:Z,children:J}){return S3.useEffect(()=>{window.__MEI_WS__=Z},[Z]),oE.jsx(aE,{value:Z,children:J})}var S3,oE,aE;var D$=U(()=>{S3=P(f(),1),oE=P(G0(),1),aE=S3.createContext("default")});function M$(){return{turns:[],notices:[]}}function mV(Z,J){switch(J.kind){case"snapshot":return{...Z,snapshot:J.snapshot};case"turn":{let $=Z.turns.findIndex((X)=>X.id===J.turn.id),Q=$>=0?Z.turns.map((X,Y)=>Y===$?J.turn:X):[...Z.turns,J.turn];return{...Z,turns:Q}}case"notice":{if(Z.notices.some(($)=>$.id===J.notice.id))return{...Z,notices:Z.notices.map(($)=>$.id===J.notice.id?J.notice:$)};return{...Z,notices:[...Z.notices,J.notice]}}case"result":return{...Z,result:J.result}}}async function ye(Z,J){let $=await fetch(`/api/workspaces/${Z}/sessions/${J}/events`);if(!$.ok)return[];return await $.json()}function nE(Z){return Z.reduce(mV,M$())}function ve(Z){return dz()((J)=>({cwd:Z.cwd,setCwd:($)=>J({cwd:$}),activeSessionId:null,setActiveSession:($)=>J({activeSessionId:$}),events:{},views:{},processing:{},errors:{},loadEvents:async($,Q)=>{let X=await ye($,Q);J((Y)=>({events:{...Y.events,[Q]:X},views:{...Y.views,[Q]:nE(X)}}))},setEvents:($,Q)=>J((X)=>({events:{...X.events,[$]:Q},views:{...X.views,[$]:nE(Q)}})),append:($,Q)=>J((X)=>{let Y=X.events[$]??[],w=X.views[$]??M$();return{events:{...X.events,[$]:[...Y,Q]},views:{...X.views,[$]:mV(w,Q)}}}),setProcessing:($,Q)=>J((X)=>({processing:{...X.processing,[$]:Q}})),setError:($,Q)=>J((X)=>({errors:{...X.errors,[$]:Q}})),renameSession:($,Q)=>J((X)=>{let Y={...X.events},w={...X.views},z={...X.processing},H={...X.errors};if($ in Y)Y[Q]=Y[$],delete Y[$];if($ in w)w[Q]=w[$],delete w[$];if($ in z)z[Q]=z[$],delete z[$];if($ in H)H[Q]=H[$],delete H[$];return{events:Y,views:w,processing:z,errors:H}})}))}function tE({cwd:Z,children:J}){let $=T6.useRef(null);if($.current===null)$.current=ve({cwd:Z});return T6.useEffect(()=>{$.current?.getState().setCwd(Z)},[Z]),eE.jsx(pV,{value:$.current,children:J})}function Z6(Z){let J=T6.useContext(pV);if(!J)throw Error("useChatStore must be used within a ChatStoreProvider");return xV(J,Z)}function oz(){let Z=T6.useContext(pV);if(!Z)throw Error("useChatStoreApi must be used within a ChatStoreProvider");return Z}var T6,eE,pV;var O$=U(()=>{yV();lz();T6=P(f(),1),eE=P(G0(),1);pV=T6.createContext(null)});function ge(Z){let J=new Date(Z),$=new Date,Q=J.toDateString()===$.toDateString(),X=new Date($);X.setDate(X.getDate()-1);let Y=J.toDateString()===X.toDateString();if(Q)return J.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});if(Y)return"Yesterday";return J.toLocaleDateString([],{month:"short",day:"numeric"})}function Zh({onSwitch:Z}){let J=E3(),{data:$=[],refetch:Q}=uQ(J),X=Z6((H)=>H.activeSessionId),w=$.find((H)=>H.sessionId===X)?.summary??"New thread";function z(H){Z(H)}return U2.jsxs(t9,{onOpenChange:(H)=>{if(H)Q()},children:[U2.jsx(e9,{render:U2.jsxs($5,{variant:"ghost",className:"-mx-3",children:[U2.jsx("span",{className:"max-w-64 truncate",children:w}),U2.jsx(_W,{stroke:1.5,className:"text-muted-foreground"})]})}),U2.jsxs(Z3,{align:"start",className:"max-h-80 w-80 overflow-y-auto",children:[U2.jsxs(DJ,{className:"text-muted-foreground! **:text-muted-foreground!",onClick:()=>z(null),children:[U2.jsx(q6,{size:16,stroke:1.5}),"New thread"]}),$.length>0&&U2.jsx(zP,{children:$.map((H)=>U2.jsxs(DJ,{className:v0(X===H.sessionId&&"bg-accent"),onClick:()=>z(H.sessionId),children:[U2.jsx("span",{className:"truncate",children:H.summary}),U2.jsx(GP,{className:"shrink-0 tracking-normal",children:ge(H.lastModified)})]},H.sessionId))})]})]})}var U2;var Jh=U(()=>{N2();e8();D$();k5();O$();r6();rw();U2=P(G0(),1)});function me(Z=""){if(!Z)return Z;return Z.replace(/\\/g,"/").replace(fe,(J)=>J.toUpperCase())}function ue(){if(typeof process<"u"&&typeof process.cwd==="function")return process.cwd().replace(/\\/g,"/");return"/"}function Qh(Z,J){let $="",Q=0,X=-1,Y=0,w=null;for(let z=0;z<=Z.length;++z){if(z<Z.length)w=Z[z];else if(w==="/")break;else w="/";if(w==="/"){if(X===z-1||Y===1);else if(Y===2){if($.length<2||Q!==2||$[$.length-1]!=="."||$[$.length-2]!=="."){if($.length>2){let H=$.lastIndexOf("/");if(H===-1)$="",Q=0;else $=$.slice(0,H),Q=$.length-1-$.lastIndexOf("/");X=z,Y=0;continue}else if($.length>0){$="",Q=0,X=z,Y=0;continue}}if(J)$+=$.length>0?"/..":"..",Q=2}else{if($.length>0)$+=`/${Z.slice(X+1,z)}`;else $=Z.slice(X+1,z);Q=z-X-1}X=z,Y=0}else if(w==="."&&Y!==-1)++Y;else Y=-1}return $}var fe,pe,$h,uV=function(...Z){Z=Z.map((Q)=>me(Q));let J="",$=!1;for(let Q=Z.length-1;Q>=-1&&!$;Q--){let X=Q>=0?Z[Q]:ue();if(!X||X.length===0)continue;J=`${X}/${J}`,$=cV(X)}if(J=Qh(J,!$),$&&!cV(J))return`/${J}`;return J.length>0?J:"."},cV=function(Z){return pe.test(Z)},dV=function(Z,J){let $=uV(Z).replace($h,"$1").split("/"),Q=uV(J).replace($h,"$1").split("/");if(Q[0][1]===":"&&$[0][1]===":"&&$[0]!==Q[0])return Q.join("/");let X=[...$];for(let Y of X){if(Q[0]!==Y)break;$.shift(),Q.shift()}return[...$.map(()=>".."),...Q].join("/")};var Xh=U(()=>{fe=/^[A-Za-z]:\//;pe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,$h=/^\/([A-Za-z]:)?$/});var wh=U(()=>{Xh()});function B1(){}function nz(){}function Yh(Z,J){let $=J||{};return(Z[Z.length-1]===""?[...Z,""]:Z).join(($.padRight?" ":"")+","+($.padLeft===!1?"":" ")).trim()}function tz(Z,J){return((J||le).jsx?de:ce).test(Z)}var ce,de,le;var zh=U(()=>{ce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,de=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,le={}});var Hh=U(()=>{zh()});function lV(Z){return typeof Z==="object"?Z.type==="text"?Gh(Z.value):!1:Gh(Z)}function Gh(Z){return Z.replace(re,"")===""}var re;var Wh=U(()=>{re=/[ \t\n\f\r]/g});var qh=U(()=>{Wh()});class S8{constructor(Z,J,$){if(this.normal=J,this.property=Z,$)this.space=$}}var rV=U(()=>{S8.prototype.normal={};S8.prototype.property={};S8.prototype.space=void 0});function iV(Z,J){let $={},Q={};for(let X of Z)Object.assign($,X.property),Object.assign(Q,X.normal);return new S8($,Q,J)}var Kh=U(()=>{rV()});function j$(Z){return Z.toLowerCase()}class E5{constructor(Z,J){this.attribute=J,this.property=Z}}var aV=U(()=>{E5.prototype.attribute="";E5.prototype.booleanish=!1;E5.prototype.boolean=!1;E5.prototype.commaOrSpaceSeparated=!1;E5.prototype.commaSeparated=!1;E5.prototype.defined=!1;E5.prototype.mustUseProperty=!1;E5.prototype.number=!1;E5.prototype.overloadedBoolean=!1;E5.prototype.property="";E5.prototype.spaceSeparated=!1;E5.prototype.space=void 0});var b$={};N9(b$,{spaceSeparated:()=>L1,overloadedBoolean:()=>ez,number:()=>W0,commaSeparated:()=>E8,commaOrSpaceSeparated:()=>V2,booleanish:()=>o1,boolean:()=>u0});function o7(){return 2**++ie}var ie=0,u0,o1,ez,W0,L1,E8,V2;var P$=U(()=>{u0=o7(),o1=o7(),ez=o7(),W0=o7(),L1=o7(),E8=o7(),V2=o7()});function Bh(Z,J,$){if($)Z[J]=$}var sV,h3;var oV=U(()=>{aV();P$();sV=Object.keys(b$);h3=class h3 extends E5{constructor(Z,J,$,Q){let X=-1;super(Z,J);if(Bh(this,"space",Q),typeof $==="number")while(++X<sV.length){let Y=sV[X];Bh(this,sV[X],($&b$[Y])===b$[Y])}}};h3.prototype.defined=!0});function d2(Z){let J={},$={};for(let[Q,X]of Object.entries(Z.properties)){let Y=new h3(Q,Z.transform(Z.attributes||{},Q),X,Z.space);if(Z.mustUseProperty&&Z.mustUseProperty.includes(Q))Y.mustUseProperty=!0;J[Q]=Y,$[j$(Q)]=Q,$[j$(Y.attribute)]=Q}return new S8(J,$,Z.space)}var n7=U(()=>{oV();rV()});var nV;var Uh=U(()=>{n7();P$();nV=d2({properties:{ariaActiveDescendant:null,ariaAtomic:o1,ariaAutoComplete:null,ariaBusy:o1,ariaChecked:o1,ariaColCount:W0,ariaColIndex:W0,ariaColSpan:W0,ariaControls:L1,ariaCurrent:null,ariaDescribedBy:L1,ariaDetails:null,ariaDisabled:o1,ariaDropEffect:L1,ariaErrorMessage:null,ariaExpanded:o1,ariaFlowTo:L1,ariaGrabbed:o1,ariaHasPopup:null,ariaHidden:o1,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L1,ariaLevel:W0,ariaLive:null,ariaModal:o1,ariaMultiLine:o1,ariaMultiSelectable:o1,ariaOrientation:null,ariaOwns:L1,ariaPlaceholder:null,ariaPosInSet:W0,ariaPressed:o1,ariaReadOnly:o1,ariaRelevant:null,ariaRequired:o1,ariaRoleDescription:L1,ariaRowCount:W0,ariaRowIndex:W0,ariaRowSpan:W0,ariaSelected:o1,ariaSetSize:W0,ariaSort:null,ariaValueMax:W0,ariaValueMin:W0,ariaValueNow:W0,ariaValueText:null,role:null},transform(Z,J){return J==="role"?J:"aria-"+J.slice(4).toLowerCase()}})});function ZH(Z,J){return J in Z?Z[J]:J}function JH(Z,J){return ZH(Z,J.toLowerCase())}var tV=()=>{};var Vh;var Fh=U(()=>{tV();n7();P$();Vh=d2({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:E8,acceptCharset:L1,accessKey:L1,action:null,allow:null,allowFullScreen:u0,allowPaymentRequest:u0,allowUserMedia:u0,alt:null,as:null,async:u0,autoCapitalize:null,autoComplete:L1,autoFocus:u0,autoPlay:u0,blocking:L1,capture:null,charSet:null,checked:u0,cite:null,className:L1,cols:W0,colSpan:null,content:null,contentEditable:o1,controls:u0,controlsList:L1,coords:W0|E8,crossOrigin:null,data:null,dateTime:null,decoding:null,default:u0,defer:u0,dir:null,dirName:null,disabled:u0,download:ez,draggable:o1,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:u0,formTarget:null,headers:L1,height:W0,hidden:ez,high:W0,href:null,hrefLang:null,htmlFor:L1,httpEquiv:L1,id:null,imageSizes:null,imageSrcSet:null,inert:u0,inputMode:null,integrity:null,is:null,isMap:u0,itemId:null,itemProp:L1,itemRef:L1,itemScope:u0,itemType:L1,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:u0,low:W0,manifest:null,max:null,maxLength:W0,media:null,method:null,min:null,minLength:W0,multiple:u0,muted:u0,name:null,nonce:null,noModule:u0,noValidate:u0,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:u0,optimum:W0,pattern:null,ping:L1,placeholder:null,playsInline:u0,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:u0,referrerPolicy:null,rel:L1,required:u0,reversed:u0,rows:W0,rowSpan:W0,sandbox:L1,scope:null,scoped:u0,seamless:u0,selected:u0,shadowRootClonable:u0,shadowRootDelegatesFocus:u0,shadowRootMode:null,shape:null,size:W0,sizes:null,slot:null,span:W0,spellCheck:o1,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W0,step:null,style:null,tabIndex:W0,target:null,title:null,translate:null,type:null,typeMustMatch:u0,useMap:null,value:o1,width:W0,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L1,axis:null,background:null,bgColor:null,border:W0,borderColor:null,bottomMargin:W0,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:u0,declare:u0,event:null,face:null,frame:null,frameBorder:null,hSpace:W0,leftMargin:W0,link:null,longDesc:null,lowSrc:null,marginHeight:W0,marginWidth:W0,noResize:u0,noHref:u0,noShade:u0,noWrap:u0,object:null,profile:null,prompt:null,rev:null,rightMargin:W0,rules:null,scheme:null,scrolling:o1,standby:null,summary:null,text:null,topMargin:W0,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W0,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:u0,disableRemotePlayback:u0,prefix:null,property:null,results:W0,security:null,unselectable:null},space:"html",transform:JH})});var Nh;var _h=U(()=>{n7();P$();Nh=d2({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:V2,accentHeight:W0,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W0,amplitude:W0,arabicForm:null,ascent:W0,attributeName:null,attributeType:null,azimuth:W0,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W0,by:null,calcMode:null,capHeight:W0,className:L1,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W0,diffuseConstant:W0,direction:null,display:null,dur:null,divisor:W0,dominantBaseline:null,download:u0,dx:null,dy:null,edgeMode:null,editable:null,elevation:W0,enableBackground:null,end:null,event:null,exponent:W0,externalResourcesRequired:null,fill:null,fillOpacity:W0,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:E8,g2:E8,glyphName:E8,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W0,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W0,horizOriginX:W0,horizOriginY:W0,id:null,ideographic:W0,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W0,k:W0,k1:W0,k2:W0,k3:W0,k4:W0,kernelMatrix:V2,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W0,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W0,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W0,overlineThickness:W0,paintOrder:null,panose1:null,path:null,pathLength:W0,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L1,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W0,pointsAtY:W0,pointsAtZ:W0,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:V2,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:V2,rev:V2,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:V2,requiredFeatures:V2,requiredFonts:V2,requiredFormats:V2,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W0,specularExponent:W0,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W0,strikethroughThickness:W0,string:null,stroke:null,strokeDashArray:V2,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W0,strokeOpacity:W0,strokeWidth:null,style:null,surfaceScale:W0,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:V2,tabIndex:W0,tableValues:null,target:null,targetX:W0,targetY:W0,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:V2,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W0,underlineThickness:W0,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W0,values:null,vAlphabetic:W0,vMathematical:W0,vectorEffect:null,vHanging:W0,vIdeographic:W0,version:null,vertAdvY:W0,vertOriginX:W0,vertOriginY:W0,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W0,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ZH})});var eV;var Lh=U(()=>{n7();eV=d2({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(Z,J){return"xlink:"+J.slice(5).toLowerCase()}})});var ZF;var Ah=U(()=>{n7();tV();ZF=d2({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:JH})});var JF;var Dh=U(()=>{n7();JF=d2({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(Z,J){return"xml:"+J.slice(3).toLowerCase()}})});var $F;var Mh=U(()=>{$F={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"}});function QF(Z,J){let $=j$(J),Q=J,X=E5;if($ in Z.normal)return Z.property[Z.normal[$]];if($.length>4&&$.slice(0,4)==="data"&&se.test(J)){if(J.charAt(4)==="-"){let Y=J.slice(5).replace(Oh,ne);Q="data"+Y.charAt(0).toUpperCase()+Y.slice(1)}else{let Y=J.slice(4);if(!Oh.test(Y)){let w=Y.replace(ae,oe);if(w.charAt(0)!=="-")w="-"+w;J="data"+w}}X=h3}return new X(Q,J)}function oe(Z){return"-"+Z.toLowerCase()}function ne(Z){return Z.charAt(1).toUpperCase()}var ae,Oh,se;var jh=U(()=>{oV();aV();ae=/[A-Z]/g,Oh=/-[a-z]/g,se=/^data[-\w.:]+$/i});var bh,$H;var Ph=U(()=>{Kh();Uh();Fh();_h();Lh();Ah();Dh();Mh();jh();bh=iV([nV,Vh,eV,ZF,JF],"html"),$H=iV([nV,Nh,eV,ZF,JF],"svg")});function Ih(Z){return Z.join(" ").trim()}var hh=F1((Nw4,Eh)=>{var Th=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,te=/\n/g,ee=/^\s*/,Z00=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J00=/^:\s*/,$00=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Q00=/^[;\s]*/,X00=/^\s+|\s+$/g,w00=`
|
|
27
|
+
`,kh="/",Ch="*",t7="",Y00="comment",z00="declaration";function H00(Z,J){if(typeof Z!=="string")throw TypeError("First argument must be a string");if(!Z)return[];J=J||{};var $=1,Q=1;function X(V){var F=V.match(te);if(F)$+=F.length;var _=V.lastIndexOf(w00);Q=~_?V.length-_:Q+V.length}function Y(){var V={line:$,column:Q};return function(F){return F.position=new w(V),G(),F}}function w(V){this.start=V,this.end={line:$,column:Q},this.source=J.source}w.prototype.content=Z;function z(V){var F=Error(J.source+":"+$+":"+Q+": "+V);if(F.reason=V,F.filename=J.source,F.line=$,F.column=Q,F.source=Z,J.silent);else throw F}function H(V){var F=V.exec(Z);if(!F)return;var _=F[0];return X(_),Z=Z.slice(_.length),F}function G(){H(ee)}function W(V){var F;V=V||[];while(F=q())if(F!==!1)V.push(F);return V}function q(){var V=Y();if(kh!=Z.charAt(0)||Ch!=Z.charAt(1))return;var F=2;while(t7!=Z.charAt(F)&&(Ch!=Z.charAt(F)||kh!=Z.charAt(F+1)))++F;if(F+=2,t7===Z.charAt(F-1))return z("End of comment missing");var _=Z.slice(2,F-2);return Q+=2,X(_),Z=Z.slice(F),Q+=2,V({type:Y00,comment:_})}function K(){var V=Y(),F=H(Z00);if(!F)return;if(q(),!H(J00))return z("property missing ':'");var _=H($00),N=V({type:z00,property:Sh(F[0].replace(Th,t7)),value:_?Sh(_[0].replace(Th,t7)):t7});return H(Q00),N}function B(){var V=[];W(V);var F;while(F=K())if(F!==!1)V.push(F),W(V);return V}return G(),B()}function Sh(Z){return Z?Z.replace(X00,t7):t7}Eh.exports=H00});var Rh=F1((I$)=>{var G00=I$&&I$.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(I$,"__esModule",{value:!0});I$.default=q00;var W00=G00(hh());function q00(Z,J){let $=null;if(!Z||typeof Z!=="string")return $;let Q=(0,W00.default)(Z),X=typeof J==="function";return Q.forEach((Y)=>{if(Y.type!=="declaration")return;let{property:w,value:z}=Y;if(X)J(w,z,Y);else if(z)$=$||{},$[w]=z}),$}});var gh=F1((yh)=>{Object.defineProperty(yh,"__esModule",{value:!0});yh.camelCase=void 0;var K00=/^--[a-zA-Z0-9_-]+$/,B00=/-([a-z])/g,U00=/^[^-]+$/,V00=/^-(webkit|moz|ms|o|khtml)-/,F00=/^-(ms)-/,N00=function(Z){return!Z||U00.test(Z)||K00.test(Z)},_00=function(Z,J){return J.toUpperCase()},xh=function(Z,J){return"".concat(J,"-")},L00=function(Z,J){if(J===void 0)J={};if(N00(Z))return Z;if(Z=Z.toLowerCase(),J.reactCompat)Z=Z.replace(F00,xh);else Z=Z.replace(V00,xh);return Z.replace(B00,_00)};yh.camelCase=L00});var mh=F1((wF,fh)=>{var A00=wF&&wF.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}},D00=A00(Rh()),M00=gh();function XF(Z,J){var $={};if(!Z||typeof Z!=="string")return $;return(0,D00.default)(Z,function(Q,X){if(Q&&X)$[(0,M00.camelCase)(Q,J)]=X}),$}XF.default=XF;fh.exports=XF});function ph(Z){return J;function J($){let Q=$&&$.position&&$.position[Z]||{};if(typeof Q.line==="number"&&Q.line>0&&typeof Q.column==="number"&&Q.column>0)return{line:Q.line,column:Q.column,offset:typeof Q.offset==="number"&&Q.offset>-1?Q.offset:void 0}}}function YF(Z){let J=R3(Z),$=QH(Z);if(J&&$)return{start:J,end:$}}var QH,R3;var uh=U(()=>{QH=ph("end"),R3=ph("start")});var XH=U(()=>{uh()});function h8(Z){if(!Z||typeof Z!=="object")return"";if("position"in Z||"type"in Z)return ch(Z.position);if("start"in Z||"end"in Z)return ch(Z);if("line"in Z||"column"in Z)return zF(Z);return""}function zF(Z){return dh(Z&&Z.line)+":"+dh(Z&&Z.column)}function ch(Z){return zF(Z&&Z.start)+"-"+zF(Z&&Z.end)}function dh(Z){return Z&&typeof Z==="number"?Z:1}var HF=()=>{};var q5;var lh=U(()=>{HF();q5=class q5 extends Error{constructor(Z,J,$){super();if(typeof J==="string")$=J,J=void 0;let Q="",X={},Y=!1;if(J)if("line"in J&&"column"in J)X={place:J};else if("start"in J&&"end"in J)X={place:J};else if("type"in J)X={ancestors:[J],place:J.position};else X={...J};if(typeof Z==="string")Q=Z;else if(!X.cause&&Z)Y=!0,Q=Z.message,X.cause=Z;if(!X.ruleId&&!X.source&&typeof $==="string"){let z=$.indexOf(":");if(z===-1)X.ruleId=$;else X.source=$.slice(0,z),X.ruleId=$.slice(z+1)}if(!X.place&&X.ancestors&&X.ancestors){let z=X.ancestors[X.ancestors.length-1];if(z)X.place=z.position}let w=X.place&&"start"in X.place?X.place.start:X.place;this.ancestors=X.ancestors||void 0,this.cause=X.cause||void 0,this.column=w?w.column:void 0,this.fatal=void 0,this.file="",this.message=Q,this.line=w?w.line:void 0,this.name=h8(X.place)||"1:1",this.place=X.place||void 0,this.reason=this.message,this.ruleId=X.ruleId||void 0,this.source=X.source||void 0,this.stack=Y&&X.cause&&typeof X.cause.stack==="string"?X.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};q5.prototype.file="";q5.prototype.name="";q5.prototype.reason="";q5.prototype.message="";q5.prototype.stack="";q5.prototype.column=void 0;q5.prototype.line=void 0;q5.prototype.ancestors=void 0;q5.prototype.cause=void 0;q5.prototype.fatal=void 0;q5.prototype.place=void 0;q5.prototype.ruleId=void 0;q5.prototype.source=void 0});var GF=U(()=>{lh()});function qF(Z,J){if(!J||J.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let $=J.filePath||void 0,Q;if(J.development){if(typeof J.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");Q=R00($,J.jsxDEV)}else{if(typeof J.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof J.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");Q=h00($,J.jsx,J.jsxs)}let X={Fragment:J.Fragment,ancestors:[],components:J.components||{},create:Q,elementAttributeNameCase:J.elementAttributeNameCase||"react",evaluater:J.createEvaluater?J.createEvaluater():void 0,filePath:$,ignoreInvalidStyle:J.ignoreInvalidStyle||!1,passKeys:J.passKeys!==!1,passNode:J.passNode||!1,schema:J.space==="svg"?$H:bh,stylePropertyNameCase:J.stylePropertyNameCase||"dom",tableCellAlignToStyle:J.tableCellAlignToStyle!==!1},Y=ah(X,Z,void 0);if(Y&&typeof Y!=="string")return Y;return X.create(Z,X.Fragment,{children:Y||void 0},void 0)}function ah(Z,J,$){if(J.type==="element")return I00(Z,J,$);if(J.type==="mdxFlowExpression"||J.type==="mdxTextExpression")return T00(Z,J);if(J.type==="mdxJsxFlowElement"||J.type==="mdxJsxTextElement")return C00(Z,J,$);if(J.type==="mdxjsEsm")return k00(Z,J);if(J.type==="root")return S00(Z,J,$);if(J.type==="text")return E00(Z,J)}function I00(Z,J,$){let Q=Z.schema,X=Q;if(J.tagName.toLowerCase()==="svg"&&Q.space==="html")X=$H,Z.schema=X;Z.ancestors.push(J);let Y=oh(Z,J.tagName,!1),w=x00(Z,J),z=BF(Z,J);if(b00.has(J.tagName))z=z.filter(function(H){return typeof H==="string"?!lV(H):!0});return sh(Z,w,Y,J),KF(w,z),Z.ancestors.pop(),Z.schema=Q,Z.create(J,Y,w,$)}function T00(Z,J){if(J.data&&J.data.estree&&Z.evaluater){let Q=J.data.estree.body[0];return B1(Q.type==="ExpressionStatement"),Z.evaluater.evaluateExpression(Q.expression)}T$(Z,J.position)}function k00(Z,J){if(J.data&&J.data.estree&&Z.evaluater)return Z.evaluater.evaluateProgram(J.data.estree);T$(Z,J.position)}function C00(Z,J,$){let Q=Z.schema,X=Q;if(J.name==="svg"&&Q.space==="html")X=$H,Z.schema=X;Z.ancestors.push(J);let Y=J.name===null?Z.Fragment:oh(Z,J.name,!0),w=y00(Z,J),z=BF(Z,J);return sh(Z,w,Y,J),KF(w,z),Z.ancestors.pop(),Z.schema=Q,Z.create(J,Y,w,$)}function S00(Z,J,$){let Q={};return KF(Q,BF(Z,J)),Z.create(J,Z.Fragment,Q,$)}function E00(Z,J){return J.value}function sh(Z,J,$,Q){if(typeof $!=="string"&&$!==Z.Fragment&&Z.passNode)J.node=Q}function KF(Z,J){if(J.length>0){let $=J.length>1?J:J[0];if($)Z.children=$}}function h00(Z,J,$){return Q;function Q(X,Y,w,z){let G=Array.isArray(w.children)?$:J;return z?G(Y,w,z):G(Y,w)}}function R00(Z,J){return $;function $(Q,X,Y,w){let z=Array.isArray(Y.children),H=R3(Q);return J(X,Y,w,z,{columnNumber:H?H.column-1:void 0,fileName:Z,lineNumber:H?H.line:void 0},void 0)}}function x00(Z,J){let $={},Q,X;for(X in J.properties)if(X!=="children"&&WF.call(J.properties,X)){let Y=v00(Z,X,J.properties[X]);if(Y){let[w,z]=Y;if(Z.tableCellAlignToStyle&&w==="align"&&typeof z==="string"&&P00.has(J.tagName))Q=z;else $[w]=z}}if(Q){let Y=$.style||($.style={});Y[Z.stylePropertyNameCase==="css"?"text-align":"textAlign"]=Q}return $}function y00(Z,J){let $={};for(let Q of J.attributes)if(Q.type==="mdxJsxExpressionAttribute")if(Q.data&&Q.data.estree&&Z.evaluater){let Y=Q.data.estree.body[0];B1(Y.type==="ExpressionStatement");let w=Y.expression;B1(w.type==="ObjectExpression");let z=w.properties[0];B1(z.type==="SpreadElement"),Object.assign($,Z.evaluater.evaluateExpression(z.argument))}else T$(Z,J.position);else{let X=Q.name,Y;if(Q.value&&typeof Q.value==="object")if(Q.value.data&&Q.value.data.estree&&Z.evaluater){let z=Q.value.data.estree.body[0];B1(z.type==="ExpressionStatement"),Y=Z.evaluater.evaluateExpression(z.expression)}else T$(Z,J.position);else Y=Q.value===null?!0:Q.value;$[X]=Y}return $}function BF(Z,J){let $=[],Q=-1,X=Z.passKeys?new Map:O00;while(++Q<J.children.length){let Y=J.children[Q],w;if(Z.passKeys){let H=Y.type==="element"?Y.tagName:Y.type==="mdxJsxFlowElement"||Y.type==="mdxJsxTextElement"?Y.name:void 0;if(H){let G=X.get(H)||0;w=H+"-"+G,X.set(H,G+1)}}let z=ah(Z,Y,w);if(z!==void 0)$.push(z)}return $}function v00(Z,J,$){let Q=QF(Z.schema,J);if($===null||$===void 0||typeof $==="number"&&Number.isNaN($))return;if(Array.isArray($))$=Q.commaSeparated?Yh($):Ih($);if(Q.property==="style"){let X=typeof $==="object"?$:g00(Z,String($));if(Z.stylePropertyNameCase==="css")X=f00(X);return["style",X]}return[Z.elementAttributeNameCase==="react"&&Q.space?$F[Q.property]||Q.property:Q.attribute,$]}function g00(Z,J){try{return rh.default(J,{reactCompat:!0})}catch($){if(Z.ignoreInvalidStyle)return{};let Q=$,X=new q5("Cannot parse `style` attribute",{ancestors:Z.ancestors,cause:Q,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw X.file=Z.filePath||void 0,X.url=ih+"#cannot-parse-style-attribute",X}}function oh(Z,J,$){let Q;if(!$)Q={type:"Literal",value:J};else if(J.includes(".")){let X=J.split("."),Y=-1,w;while(++Y<X.length){let z=tz(X[Y])?{type:"Identifier",name:X[Y]}:{type:"Literal",value:X[Y]};w=w?{type:"MemberExpression",object:w,property:z,computed:Boolean(Y&&z.type==="Literal"),optional:!1}:z}B1(w,"always a result"),Q=w}else Q=tz(J)&&!/^[a-z]/.test(J)?{type:"Identifier",name:J}:{type:"Literal",value:J};if(Q.type==="Literal"){let X=Q.value;return WF.call(Z.components,X)?Z.components[X]:X}if(Z.evaluater)return Z.evaluater.evaluateExpression(Q);T$(Z)}function T$(Z,J){let $=new q5("Cannot handle MDX estrees without `createEvaluater`",{ancestors:Z.ancestors,place:J,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw $.file=Z.filePath||void 0,$.url=ih+"#cannot-handle-mdx-estrees-without-createevaluater",$}function f00(Z){let J={},$;for($ in Z)if(WF.call(Z,$))J[m00($)]=Z[$];return J}function m00(Z){let J=Z.replace(j00,p00);if(J.slice(0,3)==="ms-")J="-"+J;return J}function p00(Z){return"-"+Z.toLowerCase()}var rh,WF,O00,j00,b00,P00,ih="https://github.com/syntax-tree/hast-util-to-jsx-runtime";var nh=U(()=>{Hh();qh();Ph();XH();GF();rh=P(mh(),1),WF={}.hasOwnProperty,O00=new Map,j00=/[A-Z]/g,b00=new Set(["table","tbody","thead","tfoot","tr"]),P00=new Set(["td","th"])});var th=U(()=>{nh()});var k$;var eh=U(()=>{k$={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]}});var ZR=U(()=>{eh()});function e7(Z,J){let $=J||u00,Q=typeof $.includeImageAlt==="boolean"?$.includeImageAlt:!0,X=typeof $.includeHtml==="boolean"?$.includeHtml:!0;return $R(Z,Q,X)}function $R(Z,J,$){if(c00(Z)){if("value"in Z)return Z.type==="html"&&!$?"":Z.value;if(J&&"alt"in Z&&Z.alt)return Z.alt;if("children"in Z)return JR(Z.children,J,$)}if(Array.isArray(Z))return JR(Z,J,$);return""}function JR(Z,J,$){let Q=[],X=-1;while(++X<Z.length)Q[X]=$R(Z[X],J,$);return Q.join("")}function c00(Z){return Boolean(Z&&typeof Z==="object")}var u00;var QR=U(()=>{u00={}});var wH=U(()=>{QR()});function x3(Z){let J="&"+Z+";";XR.innerHTML=J;let $=XR.textContent;if($.charCodeAt($.length-1)===59&&Z!=="semi")return!1;return $===J?!1:$}var XR;var YH=U(()=>{XR=document.createElement("i")});function e1(Z,J,$,Q){let X=Z.length,Y=0,w;if(J<0)J=-J>X?0:X+J;else J=J>X?X:J;if($=$>0?$:0,Q.length<1e4)w=Array.from(Q),w.unshift(J,$),Z.splice(...w);else{if($)Z.splice(J,$);while(Y<Q.length)w=Q.slice(Y,Y+1e4),w.unshift(J,0),Z.splice(...w),Y+=1e4,J+=1e4}}function $2(Z,J){if(Z.length>0)return e1(Z,Z.length,0,J),Z;return J}function zH(Z){let J={},$=-1;while(++$<Z.length)d00(J,Z[$]);return J}function d00(Z,J){let $;for($ in J){let X=(wR.call(Z,$)?Z[$]:void 0)||(Z[$]={}),Y=J[$],w;if(Y)for(w in Y){if(!wR.call(X,w))X[w]=[];let z=Y[w];l00(X[w],Array.isArray(z)?z:z?[z]:[])}}}function l00(Z,J){let $=-1,Q=[];while(++$<J.length)(J[$].add==="after"?Z:Q).push(J[$]);e1(Z,0,0,Q)}var wR;var UF=U(()=>{wR={}.hasOwnProperty});function HH(Z,J){let $=Number.parseInt(Z,J);if($<9||$===11||$>13&&$<32||$>126&&$<160||$>55295&&$<57344||$>64975&&$<65008||($&65535)===65535||($&65535)===65534||$>1114111)return"�";return String.fromCodePoint($)}function u5(Z){return Z.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function Z9(Z){return Z!==null&&(Z<32||Z===127)}function A0(Z){return Z!==null&&Z<-2}function e0(Z){return Z!==null&&(Z<0||Z===32)}function C0(Z){return Z===-2||Z===-1||Z===32}function R8(Z){return J;function J($){return $!==null&&$>-1&&Z.test(String.fromCharCode($))}}var L5,n1,YR,C$,zR,HR,J9,J6;var z1=U(()=>{L5=R8(/[A-Za-z]/),n1=R8(/[\dA-Za-z]/),YR=R8(/[#-'*+\--9=?A-Z^-~]/);C$=R8(/\d/),zR=R8(/[\dA-Fa-f]/),HR=R8(/[!-/:-@[-`{-~]/);J9=R8(/\p{P}|\p{S}/u),J6=R8(/\s/)});function l2(Z){let J=[],$=-1,Q=0,X=0;while(++$<Z.length){let Y=Z.charCodeAt($),w="";if(Y===37&&n1(Z.charCodeAt($+1))&&n1(Z.charCodeAt($+2)))X=2;else if(Y<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(Y)))w=String.fromCharCode(Y)}else if(Y>55295&&Y<57344){let z=Z.charCodeAt($+1);if(Y<56320&&z>56319&&z<57344)w=String.fromCharCode(Y,z),X=1;else w="�"}else w=String.fromCharCode(Y);if(w)J.push(Z.slice(Q,$),encodeURIComponent(w)),Q=$+X+1,w="";if(X)$+=X,X=0}return J.join("")+Z.slice(Q)}var $9=U(()=>{z1()});function k0(Z,J,$,Q){let X=Q?Q-1:Number.POSITIVE_INFINITY,Y=0;return w;function w(H){if(C0(H))return Z.enter($),z(H);return J(H)}function z(H){if(C0(H)&&Y++<X)return Z.consume(H),z;return Z.exit($),J(H)}}var Z5=U(()=>{z1()});function r00(Z){let J=Z.attempt(this.parser.constructs.contentInitial,Q,X),$;return J;function Q(z){if(z===null){Z.consume(z);return}return Z.enter("lineEnding"),Z.consume(z),Z.exit("lineEnding"),k0(Z,J,"linePrefix")}function X(z){return Z.enter("paragraph"),Y(z)}function Y(z){let H=Z.enter("chunkText",{contentType:"text",previous:$});if($)$.next=H;return $=H,w(z)}function w(z){if(z===null){Z.exit("chunkText"),Z.exit("paragraph"),Z.consume(z);return}if(A0(z))return Z.consume(z),Z.exit("chunkText"),Y;return Z.consume(z),w}}var GR;var WR=U(()=>{Z5();z1();GR={tokenize:r00}});function i00(Z){let J=this,$=[],Q=0,X,Y,w;return z;function z(M){if(Q<$.length){let A=$[Q];return J.containerState=A[1],Z.attempt(A[0].continuation,H,G)(M)}return G(M)}function H(M){if(Q++,J.containerState._closeFlow){if(J.containerState._closeFlow=void 0,X)L();let A=J.events.length,O=A,D;while(O--)if(J.events[O][0]==="exit"&&J.events[O][1].type==="chunkFlow"){D=J.events[O][1].end;break}N(Q);let k=A;while(k<J.events.length)J.events[k][1].end={...D},k++;return e1(J.events,O+1,0,J.events.slice(A)),J.events.length=k,G(M)}return z(M)}function G(M){if(Q===$.length){if(!X)return K(M);if(X.currentConstruct&&X.currentConstruct.concrete)return V(M);J.interrupt=Boolean(X.currentConstruct&&!X._gfmTableDynamicInterruptHack)}return J.containerState={},Z.check(qR,W,q)(M)}function W(M){if(X)L();return N(Q),K(M)}function q(M){return J.parser.lazy[J.now().line]=Q!==$.length,w=J.now().offset,V(M)}function K(M){return J.containerState={},Z.attempt(qR,B,V)(M)}function B(M){return Q++,$.push([J.currentConstruct,J.containerState]),K(M)}function V(M){if(M===null){if(X)L();N(0),Z.consume(M);return}return X=X||J.parser.flow(J.now()),Z.enter("chunkFlow",{_tokenizer:X,contentType:"flow",previous:Y}),F(M)}function F(M){if(M===null){_(Z.exit("chunkFlow"),!0),N(0),Z.consume(M);return}if(A0(M))return Z.consume(M),_(Z.exit("chunkFlow")),Q=0,J.interrupt=void 0,z;return Z.consume(M),F}function _(M,A){let O=J.sliceStream(M);if(A)O.push(null);if(M.previous=Y,Y)Y.next=M;if(Y=M,X.defineSkip(M.start),X.write(O),J.parser.lazy[M.start.line]){let D=X.events.length;while(D--)if(X.events[D][1].start.offset<w&&(!X.events[D][1].end||X.events[D][1].end.offset>w))return;let k=J.events.length,b=k,h,I;while(b--)if(J.events[b][0]==="exit"&&J.events[b][1].type==="chunkFlow"){if(h){I=J.events[b][1].end;break}h=!0}N(Q),D=k;while(D<J.events.length)J.events[D][1].end={...I},D++;e1(J.events,b+1,0,J.events.slice(k)),J.events.length=D}}function N(M){let A=$.length;while(A-- >M){let O=$[A];J.containerState=O[1],O[0].exit.call(J,Z)}$.length=M}function L(){X.write([null]),Y=void 0,X=void 0,J.containerState._closeFlow=void 0}}function a00(Z,J,$){return k0(Z,Z.attempt(this.parser.constructs.document,J,$),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var KR,qR;var BR=U(()=>{Z5();z1();KR={tokenize:i00},qR={tokenize:a00}});function k6(Z){if(Z===null||e0(Z)||J6(Z))return 1;if(J9(Z))return 2}var GH=U(()=>{z1()});function x8(Z,J,$){let Q=[],X=-1;while(++X<Z.length){let Y=Z[X].resolveAll;if(Y&&!Q.includes(Y))J=Y(J,$),Q.push(Y)}return J}function s00(Z,J){let $=-1,Q,X,Y,w,z,H,G,W;while(++$<Z.length)if(Z[$][0]==="enter"&&Z[$][1].type==="attentionSequence"&&Z[$][1]._close){Q=$;while(Q--)if(Z[Q][0]==="exit"&&Z[Q][1].type==="attentionSequence"&&Z[Q][1]._open&&J.sliceSerialize(Z[Q][1]).charCodeAt(0)===J.sliceSerialize(Z[$][1]).charCodeAt(0)){if((Z[Q][1]._close||Z[$][1]._open)&&(Z[$][1].end.offset-Z[$][1].start.offset)%3&&!((Z[Q][1].end.offset-Z[Q][1].start.offset+Z[$][1].end.offset-Z[$][1].start.offset)%3))continue;H=Z[Q][1].end.offset-Z[Q][1].start.offset>1&&Z[$][1].end.offset-Z[$][1].start.offset>1?2:1;let q={...Z[Q][1].end},K={...Z[$][1].start};if(UR(q,-H),UR(K,H),w={type:H>1?"strongSequence":"emphasisSequence",start:q,end:{...Z[Q][1].end}},z={type:H>1?"strongSequence":"emphasisSequence",start:{...Z[$][1].start},end:K},Y={type:H>1?"strongText":"emphasisText",start:{...Z[Q][1].end},end:{...Z[$][1].start}},X={type:H>1?"strong":"emphasis",start:{...w.start},end:{...z.end}},Z[Q][1].end={...w.start},Z[$][1].start={...z.end},G=[],Z[Q][1].end.offset-Z[Q][1].start.offset)G=$2(G,[["enter",Z[Q][1],J],["exit",Z[Q][1],J]]);if(G=$2(G,[["enter",X,J],["enter",w,J],["exit",w,J],["enter",Y,J]]),G=$2(G,x8(J.parser.constructs.insideSpan.null,Z.slice(Q+1,$),J)),G=$2(G,[["exit",Y,J],["enter",z,J],["exit",z,J],["exit",X,J]]),Z[$][1].end.offset-Z[$][1].start.offset)W=2,G=$2(G,[["enter",Z[$][1],J],["exit",Z[$][1],J]]);else W=0;e1(Z,Q-1,$-Q+3,G),$=Q+G.length-W-2;break}}$=-1;while(++$<Z.length)if(Z[$][1].type==="attentionSequence")Z[$][1].type="data";return Z}function o00(Z,J){let $=this.parser.constructs.attentionMarkers.null,Q=this.previous,X=k6(Q),Y;return w;function w(H){return Y=H,Z.enter("attentionSequence"),z(H)}function z(H){if(H===Y)return Z.consume(H),z;let G=Z.exit("attentionSequence"),W=k6(H),q=!W||W===2&&X||$.includes(H),K=!X||X===2&&W||$.includes(Q);return G._open=Boolean(Y===42?q:q&&(X||!K)),G._close=Boolean(Y===42?K:K&&(W||!q)),J(H)}}function UR(Z,J){Z.column+=J,Z.offset+=J,Z._bufferIndex+=J}var S$;var VR=U(()=>{GH();S$={name:"attention",resolveAll:s00,tokenize:o00}});function n00(Z,J,$){let Q=0;return X;function X(B){return Z.enter("autolink"),Z.enter("autolinkMarker"),Z.consume(B),Z.exit("autolinkMarker"),Z.enter("autolinkProtocol"),Y}function Y(B){if(L5(B))return Z.consume(B),w;if(B===64)return $(B);return G(B)}function w(B){if(B===43||B===45||B===46||n1(B))return Q=1,z(B);return G(B)}function z(B){if(B===58)return Z.consume(B),Q=0,H;if((B===43||B===45||B===46||n1(B))&&Q++<32)return Z.consume(B),z;return Q=0,G(B)}function H(B){if(B===62)return Z.exit("autolinkProtocol"),Z.enter("autolinkMarker"),Z.consume(B),Z.exit("autolinkMarker"),Z.exit("autolink"),J;if(B===null||B===32||B===60||Z9(B))return $(B);return Z.consume(B),H}function G(B){if(B===64)return Z.consume(B),W;if(YR(B))return Z.consume(B),G;return $(B)}function W(B){return n1(B)?q(B):$(B)}function q(B){if(B===46)return Z.consume(B),Q=0,W;if(B===62)return Z.exit("autolinkProtocol").type="autolinkEmail",Z.enter("autolinkMarker"),Z.consume(B),Z.exit("autolinkMarker"),Z.exit("autolink"),J;return K(B)}function K(B){if((B===45||n1(B))&&Q++<63){let V=B===45?K:q;return Z.consume(B),V}return $(B)}}var VF;var FR=U(()=>{z1();VF={name:"autolink",tokenize:n00}});function t00(Z,J,$){return Q;function Q(Y){return C0(Y)?k0(Z,X,"linePrefix")(Y):X(Y)}function X(Y){return Y===null||A0(Y)?J(Y):$(Y)}}var $6;var WH=U(()=>{Z5();z1();$6={partial:!0,tokenize:t00}});function e00(Z,J,$){let Q=this;return X;function X(w){if(w===62){let z=Q.containerState;if(!z.open)Z.enter("blockQuote",{_container:!0}),z.open=!0;return Z.enter("blockQuotePrefix"),Z.enter("blockQuoteMarker"),Z.consume(w),Z.exit("blockQuoteMarker"),Y}return $(w)}function Y(w){if(C0(w))return Z.enter("blockQuotePrefixWhitespace"),Z.consume(w),Z.exit("blockQuotePrefixWhitespace"),Z.exit("blockQuotePrefix"),J;return Z.exit("blockQuotePrefix"),J(w)}}function Z10(Z,J,$){let Q=this;return X;function X(w){if(C0(w))return k0(Z,Y,"linePrefix",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w);return Y(w)}function Y(w){return Z.attempt(qH,J,$)(w)}}function J10(Z){Z.exit("blockQuote")}var qH;var NR=U(()=>{Z5();z1();qH={continuation:{tokenize:Z10},exit:J10,name:"blockQuote",tokenize:e00}});function $10(Z,J,$){return Q;function Q(Y){return Z.enter("characterEscape"),Z.enter("escapeMarker"),Z.consume(Y),Z.exit("escapeMarker"),X}function X(Y){if(HR(Y))return Z.enter("characterEscapeValue"),Z.consume(Y),Z.exit("characterEscapeValue"),Z.exit("characterEscape"),J;return $(Y)}}var KH;var _R=U(()=>{z1();KH={name:"characterEscape",tokenize:$10}});function Q10(Z,J,$){let Q=this,X=0,Y,w;return z;function z(q){return Z.enter("characterReference"),Z.enter("characterReferenceMarker"),Z.consume(q),Z.exit("characterReferenceMarker"),H}function H(q){if(q===35)return Z.enter("characterReferenceMarkerNumeric"),Z.consume(q),Z.exit("characterReferenceMarkerNumeric"),G;return Z.enter("characterReferenceValue"),Y=31,w=n1,W(q)}function G(q){if(q===88||q===120)return Z.enter("characterReferenceMarkerHexadecimal"),Z.consume(q),Z.exit("characterReferenceMarkerHexadecimal"),Z.enter("characterReferenceValue"),Y=6,w=zR,W;return Z.enter("characterReferenceValue"),Y=7,w=C$,W(q)}function W(q){if(q===59&&X){let K=Z.exit("characterReferenceValue");if(w===n1&&!x3(Q.sliceSerialize(K)))return $(q);return Z.enter("characterReferenceMarker"),Z.consume(q),Z.exit("characterReferenceMarker"),Z.exit("characterReference"),J}if(w(q)&&X++<Y)return Z.consume(q),W;return $(q)}}var BH;var LR=U(()=>{YH();z1();BH={name:"characterReference",tokenize:Q10}});function X10(Z,J,$){let Q=this,X={partial:!0,tokenize:O},Y=0,w=0,z;return H;function H(D){return G(D)}function G(D){let k=Q.events[Q.events.length-1];return Y=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,z=D,Z.enter("codeFenced"),Z.enter("codeFencedFence"),Z.enter("codeFencedFenceSequence"),W(D)}function W(D){if(D===z)return w++,Z.consume(D),W;if(w<3)return $(D);return Z.exit("codeFencedFenceSequence"),C0(D)?k0(Z,q,"whitespace")(D):q(D)}function q(D){if(D===null||A0(D))return Z.exit("codeFencedFence"),Q.interrupt?J(D):Z.check(AR,F,A)(D);return Z.enter("codeFencedFenceInfo"),Z.enter("chunkString",{contentType:"string"}),K(D)}function K(D){if(D===null||A0(D))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),q(D);if(C0(D))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),k0(Z,B,"whitespace")(D);if(D===96&&D===z)return $(D);return Z.consume(D),K}function B(D){if(D===null||A0(D))return q(D);return Z.enter("codeFencedFenceMeta"),Z.enter("chunkString",{contentType:"string"}),V(D)}function V(D){if(D===null||A0(D))return Z.exit("chunkString"),Z.exit("codeFencedFenceMeta"),q(D);if(D===96&&D===z)return $(D);return Z.consume(D),V}function F(D){return Z.attempt(X,A,_)(D)}function _(D){return Z.enter("lineEnding"),Z.consume(D),Z.exit("lineEnding"),N}function N(D){return Y>0&&C0(D)?k0(Z,L,"linePrefix",Y+1)(D):L(D)}function L(D){if(D===null||A0(D))return Z.check(AR,F,A)(D);return Z.enter("codeFlowValue"),M(D)}function M(D){if(D===null||A0(D))return Z.exit("codeFlowValue"),L(D);return Z.consume(D),M}function A(D){return Z.exit("codeFenced"),J(D)}function O(D,k,b){let h=0;return I;function I(g){return D.enter("lineEnding"),D.consume(g),D.exit("lineEnding"),d}function d(g){return D.enter("codeFencedFence"),C0(g)?k0(D,v,"linePrefix",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):v(g)}function v(g){if(g===z)return D.enter("codeFencedFenceSequence"),C(g);return b(g)}function C(g){if(g===z)return h++,D.consume(g),C;if(h>=w)return D.exit("codeFencedFenceSequence"),C0(g)?k0(D,y,"whitespace")(g):y(g);return b(g)}function y(g){if(g===null||A0(g))return D.exit("codeFencedFence"),k(g);return b(g)}}}function w10(Z,J,$){let Q=this;return X;function X(w){if(w===null)return $(w);return Z.enter("lineEnding"),Z.consume(w),Z.exit("lineEnding"),Y}function Y(w){return Q.parser.lazy[Q.now().line]?$(w):J(w)}}var AR,UH;var DR=U(()=>{Z5();z1();AR={partial:!0,tokenize:w10},UH={concrete:!0,name:"codeFenced",tokenize:X10}});function z10(Z,J,$){let Q=this;return X;function X(G){return Z.enter("codeIndented"),k0(Z,Y,"linePrefix",5)(G)}function Y(G){let W=Q.events[Q.events.length-1];return W&&W[1].type==="linePrefix"&&W[2].sliceSerialize(W[1],!0).length>=4?w(G):$(G)}function w(G){if(G===null)return H(G);if(A0(G))return Z.attempt(Y10,w,H)(G);return Z.enter("codeFlowValue"),z(G)}function z(G){if(G===null||A0(G))return Z.exit("codeFlowValue"),w(G);return Z.consume(G),z}function H(G){return Z.exit("codeIndented"),J(G)}}function H10(Z,J,$){let Q=this;return X;function X(w){if(Q.parser.lazy[Q.now().line])return $(w);if(A0(w))return Z.enter("lineEnding"),Z.consume(w),Z.exit("lineEnding"),X;return k0(Z,Y,"linePrefix",5)(w)}function Y(w){let z=Q.events[Q.events.length-1];return z&&z[1].type==="linePrefix"&&z[2].sliceSerialize(z[1],!0).length>=4?J(w):A0(w)?X(w):$(w)}}var E$,Y10;var MR=U(()=>{Z5();z1();E$={name:"codeIndented",tokenize:z10},Y10={partial:!0,tokenize:H10}});function G10(Z){let J=Z.length-4,$=3,Q,X;if((Z[$][1].type==="lineEnding"||Z[$][1].type==="space")&&(Z[J][1].type==="lineEnding"||Z[J][1].type==="space")){Q=$;while(++Q<J)if(Z[Q][1].type==="codeTextData"){Z[$][1].type="codeTextPadding",Z[J][1].type="codeTextPadding",$+=2,J-=2;break}}Q=$-1,J++;while(++Q<=J)if(X===void 0){if(Q!==J&&Z[Q][1].type!=="lineEnding")X=Q}else if(Q===J||Z[Q][1].type==="lineEnding"){if(Z[X][1].type="codeTextData",Q!==X+2)Z[X][1].end=Z[Q-1][1].end,Z.splice(X+2,Q-X-2),J-=Q-X-2,Q=X+2;X=void 0}return Z}function W10(Z){return Z!==96||this.events[this.events.length-1][1].type==="characterEscape"}function q10(Z,J,$){let Q=this,X=0,Y,w;return z;function z(K){return Z.enter("codeText"),Z.enter("codeTextSequence"),H(K)}function H(K){if(K===96)return Z.consume(K),X++,H;return Z.exit("codeTextSequence"),G(K)}function G(K){if(K===null)return $(K);if(K===32)return Z.enter("space"),Z.consume(K),Z.exit("space"),G;if(K===96)return w=Z.enter("codeTextSequence"),Y=0,q(K);if(A0(K))return Z.enter("lineEnding"),Z.consume(K),Z.exit("lineEnding"),G;return Z.enter("codeTextData"),W(K)}function W(K){if(K===null||K===32||K===96||A0(K))return Z.exit("codeTextData"),G(K);return Z.consume(K),W}function q(K){if(K===96)return Z.consume(K),Y++,q;if(Y===X)return Z.exit("codeTextSequence"),Z.exit("codeText"),J(K);return w.type="codeTextData",W(K)}}var FF;var OR=U(()=>{z1();FF={name:"codeText",previous:W10,resolve:G10,tokenize:q10}});class NF{constructor(Z){this.left=Z?[...Z]:[],this.right=[]}get(Z){if(Z<0||Z>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+Z+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(Z<this.left.length)return this.left[Z];return this.right[this.right.length-Z+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(Z,J){let $=J===null||J===void 0?Number.POSITIVE_INFINITY:J;if($<this.left.length)return this.left.slice(Z,$);if(Z>this.left.length)return this.right.slice(this.right.length-$+this.left.length,this.right.length-Z+this.left.length).reverse();return this.left.slice(Z).concat(this.right.slice(this.right.length-$+this.left.length).reverse())}splice(Z,J,$){let Q=J||0;this.setCursor(Math.trunc(Z));let X=this.right.splice(this.right.length-Q,Number.POSITIVE_INFINITY);if($)h$(this.left,$);return X.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(Z){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(Z)}pushMany(Z){this.setCursor(Number.POSITIVE_INFINITY),h$(this.left,Z)}unshift(Z){this.setCursor(0),this.right.push(Z)}unshiftMany(Z){this.setCursor(0),h$(this.right,Z.reverse())}setCursor(Z){if(Z===this.left.length||Z>this.left.length&&this.right.length===0||Z<0&&this.left.length===0)return;if(Z<this.left.length){let J=this.left.splice(Z,Number.POSITIVE_INFINITY);h$(this.right,J.reverse())}else{let J=this.right.splice(this.left.length+this.right.length-Z,Number.POSITIVE_INFINITY);h$(this.left,J.reverse())}}}function h$(Z,J){let $=0;if(J.length<1e4)Z.push(...J);else while($<J.length)Z.push(...J.slice($,$+1e4)),$+=1e4}function VH(Z){let J={},$=-1,Q,X,Y,w,z,H,G,W=new NF(Z);while(++$<W.length){while($ in J)$=J[$];if(Q=W.get($),$&&Q[1].type==="chunkFlow"&&W.get($-1)[1].type==="listItemPrefix"){if(H=Q[1]._tokenizer.events,Y=0,Y<H.length&&H[Y][1].type==="lineEndingBlank")Y+=2;if(Y<H.length&&H[Y][1].type==="content")while(++Y<H.length){if(H[Y][1].type==="content")break;if(H[Y][1].type==="chunkText")H[Y][1]._isInFirstContentOfListItem=!0,Y++}}if(Q[0]==="enter"){if(Q[1].contentType)Object.assign(J,K10(W,$)),$=J[$],G=!0}else if(Q[1]._container){Y=$,X=void 0;while(Y--)if(w=W.get(Y),w[1].type==="lineEnding"||w[1].type==="lineEndingBlank"){if(w[0]==="enter"){if(X)W.get(X)[1].type="lineEndingBlank";w[1].type="lineEnding",X=Y}}else if(w[1].type==="linePrefix"||w[1].type==="listItemIndent");else break;if(X)Q[1].end={...W.get(X)[1].start},z=W.slice(X,$),z.unshift(Q),W.splice(X,$-X+1,z)}}return e1(Z,0,Number.POSITIVE_INFINITY,W.slice(0)),!G}function K10(Z,J){let $=Z.get(J)[1],Q=Z.get(J)[2],X=J-1,Y=[],w=$._tokenizer;if(!w){if(w=Q.parser[$.contentType]($.start),$._contentTypeTextTrailing)w._contentTypeTextTrailing=!0}let z=w.events,H=[],G={},W,q,K=-1,B=$,V=0,F=0,_=[F];while(B){while(Z.get(++X)[1]!==B);if(Y.push(X),!B._tokenizer){if(W=Q.sliceStream(B),!B.next)W.push(null);if(q)w.defineSkip(B.start);if(B._isInFirstContentOfListItem)w._gfmTasklistFirstContentOfListItem=!0;if(w.write(W),B._isInFirstContentOfListItem)w._gfmTasklistFirstContentOfListItem=void 0}q=B,B=B.next}B=$;while(++K<z.length)if(z[K][0]==="exit"&&z[K-1][0]==="enter"&&z[K][1].type===z[K-1][1].type&&z[K][1].start.line!==z[K][1].end.line)F=K+1,_.push(F),B._tokenizer=void 0,B.previous=void 0,B=B.next;if(w.events=[],B)B._tokenizer=void 0,B.previous=void 0;else _.pop();K=_.length;while(K--){let N=z.slice(_[K],_[K+1]),L=Y.pop();H.push([L,L+N.length-1]),Z.splice(L,2,N)}H.reverse(),K=-1;while(++K<H.length)G[V+H[K][0]]=V+H[K][1],V+=H[K][1]-H[K][0]-1;return G}var _F=()=>{};function U10(Z){return VH(Z),Z}function V10(Z,J){let $;return Q;function Q(z){return Z.enter("content"),$=Z.enter("chunkContent",{contentType:"content"}),X(z)}function X(z){if(z===null)return Y(z);if(A0(z))return Z.check(B10,w,Y)(z);return Z.consume(z),X}function Y(z){return Z.exit("chunkContent"),Z.exit("content"),J(z)}function w(z){return Z.consume(z),Z.exit("chunkContent"),$.next=Z.enter("chunkContent",{contentType:"content",previous:$}),$=$.next,X}}function F10(Z,J,$){let Q=this;return X;function X(w){return Z.exit("chunkContent"),Z.enter("lineEnding"),Z.consume(w),Z.exit("lineEnding"),k0(Z,Y,"linePrefix")}function Y(w){if(w===null||A0(w))return $(w);let z=Q.events[Q.events.length-1];if(!Q.parser.constructs.disable.null.includes("codeIndented")&&z&&z[1].type==="linePrefix"&&z[2].sliceSerialize(z[1],!0).length>=4)return J(w);return Z.interrupt(Q.parser.constructs.flow,$,J)(w)}}var LF,B10;var jR=U(()=>{Z5();z1();_F();LF={resolve:U10,tokenize:V10},B10={partial:!0,tokenize:F10}});function FH(Z,J,$,Q,X,Y,w,z,H){let G=H||Number.POSITIVE_INFINITY,W=0;return q;function q(N){if(N===60)return Z.enter(Q),Z.enter(X),Z.enter(Y),Z.consume(N),Z.exit(Y),K;if(N===null||N===32||N===41||Z9(N))return $(N);return Z.enter(Q),Z.enter(w),Z.enter(z),Z.enter("chunkString",{contentType:"string"}),F(N)}function K(N){if(N===62)return Z.enter(Y),Z.consume(N),Z.exit(Y),Z.exit(X),Z.exit(Q),J;return Z.enter(z),Z.enter("chunkString",{contentType:"string"}),B(N)}function B(N){if(N===62)return Z.exit("chunkString"),Z.exit(z),K(N);if(N===null||N===60||A0(N))return $(N);return Z.consume(N),N===92?V:B}function V(N){if(N===60||N===62||N===92)return Z.consume(N),B;return B(N)}function F(N){if(!W&&(N===null||N===41||e0(N)))return Z.exit("chunkString"),Z.exit(z),Z.exit(w),Z.exit(Q),J(N);if(W<G&&N===40)return Z.consume(N),W++,F;if(N===41)return Z.consume(N),W--,F;if(N===null||N===32||N===40||Z9(N))return $(N);return Z.consume(N),N===92?_:F}function _(N){if(N===40||N===41||N===92)return Z.consume(N),F;return F(N)}}var AF=U(()=>{z1()});function NH(Z,J,$,Q,X,Y){let w=this,z=0,H;return G;function G(B){return Z.enter(Q),Z.enter(X),Z.consume(B),Z.exit(X),Z.enter(Y),W}function W(B){if(z>999||B===null||B===91||B===93&&!H||B===94&&!z&&"_hiddenFootnoteSupport"in w.parser.constructs)return $(B);if(B===93)return Z.exit(Y),Z.enter(X),Z.consume(B),Z.exit(X),Z.exit(Q),J;if(A0(B))return Z.enter("lineEnding"),Z.consume(B),Z.exit("lineEnding"),W;return Z.enter("chunkString",{contentType:"string"}),q(B)}function q(B){if(B===null||B===91||B===93||A0(B)||z++>999)return Z.exit("chunkString"),W(B);if(Z.consume(B),!H)H=!C0(B);return B===92?K:q}function K(B){if(B===91||B===92||B===93)return Z.consume(B),z++,q;return q(B)}}var DF=U(()=>{z1()});function _H(Z,J,$,Q,X,Y){let w;return z;function z(K){if(K===34||K===39||K===40)return Z.enter(Q),Z.enter(X),Z.consume(K),Z.exit(X),w=K===40?41:K,H;return $(K)}function H(K){if(K===w)return Z.enter(X),Z.consume(K),Z.exit(X),Z.exit(Q),J;return Z.enter(Y),G(K)}function G(K){if(K===w)return Z.exit(Y),H(w);if(K===null)return $(K);if(A0(K))return Z.enter("lineEnding"),Z.consume(K),Z.exit("lineEnding"),k0(Z,G,"linePrefix");return Z.enter("chunkString",{contentType:"string"}),W(K)}function W(K){if(K===w||K===null||A0(K))return Z.exit("chunkString"),G(K);return Z.consume(K),K===92?q:W}function q(K){if(K===w||K===92)return Z.consume(K),W;return W(K)}}var MF=U(()=>{Z5();z1()});function Q9(Z,J){let $;return Q;function Q(X){if(A0(X))return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),$=!0,Q;if(C0(X))return k0(Z,Q,$?"linePrefix":"lineSuffix")(X);return J(X)}}var OF=U(()=>{Z5();z1()});function _10(Z,J,$){let Q=this,X;return Y;function Y(B){return Z.enter("definition"),w(B)}function w(B){return NH.call(Q,Z,z,$,"definitionLabel","definitionLabelMarker","definitionLabelString")(B)}function z(B){if(X=u5(Q.sliceSerialize(Q.events[Q.events.length-1][1]).slice(1,-1)),B===58)return Z.enter("definitionMarker"),Z.consume(B),Z.exit("definitionMarker"),H;return $(B)}function H(B){return e0(B)?Q9(Z,G)(B):G(B)}function G(B){return FH(Z,W,$,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(B)}function W(B){return Z.attempt(N10,q,q)(B)}function q(B){return C0(B)?k0(Z,K,"whitespace")(B):K(B)}function K(B){if(B===null||A0(B))return Z.exit("definition"),Q.parser.defined.push(X),J(B);return $(B)}}function L10(Z,J,$){return Q;function Q(z){return e0(z)?Q9(Z,X)(z):$(z)}function X(z){return _H(Z,Y,$,"definitionTitle","definitionTitleMarker","definitionTitleString")(z)}function Y(z){return C0(z)?k0(Z,w,"whitespace")(z):w(z)}function w(z){return z===null||A0(z)?J(z):$(z)}}var jF,N10;var bR=U(()=>{AF();DF();Z5();MF();OF();z1();jF={name:"definition",tokenize:_10},N10={partial:!0,tokenize:L10}});function A10(Z,J,$){return Q;function Q(Y){return Z.enter("hardBreakEscape"),Z.consume(Y),X}function X(Y){if(A0(Y))return Z.exit("hardBreakEscape"),J(Y);return $(Y)}}var bF;var PR=U(()=>{z1();bF={name:"hardBreakEscape",tokenize:A10}});function D10(Z,J){let $=Z.length-2,Q=3,X,Y;if(Z[Q][1].type==="whitespace")Q+=2;if($-2>Q&&Z[$][1].type==="whitespace")$-=2;if(Z[$][1].type==="atxHeadingSequence"&&(Q===$-1||$-4>Q&&Z[$-2][1].type==="whitespace"))$-=Q+1===$?2:4;if($>Q)X={type:"atxHeadingText",start:Z[Q][1].start,end:Z[$][1].end},Y={type:"chunkText",start:Z[Q][1].start,end:Z[$][1].end,contentType:"text"},e1(Z,Q,$-Q+1,[["enter",X,J],["enter",Y,J],["exit",Y,J],["exit",X,J]]);return Z}function M10(Z,J,$){let Q=0;return X;function X(W){return Z.enter("atxHeading"),Y(W)}function Y(W){return Z.enter("atxHeadingSequence"),w(W)}function w(W){if(W===35&&Q++<6)return Z.consume(W),w;if(W===null||e0(W))return Z.exit("atxHeadingSequence"),z(W);return $(W)}function z(W){if(W===35)return Z.enter("atxHeadingSequence"),H(W);if(W===null||A0(W))return Z.exit("atxHeading"),J(W);if(C0(W))return k0(Z,z,"whitespace")(W);return Z.enter("atxHeadingText"),G(W)}function H(W){if(W===35)return Z.consume(W),H;return Z.exit("atxHeadingSequence"),z(W)}function G(W){if(W===null||W===35||e0(W))return Z.exit("atxHeadingText"),z(W);return Z.consume(W),G}}var PF;var IR=U(()=>{Z5();z1();PF={name:"headingAtx",resolve:D10,tokenize:M10}});var TR,IF;var kR=U(()=>{TR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],IF=["pre","script","style","textarea"]});function b10(Z){let J=Z.length;while(J--)if(Z[J][0]==="enter"&&Z[J][1].type==="htmlFlow")break;if(J>1&&Z[J-2][1].type==="linePrefix")Z[J][1].start=Z[J-2][1].start,Z[J+1][1].start=Z[J-2][1].start,Z.splice(J-2,2);return Z}function P10(Z,J,$){let Q=this,X,Y,w,z,H;return G;function G(T){return W(T)}function W(T){return Z.enter("htmlFlow"),Z.enter("htmlFlowData"),Z.consume(T),q}function q(T){if(T===33)return Z.consume(T),K;if(T===47)return Z.consume(T),Y=!0,F;if(T===63)return Z.consume(T),X=3,Q.interrupt?J:j;if(L5(T))return Z.consume(T),w=String.fromCharCode(T),_;return $(T)}function K(T){if(T===45)return Z.consume(T),X=2,B;if(T===91)return Z.consume(T),X=5,z=0,V;if(L5(T))return Z.consume(T),X=4,Q.interrupt?J:j;return $(T)}function B(T){if(T===45)return Z.consume(T),Q.interrupt?J:j;return $(T)}function V(T){if(T==="CDATA[".charCodeAt(z++)){if(Z.consume(T),z===6)return Q.interrupt?J:v;return V}return $(T)}function F(T){if(L5(T))return Z.consume(T),w=String.fromCharCode(T),_;return $(T)}function _(T){if(T===null||T===47||T===62||e0(T)){let $0=T===47,V0=w.toLowerCase();if(!$0&&!Y&&IF.includes(V0))return X=1,Q.interrupt?J(T):v(T);if(TR.includes(w.toLowerCase())){if(X=6,$0)return Z.consume(T),N;return Q.interrupt?J(T):v(T)}return X=7,Q.interrupt&&!Q.parser.lazy[Q.now().line]?$(T):Y?L(T):M(T)}if(T===45||n1(T))return Z.consume(T),w+=String.fromCharCode(T),_;return $(T)}function N(T){if(T===62)return Z.consume(T),Q.interrupt?J:v;return $(T)}function L(T){if(C0(T))return Z.consume(T),L;return I(T)}function M(T){if(T===47)return Z.consume(T),I;if(T===58||T===95||L5(T))return Z.consume(T),A;if(C0(T))return Z.consume(T),M;return I(T)}function A(T){if(T===45||T===46||T===58||T===95||n1(T))return Z.consume(T),A;return O(T)}function O(T){if(T===61)return Z.consume(T),D;if(C0(T))return Z.consume(T),O;return M(T)}function D(T){if(T===null||T===60||T===61||T===62||T===96)return $(T);if(T===34||T===39)return Z.consume(T),H=T,k;if(C0(T))return Z.consume(T),D;return b(T)}function k(T){if(T===H)return Z.consume(T),H=null,h;if(T===null||A0(T))return $(T);return Z.consume(T),k}function b(T){if(T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||e0(T))return O(T);return Z.consume(T),b}function h(T){if(T===47||T===62||C0(T))return M(T);return $(T)}function I(T){if(T===62)return Z.consume(T),d;return $(T)}function d(T){if(T===null||A0(T))return v(T);if(C0(T))return Z.consume(T),d;return $(T)}function v(T){if(T===45&&X===2)return Z.consume(T),S;if(T===60&&X===1)return Z.consume(T),x;if(T===62&&X===4)return Z.consume(T),H0;if(T===63&&X===3)return Z.consume(T),j;if(T===93&&X===5)return Z.consume(T),m;if(A0(T)&&(X===6||X===7))return Z.exit("htmlFlowData"),Z.check(O10,w0,C)(T);if(T===null||A0(T))return Z.exit("htmlFlowData"),C(T);return Z.consume(T),v}function C(T){return Z.check(j10,y,w0)(T)}function y(T){return Z.enter("lineEnding"),Z.consume(T),Z.exit("lineEnding"),g}function g(T){if(T===null||A0(T))return C(T);return Z.enter("htmlFlowData"),v(T)}function S(T){if(T===45)return Z.consume(T),j;return v(T)}function x(T){if(T===47)return Z.consume(T),w="",E;return v(T)}function E(T){if(T===62){let $0=w.toLowerCase();if(IF.includes($0))return Z.consume(T),H0;return v(T)}if(L5(T)&&w.length<8)return Z.consume(T),w+=String.fromCharCode(T),E;return v(T)}function m(T){if(T===93)return Z.consume(T),j;return v(T)}function j(T){if(T===62)return Z.consume(T),H0;if(T===45&&X===2)return Z.consume(T),j;return v(T)}function H0(T){if(T===null||A0(T))return Z.exit("htmlFlowData"),w0(T);return Z.consume(T),H0}function w0(T){return Z.exit("htmlFlow"),J(T)}}function I10(Z,J,$){let Q=this;return X;function X(w){if(A0(w))return Z.enter("lineEnding"),Z.consume(w),Z.exit("lineEnding"),Y;return $(w)}function Y(w){return Q.parser.lazy[Q.now().line]?$(w):J(w)}}function T10(Z,J,$){return Q;function Q(X){return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),Z.attempt($6,J,$)}}var TF,O10,j10;var CR=U(()=>{z1();kR();WH();TF={concrete:!0,name:"htmlFlow",resolveTo:b10,tokenize:P10},O10={partial:!0,tokenize:T10},j10={partial:!0,tokenize:I10}});function k10(Z,J,$){let Q=this,X,Y,w;return z;function z(j){return Z.enter("htmlText"),Z.enter("htmlTextData"),Z.consume(j),H}function H(j){if(j===33)return Z.consume(j),G;if(j===47)return Z.consume(j),O;if(j===63)return Z.consume(j),M;if(L5(j))return Z.consume(j),b;return $(j)}function G(j){if(j===45)return Z.consume(j),W;if(j===91)return Z.consume(j),Y=0,V;if(L5(j))return Z.consume(j),L;return $(j)}function W(j){if(j===45)return Z.consume(j),B;return $(j)}function q(j){if(j===null)return $(j);if(j===45)return Z.consume(j),K;if(A0(j))return w=q,x(j);return Z.consume(j),q}function K(j){if(j===45)return Z.consume(j),B;return q(j)}function B(j){return j===62?S(j):j===45?K(j):q(j)}function V(j){if(j==="CDATA[".charCodeAt(Y++))return Z.consume(j),Y===6?F:V;return $(j)}function F(j){if(j===null)return $(j);if(j===93)return Z.consume(j),_;if(A0(j))return w=F,x(j);return Z.consume(j),F}function _(j){if(j===93)return Z.consume(j),N;return F(j)}function N(j){if(j===62)return S(j);if(j===93)return Z.consume(j),N;return F(j)}function L(j){if(j===null||j===62)return S(j);if(A0(j))return w=L,x(j);return Z.consume(j),L}function M(j){if(j===null)return $(j);if(j===63)return Z.consume(j),A;if(A0(j))return w=M,x(j);return Z.consume(j),M}function A(j){return j===62?S(j):M(j)}function O(j){if(L5(j))return Z.consume(j),D;return $(j)}function D(j){if(j===45||n1(j))return Z.consume(j),D;return k(j)}function k(j){if(A0(j))return w=k,x(j);if(C0(j))return Z.consume(j),k;return S(j)}function b(j){if(j===45||n1(j))return Z.consume(j),b;if(j===47||j===62||e0(j))return h(j);return $(j)}function h(j){if(j===47)return Z.consume(j),S;if(j===58||j===95||L5(j))return Z.consume(j),I;if(A0(j))return w=h,x(j);if(C0(j))return Z.consume(j),h;return S(j)}function I(j){if(j===45||j===46||j===58||j===95||n1(j))return Z.consume(j),I;return d(j)}function d(j){if(j===61)return Z.consume(j),v;if(A0(j))return w=d,x(j);if(C0(j))return Z.consume(j),d;return h(j)}function v(j){if(j===null||j===60||j===61||j===62||j===96)return $(j);if(j===34||j===39)return Z.consume(j),X=j,C;if(A0(j))return w=v,x(j);if(C0(j))return Z.consume(j),v;return Z.consume(j),y}function C(j){if(j===X)return Z.consume(j),X=void 0,g;if(j===null)return $(j);if(A0(j))return w=C,x(j);return Z.consume(j),C}function y(j){if(j===null||j===34||j===39||j===60||j===61||j===96)return $(j);if(j===47||j===62||e0(j))return h(j);return Z.consume(j),y}function g(j){if(j===47||j===62||e0(j))return h(j);return $(j)}function S(j){if(j===62)return Z.consume(j),Z.exit("htmlTextData"),Z.exit("htmlText"),J;return $(j)}function x(j){return Z.exit("htmlTextData"),Z.enter("lineEnding"),Z.consume(j),Z.exit("lineEnding"),E}function E(j){return C0(j)?k0(Z,m,"linePrefix",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):m(j)}function m(j){return Z.enter("htmlTextData"),w(j)}}var kF;var SR=U(()=>{Z5();z1();kF={name:"htmlText",tokenize:k10}});function h10(Z){let J=-1,$=[];while(++J<Z.length){let Q=Z[J][1];if($.push(Z[J]),Q.type==="labelImage"||Q.type==="labelLink"||Q.type==="labelEnd"){let X=Q.type==="labelImage"?4:2;Q.type="data",J+=X}}if(Z.length!==$.length)e1(Z,0,Z.length,$);return Z}function R10(Z,J){let $=Z.length,Q=0,X,Y,w,z;while($--)if(X=Z[$][1],Y){if(X.type==="link"||X.type==="labelLink"&&X._inactive)break;if(Z[$][0]==="enter"&&X.type==="labelLink")X._inactive=!0}else if(w){if(Z[$][0]==="enter"&&(X.type==="labelImage"||X.type==="labelLink")&&!X._balanced){if(Y=$,X.type!=="labelLink"){Q=2;break}}}else if(X.type==="labelEnd")w=$;let H={type:Z[Y][1].type==="labelLink"?"link":"image",start:{...Z[Y][1].start},end:{...Z[Z.length-1][1].end}},G={type:"label",start:{...Z[Y][1].start},end:{...Z[w][1].end}},W={type:"labelText",start:{...Z[Y+Q+2][1].end},end:{...Z[w-2][1].start}};return z=[["enter",H,J],["enter",G,J]],z=$2(z,Z.slice(Y+1,Y+Q+3)),z=$2(z,[["enter",W,J]]),z=$2(z,x8(J.parser.constructs.insideSpan.null,Z.slice(Y+Q+4,w-3),J)),z=$2(z,[["exit",W,J],Z[w-2],Z[w-1],["exit",G,J]]),z=$2(z,Z.slice(w+1)),z=$2(z,[["exit",H,J]]),e1(Z,Y,Z.length,z),Z}function x10(Z,J,$){let Q=this,X=Q.events.length,Y,w;while(X--)if((Q.events[X][1].type==="labelImage"||Q.events[X][1].type==="labelLink")&&!Q.events[X][1]._balanced){Y=Q.events[X][1];break}return z;function z(K){if(!Y)return $(K);if(Y._inactive)return q(K);return w=Q.parser.defined.includes(u5(Q.sliceSerialize({start:Y.end,end:Q.now()}))),Z.enter("labelEnd"),Z.enter("labelMarker"),Z.consume(K),Z.exit("labelMarker"),Z.exit("labelEnd"),H}function H(K){if(K===40)return Z.attempt(C10,W,w?W:q)(K);if(K===91)return Z.attempt(S10,W,w?G:q)(K);return w?W(K):q(K)}function G(K){return Z.attempt(E10,W,q)(K)}function W(K){return J(K)}function q(K){return Y._balanced=!0,$(K)}}function y10(Z,J,$){return Q;function Q(q){return Z.enter("resource"),Z.enter("resourceMarker"),Z.consume(q),Z.exit("resourceMarker"),X}function X(q){return e0(q)?Q9(Z,Y)(q):Y(q)}function Y(q){if(q===41)return W(q);return FH(Z,w,z,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(q)}function w(q){return e0(q)?Q9(Z,H)(q):W(q)}function z(q){return $(q)}function H(q){if(q===34||q===39||q===40)return _H(Z,G,$,"resourceTitle","resourceTitleMarker","resourceTitleString")(q);return W(q)}function G(q){return e0(q)?Q9(Z,W)(q):W(q)}function W(q){if(q===41)return Z.enter("resourceMarker"),Z.consume(q),Z.exit("resourceMarker"),Z.exit("resource"),J;return $(q)}}function v10(Z,J,$){let Q=this;return X;function X(z){return NH.call(Q,Z,Y,w,"reference","referenceMarker","referenceString")(z)}function Y(z){return Q.parser.defined.includes(u5(Q.sliceSerialize(Q.events[Q.events.length-1][1]).slice(1,-1)))?J(z):$(z)}function w(z){return $(z)}}function g10(Z,J,$){return Q;function Q(Y){return Z.enter("reference"),Z.enter("referenceMarker"),Z.consume(Y),Z.exit("referenceMarker"),X}function X(Y){if(Y===93)return Z.enter("referenceMarker"),Z.consume(Y),Z.exit("referenceMarker"),Z.exit("reference"),J;return $(Y)}}var X9,C10,S10,E10;var LH=U(()=>{AF();DF();MF();OF();z1();X9={name:"labelEnd",resolveAll:h10,resolveTo:R10,tokenize:x10},C10={tokenize:y10},S10={tokenize:v10},E10={tokenize:g10}});function f10(Z,J,$){let Q=this;return X;function X(z){return Z.enter("labelImage"),Z.enter("labelImageMarker"),Z.consume(z),Z.exit("labelImageMarker"),Y}function Y(z){if(z===91)return Z.enter("labelMarker"),Z.consume(z),Z.exit("labelMarker"),Z.exit("labelImage"),w;return $(z)}function w(z){return z===94&&"_hiddenFootnoteSupport"in Q.parser.constructs?$(z):J(z)}}var CF;var ER=U(()=>{LH();CF={name:"labelStartImage",resolveAll:X9.resolveAll,tokenize:f10}});function m10(Z,J,$){let Q=this;return X;function X(w){return Z.enter("labelLink"),Z.enter("labelMarker"),Z.consume(w),Z.exit("labelMarker"),Z.exit("labelLink"),Y}function Y(w){return w===94&&"_hiddenFootnoteSupport"in Q.parser.constructs?$(w):J(w)}}var SF;var hR=U(()=>{LH();SF={name:"labelStartLink",resolveAll:X9.resolveAll,tokenize:m10}});function p10(Z,J){return $;function $(Q){return Z.enter("lineEnding"),Z.consume(Q),Z.exit("lineEnding"),k0(Z,J,"linePrefix")}}var R$;var RR=U(()=>{Z5();R$={name:"lineEnding",tokenize:p10}});function u10(Z,J,$){let Q=0,X;return Y;function Y(G){return Z.enter("thematicBreak"),w(G)}function w(G){return X=G,z(G)}function z(G){if(G===X)return Z.enter("thematicBreakSequence"),H(G);if(Q>=3&&(G===null||A0(G)))return Z.exit("thematicBreak"),J(G);return $(G)}function H(G){if(G===X)return Z.consume(G),Q++,H;return Z.exit("thematicBreakSequence"),C0(G)?k0(Z,z,"whitespace")(G):z(G)}}var w9;var EF=U(()=>{Z5();z1();w9={name:"thematicBreak",tokenize:u10}});function l10(Z,J,$){let Q=this,X=Q.events[Q.events.length-1],Y=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,w=0;return z;function z(B){let V=Q.containerState.type||(B===42||B===43||B===45?"listUnordered":"listOrdered");if(V==="listUnordered"?!Q.containerState.marker||B===Q.containerState.marker:C$(B)){if(!Q.containerState.type)Q.containerState.type=V,Z.enter(V,{_container:!0});if(V==="listUnordered")return Z.enter("listItemPrefix"),B===42||B===45?Z.check(w9,$,G)(B):G(B);if(!Q.interrupt||B===49)return Z.enter("listItemPrefix"),Z.enter("listItemValue"),H(B)}return $(B)}function H(B){if(C$(B)&&++w<10)return Z.consume(B),H;if((!Q.interrupt||w<2)&&(Q.containerState.marker?B===Q.containerState.marker:B===41||B===46))return Z.exit("listItemValue"),G(B);return $(B)}function G(B){return Z.enter("listItemMarker"),Z.consume(B),Z.exit("listItemMarker"),Q.containerState.marker=Q.containerState.marker||B,Z.check($6,Q.interrupt?$:W,Z.attempt(c10,K,q))}function W(B){return Q.containerState.initialBlankLine=!0,Y++,K(B)}function q(B){if(C0(B))return Z.enter("listItemPrefixWhitespace"),Z.consume(B),Z.exit("listItemPrefixWhitespace"),K;return $(B)}function K(B){return Q.containerState.size=Y+Q.sliceSerialize(Z.exit("listItemPrefix"),!0).length,J(B)}}function r10(Z,J,$){let Q=this;return Q.containerState._closeFlow=void 0,Z.check($6,X,Y);function X(z){return Q.containerState.furtherBlankLines=Q.containerState.furtherBlankLines||Q.containerState.initialBlankLine,k0(Z,J,"listItemIndent",Q.containerState.size+1)(z)}function Y(z){if(Q.containerState.furtherBlankLines||!C0(z))return Q.containerState.furtherBlankLines=void 0,Q.containerState.initialBlankLine=void 0,w(z);return Q.containerState.furtherBlankLines=void 0,Q.containerState.initialBlankLine=void 0,Z.attempt(d10,J,w)(z)}function w(z){return Q.containerState._closeFlow=!0,Q.interrupt=void 0,k0(Z,Z.attempt(c5,J,$),"linePrefix",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z)}}function i10(Z,J,$){let Q=this;return k0(Z,X,"listItemIndent",Q.containerState.size+1);function X(Y){let w=Q.events[Q.events.length-1];return w&&w[1].type==="listItemIndent"&&w[2].sliceSerialize(w[1],!0).length===Q.containerState.size?J(Y):$(Y)}}function a10(Z){Z.exit(this.containerState.type)}function s10(Z,J,$){let Q=this;return k0(Z,X,"listItemPrefixWhitespace",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function X(Y){let w=Q.events[Q.events.length-1];return!C0(Y)&&w&&w[1].type==="listItemPrefixWhitespace"?J(Y):$(Y)}}var c5,c10,d10;var xR=U(()=>{Z5();z1();WH();EF();c5={continuation:{tokenize:r10},exit:a10,name:"list",tokenize:l10},c10={partial:!0,tokenize:s10},d10={partial:!0,tokenize:i10}});function o10(Z,J){let $=Z.length,Q,X,Y;while($--)if(Z[$][0]==="enter"){if(Z[$][1].type==="content"){Q=$;break}if(Z[$][1].type==="paragraph")X=$}else{if(Z[$][1].type==="content")Z.splice($,1);if(!Y&&Z[$][1].type==="definition")Y=$}let w={type:"setextHeading",start:{...Z[Q][1].start},end:{...Z[Z.length-1][1].end}};if(Z[X][1].type="setextHeadingText",Y)Z.splice(X,0,["enter",w,J]),Z.splice(Y+1,0,["exit",Z[Q][1],J]),Z[Q][1].end={...Z[Y][1].end};else Z[Q][1]=w;return Z.push(["exit",w,J]),Z}function n10(Z,J,$){let Q=this,X;return Y;function Y(G){let W=Q.events.length,q;while(W--)if(Q.events[W][1].type!=="lineEnding"&&Q.events[W][1].type!=="linePrefix"&&Q.events[W][1].type!=="content"){q=Q.events[W][1].type==="paragraph";break}if(!Q.parser.lazy[Q.now().line]&&(Q.interrupt||q))return Z.enter("setextHeadingLine"),X=G,w(G);return $(G)}function w(G){return Z.enter("setextHeadingLineSequence"),z(G)}function z(G){if(G===X)return Z.consume(G),z;return Z.exit("setextHeadingLineSequence"),C0(G)?k0(Z,H,"lineSuffix")(G):H(G)}function H(G){if(G===null||A0(G))return Z.exit("setextHeadingLine"),J(G);return $(G)}}var AH;var yR=U(()=>{Z5();z1();AH={name:"setextUnderline",resolveTo:o10,tokenize:n10}});var DH=U(()=>{VR();FR();WH();NR();_R();LR();DR();MR();OR();jR();bR();PR();IR();CR();SR();LH();ER();hR();RR();xR();yR();EF()});function t10(Z){let J=this,$=Z.attempt($6,Q,Z.attempt(this.parser.constructs.flowInitial,X,k0(Z,Z.attempt(this.parser.constructs.flow,X,Z.attempt(LF,X)),"linePrefix")));return $;function Q(Y){if(Y===null){Z.consume(Y);return}return Z.enter("lineEndingBlank"),Z.consume(Y),Z.exit("lineEndingBlank"),J.currentConstruct=void 0,$}function X(Y){if(Y===null){Z.consume(Y);return}return Z.enter("lineEnding"),Z.consume(Y),Z.exit("lineEnding"),J.currentConstruct=void 0,$}}var vR;var gR=U(()=>{DH();Z5();vR={tokenize:t10}});function uR(Z){return{resolveAll:cR(Z==="text"?e10:void 0),tokenize:J};function J($){let Q=this,X=this.parser.constructs[Z],Y=$.attempt(X,w,z);return w;function w(W){return G(W)?Y(W):z(W)}function z(W){if(W===null){$.consume(W);return}return $.enter("data"),$.consume(W),H}function H(W){if(G(W))return $.exit("data"),Y(W);return $.consume(W),H}function G(W){if(W===null)return!0;let q=X[W],K=-1;if(q)while(++K<q.length){let B=q[K];if(!B.previous||B.previous.call(Q,Q.previous))return!0}return!1}}}function cR(Z){return J;function J($,Q){let X=-1,Y;while(++X<=$.length)if(Y===void 0){if($[X]&&$[X][1].type==="data")Y=X,X++}else if(!$[X]||$[X][1].type!=="data"){if(X!==Y+2)$[Y][1].end=$[X-1][1].end,$.splice(Y+2,X-Y-2),X=Y+2;Y=void 0}return Z?Z($,Q):$}}function e10(Z,J){let $=0;while(++$<=Z.length)if(($===Z.length||Z[$][1].type==="lineEnding")&&Z[$-1][1].type==="data"){let Q=Z[$-1][1],X=J.sliceStream(Q),Y=X.length,w=-1,z=0,H;while(Y--){let G=X[Y];if(typeof G==="string"){w=G.length;while(G.charCodeAt(w-1)===32)z++,w--;if(w)break;w=-1}else if(G===-2)H=!0,z++;else if(G===-1);else{Y++;break}}if(J._contentTypeTextTrailing&&$===Z.length)z=0;if(z){let G={type:$===Z.length||H||z<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:Y?w:Q.start._bufferIndex+w,_index:Q.start._index+Y,line:Q.end.line,column:Q.end.column-z,offset:Q.end.offset-z},end:{...Q.end}};if(Q.end={...G.start},Q.start.offset===Q.end.offset)Object.assign(Q,G);else Z.splice($,0,["enter",G,J],["exit",G,J]),$+=2}$++}return Z}var fR,mR,pR;var hF=U(()=>{fR={resolveAll:cR()},mR=uR("string"),pR=uR("text")});var RF={};N9(RF,{text:()=>w50,string:()=>X50,insideSpan:()=>Y50,flowInitial:()=>$50,flow:()=>Q50,document:()=>Z50,disable:()=>H50,contentInitial:()=>J50,attentionMarkers:()=>z50});var Z50,J50,$50,Q50,X50,w50,Y50,z50,H50;var dR=U(()=>{DH();hF();Z50={[42]:c5,[43]:c5,[45]:c5,[48]:c5,[49]:c5,[50]:c5,[51]:c5,[52]:c5,[53]:c5,[54]:c5,[55]:c5,[56]:c5,[57]:c5,[62]:qH},J50={[91]:jF},$50={[-2]:E$,[-1]:E$,[32]:E$},Q50={[35]:PF,[42]:w9,[45]:[AH,w9],[60]:TF,[61]:AH,[95]:w9,[96]:UH,[126]:UH},X50={[38]:BH,[92]:KH},w50={[-5]:R$,[-4]:R$,[-3]:R$,[33]:CF,[38]:BH,[42]:S$,[60]:[VF,kF],[91]:SF,[92]:[bF,KH],[93]:X9,[95]:S$,[96]:FF},Y50={null:[S$,fR]},z50={null:[42,95]},H50={null:[]}});function lR(Z,J,$){let Q={_bufferIndex:-1,_index:0,line:$&&$.line||1,column:$&&$.column||1,offset:$&&$.offset||0},X={},Y=[],w=[],z=[],H=!0,G={attempt:h(k),check:h(b),consume:A,enter:O,exit:D,interrupt:h(b,{interrupt:!0})},W={code:null,containerState:{},defineSkip:N,events:[],now:_,parser:Z,previous:null,sliceSerialize:V,sliceStream:F,write:B},q=J.tokenize.call(W,G),K;if(J.resolveAll)Y.push(J);return W;function B(C){if(w=$2(w,C),L(),w[w.length-1]!==null)return[];return I(J,0),W.events=x8(Y,W.events,W),W.events}function V(C,y){return W50(F(C),y)}function F(C){return G50(w,C)}function _(){let{_bufferIndex:C,_index:y,line:g,column:S,offset:x}=Q;return{_bufferIndex:C,_index:y,line:g,column:S,offset:x}}function N(C){X[C.line]=C.column,v()}function L(){let C;while(Q._index<w.length){let y=w[Q._index];if(typeof y==="string"){if(C=Q._index,Q._bufferIndex<0)Q._bufferIndex=0;while(Q._index===C&&Q._bufferIndex<y.length)M(y.charCodeAt(Q._bufferIndex))}else M(y)}}function M(C){H=void 0,K=C,q=q(C)}function A(C){if(A0(C))Q.line++,Q.column=1,Q.offset+=C===-3?2:1,v();else if(C!==-1)Q.column++,Q.offset++;if(Q._bufferIndex<0)Q._index++;else if(Q._bufferIndex++,Q._bufferIndex===w[Q._index].length)Q._bufferIndex=-1,Q._index++;W.previous=C,H=!0}function O(C,y){let g=y||{};return g.type=C,g.start=_(),W.events.push(["enter",g,W]),z.push(g),g}function D(C){let y=z.pop();return y.end=_(),W.events.push(["exit",y,W]),y}function k(C,y){I(C,y.from)}function b(C,y){y.restore()}function h(C,y){return g;function g(S,x,E){let m,j,H0,w0;return Array.isArray(S)?$0(S):("tokenize"in S)?$0([S]):T(S);function T(q0){return s;function s(X0){let z0=X0!==null&&q0[X0],p=X0!==null&&q0.null,o=[...Array.isArray(z0)?z0:z0?[z0]:[],...Array.isArray(p)?p:p?[p]:[]];return $0(o)(X0)}}function $0(q0){if(m=q0,j=0,q0.length===0)return E;return V0(q0[j])}function V0(q0){return s;function s(X0){if(w0=d(),H0=q0,!q0.partial)W.currentConstruct=q0;if(q0.name&&W.parser.constructs.disable.null.includes(q0.name))return Z0(X0);return q0.tokenize.call(y?Object.assign(Object.create(W),y):W,G,l,Z0)(X0)}}function l(q0){return H=!0,C(H0,w0),x}function Z0(q0){if(H=!0,w0.restore(),++j<m.length)return V0(m[j]);return E}}}function I(C,y){if(C.resolveAll&&!Y.includes(C))Y.push(C);if(C.resolve)e1(W.events,y,W.events.length-y,C.resolve(W.events.slice(y),W));if(C.resolveTo)W.events=C.resolveTo(W.events,W)}function d(){let C=_(),y=W.previous,g=W.currentConstruct,S=W.events.length,x=Array.from(z);return{from:S,restore:E};function E(){Q=C,W.previous=y,W.currentConstruct=g,W.events.length=S,z=x,v()}}function v(){if(Q.line in X&&Q.column<2)Q.column=X[Q.line],Q.offset+=X[Q.line]-1}}function G50(Z,J){let $=J.start._index,Q=J.start._bufferIndex,X=J.end._index,Y=J.end._bufferIndex,w;if($===X)w=[Z[$].slice(Q,Y)];else{if(w=Z.slice($,X),Q>-1){let z=w[0];if(typeof z==="string")w[0]=z.slice(Q);else w.shift()}if(Y>0)w.push(Z[X].slice(0,Y))}return w}function W50(Z,J){let $=-1,Q=[],X;while(++$<Z.length){let Y=Z[$],w;if(typeof Y==="string")w=Y;else switch(Y){case-5:{w="\r";break}case-4:{w=`
|
|
28
|
+
`;break}case-3:{w=`\r
|
|
29
|
+
`;break}case-2:{w=J?" ":"\t";break}case-1:{if(!J&&X)continue;w=" ";break}default:w=String.fromCharCode(Y)}X=Y===-2,Q.push(w)}return Q.join("")}var rR=U(()=>{z1()});function xF(Z){let Q={constructs:zH([RF,...(Z||{}).extensions||[]]),content:X(GR),defined:[],document:X(KR),flow:X(vR),lazy:{},string:X(mR),text:X(pR)};return Q;function X(Y){return w;function w(z){return lR(Q,Y,z)}}}var iR=U(()=>{UF();WR();BR();gR();hF();dR();rR()});function yF(Z){while(!VH(Z));return Z}var aR=U(()=>{_F()});function vF(){let Z=1,J="",$=!0,Q;return X;function X(Y,w,z){let H=[],G,W,q,K,B;if(Y=J+(typeof Y==="string"?Y.toString():new TextDecoder(w||void 0).decode(Y)),q=0,J="",$){if(Y.charCodeAt(0)===65279)q++;$=void 0}while(q<Y.length){if(sR.lastIndex=q,G=sR.exec(Y),K=G&&G.index!==void 0?G.index:Y.length,B=Y.charCodeAt(K),!G){J=Y.slice(q);break}if(B===10&&q===K&&Q)H.push(-3),Q=void 0;else{if(Q)H.push(-5),Q=void 0;if(q<K)H.push(Y.slice(q,K)),Z+=K-q;switch(B){case 0:{H.push(65533),Z++;break}case 9:{W=Math.ceil(Z/4)*4,H.push(-2);while(Z++<W)H.push(-1);break}case 10:{H.push(-4),Z=1;break}default:Q=!0,Z=1}}q=K+1}if(z){if(Q)H.push(-5);if(J)H.push(J);H.push(null)}return H}}var sR;var oR=U(()=>{sR=/[\0\t\n\r]/g});var nR=U(()=>{iR();aR();oR()});function tR(Z){return Z.replace(q50,K50)}function K50(Z,J,$){if(J)return J;if($.charCodeAt(0)===35){let X=$.charCodeAt(1),Y=X===120||X===88;return HH($.slice(Y?2:1),Y?16:10)}return x3($)||Z}var q50;var eR=U(()=>{YH();q50=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function gF(Z,J,$){if(J&&typeof J==="object")$=J,J=void 0;return B50($)(yF(xF($).document().write(vF()(Z,J,!0))))}function B50(Z){let J={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:Y(n),autolinkProtocol:h,autolinkEmail:h,atxHeading:Y(N0),blockQuote:Y(X0),characterEscape:h,characterReference:h,codeFenced:Y(z0),codeFencedFenceInfo:w,codeFencedFenceMeta:w,codeIndented:Y(z0,w),codeText:Y(p,w),codeTextData:h,data:h,codeFlowValue:h,definition:Y(o),definitionDestinationString:w,definitionLabelString:w,definitionTitleString:w,emphasis:Y(t),hardBreakEscape:Y(a),hardBreakTrailing:Y(a),htmlFlow:Y(J0,w),htmlFlowData:h,htmlText:Y(J0,w),htmlTextData:h,image:Y(r),label:w,link:Y(n),listItem:Y(i),listItemValue:K,listOrdered:Y(Q0,q),listUnordered:Y(Q0),paragraph:Y(L0),reference:T,referenceString:w,resourceDestinationString:w,resourceTitleString:w,setextHeading:Y(N0),strong:Y(I0),thematicBreak:Y(W1)},exit:{atxHeading:H(),atxHeadingSequence:O,autolink:H(),autolinkEmail:s,autolinkProtocol:q0,blockQuote:H(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:V0,characterReferenceMarkerNumeric:V0,characterReferenceValue:l,characterReference:Z0,codeFenced:H(_),codeFencedFence:F,codeFencedFenceInfo:B,codeFencedFenceMeta:V,codeFlowValue:I,codeIndented:H(N),codeText:H(g),codeTextData:I,data:I,definition:H(),definitionDestinationString:A,definitionLabelString:L,definitionTitleString:M,emphasis:H(),hardBreakEscape:H(v),hardBreakTrailing:H(v),htmlFlow:H(C),htmlFlowData:I,htmlText:H(y),htmlTextData:I,image:H(x),label:m,labelText:E,lineEnding:d,link:H(S),listItem:H(),listOrdered:H(),listUnordered:H(),paragraph:H(),referenceString:$0,resourceDestinationString:j,resourceTitleString:H0,resource:w0,setextHeading:H(b),setextHeadingLineSequence:k,setextHeadingText:D,strong:H(),thematicBreak:H()}};$x(J,(Z||{}).mdastExtensions||[]);let $={};return Q;function Q(R){let u={type:"root",children:[]},e={stack:[u],tokenStack:[],config:J,enter:z,exit:G,buffer:w,resume:W,data:$},B0=[],M0=-1;while(++M0<R.length)if(R[M0][1].type==="listOrdered"||R[M0][1].type==="listUnordered")if(R[M0][0]==="enter")B0.push(M0);else{let i0=B0.pop();M0=X(R,i0,M0)}M0=-1;while(++M0<R.length){let i0=J[R[M0][0]];if(Jx.call(i0,R[M0][1].type))i0[R[M0][1].type].call(Object.assign({sliceSerialize:R[M0][2].sliceSerialize},e),R[M0][1])}if(e.tokenStack.length>0){let i0=e.tokenStack[e.tokenStack.length-1];(i0[1]||Zx).call(e,void 0,i0[0])}u.position={start:y8(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:y8(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},M0=-1;while(++M0<J.transforms.length)u=J.transforms[M0](u)||u;return u}function X(R,u,e){let B0=u-1,M0=-1,i0=!1,T1,f1,x0,s0;while(++B0<=e){let J1=R[B0];switch(J1[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(J1[0]==="enter")M0++;else M0--;s0=void 0;break}case"lineEndingBlank":{if(J1[0]==="enter"){if(T1&&!s0&&!M0&&!x0)x0=B0;s0=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s0=void 0}if(!M0&&J1[0]==="enter"&&J1[1].type==="listItemPrefix"||M0===-1&&J1[0]==="exit"&&(J1[1].type==="listUnordered"||J1[1].type==="listOrdered")){if(T1){let y0=B0;f1=void 0;while(y0--){let G1=R[y0];if(G1[1].type==="lineEnding"||G1[1].type==="lineEndingBlank"){if(G1[0]==="exit")continue;if(f1)R[f1][1].type="lineEndingBlank",i0=!0;G1[1].type="lineEnding",f1=y0}else if(G1[1].type==="linePrefix"||G1[1].type==="blockQuotePrefix"||G1[1].type==="blockQuotePrefixWhitespace"||G1[1].type==="blockQuoteMarker"||G1[1].type==="listItemIndent");else break}if(x0&&(!f1||x0<f1))T1._spread=!0;T1.end=Object.assign({},f1?R[f1][1].start:J1[1].end),R.splice(f1||B0,0,["exit",T1,J1[2]]),B0++,e++}if(J1[1].type==="listItemPrefix"){let y0={type:"listItem",_spread:!1,start:Object.assign({},J1[1].start),end:void 0};T1=y0,R.splice(B0,0,["enter",y0,J1[2]]),B0++,e++,x0=void 0,s0=!0}}}return R[u][1]._spread=i0,e}function Y(R,u){return e;function e(B0){if(z.call(this,R(B0),B0),u)u.call(this,B0)}}function w(){this.stack.push({type:"fragment",children:[]})}function z(R,u,e){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([u,e||void 0]),R.position={start:y8(u.start),end:void 0}}function H(R){return u;function u(e){if(R)R.call(this,e);G.call(this,e)}}function G(R,u){let e=this.stack.pop(),B0=this.tokenStack.pop();if(!B0)throw Error("Cannot close `"+R.type+"` ("+h8({start:R.start,end:R.end})+"): it’s not open");else if(B0[0].type!==R.type)if(u)u.call(this,R,B0[0]);else(B0[1]||Zx).call(this,R,B0[0]);e.position.end=y8(R.end)}function W(){return e7(this.stack.pop())}function q(){this.data.expectingFirstListItemValue=!0}function K(R){if(this.data.expectingFirstListItemValue){let u=this.stack[this.stack.length-2];u.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function B(){let R=this.resume(),u=this.stack[this.stack.length-1];u.lang=R}function V(){let R=this.resume(),u=this.stack[this.stack.length-1];u.meta=R}function F(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function _(){let R=this.resume(),u=this.stack[this.stack.length-1];u.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){let R=this.resume(),u=this.stack[this.stack.length-1];u.value=R.replace(/(\r?\n|\r)$/g,"")}function L(R){let u=this.resume(),e=this.stack[this.stack.length-1];e.label=u,e.identifier=u5(this.sliceSerialize(R)).toLowerCase()}function M(){let R=this.resume(),u=this.stack[this.stack.length-1];u.title=R}function A(){let R=this.resume(),u=this.stack[this.stack.length-1];u.url=R}function O(R){let u=this.stack[this.stack.length-1];if(!u.depth){let e=this.sliceSerialize(R).length;u.depth=e}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function k(R){let u=this.stack[this.stack.length-1];u.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function b(){this.data.setextHeadingSlurpLineEnding=void 0}function h(R){let e=this.stack[this.stack.length-1].children,B0=e[e.length-1];if(!B0||B0.type!=="text")B0=n0(),B0.position={start:y8(R.start),end:void 0},e.push(B0);this.stack.push(B0)}function I(R){let u=this.stack.pop();u.value+=this.sliceSerialize(R),u.position.end=y8(R.end)}function d(R){let u=this.stack[this.stack.length-1];if(this.data.atHardBreak){let e=u.children[u.children.length-1];e.position.end=y8(R.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&J.canContainEols.includes(u.type))h.call(this,R),I.call(this,R)}function v(){this.data.atHardBreak=!0}function C(){let R=this.resume(),u=this.stack[this.stack.length-1];u.value=R}function y(){let R=this.resume(),u=this.stack[this.stack.length-1];u.value=R}function g(){let R=this.resume(),u=this.stack[this.stack.length-1];u.value=R}function S(){let R=this.stack[this.stack.length-1];if(this.data.inReference){let u=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=u,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function x(){let R=this.stack[this.stack.length-1];if(this.data.inReference){let u=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=u,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function E(R){let u=this.sliceSerialize(R),e=this.stack[this.stack.length-2];e.label=tR(u),e.identifier=u5(u).toLowerCase()}function m(){let R=this.stack[this.stack.length-1],u=this.resume(),e=this.stack[this.stack.length-1];if(this.data.inReference=!0,e.type==="link"){let B0=R.children;e.children=B0}else e.alt=u}function j(){let R=this.resume(),u=this.stack[this.stack.length-1];u.url=R}function H0(){let R=this.resume(),u=this.stack[this.stack.length-1];u.title=R}function w0(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function $0(R){let u=this.resume(),e=this.stack[this.stack.length-1];e.label=u,e.identifier=u5(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function V0(R){this.data.characterReferenceType=R.type}function l(R){let u=this.sliceSerialize(R),e=this.data.characterReferenceType,B0;if(e)B0=HH(u,e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else B0=x3(u);let M0=this.stack[this.stack.length-1];M0.value+=B0}function Z0(R){let u=this.stack.pop();u.position.end=y8(R.end)}function q0(R){I.call(this,R);let u=this.stack[this.stack.length-1];u.url=this.sliceSerialize(R)}function s(R){I.call(this,R);let u=this.stack[this.stack.length-1];u.url="mailto:"+this.sliceSerialize(R)}function X0(){return{type:"blockquote",children:[]}}function z0(){return{type:"code",lang:null,meta:null,value:""}}function p(){return{type:"inlineCode",value:""}}function o(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function t(){return{type:"emphasis",children:[]}}function N0(){return{type:"heading",depth:0,children:[]}}function a(){return{type:"break"}}function J0(){return{type:"html",value:""}}function r(){return{type:"image",title:null,url:"",alt:null}}function n(){return{type:"link",title:null,url:"",children:[]}}function Q0(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function i(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function L0(){return{type:"paragraph",children:[]}}function I0(){return{type:"strong",children:[]}}function n0(){return{type:"text",value:""}}function W1(){return{type:"thematicBreak"}}}function y8(Z){return{line:Z.line,column:Z.column,offset:Z.offset}}function $x(Z,J){let $=-1;while(++$<J.length){let Q=J[$];if(Array.isArray(Q))$x(Z,Q);else U50(Z,Q)}}function U50(Z,J){let $;for($ in J)if(Jx.call(J,$))switch($){case"canContainEols":{let Q=J[$];if(Q)Z[$].push(...Q);break}case"transforms":{let Q=J[$];if(Q)Z[$].push(...Q);break}case"enter":case"exit":{let Q=J[$];if(Q)Object.assign(Z[$],Q);break}}}function Zx(Z,J){if(Z)throw Error("Cannot close `"+Z.type+"` ("+h8({start:Z.start,end:Z.end})+"): a different token (`"+J.type+"`, "+h8({start:J.start,end:J.end})+") is open");else throw Error("Cannot close document, a token (`"+J.type+"`, "+h8({start:J.start,end:J.end})+") is still open")}var Jx;var Qx=U(()=>{wH();nR();eR();YH();HF();Jx={}.hasOwnProperty});var Xx=U(()=>{Qx()});function MH(Z){let J=this;J.parser=$;function $(Q){return gF(Q,{...J.data("settings"),...Z,extensions:J.data("micromarkExtensions")||[],mdastExtensions:J.data("fromMarkdownExtensions")||[]})}}var wx=U(()=>{Xx()});var Yx=U(()=>{wx()});var OH=-1,y3=0,Y9=1,v3=2,x$=3,y$=4,v$=5,g$=6,jH=7,bH=8;var zx,V50=(Z,J)=>{let $=(X,Y)=>{return Z.set(Y,X),X},Q=(X)=>{if(Z.has(X))return Z.get(X);let[Y,w]=J[X];switch(Y){case y3:case OH:return $(w,X);case Y9:{let z=$([],X);for(let H of w)z.push(Q(H));return z}case v3:{let z=$({},X);for(let[H,G]of w)z[Q(H)]=Q(G);return z}case x$:return $(new Date(w),X);case y$:{let{source:z,flags:H}=w;return $(new RegExp(z,H),X)}case v$:{let z=$(new Map,X);for(let[H,G]of w)z.set(Q(H),Q(G));return z}case g$:{let z=$(new Set,X);for(let H of w)z.add(Q(H));return z}case jH:{let{name:z,message:H}=w;return $(new zx[z](H),X)}case bH:return $(BigInt(w),X);case"BigInt":return $(Object(BigInt(w)),X);case"ArrayBuffer":return $(new Uint8Array(w).buffer,w);case"DataView":{let{buffer:z}=new Uint8Array(w);return $(new DataView(z),w)}}return $(new zx[Y](w),X)};return Q},fF=(Z)=>V50(new Map,Z)(0);var Hx=U(()=>{zx=typeof self==="object"?self:globalThis});var g3="",F50,N50,f$=(Z)=>{let J=typeof Z;if(J!=="object"||!Z)return[y3,J];let $=F50.call(Z).slice(8,-1);switch($){case"Array":return[Y9,g3];case"Object":return[v3,g3];case"Date":return[x$,g3];case"RegExp":return[y$,g3];case"Map":return[v$,g3];case"Set":return[g$,g3];case"DataView":return[Y9,$]}if($.includes("Array"))return[Y9,$];if($.includes("Error"))return[jH,$];return[v3,$]},PH=([Z,J])=>Z===y3&&(J==="function"||J==="symbol"),_50=(Z,J,$,Q)=>{let X=(w,z)=>{let H=Q.push(w)-1;return $.set(z,H),H},Y=(w)=>{if($.has(w))return $.get(w);let[z,H]=f$(w);switch(z){case y3:{let W=w;switch(H){case"bigint":z=bH,W=w.toString();break;case"function":case"symbol":if(Z)throw TypeError("unable to serialize "+H);W=null;break;case"undefined":return X([OH],w)}return X([z,W],w)}case Y9:{if(H){let K=w;if(H==="DataView")K=new Uint8Array(w.buffer);else if(H==="ArrayBuffer")K=new Uint8Array(w);return X([H,[...K]],w)}let W=[],q=X([z,W],w);for(let K of w)W.push(Y(K));return q}case v3:{if(H)switch(H){case"BigInt":return X([H,w.toString()],w);case"Boolean":case"Number":case"String":return X([H,w.valueOf()],w)}if(J&&"toJSON"in w)return Y(w.toJSON());let W=[],q=X([z,W],w);for(let K of N50(w))if(Z||!PH(f$(w[K])))W.push([Y(K),Y(w[K])]);return q}case x$:return X([z,w.toISOString()],w);case y$:{let{source:W,flags:q}=w;return X([z,{source:W,flags:q}],w)}case v$:{let W=[],q=X([z,W],w);for(let[K,B]of w)if(Z||!(PH(f$(K))||PH(f$(B))))W.push([Y(K),Y(B)]);return q}case g$:{let W=[],q=X([z,W],w);for(let K of w)if(Z||!PH(f$(K)))W.push(Y(K));return q}}let{message:G}=w;return X([z,{name:H,message:G}],w)};return Y},mF=(Z,{json:J,lossy:$}={})=>{let Q=[];return _50(!(J||$),!!J,new Map,Q)(Z),Q};var Gx=U(()=>{({toString:F50}={}),{keys:N50}=Object});var f3;var pF=U(()=>{Hx();Gx();f3=typeof structuredClone==="function"?(Z,J)=>J&&(("json"in J)||("lossy"in J))?fF(mF(Z,J)):structuredClone(Z):(Z,J)=>fF(mF(Z,J))});function L50(Z,J){let $=[{type:"text",value:"↩"}];if(J>1)$.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(J)}]});return $}function A50(Z,J){return"Back to reference "+(Z+1)+(J>1?"-"+J:"")}function Wx(Z){let J=typeof Z.options.clobberPrefix==="string"?Z.options.clobberPrefix:"user-content-",$=Z.options.footnoteBackContent||L50,Q=Z.options.footnoteBackLabel||A50,X=Z.options.footnoteLabel||"Footnotes",Y=Z.options.footnoteLabelTagName||"h2",w=Z.options.footnoteLabelProperties||{className:["sr-only"]},z=[],H=-1;while(++H<Z.footnoteOrder.length){let G=Z.footnoteById.get(Z.footnoteOrder[H]);if(!G)continue;let W=Z.all(G),q=String(G.identifier).toUpperCase(),K=l2(q.toLowerCase()),B=0,V=[],F=Z.footnoteCounts.get(q);while(F!==void 0&&++B<=F){if(V.length>0)V.push({type:"text",value:" "});let L=typeof $==="string"?$:$(H,B);if(typeof L==="string")L={type:"text",value:L};V.push({type:"element",tagName:"a",properties:{href:"#"+J+"fnref-"+K+(B>1?"-"+B:""),dataFootnoteBackref:"",ariaLabel:typeof Q==="string"?Q:Q(H,B),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}let _=W[W.length-1];if(_&&_.type==="element"&&_.tagName==="p"){let L=_.children[_.children.length-1];if(L&&L.type==="text")L.value+=" ";else _.children.push({type:"text",value:" "});_.children.push(...V)}else W.push(...V);let N={type:"element",tagName:"li",properties:{id:J+"fn-"+K},children:Z.wrap(W,!0)};Z.patch(G,N),z.push(N)}if(z.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:Y,properties:{...f3(w),id:"footnote-label"},children:[{type:"text",value:X}]},{type:"text",value:`
|
|
30
|
+
`},{type:"element",tagName:"ol",properties:{},children:Z.wrap(z,!0)},{type:"text",value:`
|
|
31
|
+
`}]}}var qx=U(()=>{pF();$9()});function D50(Z){let J=[],$=-1;while(++$<Z.length)J[$]=Q6(Z[$]);return IH(Q);function Q(...X){let Y=-1;while(++Y<J.length)if(J[Y].apply(this,X))return!0;return!1}}function M50(Z){let J=Z;return IH($);function $(Q){let X=Q,Y;for(Y in Z)if(X[Y]!==J[Y])return!1;return!0}}function O50(Z){return IH(J);function J($){return $&&$.type===Z}}function IH(Z){return J;function J($,Q,X){return Boolean(b50($)&&Z.call(this,$,typeof Q==="number"?Q:void 0,X||void 0))}}function j50(){return!0}function b50(Z){return Z!==null&&typeof Z==="object"&&"type"in Z}var Q6=function(Z){if(Z===null||Z===void 0)return j50;if(typeof Z==="function")return IH(Z);if(typeof Z==="object")return Array.isArray(Z)?D50(Z):M50(Z);if(typeof Z==="string")return O50(Z);throw Error("Expected function, string, or object as test")};var m$=()=>{};function Kx(Z){return Z}function p$(Z,J,$,Q){let X;if(typeof J==="function"&&typeof $!=="function")Q=$,$=J;else X=J;let Y=Q6(X),w=Q?-1:1;z(Z,void 0,[])();function z(H,G,W){let q=H&&typeof H==="object"?H:{};if(typeof q.type==="string"){let B=typeof q.tagName==="string"?q.tagName:typeof q.name==="string"?q.name:void 0;Object.defineProperty(K,"name",{value:"node ("+Kx(H.type+(B?"<"+B+">":""))+")"})}return K;function K(){let B=Bx,V,F,_;if(!J||Y(H,G,W[W.length-1]||void 0)){if(B=P50($(H,W)),B[0]===z9)return B}if("children"in H&&H.children){let N=H;if(N.children&&B[0]!==kH){F=(Q?N.children.length:-1)+w,_=W.concat(N);while(F>-1&&F<N.children.length){let L=N.children[F];if(V=z(L,F,_)(),V[0]===z9)return V;F=typeof V[1]==="number"?V[1]:F+w}}}return B}}}function P50(Z){if(Array.isArray(Z))return Z;if(typeof Z==="number")return[TH,Z];return Z===null||Z===void 0?Bx:[Z]}var Bx,TH=!0,z9=!1,kH="skip";var Ux=U(()=>{m$();Bx=[]});var CH=U(()=>{Ux()});function C6(Z,J,$,Q){let X,Y,w;if(typeof J==="function"&&typeof $!=="function")Y=void 0,w=J,X=$;else Y=J,w=$,X=Q;p$(Z,Y,z,X);function z(H,G){let W=G[G.length-1],q=W?W.children.indexOf(H):void 0;return w(H,q,W)}}var Vx=U(()=>{CH();CH()});var u$=U(()=>{Vx()});function Fx(Z,J){let $={type:"element",tagName:"blockquote",properties:{},children:Z.wrap(Z.all(J),!0)};return Z.patch(J,$),Z.applyData(J,$)}function Nx(Z,J){let $={type:"element",tagName:"br",properties:{},children:[]};return Z.patch(J,$),[Z.applyData(J,$),{type:"text",value:`
|
|
32
|
+
`}]}function _x(Z,J){let $=J.value?J.value+`
|
|
33
|
+
`:"",Q={},X=J.lang?J.lang.split(/\s+/):[];if(X.length>0)Q.className=["language-"+X[0]];let Y={type:"element",tagName:"code",properties:Q,children:[{type:"text",value:$}]};if(J.meta)Y.data={meta:J.meta};return Z.patch(J,Y),Y=Z.applyData(J,Y),Y={type:"element",tagName:"pre",properties:{},children:[Y]},Z.patch(J,Y),Y}function Lx(Z,J){let $={type:"element",tagName:"del",properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function Ax(Z,J){let $={type:"element",tagName:"em",properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function Dx(Z,J){let $=typeof Z.options.clobberPrefix==="string"?Z.options.clobberPrefix:"user-content-",Q=String(J.identifier).toUpperCase(),X=l2(Q.toLowerCase()),Y=Z.footnoteOrder.indexOf(Q),w,z=Z.footnoteCounts.get(Q);if(z===void 0)z=0,Z.footnoteOrder.push(Q),w=Z.footnoteOrder.length;else w=Y+1;z+=1,Z.footnoteCounts.set(Q,z);let H={type:"element",tagName:"a",properties:{href:"#"+$+"fn-"+X,id:$+"fnref-"+X+(z>1?"-"+z:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(w)}]};Z.patch(J,H);let G={type:"element",tagName:"sup",properties:{},children:[H]};return Z.patch(J,G),Z.applyData(J,G)}var Mx=U(()=>{$9()});function Ox(Z,J){let $={type:"element",tagName:"h"+J.depth,properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function jx(Z,J){if(Z.options.allowDangerousHtml){let $={type:"raw",value:J.value};return Z.patch(J,$),Z.applyData(J,$)}return}function SH(Z,J){let $=J.referenceType,Q="]";if($==="collapsed")Q+="[]";else if($==="full")Q+="["+(J.label||J.identifier)+"]";if(J.type==="imageReference")return[{type:"text",value:"!["+J.alt+Q}];let X=Z.all(J),Y=X[0];if(Y&&Y.type==="text")Y.value="["+Y.value;else X.unshift({type:"text",value:"["});let w=X[X.length-1];if(w&&w.type==="text")w.value+=Q;else X.push({type:"text",value:Q});return X}function bx(Z,J){let $=String(J.identifier).toUpperCase(),Q=Z.definitionById.get($);if(!Q)return SH(Z,J);let X={src:l2(Q.url||""),alt:J.alt};if(Q.title!==null&&Q.title!==void 0)X.title=Q.title;let Y={type:"element",tagName:"img",properties:X,children:[]};return Z.patch(J,Y),Z.applyData(J,Y)}var Px=U(()=>{$9()});function Ix(Z,J){let $={src:l2(J.url)};if(J.alt!==null&&J.alt!==void 0)$.alt=J.alt;if(J.title!==null&&J.title!==void 0)$.title=J.title;let Q={type:"element",tagName:"img",properties:$,children:[]};return Z.patch(J,Q),Z.applyData(J,Q)}var Tx=U(()=>{$9()});function kx(Z,J){let $={type:"text",value:J.value.replace(/\r?\n|\r/g," ")};Z.patch(J,$);let Q={type:"element",tagName:"code",properties:{},children:[$]};return Z.patch(J,Q),Z.applyData(J,Q)}function Cx(Z,J){let $=String(J.identifier).toUpperCase(),Q=Z.definitionById.get($);if(!Q)return SH(Z,J);let X={href:l2(Q.url||"")};if(Q.title!==null&&Q.title!==void 0)X.title=Q.title;let Y={type:"element",tagName:"a",properties:X,children:Z.all(J)};return Z.patch(J,Y),Z.applyData(J,Y)}var Sx=U(()=>{$9()});function Ex(Z,J){let $={href:l2(J.url)};if(J.title!==null&&J.title!==void 0)$.title=J.title;let Q={type:"element",tagName:"a",properties:$,children:Z.all(J)};return Z.patch(J,Q),Z.applyData(J,Q)}var hx=U(()=>{$9()});function Rx(Z,J,$){let Q=Z.all(J),X=$?I50($):xx(J),Y={},w=[];if(typeof J.checked==="boolean"){let W=Q[0],q;if(W&&W.type==="element"&&W.tagName==="p")q=W;else q={type:"element",tagName:"p",properties:{},children:[]},Q.unshift(q);if(q.children.length>0)q.children.unshift({type:"text",value:" "});q.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:J.checked,disabled:!0},children:[]}),Y.className=["task-list-item"]}let z=-1;while(++z<Q.length){let W=Q[z];if(X||z!==0||W.type!=="element"||W.tagName!=="p")w.push({type:"text",value:`
|
|
34
|
+
`});if(W.type==="element"&&W.tagName==="p"&&!X)w.push(...W.children);else w.push(W)}let H=Q[Q.length-1];if(H&&(X||H.type!=="element"||H.tagName!=="p"))w.push({type:"text",value:`
|
|
35
|
+
`});let G={type:"element",tagName:"li",properties:Y,children:w};return Z.patch(J,G),Z.applyData(J,G)}function I50(Z){let J=!1;if(Z.type==="list"){J=Z.spread||!1;let $=Z.children,Q=-1;while(!J&&++Q<$.length)J=xx($[Q])}return J}function xx(Z){let J=Z.spread;return J===null||J===void 0?Z.children.length>1:J}function yx(Z,J){let $={},Q=Z.all(J),X=-1;if(typeof J.start==="number"&&J.start!==1)$.start=J.start;while(++X<Q.length){let w=Q[X];if(w.type==="element"&&w.tagName==="li"&&w.properties&&Array.isArray(w.properties.className)&&w.properties.className.includes("task-list-item")){$.className=["contains-task-list"];break}}let Y={type:"element",tagName:J.ordered?"ol":"ul",properties:$,children:Z.wrap(Q,!0)};return Z.patch(J,Y),Z.applyData(J,Y)}function vx(Z,J){let $={type:"element",tagName:"p",properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function gx(Z,J){let $={type:"root",children:Z.wrap(Z.all(J))};return Z.patch(J,$),Z.applyData(J,$)}function fx(Z,J){let $={type:"element",tagName:"strong",properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function mx(Z,J){let $=Z.all(J),Q=$.shift(),X=[];if(Q){let w={type:"element",tagName:"thead",properties:{},children:Z.wrap([Q],!0)};Z.patch(J.children[0],w),X.push(w)}if($.length>0){let w={type:"element",tagName:"tbody",properties:{},children:Z.wrap($,!0)},z=R3(J.children[1]),H=QH(J.children[J.children.length-1]);if(z&&H)w.position={start:z,end:H};X.push(w)}let Y={type:"element",tagName:"table",properties:{},children:Z.wrap(X,!0)};return Z.patch(J,Y),Z.applyData(J,Y)}var px=U(()=>{XH()});function ux(Z,J,$){let Q=$?$.children:void 0,Y=(Q?Q.indexOf(J):1)===0?"th":"td",w=$&&$.type==="table"?$.align:void 0,z=w?w.length:J.children.length,H=-1,G=[];while(++H<z){let q=J.children[H],K={},B=w?w[H]:void 0;if(B)K.align=B;let V={type:"element",tagName:Y,properties:K,children:[]};if(q)V.children=Z.all(q),Z.patch(q,V),V=Z.applyData(q,V);G.push(V)}let W={type:"element",tagName:"tr",properties:{},children:Z.wrap(G,!0)};return Z.patch(J,W),Z.applyData(J,W)}function cx(Z,J){let $={type:"element",tagName:"td",properties:{},children:Z.all(J)};return Z.patch(J,$),Z.applyData(J,$)}function lx(Z){let J=String(Z),$=/\r?\n|\r/g,Q=$.exec(J),X=0,Y=[];while(Q)Y.push(dx(J.slice(X,Q.index),X>0,!0),Q[0]),X=Q.index+Q[0].length,Q=$.exec(J);return Y.push(dx(J.slice(X),X>0,!1)),Y.join("")}function dx(Z,J,$){let Q=0,X=Z.length;if(J){let Y=Z.codePointAt(Q);while(Y===9||Y===32)Q++,Y=Z.codePointAt(Q)}if($){let Y=Z.codePointAt(X-1);while(Y===9||Y===32)X--,Y=Z.codePointAt(X-1)}return X>Q?Z.slice(Q,X):""}function rx(Z,J){let $={type:"text",value:lx(String(J.value))};return Z.patch(J,$),Z.applyData(J,$)}var ix=()=>{};function ax(Z,J){let $={type:"element",tagName:"hr",properties:{},children:[]};return Z.patch(J,$),Z.applyData(J,$)}function EH(){return}var sx;var ox=U(()=>{Mx();Px();Tx();Sx();hx();px();ix();sx={blockquote:Fx,break:Nx,code:_x,delete:Lx,emphasis:Ax,footnoteReference:Dx,heading:Ox,html:jx,imageReference:bx,image:Ix,inlineCode:kx,linkReference:Cx,link:Ex,listItem:Rx,list:yx,paragraph:vx,root:gx,strong:fx,table:mx,tableCell:cx,tableRow:ux,text:rx,thematicBreak:ax,toml:EH,yaml:EH,definition:EH,footnoteDefinition:EH}});function tx(Z,J){let $=J||T50,Q=new Map,X=new Map,Y=new Map,w={...sx,...$.handlers},z={all:G,applyData:C50,definitionById:Q,footnoteById:X,footnoteCounts:Y,footnoteOrder:[],handlers:w,one:H,options:$,patch:k50,wrap:E50};return C6(Z,function(W){if(W.type==="definition"||W.type==="footnoteDefinition"){let q=W.type==="definition"?Q:X,K=String(W.identifier).toUpperCase();if(!q.has(K))q.set(K,W)}}),z;function H(W,q){let K=W.type,B=z.handlers[K];if(uF.call(z.handlers,K)&&B)return B(z,W,q);if(z.options.passThrough&&z.options.passThrough.includes(K)){if("children"in W){let{children:F,..._}=W,N=f3(_);return N.children=z.all(W),N}return f3(W)}return(z.options.unknownHandler||S50)(z,W,q)}function G(W){let q=[];if("children"in W){let K=W.children,B=-1;while(++B<K.length){let V=z.one(K[B],W);if(V){if(B&&K[B-1].type==="break"){if(!Array.isArray(V)&&V.type==="text")V.value=nx(V.value);if(!Array.isArray(V)&&V.type==="element"){let F=V.children[0];if(F&&F.type==="text")F.value=nx(F.value)}}if(Array.isArray(V))q.push(...V);else q.push(V)}}}return q}}function k50(Z,J){if(Z.position)J.position=YF(Z)}function C50(Z,J){let $=J;if(Z&&Z.data){let Q=Z.data.hName,X=Z.data.hChildren,Y=Z.data.hProperties;if(typeof Q==="string")if($.type==="element")$.tagName=Q;else{let w="children"in $?$.children:[$];$={type:"element",tagName:Q,properties:{},children:w}}if($.type==="element"&&Y)Object.assign($.properties,f3(Y));if("children"in $&&$.children&&X!==null&&X!==void 0)$.children=X}return $}function S50(Z,J){let $=J.data||{},Q="value"in J&&!(uF.call($,"hProperties")||uF.call($,"hChildren"))?{type:"text",value:J.value}:{type:"element",tagName:"div",properties:{},children:Z.all(J)};return Z.patch(J,Q),Z.applyData(J,Q)}function E50(Z,J){let $=[],Q=-1;if(J)$.push({type:"text",value:`
|
|
36
|
+
`});while(++Q<Z.length){if(Q)$.push({type:"text",value:`
|
|
37
|
+
`});$.push(Z[Q])}if(J&&Z.length>0)$.push({type:"text",value:`
|
|
38
|
+
`});return $}function nx(Z){let J=0,$=Z.charCodeAt(J);while($===9||$===32)J++,$=Z.charCodeAt(J);return Z.slice(J)}var uF,T50;var ex=U(()=>{pF();u$();XH();ox();uF={}.hasOwnProperty,T50={}});function hH(Z,J){let $=tx(Z,J),Q=$.one(Z,void 0),X=Wx($),Y=Array.isArray(Q)?{type:"root",children:Q}:Q||{type:"root",children:[]};if(X)B1("children"in Y),Y.children.push({type:"text",value:`
|
|
39
|
+
`},X);return Y}var Zy=U(()=>{qx();ex()});var Jy=U(()=>{Zy()});function RH(Z,J){if(Z&&"run"in Z)return async function($,Q){let X=hH($,{file:Q,...J});await Z.run(X,Q)};return function($,Q){return hH($,{file:Q,...Z||J})}}var $y=U(()=>{Jy()});var Qy=U(()=>{$y()});function cF(Z){if(Z)throw Z}var Ky=F1((Hq4,qy)=>{var xH=Object.prototype.hasOwnProperty,Wy=Object.prototype.toString,Xy=Object.defineProperty,wy=Object.getOwnPropertyDescriptor,Yy=function(J){if(typeof Array.isArray==="function")return Array.isArray(J);return Wy.call(J)==="[object Array]"},zy=function(J){if(!J||Wy.call(J)!=="[object Object]")return!1;var $=xH.call(J,"constructor"),Q=J.constructor&&J.constructor.prototype&&xH.call(J.constructor.prototype,"isPrototypeOf");if(J.constructor&&!$&&!Q)return!1;var X;for(X in J);return typeof X>"u"||xH.call(J,X)},Hy=function(J,$){if(Xy&&$.name==="__proto__")Xy(J,$.name,{enumerable:!0,configurable:!0,value:$.newValue,writable:!0});else J[$.name]=$.newValue},Gy=function(J,$){if($==="__proto__"){if(!xH.call(J,$))return;else if(wy)return wy(J,$).value}return J[$]};qy.exports=function Z(){var J,$,Q,X,Y,w,z=arguments[0],H=1,G=arguments.length,W=!1;if(typeof z==="boolean")W=z,z=arguments[1]||{},H=2;if(z==null||typeof z!=="object"&&typeof z!=="function")z={};for(;H<G;++H)if(J=arguments[H],J!=null){for($ in J)if(Q=Gy(z,$),X=Gy(J,$),z!==X){if(W&&X&&(zy(X)||(Y=Yy(X)))){if(Y)Y=!1,w=Q&&Yy(Q)?Q:[];else w=Q&&zy(Q)?Q:{};Hy(z,{name:$,newValue:Z(W,w,X)})}else if(typeof X<"u")Hy(z,{name:$,newValue:X})}}return z}});function c$(Z){if(typeof Z!=="object"||Z===null)return!1;let J=Object.getPrototypeOf(Z);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}function dF(){let Z=[],J={run:$,use:Q};return J;function $(...X){let Y=-1,w=X.pop();if(typeof w!=="function")throw TypeError("Expected function as last argument, not "+w);z(null,...X);function z(H,...G){let W=Z[++Y],q=-1;if(H){w(H);return}while(++q<X.length)if(G[q]===null||G[q]===void 0)G[q]=X[q];if(X=G,W)By(W,z)(...G);else w(null,...G)}}function Q(X){if(typeof X!=="function")throw TypeError("Expected `middelware` to be a function, not "+X);return Z.push(X),J}}function By(Z,J){let $;return Q;function Q(...w){let z=Z.length>w.length,H;if(z)w.push(X);try{H=Z.apply(this,w)}catch(G){let W=G;if(z&&$)throw W;return X(W)}if(!z)if(H&&H.then&&typeof H.then==="function")H.then(Y,X);else if(H instanceof Error)X(H);else Y(H)}function X(w,...z){if(!$)$=!0,J(w,...z)}function Y(w){X(null,w)}}var Uy=()=>{};function h50(Z,J){if(J!==void 0&&typeof J!=="string")throw TypeError('"ext" argument must be a string');d$(Z);let $=0,Q=-1,X=Z.length,Y;if(J===void 0||J.length===0||J.length>Z.length){while(X--)if(Z.codePointAt(X)===47){if(Y){$=X+1;break}}else if(Q<0)Y=!0,Q=X+1;return Q<0?"":Z.slice($,Q)}if(J===Z)return"";let w=-1,z=J.length-1;while(X--)if(Z.codePointAt(X)===47){if(Y){$=X+1;break}}else{if(w<0)Y=!0,w=X+1;if(z>-1)if(Z.codePointAt(X)===J.codePointAt(z--)){if(z<0)Q=X}else z=-1,Q=w}if($===Q)Q=w;else if(Q<0)Q=Z.length;return Z.slice($,Q)}function R50(Z){if(d$(Z),Z.length===0)return".";let J=-1,$=Z.length,Q;while(--$)if(Z.codePointAt($)===47){if(Q){J=$;break}}else if(!Q)Q=!0;return J<0?Z.codePointAt(0)===47?"/":".":J===1&&Z.codePointAt(0)===47?"//":Z.slice(0,J)}function x50(Z){d$(Z);let J=Z.length,$=-1,Q=0,X=-1,Y=0,w;while(J--){let z=Z.codePointAt(J);if(z===47){if(w){Q=J+1;break}continue}if($<0)w=!0,$=J+1;if(z===46){if(X<0)X=J;else if(Y!==1)Y=1}else if(X>-1)Y=-1}if(X<0||$<0||Y===0||Y===1&&X===$-1&&X===Q+1)return"";return Z.slice(X,$)}function y50(...Z){let J=-1,$;while(++J<Z.length)if(d$(Z[J]),Z[J])$=$===void 0?Z[J]:$+"/"+Z[J];return $===void 0?".":v50($)}function v50(Z){d$(Z);let J=Z.codePointAt(0)===47,$=g50(Z,!J);if($.length===0&&!J)$=".";if($.length>0&&Z.codePointAt(Z.length-1)===47)$+="/";return J?"/"+$:$}function g50(Z,J){let $="",Q=0,X=-1,Y=0,w=-1,z,H;while(++w<=Z.length){if(w<Z.length)z=Z.codePointAt(w);else if(z===47)break;else z=47;if(z===47){if(X===w-1||Y===1);else if(X!==w-1&&Y===2){if($.length<2||Q!==2||$.codePointAt($.length-1)!==46||$.codePointAt($.length-2)!==46){if($.length>2){if(H=$.lastIndexOf("/"),H!==$.length-1){if(H<0)$="",Q=0;else $=$.slice(0,H),Q=$.length-1-$.lastIndexOf("/");X=w,Y=0;continue}}else if($.length>0){$="",Q=0,X=w,Y=0;continue}}if(J)$=$.length>0?$+"/..":"..",Q=2}else{if($.length>0)$+="/"+Z.slice(X+1,w);else $=Z.slice(X+1,w);Q=w-X-1}X=w,Y=0}else if(z===46&&Y>-1)Y++;else Y=-1}return $}function d$(Z){if(typeof Z!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(Z))}var F4;var Vy=U(()=>{F4={basename:h50,dirname:R50,extname:x50,join:y50,sep:"/"}});function f50(){return"/"}var Fy;var Ny=U(()=>{Fy={cwd:f50}});function m3(Z){return Boolean(Z!==null&&typeof Z==="object"&&"href"in Z&&Z.href&&"protocol"in Z&&Z.protocol&&Z.auth===void 0)}function _y(Z){if(typeof Z==="string")Z=new URL(Z);else if(!m3(Z)){let J=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+Z+"`");throw J.code="ERR_INVALID_ARG_TYPE",J}if(Z.protocol!=="file:"){let J=TypeError("The URL must be of scheme file");throw J.code="ERR_INVALID_URL_SCHEME",J}return m50(Z)}function m50(Z){if(Z.hostname!==""){let Q=TypeError('File URL host must be "localhost" or empty on darwin');throw Q.code="ERR_INVALID_FILE_URL_HOST",Q}let J=Z.pathname,$=-1;while(++$<J.length)if(J.codePointAt($)===37&&J.codePointAt($+1)===50){let Q=J.codePointAt($+2);if(Q===70||Q===102){let X=TypeError("File URL path must not include encoded / characters");throw X.code="ERR_INVALID_FILE_URL_PATH",X}}return decodeURIComponent(J)}var Ly=()=>{};class p3{constructor(Z){let J;if(!Z)J={};else if(m3(Z))J={path:Z};else if(typeof Z==="string"||p50(Z))J={value:Z};else J=Z;this.cwd="cwd"in J?"":Fy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let $=-1;while(++$<lF.length){let X=lF[$];if(X in J&&J[X]!==void 0&&J[X]!==null)this[X]=X==="history"?[...J[X]]:J[X]}let Q;for(Q in J)if(!lF.includes(Q))this[Q]=J[Q]}get basename(){return typeof this.path==="string"?F4.basename(this.path):void 0}set basename(Z){iF(Z,"basename"),rF(Z,"basename"),this.path=F4.join(this.dirname||"",Z)}get dirname(){return typeof this.path==="string"?F4.dirname(this.path):void 0}set dirname(Z){Ay(this.basename,"dirname"),this.path=F4.join(Z||"",this.basename)}get extname(){return typeof this.path==="string"?F4.extname(this.path):void 0}set extname(Z){if(rF(Z,"extname"),Ay(this.dirname,"extname"),Z){if(Z.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(Z.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=F4.join(this.dirname,this.stem+(Z||""))}get path(){return this.history[this.history.length-1]}set path(Z){if(m3(Z))Z=_y(Z);if(iF(Z,"path"),this.path!==Z)this.history.push(Z)}get stem(){return typeof this.path==="string"?F4.basename(this.path,this.extname):void 0}set stem(Z){iF(Z,"stem"),rF(Z,"stem"),this.path=F4.join(this.dirname||"",Z+(this.extname||""))}fail(Z,J,$){let Q=this.message(Z,J,$);throw Q.fatal=!0,Q}info(Z,J,$){let Q=this.message(Z,J,$);return Q.fatal=void 0,Q}message(Z,J,$){let Q=new q5(Z,J,$);if(this.path)Q.name=this.path+":"+Q.name,Q.file=this.path;return Q.fatal=!1,this.messages.push(Q),Q}toString(Z){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder(Z||void 0).decode(this.value)}}function rF(Z,J){if(Z&&Z.includes(F4.sep))throw Error("`"+J+"` cannot be a path: did not expect `"+F4.sep+"`")}function iF(Z,J){if(!Z)throw Error("`"+J+"` cannot be empty")}function Ay(Z,J){if(!Z)throw Error("Setting `"+J+"` requires `path` to be set too")}function p50(Z){return Boolean(Z&&typeof Z==="object"&&"byteLength"in Z&&"byteOffset"in Z)}var lF;var Dy=U(()=>{GF();Vy();Ny();Ly();lF=["history","path","basename","stem","extname","dirname"]});var aF=U(()=>{Dy()});var My=function(Z){let Q=this.constructor.prototype,X=Q[Z],Y=function(){return X.apply(Y,arguments)};return Object.setPrototypeOf(Y,Q),Y};function sF(Z,J){if(typeof J!=="function")throw TypeError("Cannot `"+Z+"` without `parser`")}function oF(Z,J){if(typeof J!=="function")throw TypeError("Cannot `"+Z+"` without `compiler`")}function nF(Z,J){if(J)throw Error("Cannot call `"+Z+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oy(Z){if(!c$(Z)||typeof Z.type!=="string")throw TypeError("Expected node, got `"+Z+"`")}function jy(Z,J,$){if(!$)throw Error("`"+Z+"` finished async. Use `"+J+"` instead")}function yH(Z){return c50(Z)?Z:new p3(Z)}function c50(Z){return Boolean(Z&&typeof Z==="object"&&"message"in Z&&"messages"in Z)}function d50(Z){return typeof Z==="string"||l50(Z)}function l50(Z){return Boolean(Z&&typeof Z==="object"&&"byteLength"in Z&&"byteOffset"in Z)}var vH,u50,tF,eF;var by=U(()=>{Uy();aF();vH=P(Ky(),1),u50={}.hasOwnProperty;tF=class tF extends My{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dF()}copy(){let Z=new tF,J=-1;while(++J<this.attachers.length){let $=this.attachers[J];Z.use(...$)}return Z.data(vH.default(!0,{},this.namespace)),Z}data(Z,J){if(typeof Z==="string"){if(arguments.length===2)return nF("data",this.frozen),this.namespace[Z]=J,this;return u50.call(this.namespace,Z)&&this.namespace[Z]||void 0}if(Z)return nF("data",this.frozen),this.namespace=Z,this;return this.namespace}freeze(){if(this.frozen)return this;let Z=this;while(++this.freezeIndex<this.attachers.length){let[J,...$]=this.attachers[this.freezeIndex];if($[0]===!1)continue;if($[0]===!0)$[0]=void 0;let Q=J.call(Z,...$);if(typeof Q==="function")this.transformers.use(Q)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(Z){this.freeze();let J=yH(Z),$=this.parser||this.Parser;return sF("parse",$),$(String(J),J)}process(Z,J){let $=this;return this.freeze(),sF("process",this.parser||this.Parser),oF("process",this.compiler||this.Compiler),J?Q(void 0,J):new Promise(Q);function Q(X,Y){let w=yH(Z),z=$.parse(w);$.run(z,w,function(G,W,q){if(G||!W||!q)return H(G);let K=W,B=$.stringify(K,q);if(d50(B))q.value=B;else q.result=B;H(G,q)});function H(G,W){if(G||!W)Y(G);else if(X)X(W);else B1(J,"`done` is defined if `resolve` is not"),J(void 0,W)}}}processSync(Z){let J=!1,$;return this.freeze(),sF("processSync",this.parser||this.Parser),oF("processSync",this.compiler||this.Compiler),this.process(Z,Q),jy("processSync","process",J),B1($,"we either bailed on an error or have a tree"),$;function Q(X,Y){J=!0,cF(X),$=Y}}run(Z,J,$){Oy(Z),this.freeze();let Q=this.transformers;if(!$&&typeof J==="function")$=J,J=void 0;return $?X(void 0,$):new Promise(X);function X(Y,w){B1(typeof J!=="function","`file` can’t be a `done` anymore, we checked");let z=yH(J);Q.run(Z,z,H);function H(G,W,q){let K=W||Z;if(G)w(G);else if(Y)Y(K);else B1($,"`done` is defined if `resolve` is not"),$(void 0,K,q)}}}runSync(Z,J){let $=!1,Q;return this.run(Z,J,X),jy("runSync","run",$),B1(Q,"we either bailed on an error or have a tree"),Q;function X(Y,w){cF(Y),Q=w,$=!0}}stringify(Z,J){this.freeze();let $=yH(J),Q=this.compiler||this.Compiler;return oF("stringify",Q),Oy(Z),Q(Z,$)}use(Z,...J){let $=this.attachers,Q=this.namespace;if(nF("use",this.frozen),Z===null||Z===void 0);else if(typeof Z==="function")z(Z,J);else if(typeof Z==="object")if(Array.isArray(Z))w(Z);else Y(Z);else throw TypeError("Expected usable value, not `"+Z+"`");return this;function X(H){if(typeof H==="function")z(H,[]);else if(typeof H==="object")if(Array.isArray(H)){let[G,...W]=H;z(G,W)}else Y(H);else throw TypeError("Expected usable value, not `"+H+"`")}function Y(H){if(!("plugins"in H)&&!("settings"in H))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(w(H.plugins),H.settings)Q.settings=vH.default(!0,Q.settings,H.settings)}function w(H){let G=-1;if(H===null||H===void 0);else if(Array.isArray(H))while(++G<H.length){let W=H[G];X(W)}else throw TypeError("Expected a list of plugins, not `"+H+"`")}function z(H,G){let W=-1,q=-1;while(++W<$.length)if($[W][0]===H){q=W;break}if(q===-1)$.push([H,...G]);else if(G.length>0){let[K,...B]=G,V=$[q][1];if(c$(V)&&c$(K))K=vH.default(!0,V,K);$[q]=[H,K,...B]}}}};eF=new tF().freeze()});var Py=U(()=>{by()});function ZN(Z){let J=s50(Z),$=o50(Z);return n50(J.runSync(J.parse($),$),Z)}function s50(Z){let J=Z.rehypePlugins||Iy,$=Z.remarkPlugins||Iy,Q=Z.remarkRehypeOptions?{...Z.remarkRehypeOptions,...Ty}:Ty;return eF().use(MH).use($).use(RH,Q).use(J)}function o50(Z){let J=Z.children||"",$=new p3;if(typeof J==="string")$.value=J;else nz("Unexpected value `"+J+"` for `children` prop, expected `string`");return $}function n50(Z,J){let{allowedElements:$,allowElement:Q,components:X,disallowedElements:Y,skipHtml:w,unwrapDisallowed:z}=J,H=J.urlTransform||Cy;for(let W of a50)if(Object.hasOwn(J,W.from))nz("Unexpected `"+W.from+"` prop, "+(W.to?"use `"+W.to+"` instead":"remove it")+" (see <"+r50+"#"+W.id+"> for more info)");if($&&Y)nz("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");return C6(Z,G),qF(Z,{Fragment:u3.Fragment,components:X,ignoreInvalidStyle:!0,jsx:u3.jsx,jsxs:u3.jsxs,passKeys:!0,passNode:!0});function G(W,q,K){if(W.type==="raw"&&K&&typeof q==="number"){if(w)K.children.splice(q,1);else K.children[q]={type:"text",value:W.value};return q}if(W.type==="element"){let B;for(B in k$)if(Object.hasOwn(k$,B)&&Object.hasOwn(W.properties,B)){let V=W.properties[B],F=k$[B];if(F===null||F.includes(W.tagName))W.properties[B]=H(String(V||""),B,W)}}if(W.type==="element"){let B=$?!$.includes(W.tagName):Y?Y.includes(W.tagName):!1;if(!B&&Q&&typeof q==="number")B=!Q(W,q,K);if(B&&K&&typeof q==="number"){if(z&&W.children)K.children.splice(q,1,...W.children);else K.children.splice(q,1);return q}}}}function Cy(Z){let J=Z.indexOf(":"),$=Z.indexOf("?"),Q=Z.indexOf("#"),X=Z.indexOf("/");if(J===-1||X!==-1&&J>X||$!==-1&&J>$||Q!==-1&&J>Q||i50.test(Z.slice(0,J)))return Z;return""}var u3,ky,r50="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Iy,Ty,i50,a50;var Sy=U(()=>{th();ZR();Yx();Qy();Py();u$();aF();u3=P(G0(),1),ky=P(f(),1),Iy=[],Ty={allowDangerousHtml:!0},i50=/^(https?|ircs?|mailto|xmpp)$/i,a50=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}]});var Ey=U(()=>{Sy()});var gH=function(Z,J,$){let Q=Q6($);if(!Z||!Z.type||!Z.children)throw Error("Expected parent node");if(typeof J==="number"){if(J<0||J===Number.POSITIVE_INFINITY)throw Error("Expected positive finite number as index")}else if(J=Z.children.indexOf(J),J<0)throw Error("Expected child node or index");while(++J<Z.children.length)if(Q(Z.children[J],J,Z))return Z.children[J];return};var hy=U(()=>{m$()});var Ry=U(()=>{hy()});function t50(Z){let J=[],$=-1;while(++$<Z.length)J[$]=S6(Z[$]);return JN(Q);function Q(...X){let Y=-1;while(++Y<J.length)if(J[Y].apply(this,X))return!0;return!1}}function e50(Z){return JN(J);function J($){return $.tagName===Z}}function JN(Z){return J;function J($,Q,X){return Boolean(J20($)&&Z.call(this,$,typeof Q==="number"?Q:void 0,X||void 0))}}function Z20(Z){return Boolean(Z&&typeof Z==="object"&&"type"in Z&&Z.type==="element"&&"tagName"in Z&&typeof Z.tagName==="string")}function J20(Z){return Z!==null&&typeof Z==="object"&&"type"in Z&&"tagName"in Z}var S6=function(Z){if(Z===null||Z===void 0)return Z20;if(typeof Z==="string")return e50(Z);if(typeof Z==="object")return t50(Z);if(typeof Z==="function")return JN(Z);throw Error("Expected function, string, or array as `test`")};var xy=()=>{};function QN(Z,J){let $=J||{},Q="children"in Z?Z.children:[],X=my(Z),Y=cy(Z,{whitespace:$.whitespace||"normal",breakBefore:!1,breakAfter:!1}),w=[];if(Z.type==="text"||Z.type==="comment")w.push(...uy(Z,{whitespace:Y,breakBefore:!0,breakAfter:!0}));let z=-1;while(++z<Q.length)w.push(...py(Q[z],Z,{whitespace:Y,breakBefore:z?void 0:X,breakAfter:z<Q.length-1?$N(Q[z+1]):X}));let H=[],G;z=-1;while(++z<w.length){let W=w[z];if(typeof W==="number"){if(G!==void 0&&W>G)G=W}else if(W){if(G!==void 0&&G>-1)H.push(`
|
|
40
|
+
`.repeat(G)||" ");G=-1,H.push(W)}}return H.join("")}function py(Z,J,$){if(Z.type==="element")return X20(Z,J,$);if(Z.type==="text")return $.whitespace==="normal"?uy(Z,$):w20(Z);return[]}function X20(Z,J,$){let Q=cy(Z,$),X=Z.children||[],Y=-1,w=[];if(Q20(Z))return w;let z,H;if($N(Z))H=`
|
|
41
|
+
`;else if(fy(Z)&&gH(J,Z,fy))H=`
|
|
42
|
+
`;else if($20(Z))z=2,H=2;else if(my(Z))z=1,H=1;while(++Y<X.length)w=w.concat(py(X[Y],Z,{whitespace:Q,breakBefore:Y?void 0:z,breakAfter:Y<X.length-1?$N(X[Y+1]):H}));if(gy(Z)&&gH(J,Z,gy))w.push("\t");if(z)w.unshift(z);if(H)w.push(H);return w}function uy(Z,J){let $=String(Z.value),Q=[],X=[],Y=0;while(Y<=$.length){yy.lastIndex=Y;let H=yy.exec($),G=H&&"index"in H?H.index:$.length;Q.push(Y20($.slice(Y,G).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),Y===0?J.breakBefore:!0,G===$.length?J.breakAfter:!0)),Y=G+1}let w=-1,z;while(++w<Q.length)if(Q[w].charCodeAt(Q[w].length-1)===8203||w<Q.length-1&&Q[w+1].charCodeAt(0)===8203)X.push(Q[w]),z=void 0;else if(Q[w]){if(typeof z==="number")X.push(z);X.push(Q[w]),z=0}else if(w===0||w===Q.length-1)X.push(0);return X}function w20(Z){return[String(Z.value)]}function Y20(Z,J,$){let Q=[],X=0,Y;while(X<Z.length){vy.lastIndex=X;let w=vy.exec(Z);if(Y=w?w.index:Z.length,!X&&!Y&&w&&!J)Q.push("");if(X!==Y)Q.push(Z.slice(X,Y));X=w?Y+w[0].length:Y}if(X!==Y&&!$)Q.push("");return Q.join(" ")}function cy(Z,J){if(Z.type==="element"){let $=Z.properties||{};switch(Z.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return $.wrap?"pre-wrap":"pre";case"td":case"th":return $.noWrap?"nowrap":J.whitespace;case"textarea":return"pre-wrap";default:}}return J.whitespace}function z20(Z){return Boolean((Z.properties||{}).hidden)}function H20(Z){return Z.tagName==="td"||Z.tagName==="th"}function G20(Z){return Z.tagName==="dialog"&&!(Z.properties||{}).open}var yy,vy,$N,gy,$20,fy,Q20,my;var dy=U(()=>{Ry();xy();yy=/\n/g,vy=/[\t ]+/g,$N=S6("br"),gy=S6(H20),$20=S6("p"),fy=S6("tr"),Q20=S6(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",z20,G20]),my=S6(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"])});var ly=U(()=>{dy()});function W20(Z){let J=Z.regex,$=Z.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),Q="decltype\\(auto\\)",X="[a-zA-Z_]\\w*::",Y="<[^<>]+>",w="(?!struct)(decltype\\(auto\\)|"+J.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+J.optional("<[^<>]+>")+")",z={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},H="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",G={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[Z.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},Z.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},W={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},q={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},Z.inherit(G,{className:"string"}),{className:"string",begin:/<.*?>/},$,Z.C_BLOCK_COMMENT_MODE]},K={className:"title",begin:J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE,relevance:0},B=J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE+"\\s*\\(",V=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],F=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],A={type:F,keyword:V,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},O={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:J.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,Z.IDENT_RE,J.lookahead(/(<[^<>]+>|)\s*\(/))},D=[O,q,z,$,Z.C_BLOCK_COMMENT_MODE,W,G],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:D.concat([{begin:/\(/,end:/\)/,keywords:A,contains:D.concat(["self"]),relevance:0}]),relevance:0},b={className:"function",begin:"("+w+"[\\*&\\s]+)+"+B,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:A,relevance:0},{begin:B,returnBegin:!0,contains:[K],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[G,W]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[$,Z.C_BLOCK_COMMENT_MODE,G,W,z,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",$,Z.C_BLOCK_COMMENT_MODE,G,W,z]}]},z,$,Z.C_BLOCK_COMMENT_MODE,q]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:A,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(k,b,O,D,[q,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:A,contains:["self",z]},{begin:Z.IDENT_RE+"::",keywords:A},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function ry(Z){let J={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},$=W20(Z),Q=$.keywords;return Q.type=[...Q.type,...J.type],Q.literal=[...Q.literal,...J.literal],Q.built_in=[...Q.built_in,...J.built_in],Q._hints=J._hints,$.name="Arduino",$.aliases=["ino"],$.supersetOf="cpp",$}var iy=()=>{};function ay(Z){let J=Z.regex,$={},Q={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[$]}]};Object.assign($,{className:"variable",variants:[{begin:J.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},Q]});let X={className:"subst",begin:/\$\(/,end:/\)/,contains:[Z.BACKSLASH_ESCAPE]},Y=Z.inherit(Z.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),w={begin:/<<-?\s*(?=\w+)/,starts:{contains:[Z.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},z={className:"string",begin:/"/,end:/"/,contains:[Z.BACKSLASH_ESCAPE,$,X]};X.contains.push(z);let H={match:/\\"/},G={className:"string",begin:/'/,end:/'/},W={match:/\\'/},q={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},Z.NUMBER_MODE,$]},K=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],B=Z.SHEBANG({binary:`(${K.join("|")})`,relevance:10}),V={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[Z.inherit(Z.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},F=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],_=["true","false"],N={match:/(\/[a-z._-]+)+/},L=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],M=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],A=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],O=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:F,literal:_,built_in:[...L,...M,"set","shopt",...A,...O]},contains:[B,Z.SHEBANG(),V,q,Y,w,N,z,H,G,W,$]}}var sy=()=>{};function oy(Z){let J=Z.regex,$=Z.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),Q="decltype\\(auto\\)",X="[a-zA-Z_]\\w*::",Y="<[^<>]+>",w="(decltype\\(auto\\)|"+J.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+J.optional("<[^<>]+>")+")",z={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},H="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",G={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[Z.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},Z.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},W={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},q={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},Z.inherit(G,{className:"string"}),{className:"string",begin:/<.*?>/},$,Z.C_BLOCK_COMMENT_MODE]},K={className:"title",begin:J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE,relevance:0},B=J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE+"\\s*\\(",_={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},N=[q,z,$,Z.C_BLOCK_COMMENT_MODE,W,G],L={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},M={begin:"("+w+"[\\*&\\s]+)+"+B,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:_,relevance:0},{begin:B,returnBegin:!0,contains:[Z.inherit(K,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[$,Z.C_BLOCK_COMMENT_MODE,G,W,z,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",$,Z.C_BLOCK_COMMENT_MODE,G,W,z]}]},z,$,Z.C_BLOCK_COMMENT_MODE,q]};return{name:"C",aliases:["h"],keywords:_,disableAutodetect:!0,illegal:"</",contains:[].concat(L,M,N,[q,{begin:Z.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},Z.TITLE_MODE]}]),exports:{preprocessor:q,strings:G,keywords:_}}}var ny=()=>{};function ty(Z){let J=Z.regex,$=Z.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),Q="decltype\\(auto\\)",X="[a-zA-Z_]\\w*::",Y="<[^<>]+>",w="(?!struct)(decltype\\(auto\\)|"+J.optional("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+J.optional("<[^<>]+>")+")",z={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},H="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",G={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[Z.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},Z.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},W={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},q={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},Z.inherit(G,{className:"string"}),{className:"string",begin:/<.*?>/},$,Z.C_BLOCK_COMMENT_MODE]},K={className:"title",begin:J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE,relevance:0},B=J.optional("[a-zA-Z_]\\w*::")+Z.IDENT_RE+"\\s*\\(",V=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],F=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],_=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],N=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],A={type:F,keyword:V,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},O={className:"function.dispatch",relevance:0,keywords:{_hint:N},begin:J.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,Z.IDENT_RE,J.lookahead(/(<[^<>]+>|)\s*\(/))},D=[O,q,z,$,Z.C_BLOCK_COMMENT_MODE,W,G],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:D.concat([{begin:/\(/,end:/\)/,keywords:A,contains:D.concat(["self"]),relevance:0}]),relevance:0},b={className:"function",begin:"("+w+"[\\*&\\s]+)+"+B,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:A,relevance:0},{begin:B,returnBegin:!0,contains:[K],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[G,W]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[$,Z.C_BLOCK_COMMENT_MODE,G,W,z,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",$,Z.C_BLOCK_COMMENT_MODE,G,W,z]}]},z,$,Z.C_BLOCK_COMMENT_MODE,q]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:A,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(k,b,O,D,[q,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:A,contains:["self",z]},{begin:Z.IDENT_RE+"::",keywords:A},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var ey=()=>{};function Zv(Z){let J=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],$=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],Q=["default","false","null","true"],X=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],Y=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],w={keyword:X.concat(Y),built_in:J,literal:Q},z=Z.inherit(Z.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),H={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},G={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},W={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},q=Z.inherit(W,{illegal:/\n/}),K={className:"subst",begin:/\{/,end:/\}/,keywords:w},B=Z.inherit(K,{illegal:/\n/}),V={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},Z.BACKSLASH_ESCAPE,B]},F={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},K]},_=Z.inherit(F,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},B]});K.contains=[F,V,W,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,H,Z.C_BLOCK_COMMENT_MODE],B.contains=[_,V,q,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,H,Z.inherit(Z.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let N={variants:[G,F,V,W,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE]},L={begin:"<",end:">",contains:[{beginKeywords:"in out"},z]},M=Z.IDENT_RE+"(<"+Z.IDENT_RE+"(\\s*,\\s*"+Z.IDENT_RE+")*>)?(\\[\\])?",A={begin:"@"+Z.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:w,illegal:/::/,contains:[Z.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},N,H,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},z,L,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[z,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[z,L,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+M+"\\s+)+"+Z.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:w,contains:[{beginKeywords:$.join(" "),relevance:0},{begin:Z.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[Z.TITLE_MODE,L],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,relevance:0,contains:[N,H,Z.C_BLOCK_COMMENT_MODE]},Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},A]}}var Jv=()=>{};function $v(Z){let J=Z.regex,$=q20(Z),Q={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},X="and or not only",Y=/@-?\w[\w]*(-\w+)*/,w="[a-zA-Z-][a-zA-Z0-9_-]*",z=[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[$.BLOCK_COMMENT,Q,$.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},$.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+F20.join("|")+")"},{begin:":(:)?("+N20.join("|")+")"}]},$.CSS_VARIABLE,{className:"attribute",begin:"\\b("+_20.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[$.BLOCK_COMMENT,$.HEXCOLOR,$.IMPORTANT,$.CSS_NUMBER_MODE,...z,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...z,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},$.FUNCTION_DISPATCH]},{begin:J.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:Y},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:V20.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...z,$.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+U20.join("|")+")\\b"}]}}var q20=(Z)=>{return{IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:Z.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:Z.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}},K20,B20,U20,V20,F20,N20,_20;var Qv=U(()=>{K20=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],B20=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],U20=[...K20,...B20],V20=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),F20=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),N20=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),_20=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse()});function Xv(Z){let J=Z.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:J.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:J.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}var wv=()=>{};function Yv(Z){let Y={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:Y,illegal:"</",contains:[Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,{className:"string",variants:[Z.QUOTE_STRING_MODE,Z.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[Z.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:Y,illegal:/["']/}]}]}}var zv=()=>{};function Hv(Z){let J=Z.regex,$=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[Z.HASH_COMMENT_MODE,Z.QUOTE_STRING_MODE,Z.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:J.concat($,J.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}var Gv=()=>{};function Wv(Z){let J=Z.regex,$={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:Z.NUMBER_RE}]},Q=Z.COMMENT();Q.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let X={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},Y={className:"literal",begin:/\bon|off|true|false|yes|no\b/},w={className:"string",contains:[Z.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},z={begin:/\[/,end:/\]/,contains:[Q,Y,X,w,$,"self"],relevance:0},H=/[A-Za-z0-9_-]+/,G=/"(\\"|[^"])*"/,W=/'[^']*'/,q=J.either(H,G,W),K=J.concat(q,"(\\s*\\.\\s*",q,")*",J.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[Q,{className:"section",begin:/\[+/,end:/\]+/},{begin:K,className:"attr",starts:{end:/$/,contains:[Q,z,Y,X,w,$]}}]}}var qv=()=>{};function Bv(Z,J,$){if($===-1)return"";return Z.replace(J,(Q)=>{return Bv(Z,J,$-1)})}function Uv(Z){let J=Z.regex,$="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",Q="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+Bv("(?:<"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"~~~(?:\\s*,\\s*"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"+"~~~)*>)?",/~~~/g,2),H={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},G={className:"meta",begin:"@"+"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},W={className:"params",begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:[Z.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:H,illegal:/<\/|#/,contains:[Z.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[Z.BACKSLASH_ESCAPE]},Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[J.concat(/(?!else)/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"),/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,"[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"],className:{1:"keyword",3:"title.class"},contains:[W,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+Q+"\\s+)",Z.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:H,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:[G,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,Kv,Z.C_BLOCK_COMMENT_MODE]},Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},Kv,G]}}var c3="[0-9](_*[0-9])*",fH,mH="[0-9a-fA-F](_*[0-9a-fA-F])*",Kv;var Vv=U(()=>{fH=`\\.(${c3})`,Kv={className:"number",variants:[{begin:`(\\b(${c3})((${fH})|\\.)?|(${fH}))[eE][+-]?(${c3})[fFdD]?\\b`},{begin:`\\b(${c3})((${fH})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${fH})[fFdD]?\\b`},{begin:`\\b(${c3})[fFdD]\\b`},{begin:`\\b0[xX]((${mH})\\.?|(${mH})?\\.(${mH}))[pP][+-]?(${c3})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${mH})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0}});function Lv(Z){let J=Z.regex,$=(E,{after:m})=>{let j="</"+E[0].slice(1);return E.input.indexOf(j,m)!==-1},Q="[A-Za-z$_][0-9A-Za-z$_]*",X={begin:"<>",end:"</>"},Y=/<[A-Za-z0-9\\._:-]+\s*\/>/,w={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(E,m)=>{let j=E[0].length+E.index,H0=E.input[j];if(H0==="<"||H0===","){m.ignoreMatch();return}if(H0===">"){if(!$(E,{after:j}))m.ignoreMatch()}let w0,T=E.input.substring(j);if(w0=T.match(/^\s*=/)){m.ignoreMatch();return}if(w0=T.match(/^\s+extends\s+/)){if(w0.index===0){m.ignoreMatch();return}}}},z={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:L20,literal:A20,built_in:M20,"variable.language":D20},H="[0-9](_?[0-9])*",G="\\.([0-9](_?[0-9])*)",W="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",q={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},K={className:"subst",begin:"\\$\\{",end:"\\}",keywords:z,contains:[]},B={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"xml"}},V={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"css"}},F={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[Z.BACKSLASH_ESCAPE,K]},L={className:"comment",variants:[Z.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),Z.C_BLOCK_COMMENT_MODE,Z.C_LINE_COMMENT_MODE]},M=[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,B,V,F,_,{match:/\$\d+/},q];K.contains=M.concat({begin:/\{/,end:/\}/,keywords:z,contains:["self"].concat(M)});let A=[].concat(L,K.contains),O=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:z,contains:["self"].concat(A)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:z,contains:O},k={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,J.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",J.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},b={relevance:0,match:J.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Fv,...Nv]}},h={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},d={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(E){return J.concat("(?!",E.join("|"),")")}let C={match:J.concat(/\b/,v([..._v,"super","import"].map((E)=>`${E}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",J.lookahead(/\s*\(/)),className:"title.function",relevance:0},y={begin:J.concat(/\./,J.lookahead(J.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},g={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+Z.UNDERSCORE_IDENT_RE+")\\s*=>",x={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,J.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:z,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:b},illegal:/#(?![$_A-z])/,contains:[Z.SHEBANG({label:"shebang",binary:"node",relevance:5}),h,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,B,V,F,_,L,{match:/\$\d+/},q,b,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+J.lookahead(":"),relevance:0},x,{begin:"("+Z.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,Z.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:Z.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:z,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:X.begin,end:X.end},{match:Y},{begin:w.begin,"on:begin":w.isTrulyOpeningTag,end:w.end}],subLanguage:"xml",contains:[{begin:w.begin,end:w.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+Z.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,Z.inherit(Z.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},y,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},C,d,k,g,{match:/\$[(.]/}]}}var L20,A20,Fv,Nv,_v,D20,M20;var Av=U(()=>{L20=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],A20=["true","false","null","undefined","NaN","Infinity"],Fv=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Nv=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_v=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],D20=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],M20=[].concat(_v,Fv,Nv)});function Dv(Z){let J={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},$={match:/[{}[\],:]/,className:"punctuation",relevance:0},Q=["true","false","null"],X={scope:"literal",beginKeywords:Q.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:Q},contains:[J,$,Z.QUOTE_STRING_MODE,X,Z.C_NUMBER_MODE,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Mv=()=>{};function Ov(Z){let J={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},$={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},Q={className:"symbol",begin:Z.UNDERSCORE_IDENT_RE+"@"},X={className:"subst",begin:/\$\{/,end:/\}/,contains:[Z.C_NUMBER_MODE]},Y={className:"variable",begin:"\\$"+Z.UNDERSCORE_IDENT_RE},w={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[Y,X]},{begin:"'",end:"'",illegal:/\n/,contains:[Z.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[Z.BACKSLASH_ESCAPE,Y,X]}]};X.contains.push(w);let z={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+Z.UNDERSCORE_IDENT_RE+")?"},H={className:"meta",begin:"@"+Z.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[Z.inherit(w,{className:"string"}),"self"]}]},G=O20,W=Z.COMMENT("/\\*","\\*/",{contains:[Z.C_BLOCK_COMMENT_MODE]}),q={variants:[{className:"type",begin:Z.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},K=q;return K.variants[1].contains=[q],q.variants[1].contains=[K],{name:"Kotlin",aliases:["kt","kts"],keywords:J,contains:[Z.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),Z.C_LINE_COMMENT_MODE,W,$,Q,z,H,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:J,relevance:5,contains:[{begin:Z.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[Z.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:J,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[q,Z.C_LINE_COMMENT_MODE,W],relevance:0},Z.C_LINE_COMMENT_MODE,W,z,H,w,Z.C_NUMBER_MODE]},W]},{begin:[/class|interface|trait/,/\s+/,Z.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},Z.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},z,H]},w,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
43
|
+
`},G]}}var d3="[0-9](_*[0-9])*",pH,uH="[0-9a-fA-F](_*[0-9a-fA-F])*",O20;var jv=U(()=>{pH=`\\.(${d3})`,O20={className:"number",variants:[{begin:`(\\b(${d3})((${pH})|\\.)?|(${pH}))[eE][+-]?(${d3})[fFdD]?\\b`},{begin:`\\b(${d3})((${pH})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${pH})[fFdD]?\\b`},{begin:`\\b(${d3})[fFdD]\\b`},{begin:`\\b0[xX]((${uH})\\.?|(${uH})?\\.(${uH}))[pP][+-]?(${d3})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${uH})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0}});function Iv(Z){let J=j20(Z),$=C20,Q="and or not only",X="[\\w-]+",Y="([\\w-]+|@\\{[\\w-]+\\})",w=[],z=[],H=function(M){return{className:"string",begin:"~?"+M+".*?"+M}},G=function(M,A,O){return{className:M,begin:A,relevance:O}},W={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:T20.join(" ")},q={begin:"\\(",end:"\\)",contains:z,keywords:W,relevance:0};z.push(Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,H("'"),H('"'),J.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},J.HEXCOLOR,q,G("variable","@@?[\\w-]+",10),G("variable","@\\{[\\w-]+\\}"),G("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},J.IMPORTANT,{beginKeywords:"and not"},J.FUNCTION_DISPATCH);let K=z.concat({begin:/\{/,end:/\}/,contains:w}),B={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(z)},V={begin:Y+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},J.CSS_VARIABLE,{className:"attribute",begin:"\\b("+k20.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:z}}]},F={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:W,returnEnd:!0,contains:z,relevance:0}},_={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:K}},N={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:Y,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,B,G("keyword","all\\b"),G("variable","@\\{[\\w-]+\\}"),{begin:"\\b("+I20.join("|")+")\\b",className:"selector-tag"},J.CSS_NUMBER_MODE,G("selector-tag",Y,0),G("selector-id","#"+Y),G("selector-class","\\."+Y,0),G("selector-tag","&",0),J.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+bv.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Pv.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:K},{begin:"!important"},J.FUNCTION_DISPATCH]},L={begin:`[\\w-]+:(:)?(${$.join("|")})`,returnBegin:!0,contains:[N]};return w.push(Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,F,_,L,V,N,B,J.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:w}}var j20=(Z)=>{return{IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:Z.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:Z.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}},b20,P20,I20,T20,bv,Pv,k20,C20;var Tv=U(()=>{b20=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],P20=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],I20=[...b20,...P20],T20=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Pv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),k20=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),C20=bv.concat(Pv).sort().reverse()});function kv(Z){let Q={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},X=[Z.COMMENT("--(?!\\[=*\\[)","$"),Z.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[Q],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:Z.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:X.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[Z.inherit(Z.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:X}].concat(X)},Z.C_NUMBER_MODE,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[Q],relevance:5}])}}var Cv=()=>{};function Sv(Z){let J={className:"variable",variants:[{begin:"\\$\\("+Z.UNDERSCORE_IDENT_RE+"\\)",contains:[Z.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},$={className:"string",begin:/"/,end:/"/,contains:[Z.BACKSLASH_ESCAPE,J]},Q={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[J,$]},X={begin:"^"+Z.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},Y={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},w={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[J]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[Z.HASH_COMMENT_MODE,J,$,Q,X,Y,w]}}var Ev=()=>{};function hv(Z){let J=Z.regex,$={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},Q={begin:"^[-\\*]{3,}",end:"$"},X={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},Y={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},w={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},z=/[A-Za-z][A-Za-z0-9+.-]*/,H={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:J.concat(/\[.+?\]\(/,z,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},G={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},W={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},q=Z.inherit(G,{contains:[]}),K=Z.inherit(W,{contains:[]});G.contains.push(K),W.contains.push(q);let B=[$,H];return[G,W,q,K].forEach((N)=>{N.contains=N.contains.concat(B)}),B=B.concat(G,W),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:B},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:B}]}]},$,Y,G,W,{className:"quote",begin:"^>\\s+",contains:B,end:"$"},X,Q,H,w,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}var Rv=()=>{};function xv(Z){let J={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},$=/[a-zA-Z@][a-zA-Z0-9_]*/,z={"variable.language":["this","super"],$pattern:$,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},H={$pattern:$,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:z,illegal:"</",contains:[J,Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,Z.C_NUMBER_MODE,Z.QUOTE_STRING_MODE,Z.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[Z.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},Z.inherit(Z.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+H.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:H,contains:[Z.UNDERSCORE_TITLE_MODE]},{begin:"\\."+Z.UNDERSCORE_IDENT_RE,relevance:0}]}}var yv=()=>{};function vv(Z){let J=Z.regex,$=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],Q=/[dualxmsipngr]{0,12}/,X={$pattern:/[\w.]+/,keyword:$.join(" ")},Y={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:X},w={begin:/->\{/,end:/\}/},z={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},H={scope:"variable",variants:[{begin:/\$\d/},{begin:J.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[z]},G={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},W=[Z.BACKSLASH_ESCAPE,Y,H],q=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],K=(F,_,N="\\1")=>{let L=N==="\\1"?N:J.concat(N,_);return J.concat(J.concat("(?:",F,")"),_,/(?:\\.|[^\\\/])*?/,L,/(?:\\.|[^\\\/])*?/,N,Q)},B=(F,_,N)=>{return J.concat(J.concat("(?:",F,")"),_,/(?:\\.|[^\\\/])*?/,N,Q)},V=[H,Z.HASH_COMMENT_MODE,Z.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),w,{className:"string",contains:W,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[Z.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[Z.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},G,{begin:"(\\/\\/|"+Z.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[Z.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:K("s|tr|y",J.either(...q,{capture:!0}))},{begin:K("s|tr|y","\\(","\\)")},{begin:K("s|tr|y","\\[","\\]")},{begin:K("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:B("(?:m|qr)?",/\//,/\//)},{begin:B("m|qr",J.either(...q,{capture:!0}),/\1/)},{begin:B("m|qr",/\(/,/\)/)},{begin:B("m|qr",/\[/,/\]/)},{begin:B("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[Z.TITLE_MODE,z]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[Z.TITLE_MODE,z,G]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return Y.contains=V,w.contains=V,{name:"Perl",aliases:["pl","pm"],keywords:X,contains:V}}var gv=()=>{};function fv(Z){let J=Z.regex,$=/(?![A-Za-z0-9])(?![$])/,Q=J.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,$),X=J.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,$),Y=J.concat(/[A-Z]+/,$),w={scope:"variable",match:"\\$+"+Q},z={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:0.1},{begin:/\?>/}]},H={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},G=Z.inherit(Z.APOS_STRING_MODE,{illegal:null}),W=Z.inherit(Z.QUOTE_STRING_MODE,{illegal:null,contains:Z.QUOTE_STRING_MODE.contains.concat(H)}),q={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:Z.QUOTE_STRING_MODE.contains.concat(H),"on:begin":(y,g)=>{g.data._beginMatch=y[1]||y[2]},"on:end":(y,g)=>{if(g.data._beginMatch!==y[1])g.ignoreMatch()}},K=Z.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),B=`[
|
|
44
|
+
]`,V={scope:"string",variants:[W,G,q,K]},F={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},_=["false","null","true"],N=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],L=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],A={keyword:N,literal:((y)=>{let g=[];return y.forEach((S)=>{if(g.push(S),S.toLowerCase()===S)g.push(S.toUpperCase());else g.push(S.toLowerCase())}),g})(_),built_in:L},O=(y)=>{return y.map((g)=>{return g.replace(/\|\d+$/,"")})},D={variants:[{match:[/new/,J.concat(`[
|
|
45
|
+
]`,"+"),J.concat("(?!",O(L).join("\\b|"),"\\b)"),X],scope:{1:"keyword",4:"title.class"}}]},k=J.concat(Q,"\\b(?!\\()"),b={variants:[{match:[J.concat(/::/,J.lookahead(/(?!class\b)/)),k],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[X,J.concat(/::/,J.lookahead(/(?!class\b)/)),k],scope:{1:"title.class",3:"variable.constant"}},{match:[X,J.concat("::",J.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[X,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},h={scope:"attr",match:J.concat(Q,J.lookahead(":"),J.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:A,contains:[h,w,b,Z.C_BLOCK_COMMENT_MODE,V,F,D]},d={relevance:0,match:[/\b/,J.concat("(?!fn\\b|function\\b|",O(N).join("\\b|"),"|",O(L).join("\\b|"),"\\b)"),Q,J.concat(`[
|
|
46
|
+
]`,"*"),J.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(d);let v=[h,b,Z.C_BLOCK_COMMENT_MODE,V,F,D],C={begin:J.concat(/#\[\s*\\?/,J.either(X,Y)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...v]},...v,{scope:"meta",variants:[{match:X},{match:Y}]}]};return{case_insensitive:!1,keywords:A,contains:[C,Z.HASH_COMMENT_MODE,Z.COMMENT("//","$"),Z.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:Z.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},z,{scope:"variable.language",match:/\$this\b/},w,d,b,{match:[/const/,/\s/,Q],scope:{1:"keyword",3:"variable.constant"}},D,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},Z.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:A,contains:["self",C,w,b,Z.C_BLOCK_COMMENT_MODE,V,F]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},Z.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[Z.inherit(Z.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},Z.UNDERSCORE_TITLE_MODE]},V,F]}}var mv=()=>{};function pv(Z){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},Z.inherit(Z.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),Z.inherit(Z.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}var uv=()=>{};function cv(Z){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}var dv=()=>{};function lv(Z){let J=Z.regex,$=/[\p{XID_Start}_]\p{XID_Continue}*/u,Q=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],z={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:Q,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},H={className:"meta",begin:/^(>>>|\.\.\.) /},G={className:"subst",begin:/\{/,end:/\}/,keywords:z,illegal:/#/},W={begin:/\{\{/,relevance:0},q={className:"string",contains:[Z.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[Z.BACKSLASH_ESCAPE,H],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[Z.BACKSLASH_ESCAPE,H],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[Z.BACKSLASH_ESCAPE,H,W,G]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[Z.BACKSLASH_ESCAPE,H,W,G]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[Z.BACKSLASH_ESCAPE,W,G]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[Z.BACKSLASH_ESCAPE,W,G]},Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE]},K="[0-9](_?[0-9])*",B="(\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.",V=`\\b|${Q.join("|")}`,F={className:"number",relevance:0,variants:[{begin:`(\\b([0-9](_?[0-9])*)|((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.))[eE][+-]?([0-9](_?[0-9])*)[jJ]?(?=${V})`},{begin:"((\\b([0-9](_?[0-9])*))?\\.([0-9](_?[0-9])*)|\\b([0-9](_?[0-9])*)\\.)[jJ]?"},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${V})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${V})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${V})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${V})`},{begin:`\\b([0-9](_?[0-9])*)[jJ](?=${V})`}]},_={className:"comment",begin:J.lookahead(/# type:/),end:/$/,keywords:z,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:z,contains:["self",H,F,q,Z.HASH_COMMENT_MODE]}]};return G.contains=[q,F,H],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:z,illegal:/(<\/|\?)|=>/,contains:[H,F,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},q,_,Z.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,$],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,$,/\s*/,/\(\s*/,$,/\s*\)/]},{match:[/\bclass/,/\s+/,$]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[F,N,q]}]}}var rv=()=>{};function iv(Z){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}var av=()=>{};function sv(Z){let J=Z.regex,$=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,Q=J.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),X=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,Y=J.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:$,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[Z.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:J.lookahead(J.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:$},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),Z.HASH_COMMENT_MODE,{scope:"string",contains:[Z.BACKSLASH_ESCAPE],variants:[Z.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),Z.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),Z.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),Z.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),Z.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),Z.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[X,Q]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,Q]},{scope:{1:"punctuation",2:"number"},match:[Y,Q]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,Q]}]},{scope:{3:"operator"},match:[$,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:X},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:Y},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}var ov=()=>{};function nv(Z){let J=Z.regex,$="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",Q=J.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),X=J.concat(Q,/(::\w+)*/),w={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},z={className:"doctag",begin:"@[A-Za-z]+"},H={begin:"#<",end:">"},G=[Z.COMMENT("#","$",{contains:[z]}),Z.COMMENT("^=begin","^=end",{contains:[z],relevance:10}),Z.COMMENT("^__END__",Z.MATCH_NOTHING_RE)],W={className:"subst",begin:/#\{/,end:/\}/,keywords:w},q={className:"string",contains:[Z.BACKSLASH_ESCAPE,W],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:J.concat(/<<[-~]?'?/,J.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[Z.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[Z.BACKSLASH_ESCAPE,W]})]}]},K="[1-9](_?[0-9])*|0",B="[0-9](_?[0-9])*",V={className:"number",relevance:0,variants:[{begin:"\\b([1-9](_?[0-9])*|0)(\\.([0-9](_?[0-9])*))?([eE][+-]?([0-9](_?[0-9])*)|r)?i?\\b"},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},F={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:w}]},D=[q,{variants:[{match:[/class\s+/,X,/\s+<\s+/,X]},{match:[/\b(class|module)\s+/,X]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:w},{match:[/(include|extend)\s+/,X],scope:{2:"title.class"},keywords:w},{relevance:0,match:[X,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:Q,scope:"title.class"},{match:[/def/,/\s+/,"([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)"],scope:{1:"keyword",3:"title.function"},contains:[F]},{begin:Z.IDENT_RE+"::"},{className:"symbol",begin:Z.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[q,{begin:"([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)"}],relevance:0},V,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:w},{begin:"("+Z.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[Z.BACKSLASH_ESCAPE,W],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(H,G),relevance:0}].concat(H,G);W.contains=D,F.contains=D;let k="[>?]>",b="[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]",h="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",I=[{begin:/^\s*=>/,starts:{end:"$",contains:D}},{className:"meta.prompt",begin:"^("+k+"|"+b+"|"+h+")(?=[ ])",starts:{end:"$",keywords:w,contains:D}}];return G.unshift(H),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:w,illegal:/\/\*/,contains:[Z.SHEBANG({binary:"ruby"})].concat(I).concat(G).concat(D)}}var tv=()=>{};function ev(Z){let J=Z.regex,$=/(r#)?/,Q=J.concat($,Z.UNDERSCORE_IDENT_RE),X=J.concat($,Z.IDENT_RE),Y={className:"title.function.invoke",relevance:0,begin:J.concat(/\b/,/(?!let|for|while|if|else|match\b)/,X,J.lookahead(/\s*\(/))},w="([ui](8|16|32|64|128|size)|f(32|64))?",z=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],H=["true","false","Some","None","Ok","Err"],G=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],W=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:Z.IDENT_RE+"!?",type:W,keyword:z,literal:H,built_in:G},illegal:"</",contains:[Z.C_LINE_COMMENT_MODE,Z.COMMENT("/\\*","\\*/",{contains:["self"]}),Z.inherit(Z.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)([ui](8|16|32|64|128|size)|f(32|64))?"},{begin:"\\b0o([0-7_]+)([ui](8|16|32|64|128|size)|f(32|64))?"},{begin:"\\b0x([A-Fa-f0-9_]+)([ui](8|16|32|64|128|size)|f(32|64))?"},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([ui](8|16|32|64|128|size)|f(32|64))?"}],relevance:0},{begin:[/fn/,/\s+/,Q],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[Z.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,Q],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,Q,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,Q],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,Q],className:{1:"keyword",3:"title.class"}},{begin:Z.IDENT_RE+"::",keywords:{keyword:"Self",built_in:G,type:W}},{className:"punctuation",begin:"->"},Y]}}var Zg=()=>{};function Jg(Z){let J=S20(Z),$=v20,Q=y20,X="@[a-z-]+",Y="and or not only",w="[a-zA-Z-][a-zA-Z0-9_-]*",z={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[Z.C_LINE_COMMENT_MODE,Z.C_BLOCK_COMMENT_MODE,J.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},J.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+R20.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+Q.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+$.join("|")+")"},z,{begin:/\(/,end:/\)/,contains:[J.CSS_NUMBER_MODE]},J.CSS_VARIABLE,{className:"attribute",begin:"\\b("+g20.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[J.BLOCK_COMMENT,z,J.HEXCOLOR,J.CSS_NUMBER_MODE,Z.QUOTE_STRING_MODE,Z.APOS_STRING_MODE,J.IMPORTANT,J.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:"@[a-z-]+",keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:x20.join(" ")},contains:[{begin:"@[a-z-]+",className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},z,Z.QUOTE_STRING_MODE,Z.APOS_STRING_MODE,J.HEXCOLOR,J.CSS_NUMBER_MODE]},J.FUNCTION_DISPATCH]}}var S20=(Z)=>{return{IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:Z.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:Z.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}},E20,h20,R20,x20,y20,v20,g20;var $g=U(()=>{E20=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],h20=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],R20=[...E20,...h20],x20=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),y20=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),v20=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),g20=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse()});function Qg(Z){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}var Xg=()=>{};function wg(Z){let J=Z.regex,$=Z.COMMENT("--","$"),Q={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},X={begin:/"/,end:/"/,contains:[{match:/""/}]},Y=["true","false","unknown"],w=["double precision","large object","with timezone","without timezone"],z=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],H=["add","asc","collation","desc","final","first","last","view"],G=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],W=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],q=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],K=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],B=W,V=[...G,...H].filter((O)=>{return!W.includes(O)}),F={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},N={match:J.concat(/\b/,J.either(...B),/\s*\(/),relevance:0,keywords:{built_in:B}};function L(O){return J.concat(/\b/,J.either(...O.map((D)=>{return D.replace(/\s+/,"\\s+")})),/\b/)}let M={scope:"keyword",match:L(K),relevance:0};function A(O,{exceptions:D,when:k}={}){let b=k;return D=D||[],O.map((h)=>{if(h.match(/\|\d+$/)||D.includes(h))return h;else if(b(h))return`${h}|0`;else return h})}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:A(V,{when:(O)=>O.length<3}),literal:Y,type:z,built_in:q},contains:[{scope:"type",match:L(w)},M,N,F,Q,X,Z.C_NUMBER_MODE,Z.C_BLOCK_COMMENT_MODE,$,_]}}var Yg=()=>{};function Wg(Z){if(!Z)return null;if(typeof Z==="string")return Z;return Z.source}function l$(Z){return O1("(?=",Z,")")}function O1(...Z){return Z.map(($)=>Wg($)).join("")}function f20(Z){let J=Z[Z.length-1];if(typeof J==="object"&&J.constructor===Object)return Z.splice(Z.length-1,1),J;else return{}}function Q2(...Z){return"("+(f20(Z).capture?"":"?:")+Z.map((Q)=>Wg(Q)).join("|")+")"}function Ug(Z){let J={match:/\s+/,relevance:0},$=Z.COMMENT("/\\*","\\*/",{contains:["self"]}),Q=[Z.C_LINE_COMMENT_MODE,$],X={match:[/\./,Q2(...m20,...zg)],className:{2:"keyword"}},Y={match:O1(/\./,Q2(...XN)),relevance:0},w=XN.filter((a)=>typeof a==="string").concat(["_|0"]),z=XN.filter((a)=>typeof a!=="string").concat(p20).map(YN),H={variants:[{className:"keyword",match:Q2(...z,...zg)}]},G={$pattern:Q2(/\b\w+/,/#\w+/),keyword:w.concat(c20),literal:Hg},W=[X,Y,H],q={match:O1(/\./,Q2(...Gg)),relevance:0},K={className:"built_in",match:O1(/\b/,Q2(...Gg),/(?=\()/)},B=[q,K],V={match:/->/,relevance:0},F={className:"operator",relevance:0,variants:[{match:wN},{match:`\\.(\\.|${Kg})+`}]},_=[V,F],N="([0-9]_*)+",L="([0-9a-fA-F]_*)+",M={className:"number",relevance:0,variants:[{match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{match:"\\b0x(([0-9a-fA-F]_*)+)(\\.(([0-9a-fA-F]_*)+))?([pP][+-]?(([0-9]_*)+))?\\b"},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},A=(a="")=>({className:"subst",variants:[{match:O1(/\\/,a,/[0\\tnr"']/)},{match:O1(/\\/,a,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(a="")=>({className:"subst",match:O1(/\\/,a,/[\t ]*(?:[\r\n]|\r\n)/)}),D=(a="")=>({className:"subst",label:"interpol",begin:O1(/\\/,a,/\(/),end:/\)/}),k=(a="")=>({begin:O1(a,/"""/),end:O1(/"""/,a),contains:[A(a),O(a),D(a)]}),b=(a="")=>({begin:O1(a,/"/),end:O1(/"/,a),contains:[A(a),D(a)]}),h={className:"string",variants:[k(),k("#"),k("##"),k("###"),b(),b("#"),b("##"),b("###")]},I=[Z.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[Z.BACKSLASH_ESCAPE]}],d={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},v=(a)=>{let J0=O1(a,/\//),r=O1(/\//,a);return{begin:J0,end:r,contains:[...I,{scope:"comment",begin:`#(?!.*${r})`,end:/$/}]}},C={scope:"regexp",variants:[v("###"),v("##"),v("#"),d]},y={match:O1(/`/,X6,/`/)},g={className:"variable",match:/\$\d+/},S={className:"variable",match:`\\$${dH}+`},x=[y,g,S],E={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:l20,contains:[..._,M,h]}]}},m={scope:"keyword",match:O1(/@/,Q2(...d20),l$(Q2(/\(/,/\s+/)))},j={scope:"meta",match:O1(/@/,X6)},H0=[E,m,j],w0={match:l$(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:O1(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,dH,"+")},{className:"type",match:cH,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:O1(/\s+&\s+/,l$(cH)),relevance:0}]},T={begin:/</,end:/>/,keywords:G,contains:[...Q,...W,...H0,V,w0]};w0.contains.push(T);let $0={match:O1(X6,/\s*:/),keywords:"_|0",relevance:0},V0={begin:/\(/,end:/\)/,relevance:0,keywords:G,contains:["self",$0,...Q,C,...W,...B,..._,M,h,...x,...H0,w0]},l={begin:/</,end:/>/,keywords:"repeat each",contains:[...Q,w0]},Z0={begin:Q2(l$(O1(X6,/\s*:/)),l$(O1(X6,/\s+/,X6,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:X6}]},q0={begin:/\(/,end:/\)/,keywords:G,contains:[Z0,...Q,...W,..._,M,h,...H0,w0,V0],endsParent:!0,illegal:/["']/},s={match:[/(func|macro)/,/\s+/,Q2(y.match,X6,wN)],className:{1:"keyword",3:"title.function"},contains:[l,q0,J],illegal:[/\[/,/%/]},X0={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[l,q0,J],illegal:/\[|%/},z0={match:[/operator/,/\s+/,wN],className:{1:"keyword",3:"title"}},p={begin:[/precedencegroup/,/\s+/,cH],className:{1:"keyword",3:"title"},contains:[w0],keywords:[...u20,...Hg],end:/}/},o={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},t={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},N0={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,X6,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:G,contains:[l,...W,{begin:/:/,end:/\{/,keywords:G,contains:[{scope:"title.class.inherited",match:cH},...W],relevance:0}]};for(let a of h.variants){let J0=a.contains.find((n)=>n.label==="interpol");J0.keywords=G;let r=[...W,...B,..._,M,h,...x];J0.contains=[...r,{begin:/\(/,end:/\)/,contains:["self",...r]}]}return{name:"Swift",keywords:G,contains:[...Q,s,X0,o,t,N0,z0,p,{beginKeywords:"import",end:/$/,contains:[...Q],relevance:0},C,...W,...B,..._,M,h,...x,...H0,w0,V0]}}var YN=(Z)=>O1(/\b/,Z,/\w$/.test(Z)?/\b/:/\B/),m20,zg,p20,XN,Hg,u20,c20,Gg,qg,Kg,wN,Bg,dH,X6,cH,d20,l20;var Vg=U(()=>{m20=["Protocol","Type"].map(YN),zg=["init","self"].map(YN),p20=["Any","Self"],XN=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Hg=["false","nil","true"],u20=["assignment","associativity","higherThan","left","lowerThan","none","right"],c20=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Gg=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],qg=Q2(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Kg=Q2(qg,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),wN=O1(qg,Kg,"*"),Bg=Q2(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),dH=Q2(Bg,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),X6=O1(Bg,dH,"*"),cH=O1(/[A-Z]/,dH,"*"),d20=["attached","autoclosure",O1(/convention\(/,Q2("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",O1(/objc\(/,X6,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],l20=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"]});function r20(Z){let J=Z.regex,$=(E,{after:m})=>{let j="</"+E[0].slice(1);return E.input.indexOf(j,m)!==-1},Q="[A-Za-z$_][0-9A-Za-z$_]*",X={begin:"<>",end:"</>"},Y=/<[A-Za-z0-9\\._:-]+\s*\/>/,w={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(E,m)=>{let j=E[0].length+E.index,H0=E.input[j];if(H0==="<"||H0===","){m.ignoreMatch();return}if(H0===">"){if(!$(E,{after:j}))m.ignoreMatch()}let w0,T=E.input.substring(j);if(w0=T.match(/^\s*=/)){m.ignoreMatch();return}if(w0=T.match(/^\s+extends\s+/)){if(w0.index===0){m.ignoreMatch();return}}}},z={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Fg,literal:Ng,built_in:Mg,"variable.language":Dg},H="[0-9](_?[0-9])*",G="\\.([0-9](_?[0-9])*)",W="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",q={className:"number",variants:[{begin:"(\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)((\\.([0-9](_?[0-9])*))|\\.)?|(\\.([0-9](_?[0-9])*)))[eE][+-]?([0-9](_?[0-9])*)\\b"},{begin:"\\b(0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*)\\b((\\.([0-9](_?[0-9])*))\\b|\\.)?|(\\.([0-9](_?[0-9])*))\\b"},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},K={className:"subst",begin:"\\$\\{",end:"\\}",keywords:z,contains:[]},B={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"xml"}},V={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"css"}},F={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[Z.BACKSLASH_ESCAPE,K],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[Z.BACKSLASH_ESCAPE,K]},L={className:"comment",variants:[Z.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:"[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),Z.C_BLOCK_COMMENT_MODE,Z.C_LINE_COMMENT_MODE]},M=[Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,B,V,F,_,{match:/\$\d+/},q];K.contains=M.concat({begin:/\{/,end:/\}/,keywords:z,contains:["self"].concat(M)});let A=[].concat(L,K.contains),O=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:z,contains:["self"].concat(A)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:z,contains:O},k={variants:[{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s+/,/extends/,/\s+/,J.concat("[A-Za-z$_][0-9A-Za-z$_]*","(",J.concat(/\./,"[A-Za-z$_][0-9A-Za-z$_]*"),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*"],scope:{1:"keyword",3:"title.class"}}]},b={relevance:0,match:J.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[..._g,...Lg]}},h={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},d={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(E){return J.concat("(?!",E.join("|"),")")}let C={match:J.concat(/\b/,v([...Ag,"super","import"].map((E)=>`${E}\\s*\\(`)),"[A-Za-z$_][0-9A-Za-z$_]*",J.lookahead(/\s*\(/)),className:"title.function",relevance:0},y={begin:J.concat(/\./,J.lookahead(J.concat("[A-Za-z$_][0-9A-Za-z$_]*",/(?![0-9A-Za-z$_(])/))),end:"[A-Za-z$_][0-9A-Za-z$_]*",excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},g={match:[/get|set/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+Z.UNDERSCORE_IDENT_RE+")\\s*=>",x={match:[/const|var|let/,/\s+/,"[A-Za-z$_][0-9A-Za-z$_]*",/\s*/,/=\s*/,/(async\s*)?/,J.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:z,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:b},illegal:/#(?![$_A-z])/,contains:[Z.SHEBANG({label:"shebang",binary:"node",relevance:5}),h,Z.APOS_STRING_MODE,Z.QUOTE_STRING_MODE,B,V,F,_,L,{match:/\$\d+/},q,b,{scope:"attr",match:"[A-Za-z$_][0-9A-Za-z$_]*"+J.lookahead(":"),relevance:0},x,{begin:"("+Z.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[L,Z.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:Z.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:z,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:X.begin,end:X.end},{match:Y},{begin:w.begin,"on:begin":w.isTrulyOpeningTag,end:w.end}],subLanguage:"xml",contains:[{begin:w.begin,end:w.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+Z.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,Z.inherit(Z.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*",className:"title.function"})]},{match:/\.\.\./,relevance:0},y,{match:"\\$[A-Za-z$_][0-9A-Za-z$_]*",relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},C,d,k,g,{match:/\$[(.]/}]}}function Og(Z){let J=Z.regex,$=r20(Z),Q="[A-Za-z$_][0-9A-Za-z$_]*",X=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],Y={begin:[/namespace/,/\s+/,Z.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},w={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:X},contains:[$.exports.CLASS_REFERENCE]},z={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},H=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],G={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:Fg.concat(H),literal:Ng,built_in:Mg.concat(X),"variable.language":Dg},W={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},q=(F,_,N)=>{let L=F.contains.findIndex((M)=>M.label===_);if(L===-1)throw Error("can not find mode to replace");F.contains.splice(L,1,N)};Object.assign($.keywords,G),$.exports.PARAMS_CONTAINS.push(W);let K=$.contains.find((F)=>F.scope==="attr"),B=Object.assign({},K,{match:J.concat("[A-Za-z$_][0-9A-Za-z$_]*",J.lookahead(/\s*\?:/))});$.exports.PARAMS_CONTAINS.push([$.exports.CLASS_REFERENCE,K,B]),$.contains=$.contains.concat([W,Y,w,B]),q($,"shebang",Z.SHEBANG()),q($,"use_strict",z);let V=$.contains.find((F)=>F.label==="func.def");return V.relevance=0,Object.assign($,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),$}var Fg,Ng,_g,Lg,Ag,Dg,Mg;var jg=U(()=>{Fg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ng=["true","false","null","undefined","NaN","Infinity"],_g=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Lg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ag=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Dg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Mg=[].concat(Ag,_g,Lg)});function bg(Z){let J=Z.regex,$={className:"string",begin:/"(""|[^/n])"C\b/},Q={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},X=/\d{1,2}\/\d{1,2}\/\d{4}/,Y=/\d{4}-\d{1,2}-\d{1,2}/,w=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,z=/\d{1,2}(:\d{1,2}){1,2}/,H={className:"literal",variants:[{begin:J.concat(/# */,J.either(Y,X),/ *#/)},{begin:J.concat(/# */,z,/ *#/)},{begin:J.concat(/# */,w,/ *#/)},{begin:J.concat(/# */,J.either(Y,X),/ +/,J.either(w,z),/ *#/)}]},G={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},W={className:"label",begin:/^\w+:/},q=Z.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),K=Z.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[$,Q,H,G,W,q,K,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[K]}]}}var Pg=()=>{};function Ig(Z){Z.regex;let J=Z.COMMENT(/\(;/,/;\)/);J.contains.push("self");let $=Z.COMMENT(/;;/,/$/),Q=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],X={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},Y={className:"variable",begin:/\$[\w_]+/},w={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},z={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},H={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},G={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:Q},contains:[$,J,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},Y,w,X,Z.QUOTE_STRING_MODE,H,G,z]}}var Tg=()=>{};function kg(Z){let J=Z.regex,$=J.concat(/[\p{L}_]/u,J.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),Q=/[\p{L}0-9._:-]+/u,X={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},Y={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},w=Z.inherit(Y,{begin:/\(/,end:/\)/}),z=Z.inherit(Z.APOS_STRING_MODE,{className:"string"}),H=Z.inherit(Z.QUOTE_STRING_MODE,{className:"string"}),G={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:Q,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[X]},{begin:/'/,end:/'/,contains:[X]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[Y,H,z,w,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[Y,w,H,z]}]}]},Z.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},X,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[H]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[G],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[G],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:J.concat(/</,J.lookahead(J.concat($,J.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:$,relevance:0,starts:G}]},{className:"tag",begin:J.concat(/<\//,J.lookahead(J.concat($,/>/))),contains:[{className:"name",begin:$,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var Cg=()=>{};function Sg(Z){let Q={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},X={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},Y={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},w={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[Z.BACKSLASH_ESCAPE,X]},z=Z.inherit(w,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),H="[0-9]{4}(-[0-9][0-9]){0,2}",G="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",W="(\\.[0-9]*)?",q="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",K={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},B={end:",",endsWithParent:!0,excludeEnd:!0,keywords:"true false yes no null",relevance:0},V={begin:/\{/,end:/\}/,contains:[B],illegal:"\\n",relevance:0},F={begin:"\\[",end:"\\]",contains:[B],illegal:"\\n",relevance:0},_=[Q,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!<[\\w#;/?:@&=+$,.~*'()[\\]]+>"},{className:"type",begin:"![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"type",begin:"!![\\w#;/?:@&=+$,.~*'()[\\]]+"},{className:"meta",begin:"&"+Z.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+Z.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},Z.HASH_COMMENT_MODE,{beginKeywords:"true false yes no null",keywords:{literal:"true false yes no null"}},K,{className:"number",begin:Z.C_NUMBER_RE+"\\b",relevance:0},V,F,Y,w],N=[..._];return N.pop(),N.push(z),B.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}var Eg=()=>{};var zN;var hg=U(()=>{iy();sy();ny();ey();Jv();Qv();wv();zv();Gv();qv();Vv();Av();Mv();jv();Tv();Cv();Ev();Rv();yv();gv();mv();uv();dv();rv();av();ov();tv();Zg();$g();Xg();Yg();Vg();jg();Pg();Tg();Cg();Eg();zN={arduino:ry,bash:ay,c:oy,cpp:ty,csharp:Zv,css:$v,diff:Xv,go:Yv,graphql:Hv,ini:Wv,java:Uv,javascript:Lv,json:Dv,kotlin:Ov,less:Iv,lua:kv,makefile:Sv,markdown:hv,objectivec:xv,perl:vv,php:fv,"php-template":pv,plaintext:cv,python:lv,"python-repl":iv,r:sv,ruby:nv,rust:ev,scss:Jg,shell:Qg,sql:wg,swift:Ug,typescript:Og,vbnet:bg,wasm:Ig,xml:kg,yaml:Sg}});var $f=F1((kB4,Jf)=>{function mg(Z){if(Z instanceof Map)Z.clear=Z.delete=Z.set=function(){throw Error("map is read-only")};else if(Z instanceof Set)Z.add=Z.clear=Z.delete=function(){throw Error("set is read-only")};return Object.freeze(Z),Object.getOwnPropertyNames(Z).forEach((J)=>{let $=Z[J],Q=typeof $;if((Q==="object"||Q==="function")&&!Object.isFrozen($))mg($)}),Z}class GN{constructor(Z){if(Z.data===void 0)Z.data={};this.data=Z.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function pg(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function v8(Z,...J){let $=Object.create(null);for(let Q in Z)$[Q]=Z[Q];return J.forEach(function(Q){for(let X in Q)$[X]=Q[X]}),$}var i20="</span>",Rg=(Z)=>{return!!Z.scope},a20=(Z,{prefix:J})=>{if(Z.startsWith("language:"))return Z.replace("language:","language-");if(Z.includes(".")){let $=Z.split(".");return[`${J}${$.shift()}`,...$.map((Q,X)=>`${Q}${"_".repeat(X+1)}`)].join(" ")}return`${J}${Z}`};class ug{constructor(Z,J){this.buffer="",this.classPrefix=J.classPrefix,Z.walk(this)}addText(Z){this.buffer+=pg(Z)}openNode(Z){if(!Rg(Z))return;let J=a20(Z.scope,{prefix:this.classPrefix});this.span(J)}closeNode(Z){if(!Rg(Z))return;this.buffer+=i20}value(){return this.buffer}span(Z){this.buffer+=`<span class="${Z}">`}}var xg=(Z={})=>{let J={children:[]};return Object.assign(J,Z),J};class WN{constructor(){this.rootNode=xg(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Z){this.top.children.push(Z)}openNode(Z){let J=xg({scope:Z});this.add(J),this.stack.push(J)}closeNode(){if(this.stack.length>1)return this.stack.pop();return}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Z){return this.constructor._walk(Z,this.rootNode)}static _walk(Z,J){if(typeof J==="string")Z.addText(J);else if(J.children)Z.openNode(J),J.children.forEach(($)=>this._walk(Z,$)),Z.closeNode(J);return Z}static _collapse(Z){if(typeof Z==="string")return;if(!Z.children)return;if(Z.children.every((J)=>typeof J==="string"))Z.children=[Z.children.join("")];else Z.children.forEach((J)=>{WN._collapse(J)})}}class cg extends WN{constructor(Z){super();this.options=Z}addText(Z){if(Z==="")return;this.add(Z)}startScope(Z){this.openNode(Z)}endScope(){this.closeNode()}__addSublanguage(Z,J){let $=Z.root;if(J)$.scope=`language:${J}`;this.add($)}toHTML(){return new ug(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function r$(Z){if(!Z)return null;if(typeof Z==="string")return Z;return Z.source}function dg(Z){return G9("(?=",Z,")")}function s20(Z){return G9("(?:",Z,")*")}function o20(Z){return G9("(?:",Z,")?")}function G9(...Z){return Z.map(($)=>r$($)).join("")}function n20(Z){let J=Z[Z.length-1];if(typeof J==="object"&&J.constructor===Object)return Z.splice(Z.length-1,1),J;else return{}}function qN(...Z){return"("+(n20(Z).capture?"":"?:")+Z.map((Q)=>r$(Q)).join("|")+")"}function lg(Z){return new RegExp(Z.toString()+"|").exec("").length-1}function t20(Z,J){let $=Z&&Z.exec(J);return $&&$.index===0}var e20=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function KN(Z,{joinWith:J}){let $=0;return Z.map((Q)=>{$+=1;let X=$,Y=r$(Q),w="";while(Y.length>0){let z=e20.exec(Y);if(!z){w+=Y;break}if(w+=Y.substring(0,z.index),Y=Y.substring(z.index+z[0].length),z[0][0]==="\\"&&z[1])w+="\\"+String(Number(z[1])+X);else if(w+=z[0],z[0]==="(")$++}return w}).map((Q)=>`(${Q})`).join(J)}var Z40=/\b\B/,rg="[a-zA-Z]\\w*",BN="[a-zA-Z_]\\w*",ig="\\b\\d+(\\.\\d+)?",ag="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",sg="\\b(0b[01]+)",J40="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$40=(Z={})=>{let J=/^#![ ]*\//;if(Z.binary)Z.begin=G9(J,/.*\b/,Z.binary,/\b.*/);return v8({scope:"meta",begin:J,end:/$/,relevance:0,"on:begin":($,Q)=>{if($.index!==0)Q.ignoreMatch()}},Z)},i$={begin:"\\\\[\\s\\S]",relevance:0},Q40={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[i$]},X40={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[i$]},w40={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},iH=function(Z,J,$={}){let Q=v8({scope:"comment",begin:Z,end:J,contains:[]},$);Q.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let X=qN("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Q.contains.push({begin:G9(/[ ]+/,"(",X,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Q},Y40=iH("//","$"),z40=iH("/\\*","\\*/"),H40=iH("#","$"),G40={scope:"number",begin:ig,relevance:0},W40={scope:"number",begin:ag,relevance:0},q40={scope:"number",begin:sg,relevance:0},K40={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[i$,{begin:/\[/,end:/\]/,relevance:0,contains:[i$]}]},B40={scope:"title",begin:rg,relevance:0},U40={scope:"title",begin:BN,relevance:0},V40={begin:"\\.\\s*"+BN,relevance:0},F40=function(Z){return Object.assign(Z,{"on:begin":(J,$)=>{$.data._beginMatch=J[1]},"on:end":(J,$)=>{if($.data._beginMatch!==J[1])$.ignoreMatch()}})},lH=Object.freeze({__proto__:null,APOS_STRING_MODE:Q40,BACKSLASH_ESCAPE:i$,BINARY_NUMBER_MODE:q40,BINARY_NUMBER_RE:sg,COMMENT:iH,C_BLOCK_COMMENT_MODE:z40,C_LINE_COMMENT_MODE:Y40,C_NUMBER_MODE:W40,C_NUMBER_RE:ag,END_SAME_AS_BEGIN:F40,HASH_COMMENT_MODE:H40,IDENT_RE:rg,MATCH_NOTHING_RE:Z40,METHOD_GUARD:V40,NUMBER_MODE:G40,NUMBER_RE:ig,PHRASAL_WORDS_MODE:w40,QUOTE_STRING_MODE:X40,REGEXP_MODE:K40,RE_STARTERS_RE:J40,SHEBANG:$40,TITLE_MODE:B40,UNDERSCORE_IDENT_RE:BN,UNDERSCORE_TITLE_MODE:U40});function N40(Z,J){if(Z.input[Z.index-1]===".")J.ignoreMatch()}function _40(Z,J){if(Z.className!==void 0)Z.scope=Z.className,delete Z.className}function L40(Z,J){if(!J)return;if(!Z.beginKeywords)return;if(Z.begin="\\b("+Z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Z.__beforeBegin=N40,Z.keywords=Z.keywords||Z.beginKeywords,delete Z.beginKeywords,Z.relevance===void 0)Z.relevance=0}function A40(Z,J){if(!Array.isArray(Z.illegal))return;Z.illegal=qN(...Z.illegal)}function D40(Z,J){if(!Z.match)return;if(Z.begin||Z.end)throw Error("begin & end are not supported with match");Z.begin=Z.match,delete Z.match}function M40(Z,J){if(Z.relevance===void 0)Z.relevance=1}var O40=(Z,J)=>{if(!Z.beforeMatch)return;if(Z.starts)throw Error("beforeMatch cannot be used with starts");let $=Object.assign({},Z);Object.keys(Z).forEach((Q)=>{delete Z[Q]}),Z.keywords=$.keywords,Z.begin=G9($.beforeMatch,dg($.begin)),Z.starts={relevance:0,contains:[Object.assign($,{endsParent:!0})]},Z.relevance=0,delete $.beforeMatch},j40=["of","and","for","in","not","or","if","then","parent","list","value"],b40="keyword";function og(Z,J,$=b40){let Q=Object.create(null);if(typeof Z==="string")X($,Z.split(" "));else if(Array.isArray(Z))X($,Z);else Object.keys(Z).forEach(function(Y){Object.assign(Q,og(Z[Y],J,Y))});return Q;function X(Y,w){if(J)w=w.map((z)=>z.toLowerCase());w.forEach(function(z){let H=z.split("|");Q[H[0]]=[Y,P40(H[0],H[1])]})}}function P40(Z,J){if(J)return Number(J);return I40(Z)?0:1}function I40(Z){return j40.includes(Z.toLowerCase())}var yg={},H9=(Z)=>{console.error(Z)},vg=(Z,...J)=>{console.log(`WARN: ${Z}`,...J)},l3=(Z,J)=>{if(yg[`${Z}/${J}`])return;console.log(`Deprecated as of ${Z}. ${J}`),yg[`${Z}/${J}`]=!0},rH=Error();function ng(Z,J,{key:$}){let Q=0,X=Z[$],Y={},w={};for(let z=1;z<=J.length;z++)w[z+Q]=X[z],Y[z+Q]=!0,Q+=lg(J[z-1]);Z[$]=w,Z[$]._emit=Y,Z[$]._multi=!0}function T40(Z){if(!Array.isArray(Z.begin))return;if(Z.skip||Z.excludeBegin||Z.returnBegin)throw H9("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),rH;if(typeof Z.beginScope!=="object"||Z.beginScope===null)throw H9("beginScope must be object"),rH;ng(Z,Z.begin,{key:"beginScope"}),Z.begin=KN(Z.begin,{joinWith:""})}function k40(Z){if(!Array.isArray(Z.end))return;if(Z.skip||Z.excludeEnd||Z.returnEnd)throw H9("skip, excludeEnd, returnEnd not compatible with endScope: {}"),rH;if(typeof Z.endScope!=="object"||Z.endScope===null)throw H9("endScope must be object"),rH;ng(Z,Z.end,{key:"endScope"}),Z.end=KN(Z.end,{joinWith:""})}function C40(Z){if(Z.scope&&typeof Z.scope==="object"&&Z.scope!==null)Z.beginScope=Z.scope,delete Z.scope}function S40(Z){if(C40(Z),typeof Z.beginScope==="string")Z.beginScope={_wrap:Z.beginScope};if(typeof Z.endScope==="string")Z.endScope={_wrap:Z.endScope};T40(Z),k40(Z)}function E40(Z){function J(w,z){return new RegExp(r$(w),"m"+(Z.case_insensitive?"i":"")+(Z.unicodeRegex?"u":"")+(z?"g":""))}class ${constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(w,z){z.position=this.position++,this.matchIndexes[this.matchAt]=z,this.regexes.push([z,w]),this.matchAt+=lg(w)+1}compile(){if(this.regexes.length===0)this.exec=()=>null;let w=this.regexes.map((z)=>z[1]);this.matcherRe=J(KN(w,{joinWith:"|"}),!0),this.lastIndex=0}exec(w){this.matcherRe.lastIndex=this.lastIndex;let z=this.matcherRe.exec(w);if(!z)return null;let H=z.findIndex((W,q)=>q>0&&W!==void 0),G=this.matchIndexes[H];return z.splice(0,H),Object.assign(z,G)}}class Q{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(w){if(this.multiRegexes[w])return this.multiRegexes[w];let z=new $;return this.rules.slice(w).forEach(([H,G])=>z.addRule(H,G)),z.compile(),this.multiRegexes[w]=z,z}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(w,z){if(this.rules.push([w,z]),z.type==="begin")this.count++}exec(w){let z=this.getMatcher(this.regexIndex);z.lastIndex=this.lastIndex;let H=z.exec(w);if(this.resumingScanAtSamePosition())if(H&&H.index===this.lastIndex);else{let G=this.getMatcher(0);G.lastIndex=this.lastIndex+1,H=G.exec(w)}if(H){if(this.regexIndex+=H.position+1,this.regexIndex===this.count)this.considerAll()}return H}}function X(w){let z=new Q;if(w.contains.forEach((H)=>z.addRule(H.begin,{rule:H,type:"begin"})),w.terminatorEnd)z.addRule(w.terminatorEnd,{type:"end"});if(w.illegal)z.addRule(w.illegal,{type:"illegal"});return z}function Y(w,z){let H=w;if(w.isCompiled)return H;[_40,D40,S40,O40].forEach((W)=>W(w,z)),Z.compilerExtensions.forEach((W)=>W(w,z)),w.__beforeBegin=null,[L40,A40,M40].forEach((W)=>W(w,z)),w.isCompiled=!0;let G=null;if(typeof w.keywords==="object"&&w.keywords.$pattern)w.keywords=Object.assign({},w.keywords),G=w.keywords.$pattern,delete w.keywords.$pattern;if(G=G||/\w+/,w.keywords)w.keywords=og(w.keywords,Z.case_insensitive);if(H.keywordPatternRe=J(G,!0),z){if(!w.begin)w.begin=/\B|\b/;if(H.beginRe=J(H.begin),!w.end&&!w.endsWithParent)w.end=/\B|\b/;if(w.end)H.endRe=J(H.end);if(H.terminatorEnd=r$(H.end)||"",w.endsWithParent&&z.terminatorEnd)H.terminatorEnd+=(w.end?"|":"")+z.terminatorEnd}if(w.illegal)H.illegalRe=J(w.illegal);if(!w.contains)w.contains=[];if(w.contains=[].concat(...w.contains.map(function(W){return h40(W==="self"?w:W)})),w.contains.forEach(function(W){Y(W,H)}),w.starts)Y(w.starts,z);return H.matcher=X(H),H}if(!Z.compilerExtensions)Z.compilerExtensions=[];if(Z.contains&&Z.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Z.classNameAliases=v8(Z.classNameAliases||{}),Y(Z)}function tg(Z){if(!Z)return!1;return Z.endsWithParent||tg(Z.starts)}function h40(Z){if(Z.variants&&!Z.cachedVariants)Z.cachedVariants=Z.variants.map(function(J){return v8(Z,{variants:null},J)});if(Z.cachedVariants)return Z.cachedVariants;if(tg(Z))return v8(Z,{starts:Z.starts?v8(Z.starts):null});if(Object.isFrozen(Z))return v8(Z);return Z}var R40="11.11.1";class eg extends Error{constructor(Z,J){super(Z);this.name="HTMLInjectionError",this.html=J}}var HN=pg,gg=v8,fg=Symbol("nomatch"),x40=7,Zf=function(Z){let J=Object.create(null),$=Object.create(null),Q=[],X=!0,Y="Could not find the language '{}', did you forget to load/include a language module?",w={disableAutodetect:!0,name:"Plain text",contains:[]},z={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:cg};function H(S){return z.noHighlightRe.test(S)}function G(S){let x=S.className+" ";x+=S.parentNode?S.parentNode.className:"";let E=z.languageDetectRe.exec(x);if(E){let m=b(E[1]);if(!m)vg(Y.replace("{}",E[1])),vg("Falling back to no-highlight mode for this block.",S);return m?E[1]:"no-highlight"}return x.split(/\s+/).find((m)=>H(m)||b(m))}function W(S,x,E){let m="",j="";if(typeof x==="object")m=S,E=x.ignoreIllegals,j=x.language;else l3("10.7.0","highlight(lang, code, ...args) has been deprecated."),l3("10.7.0",`Please use highlight(code, options) instead.
|
|
47
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),j=S,m=x;if(E===void 0)E=!0;let H0={code:m,language:j};y("before:highlight",H0);let w0=H0.result?H0.result:q(H0.language,H0.code,E);return w0.code=H0.code,y("after:highlight",w0),w0}function q(S,x,E,m){let j=Object.create(null);function H0(R,u){return R.keywords[u]}function w0(){if(!r.keywords){Q0.addText(i);return}let R=0;r.keywordPatternRe.lastIndex=0;let u=r.keywordPatternRe.exec(i),e="";while(u){e+=i.substring(R,u.index);let B0=N0.case_insensitive?u[0].toLowerCase():u[0],M0=H0(r,B0);if(M0){let[i0,T1]=M0;if(Q0.addText(e),e="",j[B0]=(j[B0]||0)+1,j[B0]<=x40)L0+=T1;if(i0.startsWith("_"))e+=u[0];else{let f1=N0.classNameAliases[i0]||i0;V0(u[0],f1)}}else e+=u[0];R=r.keywordPatternRe.lastIndex,u=r.keywordPatternRe.exec(i)}e+=i.substring(R),Q0.addText(e)}function T(){if(i==="")return;let R=null;if(typeof r.subLanguage==="string"){if(!J[r.subLanguage]){Q0.addText(i);return}R=q(r.subLanguage,i,!0,n[r.subLanguage]),n[r.subLanguage]=R._top}else R=B(i,r.subLanguage.length?r.subLanguage:null);if(r.relevance>0)L0+=R.relevance;Q0.__addSublanguage(R._emitter,R.language)}function $0(){if(r.subLanguage!=null)T();else w0();i=""}function V0(R,u){if(R==="")return;Q0.startScope(u),Q0.addText(R),Q0.endScope()}function l(R,u){let e=1,B0=u.length-1;while(e<=B0){if(!R._emit[e]){e++;continue}let M0=N0.classNameAliases[R[e]]||R[e],i0=u[e];if(M0)V0(i0,M0);else i=i0,w0(),i="";e++}}function Z0(R,u){if(R.scope&&typeof R.scope==="string")Q0.openNode(N0.classNameAliases[R.scope]||R.scope);if(R.beginScope){if(R.beginScope._wrap)V0(i,N0.classNameAliases[R.beginScope._wrap]||R.beginScope._wrap),i="";else if(R.beginScope._multi)l(R.beginScope,u),i=""}return r=Object.create(R,{parent:{value:r}}),r}function q0(R,u,e){let B0=t20(R.endRe,e);if(B0){if(R["on:end"]){let M0=new GN(R);if(R["on:end"](u,M0),M0.isMatchIgnored)B0=!1}if(B0){while(R.endsParent&&R.parent)R=R.parent;return R}}if(R.endsWithParent)return q0(R.parent,u,e)}function s(R){if(r.matcher.regexIndex===0)return i+=R[0],1;else return W1=!0,0}function X0(R){let u=R[0],e=R.rule,B0=new GN(e),M0=[e.__beforeBegin,e["on:begin"]];for(let i0 of M0){if(!i0)continue;if(i0(R,B0),B0.isMatchIgnored)return s(u)}if(e.skip)i+=u;else{if(e.excludeBegin)i+=u;if($0(),!e.returnBegin&&!e.excludeBegin)i=u}return Z0(e,R),e.returnBegin?0:u.length}function z0(R){let u=R[0],e=x.substring(R.index),B0=q0(r,R,e);if(!B0)return fg;let M0=r;if(r.endScope&&r.endScope._wrap)$0(),V0(u,r.endScope._wrap);else if(r.endScope&&r.endScope._multi)$0(),l(r.endScope,R);else if(M0.skip)i+=u;else{if(!(M0.returnEnd||M0.excludeEnd))i+=u;if($0(),M0.excludeEnd)i=u}do{if(r.scope)Q0.closeNode();if(!r.skip&&!r.subLanguage)L0+=r.relevance;r=r.parent}while(r!==B0.parent);if(B0.starts)Z0(B0.starts,R);return M0.returnEnd?0:u.length}function p(){let R=[];for(let u=r;u!==N0;u=u.parent)if(u.scope)R.unshift(u.scope);R.forEach((u)=>Q0.openNode(u))}let o={};function t(R,u){let e=u&&u[0];if(i+=R,e==null)return $0(),0;if(o.type==="begin"&&u.type==="end"&&o.index===u.index&&e===""){if(i+=x.slice(u.index,u.index+1),!X){let B0=Error(`0 width match regex (${S})`);throw B0.languageName=S,B0.badRule=o.rule,B0}return 1}if(o=u,u.type==="begin")return X0(u);else if(u.type==="illegal"&&!E){let B0=Error('Illegal lexeme "'+e+'" for mode "'+(r.scope||"<unnamed>")+'"');throw B0.mode=r,B0}else if(u.type==="end"){let B0=z0(u);if(B0!==fg)return B0}if(u.type==="illegal"&&e==="")return i+=`
|
|
48
|
+
`,1;if(n0>1e5&&n0>u.index*3)throw Error("potential infinite loop, way more iterations than matches");return i+=e,e.length}let N0=b(S);if(!N0)throw H9(Y.replace("{}",S)),Error('Unknown language: "'+S+'"');let a=E40(N0),J0="",r=m||a,n={},Q0=new z.__emitter(z);p();let i="",L0=0,I0=0,n0=0,W1=!1;try{if(!N0.__emitTokens){r.matcher.considerAll();for(;;){if(n0++,W1)W1=!1;else r.matcher.considerAll();r.matcher.lastIndex=I0;let R=r.matcher.exec(x);if(!R)break;let u=x.substring(I0,R.index),e=t(u,R);I0=R.index+e}t(x.substring(I0))}else N0.__emitTokens(x,Q0);return Q0.finalize(),J0=Q0.toHTML(),{language:S,value:J0,relevance:L0,illegal:!1,_emitter:Q0,_top:r}}catch(R){if(R.message&&R.message.includes("Illegal"))return{language:S,value:HN(x),illegal:!0,relevance:0,_illegalBy:{message:R.message,index:I0,context:x.slice(I0-100,I0+100),mode:R.mode,resultSoFar:J0},_emitter:Q0};else if(X)return{language:S,value:HN(x),illegal:!1,relevance:0,errorRaised:R,_emitter:Q0,_top:r};else throw R}}function K(S){let x={value:HN(S),illegal:!1,relevance:0,_top:w,_emitter:new z.__emitter(z)};return x._emitter.addText(S),x}function B(S,x){x=x||z.languages||Object.keys(J);let E=K(S),m=x.filter(b).filter(I).map(($0)=>q($0,S,!1));m.unshift(E);let j=m.sort(($0,V0)=>{if($0.relevance!==V0.relevance)return V0.relevance-$0.relevance;if($0.language&&V0.language){if(b($0.language).supersetOf===V0.language)return 1;else if(b(V0.language).supersetOf===$0.language)return-1}return 0}),[H0,w0]=j,T=H0;return T.secondBest=w0,T}function V(S,x,E){let m=x&&$[x]||E;S.classList.add("hljs"),S.classList.add(`language-${m}`)}function F(S){let x=null,E=G(S);if(H(E))return;if(y("before:highlightElement",{el:S,language:E}),S.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",S);return}if(S.children.length>0){if(!z.ignoreUnescapedHTML)console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(S);if(z.throwUnescapedHTML)throw new eg("One of your code blocks includes unescaped HTML.",S.innerHTML)}x=S;let m=x.textContent,j=E?W(m,{language:E,ignoreIllegals:!0}):B(m);if(S.innerHTML=j.value,S.dataset.highlighted="yes",V(S,E,j.language),S.result={language:j.language,re:j.relevance,relevance:j.relevance},j.secondBest)S.secondBest={language:j.secondBest.language,relevance:j.secondBest.relevance};y("after:highlightElement",{el:S,result:j,text:m})}function _(S){z=gg(z,S)}let N=()=>{A(),l3("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function L(){A(),l3("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let M=!1;function A(){function S(){A()}if(document.readyState==="loading"){if(!M)window.addEventListener("DOMContentLoaded",S,!1);M=!0;return}document.querySelectorAll(z.cssSelector).forEach(F)}function O(S,x){let E=null;try{E=x(Z)}catch(m){if(H9("Language definition for '{}' could not be registered.".replace("{}",S)),!X)throw m;else H9(m);E=w}if(!E.name)E.name=S;if(J[S]=E,E.rawDefinition=x.bind(null,Z),E.aliases)h(E.aliases,{languageName:S})}function D(S){delete J[S];for(let x of Object.keys($))if($[x]===S)delete $[x]}function k(){return Object.keys(J)}function b(S){return S=(S||"").toLowerCase(),J[S]||J[$[S]]}function h(S,{languageName:x}){if(typeof S==="string")S=[S];S.forEach((E)=>{$[E.toLowerCase()]=x})}function I(S){let x=b(S);return x&&!x.disableAutodetect}function d(S){if(S["before:highlightBlock"]&&!S["before:highlightElement"])S["before:highlightElement"]=(x)=>{S["before:highlightBlock"](Object.assign({block:x.el},x))};if(S["after:highlightBlock"]&&!S["after:highlightElement"])S["after:highlightElement"]=(x)=>{S["after:highlightBlock"](Object.assign({block:x.el},x))}}function v(S){d(S),Q.push(S)}function C(S){let x=Q.indexOf(S);if(x!==-1)Q.splice(x,1)}function y(S,x){let E=S;Q.forEach(function(m){if(m[E])m[E](x)})}function g(S){return l3("10.7.0","highlightBlock will be removed entirely in v12.0"),l3("10.7.0","Please use highlightElement now."),F(S)}Object.assign(Z,{highlight:W,highlightAuto:B,highlightAll:A,highlightElement:F,highlightBlock:g,configure:_,initHighlighting:N,initHighlightingOnLoad:L,registerLanguage:O,unregisterLanguage:D,listLanguages:k,getLanguage:b,registerAliases:h,autoDetection:I,inherit:gg,addPlugin:v,removePlugin:C}),Z.debugMode=function(){X=!1},Z.safeMode=function(){X=!0},Z.versionString=R40,Z.regex={concat:G9,lookahead:dg,either:qN,optional:o20,anyNumberOfTimes:s20};for(let S in lH)if(typeof lH[S]==="object")mg(lH[S]);return Object.assign(Z,lH),Z},r3=Zf({});r3.newInstance=()=>Zf({});Jf.exports=r3;r3.HighlightJS=r3;r3.default=r3});var Qf,Xf;var wf=U(()=>{Qf=P($f(),1),Xf=Qf.default});function UN(Z){let J=Xf.newInstance();if(Z)Y(Z);return{highlight:$,highlightAuto:Q,listLanguages:X,register:Y,registerAlias:w,registered:z};function $(H,G,W){B1(typeof H==="string","expected `string` as `name`"),B1(typeof G==="string","expected `string` as `value`");let q=W||Yf,K=typeof q.prefix==="string"?q.prefix:y40;if(!J.getLanguage(H))throw Error("Unknown language: `"+H+"` is not registered");J.configure({__emitter:zf,classPrefix:K});let B=J.highlight(G,{ignoreIllegals:!0,language:H});if(B.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:B.errorRaised});let V=B._emitter.root,F=V.data;return F.language=B.language,F.relevance=B.relevance,V}function Q(H,G){B1(typeof H==="string","expected `string` as `value`");let q=(G||Yf).subset||X(),K=-1,B=0,V;while(++K<q.length){let F=q[K];if(!J.getLanguage(F))continue;let _=$(F,H,G);if(_.data&&_.data.relevance!==void 0&&_.data.relevance>B)B=_.data.relevance,V=_}return V||{type:"root",children:[],data:{language:void 0,relevance:B}}}function X(){return J.listLanguages()}function Y(H,G){if(typeof H==="string")B1(G!==void 0,"expected `grammar`"),J.registerLanguage(H,G);else{let W;for(W in H)if(Object.hasOwn(H,W))J.registerLanguage(W,H[W])}}function w(H,G){if(typeof H==="string")B1(G!==void 0),J.registerAliases(typeof G==="string"?G:[...G],{languageName:H});else{let W;for(W in H)if(Object.hasOwn(H,W)){let q=H[W];J.registerAliases(typeof q==="string"?q:[...q],{languageName:W})}}}function z(H){return Boolean(J.getLanguage(H))}}class zf{constructor(Z){this.options=Z,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(Z){if(Z==="")return;let J=this.stack[this.stack.length-1],$=J.children[J.children.length-1];if($&&$.type==="text")$.value+=Z;else J.children.push({type:"text",value:Z})}startScope(Z){this.openNode(String(Z))}endScope(){this.closeNode()}__addSublanguage(Z,J){let $=this.stack[this.stack.length-1],Q=Z.root.children;if(J)$.children.push({type:"element",tagName:"span",properties:{className:[J]},children:Q});else $.children.push(...Q)}openNode(Z){let J=this,$=Z.split(".").map(function(Y,w){return w?Y+"_".repeat(w):J.options.classPrefix+Y}),Q=this.stack[this.stack.length-1],X={type:"element",tagName:"span",properties:{className:$},children:[]};Q.children.push(X),this.stack.push(X)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}var Yf,y40="hljs-";var Hf=U(()=>{wf();Yf={}});var Gf=U(()=>{hg();Hf()});function aH(Z){let J=Z||v40,$=J.aliases,Q=J.detect||!1,X=J.languages||zN,Y=J.plainText,w=J.prefix,z=J.subset,H="hljs",G=UN(X);if($)G.registerAlias($);if(w){let W=w.indexOf("-");H=W===-1?w:w.slice(0,W)}return function(W,q){C6(W,"element",function(K,B,V){if(K.tagName!=="code"||!V||V.type!=="element"||V.tagName!=="pre")return;let F=g40(K);if(F===!1||!F&&!Q||F&&Y&&Y.includes(F))return;if(!Array.isArray(K.properties.className))K.properties.className=[];if(!K.properties.className.includes(H))K.properties.className.unshift(H);let _=QN(K,{whitespace:"pre"}),N;try{N=F?G.highlight(F,_,{prefix:w}):G.highlightAuto(_,{prefix:w,subset:z})}catch(L){let M=L;if(F&&/Unknown language/.test(M.message)){q.message("Cannot highlight as `"+F+"`, it’s not registered",{ancestors:[V,K],cause:M,place:K.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw M}if(!F&&N.data&&N.data.language)K.properties.className.push("language-"+N.data.language);if(N.children.length>0)K.children=N.children})}}function g40(Z){let J=Z.properties.className,$=-1;if(!Array.isArray(J))return;let Q;while(++$<J.length){let X=String(J[$]);if(X==="no-highlight"||X==="nohighlight")return!1;if(!Q&&X.slice(0,5)==="lang-")Q=X.slice(5);if(!Q&&X.slice(0,9)==="language-")Q=X.slice(9)}return Q}var v40;var Wf=U(()=>{ly();Gf();u$();v40={}});var qf=U(()=>{Wf()});function VN(Z,J){let $=String(Z);if(typeof J!=="string")throw TypeError("Expected character");let Q=0,X=$.indexOf(J);while(X!==-1)Q++,X=$.indexOf(J,X+J.length);return Q}function FN(Z){if(typeof Z!=="string")throw TypeError("Expected a string");return Z.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function NN(Z,J,$){let X=Q6(($||{}).ignore||[]),Y=f40(J),w=-1;while(++w<Y.length)p$(Z,"text",z);function z(G,W){let q=-1,K;while(++q<W.length){let B=W[q],V=K?K.children:void 0;if(X(B,V?V.indexOf(B):void 0,K))return;K=B}if(K)return H(G,W)}function H(G,W){let q=W[W.length-1],K=Y[w][0],B=Y[w][1],V=0,_=q.children.indexOf(G),N=!1,L=[];K.lastIndex=0;let M=K.exec(G.value);while(M){let A=M.index,O={index:M.index,input:M.input,stack:[...W,G]},D=B(...M,O);if(typeof D==="string")D=D.length>0?{type:"text",value:D}:void 0;if(D===!1)K.lastIndex=A+1;else{if(V!==A)L.push({type:"text",value:G.value.slice(V,A)});if(Array.isArray(D))L.push(...D);else if(D)L.push(D);V=A+M[0].length,N=!0}if(!K.global)break;M=K.exec(G.value)}if(N){if(V<G.value.length)L.push({type:"text",value:G.value.slice(V)});q.children.splice(_,1,...L)}else L=[G];return _+L.length}}function f40(Z){let J=[];if(!Array.isArray(Z))throw TypeError("Expected find and replace tuple or list of tuples");let $=!Z[0]||Array.isArray(Z[0])?Z:[Z],Q=-1;while(++Q<$.length){let X=$[Q];J.push([m40(X[0]),p40(X[1])])}return J}function m40(Z){return typeof Z==="string"?new RegExp(FN(Z),"g"):Z}function p40(Z){return typeof Z==="function"?Z:function(){return Z}}var Kf=U(()=>{CH();m$()});var Bf=U(()=>{Kf()});function DN(){return{transforms:[i40],enter:{literalAutolink:u40,literalAutolinkEmail:AN,literalAutolinkHttp:AN,literalAutolinkWww:AN},exit:{literalAutolink:r40,literalAutolinkEmail:l40,literalAutolinkHttp:c40,literalAutolinkWww:d40}}}function MN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_N,notInConstruct:LN},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_N,notInConstruct:LN},{character:":",before:"[ps]",after:"\\/",inConstruct:_N,notInConstruct:LN}]}}function u40(Z){this.enter({type:"link",title:null,url:"",children:[]},Z)}function AN(Z){this.config.enter.autolinkProtocol.call(this,Z)}function c40(Z){this.config.exit.autolinkProtocol.call(this,Z)}function d40(Z){this.config.exit.data.call(this,Z);let J=this.stack[this.stack.length-1];B1(J.type==="link"),J.url="http://"+this.sliceSerialize(Z)}function l40(Z){this.config.exit.autolinkEmail.call(this,Z)}function r40(Z){this.exit(Z)}function i40(Z){NN(Z,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a40],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,s40]],{ignore:["link","linkReference"]})}function a40(Z,J,$,Q,X){let Y="";if(!Uf(X))return!1;if(/^w/i.test(J))$=J+$,J="",Y="http://";if(!o40($))return!1;let w=n40($+Q);if(!w[0])return!1;let z={type:"link",title:null,url:Y+J+w[0],children:[{type:"text",value:J+w[0]}]};if(w[1])return[z,{type:"text",value:w[1]}];return z}function s40(Z,J,$,Q){if(!Uf(Q,!0)||/[-\d_]$/.test($))return!1;return{type:"link",title:null,url:"mailto:"+J+"@"+$,children:[{type:"text",value:J+"@"+$}]}}function o40(Z){let J=Z.split(".");if(J.length<2||J[J.length-1]&&(/_/.test(J[J.length-1])||!/[a-zA-Z\d]/.test(J[J.length-1]))||J[J.length-2]&&(/_/.test(J[J.length-2])||!/[a-zA-Z\d]/.test(J[J.length-2])))return!1;return!0}function n40(Z){let J=/[!"&'),.:;<>?\]}]+$/.exec(Z);if(!J)return[Z,void 0];Z=Z.slice(0,J.index);let $=J[0],Q=$.indexOf(")"),X=VN(Z,"("),Y=VN(Z,")");while(Q!==-1&&X>Y)Z+=$.slice(0,Q+1),$=$.slice(Q+1),Q=$.indexOf(")"),Y++;return[Z,$]}function Uf(Z,J){let $=Z.input.charCodeAt(Z.index-1);return(Z.index===0||J6($)||J9($))&&(!J||$!==47)}var _N="phrasing",LN;var Vf=U(()=>{z1();Bf();LN=["autolink","link","image","label"]});var Ff=U(()=>{Vf()});function t40(){this.buffer()}function e40(Z){this.enter({type:"footnoteReference",identifier:"",label:""},Z)}function Z60(){this.buffer()}function J60(Z){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},Z)}function $60(Z){let J=this.resume(),$=this.stack[this.stack.length-1];B1($.type==="footnoteReference"),$.identifier=u5(this.sliceSerialize(Z)).toLowerCase(),$.label=J}function Q60(Z){this.exit(Z)}function X60(Z){let J=this.resume(),$=this.stack[this.stack.length-1];B1($.type==="footnoteDefinition"),$.identifier=u5(this.sliceSerialize(Z)).toLowerCase(),$.label=J}function w60(Z){this.exit(Z)}function Y60(){return"["}function Nf(Z,J,$,Q){let X=$.createTracker(Q),Y=X.move("[^"),w=$.enter("footnoteReference"),z=$.enter("reference");return Y+=X.move($.safe($.associationId(Z),{after:"]",before:Y})),z(),w(),Y+=X.move("]"),Y}function ON(){return{enter:{gfmFootnoteCallString:t40,gfmFootnoteCall:e40,gfmFootnoteDefinitionLabelString:Z60,gfmFootnoteDefinition:J60},exit:{gfmFootnoteCallString:$60,gfmFootnoteCall:Q60,gfmFootnoteDefinitionLabelString:X60,gfmFootnoteDefinition:w60}}}function jN(Z){let J=!1;if(Z&&Z.firstLineBlank)J=!0;return{handlers:{footnoteDefinition:$,footnoteReference:Nf},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function $(Q,X,Y,w){let z=Y.createTracker(w),H=z.move("[^"),G=Y.enter("footnoteDefinition"),W=Y.enter("label");if(H+=z.move(Y.safe(Y.associationId(Q),{before:H,after:"]"})),W(),H+=z.move("]:"),Q.children&&Q.children.length>0)z.shift(4),H+=z.move((J?`
|
|
49
|
+
`:" ")+Y.indentLines(Y.containerFlow(Q,z.current()),J?_f:z60));return G(),H}}function z60(Z,J,$){return J===0?Z:_f(Z,J,$)}function _f(Z,J,$){return($?"":" ")+Z}var Lf=U(()=>{Nf.peek=Y60});var Af=U(()=>{Lf()});function bN(){return{canContainEols:["delete"],enter:{strikethrough:G60},exit:{strikethrough:W60}}}function PN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:H60}],handlers:{delete:Df}}}function G60(Z){this.enter({type:"delete",children:[]},Z)}function W60(Z){this.exit(Z)}function Df(Z,J,$,Q){let X=$.createTracker(Q),Y=$.enter("strikethrough"),w=X.move("~~");return w+=$.containerPhrasing(Z,{...X.current(),before:w,after:"~"}),w+=X.move("~~"),Y(),w}function q60(){return"~"}var H60;var Mf=U(()=>{H60=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Df.peek=q60});var Of=U(()=>{Mf()});function K60(Z){return Z.length}function bf(Z,J){let $=J||{},Q=($.align||[]).concat(),X=$.stringLength||K60,Y=[],w=[],z=[],H=[],G=0,W=-1;while(++W<Z.length){let F=[],_=[],N=-1;if(Z[W].length>G)G=Z[W].length;while(++N<Z[W].length){let L=B60(Z[W][N]);if($.alignDelimiters!==!1){let M=X(L);if(_[N]=M,H[N]===void 0||M>H[N])H[N]=M}F.push(L)}w[W]=F,z[W]=_}let q=-1;if(typeof Q==="object"&&"length"in Q)while(++q<G)Y[q]=jf(Q[q]);else{let F=jf(Q);while(++q<G)Y[q]=F}q=-1;let K=[],B=[];while(++q<G){let F=Y[q],_="",N="";if(F===99)_=":",N=":";else if(F===108)_=":";else if(F===114)N=":";let L=$.alignDelimiters===!1?1:Math.max(1,H[q]-_.length-N.length),M=_+"-".repeat(L)+N;if($.alignDelimiters!==!1){if(L=_.length+L+N.length,L>H[q])H[q]=L;B[q]=L}K[q]=M}w.splice(1,0,K),z.splice(1,0,B),W=-1;let V=[];while(++W<w.length){let F=w[W],_=z[W];q=-1;let N=[];while(++q<G){let L=F[q]||"",M="",A="";if($.alignDelimiters!==!1){let O=H[q]-(_[q]||0),D=Y[q];if(D===114)M=" ".repeat(O);else if(D===99)if(O%2)M=" ".repeat(O/2+0.5),A=" ".repeat(O/2-0.5);else M=" ".repeat(O/2),A=M;else A=" ".repeat(O)}if($.delimiterStart!==!1&&!q)N.push("|");if($.padding!==!1&&!($.alignDelimiters===!1&&L==="")&&($.delimiterStart!==!1||q))N.push(" ");if($.alignDelimiters!==!1)N.push(M);if(N.push(L),$.alignDelimiters!==!1)N.push(A);if($.padding!==!1)N.push(" ");if($.delimiterEnd!==!1||q!==G-1)N.push("|")}V.push($.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return V.join(`
|
|
50
|
+
`)}function B60(Z){return Z===null||Z===void 0?"":String(Z)}function jf(Z){let J=typeof Z==="string"?Z.codePointAt(0):0;return J===67||J===99?99:J===76||J===108?108:J===82||J===114?114:0}function Pf(Z,J,$,Q){let X=$.enter("blockquote"),Y=$.createTracker(Q);Y.move("> "),Y.shift(2);let w=$.indentLines($.containerFlow(Z,Y.current()),U60);return X(),w}function U60(Z,J,$){return">"+($?"":" ")+Z}function Tf(Z,J){return If(Z,J.inConstruct,!0)&&!If(Z,J.notInConstruct,!1)}function If(Z,J,$){if(typeof J==="string")J=[J];if(!J||J.length===0)return $;let Q=-1;while(++Q<J.length)if(Z.includes(J[Q]))return!0;return!1}function IN(Z,J,$,Q){let X=-1;while(++X<$.unsafe.length)if($.unsafe[X].character===`
|
|
51
|
+
`&&Tf($.stack,$.unsafe[X]))return/[ \t]/.test(Q.before)?"":" ";return"\\\n"}var kf=()=>{};function Cf(Z,J){let $=String(Z),Q=$.indexOf(J),X=Q,Y=0,w=0;if(typeof J!=="string")throw TypeError("Expected substring");while(Q!==-1){if(Q===X){if(++Y>w)w=Y}else Y=1;X=Q+J.length,Q=$.indexOf(J,X)}return w}function Sf(Z,J){return Boolean(J.options.fences===!1&&Z.value&&!Z.lang&&/[^ \r\n]/.test(Z.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(Z.value))}function Ef(Z){let J=Z.options.fence||"`";if(J!=="`"&&J!=="~")throw Error("Cannot serialize code with `"+J+"` for `options.fence`, expected `` ` `` or `~`");return J}function hf(Z,J,$,Q){let X=Ef($),Y=Z.value||"",w=X==="`"?"GraveAccent":"Tilde";if(Sf(Z,$)){let q=$.enter("codeIndented"),K=$.indentLines(Y,V60);return q(),K}let z=$.createTracker(Q),H=X.repeat(Math.max(Cf(Y,X)+1,3)),G=$.enter("codeFenced"),W=z.move(H);if(Z.lang){let q=$.enter(`codeFencedLang${w}`);W+=z.move($.safe(Z.lang,{before:W,after:" ",encode:["`"],...z.current()})),q()}if(Z.lang&&Z.meta){let q=$.enter(`codeFencedMeta${w}`);W+=z.move(" "),W+=z.move($.safe(Z.meta,{before:W,after:`
|
|
52
|
+
`,encode:["`"],...z.current()})),q()}if(W+=z.move(`
|
|
53
|
+
`),Y)W+=z.move(Y+`
|
|
54
|
+
`);return W+=z.move(H),G(),W}function V60(Z,J,$){return($?"":" ")+Z}var Rf=()=>{};function i3(Z){let J=Z.options.quote||'"';if(J!=='"'&&J!=="'")throw Error("Cannot serialize title with `"+J+"` for `options.quote`, expected `\"`, or `'`");return J}function xf(Z,J,$,Q){let X=i3($),Y=X==='"'?"Quote":"Apostrophe",w=$.enter("definition"),z=$.enter("label"),H=$.createTracker(Q),G=H.move("[");if(G+=H.move($.safe($.associationId(Z),{before:G,after:"]",...H.current()})),G+=H.move("]: "),z(),!Z.url||/[\0- \u007F]/.test(Z.url))z=$.enter("destinationLiteral"),G+=H.move("<"),G+=H.move($.safe(Z.url,{before:G,after:">",...H.current()})),G+=H.move(">");else z=$.enter("destinationRaw"),G+=H.move($.safe(Z.url,{before:G,after:Z.title?" ":`
|
|
55
|
+
`,...H.current()}));if(z(),Z.title)z=$.enter(`title${Y}`),G+=H.move(" "+X),G+=H.move($.safe(Z.title,{before:G,after:X,...H.current()})),G+=H.move(X),z();return w(),G}var yf=()=>{};function vf(Z){let J=Z.options.emphasis||"*";if(J!=="*"&&J!=="_")throw Error("Cannot serialize emphasis with `"+J+"` for `options.emphasis`, expected `*`, or `_`");return J}function g8(Z){return"&#x"+Z.toString(16).toUpperCase()+";"}function a3(Z,J,$){let Q=k6(Z),X=k6(J);if(Q===void 0)return X===void 0?$==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:X===1?{inside:!0,outside:!0}:{inside:!1,outside:!0};if(Q===1)return X===void 0?{inside:!1,outside:!1}:X===1?{inside:!0,outside:!0}:{inside:!1,outside:!1};return X===void 0?{inside:!1,outside:!1}:X===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var TN=U(()=>{GH()});function kN(Z,J,$,Q){let X=vf($),Y=$.enter("emphasis"),w=$.createTracker(Q),z=w.move(X),H=w.move($.containerPhrasing(Z,{after:X,before:z,...w.current()})),G=H.charCodeAt(0),W=a3(Q.before.charCodeAt(Q.before.length-1),G,X);if(W.inside)H=g8(G)+H.slice(1);let q=H.charCodeAt(H.length-1),K=a3(Q.after.charCodeAt(0),q,X);if(K.inside)H=H.slice(0,-1)+g8(q);let B=w.move(X);return Y(),$.attentionEncodeSurroundingInfo={after:K.outside,before:W.outside},z+H+B}function F60(Z,J,$){return $.options.emphasis||"*"}var gf=U(()=>{TN();kN.peek=F60});function ff(Z,J){let $=!1;return C6(Z,function(Q){if("value"in Q&&/\r?\n|\r/.test(Q.value)||Q.type==="break")return $=!0,z9}),Boolean((!Z.depth||Z.depth<3)&&e7(Z)&&(J.options.setext||$))}var mf=U(()=>{u$();wH()});function pf(Z,J,$,Q){let X=Math.max(Math.min(6,Z.depth||1),1),Y=$.createTracker(Q);if(ff(Z,$)){let W=$.enter("headingSetext"),q=$.enter("phrasing"),K=$.containerPhrasing(Z,{...Y.current(),before:`
|
|
56
|
+
`,after:`
|
|
57
|
+
`});return q(),W(),K+`
|
|
58
|
+
`+(X===1?"=":"-").repeat(K.length-(Math.max(K.lastIndexOf("\r"),K.lastIndexOf(`
|
|
59
|
+
`))+1))}let w="#".repeat(X),z=$.enter("headingAtx"),H=$.enter("phrasing");Y.move(w+" ");let G=$.containerPhrasing(Z,{before:"# ",after:`
|
|
60
|
+
`,...Y.current()});if(/^[\t ]/.test(G))G=g8(G.charCodeAt(0))+G.slice(1);if(G=G?w+" "+G:w,$.options.closeAtx)G+=" "+w;return H(),z(),G}var uf=U(()=>{mf()});function CN(Z){return Z.value||""}function N60(){return"<"}var cf=U(()=>{CN.peek=N60});function SN(Z,J,$,Q){let X=i3($),Y=X==='"'?"Quote":"Apostrophe",w=$.enter("image"),z=$.enter("label"),H=$.createTracker(Q),G=H.move("![");if(G+=H.move($.safe(Z.alt,{before:G,after:"]",...H.current()})),G+=H.move("]("),z(),!Z.url&&Z.title||/[\0- \u007F]/.test(Z.url))z=$.enter("destinationLiteral"),G+=H.move("<"),G+=H.move($.safe(Z.url,{before:G,after:">",...H.current()})),G+=H.move(">");else z=$.enter("destinationRaw"),G+=H.move($.safe(Z.url,{before:G,after:Z.title?" ":")",...H.current()}));if(z(),Z.title)z=$.enter(`title${Y}`),G+=H.move(" "+X),G+=H.move($.safe(Z.title,{before:G,after:X,...H.current()})),G+=H.move(X),z();return G+=H.move(")"),w(),G}function _60(){return"!"}var df=U(()=>{SN.peek=_60});function EN(Z,J,$,Q){let X=Z.referenceType,Y=$.enter("imageReference"),w=$.enter("label"),z=$.createTracker(Q),H=z.move("!["),G=$.safe(Z.alt,{before:H,after:"]",...z.current()});H+=z.move(G+"]["),w();let W=$.stack;$.stack=[],w=$.enter("reference");let q=$.safe($.associationId(Z),{before:H,after:"]",...z.current()});if(w(),$.stack=W,Y(),X==="full"||!G||G!==q)H+=z.move(q+"]");else if(X==="shortcut")H=H.slice(0,-1);else H+=z.move("]");return H}function L60(){return"!"}var lf=U(()=>{EN.peek=L60});function hN(Z,J,$){let Q=Z.value||"",X="`",Y=-1;while(new RegExp("(^|[^`])"+X+"([^`]|$)").test(Q))X+="`";if(/[^ \r\n]/.test(Q)&&(/^[ \r\n]/.test(Q)&&/[ \r\n]$/.test(Q)||/^`|`$/.test(Q)))Q=" "+Q+" ";while(++Y<$.unsafe.length){let w=$.unsafe[Y],z=$.compilePattern(w),H;if(!w.atBreak)continue;while(H=z.exec(Q)){let G=H.index;if(Q.charCodeAt(G)===10&&Q.charCodeAt(G-1)===13)G--;Q=Q.slice(0,G)+" "+Q.slice(H.index+1)}}return X+Q+X}function A60(){return"`"}var rf=U(()=>{hN.peek=A60});function RN(Z,J){let $=e7(Z);return Boolean(!J.options.resourceLink&&Z.url&&!Z.title&&Z.children&&Z.children.length===1&&Z.children[0].type==="text"&&($===Z.url||"mailto:"+$===Z.url)&&/^[a-z][a-z+.-]+:/i.test(Z.url)&&!/[\0- <>\u007F]/.test(Z.url))}var af=U(()=>{wH()});function xN(Z,J,$,Q){let X=i3($),Y=X==='"'?"Quote":"Apostrophe",w=$.createTracker(Q),z,H;if(RN(Z,$)){let W=$.stack;$.stack=[],z=$.enter("autolink");let q=w.move("<");return q+=w.move($.containerPhrasing(Z,{before:q,after:">",...w.current()})),q+=w.move(">"),z(),$.stack=W,q}z=$.enter("link"),H=$.enter("label");let G=w.move("[");if(G+=w.move($.containerPhrasing(Z,{before:G,after:"](",...w.current()})),G+=w.move("]("),H(),!Z.url&&Z.title||/[\0- \u007F]/.test(Z.url))H=$.enter("destinationLiteral"),G+=w.move("<"),G+=w.move($.safe(Z.url,{before:G,after:">",...w.current()})),G+=w.move(">");else H=$.enter("destinationRaw"),G+=w.move($.safe(Z.url,{before:G,after:Z.title?" ":")",...w.current()}));if(H(),Z.title)H=$.enter(`title${Y}`),G+=w.move(" "+X),G+=w.move($.safe(Z.title,{before:G,after:X,...w.current()})),G+=w.move(X),H();return G+=w.move(")"),z(),G}function D60(Z,J,$){return RN(Z,$)?"<":"["}var sf=U(()=>{af();xN.peek=D60});function yN(Z,J,$,Q){let X=Z.referenceType,Y=$.enter("linkReference"),w=$.enter("label"),z=$.createTracker(Q),H=z.move("["),G=$.containerPhrasing(Z,{before:H,after:"]",...z.current()});H+=z.move(G+"]["),w();let W=$.stack;$.stack=[],w=$.enter("reference");let q=$.safe($.associationId(Z),{before:H,after:"]",...z.current()});if(w(),$.stack=W,Y(),X==="full"||!G||G!==q)H+=z.move(q+"]");else if(X==="shortcut")H=H.slice(0,-1);else H+=z.move("]");return H}function M60(){return"["}var of=U(()=>{yN.peek=M60});function s3(Z){let J=Z.options.bullet||"*";if(J!=="*"&&J!=="+"&&J!=="-")throw Error("Cannot serialize items with `"+J+"` for `options.bullet`, expected `*`, `+`, or `-`");return J}function nf(Z){let J=s3(Z),$=Z.options.bulletOther;if(!$)return J==="*"?"-":"*";if($!=="*"&&$!=="+"&&$!=="-")throw Error("Cannot serialize items with `"+$+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if($===J)throw Error("Expected `bullet` (`"+J+"`) and `bulletOther` (`"+$+"`) to be different");return $}var tf=()=>{};function ef(Z){let J=Z.options.bulletOrdered||".";if(J!=="."&&J!==")")throw Error("Cannot serialize items with `"+J+"` for `options.bulletOrdered`, expected `.` or `)`");return J}function sH(Z){let J=Z.options.rule||"*";if(J!=="*"&&J!=="-"&&J!=="_")throw Error("Cannot serialize rules with `"+J+"` for `options.rule`, expected `*`, `-`, or `_`");return J}function Zm(Z,J,$,Q){let X=$.enter("list"),Y=$.bulletCurrent,w=Z.ordered?ef($):s3($),z=Z.ordered?w==="."?")":".":nf($),H=J&&$.bulletLastUsed?w===$.bulletLastUsed:!1;if(!Z.ordered){let W=Z.children?Z.children[0]:void 0;if((w==="*"||w==="-")&&W&&(!W.children||!W.children[0])&&$.stack[$.stack.length-1]==="list"&&$.stack[$.stack.length-2]==="listItem"&&$.stack[$.stack.length-3]==="list"&&$.stack[$.stack.length-4]==="listItem"&&$.indexStack[$.indexStack.length-1]===0&&$.indexStack[$.indexStack.length-2]===0&&$.indexStack[$.indexStack.length-3]===0)H=!0;if(sH($)===w&&W){let q=-1;while(++q<Z.children.length){let K=Z.children[q];if(K&&K.type==="listItem"&&K.children&&K.children[0]&&K.children[0].type==="thematicBreak"){H=!0;break}}}}if(H)w=z;$.bulletCurrent=w;let G=$.containerFlow(Z,Q);return $.bulletLastUsed=w,$.bulletCurrent=Y,X(),G}var Jm=U(()=>{tf()});function $m(Z){let J=Z.options.listItemIndent||"one";if(J!=="tab"&&J!=="one"&&J!=="mixed")throw Error("Cannot serialize items with `"+J+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return J}function Qm(Z,J,$,Q){let X=$m($),Y=$.bulletCurrent||s3($);if(J&&J.type==="list"&&J.ordered)Y=(typeof J.start==="number"&&J.start>-1?J.start:1)+($.options.incrementListMarker===!1?0:J.children.indexOf(Z))+Y;let w=Y.length+1;if(X==="tab"||X==="mixed"&&(J&&J.type==="list"&&J.spread||Z.spread))w=Math.ceil(w/4)*4;let z=$.createTracker(Q);z.move(Y+" ".repeat(w-Y.length)),z.shift(w);let H=$.enter("listItem"),G=$.indentLines($.containerFlow(Z,z.current()),W);return H(),G;function W(q,K,B){if(K)return(B?"":" ".repeat(w))+q;return(B?Y:Y+" ".repeat(w-Y.length))+q}}var Xm=()=>{};function wm(Z,J,$,Q){let X=$.enter("paragraph"),Y=$.enter("phrasing"),w=$.containerPhrasing(Z,Q);return Y(),X(),w}var vN;var Ym=U(()=>{m$();vN=Q6(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"])});var zm=U(()=>{Ym()});function Hm(Z,J,$,Q){return(Z.children.some(function(w){return vN(w)})?$.containerPhrasing:$.containerFlow).call($,Z,Q)}var Gm=U(()=>{zm()});function Wm(Z){let J=Z.options.strong||"*";if(J!=="*"&&J!=="_")throw Error("Cannot serialize strong with `"+J+"` for `options.strong`, expected `*`, or `_`");return J}function gN(Z,J,$,Q){let X=Wm($),Y=$.enter("strong"),w=$.createTracker(Q),z=w.move(X+X),H=w.move($.containerPhrasing(Z,{after:X,before:z,...w.current()})),G=H.charCodeAt(0),W=a3(Q.before.charCodeAt(Q.before.length-1),G,X);if(W.inside)H=g8(G)+H.slice(1);let q=H.charCodeAt(H.length-1),K=a3(Q.after.charCodeAt(0),q,X);if(K.inside)H=H.slice(0,-1)+g8(q);let B=w.move(X+X);return Y(),$.attentionEncodeSurroundingInfo={after:K.outside,before:W.outside},z+H+B}function O60(Z,J,$){return $.options.strong||"*"}var qm=U(()=>{TN();gN.peek=O60});function Km(Z,J,$,Q){return $.safe(Z.value,Q)}function Bm(Z){let J=Z.options.ruleRepetition||3;if(J<3)throw Error("Cannot serialize rules with repetition `"+J+"` for `options.ruleRepetition`, expected `3` or more");return J}function Um(Z,J,$){let Q=(sH($)+($.options.ruleSpaces?" ":"")).repeat(Bm($));return $.options.ruleSpaces?Q.slice(0,-1):Q}var Vm=()=>{};var a$;var Fm=U(()=>{kf();Rf();yf();gf();uf();cf();df();lf();rf();sf();of();Jm();Xm();Gm();qm();Vm();a$={blockquote:Pf,break:IN,code:hf,definition:xf,emphasis:kN,hardBreak:IN,heading:pf,html:CN,image:SN,imageReference:EN,inlineCode:hN,link:xN,linkReference:yN,list:Zm,listItem:Qm,paragraph:wm,root:Hm,strong:gN,text:Km,thematicBreak:Um}});var fN=U(()=>{Fm()});function pN(){return{enter:{table:j60,tableData:Nm,tableHeader:Nm,tableRow:P60},exit:{codeText:I60,table:b60,tableData:mN,tableHeader:mN,tableRow:mN}}}function j60(Z){let J=Z._align;B1(J,"expected `_align` on table"),this.enter({type:"table",align:J.map(function($){return $==="none"?null:$}),children:[]},Z),this.data.inTable=!0}function b60(Z){this.exit(Z),this.data.inTable=void 0}function P60(Z){this.enter({type:"tableRow",children:[]},Z)}function mN(Z){this.exit(Z)}function Nm(Z){this.enter({type:"tableCell",children:[]},Z)}function I60(Z){let J=this.resume();if(this.data.inTable)J=J.replace(/\\([\\|])/g,T60);let $=this.stack[this.stack.length-1];B1($.type==="inlineCode"),$.value=J,this.exit(Z)}function T60(Z,J){return J==="|"?J:Z}function uN(Z){let J=Z||{},$=J.tableCellPadding,Q=J.tablePipeAlign,X=J.stringLength,Y=$?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
61
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:K,table:w,tableCell:H,tableRow:z}};function w(B,V,F,_){return G(W(B,F,_),B.align)}function z(B,V,F,_){let N=q(B,F,_),L=G([N]);return L.slice(0,L.indexOf(`
|
|
62
|
+
`))}function H(B,V,F,_){let N=F.enter("tableCell"),L=F.enter("phrasing"),M=F.containerPhrasing(B,{..._,before:Y,after:Y});return L(),N(),M}function G(B,V){return bf(B,{align:V,alignDelimiters:Q,padding:$,stringLength:X})}function W(B,V,F){let _=B.children,N=-1,L=[],M=V.enter("table");while(++N<_.length)L[N]=q(_[N],V,F);return M(),L}function q(B,V,F){let _=B.children,N=-1,L=[],M=V.enter("tableRow");while(++N<_.length)L[N]=H(_[N],B,V,F);return M(),L}function K(B,V,F){let _=a$.inlineCode(B,V,F);if(F.stack.includes("tableCell"))_=_.replace(/\|/g,"\\$&");return _}}var _m=U(()=>{fN()});var Lm=U(()=>{_m()});function cN(){return{exit:{taskListCheckValueChecked:Am,taskListCheckValueUnchecked:Am,paragraph:k60}}}function dN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:C60}}}function Am(Z){let J=this.stack[this.stack.length-2];B1(J.type==="listItem"),J.checked=Z.type==="taskListCheckValueChecked"}function k60(Z){let J=this.stack[this.stack.length-2];if(J&&J.type==="listItem"&&typeof J.checked==="boolean"){let $=this.stack[this.stack.length-1];B1($.type==="paragraph");let Q=$.children[0];if(Q&&Q.type==="text"){let X=J.children,Y=-1,w;while(++Y<X.length){let z=X[Y];if(z.type==="paragraph"){w=z;break}}if(w===$){if(Q.value=Q.value.slice(1),Q.value.length===0)$.children.shift();else if($.position&&Q.position&&typeof Q.position.start.offset==="number")Q.position.start.column++,Q.position.start.offset++,$.position.start=Object.assign({},Q.position.start)}}}this.exit(Z)}function C60(Z,J,$,Q){let X=Z.children[0],Y=typeof Z.checked==="boolean"&&X&&X.type==="paragraph",w="["+(Z.checked?"x":" ")+"] ",z=$.createTracker(Q);if(Y)z.move(w);let H=a$.listItem(Z,J,$,{...Q,...z.current()});if(Y)H=H.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,G);return H;function G(W){return W+w}}var Dm=U(()=>{fN()});var Mm=U(()=>{Dm()});function lN(){return[DN(),ON(),bN(),pN(),cN()]}function rN(Z){return{extensions:[MN(),jN(Z),PN(),uN(Z),dN()]}}var Om=U(()=>{Ff();Af();Of();Lm();Mm()});var jm=U(()=>{Om()});function aN(){return{text:w6}}function h60(Z,J,$){let Q=this,X,Y;return w;function w(q){if(!iN(q)||!Em.call(Q,Q.previous)||sN(Q.events))return $(q);return Z.enter("literalAutolink"),Z.enter("literalAutolinkEmail"),z(q)}function z(q){if(iN(q))return Z.consume(q),z;if(q===64)return Z.consume(q),H;return $(q)}function H(q){if(q===46)return Z.check(E60,W,G)(q);if(q===45||q===95||n1(q))return Y=!0,Z.consume(q),H;return W(q)}function G(q){return Z.consume(q),X=!0,H}function W(q){if(Y&&X&&L5(Q.previous))return Z.exit("literalAutolinkEmail"),Z.exit("literalAutolink"),J(q);return $(q)}}function R60(Z,J,$){let Q=this;return X;function X(w){if(w!==87&&w!==119||!Cm.call(Q,Q.previous)||sN(Q.events))return $(w);return Z.enter("literalAutolink"),Z.enter("literalAutolinkWww"),Z.check(S60,Z.attempt(bm,Z.attempt(Pm,Y),$),$)(w)}function Y(w){return Z.exit("literalAutolinkWww"),Z.exit("literalAutolink"),J(w)}}function x60(Z,J,$){let Q=this,X="",Y=!1;return w;function w(q){if((q===72||q===104)&&Sm.call(Q,Q.previous)&&!sN(Q.events))return Z.enter("literalAutolink"),Z.enter("literalAutolinkHttp"),X+=String.fromCodePoint(q),Z.consume(q),z;return $(q)}function z(q){if(L5(q)&&X.length<5)return X+=String.fromCodePoint(q),Z.consume(q),z;if(q===58){let K=X.toLowerCase();if(K==="http"||K==="https")return Z.consume(q),H}return $(q)}function H(q){if(q===47){if(Z.consume(q),Y)return G;return Y=!0,H}return $(q)}function G(q){return q===null||Z9(q)||e0(q)||J6(q)||J9(q)?$(q):Z.attempt(bm,Z.attempt(Pm,W),$)(q)}function W(q){return Z.exit("literalAutolinkHttp"),Z.exit("literalAutolink"),J(q)}}function y60(Z,J,$){let Q=0;return X;function X(w){if((w===87||w===119)&&Q<3)return Q++,Z.consume(w),X;if(w===46&&Q===3)return Z.consume(w),Y;return $(w)}function Y(w){return w===null?$(w):J(w)}}function v60(Z,J,$){let Q,X,Y;return w;function w(G){if(G===46||G===95)return Z.check(Im,H,z)(G);if(G===null||e0(G)||J6(G)||G!==45&&J9(G))return H(G);return Y=!0,Z.consume(G),w}function z(G){if(G===95)Q=!0;else X=Q,Q=void 0;return Z.consume(G),w}function H(G){if(X||Q||!Y)return $(G);return J(G)}}function g60(Z,J){let $=0,Q=0;return X;function X(w){if(w===40)return $++,Z.consume(w),X;if(w===41&&Q<$)return Y(w);if(w===33||w===34||w===38||w===39||w===41||w===42||w===44||w===46||w===58||w===59||w===60||w===63||w===93||w===95||w===126)return Z.check(Im,J,Y)(w);if(w===null||e0(w)||J6(w))return J(w);return Z.consume(w),X}function Y(w){if(w===41)Q++;return Z.consume(w),X}}function f60(Z,J,$){return Q;function Q(z){if(z===33||z===34||z===39||z===41||z===42||z===44||z===46||z===58||z===59||z===63||z===95||z===126)return Z.consume(z),Q;if(z===38)return Z.consume(z),Y;if(z===93)return Z.consume(z),X;if(z===60||z===null||e0(z)||J6(z))return J(z);return $(z)}function X(z){if(z===null||z===40||z===91||e0(z)||J6(z))return J(z);return Q(z)}function Y(z){return L5(z)?w(z):$(z)}function w(z){if(z===59)return Z.consume(z),Q;if(L5(z))return Z.consume(z),w;return $(z)}}function m60(Z,J,$){return Q;function Q(Y){return Z.consume(Y),X}function X(Y){return n1(Y)?$(Y):J(Y)}}function Cm(Z){return Z===null||Z===40||Z===42||Z===95||Z===91||Z===93||Z===126||e0(Z)}function Sm(Z){return!L5(Z)}function Em(Z){return!(Z===47||iN(Z))}function iN(Z){return Z===43||Z===45||Z===46||Z===95||n1(Z)}function sN(Z){let J=Z.length,$=!1;while(J--){let Q=Z[J][1];if((Q.type==="labelLink"||Q.type==="labelImage")&&!Q._balanced){$=!0;break}if(Q._gfmAutolinkLiteralWalkedInto){$=!1;break}}if(Z.length>0&&!$)Z[Z.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return $}var S60,bm,Pm,Im,E60,Tm,km,E6,w6,W9=48;var hm=U(()=>{z1();S60={tokenize:y60,partial:!0},bm={tokenize:v60,partial:!0},Pm={tokenize:g60,partial:!0},Im={tokenize:f60,partial:!0},E60={tokenize:m60,partial:!0},Tm={name:"wwwAutolink",tokenize:R60,previous:Cm},km={name:"protocolAutolink",tokenize:x60,previous:Sm},E6={name:"emailAutolink",tokenize:h60,previous:Em},w6={};while(W9<123)if(w6[W9]=E6,W9++,W9===58)W9=65;else if(W9===91)W9=97;w6[43]=E6;w6[45]=E6;w6[46]=E6;w6[95]=E6;w6[72]=[E6,km];w6[104]=[E6,km];w6[87]=[E6,Tm];w6[119]=[E6,Tm]});var Rm=U(()=>{hm()});function oN(){return{document:{[91]:{name:"gfmFootnoteDefinition",tokenize:l60,continuation:{tokenize:r60},exit:i60}},text:{[91]:{name:"gfmFootnoteCall",tokenize:d60},[93]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:u60,resolveTo:c60}}}}function u60(Z,J,$){let Q=this,X=Q.events.length,Y=Q.parser.gfmFootnotes||(Q.parser.gfmFootnotes=[]),w;while(X--){let H=Q.events[X][1];if(H.type==="labelImage"){w=H;break}if(H.type==="gfmFootnoteCall"||H.type==="labelLink"||H.type==="label"||H.type==="image"||H.type==="link")break}return z;function z(H){if(!w||!w._balanced)return $(H);let G=u5(Q.sliceSerialize({start:w.end,end:Q.now()}));if(G.codePointAt(0)!==94||!Y.includes(G.slice(1)))return $(H);return Z.enter("gfmFootnoteCallLabelMarker"),Z.consume(H),Z.exit("gfmFootnoteCallLabelMarker"),J(H)}}function c60(Z,J){let $=Z.length,Q;while($--)if(Z[$][1].type==="labelImage"&&Z[$][0]==="enter"){Q=Z[$][1];break}Z[$+1][1].type="data",Z[$+3][1].type="gfmFootnoteCallLabelMarker";let X={type:"gfmFootnoteCall",start:Object.assign({},Z[$+3][1].start),end:Object.assign({},Z[Z.length-1][1].end)},Y={type:"gfmFootnoteCallMarker",start:Object.assign({},Z[$+3][1].end),end:Object.assign({},Z[$+3][1].end)};Y.end.column++,Y.end.offset++,Y.end._bufferIndex++;let w={type:"gfmFootnoteCallString",start:Object.assign({},Y.end),end:Object.assign({},Z[Z.length-1][1].start)},z={type:"chunkString",contentType:"string",start:Object.assign({},w.start),end:Object.assign({},w.end)},H=[Z[$+1],Z[$+2],["enter",X,J],Z[$+3],Z[$+4],["enter",Y,J],["exit",Y,J],["enter",w,J],["enter",z,J],["exit",z,J],["exit",w,J],Z[Z.length-2],Z[Z.length-1],["exit",X,J]];return Z.splice($,Z.length-$+1,...H),Z}function d60(Z,J,$){let Q=this,X=Q.parser.gfmFootnotes||(Q.parser.gfmFootnotes=[]),Y=0,w;return z;function z(q){return Z.enter("gfmFootnoteCall"),Z.enter("gfmFootnoteCallLabelMarker"),Z.consume(q),Z.exit("gfmFootnoteCallLabelMarker"),H}function H(q){if(q!==94)return $(q);return Z.enter("gfmFootnoteCallMarker"),Z.consume(q),Z.exit("gfmFootnoteCallMarker"),Z.enter("gfmFootnoteCallString"),Z.enter("chunkString").contentType="string",G}function G(q){if(Y>999||q===93&&!w||q===null||q===91||e0(q))return $(q);if(q===93){Z.exit("chunkString");let K=Z.exit("gfmFootnoteCallString");if(!X.includes(u5(Q.sliceSerialize(K))))return $(q);return Z.enter("gfmFootnoteCallLabelMarker"),Z.consume(q),Z.exit("gfmFootnoteCallLabelMarker"),Z.exit("gfmFootnoteCall"),J}if(!e0(q))w=!0;return Y++,Z.consume(q),q===92?W:G}function W(q){if(q===91||q===92||q===93)return Z.consume(q),Y++,G;return G(q)}}function l60(Z,J,$){let Q=this,X=Q.parser.gfmFootnotes||(Q.parser.gfmFootnotes=[]),Y,w=0,z;return H;function H(V){return Z.enter("gfmFootnoteDefinition")._container=!0,Z.enter("gfmFootnoteDefinitionLabel"),Z.enter("gfmFootnoteDefinitionLabelMarker"),Z.consume(V),Z.exit("gfmFootnoteDefinitionLabelMarker"),G}function G(V){if(V===94)return Z.enter("gfmFootnoteDefinitionMarker"),Z.consume(V),Z.exit("gfmFootnoteDefinitionMarker"),Z.enter("gfmFootnoteDefinitionLabelString"),Z.enter("chunkString").contentType="string",W;return $(V)}function W(V){if(w>999||V===93&&!z||V===null||V===91||e0(V))return $(V);if(V===93){Z.exit("chunkString");let F=Z.exit("gfmFootnoteDefinitionLabelString");return Y=u5(Q.sliceSerialize(F)),Z.enter("gfmFootnoteDefinitionLabelMarker"),Z.consume(V),Z.exit("gfmFootnoteDefinitionLabelMarker"),Z.exit("gfmFootnoteDefinitionLabel"),K}if(!e0(V))z=!0;return w++,Z.consume(V),V===92?q:W}function q(V){if(V===91||V===92||V===93)return Z.consume(V),w++,W;return W(V)}function K(V){if(V===58){if(Z.enter("definitionMarker"),Z.consume(V),Z.exit("definitionMarker"),!X.includes(Y))X.push(Y);return k0(Z,B,"gfmFootnoteDefinitionWhitespace")}return $(V)}function B(V){return J(V)}}function r60(Z,J,$){return Z.check($6,J,Z.attempt(p60,J,$))}function i60(Z){Z.exit("gfmFootnoteDefinition")}function a60(Z,J,$){let Q=this;return k0(Z,X,"gfmFootnoteDefinitionIndent",5);function X(Y){let w=Q.events[Q.events.length-1];return w&&w[1].type==="gfmFootnoteDefinitionIndent"&&w[2].sliceSerialize(w[1],!0).length===4?J(Y):$(Y)}}var p60;var xm=U(()=>{DH();Z5();z1();p60={tokenize:a60,partial:!0}});var ym=U(()=>{xm()});function nN(Z){let $=(Z||{}).singleTilde,Q={name:"strikethrough",tokenize:Y,resolveAll:X};if($===null||$===void 0)$=!0;return{text:{[126]:Q},insideSpan:{null:[Q]},attentionMarkers:{null:[126]}};function X(w,z){let H=-1;while(++H<w.length)if(w[H][0]==="enter"&&w[H][1].type==="strikethroughSequenceTemporary"&&w[H][1]._close){let G=H;while(G--)if(w[G][0]==="exit"&&w[G][1].type==="strikethroughSequenceTemporary"&&w[G][1]._open&&w[H][1].end.offset-w[H][1].start.offset===w[G][1].end.offset-w[G][1].start.offset){w[H][1].type="strikethroughSequence",w[G][1].type="strikethroughSequence";let W={type:"strikethrough",start:Object.assign({},w[G][1].start),end:Object.assign({},w[H][1].end)},q={type:"strikethroughText",start:Object.assign({},w[G][1].end),end:Object.assign({},w[H][1].start)},K=[["enter",W,z],["enter",w[G][1],z],["exit",w[G][1],z],["enter",q,z]],B=z.parser.constructs.insideSpan.null;if(B)e1(K,K.length,0,x8(B,w.slice(G+1,H),z));e1(K,K.length,0,[["exit",q,z],["enter",w[H][1],z],["exit",w[H][1],z],["exit",W,z]]),e1(w,G-1,H-G+3,K),H=G+K.length-2;break}}H=-1;while(++H<w.length)if(w[H][1].type==="strikethroughSequenceTemporary")w[H][1].type="data";return w}function Y(w,z,H){let G=this.previous,W=this.events,q=0;return K;function K(V){if(G===126&&W[W.length-1][1].type!=="characterEscape")return H(V);return w.enter("strikethroughSequenceTemporary"),B(V)}function B(V){let F=k6(G);if(V===126){if(q>1)return H(V);return w.consume(V),q++,B}if(q<2&&!$)return H(V);let _=w.exit("strikethroughSequenceTemporary"),N=k6(V);return _._open=!N||N===2&&Boolean(F),_._close=!F||F===2&&Boolean(N),z(V)}}}var vm=U(()=>{GH()});var gm=U(()=>{vm()});class tN{constructor(){this.map=[]}add(Z,J,$){s60(this,Z,J,$)}consume(Z){if(this.map.sort(function(X,Y){return X[0]-Y[0]}),this.map.length===0)return;let J=this.map.length,$=[];while(J>0)J-=1,$.push(Z.slice(this.map[J][0]+this.map[J][1]),this.map[J][2]),Z.length=this.map[J][0];$.push(Z.slice()),Z.length=0;let Q=$.pop();while(Q){for(let X of Q)Z.push(X);Q=$.pop()}this.map.length=0}}function s60(Z,J,$,Q){let X=0;if($===0&&Q.length===0)return;while(X<Z.map.length){if(Z.map[X][0]===J){Z.map[X][1]+=$,Z.map[X][2].push(...Q);return}X+=1}Z.map.push([J,$,Q])}function fm(Z,J){let $=!1,Q=[];while(J<Z.length){let X=Z[J];if($){if(X[0]==="enter"){if(X[1].type==="tableContent")Q.push(Z[J+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(X[1].type==="tableContent"){if(Z[J-1][1].type==="tableDelimiterMarker"){let Y=Q.length-1;Q[Y]=Q[Y]==="left"?"center":"right"}}else if(X[1].type==="tableDelimiterRow")break}else if(X[0]==="enter"&&X[1].type==="tableDelimiterRow")$=!0;J+=1}return Q}function eN(){return{flow:{null:{name:"table",tokenize:o60,resolveAll:n60}}}}function o60(Z,J,$){let Q=this,X=0,Y=0,w;return z;function z(I){let d=Q.events.length-1;while(d>-1){let y=Q.events[d][1].type;if(y==="lineEnding"||y==="linePrefix")d--;else break}let v=d>-1?Q.events[d][1].type:null,C=v==="tableHead"||v==="tableRow"?D:H;if(C===D&&Q.parser.lazy[Q.now().line])return $(I);return C(I)}function H(I){return Z.enter("tableHead"),Z.enter("tableRow"),G(I)}function G(I){if(I===124)return W(I);return w=!0,Y+=1,W(I)}function W(I){if(I===null)return $(I);if(A0(I)){if(Y>1)return Y=0,Q.interrupt=!0,Z.exit("tableRow"),Z.enter("lineEnding"),Z.consume(I),Z.exit("lineEnding"),B;return $(I)}if(C0(I))return k0(Z,W,"whitespace")(I);if(Y+=1,w)w=!1,X+=1;if(I===124)return Z.enter("tableCellDivider"),Z.consume(I),Z.exit("tableCellDivider"),w=!0,W;return Z.enter("data"),q(I)}function q(I){if(I===null||I===124||e0(I))return Z.exit("data"),W(I);return Z.consume(I),I===92?K:q}function K(I){if(I===92||I===124)return Z.consume(I),q;return q(I)}function B(I){if(Q.interrupt=!1,Q.parser.lazy[Q.now().line])return $(I);if(Z.enter("tableDelimiterRow"),w=!1,C0(I))return k0(Z,V,"linePrefix",Q.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I);return V(I)}function V(I){if(I===45||I===58)return _(I);if(I===124)return w=!0,Z.enter("tableCellDivider"),Z.consume(I),Z.exit("tableCellDivider"),F;return O(I)}function F(I){if(C0(I))return k0(Z,_,"whitespace")(I);return _(I)}function _(I){if(I===58)return Y+=1,w=!0,Z.enter("tableDelimiterMarker"),Z.consume(I),Z.exit("tableDelimiterMarker"),N;if(I===45)return Y+=1,N(I);if(I===null||A0(I))return A(I);return O(I)}function N(I){if(I===45)return Z.enter("tableDelimiterFiller"),L(I);return O(I)}function L(I){if(I===45)return Z.consume(I),L;if(I===58)return w=!0,Z.exit("tableDelimiterFiller"),Z.enter("tableDelimiterMarker"),Z.consume(I),Z.exit("tableDelimiterMarker"),M;return Z.exit("tableDelimiterFiller"),M(I)}function M(I){if(C0(I))return k0(Z,A,"whitespace")(I);return A(I)}function A(I){if(I===124)return V(I);if(I===null||A0(I)){if(!w||X!==Y)return O(I);return Z.exit("tableDelimiterRow"),Z.exit("tableHead"),J(I)}return O(I)}function O(I){return $(I)}function D(I){return Z.enter("tableRow"),k(I)}function k(I){if(I===124)return Z.enter("tableCellDivider"),Z.consume(I),Z.exit("tableCellDivider"),k;if(I===null||A0(I))return Z.exit("tableRow"),J(I);if(C0(I))return k0(Z,k,"whitespace")(I);return Z.enter("data"),b(I)}function b(I){if(I===null||I===124||e0(I))return Z.exit("data"),k(I);return Z.consume(I),I===92?h:b}function h(I){if(I===92||I===124)return Z.consume(I),b;return b(I)}}function n60(Z,J){let $=-1,Q=!0,X=0,Y=[0,0,0,0],w=[0,0,0,0],z=!1,H=0,G,W,q,K=new tN;while(++$<Z.length){let B=Z[$],V=B[1];if(B[0]==="enter"){if(V.type==="tableHead"){if(z=!1,H!==0)mm(K,J,H,G,W),W=void 0,H=0;G={type:"table",start:Object.assign({},V.start),end:Object.assign({},V.end)},K.add($,0,[["enter",G,J]])}else if(V.type==="tableRow"||V.type==="tableDelimiterRow"){if(Q=!0,q=void 0,Y=[0,0,0,0],w=[0,$+1,0,0],z)z=!1,W={type:"tableBody",start:Object.assign({},V.start),end:Object.assign({},V.end)},K.add($,0,[["enter",W,J]]);X=V.type==="tableDelimiterRow"?2:W?3:1}else if(X&&(V.type==="data"||V.type==="tableDelimiterMarker"||V.type==="tableDelimiterFiller")){if(Q=!1,w[2]===0){if(Y[1]!==0)w[0]=w[1],q=oH(K,J,Y,X,void 0,q),Y=[0,0,0,0];w[2]=$}}else if(V.type==="tableCellDivider")if(Q)Q=!1;else{if(Y[1]!==0)w[0]=w[1],q=oH(K,J,Y,X,void 0,q);Y=w,w=[Y[1],$,0,0]}}else if(V.type==="tableHead")z=!0,H=$;else if(V.type==="tableRow"||V.type==="tableDelimiterRow"){if(H=$,Y[1]!==0)w[0]=w[1],q=oH(K,J,Y,X,$,q);else if(w[1]!==0)q=oH(K,J,w,X,$,q);X=0}else if(X&&(V.type==="data"||V.type==="tableDelimiterMarker"||V.type==="tableDelimiterFiller"))w[3]=$}if(H!==0)mm(K,J,H,G,W);K.consume(J.events),$=-1;while(++$<J.events.length){let B=J.events[$];if(B[0]==="enter"&&B[1].type==="table")B[1]._align=fm(J.events,$)}return Z}function oH(Z,J,$,Q,X,Y){let w=Q===1?"tableHeader":Q===2?"tableDelimiter":"tableData",z="tableContent";if($[0]!==0)Y.end=Object.assign({},o3(J.events,$[0])),Z.add($[0],0,[["exit",Y,J]]);let H=o3(J.events,$[1]);if(Y={type:w,start:Object.assign({},H),end:Object.assign({},H)},Z.add($[1],0,[["enter",Y,J]]),$[2]!==0){let G=o3(J.events,$[2]),W=o3(J.events,$[3]),q={type:"tableContent",start:Object.assign({},G),end:Object.assign({},W)};if(Z.add($[2],0,[["enter",q,J]]),Q!==2){let K=J.events[$[2]],B=J.events[$[3]];if(K[1].end=Object.assign({},B[1].end),K[1].type="chunkText",K[1].contentType="text",$[3]>$[2]+1){let V=$[2]+1,F=$[3]-$[2]-1;Z.add(V,F,[])}}Z.add($[3]+1,0,[["exit",q,J]])}if(X!==void 0)Y.end=Object.assign({},o3(J.events,X)),Z.add(X,0,[["exit",Y,J]]),Y=void 0;return Y}function mm(Z,J,$,Q,X){let Y=[],w=o3(J.events,$);if(X)X.end=Object.assign({},w),Y.push(["exit",X,J]);Q.end=Object.assign({},w),Y.push(["exit",Q,J]),Z.add($+1,0,Y)}function o3(Z,J){let $=Z[J],Q=$[0]==="enter"?"start":"end";return $[1][Q]}var pm=U(()=>{Z5();z1()});var um=U(()=>{pm()});function Z_(){return{text:{[91]:t60}}}function e60(Z,J,$){let Q=this;return X;function X(H){if(Q.previous!==null||!Q._gfmTasklistFirstContentOfListItem)return $(H);return Z.enter("taskListCheck"),Z.enter("taskListCheckMarker"),Z.consume(H),Z.exit("taskListCheckMarker"),Y}function Y(H){if(e0(H))return Z.enter("taskListCheckValueUnchecked"),Z.consume(H),Z.exit("taskListCheckValueUnchecked"),w;if(H===88||H===120)return Z.enter("taskListCheckValueChecked"),Z.consume(H),Z.exit("taskListCheckValueChecked"),w;return $(H)}function w(H){if(H===93)return Z.enter("taskListCheckMarker"),Z.consume(H),Z.exit("taskListCheckMarker"),Z.exit("taskListCheck"),z;return $(H)}function z(H){if(A0(H))return J(H);if(C0(H))return Z.check({tokenize:Z80},J,$)(H);return $(H)}}function Z80(Z,J,$){return k0(Z,Q,"whitespace");function Q(X){return X===null?$(X):J(X)}}var t60;var cm=U(()=>{Z5();z1();t60={name:"tasklistCheck",tokenize:e60}});var dm=U(()=>{cm()});function lm(Z){return zH([aN(),oN(),nN(Z),eN(),Z_()])}var rm=U(()=>{UF();Rm();ym();gm();um();dm()});function nH(Z){let J=this,$=Z||J80,Q=J.data(),X=Q.micromarkExtensions||(Q.micromarkExtensions=[]),Y=Q.fromMarkdownExtensions||(Q.fromMarkdownExtensions=[]),w=Q.toMarkdownExtensions||(Q.toMarkdownExtensions=[]);X.push(lm($)),Y.push(lN()),w.push(rN($))}var J80;var im=U(()=>{jm();rm();J80={}});var am=U(()=>{im()});function sm({size:Z="sm",content:J}){return s$.jsx("div",{className:v0("prose prose-inherit",Z==="sm"&&"prose-sm"),children:s$.jsx(ZN,{remarkPlugins:$80,rehypePlugins:Q80,components:X80,children:J})})}var s$,$80,Q80,X80;var om=U(()=>{Ey();qf();am();k5();s$=P(G0(),1),$80=[nH],Q80=[aH],X80={pre({children:Z}){return s$.jsx("div",{className:"not-prose my-2 rounded-md border border-border bg-muted px-3 py-2.5",children:s$.jsx("pre",{className:"max-h-[300px] overflow-auto font-mono text-xs leading-relaxed whitespace-pre text-foreground/80",children:Z})})}}});var tm="/atlassian-b3tq39hs.png";var nm=()=>{};var Zp="/discord-vejhptwx.png";var em=()=>{};var $p="/figma-y9898rry.png";var Jp=()=>{};var Xp="/github-av5r5y3e.png";var Qp=()=>{};var Yp="/gitlab-4pv5vm6b.png";var wp=()=>{};var Hp="/granola-7j3b0nk2.png";var zp=()=>{};var Wp="/hubspot-hghcmc2t.png";var Gp=()=>{};var Kp="/linear-v9s3az2d.png";var qp=()=>{};var Up="/neon-zj4qar44.png";var Bp=()=>{};var Fp="/notion-w034c0b8.png";var Vp=()=>{};var _p="/sentry-hdwpmvek.png";var Np=()=>{};var Ap="/slack-1c1wj62s.png";var Lp=()=>{};var Mp="/stripe-zrfaqbj3.png";var Dp=()=>{};var jp="/supabase-4vg33zf2.png";var Op=()=>{};var Pp="/vercel-7d0ssw28.png";var bp=()=>{};function Ip(Z){return A80[Z.toLowerCase()]}function Tp(Z){return Z.split(/([_-])/).map((J)=>J.length>1?J[0].toUpperCase()+J.slice(1):J).join("")}var A80;var kp=U(()=>{nm();em();Jp();Qp();wp();zp();Gp();qp();Bp();Vp();Np();Lp();Dp();Op();bp();A80={atlassian:tm,discord:Zp,figma:$p,github:Xp,gitlab:Yp,granola:Hp,hubspot:Wp,linear:Kp,neon:Up,notion:Fp,sentry:_p,slack:Ap,stripe:Mp,supabase:jp,vercel:Pp}});function Sp(){return Y0.jsx("div",{className:"flex flex-1 flex-col items-center justify-center"})}function Ep(){return Y0.jsx("div",{className:"flex items-center gap-1.5 px-1 py-3",children:[0,1,2].map((Z)=>Y0.jsx("span",{className:"block h-1.5 w-1.5 rounded-full bg-ring",style:{animation:"pulse-dot 1.4s ease-in-out infinite",animationDelay:`${Z*0.2}s`}},Z))})}function J_({turn:Z}){if(Z.origin.kind==="replay")return null;if(Z.origin.kind==="synthetic")return null;if(Z.origin.kind==="subagent-prompt")return null;if(Z.role==="user"&&Z.origin.kind==="user-input"){let J=Z.parts.filter(($)=>$.type==="text").map(($)=>$.type==="text"?$.text:"").join(`
|
|
63
|
+
`);if(!J)return null;return Y0.jsx("p",{className:"ml-8 self-end rounded-md bg-black/[0.07] px-4 py-2 text-sm leading-normal whitespace-pre-wrap",children:J})}return Y0.jsx("div",{className:"flex flex-col",children:Z.parts.map((J,$)=>{let X=($>0?Z.parts[$-1]:null)?.type==="tool-call"&&J.type==="tool-call";return Y0.jsx("div",{className:$===0?"":X?"mt-1":"mt-3",children:Y0.jsx(D80,{part:J})},$)})})}function D80({part:Z}){switch(Z.type){case"text":return Y0.jsx(sm,{content:Z.text});case"reasoning":return Y0.jsx(M80,{text:Z.text,redacted:Z.redacted});case"tool-call":return Y0.jsx(b80,{call:Z.call});case"file":return Y0.jsx(O80,{mediaType:Z.mediaType,url:Z.url,filename:Z.filename});case"source-url":return Y0.jsx(Cp,{url:Z.url,title:Z.title});case"source-document":return Y0.jsx(Cp,{url:"#",title:Z.title});case"data":return Y0.jsx(j80,{name:Z.name,data:Z.data})}}function M80({text:Z,redacted:J}){let[$,Q]=tH.useState(!1);return Y0.jsxs("details",{className:"group",open:$,onToggle:(X)=>Q(X.target.open),children:[Y0.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 py-1 text-xs text-muted-foreground select-none",children:[Y0.jsx(I9,{size:12,stroke:1.5,className:"chevron transition-transform duration-150 group-open:rotate-90"}),Y0.jsx(FW,{size:12,stroke:1.5}),Y0.jsx("span",{children:J?"Redacted thinking":"Thinking"})]}),!J&&Y0.jsx("div",{className:"mt-1 ml-4 text-xs leading-relaxed whitespace-pre-wrap text-muted-foreground italic",children:Z})]})}function O80({mediaType:Z,url:J,filename:$}){return Y0.jsxs("div",{className:"text-xs text-muted-foreground",children:["\uD83D\uDCCE ",$??J," (",Z,")"]})}function Cp({url:Z,title:J}){return Y0.jsx("a",{href:Z,target:"_blank",rel:"noreferrer",className:"text-xs underline",children:J??Z})}function j80({name:Z,data:J}){return Y0.jsxs("details",{children:[Y0.jsxs("summary",{className:"cursor-pointer text-xs text-muted-foreground",children:["data:",Z]}),Y0.jsx("pre",{className:"mt-1 overflow-auto rounded bg-muted p-2 text-xs text-muted-foreground",children:JSON.stringify(J,null,2)})]})}function b80({call:Z}){if(Z.caller==="subagent"&&Z.subagent)return Y0.jsx(C80,{call:Z,subagent:Z.subagent});if(Z.name==="Skill"&&Z.skill)return Y0.jsx(k80,{call:Z});let J=I80(Z);if(J)return Y0.jsx(T80,{call:Z,mcp:J});return Y0.jsx(P80,{call:Z})}function P80({call:Z}){let J=Z6((Y)=>Y.cwd),$=Z.state==="error",Q=Z.state==="running"||Z.state==="pending",X=$?Z.errorText??"":typeof Z.output==="string"?Z.output:"";return Y0.jsxs("details",{className:"group",children:[Y0.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 py-1.5 select-none",children:[Y0.jsx(I9,{size:12,stroke:1.5,className:"chevron shrink-0 text-ring transition-transform duration-150 group-open:rotate-90"}),Y0.jsx(E80,{call:Z}),Y0.jsx("span",{className:"text-xs font-medium whitespace-nowrap",children:x80(Z)}),Y0.jsx("span",{className:"truncate text-[11px] text-ring",children:y80(Z,J)}),Q&&Y0.jsx(W6,{size:12,stroke:1.5,className:"animate-spin text-ring"})]}),(X||$)&&Y0.jsx("div",{className:v0("mt-1 ml-4 rounded-md border px-3 py-2.5",$?"border-red-200 bg-red-50":"border-border bg-muted"),children:Y0.jsx("pre",{className:v0("max-h-[200px] overflow-y-auto font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",$?"text-red-800":"text-muted-foreground"),children:X||"(empty)"})})]})}function I80(Z){if(!(Z.name==="Bash"||Z.name==="exec"))return null;let $=Z.input??{},Q=typeof $.command==="string"?$.command:"";if(!Q)return null;let X=Q.match(/(?:^|\s|\$\()mcporter(?:\)?)\s+call\s+([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)((?:\s+(?!&&|\|\||;|\|)\S+)*)/);if(!X)return null;return{server:X[1],tool:X[2],rest:(X[3]??"").trim()}}function T80({call:Z,mcp:J}){let $=Z.state==="error",Q=Z.state==="running"||Z.state==="pending",X=$?Z.errorText??"":typeof Z.output==="string"?Z.output:"",Y=Ip(J.server),w=J.rest?`${J.tool} ${J.rest}`:J.tool;return Y0.jsxs("details",{className:"group",children:[Y0.jsxs("summary",{className:"flex cursor-pointer items-center gap-2 py-1.5 select-none",children:[Y0.jsx(I9,{size:12,stroke:1.5,className:"chevron shrink-0 text-ring transition-transform duration-150 group-open:rotate-90"}),Y0.jsx("span",{className:"block size-4 shrink-0 overflow-hidden rounded-[3px] bg-muted",children:Y?Y0.jsx("img",{src:Y,alt:"",className:"size-full object-cover"}):Y0.jsx(kW,{size:12,stroke:1.5,className:"m-0.5 text-muted-foreground"})}),Y0.jsxs("span",{className:"text-xs font-medium whitespace-nowrap",children:[Tp(J.server)," MCP"]}),Y0.jsx("span",{className:"truncate text-[11px] text-ring",children:w}),Q&&Y0.jsx(W6,{size:12,stroke:1.5,className:"animate-spin text-ring"})]}),(X||$)&&Y0.jsx("div",{className:v0("mt-1 ml-4 rounded-md border px-3 py-2.5",$?"border-red-200 bg-red-50":"border-border bg-muted"),children:Y0.jsx("pre",{className:v0("max-h-[200px] overflow-y-auto font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",$?"text-red-800":"text-muted-foreground"),children:X||"(empty)"})})]})}function k80({call:Z}){let[J,$]=tH.useState(!1),Q=Z.skill?.skillName??"unknown",X=Z.skill?.body??"",Y=Z.state==="running",w=Z.state==="error";return Y0.jsxs("div",{className:"flex flex-col gap-1",children:[Y0.jsxs("div",{className:"flex items-center gap-2 py-1",children:[Y0.jsx(EW,{size:14,stroke:1.5,className:"text-amber-600"}),Y0.jsxs("span",{className:"text-xs font-medium",children:["Loading skill ",Y0.jsx("span",{className:"font-mono",children:Q})]}),Y&&Y0.jsx(W6,{size:12,stroke:1.5,className:"animate-spin text-ring"}),w&&Y0.jsx(P9,{size:12,stroke:1.5,className:"text-red-600"}),X&&Y0.jsxs("button",{type:"button",onClick:()=>$((z)=>!z),className:"text-[11px] text-muted-foreground underline",children:[J?"hide":"show"," instructions"]})]}),J&&X&&Y0.jsx("pre",{className:"max-h-[300px] overflow-y-auto rounded bg-muted p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap text-muted-foreground",children:X})]})}function C80({call:Z,subagent:J}){let[$,Q]=tH.useState(!1),X=J.status,Y=X==="running"&&J.progress.length>0?J.progress[J.progress.length-1]:null,w={running:Y0.jsx(W6,{size:12,stroke:1.5,className:"animate-spin text-ring"}),completed:Y0.jsx("span",{className:"text-xs text-emerald-700",children:"✓"}),failed:Y0.jsx(P9,{size:12,stroke:1.5,className:"text-red-600"}),stopped:Y0.jsx(t8,{size:12,stroke:1.5,className:"text-muted-foreground"})}[X];return Y0.jsxs(Y0.Fragment,{children:[Y0.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"flex items-center gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-muted/70",children:[Y0.jsx(mQ,{size:14,stroke:1.5,className:"shrink-0 text-blue-600"}),Y0.jsxs("div",{className:"min-w-0 flex-1",children:[Y0.jsxs("div",{className:"flex items-center gap-2",children:[Y0.jsx("span",{className:"truncate text-xs font-medium",children:J.description||"Subtask"}),w]}),Y&&Y0.jsx("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:Y}),X!=="running"&&J.usage?.toolUses!=null&&Y0.jsxs("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[J.usage.toolUses," tool call",J.usage.toolUses===1?"":"s"]})]})]}),$&&Y0.jsx(S80,{call:Z,subagent:J,onClose:()=>Q(!1)})]})}function S80({call:Z,subagent:J,onClose:$}){return Y0.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-4",onClick:$,children:Y0.jsxs("div",{className:"flex max-h-[80vh] w-[min(800px,100%)] flex-col overflow-hidden rounded-lg bg-background shadow-xl",onClick:(Q)=>Q.stopPropagation(),children:[Y0.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-border px-5 py-4",children:[Y0.jsxs("div",{className:"min-w-0 flex-1",children:[Y0.jsxs("div",{className:"flex items-center gap-2",children:[Y0.jsx(mQ,{size:16,stroke:1.5,className:"text-blue-600"}),Y0.jsx("h3",{className:"text-sm font-semibold",children:J.description||"Subagent task"})]}),Y0.jsxs("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:["status: ",J.status,J.usage?.durationMs!=null&&` · ${Math.round(J.usage.durationMs/1000)}s`,J.usage?.totalTokens!=null&&` · ${J.usage.totalTokens} tokens`]})]}),Y0.jsx("button",{type:"button",onClick:$,className:"text-muted-foreground hover:text-foreground","aria-label":"Close",children:Y0.jsx(t8,{size:18,stroke:1.5})})]}),Y0.jsxs("div",{className:"flex flex-1 gap-4 overflow-hidden px-5 py-4",children:[Y0.jsxs("aside",{className:"w-52 shrink-0 border-r border-border pr-4",children:[Y0.jsx("div",{className:"mb-2 text-[11px] font-medium text-muted-foreground uppercase",children:"Progress"}),Y0.jsx("ol",{className:"flex flex-col gap-1",children:J.progress.map((Q,X)=>Y0.jsxs("li",{className:"truncate text-[11px] text-muted-foreground",children:[X+1,". ",Q]},X))})]}),Y0.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto pr-2",children:[Z.input!=null&&Object.keys(Z.input).length>0&&Y0.jsxs("details",{children:[Y0.jsx("summary",{className:"cursor-pointer text-[11px] text-muted-foreground",children:"Prompt"}),Y0.jsx("pre",{className:"mt-1 rounded bg-muted p-2 font-mono text-xs whitespace-pre-wrap text-muted-foreground",children:JSON.stringify(Z.input,null,2)})]}),J.transcript.length===0?Y0.jsx("div",{className:"text-xs text-muted-foreground",children:"No nested transcript captured."}):J.transcript.map((Q)=>Y0.jsx(J_,{turn:Q},Q.id))]})]})]})})}function E80({call:Z}){if(Z.caller==="mcp")return Y0.jsxs("span",{className:"rounded border border-border px-1 text-[9px] text-muted-foreground uppercase",children:["mcp",Z.mcpServer?`:${Z.mcpServer.slice(0,8)}`:""]});if(Z.caller==="server-tool")return Y0.jsx("span",{className:"rounded border border-border px-1 text-[9px] text-muted-foreground uppercase",children:"server"});return null}function E1(Z,J){let $=Z[J];return typeof $==="string"?$:""}function h80(Z){return(J)=>J.replace(/\/[^\s"']+/g,($)=>{if(!Z)return $;let Q=dV(Z,$);return Q.startsWith("..")?$:Q})}function x80(Z){if(Z.provider==="openclaw")return R80[Z.name]??Z.name;return Z.name}function y80(Z,J){let $=Z.input??{},Q=h80(J);if(Z.provider==="openclaw")return g80(Z.name,$,Q);return v80(Z.name,$,Q)}function v80(Z,J,$){if(Z==="Bash")return $(`$ ${E1(J,"command")}`);if(Z==="Read"||Z==="Write"||Z==="Edit")return $(E1(J,"file_path"));if(Z==="Glob")return $(E1(J,"pattern"));if(Z==="Grep")return`/${E1(J,"pattern")}/ ${$(E1(J,"path"))}`;return""}function g80(Z,J,$){if(Z==="read"||Z==="write"||Z==="edit")return $(E1(J,"path"));if(Z==="apply_patch"){let Q=E1(J,"patch"),X=Q.split(`
|
|
64
|
+
`).find((Y)=>Y.startsWith("*** "))??Q.split(`
|
|
65
|
+
`)[0];return $(X??"")}if(Z==="exec")return $(`$ ${E1(J,"command")}`);if(Z==="process"){let Q=E1(J,"action"),X=E1(J,"name");return[Q,X].filter(Boolean).join(" ")||$(E1(J,"command"))}if(Z==="web_search"||Z==="x_search")return E1(J,"query");if(Z==="web_fetch")return E1(J,"url");if(Z==="memory_search")return E1(J,"query");if(Z==="memory_get")return E1(J,"key")||E1(J,"name");if(Z==="sessions_history"||Z==="sessions_send"||Z==="sessions_yield")return E1(J,"sessionKey")||E1(J,"agentId");if(Z==="sessions_list"||Z==="agents_list")return E1(J,"agentId");if(Z==="subagents"||Z==="sessions_spawn")return E1(J,"task")||E1(J,"agentId");if(Z==="image"||Z==="image_generate")return E1(J,"prompt")||$(E1(J,"path"));if(Z==="message")return E1(J,"recipient")||E1(J,"to");if(Z==="update_plan"){let Q=J.plan;if(Array.isArray(Q)){let Y=Q.find((w)=>!!w&&typeof w==="object"&&w.status==="in_progress")?.step??Q[0]?.step;if(typeof Y==="string")return Y}return""}return""}var tH,Y0,R80;var hp=U(()=>{N2();wh();om();k5();kp();O$();tH=P(f(),1),Y0=P(G0(),1);R80={read:"Read file",write:"Write file",edit:"Edit file",apply_patch:"Edit",exec:"Bash",process:"Manage process",web_search:"Web search",web_fetch:"Fetch",sessions_list:"List sessions",sessions_history:"Recall session",sessions_yield:"Yield to session",sessions_send:"Send to session",sessions_spawn:"Spawn session",subagents:"Run sub-agent",agents_list:"List agents",session_status:"Session status",image:"Analyze image",image_generate:"Generate image",memory_get:"Read memory",memory_search:"Search memory",update_plan:"Update plan",message:"Send message",browser:"Browser",canvas:"Canvas",cron:"Cron",gateway:"Gateway",code_execution:"Run Python",tts:"Text-to-speech",music_generate:"Generate music",video_generate:"Generate video",x_search:"Search X"}});function Rp({className:Z}){return r0.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"1.5",className:Z,children:[r0.jsx("rect",{x:"1.75",y:"3.75",width:"20.5",height:"16.5",rx:"2.25",stroke:"currentColor"}),r0.jsx("rect",{x:"11.5",y:"5.5",width:"9",height:"13",rx:"1",fill:"currentColor"})]})}function xp({className:Z}){return r0.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"1.5",className:Z,children:[r0.jsx("rect",{x:"1.75",y:"3.75",width:"20.5",height:"16.5",rx:"2.25",stroke:"currentColor"}),r0.jsx("rect",{x:"12.5",y:"11.5",width:"8",height:"7",rx:"1",fill:"currentColor"})]})}function $_({view:Z,input:J,setInput:$,processing:Q,error:X,onDismissError:Y,send:w,stop:z,chatMode:H,onSwitchThread:G,onModeChange:W,onCollapse:q,onClose:K,leading:B}){let{ref:V,showTopFade:F,showBottomFade:_}=uE(),N=Z.turns,L=eH.useMemo(()=>dE(N),[N]);return eH.useEffect(()=>{let A=V.current;A?.scrollTo({top:A.scrollHeight,behavior:"instant"})},[V,N]),r0.jsxs("div",{className:"flex h-full flex-col",children:[r0.jsxs("header",{className:"flex items-center justify-between pb-2 pl-2",children:[r0.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[B,r0.jsx(Zh,{onSwitch:G})]}),r0.jsxs("div",{className:"flex items-center gap-0.5",children:[W&&r0.jsxs(t9,{children:[r0.jsx(e9,{render:r0.jsx($5,{className:"gap-0 pr-1! pl-2!",variant:"ghost","aria-label":"Switch chat mode",children:r0.jsxs(r0.Fragment,{children:[r0.jsx(H==="sidebar"?Rp:xp,{className:"text-muted-foreground"}),r0.jsx(CW,{className:"size-4! text-muted-foreground/50",stroke:2})]})})}),r0.jsx(Z3,{align:"end",className:"min-w-40",children:r0.jsxs(HP,{value:H,onValueChange:W,children:[r0.jsxs(CK,{value:"sidebar",closeOnClick:!0,children:[r0.jsx(Rp,{}),"Sidebar"]}),r0.jsxs(CK,{value:"floating",closeOnClick:!0,children:[r0.jsx(xp,{}),"Floating"]})]})})]}),H==="sidebar"&&q&&r0.jsx($5,{variant:"ghost",size:"icon",onClick:q,"aria-label":"Collapse chat",children:r0.jsx(LW,{className:"size-6! text-muted-foreground",stroke:1.5})}),H==="floating"&&K&&r0.jsx($5,{variant:"ghost",size:"icon",onClick:K,"aria-label":"Close chat",children:r0.jsx(t8,{className:"text-muted-foreground",stroke:1.5})})]})]}),r0.jsxs("div",{ref:V,className:v0("flex flex-1 flex-col gap-6 overflow-y-auto overscroll-contain px-2 pt-4 pb-12",F&&_&&"mask-fade-y",F&&!_&&"mask-fade-top",!F&&_&&"mask-fade-bottom"),children:[N.length===0&&!Q&&r0.jsx(Sp,{}),L.map((A)=>r0.jsx(J_,{turn:A},A.id)),Q&&r0.jsx(Ep,{})]}),r0.jsxs("div",{children:[X&&r0.jsxs("div",{className:"mb-2 flex items-start gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-800",children:[r0.jsx("span",{className:"flex-1 break-words",children:X}),Y&&r0.jsx("button",{type:"button",onClick:Y,className:"text-red-600 hover:text-red-900","aria-label":"Dismiss error",children:r0.jsx(t8,{size:14,stroke:1.5})})]}),r0.jsx(rE,{value:J,onChange:$,onSend:w,onStop:z,processing:Q})]})]})}var eH,r0;var yp=U(()=>{N2();cE();k5();iE();Jh();hp();r6();rw();eH=P(f(),1),r0=P(G0(),1)});function t1(Z){let J=ZG.useContext(Q_);if(J===void 0&&!Z)throw Error(g0(47));return J}var ZG,Q_;var r2=U(()=>{ZG=P(f(),1),Q_=ZG.createContext(void 0)});function f80(){return{...qw(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var n3,vp,m80,t3;var X_=U(()=>{qJ();x2();Y2();uZ();C1();v4();j5();n3=P(f(),1),vp=P(s2(),1);m80={...Kw,disabled:E0((Z)=>Z.disabled),instantType:E0((Z)=>Z.instantType),openMethod:E0((Z)=>Z.openMethod),openChangeReason:E0((Z)=>Z.openChangeReason),modal:E0((Z)=>Z.modal),stickIfOpen:E0((Z)=>Z.stickIfOpen),titleElementId:E0((Z)=>Z.titleElementId),descriptionElementId:E0((Z)=>Z.descriptionElementId),openOnHover:E0((Z)=>Z.openOnHover),closeDelay:E0((Z)=>Z.closeDelay),hasViewport:E0((Z)=>Z.hasViewport)};t3=class t3 extends A7{constructor(Z){let J={...f80(),...Z};if(J.open&&Z?.mounted===void 0)J.mounted=!0;super(J,{popupRef:n3.createRef(),backdropRef:n3.createRef(),internalBackdropRef:n3.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:n3.createRef(),beforeContentFocusGuardRef:n3.createRef(),stickIfOpenTimeout:new s5,triggerElements:new N6},m80)}setOpen=(Z,J)=>{let $=J.reason===K0.triggerHover,Q=J.reason===K0.triggerPress&&J.event.detail===0,X=!Z&&(J.reason===K0.escapeKey||J.reason==null);if(J.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(Z,J),J.isCanceled)return;let Y={open:Z,nativeEvent:J.event,reason:J.reason,nested:this.state.nested,triggerElement:J.trigger};this.state.floatingRootContext.context.events?.emit("openchange",Y);let z=()=>{let H={open:Z,openChangeReason:J.reason},G=J.trigger?.id??null;if(G||Z)H.activeTriggerId=G,H.activeTriggerElement=J.trigger??null;this.update(H)};if($)this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(JX,()=>{this.set("stickIfOpen",!1)}),vp.flushSync(z);else z();if(Q||X)this.set("instantType",Q?"click":"dismiss");else if(J.reason===K0.focusOut)this.set("instantType","focus");else this.set("instantType",void 0)};static useStore(Z,J){let $=D1(()=>{return new t3(J)}).current,Q=Z??$;return n6($.disposeEffect),Q}disposeEffect=()=>{return this.context.stickIfOpenTimeout.disposeEffect()}}});function gp({props:Z}){let{children:J,open:$,defaultOpen:Q=!1,onOpenChange:X,onOpenChangeComplete:Y,modal:w=!1,handle:z,triggerId:H,defaultTriggerId:G=null}=Z,W=t3.useStore(z?.store,{modal:w,open:Q,openProp:$,activeTriggerId:G,triggerIdProp:H});hw(()=>{if($===void 0&&W.state.open===!1&&Q===!0)W.update({open:!0,activeTriggerId:G})}),W.useControlledProp("openProp",$),W.useControlledProp("triggerIdProp",H);let q=W.useState("open"),K=W.useState("positionerElement"),B=W.useState("payload"),V=W.useState("openChangeReason");W.useContextCallback("onOpenChange",X),W.useContextCallback("onOpenChangeComplete",Y);let{openMethod:F,triggerProps:_,reset:N}=vw(q);Hw(W);let{forceUnmount:L}=Gw(q,W,()=>{W.update({stickIfOpen:!0,openChangeReason:null}),N()});Rw(q&&w===!0&&V!==K0.triggerHover&&F!=="touch",K),i2.useEffect(()=>{if(!q)W.context.stickIfOpenTimeout.clear()},[W,q]);let M=i2.useCallback((g)=>{let S=P0(g);return S.preventUnmountOnClose=()=>{W.set("preventUnmountingOnClose",!0)},S},[W]),A=i2.useCallback(()=>{W.setOpen(!1,M(K0.imperativeAction))},[W,M]);i2.useImperativeHandle(Z.actionsRef,()=>({unmount:L,close:A}),[L,A]);let O=BJ({popupStore:W,onOpenChange:W.setOpen}),D=GJ(O,{outsidePressEvent:{mouse:w==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),k=FJ(O),{getReferenceProps:b,getFloatingProps:h,getTriggerProps:I}=H4([D,k]),d=i2.useMemo(()=>{return b(_)},[b,_]),v=i2.useMemo(()=>{return I(_)},[I,_]),C=i2.useMemo(()=>{return h()},[h]);W.useSyncedValues({modal:w,openMethod:F,activeTriggerProps:d,inactiveTriggerProps:v,popupProps:C,floatingRootContext:O,nested:U5()!=null});let y=i2.useMemo(()=>({store:W}),[W]);return o$.jsx(Q_.Provider,{value:y,children:typeof J==="function"?J({payload:B}):J})}function fp(Z){if(t1(!0))return o$.jsx(gp,{props:Z});return o$.jsx(QJ,{children:o$.jsx(gp,{props:Z})})}var i2,o$;var mp=U(()=>{AK();LK();M2();r2();X_();X5();C1();v4();MK();i2=P(f(),1),o$=P(G0(),1)});var pp=300;var N4,w_,q9,up;var cp=U(()=>{y1();r2();xZ();E2();_1();j5();M2();J4();iZ();t5();X5();C1();v4();N4=P(f(),1),w_=P(s2(),1),q9=P(G0(),1),up=N4.forwardRef(function(J,$){let{render:Q,className:X,disabled:Y=!1,nativeButton:w=!0,handle:z,payload:H,openOnHover:G=!1,delay:W=pp,closeDelay:q=0,id:K,...B}=J,V=t1(!0),F=z?.store??V?.store;if(!F)throw Error(g0(74));let _=Q5(K),N=F.useState("isTriggerActive",_),L=F.useState("floatingRootContext"),M=F.useState("isOpenedByTrigger",_),A=N4.useRef(null),{registerTrigger:O,isMountedByThisTrigger:D}=zw(_,A,F,{payload:H,disabled:Y,openOnHover:G,closeDelay:q}),k=F.useState("openChangeReason"),b=F.useState("stickIfOpen"),h=F.useState("openMethod"),I=O7(L,{enabled:L!=null&&G&&(h!=="touch"||k!==K0.triggerPress),mouseOnly:!0,move:!1,handleClose:b7(),restMs:W,delay:{close:q},triggerElementRef:A,isActiveTrigger:N}),d=N7(L,{enabled:L!=null,stickIfOpen:b}),v=H4([d]),C=F.useState("triggerProps",D),y={disabled:Y,open:M},{getButtonProps:g,buttonRef:S}=e2({disabled:Y,native:w}),x=N4.useMemo(()=>({open(w0){if(w0&&k===K0.triggerPress)return fZ.open(w0);return GX.open(w0)}}),[k]),E=T0("button",J,{state:y,ref:[S,$,O,A],props:[v.getReferenceProps(),I,C,{[$X]:"",id:_},B,g],stateAttributesMapping:x}),m=N4.useRef(null),j=U0((w0)=>{w_.flushSync(()=>{F.setOpen(!1,P0(K0.focusOut,w0.nativeEvent,w0.currentTarget))}),lX(m.current)?.focus()}),H0=U0((w0)=>{let T=F.select("positionerElement");if(T&&Y4(w0,T))F.context.beforeContentFocusGuardRef.current?.focus();else{w_.flushSync(()=>{F.setOpen(!1,P0(K0.focusOut,w0.nativeEvent,w0.currentTarget))});let $0=dX(F.context.triggerFocusTargetRef.current||A.current);while($0!==null&&R0(T,$0)){let V0=$0;if($0=w8($0),$0===V0)break}$0?.focus()}});if(N)return q9.jsxs(N4.Fragment,{children:[q9.jsx(y2,{ref:m,onFocus:j}),q9.jsx(N4.Fragment,{children:E},_),q9.jsx(y2,{ref:F.context.triggerFocusTargetRef,onFocus:H0})]});return q9.jsx(N4.Fragment,{children:E},_)})});function dp(){let Z=JG.useContext(Y_);if(Z===void 0)throw Error(g0(45));return Z}var JG,Y_;var z_=U(()=>{JG=P(f(),1),Y_=JG.createContext(void 0)});var lp,H_,rp;var ip=U(()=>{M2();r2();z_();lp=P(f(),1),H_=P(G0(),1),rp=lp.forwardRef(function(J,$){let{keepMounted:Q=!1,...X}=J,{store:Y}=t1();if(!(Y.useState("mounted")||Q))return null;return H_.jsx(Y_.Provider,{value:Q,children:H_.jsx(JJ,{ref:$,...X})})})});function e3(){let Z=$G.useContext(G_);if(!Z)throw Error(g0(46));return Z}var $G,G_;var n$=U(()=>{$G=P(f(),1),G_=$G.createContext(void 0)});var h6,t$,ap;var sp=U(()=>{jw();M1();M2();r2();n$();BK();E2();z_();UK();C1();_1();j5();dZ();KK();NJ();h6=P(f(),1),t$=P(G0(),1),ap=h6.forwardRef(function(J,$){let{render:Q,className:X,anchor:Y,positionMethod:w="absolute",side:z="bottom",align:H="center",sideOffset:G=0,alignOffset:W=0,collisionBoundary:q="clipping-ancestors",collisionPadding:K=5,arrowPadding:B=5,sticky:V=!1,disableAnchorTracking:F=!1,collisionAvoidance:_=QX,...N}=J,{store:L}=t1(),M=dp(),A=F7(),O=L.useState("floatingRootContext"),D=L.useState("mounted"),k=L.useState("open"),b=L.useState("openChangeReason"),h=L.useState("activeTriggerElement"),I=L.useState("modal"),d=L.useState("positionerElement"),v=L.useState("instantType"),C=L.useState("transitionStatus"),y=L.useState("hasViewport"),g=h6.useRef(null),S=e6(d,!1,!1),x=Iw({anchor:Y,floatingRootContext:O,positionMethod:w,mounted:D,side:z,sideOffset:G,align:H,alignOffset:W,arrowPadding:B,collisionBoundary:q,collisionPadding:K,sticky:V,disableAnchorTracking:F,keepMounted:M,nodeId:A,collisionAvoidance:_,adaptiveOrigin:y?qb:void 0}),E=h6.useMemo(()=>{let $0={};if(!k)$0.pointerEvents="none";return{role:"presentation",hidden:!D,style:{...x.positionerStyles,...$0}}},[k,D,x.positionerStyles]),m=h6.useMemo(()=>({props:E,...x}),[E,x]),j=O.useState("domReferenceElement");F0(()=>{let $0=j,V0=g.current;if($0)g.current=$0;if(V0&&$0&&$0!==V0){L.set("instantType",void 0);let l=new AbortController;return S(()=>{L.set("instantType","trigger-change")},l.signal),()=>{l.abort()}}return},[j,S,L]);let H0={open:k,side:m.side,align:m.align,anchorHidden:m.anchorHidden,instant:v},w0=h6.useCallback(($0)=>{L.set("positionerElement",$0)},[L]),T=T0("div",J,{state:H0,props:[m.props,q8(C),N],ref:[$,w0],stateAttributesMapping:v5});return t$.jsxs(G_.Provider,{value:m,children:[D&&I===!0&&b!==K0.triggerHover&&t$.jsx(Tw,{ref:L.context.internalBackdropRef,inert:i9(!k),cutout:h}),t$.jsx($J,{id:A,children:T})]})})});var QG,op,p80,np;var tp=U(()=>{a1();M2();r2();n$();E2();i6();v9();_1();C1();HK();zK();NJ();QG=P(f(),1),op=P(G0(),1),p80={...v5,...k4},np=QG.forwardRef(function(J,$){let{className:Q,render:X,initialFocus:Y,finalFocus:w,...z}=J,{store:H}=t1(),G=e3(),W=Aw(!0)!=null,q=H.useState("open"),K=H.useState("openMethod"),B=H.useState("instantType"),V=H.useState("transitionStatus"),F=H.useState("popupProps"),_=H.useState("titleElementId"),N=H.useState("descriptionElementId"),L=H.useState("modal"),M=H.useState("mounted"),A=H.useState("openChangeReason"),O=H.useState("activeTriggerElement"),D=H.useState("floatingRootContext");E4({open:q,ref:H.context.popupRef,onComplete(){if(q)H.context.onOpenChangeComplete?.(!0)}});let k=H.useState("disabled"),b=H.useState("openOnHover"),h=H.useState("closeDelay");VJ(D,{enabled:b&&!k,closeDelay:h});function I(g){if(g==="touch")return H.context.popupRef.current;return!0}let d=Y===void 0?I:Y,v={open:q,side:G.side,align:G.align,instant:B,transitionStatus:V},C=QG.useCallback((g)=>{H.set("popupElement",g)},[H]),y=T0("div",J,{state:v,ref:[$,H.context.popupRef,C],props:[F,{"aria-labelledby":_,"aria-describedby":N,onKeyDown(g){if(W&&Dw.has(g.key))g.stopPropagation()}},q8(V),z],stateAttributesMapping:p80});return op.jsx(wJ,{context:D,openInteractionType:K,modal:L==="trap-focus",disabled:!M||A===K0.triggerHover,initialFocus:d,returnFocus:w,restoreFocus:"popup",previousFocusableElement:w1(O)?O:void 0,nextFocusableElement:H.context.triggerFocusTargetRef,beforeContentFocusGuardRef:H.context.beforeContentFocusGuardRef,children:y})})});var ep,Zu;var Ju=U(()=>{n$();r2();E2();_1();ep=P(f(),1),Zu=ep.forwardRef(function(J,$){let{className:Q,render:X,...Y}=J,{store:w}=t1(),z=w.useState("open"),{arrowRef:H,side:G,align:W,arrowUncentered:q,arrowStyles:K}=e3();return T0("div",J,{state:{open:z,side:G,align:W,uncentered:q},ref:[$,H],props:[{style:K,"aria-hidden":!0},Y],stateAttributesMapping:v5})})});var $u,u80,Qu;var Xu=U(()=>{r2();E2();i6();_1();C1();$u=P(f(),1),u80={...v5,...k4},Qu=$u.forwardRef(function(J,$){let{className:Q,render:X,...Y}=J,{store:w}=t1(),z=w.useState("open"),H=w.useState("mounted"),G=w.useState("transitionStatus"),W=w.useState("openChangeReason");return T0("div",J,{state:{open:z,transitionStatus:G},ref:[w.context.backdropRef,$],props:[{role:"presentation",hidden:!H,style:{pointerEvents:W===K0.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},Y],stateAttributesMapping:u80})})});var wu,Yu;var zu=U(()=>{M1();r2();_1();J4();wu=P(f(),1),Yu=wu.forwardRef(function(J,$){let{render:Q,className:X,...Y}=J,{store:w}=t1(),z=Q5(Y.id);return F0(()=>{return w.set("titleElementId",z),()=>{w.set("titleElementId",void 0)}},[w,z]),T0("h2",J,{ref:$,props:[{id:z},Y]})})});var Hu,Gu;var Wu=U(()=>{M1();r2();J4();_1();Hu=P(f(),1),Gu=Hu.forwardRef(function(J,$){let{render:Q,className:X,...Y}=J,{store:w}=t1(),z=Q5(Y.id);return F0(()=>{return w.set("descriptionElementId",z),()=>{w.set("descriptionElementId",void 0)}},[w,z]),T0("p",J,{ref:$,props:[{id:z},Y]})})});var qu,Ku;var Bu=U(()=>{r2();_1();Qq();X5();C1();qu=P(f(),1),Ku=qu.forwardRef(function(J,$){let{render:Q,className:X,disabled:Y=!1,nativeButton:w=!0,...z}=J,{buttonRef:H,getButtonProps:G}=e2({disabled:Y,focusableWhenDisabled:!1,native:w}),{store:W}=t1();return T0("button",J,{ref:[$,H],props:[{onClick(K){W.setOpen(!1,P0(K0.closePress,K.nativeEvent,K.currentTarget))}},z,G]})})});var Uu;var Vu=U(()=>{Uu=function(Z){return Z.popupWidth="--popup-width",Z.popupHeight="--popup-height",Z}({})});function Nu(Z){let[J,$]=Fu.useState({current:Z,previous:null});if(Z!==J.current)$({current:Z,previous:J.current});return J.previous}var Fu;var _u=U(()=>{Fu=P(f(),1)});function W_(Z){let J=O5(Z),$=parseFloat(J.width)||0,Q=parseFloat(J.height)||0,X=w1(Z),Y=X?Z.offsetWidth:$,w=X?Z.offsetHeight:Q;if(Q8($)!==Y||Q8(Q)!==w)$=Y,Q=w;return{width:$,height:Q}}var Lu=U(()=>{F6();a1()});function Du(Z){let{popupElement:J,positionerElement:$,content:Q,mounted:X,enabled:Y=d80,onMeasureLayout:w,onMeasureLayoutComplete:z,side:H,direction:G}=Z,W=e6(J,!0,!1),q=S4(),K=K9.useRef(null),B=K9.useRef(null),V=K9.useRef(!0),F=K9.useRef(Z4),_=U0(w),N=U0(z),L=K9.useMemo(()=>{let M=H==="top",A=H==="left";if(G==="rtl")M=M||H==="inline-end",A=A||H==="inline-end";else M=M||H==="inline-start",A=A||H==="inline-start";return M?{position:"absolute",[H==="top"?"bottom":"top"]:"0",[A?"right":"left"]:"0"}:q1},[H,G]);F0(()=>{if(!X||!Y()||!c80){F.current=Z4,V.current=!0,K.current=null,B.current=null;return}if(!J||!$)return;F.current=Au(J,L);let M=new ResizeObserver((C)=>{let y=C[0];if(y)B.current={width:Math.ceil(y.borderBoxSize[0].inlineSize),height:Math.ceil(y.borderBoxSize[0].blockSize)}});M.observe(J),XG(J,"auto");let A=wG(J,"position","static"),O=wG(J,"transform","none"),D=wG(J,"scale","1"),k=Au($,{"--available-width":"max-content","--available-height":"max-content"});function b(){A(),O(),k()}function h(){b(),D()}if(_?.(),V.current||K.current===null){e$($,"max-content");let C=W_(J);return K.current=C,e$($,C),h(),N?.(null,C),V.current=!1,()=>{M.disconnect(),F.current(),F.current=Z4}}XG(J,"auto"),e$($,"max-content");let I=K.current??B.current,d=W_(J);if(K.current=d,!I)return e$($,d),h(),N?.(null,d),()=>{M.disconnect(),q.cancel(),F.current(),F.current=Z4};XG(J,I),h(),N?.(I,d),e$($,d);let v=new AbortController;return q.request(()=>{XG(J,d),W(()=>{J.style.setProperty("--popup-width","auto"),J.style.setProperty("--popup-height","auto")},v.signal)}),()=>{M.disconnect(),v.abort(),q.cancel(),F.current(),F.current=Z4}},[Q,J,$,W,q,Y,X,_,N,L])}function wG(Z,J,$){let Q=Z.style.getPropertyValue(J);return Z.style.setProperty(J,$),()=>{Z.style.setProperty(J,Q)}}function Au(Z,J){let $=[];for(let[Q,X]of Object.entries(J))$.push(wG(Z,Q,X));return $.length?()=>{$.forEach((Q)=>Q())}:Z4}function XG(Z,J){let $=J==="auto"?"auto":`${J.width}px`,Q=J==="auto"?"auto":`${J.height}px`;Z.style.setProperty("--popup-width",$),Z.style.setProperty("--popup-height",Q)}function e$(Z,J){let $=J==="max-content"?"max-content":`${J.width}px`,Q=J==="max-content"?"max-content":`${J.height}px`;Z.style.setProperty("--positioner-width",$),Z.style.setProperty("--positioner-height",Q)}var K9,c80,d80=()=>!0;var Mu=U(()=>{t6();M1();y1();p6();dZ();Lu();j5();K9=P(f(),1),c80=typeof ResizeObserver<"u"});var Ou=U(()=>{Pw()});var ju=U(()=>{Ou()});function Pu(Z){let{store:J,side:$,cssVars:Q,children:X}=Z,Y=K8(),w=J.useState("activeTriggerElement"),z=J.useState("activeTriggerId"),H=J.useState("open"),G=J.useState("payload"),W=J.useState("mounted"),q=J.useState("popupElement"),K=J.useState("positionerElement"),B=Nu(H?w:null),V=i80(z,G),F=d5.useRef(null),[_,N]=d5.useState(null),[L,M]=d5.useState(null),A=d5.useRef(null),O=d5.useRef(null),D=e6(A,!0,!1),k=S4(),[b,h]=d5.useState(null),[I,d]=d5.useState(!1);F0(()=>{return J.set("hasViewport",!0),()=>{J.set("hasViewport",!1)}},[J]);let v=U0(()=>{A.current?.style.setProperty("animation","none"),A.current?.style.setProperty("transition","none"),O.current?.style.setProperty("display","none")}),C=U0((E)=>{if(A.current?.style.removeProperty("animation"),A.current?.style.removeProperty("transition"),O.current?.style.removeProperty("display"),E)h(E)}),y=d5.useRef(null);F0(()=>{if(w&&B&&w!==B&&y.current!==w&&F.current){N(F.current),d(!0);let E=r80(B,w);M(E),k.request(()=>{k.request(()=>{d(!1),D(()=>{N(null),h(null),F.current=null})})}),y.current=w}},[w,B,_,D,k]),F0(()=>{let E=A.current;if(!E)return;let m=document.createElement("div");for(let j of Array.from(E.childNodes))m.appendChild(j.cloneNode(!0));F.current=m});let g=_!=null,S;if(!g)S=ZZ.jsx("div",{"data-current":!0,ref:A,children:X},V);else S=ZZ.jsxs(d5.Fragment,{children:[ZZ.jsx("div",{"data-previous":!0,inert:i9(!0),ref:O,style:{[Q.popupWidth]:`${b?.width}px`,[Q.popupHeight]:`${b?.height}px`,position:"absolute"},"data-ending-style":I?void 0:""},"previous"),ZZ.jsx("div",{"data-current":!0,ref:A,"data-starting-style":I?"":void 0,children:X},V)]});F0(()=>{let E=O.current;if(!E||!_)return;E.replaceChildren(...Array.from(_.childNodes))},[_]),Du({popupElement:q,positionerElement:K,mounted:W,content:G,onMeasureLayout:v,onMeasureLayoutComplete:C,side:$,direction:Y});let x={activationDirection:l80(L),transitioning:g};return{children:S,state:x}}function l80(Z){if(!Z)return;return`${bu(Z.horizontal,5,"right","left")} ${bu(Z.vertical,5,"down","up")}`}function bu(Z,J,$,Q){if(Z>J)return $;if(Z<-J)return Q;return""}function r80(Z,J){let $=Z.getBoundingClientRect(),Q=J.getBoundingClientRect(),X={x:$.left+$.width/2,y:$.top+$.height/2},Y={x:Q.left+Q.width/2,y:Q.top+Q.height/2};return{horizontal:Y.x-X.x,vertical:Y.y-X.y}}function i80(Z,J){let[$,Q]=d5.useState(0),X=d5.useRef(Z),Y=d5.useRef(J),w=d5.useRef(!1);return F0(()=>{let z=X.current,H=Y.current,G=Z!==z,W=J!==H;if(G)Q((q)=>q+1),w.current=!W;else if(w.current&&W)Q((q)=>q+1),w.current=!1;X.current=Z,Y.current=J},[Z,J]),`${Z??"current"}-${$}`}var d5,ZZ;var Iu=U(()=>{jw();t6();_u();M1();y1();dZ();Mu();ju();d5=P(f(),1),ZZ=P(G0(),1)});var Tu,a80,ku;var Cu=U(()=>{r2();n$();_1();Vu();Iu();Tu=P(f(),1),a80={activationDirection:(Z)=>Z?{"data-activation-direction":Z}:null},ku=Tu.forwardRef(function(J,$){let{render:Q,className:X,children:Y,...w}=J,{store:z}=t1(),{side:H}=e3(),G=z.useState("instantType"),{children:W,state:q}=Pu({store:z,side:H,cssVars:Uu,children:Y}),K={activationDirection:q.activationDirection,transitioning:q.transitioning,instant:G};return T0("div",J,{state:K,ref:$,props:[w,{children:W}],stateAttributesMapping:a80})})});class YG{constructor(){this.store=new t3}open(Z){let J=Z?this.store.context.triggerElements.getById(Z)??void 0:void 0;if(Z&&!J)throw Error(g0(80,Z));this.store.setOpen(!0,P0(K0.imperativeAction,void 0,J))}close(){this.store.setOpen(!1,P0(K0.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function Su(){return new YG}var Eu=U(()=>{X5();C1();X_()});var f8={};N9(f8,{createHandle:()=>Su,Viewport:()=>ku,Trigger:()=>up,Title:()=>Yu,Root:()=>fp,Positioner:()=>ap,Portal:()=>rp,Popup:()=>np,Handle:()=>YG,Description:()=>Gu,Close:()=>Ku,Backdrop:()=>Qu,Arrow:()=>Zu});var hu=U(()=>{mp();cp();ip();sp();tp();Ju();Xu();zu();Wu();Bu();Cu();Eu()});var Ru=U(()=>{hu()});function xu({...Z}){return JZ.jsx(f8.Root,{"data-slot":"popover",...Z})}function yu({...Z}){return JZ.jsx(f8.Trigger,{"data-slot":"popover-trigger",...Z})}function vu({className:Z,align:J="center",alignOffset:$=0,side:Q="bottom",sideOffset:X=4,keepMounted:Y=!1,container:w,...z}){return JZ.jsx(f8.Portal,{keepMounted:Y,container:w,children:JZ.jsx(f8.Positioner,{align:J,alignOffset:$,side:Q,sideOffset:X,className:"isolate z-50",children:JZ.jsx(f8.Popup,{"data-slot":"popover-content",className:v0("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-md bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/5 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",Z),...z})})})}var JZ;var gu=U(()=>{Ru();k5();JZ=P(G0(),1)});function mu({defaultOpen:Z=!1,container:J,children:$}){let[Q,X]=fu.useState(Z),Y=()=>X(!1);return R6.jsxs(xu,{open:Q,onOpenChange:(w)=>X(w),children:[R6.jsx(yu,{render:R6.jsx("div",{className:"fixed right-4 bottom-4 sm:right-6 sm:bottom-6",children:R6.jsx(r1.div,{variants:{from:{opacity:0,scale:0.8,filter:"blur(4px)"},to:{opacity:1,scale:1,filter:"blur(0px)"},invisible:{opacity:0,scale:1,filter:"blur(4px)"}},initial:"from",animate:Q?"invisible":"to",transition:{type:"spring",duration:0.3,delay:0.2,bounce:0},children:R6.jsxs($5,{variant:"outline",size:"lg",className:"bg-white hover:bg-white",children:[R6.jsx(TZ,{stroke:1.75})," Agent"]})})})}),R6.jsx(vu,{side:"top",sideOffset:-48,align:"end",alignOffset:-8,className:"flex h-[calc(100vh-2rem)] w-[min(440px,calc(100vw-1rem))] flex-col gap-0 rounded-3xl p-3 sm:h-[calc(100vh-8rem)] sm:w-[min(440px,calc(100vw-2rem))] sm:p-4",keepMounted:!0,container:J,children:$(Y)})]})}var fu,R6;var pu=U(()=>{t4();N2();r6();gu();fu=P(f(),1),R6=P(G0(),1)});function B9(){let Z=x6.useContext(cu);if(!Z)throw Error("useWorkspaceLayoutCtx must be used within <WorkspaceLayoutProvider>");return Z}function uu(Z){let{cwd:J,name:$,agentId:Q,...X}=Z;return X}function du({id:Z,children:J}){let $=S2(),Q=nA(Z),X=eA(Z),Y=x6.useRef(X.mutate);Y.current=X.mutate;let w=x6.useRef(null),z=x6.useCallback((G)=>{let W=a5.layout(Z),q=$.getQueryData(W);if(!q)return;if($.setQueryData(W,{...q,...G}),w.current)clearTimeout(w.current);w.current=setTimeout(()=>{w.current=null;let K=$.getQueryData(W);if(K)Y.current(uu(K))},600)},[Z,$]),H={layout:Q.data?uu(Q.data):s80,setLayout:z,name:Q.data?.name??null,cwd:Q.data?.cwd??null,isLoading:Q.isLoading};return lu.jsx(cu,{value:H,children:J})}var x6,lu,s80,cu;var zG=U(()=>{PZ();e8();x6=P(f(),1),lu=P(G0(),1),s80={version:1,widgetGrid:[],chatMode:"sidebar"},cu=x6.createContext(null)});function ZQ(Z,J,$,Q){let X=Z.reduce((Y,w)=>Math.max(Y,w.y+w.h),0);for(let Y=0;Y<=X+$;Y++)for(let w=0;w<=Q-J;w++)if(!Z.some((H)=>!(w+J<=H.x||H.x+H.w<=w||Y+$<=H.y||H.y+H.h<=Y)))return{x:w,y:Y};return{x:0,y:X}}function JQ(Z,J=[],$=4){let Q=[];for(let X of Z){let{x:Y,y:w}=X.x!==void 0&&X.y!==void 0?{x:X.x,y:X.y}:ZQ([...J,...Q],X.w,X.h,$);Q.push({i:X.id,x:Y,y:w,w:X.w,h:X.h})}return Q}var $Z,ru;var q_=U(()=>{$Z={default:{label:"Default",sans:"system-ui",mono:"JetBrains Mono",feel:"Native OS, zero load",googleFontsQuery:"JetBrains+Mono:wght@400;500"},serif:{label:"Serif",sans:"Libre Baskerville",mono:"JetBrains Mono",feel:"Classic serif, literary",googleFontsQuery:"Libre+Baskerville:wght@400;700&family=JetBrains+Mono:wght@400;500"},mono:{label:"Mono",sans:"JetBrains Mono",mono:"JetBrains Mono",feel:"Full terminal, hacker",googleFontsQuery:"JetBrains+Mono:wght@400;500;600"},bubbly:{label:"Bubbly",sans:"Fredoka",mono:"Azeret Mono",feel:"Very round, toy-like",googleFontsQuery:"Fredoka:wght@400;500;600&family=Azeret+Mono:wght@400;500"},geometric:{label:"Geometric",sans:"Outfit",mono:"DM Mono",feel:"Swiss design, neutral",googleFontsQuery:"Outfit:wght@400;500;600&family=DM+Mono:wght@400;500"},retro:{label:"Retro",sans:"Courier Prime",mono:"Courier Prime",feel:"Typewriter nostalgia",googleFontsQuery:"Courier+Prime:wght@400;700"}},ru={default:{label:"Default",feel:"System neutral"},paper:{label:"Paper",background:"#faf8f5",foreground:"#2c2825",feel:"Warm off-white"},sand:{label:"Sand",background:"#f5f0e8",foreground:"#3d3529",feel:"Beige earth tones"},rose:{label:"Rose",background:"#fdf2f4",foreground:"#3b1c26",feel:"Soft blush"},lavender:{label:"Lavender",background:"#f4f2fb",foreground:"#2b2640",feel:"Cool violet"},mint:{label:"Mint",background:"#f0faf6",foreground:"#1a3028",feel:"Cool green"},sky:{label:"Sky",background:"#f0f6fc",foreground:"#1a2a3b",feel:"Cool blue"}}});function HG({title:Z,children:J,ref:$}){return $Q.jsxs(r1.div,{ref:$,className:"absolute inset-x-6 bottom-0 z-20 flex max-h-[60vh] flex-col rounded-t-2xl bg-white p-[var(--page-pad)] shadow-[inset_0_0_0_1px_rgba(0,0,0,0.04),inset_0_2px_4px_-1px_rgba(0,0,0,0.06),inset_0_4px_16px_-4px_rgba(0,0,0,0.06)]",variants:{hidden:{opacity:0,y:40,filter:"blur(4px)"},visible:{opacity:1,y:0,filter:"blur(0px)"}},initial:"hidden",animate:"visible",exit:"hidden",transition:{type:"spring",duration:0.25,bounce:0},children:[$Q.jsx("p",{className:"mb-4 shrink-0 text-sm font-medium text-muted-foreground",children:Z}),$Q.jsx("div",{className:"-my-1 [margin-right:calc(var(--page-pad)*-1)] [margin-left:calc(var(--page-pad)*-1)] flex-1 overflow-y-auto px-[var(--page-pad)] py-1",children:J})]})}var $Q;var K_=U(()=>{t4();$Q=P(G0(),1)});function n80(){au.useEffect(()=>{if(document.getElementById(iu))return;let Z=document.createElement("link");Z.id=iu,Z.rel="stylesheet",Z.href=`https://fonts.googleapis.com/css2?family=${o80}&display=swap`,document.head.appendChild(Z)},[])}function Z70(Z,J,$){return(Z.background??void 0)===J&&(Z.foreground??void 0)===$}function su({ref:Z}){n80();let{layout:J,setLayout:$}=B9(),Q=J.theme?.font??"default",X=J.theme?.background,Y=J.theme?.foreground;function w(z){$({theme:{...J.theme,font:Q,...z}})}return h5.jsx(HG,{ref:Z,title:"Customize",children:h5.jsxs("div",{className:"flex flex-col gap-6",children:[h5.jsxs("div",{className:"flex flex-col gap-2",children:[h5.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Font"}),h5.jsx("div",{className:"grid grid-cols-3 gap-2",children:t80.map(([z,H])=>h5.jsxs("button",{type:"button",onClick:()=>w({font:z}),className:v0("flex flex-col items-start rounded-md px-3 py-2 text-left transition-colors",z===Q?"bg-primary/5 ring-2 ring-primary":"border-transparent hover:bg-muted"),style:{fontFamily:H.sans},children:[h5.jsx("span",{className:"text-sm font-medium",children:H.label}),h5.jsx("span",{className:"text-xs text-muted-foreground",children:H.feel})]},z))})]}),h5.jsxs("div",{className:"flex flex-col gap-2",children:[h5.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Colors"}),h5.jsx("div",{className:"grid grid-cols-3 gap-2",children:e80.map(([z,H])=>{let G=Z70(H,X,Y);return h5.jsxs("button",{type:"button",onClick:()=>w({background:H.background,foreground:H.foreground}),className:v0("flex items-center gap-2 rounded-md border px-3 py-2 transition-colors",G?"bg-primary/5 ring-2 ring-primary":"border-transparent hover:bg-muted"),children:[h5.jsx("span",{className:"size-5 shrink-0 rounded-full border border-black/10",style:{backgroundColor:H.background??"oklch(1 0 0)"},children:h5.jsx("span",{className:"flex size-full items-center justify-center text-[9px] leading-none font-bold",style:{color:H.foreground??"oklch(0.145 0 0)"},children:"A"})}),h5.jsx("span",{className:"text-sm",children:H.label})]},z)})})]})]})})}var au,h5,iu="mei-font-previews",o80,t80,e80;var ou=U(()=>{zG();k5();q_();K_();au=P(f(),1),h5=P(G0(),1),o80=Object.values($Z).map((Z)=>Z.googleFontsQuery).filter(Boolean).join("&family=");t80=Object.entries($Z),e80=Object.entries(ru)});function GG({editing:Z,hidden:J,onRemove:$,children:Q}){return m8.jsxs(r1.div,{variants:{idle:{rotate:0},wiggle:{rotate:[0.5,-0.5],transition:{rotate:{repeat:1/0,repeatType:"reverse",duration:0.15,ease:"easeInOut"}}}},animate:Z?"wiggle":"idle",transition:{type:"spring",duration:0.35,bounce:0},className:"group/widget relative size-full",children:[m8.jsx("div",{className:v0("dark absolute inset-0 overflow-hidden rounded-2xl [corner-shape:superellipse(1.2)]","shadow-[0_1px_2px_-1px_rgba(0,0,0,0.08),0_2px_4px_0_rgba(0,0,0,0.03)]","after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]","after:content-[''] after:[corner-shape:inherit]","after:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.05)]","text-foreground",Z&&"pointer-events-none"),children:Q}),Z&&$&&m8.jsx("div",{className:"absolute -top-2 -right-2 opacity-0 transition-opacity group-hover/widget:opacity-100",children:m8.jsx($5,{size:"icon-sm",variant:"outline",className:"size-7 rounded-full",onClick:$,children:J?m8.jsx(q6,{stroke:1.5}):m8.jsx(PW,{stroke:1.5})})})]})}var m8;var B_=U(()=>{t4();N2();k5();r6();m8=P(G0(),1)});function tu({items:Z,renderItem:J,onRestore:$,ref:Q}){let X=nu.useMemo(()=>JQ(Z),[Z]);return QZ.jsx(HG,{ref:Q,title:"Hidden",children:QZ.jsx("div",{className:"grid [grid-auto-rows:160px] grid-cols-4 gap-2",children:QZ.jsx(c2,{children:X.map((Y)=>QZ.jsx(r1.div,{layoutId:Y.i,className:v0(J70[Y.x],$70[Y.y],Q70[Y.w],X70[Y.h]),transition:{type:"spring",duration:0.35,bounce:0},children:QZ.jsx(GG,{editing:!0,onRemove:()=>$(Y.i),hidden:!0,children:J(Y.i)})},Y.i))})})})}var nu,QZ,J70,$70,Q70,X70;var eu=U(()=>{t4();k5();K_();B_();nu=P(f(),1),QZ=P(G0(),1),J70={0:"col-start-1",1:"col-start-2",2:"col-start-3",3:"col-start-4"},$70={0:"row-start-1",1:"row-start-2",2:"row-start-3",3:"row-start-4",4:"row-start-5",5:"row-start-6",6:"row-start-7",7:"row-start-8"},Q70={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4"},X70={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4"}});function u8(Z){let{margin:J,containerPadding:$,containerWidth:Q,cols:X}=Z;return(Q-J[0]*(X-1)-$[0]*2)/X}function _4(Z,J,$){if(!Number.isFinite(Z))return Z;return Math.round(J*Z+Math.max(0,Z-1)*$)}function XQ(Z,J,$,Q,X,Y,w){let{margin:z,containerPadding:H,rowHeight:G}=Z,W=u8(Z),q,K,B,V;if(w)q=Math.round(w.width),K=Math.round(w.height);else q=_4(Q,W,z[0]),K=_4(X,G,z[1]);if(Y)B=Math.round(Y.top),V=Math.round(Y.left);else if(w)B=Math.round(w.top),V=Math.round(w.left);else B=Math.round((G+z[1])*$+H[1]),V=Math.round((W+z[0])*J+H[0]);if(!Y&&!w){if(Number.isFinite(Q)){let _=Math.round((W+z[0])*(J+Q)+H[0])-V-q;if(_!==z[0])q+=_-z[0]}if(Number.isFinite(X)){let _=Math.round((G+z[1])*($+X)+H[1])-B-K;if(_!==z[1])K+=_-z[1]}}return{top:B,left:V,width:q,height:K}}function Jc(Z,J,$,Q,X){let{margin:Y,containerPadding:w,cols:z,rowHeight:H,maxRows:G}=Z,W=u8(Z),q=Math.round(($-w[0])/(W+Y[0])),K=Math.round((J-w[1])/(H+Y[1]));return q=QQ(q,0,z-Q),K=QQ(K,0,G-X),{x:q,y:K}}function wQ(Z,J,$){let{margin:Q,containerPadding:X,rowHeight:Y}=Z,w=u8(Z),z=Math.round(($-X[0])/(w+Q[0])),H=Math.round((J-X[1])/(Y+Q[1]));return{x:z,y:H}}function $c(Z,J,$){let{margin:Q,rowHeight:X}=Z,Y=u8(Z),w=Math.max(1,Math.round((J+Q[0])/(Y+Q[0]))),z=Math.max(1,Math.round(($+Q[1])/(X+Q[1])));return{w,h:z}}function QQ(Z,J,$){return Math.max(Math.min(Z,$),J)}function qG(Z,J){if(Z.i===J.i)return!1;if(Z.x+Z.w<=J.x)return!1;if(Z.x>=J.x+J.w)return!1;if(Z.y+Z.h<=J.y)return!1;if(Z.y>=J.y+J.h)return!1;return!0}function c8(Z,J){for(let $=0;$<Z.length;$++){let Q=Z[$];if(Q!==void 0&&qG(Q,J))return Q}return}function U_(Z,J){return Z.filter(($)=>qG($,J))}function w70(Z,J){if(J==="horizontal")return V_(Z);if(J==="vertical")return WG(Z);if(J==="wrap")return WG(Z);return[...Z]}function WG(Z){return[...Z].sort((J,$)=>{if(J.y!==$.y)return J.y-$.y;return J.x-$.x})}function V_(Z){return[...Z].sort((J,$)=>{if(J.x!==$.x)return J.x-$.x;return J.y-$.y})}function YQ(Z){let J=0;for(let $=0;$<Z.length;$++){let Q=Z[$];if(Q!==void 0){let X=Q.y+Q.h;if(X>J)J=X}}return J}function d8(Z,J){for(let $=0;$<Z.length;$++){let Q=Z[$];if(Q!==void 0&&Q.i===J)return Q}return}function zQ(Z){return Z.filter((J)=>J.static===!0)}function y6(Z){return{i:Z.i,x:Z.x,y:Z.y,w:Z.w,h:Z.h,minW:Z.minW,maxW:Z.maxW,minH:Z.minH,maxH:Z.maxH,moved:Boolean(Z.moved),static:Boolean(Z.static),isDraggable:Z.isDraggable,isResizable:Z.isResizable,resizeHandles:Z.resizeHandles,constraints:Z.constraints,isBounded:Z.isBounded}}function XZ(Z){let J=Array(Z.length);for(let $=0;$<Z.length;$++){let Q=Z[$];if(Q!==void 0)J[$]=y6(Q)}return J}function Y70(Z,J){let $=Array(Z.length);for(let Q=0;Q<Z.length;Q++){let X=Z[Q];if(X!==void 0)if(J.i===X.i)$[Q]=J;else $[Q]=X}return $}function Qc(Z,J,$){let Q=d8(Z,J);if(!Q)return[[...Z],null];return Q=$(y6(Q)),[Y70(Z,Q),Q]}function F_(Z,J){let $=zQ(Z);for(let Q=0;Q<Z.length;Q++){let X=Z[Q];if(X===void 0)continue;if(X.x+X.w>J.cols)X.x=J.cols-X.w;if(X.x<0)X.x=0,X.w=J.cols;if(!X.static)$.push(X);else while(c8($,X))X.y++}return Z}function p8(Z,J,$,Q,X,Y,w,z,H){if(J.static&&J.isDraggable!==!0)return[...Z];if(J.y===Q&&J.x===$)return[...Z];let{x:G,y:W}=J;if(typeof $==="number")J.x=$;if(typeof Q==="number")J.y=Q;J.moved=!0;let q=w70(Z,w);if(w==="vertical"&&typeof Q==="number"?W>=Q:w==="horizontal"&&typeof $==="number"?G>=$:!1)q=q.reverse();let B=U_(q,J),V=B.length>0;if(V&&H)return XZ(Z);if(V&&Y)return J.x=G,J.y=W,J.moved=!1,Z;let F=[...Z];for(let _=0;_<B.length;_++){let N=B[_];if(N===void 0)continue;if(N.moved)continue;if(N.static)F=Zc(F,N,J,X,w);else F=Zc(F,J,N,X,w)}return F}function Zc(Z,J,$,Q,X,Y){let w=X==="horizontal",z=X==="vertical",H=J.static;if(Q){Q=!1;let q={x:w?Math.max(J.x-$.w,0):$.x,y:z?Math.max(J.y-$.h,0):$.y,w:$.w,h:$.h,i:"-1"},K=c8(Z,q),B=K!==void 0&&K.y+K.h>J.y,V=K!==void 0&&J.x+J.w>K.x;if(!K)return p8(Z,$,w?q.x:void 0,z?q.y:void 0,Q,H,X);if(B&&z)return p8(Z,$,void 0,$.y+1,Q,H,X);if(B&&X===null)return J.y=$.y,$.y=$.y+$.h,[...Z];if(V&&w)return p8(Z,J,$.x,void 0,Q,H,X)}let G=w?$.x+1:void 0,W=z?$.y+1:void 0;if(G===void 0&&W===void 0)return[...Z];return p8(Z,$,G,W,Q,H,X)}var N_=()=>{};function wZ(Z,J,$){return Math.max(J,Math.min($,Z))}function HQ(Z,J,$,Q,X){let Y={x:$,y:Q};for(let w of Z)if(w.constrainPosition)Y=w.constrainPosition(J,Y.x,Y.y,X);if(J.constraints){for(let w of J.constraints)if(w.constrainPosition)Y=w.constrainPosition(J,Y.x,Y.y,X)}return Y}function Xc(Z,J,$,Q,X,Y){let w={w:$,h:Q};for(let z of Z)if(z.constrainSize)w=z.constrainSize(J,w.w,w.h,X,Y);if(J.constraints){for(let z of J.constraints)if(z.constrainSize)w=z.constrainSize(J,w.w,w.h,X,Y)}return w}function BG({top:Z,left:J,width:$,height:Q}){let X=`translate(${J}px,${Z}px)`;return{transform:X,WebkitTransform:X,MozTransform:X,msTransform:X,OTransform:X,width:`${$}px`,height:`${Q}px`,position:"absolute"}}function L_({top:Z,left:J,width:$,height:Q}){return{top:`${Z}px`,left:`${J}px`,width:`${$}px`,height:`${Q}px`,position:"absolute"}}function A_(Z){return Z*100+"%"}function G70(Z,J,$,Q){return Z+$>Q?J:$}function wc(Z,J,$){return Z<0?J:$}function W70(Z){return Math.max(0,Z)}function KG(Z){return Math.max(0,Z)}function Yc(Z,J,$,Q){let X=V70[Z];if(!X)return $;return X(J,{...J,...$},Q)}function b_(Z,J,$,Q,X){let Y=Q==="x"?"w":"h";J[Q]+=1;let w=Z.findIndex((H)=>H.i===J.i),z=X??zQ(Z).length>0;for(let H=w+1;H<Z.length;H++){let G=Z[H];if(G===void 0)continue;if(G.static)continue;if(!z&&G.y>J.y+J.h)break;if(qG(J,G))b_(Z,G,$+J[Y],Q,z)}J[Q]=$}function N70(Z,J,$,Q){J.x=Math.max(J.x,0),J.y=Math.max(J.y,0),J.y=Math.min(Q,J.y);while(J.y>0&&!c8(Z,J))J.y--;let X;while((X=c8(Z,J))!==void 0)b_($,J,X.y+X.h,"y");return J.y=Math.max(J.y,0),J}function _70(Z,J,$,Q){J.x=Math.max(J.x,0),J.y=Math.max(J.y,0);while(J.x>0&&!c8(Z,J))J.x--;let X;while((X=c8(Z,J))!==void 0)if(b_(Q,J,X.x+X.w,"x"),J.x+J.w>$){J.x=$-J.w,J.y++;while(J.x>0&&!c8(Z,J))J.x--}return J.x=Math.max(J.x,0),J}function T_(Z,J=!1,$=!1){let Q;if(J)if(Z==="vertical")Q=L70;else if(Z==="horizontal")Q=A70;else Q=D70;else if(Z==="vertical")Q=GQ;else if(Z==="horizontal")Q=P_;else Q=I_;if($)return{...Q,preventCollision:$};return Q}var z70,H70,__,D_=(Z,J,$)=>{let{left:Q,height:X,width:Y}=J,w=Z.top-(X-Z.height);return{left:Q,width:Y,height:wc(w,Z.height,X),top:KG(w)}},M_=(Z,J,$)=>{let{top:Q,left:X,height:Y,width:w}=J;return{top:Q,height:Y,width:G70(Z.left,Z.width,w,$),left:W70(X)}},O_=(Z,J,$)=>{let{top:Q,height:X,width:Y}=J,w=Z.left+Z.width-Y;if(w<0)return{height:X,width:Z.left+Z.width,top:KG(Q),left:0};return{height:X,width:Y,top:KG(Q),left:w}},j_=(Z,J,$)=>{let{top:Q,left:X,height:Y,width:w}=J;return{width:w,left:X,height:wc(Q,Z.height,Y),top:KG(Q)}},q70=(Z,J,$)=>D_(Z,M_(Z,J,$)),K70=(Z,J,$)=>D_(Z,O_(Z,J)),B70=(Z,J,$)=>j_(Z,M_(Z,J,$)),U70=(Z,J,$)=>j_(Z,O_(Z,J)),V70,F70,zc,Hc,Gc,Wc,qc,GQ,P_,I_,L70,A70,D70;var k_=U(()=>{N_();z70={name:"gridBounds",constrainPosition(Z,J,$,{cols:Q,maxRows:X}){return{x:wZ(J,0,Math.max(0,Q-Z.w)),y:wZ($,0,Math.max(0,X-Z.h))}},constrainSize(Z,J,$,Q,{cols:X,maxRows:Y}){let w=Q==="w"||Q==="nw"||Q==="sw"?Z.x+Z.w:X-Z.x,z=Q==="n"||Q==="nw"||Q==="ne"?Z.y+Z.h:Y-Z.y;return{w:wZ(J,1,Math.max(1,w)),h:wZ($,1,Math.max(1,z))}}},H70={name:"minMaxSize",constrainSize(Z,J,$){return{w:wZ(J,Z.minW??1,Z.maxW??1/0),h:wZ($,Z.minH??1,Z.maxH??1/0)}}},__=[z70,H70];V70={n:D_,ne:q70,e:M_,se:B70,s:j_,sw:U70,w:O_,nw:K70};F70={type:"transform",scale:1,calcStyle(Z){return BG(Z)}},zc=F70,Hc={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},Gc={enabled:!0,bounded:!1,threshold:3},Wc={enabled:!0,handles:["se"]},qc={enabled:!1,defaultItem:{w:1,h:1}};GQ={type:"vertical",allowOverlap:!1,compact(Z,J){let $=zQ(Z),Q=YQ($),X=WG(Z),Y=Array(Z.length);for(let w=0;w<X.length;w++){let z=X[w];if(z===void 0)continue;let H=y6(z);if(!H.static)H=N70($,H,X,Q),Q=Math.max(Q,H.y+H.h),$.push(H);let G=Z.indexOf(z);Y[G]=H,H.moved=!1}return Y}},P_={type:"horizontal",allowOverlap:!1,compact(Z,J){let $=zQ(Z),Q=V_(Z),X=Array(Z.length);for(let Y=0;Y<Q.length;Y++){let w=Q[Y];if(w===void 0)continue;let z=y6(w);if(!z.static)z=_70($,z,J,Q),$.push(z);let H=Z.indexOf(w);X[H]=z,z.moved=!1}return X}},I_={type:null,allowOverlap:!1,compact(Z,J){return XZ(Z)}},L70={...GQ,allowOverlap:!0,compact(Z,J){return XZ(Z)}},A70={...P_,allowOverlap:!0,compact(Z,J){return XZ(Z)}},D70={...I_,allowOverlap:!0}});var Bc=F1((UG,Kc)=>{(function(Z,J){typeof UG==="object"&&typeof Kc<"u"?J(UG):typeof define==="function"&&define.amd?define(["exports"],J):(Z=typeof globalThis<"u"?globalThis:Z||self,J(Z["fast-equals"]={}))})(UG,function(Z){function J(l){return function(q0,s,X0,z0,p,o,t){return l(q0,s,t)}}function $(l){return function(q0,s,X0,z0){if(!q0||!s||typeof q0!=="object"||typeof s!=="object")return l(q0,s,X0,z0);var p=z0.get(q0),o=z0.get(s);if(p&&o)return p===s&&o===q0;z0.set(q0,s),z0.set(s,q0);var t=l(q0,s,X0,z0);return z0.delete(q0),z0.delete(s),t}}function Q(l,Z0){var q0={};for(var s in l)q0[s]=l[s];for(var s in Z0)q0[s]=Z0[s];return q0}function X(l){return l.constructor===Object||l.constructor==null}function Y(l){return typeof l.then==="function"}function w(l,Z0){return l===Z0||l!==l&&Z0!==Z0}var z="[object Arguments]",H="[object Boolean]",G="[object Date]",W="[object RegExp]",q="[object Map]",K="[object Number]",B="[object Object]",V="[object Set]",F="[object String]",_=Object.prototype.toString;function N(l){var{areArraysEqual:Z0,areDatesEqual:q0,areMapsEqual:s,areObjectsEqual:X0,areRegExpsEqual:z0,areSetsEqual:p,createIsNestedEqual:o}=l,t=o(N0);function N0(a,J0,r){if(a===J0)return!0;if(!a||!J0||typeof a!=="object"||typeof J0!=="object")return a!==a&&J0!==J0;if(X(a)&&X(J0))return X0(a,J0,t,r);var n=Array.isArray(a),Q0=Array.isArray(J0);if(n||Q0)return n===Q0&&Z0(a,J0,t,r);var i=_.call(a);if(i!==_.call(J0))return!1;if(i===G)return q0(a,J0,t,r);if(i===W)return z0(a,J0,t,r);if(i===q)return s(a,J0,t,r);if(i===V)return p(a,J0,t,r);if(i===B||i===z)return Y(a)||Y(J0)?!1:X0(a,J0,t,r);if(i===H||i===K||i===F)return w(a.valueOf(),J0.valueOf());return!1}return N0}function L(l,Z0,q0,s){var X0=l.length;if(Z0.length!==X0)return!1;while(X0-- >0)if(!q0(l[X0],Z0[X0],X0,X0,l,Z0,s))return!1;return!0}var M=$(L);function A(l,Z0){return w(l.valueOf(),Z0.valueOf())}function O(l,Z0,q0,s){var X0=l.size===Z0.size;if(!X0)return!1;if(!l.size)return!0;var z0={},p=0;return l.forEach(function(o,t){if(!X0)return;var N0=!1,a=0;Z0.forEach(function(J0,r){if(!N0&&!z0[a]&&(N0=q0(t,r,p,a,l,Z0,s)&&q0(o,J0,t,r,l,Z0,s)))z0[a]=!0;a++}),p++,X0=N0}),X0}var D=$(O),k="_owner",b=Object.prototype.hasOwnProperty;function h(l,Z0,q0,s){var X0=Object.keys(l),z0=X0.length;if(Object.keys(Z0).length!==z0)return!1;var p;while(z0-- >0){if(p=X0[z0],p===k){var o=!!l.$$typeof,t=!!Z0.$$typeof;if((o||t)&&o!==t)return!1}if(!b.call(Z0,p)||!q0(l[p],Z0[p],p,p,l,Z0,s))return!1}return!0}var I=$(h);function d(l,Z0){return l.source===Z0.source&&l.flags===Z0.flags}function v(l,Z0,q0,s){var X0=l.size===Z0.size;if(!X0)return!1;if(!l.size)return!0;var z0={};return l.forEach(function(p,o){if(!X0)return;var t=!1,N0=0;Z0.forEach(function(a,J0){if(!t&&!z0[N0]&&(t=q0(p,a,o,J0,l,Z0,s)))z0[N0]=!0;N0++}),X0=t}),X0}var C=$(v),y=Object.freeze({areArraysEqual:L,areDatesEqual:A,areMapsEqual:O,areObjectsEqual:h,areRegExpsEqual:d,areSetsEqual:v,createIsNestedEqual:J}),g=Object.freeze({areArraysEqual:M,areDatesEqual:A,areMapsEqual:D,areObjectsEqual:I,areRegExpsEqual:d,areSetsEqual:C,createIsNestedEqual:J}),S=N(y);function x(l,Z0){return S(l,Z0,void 0)}var E=N(Q(y,{createIsNestedEqual:function(){return w}}));function m(l,Z0){return E(l,Z0,void 0)}var j=N(g);function H0(l,Z0){return j(l,Z0,new WeakMap)}var w0=N(Q(g,{createIsNestedEqual:function(){return w}}));function T(l,Z0){return w0(l,Z0,new WeakMap)}function $0(l){return N(Q(y,l(y)))}function V0(l){var Z0=N(Q(g,l(g)));return function(q0,s,X0){if(X0===void 0)X0=new WeakMap;return Z0(q0,s,X0)}}Z.circularDeepEqual=H0,Z.circularShallowEqual=T,Z.createCustomCircularEqual=V0,Z.createCustomEqual=$0,Z.deepEqual=x,Z.sameValueZeroEqual=w,Z.shallowEqual=m,Object.defineProperty(Z,"__esModule",{value:!0})})});function C_(Z={}){let{measureBeforeMount:J=!1,initialWidth:$=1280}=Z,[Q,X]=L4.useState($),[Y,w]=L4.useState(!J),z=L4.useRef(null),H=L4.useRef(null),G=L4.useCallback(()=>{let W=z.current;if(W){let q=W.offsetWidth;if(X(q),!Y)w(!0)}},[Y]);return L4.useEffect(()=>{let W=z.current;if(!W)return;if(G(),typeof ResizeObserver<"u"){let q=null;return H.current=new ResizeObserver((K)=>{let B=K[0];if(B){let V=B.contentRect.width;if(q!==null)cancelAnimationFrame(q);q=requestAnimationFrame(()=>{X(V),q=null})}}),H.current.observe(W),()=>{if(q!==null)cancelAnimationFrame(q);if(H.current)H.current.disconnect(),H.current=null}}return()=>{if(H.current)H.current.disconnect(),H.current=null}},[G]),{width:Q,mounted:Y,containerRef:z,measureWidth:G}}var L4;var Uc=U(()=>{L4=P(f(),1)});var Fc=F1((fD4,Vc)=>{var M70="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Vc.exports=M70});var Ac=F1((mD4,Lc)=>{var O70=Fc();function Nc(){}function _c(){}_c.resetWarningCache=Nc;Lc.exports=function(){function Z(Q,X,Y,w,z,H){if(H===O70)return;var G=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}Z.isRequired=Z;function J(){return Z}var $={array:Z,bigint:Z,bool:Z,func:Z,number:Z,object:Z,string:Z,symbol:Z,any:Z,arrayOf:J,element:Z,elementType:Z,instanceOf:J,node:Z,objectOf:J,oneOf:J,oneOfType:J,shape:J,exact:J,checkPropTypes:_c,resetWarningCache:Nc};return $.PropTypes=$,$}});var WQ=F1((pD4,Dc)=>{Dc.exports=Ac()();var j70,b70});var jc=F1((uD4,S_)=>{function Oc(Z){var J,$,Q="";if(typeof Z=="string"||typeof Z=="number")Q+=Z;else if(typeof Z=="object")if(Array.isArray(Z)){var X=Z.length;for(J=0;J<X;J++)Z[J]&&($=Oc(Z[J]))&&(Q&&(Q+=" "),Q+=$)}else for($ in Z)Z[$]&&(Q&&(Q+=" "),Q+=$);return Q}function Mc(){for(var Z,J,$=0,Q="",X=arguments.length;$<X;$++)(Z=arguments[$])&&(J=Oc(Z))&&(Q&&(Q+=" "),Q+=J);return Q}S_.exports=Mc,S_.exports.clsx=Mc});var qQ=F1((bc)=>{Object.defineProperty(bc,"__esModule",{value:!0});bc.dontSetMe=C70;bc.findInArray=P70;bc.int=k70;bc.isFunction=I70;bc.isNum=T70;function P70(Z,J){for(let $=0,Q=Z.length;$<Q;$++)if(J.apply(J,[Z[$],$,Z]))return Z[$]}function I70(Z){return typeof Z==="function"||Object.prototype.toString.call(Z)==="[object Function]"}function T70(Z){return typeof Z==="number"&&!isNaN(Z)}function k70(Z){return parseInt(Z,10)}function C70(Z,J,$){if(Z[J])return Error(`Invalid prop ${J} passed to ${$} - do not set this, set it on the child.`)}});var Cc=F1((Tc)=>{Object.defineProperty(Tc,"__esModule",{value:!0});Tc.browserPrefixToKey=Ic;Tc.browserPrefixToStyle=y70;Tc.default=void 0;Tc.getPrefix=Pc;var E_=["Moz","Webkit","O","ms"];function Pc(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";let J=window.document?.documentElement?.style;if(!J)return"";if(Z in J)return"";for(let $=0;$<E_.length;$++)if(Ic(Z,E_[$])in J)return E_[$];return""}function Ic(Z,J){return J?`${J}${v70(Z)}`:Z}function y70(Z,J){return J?`-${J.toLowerCase()}-${Z}`:Z}function v70(Z){let J="",$=!0;for(let Q=0;Q<Z.length;Q++)if($)J+=Z[Q].toUpperCase(),$=!1;else if(Z[Q]==="-")$=!0;else J+=Z[Q];return J}var dD4=Tc.default=Pc()});var FG=F1((vc)=>{Object.defineProperty(vc,"__esModule",{value:!0});vc.addClassName=xc;vc.addEvent=u70;vc.addUserSelectStyles=e70;vc.createCSSTransform=s70;vc.createSVGTransform=o70;vc.getTouch=n70;vc.getTouchIdentifier=t70;vc.getTranslation=h_;vc.innerHeight=r70;vc.innerWidth=i70;vc.matchesSelector=Rc;vc.matchesSelectorAndParentsTo=p70;vc.offsetXYFromParent=a70;vc.outerHeight=d70;vc.outerWidth=l70;vc.removeClassName=yc;vc.removeEvent=c70;vc.scheduleRemoveUserSelectStyles=Z90;var I2=qQ(),Sc=hc(Cc());function hc(Z,J){if(typeof WeakMap=="function")var $=new WeakMap,Q=new WeakMap;return(hc=function(X,Y){if(!Y&&X&&X.__esModule)return X;var w,z,H={__proto__:null,default:X};if(X===null||typeof X!="object"&&typeof X!="function")return H;if(w=Y?Q:$){if(w.has(X))return w.get(X);w.set(X,H)}for(let G in X)G!=="default"&&{}.hasOwnProperty.call(X,G)&&((z=(w=Object.defineProperty)&&Object.getOwnPropertyDescriptor(X,G))&&(z.get||z.set)?w(H,G,z):H[G]=X[G]);return H})(Z,J)}var VG="";function Rc(Z,J){if(!VG)VG=(0,I2.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function($){return(0,I2.isFunction)(Z[$])});if(!(0,I2.isFunction)(Z[VG]))return!1;return Z[VG](J)}function p70(Z,J,$){let Q=Z;do{if(Rc(Q,J))return!0;if(Q===$)return!1;Q=Q.parentNode}while(Q);return!1}function u70(Z,J,$,Q){if(!Z)return;let X={capture:!0,...Q};if(Z.addEventListener)Z.addEventListener(J,$,X);else if(Z.attachEvent)Z.attachEvent("on"+J,$);else Z["on"+J]=$}function c70(Z,J,$,Q){if(!Z)return;let X={capture:!0,...Q};if(Z.removeEventListener)Z.removeEventListener(J,$,X);else if(Z.detachEvent)Z.detachEvent("on"+J,$);else Z["on"+J]=null}function d70(Z){let J=Z.clientHeight,$=Z.ownerDocument.defaultView.getComputedStyle(Z);return J+=(0,I2.int)($.borderTopWidth),J+=(0,I2.int)($.borderBottomWidth),J}function l70(Z){let J=Z.clientWidth,$=Z.ownerDocument.defaultView.getComputedStyle(Z);return J+=(0,I2.int)($.borderLeftWidth),J+=(0,I2.int)($.borderRightWidth),J}function r70(Z){let J=Z.clientHeight,$=Z.ownerDocument.defaultView.getComputedStyle(Z);return J-=(0,I2.int)($.paddingTop),J-=(0,I2.int)($.paddingBottom),J}function i70(Z){let J=Z.clientWidth,$=Z.ownerDocument.defaultView.getComputedStyle(Z);return J-=(0,I2.int)($.paddingLeft),J-=(0,I2.int)($.paddingRight),J}function a70(Z,J,$){let X=J===J.ownerDocument.body?{left:0,top:0}:J.getBoundingClientRect(),Y=(Z.clientX+J.scrollLeft-X.left)/$,w=(Z.clientY+J.scrollTop-X.top)/$;return{x:Y,y:w}}function s70(Z,J){let $=h_(Z,J,"px");return{[(0,Sc.browserPrefixToKey)("transform",Sc.default)]:$}}function o70(Z,J){return h_(Z,J,"")}function h_(Z,J,$){let{x:Q,y:X}=Z,Y=`translate(${Q}${$},${X}${$})`;if(J){let w=`${typeof J.x==="string"?J.x:J.x+$}`,z=`${typeof J.y==="string"?J.y:J.y+$}`;Y=`translate(${w}, ${z})`+Y}return Y}function n70(Z,J){return Z.targetTouches&&(0,I2.findInArray)(Z.targetTouches,($)=>J===$.identifier)||Z.changedTouches&&(0,I2.findInArray)(Z.changedTouches,($)=>J===$.identifier)}function t70(Z){if(Z.targetTouches&&Z.targetTouches[0])return Z.targetTouches[0].identifier;if(Z.changedTouches&&Z.changedTouches[0])return Z.changedTouches[0].identifier}function e70(Z){if(!Z)return;let J=Z.getElementById("react-draggable-style-el");if(!J)J=Z.createElement("style"),J.type="text/css",J.id="react-draggable-style-el",J.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
66
|
+
`,J.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
67
|
+
`,Z.getElementsByTagName("head")[0].appendChild(J);if(Z.body)xc(Z.body,"react-draggable-transparent-selection")}function Z90(Z){if(window.requestAnimationFrame)window.requestAnimationFrame(()=>{Ec(Z)});else Ec(Z)}function Ec(Z){if(!Z)return;try{if(Z.body)yc(Z.body,"react-draggable-transparent-selection");if(Z.selection)Z.selection.empty();else{let J=(Z.defaultView||window).getSelection();if(J&&J.type!=="Caret")J.removeAllRanges()}}catch(J){}}function xc(Z,J){if(Z.classList)Z.classList.add(J);else if(!Z.className.match(new RegExp(`(?:^|\\s)${J}(?!\\S)`)))Z.className+=` ${J}`}function yc(Z,J){if(Z.classList)Z.classList.remove(J);else Z.className=Z.className.replace(new RegExp(`(?:^|\\s)${J}(?!\\S)`,"g"),"")}});var x_=F1((gc)=>{Object.defineProperty(gc,"__esModule",{value:!0});gc.canDragX=D90;gc.canDragY=M90;gc.createCoreData=j90;gc.createDraggableData=b90;gc.getBoundPosition=L90;gc.getControlPosition=O90;gc.snapToGrid=A90;var T2=qQ(),YZ=FG();function L90(Z,J,$){if(!Z.props.bounds)return[J,$];let{bounds:Q}=Z.props;Q=typeof Q==="string"?Q:P90(Q);let X=R_(Z);if(typeof Q==="string"){let{ownerDocument:Y}=X,w=Y.defaultView,z;if(Q==="parent")z=X.parentNode;else z=X.getRootNode().querySelector(Q);if(!(z instanceof w.HTMLElement))throw Error('Bounds selector "'+Q+'" could not find an element.');let H=z,G=w.getComputedStyle(X),W=w.getComputedStyle(H);Q={left:-X.offsetLeft+(0,T2.int)(W.paddingLeft)+(0,T2.int)(G.marginLeft),top:-X.offsetTop+(0,T2.int)(W.paddingTop)+(0,T2.int)(G.marginTop),right:(0,YZ.innerWidth)(H)-(0,YZ.outerWidth)(X)-X.offsetLeft+(0,T2.int)(W.paddingRight)-(0,T2.int)(G.marginRight),bottom:(0,YZ.innerHeight)(H)-(0,YZ.outerHeight)(X)-X.offsetTop+(0,T2.int)(W.paddingBottom)-(0,T2.int)(G.marginBottom)}}if((0,T2.isNum)(Q.right))J=Math.min(J,Q.right);if((0,T2.isNum)(Q.bottom))$=Math.min($,Q.bottom);if((0,T2.isNum)(Q.left))J=Math.max(J,Q.left);if((0,T2.isNum)(Q.top))$=Math.max($,Q.top);return[J,$]}function A90(Z,J,$){let Q=Math.round(J/Z[0])*Z[0],X=Math.round($/Z[1])*Z[1];return[Q,X]}function D90(Z){return Z.props.axis==="both"||Z.props.axis==="x"}function M90(Z){return Z.props.axis==="both"||Z.props.axis==="y"}function O90(Z,J,$){let Q=typeof J==="number"?(0,YZ.getTouch)(Z,J):null;if(typeof J==="number"&&!Q)return null;let X=R_($),Y=$.props.offsetParent||X.offsetParent||X.ownerDocument.body;return(0,YZ.offsetXYFromParent)(Q||Z,Y,$.props.scale)}function j90(Z,J,$){let Q=!(0,T2.isNum)(Z.lastX),X=R_(Z);if(Q)return{node:X,deltaX:0,deltaY:0,lastX:J,lastY:$,x:J,y:$};else return{node:X,deltaX:J-Z.lastX,deltaY:$-Z.lastY,lastX:Z.lastX,lastY:Z.lastY,x:J,y:$}}function b90(Z,J){let $=Z.props.scale;return{node:J.node,x:Z.state.x+J.deltaX/$,y:Z.state.y+J.deltaY/$,deltaX:J.deltaX/$,deltaY:J.deltaY/$,lastX:Z.state.x,lastY:Z.state.y}}function P90(Z){return{left:Z.left,top:Z.top,right:Z.right,bottom:Z.bottom}}function R_(Z){let J=Z.findDOMNode();if(!J)throw Error("<DraggableCore>: Unmounted during event!");return J}});var y_=F1((fc)=>{Object.defineProperty(fc,"__esModule",{value:!0});fc.default=R90;function R90(){}});var cc=F1((pc)=>{var f90=P(f()),m90=P(s2());Object.defineProperty(pc,"__esModule",{value:!0});pc.default=void 0;var v_=mc(f90),X2=f_(WQ()),y90=f_(m90),l5=FG(),l8=x_(),g_=qQ(),KQ=f_(y_());function f_(Z){return Z&&Z.__esModule?Z:{default:Z}}function mc(Z,J){if(typeof WeakMap=="function")var $=new WeakMap,Q=new WeakMap;return(mc=function(X,Y){if(!Y&&X&&X.__esModule)return X;var w,z,H={__proto__:null,default:X};if(X===null||typeof X!="object"&&typeof X!="function")return H;if(w=Y?Q:$){if(w.has(X))return w.get(X);w.set(X,H)}for(let G in X)G!=="default"&&{}.hasOwnProperty.call(X,G)&&((z=(w=Object.defineProperty)&&Object.getOwnPropertyDescriptor(X,G))&&(z.get||z.set)?w(H,G,z):H[G]=X[G]);return H})(Z,J)}function w2(Z,J,$){return(J=v90(J))in Z?Object.defineProperty(Z,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Z[J]=$,Z}function v90(Z){var J=g90(Z,"string");return typeof J=="symbol"?J:J+""}function g90(Z,J){if(typeof Z!="object"||!Z)return Z;var $=Z[Symbol.toPrimitive];if($!==void 0){var Q=$.call(Z,J||"default");if(typeof Q!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)(Z)}var A4={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},r8=A4.mouse;class BQ extends v_.Component{constructor(){super(...arguments);w2(this,"dragging",!1),w2(this,"lastX",NaN),w2(this,"lastY",NaN),w2(this,"touchIdentifier",null),w2(this,"mounted",!1),w2(this,"handleDragStart",(Z)=>{if(this.props.onMouseDown(Z),!this.props.allowAnyClick&&typeof Z.button==="number"&&Z.button!==0)return!1;let J=this.findDOMNode();if(!J||!J.ownerDocument||!J.ownerDocument.body)throw Error("<DraggableCore> not mounted on DragStart!");let{ownerDocument:$}=J;if(this.props.disabled||!(Z.target instanceof $.defaultView.Node)||this.props.handle&&!(0,l5.matchesSelectorAndParentsTo)(Z.target,this.props.handle,J)||this.props.cancel&&(0,l5.matchesSelectorAndParentsTo)(Z.target,this.props.cancel,J))return;if(Z.type==="touchstart"&&!this.props.allowMobileScroll)Z.preventDefault();let Q=(0,l5.getTouchIdentifier)(Z);this.touchIdentifier=Q;let X=(0,l8.getControlPosition)(Z,Q,this);if(X==null)return;let{x:Y,y:w}=X,z=(0,l8.createCoreData)(this,Y,w);if((0,KQ.default)("DraggableCore: handleDragStart: %j",z),(0,KQ.default)("calling",this.props.onStart),this.props.onStart(Z,z)===!1||this.mounted===!1)return;if(this.props.enableUserSelectHack)(0,l5.addUserSelectStyles)($);this.dragging=!0,this.lastX=Y,this.lastY=w,(0,l5.addEvent)($,r8.move,this.handleDrag),(0,l5.addEvent)($,r8.stop,this.handleDragStop)}),w2(this,"handleDrag",(Z)=>{let J=(0,l8.getControlPosition)(Z,this.touchIdentifier,this);if(J==null)return;let{x:$,y:Q}=J;if(Array.isArray(this.props.grid)){let w=$-this.lastX,z=Q-this.lastY;if([w,z]=(0,l8.snapToGrid)(this.props.grid,w,z),!w&&!z)return;$=this.lastX+w,Q=this.lastY+z}let X=(0,l8.createCoreData)(this,$,Q);if((0,KQ.default)("DraggableCore: handleDrag: %j",X),this.props.onDrag(Z,X)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(w){let z=document.createEvent("MouseEvents");z.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(z)}return}this.lastX=$,this.lastY=Q}),w2(this,"handleDragStop",(Z)=>{if(!this.dragging)return;let J=(0,l8.getControlPosition)(Z,this.touchIdentifier,this);if(J==null)return;let{x:$,y:Q}=J;if(Array.isArray(this.props.grid)){let z=$-this.lastX||0,H=Q-this.lastY||0;[z,H]=(0,l8.snapToGrid)(this.props.grid,z,H),$=this.lastX+z,Q=this.lastY+H}let X=(0,l8.createCoreData)(this,$,Q);if(this.props.onStop(Z,X)===!1||this.mounted===!1)return!1;let w=this.findDOMNode();if(w){if(this.props.enableUserSelectHack)(0,l5.scheduleRemoveUserSelectStyles)(w.ownerDocument)}if((0,KQ.default)("DraggableCore: handleDragStop: %j",X),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,w)(0,KQ.default)("DraggableCore: Removing handlers"),(0,l5.removeEvent)(w.ownerDocument,r8.move,this.handleDrag),(0,l5.removeEvent)(w.ownerDocument,r8.stop,this.handleDragStop)}),w2(this,"onMouseDown",(Z)=>{return r8=A4.mouse,this.handleDragStart(Z)}),w2(this,"onMouseUp",(Z)=>{return r8=A4.mouse,this.handleDragStop(Z)}),w2(this,"onTouchStart",(Z)=>{return r8=A4.touch,this.handleDragStart(Z)}),w2(this,"onTouchEnd",(Z)=>{return r8=A4.touch,this.handleDragStop(Z)})}componentDidMount(){this.mounted=!0;let Z=this.findDOMNode();if(Z)(0,l5.addEvent)(Z,A4.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let Z=this.findDOMNode();if(Z){let{ownerDocument:J}=Z;if((0,l5.removeEvent)(J,A4.mouse.move,this.handleDrag),(0,l5.removeEvent)(J,A4.touch.move,this.handleDrag),(0,l5.removeEvent)(J,A4.mouse.stop,this.handleDragStop),(0,l5.removeEvent)(J,A4.touch.stop,this.handleDragStop),(0,l5.removeEvent)(Z,A4.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack)(0,l5.scheduleRemoveUserSelectStyles)(J)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:y90.default.findDOMNode(this)}render(){return v_.cloneElement(v_.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}pc.default=BQ;w2(BQ,"displayName","DraggableCore");w2(BQ,"propTypes",{allowAnyClick:X2.default.bool,allowMobileScroll:X2.default.bool,children:X2.default.node.isRequired,disabled:X2.default.bool,enableUserSelectHack:X2.default.bool,offsetParent:function(Z,J){if(Z[J]&&Z[J].nodeType!==1)throw Error("Draggable's offsetParent must be a DOM Node.")},grid:X2.default.arrayOf(X2.default.number),handle:X2.default.string,cancel:X2.default.string,nodeRef:X2.default.object,onStart:X2.default.func,onDrag:X2.default.func,onStop:X2.default.func,onMouseDown:X2.default.func,scale:X2.default.number,className:g_.dontSetMe,style:g_.dontSetMe,transform:g_.dontSetMe});w2(BQ,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})});var ic=F1((u_)=>{var l90=P(f()),r90=P(s2());Object.defineProperty(u_,"__esModule",{value:!0});Object.defineProperty(u_,"DraggableCore",{enumerable:!0,get:function(){return LG.default}});u_.default=void 0;var NG=lc(l90),h1=AG(WQ()),p90=AG(r90),u90=jc(),dc=FG(),zZ=x_(),m_=qQ(),LG=AG(cc()),_G=AG(y_());function AG(Z){return Z&&Z.__esModule?Z:{default:Z}}function lc(Z,J){if(typeof WeakMap=="function")var $=new WeakMap,Q=new WeakMap;return(lc=function(X,Y){if(!Y&&X&&X.__esModule)return X;var w,z,H={__proto__:null,default:X};if(X===null||typeof X!="object"&&typeof X!="function")return H;if(w=Y?Q:$){if(w.has(X))return w.get(X);w.set(X,H)}for(let G in X)G!=="default"&&{}.hasOwnProperty.call(X,G)&&((z=(w=Object.defineProperty)&&Object.getOwnPropertyDescriptor(X,G))&&(z.get||z.set)?w(H,G,z):H[G]=X[G]);return H})(Z,J)}function p_(){return p_=Object.assign?Object.assign.bind():function(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J];for(var Q in $)({}).hasOwnProperty.call($,Q)&&(Z[Q]=$[Q])}return Z},p_.apply(null,arguments)}function HZ(Z,J,$){return(J=c90(J))in Z?Object.defineProperty(Z,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Z[J]=$,Z}function c90(Z){var J=d90(Z,"string");return typeof J=="symbol"?J:J+""}function d90(Z,J){if(typeof Z!="object"||!Z)return Z;var $=Z[Symbol.toPrimitive];if($!==void 0){var Q=$.call(Z,J||"default");if(typeof Q!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)(Z)}class UQ extends NG.Component{static getDerivedStateFromProps(Z,J){let{position:$}=Z,{prevPropsPosition:Q}=J;if($&&(!Q||$.x!==Q.x||$.y!==Q.y))return(0,_G.default)("Draggable: getDerivedStateFromProps %j",{position:$,prevPropsPosition:Q}),{x:$.x,y:$.y,prevPropsPosition:{...$}};return null}constructor(Z){super(Z);if(HZ(this,"onDragStart",(J,$)=>{if((0,_G.default)("Draggable: onDragStart: %j",$),this.props.onStart(J,(0,zZ.createDraggableData)(this,$))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),HZ(this,"onDrag",(J,$)=>{if(!this.state.dragging)return!1;(0,_G.default)("Draggable: onDrag: %j",$);let Q=(0,zZ.createDraggableData)(this,$),X={x:Q.x,y:Q.y,slackX:0,slackY:0};if(this.props.bounds){let{x:w,y:z}=X;X.x+=this.state.slackX,X.y+=this.state.slackY;let[H,G]=(0,zZ.getBoundPosition)(this,X.x,X.y);X.x=H,X.y=G,X.slackX=this.state.slackX+(w-X.x),X.slackY=this.state.slackY+(z-X.y),Q.x=X.x,Q.y=X.y,Q.deltaX=X.x-this.state.x,Q.deltaY=X.y-this.state.y}if(this.props.onDrag(J,Q)===!1)return!1;this.setState(X)}),HZ(this,"onDragStop",(J,$)=>{if(!this.state.dragging)return!1;if(this.props.onStop(J,(0,zZ.createDraggableData)(this,$))===!1)return!1;(0,_G.default)("Draggable: onDragStop: %j",$);let X={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){let{x:w,y:z}=this.props.position;X.x=w,X.y=z}this.setState(X)}),this.state={dragging:!1,dragged:!1,x:Z.position?Z.position.x:Z.defaultPosition.x,y:Z.position?Z.position.y:Z.defaultPosition.y,prevPropsPosition:{...Z.position},slackX:0,slackY:0,isElementSVG:!1},Z.position&&!(Z.onDrag||Z.onStop))console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){if(typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement)this.setState({isElementSVG:!0})}componentWillUnmount(){if(this.state.dragging)this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??p90.default.findDOMNode(this)}render(){let{axis:Z,bounds:J,children:$,defaultPosition:Q,defaultClassName:X,defaultClassNameDragging:Y,defaultClassNameDragged:w,position:z,positionOffset:H,scale:G,...W}=this.props,q={},K=null,V=!Boolean(z)||this.state.dragging,F=z||Q,_={x:(0,zZ.canDragX)(this)&&V?this.state.x:F.x,y:(0,zZ.canDragY)(this)&&V?this.state.y:F.y};if(this.state.isElementSVG)K=(0,dc.createSVGTransform)(_,H);else q=(0,dc.createCSSTransform)(_,H);let N=(0,u90.clsx)($.props.className||"",X,{[Y]:this.state.dragging,[w]:this.state.dragged});return NG.createElement(LG.default,p_({},W,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),NG.cloneElement(NG.Children.only($),{className:N,style:{...$.props.style,...q},transform:K}))}}u_.default=UQ;HZ(UQ,"displayName","Draggable");HZ(UQ,"propTypes",{...LG.default.propTypes,axis:h1.default.oneOf(["both","x","y","none"]),bounds:h1.default.oneOfType([h1.default.shape({left:h1.default.number,right:h1.default.number,top:h1.default.number,bottom:h1.default.number}),h1.default.string,h1.default.oneOf([!1])]),defaultClassName:h1.default.string,defaultClassNameDragging:h1.default.string,defaultClassNameDragged:h1.default.string,defaultPosition:h1.default.shape({x:h1.default.number,y:h1.default.number}),positionOffset:h1.default.shape({x:h1.default.oneOfType([h1.default.number,h1.default.string]),y:h1.default.oneOfType([h1.default.number,h1.default.string])}),position:h1.default.shape({x:h1.default.number,y:h1.default.number}),className:m_.dontSetMe,style:m_.dontSetMe,transform:m_.dontSetMe});HZ(UQ,"defaultProps",{...LG.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})});var MG=F1((nD4,DG)=>{var{default:ac,DraggableCore:i90}=ic();DG.exports=ac;DG.exports.default=ac;DG.exports.DraggableCore=i90});var nc=F1((Z30)=>{var Q30=P(f());Z30.__esModule=!0;Z30.cloneElement=e90;var a90=s90(Q30);function s90(Z){return Z&&Z.__esModule?Z:{default:Z}}function sc(Z,J){var $=Object.keys(Z);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(Z);J&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor(Z,X).enumerable})),$.push.apply($,Q)}return $}function oc(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J]!=null?arguments[J]:{};J%2?sc(Object($),!0).forEach(function(Q){o90(Z,Q,$[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors($)):sc(Object($)).forEach(function(Q){Object.defineProperty(Z,Q,Object.getOwnPropertyDescriptor($,Q))})}return Z}function o90(Z,J,$){return(J=n90(J))in Z?Object.defineProperty(Z,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Z[J]=$,Z}function n90(Z){var J=t90(Z,"string");return typeof J=="symbol"?J:J+""}function t90(Z,J){if(typeof Z!="object"||!Z)return Z;var $=Z[Symbol.toPrimitive];if($!==void 0){var Q=$.call(Z,J||"default");if(typeof Q!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)(Z)}function e90(Z,J){if(J.style&&Z.props.style)J.style=oc(oc({},Z.props.style),J.style);if(J.className&&Z.props.className)J.className=`${Z.props.className} ${J.className}`;return a90.default.cloneElement(Z,J)}});var c_=F1((w30)=>{w30.__esModule=!0;w30.resizableProps=void 0;var a0=X30(WQ()),eD4=MG();function X30(Z){return Z&&Z.__esModule?Z:{default:Z}}var ZM4=w30.resizableProps={axis:a0.default.oneOf(["both","x","y","none"]),className:a0.default.string,children:a0.default.element.isRequired,draggableOpts:a0.default.shape({allowAnyClick:a0.default.bool,cancel:a0.default.string,children:a0.default.node,disabled:a0.default.bool,enableUserSelectHack:a0.default.bool,offsetParent:typeof Element<"u"?a0.default.instanceOf(Element):a0.default.any,grid:a0.default.arrayOf(a0.default.number),handle:a0.default.string,nodeRef:a0.default.object,onStart:a0.default.func,onDrag:a0.default.func,onStop:a0.default.func,onMouseDown:a0.default.func,scale:a0.default.number}),height:function(){for(var Z=arguments.length,J=Array(Z),$=0;$<Z;$++)J[$]=arguments[$];let[Q]=J;if(Q.axis==="both"||Q.axis==="y")return a0.default.number.isRequired(...J);return a0.default.number(...J)},handle:a0.default.oneOfType([a0.default.node,a0.default.func]),handleSize:a0.default.arrayOf(a0.default.number),lockAspectRatio:a0.default.bool,maxConstraints:a0.default.arrayOf(a0.default.number),minConstraints:a0.default.arrayOf(a0.default.number),onResizeStop:a0.default.func,onResizeStart:a0.default.func,onResize:a0.default.func,resizeHandles:a0.default.arrayOf(a0.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:a0.default.number,width:function(){for(var Z=arguments.length,J=Array(Z),$=0;$<Z;$++)J[$]=arguments[$];let[Q]=J;if(Q.axis==="both"||Q.axis==="x")return a0.default.number.isRequired(...J);return a0.default.number(...J)}}});var r_=F1((F30)=>{var _30=P(f());F30.__esModule=!0;F30.default=void 0;var GZ=Zd(_30),z30=MG(),H30=nc(),G30=c_(),W30=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function Zd(Z,J){if(typeof WeakMap=="function")var $=new WeakMap,Q=new WeakMap;return(Zd=function(X,Y){if(!Y&&X&&X.__esModule)return X;var w,z,H={__proto__:null,default:X};if(X===null||typeof X!="object"&&typeof X!="function")return H;if(w=Y?Q:$){if(w.has(X))return w.get(X);w.set(X,H)}for(let G in X)G!=="default"&&{}.hasOwnProperty.call(X,G)&&((z=(w=Object.defineProperty)&&Object.getOwnPropertyDescriptor(X,G))&&(z.get||z.set)?w(H,G,z):H[G]=X[G]);return H})(Z,J)}function l_(){return l_=Object.assign?Object.assign.bind():function(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J];for(var Q in $)({}).hasOwnProperty.call($,Q)&&(Z[Q]=$[Q])}return Z},l_.apply(null,arguments)}function q30(Z,J){if(Z==null)return{};var $,Q,X=K30(Z,J);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(Z);for(Q=0;Q<Y.length;Q++)$=Y[Q],J.indexOf($)===-1&&{}.propertyIsEnumerable.call(Z,$)&&(X[$]=Z[$])}return X}function K30(Z,J){if(Z==null)return{};var $={};for(var Q in Z)if({}.hasOwnProperty.call(Z,Q)){if(J.indexOf(Q)!==-1)continue;$[Q]=Z[Q]}return $}function ec(Z,J){var $=Object.keys(Z);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(Z);J&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor(Z,X).enumerable})),$.push.apply($,Q)}return $}function d_(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J]!=null?arguments[J]:{};J%2?ec(Object($),!0).forEach(function(Q){B30(Z,Q,$[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors($)):ec(Object($)).forEach(function(Q){Object.defineProperty(Z,Q,Object.getOwnPropertyDescriptor($,Q))})}return Z}function B30(Z,J,$){return(J=U30(J))in Z?Object.defineProperty(Z,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Z[J]=$,Z}function U30(Z){var J=V30(Z,"string");return typeof J=="symbol"?J:J+""}function V30(Z,J){if(typeof Z!="object"||!Z)return Z;var $=Z[Symbol.toPrimitive];if($!==void 0){var Q=$.call(Z,J||"default");if(typeof Q!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)(Z)}class OG extends GZ.Component{constructor(){super(...arguments);this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(Z,J){let{minConstraints:$,maxConstraints:Q,lockAspectRatio:X}=this.props;if(!$&&!Q&&!X)return[Z,J];if(X){let G=this.props.width/this.props.height,W=Z-this.props.width,q=J-this.props.height;if(Math.abs(W)>Math.abs(q*G))J=Z/G;else Z=J*G}let[Y,w]=[Z,J],[z,H]=this.slack||[0,0];if(Z+=z,J+=H,$)Z=Math.max($[0],Z),J=Math.max($[1],J);if(Q)Z=Math.min(Q[0],Z),J=Math.min(Q[1],J);return this.slack=[z+(Y-Z),H+(w-J)],[Z,J]}resizeHandler(Z,J){return($,Q)=>{let{node:X,deltaX:Y,deltaY:w}=Q;if(Z==="onResizeStart")this.resetData();let z=(this.props.axis==="both"||this.props.axis==="x")&&J!=="n"&&J!=="s",H=(this.props.axis==="both"||this.props.axis==="y")&&J!=="e"&&J!=="w";if(!z&&!H)return;let G=J[0],W=J[J.length-1],q=X.getBoundingClientRect();if(this.lastHandleRect!=null){if(W==="w"){let N=q.left-this.lastHandleRect.left;Y+=N}if(G==="n"){let N=q.top-this.lastHandleRect.top;w+=N}}if(this.lastHandleRect=q,W==="w")Y=-Y;if(G==="n")w=-w;let K=this.props.width+(z?Y/this.props.transformScale:0),B=this.props.height+(H?w/this.props.transformScale:0);if([K,B]=this.runConstraints(K,B),Z==="onResizeStop"&&this.lastSize)({width:K,height:B}=this.lastSize);let V=K!==this.props.width||B!==this.props.height;if(Z!=="onResizeStop")this.lastSize={width:K,height:B};let F=typeof this.props[Z]==="function"?this.props[Z]:null;if(F&&!(Z==="onResize"&&!V))$.persist?.(),F($,{node:X,size:{width:K,height:B},handle:J});if(Z==="onResizeStop")this.resetData()}}renderResizeHandle(Z,J){let{handle:$}=this.props;if(!$)return GZ.createElement("span",{className:`react-resizable-handle react-resizable-handle-${Z}`,ref:J});if(typeof $==="function")return $(Z,J);let Q=typeof $.type==="string",X=d_({ref:J},Q?{}:{handleAxis:Z});return GZ.cloneElement($,X)}render(){let Z=this.props,{children:J,className:$,draggableOpts:Q,width:X,height:Y,handle:w,handleSize:z,lockAspectRatio:H,axis:G,minConstraints:W,maxConstraints:q,onResize:K,onResizeStop:B,onResizeStart:V,resizeHandles:F,transformScale:_}=Z,N=q30(Z,W30);return(0,H30.cloneElement)(J,d_(d_({},N),{},{className:`${$?`${$} `:""}react-resizable`,children:[...GZ.Children.toArray(J.props.children),...F.map((L)=>{let M=this.handleRefs[L]??(this.handleRefs[L]=GZ.createRef());return GZ.createElement(z30.DraggableCore,l_({},Q,{nodeRef:M,key:`resizableHandle-${L}`,onStop:this.resizeHandler("onResizeStop",L),onStart:this.resizeHandler("onResizeStart",L),onDrag:this.resizeHandler("onResize",L)}),this.renderResizeHandle(L,M))})]}))}}F30.default=OG;OG.propTypes=G30.resizableProps;OG.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}});var Yd=F1((T30)=>{var C30=P(f());T30.__esModule=!0;T30.default=void 0;var i_=Xd(C30),L30=Qd(WQ()),A30=Qd(r_()),D30=c_(),M30=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function Qd(Z){return Z&&Z.__esModule?Z:{default:Z}}function Xd(Z,J){if(typeof WeakMap=="function")var $=new WeakMap,Q=new WeakMap;return(Xd=function(X,Y){if(!Y&&X&&X.__esModule)return X;var w,z,H={__proto__:null,default:X};if(X===null||typeof X!="object"&&typeof X!="function")return H;if(w=Y?Q:$){if(w.has(X))return w.get(X);w.set(X,H)}for(let G in X)G!=="default"&&{}.hasOwnProperty.call(X,G)&&((z=(w=Object.defineProperty)&&Object.getOwnPropertyDescriptor(X,G))&&(z.get||z.set)?w(H,G,z):H[G]=X[G]);return H})(Z,J)}function a_(){return a_=Object.assign?Object.assign.bind():function(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J];for(var Q in $)({}).hasOwnProperty.call($,Q)&&(Z[Q]=$[Q])}return Z},a_.apply(null,arguments)}function $d(Z,J){var $=Object.keys(Z);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(Z);J&&(Q=Q.filter(function(X){return Object.getOwnPropertyDescriptor(Z,X).enumerable})),$.push.apply($,Q)}return $}function jG(Z){for(var J=1;J<arguments.length;J++){var $=arguments[J]!=null?arguments[J]:{};J%2?$d(Object($),!0).forEach(function(Q){O30(Z,Q,$[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors($)):$d(Object($)).forEach(function(Q){Object.defineProperty(Z,Q,Object.getOwnPropertyDescriptor($,Q))})}return Z}function O30(Z,J,$){return(J=j30(J))in Z?Object.defineProperty(Z,J,{value:$,enumerable:!0,configurable:!0,writable:!0}):Z[J]=$,Z}function j30(Z){var J=b30(Z,"string");return typeof J=="symbol"?J:J+""}function b30(Z,J){if(typeof Z!="object"||!Z)return Z;var $=Z[Symbol.toPrimitive];if($!==void 0){var Q=$.call(Z,J||"default");if(typeof Q!="object")return Q;throw TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)(Z)}function P30(Z,J){if(Z==null)return{};var $,Q,X=I30(Z,J);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(Z);for(Q=0;Q<Y.length;Q++)$=Y[Q],J.indexOf($)===-1&&{}.propertyIsEnumerable.call(Z,$)&&(X[$]=Z[$])}return X}function I30(Z,J){if(Z==null)return{};var $={};for(var Q in Z)if({}.hasOwnProperty.call(Z,Q)){if(J.indexOf(Q)!==-1)continue;$[Q]=Z[Q]}return $}class s_ extends i_.Component{constructor(){super(...arguments);this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(Z,J)=>{let{size:$}=J;if(this.props.onResize)Z.persist?.(),this.setState($,()=>this.props.onResize&&this.props.onResize(Z,J));else this.setState($)}}static getDerivedStateFromProps(Z,J){if(J.propsWidth!==Z.width||J.propsHeight!==Z.height)return{width:Z.width,height:Z.height,propsWidth:Z.width,propsHeight:Z.height};return null}render(){let Z=this.props,{handle:J,handleSize:$,onResize:Q,onResizeStart:X,onResizeStop:Y,draggableOpts:w,minConstraints:z,maxConstraints:H,lockAspectRatio:G,axis:W,width:q,height:K,resizeHandles:B,style:V,transformScale:F}=Z,_=P30(Z,M30);return i_.createElement(A30.default,{axis:W,draggableOpts:w,handle:J,handleSize:$,height:this.state.height,lockAspectRatio:G,maxConstraints:H,minConstraints:z,onResizeStart:X,onResize:this.onResize,onResizeStop:Y,resizeHandles:B,transformScale:F,width:this.state.width},i_.createElement("div",a_({},_,{style:jG(jG({},V),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}}T30.default=s_;s_.propTypes=jG(jG({},D30.resizableProps),{},{children:L30.default.element})});var zd=F1((XM4,bG)=>{bG.exports=function(){throw Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};bG.exports.Resizable=r_().default;bG.exports.ResizableBox=Yd().default});function o_(Z){let{children:J,cols:$,containerWidth:Q,margin:X,containerPadding:Y,rowHeight:w,maxRows:z,isDraggable:H,isResizable:G,isBounded:W,static:q,useCSSTransforms:K=!0,usePercentages:B=!1,transformScale:V=1,positionStrategy:F,dragThreshold:_=0,droppingPosition:N,className:L="",style:M,handle:A="",cancel:O="",x:D,y:k,w:b,h,minW:I=1,maxW:d=1/0,minH:v=1,maxH:C=1/0,i:y,resizeHandles:g,resizeHandle:S,constraints:x=__,layoutItem:E,layout:m=[],onDragStart:j,onDrag:H0,onDragStop:w0,onResizeStart:T,onResize:$0,onResizeStop:V0}=Z,[l,Z0]=_0.useState(!1),[q0,s]=_0.useState(!1),X0=_0.useRef(null),z0=_0.useRef({left:0,top:0}),p=_0.useRef({top:0,left:0,width:0,height:0}),o=_0.useRef(void 0),t=_0.useRef(m);t.current=m;let N0=_0.useRef(null),a=_0.useRef(null),J0=_0.useRef(!1),r=_0.useRef({x:0,y:0}),n=_0.useRef(!1),Q0=_0.useMemo(()=>({cols:$,containerPadding:Y,containerWidth:Q,margin:X,maxRows:z,rowHeight:w}),[$,Y,Q,X,z,w]),i=_0.useMemo(()=>({cols:$,maxRows:z,containerWidth:Q,containerHeight:0,rowHeight:w,margin:X,layout:[]}),[$,z,Q,w,X]),L0=_0.useCallback(()=>({...i,layout:t.current}),[i]),I0=_0.useMemo(()=>E??{i:y,x:D,y:k,w:b,h,minW:I,maxW:d,minH:v,maxH:C},[E,y,D,k,b,h,I,d,v,C]),n0=_0.useCallback((t0)=>{if(F?.calcStyle)return F.calcStyle(t0);if(K)return BG(t0);let Z1=L_(t0);if(B)return{...Z1,left:A_(t0.left/Q),width:A_(t0.width/Q)};return Z1},[F,K,B,Q]),W1=_0.useCallback((t0,{node:Z1})=>{if(!j)return;let{offsetParent:I1}=Z1;if(!I1)return;let U1=I1.getBoundingClientRect(),J5=Z1.getBoundingClientRect(),I5=J5.left/V,R5=U1.left/V,T5=J5.top/V,x5=U1.top/V,r5;if(F?.calcDragPosition){let d0=t0;r5=F.calcDragPosition(d0.clientX,d0.clientY,d0.clientX-J5.left,d0.clientY-J5.top)}else r5={left:I5-R5+I1.scrollLeft,top:T5-x5+I1.scrollTop};if(z0.current=r5,_>0){let d0=t0;r.current={x:d0.clientX,y:d0.clientY},J0.current=!0,n.current=!1,Z0(!0);return}Z0(!0);let D4=wQ(Q0,r5.top,r5.left),{x:M4,y:O0}=HQ(x,I0,D4.x,D4.y,L0());j(y,M4,O0,{e:t0,node:Z1,newPosition:r5})},[j,V,Q0,F,_,x,I0,L0,y]),R=_0.useCallback((t0,{node:Z1,deltaX:I1,deltaY:U1})=>{if(!H0||!l)return;let J5=t0;if(J0.current&&!n.current){let M4=J5.clientX-r.current.x,O0=J5.clientY-r.current.y;if(Math.hypot(M4,O0)<_)return;if(n.current=!0,J0.current=!1,j){let h0=wQ(Q0,z0.current.top,z0.current.left),{x:X1,y:A1}=HQ(x,I0,h0.x,h0.y,L0());j(y,X1,A1,{e:t0,node:Z1,newPosition:z0.current})}}let I5=z0.current.top+U1,R5=z0.current.left+I1;if(W){let{offsetParent:M4}=Z1;if(M4){let O0=M4.clientHeight-_4(h,w,X[1]);I5=QQ(I5,0,O0);let d0=u8(Q0),h0=Q-_4(b,d0,X[0]);R5=QQ(R5,0,h0)}}let T5={top:I5,left:R5};z0.current=T5;let x5=wQ(Q0,I5,R5),{x:r5,y:D4}=HQ(x,I0,x5.x,x5.y,L0());H0(y,r5,D4,{e:t0,node:Z1,newPosition:T5})},[H0,j,l,_,W,h,w,X,Q0,Q,b,y,x,I0,L0]),u=_0.useCallback((t0,{node:Z1})=>{if(!w0||!l)return;let I1=J0.current;if(J0.current=!1,n.current=!1,r.current={x:0,y:0},I1){Z0(!1),z0.current={left:0,top:0};return}let{left:U1,top:J5}=z0.current,I5={top:J5,left:U1};Z0(!1),z0.current={left:0,top:0};let R5=wQ(Q0,J5,U1),{x:T5,y:x5}=HQ(x,I0,R5.x,R5.y,L0());w0(y,T5,x5,{e:t0,node:Z1,newPosition:I5})},[w0,l,Q0,x,I0,L0,y]);N0.current=W1,a.current=R;let e=_0.useCallback((t0,{node:Z1,size:I1,handle:U1},J5,I5)=>{let R5=I5==="onResizeStart"?T:I5==="onResize"?$0:V0;if(!R5)return;let T5;if(Z1)T5=Yc(U1,J5,I1,Q);else T5={...I1,top:J5.top,left:J5.left};p.current=T5;let x5=$c(Q0,T5.width,T5.height),{w:r5,h:D4}=Xc(x,I0,x5.w,x5.h,U1,L0());R5(y,r5,D4,{e:t0.nativeEvent,node:Z1,size:T5,handle:U1})},[T,$0,V0,Q,Q0,y,x,I0,L0]),B0=_0.useCallback((t0,Z1)=>{s(!0);let I1=XQ(Q0,D,k,b,h),U1={...Z1,handle:Z1.handle};e(t0,U1,I1,"onResizeStart")},[e,Q0,D,k,b,h]),M0=_0.useCallback((t0,Z1)=>{let I1=XQ(Q0,D,k,b,h),U1={...Z1,handle:Z1.handle};e(t0,U1,I1,"onResize")},[e,Q0,D,k,b,h]),i0=_0.useCallback((t0,Z1)=>{s(!1),p.current={top:0,left:0,width:0,height:0};let I1=XQ(Q0,D,k,b,h),U1={...Z1,handle:Z1.handle};e(t0,U1,I1,"onResizeStop")},[e,Q0,D,k,b,h]);_0.useEffect(()=>{if(!N)return;let t0=X0.current;if(!t0)return;let Z1=o.current||{left:0,top:0},I1=l&&(N.left!==Z1.left||N.top!==Z1.top);if(!l){let U1={node:t0,deltaX:N.left,deltaY:N.top,lastX:0,lastY:0,x:N.left,y:N.top};N0.current?.(N.e,U1)}else if(I1){let U1=N.left-z0.current.left,J5=N.top-z0.current.top,I5={node:t0,deltaX:U1,deltaY:J5,lastX:z0.current.left,lastY:z0.current.top,x:N.left,y:N.top};a.current?.(N.e,I5)}o.current=N},[N,l,y]);let T1=XQ(Q0,D,k,b,h,l?z0.current:null,q0?p.current:null),f1=_0.default.Children.only(J),x0=u8(Q0),s0=[_4(I,x0,X[0]),_4(v,w,X[1])],J1=[_4(d,x0,X[0]),_4(C,w,X[1])],y0=f1.props,G1=y0.className,A5=y0.style,m1=_0.default.cloneElement(f1,{ref:X0,className:rW("react-grid-item",G1,L,{static:q,resizing:q0,"react-draggable":H,"react-draggable-dragging":l,dropping:Boolean(N),cssTransforms:K}),style:{...M,...A5,...n0(T1)}}),D5=S;return m1=g6.jsx(qd.Resizable,{draggableOpts:{disabled:!G},className:G?void 0:"react-resizable-hide",width:T1.width,height:T1.height,minConstraints:s0,maxConstraints:J1,onResizeStart:B0,onResize:M0,onResizeStop:i0,transformScale:V,resizeHandles:g,handle:D5,children:m1}),m1=g6.jsx(Wd.DraggableCore,{disabled:!H,onStart:W1,onDrag:R,onStop:u,handle:A,cancel:".react-resizable-handle"+(O?","+O:""),scale:V,nodeRef:X0,children:m1}),m1}function R30(Z,J){let $=_0.default.Children.toArray(Z),Q=_0.default.Children.toArray(J);if($.length!==Q.length)return!1;for(let X=0;X<$.length;X++){let Y=$[X],w=Q[X];if(Y?.key!==w?.key)return!1}return!0}function Gd(Z,J,$,Q){let X=[],Y=new Set;_0.default.Children.forEach(J,(z)=>{if(!_0.default.isValidElement(z)||z.key===null)return;let H=String(z.key);Y.add(H);let G=Z.find((W)=>W.i===H);if(G)X.push(y6(G));else{let q=z.props["data-grid"];if(q)X.push({i:H,x:q.x??0,y:q.y??0,w:q.w??1,h:q.h??1,minW:q.minW,maxW:q.maxW,minH:q.minH,maxH:q.maxH,static:q.static,isDraggable:q.isDraggable,isResizable:q.isResizable,resizeHandles:q.resizeHandles,isBounded:q.isBounded});else X.push({i:H,x:0,y:YQ(X),w:1,h:1})}});let w=F_(X,{cols:$});return Q.compact(w,$)}function VQ(Z){let{children:J,width:$,gridConfig:Q,dragConfig:X,resizeConfig:Y,dropConfig:w,positionStrategy:z=zc,compactor:H,constraints:G=__,layout:W=[],droppingItem:q,autoSize:K=!0,className:B="",style:V={},innerRef:F,onLayoutChange:_=v6,onDragStart:N=v6,onDrag:L=v6,onDragStop:M=v6,onResizeStart:A=v6,onResize:O=v6,onResizeStop:D=v6,onDrop:k=v6,onDropDragOver:b=v6}=Z,h=_0.useMemo(()=>({...Hc,...Q}),[Q]),I=_0.useMemo(()=>({...Gc,...X}),[X]),d=_0.useMemo(()=>({...Wc,...Y}),[Y]),v=_0.useMemo(()=>({...qc,...w}),[w]),{cols:C,rowHeight:y,maxRows:g,margin:S,containerPadding:x}=h,{enabled:E,bounded:m,handle:j,cancel:H0,threshold:w0}=I,{enabled:T,handles:$0,handleComponent:V0}=d,{enabled:l,defaultItem:Z0,onDragOver:q0}=v,s=H??T_("vertical"),X0=s.type,z0=s.allowOverlap,p=s.preventCollision??!1,o=_0.useMemo(()=>q??{i:"__dropping-elem__",...Z0},[q,Z0]),t=z.type==="transform",N0=z.scale,a=x??S,[J0,r]=_0.useState(!1),[n,Q0]=_0.useState(()=>Gd(W,J,C,s)),[i,L0]=_0.useState(null),[I0,n0]=_0.useState(!1),[W1,R]=_0.useState(null),[u,e]=_0.useState(),B0=_0.useRef(null),M0=_0.useRef(null),i0=_0.useRef(null),T1=_0.useRef(0),f1=_0.useRef(n),x0=_0.useRef(W),s0=_0.useRef(J),J1=_0.useRef(X0),y0=_0.useRef(n);y0.current=n,_0.useEffect(()=>{if(r(!0),!U9.deepEqual(n,W))_(n)},[]),_0.useEffect(()=>{if(i)return;if(W1)return;let O0=!U9.deepEqual(W,x0.current),d0=!R30(J,s0.current),h0=X0!==J1.current;if(O0||d0||h0){let A1=Gd(O0?W:n,J,C,s);if(!U9.deepEqual(A1,n))Q0(A1)}x0.current=W,s0.current=J,J1.current=X0},[W,J,C,X0,s,i,W1,n]),_0.useEffect(()=>{if(!i&&!U9.deepEqual(n,f1.current)){f1.current=n;let O0=n.filter((d0)=>d0.i!==o.i);_(O0)}},[n,i,_,o.i]);let G1=_0.useMemo(()=>{if(!K)return;let O0=YQ(n),d0=a[1];return O0*y+(O0-1)*S[1]+d0*2+"px"},[K,n,y,S,a]),A5=_0.useCallback((O0,d0,h0,X1)=>{let A1=y0.current,V1=d8(A1,O0);if(!V1)return;let R1={w:V1.w,h:V1.h,x:V1.x,y:V1.y,i:O0};B0.current=y6(V1),i0.current=A1,L0(R1),N(A1,V1,V1,null,X1.e,X1.node)},[N]),m1=_0.useCallback((O0,d0,h0,X1)=>{let A1=y0.current,V1=B0.current,R1=d8(A1,O0);if(!R1)return;let M5={w:R1.w,h:R1.h,x:R1.x,y:R1.y,i:O0},x1=p8(A1,R1,d0,h0,!0,p,X0,C,z0);L(x1,V1,R1,M5,X1.e,X1.node),Q0(s.compact(x1,C)),L0(M5)},[p,X0,C,z0,s,L]),D5=_0.useCallback((O0,d0,h0,X1)=>{if(!i)return;let A1=y0.current,V1=B0.current,R1=d8(A1,O0);if(!R1)return;let M5=p8(A1,R1,d0,h0,!0,p,X0,C,z0),x1=s.compact(M5,C);M(x1,V1,R1,null,X1.e,X1.node);let y5=i0.current;if(B0.current=null,i0.current=null,L0(null),Q0(x1),y5&&!U9.deepEqual(y5,x1))_(x1)},[i,p,X0,C,z0,s,M,_]),t0=_0.useCallback((O0,d0,h0,X1)=>{let A1=y0.current,V1=d8(A1,O0);if(!V1)return;M0.current=y6(V1),i0.current=A1,n0(!0),A(A1,V1,V1,null,X1.e,X1.node)},[A]),Z1=_0.useCallback((O0,d0,h0,X1)=>{let A1=y0.current,V1=M0.current,{handle:R1}=X1,M5=!1,x1,y5,[_Q,Y6]=Qc(A1,O0,(p1)=>{if(x1=p1.x,y5=p1.y,["sw","w","nw","n","ne"].includes(R1)){if(["sw","nw","w"].includes(R1))x1=p1.x+(p1.w-d0),d0=p1.x!==x1&&x1<0?p1.w:d0,x1=x1<0?0:x1;if(["ne","n","nw"].includes(R1))y5=p1.y+(p1.h-h0),h0=p1.y!==y5&&y5<0?p1.h:h0,y5=y5<0?0:y5;M5=!0}if(p&&!z0){if(U_(A1,{...p1,w:d0,h:h0,x:x1??p1.x,y:y5??p1.y}).filter((AQ)=>AQ.i!==p1.i).length>0)y5=p1.y,h0=p1.h,x1=p1.x,d0=p1.w,M5=!1}return p1.w=d0,p1.h=h0,p1});if(!Y6)return;let NZ=_Q;if(M5&&x1!==void 0&&y5!==void 0)NZ=p8(_Q,Y6,x1,y5,!0,p,X0,C,z0);let LQ={w:Y6.w,h:Y6.h,x:Y6.x,y:Y6.y,i:O0,static:!0};O(NZ,V1,Y6,LQ,X1.e,X1.node),Q0(s.compact(NZ,C)),L0(LQ)},[p,X0,C,z0,s,O]),I1=_0.useCallback((O0,d0,h0,X1)=>{let A1=y0.current,V1=M0.current,R1=d8(A1,O0),M5=s.compact(A1,C);D(M5,V1,R1??null,null,X1.e,X1.node);let x1=i0.current;if(M0.current=null,i0.current=null,L0(null),n0(!1),Q0(M5),x1&&!U9.deepEqual(x1,M5))_(M5)},[C,s,D,_]),U1=_0.useCallback(()=>{let O0=y0.current;if(!O0.some((X1)=>X1.i===o.i)){R(null),L0(null),e(void 0);return}let h0=s.compact(O0.filter((X1)=>X1.i!==o.i),C);Q0(h0),R(null),L0(null),e(void 0)},[o.i,C,s]),J5=_0.useCallback((O0)=>{if(O0.preventDefault(),O0.stopPropagation(),Kd&&!O0.nativeEvent.target?.classList.contains(Hd))return!1;let d0=q0?q0(O0.nativeEvent):b(O0);if(d0===!1){if(W1)U1();return!1}let{dragOffsetX:h0=0,dragOffsetY:X1=0,...A1}=d0??{},V1={...o,...A1},R1=O0.currentTarget.getBoundingClientRect(),M5={cols:C,margin:S,maxRows:g,rowHeight:y,containerWidth:$,containerPadding:a},x1=u8(M5),y5=_4(V1.w,x1,S[0]),_Q=_4(V1.h,y,S[1]),Y6=y5/2,NZ=_Q/2,LQ=O0.clientX-R1.left+h0-Y6,p1=O0.clientY-R1.top+X1-NZ,EG=Math.max(0,LQ),AQ=Math.max(0,p1),DQ={left:EG/N0,top:AQ/N0,e:O0.nativeEvent};if(!W1){let hG=Jc(M5,AQ,EG,V1.w,V1.h);R(g6.jsx("div",{},V1.i)),e(DQ);let sd=y0.current.filter((od)=>od.i!==V1.i);Q0([...sd,{...V1,x:hG.x,y:hG.y,static:!1,isDraggable:!0}])}else if(u){if(u.left!==DQ.left||u.top!==DQ.top)e(DQ)}},[W1,u,o,q0,b,U1,N0,C,S,g,y,$,a]),I5=_0.useCallback((O0)=>{if(O0.preventDefault(),O0.stopPropagation(),T1.current--,T1.current<0)T1.current=0;if(T1.current===0)U1()},[U1]),R5=_0.useCallback((O0)=>{O0.preventDefault(),O0.stopPropagation(),T1.current++},[]),T5=_0.useCallback((O0)=>{O0.preventDefault(),O0.stopPropagation();let d0=y0.current,h0=d0.find((X1)=>X1.i===o.i);T1.current=0,U1(),k(d0,h0,O0.nativeEvent)},[o.i,U1,k]),x5=_0.useCallback((O0,d0)=>{if(!O0||!O0.key)return null;let h0=d8(n,String(O0.key));if(!h0)return null;let X1=typeof h0.isDraggable==="boolean"?h0.isDraggable:!h0.static&&E,A1=typeof h0.isResizable==="boolean"?h0.isResizable:!h0.static&&T,V1=h0.resizeHandles||[...$0],R1=X1&&m&&h0.isBounded!==!1,M5=V0;return g6.jsx(o_,{containerWidth:$,cols:C,margin:S,containerPadding:a,maxRows:g,rowHeight:y,cancel:H0,handle:j,onDragStart:A5,onDrag:m1,onDragStop:D5,onResizeStart:t0,onResize:Z1,onResizeStop:I1,isDraggable:X1,isResizable:A1,isBounded:R1,useCSSTransforms:t&&J0,usePercentages:!J0,transformScale:N0,positionStrategy:z,dragThreshold:w0,w:h0.w,h:h0.h,x:h0.x,y:h0.y,i:h0.i,minH:h0.minH,minW:h0.minW,maxH:h0.maxH,maxW:h0.maxW,static:h0.static,droppingPosition:d0?u:void 0,resizeHandles:V1,resizeHandle:M5,constraints:G,layoutItem:h0,layout:n,children:O0},h0.i)},[n,$,C,S,a,g,y,H0,j,A5,m1,D5,t0,Z1,I1,E,T,m,t,J0,N0,z,w0,u,$0,V0,G]),r5=()=>{if(!i)return null;return g6.jsx(o_,{w:i.w,h:i.h,x:i.x,y:i.y,i:i.i,className:`react-grid-placeholder ${I0?"placeholder-resizing":""}`,containerWidth:$,cols:C,margin:S,containerPadding:a,maxRows:g,rowHeight:y,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:t,transformScale:N0,constraints:G,layout:n,children:g6.jsx("div",{})})},D4=rW(Hd,B),M4={height:G1,...V};return g6.jsxs("div",{ref:F,className:D4,style:M4,onDrop:l?T5:void 0,onDragLeave:l?I5:void 0,onDragEnter:l?R5:void 0,onDragOver:l?J5:void 0,children:[_0.default.Children.map(J,(O0)=>{if(!_0.default.isValidElement(O0))return null;return x5(O0)}),l&&W1&&x5(W1,!0),r5()]})}var _0,Wd,qd,g6,U9,v6=()=>{},Hd="react-grid-layout",Kd=!1;var Bd=U(()=>{k_();N_();XX();_0=P(f(),1),Wd=P(MG(),1),qd=P(zd(),1),g6=P(G0(),1),U9=P(Bc(),1);try{Kd=/firefox/i.test(navigator.userAgent)}catch{}});var Ud=U(()=>{Uc();Bd();k_()});var Vd=()=>{};function Fd({cols:Z=4,rowHeight:J=160,gap:$=8,items:Q,editing:X,renderItem:Y,onLayoutChange:w,onRemove:z}){let[H,G]=FQ.useState(()=>JQ(Q,[])),[W,q]=FQ.useState(Q),{width:K,containerRef:B,mounted:V}=C_({measureBeforeMount:!0});if(W!==Q)q(Q),G((_)=>{let N=new Map(_.map((O)=>[O.i,O])),L=Q.filter((O)=>N.has(O.id)).map((O)=>({...N.get(O.id),w:O.w,h:O.h})),M=new Set(L.map((O)=>O.i)),A=JQ(Q.filter((O)=>!M.has(O.id)),L);return[...L,...A]});let F=FQ.useCallback((_)=>{G(_),w?.(_.map((N)=>({id:N.i,w:N.w,h:N.h,x:N.x,y:N.y})))},[w]);return WZ.jsx("div",{ref:B,children:V&&WZ.jsx(VQ,{width:K,layout:H,gridConfig:{cols:Z,rowHeight:J,margin:[$,$],containerPadding:[0,0]},dragConfig:{enabled:!!X},resizeConfig:{enabled:!1},compactor:GQ,onLayoutChange:F,children:H.map((_)=>WZ.jsx("div",{children:WZ.jsx(r1.div,{layoutId:_.i,className:"size-full",transition:{type:"spring",duration:0.35,bounce:0},children:WZ.jsx(GG,{editing:X,onRemove:z?()=>z(_.i):void 0,children:Y(_.i)})})},_.i))})})}var FQ,WZ;var Nd=U(()=>{t4();Ud();Vd();B_();FQ=P(f(),1),WZ=P(G0(),1)});function _d(){if(qZ||PG)return;PG=!0;let Z=new WebSocket(`ws://${location.host}/api/workspaces/ws`);Z.onopen=()=>{qZ=Z,PG=!1},Z.onmessage=(J)=>{try{let $=JSON.parse(J.data);for(let Q of NQ)Q($)}catch{}},Z.onclose=()=>{if(qZ=null,PG=!1,NQ.size>0)setTimeout(_d,2000)},Z.onerror=()=>{Z.close()}}function TG(Z){let J=IG.useRef(Z);J.current=Z,IG.useEffect(()=>{let $=(Q)=>J.current(Q);return NQ.add($),_d(),()=>{if(NQ.delete($),NQ.size===0&&qZ)qZ.close(),qZ=null}},[])}var IG,NQ,qZ=null,PG=!1;var n_=U(()=>{IG=P(f(),1),NQ=new Set});function y30(Z,J,$){let Q=`${Z}/${J}`;if($)t_.delete(Q),Ld++;let X=t_.get(Q);if(X)return X;let w=import(`/api/workspaces/${Z}/widgets/${J}.js?v=${Ld}`).then((z)=>{if(!z.default)throw Error(`Widget "${J}" has no default export`);return z.default});return t_.set(Q,w),w}function Ad(Z){let J=E3(),[$,Q]=KZ.useState({status:"loading",version:0}),X=KZ.useCallback((Y=!1)=>{Q((w)=>({status:"loading",version:w.version})),y30(J,Z,Y).then((w)=>Q((z)=>({status:"ready",Component:w,version:z.version+1}))).catch((w)=>Q((z)=>({status:"error",error:String(w),version:z.version+1})))},[J,Z]);return KZ.useEffect(()=>{X()},[X]),TG((Y)=>{if(Y.type==="widget:updated"&&Y.name===Z)X(!0);else if(Y.type==="widgets:refresh")X(!0)}),$}var KZ,t_,Ld=0;var Dd=U(()=>{D$();n_();KZ=P(f(),1),t_=new Map});var Md,BZ,e_;var Od=U(()=>{N2();Md=P(f(),1),BZ=P(G0(),1);e_=class e_ extends Md.Component{state={error:null};static getDerivedStateFromError(Z){return{error:Z}}componentDidCatch(Z,J){console.error(`[widget:${this.props.name}]`,Z,J.componentStack)}componentDidUpdate(Z){if(Z.resetKey!==this.props.resetKey&&this.state.error)this.setState({error:null})}render(){if(this.state.error)return BZ.jsxs("div",{className:"flex h-full w-full flex-col items-start justify-start gap-1.5 p-4 text-xs",children:[BZ.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-destructive",children:[BZ.jsx(P9,{size:14,stroke:1.5}),"Widget crashed"]}),BZ.jsx("div",{className:"font-mono break-words text-muted-foreground",children:this.state.error.message})]});return this.props.children}}});function jd({name:Z}){let J=Ad(Z);return V9.jsxs(c2,{mode:"wait",initial:!1,children:[J.status==="ready"&&V9.jsx(r1.div,{className:"absolute inset-0",initial:{opacity:0,filter:"blur(4px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(4px)"},transition:{duration:0.45,ease:"easeInOut"},children:V9.jsx(e_,{name:Z,resetKey:J.version,children:V9.jsx(J.Component,{})})},J.version),J.status==="error"&&V9.jsx(r1.p,{className:"absolute inset-0 p-4 text-xs text-destructive",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:0.45,ease:"easeInOut"},children:J.error},`err-${J.version}`)]})}var V9;var bd=U(()=>{t4();Dd();Od();V9=P(G0(),1)});function Pd(Z){return F2.jsx(jd,{name:Z})}function v30(){let[Z,J]=kG.useState(0);return[kG.useCallback((Q)=>{if(!Q)return;let X=new ResizeObserver(([Y])=>{let w=Y.borderBoxSize?.[0];J(w?w.blockSize:Y.contentRect.height)});return X.observe(Q),()=>X.disconnect()},[]),Z]}function Id({mode:Z,widgets:J}){let{layout:$,setLayout:Q}=B9(),X=new Set($.widgetGrid.map((K)=>K.i)),Y=$.widgetGrid.filter((K)=>J.some((B)=>B.id===K.i)).map((K)=>{let B=J.find((V)=>V.id===K.i);return{id:K.i,w:B.config.colSpan,h:B.config.rowSpan,x:K.x,y:K.y}}),w=J.filter((K)=>!X.has(K.id)).map((K)=>({id:K.id,w:K.config.colSpan,h:K.config.rowSpan})),[z,H]=v30(),G=Z==="customizing"||Z==="editing"&&w.length>0;function W(K){Q({widgetGrid:$.widgetGrid.filter((B)=>B.i!==K)})}function q(K){let B=J.find((_)=>_.id===K);if(!B)return;let V=$.widgetGrid.map((_)=>{let N=J.find((L)=>L.id===_.i);return{..._,w:N?.config.colSpan??1,h:N?.config.rowSpan??1}}),F=ZQ(V,B.config.colSpan,B.config.rowSpan,4);Q({widgetGrid:[...$.widgetGrid,{i:K,x:F.x,y:F.y}]})}if(J.length===0)return F2.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:F2.jsx("p",{className:"text-sm text-muted-foreground",children:"No widgets found"})});return F2.jsx("div",{className:"relative min-h-0 flex-1",children:F2.jsxs(wV,{children:[F2.jsx("div",{className:"h-full overflow-y-auto px-[var(--page-pad)] pt-[var(--page-pad)] pb-[calc(var(--page-pad)*2)]",children:F2.jsx(r1.div,{className:"mx-auto w-full max-w-[var(--column-w)]",animate:{marginBottom:G?H:0},transition:{type:"spring",duration:0.3,bounce:0},children:F2.jsx(Fd,{items:Y,editing:Z==="editing",renderItem:Pd,onRemove:W,onLayoutChange:(K)=>Q({widgetGrid:K.map((B)=>({i:B.id,x:B.x??0,y:B.y??0}))})})})}),F2.jsx(c2,{children:Z==="editing"&&w.length>0&&F2.jsx(tu,{ref:z,items:w,renderItem:Pd,onRestore:q})}),F2.jsx(c2,{children:Z==="customizing"&&F2.jsx(su,{ref:z})})]})})}var kG,F2;var Td=U(()=>{t4();zG();ou();eu();Nd();bd();kG=P(f(),1),F2=P(G0(),1)});function Cd(){let Z=E3(),J=oz(),[$,Q]=kd.useState(""),X=Z6((B)=>B.activeSessionId),Y=Z6((B)=>B.setActiveSession),w=Z6((B)=>B.views[X??""]??g30),z=Z6((B)=>B.processing[X??""]??!1),H=Z6((B)=>B.errors[X??""]??null);i8.useEffect(()=>{return WW(Z,J),()=>KW()},[Z,J]),i8.useEffect(()=>{if(!X)return;if(J.getState().events[X]!==void 0)return;J.getState().loadEvents(Z,X)},[Z,X,J]);let G=i8.useCallback(()=>{let B=$.trim();if(!B||z)return;let V=X,F=!1;if(!V)V=crypto.randomUUID(),F=!0,J.getState().setEvents(V,[]),Y(V);let _=`optimistic:${crypto.randomUUID()}`;J.getState().append(V,{kind:"turn",turn:{id:_,role:"user",origin:{kind:"user-input"},parts:[{type:"text",text:B}],timestamp:new Date().toISOString()}}),qW({type:"chat",content:B,sessionId:V,isNew:F,optimisticId:_}),J.getState().setError(V,null),Q("")},[$,z,X,Y,J]),W=i8.useCallback(()=>{if(!X)return;J.getState().setError(X,null)},[X,J]),q=i8.useCallback(()=>{if(!z||!X)return;qW({type:"stop",sessionId:X})},[z,X]),K=i8.useCallback((B)=>{Y(B)},[Y]);return{view:w,processing:z,error:H,input:$,setInput:Q,send:G,stop:q,switchThread:K,dismissError:W}}var i8,kd,g30;var Sd=U(()=>{D$();UW();O$();i8=P(f(),1),kd=P(f(),1),g30=M$()});function Ed(Z){let J=document.documentElement,$=getComputedStyle(J).getPropertyValue(Z).trim(),Q=parseFloat($);return $.endsWith("rem")?Q*parseFloat(getComputedStyle(J).fontSize):Q}function hd(){let Z=UZ.useRef(null),[J,$]=UZ.useState(!1);return UZ.useEffect(()=>{let Q=Z.current;if(!Q)return;let X=Ed("--column-w"),Y=Ed("--chat-min"),w=new ResizeObserver(([z])=>{if(z)$(z.contentRect.width-Y>=X)});return w.observe(Q),()=>w.disconnect()},[]),{ref:Z,fits:J}}var UZ;var Rd=U(()=>{UZ=P(f(),1)});function xd(Z,J,$,Q){let X=CG.useRef(null);CG.useEffect(()=>{if(!J)return;let Y=new Map(J.map((B)=>[B.id,{w:B.config.colSpan,h:B.config.rowSpan}]));if(X.current?.workspaceId!==Z){X.current={workspaceId:Z,sizes:Y};return}let w=X.current.sizes,z=new Set($.widgetGrid.map((B)=>B.i)),H=J.filter((B)=>{if(!w.has(B.id))return!z.has(B.id);if(!z.has(B.id))return!1;let F=w.get(B.id);return F.w!==B.config.colSpan||F.h!==B.config.rowSpan});if(X.current={workspaceId:Z,sizes:Y},H.length===0)return;let G=new Map(J.map((B)=>[B.id,B.config])),W=$.widgetGrid.filter((B)=>!H.some((V)=>V.id===B.i)&&G.has(B.i)).map((B)=>{let V=G.get(B.i);return{i:B.i,x:B.x,y:B.y,w:V.colSpan,h:V.rowSpan}}),q=W.map(({i:B,x:V,y:F})=>({i:B,x:V,y:F})),K=[...W];for(let B of H){let V=ZQ(K,B.config.colSpan,B.config.rowSpan,4);q.push({i:B.id,x:V.x,y:V.y}),K.push({i:B.id,x:V.x,y:V.y,w:B.config.colSpan,h:B.config.rowSpan})}Q({widgetGrid:q})},[Z,J,$.widgetGrid,Q])}var CG;var yd=U(()=>{CG=P(f(),1)});function gd(Z,J){let $=Z?.font??"default";SG.useEffect(()=>{let Q=J.current;if(!Q)return;let X=$Z[$]??$Z.default;Q.style.setProperty("--font-sans",X.sans),Q.style.setProperty("--font-mono",X.mono);let Y=document.getElementById(ZL);if(!X.googleFontsQuery)Y?.remove();else{let w=`https://fonts.googleapis.com/css2?family=${X.googleFontsQuery}&display=swap`;if(Y)Y.href=w;else{let z=document.createElement("link");z.id=ZL,z.rel="stylesheet",z.href=w,document.head.appendChild(z)}}return()=>{Q.style.removeProperty("--font-sans"),Q.style.removeProperty("--font-mono")}},[$,J]),SG.useEffect(()=>{let Q=J.current;if(!Q)return;for(let X of vd){let Y=Z?.[X];if(Y)Q.style.setProperty(`--${X}`,Y);else Q.style.removeProperty(`--${X}`)}return()=>{for(let X of vd)Q.style.removeProperty(`--${X}`)}},[Z?.background,Z?.foreground,J]),SG.useEffect(()=>()=>document.getElementById(ZL)?.remove(),[])}var SG,vd,ZL="mei-fonts";var fd=U(()=>{q_();SG=P(f(),1),vd=["background","foreground"]});function pd({id:Z}){return H1.jsx(sE,{id:Z,children:H1.jsx(du,{id:Z,children:H1.jsx(f30,{id:Z})})})}function f30({id:Z}){let J=S2(),{layout:$,setLayout:Q,cwd:X,isLoading:Y}=B9(),w=tA(Z),z=uQ(Z);xd(Z,w.data,$,Q),TG((G)=>{if(G.type==="theme:updated")J.invalidateQueries({queryKey:a5.layout(Z)});else if(G.type==="widget-layout:updated")J.invalidateQueries({queryKey:a5.widgets(Z)})});let H=Y||w.isLoading;return H1.jsxs(tE,{cwd:X,children:[H1.jsx(m30,{sessions:z.data}),H1.jsx(az,{children:H?H1.jsx("div",{className:"flex h-full items-center justify-center",children:H1.jsx(C3,{sprite:"moi",effect:"chaos"})}):H1.jsx(u30,{widgets:w.data??[]})})]})}function m30({sessions:Z}){let J=oz();return VZ.useEffect(()=>{if(!Z)return;let $=J.getState().activeSessionId;if(!($&&Z.some((X)=>X.sessionId===$)))J.getState().setActiveSession(Z[0]?.sessionId??null)},[Z,J]),null}function p30({mode:Z,onMode:J}){return H1.jsx(c2,{mode:"popLayout",initial:!1,children:Z!=="idle"?H1.jsx(r1.div,{variants:md,initial:"from",animate:"to",exit:"from",transition:{type:"spring",duration:0.3,bounce:0},children:H1.jsx($5,{onClick:()=>J("idle"),children:"Done"})},"done"):H1.jsxs(r1.div,{className:"flex items-center gap-1",variants:md,initial:"from",animate:"to",exit:"from",transition:{type:"spring",duration:0.3,bounce:0},children:[H1.jsxs($5,{variant:"ghost",className:"text-muted-foreground [&_svg]:size-[18px]",onClick:()=>J("customizing"),children:[H1.jsx(IW,{stroke:1.75}),"Customize"]}),H1.jsxs($5,{variant:"ghost",className:"text-muted-foreground [&_svg]:size-[18px]",onClick:()=>J("editing"),children:[H1.jsx(MW,{stroke:1.75}),"Edit widgets"]})]},"actions")})}function u30({widgets:Z}){let{view:J,input:$,setInput:Q,processing:X,error:Y,send:w,stop:z,switchThread:H,dismissError:G}=Cd(),{layout:W,setLayout:q,name:K}=B9(),{ref:B,fits:V}=hd(),[F,_]=VZ.useState("idle"),N=VZ.useRef(null);gd(W.theme,N);let L=Z.length>0,M=L&&(W.chatMode==="floating"||!V)?"floating":"sidebar",A=V?(D)=>q({chatMode:D}):void 0,O=H1.jsx($_,{view:J,input:$,setInput:Q,processing:X,error:Y,onDismissError:G,send:w,stop:z,chatMode:M,onSwitchThread:H,onModeChange:A,onCollapse:()=>q({chatMode:"floating"}),leading:L?void 0:H1.jsx(A$,{})});return H1.jsxs("div",{ref:N,className:"bg-background text-foreground flex h-full min-h-0 flex-col font-sans",children:[H1.jsxs("div",{ref:B,className:"flex h-full min-h-0",children:[L&&H1.jsxs("div",{className:"border-border flex min-h-0 min-w-[var(--column-w)] flex-1 flex-col border-r",children:[H1.jsxs(sz,{children:[H1.jsx(A$,{}),K&&H1.jsx("span",{className:"text-foreground truncate text-sm font-medium",children:K}),H1.jsx("div",{className:"flex-1"}),H1.jsx(p30,{mode:F,onMode:_})]}),H1.jsx(Id,{mode:F,widgets:Z})]}),M==="sidebar"&&H1.jsx("div",{className:v0("flex min-h-0 flex-col overflow-hidden px-3 pb-4 pt-2",L?"min-w-[var(--chat-min)] flex-[0_1_var(--chat-max)]":"flex-1"),children:H1.jsx("div",{className:v0("flex min-h-0 w-full flex-1 flex-col",!L&&"mx-auto max-w-[var(--column-w)]"),children:O})})]}),M==="floating"&&H1.jsx(mu,{defaultOpen:W.chatMode==="floating"&&V,container:N,children:(D)=>H1.jsx($_,{view:J,input:$,setInput:Q,processing:X,error:Y,onDismissError:G,send:w,stop:z,chatMode:M,onSwitchThread:H,onModeChange:A,onClose:D})})]})}var VZ,H1,md;var ud=U(()=>{t4();N2();PZ();e8();yp();pu();Td();gV();cz();r6();Sd();Rd();yd();n_();fd();D$();zG();k5();O$();VZ=P(f(),1),H1=P(G0(),1);md={from:{opacity:0,scale:0.8,filter:"blur(4px)"},to:{opacity:1,scale:1,filter:"blur(0px)"}}});function dd(){let[,Z]=NA();return cd.useEffect(()=>{return BW((J)=>Z(`/workspace/${J}`)),()=>BW(null)},[Z]),F9.jsxs(AA,{children:[F9.jsx(yQ,{path:"/",component:hE}),F9.jsx(yQ,{path:"/playground",component:mE}),F9.jsx(yQ,{path:"/workspace/:id",children:(J)=>F9.jsx(pd,{id:J.id},J.id)})]})}var cd,F9;var ld=U(()=>{vQ();UW();RE();pE();ud();cd=P(f(),1),F9=P(G0(),1)});var id={};N9(id,{mount:()=>d30});function d30(Z){function J(){return FZ.jsxs(ZW,{client:c30,children:[FZ.jsx(zW,{children:FZ.jsx(dd,{})}),!1]})}rd.createRoot(Z).render(FZ.jsx(J,{}))}var rd,FZ,c30;var ad=U(()=>{PZ();vQ();ld();rd=P(sL(),1),FZ=P(G0(),1),c30=new tG});async function l30(Z){let{mount:J}=await Promise.resolve().then(() => (ad(),id));J(Z)}globalThis.__init=l30;
|