@fecommunity/reactpress-web 4.0.0-beta.8 → 4.0.0

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.
Files changed (31) hide show
  1. package/README.md +35 -5
  2. package/dist/assets/admin-Bho9sHiU.js +1 -0
  3. package/dist/assets/{admin-CrL6Xc9b.js → admin-CmM5cUeN.js} +1 -1
  4. package/dist/assets/{cssMode-J2cfgFkq.js → cssMode-ClrfMK1Z.js} +1 -1
  5. package/dist/assets/{freemarker2-L_gr_Wq4.js → freemarker2-DAObhKOe.js} +1 -1
  6. package/dist/assets/{handlebars-D81kzUDC.js → handlebars-BVvnLC_M.js} +1 -1
  7. package/dist/assets/{html-Cung-Yr0.js → html-B2dSZg1K.js} +1 -1
  8. package/dist/assets/{htmlMode-C6QemWl2.js → htmlMode-CHWmxobK.js} +1 -1
  9. package/dist/assets/{index-DXTkTQ21.js → index-8LeTrc4_.js} +255 -255
  10. package/dist/assets/{index-BNrD3O4x.css → index-B4NHXGf6.css} +1 -1
  11. package/dist/assets/{javascript-WUcGtCKt.js → javascript-CGo3j0Xq.js} +1 -1
  12. package/dist/assets/{jsonMode-Dp0R9P1F.js → jsonMode-DbYC7ZFY.js} +1 -1
  13. package/dist/assets/{liquid-OFb9c-6B.js → liquid-H_XTAJXX.js} +1 -1
  14. package/dist/assets/{mdx-CUfjLxA3.js → mdx-Cgiya6xV.js} +1 -1
  15. package/dist/assets/{python-zxEYY77U.js → python-DebO-3J3.js} +1 -1
  16. package/dist/assets/{razor-DJrSr4ly.js → razor-DIMprDxz.js} +1 -1
  17. package/dist/assets/rolldown-runtime-CNC7AqOf.js +1 -0
  18. package/dist/assets/{tsMode-Dtxx1cRn.js → tsMode-Cnv-X3Cd.js} +1 -1
  19. package/dist/assets/{typescript-DT11gl4K.js → typescript-ETNXyuCB.js} +1 -1
  20. package/dist/assets/vendor-antd-C-MOkY9k.js +334 -0
  21. package/dist/assets/vendor-tanstack-DzhFSG0F.js +1 -0
  22. package/dist/assets/vendor-ui-CEw34xVH.js +1 -0
  23. package/dist/assets/{xml-BIbLvdwx.js → xml-DpqspQCX.js} +1 -1
  24. package/dist/assets/{yaml-BEeUZskE.js → yaml-BlndKmWW.js} +1 -1
  25. package/dist/index.html +6 -6
  26. package/package.json +17 -5
  27. package/dist/assets/admin-bamoE2Tn.js +0 -1
  28. package/dist/assets/rolldown-runtime-Cyuzqnbw.js +0 -1
  29. package/dist/assets/vendor-antd-854Wnkhp.js +0 -334
  30. package/dist/assets/vendor-tanstack-CUgEbs6-.js +0 -1
  31. package/dist/assets/vendor-ui-BosneugM.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,t}from"./rolldown-runtime-CNC7AqOf.js";import{ft as n,pt as r}from"./vendor-antd-C-MOkY9k.js";var i=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),a=t(((e,t)=>{t.exports=i()})),o=e(r(),1),s=typeof window<`u`?o.useLayoutEffect:o.useEffect;function c(e){let t=o.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function l(e,t,n={},r={}){o.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function u(e){let t=o.useRef(null);return o.useImperativeHandle(e,()=>t.current,[]),t}function d(e){return e[e.length-1]}function f(e){return typeof e==`function`}function p(e,t){return f(e)?e(t):e}var m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;function g(e){for(let t in e)if(m.call(e,t))return!0;return!1}var _=()=>Object.create(null),v=(e,t)=>y(e,t,_);function y(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=C(e)&&C(i);if(!a&&!(x(e)&&x(i)))return i;let o=a?e:b(e);if(!o)return i;let s=a?i:b(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:m.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=y(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function b(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!h.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!h.call(e,t))return!1;r.push(t)}return r}function x(e){if(!S(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!S(n)||!n.hasOwnProperty(`isPrototypeOf`))}function S(e){return Object.prototype.toString.call(e)===`[object Object]`}function C(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!w(e[r],t[r],n))return!1;return!0}if(x(e)&&x(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!w(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!w(e[o],t[o],n)))return!1;return i===a}return!1}function T(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function E(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function D(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function ee(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return D(t)}var te=[`http:`,`https:`,`mailto:`,`tel:`];function ne(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function O(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ee(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ee(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function re(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function k(){throw Error(`Invariant failed`)}function ae(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,oe=5;function se(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function ce(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=se(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function le(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=ce(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=M(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=M(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=de(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=de(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=de(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=M(n.fullPath??n.from);e.kind=oe,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=M(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)le(e,t,r,s,i,a,o)}function ue(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function j(e){if(e.pathless)for(let t of e.pathless)j(t);if(e.static)for(let t of e.static.values())j(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())j(t);if(e.dynamic?.length){e.dynamic.sort(ue);for(let t of e.dynamic)j(t)}if(e.optional?.length){e.optional.sort(ue);for(let t of e.optional)j(t)}if(e.wildcard?.length){e.wildcard.sort(ue);for(let t of e.wildcard)j(t)}}function M(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function de(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function fe(e,t){let n=M(`/`),r=new Uint16Array(6);for(let t of e)le(!1,r,t,1,n,0);j(n),t.masksTree=n,t.flatCache=ae(1e3)}function N(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=F(e,t.masksTree);return t.flatCache.set(e,r),r}function P(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=M(`/`),le(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),F(r,o,n)}function pe(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=F(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=_e(a.route)),t.matchCache.set(r,a),a}function me(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function he(e,t=!1,n){let r=M(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return le(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&k(),a[e.id]=e,s!==0&&e.path){let t=me(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),j(r),{processedTree:{segmentTree:r,singleCache:ae(1e3),matchCache:ae(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function F(e,t,n=!1){let r=e.split(`/`),i=ye(e,r,t,n);if(!i)return null;let[a]=ge(e,r,i);return{route:i.node.route,rawParams:a}}function ge(e,t,n){let r=ve(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===oe){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function _e(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ve(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ye(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!d(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!Ce(l,n))continue;if(i.parse){if(!Se(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&Ce(c,n)&&(c=n);let v=u===o;if(v&&(i.route&&(!a||i.kind===A||i.kind===2)&&Ce(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[u],b;if(v&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(Se(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&xe(p,o))return n;Ce(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+be(o,u),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+be(o,u),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+be(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+be(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function be(e,t){return 2**(e-t-1)}function xe(e,t){return e===2**(t-1)-1}function Se(e,t,n){let r,i;try{[r,i]=ge(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Ce(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function I(e){return we(e.filter(e=>e!==void 0).join(`/`))}function we(e){return e.replace(/\/{2,}/g,`/`)}function L(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Te(e){return R(L(e))}function Ee(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function De(e,t,n){return Ee(e,n)===Ee(t,n)}function Oe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&d(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(d(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=we(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function ke(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ae(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Me(e,n)).join(`/`):Me(r,n):r}function je({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=ce(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ae(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ae(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ae(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Me(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function z(e){return e?.isNotFound===!0}function Ne(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Pe(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Fe(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Pe(r):Array.isArray(t)?t.push(Pe(r)):n[e]=[t,Pe(r)]}return n}var Ie=Re(JSON.parse),Le=ze(JSON.stringify,JSON.parse);function Re(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Fe(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ze(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Ne(e,r);return t?`?${t}`:``}}var Be=`__root__`;function Ve(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function B(e){return e instanceof Response&&!!e.options}var He=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ue=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),We=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),V=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ge=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},H=(e,t,n)=>{if(!(!B(n)&&!z(n)))throw B(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:B(n)?`redirected`:z(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),z(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),B(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ke=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},qe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},Je=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,H(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,H(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!B(n)&&!z(n)&&(e.serialError??=n)},Ye=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!We(e,t)&&(n.options.loader||n.options.beforeLoad||ot(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{He(e)},i);r._nonReactive.pendingTimeout=t}},Xe=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ye(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Ze=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=T(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Je(e,n,o,`PARSE_PARAMS`),s&&Je(e,n,s,`VALIDATE_SEARCH`),Ye(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=T();let f={...V(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=We(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(B(r)||z(r))&&(u(),Je(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),E(y))return u(),y.catch(t=>{Je(e,n,t,`BEFORE_LOAD`)}).then(v)}catch(t){u(),Je(e,n,t,`BEFORE_LOAD`)}v(y)},Qe=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Ze(e,n,t,i),s=()=>{if(Ke(e,n))return;let t=Xe(e,n,i);return E(t)?t.then(o):o()};return a()},$e=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},et=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=We(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},tt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{at(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(et(e,t,n,r,i)),l=!!s&&E(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,z(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!B(o)&&!z(o)&&await at(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},nt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(et(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await tt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){B(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await tt(e,t,i,n,d):qe(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ke(e,i)){if(!e.router.getMatch(i))return e.matches[n];qe(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=We(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&H(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=T(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function rt(e){let t=e,n=[];Ue(t.router)&&He(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Qe(t,e);E(n)&&await n}catch(e){if(B(e))throw e;if(z(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Ge(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(nt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(B(e))throw e;z(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=Ge(t,l);e===void 0&&k();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await at(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await at(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=$e(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=He(t);if(E(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function it(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function at(e,t=st){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===st?(()=>{if(e._componentsPromise===void 0){let t=it(e,st);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():it(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ot(e){for(let t of st)if(e.options[t]?.preload)return!0;return!1}var st=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function ct(e){return{input:({url:t})=>{for(let n of e)t=ut(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=dt(e[n],t);return t}}}function lt(e){let t=Te(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=I([`/`,t,e.pathname]),e)}}function ut(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ft(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>pt(o,_.get())),x=r(()=>pt(s,v.get())),S=r(()=>pt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=ae(64);function ee(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let te={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:ee,setMatches:ne,setPending:O,setCached:re};ne(e.matches),a?.(te);function ne(e){mt(e,o,_,n,i)}function O(e){mt(e,s,v,n,i)}function re(e){mt(e,c,y,n,i)}return te}function pt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function mt(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}ie(n.get(),a)||n.set(a)})}var U=`__TSR_index`,ht=`popstate`,gt=`beforeunload`;function _t(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=St(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[U];i=vt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[U];i=vt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[U]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function vt(e,t){t||={};let n=Ct();return{...t,key:n,__TSR_key:n,[U]:e}}function yt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>St(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Ct();t.history.replaceState({[U]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=St(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[U]-l.state[U],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=_t({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(gt,S,{capture:!0}),t.removeEventListener(ht,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(gt,S,{capture:!0}),t.addEventListener(ht,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function bt(e){let t=e?.window??(typeof document<`u`?window:void 0);return yt({window:t,parseLocation:()=>{let e=t.location.hash.split(`#`).slice(1),n=e[0]??`/`,r=t.location.search,i=e.slice(1);return St(`${n}${r}${i.length===0?``:`#${i.join(`#`)}`}`,t.history.state)},createHref:e=>`${t.location.pathname}${t.location.search}#${e}`})}function xt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function St(e,t){let n=xt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Ct();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[U]:0,key:a,__TSR_key:a}}}function Ct(){return(Math.random()+1).toString(36).substring(7)}function wt(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Tt=new WeakMap,Et=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ke(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=yt()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ae(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ft(kt(this.latestLocation),e),Yt(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=Te(o);t&&t!==`/`&&e.push(lt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ct(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=he(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&fe(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:O(e).path,external:!1,searchStr:o,search:v(t?.search,i),hash:O(r.slice(1)).path,state:y(t?.state,a)}}let o=new URL(i,this.origin),s=ut(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:O(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:v(t?.search,c),hash:O(s.hash.slice(1)).path,state:y(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Oe({base:e,to:t.includes(`//`)?we(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>jt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,p(t.params,s)),d=this.routesByPath[R(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&g(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let m=e.leaveParams?l:O(je({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,h=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,At(t.options.validateSearch,{...e,...h}))}catch{}}),h=e}h=Mt({search:h,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),h=v(o,h);let _=this.options.stringifySearch(h),b=t.hash===!0?n.hash:t.hash?p(t.hash,n.hash):void 0,x=b?`#${b}`:``,S=t.state===!0?n.state:t.state?p(t.state,n.state):{};S=y(n.state,S);let C=`${m}${_}${x}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=dt(this.rewrite,e);w=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else w=re(C),T=w;return{publicHref:T,href:w,pathname:m,search:h,searchStr:_,state:S,hash:b??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=N(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,p(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=w(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=R(this.latestLocation.href)===R(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=T(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=St(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=ut(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ne(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?Tt.set(this.latestLocation,t):Tt.delete(this.latestLocation);let n=this.latestLocation,r=wt(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await rt({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){B(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):z(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(wt(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ne(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=at,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await rt({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(B(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});z(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=P(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!w(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?w(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Le,parseSearch:e.parseSearch??Ie,protocolAllowlist:e.protocolAllowlist??te}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=_e(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:R(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Pt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=At(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof Dt||(r=new Dt(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:g}=je({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),_=r.id+h+m,b=this.getMatch(_),x=l.get(r.id),S=b?._strictParams??g,C;if(!b)try{Ft(r,S)}catch(e){if(C=z(e)||B(e)?e:new Ot(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,E;if(b)E={...b,cause:w,params:x?.params??i,_strictParams:S,search:v(x?x.search:b.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||ot(r)?`pending`:`success`;E={id:_,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:h,updatedAt:Date.now(),search:x?v(x.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:T()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?y(x.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(E.globalNotFound=s===r.id),E.searchError=f;let D=this.getParentContext(o);E.context={...D,...E.__routeContext,...E.__beforeLoadContext},c[n]=E}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?v(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=d(t),i={...e.search};for(let e of t)try{Object.assign(i,At(e.options.validateSearch,i))}catch{}let a=d(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{Ft(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Dt=class extends Error{},Ot=class extends Error{};function kt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function At(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Dt(`Async validation not supported`);if(n.issues)throw new Dt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function jt({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=R(e),a,o=pe(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Mt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Nt(n)(e,t,r??!1)}function Nt(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...At(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:p(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function Pt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return Be}function Ft(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function It(){try{return sessionStorage}catch{return}}var Lt=`tsr-scroll-restoration-v1_3`,Rt=It();function zt(){try{return JSON.parse(Rt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Bt(){try{Rt?.setItem(Lt,JSON.stringify(Vt))}catch{}}var Vt=zt(),Ht=`data-scroll-restoration-id`,Ut=e=>e.state.__TSR_key||e.href;function Wt(e){let t=e.getAttribute(Ht);if(t)return`[${Ht}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Gt=!1,Kt=`window`;function qt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Jt(e){let t=[];for(let n of e){if(n===Kt)continue;let e=qt(n);e&&t.push(e)}return t}function Yt(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,Gt=!1;let n=e.options.getScrollRestorationKey||Ut,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(Gt||!e.isScrollRestoring))if(t.target===document)i(Kt,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=Vt[t]||={};for(let[e,t]of r)e===Kt?n[Kt]=t:e.isConnected&&(n[Wt(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),Bt()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=Vt[l];if(e){let t=Vt[c];for(let n in e){if(n===Kt){if(o)continue}else{let e=qt(n);if(!e||o&&a&&(s??=Jt(a),s.includes(e)))continue}t||=Vt[c]={},t[n]??=e[n]}}}Gt=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=Tt.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?Vt[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===Kt){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=qt(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Jt(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{Gt=!1}})}var Xt=`Error preloading route! ☝️`,Zt=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Be:this.parentRoute||k();let r=n?Be:t?.path;r&&r!==`/`&&(r=L(r));let i=t?.id||r,a=n?Be:I([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=I([`/`,a]));let o=a===`__root__`?`/`:I([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ve({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Qt=class extends Zt{constructor(e){super(e)}},$t=t((e=>{var t=r(),n=Symbol.for(`react.element`),i=Symbol.for(`react.fragment`),a=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var i,c={},l=null,u=null;for(i in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)a.call(t,i)&&!s.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)c[i]===void 0&&(c[i]=t[i]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:o.current}}e.Fragment=i,e.jsx=c,e.jsxs=c})),en=t(((e,t)=>{t.exports=$t()})),W=en();function tn(e){let t=e.errorComponent??rn;return(0,W.jsx)(nn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?o.createElement(t,{error:n,reset:r}):e.children})}var nn=class extends o.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function rn({error:e}){let[t,n]=o.useState(!1);return(0,W.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,W.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,W.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,W.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,W.jsx)(`div`,{children:(0,W.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,W.jsx)(`code`,{children:e.message}):null})}):null]})}function an({children:e,fallback:t=null}){return on()?(0,W.jsx)(o.Fragment,{children:e}):(0,W.jsx)(o.Fragment,{children:t})}function on(){return o.useSyncExternalStore(sn,()=>!0,()=>!1)}function sn(){return()=>{}}var cn=o.createContext(null);function G(e){return o.useContext(cn)}var ln=o.createContext(void 0),un=o.createContext(void 0),K=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(K||{});function dn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function fn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var pn=[],mn=0,{link:hn,unlink:gn,propagate:_n,checkDirty:vn,shallowPropagate:yn}=dn({update(e){return e._update()},notify(e){pn[xn++]=e,e.flags&=~K.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=K.Mutable|K.Dirty,wn(e))}}),bn=0,xn=0,q,Sn=0;function Cn(e){try{++Sn,e()}finally{--Sn||Tn()}}function wn(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=gn(n,e)}function Tn(){if(!(Sn>0)){for(;bn<xn;){let e=pn[bn];pn[bn++]=void 0,e.notify()}bn=0,xn=0}}function En(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?K.None:K.Mutable,get(){return q!==void 0&&hn(i,q,mn),i._snapshot},subscribe(e){let t=fn(e),n={current:!1},r=Dn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=q,o=t?.compare??Object.is;if(n)q=i,++mn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=K.Mutable|K.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{q=a,n&&(i.flags&=~K.RecursedCheck),wn(i)}}};return n?(i.flags=K.Mutable|K.Dirty,i.get=function(){let e=i.flags;if(e&K.Dirty||e&K.Pending&&vn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&yn(e)}}else e&K.Pending&&(i.flags=e&~K.Pending);return q!==void 0&&hn(i,q,mn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(_n(e),yn(e),Tn())}},i}function Dn(e){let t=()=>{let t=q;q=n,++mn,n.depsTail=void 0,n.flags=K.Watching|K.RecursedCheck;try{return e()}finally{q=t,n.flags&=~K.RecursedCheck,wn(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:K.Watching|K.RecursedCheck,notify(){let e=this.flags;e&K.Dirty||e&K.Pending&&vn(this.deps,this)?t():this.flags=K.Watching},stop(){this.flags=K.None,this.depsTail=void 0,wn(this)}};return t(),n}var On=t((e=>{var t=r(),n=a();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:i,s=n.useSyncExternalStore,c=t.useRef,l=t.useEffect,u=t.useMemo,d=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),kn=t(((e,t)=>{t.exports=On()}))();function An(e,t){return e===t}function J(e,t,n=An){let r=(0,o.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,o.useCallback)(()=>e?.get(),[e]);return(0,kn.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var jn={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function Y(e){let t=G(),n=o.useContext(e.from?un:ln),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=o.useRef(void 0);return J(i??jn,n=>{if((e.shouldThrow??!0)&&!n&&k(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=y(a.current,r);return a.current=e,e}return r})}function Mn(e){return Y({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Nn(e){let{select:t,...n}=e;return Y({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Pn(e){return Y({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Fn(e){return Y({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function In(e){let t=G();return o.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ln(e){return Y({...e,select:t=>e.select?e.select(t.context):t.context})}var Rn=e(n(),1);function zn(e,t){let n=G(),r=u(t),{activeProps:i,inactiveProps:a,activeOptions:s,to:c,preload:d,preloadDelay:f,preloadIntentProximity:m,hashScrollIntoView:h,replace:g,startTransition:_,resetScroll:v,viewTransition:y,children:b,target:x,disabled:S,style:C,className:T,onClick:E,onBlur:D,onFocus:ee,onMouseEnter:te,onMouseLeave:O,onTouchStart:re,ignoreBlocker:ie,params:k,search:ae,hash:A,state:oe,mask:se,reloadDocument:ce,unsafeRelative:le,from:ue,_fromLocation:j,...M}=e,de=on(),fe=o.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),N=J(n.stores.location,e=>e,(e,t)=>e.href===t.href),P=o.useMemo(()=>{let e={_fromLocation:N,...fe};return n.buildLocation(e)},[n,N,fe]),pe=P.maskedLocation?P.maskedLocation.publicHref:P.publicHref,me=P.maskedLocation?P.maskedLocation.external:P.external,he=o.useMemo(()=>Jn(pe,me,n.history,S),[S,me,pe,n.history]),F=o.useMemo(()=>{if(he?.external)return ne(he.href,n.protocolAllowlist)?void 0:he.href;if(!Yn(c)&&!(typeof c!=`string`||c.indexOf(`:`)===-1))try{return new URL(c),ne(c,n.protocolAllowlist)?void 0:c}catch{}},[c,he,n.protocolAllowlist]),ge=o.useMemo(()=>{if(F)return!1;if(s?.exact){if(!De(N.pathname,P.pathname,n.basepath))return!1}else{let e=Ee(N.pathname,n.basepath),t=Ee(P.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(s?.includeSearch??!0)&&!w(N.search,P.search,{partial:!s?.exact,ignoreUndefined:!s?.explicitUndefined})?!1:s?.includeHash?de&&N.hash===P.hash:!0},[s?.exact,s?.explicitUndefined,s?.includeHash,s?.includeSearch,N,F,de,P.hash,P.pathname,P.search,n.basepath]),_e=ge?p(i,{})??Vn:Bn,ve=ge?Bn:p(a,{})??Bn,ye=[T,_e.className,ve.className].filter(Boolean).join(` `),be=(C||_e.style||ve.style)&&{...C,..._e.style,...ve.style},[xe,Se]=o.useState(!1),Ce=o.useRef(!1),I=e.reloadDocument||F?!1:d??n.options.defaultPreload,we=f??n.options.defaultPreloadDelay??0,L=o.useCallback(()=>{n.preloadRoute({...fe,_builtLocation:P}).catch(e=>{console.warn(e),console.warn(Xt)})},[n,fe,P]);l(r,o.useCallback(e=>{e?.isIntersecting&&L()},[L]),Kn,{disabled:!!S||I!==`viewport`}),o.useEffect(()=>{Ce.current||!S&&I===`render`&&(L(),Ce.current=!0)},[S,L,I]);let R=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;if(!S&&!Zn(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Rn.flushSync)(()=>{Se(!0)});let t=n.subscribe(`onResolved`,()=>{t(),Se(!1)});n.navigate({...fe,replace:g,resetScroll:v,hashScrollIntoView:h,startTransition:_,viewTransition:y,ignoreBlocker:ie})}};if(F)return{...M,ref:r,href:F,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...C&&{style:C},...T&&{className:T},...E&&{onClick:E},...D&&{onBlur:D},...ee&&{onFocus:ee},...te&&{onMouseEnter:te},...O&&{onMouseLeave:O},...re&&{onTouchStart:re}};let Te=e=>{if(S||I!==`intent`)return;if(!we){L();return}let t=e.currentTarget;if(Gn.has(t))return;let n=setTimeout(()=>{Gn.delete(t),L()},we);Gn.set(t,n)},Oe=e=>{S||I!==`intent`||L()},ke=e=>{if(S||!I||!we)return;let t=e.currentTarget,n=Gn.get(t);n&&(clearTimeout(n),Gn.delete(t))};return{...M,..._e,...ve,href:he?.href,ref:r,onClick:qn([E,R]),onBlur:qn([D,ke]),onFocus:qn([ee,Te]),onMouseEnter:qn([te,Te]),onMouseLeave:qn([O,ke]),onTouchStart:qn([re,Oe]),disabled:!!S,target:x,...be&&{style:be},...ye&&{className:ye},...S&&Hn,...ge&&Un,...de&&xe&&Wn}}var Bn={},Vn={className:`active`},Hn={role:`link`,"aria-disabled":!0},Un={"data-status":`active`,"aria-current":`page`},Wn={"data-transitioning":`transitioning`},Gn=new WeakMap,Kn={rootMargin:`100px`},qn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Jn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Yn(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Xn=o.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=zn(r,t),s=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return o.createElement(`a`,t,s)}return o.createElement(n,a,s)});function Zn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Qn=class extends Zt{constructor(e){super(e),this.useMatch=e=>Y({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ln({...e,from:this.id}),this.useSearch=e=>Fn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Pn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Nn({...e,from:this.id}),this.useLoaderData=e=>Mn({...e,from:this.id}),this.useNavigate=()=>In({from:this.fullPath}),this.Link=o.forwardRef((e,t)=>(0,W.jsx)(Xn,{ref:t,from:this.fullPath,...e}))}};function $n(e){return new Qn(e)}var er=class extends Qt{constructor(e){super(e),this.useMatch=e=>Y({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ln({...e,from:this.id}),this.useSearch=e=>Fn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Pn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Nn({...e,from:this.id}),this.useLoaderData=e=>Mn({...e,from:this.id}),this.useNavigate=()=>In({from:this.fullPath}),this.Link=o.forwardRef((e,t)=>(0,W.jsx)(Xn,{ref:t,from:this.fullPath,...e}))}};function tr(e){return new er(e)}function nr(e){return new rr(e,{silent:!0}).createRoute}var rr=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=$n(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ir(e){let t=G(),n=`not-found-${J(t.stores.location,e=>e.pathname)}-${J(t.stores.status,e=>e)}`;return(0,W.jsx)(tn,{getResetKey:()=>n,onCatch:(t,n)=>{if(z(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(z(t))return e.fallback?.(t);throw t},children:e.children})}function ar(){return(0,W.jsx)(`p`,{children:`Not Found`})}function or(e){return(0,W.jsx)(W.Fragment,{children:e.children})}function sr(e,t,n){return t.options.notFoundComponent?(0,W.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,W.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,W.jsx)(ar,{})}var cr=o.memo(function({matchId:e}){let t=G(),n=t.stores.matchStores.get(e);n||k();let r=J(t.stores.loadedAt,e=>e),i=J(n,e=>e);return(0,W.jsx)(lr,{router:t,matchId:e,resetKey:r,matchState:o.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function lr({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,s=a?(0,W.jsx)(a,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||d))?o.Suspense:or,p=c?tn:or,m=u?ir:or;return(0,W.jsxs)(i.isRoot?i.options.shellComponent??or:or,{children:[(0,W.jsx)(ln.Provider,{value:t,children:(0,W.jsx)(f,{fallback:s,children:(0,W.jsx)(p,{getResetKey:()=>n,errorComponent:c||rn,onCatch:(e,t)=>{if(z(e))throw e.routeId??=r.routeId,e;l?.(e,t)},children:(0,W.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return o.createElement(u,e)},children:d||r._displayPending?(0,W.jsx)(an,{fallback:s,children:(0,W.jsx)(dr,{matchId:t})}):(0,W.jsx)(dr,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ur,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function ur({resetKey:e}){let t=G(),n=o.useRef(void 0);return s(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...wt(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var dr=o.memo(function({matchId:e}){let t=G(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||k();let i=J(r,e=>e),a=i.routeId,s=t.routesById[a],c=o.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),l=o.useMemo(()=>{let e=s.options.component??t.options.defaultComponent;return e?(0,W.jsx)(e,{},c):(0,W.jsx)(fr,{})},[c,s.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=s.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=T();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return z(i.error)||k(),sr(t,s,i.error);if(i.status===`redirected`)throw B(i.error)||k(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return l}),fr=o.memo(function(){let e=G(),t=o.useContext(ln),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=J(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=J(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,W.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||k(),sr(e,a,void 0);if(!i)return null;let c=(0,W.jsx)(cr,{matchId:i});return n===`__root__`?(0,W.jsx)(o.Suspense,{fallback:s,children:c}):c});function pr(){let e=G(),t=o.useRef({router:e,mounted:!1}),[n,r]=o.useState(!1),i=J(e.stores.isLoading,e=>e),a=J(e.stores.hasPending,e=>e),l=c(i),u=i||n||a,d=c(u),f=i||a,p=c(f);return e.startTransition=e=>{r(!0),o.startTransition(()=>{e(),r(!1)})},o.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return R(e.latestLocation.publicHref)!==R(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),s(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),s(()=>{l&&!i&&e.emit({type:`onLoad`,...wt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,i]),s(()=>{p&&!f&&e.emit({type:`onBeforeRouteMount`,...wt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),s(()=>{if(d&&!u){let t=wt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Cn(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[u,d,e]),null}function mr(){let e=G(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,W.jsx)(t,{}):null,r=(0,W.jsxs)(typeof document<`u`&&e.ssr?or:o.Suspense,{fallback:n,children:[(0,W.jsx)(pr,{}),(0,W.jsx)(hr,{})]});return e.options.InnerWrap?(0,W.jsx)(e.options.InnerWrap,{children:r}):r}function hr(){let e=G(),t=J(e.stores.firstId,e=>e),n=J(e.stores.loadedAt,e=>e),r=t?(0,W.jsx)(cr,{matchId:t}):null;return(0,W.jsx)(ln.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,W.jsx)(tn,{getResetKey:()=>n,errorComponent:rn,onCatch:void 0,children:r})})}var gr=e=>({createMutableStore:En,createReadonlyStore:En,batch:Cn}),_r=e=>new vr(e),vr=class extends Et{constructor(e){super(e,gr)}};function yr({router:e,children:t,...n}){g(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,W.jsx)(cn.Provider,{value:e,children:t});return e.options.Wrap?(0,W.jsx)(e.options.Wrap,{children:r}):r}function br({router:e,...t}){return(0,W.jsx)(yr,{router:e,...t,children:(0,W.jsx)(mr,{})})}function xr(e){let t=G(),n=(0,o.useRef)(void 0);return J(t.stores.location,r=>{let i=e?.select?e.select(r):r;if(e?.structuralSharing??t.options.defaultStructuralSharing){let e=y(n.current,i);return n.current=e,e}return i})}var Sr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},X=new class{#e=Cr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function wr(e){setTimeout(e,0)}var Z=typeof window>`u`||`Deno`in globalThis;function Q(){}function Tr(e,t){return typeof e==`function`?e(t):e}function Er(e){return typeof e==`number`&&e>=0&&e!==1/0}function Dr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Or(e,t){return typeof e==`function`?e(t):e}function $(e,t){return typeof e==`function`?e(t):e}function kr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==jr(o,t.options))return!1}else if(!Nr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ar(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Mr(t.options.mutationKey)!==Mr(a))return!1}else if(!Nr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function jr(e,t){return(t?.queryKeyHashFn||Mr)(e)}function Mr(e){return JSON.stringify(e,(e,t)=>Rr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Nr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Nr(e[n],t[n])):!1}var Pr=Object.prototype.hasOwnProperty;function Fr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Lr(e)&&Lr(t);if(!r&&!(Rr(e)&&Rr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Pr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Fr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ir(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Lr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rr(e){if(!zr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!zr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function zr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Br(e){return new Promise(t=>{X.setTimeout(t,e)})}function Vr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Fr(e,t)}function Hr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ur(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Wr=Symbol();function Gr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kr(e,t){return typeof e==`function`?e(...t):!!e}function qr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Jr=new class extends Sr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Z&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function Yr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Xr=wr;function Zr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Xr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Qr=Zr(),$r=new class extends Sr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Z&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ei(e){return Math.min(1e3*2**e,3e4)}function ti(e){return(e??`online`)===`online`?$r.isOnline():!0}var ni=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ri(e){let t=!1,n=0,r,i=Yr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ni(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Jr.isFocused()&&(e.networkMode===`always`||$r.isOnline())&&e.canRun(),u=()=>ti(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Z?0:3),o=e.retryDelay??ei,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Br(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ii=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Er(this.gcTime)&&(this.#e=X.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Z?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(X.clearTimeout(this.#e),void 0)}},ai=class extends ii{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ci(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ci(this.options);e.data!==void 0&&(this.setState(si(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Vr(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Q).catch(Q):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>$(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Or(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Dr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Gr(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=ri({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ni&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ni){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...oi(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...si(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Qr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function oi(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ti(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function si(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ci(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var li=class extends Sr{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Yr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),di(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fi(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fi(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof $(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ir(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&pi(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||$(this.options.enabled,this.#t)!==$(t.enabled,this.#t)||Or(this.options.staleTime,this.#t)!==Or(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||$(this.options.enabled,this.#t)!==$(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return hi(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Q)),t}#g(){this.#b();let e=Or(this.options.staleTime,this.#t);if(Z||this.#r.isStale||!Er(e))return;let t=Dr(this.#r.dataUpdatedAt,e)+1;this.#d=X.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Z||$(this.options.enabled,this.#t)===!1||!Er(this.#p)||this.#p===0)&&(this.#f=X.setInterval(()=>{(this.options.refetchIntervalInBackground||Jr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(X.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(X.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&di(e,t),o=i&&pi(e,n,t,r);(a||o)&&(l={...l,...oi(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Vr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Vr(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:mi(e,t),refetch:this.refetch,promise:this.#o,isEnabled:$(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Yr();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Ir(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Qr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ui(e,t){return $(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function di(e,t){return ui(e,t)||e.state.data!==void 0&&fi(e,t,t.refetchOnMount)}function fi(e,t,n){if($(t.enabled,e)!==!1&&Or(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&mi(e,t)}return!1}function pi(e,t,n,r){return(e!==t||$(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&mi(e,n)}function mi(e,t){return $(t.enabled,e)!==!1&&e.isStaleByTime(Or(t.staleTime,e))}function hi(e,t){return!Ir(e.getCurrentResult(),t)}var gi=class extends ii{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_i(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ri({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Qr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function _i(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var vi=class extends Sr{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Ir(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Mr(t.mutationKey)!==Mr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??_i();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Qr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},yi=o.createContext(void 0),bi=e=>{let t=o.useContext(yi);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},xi=({client:e,children:t})=>(o.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,W.jsx)(yi.Provider,{value:e,children:t})),Si=o.createContext(!1),Ci=()=>o.useContext(Si);Si.Provider;function wi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ti=o.createContext(wi()),Ei=()=>o.useContext(Ti),Di=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Kr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Oi=e=>{o.useEffect(()=>{e.clearReset()},[e])},ki=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Kr(n,[e.error,r])),Ai=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ji=(e,t)=>e.isLoading&&e.isFetching&&!t,Mi=(e,t)=>e?.suspense&&t.isPending,Ni=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Pi(e,t,n){let r=Ci(),i=Ei(),a=bi(n),s=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=a.getQueryCache().get(s.queryHash);s._optimisticResults=r?`isRestoring`:`optimistic`,Ai(s),Di(s,i,c),Oi(i);let l=!a.getQueryCache().get(s.queryHash),[u]=o.useState(()=>new t(a,s)),d=u.getOptimisticResult(s),f=!r&&e.subscribed!==!1;if(o.useSyncExternalStore(o.useCallback(e=>{let t=f?u.subscribe(Qr.batchCalls(e)):Q;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),o.useEffect(()=>{u.setOptions(s)},[s,u]),Mi(s,d))throw Ni(s,u,i);if(ki({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(s,d),s.experimental_prefetchInRender&&!Z&&ji(d,r)&&(l?Ni(s,u,i):c?.promise)?.catch(Q).finally(()=>{u.updateResult()}),s.notifyOnChangeProps?d:u.trackResult(d)}function Fi(e,t){return Pi(e,li,t)}function Ii(e,t){let n=bi(t),[r]=o.useState(()=>new vi(n,e));o.useEffect(()=>{r.setOptions(e)},[r,e]);let i=o.useSyncExternalStore(o.useCallback(e=>r.subscribe(Qr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=o.useCallback((e,t)=>{r.mutate(e,t).catch(Q)},[r]);if(i.error&&Kr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}export{Xn as A,Sr as C,fr as D,_r as E,a as F,en as M,bt as N,nr as O,Ve as P,Wr as S,br as T,Ar as _,gi as a,Nr as b,Qr as c,Hr as d,Ur as f,jr as g,Mr as h,bi as i,In as j,tr as k,Jr as l,Tr as m,Fi as n,ai as o,Gr as p,xi as r,$r as s,Ii as t,qr as u,kr as v,xr as w,Or as x,Q as y};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{pt as t}from"./vendor-antd-C-MOkY9k.js";var n=e(t(),1),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},l=(0,n.createContext)({}),ee=()=>(0,n.useContext)(l),u=(0,n.forwardRef)(({color:e,size:t,strokeWidth:i,absoluteStrokeWidth:a,className:o=``,children:l,iconNode:u,...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,color:g=`currentColor`,className:_=``}=ee()??{},v=a??h?Number(i??m)*24/Number(t??p):i??m;return(0,n.createElement)(`svg`,{ref:f,...s,width:t??p??s.width,height:t??p??s.height,stroke:e??g,strokeWidth:v,className:r(`lucide`,_,o),...!l&&!c(d)&&{"aria-hidden":`true`},...d},[...u.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])}),d=(e,t)=>{let a=(0,n.forwardRef)(({className:a,...s},c)=>(0,n.createElement)(u,{ref:c,iconNode:t,className:r(`lucide-${i(o(e))}`,`lucide-${e}`,a),...s}));return a.displayName=o(e),a},f=d(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),p=d(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),m=d(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),h=d(`badge-check`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),g=d(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),_=d(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),v=d(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),y=d(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),b=d(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),x=d(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),S=d(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),C=d(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),w=d(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),T=d(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),E=d(`copy`,[[`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`}]]),D=d(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),O=d(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),k=d(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),A=d(`file-text`,[[`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`}]]),j=d(`files`,[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]),M=d(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),N=d(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),P=d(`image`,[[`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`}]]),F=d(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),I=d(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),L=d(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),R=d(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),z=d(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),B=d(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),V=d(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),H=d(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),te=d(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),U=d(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),W=d(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),G=d(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),K=d(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),q=d(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),J=d(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Y=d(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),X=d(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Z=d(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Q=d(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ne=d(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),re=d(`redo-2`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`,key:`6uklza`}]]),ie=d(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ae=d(`scaling`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M14 15H9v-5`,key:`pi4jk9`}],[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M21 3 9 15`,key:`15kdhq`}]]),oe=d(`search-x`,[[`path`,{d:`m13.5 8.5-5 5`,key:`1cs55j`}],[`path`,{d:`m8.5 8.5 5 5`,key:`a8mexj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),se=d(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ce=d(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),le=d(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),ue=d(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),de=d(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),fe=d(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),pe=d(`tablet`,[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,ry:`2`,key:`76otgf`}],[`line`,{x1:`12`,x2:`12.01`,y1:`18`,y2:`18`,key:`1dp563`}]]),$=d(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),me=d(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),he=d(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),ge=d(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),_e=d(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{v as $,V as A,j as B,q as C,U as D,W as E,I as F,E as G,k as H,F as I,C as J,T as K,P as L,z as M,R as N,te as O,L as P,y as Q,N as R,J as S,G as T,O as U,A as V,D as W,x as X,S as Y,b as Z,ne as _,$ as a,f as at,X as b,de as c,ce as d,_ as et,se as f,re as g,ie as h,me as i,p as it,B as j,H as k,ue as l,ae as m,ge as n,h as nt,pe as o,oe as p,w as q,he as r,m as rt,fe as s,_e as t,g as tt,le as u,Q as v,K as w,Y as x,Z as y,M as z};
@@ -1 +1 @@
1
- import{n as e}from"./index-DXTkTQ21.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:s.languages.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:s.languages.IndentAction.Indent}}]},l={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{c as conf,l as language};
1
+ import{n as e}from"./index-8LeTrc4_.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:s.languages.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:s.languages.IndentAction.Indent}}]},l={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{c as conf,l as language};
@@ -1 +1 @@
1
- import{n as e}from"./index-DXTkTQ21.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:s.languages.IndentAction.Indent}}]},l={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{c as conf,l as language};
1
+ import{n as e}from"./index-8LeTrc4_.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:s.languages.IndentAction.Indent}}]},l={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{c as conf,l as language};
package/dist/index.html CHANGED
@@ -13,12 +13,12 @@
13
13
  margin: 0;
14
14
  }
15
15
  </style>
16
- <script type="module" crossorigin src="/admin/assets/index-DXTkTQ21.js"></script>
17
- <link rel="modulepreload" crossorigin href="/admin/assets/rolldown-runtime-Cyuzqnbw.js">
18
- <link rel="modulepreload" crossorigin href="/admin/assets/vendor-antd-854Wnkhp.js">
19
- <link rel="modulepreload" crossorigin href="/admin/assets/vendor-tanstack-CUgEbs6-.js">
20
- <link rel="modulepreload" crossorigin href="/admin/assets/vendor-ui-BosneugM.js">
21
- <link rel="stylesheet" crossorigin href="/admin/assets/index-BNrD3O4x.css">
16
+ <script type="module" crossorigin src="/admin/assets/index-8LeTrc4_.js"></script>
17
+ <link rel="modulepreload" crossorigin href="/admin/assets/rolldown-runtime-CNC7AqOf.js">
18
+ <link rel="modulepreload" crossorigin href="/admin/assets/vendor-antd-C-MOkY9k.js">
19
+ <link rel="modulepreload" crossorigin href="/admin/assets/vendor-tanstack-DzhFSG0F.js">
20
+ <link rel="modulepreload" crossorigin href="/admin/assets/vendor-ui-CEw34xVH.js">
21
+ <link rel="stylesheet" crossorigin href="/admin/assets/index-B4NHXGf6.css">
22
22
  </head>
23
23
  <body>
24
24
  <div id="root"></div>
package/package.json CHANGED
@@ -1,14 +1,25 @@
1
1
  {
2
2
  "name": "@fecommunity/reactpress-web",
3
- "version": "4.0.0-beta.8",
4
- "description": "ReactPress Admin SPA — writing console for the publishing platform (static + Node helpers)",
3
+ "version": "4.0.0",
4
+ "description": "Official ReactPress Admin — WordPress-style writing UI for the publishing platform. Vite SPA with Express and Next.js /admin/ mount helpers",
5
5
  "keywords": [
6
6
  "admin",
7
+ "blog",
7
8
  "cms",
9
+ "content-management",
10
+ "dashboard",
11
+ "headless-cms",
12
+ "publishing",
13
+ "publishing-platform",
14
+ "react",
8
15
  "reactpress",
9
16
  "spa",
10
- "static"
17
+ "vite"
11
18
  ],
19
+ "homepage": "https://docs.gaoredu.com/",
20
+ "bugs": {
21
+ "url": "https://github.com/fecommunity/reactpress/issues"
22
+ },
12
23
  "license": "MIT",
13
24
  "author": "fecommunity",
14
25
  "repository": {
@@ -23,7 +34,8 @@
23
34
  "bin",
24
35
  "dist",
25
36
  "node",
26
- "README.md"
37
+ "README.md",
38
+ "LICENSE"
27
39
  ],
28
40
  "type": "module",
29
41
  "main": "./node/index.mjs",
@@ -69,7 +81,7 @@
69
81
  "zustand": "^5.0.12"
70
82
  },
71
83
  "devDependencies": {
72
- "@fecommunity/reactpress-toolkit": "4.0.0-beta.8",
84
+ "@fecommunity/reactpress-toolkit": "4.0.0",
73
85
  "@playwright/test": "^1.58.2",
74
86
  "@tanstack/router-plugin": "^1.166.13",
75
87
  "@types/react": "19.2.7",
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{H as t,_ as n,p as r,pt as i,q as a}from"./vendor-antd-854Wnkhp.js";import{N as o}from"./vendor-tanstack-CUgEbs6-.js";import{i as s}from"./index-DXTkTQ21.js";var c=e(i()),l=`/api`;function u(){if(typeof localStorage>`u`)return null;try{let e=localStorage.getItem(`auth-storage`);return e?JSON.parse(e).state?.tokens?.accessToken??null:null}catch{return null}}function d(e,t){return e instanceof Error&&e.message.trim()?e.message:t}async function f(e,t){let n=(await s(l)).replace(/\/$/,``),r=u(),i=await fetch(`${n}${e}`,{...t,headers:{"Content-Type":`application/json`,...r?{Authorization:`Bearer ${r}`}:{},...t?.headers}}),a=await i.json();if(i.status===401)throw Error(`SESSION_EXPIRED`);if(!i.ok)throw Error(a.msg??a.message??`Request failed: ${i.status}`);if(typeof a.code==`number`&&a.code!==0)throw Error(a.message??`Request failed`);if(a.success===!1)throw Error(a.msg??`Request failed`);return a.data}function p(){return f(`/file/optimize/report`)}function m(e){return f(`/file/optimize/run`,{method:`POST`,body:JSON.stringify(e)})}function h(e){return f(`/file/optimize/job/${encodeURIComponent(e)}`)}function g(e,t){let n=t.split(`.`),r=e;for(let e of n){if(!r||typeof r!=`object`)return;r=r[e]}return typeof r==`string`?r:void 0}function _(){return typeof document>`u`?`en`:(document.documentElement.lang||navigator.language||`en`).toLowerCase().startsWith(`zh`)?`zh`:`en`}async function v(e,t){let n=(await s(`/api`)).replace(/\/$/,``),r=(()=>{try{let e=localStorage.getItem(`auth-storage`);return e?JSON.parse(e).state?.tokens?.accessToken??null:null}catch{return null}})(),i=await fetch(`${n}/extension/plugins/${encodeURIComponent(e)}/locales/${encodeURIComponent(t)}`,{headers:{...r?{Authorization:`Bearer ${r}`}:{}}});return i.ok?(await i.json()).data?.messages??{}:{}}function y(e){let t=_(),[n,r]=(0,c.useState)({});return(0,c.useEffect)(()=>{let n=!1;return v(e,t).then(e=>{n||r(e)}),()=>{n=!0}},[t,e]),(0,c.useMemo)(()=>(e,t)=>g(n,`dashboard.${e}`)??t,[n])}var b={optimizeDashboard:`_optimizeDashboard_4fi8g_1`,sectionTitle:`_sectionTitle_4fi8g_7`,statsGrid:`_statsGrid_4fi8g_14`,statCard:`_statCard_4fi8g_21`,statLabel:`_statLabel_4fi8g_28`,statValue:`_statValue_4fi8g_34`,actions:`_actions_4fi8g_42`,progressBlock:`_progressBlock_4fi8g_49`,hint:`_hint_4fi8g_53`,emptyJob:`_emptyJob_4fi8g_59`,warn:`_warn_4fi8g_65`,errorList:`_errorList_4fi8g_75`},x=o();function S(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`}function C(e){let t=Number(e.batchSize);return{batchSize:Number.isFinite(t)?Math.min(Math.max(t,1),200):50,skipGif:e.skipGif!==!1,rewriteContent:e.rewriteContent===!0,cleanupOriginals:e.cleanupOriginals===!0}}function w({pluginId:e,pluginActive:i,config:o}){let{message:s}=a.useApp(),l=y(e),[u,f]=(0,c.useState)(null),[g,_]=(0,c.useState)(null),[v,w]=(0,c.useState)(!1),[T,E]=(0,c.useState)(!1),D=(0,c.useRef)(null),O=useCallback(()=>{D.current&&=(clearInterval(D.current),null)},[]),k=useCallback(async()=>{w(!0);try{f(await p())}catch(e){s.error(d(e,l(`analyzeFailed`,`分析失败`)))}finally{w(!1)}},[s,l]),A=useCallback(e=>{O();let t=()=>{h(e).then(e=>{_(e),(e.status===`completed`||e.status===`failed`)&&(O(),k())}).catch(e=>{O(),s.error(d(e,l(`jobPollFailed`,`获取任务进度失败`)))})};t(),D.current=setInterval(t,800)},[k,s,O,l]);(0,c.useEffect)(()=>{i&&k()},[k,i]),(0,c.useEffect)(()=>()=>O(),[O]);let j=async e=>{if(!i)return;let t=C(o);E(!0);try{let n=await m({dryRun:e,batchSize:t.batchSize,limit:t.batchSize,skipGif:t.skipGif,rewriteContent:t.rewriteContent,cleanupOriginals:t.cleanupOriginals});_(n),n.status===`completed`||n.status===`failed`?(k(),n.total===0?s.info(l(`jobEmpty`,`没有待优化的图片(可能已全部优化,或原文件已不存在)。`)):e&&s.success(l(`dryRunDone`,`试运行完成(未写入数据库)。`))):(A(n.id),e&&s.info(l(`dryRun`,`试运行(不写入)`)))}catch(e){s.error(d(e,l(`runFailed`,`启动任务失败`)))}finally{E(!1)}};if(!i)return(0,x.jsx)(`div`,{className:b.warn,"data-testid":`image-optimizer-inactive`,children:l(`inactiveHint`,`请先在插件列表中启用本插件,才能执行分析与优化。`)});let M=g?.status===`pending`||g?.status===`running`,N=g?.status===`completed`||g?.status===`failed`,P=g&&g.total>0?Math.round(g.processed/g.total*100):void 0,F=g?.items.filter(e=>e.status===`failed`).slice(0,5)??[];return(0,x.jsxs)(`div`,{className:b.optimizeDashboard,"data-testid":`image-optimizer-dashboard`,children:[(0,x.jsx)(`h2`,{className:b.sectionTitle,children:l(`title`,`资源分析`)}),(0,x.jsxs)(`div`,{className:b.actions,children:[(0,x.jsx)(t,{loading:v,onClick:()=>void k(),children:l(`analyze`,`分析现状`)}),(0,x.jsx)(t,{loading:T,onClick:()=>void j(!0),children:l(`dryRun`,`试运行(不写入)`)}),(0,x.jsx)(t,{type:`primary`,loading:T||M,onClick:()=>void j(!1),children:l(`run`,`开始批量优化`)})]}),v&&!u?(0,x.jsx)(n,{}):u?(0,x.jsxs)(`div`,{className:b.statsGrid,children:[(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`total`,`素材总数`)}),(0,x.jsx)(`p`,{className:b.statValue,children:u.total})]}),(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`optimized`,`已优化`)}),(0,x.jsx)(`p`,{className:b.statValue,children:u.alreadyOptimized})]}),(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`pending`,`待优化`)}),(0,x.jsx)(`p`,{className:b.statValue,children:u.needsOptimization})]}),(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`estimatedSaved`,`预估可节省`)}),(0,x.jsx)(`p`,{className:b.statValue,children:S(u.storageBytes.estimatedSaved)})]}),(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`contentRefs`,`内容引用`)}),(0,x.jsxs)(`p`,{className:b.statValue,children:[u.contentRefs.articles,` `,l(`articles`,`文章`),` / `,u.contentRefs.pages,` `,l(`pages`,`页面`)]})]}),(0,x.jsxs)(`div`,{className:b.statCard,children:[(0,x.jsx)(`p`,{className:b.statLabel,children:l(`skipped`,`已跳过`)}),(0,x.jsx)(`p`,{className:b.statValue,children:u.skipped.nonImage+u.skipped.svg+u.skipped.gif+u.skipped.missing})]})]}):null,g?(0,x.jsxs)(`div`,{className:b.progressBlock,children:[(0,x.jsx)(r,{percent:P,status:g.status===`failed`?`exception`:M?`active`:g.total===0?`normal`:`success`,showInfo:g.total>0}),(0,x.jsxs)(`p`,{className:b.hint,children:[g.status===`failed`?`${l(`jobFailed`,`任务失败`)}: ${g.error??``}`:M?g.total===0?l(`jobScanning`,`正在扫描待优化素材…`):l(`jobRunning`,`优化任务进行中…`):l(`jobDone`,`任务已完成`),` · `,l(`processed`,`已处理`),` `,g.processed,`/`,g.total,` · `,l(`succeeded`,`成功`),` `,g.succeeded,` · `,l(`failed`,`失败`),` `,g.failed,g.savedBytes>0?` · ${l(`savedBytes`,`已节省空间`)} ${S(g.savedBytes)}`:``]}),N&&g.total===0?(0,x.jsx)(`p`,{className:b.emptyJob,children:l(`jobEmpty`,`没有待优化的图片(可能已全部优化,或原文件已不存在)。`)}):null,g.contentRewrite?(0,x.jsxs)(`p`,{className:b.hint,children:[`URL 回写:`,g.contentRewrite.articles,` `,l(`articles`,`文章`),`、`,g.contentRewrite.pages,` `,l(`pages`,`页面`),`、`,g.contentRewrite.revisions,` 修订`]}):null,F.length>0?(0,x.jsx)(`ul`,{className:b.errorList,children:F.map(e=>(0,x.jsxs)(`li`,{children:[e.originalname,`: `,e.error]},e.fileId))}):null]}):null]})}function T(){}var E={registerAdmin:T,SettingsPanel:w};export{w as SettingsPanel,E as default,T as registerAdmin};
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);export{u as a,d as i,o as n,c as r,s as t};