@hamsterbase/evidra 0.7.0 → 0.7.1
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/dist/web/assets/{ProjectFileEditor-CVSgcfy0.js → ProjectFileEditor-Drd5hhbo.js} +3 -3
- package/dist/web/assets/{cssMode-K4jcUGsN.js → cssMode-DLjojEX5.js} +1 -1
- package/dist/web/assets/{editor.api-C9TBr29n.js → editor.api-Cm8Jz3Ng.js} +1 -1
- package/dist/web/assets/{freemarker2-n7bGb5tf.js → freemarker2-ffO1wPRi.js} +1 -1
- package/dist/web/assets/{handlebars-NVPisxhY.js → handlebars-B67yYAds.js} +1 -1
- package/dist/web/assets/{html-Cf2LWyPc.js → html-D4vuTio3.js} +1 -1
- package/dist/web/assets/{htmlMode-DDhPUUnb.js → htmlMode-Nau5A2BZ.js} +1 -1
- package/dist/web/assets/{index-D26PLz_g.js → index-DuyTRx9x.js} +2 -2
- package/dist/web/assets/{javascript-sfvKFR2E.js → javascript-j7PBySIN.js} +1 -1
- package/dist/web/assets/{jsonMode-DoghpSk2.js → jsonMode-Dlcb-cLx.js} +1 -1
- package/dist/web/assets/{liquid-6jTCCW2p.js → liquid-DSGlvFRw.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CySYBP7N.js → lspLanguageFeatures-DUpjT3Ad.js} +1 -1
- package/dist/web/assets/main-IQ1sFdJO.js +26 -0
- package/dist/web/assets/{main-CT5PlYKk.js → main-rJTrPQRY.js} +1 -1
- package/dist/web/assets/{mdx-Co3a7cYx.js → mdx-BjjEiDsC.js} +1 -1
- package/dist/web/assets/{monaco-Be-Xokw7.js → monaco-3fFILk_i.js} +4 -4
- package/dist/web/assets/{python-5O5v_BHb.js → python-dNdKGm1p.js} +1 -1
- package/dist/web/assets/{razor-BK7gWo0I.js → razor-CATEbAgj.js} +1 -1
- package/dist/web/assets/{tsMode-D-qPtV4B.js → tsMode-BULlPLGv.js} +1 -1
- package/dist/web/assets/{typescript-CWXUFzCE.js → typescript-Cwd0ePfj.js} +1 -1
- package/dist/web/assets/{workers-B8-HEE7b.js → workers-C57gUq9G.js} +1 -1
- package/dist/web/assets/{xml-zxuwyfIF.js → xml-DjQsY_vM.js} +1 -1
- package/dist/web/assets/{yaml-BFQ_VvhC.js → yaml-BOOR4cPJ.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/main-B9PChmE0.js +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-
|
|
2
|
-
import{t as e}from"./index-D26PLz_g.js";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=ne(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function j(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function M(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},re={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=re,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),f=s(((e,t)=>{t.exports=d()})),p=u(f(),1),m=e=>{throw TypeError(e)},h=(e,t,n)=>t.has(e)||m(`Cannot `+n),g=(e,t,n)=>(h(e,t,`read from private field`),n?n.call(e):t.get(e)),_=(e,t,n)=>t.has(e)?m(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),v=(e,t,n,r)=>(h(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),y=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,b=/^[\\/]{2}/;function x(e,t){return t+e.replace(/\\/g,`/`)}var S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ee(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return te(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function O(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ee(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||D(),mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function A(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function te(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u()+1;let d=O(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u();let i=O(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ne(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ne(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),T(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&b.test(i)&&(i=r+i),new URL(i,r)}var j,M=class{constructor(e){if(_(this,j,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(g(this,j).has(e))return g(this,j).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){g(this,j).set(e,t)}};j=new WeakMap;var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function re(e){return N.has(e)}var ie=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ae(e){return ie.has(e)}function oe(e){return e.index===!0}function P(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(T(e.index!==!0||!e.children,`Cannot specify children on an index route`),T(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),oe(e)){let n={...e,id:s};return r[s]=F(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=F(n,t(n)),e.children&&(n.children=P(e.children,t,o,r,i)),n}})}function F(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=Oe((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ue(e),s=null,c=De(a);for(let e=0;s==null&&e<o.length;++e)s=Ce(o[e],c,r);return s}function le(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ue(e){let t=de(e);return pe(t),t}function de(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=I([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),de(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:xe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ee(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of fe(e.path))a(e,t,!0,n)}),t}function fe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=fe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function pe(e){e.sort((e,t)=>e.score===t.score?Se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var me=/^:[\w-]+$/,he=3,ge=2,_e=1,ve=10,ye=-2,be=e=>e===`*`;function xe(e,t){let n=e.split(`/`),r=n.length;return n.some(be)&&(r+=ye),t&&(r+=ge),n.filter(e=>!be(e)).reduce((e,t)=>e+(me.test(t)?he:t===``?_e:ve),r)}function Se(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Ce(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Te(u,l,s.matcher,s.compiledParams):we(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=we({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:I([a,d.pathname]),pathnameBase:ze(I([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=I([a,d.pathnameBase]))}return o}function we(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ee(e.path,e.caseSensitive,e.end);return Te(e,t,n,r)}function Te(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Re(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Re(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Ee(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function De(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Oe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ke({basename:e,pathname:t}){return t===`/`?e:I([e,t])}var Ae=e=>y.test(e);function je(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Le(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Me(n.substring(1),`/`):Me(n,t)):a=t,{pathname:a,search:Be(r),hash:Ve(i)}}function Me(e,t){let n=Re(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ne(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fe(e){let t=Pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ie(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),Ne(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),Ne(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),Ne(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=je(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Le=e=>e.replace(/[\\/]{2,}/g,`/`),I=e=>Le(e.join(`/`));function Re(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var ze=e=>Re(e).replace(/^\/*/,`/`),Be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ve=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,He=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},Ue=(e,t)=>{let n=He(e,t);return n.headers.set(`X-Remix-Replace`,`true`),n},We=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ge=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qe(e){return I(e.map(e=>e.route.path).filter(Boolean))||`/`}var Je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ye(e,t){let n=e;if(typeof n!=`string`||!y.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Je)try{let e=new URL(window.location.href),r=b.test(n)?new URL(x(n,e.protocol)):new URL(n),a=Oe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Xe=Symbol(`Uninstrumented`);function Ze(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=$e(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=$e(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Xe]??i,a=$e(n[e],t,(...e)=>tt(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Xe]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Xe]??e,r=$e(n.middleware,t,(...e)=>tt(e[0]));return r?(r[Xe]=t,r):e})),r}function Qe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Xe]??e.navigate,r=$e(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?k(n):`.`,...nt(e,r??{})}});r&&(r[Xe]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Xe]??e.fetch,r=$e(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...nt(e,i??{})}});r&&(r[Xe]=t,e.fetch=r)}return e}function $e(e,t,n){return e.length===0?null:async(...r)=>{let i=await et(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function et(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=et(e,t,n,r-1),a=await o,T(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function tt(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:rt(t),params:{...r},pattern:i,context:it(n)}}function nt(e,t){return{currentUrl:k(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function rt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function it(e){if(ot(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var at=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ot(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===at}var st=new URL(`http://localhost`);function ct(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),st)}catch{return st}}function lt(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function ut(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function dt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!lt(i,n),s=!lt(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!ut(e,i)||!lt(i,a)))throw Error(`External navigation is not allowed`)}var ft=[`POST`,`PUT`,`PATCH`,`DELETE`],pt=new Set(ft),mt=[`GET`,...ft],ht=new Set(mt),gt=new Set([301,302,303,307,308]),_t=new Set([307,308]),vt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},xt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),St=`remix-router-transitions`,Ct=Symbol(`ResetLoaderData`),wt,Tt,Et,Dt,Ot=class{constructor(e){_(this,wt),_(this,Tt),_(this,Et),_(this,Dt),v(this,wt,e),v(this,Tt,ue(e))}get stableRoutes(){return g(this,wt)}get activeRoutes(){return g(this,Et)??g(this,wt)}get branches(){return g(this,Dt)??g(this,Tt)}get hasHMRRoutes(){return g(this,Et)!=null}setRoutes(e){v(this,wt,e),v(this,Tt,ue(e))}setHmrRoutes(e){v(this,Et,e),v(this,Dt,ue(e))}commitHmrRoutes(){g(this,Et)&&(v(this,wt,g(this,Et)),v(this,Tt,g(this,Dt)),v(this,Et,void 0),v(this,Dt,void 0))}};wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap;function kt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;T(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||xt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ze(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Ot(P(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Kt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=ce(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,x=null,S,C;if(v==null&&!e.patchRoutesOnNavigation){let t=vn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=_n(s.activeRoutes);S=!0,C=!S,v=n,x={[r.id]:t}}else if(v&&!e.hydrationData&<(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){S=!1,C=!S,v=[];let t=lt(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))S=!1,C=!S;else if(!v.some(e=>Pt(e.route)))S=!0,C=!S;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}C=!1,S=!0,r.forEach(e=>{let r=Ft(e.route,t,n);C||=r.renderFallback,S&&=!r.shouldLoad})}let w,D={historyAction:e.history.action,location:e.history.location,matches:v,initialized:S,renderFallback:C,navigation:vt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},O=`POP`,te=null,j=!1,N,re=!1,ie=new Map,ae=null,oe=!1,F=!1,se=new Set,ue=new Map,de=0,fe=-1,pe=new Map,me=new Set,he=new Map,ge=new Map,_e=new Set,ve=new Map,ye,be=null;function xe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ye){ye(),ye=void 0;return}E(ve.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=rt({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ye=e});e.history.go(r*-1),nt(i,{state:`blocked`,location:n,proceed(){nt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,bt),we({blockers:e})}}),te?.resolve(),te=null}else return ke(t,n)}),n){Hn(t,ie);let e=()=>Un(t,ie);t.addEventListener(`pagehide`,e),ae=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||ke(`POP`,D.location,{initialHydration:!0}),w}function Se(){d&&d(),ae&&ae(),f.clear(),N&&N.abort(),D.fetchers.forEach((e,t)=>Ge(D.fetchers,t)),D.blockers.forEach((e,t)=>tt(t))}function Ce(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(D,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function we(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(_e.has(t)?n.push(t):r.push(t))}),_e.forEach(e=>{!D.fetchers.has(e)&&!ue.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ge(D.fetchers,e)),r.forEach(e=>D.fetchers.delete(e))}function Te(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&Nn(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?mn(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,c=D.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,bt)));let l=!oe&&ct(t,n.matches||D.matches),u=j===!0||D.navigation.formMethod!=null&&Nn(D.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),oe||O===`POP`||(O===`PUSH`?e.history.push(t,t.state):O===`REPLACE`&&e.history.replace(t,t.state));let d;if(O===`POP`&&!oe&&t!==D.location){let e=ie.get(D.location.pathname);e&&e.has(t.pathname)?d={currentLocation:D.location,nextLocation:t}:ie.has(t.pathname)&&(d={currentLocation:t,nextLocation:D.location})}else if(re){let e=ie.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ie.set(D.location.pathname,e)),d={currentLocation:D.location,nextLocation:t}}we({...n,actionData:a,loaderData:o,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:vt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),O=`POP`,j=!1,re=!1,oe=!1,F=!1,te?.resolve(),te=null,be?.resolve(),be=null}async function Ee(t,n){if(te?.resolve(),te=null,typeof t==`number`){te||=Wn();let n=te.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Mt(!1,jt(D.location,D.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?A(n.mask):{...D.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},b.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),dt(typeof n.mask==`string`?n.mask:k(n.mask),k(o),e.history.createURL(`/`),`reject`)}let s=D.location,l=ee(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},dt(t==null?e.history.createHref(D.location):typeof t==`string`?t:k(t),e.history.createHref(l.mask||l),e.history.createURL(`/`),`reject`);let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Nn(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=rt({currentLocation:s,nextLocation:l,historyAction:d});m?nt(m,{state:`blocked`,location:l,proceed(){nt(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),Ee(t,n)},reset(){let e=new Map(D.blockers);e.set(m,bt),we({blockers:e})}}):await ke(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function De(){be||=Wn(),Be(),we({revalidation:`loading`});let e=be.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(ke(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),e):(ke(O||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:re===!0}),e)}async function ke(t,n,r){N&&N.abort(),N=null,O=t,oe=(r&&r.startUninterruptedRevalidation)===!0,st(D.location,D.matches),j=(r&&r.preventScrollReset)===!0,re=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&D.matches&&D.matches.length>0&&!y?D.matches:ce(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&D.initialized&&!F&&xn(D.location,n)&&!(r&&r.submission&&Nn(r.submission.formMethod))){Te(n,{matches:a},{flushSync:o});return}let l=lt(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=it(n.pathname);Te(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=cn(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new M,p;if(r&&r.pendingError)p=[gn(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Nn(r.submission.formMethod)){let i=await je(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(En(t)&&Ke(t.error)&&t.error.status===404){N=null,Te(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Ln(n,a,t,r.submission),o=!1,l.active=!1,d=cn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Me(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,Te(n,{matches:h||a,...hn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function je(t,n,i,l,u,d,f,p,m={}){if(Be(),we({navigation:Rn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ut(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=_n(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=gn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=it(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Fn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:vn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Re(t,n,Qt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Dn(h)){let n;return n=m&&m.replace!=null?m.replace:sn(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===D.location.pathname+D.location.search,await I(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(En(h)){let e=gn(l,g.route.id);return(m&&m.replace)!==!0&&(O=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Me(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Ln(n,i,l,p),x=p||m||In(b),S=!oe&&!g;if(d){if(S){let e=Ne(v);we({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ut(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=_n(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=gn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=it(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Nt(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,F,se,_e,he,me,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(fe=++de,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(D.fetchers),t=Xe(e);return Te(n,{matches:i,loaderData:{},errors:v&&En(v[1])?{[v[0]]:v[1].error}:null,...hn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ne(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Pe(T)),we(e,{flushSync:_})}T.forEach(e=>{Je(e.key),e.controller&&ue.set(e.key,e.controller)});let E=()=>T.forEach(e=>Je(e.key));N&&N.signal.addEventListener(`abort`,E);let{loaderResults:O,fetcherResults:ee}=await ze(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,E),T.forEach(e=>ue.delete(e.key));let k=yn(O);if(k)return await I(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=yn(ee),k)return me.add(k.key),await I(t,k.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(D.fetchers),{loaderData:te,errors:ne}=pn(D,i,O,v,T,ee,A);g&&D.errors&&(ne={...D.errors,...ne});let j=Xe(A),M=$e(fe,A),re=j||M||T.length>0;return{matches:i,loaderData:te,errors:ne,...re?{workingFetchers:A}:{}}}function Ne(e){if(e&&!En(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function Pe(e){let t=new Map(D.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=zn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Fe(t,n,r,i){Je(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=jt(D.location,D.matches,c,r,n,i?.relative),u=ce(o,l,c,!1,s.branches),d=lt(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){He(t,n,vn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Mt(!0,l,i);if(m){He(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new M,g=(i&&i.preventScrollReset)===!0;p&&Nn(p.formMethod)?await Ie(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(he.set(t,{routeId:n,path:f}),await Le(t,n,f,u,h,d.active,a,g,p))}async function Ie(t,n,i,l,u,d,f,p,m,h){Be(),he.delete(t),Ve(t,Bn(m,D.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=cn(e.history,i,g.signal,m);if(d){let e=await ut(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{He(t,n,vn(404,{pathname:i}),{flushSync:f});return}}let v=Fn(l,i);if(!v.route.action&&!v.route.lazy){He(t,n,vn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}ue.set(t,g);let y=de,b=Qt(a,o,_,i,l,v,r,u),x=await Re(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){ue.get(t)===g&&ue.delete(t);return}if(_e.has(t)){if(Dn(S)||En(S)){Ve(t,Vn(void 0));return}}else{if(Dn(S)){if(ue.delete(t),fe>y){Ve(t,Vn(void 0));return}return me.add(t),Ve(t,zn(m)),I(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(En(S)){He(t,n,S.error);return}}let C=D.navigation.location||D.location,w=cn(e.history,C,g.signal),E=s.activeRoutes,ee=D.navigation.state===`idle`?D.matches:ce(E,D.navigation.location,c,!1,s.branches);T(ee,`Didn't find any matches after fetcher action`);let k=++de;pe.set(t,k);let{dsMatches:A,revalidatingFetchers:te}=Nt(w,u,a,o,e.history,D,ee,m,C,r,!1,F,se,_e,he,me,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ne=zn(m,S.data),j=new Map(D.fetchers);j.set(t,ne),te.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=j.get(t),r=zn(void 0,n?n.data:void 0);j.set(t,r),Je(t),e.controller&&ue.set(t,e.controller)}),we({fetchers:j});let M=()=>te.forEach(e=>Je(e.key));g.signal.addEventListener(`abort`,M);let{loaderResults:re,fetcherResults:ie}=await ze(A,te,w,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,M),pe.delete(t),ue.delete(t),te.forEach(e=>ue.delete(e.key));let ae=D.fetchers.has(t),oe=e=>{if(!ae)return e;let n=new Map(e.fetchers);return n.set(t,Vn(S.data)),{...e,fetchers:n}},P=yn(re);if(P)return D=oe(D),I(w,P.result,!1,{preventScrollReset:p});if(P=yn(ie),P)return me.add(P.key),D=oe(D),I(w,P.result,!1,{preventScrollReset:p});let le=new Map(D.fetchers);ae&&le.set(t,Vn(S.data));let{loaderData:ge,errors:ve}=pn(D,ee,re,void 0,te,ie,le);$e(k,le),D.navigation.state===`loading`&&k>fe?(T(O,`Expected pending action`),N&&N.abort(),Te(D.navigation.location,{matches:ee,loaderData:ge,errors:ve,fetchers:le})):(we({errors:ve,loaderData:mn(D.loaderData,ge,ee,ve),fetchers:le}),F=!1)}async function Le(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);Ve(t,zn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=cn(e.history,i,m.signal);if(l){let e=await ut(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{He(t,n,vn(404,{pathname:i}),{flushSync:u});return}}let g=Fn(s,i);ue.set(t,m);let _=de,v=await Re(h,i,Qt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(ue.get(t)===m&&ue.delete(t),!h.signal.aborted){if(_e.has(t))Ve(t,Vn(void 0));else if(Dn(y)){if(fe>_){Ve(t,Vn(void 0));return}me.add(t),await I(h,y,!1,{preventScrollReset:d})}else En(y)?He(t,n,y.error):Ve(t,Vn(y.data))}}async function I(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(te?.resolve(),te=null),i.response.headers.has(`X-Remix-Revalidate`)&&(F=!0);let d=i.response.headers.get(`Location`);T(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=sn(d,p,c,e.history),dt(f,d,p,`allow-explicit`);let m=ee(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ae(d)){let n=ne(t,d,!0);e=n.origin!==t.location.origin||Oe(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=D.navigation;!o&&!s&&g&&_&&v&&(o=In(D.navigation));let y=o||s;_t.has(i.response.status)&&y&&Nn(y.formMethod)?await ke(h,m,{submission:{...y,formAction:d},preventScrollReset:l||j,enableViewTransition:a?re:void 0}):await ke(h,m,{overrideNavigation:Ln(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||j,enableViewTransition:a?re:void 0})}async function Re(e,t,n,r,i){let a,o={};try{a=await $t(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Nn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||D.loaderData.hasOwnProperty(e.route.id)||D.errors&&D.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Tn(r)){let i=r.result;o[t]={type:`redirect`,response:rn(i,e,t,n,c)}}else o[t]=await nn(r);return o}async function ze(e,t,n,r,i){let a=Re(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Re(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:vn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Be(){F=!0,he.forEach((e,t)=>{ue.has(t)&&se.add(t),Je(t)})}function Ve(e,t,n={}){let r=new Map(D.fetchers);r.set(e,t),we({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function He(e,t,n,r={}){let i=gn(D.matches,t),a=new Map(D.fetchers);Ge(a,e),we({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ue(e){return ge.set(e,(ge.get(e)||0)+1),_e.has(e)&&_e.delete(e),D.fetchers.get(e)||yt}function We(e,t){Je(e,t?.reason),Ve(e,Vn(null))}function Ge(e,t){let n=D.fetchers.get(t);ue.has(t)&&!(n&&n.state===`loading`&&pe.has(t))&&Je(t),he.delete(t),pe.delete(t),me.delete(t),_e.delete(t),se.delete(t),e.delete(t)}function qe(e){let t=(ge.get(e)||0)-1;t<=0?(ge.delete(e),_e.add(e)):ge.set(e,t),we({fetchers:new Map(D.fetchers)})}function Je(e,t){let n=ue.get(e);n&&(n.abort(t),ue.delete(e))}function Ye(e,t){for(let n of e){let e=t.get(n);T(e,`Expected fetcher: ${n}`);let r=Vn(e.data);t.set(n,r)}}function Xe(e){let t=[],n=!1;for(let r of me){let i=e.get(r);T(i,`Expected fetcher: ${r}`),i.state===`loading`&&(me.delete(r),t.push(r),n=!0)}return Ye(t,e),n}function $e(e,t){let n=[];for(let[r,i]of pe)if(i<e){let e=t.get(r);T(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Je(r),pe.delete(r),n.push(r))}return Ye(n,t),n.length>0}function et(e,t){let n=D.blockers.get(e)||bt;return ve.get(e)!==t&&ve.set(e,t),n}function tt(e){D.blockers.delete(e),ve.delete(e)}function nt(e,t){let n=D.blockers.get(e)||bt;T(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(D.blockers);r.set(e,t),we({blockers:r})}function rt({currentLocation:e,nextLocation:t,historyAction:n}){if(ve.size===0)return;ve.size>1&&E(!1,`A router only supports one blocker at a time`);let r=Array.from(ve.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function it(e){let t=vn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=_n(n);return{notFoundMatches:r,route:i,error:t}}function at(e,t,n){if(m=e,g=t,h=n||null,!_&&D.navigation===vt){_=!0;let e=ct(D.location,D.matches);e!=null&&we({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function ot(e,t){return h&&h(e,t.map(e=>le(e,D.loaderData)))||e.key}function st(e,t){if(m&&g){let n=ot(e,t);m[n]=g()}}function ct(e,t){if(m){let n=ot(e,t),r=m[n];if(typeof r==`number`)return r}return null}function lt(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:ce(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:ce(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ut(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||zt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=ce(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=ce(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ft(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=ce(s.activeRoutes,n,c,!0,u),!f||ft(l,f))return{type:`success`,matches:null};l=f}}function ft(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function pt(e){o={},s.setHmrRoutes(P(e,a,void 0,o))}function mt(e,t,n=!1){zt(e,t,s,o,a,n),s.hasHMRRoutes||we({})}return w={get basename(){return c},get future(){return u},get state(){return D},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:xe,subscribe:Ce,enableScrollRestoration:at,navigate:Ee,fetch:Fe,revalidate:De,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ue,resetFetcher:We,deleteFetcher:qe,dispose:Se,getBlocker:et,deleteBlocker:tt,patchRoutes:mt,_internalFetchControllers:ue,_internalSetRoutes:pt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){we(e)}},e.instrumentations&&(w=Qe(w,e.instrumentations.map(e=>e.router).filter(Boolean))),w}function At(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function jt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ie(r||`.`,Fe(o),Oe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Pn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ke({basename:n,pathname:c.pathname})),k(c)}function Mt(e,t,n){if(!n||!At(n))return{path:t};if(n.formMethod&&!Mn(n.formMethod))return{path:t,error:vn(405,{method:n.formMethod})};let r=()=>({path:t,error:vn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=bn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Nn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-3fFILk_i.js","assets/index-DuyTRx9x.js","assets/editor.api-Cm8Jz3Ng.js","assets/editor-DjpsE8to.css","assets/monaco-n7clI0si.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./index-DuyTRx9x.js";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=ne(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function j(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function M(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},re={map:j,forEach:function(e,t,n){j(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=re,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),f=s(((e,t)=>{t.exports=d()})),p=u(f(),1),m=e=>{throw TypeError(e)},h=(e,t,n)=>t.has(e)||m(`Cannot `+n),g=(e,t,n)=>(h(e,t,`read from private field`),n?n.call(e):t.get(e)),_=(e,t,n)=>t.has(e)?m(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),v=(e,t,n,r)=>(h(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),y=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,b=/^[\\/]{2}/;function x(e,t){return t+e.replace(/\\/g,`/`)}var S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ee(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return te(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function O(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ee(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||D(),mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function A(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function te(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u()+1;let d=O(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u();let i=O(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ne(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ne(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),T(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&b.test(i)&&(i=r+i),new URL(i,r)}var j,M=class{constructor(e){if(_(this,j,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(g(this,j).has(e))return g(this,j).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){g(this,j).set(e,t)}};j=new WeakMap;var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function re(e){return N.has(e)}var ie=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ae(e){return ie.has(e)}function oe(e){return e.index===!0}function P(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(T(e.index!==!0||!e.children,`Cannot specify children on an index route`),T(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),oe(e)){let n={...e,id:s};return r[s]=F(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=F(n,t(n)),e.children&&(n.children=P(e.children,t,o,r,i)),n}})}function F(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function se(e,t,n=`/`){return ce(e,t,n,!1)}function ce(e,t,n,r,i){let a=Oe((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ue(e),s=null,c=De(a);for(let e=0;s==null&&e<o.length;++e)s=Ce(o[e],c,r);return s}function le(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ue(e){let t=de(e);return pe(t),t}function de(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=I([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),de(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:xe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ee(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of fe(e.path))a(e,t,!0,n)}),t}function fe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=fe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function pe(e){e.sort((e,t)=>e.score===t.score?Se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var me=/^:[\w-]+$/,he=3,ge=2,_e=1,ve=10,ye=-2,be=e=>e===`*`;function xe(e,t){let n=e.split(`/`),r=n.length;return n.some(be)&&(r+=ye),t&&(r+=ge),n.filter(e=>!be(e)).reduce((e,t)=>e+(me.test(t)?he:t===``?_e:ve),r)}function Se(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Ce(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Te(u,l,s.matcher,s.compiledParams):we(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=we({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:I([a,d.pathname]),pathnameBase:ze(I([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=I([a,d.pathnameBase]))}return o}function we(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ee(e.path,e.caseSensitive,e.end);return Te(e,t,n,r)}function Te(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Re(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Re(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Ee(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function De(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Oe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ke({basename:e,pathname:t}){return t===`/`?e:I([e,t])}var Ae=e=>y.test(e);function je(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Le(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Me(n.substring(1),`/`):Me(n,t)):a=t,{pathname:a,search:Be(r),hash:Ve(i)}}function Me(e,t){let n=Re(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ne(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fe(e){let t=Pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ie(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),Ne(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),Ne(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),Ne(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=je(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Le=e=>e.replace(/[\\/]{2,}/g,`/`),I=e=>Le(e.join(`/`));function Re(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var ze=e=>Re(e).replace(/^\/*/,`/`),Be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ve=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,He=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},Ue=(e,t)=>{let n=He(e,t);return n.headers.set(`X-Remix-Replace`,`true`),n},We=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ge=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qe(e){return I(e.map(e=>e.route.path).filter(Boolean))||`/`}var Je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ye(e,t){let n=e;if(typeof n!=`string`||!y.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Je)try{let e=new URL(window.location.href),r=b.test(n)?new URL(x(n,e.protocol)):new URL(n),a=Oe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Xe=Symbol(`Uninstrumented`);function Ze(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=$e(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=$e(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Xe]??i,a=$e(n[e],t,(...e)=>tt(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Xe]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Xe]??e,r=$e(n.middleware,t,(...e)=>tt(e[0]));return r?(r[Xe]=t,r):e})),r}function Qe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Xe]??e.navigate,r=$e(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?k(n):`.`,...nt(e,r??{})}});r&&(r[Xe]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Xe]??e.fetch,r=$e(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...nt(e,i??{})}});r&&(r[Xe]=t,e.fetch=r)}return e}function $e(e,t,n){return e.length===0?null:async(...r)=>{let i=await et(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function et(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=et(e,t,n,r-1),a=await o,T(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function tt(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:rt(t),params:{...r},pattern:i,context:it(n)}}function nt(e,t){return{currentUrl:k(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function rt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function it(e){if(ot(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var at=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ot(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===at}var st=new URL(`http://localhost`);function ct(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),st)}catch{return st}}function lt(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function ut(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function dt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!lt(i,n),s=!lt(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!ut(e,i)||!lt(i,a)))throw Error(`External navigation is not allowed`)}var ft=[`POST`,`PUT`,`PATCH`,`DELETE`],pt=new Set(ft),mt=[`GET`,...ft],ht=new Set(mt),gt=new Set([301,302,303,307,308]),_t=new Set([307,308]),vt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},xt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),St=`remix-router-transitions`,Ct=Symbol(`ResetLoaderData`),wt,Tt,Et,Dt,Ot=class{constructor(e){_(this,wt),_(this,Tt),_(this,Et),_(this,Dt),v(this,wt,e),v(this,Tt,ue(e))}get stableRoutes(){return g(this,wt)}get activeRoutes(){return g(this,Et)??g(this,wt)}get branches(){return g(this,Dt)??g(this,Tt)}get hasHMRRoutes(){return g(this,Et)!=null}setRoutes(e){v(this,wt,e),v(this,Tt,ue(e))}setHmrRoutes(e){v(this,Et,e),v(this,Dt,ue(e))}commitHmrRoutes(){g(this,Et)&&(v(this,wt,g(this,Et)),v(this,Tt,g(this,Dt)),v(this,Et,void 0),v(this,Dt,void 0))}};wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap;function kt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;T(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||xt,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...Ze(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Ot(P(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Kt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=ce(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,x=null,S,C;if(v==null&&!e.patchRoutesOnNavigation){let t=vn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=_n(s.activeRoutes);S=!0,C=!S,v=n,x={[r.id]:t}}else if(v&&!e.hydrationData&<(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){S=!1,C=!S,v=[];let t=lt(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))S=!1,C=!S;else if(!v.some(e=>Pt(e.route)))S=!0,C=!S;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}C=!1,S=!0,r.forEach(e=>{let r=Ft(e.route,t,n);C||=r.renderFallback,S&&=!r.shouldLoad})}let w,D={historyAction:e.history.action,location:e.history.location,matches:v,initialized:S,renderFallback:C,navigation:vt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},O=`POP`,te=null,j=!1,N,re=!1,ie=new Map,ae=null,oe=!1,F=!1,se=new Set,ue=new Map,de=0,fe=-1,pe=new Map,me=new Set,he=new Map,ge=new Map,_e=new Set,ve=new Map,ye,be=null;function xe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ye){ye(),ye=void 0;return}E(ve.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=rt({currentLocation:D.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ye=e});e.history.go(r*-1),nt(i,{state:`blocked`,location:n,proceed(){nt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(D.blockers);e.set(i,bt),we({blockers:e})}}),te?.resolve(),te=null}else return ke(t,n)}),n){Hn(t,ie);let e=()=>Un(t,ie);t.addEventListener(`pagehide`,e),ae=()=>t.removeEventListener(`pagehide`,e)}return D.initialized||ke(`POP`,D.location,{initialHydration:!0}),w}function Se(){d&&d(),ae&&ae(),f.clear(),N&&N.abort(),D.fetchers.forEach((e,t)=>Ge(D.fetchers,t)),D.blockers.forEach((e,t)=>tt(t))}function Ce(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(D,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function we(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),D={...D,...e};let n=[],r=[];D.fetchers.forEach((e,t)=>{e.state===`idle`&&(_e.has(t)?n.push(t):r.push(t))}),_e.forEach(e=>{!D.fetchers.has(e)&&!ue.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(D,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ge(D.fetchers,e)),r.forEach(e=>D.fetchers.delete(e))}function Te(t,n,{flushSync:r}={}){let i=D.actionData!=null&&D.navigation.formMethod!=null&&Nn(D.navigation.formMethod)&&D.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?D.actionData:null;let o=n.loaderData?mn(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,c=D.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,bt)));let l=!oe&&ct(t,n.matches||D.matches),u=j===!0||D.navigation.formMethod!=null&&Nn(D.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),oe||O===`POP`||(O===`PUSH`?e.history.push(t,t.state):O===`REPLACE`&&e.history.replace(t,t.state));let d;if(O===`POP`&&!oe&&t!==D.location){let e=ie.get(D.location.pathname);e&&e.has(t.pathname)?d={currentLocation:D.location,nextLocation:t}:ie.has(t.pathname)&&(d={currentLocation:t,nextLocation:D.location})}else if(re){let e=ie.get(D.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ie.set(D.location.pathname,e)),d={currentLocation:D.location,nextLocation:t}}we({...n,actionData:a,loaderData:o,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:vt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),O=`POP`,j=!1,re=!1,oe=!1,F=!1,te?.resolve(),te=null,be?.resolve(),be=null}async function Ee(t,n){if(te?.resolve(),te=null,typeof t==`number`){te||=Wn();let n=te.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Mt(!1,jt(D.location,D.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?A(n.mask):{...D.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},b.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),dt(typeof n.mask==`string`?n.mask:k(n.mask),k(o),e.history.createURL(`/`),`reject`)}let s=D.location,l=ee(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},dt(t==null?e.history.createHref(D.location):typeof t==`string`?t:k(t),e.history.createHref(l.mask||l),e.history.createURL(`/`),`reject`);let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Nn(i.formMethod)&&i.formAction===D.location.pathname+D.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=rt({currentLocation:s,nextLocation:l,historyAction:d});m?nt(m,{state:`blocked`,location:l,proceed(){nt(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),Ee(t,n)},reset(){let e=new Map(D.blockers);e.set(m,bt),we({blockers:e})}}):await ke(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function De(){be||=Wn(),Be(),we({revalidation:`loading`});let e=be.promise;return D.navigation.state===`submitting`?e:D.navigation.state===`idle`?(ke(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),e):(ke(O||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:re===!0}),e)}async function ke(t,n,r){N&&N.abort(),N=null,O=t,oe=(r&&r.startUninterruptedRevalidation)===!0,st(D.location,D.matches),j=(r&&r.preventScrollReset)===!0,re=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&D.matches&&D.matches.length>0&&!y?D.matches:ce(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&D.initialized&&!F&&xn(D.location,n)&&!(r&&r.submission&&Nn(r.submission.formMethod))){Te(n,{matches:a},{flushSync:o});return}let l=lt(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=it(n.pathname);Te(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=cn(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new M,p;if(r&&r.pendingError)p=[gn(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Nn(r.submission.formMethod)){let i=await je(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(En(t)&&Ke(t.error)&&t.error.status===404){N=null,Te(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Ln(n,a,t,r.submission),o=!1,l.active=!1,d=cn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Me(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,Te(n,{matches:h||a,...hn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function je(t,n,i,l,u,d,f,p,m={}){if(Be(),we({navigation:Rn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ut(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=_n(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=gn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=it(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Fn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:vn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Re(t,n,Qt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Dn(h)){let n;return n=m&&m.replace!=null?m.replace:sn(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===D.location.pathname+D.location.search,await I(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(En(h)){let e=gn(l,g.route.id);return(m&&m.replace)!==!0&&(O=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Me(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Ln(n,i,l,p),x=p||m||In(b),S=!oe&&!g;if(d){if(S){let e=Ne(v);we({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ut(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=_n(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=gn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=it(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Nt(t,u,a,o,e.history,D,i,x,n,g?[]:r,g===!0,F,se,_e,he,me,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(fe=++de,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(D.fetchers),t=Xe(e);return Te(n,{matches:i,loaderData:{},errors:v&&En(v[1])?{[v[0]]:v[1].error}:null,...hn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ne(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Pe(T)),we(e,{flushSync:_})}T.forEach(e=>{Je(e.key),e.controller&&ue.set(e.key,e.controller)});let E=()=>T.forEach(e=>Je(e.key));N&&N.signal.addEventListener(`abort`,E);let{loaderResults:O,fetcherResults:ee}=await ze(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,E),T.forEach(e=>ue.delete(e.key));let k=yn(O);if(k)return await I(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=yn(ee),k)return me.add(k.key),await I(t,k.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(D.fetchers),{loaderData:te,errors:ne}=pn(D,i,O,v,T,ee,A);g&&D.errors&&(ne={...D.errors,...ne});let j=Xe(A),M=$e(fe,A),re=j||M||T.length>0;return{matches:i,loaderData:te,errors:ne,...re?{workingFetchers:A}:{}}}function Ne(e){if(e&&!En(e[1]))return{[e[0]]:e[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function Pe(e){let t=new Map(D.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=zn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Fe(t,n,r,i){Je(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=jt(D.location,D.matches,c,r,n,i?.relative),u=ce(o,l,c,!1,s.branches),d=lt(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){He(t,n,vn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Mt(!0,l,i);if(m){He(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new M,g=(i&&i.preventScrollReset)===!0;p&&Nn(p.formMethod)?await Ie(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(he.set(t,{routeId:n,path:f}),await Le(t,n,f,u,h,d.active,a,g,p))}async function Ie(t,n,i,l,u,d,f,p,m,h){Be(),he.delete(t),Ve(t,Bn(m,D.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=cn(e.history,i,g.signal,m);if(d){let e=await ut(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{He(t,n,vn(404,{pathname:i}),{flushSync:f});return}}let v=Fn(l,i);if(!v.route.action&&!v.route.lazy){He(t,n,vn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}ue.set(t,g);let y=de,b=Qt(a,o,_,i,l,v,r,u),x=await Re(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){ue.get(t)===g&&ue.delete(t);return}if(_e.has(t)){if(Dn(S)||En(S)){Ve(t,Vn(void 0));return}}else{if(Dn(S)){if(ue.delete(t),fe>y){Ve(t,Vn(void 0));return}return me.add(t),Ve(t,zn(m)),I(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(En(S)){He(t,n,S.error);return}}let C=D.navigation.location||D.location,w=cn(e.history,C,g.signal),E=s.activeRoutes,ee=D.navigation.state===`idle`?D.matches:ce(E,D.navigation.location,c,!1,s.branches);T(ee,`Didn't find any matches after fetcher action`);let k=++de;pe.set(t,k);let{dsMatches:A,revalidatingFetchers:te}=Nt(w,u,a,o,e.history,D,ee,m,C,r,!1,F,se,_e,he,me,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ne=zn(m,S.data),j=new Map(D.fetchers);j.set(t,ne),te.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=j.get(t),r=zn(void 0,n?n.data:void 0);j.set(t,r),Je(t),e.controller&&ue.set(t,e.controller)}),we({fetchers:j});let M=()=>te.forEach(e=>Je(e.key));g.signal.addEventListener(`abort`,M);let{loaderResults:re,fetcherResults:ie}=await ze(A,te,w,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,M),pe.delete(t),ue.delete(t),te.forEach(e=>ue.delete(e.key));let ae=D.fetchers.has(t),oe=e=>{if(!ae)return e;let n=new Map(e.fetchers);return n.set(t,Vn(S.data)),{...e,fetchers:n}},P=yn(re);if(P)return D=oe(D),I(w,P.result,!1,{preventScrollReset:p});if(P=yn(ie),P)return me.add(P.key),D=oe(D),I(w,P.result,!1,{preventScrollReset:p});let le=new Map(D.fetchers);ae&&le.set(t,Vn(S.data));let{loaderData:ge,errors:ve}=pn(D,ee,re,void 0,te,ie,le);$e(k,le),D.navigation.state===`loading`&&k>fe?(T(O,`Expected pending action`),N&&N.abort(),Te(D.navigation.location,{matches:ee,loaderData:ge,errors:ve,fetchers:le})):(we({errors:ve,loaderData:mn(D.loaderData,ge,ee,ve),fetchers:le}),F=!1)}async function Le(t,n,i,s,c,l,u,d,f){let p=D.fetchers.get(t);Ve(t,zn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=cn(e.history,i,m.signal);if(l){let e=await ut(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{He(t,n,vn(404,{pathname:i}),{flushSync:u});return}}let g=Fn(s,i);ue.set(t,m);let _=de,v=await Re(h,i,Qt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(ue.get(t)===m&&ue.delete(t),!h.signal.aborted){if(_e.has(t))Ve(t,Vn(void 0));else if(Dn(y)){if(fe>_){Ve(t,Vn(void 0));return}me.add(t),await I(h,y,!1,{preventScrollReset:d})}else En(y)?He(t,n,y.error):Ve(t,Vn(y.data))}}async function I(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(te?.resolve(),te=null),i.response.headers.has(`X-Remix-Revalidate`)&&(F=!0);let d=i.response.headers.get(`Location`);T(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=sn(d,p,c,e.history),dt(f,d,p,`allow-explicit`);let m=ee(D.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ae(d)){let n=ne(t,d,!0);e=n.origin!==t.location.origin||Oe(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=D.navigation;!o&&!s&&g&&_&&v&&(o=In(D.navigation));let y=o||s;_t.has(i.response.status)&&y&&Nn(y.formMethod)?await ke(h,m,{submission:{...y,formAction:d},preventScrollReset:l||j,enableViewTransition:a?re:void 0}):await ke(h,m,{overrideNavigation:Ln(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||j,enableViewTransition:a?re:void 0})}async function Re(e,t,n,r,i){let a,o={};try{a=await $t(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Nn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||D.loaderData.hasOwnProperty(e.route.id)||D.errors&&D.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Tn(r)){let i=r.result;o[t]={type:`redirect`,response:rn(i,e,t,n,c)}}else o[t]=await nn(r);return o}async function ze(e,t,n,r,i){let a=Re(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Re(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:vn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Be(){F=!0,he.forEach((e,t)=>{ue.has(t)&&se.add(t),Je(t)})}function Ve(e,t,n={}){let r=new Map(D.fetchers);r.set(e,t),we({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function He(e,t,n,r={}){let i=gn(D.matches,t),a=new Map(D.fetchers);Ge(a,e),we({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ue(e){return ge.set(e,(ge.get(e)||0)+1),_e.has(e)&&_e.delete(e),D.fetchers.get(e)||yt}function We(e,t){Je(e,t?.reason),Ve(e,Vn(null))}function Ge(e,t){let n=D.fetchers.get(t);ue.has(t)&&!(n&&n.state===`loading`&&pe.has(t))&&Je(t),he.delete(t),pe.delete(t),me.delete(t),_e.delete(t),se.delete(t),e.delete(t)}function qe(e){let t=(ge.get(e)||0)-1;t<=0?(ge.delete(e),_e.add(e)):ge.set(e,t),we({fetchers:new Map(D.fetchers)})}function Je(e,t){let n=ue.get(e);n&&(n.abort(t),ue.delete(e))}function Ye(e,t){for(let n of e){let e=t.get(n);T(e,`Expected fetcher: ${n}`);let r=Vn(e.data);t.set(n,r)}}function Xe(e){let t=[],n=!1;for(let r of me){let i=e.get(r);T(i,`Expected fetcher: ${r}`),i.state===`loading`&&(me.delete(r),t.push(r),n=!0)}return Ye(t,e),n}function $e(e,t){let n=[];for(let[r,i]of pe)if(i<e){let e=t.get(r);T(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Je(r),pe.delete(r),n.push(r))}return Ye(n,t),n.length>0}function et(e,t){let n=D.blockers.get(e)||bt;return ve.get(e)!==t&&ve.set(e,t),n}function tt(e){D.blockers.delete(e),ve.delete(e)}function nt(e,t){let n=D.blockers.get(e)||bt;T(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(D.blockers);r.set(e,t),we({blockers:r})}function rt({currentLocation:e,nextLocation:t,historyAction:n}){if(ve.size===0)return;ve.size>1&&E(!1,`A router only supports one blocker at a time`);let r=Array.from(ve.entries()),[i,a]=r[r.length-1],o=D.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function it(e){let t=vn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=_n(n);return{notFoundMatches:r,route:i,error:t}}function at(e,t,n){if(m=e,g=t,h=n||null,!_&&D.navigation===vt){_=!0;let e=ct(D.location,D.matches);e!=null&&we({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function ot(e,t){return h&&h(e,t.map(e=>le(e,D.loaderData)))||e.key}function st(e,t){if(m&&g){let n=ot(e,t);m[n]=g()}}function ct(e,t){if(m){let n=ot(e,t),r=m[n];if(typeof r==`number`)return r}return null}function lt(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:ce(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:ce(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ut(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||zt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=ce(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=ce(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ft(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=ce(s.activeRoutes,n,c,!0,u),!f||ft(l,f))return{type:`success`,matches:null};l=f}}function ft(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function pt(e){o={},s.setHmrRoutes(P(e,a,void 0,o))}function mt(e,t,n=!1){zt(e,t,s,o,a,n),s.hasHMRRoutes||we({})}return w={get basename(){return c},get future(){return u},get state(){return D},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:xe,subscribe:Ce,enableScrollRestoration:at,navigate:Ee,fetch:Fe,revalidate:De,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ue,resetFetcher:We,deleteFetcher:qe,dispose:Se,getBlocker:et,deleteBlocker:tt,patchRoutes:mt,_internalFetchControllers:ue,_internalSetRoutes:pt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){we(e)}},e.instrumentations&&(w=Qe(w,e.instrumentations.map(e=>e.router).filter(Boolean))),w}function At(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function jt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ie(r||`.`,Fe(o),Oe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Pn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ke({basename:n,pathname:c.pathname})),k(c)}function Mt(e,t,n){if(!n||!At(n))return{path:t};if(n.formMethod&&!Mn(n.formMethod))return{path:t,error:vn(405,{method:n.formMethod})};let r=()=>({path:t,error:vn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=bn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Nn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
3
3
|
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Nn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}T(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=un(n.formData),s=n.formData;else if(n.body instanceof FormData)o=un(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=dn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=dn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Nn(c.formMethod))return{path:t,submission:c};let l=A(t);return e&&l.search&&Pn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:k(l),submission:c}}function Nt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?En(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&En(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},ee=qe(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Pt(s))f=!1;else if(u){let{shouldLoad:e}=Ft(s,a.loaderData,a.errors);f=e}else It(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Zt(n,r,e,c,ee,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Lt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=Rt(i,m);return Zt(n,r,e,c,ee,i,l,t,h,m,x)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=ce(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Fn(b,e.path),C=new AbortController,w=cn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Qt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Qt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Rt(S,a)&&(T=Qt(n,r,w,e.path,b,S,l,t,a))}T&&A.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:k,revalidatingFetchers:A}}function Pt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ft(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Pt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function It(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Lt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Rt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function zt(e,t,n,r,i,a){let o;if(e){let t=r[e];T(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Bt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=P(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=P([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Bt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Bt(e,t)))??!1}var Vt=new WeakMap,Ht=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(T(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Vt.get(i);o||(o={},Vt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=re(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)E(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)E(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Ut=new WeakMap;function Wt(e,t,n,r,i){let a=n[e.id];if(T(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ut.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{T(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=ae(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?E(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?E(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Ut.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Ht({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Gt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Kt(e){return e.matches.some(e=>e.route.middleware)?qt(e,()=>Gt(e)):Gt(e)}function qt(e,t){return Jt(e,t,e=>{if(jn(e))throw e;return e},Cn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=gn(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Jt(e,t,n,r,i){let{matches:a,...o}=e;return await Yt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Yt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Yt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Xt(e,t,n,r,i){let a=Ht({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Wt(r.route,Nn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Zt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Xt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Rt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Rt(a,{...l,defaultShouldRevalidate:e}):Rt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Nn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Nn(n.method)||!p)?en({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Qt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Zt(e,t,n,r,qe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Xt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function $t(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:ln(t,n),pattern:qe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return qt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function en({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Nn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:ln(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw vn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw vn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function tn(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function nn(e){let{result:t,type:n}=e;if(kn(t)){let e;try{e=await tn(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ge(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?On(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Sn(t),statusCode:Ke(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ke(t)?t.status:void 0}:On(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function rn(e,t,n,r,i){let a=e.headers.get(`Location`);if(T(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ae(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=jt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var an=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function on(e){try{return an.includes(new URL(e).protocol)}catch{return!1}}function sn(e,t,n,r){if(Ae(e)){let r=e,i=b.test(r)?new URL(x(r,t.protocol)):new URL(r);if(on(i.toString()))throw Error(`Invalid redirect location`);let a=Oe(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Le(i.pathname)+i.search+i.hash}try{if(on(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function cn(e,t,n,r){let i=e.createURL(bn(t)).toString(),a={signal:n};if(r&&Nn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?un(r.formData):r.formData}return new Request(i,a)}function ln(e,t){let n=new URL(e.url),r=typeof t==`string`?A(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function un(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function dn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function fn(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&En(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(T(!Dn(f),`Cannot handle redirect results in processLoaderData`),En(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=gn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ct),c||(c=!0,s=Ke(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function pn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=fn(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(T(s,`Did not find corresponding fetcher result`),En(s)){let t=gn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Dn(s))T(!1,`Unhandled fetcher revalidation redirect`);else{let e=Vn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function mn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ct).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function hn(e){return e?En(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gn(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function _n(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function vn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ge(e||500,o,Error(s),!0)}function yn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Dn(r))return{key:n,result:r}}}function bn(e){return k({...typeof e==`string`?A(e):e,hash:``})}function xn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Sn(e){return new Ge(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Cn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&wn(t))}function wn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Tn(e){return kn(e.result)&>.has(e.result.status)}function En(e){return e.type===`error`}function Dn(e){return(e&&e.type)===`redirect`}function On(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function kn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function An(e){return gt.has(e)}function jn(e){return kn(e)&&An(e.status)&&e.headers.has(`Location`)}function Mn(e){return ht.has(e.toUpperCase())}function Nn(e){return pt.has(e.toUpperCase())}function Pn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Fn(e,t){let n=typeof t==`string`?A(t).search:t.search;if(e[e.length-1].route.index&&Pn(n||``))return e[e.length-1];let r=Pe(e);return r[r.length-1]}function In(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Ln(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Rn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function zn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Bn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Hn(e,t){try{let n=e.sessionStorage.getItem(St);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Un(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(St,JSON.stringify(n))}catch(e){E(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Wn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Gn=p.createContext(null);Gn.displayName=`DataRouter`;var Kn=p.createContext(null);Kn.displayName=`DataRouterState`;var qn=p.createContext(!1);function Jn(){return p.useContext(qn)}var Yn=p.createContext({isTransitioning:!1});Yn.displayName=`ViewTransition`;var Xn=p.createContext(new Map);Xn.displayName=`Fetchers`;var Zn=p.createContext(null);Zn.displayName=`Await`;var Qn=p.createContext(null);Qn.displayName=`Navigation`;var $n=p.createContext(null);$n.displayName=`Location`;var er=p.createContext({outlet:null,matches:[],isDataRoute:!1});er.displayName=`Route`;var tr=p.createContext(null);tr.displayName=`RouteError`;var nr=`REACT_ROUTER_ERROR`,rr=`REDIRECT`,ir=`ROUTE_ERROR_RESPONSE`;function ar(e){if(e.startsWith(`${nr}:${rr}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function or(e){if(e.startsWith(`${nr}:${ir}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ge(t.status,t.statusText,t.data)}catch{}}function sr(e,{relative:t}={}){T(cr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=p.useContext(Qn),{hash:i,pathname:a,search:o}=vr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:I([n,a])),r.createHref({pathname:s,search:o,hash:i})}function cr(){return p.useContext($n)!=null}function lr(){return T(cr(),`useLocation() may be used only in the context of a <Router> component.`),p.useContext($n).location}var ur=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function dr(e){p.useContext(Qn).static||p.useLayoutEffect(e)}function fr(){let{isDataRoute:e}=p.useContext(er);return e?Fr():pr()}function pr(){T(cr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=p.useContext(Gn),{basename:t,navigator:n}=p.useContext(Qn),{matches:r}=p.useContext(er),{pathname:i}=lr(),a=JSON.stringify(Fe(r)),o=p.useRef(!1);return dr(()=>{o.current=!0}),p.useCallback((r,s={})=>{if(E(o.current,ur),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ie(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:I([t,c.pathname])),dt(typeof r==`string`?r:k(r),n.createHref(c),ct(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var mr=p.createContext(null);function hr(){return p.useContext(mr)}function gr(e){let t=p.useContext(er).outlet;return p.useMemo(()=>t&&p.createElement(mr.Provider,{value:e},t),[t,e])}function _r(){let{matches:e}=p.useContext(er);return e[e.length-1]?.params??{}}function vr(e,{relative:t}={}){let{matches:n}=p.useContext(er),{pathname:r}=lr(),i=JSON.stringify(Fe(n));return p.useMemo(()=>Ie(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function yr(e,t,n){T(cr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=p.useContext(Qn),{matches:i}=p.useContext(er),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Lr(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
4
4
|
|
|
5
5
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=lr(),d;if(t){let e=typeof t==`string`?A(t):t;T(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,m=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):se(e,{pathname:m});E(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),E(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Er(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:I([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:I([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?p.createElement($n.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},g):g}function br(){let e=Pr(),t=Ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=p.createElement(p.Fragment,null,p.createElement(`p`,null,`💿 Hey developer 👋`),p.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,p.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,p.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),p.createElement(p.Fragment,null,p.createElement(`h2`,null,`Unexpected Application Error!`),p.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?p.createElement(`pre`,{style:i},n):null,o)}var xr=p.createElement(br,null),Sr=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=or(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:p.createElement(er.Provider,{value:this.props.routeContext},p.createElement(tr.Provider,{value:e,children:this.props.component}));return this.context?p.createElement(wr,{error:e},t):t}};Sr.contextType=qn;var Cr=new WeakMap;function wr({children:e,error:t}){let{basename:n,navigator:r}=p.useContext(Qn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ar(t.digest);if(e){let i=Cr.get(t);if(i)throw i;let a=Ye(e.location,n),o=a.absoluteURL||a.to;if(dt(e.location,o,ct(r),`allow-explicit`),on(o))throw Error(`Invalid redirect location`);if(Je&&!Cr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Cr.set(t,n),n}}return p.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Tr({routeContext:e,match:t,children:n}){let r=p.useContext(Gn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(er.Provider,{value:e},n)}function Er(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:qe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,m=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||xr,o&&(s<0&&c===0?(Lr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,m=null):s===c&&(d=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?m:n.route.Component?p.createElement(n.route.Component,null):n.route.element?n.route.element:e,p.createElement(Tr,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?p.createElement(Sr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function Dr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Or(e){let t=p.useContext(Gn);return T(t,Dr(e)),t}function kr(e){let t=p.useContext(Kn);return T(t,Dr(e)),t}function Ar(e){let t=p.useContext(er);return T(t,Dr(e)),t}function jr(e){let t=Ar(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mr(){return jr(`useRouteId`)}function Nr(){let{matches:e,loaderData:t}=kr(`useMatches`);return p.useMemo(()=>e.map(e=>le(e,t)),[e,t])}function Pr(){let e=p.useContext(tr),t=kr(`useRouteError`),n=jr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Fr(){let{router:e}=Or(`useNavigate`),t=jr(`useNavigate`),n=p.useRef(!1);return dr(()=>{n.current=!0}),p.useCallback(async(r,i={})=>{E(n.current,ur),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ir={};function Lr(e,t,n){!t&&!Ir[e]&&(Ir[e]=!0,E(!1,n))}var Rr={};function zr(e,t){!e&&!Rr[t]&&(Rr[t]=!0,console.warn(t))}var Br=p.useOptimistic,Vr=()=>void 0;function Hr(e){return Br?Br(e):[e,Vr]}function Ur(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&E(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:p.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&E(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&E(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Wr=[`HydrateFallback`,`hydrateFallbackElement`],Gr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Kr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Jn()||r;let[i,a]=p.useState(e.state),[o,s]=Hr(i),[c,l]=p.useState(),[u,d]=p.useState({isTransitioning:!1}),[f,m]=p.useState(),[h,g]=p.useState(),[_,v]=p.useState(),y=p.useRef(new Map),b=p.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:qe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),zr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(zr(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b)t&&u?t(()=>a(i)):r===!1?a(i):p.startTransition(()=>{r===!0&&s(e=>qr(e,i)),a(i)});else if(t&&u){t(()=>{h&&(f?.resolve(),h.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>g(n))}else h?(f?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,f,r,s,n]);p.useLayoutEffect(()=>e.subscribe(b),[e,b]),p.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new Gr)},[u]),p.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):p.startTransition(()=>{r===!0&&s(e=>qr(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),l(void 0),d({isTransitioning:!1})}),g(i)}},[c,f,e.window,r,s]),p.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,h,o.location,c]),p.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let x=p.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=p.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return p.createElement(p.Fragment,null,p.createElement(Gn.Provider,{value:C},p.createElement(Kn.Provider,{value:o},p.createElement(Xn.Provider,{value:y.current},p.createElement(Yn.Provider,{value:u},p.createElement(Zr,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},p.createElement(Jr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function qr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Jr=p.memo(Yr);function Yr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return yr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Xr(e){return gr(e.context)}function Zr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){T(!cr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=p.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:m=`default`,mask:h}=n,g=p.useMemo(()=>{let e=Oe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:m,mask:h},navigationType:r}},[s,l,u,d,f,m,r,h]);return E(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:p.createElement(Qn.Provider,{value:c},p.createElement($n.Provider,{children:t,value:g}))}p.Component;var Qr=`get`,$r=`application/x-www-form-urlencoded`;function ei(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ti(e){return ei(e)&&e.tagName.toLowerCase()===`button`}function ni(e){return ei(e)&&e.tagName.toLowerCase()===`form`}function ri(e){return ei(e)&&e.tagName.toLowerCase()===`input`}function ii(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ai(e,t){return e.button===0&&(!t||t===`_self`)&&!ii(e)}function oi(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function si(e,t){let n=oi(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ci=null;function li(){if(ci===null)try{new FormData(document.createElement(`form`),0),ci=!1}catch{ci=!0}return ci}var ui=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function di(e){return e!=null&&!ui.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$r}"`),null):e}function fi(e,t){let n,r,i,a,o;if(ni(e)){let o=e.getAttribute(`action`);r=o?Oe(o,t):null,n=e.getAttribute(`method`)||Qr,i=di(e.getAttribute(`enctype`))||$r,a=new FormData(e)}else if(ti(e)||ri(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Oe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Qr,i=di(e.getAttribute(`formenctype`))||di(o.getAttribute(`enctype`))||$r,a=new FormData(o,e),!li()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ei(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Qr,r=null,i=$r,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function pi(e,t){if(e===!1||e==null)throw Error(t)}function mi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&Oe(i.pathname,t)===`/`?`${Re(t)}/_root.${r}`:`${Re(i.pathname)}.${r}`,i}async function hi(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function gi(e){return e!=null&&typeof e.page==`string`}function _i(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function vi(e,t,n){return Ci((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await hi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(_i).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function yi(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function bi(e,t,{includeHydrateFallback:n}={}){return xi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function xi(e){return[...new Set(e)]}function Si(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ci(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!gi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Si(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function wi(){let e=p.useContext(Gn);return pi(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ti(){let e=p.useContext(Kn);return pi(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ei=p.createContext(void 0);Ei.displayName=`FrameworkContext`;function Di(){let e=p.useContext(Ei);return pi(e,`You must render this element inside a <HydratedRouter> element`),e}function Oi(e,t){let n=p.useContext(Ei),[r,i]=p.useState(!1),[a,o]=p.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=p.useRef(null);p.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),p.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:ki(s,m),onBlur:ki(c,h),onMouseEnter:ki(l,m),onMouseLeave:ki(u,h),onTouchStart:ki(d,m)}]:[a,f,{}]:[!1,f,{}]}function ki(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ai({page:e,...t}){let n=Jn(),{nonce:r}=Di(),{router:i}=wi(),a=p.useMemo(()=>se(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?p.createElement(Mi,{page:e,matches:a,...t}):p.createElement(Ni,{page:e,matches:a,...t})):null}function ji(e){let{manifest:t,routeModules:n}=Di(),[r,i]=p.useState([]);return p.useEffect(()=>{let r=!1;return vi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Mi({page:e,matches:t,...n}){let r=lr(),{future:i}=Di(),{basename:a}=wi(),o=p.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=mi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return p.createElement(p.Fragment,null,o.map(e=>p.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ni({page:e,matches:t,...n}){let r=lr(),{future:i,manifest:a,routeModules:o}=Di(),{basename:s}=wi(),{loaderData:c,matches:l}=Ti(),u=p.useMemo(()=>yi(e,t,l,a,r,`data`),[e,t,l,a,r]),d=p.useMemo(()=>yi(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=p.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=mi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),m=p.useMemo(()=>bi(d,a),[d,a]),h=ji(d);return p.createElement(p.Fragment,null,f.map(e=>p.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>p.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>p.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Pi(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}p.Component;var L=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{L&&(window.__reactRouterVersion=`7.18.4`)}catch{}function Fi(e,t){return kt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:w({window:t?.window}),hydrationData:t?.hydrationData||Ii(),routes:e,mapRouteProperties:Ur,hydrationRouteProperties:Wr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ii(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Li(e.errors)}),e}function Li(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ge(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&We.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ri=p.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...m},h){let{basename:g,navigator:_,useTransitions:v}=p.useContext(Qn),b=typeof l==`string`&&y.test(l),x=Ye(l,g);l=x.to;let S=sr(l,{relative:r}),C=lr(),w=null;if(o){let e=Ie(o,[],C.mask?C.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:I([g,e.pathname])),w=_.createHref(e)}let[T,E,D]=Oi(n,m),O=Ui(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function ee(t){e&&e(t),t.defaultPrevented||O(t)}let k=!(x.isExternal||i),A=p.createElement(`a`,{...m,...D,href:(k?w:void 0)||x.absoluteURL||S,onClick:k?ee:e,ref:Pi(h,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?p.createElement(p.Fragment,null,A,p.createElement(Ai,{page:S})):A});Ri.displayName=`Link`;var zi=p.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=vr(a,{relative:c.relative}),d=lr(),f=p.useContext(Kn),{navigator:m,basename:h}=p.useContext(Qn),g=f!=null&&Yi(u)&&o===!0,_=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Oe(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return p.createElement(Ri,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});zi.displayName=`NavLink`;var Bi=p.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Qr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...m},h)=>{let{useTransitions:g}=p.useContext(Qn),_=qi(),v=Ji(s,{relative:l}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&y.test(s);return p.createElement(`form`,{ref:h,method:b,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?p.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});Bi.displayName=`Form`;function Vi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hi(e){let t=p.useContext(Gn);return T(t,Vi(e)),t}function Ui(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=fr(),d=lr(),f=vr(e,{relative:o});return p.useCallback(m=>{if(ai(m,t)){m.preventDefault();let t=n===void 0?k(d)===k(f):n,h=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?p.startTransition(()=>h()):h()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Wi(e){E(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=p.useRef(oi(e)),n=p.useRef(!1),r=lr(),i=p.useMemo(()=>si(r.search,n.current?null:t.current),[r.search]),a=fr();return[i,p.useCallback((e,t)=>{let r=oi(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Gi=0,Ki=()=>`__${String(++Gi)}__`;function qi(){let{router:e}=Hi(`useSubmit`),{basename:t}=p.useContext(Qn),n=Mr(),r=e.fetch,i=e.navigate;return p.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=fi(e,t);if(a.navigate===!1){let e=a.fetcherKey||Ki();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ji(e,{relative:t}={}){let{basename:n}=p.useContext(Qn),r=p.useContext(er);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...vr(e||`.`,{relative:t})},o=lr();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:I([n,a.pathname])),k(a)}function Yi(e,{relative:t}={}){let n=p.useContext(Yn);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hi(`useViewTransitionState`),i=vr(e,{relative:t});if(!n.isTransitioning)return!1;let a=Oe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Oe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return we(i.pathname,o)!=null||we(i.pathname,a)!=null}var Xi=s((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),Zi=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Xi()})),Qi=u(Zi(),1);function $i(e){return p.createElement(Kr,{flushSync:Qi.flushSync,...e})}function ea(e){let t=(0,p.useCallback)(t=>{let n=e.onDidChange(t);return()=>n.dispose()},[e]);return(0,p.useSyncExternalStore)(t,e.getSnapshot),e}var ta=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),na=s(((e,t)=>{t.exports=ta()})),R=na(),ra=(0,p.createContext)(null);function ia({services:e,children:t}){return(0,R.jsx)(ra.Provider,{value:e,children:t})}function aa(e){let t=(0,p.useContext)(ra);if(!t)throw Error(`组件必须位于 ServicesProvider 内`);return t.invokeFunction(t=>t.get(e))}var oa=class{ctor;staticArguments;supportsDelayedInstantiation;constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}},sa;(function(e){e.serviceIds=new Map,e.DI_TARGET=`$di$target`,e.DI_DEPENDENCIES=`$di$dependencies`;function t(t){return t[e.DI_DEPENDENCIES]||[]}e.getServiceDependencies=t})(sa||={});var ca=ua(`instantiationService`);function la(e,t,n){t[sa.DI_TARGET]===t?t[sa.DI_DEPENDENCIES].push({id:e,index:n}):(t[sa.DI_DEPENDENCIES]=[{id:e,index:n}],t[sa.DI_TARGET]=t)}function ua(e){if(sa.serviceIds.has(e))return sa.serviceIds.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);la(t,e,r)};return t.toString=()=>e,sa.serviceIds.set(e,t),t}var da=new class{unexpectedErrorHandler;listeners;constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?va.isErrorNoTelemetry(e)?new va(e.message+`
|
|
@@ -87,4 +87,4 @@ Error generating stack: `+e.message+`
|
|
|
87
87
|
display: none;
|
|
88
88
|
visibility: hidden;
|
|
89
89
|
}
|
|
90
|
-
`.replace(/\n+/g,` `).replace(/\s+/g,` `).trim();function Ym(e,t=`hidden`){return Ls(()=>{let{element:n,manager:r}=e;if(!n||!r)return;let i=Xm(n,r.registry.droppables),a=[],o=lf(n),{remove:s}=o;return Zm(i,o,a),Qm(o,t),o.remove=()=>{a.forEach(e=>e()),s.call(o)},o})}function Xm(e,t){let n=new Map;for(let r of t)if(r.element&&(e===r.element||e.contains(r.element))){let e=`${Vm}${Wp(`dom-id`)}`;r.element.setAttribute(e,``),n.set(r,e)}return n}function Zm(e,t,n){for(let[r,i]of e){if(!r.element)continue;let e=`[${i}]`,a=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!a)continue;let o=r.element;r.proxy=a,a.removeAttribute(i),mf.set(o,a),n.push(()=>{mf.delete(o),r.proxy=void 0})}}function Qm(e,t=`hidden`){e.setAttribute(`inert`,`true`),e.setAttribute(`tab-index`,`-1`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(Gm,t)}function $m(e,t){return e===t||_f(e)===_f(t)}function eh(e){let{target:t}=e;`newState`in e&&e.newState===`closed`&&Rp(t)&&t.hasAttribute(`popover`)&&requestAnimationFrame(()=>Zf(t))}function th(e){return e.tagName===`TR`}function nh(e,t,n){let r=new MutationObserver(r=>{let i=!1;for(let n of r){if(n.target!==e){i=!0;continue}if(n.type!==`attributes`)continue;let r=n.attributeName;if(r.startsWith(`aria-`)||Km.includes(r))continue;let a=e.getAttribute(r);if(r===`style`){if(Ip(e)&&Ip(t)){let n=e.style;for(let e of Array.from(t.style))n.getPropertyValue(e)===``&&t.style.removeProperty(e);for(let e of Array.from(n)){if(qm.includes(e)||e.startsWith(Um))continue;let r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else a===null?t.removeAttribute(r):t.setAttribute(r,a)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function rh(e,t,n){let r=new MutationObserver(r=>{for(let i of r)if(i.addedNodes.length!==0)for(let r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement(`afterend`,t),Zf(n);return}if(r.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement(`beforebegin`,e),Zf(n);return}}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement(`afterend`,t),Zf(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function ih(e){return new ResizeObserver(()=>{var t;let n=new Pp(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),r=e.transformOrigin??{x:1,y:1},i=(e.width-n.width)*r.x+e.delta.x,a=(e.height-n.height)*r.y+e.delta.y,o=af();if(e.styles.set({width:n.width-e.widthOffset,height:n.height-e.heightOffset,top:e.top+a+o.y,left:e.left+i+o.x},Um),(t=e.getElementMutationObserver())==null||t.takeRecords(),th(e.element)&&th(e.placeholder)){let t=Array.from(e.element.cells),n=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(t.map(e=>e.style.width));for(let[e,r]of t.entries()){let t=n[e];r.style.width=`${t.getBoundingClientRect().width}px`}}let s=e.getTranslate()??{x:0,y:0},c=e.left+i+o.x+s.x,l=e.top+a+o.y+s.y,u=n.width-e.widthOffset,d=n.height-e.heightOffset,f=e.frameTransform;e.dragOperation.shape=new Al(c*f.scaleX+f.x,l*f.scaleY+f.y,u*f.scaleX,d*f.scaleY)})}var ah=250,oh=`ease`;function sh(e){var t;let{animation:n}=e;if(typeof n==`function`){let t=n({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}let{duration:r=ah,easing:i=oh}=n??{};Zf(e.feedbackElement);let[,a]=Vd(e.feedbackElement,e=>`translate`in e)??[];a?.pause();let o=e.placeholder??e.element,s={frameTransform:$m(e.feedbackElement,o)?null:void 0},c=new Pp(e.feedbackElement,s),l=gp(rp(e.feedbackElement).translate)??e.translate,u=new Pp(o,s),d=Al.delta(c,u,e.alignment),f={x:l.x-d.x,y:l.y-d.y},p=Math.round(c.intrinsicHeight)===Math.round(u.intrinsicHeight)?{}:{minHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`]},m=Math.round(c.intrinsicWidth)===Math.round(u.intrinsicWidth)?{}:{minWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`]};e.styles.set({transition:e.transition},Um),e.feedbackElement.setAttribute(Hm,``),(t=e.getElementMutationObserver())==null||t.takeRecords(),Op({element:e.feedbackElement,keyframes:om(am(am({},p),m),{translate:[`${l.x}px ${l.y}px 0`,`${f.x}px ${f.y}px 0`]}),options:{duration:cf(Gd(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?r:0,easing:i}}).then(()=>{e.feedbackElement.removeAttribute(Hm),a?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var ch,lh,uh,dh,fh,ph,mh,hh=class extends (lh=hu,ch=[V],lh){constructor(e,t){super(e,t),vm(this,fh),vm(this,dh,mm(uh,8,this)),mm(uh,11,this),this.state={initial:{},current:{}};let n=e.registry.plugins.get(Bm),r=n?.register(Jm,{retain:!0});if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(bm(this,fh,ph).bind(this,n)),this.registerEffect(bm(this,fh,mh))}};uh=lm(lh),dh=new WeakMap,fh=new WeakSet,ph=function(e){let{overlay:t}=this;if(!t||!e)return;let n=sf(t);if(n)return e.addRoot(n)},mh=function(){let{state:e,manager:t,options:n}=this,{dragOperation:r}=t,{position:i,source:a,status:o}=r;if(o.idle){e.current={},e.initial={};return}if(!a)return;let{element:s}=a,c=a.pluginConfig(hh),l=c?.feedback??n?.feedback??`default`,u=typeof l==`function`?l(a,t):l;if(!s||u===`none`||!o.initialized||o.initializing)return;let{initial:d}=e,f=this.overlay??s,p=pp(f),m=pp(s),h=!$m(s,f),g=new Pp(s,{frameTransform:h?m:null,ignoreTransforms:!h}),_={x:m.scaleX/p.scaleX,y:m.scaleY/p.scaleY},{width:v,height:y,top:b,left:x}=g;h&&(v/=_.x,y/=_.y);let S=new Lp(f),C=rp(s),{transition:w,translate:T,boxSizing:E,paddingBlockStart:D,paddingBlockEnd:O,paddingInlineStart:ee,paddingInlineEnd:k,borderInlineStartWidth:A,borderInlineEndWidth:te,borderBlockStartWidth:ne,borderBlockEndWidth:j}=C,M=w.split(`,`).filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(`,`),N=_p(C),re=C.transform,ie=u===`clone`,ae=E===`content-box`,oe=ae?parseInt(ee)+parseInt(k)+parseInt(A)+parseInt(te):0,P=ae?parseInt(D)+parseInt(O)+parseInt(ne)+parseInt(j):0,F=u!==`move`&&!this.overlay?Ym(a,ie?`clone`:`hidden`):null,se=Ls(()=>zp(t.dragOperation.activatorEvent));if(!d.translate){if(this.overlay&&N)d.translate={x:N.x,y:N.y};else if(T!==`none`){let e=gp(T);e&&(d.translate=e)}}if(!d.transformOrigin){let e=Ls(()=>i.current),t=x+(N?.x??0),n=b+(N?.y??0);d.transformOrigin={x:(e.x-t*p.scaleX-p.x)/(v*p.scaleX),y:(e.y-n*p.scaleY-p.y)/(y*p.scaleY)}}let{transformOrigin:ce}=d,le=b*p.scaleY+p.y,ue=x*p.scaleX+p.x;if(!d.coordinates&&(d.coordinates={x:ue,y:le},_.x!==1||_.y!==1)){let{scaleX:e,scaleY:t}=m,{x:n,y:r}=ce;d.coordinates.x+=(v*e-v)*n,d.coordinates.y+=(y*t-y)*r}d.dimensions||={width:v,height:y},d.frameTransform||=p;let de={x:d.coordinates.x-ue,y:d.coordinates.y-le},fe={width:(d.dimensions.width*d.frameTransform.scaleX-v*p.scaleX)*ce.x,height:(d.dimensions.height*d.frameTransform.scaleY-y*p.scaleY)*ce.y},pe={x:de.x/p.scaleX+fe.width,y:de.y/p.scaleY+fe.height},me={left:x+pe.x,top:b+pe.y};f.setAttribute(Wm,`true`);let he=Ls(()=>r.transform),ge=d.translate??{x:0,y:0},_e=he.x*p.scaleX+ge.x,ve=he.y*p.scaleY+ge.y,ye=af();S.set({width:v-oe,height:y-P,top:me.top+ye.y,left:me.left+ye.x,translate:`${_e}px ${ve}px 0`,transform:this.overlay?`none`:re,transition:M?`${M}, translate 0ms linear`:`translate 0ms linear`,scale:h?`${_.x} ${_.y}`:``,"transform-origin":`${ce.x*100}% ${ce.y*100}%`},Um),F&&(s.insertAdjacentElement(`afterend`,F),n?.rootElement&&(typeof n.rootElement==`function`?n.rootElement(a):n.rootElement).appendChild(s)),Xf(f)&&(f.hasAttribute(`popover`)||f.setAttribute(`popover`,`manual`),Zf(f),f.addEventListener(`beforetoggle`,eh));let be,xe,Se,Ce=ih({placeholder:F,element:s,feedbackElement:f,frameTransform:p,transformOrigin:ce,width:v,height:y,top:b,left:x,widthOffset:oe,heightOffset:P,delta:pe,styles:S,dragOperation:r,getTranslate:()=>e.current.translate,getElementMutationObserver:()=>be,getSavedCellWidths:()=>Se,setSavedCellWidths:e=>{Se=e}}),we=new Pp(f);Ls(()=>r.shape=we);let Te=Gd(f),Ee=e=>{this.manager.actions.stop({event:e})},De=cf(Te);se&&Te.addEventListener(`resize`,Ee),Ls(()=>a.status)===`idle`&&requestAnimationFrame(()=>a.status=`dragging`),F&&(Ce.observe(F),be=nh(s,F,ie),xe=rh(s,F,f));let Oe=t.dragOperation.source?.id,ke=()=>{if(!se||Oe==null)return;let e=t.registry.draggables.get(Oe),n=e?.handle??e?.element;qd(n)&&n.focus()},Ae=()=>{be?.disconnect(),xe?.disconnect(),Ce.disconnect(),Te.removeEventListener(`resize`,Ee),Xf(f)&&(f.removeEventListener(`beforetoggle`,eh),f.removeAttribute(`popover`)),f.removeAttribute(Wm),S.reset();let t=()=>{if(Se&&th(s)){let e=Array.from(s.cells);for(let[t,n]of e.entries())n.style.width=Se[t]??``}a.status=`idle`;let t=e.current.translate!=null,n=r.status.dragging;F&&(!n&&t||F.parentElement!==f.parentElement)&&f.isConnected&&F.replaceWith(f),F?.remove()};f===this.overlay?setTimeout(t,0):t()},je=n?.dropAnimation,Me=this,Ne=Fc(()=>{let{transform:t,status:i}=r;if((t.x||t.y||e.current.translate)&&i.dragging){let i=d.translate??{x:0,y:0},a={x:t.x/p.scaleX+i.x,y:t.y/p.scaleY+i.y},o=e.current.translate,s=Ls(()=>r.modifiers),c=Ls(()=>r.shape?.current),l=n?.keyboardTransition,u=se&&!De&&l!==null?`${l?.duration??250}ms ${l?.easing??`cubic-bezier(0.25, 1, 0.5, 1)`}`:`0ms linear`;if(S.set({transition:M?`${M}, translate ${u}`:`translate ${u}`,translate:`${a.x}px ${a.y}px 0`},Um),be?.takeRecords(),c&&c!==we&&o&&!s.length){let e=kl.delta(a,o);r.shape=Al.from(c.boundingRectangle).translate(e.x*p.scaleX,e.y*p.scaleY)}else r.shape=new Pp(f);e.current.translate=a}},function(){if(r.status.dropped){this.dispose(),a.status=`dropping`;let n=c?.dropAnimation===void 0?Me.dropAnimation===void 0?je:Me.dropAnimation:c.dropAnimation,r=e.current.translate,i=r!=null;if(!r&&s!==f&&(r={x:0,y:0}),!r||n===null){Ae();return}t.renderer.rendering.then(()=>{sh({source:a,element:s,feedbackElement:f,placeholder:F,translate:r,moved:i,transition:w,alignment:a.alignment,styles:S,animation:n??void 0,getElementMutationObserver:()=>be,cleanup:Ae,restoreFocus:ke})})}});return()=>{Ae(),Ne()}},hm(uh,4,`overlay`,ch,hh,dh),pm(uh,hh),hh.configure=lu(hh);var gh=!0,_h=!1,vh,yh,bh=[V],xh=yp.Forward,Sh,Ch,wh;yh=(vh=[V],yp.Reverse);var Th=class{constructor(){vm(this,Ch,mm(Sh,8,this,gh)),mm(Sh,11,this),vm(this,wh,mm(Sh,12,this,gh)),mm(Sh,15,this)}isLocked(e){return e===yp.Idle?!1:e==null?this[yp.Forward]===gh&&this[yp.Reverse]===gh:this[e]===gh}unlock(e){e!==yp.Idle&&(this[e]=_h)}};Sh=lm(null),Ch=new WeakMap,wh=new WeakMap,hm(Sh,4,xh,bh,Th,Ch),hm(Sh,4,yh,vh,Th,wh),pm(Sh,Th);var Eh=[yp.Forward,yp.Reverse],Dh=class{constructor(){this.x=new Th,this.y=new Th}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},Oh=class extends hu{constructor(e){super(e);let t=qs(new Dh),n=null;this.signal=t,rc(()=>{let{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new Dh;return}let{delta:i}=e.dragOperation.position;if(n){let e={x:kh(i.x,n.x),y:kh(i.y,n.y)},r=t.peek();Ps(()=>{for(let t of Bl)for(let n of Eh)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function kh(e,t){return Math.sign(e-t)}var Ah,jh,Mh,Nh,Ph,Fh,Ih=class extends (jh=gu,Ah=[V],jh){constructor(e){super(e),vm(this,Nh,mm(Mh,8,this,!1)),mm(Mh,11,this),vm(this,Ph),vm(this,Fh,()=>{if(!$(this,Ph))return;let{element:e,by:t}=$(this,Ph);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return ym(this,Ph,void 0),!1;let{position:r}=this.manager.dragOperation,i=r?.current;if(i){let{by:r}=e??{},a=r?{x:Lh(r.x),y:Lh(r.y)}:void 0,o=a?void 0:this.scrollIntentTracker.current;if(o?.isLocked())return!1;for(let e of n){let n=op(e),s=cp(e,r,n);if(s.x||s.y){let{speed:s,direction:c}=Sp(e,i,a,t?.acceleration,t?.threshold,void 0,n);if(o)for(let e of Bl)o[e].isLocked(c[e])&&(s[e]=0,c[e]=0);if(c.x||c.y){let{x:t,y:n}=r??c,i=t*s.x,a=n*s.y;if(i||a){let t=$(this,Ph)?.by;if(this.autoScrolling&&t&&(t.x&&!i||t.y&&!a))continue;return ym(this,Ph,{element:e,by:{x:i,y:a}}),$f.schedule($(this,Fh)),!0}}}}}return ym(this,Ph,void 0),!1};let t=null,n=null,r=jc(()=>{let{position:n,source:r}=e.dragOperation;if(!n)return null;let i=ff(sf(r?.element),n.current);return i&&(t=i),i??t}),i=jc(()=>{let t=r.value,{documentElement:i}=Yd(t);if(!t||t===i){let{target:t}=e.dragOperation,r=t?.element;if(r){let e=fp(r,{excludeElement:!1});return n=e,e}}if(t){let e=fp(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<n?.size?n:(n=e,e)}return n=null,null},Mc);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new Oh(e),this.destroy=e.monitor.addEventListener(`dragmove`,t=>{!this.disabled&&!t.defaultPrevented&&zp(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};Mh=lm(jh),Nh=new WeakMap,Ph=new WeakMap,Fh=new WeakMap,hm(Mh,4,`autoScrolling`,Ah,Ih,Nh),pm(Mh,Ih);function Lh(e){return e>0?yp.Forward:e<0?yp.Reverse:yp.Idle}var Rh=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),zh=10,Bh=class extends hu{constructor(e,t){super(e,t);let n=e.registry.plugins.get(Ih);if(!n)throw Error(`AutoScroller plugin depends on Scroller plugin`);this.destroy=rc(()=>{if(this.disabled)return;let{position:t,status:r}=e.dragOperation;if(r.dragging){let e={acceleration:this.options?.acceleration,threshold:typeof this.options?.threshold==`number`?{x:this.options.threshold,y:this.options.threshold}:this.options?.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;let t=setInterval(()=>Rh.schedule(()=>n.scroll(void 0,e)),zh);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};Bh.configure=lu(Bh);var Vh=Bh;function Hh(e,t){let n=Wh(e.key);return t.some(e=>Wh(e)===n)}var Uh=new Set(`alt.altgraph.backspace.capslock.control.delete.end.enter.escape.home.insert.meta.pagedown.pageup.pause.printscreen.shift.space.tab.arrowdown.arrowleft.arrowright.arrowup.f1.f2.f3.f4.f5.f6.f7.f8.f9.f10.f11.f12`.split(`.`));function Wh(e){if(e===` `||e===`Spacebar`)return`space`;if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(e.length===1)return e.toLowerCase();let t=e.toLowerCase();return Uh.has(t)?t:e}var Gh=Object.freeze({offset:10,keyboardCodes:{start:[`Space`,`Enter`],cancel:[`Escape`],end:[`Space`,`Enter`,`Tab`],up:[`ArrowUp`],down:[`ArrowDown`],left:[`ArrowLeft`],right:[`ArrowRight`]},preventActivation(e,t){let n=t.handle??t.element;return e.target!==n}}),Kh,qh=class extends pd{constructor(e,t){super(e),this.manager=e,this.options=t,vm(this,Kh,[]),this.listeners=new gf,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented||!Rp(e.target)||t.disabled)return;let{keyboardCodes:r=Gh.keyboardCodes,preventActivation:i=Gh.preventActivation}=n??{};Hh(e,r.start)&&this.manager.dragOperation.status.idle&&(i?.(e,t)||this.handleStart(e,t,n))}}bind(e,t=this.options){return rc(()=>{let n=e.handle??e.element,r=n=>{zp(n)&&this.handleSourceKeyDown(n,e,t)};if(n)return n.addEventListener(`keydown`,r),()=>{n.removeEventListener(`keydown`,r)}})}handleStart(e,t,n){let{element:r}=t;if(!r)throw Error(`Source draggable does not have an associated element`);e.preventDefault(),e.stopImmediatePropagation(),Cp(r);let{center:i}=new Pp(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let a=Yd(r),o=[this.listeners.bind(a,[{type:`keydown`,listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];$(this,Kh).push(...o)}handleKeyDown(e,t,n){let{keyboardCodes:r=Gh.keyboardCodes}=n??{};if(Hh(e,[...r.end,...r.cancel])){e.preventDefault();let t=Hh(e,r.cancel);this.handleEnd(e,t)}else Hh(e,r.up)?this.handleMove(`up`,e):Hh(e,r.down)&&this.handleMove(`down`,e),Hh(e,r.left)?this.handleMove(`left`,e):Hh(e,r.right)&&this.handleMove(`right`,e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){let{shape:n}=this.manager.dragOperation,r=t.shiftKey?5:1,i={x:0,y:0},a=this.options?.offset??Gh.offset;if(typeof a==`number`&&(a={x:a,y:a}),n){switch(e){case`up`:i={x:0,y:-a.y*r};break;case`down`:i={x:0,y:a.y*r};break;case`left`:i={x:-a.x*r,y:0};break;case`right`:i={x:a.x*r,y:0}}(i.x||i.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:i}))}}sideEffects(){let e=this.manager.registry.plugins.get(Vh);e?.disabled===!1&&(e.disable(),$(this,Kh).push(()=>{e.enable()}))}cleanup(){$(this,Kh).forEach(e=>e()),ym(this,Kh,[])}destroy(){this.cleanup(),this.listeners.clear()}};Kh=new WeakMap,qh.configure=lu(qh),qh.defaults=Gh;var Jh,Yh=class extends gd{constructor(){super(...arguments),vm(this,Jh)}onEvent(e){switch(e.type){case`pointerdown`:ym(this,Jh,ef(e));break;case`pointermove`:if(!$(this,Jh))return;let{x:t,y:n}=ef(e),r={x:t-$(this,Jh).x,y:n-$(this,Jh).y},{tolerance:i}=this.options;if(i&&Rl(r,i)){this.abort();return}Rl(r,this.options.value)&&this.activate(e);break;case`pointerup`:this.abort()}}abort(){ym(this,Jh,void 0)}};Jh=new WeakMap;var Xh,Zh,Qh=class extends gd{constructor(){super(...arguments),vm(this,Xh),vm(this,Zh)}onEvent(e){switch(e.type){case`pointerdown`:ym(this,Zh,ef(e)),ym(this,Xh,setTimeout(()=>this.activate(e),this.options.value));break;case`pointermove`:if(!$(this,Zh))return;let{x:t,y:n}=ef(e);Rl({x:t-$(this,Zh).x,y:n-$(this,Zh).y},this.options.tolerance)&&this.abort();break;case`pointerup`:this.abort()}}abort(){$(this,Xh)&&(clearTimeout($(this,Xh)),ym(this,Zh,void 0),ym(this,Xh,void 0))}};Xh=new WeakMap,Zh=new WeakMap;var $h=class{};$h.Delay=Qh,$h.Distance=Yh;var eg=Object.freeze({activationConstraints(e,t){let{pointerType:n,target:r}=e;if(n!==`mouse`||!Rp(r)||t.handle!==r&&!t.handle?.contains(r))return n===`touch`?[new $h.Delay({value:250,tolerance:5})]:Vp(r)&&!e.defaultPrevented?[new $h.Delay({value:200,tolerance:0})]:[new $h.Delay({value:200,tolerance:10}),new $h.Distance({value:5})]},preventActivation(e,t){let{target:n}=e;if(n===t.element||n===t.handle||!Rp(n)||t.handle?.contains(n))return!1;let r=hf(n);return r!==t.element&&!!r}}),tg,ng=class extends pd{constructor(e,t){super(e),this.manager=e,this.options=t,vm(this,tg,new Set),this.listeners=new gf,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){let{activationConstraints:r=eg.activationConstraints}=n??{};return typeof r==`function`?r(e,t):r}bind(e,t=this.options){return rc(()=>{let n=new AbortController,{signal:r}=n,i=n=>{Bp(n)&&this.handlePointerDown(n,e,t)},a=[e.handle??e.element];t?.activatorElements&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(let e of a)e&&(cg(e.ownerDocument.defaultView),e.addEventListener(`pointerdown`,i,{signal:r}));return()=>n.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||e.button!==0||!Rp(e.target)||t.disabled||ig(e)||!this.manager.dragOperation.status.idle)return;let{preventActivation:r=eg.preventActivation}=n??{};if(r?.(e,t))return;let{target:i}=e,a=qd(i)&&i.draggable&&i.getAttribute(`draggable`)===`true`,o=pp(t.element),{x:s,y:c}=ef(e);this.initialCoordinates={x:s*o.scaleX+o.x,y:c*o.scaleY+o.y};let l=this.activationConstraints(e,t,n);e.sensor=this;let u=new md(l,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let{pointerId:d}=e,f=e=>t=>{t.pointerId===d&&e(t)},p=nf(),m=this.listeners.bind(p,[{type:`pointermove`,listener:f(e=>this.handlePointerMove(e,t))},{type:`pointerup`,listener:f(this.handlePointerUp),options:{capture:!0}},{type:`pointercancel`,listener:f(this.handleCancel)},{type:`dragstart`,listener:a?this.handleCancel:ag,options:{capture:!0}}]);$(this,tg).add(()=>{m(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n;this.controller?.activated===!1&&((n=this.controller)==null||n.onEvent(e));let{status:r}=this.manager.dragOperation;if(r.initializing||r.dragging){let n=ef(e),i=pp(t.element);n.x=n.x*i.scaleX+i.x,n.y=n.y*i.scaleY+i.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,r.dragging&&$f.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let n=!t.initialized,r=Yd(e.target),i=r.defaultView;if(!n&&i){let e=e=>{e.target===r.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};i.addEventListener(`click`,e,!0),i.setTimeout(()=>{i.removeEventListener(`click`,e,!0)},0)}this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){e.key===`Escape`&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle||t.defaultPrevented)return;let i=n.actions.start({coordinates:r,event:t,source:e});if(i.signal.aborted)return this.cleanup();t.preventDefault();let a=Yd(t.target).body;try{a.setPointerCapture(t.pointerId)}catch{this.handleCancel(t);return}let o=Rp(t.target)?[t.target,a]:a,s=this.listeners.bind(o,[{type:`touchmove`,listener:ag,options:{passive:!1}},{type:`click`,listener:ag},{type:`contextmenu`,listener:ag},{type:`keydown`,listener:this.handleKeyDown}]);$(this,tg).add(s),n.renderer.rendering.then(()=>{!i.signal.aborted&&n.dragOperation.status.dragging&&$f.schedule(this.handleMove)})}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},$(this,tg).forEach(e=>e()),$(this,tg).clear()}destroy(){this.cleanup(),this.listeners.clear()}};tg=new WeakMap,ng.configure=lu(ng),ng.defaults=eg;var rg=ng;function ig(e){return`sensor`in e}function ag(e){e.preventDefault()}function og(){}var sg=new WeakSet;function cg(e){e&&!sg.has(e)&&(e.addEventListener(`touchmove`,og,{capture:!1,passive:!1}),sg.add(e))}var lg,ug,dg,fg,pg,mg,hg=class extends (dg=Bu,ug=[V],lg=[V],dg){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:a}=n,o=cm(n,[`element`,`effects`,`handle`]);super(am({effects:()=>[...i(),()=>{let{manager:e}=this;if(!e)return;let t=(this.sensors?.map(uu)??[...e.sensors]).map(t=>{let n=t instanceof pd?t:e.registry.register(t.plugin),r=t instanceof pd?void 0:t.options;return n.bind(this,r)});return function(){t.forEach(e=>e())}}]},o),t),vm(this,pg,mm(fg,8,this)),mm(fg,11,this),vm(this,mg,mm(fg,12,this)),mm(fg,15,this),this.element=r,this.handle=a}};fg=lm(dg),pg=new WeakMap,mg=new WeakMap,hm(fg,4,`handle`,ug,hg,pg),hm(fg,4,`element`,lg,hg,mg),pm(fg,hg);var gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg=class extends (vg=$u,_g=[V],gg=[V],vg){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,a=cm(n,[`element`,`effects`]);let{collisionDetector:o=qp}=a,s=e=>{let{manager:t,element:n}=this;if(!n||e===null){this.shape=void 0;return}if(!t)return;let r=new Pp(n),i=Ls(()=>this.shape);return r&&i?.equals(r)?i:(this.shape=r,r)},c=qs(!1);super(om(am({},a),{collisionDetector:o,effects:()=>[...i(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:n}=t,{source:r}=n;c.value=!!(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{let{element:e}=this;if(c.value&&e){let t=new Yf(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{if(this.manager?.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),vm(this,wg),vm(this,bg,mm(yg,8,this)),mm(yg,11,this),vm(this,Tg,mm(yg,12,this)),mm(yg,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){ym(this,wg,e,Cg)}get element(){return this.proxy??$(this,wg,Sg)}};yg=lm(vg),bg=new WeakMap,wg=new WeakSet,Tg=new WeakMap,xg=hm(yg,20,`#element`,_g,wg,bg),Sg=xg.get,Cg=xg.set,hm(yg,4,`proxy`,gg,Eg,Tg),pm(yg,Eg);var Dg=`focus-visible:outline-1 focus-visible:outline-solid focus-visible:outline-hub-focus-ring`,Og=`peer-focus-visible:outline-1 peer-focus-visible:outline-solid peer-focus-visible:outline-offset-2 peer-focus-visible:outline-hub-focus-ring`,kg={Root:B(`inline-flex items-center justify-center gap-1.5`,`box-border select-none whitespace-nowrap rounded-full`,`border-(length:--hub-hairline) border-solid border-transparent`,`font-sans font-medium leading-[normal]`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`),variants:{primary:`bg-hub-primary-solid text-hub-primary-contrast shadow-hub-xs enabled:hover:bg-hub-primary-solid-hover focus-visible:outline-offset-2`,secondary:B(`relative bg-hub-bg-panel text-hub-fg-control shadow-hub-sm focus-visible:outline-offset-0`,`enabled:hover:bg-hub-bg-hover enabled:hover:shadow-none`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] enabled:hover:after:shadow-hub-sm-hover`),ghost:`bg-transparent text-hub-fg-control enabled:hover:bg-hub-bg-hover focus-visible:outline-offset-0`,danger:`bg-hub-error-solid text-hub-error-contrast shadow-hub-xs enabled:hover:bg-hub-error-solid-hover focus-visible:outline-offset-2`},sizes:{sm:`h-6 px-2 text-hub-sm`,md:`h-7 px-2.5 text-hub-sm`,lg:`h-8 px-3 text-hub-md`}};function Ag({variant:e=`primary`,size:t=`md`,type:n=`button`,className:r,...i}){return(0,R.jsx)(`button`,{...i,type:n,className:B(kg.Root,kg.variants[e],kg.sizes[t],r)})}var jg={Root:B(`inline-grid flex-none select-none place-items-center rounded-full border-0 focus-visible:outline-offset-0`,`transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-pressed:bg-hub-bg-muted aria-pressed:text-hub-fg-title aria-pressed:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`,`aria-pressed:enabled:hover:bg-hub-bg-muted aria-pressed:enabled:hover:text-hub-fg-title aria-pressed:enabled:active:bg-hub-bg-muted`,`aria-pressed:enabled:hover:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`),sizes:{sm:`size-6 [&_svg]:size-3.5`,md:B(`size-7 [&_svg]:size-3.5`,`[&_.lucide-search]:scale-90 [&_.lucide-list-filter]:scale-95 [&_.lucide-square-pen]:scale-97`,`[&_.lucide-settings-2]:scale-x-115 [&_.lucide-settings-2]:scale-y-95 [&_.lucide-panel-right]:scale-x-105 [&_.lucide-panel-right]:scale-y-90`),lg:`size-8 [&_svg]:size-4`},variants:{surface:B(`bg-hub-bg-panel text-hub-fg-muted shadow-hub-sm`,`enabled:hover:bg-hub-bg-hover enabled:hover:text-hub-fg-control enabled:hover:shadow-hub-sm-hover enabled:active:bg-hub-bg-emphasized`),ghost:B(`bg-transparent text-hub-fg-secondary`,`enabled:hover:bg-hub-bg-overlay-hover enabled:hover:text-hub-fg-title enabled:active:bg-hub-bg-muted`)}};function Mg({className:e,size:t=`md`,type:n=`button`,variant:r=`surface`,pressed:i,...a}){return(0,R.jsx)(`button`,{...a,type:n,"aria-pressed":i,className:B(jg.Root,jg.sizes[t],jg.variants[r],e)})}var Ng={Root:`group/checkbox relative inline-flex size-3.5 flex-none align-middle`,Input:B(`peer absolute inset-0 z-(--hub-z-raised) m-0 size-full cursor-pointer opacity-0`,`disabled:cursor-default`),Surface:B(`pointer-events-none box-border grid size-full place-items-center rounded-hub-sm border border-solid`,`border-hub-border-strong bg-transparent text-hub-primary-contrast`,`transition-colors duration-(--hub-duration-fast) ease-out motion-reduce:transition-none`,`peer-checked:border-hub-primary-solid peer-checked:bg-hub-primary-solid`,`peer-indeterminate:border-hub-primary-solid peer-indeterminate:bg-hub-primary-solid`,`peer-[:enabled:hover]:border-hub-primary-solid-hover`,Og,`peer-disabled:opacity-50`),Check:`hidden [grid-area:1/1] group-has-[:checked:not(:indeterminate)]/checkbox:block`,Mixed:`hidden [grid-area:1/1] group-has-[:indeterminate]/checkbox:block`};function Pg({indeterminate:e=!1,className:t,ref:n,...r}){let i=(0,p.useRef)(null),a=(0,p.useCallback)(e=>{if(i.current=e,typeof n==`function`)return n(e);n&&(n.current=e)},[n]);return(0,p.useLayoutEffect)(()=>{i.current&&(i.current.indeterminate=e)},[e]),(0,R.jsxs)(`span`,{className:B(Ng.Root,t),children:[(0,R.jsx)(`input`,{...r,ref:a,type:`checkbox`,className:Ng.Input}),(0,R.jsxs)(`span`,{className:Ng.Surface,"aria-hidden":`true`,children:[(0,R.jsx)(ys,{className:Ng.Check,size:12,strokeWidth:2.5}),(0,R.jsx)(ks,{className:Ng.Mixed,size:12,strokeWidth:2.5})]})]})}var Fg={Root:`pointer-events-none block flex-none`,orientations:{horizontal:`h-(--hub-hairline) w-full`,vertical:`w-(--hub-hairline) self-stretch`},tones:{default:`bg-hub-border`,subtle:`bg-hub-border-subtle`}};function Ig(e,t,n,r){return t?{[e]:0,left:n,right:n,width:r??`auto`}:{[e]:0,top:n,bottom:n,height:r}}function Lg(e,t,n){let r=n===void 0?{}:{alignSelf:`center`};if(!e)return{marginBlock:t,height:n,...r};let i=t?`calc(100% - ${t*2}px)`:void 0;return{marginInline:t,width:n??i,...r}}function Rg({orientation:e=`horizontal`,tone:t=`default`,edge:n,inset:r=0,length:i,className:a,style:o,...s}){let c=n?n===`left`||n===`right`?`vertical`:`horizontal`:e,l=c===`horizontal`,u=n?Ig(n,l,r,i):Lg(l,r,i);return(0,R.jsx)(`span`,{...s,"aria-hidden":`true`,"data-divider":``,"data-orientation":c,"data-tone":t,"data-edge":n,className:B(Fg.Root,Fg.orientations[c],Fg.tones[t],n&&`absolute`,a),style:{...u,...o}})}var zg=`pointer-events-none absolute inset-y-0 left-[calc((var(--hub-hit-area)_-_1px)_/_2)]`,Bg={Root:B(`group/resize absolute z-(--hub-z-raised) w-(--hub-hit-area) touch-none select-none cursor-col-resize outline-none`),edges:{left:`left-[calc(var(--hub-hit-area)_/_-2)]`,right:`right-[calc(var(--hub-hit-area)_/_-2)]`},Line:B(zg,`[&]:bg-hub-border-control`),Feedback:B(zg,`w-px origin-left scale-x-50 overflow-hidden bg-hub-border-control opacity-0`,`[mask-image:linear-gradient(transparent,black_10%,black_90%,transparent)]`,`transition-opacity duration-(--hub-duration-slow) ease-in-out motion-reduce:transition-none`,`group-hover/resize:opacity-100 group-data-[dragging=true]/resize:opacity-100`,`group-focus-visible/resize:opacity-100`),Gradient:B(`absolute -top-1/2 left-0 h-[200%] w-full bg-hub-fg`,`[mask-image:linear-gradient(transparent_5%,black_40%,black_60%,transparent_95%)]`),DragShield:`fixed inset-0 z-(--hub-z-overlay) cursor-col-resize`};function Vg({label:e,controls:t,value:n,min:r,max:i,defaultValue:a,step:o=16,showDivider:s=!0,inset:c=0,edge:l=`right`,onChange:u,className:d,style:f,...m}){let h=l===`right`?1:-1,g=(0,p.useRef)(void 0),_=(0,p.useRef)(null),v=e=>{let t=e.currentTarget.getBoundingClientRect();_.current&&(_.current.style.transform=`translateY(${e.clientY-t.top-t.height/2}px)`)},[y,b]=(0,p.useState)(!1),x=e=>u(Math.max(r,Math.min(i,e)));return(0,R.jsxs)(`div`,{...m,role:`separator`,"aria-label":e,"aria-controls":t,"aria-orientation":`vertical`,"aria-valuemin":r,"aria-valuemax":i,"aria-valuenow":n,tabIndex:0,className:B(Bg.Root,Bg.edges[l],d),style:{insetBlock:c,...f},"data-resize-handle":!0,"data-dragging":y,onDoubleClick:()=>{a!==void 0&&x(a)},onKeyDown:e=>{let t={Home:r,End:i,ArrowLeft:n-o*h,ArrowRight:n+o*h}[e.key];t!==void 0&&(e.preventDefault(),e.stopPropagation(),x(t))},onPointerEnter:v,onPointerDown:e=>{e.button===0&&e.isPrimary&&!g.current&&(e.preventDefault(),v(e),e.currentTarget.focus(),e.currentTarget.setPointerCapture(e.pointerId),g.current={pointerId:e.pointerId,x:e.clientX,width:n},b(!0))},onPointerMove:e=>{v(e);let t=g.current;t?.pointerId===e.pointerId&&x(t.width+(e.clientX-t.x)*h)},onPointerUp:e=>{g.current?.pointerId===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),g.current=void 0,b(!1))},onLostPointerCapture:()=>{g.current=void 0,b(!1)},onPointerCancel:()=>{g.current=void 0,b(!1)},children:[s&&(0,R.jsx)(Rg,{orientation:`vertical`,className:Bg.Line}),(0,R.jsx)(`span`,{"aria-hidden":!0,className:Bg.Feedback,children:(0,R.jsx)(`span`,{ref:_,className:Bg.Gradient})}),y?(0,R.jsx)(`div`,{"aria-hidden":!0,className:Bg.DragShield}):null]})}var Hg={Viewport:B(`fixed bottom-6 right-6 z-(--hub-z-toast)`,`flex max-w-[calc(100vw_-_var(--hub-float-gutter)_*_2)] flex-col items-end gap-2`),Root:B(`max-w-full`,`animate-[hub-toast-in_var(--hub-duration-enter)_ease]`,`data-closing:pointer-events-none data-closing:animate-[hub-toast-out_var(--hub-duration-exit)_ease_forwards]`,`motion-reduce:animate-none motion-reduce:data-closing:animate-none`),Card:B(`relative box-border flex w-96 max-w-[min(100%,calc(100vw_-_var(--hub-float-gutter)_*_2))] items-start gap-2`,`rounded-hub-lg border-(length:--hub-hairline) border-solid border-transparent bg-hub-bg-panel p-3`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]`,`after:shadow-hub-md after:ring-(length:--hub-hairline) after:ring-hub-border-subtle`,`font-sans text-hub-md leading-4 text-hub-fg-muted antialiased`),icons:{info:B(`size-4 shrink-0 text-hub-fg-muted [&_circle]:fill-current`,`[&_path]:stroke-hub-bg-panel [&_line]:stroke-hub-bg-panel`),success:B(`grid size-4 shrink-0 place-items-center rounded-full`,`bg-hub-success-solid text-hub-success-contrast`),error:`size-4 shrink-0 text-hub-error-solid`},Content:`min-w-0 flex-1 break-words`,Message:`font-medium leading-[normal] text-hub-fg-title`,Description:`mt-2 line-clamp-2 leading-5 text-hub-fg-muted`,Action:B(`mt-3 block cursor-pointer border-0 bg-transparent p-0`,`font-sans text-hub-md leading-5 text-hub-primary-solid`,`enabled:hover:underline`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`),Close:`-m-1 enabled:hover:bg-hub-bg-hover-subtle enabled:hover:text-hub-fg-control`};function Ug(e,t){return getComputedStyle(e).getPropertyValue(t).trim()}function Wg(e,t){return parseFloat(Ug(e,t))}function Gg(e,t){let n=Ug(e,t);return(n.endsWith(`ms`)?parseFloat(n):parseFloat(n)*1e3)||0}var Kg=()=>matchMedia(`(prefers-reduced-motion: reduce)`).matches;function qg({message:e,description:t,variant:n=`info`,action:r,duration:i=n===`error`?8e3:4e3,revision:a=0,closeLabel:o,onDismiss:s,className:c,onMouseEnter:l,onMouseLeave:u,onFocus:d,onBlur:f,...m}){let h=(0,p.useRef)(null),g=(0,p.useRef)(a),_=(0,p.useRef)(s);_.current=s;let[v,y]=(0,p.useState)(!1),[b,x]=(0,p.useState)(!1),[S,C]=(0,p.useState)(!1),[w,T]=(0,p.useState)(!1),E=v||b;(0,p.useEffect)(()=>{if(g.current===a)return;g.current=a,T(!1);let e=h.current;if(!e||Kg())return;let t=e.animate([{transform:`scale(1)`,easing:`ease-out`,offset:0},{transform:`scale(1.05)`,easing:`linear`,offset:.125},{transform:`scale(1.05)`,easing:`ease-in-out`,offset:.25},{transform:`scale(1)`,offset:1}],{duration:Gg(e,`--hub-duration-emphasis`)});return()=>t.cancel()},[a]),(0,p.useEffect)(()=>{if(!i||E||S)return;let e=setTimeout(()=>T(!0),i);return()=>clearTimeout(e)},[i,a,E,S]),(0,p.useEffect)(()=>{if(!w)return;let e=!1,t=h.current?.parentElement?.getAnimations()??[];return Promise.allSettled(t.map(e=>e.finished)).then(()=>{e||_.current()}),()=>{e=!0}},[w]);let D=async()=>{if(!S&&r){C(!0);try{await r.onClick(),T(!0)}finally{C(!1)}}};return(0,R.jsx)(`div`,{...m,className:B(Hg.Root,c),"data-closing":w||void 0,onMouseEnter:e=>{y(!0),l?.(e)},onMouseLeave:e=>{y(!1),u?.(e)},onFocus:e=>{x(!0),d?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||x(!1),f?.(e)},children:(0,R.jsxs)(`div`,{ref:h,className:Hg.Card,"data-variant":n,"data-expanded":!!(t||r)||void 0,children:[(0,R.jsx)(`span`,{className:Hg.icons[n],children:n===`success`?(0,R.jsx)(ys,{size:11,strokeWidth:3,"aria-hidden":!0}):n===`error`?(0,R.jsx)(Ts,{size:16,"aria-hidden":!0}):(0,R.jsx)(Ds,{size:16,"aria-hidden":!0})}),(0,R.jsxs)(`div`,{className:Hg.Content,children:[(0,R.jsx)(`div`,{role:n===`error`?`alert`:`status`,"aria-atomic":`true`,className:Hg.Message,children:e}),t&&(0,R.jsx)(`div`,{className:Hg.Description,children:t}),r&&(0,R.jsx)(`button`,{type:`button`,className:Hg.Action,disabled:S,onClick:()=>void D(),children:r.label})]}),(0,R.jsx)(Mg,{variant:`ghost`,size:`sm`,className:Hg.Close,"aria-label":o,disabled:S,onClick:()=>T(!0),children:(0,R.jsx)(js,{"aria-hidden":!0})})]})})}function Jg({store:e,closeLabel:t,className:n,...r}){let i=(0,p.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot);return i.length===0?null:(0,R.jsx)(`div`,{role:`region`,...r,className:B(Hg.Viewport,n),children:i.map(({id:n,options:{onClose:r,...i},revision:a})=>(0,R.jsx)(qg,{...i,revision:a,closeLabel:t,onDismiss:()=>e.dismiss(n)},n))})}var Yg=(e,t)=>e.message===t.message&&e.description===t.description&&(e.variant??`info`)===(t.variant??`info`)&&!e.action&&!t.action,Xg=class{items=[];listeners=new Set;max;nextId=0;constructor(e={}){this.max=Math.max(1,e.max??1)}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.items;show(e){let t=this.items.find(t=>Yg(t.options,e));if(t)return this.commit(this.items.map(n=>n===t?{...n,options:e,revision:n.revision+1}:n)),t.id;let n=`toast-${++this.nextId}`;return this.commit([...this.items,{id:n,options:e,revision:0}].slice(-this.max)),n}dismiss(e){let t=e===void 0?[]:this.items.filter(t=>t.id!==e);t.length!==this.items.length&&this.commit(t)}commit(e){let t=this.items.filter(t=>!e.some(({id:e})=>e===t.id));this.items=e;for(let e of[...this.listeners])e();for(let e of t)e.options.onClose?.()}};function Zg(e){return{gutter:Wg(e,`--hub-menu-gutter`),maxHeight:Wg(e,`--hub-menu-max-height`),affordance:Wg(e,`--hub-scroll-affordance`)}}function Qg({placement:e=`auto`,trigger:t,viewport:n,metrics:r,panelWidth:i,borderHeight:a,contentHeight:o,row:s}){let{gutter:c,maxHeight:l,affordance:u}=r,d=s?.height??t.height,f=s?.top??0,p=Math.min(Math.max(t.width,i),n.width-c*2),m=Math.max(c,Math.min(t.left,n.width-p-c)),h=t.top+t.height/2,g=f+d/2,_=h-g,v=Math.min(o,l,n.height-c*2);if(e===`bottom`){let e=Math.max(0,Math.min(v,n.height-t.bottom-c-a));return{placement:`below`,top:t.bottom,left:m,width:p,maxHeight:e,scrollTop:Math.max(0,g-e/2)}}if(h-c>=u+d/2&&n.height-c-h>=u+d/2){let e=Math.max(c,_),t=Math.min(v,o-Math.max(0,e-_)),r=Math.min(t,n.height-c-e),i=s?.hasNext?u:o-(f+d);return h-e>r-i-d/2&&(e=h-r+i+d/2),{placement:`aligned`,top:e,left:m,width:p,maxHeight:Math.max(d,r),scrollTop:Math.max(0,g-(h-e))}}let y=n.height-t.bottom-c,b=t.top-c,x=y>=v||y>=b,S=Math.min(v,x?y:b),C=Math.max(d,S),w=x?t.bottom:t.top-Math.min(o,C)-a;return{placement:x?`below`:`above`,top:w,left:m,width:p,maxHeight:C,scrollTop:Math.max(0,g-S/2)}}var $g={Root:`inline-flex min-w-0 align-middle`,Trigger:B(`relative inline-flex min-w-0 items-center gap-2 box-border cursor-default`,`rounded-(--hub-radius-md) border-(length:--hub-hairline) border-solid border-transparent shadow-hub-sm`,`bg-hub-bg-panel text-hub-fg-control font-sans font-normal`,`px-2.5 outline-none focus-visible:outline-offset-0 enabled:hover:bg-hub-bg-hover enabled:hover:shadow-none aria-expanded:bg-hub-bg-muted`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] enabled:hover:after:shadow-hub-sm-hover`,`disabled:opacity-50 disabled:pointer-events-none`,Dg),Size:{small:`h-(--hub-control-height-sm) text-hub-sm`,default:`h-(--hub-control-height-md) text-hub-md`},Font:{small:`text-hub-sm`,default:`text-hub-md`},Row:{small:`h-(--hub-control-height-sm)`,default:`h-(--hub-row-height-md)`},Label:`min-w-0 flex-1 truncate text-left`,Icon:`inline-flex shrink-0 items-center justify-center`,Chevron:B(`pointer-events-none h-2 w-2.5 shrink-0 scale-180 text-hub-fg-muted`,`[&>path]:origin-center [&>path]:scale-x-90 [&>path]:scale-y-80 [&>path]:stroke-[3.5]`),Check:`size-4 shrink-0 text-hub-fg-muted`,Popup:B(`fixed inset-auto m-0 p-0 box-border w-max max-w-[calc(100vw-var(--hub-menu-gutter)*2)]`,`overflow-hidden rounded-hub-lg border-0 bg-hub-bg-panel text-hub-fg-control outline-none`,`ring-(length:--hub-hairline) ring-hub-border-control shadow-hub-md`,`font-sans font-normal`),List:`relative box-border overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,Option:B(`relative flex box-border cursor-default items-center gap-2 px-2 aria-[selected=false]:pe-8 rounded-(--hub-radius-md)`,`whitespace-nowrap outline-none data-active:bg-hub-bg-hover aria-disabled:opacity-40`,`[&>.lucide-check>path]:origin-center [&>.lucide-check>path]:scale-x-80 [&>.lucide-check>path]:scale-y-89 [&>.lucide-check>path]:translate-y-px`,`[&>.lucide-check>path]:[vector-effect:non-scaling-stroke] [&>.lucide-check>path]:stroke-[1.5]`),Scroll:B(`absolute inset-x-0 z-(--hub-z-raised) flex h-(--hub-scroll-affordance) items-center justify-center`,`cursor-default text-hub-fg-muted backdrop-blur-sm`),ScrollTop:`top-0 bg-linear-to-b from-hub-bg-panel via-hub-bg-panel/90 to-hub-bg-panel/50`,ScrollBottom:`bottom-0 bg-linear-to-t from-hub-bg-panel via-hub-bg-panel/90 to-hub-bg-panel/50`},e_=e=>e.scrollTop<=1,t_=e=>e.scrollTop+e.clientHeight>=e.scrollHeight-1;function n_(e){let[t,n]=(0,p.useState)({top:!1,bottom:!1}),r=(0,p.useRef)(void 0),i=()=>{let t=e.current;if(!t)return;let r=!e_(t),i=!t_(t);n(e=>e.top===r&&e.bottom===i?e:{top:r,bottom:i})},a=()=>{clearInterval(r.current),r.current=void 0};return(0,p.useEffect)(()=>a,[]),{edges:t,update:i,start:t=>{a();let n=t===`top`?-1:1;r.current=setInterval(()=>{let t=e.current;t?(t.scrollBy({top:n*4}),(n<0?t.scrollTop<=0:t_(t))&&a()):a()},16)},stop:a}}function r_({value:e,defaultValue:t,onValueChange:n,trigger:r,form:i}){let[a,o]=(0,p.useState)(t??``),s=e!==void 0,c=e??a;return(0,p.useEffect)(()=>{let e=r.current?.form;if(!e||s)return;let n=new Set,i=e=>{let r=setTimeout(()=>{n.delete(r),e.defaultPrevented||o(t??``)});n.add(r)};return e.addEventListener(`reset`,i),()=>{e.removeEventListener(`reset`,i),n.forEach(clearTimeout)}},[s,t,i,r]),{current:c,commit:e=>{s||o(e),e!==c&&n?.(e)}}}var i_=new Set([`ArrowDown`,`ArrowUp`,`Enter`,` `]),a_=new Set([`ArrowDown`,`ArrowUp`,`Home`,`End`,`Enter`,` `,`Escape`]),o_=[{side:`top`,className:$g.ScrollTop,Icon:Cs},{side:`bottom`,className:$g.ScrollBottom,Icon:xs}];function s_({icon:e,label:t}){return(0,R.jsxs)(R.Fragment,{children:[e&&(0,R.jsx)(`span`,{className:$g.Icon,children:e}),(0,R.jsx)(`span`,{className:$g.Label,children:t})]})}function c_({options:e,value:t,defaultValue:n,onValueChange:r,size:i=`default`,placement:a=`auto`,placeholder:o=`请选择`,name:s,disabled:c,className:l,onKeyDown:u,onClick:d,...f}){let m=(0,p.useRef)(null),h=(0,p.useRef)(null),g=(0,p.useRef)(null),_=(0,p.useRef)(void 0),{current:v,commit:y}=r_({value:t,defaultValue:n,onValueChange:r,trigger:m,form:f.form}),b=n_(g),[x,S]=(0,p.useState)(!1),[C,w]=(0,p.useState)(-1),T=(0,p.useId)(),E=e.findIndex(e=>e.value===v),D=e[E],O=c||!e.length,ee=e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),k=e.map(e=>[e.value,e.label,+!!e.disabled].join(`\0`)).join(``),A=()=>{b.stop(),S(!1)},te=(e=!0)=>{A(),h.current?.matches(`:popover-open`)&&h.current.hidePopover(),e&&m.current?.focus({preventScroll:!0})},ne=t=>{let n=e[t];n&&!n.disabled&&(y(n.value),te())},j=e=>{w(e);let t=g.current,n=t?.children[e];if(!t||!n)return;let r=_.current?.affordance??0,i=n.offsetTop;i<t.scrollTop+r?t.scrollTop=Math.max(0,i-r):i+n.offsetHeight>t.scrollTop+t.clientHeight-r&&(t.scrollTop=i+n.offsetHeight-t.clientHeight+r),b.update()},M=e=>{let{key:t}=e;if(!x)i_.has(t)&&(e.preventDefault(),S(!0));else if(t===`Tab`)te();else if(a_.has(t)){if(e.preventDefault(),e.stopPropagation(),t===`Escape`)te();else if(t===`Enter`||t===` `)ne(C);else if(t===`Home`)j(ee[0]??-1);else if(t===`End`)j(ee.at(-1)??-1);else{let e=ee.indexOf(C)+(t===`ArrowDown`?1:-1);j(ee[Math.max(0,Math.min(ee.length-1,e))]??-1)}}},N=e=>{d?.(e),!e.defaultPrevented&&(x?te():S(!0))},re=e=>{u?.(e),e.defaultPrevented||M(e)},ie=e=>{e.newState===`closed`&&A()};return(0,p.useLayoutEffect)(()=>{if(!x||O)return;let e=h.current,t=g.current;e.showPopover(),e.style.visibility=`hidden`,e.style.width=``,t.style.maxHeight=``,t.scrollTop=0;let n=D&&!D.disabled?E:ee[0]??-1;w(n),_.current=Zg(e);let r=t.children[Math.max(0,n)],i=e.getBoundingClientRect(),o=Qg({placement:a,trigger:m.current.getBoundingClientRect(),viewport:{width:window.innerWidth,height:window.innerHeight},metrics:_.current,panelWidth:i.width,borderHeight:i.height-t.getBoundingClientRect().height,contentHeight:t.scrollHeight,row:r&&{top:r.offsetTop,height:r.offsetHeight,hasNext:!!r.nextElementSibling}});return e.dataset.placement=o.placement,e.style.top=`${o.top}px`,e.style.left=`${o.left}px`,e.style.width=`${o.width}px`,t.style.maxHeight=`${o.maxHeight}px`,t.scrollTop=o.scrollTop,e.style.visibility=``,e.focus({preventScroll:!0}),b.update(),b.stop},[x,O,k,a]),(0,p.useEffect)(()=>{if(!x||O)return;let e=h.current,t=()=>te(!1),n=n=>{e.contains(n.target)||t()};return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,n,!0)}},[x,O]),(0,p.useEffect)(()=>{O&&te(!1)},[O]),(0,R.jsxs)(`span`,{className:$g.Root,children:[s&&(0,R.jsx)(`input`,{type:`hidden`,name:s,form:f.form,value:v,disabled:O}),(0,R.jsxs)(`button`,{...f,ref:m,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":x,"aria-controls":T,disabled:O,className:B($g.Trigger,$g.Size[i],l),"data-size":i,onClick:N,onKeyDown:re,children:[(0,R.jsx)(s_,{icon:D?.icon,label:D?.label??o}),(0,R.jsx)(xs,{className:$g.Chevron,"aria-hidden":`true`})]}),(0,R.jsxs)(`div`,{ref:h,popover:`auto`,id:T,role:`listbox`,tabIndex:-1,"aria-label":f[`aria-label`],"aria-labelledby":f[`aria-labelledby`],"aria-activedescendant":C>=0?`${T}-${C}`:void 0,className:B($g.Popup,$g.Font[i]),"data-size":i,onKeyDown:M,onToggle:ie,children:[(0,R.jsx)(`div`,{ref:g,className:$g.List,onScroll:b.update,children:e.map((e,t)=>(0,R.jsxs)(`div`,{id:`${T}-${t}`,role:`option`,"aria-selected":v===e.value,"aria-disabled":e.disabled||void 0,"data-active":C===t||void 0,"data-value":e.value,className:B($g.Option,$g.Row[i]),onPointerMove:n=>{(n.movementX||n.movementY)&&w(e.disabled?-1:t)},onClick:()=>ne(t),children:[(0,R.jsx)(s_,{icon:e.icon,label:e.label}),v===e.value&&(0,R.jsx)(ys,{className:$g.Check,"aria-hidden":`true`})]},e.value))}),o_.map(({side:e,className:t,Icon:n})=>b.edges[e]&&(0,R.jsx)(`div`,{"aria-hidden":`true`,className:B($g.Scroll,t),onPointerEnter:()=>b.start(e),onPointerLeave:b.stop,onPointerDown:e=>e.preventDefault(),children:(0,R.jsx)(n,{className:$g.Check})},e))]})]})}var l_=[`Control`,`Alt`,`Shift`,`Meta`],u_={"⌘":`meta`,cmd:`meta`,command:`meta`,meta:`meta`,ctrl:`control`,control:`control`,"⌃":`control`,alt:`alt`,option:`alt`,"⌥":`alt`,shift:`shift`,"⇧":`shift`,esc:`escape`,escape:`escape`,enter:`enter`,return:`enter`,"↵":`enter`,space:` `,spacebar:` `,"␣":` `,"↑":`arrowup`,"↓":`arrowdown`,"←":`arrowleft`,"→":`arrowright`},d_=new Set([`process`,`dead`,`unidentified`]);function f_(e){let t=e.toLowerCase();return u_[t.trim()]??t}var p_=class{coordinator;host;hover=!1;popupHover=!1;focus=!1;shortcut=!1;disabled=!1;openTimer;closeTimer;constructor(e,t){this.coordinator=e,this.host=t}get wanted(){return!this.disabled&&(this.hover||this.popupHover||this.focus)}delay(e){let t=this.host.trigger();return t?Gg(t,e):0}clearClose(){window.clearTimeout(this.closeTimer),this.closeTimer=void 0}enter(){this.hover=!0,this.coordinator.request(this,!1)}leave(){this.hover=!1,this.coordinator.release(this,!0)}popupEnter(){this.popupHover=!0,this.coordinator.request(this,!1)}popupLeave(){this.popupHover=!1,this.coordinator.release(this,!0)}focusIn(){this.focus=!0,this.coordinator.request(this,!0)}focusOut(){this.focus=!1,this.coordinator.release(this,!1)}dismiss(){this.coordinator.dismiss(this)}setDisabled(e){this.disabled=e,e&&this.dismiss()}setShortcut(e){this.shortcut!==e&&(this.shortcut=e,this.coordinator.countShortcut(e?1:-1))}isPressed(e){return this.coordinator.isPressed(e)}dispose(){this.coordinator.unregister(this)}},m_=class{document;onEmpty;handles=new Set;visible=null;pending=null;skipUntil=0;shortcuts=0;modifiers=new Set;keys=new Map;composing=!1;constructor(e,t){this.document=e,this.onEmpty=t}register(e){let t=new p_(this,e);return this.handles.size||this.listen(!0),this.handles.add(t),t}unregister(e){this.handles.delete(e)&&(this.dismiss(e),e.setShortcut(!1),!this.handles.size&&(this.listen(!1),this.skipUntil=0,this.onEmpty()))}request(e,t){e.wanted&&(this.visible===e?e.clearClose():t||this.visible||performance.now()<this.skipUntil?this.show(e):this.pending!==e&&(this.cancelPending(),this.pending=e,e.openTimer=window.setTimeout(()=>{this.pending===e&&(this.pending=null,this.handles.has(e)&&e.wanted&&this.show(e))},e.delay(`--hub-delay-open`))))}release(e,t){e.wanted||(this.pending===e&&this.cancelPending(),this.visible===e&&(e.clearClose(),t?e.closeTimer=window.setTimeout(()=>{e.wanted||this.hide(e)},e.delay(`--hub-duration-fast`)):this.hide(e)))}dismiss(e){e.hover=e.popupHover=e.focus=!1,this.pending===e&&this.cancelPending(),this.hide(e)}countShortcut(e){this.shortcuts+=e,this.shortcuts||this.clearKeys()}isPressed(e){let t=f_(e);if(this.modifiers.has(t))return!0;for(let e of this.keys.values())if(e===t)return!0;return!1}show(e){this.cancelPending();let t=this.visible;t!==e&&(this.visible=e,t&&(t.clearClose(),t.host.onOpenChange(!1)),e.host.onOpenChange(!0))}hide(e){e.clearClose(),this.visible===e&&(this.visible=null,this.skipUntil=performance.now()+e.delay(`--hub-delay-skip`),e.host.onOpenChange(!1))}cancelPending(){this.pending&&=(window.clearTimeout(this.pending.openTimer),null)}dismissAll(){this.pending&&this.dismiss(this.pending),this.visible&&this.dismiss(this.visible)}keyState(){return[...this.modifiers,``,...this.keys.values()].join(`\0`)}clearKeys(){(this.modifiers.size||this.keys.size)&&(this.modifiers.clear(),this.keys.clear(),this.visible?.host.onKeysChange())}onKey=e=>{if(!this.shortcuts)return;let t=this.keyState(),n=e.type===`keydown`,r=e.key.toLowerCase(),i=new Set;for(let t of l_)e.getModifierState(t)&&i.add(t.toLowerCase());let a=l_.some(e=>e.toLowerCase()===r);n&&a&&i.add(r),this.modifiers=i;let o=e.code||r;n?a||this.composing||e.isComposing||d_.has(r)||this.keys.set(o,r):(this.keys.delete(o),r===`meta`&&this.keys.clear()),this.keyState()!==t&&this.visible?.host.onKeysChange()};onComposition=e=>{this.composing=e.type===`compositionstart`,this.composing&&this.keys.size&&(this.keys.clear(),this.visible?.host.onKeysChange())};onScroll=e=>{let t=e.target;for(let e of new Set([this.pending,this.visible])){let n=e?.host.trigger();e&&n&&t.contains(n)&&(e===this.visible&&e.focus&&e.host.reposition()||this.dismiss(e))}};onResize=()=>this.dismissAll();onInactive=e=>{e.type===`visibilitychange`&&!this.document.hidden||e.type===`blur`&&e.target!==this.document.defaultView||(this.dismissAll(),this.skipUntil=0,this.composing=!1,this.clearKeys())};listen(e){let t=this.document.defaultView,n=(t,n,r)=>{e?t?.addEventListener(n,r,!0):t?.removeEventListener(n,r,!0)};n(this.document,`keydown`,this.onKey),n(this.document,`keyup`,this.onKey),n(this.document,`compositionstart`,this.onComposition),n(this.document,`compositionend`,this.onComposition),n(this.document,`visibilitychange`,this.onInactive),n(t,`blur`,this.onInactive),n(t,`resize`,this.onResize),n(t,`scroll`,this.onScroll),e||this.clearKeys()}},h_=new WeakMap;function g_(e,t){let n=h_.get(e);return n||(n=new m_(e,()=>h_.delete(e)),h_.set(e,n)),n.register(t)}var __={top:`bottom`,bottom:`top`,left:`right`,right:`left`};function v_({trigger:e,panel:t,margin:n,viewport:r,side:i,align:a,rtl:o}){let s=t.width+n*2,c=t.height+n*2,l={top:e.top,bottom:r.height-e.bottom,left:e.left,right:r.width-e.right},u=i===`top`||i===`bottom`,d=__[i],f=l[i]<(u?c:s)&&l[d]>l[i]?d:i,p=f===`top`?e.top-c:f===`bottom`?e.bottom:f===`left`?e.left-s:e.right,m=u?e.left:e.top,h=u?e.width:e.height,g=u?s:c,_=u&&o&&a!==`center`?a===`start`?`end`:`start`:a,v=_===`start`?m-n:_===`end`?m+h-g+n:m+(h-g)/2,y=(e,t)=>Math.round(Math.max(0,Math.min(e,t)));return{side:f,top:y(u?p:v,r.height-c),left:y(u?v:p,r.width-s)}}var y_={Popup:B(`fixed inset-auto m-1.5 box-border w-max border-(length:--hub-hairline) border-solid border-hub-border-panel px-2 py-1.25`,`max-w-[min(var(--hub-float-width),calc(100vw-var(--hub-float-gutter)))]`,`max-h-[calc(100vh-var(--hub-float-gutter))] overflow-x-hidden overflow-y-auto overscroll-contain`,`open:inline-flex items-center-safe gap-2`,`rounded-(--hub-radius-md) bg-hub-bg-panel text-hub-fg-control shadow-hub-xs`,`font-sans font-[450] text-hub-xs leading-normal text-left`,`transition-opacity duration-(--hub-duration-fast) starting:opacity-0 motion-reduce:transition-none`),Content:`min-w-0 whitespace-normal wrap-anywhere`,Keys:`-mr-0.5 inline-flex shrink-0 items-center gap-0.5`,Kbd:B(`inline-flex min-w-4.5 box-border items-center justify-center p-0.5`,`rounded-(--hub-radius-compact) border-(length:--hub-hairline) border-solid border-hub-border-panel`,`bg-transparent text-hub-fg-muted font-sans text-hub-xs font-normal leading-[1.1]`,`transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,`data-pressed:bg-hub-bg-emphasized`)};function b_(e,t){return n=>{e?.(n),t(n)}}function x_(e,t,n){let r=Math.max(t.top,0),i=Math.max(t.left,0),a=Math.min(t.bottom,n.height),o=Math.min(t.right,n.width);for(let t=e;t&&t!==e.ownerDocument.documentElement;t=t.parentElement){if(t!==e){let{overflowX:e,overflowY:n}=getComputedStyle(t);if(e!==`visible`||n!==`visible`){let s=t.getBoundingClientRect();n!==`visible`&&(r=Math.max(r,s.top),a=Math.min(a,s.bottom)),e!==`visible`&&(i=Math.max(i,s.left),o=Math.min(o,s.right))}}if(t.matches(`:popover-open, :modal, :fullscreen`))break}return a>r&&o>i}function S_({children:e,content:t,shortcut:n,side:r=`bottom`,align:i=`center`,disabled:a=!1}){let o=(0,p.useRef)(null),s=(0,p.useRef)(null),c=(0,p.useRef)(null),l=(0,p.useRef)(!1),u=(0,p.useRef)(()=>!1),[d,f]=(0,p.useState)(!1),[,m]=(0,p.useState)(0),h=(0,p.useId)(),g=e,_=g.props,v=n?.length?n:void 0,y=_.ref,b=(0,p.useCallback)(e=>{if(o.current=e,typeof y==`function`){let t=y(e);if(typeof t==`function`)return()=>{o.current=null,t()}}else y&&(y.current=e)},[y]);(0,p.useLayoutEffect)(()=>{u.current=()=>{let e=o.current,t=s.current;if(!e||!t)return!1;let n=e.ownerDocument.documentElement,a={width:n.clientWidth,height:n.clientHeight},c=e.getBoundingClientRect(),l=getComputedStyle(t),u=v_({trigger:c,panel:t.getBoundingClientRect(),margin:parseFloat(l.marginTop)||0,viewport:a,side:r,align:i,rtl:l.direction===`rtl`});return t.dataset.side=u.side,t.style.top=`${u.top}px`,t.style.left=`${u.left}px`,x_(e,c,a)}}),(0,p.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=g_(e.ownerDocument,{trigger:()=>o.current,onOpenChange:f,onKeysChange:()=>m(e=>e+1),reposition:()=>u.current()});return c.current=t,()=>{c.current=null,t.dispose()}},[]),(0,p.useLayoutEffect)(()=>{c.current?.setShortcut(!!v)},[!!v]),(0,p.useLayoutEffect)(()=>{c.current?.setDisabled(a)},[a]),(0,p.useLayoutEffect)(()=>{let e=s.current;if(!d||!e)return;e.showPopover(),u.current();let t=new ResizeObserver(()=>u.current());return t.observe(e),()=>{t.disconnect(),e.matches(`:popover-open`)&&e.hidePopover()}},[d]),(0,p.useLayoutEffect)(()=>{d&&u.current()},[r,i]);let x=a?_[`aria-describedby`]:[...new Set([..._[`aria-describedby`]?.split(/\s+/).filter(Boolean)??[],h])].join(` `),S=()=>{l.current=!1};return(0,R.jsxs)(R.Fragment,{children:[(0,p.cloneElement)(g,{ref:b,"aria-describedby":x,onPointerEnter:b_(_.onPointerEnter,e=>{e.pointerType!==`touch`&&c.current?.enter()}),onPointerLeave:b_(_.onPointerLeave,()=>{S(),c.current?.leave()}),onPointerDown:b_(_.onPointerDown,()=>{l.current=!0}),onPointerUp:b_(_.onPointerUp,S),onPointerCancel:b_(_.onPointerCancel,S),onFocus:b_(_.onFocus,e=>{!l.current&&e.target.matches(`:focus-visible`)&&c.current?.focusIn()}),onBlur:b_(_.onBlur,e=>{e.currentTarget.contains(e.relatedTarget)||c.current?.focusOut()}),onClick:b_(_.onClick,()=>c.current?.dismiss())}),!a&&(0,R.jsxs)(`span`,{ref:s,id:h,role:`tooltip`,popover:`manual`,tabIndex:-1,className:y_.Popup,onPointerEnter:()=>c.current?.popupEnter(),onPointerLeave:()=>c.current?.popupLeave(),children:[(0,R.jsx)(`span`,{className:y_.Content,children:t}),v&&(0,R.jsx)(`span`,{className:y_.Keys,children:v.map((e,t)=>(0,R.jsx)(`kbd`,{className:y_.Kbd,"data-pressed":d&&c.current?.isPressed(e)||void 0,children:e},t))})]})]})}B(`pointer-events-none box-border flex size-full items-center rounded-full bg-hub-bg-inactive p-0.75`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,`peer-checked:bg-hub-primary-solid peer-disabled:opacity-50`,Og,`peer-[:enabled:hover:not(:checked)]:bg-hub-bg-inactive-hover peer-[:enabled:hover:checked]:bg-hub-primary-solid-hover`),B(`block size-3.5 rounded-full bg-hub-primary-contrast`,`transition-transform duration-(--hub-duration-normal) motion-reduce:transition-none`,`group-has-[:checked]/switch:translate-x-2.5`,`group-has-[:enabled:hover]/switch:w-4 group-has-[:enabled:hover:checked]/switch:translate-x-2`),B(`fixed inset-auto z-(--hub-z-overlay) m-0 box-border max-w-[calc(100vw-2*var(--hub-menu-gutter))] overflow-y-auto`,`rounded-(--hub-radius-lg) border-(length:--hub-hairline) border-solid border-hub-border-panel bg-hub-bg-panel py-1.5`,`font-sans text-hub-md leading-normal text-hub-fg-control shadow-hub-md outline-none`),B(`w-(--hub-popup-width-md) px-0`,`[&_[role=separator]>[data-divider]]:mx-0! [&_[role=separator]>[data-divider]]:w-full!`,`[&_[role=separator]>[data-divider]]:bg-hub-border-subtle`),B(`relative isolate flex h-8 w-full shrink-0 items-center gap-2 border-0 bg-transparent text-left`,`font-sans text-hub-md font-[450] whitespace-nowrap outline-none`,`disabled:cursor-not-allowed disabled:opacity-40 aria-disabled:cursor-not-allowed aria-disabled:opacity-40`,`[&>svg]:size-4 [&>svg]:shrink-0 [&>span]:min-w-0 [&>span]:truncate`),B(`m-0 py-0 pl-3.5 pr-4.5 leading-[normal]`,`before:pointer-events-none before:absolute before:inset-y-0 before:inset-x-1.5 before:-z-1 before:rounded-(--hub-radius-md) before:content-['']`,`[&:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible)]:before:bg-hub-bg-muted`),B(`rounded-(--hub-radius-inner) pl-2.5 pr-3.5 leading-5`,`[&:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible)]:bg-hub-bg-muted`),B(`opacity-0 transition-[opacity,color,background-color] duration-(--hub-duration-fast) motion-reduce:transition-none`,`group-hover/sidebar-group:opacity-100 group-focus-within/sidebar-group:opacity-100 focus-visible:opacity-100`,`[@media(hover:none)]:opacity-100`),B(`mb-px box-border flex h-7 w-full flex-none items-center gap-1.5 rounded-(--hub-radius-md)`,`border-0 py-0 pl-2.5 pr-[9px] text-left font-sans text-hub-md font-medium leading-4 no-underline`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,`[&>svg]:size-4 [&>svg]:shrink-0 focus-visible:-outline-offset-1`,Dg,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50`),B(`relative data-[dragging=true]:opacity-50`,`data-[drop-edge]:after:pointer-events-none data-[drop-edge]:after:absolute data-[drop-edge]:after:inset-x-2.5`,`data-[drop-edge]:after:h-0.5 data-[drop-edge]:after:bg-hub-focus-ring`,`data-[drop-edge=top]:after:top-0 data-[drop-edge=bottom]:after:bottom-0`),B(`flex h-full min-w-0 flex-1 items-center gap-1.5 border-0 bg-transparent p-0 text-left text-inherit no-underline`,Dg),rg.configure({preventActivation:(e,t)=>{if(!(e.target instanceof Element))return!1;if(e.target.closest(`[data-sidebar-trailing], [role=menu]`))return!0;let n=e.target.closest(`button`);return!!n&&n!==t.element&&!n.hasAttribute(`data-sidebar-control`)}});var C_=`h-(--hub-row-height-md) rounded-(--hub-radius-md) border-(length:--hub-hairline) border-solid border-hub-border-control`,w_=B(`focus-within:outline-1 focus-within:outline-solid focus-within:-outline-offset-1`,`focus-within:outline-hub-focus-ring aria-invalid:focus-within:outline-hub-error-solid`),T_={Base:B(`box-border min-w-0 w-full bg-hub-bg-control font-sans text-hub-md font-normal text-hub-fg-title`,`outline-none transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,`aria-invalid:border-hub-error-solid disabled:cursor-not-allowed disabled:opacity-50`),Frame:C_,Focus:w_,Input:B(C_,w_,`block px-3 py-1.5 placeholder:text-hub-fg-placeholder`,`enabled:not-focus:not-aria-invalid:hover:border-hub-border-control-hover`)};B(T_.Base,T_.Frame,T_.Focus,`flex items-center`,`has-disabled:opacity-50 not-has-disabled:not-focus-within:not-aria-invalid:hover:border-hub-border-control-hover`),B(`inline-grid h-full shrink-0 place-items-center rounded-(--hub-radius-md) border-0 bg-transparent px-3`,`text-hub-fg-secondary focus-visible:-outline-offset-1 disabled:cursor-not-allowed`,Dg),B(T_.Base,T_.Focus,`block resize-y rounded-(--hub-radius-card) border-0 p-4`,`shadow-hub-sm placeholder:text-hub-fg-placeholder [&[rows="3"]]:min-h-30`,`aria-invalid:ring-1 aria-invalid:ring-hub-error-solid`),B(`relative m-0.5 flex h-7 min-w-0 flex-auto items-center justify-center gap-1.5 rounded-full border-(length:--hub-hairline) border-solid border-transparent px-3 py-1`,`bg-hub-bg-panel font-sans text-hub-sm font-medium leading-[normal] whitespace-nowrap text-hub-fg-muted`,`transition-[border,background-color,color] duration-(--hub-duration-normal)`,`before:absolute before:-inset-0.5 before:content-['']`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-hub-sm after:transition-shadow after:duration-(--hub-duration-normal) after:content-['']`,`aria-selected:bg-hub-bg-selected aria-selected:text-hub-fg-title aria-selected:after:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`,`[&:not([aria-selected=true]):enabled:hover]:bg-hub-bg-hover-subtle [&:not([aria-selected=true]):enabled:hover]:text-hub-fg-control`,`[&:not([aria-selected=true]):enabled:hover]:duration-0 [&:not([aria-selected=true]):enabled:hover]:after:duration-0`,`[&:not([aria-selected=true]):enabled:hover]:after:shadow-hub-sm-hover`,`focus:outline-none focus-visible:-outline-offset-1`,Dg,`disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none motion-reduce:after:transition-none`);var E_=ua(`notificationService`),D_=class extends Xg{},O_={ignoredBaseline:`baseline.ignored`,deleteBaseline:`baseline.delete`,module:{root:`module`,loading:`module.loading`,baseline:`view.baseline`,tasks:`view.tasks`,changes:`module.changes`,code:`module.code`,changelog:`module.changelog`,conformance:`module.conformance`,files:`module.files`,tooltip:e=>`module.tooltip.${e}`},conformance:{list:`conformance.list`,enabled:`conformance.enabled`,disabled:`conformance.disabled`,rule:e=>`conformance.rule.${e}`,readme:`conformance.readme`,state:`conformance.state`},changelog:{commits:`changelog.commits`,commit:e=>`changelog.commit.${e}`,review:e=>`changelog.review.${e}`,reviewCount:`changelog.reviewCount`,reviewFilter:`changelog.reviewFilter`,files:`changelog.files`,file:e=>`changelog.file.${e}`,detail:`changelog.detail`,empty:`changelog.empty`,editor:`changelog.editor`,scopes:`changelog.scopes`,entry:e=>`changelog.entry.${e}`,saveState:e=>`changelog.save.${e}`,retry:e=>`changelog.retry.${e}`,tag:e=>`changelog.tag.${e}`},files:{tree:`files.tree`,folderLoading:e=>`files.folderLoading.${e}`,file:e=>`files.file.${e}`,content:`files.content`,editor:`files.editor`,previous:`files.previous`,next:`files.next`},code:{tree:`code.tree`,scroll:`code.scroll`,file:e=>`code.file.${e}`,content:`code.content`,empty:`code.empty`,refresh:`code.refresh`,review:e=>`code.review.${e}`,reviewCount:`code.reviewCount`},changes:{tree:`changes.tree`,review:e=>`changes.review.${e}`,reviewCount:`changes.reviewCount`},visual:{stage:{root:`visual.stage`,image:e=>`visual.stage.image.${e}`,zoom:e=>`visual.stage.zoom.${e}`,approve:`approve`}},dialog:{root:`dialog`,close:`dialog.close`},branches:`changes.branches`,resize:`sidebar.resize`,approveBatch:`approve.batch`,selectionBar:`selection.bar`,pageHeader:`page.header`,headerMetadata:`page.header.metadata`,statusBadge:`status.badge`,taskStatus:e=>`status.task.${e}`,folder:e=>`tree.folder.${e}`,clearSelection:`selection.clear`,previous:`stage.previous`,next:`stage.next`,snapshotTab:e=>`snapshot.tab.${e}`,sourceTab:e=>`source.tab.${e}`,collapse:`source.collapse`,copy:`source.copy`,source:`source.code`,sourceLineNumbers:`source.lineNumbers`,diffUnified:`diff.unified`,diffExpand:`diff.expand`,diffEditor:`diff.editor`,diffOriginal:`diff.original`,diffModified:`diff.modified`,namespace:e=>`namespace.${e}`,view:{baseline:`view.baseline`,tasks:`view.tasks`},tasks:{root:`tasks`,empty:`tasks.empty`,item:e=>`tasks.${e}`,removable:`tasks.removable`,prune:`tasks.prune`},tree:`cases`,case:e=>`case.${e}`,selectFolder:e=>`select.folder.${e}`,select:e=>`select.${e}`,detail:`detail`,snapshotContent:`detail.snapshots`,supplement:`detail.supplement`,taskInfo:`detail.taskInfo`,caseEyebrow:`detail.caseEyebrow`,taskExecutionId:`detail.taskExecutionId`,copyTaskExecutionId:`detail.copyTaskExecutionId`,caseId:`detail.caseId`,copyCaseIds:`detail.copyCaseIds`,taskError:`detail.taskError`,empty:`empty`,approve:`approve`,refresh:`refresh`,message:`message`,previewTab:e=>`preview.tab.${e}`,preview:{tabs:`preview.tabs`,title:`preview.title`,card:`preview.card`,previous:`preview.previous`,next:`preview.next`,left:`preview.left`,right:`preview.right`,position:`preview.position`,version:`preview.version`,hints:`preview.hints`,case:`preview.case`,status:`preview.status`,select:`preview.select`,evidence:`preview.evidence`,evidenceTab:e=>`preview.evidence.${e}`},snapshotPreview:e=>`snapshot.preview.${e}`,imageVersion:(e,t)=>`image.version.${e}.${t}`,snapshotViewLabel:e=>`snapshot.viewLabel.${e}`,snapshotCompare:e=>`snapshot.compare.${e}`,snapshotStatus:e=>`snapshot.status.${e}`,snapshotMetrics:e=>`snapshot.metrics.${e}`,snapshotDiff:e=>`snapshot.diff.${e}`,snapshot:e=>`snapshot.${e}`,image:(e,t)=>`image.${e}.${t}`,text:e=>`text.${e}`,observation:e=>`observation.${e}`,filter:e=>`filter.${e}`,filterGroup:`filter.group`,filterThumb:`filter.thumb`,mobile:{tabbar:`mobile.tabbar`,tab:e=>`mobile.tab.${e}`,more:`mobile.more`,moreSheet:`mobile.moreSheet`,editTabs:`mobile.editTabs`,tabOrder:e=>`mobile.tabOrder.${e}`,tabHandle:e=>`mobile.tabHandle.${e}`,saveTabs:`mobile.saveTabs`,resetTabs:`mobile.resetTabs`,rule:e=>`mobile.rule.${e}`,page:e=>`mobile.page.${e}`,back:`mobile.back`,prev:`mobile.prev`,next:`mobile.next`,switchHand:`mobile.switchHand`,empty:`mobile.empty`,toast:`mobile.toast`,diff:e=>`mobile.diff.${e}`,ref:`mobile.ref`,refDialog:`mobile.refDialog`,refOption:e=>`mobile.refOption.${e}`,review:`mobile.review`,file:e=>`mobile.file.${e}`,check:e=>`mobile.check.${e}`,commit:e=>`mobile.commit.${e}`,actionSheet:`mobile.actionSheet`,moreActions:`mobile.moreActions`,caseInfo:`mobile.caseInfo`,copyCaseId:`mobile.copyCaseId`,copyPath:`mobile.copyPath`,pathDisclosure:`mobile.pathDisclosure`,metrics:e=>`mobile.metrics.${e}`,copy:e=>`mobile.copy.${e}`,diagnostics:`mobile.diagnostics`,expandAll:`mobile.expandAll`,tag:e=>`mobile.tag.${e}`,note:e=>`mobile.note.${e}`,noteState:e=>`mobile.noteState.${e}`,task:e=>`mobile.task.${e}`,case:e=>`mobile.case.${e}`,baselineCase:e=>`mobile.baselineCase.${e}`,folder:e=>`mobile.folder.${e}`,evidence:e=>`mobile.evidence.${e}`,filter:e=>`mobile.filter.${e}`,confirm:`mobile.confirm`,confirmOk:`mobile.confirm.ok`,confirmCancel:`mobile.confirm.cancel`,image:e=>`mobile.image.${e}`,fileDiff:`mobile.fileDiff`,approve:`mobile.approve`,approveAll:`mobile.approveAll`,prune:`mobile.prune`,deleteBaseline:`mobile.deleteBaseline`}},k_=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function A_(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:k_(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var j_=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},M_=e=>{let t=j_(e);return t.charAt(0).toUpperCase()+t.slice(1)},N_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),P_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function F_(e){return e!=null}function I_(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??P_.width,a=e.size??e.height??P_.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?N_(...c):N_(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??P_[`stroke-width`])*Number(e.size??e.width??P_.width)/Number(t.size??t.width??P_.width):t.strokeWidth??P_[`stroke-width`];return[`svg`,{...Object.entries(P_).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&F_(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&F_(t.width)&&{[r(`width`)]:t.width},...`height`in t&&F_(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function L_(e,t={}){return I_(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var R_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},z_=(0,p.createContext)({}),B_=()=>(0,p.useContext)(z_),V_=(0,p.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=B_()??{},b=!!c||R_(d),[x,S,C=[]]=L_(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:N_(y,s),hasA11yProp:b,attributes:d});return(0,p.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function H_(e,t=[],n=[]){let r=typeof e==`string`?A_(e,t,n):e,i=(0,p.forwardRef)(({className:e,...t},n)=>(0,p.createElement)(V_,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=M_(r.name)),i}var U_={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};U_.node;var W_=H_(U_),G_={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};G_.node;var K_=H_(G_),q_={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};q_.node;var J_=H_(q_),Y_={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Y_.node;var X_=H_(Y_),Z_={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Z_.node;var Q_=H_(Z_),$_={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};$_.node;var ev=H_($_),tv={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};tv.node;var nv=H_(tv),rv={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};rv.node;var iv=H_(rv),av={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};av.node;var ov=H_(av),sv={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};sv.node;var cv=H_(sv),lv={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};lv.node;var uv=H_(lv),dv={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};dv.node;var fv=H_(dv),pv={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};pv.node;var mv=H_(pv),hv={name:`folder-tree`,size:24,node:[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]};hv.node;var gv=H_(hv),_v={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};_v.node;var vv=H_(_v),yv={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};yv.node;var bv=H_(yv),xv={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};xv.node;var Sv=H_(xv),Cv={name:`images`,size:24,node:[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]};Cv.node;var wv=H_(Cv),Tv={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Tv.node;var Ev=H_(Tv),Dv={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};Dv.node;var Ov=H_(Dv),kv={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};kv.node;var Av=H_(kv),jv={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};jv.node;var Mv=H_(jv),Nv={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Nv.node;var Pv=H_(Nv),Fv={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Fv.node;var Iv=H_(Fv),Lv={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Lv.node;var Rv=H_(Lv);function zv(e,t=[]){let n=(0,p.useRef)(e);n.current=e,(0,p.useEffect)(()=>{let e=()=>{n.current()};return e(),window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},t)}function Bv(e){if(!e?.width||!e.height)return{};let t=e.scale??1,n=Math.max(1,Math.round(e.width/t));return{width:n,height:Math.max(1,Math.round(e.height/t)),...t>1&&{style:{maxWidth:`min(100%, ${n}px)`}}}}function Vv(e){let[t,n]=(0,p.useState)(()=>{try{return localStorage.getItem(e)===`true`}catch{return!1}});return(0,p.useEffect)(()=>{try{localStorage.setItem(e,String(t))}catch{}},[e,t]),[t,n]}function Hv(e){let t=ea(aa(Xo)),[n,r]=(0,p.useState)([0]),i=n.at(-1);zv(()=>t.readFile(e,i),[e,i]);let a=t.content.key===JSON.stringify([e,i])?t.content.state:null,o=a?.data,s=o?.kind===`text`?o.text:void 0,c=o?.kind===`text`?o.nextOffset:void 0;return{offset:i,text:s,loading:!a||a.loading,error:a?.error?.message,note:o?.kind===`binary`?`二进制文件不支持文本预览。`:s===``?`空文件`:void 0,pager:i>0||c!==void 0?{index:n.length-1,hasNext:c!==void 0,onPrev:()=>{i>0&&r(n.slice(0,-1))},onNext:()=>{c!==void 0&&r([...n,c])}}:null}}var Uv=e=>`/mobile/${e}`;function Wv(e,t={}){let n=new URLSearchParams(Object.entries(t).filter(e=>!!e[1])).toString();return n?`${e}?${n}`:e}function Gv(e){let t=ea(aa(Xo));zv(()=>t.loadDirectory(``));let n=t.directories.get(``)?.state,r=e?16:14,i=n=>(t.directories.get(n)?.state?.data??[]).map(({name:a,directory:o})=>{let s=n?n+`/`+a:a,c=o?vv:uv,l=o?t.directories.get(s)?.state:void 0;return{key:s,label:a,icon:(0,R.jsx)(c,{size:r}),trailing:l?.loading?(0,R.jsx)(Av,{className:`project-folder-loading`,size:r,role:`status`,"aria-label":`正在读取 ${a}`,"data-testid":O_.files.folderLoading(s)}):l?.error?(0,R.jsx)(`span`,{className:`project-folder-error`,role:`img`,"aria-label":l.error.message,title:l.error.message,children:(0,R.jsx)(Q_,{size:r,"aria-hidden":`true`})}):void 0,testId:o?(e?O_.mobile.folder:O_.folder)(s):(e?O_.mobile.file:O_.files.file)(s),children:o?i(s):void 0,href:e&&!o?Wv(`/mobile/files/file`,{path:s}):void 0}});return{nodes:i(``),error:n?.error,loading:n?.loading??!0,isExpanded:e=>t.directories.has(e),onToggle:e=>t.toggleDirectory(e)}}function Kv({path:t,text:n,mobile:r=!1}){let i=(0,p.useRef)(null),[a,o]=(0,p.useState)(`loading`);return(0,p.useEffect)(()=>{let a=!0,s;return o(`loading`),e(async()=>{let{monaco:e,languageForPath:t}=await import(`./monaco-Be-Xokw7.js`);return{monaco:e,languageForPath:t}},__vite__mapDeps([0,1,2,3,4])).then(async({monaco:e,languageForPath:c})=>{if(!a)return;let l=c(t);await e.editor.colorize(``,l,{}),a&&i.current&&(s=e.editor.create(i.current,{value:n,language:l,theme:`vs`,ariaLabel:t,readOnly:!0,domReadOnly:!0,automaticLayout:!0,minimap:{enabled:!1},renderValidationDecorations:`off`,renderLineHighlight:`none`,overviewRulerLanes:0,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,lineNumbersMinChars:3,fontSize:12,fontFamily:getComputedStyle(i.current).getPropertyValue(r?`--m-font-mono`:`--font-metadata`).trim(),lineHeight:r?20:22,...r&&{folding:!1,glyphMargin:!1,lineDecorationsWidth:8},padding:{top:8,bottom:8}}),o(`ready`))}).catch(()=>{a&&o(`error`)}),()=>{a=!1,s?.dispose()}},[t,n,r]),(0,R.jsxs)(`div`,{className:`project-file-editor`,"data-testid":O_.files.editor,"aria-busy":a===`loading`,children:[(0,R.jsx)(`div`,{className:`project-file-editor-host`,ref:i}),a!==`ready`&&(0,R.jsx)(`pre`,{className:`project-file-fallback`,tabIndex:0,children:n})]})}export{Ko as $,lr as $t,X_ as A,Aa as At,Mg as B,oa as Bt,uv as C,Xa as Ct,nv as D,Ja as Dt,iv as E,Za as Et,O_ as F,ba as Ft,rs as G,$i as Gt,c_ as H,aa as Ht,E_ as I,ga as It,Zo as J,zi as Jt,ns as K,Zi as Kt,D_ as L,_a as Lt,K_ as M,ja as Mt,W_ as N,Ta as Nt,ev as O,Ia as Ot,H_ as P,Oa as Pt,qo as Q,Ue as Qt,Ag as R,ca as Rt,fv as S,oo as St,ov as T,so as Tt,Jg as U,na as Ut,Vg as V,ia as Vt,S_ as W,ea as Wt,Yo as X,Fi as Xt,Xo as Y,Xr as Yt,Jo as Z,He as Zt,Sv as _,io as _t,Hv as a,f as an,Bo as at,gv as b,ao as bt,zv as c,u as cn,Io as ct,Pv as d,ko as dt,Nr as en,Go as et,Mv as f,Co as ft,wv as g,xo as gt,Ev as h,fo as ht,Uv as i,Wi as in,Ho as it,J_ as j,ka as jt,Q_ as k,Pa as kt,Rv as l,Po as lt,Ov as m,_o as mt,Gv as n,hr as nn,Uo as nt,Vv as o,s as on,zo as ot,Av as p,So as pt,ts as q,Ri as qt,Wv as r,_r as rn,Vo as rt,Bv as s,c as sn,Ro as st,Kv as t,fr as tn,Wo as tt,Iv as u,Mo as ut,bv as v,ro as vt,cv as w,Ya as wt,mv as x,co as xt,vv as y,Ga as yt,Pg as z,ua as zt};
|
|
90
|
+
`.replace(/\n+/g,` `).replace(/\s+/g,` `).trim();function Ym(e,t=`hidden`){return Ls(()=>{let{element:n,manager:r}=e;if(!n||!r)return;let i=Xm(n,r.registry.droppables),a=[],o=lf(n),{remove:s}=o;return Zm(i,o,a),Qm(o,t),o.remove=()=>{a.forEach(e=>e()),s.call(o)},o})}function Xm(e,t){let n=new Map;for(let r of t)if(r.element&&(e===r.element||e.contains(r.element))){let e=`${Vm}${Wp(`dom-id`)}`;r.element.setAttribute(e,``),n.set(r,e)}return n}function Zm(e,t,n){for(let[r,i]of e){if(!r.element)continue;let e=`[${i}]`,a=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!a)continue;let o=r.element;r.proxy=a,a.removeAttribute(i),mf.set(o,a),n.push(()=>{mf.delete(o),r.proxy=void 0})}}function Qm(e,t=`hidden`){e.setAttribute(`inert`,`true`),e.setAttribute(`tab-index`,`-1`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(Gm,t)}function $m(e,t){return e===t||_f(e)===_f(t)}function eh(e){let{target:t}=e;`newState`in e&&e.newState===`closed`&&Rp(t)&&t.hasAttribute(`popover`)&&requestAnimationFrame(()=>Zf(t))}function th(e){return e.tagName===`TR`}function nh(e,t,n){let r=new MutationObserver(r=>{let i=!1;for(let n of r){if(n.target!==e){i=!0;continue}if(n.type!==`attributes`)continue;let r=n.attributeName;if(r.startsWith(`aria-`)||Km.includes(r))continue;let a=e.getAttribute(r);if(r===`style`){if(Ip(e)&&Ip(t)){let n=e.style;for(let e of Array.from(t.style))n.getPropertyValue(e)===``&&t.style.removeProperty(e);for(let e of Array.from(n)){if(qm.includes(e)||e.startsWith(Um))continue;let r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else a===null?t.removeAttribute(r):t.setAttribute(r,a)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function rh(e,t,n){let r=new MutationObserver(r=>{for(let i of r)if(i.addedNodes.length!==0)for(let r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement(`afterend`,t),Zf(n);return}if(r.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement(`beforebegin`,e),Zf(n);return}}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement(`afterend`,t),Zf(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function ih(e){return new ResizeObserver(()=>{var t;let n=new Pp(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),r=e.transformOrigin??{x:1,y:1},i=(e.width-n.width)*r.x+e.delta.x,a=(e.height-n.height)*r.y+e.delta.y,o=af();if(e.styles.set({width:n.width-e.widthOffset,height:n.height-e.heightOffset,top:e.top+a+o.y,left:e.left+i+o.x},Um),(t=e.getElementMutationObserver())==null||t.takeRecords(),th(e.element)&&th(e.placeholder)){let t=Array.from(e.element.cells),n=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(t.map(e=>e.style.width));for(let[e,r]of t.entries()){let t=n[e];r.style.width=`${t.getBoundingClientRect().width}px`}}let s=e.getTranslate()??{x:0,y:0},c=e.left+i+o.x+s.x,l=e.top+a+o.y+s.y,u=n.width-e.widthOffset,d=n.height-e.heightOffset,f=e.frameTransform;e.dragOperation.shape=new Al(c*f.scaleX+f.x,l*f.scaleY+f.y,u*f.scaleX,d*f.scaleY)})}var ah=250,oh=`ease`;function sh(e){var t;let{animation:n}=e;if(typeof n==`function`){let t=n({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}let{duration:r=ah,easing:i=oh}=n??{};Zf(e.feedbackElement);let[,a]=Vd(e.feedbackElement,e=>`translate`in e)??[];a?.pause();let o=e.placeholder??e.element,s={frameTransform:$m(e.feedbackElement,o)?null:void 0},c=new Pp(e.feedbackElement,s),l=gp(rp(e.feedbackElement).translate)??e.translate,u=new Pp(o,s),d=Al.delta(c,u,e.alignment),f={x:l.x-d.x,y:l.y-d.y},p=Math.round(c.intrinsicHeight)===Math.round(u.intrinsicHeight)?{}:{minHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`]},m=Math.round(c.intrinsicWidth)===Math.round(u.intrinsicWidth)?{}:{minWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`]};e.styles.set({transition:e.transition},Um),e.feedbackElement.setAttribute(Hm,``),(t=e.getElementMutationObserver())==null||t.takeRecords(),Op({element:e.feedbackElement,keyframes:om(am(am({},p),m),{translate:[`${l.x}px ${l.y}px 0`,`${f.x}px ${f.y}px 0`]}),options:{duration:cf(Gd(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?r:0,easing:i}}).then(()=>{e.feedbackElement.removeAttribute(Hm),a?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var ch,lh,uh,dh,fh,ph,mh,hh=class extends (lh=hu,ch=[V],lh){constructor(e,t){super(e,t),vm(this,fh),vm(this,dh,mm(uh,8,this)),mm(uh,11,this),this.state={initial:{},current:{}};let n=e.registry.plugins.get(Bm),r=n?.register(Jm,{retain:!0});if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(bm(this,fh,ph).bind(this,n)),this.registerEffect(bm(this,fh,mh))}};uh=lm(lh),dh=new WeakMap,fh=new WeakSet,ph=function(e){let{overlay:t}=this;if(!t||!e)return;let n=sf(t);if(n)return e.addRoot(n)},mh=function(){let{state:e,manager:t,options:n}=this,{dragOperation:r}=t,{position:i,source:a,status:o}=r;if(o.idle){e.current={},e.initial={};return}if(!a)return;let{element:s}=a,c=a.pluginConfig(hh),l=c?.feedback??n?.feedback??`default`,u=typeof l==`function`?l(a,t):l;if(!s||u===`none`||!o.initialized||o.initializing)return;let{initial:d}=e,f=this.overlay??s,p=pp(f),m=pp(s),h=!$m(s,f),g=new Pp(s,{frameTransform:h?m:null,ignoreTransforms:!h}),_={x:m.scaleX/p.scaleX,y:m.scaleY/p.scaleY},{width:v,height:y,top:b,left:x}=g;h&&(v/=_.x,y/=_.y);let S=new Lp(f),C=rp(s),{transition:w,translate:T,boxSizing:E,paddingBlockStart:D,paddingBlockEnd:O,paddingInlineStart:ee,paddingInlineEnd:k,borderInlineStartWidth:A,borderInlineEndWidth:te,borderBlockStartWidth:ne,borderBlockEndWidth:j}=C,M=w.split(`,`).filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(`,`),N=_p(C),re=C.transform,ie=u===`clone`,ae=E===`content-box`,oe=ae?parseInt(ee)+parseInt(k)+parseInt(A)+parseInt(te):0,P=ae?parseInt(D)+parseInt(O)+parseInt(ne)+parseInt(j):0,F=u!==`move`&&!this.overlay?Ym(a,ie?`clone`:`hidden`):null,se=Ls(()=>zp(t.dragOperation.activatorEvent));if(!d.translate){if(this.overlay&&N)d.translate={x:N.x,y:N.y};else if(T!==`none`){let e=gp(T);e&&(d.translate=e)}}if(!d.transformOrigin){let e=Ls(()=>i.current),t=x+(N?.x??0),n=b+(N?.y??0);d.transformOrigin={x:(e.x-t*p.scaleX-p.x)/(v*p.scaleX),y:(e.y-n*p.scaleY-p.y)/(y*p.scaleY)}}let{transformOrigin:ce}=d,le=b*p.scaleY+p.y,ue=x*p.scaleX+p.x;if(!d.coordinates&&(d.coordinates={x:ue,y:le},_.x!==1||_.y!==1)){let{scaleX:e,scaleY:t}=m,{x:n,y:r}=ce;d.coordinates.x+=(v*e-v)*n,d.coordinates.y+=(y*t-y)*r}d.dimensions||={width:v,height:y},d.frameTransform||=p;let de={x:d.coordinates.x-ue,y:d.coordinates.y-le},fe={width:(d.dimensions.width*d.frameTransform.scaleX-v*p.scaleX)*ce.x,height:(d.dimensions.height*d.frameTransform.scaleY-y*p.scaleY)*ce.y},pe={x:de.x/p.scaleX+fe.width,y:de.y/p.scaleY+fe.height},me={left:x+pe.x,top:b+pe.y};f.setAttribute(Wm,`true`);let he=Ls(()=>r.transform),ge=d.translate??{x:0,y:0},_e=he.x*p.scaleX+ge.x,ve=he.y*p.scaleY+ge.y,ye=af();S.set({width:v-oe,height:y-P,top:me.top+ye.y,left:me.left+ye.x,translate:`${_e}px ${ve}px 0`,transform:this.overlay?`none`:re,transition:M?`${M}, translate 0ms linear`:`translate 0ms linear`,scale:h?`${_.x} ${_.y}`:``,"transform-origin":`${ce.x*100}% ${ce.y*100}%`},Um),F&&(s.insertAdjacentElement(`afterend`,F),n?.rootElement&&(typeof n.rootElement==`function`?n.rootElement(a):n.rootElement).appendChild(s)),Xf(f)&&(f.hasAttribute(`popover`)||f.setAttribute(`popover`,`manual`),Zf(f),f.addEventListener(`beforetoggle`,eh));let be,xe,Se,Ce=ih({placeholder:F,element:s,feedbackElement:f,frameTransform:p,transformOrigin:ce,width:v,height:y,top:b,left:x,widthOffset:oe,heightOffset:P,delta:pe,styles:S,dragOperation:r,getTranslate:()=>e.current.translate,getElementMutationObserver:()=>be,getSavedCellWidths:()=>Se,setSavedCellWidths:e=>{Se=e}}),we=new Pp(f);Ls(()=>r.shape=we);let Te=Gd(f),Ee=e=>{this.manager.actions.stop({event:e})},De=cf(Te);se&&Te.addEventListener(`resize`,Ee),Ls(()=>a.status)===`idle`&&requestAnimationFrame(()=>a.status=`dragging`),F&&(Ce.observe(F),be=nh(s,F,ie),xe=rh(s,F,f));let Oe=t.dragOperation.source?.id,ke=()=>{if(!se||Oe==null)return;let e=t.registry.draggables.get(Oe),n=e?.handle??e?.element;qd(n)&&n.focus()},Ae=()=>{be?.disconnect(),xe?.disconnect(),Ce.disconnect(),Te.removeEventListener(`resize`,Ee),Xf(f)&&(f.removeEventListener(`beforetoggle`,eh),f.removeAttribute(`popover`)),f.removeAttribute(Wm),S.reset();let t=()=>{if(Se&&th(s)){let e=Array.from(s.cells);for(let[t,n]of e.entries())n.style.width=Se[t]??``}a.status=`idle`;let t=e.current.translate!=null,n=r.status.dragging;F&&(!n&&t||F.parentElement!==f.parentElement)&&f.isConnected&&F.replaceWith(f),F?.remove()};f===this.overlay?setTimeout(t,0):t()},je=n?.dropAnimation,Me=this,Ne=Fc(()=>{let{transform:t,status:i}=r;if((t.x||t.y||e.current.translate)&&i.dragging){let i=d.translate??{x:0,y:0},a={x:t.x/p.scaleX+i.x,y:t.y/p.scaleY+i.y},o=e.current.translate,s=Ls(()=>r.modifiers),c=Ls(()=>r.shape?.current),l=n?.keyboardTransition,u=se&&!De&&l!==null?`${l?.duration??250}ms ${l?.easing??`cubic-bezier(0.25, 1, 0.5, 1)`}`:`0ms linear`;if(S.set({transition:M?`${M}, translate ${u}`:`translate ${u}`,translate:`${a.x}px ${a.y}px 0`},Um),be?.takeRecords(),c&&c!==we&&o&&!s.length){let e=kl.delta(a,o);r.shape=Al.from(c.boundingRectangle).translate(e.x*p.scaleX,e.y*p.scaleY)}else r.shape=new Pp(f);e.current.translate=a}},function(){if(r.status.dropped){this.dispose(),a.status=`dropping`;let n=c?.dropAnimation===void 0?Me.dropAnimation===void 0?je:Me.dropAnimation:c.dropAnimation,r=e.current.translate,i=r!=null;if(!r&&s!==f&&(r={x:0,y:0}),!r||n===null){Ae();return}t.renderer.rendering.then(()=>{sh({source:a,element:s,feedbackElement:f,placeholder:F,translate:r,moved:i,transition:w,alignment:a.alignment,styles:S,animation:n??void 0,getElementMutationObserver:()=>be,cleanup:Ae,restoreFocus:ke})})}});return()=>{Ae(),Ne()}},hm(uh,4,`overlay`,ch,hh,dh),pm(uh,hh),hh.configure=lu(hh);var gh=!0,_h=!1,vh,yh,bh=[V],xh=yp.Forward,Sh,Ch,wh;yh=(vh=[V],yp.Reverse);var Th=class{constructor(){vm(this,Ch,mm(Sh,8,this,gh)),mm(Sh,11,this),vm(this,wh,mm(Sh,12,this,gh)),mm(Sh,15,this)}isLocked(e){return e===yp.Idle?!1:e==null?this[yp.Forward]===gh&&this[yp.Reverse]===gh:this[e]===gh}unlock(e){e!==yp.Idle&&(this[e]=_h)}};Sh=lm(null),Ch=new WeakMap,wh=new WeakMap,hm(Sh,4,xh,bh,Th,Ch),hm(Sh,4,yh,vh,Th,wh),pm(Sh,Th);var Eh=[yp.Forward,yp.Reverse],Dh=class{constructor(){this.x=new Th,this.y=new Th}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},Oh=class extends hu{constructor(e){super(e);let t=qs(new Dh),n=null;this.signal=t,rc(()=>{let{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new Dh;return}let{delta:i}=e.dragOperation.position;if(n){let e={x:kh(i.x,n.x),y:kh(i.y,n.y)},r=t.peek();Ps(()=>{for(let t of Bl)for(let n of Eh)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function kh(e,t){return Math.sign(e-t)}var Ah,jh,Mh,Nh,Ph,Fh,Ih=class extends (jh=gu,Ah=[V],jh){constructor(e){super(e),vm(this,Nh,mm(Mh,8,this,!1)),mm(Mh,11,this),vm(this,Ph),vm(this,Fh,()=>{if(!$(this,Ph))return;let{element:e,by:t}=$(this,Ph);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return ym(this,Ph,void 0),!1;let{position:r}=this.manager.dragOperation,i=r?.current;if(i){let{by:r}=e??{},a=r?{x:Lh(r.x),y:Lh(r.y)}:void 0,o=a?void 0:this.scrollIntentTracker.current;if(o?.isLocked())return!1;for(let e of n){let n=op(e),s=cp(e,r,n);if(s.x||s.y){let{speed:s,direction:c}=Sp(e,i,a,t?.acceleration,t?.threshold,void 0,n);if(o)for(let e of Bl)o[e].isLocked(c[e])&&(s[e]=0,c[e]=0);if(c.x||c.y){let{x:t,y:n}=r??c,i=t*s.x,a=n*s.y;if(i||a){let t=$(this,Ph)?.by;if(this.autoScrolling&&t&&(t.x&&!i||t.y&&!a))continue;return ym(this,Ph,{element:e,by:{x:i,y:a}}),$f.schedule($(this,Fh)),!0}}}}}return ym(this,Ph,void 0),!1};let t=null,n=null,r=jc(()=>{let{position:n,source:r}=e.dragOperation;if(!n)return null;let i=ff(sf(r?.element),n.current);return i&&(t=i),i??t}),i=jc(()=>{let t=r.value,{documentElement:i}=Yd(t);if(!t||t===i){let{target:t}=e.dragOperation,r=t?.element;if(r){let e=fp(r,{excludeElement:!1});return n=e,e}}if(t){let e=fp(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<n?.size?n:(n=e,e)}return n=null,null},Mc);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new Oh(e),this.destroy=e.monitor.addEventListener(`dragmove`,t=>{!this.disabled&&!t.defaultPrevented&&zp(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};Mh=lm(jh),Nh=new WeakMap,Ph=new WeakMap,Fh=new WeakMap,hm(Mh,4,`autoScrolling`,Ah,Ih,Nh),pm(Mh,Ih);function Lh(e){return e>0?yp.Forward:e<0?yp.Reverse:yp.Idle}var Rh=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),zh=10,Bh=class extends hu{constructor(e,t){super(e,t);let n=e.registry.plugins.get(Ih);if(!n)throw Error(`AutoScroller plugin depends on Scroller plugin`);this.destroy=rc(()=>{if(this.disabled)return;let{position:t,status:r}=e.dragOperation;if(r.dragging){let e={acceleration:this.options?.acceleration,threshold:typeof this.options?.threshold==`number`?{x:this.options.threshold,y:this.options.threshold}:this.options?.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;let t=setInterval(()=>Rh.schedule(()=>n.scroll(void 0,e)),zh);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};Bh.configure=lu(Bh);var Vh=Bh;function Hh(e,t){let n=Wh(e.key);return t.some(e=>Wh(e)===n)}var Uh=new Set(`alt.altgraph.backspace.capslock.control.delete.end.enter.escape.home.insert.meta.pagedown.pageup.pause.printscreen.shift.space.tab.arrowdown.arrowleft.arrowright.arrowup.f1.f2.f3.f4.f5.f6.f7.f8.f9.f10.f11.f12`.split(`.`));function Wh(e){if(e===` `||e===`Spacebar`)return`space`;if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(e.length===1)return e.toLowerCase();let t=e.toLowerCase();return Uh.has(t)?t:e}var Gh=Object.freeze({offset:10,keyboardCodes:{start:[`Space`,`Enter`],cancel:[`Escape`],end:[`Space`,`Enter`,`Tab`],up:[`ArrowUp`],down:[`ArrowDown`],left:[`ArrowLeft`],right:[`ArrowRight`]},preventActivation(e,t){let n=t.handle??t.element;return e.target!==n}}),Kh,qh=class extends pd{constructor(e,t){super(e),this.manager=e,this.options=t,vm(this,Kh,[]),this.listeners=new gf,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented||!Rp(e.target)||t.disabled)return;let{keyboardCodes:r=Gh.keyboardCodes,preventActivation:i=Gh.preventActivation}=n??{};Hh(e,r.start)&&this.manager.dragOperation.status.idle&&(i?.(e,t)||this.handleStart(e,t,n))}}bind(e,t=this.options){return rc(()=>{let n=e.handle??e.element,r=n=>{zp(n)&&this.handleSourceKeyDown(n,e,t)};if(n)return n.addEventListener(`keydown`,r),()=>{n.removeEventListener(`keydown`,r)}})}handleStart(e,t,n){let{element:r}=t;if(!r)throw Error(`Source draggable does not have an associated element`);e.preventDefault(),e.stopImmediatePropagation(),Cp(r);let{center:i}=new Pp(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let a=Yd(r),o=[this.listeners.bind(a,[{type:`keydown`,listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];$(this,Kh).push(...o)}handleKeyDown(e,t,n){let{keyboardCodes:r=Gh.keyboardCodes}=n??{};if(Hh(e,[...r.end,...r.cancel])){e.preventDefault();let t=Hh(e,r.cancel);this.handleEnd(e,t)}else Hh(e,r.up)?this.handleMove(`up`,e):Hh(e,r.down)&&this.handleMove(`down`,e),Hh(e,r.left)?this.handleMove(`left`,e):Hh(e,r.right)&&this.handleMove(`right`,e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){let{shape:n}=this.manager.dragOperation,r=t.shiftKey?5:1,i={x:0,y:0},a=this.options?.offset??Gh.offset;if(typeof a==`number`&&(a={x:a,y:a}),n){switch(e){case`up`:i={x:0,y:-a.y*r};break;case`down`:i={x:0,y:a.y*r};break;case`left`:i={x:-a.x*r,y:0};break;case`right`:i={x:a.x*r,y:0}}(i.x||i.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:i}))}}sideEffects(){let e=this.manager.registry.plugins.get(Vh);e?.disabled===!1&&(e.disable(),$(this,Kh).push(()=>{e.enable()}))}cleanup(){$(this,Kh).forEach(e=>e()),ym(this,Kh,[])}destroy(){this.cleanup(),this.listeners.clear()}};Kh=new WeakMap,qh.configure=lu(qh),qh.defaults=Gh;var Jh,Yh=class extends gd{constructor(){super(...arguments),vm(this,Jh)}onEvent(e){switch(e.type){case`pointerdown`:ym(this,Jh,ef(e));break;case`pointermove`:if(!$(this,Jh))return;let{x:t,y:n}=ef(e),r={x:t-$(this,Jh).x,y:n-$(this,Jh).y},{tolerance:i}=this.options;if(i&&Rl(r,i)){this.abort();return}Rl(r,this.options.value)&&this.activate(e);break;case`pointerup`:this.abort()}}abort(){ym(this,Jh,void 0)}};Jh=new WeakMap;var Xh,Zh,Qh=class extends gd{constructor(){super(...arguments),vm(this,Xh),vm(this,Zh)}onEvent(e){switch(e.type){case`pointerdown`:ym(this,Zh,ef(e)),ym(this,Xh,setTimeout(()=>this.activate(e),this.options.value));break;case`pointermove`:if(!$(this,Zh))return;let{x:t,y:n}=ef(e);Rl({x:t-$(this,Zh).x,y:n-$(this,Zh).y},this.options.tolerance)&&this.abort();break;case`pointerup`:this.abort()}}abort(){$(this,Xh)&&(clearTimeout($(this,Xh)),ym(this,Zh,void 0),ym(this,Xh,void 0))}};Xh=new WeakMap,Zh=new WeakMap;var $h=class{};$h.Delay=Qh,$h.Distance=Yh;var eg=Object.freeze({activationConstraints(e,t){let{pointerType:n,target:r}=e;if(n!==`mouse`||!Rp(r)||t.handle!==r&&!t.handle?.contains(r))return n===`touch`?[new $h.Delay({value:250,tolerance:5})]:Vp(r)&&!e.defaultPrevented?[new $h.Delay({value:200,tolerance:0})]:[new $h.Delay({value:200,tolerance:10}),new $h.Distance({value:5})]},preventActivation(e,t){let{target:n}=e;if(n===t.element||n===t.handle||!Rp(n)||t.handle?.contains(n))return!1;let r=hf(n);return r!==t.element&&!!r}}),tg,ng=class extends pd{constructor(e,t){super(e),this.manager=e,this.options=t,vm(this,tg,new Set),this.listeners=new gf,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){let{activationConstraints:r=eg.activationConstraints}=n??{};return typeof r==`function`?r(e,t):r}bind(e,t=this.options){return rc(()=>{let n=new AbortController,{signal:r}=n,i=n=>{Bp(n)&&this.handlePointerDown(n,e,t)},a=[e.handle??e.element];t?.activatorElements&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(let e of a)e&&(cg(e.ownerDocument.defaultView),e.addEventListener(`pointerdown`,i,{signal:r}));return()=>n.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||e.button!==0||!Rp(e.target)||t.disabled||ig(e)||!this.manager.dragOperation.status.idle)return;let{preventActivation:r=eg.preventActivation}=n??{};if(r?.(e,t))return;let{target:i}=e,a=qd(i)&&i.draggable&&i.getAttribute(`draggable`)===`true`,o=pp(t.element),{x:s,y:c}=ef(e);this.initialCoordinates={x:s*o.scaleX+o.x,y:c*o.scaleY+o.y};let l=this.activationConstraints(e,t,n);e.sensor=this;let u=new md(l,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let{pointerId:d}=e,f=e=>t=>{t.pointerId===d&&e(t)},p=nf(),m=this.listeners.bind(p,[{type:`pointermove`,listener:f(e=>this.handlePointerMove(e,t))},{type:`pointerup`,listener:f(this.handlePointerUp),options:{capture:!0}},{type:`pointercancel`,listener:f(this.handleCancel)},{type:`dragstart`,listener:a?this.handleCancel:ag,options:{capture:!0}}]);$(this,tg).add(()=>{m(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n;this.controller?.activated===!1&&((n=this.controller)==null||n.onEvent(e));let{status:r}=this.manager.dragOperation;if(r.initializing||r.dragging){let n=ef(e),i=pp(t.element);n.x=n.x*i.scaleX+i.x,n.y=n.y*i.scaleY+i.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,r.dragging&&$f.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let n=!t.initialized,r=Yd(e.target),i=r.defaultView;if(!n&&i){let e=e=>{e.target===r.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};i.addEventListener(`click`,e,!0),i.setTimeout(()=>{i.removeEventListener(`click`,e,!0)},0)}this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){e.key===`Escape`&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle||t.defaultPrevented)return;let i=n.actions.start({coordinates:r,event:t,source:e});if(i.signal.aborted)return this.cleanup();t.preventDefault();let a=Yd(t.target).body;try{a.setPointerCapture(t.pointerId)}catch{this.handleCancel(t);return}let o=Rp(t.target)?[t.target,a]:a,s=this.listeners.bind(o,[{type:`touchmove`,listener:ag,options:{passive:!1}},{type:`click`,listener:ag},{type:`contextmenu`,listener:ag},{type:`keydown`,listener:this.handleKeyDown}]);$(this,tg).add(s),n.renderer.rendering.then(()=>{!i.signal.aborted&&n.dragOperation.status.dragging&&$f.schedule(this.handleMove)})}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},$(this,tg).forEach(e=>e()),$(this,tg).clear()}destroy(){this.cleanup(),this.listeners.clear()}};tg=new WeakMap,ng.configure=lu(ng),ng.defaults=eg;var rg=ng;function ig(e){return`sensor`in e}function ag(e){e.preventDefault()}function og(){}var sg=new WeakSet;function cg(e){e&&!sg.has(e)&&(e.addEventListener(`touchmove`,og,{capture:!1,passive:!1}),sg.add(e))}var lg,ug,dg,fg,pg,mg,hg=class extends (dg=Bu,ug=[V],lg=[V],dg){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:a}=n,o=cm(n,[`element`,`effects`,`handle`]);super(am({effects:()=>[...i(),()=>{let{manager:e}=this;if(!e)return;let t=(this.sensors?.map(uu)??[...e.sensors]).map(t=>{let n=t instanceof pd?t:e.registry.register(t.plugin),r=t instanceof pd?void 0:t.options;return n.bind(this,r)});return function(){t.forEach(e=>e())}}]},o),t),vm(this,pg,mm(fg,8,this)),mm(fg,11,this),vm(this,mg,mm(fg,12,this)),mm(fg,15,this),this.element=r,this.handle=a}};fg=lm(dg),pg=new WeakMap,mg=new WeakMap,hm(fg,4,`handle`,ug,hg,pg),hm(fg,4,`element`,lg,hg,mg),pm(fg,hg);var gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg=class extends (vg=$u,_g=[V],gg=[V],vg){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,a=cm(n,[`element`,`effects`]);let{collisionDetector:o=qp}=a,s=e=>{let{manager:t,element:n}=this;if(!n||e===null){this.shape=void 0;return}if(!t)return;let r=new Pp(n),i=Ls(()=>this.shape);return r&&i?.equals(r)?i:(this.shape=r,r)},c=qs(!1);super(om(am({},a),{collisionDetector:o,effects:()=>[...i(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:n}=t,{source:r}=n;c.value=!!(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{let{element:e}=this;if(c.value&&e){let t=new Yf(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{if(this.manager?.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),vm(this,wg),vm(this,bg,mm(yg,8,this)),mm(yg,11,this),vm(this,Tg,mm(yg,12,this)),mm(yg,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){ym(this,wg,e,Cg)}get element(){return this.proxy??$(this,wg,Sg)}};yg=lm(vg),bg=new WeakMap,wg=new WeakSet,Tg=new WeakMap,xg=hm(yg,20,`#element`,_g,wg,bg),Sg=xg.get,Cg=xg.set,hm(yg,4,`proxy`,gg,Eg,Tg),pm(yg,Eg);var Dg=`focus-visible:outline-1 focus-visible:outline-solid focus-visible:outline-hub-focus-ring`,Og=`peer-focus-visible:outline-1 peer-focus-visible:outline-solid peer-focus-visible:outline-offset-2 peer-focus-visible:outline-hub-focus-ring`,kg={Root:B(`inline-flex items-center justify-center gap-1.5`,`box-border select-none whitespace-nowrap rounded-full`,`border-(length:--hub-hairline) border-solid border-transparent`,`font-sans font-medium leading-[normal]`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`),variants:{primary:`bg-hub-primary-solid text-hub-primary-contrast shadow-hub-xs enabled:hover:bg-hub-primary-solid-hover focus-visible:outline-offset-2`,secondary:B(`relative bg-hub-bg-panel text-hub-fg-control shadow-hub-sm focus-visible:outline-offset-0`,`enabled:hover:bg-hub-bg-hover enabled:hover:shadow-none`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] enabled:hover:after:shadow-hub-sm-hover`),ghost:`bg-transparent text-hub-fg-control enabled:hover:bg-hub-bg-hover focus-visible:outline-offset-0`,danger:`bg-hub-error-solid text-hub-error-contrast shadow-hub-xs enabled:hover:bg-hub-error-solid-hover focus-visible:outline-offset-2`},sizes:{sm:`h-6 px-2 text-hub-sm`,md:`h-7 px-2.5 text-hub-sm`,lg:`h-8 px-3 text-hub-md`}};function Ag({variant:e=`primary`,size:t=`md`,type:n=`button`,className:r,...i}){return(0,R.jsx)(`button`,{...i,type:n,className:B(kg.Root,kg.variants[e],kg.sizes[t],r)})}var jg={Root:B(`inline-grid flex-none select-none place-items-center rounded-full border-0 focus-visible:outline-offset-0`,`transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-pressed:bg-hub-bg-muted aria-pressed:text-hub-fg-title aria-pressed:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`,`aria-pressed:enabled:hover:bg-hub-bg-muted aria-pressed:enabled:hover:text-hub-fg-title aria-pressed:enabled:active:bg-hub-bg-muted`,`aria-pressed:enabled:hover:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`),sizes:{sm:`size-6 [&_svg]:size-3.5`,md:B(`size-7 [&_svg]:size-3.5`,`[&_.lucide-search]:scale-90 [&_.lucide-list-filter]:scale-95 [&_.lucide-square-pen]:scale-97`,`[&_.lucide-settings-2]:scale-x-115 [&_.lucide-settings-2]:scale-y-95 [&_.lucide-panel-right]:scale-x-105 [&_.lucide-panel-right]:scale-y-90`),lg:`size-8 [&_svg]:size-4`},variants:{surface:B(`bg-hub-bg-panel text-hub-fg-muted shadow-hub-sm`,`enabled:hover:bg-hub-bg-hover enabled:hover:text-hub-fg-control enabled:hover:shadow-hub-sm-hover enabled:active:bg-hub-bg-emphasized`),ghost:B(`bg-transparent text-hub-fg-secondary`,`enabled:hover:bg-hub-bg-overlay-hover enabled:hover:text-hub-fg-title enabled:active:bg-hub-bg-muted`)}};function Mg({className:e,size:t=`md`,type:n=`button`,variant:r=`surface`,pressed:i,...a}){return(0,R.jsx)(`button`,{...a,type:n,"aria-pressed":i,className:B(jg.Root,jg.sizes[t],jg.variants[r],e)})}var Ng={Root:`group/checkbox relative inline-flex size-3.5 flex-none align-middle`,Input:B(`peer absolute inset-0 z-(--hub-z-raised) m-0 size-full cursor-pointer opacity-0`,`disabled:cursor-default`),Surface:B(`pointer-events-none box-border grid size-full place-items-center rounded-hub-sm border border-solid`,`border-hub-border-strong bg-transparent text-hub-primary-contrast`,`transition-colors duration-(--hub-duration-fast) ease-out motion-reduce:transition-none`,`peer-checked:border-hub-primary-solid peer-checked:bg-hub-primary-solid`,`peer-indeterminate:border-hub-primary-solid peer-indeterminate:bg-hub-primary-solid`,`peer-[:enabled:hover]:border-hub-primary-solid-hover`,Og,`peer-disabled:opacity-50`),Check:`hidden [grid-area:1/1] group-has-[:checked:not(:indeterminate)]/checkbox:block`,Mixed:`hidden [grid-area:1/1] group-has-[:indeterminate]/checkbox:block`};function Pg({indeterminate:e=!1,className:t,ref:n,...r}){let i=(0,p.useRef)(null),a=(0,p.useCallback)(e=>{if(i.current=e,typeof n==`function`)return n(e);n&&(n.current=e)},[n]);return(0,p.useLayoutEffect)(()=>{i.current&&(i.current.indeterminate=e)},[e]),(0,R.jsxs)(`span`,{className:B(Ng.Root,t),children:[(0,R.jsx)(`input`,{...r,ref:a,type:`checkbox`,className:Ng.Input}),(0,R.jsxs)(`span`,{className:Ng.Surface,"aria-hidden":`true`,children:[(0,R.jsx)(ys,{className:Ng.Check,size:12,strokeWidth:2.5}),(0,R.jsx)(ks,{className:Ng.Mixed,size:12,strokeWidth:2.5})]})]})}var Fg={Root:`pointer-events-none block flex-none`,orientations:{horizontal:`h-(--hub-hairline) w-full`,vertical:`w-(--hub-hairline) self-stretch`},tones:{default:`bg-hub-border`,subtle:`bg-hub-border-subtle`}};function Ig(e,t,n,r){return t?{[e]:0,left:n,right:n,width:r??`auto`}:{[e]:0,top:n,bottom:n,height:r}}function Lg(e,t,n){let r=n===void 0?{}:{alignSelf:`center`};if(!e)return{marginBlock:t,height:n,...r};let i=t?`calc(100% - ${t*2}px)`:void 0;return{marginInline:t,width:n??i,...r}}function Rg({orientation:e=`horizontal`,tone:t=`default`,edge:n,inset:r=0,length:i,className:a,style:o,...s}){let c=n?n===`left`||n===`right`?`vertical`:`horizontal`:e,l=c===`horizontal`,u=n?Ig(n,l,r,i):Lg(l,r,i);return(0,R.jsx)(`span`,{...s,"aria-hidden":`true`,"data-divider":``,"data-orientation":c,"data-tone":t,"data-edge":n,className:B(Fg.Root,Fg.orientations[c],Fg.tones[t],n&&`absolute`,a),style:{...u,...o}})}var zg=`pointer-events-none absolute inset-y-0 left-[calc((var(--hub-hit-area)_-_1px)_/_2)]`,Bg={Root:B(`group/resize absolute z-(--hub-z-raised) w-(--hub-hit-area) touch-none select-none cursor-col-resize outline-none`),edges:{left:`left-[calc(var(--hub-hit-area)_/_-2)]`,right:`right-[calc(var(--hub-hit-area)_/_-2)]`},Line:B(zg,`[&]:bg-hub-border-control`),Feedback:B(zg,`w-px origin-left scale-x-50 overflow-hidden bg-hub-border-control opacity-0`,`[mask-image:linear-gradient(transparent,black_10%,black_90%,transparent)]`,`transition-opacity duration-(--hub-duration-slow) ease-in-out motion-reduce:transition-none`,`group-hover/resize:opacity-100 group-data-[dragging=true]/resize:opacity-100`,`group-focus-visible/resize:opacity-100`),Gradient:B(`absolute -top-1/2 left-0 h-[200%] w-full bg-hub-fg`,`[mask-image:linear-gradient(transparent_5%,black_40%,black_60%,transparent_95%)]`),DragShield:`fixed inset-0 z-(--hub-z-overlay) cursor-col-resize`};function Vg({label:e,controls:t,value:n,min:r,max:i,defaultValue:a,step:o=16,showDivider:s=!0,inset:c=0,edge:l=`right`,onChange:u,className:d,style:f,...m}){let h=l===`right`?1:-1,g=(0,p.useRef)(void 0),_=(0,p.useRef)(null),v=e=>{let t=e.currentTarget.getBoundingClientRect();_.current&&(_.current.style.transform=`translateY(${e.clientY-t.top-t.height/2}px)`)},[y,b]=(0,p.useState)(!1),x=e=>u(Math.max(r,Math.min(i,e)));return(0,R.jsxs)(`div`,{...m,role:`separator`,"aria-label":e,"aria-controls":t,"aria-orientation":`vertical`,"aria-valuemin":r,"aria-valuemax":i,"aria-valuenow":n,tabIndex:0,className:B(Bg.Root,Bg.edges[l],d),style:{insetBlock:c,...f},"data-resize-handle":!0,"data-dragging":y,onDoubleClick:()=>{a!==void 0&&x(a)},onKeyDown:e=>{let t={Home:r,End:i,ArrowLeft:n-o*h,ArrowRight:n+o*h}[e.key];t!==void 0&&(e.preventDefault(),e.stopPropagation(),x(t))},onPointerEnter:v,onPointerDown:e=>{e.button===0&&e.isPrimary&&!g.current&&(e.preventDefault(),v(e),e.currentTarget.focus(),e.currentTarget.setPointerCapture(e.pointerId),g.current={pointerId:e.pointerId,x:e.clientX,width:n},b(!0))},onPointerMove:e=>{v(e);let t=g.current;t?.pointerId===e.pointerId&&x(t.width+(e.clientX-t.x)*h)},onPointerUp:e=>{g.current?.pointerId===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),g.current=void 0,b(!1))},onLostPointerCapture:()=>{g.current=void 0,b(!1)},onPointerCancel:()=>{g.current=void 0,b(!1)},children:[s&&(0,R.jsx)(Rg,{orientation:`vertical`,className:Bg.Line}),(0,R.jsx)(`span`,{"aria-hidden":!0,className:Bg.Feedback,children:(0,R.jsx)(`span`,{ref:_,className:Bg.Gradient})}),y?(0,R.jsx)(`div`,{"aria-hidden":!0,className:Bg.DragShield}):null]})}var Hg={Viewport:B(`fixed bottom-6 right-6 z-(--hub-z-toast)`,`flex max-w-[calc(100vw_-_var(--hub-float-gutter)_*_2)] flex-col items-end gap-2`),Root:B(`max-w-full`,`animate-[hub-toast-in_var(--hub-duration-enter)_ease]`,`data-closing:pointer-events-none data-closing:animate-[hub-toast-out_var(--hub-duration-exit)_ease_forwards]`,`motion-reduce:animate-none motion-reduce:data-closing:animate-none`),Card:B(`relative box-border flex w-96 max-w-[min(100%,calc(100vw_-_var(--hub-float-gutter)_*_2))] items-start gap-2`,`rounded-hub-lg border-(length:--hub-hairline) border-solid border-transparent bg-hub-bg-panel p-3`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]`,`after:shadow-hub-md after:ring-(length:--hub-hairline) after:ring-hub-border-subtle`,`font-sans text-hub-md leading-4 text-hub-fg-muted antialiased`),icons:{info:B(`size-4 shrink-0 text-hub-fg-muted [&_circle]:fill-current`,`[&_path]:stroke-hub-bg-panel [&_line]:stroke-hub-bg-panel`),success:B(`grid size-4 shrink-0 place-items-center rounded-full`,`bg-hub-success-solid text-hub-success-contrast`),error:`size-4 shrink-0 text-hub-error-solid`},Content:`min-w-0 flex-1 break-words`,Message:`font-medium leading-[normal] text-hub-fg-title`,Description:`mt-2 line-clamp-2 leading-5 text-hub-fg-muted`,Action:B(`mt-3 block cursor-pointer border-0 bg-transparent p-0`,`font-sans text-hub-md leading-5 text-hub-primary-solid`,`enabled:hover:underline`,Dg,`disabled:cursor-not-allowed disabled:opacity-50`),Close:`-m-1 enabled:hover:bg-hub-bg-hover-subtle enabled:hover:text-hub-fg-control`};function Ug(e,t){return getComputedStyle(e).getPropertyValue(t).trim()}function Wg(e,t){return parseFloat(Ug(e,t))}function Gg(e,t){let n=Ug(e,t);return(n.endsWith(`ms`)?parseFloat(n):parseFloat(n)*1e3)||0}var Kg=()=>matchMedia(`(prefers-reduced-motion: reduce)`).matches;function qg({message:e,description:t,variant:n=`info`,action:r,duration:i=n===`error`?8e3:4e3,revision:a=0,closeLabel:o,onDismiss:s,className:c,onMouseEnter:l,onMouseLeave:u,onFocus:d,onBlur:f,...m}){let h=(0,p.useRef)(null),g=(0,p.useRef)(a),_=(0,p.useRef)(s);_.current=s;let[v,y]=(0,p.useState)(!1),[b,x]=(0,p.useState)(!1),[S,C]=(0,p.useState)(!1),[w,T]=(0,p.useState)(!1),E=v||b;(0,p.useEffect)(()=>{if(g.current===a)return;g.current=a,T(!1);let e=h.current;if(!e||Kg())return;let t=e.animate([{transform:`scale(1)`,easing:`ease-out`,offset:0},{transform:`scale(1.05)`,easing:`linear`,offset:.125},{transform:`scale(1.05)`,easing:`ease-in-out`,offset:.25},{transform:`scale(1)`,offset:1}],{duration:Gg(e,`--hub-duration-emphasis`)});return()=>t.cancel()},[a]),(0,p.useEffect)(()=>{if(!i||E||S)return;let e=setTimeout(()=>T(!0),i);return()=>clearTimeout(e)},[i,a,E,S]),(0,p.useEffect)(()=>{if(!w)return;let e=!1,t=h.current?.parentElement?.getAnimations()??[];return Promise.allSettled(t.map(e=>e.finished)).then(()=>{e||_.current()}),()=>{e=!0}},[w]);let D=async()=>{if(!S&&r){C(!0);try{await r.onClick(),T(!0)}finally{C(!1)}}};return(0,R.jsx)(`div`,{...m,className:B(Hg.Root,c),"data-closing":w||void 0,onMouseEnter:e=>{y(!0),l?.(e)},onMouseLeave:e=>{y(!1),u?.(e)},onFocus:e=>{x(!0),d?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||x(!1),f?.(e)},children:(0,R.jsxs)(`div`,{ref:h,className:Hg.Card,"data-variant":n,"data-expanded":!!(t||r)||void 0,children:[(0,R.jsx)(`span`,{className:Hg.icons[n],children:n===`success`?(0,R.jsx)(ys,{size:11,strokeWidth:3,"aria-hidden":!0}):n===`error`?(0,R.jsx)(Ts,{size:16,"aria-hidden":!0}):(0,R.jsx)(Ds,{size:16,"aria-hidden":!0})}),(0,R.jsxs)(`div`,{className:Hg.Content,children:[(0,R.jsx)(`div`,{role:n===`error`?`alert`:`status`,"aria-atomic":`true`,className:Hg.Message,children:e}),t&&(0,R.jsx)(`div`,{className:Hg.Description,children:t}),r&&(0,R.jsx)(`button`,{type:`button`,className:Hg.Action,disabled:S,onClick:()=>void D(),children:r.label})]}),(0,R.jsx)(Mg,{variant:`ghost`,size:`sm`,className:Hg.Close,"aria-label":o,disabled:S,onClick:()=>T(!0),children:(0,R.jsx)(js,{"aria-hidden":!0})})]})})}function Jg({store:e,closeLabel:t,className:n,...r}){let i=(0,p.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot);return i.length===0?null:(0,R.jsx)(`div`,{role:`region`,...r,className:B(Hg.Viewport,n),children:i.map(({id:n,options:{onClose:r,...i},revision:a})=>(0,R.jsx)(qg,{...i,revision:a,closeLabel:t,onDismiss:()=>e.dismiss(n)},n))})}var Yg=(e,t)=>e.message===t.message&&e.description===t.description&&(e.variant??`info`)===(t.variant??`info`)&&!e.action&&!t.action,Xg=class{items=[];listeners=new Set;max;nextId=0;constructor(e={}){this.max=Math.max(1,e.max??1)}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.items;show(e){let t=this.items.find(t=>Yg(t.options,e));if(t)return this.commit(this.items.map(n=>n===t?{...n,options:e,revision:n.revision+1}:n)),t.id;let n=`toast-${++this.nextId}`;return this.commit([...this.items,{id:n,options:e,revision:0}].slice(-this.max)),n}dismiss(e){let t=e===void 0?[]:this.items.filter(t=>t.id!==e);t.length!==this.items.length&&this.commit(t)}commit(e){let t=this.items.filter(t=>!e.some(({id:e})=>e===t.id));this.items=e;for(let e of[...this.listeners])e();for(let e of t)e.options.onClose?.()}};function Zg(e){return{gutter:Wg(e,`--hub-menu-gutter`),maxHeight:Wg(e,`--hub-menu-max-height`),affordance:Wg(e,`--hub-scroll-affordance`)}}function Qg({placement:e=`auto`,trigger:t,viewport:n,metrics:r,panelWidth:i,borderHeight:a,contentHeight:o,row:s}){let{gutter:c,maxHeight:l,affordance:u}=r,d=s?.height??t.height,f=s?.top??0,p=Math.min(Math.max(t.width,i),n.width-c*2),m=Math.max(c,Math.min(t.left,n.width-p-c)),h=t.top+t.height/2,g=f+d/2,_=h-g,v=Math.min(o,l,n.height-c*2);if(e===`bottom`){let e=Math.max(0,Math.min(v,n.height-t.bottom-c-a));return{placement:`below`,top:t.bottom,left:m,width:p,maxHeight:e,scrollTop:Math.max(0,g-e/2)}}if(h-c>=u+d/2&&n.height-c-h>=u+d/2){let e=Math.max(c,_),t=Math.min(v,o-Math.max(0,e-_)),r=Math.min(t,n.height-c-e),i=s?.hasNext?u:o-(f+d);return h-e>r-i-d/2&&(e=h-r+i+d/2),{placement:`aligned`,top:e,left:m,width:p,maxHeight:Math.max(d,r),scrollTop:Math.max(0,g-(h-e))}}let y=n.height-t.bottom-c,b=t.top-c,x=y>=v||y>=b,S=Math.min(v,x?y:b),C=Math.max(d,S),w=x?t.bottom:t.top-Math.min(o,C)-a;return{placement:x?`below`:`above`,top:w,left:m,width:p,maxHeight:C,scrollTop:Math.max(0,g-S/2)}}var $g={Root:`inline-flex min-w-0 align-middle`,Trigger:B(`relative inline-flex min-w-0 items-center gap-2 box-border cursor-default`,`rounded-(--hub-radius-md) border-(length:--hub-hairline) border-solid border-transparent shadow-hub-sm`,`bg-hub-bg-panel text-hub-fg-control font-sans font-normal`,`px-2.5 outline-none focus-visible:outline-offset-0 enabled:hover:bg-hub-bg-hover enabled:hover:shadow-none aria-expanded:bg-hub-bg-muted`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] enabled:hover:after:shadow-hub-sm-hover`,`disabled:opacity-50 disabled:pointer-events-none`,Dg),Size:{small:`h-(--hub-control-height-sm) text-hub-sm`,default:`h-(--hub-control-height-md) text-hub-md`},Font:{small:`text-hub-sm`,default:`text-hub-md`},Row:{small:`h-(--hub-control-height-sm)`,default:`h-(--hub-row-height-md)`},Label:`min-w-0 flex-1 truncate text-left`,Icon:`inline-flex shrink-0 items-center justify-center`,Chevron:B(`pointer-events-none h-2 w-2.5 shrink-0 scale-180 text-hub-fg-muted`,`[&>path]:origin-center [&>path]:scale-x-90 [&>path]:scale-y-80 [&>path]:stroke-[3.5]`),Check:`size-4 shrink-0 text-hub-fg-muted`,Popup:B(`fixed inset-auto m-0 p-0 box-border w-max max-w-[calc(100vw-var(--hub-menu-gutter)*2)]`,`overflow-hidden rounded-hub-lg border-0 bg-hub-bg-panel text-hub-fg-control outline-none`,`ring-(length:--hub-hairline) ring-hub-border-control shadow-hub-md`,`font-sans font-normal`),List:`relative box-border overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,Option:B(`relative flex box-border cursor-default items-center gap-2 px-2 aria-[selected=false]:pe-8 rounded-(--hub-radius-md)`,`whitespace-nowrap outline-none data-active:bg-hub-bg-hover aria-disabled:opacity-40`,`[&>.lucide-check>path]:origin-center [&>.lucide-check>path]:scale-x-80 [&>.lucide-check>path]:scale-y-89 [&>.lucide-check>path]:translate-y-px`,`[&>.lucide-check>path]:[vector-effect:non-scaling-stroke] [&>.lucide-check>path]:stroke-[1.5]`),Scroll:B(`absolute inset-x-0 z-(--hub-z-raised) flex h-(--hub-scroll-affordance) items-center justify-center`,`cursor-default text-hub-fg-muted backdrop-blur-sm`),ScrollTop:`top-0 bg-linear-to-b from-hub-bg-panel via-hub-bg-panel/90 to-hub-bg-panel/50`,ScrollBottom:`bottom-0 bg-linear-to-t from-hub-bg-panel via-hub-bg-panel/90 to-hub-bg-panel/50`},e_=e=>e.scrollTop<=1,t_=e=>e.scrollTop+e.clientHeight>=e.scrollHeight-1;function n_(e){let[t,n]=(0,p.useState)({top:!1,bottom:!1}),r=(0,p.useRef)(void 0),i=()=>{let t=e.current;if(!t)return;let r=!e_(t),i=!t_(t);n(e=>e.top===r&&e.bottom===i?e:{top:r,bottom:i})},a=()=>{clearInterval(r.current),r.current=void 0};return(0,p.useEffect)(()=>a,[]),{edges:t,update:i,start:t=>{a();let n=t===`top`?-1:1;r.current=setInterval(()=>{let t=e.current;t?(t.scrollBy({top:n*4}),(n<0?t.scrollTop<=0:t_(t))&&a()):a()},16)},stop:a}}function r_({value:e,defaultValue:t,onValueChange:n,trigger:r,form:i}){let[a,o]=(0,p.useState)(t??``),s=e!==void 0,c=e??a;return(0,p.useEffect)(()=>{let e=r.current?.form;if(!e||s)return;let n=new Set,i=e=>{let r=setTimeout(()=>{n.delete(r),e.defaultPrevented||o(t??``)});n.add(r)};return e.addEventListener(`reset`,i),()=>{e.removeEventListener(`reset`,i),n.forEach(clearTimeout)}},[s,t,i,r]),{current:c,commit:e=>{s||o(e),e!==c&&n?.(e)}}}var i_=new Set([`ArrowDown`,`ArrowUp`,`Enter`,` `]),a_=new Set([`ArrowDown`,`ArrowUp`,`Home`,`End`,`Enter`,` `,`Escape`]),o_=[{side:`top`,className:$g.ScrollTop,Icon:Cs},{side:`bottom`,className:$g.ScrollBottom,Icon:xs}];function s_({icon:e,label:t}){return(0,R.jsxs)(R.Fragment,{children:[e&&(0,R.jsx)(`span`,{className:$g.Icon,children:e}),(0,R.jsx)(`span`,{className:$g.Label,children:t})]})}function c_({options:e,value:t,defaultValue:n,onValueChange:r,size:i=`default`,placement:a=`auto`,placeholder:o=`请选择`,name:s,disabled:c,className:l,onKeyDown:u,onClick:d,...f}){let m=(0,p.useRef)(null),h=(0,p.useRef)(null),g=(0,p.useRef)(null),_=(0,p.useRef)(void 0),{current:v,commit:y}=r_({value:t,defaultValue:n,onValueChange:r,trigger:m,form:f.form}),b=n_(g),[x,S]=(0,p.useState)(!1),[C,w]=(0,p.useState)(-1),T=(0,p.useId)(),E=e.findIndex(e=>e.value===v),D=e[E],O=c||!e.length,ee=e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),k=e.map(e=>[e.value,e.label,+!!e.disabled].join(`\0`)).join(``),A=()=>{b.stop(),S(!1)},te=(e=!0)=>{A(),h.current?.matches(`:popover-open`)&&h.current.hidePopover(),e&&m.current?.focus({preventScroll:!0})},ne=t=>{let n=e[t];n&&!n.disabled&&(y(n.value),te())},j=e=>{w(e);let t=g.current,n=t?.children[e];if(!t||!n)return;let r=_.current?.affordance??0,i=n.offsetTop;i<t.scrollTop+r?t.scrollTop=Math.max(0,i-r):i+n.offsetHeight>t.scrollTop+t.clientHeight-r&&(t.scrollTop=i+n.offsetHeight-t.clientHeight+r),b.update()},M=e=>{let{key:t}=e;if(!x)i_.has(t)&&(e.preventDefault(),S(!0));else if(t===`Tab`)te();else if(a_.has(t)){if(e.preventDefault(),e.stopPropagation(),t===`Escape`)te();else if(t===`Enter`||t===` `)ne(C);else if(t===`Home`)j(ee[0]??-1);else if(t===`End`)j(ee.at(-1)??-1);else{let e=ee.indexOf(C)+(t===`ArrowDown`?1:-1);j(ee[Math.max(0,Math.min(ee.length-1,e))]??-1)}}},N=e=>{d?.(e),!e.defaultPrevented&&(x?te():S(!0))},re=e=>{u?.(e),e.defaultPrevented||M(e)},ie=e=>{e.newState===`closed`&&A()};return(0,p.useLayoutEffect)(()=>{if(!x||O)return;let e=h.current,t=g.current;e.showPopover(),e.style.visibility=`hidden`,e.style.width=``,t.style.maxHeight=``,t.scrollTop=0;let n=D&&!D.disabled?E:ee[0]??-1;w(n),_.current=Zg(e);let r=t.children[Math.max(0,n)],i=e.getBoundingClientRect(),o=Qg({placement:a,trigger:m.current.getBoundingClientRect(),viewport:{width:window.innerWidth,height:window.innerHeight},metrics:_.current,panelWidth:i.width,borderHeight:i.height-t.getBoundingClientRect().height,contentHeight:t.scrollHeight,row:r&&{top:r.offsetTop,height:r.offsetHeight,hasNext:!!r.nextElementSibling}});return e.dataset.placement=o.placement,e.style.top=`${o.top}px`,e.style.left=`${o.left}px`,e.style.width=`${o.width}px`,t.style.maxHeight=`${o.maxHeight}px`,t.scrollTop=o.scrollTop,e.style.visibility=``,e.focus({preventScroll:!0}),b.update(),b.stop},[x,O,k,a]),(0,p.useEffect)(()=>{if(!x||O)return;let e=h.current,t=()=>te(!1),n=n=>{e.contains(n.target)||t()};return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,n,!0)}},[x,O]),(0,p.useEffect)(()=>{O&&te(!1)},[O]),(0,R.jsxs)(`span`,{className:$g.Root,children:[s&&(0,R.jsx)(`input`,{type:`hidden`,name:s,form:f.form,value:v,disabled:O}),(0,R.jsxs)(`button`,{...f,ref:m,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":x,"aria-controls":T,disabled:O,className:B($g.Trigger,$g.Size[i],l),"data-size":i,onClick:N,onKeyDown:re,children:[(0,R.jsx)(s_,{icon:D?.icon,label:D?.label??o}),(0,R.jsx)(xs,{className:$g.Chevron,"aria-hidden":`true`})]}),(0,R.jsxs)(`div`,{ref:h,popover:`auto`,id:T,role:`listbox`,tabIndex:-1,"aria-label":f[`aria-label`],"aria-labelledby":f[`aria-labelledby`],"aria-activedescendant":C>=0?`${T}-${C}`:void 0,className:B($g.Popup,$g.Font[i]),"data-size":i,onKeyDown:M,onToggle:ie,children:[(0,R.jsx)(`div`,{ref:g,className:$g.List,onScroll:b.update,children:e.map((e,t)=>(0,R.jsxs)(`div`,{id:`${T}-${t}`,role:`option`,"aria-selected":v===e.value,"aria-disabled":e.disabled||void 0,"data-active":C===t||void 0,"data-value":e.value,className:B($g.Option,$g.Row[i]),onPointerMove:n=>{(n.movementX||n.movementY)&&w(e.disabled?-1:t)},onClick:()=>ne(t),children:[(0,R.jsx)(s_,{icon:e.icon,label:e.label}),v===e.value&&(0,R.jsx)(ys,{className:$g.Check,"aria-hidden":`true`})]},e.value))}),o_.map(({side:e,className:t,Icon:n})=>b.edges[e]&&(0,R.jsx)(`div`,{"aria-hidden":`true`,className:B($g.Scroll,t),onPointerEnter:()=>b.start(e),onPointerLeave:b.stop,onPointerDown:e=>e.preventDefault(),children:(0,R.jsx)(n,{className:$g.Check})},e))]})]})}var l_=[`Control`,`Alt`,`Shift`,`Meta`],u_={"⌘":`meta`,cmd:`meta`,command:`meta`,meta:`meta`,ctrl:`control`,control:`control`,"⌃":`control`,alt:`alt`,option:`alt`,"⌥":`alt`,shift:`shift`,"⇧":`shift`,esc:`escape`,escape:`escape`,enter:`enter`,return:`enter`,"↵":`enter`,space:` `,spacebar:` `,"␣":` `,"↑":`arrowup`,"↓":`arrowdown`,"←":`arrowleft`,"→":`arrowright`},d_=new Set([`process`,`dead`,`unidentified`]);function f_(e){let t=e.toLowerCase();return u_[t.trim()]??t}var p_=class{coordinator;host;hover=!1;popupHover=!1;focus=!1;shortcut=!1;disabled=!1;openTimer;closeTimer;constructor(e,t){this.coordinator=e,this.host=t}get wanted(){return!this.disabled&&(this.hover||this.popupHover||this.focus)}delay(e){let t=this.host.trigger();return t?Gg(t,e):0}clearClose(){window.clearTimeout(this.closeTimer),this.closeTimer=void 0}enter(){this.hover=!0,this.coordinator.request(this,!1)}leave(){this.hover=!1,this.coordinator.release(this,!0)}popupEnter(){this.popupHover=!0,this.coordinator.request(this,!1)}popupLeave(){this.popupHover=!1,this.coordinator.release(this,!0)}focusIn(){this.focus=!0,this.coordinator.request(this,!0)}focusOut(){this.focus=!1,this.coordinator.release(this,!1)}dismiss(){this.coordinator.dismiss(this)}setDisabled(e){this.disabled=e,e&&this.dismiss()}setShortcut(e){this.shortcut!==e&&(this.shortcut=e,this.coordinator.countShortcut(e?1:-1))}isPressed(e){return this.coordinator.isPressed(e)}dispose(){this.coordinator.unregister(this)}},m_=class{document;onEmpty;handles=new Set;visible=null;pending=null;skipUntil=0;shortcuts=0;modifiers=new Set;keys=new Map;composing=!1;constructor(e,t){this.document=e,this.onEmpty=t}register(e){let t=new p_(this,e);return this.handles.size||this.listen(!0),this.handles.add(t),t}unregister(e){this.handles.delete(e)&&(this.dismiss(e),e.setShortcut(!1),!this.handles.size&&(this.listen(!1),this.skipUntil=0,this.onEmpty()))}request(e,t){e.wanted&&(this.visible===e?e.clearClose():t||this.visible||performance.now()<this.skipUntil?this.show(e):this.pending!==e&&(this.cancelPending(),this.pending=e,e.openTimer=window.setTimeout(()=>{this.pending===e&&(this.pending=null,this.handles.has(e)&&e.wanted&&this.show(e))},e.delay(`--hub-delay-open`))))}release(e,t){e.wanted||(this.pending===e&&this.cancelPending(),this.visible===e&&(e.clearClose(),t?e.closeTimer=window.setTimeout(()=>{e.wanted||this.hide(e)},e.delay(`--hub-duration-fast`)):this.hide(e)))}dismiss(e){e.hover=e.popupHover=e.focus=!1,this.pending===e&&this.cancelPending(),this.hide(e)}countShortcut(e){this.shortcuts+=e,this.shortcuts||this.clearKeys()}isPressed(e){let t=f_(e);if(this.modifiers.has(t))return!0;for(let e of this.keys.values())if(e===t)return!0;return!1}show(e){this.cancelPending();let t=this.visible;t!==e&&(this.visible=e,t&&(t.clearClose(),t.host.onOpenChange(!1)),e.host.onOpenChange(!0))}hide(e){e.clearClose(),this.visible===e&&(this.visible=null,this.skipUntil=performance.now()+e.delay(`--hub-delay-skip`),e.host.onOpenChange(!1))}cancelPending(){this.pending&&=(window.clearTimeout(this.pending.openTimer),null)}dismissAll(){this.pending&&this.dismiss(this.pending),this.visible&&this.dismiss(this.visible)}keyState(){return[...this.modifiers,``,...this.keys.values()].join(`\0`)}clearKeys(){(this.modifiers.size||this.keys.size)&&(this.modifiers.clear(),this.keys.clear(),this.visible?.host.onKeysChange())}onKey=e=>{if(!this.shortcuts)return;let t=this.keyState(),n=e.type===`keydown`,r=e.key.toLowerCase(),i=new Set;for(let t of l_)e.getModifierState(t)&&i.add(t.toLowerCase());let a=l_.some(e=>e.toLowerCase()===r);n&&a&&i.add(r),this.modifiers=i;let o=e.code||r;n?a||this.composing||e.isComposing||d_.has(r)||this.keys.set(o,r):(this.keys.delete(o),r===`meta`&&this.keys.clear()),this.keyState()!==t&&this.visible?.host.onKeysChange()};onComposition=e=>{this.composing=e.type===`compositionstart`,this.composing&&this.keys.size&&(this.keys.clear(),this.visible?.host.onKeysChange())};onScroll=e=>{let t=e.target;for(let e of new Set([this.pending,this.visible])){let n=e?.host.trigger();e&&n&&t.contains(n)&&(e===this.visible&&e.focus&&e.host.reposition()||this.dismiss(e))}};onResize=()=>this.dismissAll();onInactive=e=>{e.type===`visibilitychange`&&!this.document.hidden||e.type===`blur`&&e.target!==this.document.defaultView||(this.dismissAll(),this.skipUntil=0,this.composing=!1,this.clearKeys())};listen(e){let t=this.document.defaultView,n=(t,n,r)=>{e?t?.addEventListener(n,r,!0):t?.removeEventListener(n,r,!0)};n(this.document,`keydown`,this.onKey),n(this.document,`keyup`,this.onKey),n(this.document,`compositionstart`,this.onComposition),n(this.document,`compositionend`,this.onComposition),n(this.document,`visibilitychange`,this.onInactive),n(t,`blur`,this.onInactive),n(t,`resize`,this.onResize),n(t,`scroll`,this.onScroll),e||this.clearKeys()}},h_=new WeakMap;function g_(e,t){let n=h_.get(e);return n||(n=new m_(e,()=>h_.delete(e)),h_.set(e,n)),n.register(t)}var __={top:`bottom`,bottom:`top`,left:`right`,right:`left`};function v_({trigger:e,panel:t,margin:n,viewport:r,side:i,align:a,rtl:o}){let s=t.width+n*2,c=t.height+n*2,l={top:e.top,bottom:r.height-e.bottom,left:e.left,right:r.width-e.right},u=i===`top`||i===`bottom`,d=__[i],f=l[i]<(u?c:s)&&l[d]>l[i]?d:i,p=f===`top`?e.top-c:f===`bottom`?e.bottom:f===`left`?e.left-s:e.right,m=u?e.left:e.top,h=u?e.width:e.height,g=u?s:c,_=u&&o&&a!==`center`?a===`start`?`end`:`start`:a,v=_===`start`?m-n:_===`end`?m+h-g+n:m+(h-g)/2,y=(e,t)=>Math.round(Math.max(0,Math.min(e,t)));return{side:f,top:y(u?p:v,r.height-c),left:y(u?v:p,r.width-s)}}var y_={Popup:B(`fixed inset-auto m-1.5 box-border w-max border-(length:--hub-hairline) border-solid border-hub-border-panel px-2 py-1.25`,`max-w-[min(var(--hub-float-width),calc(100vw-var(--hub-float-gutter)))]`,`max-h-[calc(100vh-var(--hub-float-gutter))] overflow-x-hidden overflow-y-auto overscroll-contain`,`open:inline-flex items-center-safe gap-2`,`rounded-(--hub-radius-md) bg-hub-bg-panel text-hub-fg-control shadow-hub-xs`,`font-sans font-[450] text-hub-xs leading-normal text-left`,`transition-opacity duration-(--hub-duration-fast) starting:opacity-0 motion-reduce:transition-none`),Content:`min-w-0 whitespace-normal wrap-anywhere`,Keys:`-mr-0.5 inline-flex shrink-0 items-center gap-0.5`,Kbd:B(`inline-flex min-w-4.5 box-border items-center justify-center p-0.5`,`rounded-(--hub-radius-compact) border-(length:--hub-hairline) border-solid border-hub-border-panel`,`bg-transparent text-hub-fg-muted font-sans text-hub-xs font-normal leading-[1.1]`,`transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,`data-pressed:bg-hub-bg-emphasized`)};function b_(e,t){return n=>{e?.(n),t(n)}}function x_(e,t,n){let r=Math.max(t.top,0),i=Math.max(t.left,0),a=Math.min(t.bottom,n.height),o=Math.min(t.right,n.width);for(let t=e;t&&t!==e.ownerDocument.documentElement;t=t.parentElement){if(t!==e){let{overflowX:e,overflowY:n}=getComputedStyle(t);if(e!==`visible`||n!==`visible`){let s=t.getBoundingClientRect();n!==`visible`&&(r=Math.max(r,s.top),a=Math.min(a,s.bottom)),e!==`visible`&&(i=Math.max(i,s.left),o=Math.min(o,s.right))}}if(t.matches(`:popover-open, :modal, :fullscreen`))break}return a>r&&o>i}function S_({children:e,content:t,shortcut:n,side:r=`bottom`,align:i=`center`,disabled:a=!1}){let o=(0,p.useRef)(null),s=(0,p.useRef)(null),c=(0,p.useRef)(null),l=(0,p.useRef)(!1),u=(0,p.useRef)(()=>!1),[d,f]=(0,p.useState)(!1),[,m]=(0,p.useState)(0),h=(0,p.useId)(),g=e,_=g.props,v=n?.length?n:void 0,y=_.ref,b=(0,p.useCallback)(e=>{if(o.current=e,typeof y==`function`){let t=y(e);if(typeof t==`function`)return()=>{o.current=null,t()}}else y&&(y.current=e)},[y]);(0,p.useLayoutEffect)(()=>{u.current=()=>{let e=o.current,t=s.current;if(!e||!t)return!1;let n=e.ownerDocument.documentElement,a={width:n.clientWidth,height:n.clientHeight},c=e.getBoundingClientRect(),l=getComputedStyle(t),u=v_({trigger:c,panel:t.getBoundingClientRect(),margin:parseFloat(l.marginTop)||0,viewport:a,side:r,align:i,rtl:l.direction===`rtl`});return t.dataset.side=u.side,t.style.top=`${u.top}px`,t.style.left=`${u.left}px`,x_(e,c,a)}}),(0,p.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=g_(e.ownerDocument,{trigger:()=>o.current,onOpenChange:f,onKeysChange:()=>m(e=>e+1),reposition:()=>u.current()});return c.current=t,()=>{c.current=null,t.dispose()}},[]),(0,p.useLayoutEffect)(()=>{c.current?.setShortcut(!!v)},[!!v]),(0,p.useLayoutEffect)(()=>{c.current?.setDisabled(a)},[a]),(0,p.useLayoutEffect)(()=>{let e=s.current;if(!d||!e)return;e.showPopover(),u.current();let t=new ResizeObserver(()=>u.current());return t.observe(e),()=>{t.disconnect(),e.matches(`:popover-open`)&&e.hidePopover()}},[d]),(0,p.useLayoutEffect)(()=>{d&&u.current()},[r,i]);let x=a?_[`aria-describedby`]:[...new Set([..._[`aria-describedby`]?.split(/\s+/).filter(Boolean)??[],h])].join(` `),S=()=>{l.current=!1};return(0,R.jsxs)(R.Fragment,{children:[(0,p.cloneElement)(g,{ref:b,"aria-describedby":x,onPointerEnter:b_(_.onPointerEnter,e=>{e.pointerType!==`touch`&&c.current?.enter()}),onPointerLeave:b_(_.onPointerLeave,()=>{S(),c.current?.leave()}),onPointerDown:b_(_.onPointerDown,()=>{l.current=!0}),onPointerUp:b_(_.onPointerUp,S),onPointerCancel:b_(_.onPointerCancel,S),onFocus:b_(_.onFocus,e=>{!l.current&&e.target.matches(`:focus-visible`)&&c.current?.focusIn()}),onBlur:b_(_.onBlur,e=>{e.currentTarget.contains(e.relatedTarget)||c.current?.focusOut()}),onClick:b_(_.onClick,()=>c.current?.dismiss())}),!a&&(0,R.jsxs)(`span`,{ref:s,id:h,role:`tooltip`,popover:`manual`,tabIndex:-1,className:y_.Popup,onPointerEnter:()=>c.current?.popupEnter(),onPointerLeave:()=>c.current?.popupLeave(),children:[(0,R.jsx)(`span`,{className:y_.Content,children:t}),v&&(0,R.jsx)(`span`,{className:y_.Keys,children:v.map((e,t)=>(0,R.jsx)(`kbd`,{className:y_.Kbd,"data-pressed":d&&c.current?.isPressed(e)||void 0,children:e},t))})]})]})}B(`pointer-events-none box-border flex size-full items-center rounded-full bg-hub-bg-inactive p-0.75`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,`peer-checked:bg-hub-primary-solid peer-disabled:opacity-50`,Og,`peer-[:enabled:hover:not(:checked)]:bg-hub-bg-inactive-hover peer-[:enabled:hover:checked]:bg-hub-primary-solid-hover`),B(`block size-3.5 rounded-full bg-hub-primary-contrast`,`transition-transform duration-(--hub-duration-normal) motion-reduce:transition-none`,`group-has-[:checked]/switch:translate-x-2.5`,`group-has-[:enabled:hover]/switch:w-4 group-has-[:enabled:hover:checked]/switch:translate-x-2`),B(`fixed inset-auto z-(--hub-z-overlay) m-0 box-border max-w-[calc(100vw-2*var(--hub-menu-gutter))] overflow-y-auto`,`rounded-(--hub-radius-lg) border-(length:--hub-hairline) border-solid border-hub-border-panel bg-hub-bg-panel py-1.5`,`font-sans text-hub-md leading-normal text-hub-fg-control shadow-hub-md outline-none`),B(`w-(--hub-popup-width-md) px-0`,`[&_[role=separator]>[data-divider]]:mx-0! [&_[role=separator]>[data-divider]]:w-full!`,`[&_[role=separator]>[data-divider]]:bg-hub-border-subtle`),B(`relative isolate flex h-8 w-full shrink-0 items-center gap-2 border-0 bg-transparent text-left`,`font-sans text-hub-md font-[450] whitespace-nowrap outline-none`,`disabled:cursor-not-allowed disabled:opacity-40 aria-disabled:cursor-not-allowed aria-disabled:opacity-40`,`[&>svg]:size-4 [&>svg]:shrink-0 [&>span]:min-w-0 [&>span]:truncate`),B(`m-0 py-0 pl-3.5 pr-4.5 leading-[normal]`,`before:pointer-events-none before:absolute before:inset-y-0 before:inset-x-1.5 before:-z-1 before:rounded-(--hub-radius-md) before:content-['']`,`[&:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible)]:before:bg-hub-bg-muted`),B(`rounded-(--hub-radius-inner) pl-2.5 pr-3.5 leading-5`,`[&:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible)]:bg-hub-bg-muted`),B(`opacity-0 transition-[opacity,color,background-color] duration-(--hub-duration-fast) motion-reduce:transition-none`,`group-hover/sidebar-group:opacity-100 group-focus-within/sidebar-group:opacity-100 focus-visible:opacity-100`,`[@media(hover:none)]:opacity-100`),B(`mb-px box-border flex h-7 w-full flex-none items-center gap-1.5 rounded-(--hub-radius-md)`,`border-0 py-0 pl-2.5 pr-[9px] text-left font-sans text-hub-md font-medium leading-4 no-underline`,`transition-colors duration-(--hub-duration-normal) motion-reduce:transition-none`,`[&>svg]:size-4 [&>svg]:shrink-0 focus-visible:-outline-offset-1`,Dg,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50`),B(`relative data-[dragging=true]:opacity-50`,`data-[drop-edge]:after:pointer-events-none data-[drop-edge]:after:absolute data-[drop-edge]:after:inset-x-2.5`,`data-[drop-edge]:after:h-0.5 data-[drop-edge]:after:bg-hub-focus-ring`,`data-[drop-edge=top]:after:top-0 data-[drop-edge=bottom]:after:bottom-0`),B(`flex h-full min-w-0 flex-1 items-center gap-1.5 border-0 bg-transparent p-0 text-left text-inherit no-underline`,Dg),rg.configure({preventActivation:(e,t)=>{if(!(e.target instanceof Element))return!1;if(e.target.closest(`[data-sidebar-trailing], [role=menu]`))return!0;let n=e.target.closest(`button`);return!!n&&n!==t.element&&!n.hasAttribute(`data-sidebar-control`)}});var C_=`h-(--hub-row-height-md) rounded-(--hub-radius-md) border-(length:--hub-hairline) border-solid border-hub-border-control`,w_=B(`focus-within:outline-1 focus-within:outline-solid focus-within:-outline-offset-1`,`focus-within:outline-hub-focus-ring aria-invalid:focus-within:outline-hub-error-solid`),T_={Base:B(`box-border min-w-0 w-full bg-hub-bg-control font-sans text-hub-md font-normal text-hub-fg-title`,`outline-none transition-colors duration-(--hub-duration-fast) motion-reduce:transition-none`,`aria-invalid:border-hub-error-solid disabled:cursor-not-allowed disabled:opacity-50`),Frame:C_,Focus:w_,Input:B(C_,w_,`block px-3 py-1.5 placeholder:text-hub-fg-placeholder`,`enabled:not-focus:not-aria-invalid:hover:border-hub-border-control-hover`)};B(T_.Base,T_.Frame,T_.Focus,`flex items-center`,`has-disabled:opacity-50 not-has-disabled:not-focus-within:not-aria-invalid:hover:border-hub-border-control-hover`),B(`inline-grid h-full shrink-0 place-items-center rounded-(--hub-radius-md) border-0 bg-transparent px-3`,`text-hub-fg-secondary focus-visible:-outline-offset-1 disabled:cursor-not-allowed`,Dg),B(T_.Base,T_.Focus,`block resize-y rounded-(--hub-radius-card) border-0 p-4`,`shadow-hub-sm placeholder:text-hub-fg-placeholder [&[rows="3"]]:min-h-30`,`aria-invalid:ring-1 aria-invalid:ring-hub-error-solid`),B(`relative m-0.5 flex h-7 min-w-0 flex-auto items-center justify-center gap-1.5 rounded-full border-(length:--hub-hairline) border-solid border-transparent px-3 py-1`,`bg-hub-bg-panel font-sans text-hub-sm font-medium leading-[normal] whitespace-nowrap text-hub-fg-muted`,`transition-[border,background-color,color] duration-(--hub-duration-normal)`,`before:absolute before:-inset-0.5 before:content-['']`,`after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:shadow-hub-sm after:transition-shadow after:duration-(--hub-duration-normal) after:content-['']`,`aria-selected:bg-hub-bg-selected aria-selected:text-hub-fg-title aria-selected:after:shadow-[0_0_0_var(--hub-hairline)_var(--hub-border-emphasized)]`,`[&:not([aria-selected=true]):enabled:hover]:bg-hub-bg-hover-subtle [&:not([aria-selected=true]):enabled:hover]:text-hub-fg-control`,`[&:not([aria-selected=true]):enabled:hover]:duration-0 [&:not([aria-selected=true]):enabled:hover]:after:duration-0`,`[&:not([aria-selected=true]):enabled:hover]:after:shadow-hub-sm-hover`,`focus:outline-none focus-visible:-outline-offset-1`,Dg,`disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none motion-reduce:after:transition-none`);var E_=ua(`notificationService`),D_=class extends Xg{},O_={ignoredBaseline:`baseline.ignored`,deleteBaseline:`baseline.delete`,module:{root:`module`,loading:`module.loading`,baseline:`view.baseline`,tasks:`view.tasks`,changes:`module.changes`,code:`module.code`,changelog:`module.changelog`,conformance:`module.conformance`,files:`module.files`,tooltip:e=>`module.tooltip.${e}`},conformance:{list:`conformance.list`,enabled:`conformance.enabled`,disabled:`conformance.disabled`,rule:e=>`conformance.rule.${e}`,readme:`conformance.readme`,state:`conformance.state`},changelog:{commits:`changelog.commits`,commit:e=>`changelog.commit.${e}`,review:e=>`changelog.review.${e}`,reviewCount:`changelog.reviewCount`,reviewFilter:`changelog.reviewFilter`,files:`changelog.files`,file:e=>`changelog.file.${e}`,detail:`changelog.detail`,empty:`changelog.empty`,editor:`changelog.editor`,scopes:`changelog.scopes`,entry:e=>`changelog.entry.${e}`,saveState:e=>`changelog.save.${e}`,retry:e=>`changelog.retry.${e}`,tag:e=>`changelog.tag.${e}`},files:{tree:`files.tree`,folderLoading:e=>`files.folderLoading.${e}`,file:e=>`files.file.${e}`,content:`files.content`,editor:`files.editor`,previous:`files.previous`,next:`files.next`},code:{tree:`code.tree`,scroll:`code.scroll`,file:e=>`code.file.${e}`,content:`code.content`,empty:`code.empty`,refresh:`code.refresh`,review:e=>`code.review.${e}`,reviewCount:`code.reviewCount`},changes:{tree:`changes.tree`,review:e=>`changes.review.${e}`,reviewCount:`changes.reviewCount`},visual:{stage:{root:`visual.stage`,image:e=>`visual.stage.image.${e}`,zoom:e=>`visual.stage.zoom.${e}`,approve:`approve`}},dialog:{root:`dialog`,close:`dialog.close`},branches:`changes.branches`,resize:`sidebar.resize`,approveBatch:`approve.batch`,selectionBar:`selection.bar`,pageHeader:`page.header`,headerMetadata:`page.header.metadata`,statusBadge:`status.badge`,taskStatus:e=>`status.task.${e}`,folder:e=>`tree.folder.${e}`,clearSelection:`selection.clear`,previous:`stage.previous`,next:`stage.next`,snapshotTab:e=>`snapshot.tab.${e}`,sourceTab:e=>`source.tab.${e}`,collapse:`source.collapse`,copy:`source.copy`,source:`source.code`,sourceLineNumbers:`source.lineNumbers`,diffUnified:`diff.unified`,diffExpand:`diff.expand`,diffEditor:`diff.editor`,diffOriginal:`diff.original`,diffModified:`diff.modified`,namespace:e=>`namespace.${e}`,view:{baseline:`view.baseline`,tasks:`view.tasks`},tasks:{root:`tasks`,empty:`tasks.empty`,item:e=>`tasks.${e}`,removable:`tasks.removable`,prune:`tasks.prune`},tree:`cases`,case:e=>`case.${e}`,selectFolder:e=>`select.folder.${e}`,select:e=>`select.${e}`,detail:`detail`,snapshotContent:`detail.snapshots`,supplement:`detail.supplement`,taskInfo:`detail.taskInfo`,caseEyebrow:`detail.caseEyebrow`,taskExecutionId:`detail.taskExecutionId`,copyTaskExecutionId:`detail.copyTaskExecutionId`,caseId:`detail.caseId`,copyCaseIds:`detail.copyCaseIds`,taskError:`detail.taskError`,empty:`empty`,approve:`approve`,refresh:`refresh`,message:`message`,previewTab:e=>`preview.tab.${e}`,preview:{tabs:`preview.tabs`,title:`preview.title`,card:`preview.card`,previous:`preview.previous`,next:`preview.next`,left:`preview.left`,right:`preview.right`,position:`preview.position`,version:`preview.version`,hints:`preview.hints`,case:`preview.case`,status:`preview.status`,select:`preview.select`,evidence:`preview.evidence`,evidenceTab:e=>`preview.evidence.${e}`},snapshotPreview:e=>`snapshot.preview.${e}`,imageVersion:(e,t)=>`image.version.${e}.${t}`,snapshotViewLabel:e=>`snapshot.viewLabel.${e}`,snapshotCompare:e=>`snapshot.compare.${e}`,snapshotStatus:e=>`snapshot.status.${e}`,snapshotMetrics:e=>`snapshot.metrics.${e}`,snapshotDiff:e=>`snapshot.diff.${e}`,snapshot:e=>`snapshot.${e}`,image:(e,t)=>`image.${e}.${t}`,text:e=>`text.${e}`,observation:e=>`observation.${e}`,filter:e=>`filter.${e}`,filterGroup:`filter.group`,filterThumb:`filter.thumb`,mobile:{tabbar:`mobile.tabbar`,tab:e=>`mobile.tab.${e}`,more:`mobile.more`,moreSheet:`mobile.moreSheet`,editTabs:`mobile.editTabs`,tabOrder:e=>`mobile.tabOrder.${e}`,tabHandle:e=>`mobile.tabHandle.${e}`,saveTabs:`mobile.saveTabs`,resetTabs:`mobile.resetTabs`,rule:e=>`mobile.rule.${e}`,page:e=>`mobile.page.${e}`,back:`mobile.back`,prev:`mobile.prev`,next:`mobile.next`,switchHand:`mobile.switchHand`,empty:`mobile.empty`,toast:`mobile.toast`,diff:e=>`mobile.diff.${e}`,ref:`mobile.ref`,refDialog:`mobile.refDialog`,refOption:e=>`mobile.refOption.${e}`,review:`mobile.review`,file:e=>`mobile.file.${e}`,check:e=>`mobile.check.${e}`,commit:e=>`mobile.commit.${e}`,actionSheet:`mobile.actionSheet`,moreActions:`mobile.moreActions`,caseInfo:`mobile.caseInfo`,copyCaseId:`mobile.copyCaseId`,copyPath:`mobile.copyPath`,pathDisclosure:`mobile.pathDisclosure`,metrics:e=>`mobile.metrics.${e}`,copy:e=>`mobile.copy.${e}`,diagnostics:`mobile.diagnostics`,expandAll:`mobile.expandAll`,tag:e=>`mobile.tag.${e}`,note:e=>`mobile.note.${e}`,noteState:e=>`mobile.noteState.${e}`,task:e=>`mobile.task.${e}`,case:e=>`mobile.case.${e}`,baselineCase:e=>`mobile.baselineCase.${e}`,folder:e=>`mobile.folder.${e}`,evidence:e=>`mobile.evidence.${e}`,filter:e=>`mobile.filter.${e}`,confirm:`mobile.confirm`,confirmOk:`mobile.confirm.ok`,confirmCancel:`mobile.confirm.cancel`,image:e=>`mobile.image.${e}`,fileDiff:`mobile.fileDiff`,approve:`mobile.approve`,approveAll:`mobile.approveAll`,prune:`mobile.prune`,deleteBaseline:`mobile.deleteBaseline`}},k_=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function A_(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:k_(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var j_=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},M_=e=>{let t=j_(e);return t.charAt(0).toUpperCase()+t.slice(1)},N_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),P_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function F_(e){return e!=null}function I_(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??P_.width,a=e.size??e.height??P_.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?N_(...c):N_(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??P_[`stroke-width`])*Number(e.size??e.width??P_.width)/Number(t.size??t.width??P_.width):t.strokeWidth??P_[`stroke-width`];return[`svg`,{...Object.entries(P_).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&F_(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&F_(t.width)&&{[r(`width`)]:t.width},...`height`in t&&F_(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function L_(e,t={}){return I_(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var R_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},z_=(0,p.createContext)({}),B_=()=>(0,p.useContext)(z_),V_=(0,p.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=B_()??{},b=!!c||R_(d),[x,S,C=[]]=L_(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:N_(y,s),hasA11yProp:b,attributes:d});return(0,p.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function H_(e,t=[],n=[]){let r=typeof e==`string`?A_(e,t,n):e,i=(0,p.forwardRef)(({className:e,...t},n)=>(0,p.createElement)(V_,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=M_(r.name)),i}var U_={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};U_.node;var W_=H_(U_),G_={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};G_.node;var K_=H_(G_),q_={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};q_.node;var J_=H_(q_),Y_={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Y_.node;var X_=H_(Y_),Z_={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Z_.node;var Q_=H_(Z_),$_={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};$_.node;var ev=H_($_),tv={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};tv.node;var nv=H_(tv),rv={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};rv.node;var iv=H_(rv),av={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};av.node;var ov=H_(av),sv={name:`diamond`,size:24,node:[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]};sv.node;var cv=H_(sv),lv={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};lv.node;var uv=H_(lv),dv={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]};dv.node;var fv=H_(dv),pv={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};pv.node;var mv=H_(pv),hv={name:`folder-tree`,size:24,node:[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]};hv.node;var gv=H_(hv),_v={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};_v.node;var vv=H_(_v),yv={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};yv.node;var bv=H_(yv),xv={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};xv.node;var Sv=H_(xv),Cv={name:`images`,size:24,node:[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]]};Cv.node;var wv=H_(Cv),Tv={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Tv.node;var Ev=H_(Tv),Dv={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};Dv.node;var Ov=H_(Dv),kv={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};kv.node;var Av=H_(kv),jv={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};jv.node;var Mv=H_(jv),Nv={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Nv.node;var Pv=H_(Nv),Fv={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Fv.node;var Iv=H_(Fv),Lv={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};Lv.node;var Rv=H_(Lv);function zv(e,t=[]){let n=(0,p.useRef)(e);n.current=e,(0,p.useEffect)(()=>{let e=()=>{n.current()};return e(),window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},t)}function Bv(e){if(!e?.width||!e.height)return{};let t=e.scale??1,n=Math.max(1,Math.round(e.width/t));return{width:n,height:Math.max(1,Math.round(e.height/t)),...t>1&&{style:{maxWidth:`min(100%, ${n}px)`}}}}function Vv(e){let[t,n]=(0,p.useState)(()=>{try{return localStorage.getItem(e)===`true`}catch{return!1}});return(0,p.useEffect)(()=>{try{localStorage.setItem(e,String(t))}catch{}},[e,t]),[t,n]}function Hv(e){let t=ea(aa(Xo)),[n,r]=(0,p.useState)([0]),i=n.at(-1);zv(()=>t.readFile(e,i),[e,i]);let a=t.content.key===JSON.stringify([e,i])?t.content.state:null,o=a?.data,s=o?.kind===`text`?o.text:void 0,c=o?.kind===`text`?o.nextOffset:void 0;return{offset:i,text:s,loading:!a||a.loading,error:a?.error?.message,note:o?.kind===`binary`?`二进制文件不支持文本预览。`:s===``?`空文件`:void 0,pager:i>0||c!==void 0?{index:n.length-1,hasNext:c!==void 0,onPrev:()=>{i>0&&r(n.slice(0,-1))},onNext:()=>{c!==void 0&&r([...n,c])}}:null}}var Uv=e=>`/mobile/${e}`;function Wv(e,t={}){let n=new URLSearchParams(Object.entries(t).filter(e=>!!e[1])).toString();return n?`${e}?${n}`:e}function Gv(e){let t=ea(aa(Xo));zv(()=>t.loadDirectory(``));let n=t.directories.get(``)?.state,r=e?16:14,i=n=>(t.directories.get(n)?.state?.data??[]).map(({name:a,directory:o})=>{let s=n?n+`/`+a:a,c=o?vv:uv,l=o?t.directories.get(s)?.state:void 0;return{key:s,label:a,icon:(0,R.jsx)(c,{size:r}),trailing:l?.loading?(0,R.jsx)(Av,{className:`project-folder-loading`,size:r,role:`status`,"aria-label":`正在读取 ${a}`,"data-testid":O_.files.folderLoading(s)}):l?.error?(0,R.jsx)(`span`,{className:`project-folder-error`,role:`img`,"aria-label":l.error.message,title:l.error.message,children:(0,R.jsx)(Q_,{size:r,"aria-hidden":`true`})}):void 0,testId:o?(e?O_.mobile.folder:O_.folder)(s):(e?O_.mobile.file:O_.files.file)(s),children:o?i(s):void 0,href:e&&!o?Wv(`/mobile/files/file`,{path:s}):void 0}});return{nodes:i(``),error:n?.error,loading:n?.loading??!0,isExpanded:e=>t.directories.has(e),onToggle:e=>t.toggleDirectory(e)}}function Kv({path:t,text:n,mobile:r=!1}){let i=(0,p.useRef)(null),[a,o]=(0,p.useState)(`loading`);return(0,p.useEffect)(()=>{let a=!0,s;return o(`loading`),e(async()=>{let{monaco:e,languageForPath:t}=await import(`./monaco-3fFILk_i.js`);return{monaco:e,languageForPath:t}},__vite__mapDeps([0,1,2,3,4])).then(async({monaco:e,languageForPath:c})=>{if(!a)return;let l=c(t);await e.editor.colorize(``,l,{}),a&&i.current&&(s=e.editor.create(i.current,{value:n,language:l,theme:`vs`,ariaLabel:t,readOnly:!0,domReadOnly:!0,automaticLayout:!0,minimap:{enabled:!1},renderValidationDecorations:`off`,renderLineHighlight:`none`,overviewRulerLanes:0,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,lineNumbersMinChars:3,fontSize:12,fontFamily:getComputedStyle(i.current).getPropertyValue(r?`--m-font-mono`:`--font-metadata`).trim(),lineHeight:r?20:22,...r&&{folding:!1,glyphMargin:!1,lineDecorationsWidth:8},padding:{top:8,bottom:8}}),o(`ready`))}).catch(()=>{a&&o(`error`)}),()=>{a=!1,s?.dispose()}},[t,n,r]),(0,R.jsxs)(`div`,{className:`project-file-editor`,"data-testid":O_.files.editor,"aria-busy":a===`loading`,children:[(0,R.jsx)(`div`,{className:`project-file-editor-host`,ref:i}),a!==`ready`&&(0,R.jsx)(`pre`,{className:`project-file-fallback`,tabIndex:0,children:n})]})}export{Ko as $,lr as $t,X_ as A,Aa as At,Mg as B,oa as Bt,uv as C,Xa as Ct,nv as D,Ja as Dt,iv as E,Za as Et,O_ as F,ba as Ft,rs as G,$i as Gt,c_ as H,aa as Ht,E_ as I,ga as It,Zo as J,zi as Jt,ns as K,Zi as Kt,D_ as L,_a as Lt,K_ as M,ja as Mt,W_ as N,Ta as Nt,ev as O,Ia as Ot,H_ as P,Oa as Pt,qo as Q,Ue as Qt,Ag as R,ca as Rt,fv as S,oo as St,ov as T,so as Tt,Jg as U,na as Ut,Vg as V,ia as Vt,S_ as W,ea as Wt,Yo as X,Fi as Xt,Xo as Y,Xr as Yt,Jo as Z,He as Zt,Sv as _,io as _t,Hv as a,f as an,Bo as at,gv as b,ao as bt,zv as c,u as cn,Io as ct,Pv as d,ko as dt,Nr as en,Go as et,Mv as f,Co as ft,wv as g,xo as gt,Ev as h,fo as ht,Uv as i,Wi as in,Ho as it,J_ as j,ka as jt,Q_ as k,Pa as kt,Rv as l,Po as lt,Ov as m,_o as mt,Gv as n,hr as nn,Uo as nt,Vv as o,s as on,zo as ot,Av as p,So as pt,ts as q,Ri as qt,Wv as r,_r as rn,Vo as rt,Bv as s,c as sn,Ro as st,Kv as t,fr as tn,Wo as tt,Iv as u,Mo as ut,bv as v,ro as vt,cv as w,Ya as wt,mv as x,co as xt,vv as y,Ga as yt,Pg as z,ua as zt};
|