intlayer-editor 9.3.1 → 9.3.2

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.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-Du39Yqx4.js","assets/MarkDownRender-h77REUZw.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CwJFpaho.js","assets/MarkdownEditor-B34MQpA5.js","assets/dist-BPi67VDO.js","assets/dist-BMR831Ty.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-CDk9zs5-.js","assets/MarkDownRender-BK2SjJub.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CwJFpaho.js","assets/MarkdownEditor-o0H3vQy2.js","assets/dist-QZxj0AIG.js","assets/dist-BMR831Ty.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{t as r}from"./react-CwJFpaho.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var i=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=n(((e,t)=>{t.exports=i()})),o=n((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),s=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=n((e=>{var t=a(),n=r(),i=s();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=a;break}if(c===r){s=!0,r=i,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=i;break}if(c===r){s=!0,r=a,n=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Yd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),ap._currentValue=ee)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -95,7 +95,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
95
95
  `},nP=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},rP=function(){v.useEffect(function(){return document.body.setAttribute(eP,(nP()+1).toString()),function(){var e=nP()-1;e<=0?document.body.removeAttribute(eP):document.body.setAttribute(eP,e.toString())}},[])},iP=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;rP();var a=v.useMemo(function(){return QN(i)},[i]);return v.createElement($N,{styles:tP(a,!t,i,n?``:`!important`)})},aP=!1;if(typeof window<`u`)try{var oP=Object.defineProperty({},"passive",{get:function(){return aP=!0,!0}});window.addEventListener(`test`,oP,oP),window.removeEventListener(`test`,oP,oP)}catch{aP=!1}var sP=aP?{passive:!1}:!1,cP=function(e){return e.tagName===`TEXTAREA`},lP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!cP(e)&&n[t]===`visible`)},uP=function(e){return lP(e,`overflowY`)},dP=function(e){return lP(e,`overflowX`)},fP=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),hP(e,r)){var i=gP(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pP=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},mP=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},hP=function(e,t){return e===`v`?uP(t):dP(t)},gP=function(e,t){return e===`v`?pP(t):mP(t)},_P=function(e,t){return e===`h`&&t===`rtl`?-1:1},vP=function(e,t,n,r,i){var a=_P(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=gP(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&hP(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},yP=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bP=function(e){return[e.deltaX,e.deltaY]},xP=function(e){return e&&`current`in e?e.current:e},SP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CP=function(e){return`
96
96
  .block-interactivity-${e} {pointer-events: none;}
97
97
  .allow-interactivity-${e} {pointer-events: all;}
98
- `},wP=0,TP=[];function EP(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(wP++)[0],a=v.useState(JN)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=CN([e.lockRef.current],(e.shards||[]).map(xP),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=yP(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=fP(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=fP(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return vP(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!TP.length||TP[TP.length-1]!==a)){var r=`deltaY`in n?bP(n):yP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&SP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(xP).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:DP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=yP(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,bP(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,yP(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return TP.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,sP),document.addEventListener(`touchmove`,c,sP),document.addEventListener(`touchstart`,u,sP),function(){TP=TP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,sP),document.removeEventListener(`touchmove`,c,sP),document.removeEventListener(`touchstart`,u,sP)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:CP(i)}):null,p?v.createElement(iP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function DP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var OP=LN(RN,EP),kP=v.forwardRef(function(e,t){return v.createElement(BN,xN({},e,{ref:t,sideCar:OP}))});kP.classNames=BN.classNames;var AP=Object.defineProperty,jP=(e,t)=>AP(e,`name`,{value:t,configurable:!0}),MP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],NP=[` `,`Enter`],PP=`Select`,[FP,IP,LP]=Bl(PP),[RP,zP]=xl(PP,[LP,qM]),BP=qM(),[VP,HP]=RP(PP),[UP,WP]=RP(PP);function GP(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=BP(t),[_,b]=v.useState(null),[x,S]=v.useState(null),[C,w]=v.useState(!1),T=Uk(l),[E,D]=Hu({prop:r,defaultProp:i??!1,onChange:a,caller:PP}),[O,k]=Hu({prop:o,defaultProp:s,onChange:c,caller:PP}),A=v.useRef(null),j=v.useRef(O);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=jP(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,k]);let M=!_||!!m||!!_.closest(`form`),[N,P]=v.useState(new Set),F=vA(),I=Array.from(N).map(e=>e.props.value).join(`;`),L=v.useCallback(e=>{P(t=>new Set(t).add(e))},[]),ee=v.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:F,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:N,nativeSelectKey:I,isFormControl:M};return(0,y.jsx)(oN,{...g,children:(0,y.jsx)(VP,{scope:t,...te,children:(0,y.jsx)(FP.Provider,{scope:t,children:(0,y.jsx)(UP,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:ee,children:IF(h)?h(te):n})})})})}jP(GP,`SelectProvider`);var KP=jP(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,y.jsx)(GP,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,y.jsxs)(y.Fragment,{children:[n,e?(0,y.jsx)(FF,{__scopeSelect:t}):null]})})},`Select`),qP=`SelectTrigger`,JP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=BP(n),o=HP(qP,n),s=o.disabled||r,c=_l(t,o.onTriggerChange),l=IP(n),u=v.useRef(`touch`),[d,f,p]=RF(e=>{let t=l().filter(e=>!e.disabled),n=zF(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=jP(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,y.jsx)(sN,{asChild:!0,...a,children:(0,y.jsx)(eu.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":LF(o.value)?``:void 0,...i,ref:c,onClick:G(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:G(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:G(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&MP.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),YP=`SelectValue`,XP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=HP(YP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=_l(t,c.onValueNodeChange);Su(()=>{l(u)},[l,u]);let f=LF(c.value);return(0,y.jsx)(eu.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,y.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),ZP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,y.jsx)(eu.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[QP,$P]=RP(`SelectPortal`,{forceMount:void 0}),eF=jP(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,y.jsx)(QP,{scope:e.__scopeSelect,forceMount:n,children:(0,y.jsx)(wu,{asChild:!0,...r})})},`SelectPortal`),tF=`SelectContent`,nF=v.forwardRef(jP(function(e,t){let n=$P(tF,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=HP(tF,e.__scopeSelect),[o,s]=v.useState();return Su(()=>{s(new DocumentFragment)},[]),(0,y.jsx)(Ou,{present:r||a.open,children:({present:e})=>e?(0,y.jsx)(cF,{...i,ref:t}):(0,y.jsx)(rF,{...i,fragment:o})})},`SelectContent`)),rF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Zl.createPortal((0,y.jsx)(aF,{scope:n,children:(0,y.jsx)(FP.Slot,{scope:n,children:(0,y.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),iF=10,[aF,oF]=RP(tF),sF=Tl(`SelectContent.RemoveScroll`),cF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,b=HP(tF,n),[x,S]=v.useState(null),[C,w]=v.useState(null),T=_l(t,S),[E,D]=v.useState(null),[O,k]=v.useState(null),A=IP(n),[j,M]=v.useState(!1),N=v.useRef(!1);v.useEffect(()=>{if(x)return bN(x)},[x]),Yk();let P=v.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),F=v.useCallback(()=>P([E,x]),[P,E,x]);v.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=b;v.useEffect(()=>{if(x){let e={x:0,y:0},t=jP(t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},`handlePointerMove`),n=jP(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null},`handlePointerUp`);return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,I,L]),v.useEffect(()=>{let e=jP(()=>I(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=RF(e=>{let t=A().filter(e=>!e.disabled),n=zF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(N.current=!0))},[b.value]),R=v.useCallback(()=>x?.focus(),[x]),z=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),B=r===`popper`?uF:lF,re=B===uF?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,y.jsx)(aF,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:ne,selectedItem:E,onItemLeave:R,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:j,searchRef:ee,children:(0,y.jsx)(kP,{as:sF,allowPinchZoom:!0,children:(0,y.jsx)(nA,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:G(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,y.jsx)(fu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,y.jsx)(B,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),lF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=HP(tF,n),o=oF(tF,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=_l(t,u),f=IP(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:b}=o,x=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iF,d=zk(a,[iF,Math.max(iF,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iF,d=zk(a,[iF,Math.max(iF,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-iF*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-iF,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${iF}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Su(()=>x(),[x]);let[S,C]=v.useState();Su(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=v.useCallback(e=>{e&&m.current===!0&&(x(),b?.(),m.current=!1)},[x,b]);return(0,y.jsx)(dF,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:w,children:(0,y.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,y.jsx)(eu.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),uF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=iF,...a}=e,o=BP(n);return(0,y.jsx)(cN,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[dF,fF]=RP(tF,{}),pF=`SelectViewport`,mF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=oF(pF,n),o=fF(pF,n),s=_l(t,a.onViewportChange),c=v.useRef(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,y.jsx)(FP.Slot,{scope:n,children:(0,y.jsx)(eu.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:G(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-iF*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[hF,gF]=RP(`SelectGroup`),_F=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e,i=vA();return(0,y.jsx)(hF,{scope:n,id:i,children:(0,y.jsx)(eu.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),vF=`SelectLabel`,yF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e,i=gF(vF,n);return(0,y.jsx)(eu.div,{id:i.id,...r,ref:t})},`SelectLabel`)),bF=`SelectItem`,[xF,SF]=RP(bF),CF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=HP(bF,n),c=oF(bF,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=_l(t,iu(e=>c.itemRefCallback?.(e,r,i))),h=vA(),g=v.useRef(`touch`),_=jP(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,y.jsx)(xF,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,y.jsx)(FP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,y.jsx)(eu.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:G(o.onFocus,()=>p(!0)),onBlur:G(o.onBlur,()=>p(!1)),onClick:G(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:G(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:G(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:G(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(NP.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),wF=`SelectItemText`,TF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=HP(wF,n),s=oF(wF,n),c=SF(wF,n),l=WP(wF,n),[u,d]=v.useState(null),f=iu(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=_l(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,y.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Su(()=>(g(h),()=>_(h)),[g,_,h]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eu.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!LF(o.value)?Zl.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),EF=`SelectItemIndicator`,DF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e;return SF(EF,n).isSelected?(0,y.jsx)(eu.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),OF=`SelectScrollUpButton`,kF=v.forwardRef(jP(function(e,t){let n=oF(OF,e.__scopeSelect),r=fF(OF,e.__scopeSelect),[i,a]=v.useState(!1),o=_l(t,r.onScrollButtonChange);return Su(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};jP(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,y.jsx)(MF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),AF=`SelectScrollDownButton`,jF=v.forwardRef(jP(function(e,t){let n=oF(AF,e.__scopeSelect),r=fF(AF,e.__scopeSelect),[i,a]=v.useState(!1),o=_l(t,r.onScrollButtonChange);return Su(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};jP(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,y.jsx)(MF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),MF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=oF(`SelectScrollButton`,n),o=v.useRef(null),s=IP(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Su(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,y.jsx)(eu.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:G(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:G(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:G(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),NF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e;return(0,y.jsx)(eu.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),PF=`SelectBubbleInput`,FF=v.forwardRef(jP(function({__scopeSelect:e,...t},n){let r=HP(PF,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=v.useRef(null),m=_l(n,p),h=i??``,g=dN(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,y.jsxs)(eu.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Yu,...t.style},ref:m,defaultValue:h,children:[LF(i)&&!_?(0,y.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function IF(e){return typeof e==`function`}jP(IF,`isFunction`);function LF(e){return e===``||e===void 0}jP(LF,`shouldShowPlaceholder`);function RF(e){let t=iu(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),jP((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}jP(RF,`useTypeaheadSearch`);function zF(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=BF(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}jP(zF,`findNextItem`);function BF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}jP(BF,`wrapArray`);var VF=KP,HF=_F,UF=XP,WF=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,y.jsxs)(JP,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,y.jsx)(ZP,{asChild:!0,children:(0,y.jsx)(_f,{className:`size-4 opacity-50`})})]}),GF=({className:e,...t})=>(0,y.jsx)(kF,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,y.jsx)(gf,{})}),KF=({className:e,...t})=>(0,y.jsx)(jF,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,y.jsx)(pf,{})}),qF=({className:e,children:t,position:n=`popper`,...r})=>(0,y.jsx)(eF,{children:(0,y.jsxs)(nF,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,y.jsx)(GF,{}),(0,y.jsx)(mF,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,y.jsx)(KF,{})]})}),JF=({className:e,...t})=>(0,y.jsx)(yF,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),YF=({className:e,children:t,...n})=>(0,y.jsxs)(CF,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,y.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,y.jsx)(DF,{children:(0,y.jsx)(ff,{className:`size-4`})})}),(0,y.jsx)(TF,{children:t})]}),XF=({className:e,...t})=>(0,y.jsx)(NF,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Y=VF;Y.Group=HF,Y.Value=UF,Y.Trigger=WF,Y.ScrollUpButton=GF,Y.ScrollDownButton=KF,Y.Content=qF,Y.Label=JF,Y.Item=YF,Y.Separator=XF;var ZF=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},QF=e=>{let t=(0,V.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=ZF(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,v.useState)(a??null),[l,u]=(0,v.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,v.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,y.jsxs)(`div`,{className:`flex gap-1`,children:[(0,y.jsxs)(Y,{onValueChange:c,defaultValue:a,children:[(0,y.jsx)(Y.Trigger,{className:`w-20`,children:(0,y.jsx)(Y.Value,{placeholder:`Select a comparator`})}),(0,y.jsxs)(Y.Content,{children:[(0,y.jsx)(Y.Item,{value:`<`,children:`<`}),(0,y.jsx)(Y.Item,{value:`<=`,children:`<=`}),(0,y.jsx)(Y.Item,{value:`=`,children:`=`}),(0,y.jsx)(Y.Item,{value:`>=`,children:`>=`}),(0,y.jsx)(Y.Item,{value:`>`,children:`>`})]})]}),(0,y.jsx)(RO,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},$F=({rawContent:e})=>{let[t,n]=(0,v.useState)(``);return(0,v.useEffect)(()=>{ht(async()=>{let{default:e}=await import(`./purify.es-JEAr64Sr.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,y.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,y.jsx)(`div`,{})},eI=(0,v.lazy)(()=>ht(()=>import(`./MarkDownRender-Du39Yqx4.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3]))),tI=(0,v.lazy)(()=>ht(()=>import(`./MarkdownEditor-B34MQpA5.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([4,2,3,1,5]))),nI=(0,v.memo)(function(e){let t=(0,V.c)(2),{label:n,...r}=e,[i,a]=(0,v.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,y.jsx)(SO,{header:n,label:n,onToggle:o,children:i?(0,y.jsx)(xI,{...r}):null})}),rI=e=>{let t=(0,V.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=nT(),s=eT(),{mutate:c,isPending:l}=iO(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,y.jsx)(Ok,{variant:`default`,onContentChange:u,additionalButtons:(0,y.jsx)(bO,{Icon:Nf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},iI=e=>{let t=(0,V.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=nT(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,y.jsx)(lk,{variant:`default`,onContentChange:o,...i})},aI=[{content:`False`,value:!1},{content:`True`,value:!0}],oI=e=>{let t=(0,V.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=nT(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,y.jsx)(MO,{choices:aI,value:!0,onChange:o,color:`text`,size:`sm`,...i})},sI=e=>{let t=(0,V.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=fn(),{selectedLocales:c}=Nk(),l=n[S],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:Yt(e,o)})}),(0,y.jsx)(`tr`,{className:`flex`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:l[e]??nn(l[s]),keyPath:[...r,{type:S,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},cI=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewEnumeration:s,removeEnumeration:c}=dn(`navigation-view`),l=n[C],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,nn(l[d])??``,[...r,{type:C,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[C]).map(e=>{let t=[...r,{type:C,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(`div`,{className:`flex flex-1`,children:(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Mf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,y.jsx)(`tr`,{className:`w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(QF,{value:e,onChange:t=>{let a=n[C],s=Fk(a,e,t),c={...n,[C]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:l[e]??nn(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Of,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},lI=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewSelectCase:s,removeSelectCase:c}=dn(`navigation-view`),l=n[ne],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,nn(l[d])??``,[...r,{type:ne,key:`newCase`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(l).map(e=>{let t=[...r,{type:ne,key:e}],s=`${JSON.stringify(r)}-select-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(`div`,{className:`flex flex-1`,children:(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Mf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,y.jsx)(`tr`,{className:`w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(lk,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:t=>{let a={...n,[ne]:Fk(l,e,String(t))};o(i.localId,a,r)},children:e})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:l[e]??nn(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Of,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},uI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[T];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.true),keyPath:[...t,{type:T,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},dI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[te];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.male),keyPath:[...t,{type:te,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},fI=[`zero`,`one`,`two`,`few`,`many`,`other`],pI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[w];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:fI.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.other),keyPath:[...t,{type:w,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},mI=e=>{let t=(0,V.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewElement:s,removeElement:c}=dn(`navigation-view`),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:k,key:t}];o(i.localId,void 0,e)},Icon:Mf,children:c.text})]})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:e??nn(n[0]),keyPath:[...r,{type:k,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:k,key:n.length}];o(i.localId,nn(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Of,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},hI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:O,key:e}],s=i[e]??nn(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,y.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(nI,{label:Rt(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},gI=e=>{let t=(0,V.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,v.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:F}],l=n[F];s=(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsx)(MO,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,y.jsx)(SI,{section:l,keyPath:c,dictionary:i,renderSection:a===1?CI:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},_I=e=>{let t=(0,V.c)(12),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,v.useState)(0),{addEditedContent:c}=nT(),l;if(t[0]!==c||t[1]!==i||t[2]!==a||t[3]!==r||t[4]!==o||t[5]!==n){let e=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],u=[...r,{type:P}],d=n.markdown??``,f;t[7]!==c||t[8]!==i?(f=(e,t)=>(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(_O,{}),children:(0,y.jsx)(tI,{defaultValue:e,onChange:e=>c(i.localId,e,t)},JSON.stringify(t))}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let p=f,m;t[10]===a?m=t[11]:(m=e=>(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(_O,{}),children:(0,y.jsx)(eI,{isDarkMode:a,children:e})}),t[10]=a,t[11]=m);let h=m;l=(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsx)(MO,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,y.jsx)(SI,{section:d,keyPath:u,dictionary:i,renderSection:o===0?p:o===2?h:void 0})]}),t[0]=c,t[1]=i,t[2]=a,t[3]=r,t[4]=o,t[5]=n,t[6]=l}else l=t[6];return l},vI=({section:e,keyPath:t,...n})=>{let r=[...t,{type:E}],i=e[E];return(0,y.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,y.jsx)(SI,{section:i,keyPath:r,...n})})},yI=({section:e,keyPath:t,...n})=>{let r=[...t,{type:D}],i=e[D],{content:a}=e;return(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,y.jsx)(SI,{section:a,keyPath:r,...n})]})},bI=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=nT(),s=i[A],c=[...t,{type:A}];return(0,y.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,y.jsx)(Ik,{children:`Dictionary key`}),(0,y.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,y.jsx)(Ik,{children:`Path (optional)`}),(0,y.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},xI=(0,v.memo)(function(e){let t=(0,V.c)(87),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=dn(`navigation-view`),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=cn(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,y.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,y.jsx)(`span`,{children:`(React Node)`}),(0,y.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,y.jsx)(bI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,y.jsx)(sI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,y.jsx)(cI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,y.jsx)(uI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`select`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,y.jsx)(lI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`gender`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,y.jsx)(dI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`plural`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,y.jsx)(pI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`insertion`){let e;t[45]!==i||t[46]!==r||t[47]!==a||t[48]!==n?(e=(0,y.jsx)(vI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=a,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`markdown`){let e;t[50]!==i||t[51]!==o||t[52]!==r||t[53]!==n?(e=(0,y.jsx)(_I,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[50]=i,t[51]=o,t[52]=r,t[53]=n,t[54]=e):e=t[54],l=e;break bb0}if(e===`html`){let e;t[55]!==i||t[56]!==r||t[57]!==n?(e=(0,y.jsx)(gI,{dictionary:i,keyPath:r,section:n}),t[55]=i,t[56]=r,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`file`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,y.jsx)(yI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`array`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,y.jsx)(mI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`object`){let e;t[69]!==i||t[70]!==r||t[71]!==a||t[72]!==n?(e=(0,y.jsx)(hI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[69]=i,t[70]=r,t[71]=a,t[72]=n,t[73]=e):e=t[73],l=e;break bb0}if(e===`number`){let e;t[74]!==i||t[75]!==r||t[76]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:(0,y.jsx)(iI,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[74]=i,t[75]=r,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`text`){let e;t[78]!==i||t[79]!==r||t[80]!==a||t[81]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n,r):(0,y.jsx)(rI,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[78]=i,t[79]=r,t[80]=a,t[81]=n,t[82]=e):e=t[82],l=e;break bb0}if(e===`boolean`){let e;t[83]!==i||t[84]!==r||t[85]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:(0,y.jsx)(oI,{dictionary:i,keyPath:r,value:n})}),t[83]=i,t[84]=r,t[85]=n,t[86]=e):e=t[86],l=e;break bb0}c=(0,y.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),SI=(0,v.memo)(function(e){return(0,y.jsx)(ck,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,y.jsx)(xI,{...e})})});function CI(e){return(0,y.jsx)($F,{rawContent:e})}var wI=Qd(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{primary:`text-primary`,secondary:`text-secondary`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`custom`}}),TI=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},EI=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(EI):(0,v.isValidElement)(e)?EI(e.props.children):!1,DI=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=t===`button`||t===`button-outlined`,g=u??(h?`md`:`custom`),_=d??TI(e),v=f??p?.startsWith(`#`)??!1,b=EI(i),x=_?`noopener noreferrer nofollow`:void 0,S=_?`_blank`:`_self`,C=l&&p&&!_&&!v?Kt(p,l):p;return(0,y.jsxs)(`a`,{href:C===``?void 0:C,"aria-label":a,rel:x,target:S,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(wI({variant:t,color:n,roundedSize:r,underlined:c,size:g,className:o})),...m,children:[h&&b?(0,y.jsx)(`span`,{children:i}):i,_&&b&&(0,y.jsx)(Sf,{className:`ml-2 inline-block size-4`}),v&&(0,y.jsx)(wf,{className:`ml-2 inline-block size-4`})]})},OI=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,kI=Qd(`flex flex-row flex-wrap items-center`,{variants:{size:{xs:`gap-1 text-xs`,sm:`gap-1.5 text-sm`,md:`gap-2 text-base`,lg:`gap-3 text-lg`,xl:`gap-4 text-xl`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`md`,spacing:`normal`}}),AI=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Pe(`breadcrumb`).linkLabel;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(DI,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`custom`,children:(0,y.jsx)(`span`,{itemProp:`name`,children:n})}),(0,y.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},jI=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=dn(`breadcrumb`);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(bO,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,size:`custom`,...o,children:(0,y.jsx)(`span`,{itemProp:`name`,children:t})}),(0,y.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},MI=({children:e,position:t,className:n,...r})=>(0,y.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,y.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,y.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),NI=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,y.jsx)(hf,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,y.jsx)(`nav`,{"aria-label":o,children:(0,y.jsx)(`ol`,{className:W(kI({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=OI(n);if(p)return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,y.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,y.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,y.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,y.jsx)(MI,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,y.jsx)(AI,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,y.jsx)(jI,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,v.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,y.jsxs)(v.Fragment,{children:[_,(0,y.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,y.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},PI=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>{let o=[...a?[{text:Rt(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:Rt(t.key?.toString()??``)}))];return(0,y.jsx)(NI,{links:o,locale:r,elementType:`location`,color:i})},FI=({children:e,className:t,identifier:n,...r})=>(0,y.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});FI.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,y.jsx)(bO,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),FI.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,y.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,y.jsx)(xO,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function II(e){return Array.isArray?Array.isArray(e):KI(e)===`[object Array]`}function LI(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function RI(e){return e==null?``:LI(e)}function zI(e){return typeof e==`string`}function BI(e){return typeof e==`number`}function VI(e){return e===!0||e===!1||UI(e)&&KI(e)==`[object Boolean]`}function HI(e){return typeof e==`object`}function UI(e){return HI(e)&&e!==null}function WI(e){return e!=null}function GI(e){return!e.trim().length}function KI(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var qI=`Incorrect 'index' type`,JI=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,YI=e=>`Invalid value for key ${e}`,XI=e=>`Pattern length exceeds max of ${e}.`,ZI=e=>`Missing ${e} property in key`,QI=e=>`Property 'weight' in key '${e}' must be a positive integer`,$I=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,eL=Object.prototype.hasOwnProperty,tL=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=nL(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function nL(e){let t=null,n=null,r=null,i=1,a=null;if(zI(e)||II(e))r=e,t=rL(e),n=iL(e);else{if(!eL.call(e,`name`))throw Error(ZI(`name`));let o=e.name;if(r=o,eL.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(QI(iL(o)));t=rL(o),n=iL(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function rL(e){return II(e)?e:e.split(`.`)}function iL(e){return II(e)?e.join(`.`):e}function aL(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(WI(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!WI(s))return;if(a===t.length-1&&(zI(s)||BI(s)||VI(s)||typeof s==`bigint`))n.push(o===void 0?RI(s):{v:RI(s),i:o});else if(II(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,zI(t)?t.split(`.`):t,0),r?n:n[0]}var oL={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},sL={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},cL={location:0,threshold:.6,distance:100},lL={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:aL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},X=Object.freeze({...sL,...oL,...cL,...lL});function uL(e){return e>=9&&e<=13||e===32||e===160}function dL(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)uL(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var fL=class{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=dL(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(zI(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(JI);if(zI(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(JI);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!WI(e)||GI(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(WI(i)){if(II(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(WI(n)){if(zI(n)){if(!GI(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(WI(n.v)){let t=zI(n.v)?n.v:RI(n.v);if(!GI(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(zI(i)&&!GI(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function pL(e,t,{getFn:n=X.getFn,fieldNormWeight:r=X.fieldNormWeight}={}){let i=new fL({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(nL)),i.setSources(t),i.create(),i}function mL(e,{getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new fL({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function hL(e=[],t=X.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function gL(e,t,n,{location:r=X.location,distance:i=X.distance,threshold:a=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:s=X.minMatchCharLength,includeMatches:c=X.includeMatches,ignoreLocation:l=X.ignoreLocation}={}){if(t.length>32)throw Error(XI(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=hL(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function _L(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function vL(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var yL={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},bL=RegExp(`[`+Object.keys(yL).join(``)+`]`,`g`),xL=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(bL,e=>yL[e]):e=>e,SL=class{constructor(e,{location:t=X.location,threshold:n=X.threshold,distance:r=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:o=X.minMatchCharLength,isCaseSensitive:s=X.isCaseSensitive,ignoreDiacritics:c=X.ignoreDiacritics,ignoreLocation:l=X.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?xL(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:_L(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?xL(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=gL(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=vL(u)),p}},CL=new Set([`fuzzy`,`include`]);function wL(e){return e.startsWith(`inverse`)}var TL=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new SL(e,{location:t.location??X.location,threshold:t.threshold??X.threshold,distance:t.distance??X.distance,includeMatches:t.includeMatches??X.includeMatches,findAllMatches:t.findAllMatches??X.findAllMatches,minMatchCharLength:t.minMatchCharLength??X.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??X.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??X.ignoreDiacritics,ignoreLocation:t.ignoreLocation??X.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],EL=TL.length,DL=`\0`,OL=`|`;function kL(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function AL(e,t){let n=e.match(t);return n?n[1]:null}function jL(e,t={}){return e.replace(/\\\|/g,DL).split(OL).map(e=>{let n=kL(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<EL;){let e=TL[o],n=AL(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<EL;){let e=TL[o],n=AL(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var ML=class{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,ignoreDiacritics:n=X.ignoreDiacritics,includeMatches:r=X.includeMatches,minMatchCharLength:i=X.minMatchCharLength,ignoreLocation:a=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:s=X.location,threshold:c=X.threshold,distance:l=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?xL(e):e,this.pattern=e,this.query=jL(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?xL(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,wL(r.type)&&(c=!0),n&&(CL.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=vL(o)),e}}return{isMatch:!1,score:1}}},NL=[];function PL(...e){NL.push(...e)}function FL(e,t){for(let n=0,r=NL.length;n<r;n+=1){let r=NL[n];if(r.condition(e,t))return new r(e,t)}return new SL(e,t)}var IL={AND:`$and`,OR:`$or`},LL={PATH:`$path`,PATTERN:`$val`},RL=e=>!!(e[IL.AND]||e[IL.OR]),zL=e=>!!e[LL.PATH],BL=e=>!II(e)&&HI(e)&&!RL(e),VL=e=>({[IL.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function HL(e,t,{auto:n=!0}={}){let r=e=>{if(zI(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=FL(e,t)),r}let i=Object.keys(e),a=zL(e);if(!a&&i.length>1&&!RL(e))return r(VL(e));if(BL(e)){let r=a?e[LL.PATH]:i[0],o=a?e[LL.PATTERN]:e[r];if(!zI(o))throw Error(YI(r));let s={keyId:iL(r),pattern:o};return n&&(s.searcher=FL(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];II(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return RL(e)||(e=VL(e)),r(e)}function UL(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function WL(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){e.forEach(e=>{e.score=UL(e.matches,{ignoreFieldNorm:t})})}var GL=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function KL(e){let t=[];return e.matches.forEach(e=>{if(!WI(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function qL(e,t,{includeMatches:n=X.includeMatches,includeScore:r=X.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=KL(e)),r&&(a.score=e.score),a})}var JL=/[\p{L}\p{M}\p{N}_]+/gu,YL=new WeakSet;function XL(e){YL.has(e)||(YL.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function ZL(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||XL(e),t=>t.match(e)||[]):e=>e.match(JL)||[]}function QL({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=ZL(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=xL(n)),r(n)}}}var $L=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=QL({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new SL(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=vL(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function eR(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function tR(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){eR(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)eR(e,t.v,i,r);else eR(e,n.v,i,r)}}}function nR(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)tR(r,i,t,n);return r}function rR(e,t,n,r){tR(e,t,n,r)}function iR(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function aR(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)iR(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var oR=class{constructor(e,t,n){this.options={...X,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new tL(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=FL(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof fL))throw Error(qI);if(this._myIndex=t||pL(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=QL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=nR(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!WI(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=QL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});rR(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&aR(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(JI);this._invertedIndex&&aR(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(zI(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return BI(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&BI(n)&&n>0&&zI(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new GL(n,u);zI(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=zI(e)?zI(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),WL(d,{ignoreFieldNorm:s}),a&&d.sort(zI(e)?u:l),BI(n)&&n>-1&&(d=d.slice(0,n));return qL(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!WI(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=UL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=HL(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===IL.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(WI(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!WI(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=UL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!WI(t))return[];let r=[];if(II(t))t.forEach(({v:t,i,n:a})=>{if(!WI(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};oR.version=`7.5.0`,oR.createIndex=pL,oR.parseIndex=mL,oR.config=X,oR.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error($I);return FL(e,{...X,...n}).searchIn(t)},oR.parseQuery=HL,PL(ML),PL($L),oR.use=function(...e){e.forEach(e=>PL(e))};var sR=oR,cR=`locale-switcher-content`,lR=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=dn(`locale-switcher-content`),s=(0,v.useRef)(null),{locale:c}=fn(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=Nk(),f=(0,v.useMemo)(()=>l.map(e=>({locale:e,englishName:Yt(e,`en`),currentLocaleName:Yt(e,c),ownLocaleName:Yt(e)})),[l,c]),[p,m]=(0,v.useState)(``),[h,g]=jk(`locale-content-selector-see-all-locales`,!1),_=(0,v.useMemo)(()=>new sR(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),b=(0,v.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),x=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},S=e=>{g(e),d(e?l:[c])};return(0,y.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,y.jsxs)(FI,{identifier:cR,children:[(0,y.jsx)(FI.Trigger,{identifier:cR,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,y.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,y.jsx)(`div`,{className:`px-2 py-1`,children:(0,y.jsx)(Cf,{size:16})}),(0,y.jsx)(Tf,{className:`self-center`,size:16})]})}),(0,y.jsx)(FI.Panel,{identifier:cR,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,y.jsxs)(ck,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,y.jsx)(`div`,{className:`m-auto p-2`,children:(0,y.jsx)(MO,{defaultValue:h,onChange:S,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`p-3`,children:(0,y.jsx)(RO,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,y.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:b.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,y.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,y.jsx)(bO,{onClick:()=>x(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,y.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,y.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,y.jsx)(ff,{className:`size-full`})}),(0,y.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,y.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,y.jsx)(`span`,{dir:Jt(e),lang:e,children:i}),(0,y.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,y.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},uR=Qd(`flex items-center justify-center gap-1`,{variants:{size:{sm:`gap-1`,md:`gap-2`,lg:`gap-3`},color:{text:`background-text`,primary:`background-primary`,secondary:`background-secondary`,neutral:`background-neutral`},variant:{default:``,bordered:`rounded-lg border border-border p-2`,ghost:`bg-transparent`}},defaultVariants:{size:`md`,variant:`default`}}),dR=(e,t,n)=>{if(t<=n)return Array.from({length:t},(e,t)=>t+1);let r=[],i=Math.floor(n/2);if(r.push(1),e<=i+2){for(let e=2;e<=Math.min(n-1,t-1);e++)r.push(e);t>n&&r.push(`ellipsis`),t>1&&r.push(t)}else if(e>=t-i-1){t>n&&r.push(`ellipsis`);for(let e=Math.max(2,t-n+2);e<=t;e++)r.push(e)}else{r.push(`ellipsis`);let n=e-i,a=e+i;for(let e=n;e<=a;e++)r.push(e);r.push(`ellipsis`),r.push(t)}return r},fR=e=>e?.getAttribute(`aria-current`)===`true`,pR=e=>e===`sm`?`icon-sm`:e===`lg`?`icon-lg`:`icon-md`,mR=e=>(0,y.jsx)(`div`,{className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/10 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),hR=({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!1,showPrevNext:i=!0,maxVisiblePages:a=5,disabled:o=!1,size:s=`md`,variant:c=`default`,color:l=`text`,className:u,...d})=>{let{goToNextPage:f,goToPreviousPage:p}=dn(`pagination`),m=dR(e,t,a),h=pR(s),g=e===1,_=e===t,b=(0,v.useRef)([]),x=(0,v.useRef)(null),{choiceIndicatorPosition:S,calculatePosition:C}=EO(b,{selector:fR,isHoverable:!0});if((0,v.useEffect)(()=>{let e=setTimeout(()=>{C()},300);return()=>clearTimeout(e)},[e,C]),t<=1)return null;let w=r=>{!o&&r>=1&&r<=t&&r!==e&&n(r)};return(0,y.jsx)(`div`,{className:W(uR({size:s,variant:c}),u),...d,children:(0,y.jsxs)(`div`,{className:`relative flex items-center gap-1`,children:[S&&(0,y.jsx)(mR,{style:S,ref:x}),i&&(0,y.jsx)(bO,{variant:`outline`,size:h,color:`text`,onClick:()=>w(e-1),disabled:o||g,label:p.value,Icon:mf,ref:e=>{e&&(b.current[0]=e)},className:`min-w-0 px-2`}),(0,y.jsx)(`div`,{className:`flex items-center gap-1 max-md:gap-0.5`,children:m.map((t,n)=>{if(t===`ellipsis`){let e=n===m.indexOf(`ellipsis`)?`ellipsis-start`:`ellipsis-end`;return(0,y.jsx)(`div`,{className:`flex h-8 min-w-8 items-center justify-center px-1`,children:(0,y.jsx)(xf,{className:`h-4 w-4 text-muted-foreground`})},e)}let r=t===e,a=+!!i+m.slice(0,n).filter(e=>e!==`ellipsis`).length;return(0,y.jsx)(bO,{variant:r?`default`:`outline`,size:h,color:`text`,onClick:()=>w(t),disabled:o,label:`Go to page ${t}`,"aria-current":r?`true`:`false`,ref:e=>{e&&(b.current[a]=e)},className:W(`flex aspect-square h-8 w-8 min-w-0 items-center justify-center p-0 text-sm`,s===`sm`&&`h-6 w-6 text-xs`,s===`lg`&&`size-10 text-base`,r&&`font-semibold`),children:t},t)})}),i&&(0,y.jsx)(bO,{variant:`outline`,size:h,color:`text`,onClick:()=>w(e+1),disabled:o||_,label:f.value,Icon:hf,ref:e=>{let t=+!!i+m.filter(e=>e!==`ellipsis`).length;e&&(b.current[t]=e)},className:`min-w-0 px-2`})]})})},gR=e=>{let t=rn(e),n=cn(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?gR(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},_R=e=>{let t=(0,V.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,v.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,y.jsx)(SO,{...i,onToggle:s,children:a?n:null})},vR=e=>{let t=(0,V.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=Nk(),o=en(n,r,Yw()),{addEditedContent:s}=tT(),{setFocusedContentKeyPath:c,focusedContent:l}=Zw(),{addNewElement:u,goToField:d}=dn(`navigation-view`),f=cn(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&Pt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=gR(o);if(!o)return(0,y.jsx)(y.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,y.jsx)(bO,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:hf,children:Rt(r[r.length-1]?.key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,y.jsx)(y.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>{let t=[...r,{type:S,key:e}];return(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i},e)},t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,y.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,y.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>{let t=[...r,{type:f,key:e}];return(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i},e)})});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:k,key:t}];return gR(e)?(0,y.jsxs)(bO,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:hf,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,y.jsx)(_R,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,y.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,y.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,y.jsx)(vR,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,y.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,y.jsx)(bO,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:k,key:o.length}],t=o,n=nn(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Of,children:u.text})]})}if(typeof o.nodeType==`string`){let e=[...r,{type:o.nodeType}];return(0,y.jsx)(vR,{keyPath:e,section:n,dictionary:i})}let e=Object.keys(o);return(0,y.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:e.map(e=>{let t=[...r,{type:O,key:e}];return gR(en(n,t))?(0,y.jsx)(bO,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:hf,children:Rt(e)},e):(0,y.jsx)(_R,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:Rt(e),children:(0,y.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,y.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,y.jsxs)(y.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},yR=e=>typeof e==`object`&&e?JSON.stringify(e):e??``,bR=e=>{let t=(0,V.c)(35),{dictionary:n,isDarkMode:r}=e,{itemPagination:i,variantSwitcher:a}=dn(`content-editor`),{editedContent:o}=nT(),{focusedContent:s,setFocusedContentKeyPath:c}=Zw(),[,l]=(0,v.useTransition)(),u;t[0]!==c||t[1]!==l?(u=e=>l(()=>c(e)),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,[f,p]=(0,v.useState)(n),m,h;t[3]===n?(m=t[4],h=t[5]):(m=()=>{p(n)},h=[n],t[3]=n,t[4]=m,t[5]=h),(0,v.useEffect)(m,h);let g=n.item!==void 0||n.variant!==void 0,_;t[6]===n.key?_=t[7]:(_={keys:[n.key]},t[6]=n.key,t[7]=_);let b=g&&!!n.key,x;t[8]===b?x=t[9]:(x={enabled:b},t[8]=b,t[9]=x);let{data:S}=cO(_,x),C;t[10]===S?.data?C=t[11]:(C=S?.data??[],t[10]=S?.data,t[11]=C);let w=C,T;bb0:{if(n.item===void 0){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[12]=e):e=t[12],T=e;break bb0}let e;t[13]===w?e=t[14]:(e=w.filter(xR).sort(SR),t[13]=w,t[14]=e),T=e}let E=T,D;bb1:{if(n.variant===void 0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[15]=e):e=t[15],D=e;break bb1}let e;t[16]===w?e=t[17]:(e=w.filter(CR),t[16]=w,t[17]=e),D=e}let O=D,k;t[18]===d?k=t[19]:(k=e=>{p(e),d([])},t[18]=d,t[19]=k);let A=k,{content:j,key:M,localId:N}=f,P=s?.keyPath,F=o?.[N]?.content===void 0?j:o?.[N]?.content,I=Yw(),L;t[20]===P?L=t[21]:(L=P??[],t[20]=P,t[21]=L);let ee;t[22]!==I||t[23]!==F||t[24]!==L?(ee=en(F,L,I),t[22]=I,t[23]=F,t[24]=L,t[25]=ee):ee=t[25];let te=ee,ne=(0,v.useDeferredValue)(P),R=(0,v.useDeferredValue)(te),z=R!==te,B;t[26]===F?B=t[27]:(B=gR(F),t[26]=F,t[27]=B);let re=B,ie=gR(R),ae;t[28]!==s?.keyPath||t[29]!==te||t[30]!==d?(ae=()=>{te===void 0&&d(s?.keyPath?.slice(0,-1)??[])},t[28]=s?.keyPath,t[29]=te,t[30]=d,t[31]=ae):ae=t[31];let oe;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(oe=[],t[32]=oe):oe=t[32],(0,v.useEffect)(ae,oe);let se;t[33]===f.localId?se=t[34]:(se=e=>e.localId===f.localId,t[33]=f.localId,t[34]=se);let ce=E.findIndex(se),le=f.variant;return(0,y.jsxs)(`div`,{children:[g&&(0,y.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-4`,children:[E.length>0&&(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`font-medium text-muted text-xs`,children:i.label}),(0,y.jsx)(hR,{currentPage:ce>=0?ce+1:1,totalPages:E.length,onPageChange:e=>{let t=E[e-1];t&&A(t)},size:`sm`})]}),O.length>0&&(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsxs)(`span`,{className:`font-medium text-muted text-xs`,children:[a.label,`:`]}),O.map(e=>{let t=e.localId===f.localId;return(0,y.jsx)(`button`,{type:`button`,onClick:()=>!t&&A(e),className:`rounded-lg px-3 py-1 text-xs transition-colors ${t?`bg-text font-semibold text-text-opposite`:`cursor-pointer border border-border hover:bg-text/10`}`,children:yR(e.variant)},e.localId)}),le!==void 0&&!O.some(e=>e.localId===n.localId)&&(0,y.jsx)(`span`,{className:`rounded-lg bg-text px-3 py-1 font-semibold text-text-opposite text-xs`,children:yR(le)})]})]}),(0,y.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,y.jsx)(PI,{dictionaryKey:M,keyPath:P??[],onClickKeyPath:d}),(0,y.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,y.jsx)(lR,{})})]}),(0,y.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof F==`object`&&F&&!re&&Object.keys(F).length>0&&(0,y.jsx)(ck,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,y.jsx)(vR,{keyPath:[],section:F,dictionary:f})}),(ie||(ne??[]).length>0)&&(0,y.jsx)(`div`,{className:z?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,y.jsx)(SI,{keyPath:ne??[],section:R,dictionary:f,isDarkMode:r})})]})]})};function xR(e){return e.item!==void 0}function SR(e,t){return(e.item??0)-(t.item??0)}function CR(e){return e.variant!==void 0}var wR=Qd(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{primary:`border-primary bg-primary text-primary hover:bg-primary-500`,secondary:`border-secondary bg-secondary text-secondary hover:bg-secondary-300`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-500`,neutral:`border-neutral bg-neutral text-neutral hover:bg-neutral-600`,light:`border-white bg-white text-white hover:bg-neutral-500`,dark:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,text:`border-text bg-text text-text hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-text-opposite`,none:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,outline:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),TR=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,y.jsxs)(p,{className:W(wR({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,y.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,y.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,y.jsx)(`title`,{children:`Remove badge`}),(0,y.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},ER=Object.defineProperty,DR=(e,t)=>ER(e,`name`,{value:t,configurable:!0}),OR=`Dialog`,[kR,AR]=xl(OR),[jR,MR]=kR(OR),NR=DR(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=Hu({prop:r,defaultProp:i??!1,onChange:a,caller:OR}),[d,f]=v.useState(0),[p,m]=v.useState(0);return(0,y.jsx)(jR,{scope:t,triggerRef:s,contentRef:c,contentId:vA(),titleId:vA(),descriptionId:vA(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),[PR,FR]=kR(`DialogPortal`,{forceMount:void 0}),IR=`DialogContent`,LR=v.forwardRef(DR(function(e,t){let n=FR(IR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=MR(IR,e.__scopeDialog);return(0,y.jsx)(Ou,{present:r||a.open,children:a.modal?(0,y.jsx)(RR,{...i,ref:t}):(0,y.jsx)(zR,{...i,ref:t})})},`DialogContent`)),RR=v.forwardRef(DR(function(e,t){let n=MR(IR,e.__scopeDialog),r=v.useRef(null),i=_l(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return bN(e)},[]),(0,y.jsx)(BR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),zR=v.forwardRef(DR(function(e,t){let n=MR(IR,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(BR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),BR=v.forwardRef(DR(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=MR(IR,n);return Yk(),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(nA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(fu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":VR(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function VR(e){return e?`open`:`closed`}DR(VR,`getState`);var HR=1,UR=.9,WR=.8,GR=.17,KR=.1,qR=.999,JR=.9999,YR=.99,XR=/[\\\/_+.#"@\[\(\{&]/,ZR=/[\\\/_+.#"@\[\(\{&]/g,QR=/[\s-]/,$R=/[\s-]/g;function ez(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?HR:YR;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=ez(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=HR:XR.test(e.charAt(l-1))?(d*=WR,p=e.slice(i,l-1).match(ZR),p&&i>0&&(d*=qR**+p.length)):QR.test(e.charAt(l-1))?(d*=UR,m=e.slice(i,l-1).match($R),m&&i>0&&(d*=qR**+m.length)):(d*=GR,i>0&&(d*=qR**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=JR)),(d<KR&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=ez(e,t,n,r,l+1,a+2,o),f*KR>d&&(d=f*KR)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function tz(e){return e.toLowerCase().replace($R,` `)}function nz(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,ez(e,t,tz(e),tz(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function rz(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function iz(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function az(...e){return t=>{let n=!1,r=e.map(e=>{let r=iz(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():iz(e[t],null)}}}}function oz(...e){return v.useCallback(az(...e),e)}function sz(e,t){let n=v.createContext(t),r=e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,y.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=v.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function cz(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,y.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=v.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>v.createContext(e));return function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,lz(i,...t)]}function lz(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var uz=globalThis?.document?v.useLayoutEffect:()=>{},dz=v.useId||(()=>void 0),fz=0;function pz(e){let[t,n]=v.useState(dz());return uz(()=>{e||n(e=>e??String(fz++))},[e]),e||(t?`radix-${t}`:``)}var mz=v.useInsertionEffect||uz;function hz({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=gz({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=v.useRef(e!==void 0);v.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,v.useCallback(t=>{if(s){let n=_z(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function gz({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return mz(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function _z(e){return typeof e==`function`}function vz(e){let t=yz(e),n=v.forwardRef((e,n)=>{let{children:r,...i}=e,a=v.Children.toArray(r),o=a.find(xz);if(o){let e=o.props.children,r=a.map(t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t);return(0,y.jsx)(t,{...i,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,y.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function yz(e){let t=v.forwardRef((e,t)=>{let{children:n,...r}=e;if(v.isValidElement(n)){let e=Cz(n),i=Sz(r,n.props);return n.type!==v.Fragment&&(i.ref=t?az(t,e):e),v.cloneElement(n,i)}return v.Children.count(n)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bz=Symbol(`radix.slottable`);function xz(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===bz}function Sz(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Cz(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wz=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=vz(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,y.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tz(e,t){e&&Zl.flushSync(()=>e.dispatchEvent(t))}function Ez(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}function Dz(e,t=globalThis?.document){let n=Ez(e);v.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Oz=`DismissableLayer`,kz=`dismissableLayer.update`,Az=`dismissableLayer.pointerDownOutside`,jz=`dismissableLayer.focusOutside`,Mz,Nz=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pz=v.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=v.useContext(Nz),[u,d]=v.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=v.useState({}),m=oz(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),b=u?h.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=_,C=Lz(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),w=Rz(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Dz(e=>{b===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),v.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Mz=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),zz(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Mz)}},[u,f,n,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),zz())},[u,l]),v.useEffect(()=>{let e=()=>p({});return document.addEventListener(kz,e),()=>document.removeEventListener(kz,e)},[]),(0,y.jsx)(wz.div,{...c,ref:m,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:rz(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rz(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rz(e.onPointerDownCapture,C.onPointerDownCapture)})});Pz.displayName=Oz;var Fz=`DismissableLayerBranch`,Iz=v.forwardRef((e,t)=>{let n=v.useContext(Nz),r=v.useRef(null),i=oz(t,r);return v.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,y.jsx)(wz.div,{...e,ref:i})});Iz.displayName=Fz;function Lz(e,t=globalThis?.document){let n=Ez(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Bz(Az,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Rz(e,t=globalThis?.document){let n=Ez(e),r=v.useRef(!1);return v.useEffect(()=>{let e=e=>{e.target&&!r.current&&Bz(jz,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zz(){let e=new CustomEvent(kz);document.dispatchEvent(e)}function Bz(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Tz(i,a):i.dispatchEvent(a)}var Vz=`focusScope.autoFocusOnMount`,Hz=`focusScope.autoFocusOnUnmount`,Uz={bubbles:!1,cancelable:!0},Wz=`FocusScope`,Gz=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Ez(i),u=Ez(a),d=v.useRef(null),f=oz(t,e=>c(e)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Qz(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Qz(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Qz(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){$z.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Vz,Uz);s.addEventListener(Vz,l),s.dispatchEvent(t),t.defaultPrevented||(Kz(nB(Jz(s)),{select:!0}),document.activeElement===e&&Qz(s))}return()=>{s.removeEventListener(Vz,l),setTimeout(()=>{let t=new CustomEvent(Hz,Uz);s.addEventListener(Hz,u),s.dispatchEvent(t),t.defaultPrevented||Qz(e??document.body,{select:!0}),s.removeEventListener(Hz,u),$z.remove(p)},0)}}},[s,l,u,p]);let m=v.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=qz(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Qz(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Qz(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,y.jsx)(wz.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Gz.displayName=Wz;function Kz(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Qz(r,{select:t}),document.activeElement!==n)return}function qz(e){let t=Jz(e);return[Yz(t,e),Yz(t.reverse(),e)]}function Jz(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yz(e,t){for(let n of e)if(!Xz(n,{upTo:t}))return n}function Xz(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Zz(e){return e instanceof HTMLInputElement&&`select`in e}function Qz(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zz(e)&&t&&e.select()}}var $z=eB();function eB(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tB(e,t),e.unshift(t)},remove(t){e=tB(e,t),e[0]?.resume()}}}function tB(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nB(e){return e.filter(e=>e.tagName!==`A`)}var rB=`Portal`,iB=v.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=v.useState(!1);uz(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Zl.createPortal((0,y.jsx)(wz.div,{...r,ref:t}),o):null});iB.displayName=rB;function aB(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}var oB=e=>{let{present:t,children:n}=e,r=sB(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=oz(r.ref,lB(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null};oB.displayName=`Presence`;function sB(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),[o,s]=aB(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{let e=cB(r.current);a.current=o===`mounted`?e:`none`},[o]),uz(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=cB(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),uz(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=cB(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=cB(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:v.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function cB(e){return e?.animationName||`none`}function lB(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uB=0;function dB(){v.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??fB()),document.body.insertAdjacentElement(`beforeend`,e[1]??fB()),uB++,()=>{uB===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),uB--}},[])}function fB(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var pB=`Dialog`,[mB,hB]=cz(pB),[gB,_B]=mB(pB),vB=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=hz({prop:r,defaultProp:i??!1,onChange:a,caller:pB});return(0,y.jsx)(gB,{scope:t,triggerRef:s,contentRef:c,contentId:pz(),titleId:pz(),descriptionId:pz(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};vB.displayName=pB;var yB=`DialogTrigger`,bB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(yB,n),a=oz(t,i.triggerRef);return(0,y.jsx)(wz.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":BB(i.open),...r,ref:a,onClick:rz(e.onClick,i.onOpenToggle)})});bB.displayName=yB;var xB=`DialogPortal`,[SB,CB]=mB(xB,{forceMount:void 0}),wB=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=_B(xB,t);return(0,y.jsx)(SB,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(oB,{present:n||a.open,children:(0,y.jsx)(iB,{asChild:!0,container:i,children:e})}))})};wB.displayName=xB;var TB=`DialogOverlay`,EB=v.forwardRef((e,t)=>{let n=CB(TB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_B(TB,e.__scopeDialog);return a.modal?(0,y.jsx)(oB,{present:r||a.open,children:(0,y.jsx)(OB,{...i,ref:t})}):null});EB.displayName=TB;var DB=vz(`DialogOverlay.RemoveScroll`),OB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(TB,n);return(0,y.jsx)(kP,{as:DB,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(wz.div,{"data-state":BB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),kB=`DialogContent`,AB=v.forwardRef((e,t)=>{let n=CB(kB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_B(kB,e.__scopeDialog);return(0,y.jsx)(oB,{present:r||a.open,children:a.modal?(0,y.jsx)(jB,{...i,ref:t}):(0,y.jsx)(MB,{...i,ref:t})})});AB.displayName=kB;var jB=v.forwardRef((e,t)=>{let n=_B(kB,e.__scopeDialog),r=v.useRef(null),i=oz(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return bN(e)},[]),(0,y.jsx)(NB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rz(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:rz(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:rz(e.onFocusOutside,e=>e.preventDefault())})}),MB=v.forwardRef((e,t)=>{let n=_B(kB,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(NB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),NB=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=_B(kB,n),c=v.useRef(null),l=oz(t,c);return dB(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Gz,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(Pz,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":BB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(WB,{titleId:s.titleId}),(0,y.jsx)(KB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),PB=`DialogTitle`,FB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(PB,n);return(0,y.jsx)(wz.h2,{id:i.titleId,...r,ref:t})});FB.displayName=PB;var IB=`DialogDescription`,LB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(IB,n);return(0,y.jsx)(wz.p,{id:i.descriptionId,...r,ref:t})});LB.displayName=IB;var RB=`DialogClose`,zB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(RB,n);return(0,y.jsx)(wz.button,{type:`button`,...r,ref:t,onClick:rz(e.onClick,()=>i.onOpenChange(!1))})});zB.displayName=RB;function BB(e){return e?`open`:`closed`}var VB=`DialogTitleWarning`,[HB,UB]=sz(VB,{contentName:kB,titleName:PB,docsSlug:`dialog`}),WB=({titleId:e})=>{let t=UB(VB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
98
+ `},wP=0,TP=[];function EP(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(wP++)[0],a=v.useState(JN)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=CN([e.lockRef.current],(e.shards||[]).map(xP),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=yP(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=fP(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=fP(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return vP(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!TP.length||TP[TP.length-1]!==a)){var r=`deltaY`in n?bP(n):yP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&SP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(xP).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:DP(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=yP(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,bP(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,yP(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return TP.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,sP),document.addEventListener(`touchmove`,c,sP),document.addEventListener(`touchstart`,u,sP),function(){TP=TP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,sP),document.removeEventListener(`touchmove`,c,sP),document.removeEventListener(`touchstart`,u,sP)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:CP(i)}):null,p?v.createElement(iP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function DP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var OP=LN(RN,EP),kP=v.forwardRef(function(e,t){return v.createElement(BN,xN({},e,{ref:t,sideCar:OP}))});kP.classNames=BN.classNames;var AP=Object.defineProperty,jP=(e,t)=>AP(e,`name`,{value:t,configurable:!0}),MP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],NP=[` `,`Enter`],PP=`Select`,[FP,IP,LP]=Bl(PP),[RP,zP]=xl(PP,[LP,qM]),BP=qM(),[VP,HP]=RP(PP),[UP,WP]=RP(PP);function GP(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=BP(t),[_,b]=v.useState(null),[x,S]=v.useState(null),[C,w]=v.useState(!1),T=Uk(l),[E,D]=Hu({prop:r,defaultProp:i??!1,onChange:a,caller:PP}),[O,k]=Hu({prop:o,defaultProp:s,onChange:c,caller:PP}),A=v.useRef(null),j=v.useRef(O);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=jP(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,k]);let M=!_||!!m||!!_.closest(`form`),[N,P]=v.useState(new Set),F=vA(),I=Array.from(N).map(e=>e.props.value).join(`;`),L=v.useCallback(e=>{P(t=>new Set(t).add(e))},[]),ee=v.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:F,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:N,nativeSelectKey:I,isFormControl:M};return(0,y.jsx)(oN,{...g,children:(0,y.jsx)(VP,{scope:t,...te,children:(0,y.jsx)(FP.Provider,{scope:t,children:(0,y.jsx)(UP,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:ee,children:IF(h)?h(te):n})})})})}jP(GP,`SelectProvider`);var KP=jP(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,y.jsx)(GP,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,y.jsxs)(y.Fragment,{children:[n,e?(0,y.jsx)(FF,{__scopeSelect:t}):null]})})},`Select`),qP=`SelectTrigger`,JP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=BP(n),o=HP(qP,n),s=o.disabled||r,c=_l(t,o.onTriggerChange),l=IP(n),u=v.useRef(`touch`),[d,f,p]=RF(e=>{let t=l().filter(e=>!e.disabled),n=zF(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=jP(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,y.jsx)(sN,{asChild:!0,...a,children:(0,y.jsx)(eu.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":LF(o.value)?``:void 0,...i,ref:c,onClick:G(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:G(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:G(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&MP.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),YP=`SelectValue`,XP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=HP(YP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=_l(t,c.onValueNodeChange);Su(()=>{l(u)},[l,u]);let f=LF(c.value);return(0,y.jsx)(eu.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,y.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),ZP=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,y.jsx)(eu.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[QP,$P]=RP(`SelectPortal`,{forceMount:void 0}),eF=jP(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,y.jsx)(QP,{scope:e.__scopeSelect,forceMount:n,children:(0,y.jsx)(wu,{asChild:!0,...r})})},`SelectPortal`),tF=`SelectContent`,nF=v.forwardRef(jP(function(e,t){let n=$P(tF,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=HP(tF,e.__scopeSelect),[o,s]=v.useState();return Su(()=>{s(new DocumentFragment)},[]),(0,y.jsx)(Ou,{present:r||a.open,children:({present:e})=>e?(0,y.jsx)(cF,{...i,ref:t}):(0,y.jsx)(rF,{...i,fragment:o})})},`SelectContent`)),rF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Zl.createPortal((0,y.jsx)(aF,{scope:n,children:(0,y.jsx)(FP.Slot,{scope:n,children:(0,y.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),iF=10,[aF,oF]=RP(tF),sF=Tl(`SelectContent.RemoveScroll`),cF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,b=HP(tF,n),[x,S]=v.useState(null),[C,w]=v.useState(null),T=_l(t,S),[E,D]=v.useState(null),[O,k]=v.useState(null),A=IP(n),[j,M]=v.useState(!1),N=v.useRef(!1);v.useEffect(()=>{if(x)return bN(x)},[x]),Yk();let P=v.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),F=v.useCallback(()=>P([E,x]),[P,E,x]);v.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=b;v.useEffect(()=>{if(x){let e={x:0,y:0},t=jP(t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},`handlePointerMove`),n=jP(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(x)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null},`handlePointerUp`);return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,I,L]),v.useEffect(()=>{let e=jP(()=>I(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=RF(e=>{let t=A().filter(e=>!e.disabled),n=zF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(N.current=!0))},[b.value]),R=v.useCallback(()=>x?.focus(),[x]),z=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),B=r===`popper`?uF:lF,re=B===uF?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,y.jsx)(aF,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:ne,selectedItem:E,onItemLeave:R,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:j,searchRef:ee,children:(0,y.jsx)(kP,{as:sF,allowPinchZoom:!0,children:(0,y.jsx)(nA,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:G(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,y.jsx)(fu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,y.jsx)(B,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),lF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=HP(tF,n),o=oF(tF,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=_l(t,u),f=IP(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:b}=o,x=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iF,d=zk(a,[iF,Math.max(iF,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-iF,d=zk(a,[iF,Math.max(iF,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-iF*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-iF,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${iF}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Su(()=>x(),[x]);let[S,C]=v.useState();Su(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);let w=v.useCallback(e=>{e&&m.current===!0&&(x(),b?.(),m.current=!1)},[x,b]);return(0,y.jsx)(dF,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:w,children:(0,y.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,y.jsx)(eu.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),uF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=iF,...a}=e,o=BP(n);return(0,y.jsx)(cN,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[dF,fF]=RP(tF,{}),pF=`SelectViewport`,mF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=oF(pF,n),o=fF(pF,n),s=_l(t,a.onViewportChange),c=v.useRef(0);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,y.jsx)(FP.Slot,{scope:n,children:(0,y.jsx)(eu.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:G(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-iF*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[hF,gF]=RP(`SelectGroup`),_F=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e,i=vA();return(0,y.jsx)(hF,{scope:n,id:i,children:(0,y.jsx)(eu.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),vF=`SelectLabel`,yF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e,i=gF(vF,n);return(0,y.jsx)(eu.div,{id:i.id,...r,ref:t})},`SelectLabel`)),bF=`SelectItem`,[xF,SF]=RP(bF),CF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=HP(bF,n),c=oF(bF,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=_l(t,iu(e=>c.itemRefCallback?.(e,r,i))),h=vA(),g=v.useRef(`touch`),_=jP(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,y.jsx)(xF,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,y.jsx)(FP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,y.jsx)(eu.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:G(o.onFocus,()=>p(!0)),onBlur:G(o.onBlur,()=>p(!1)),onClick:G(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:G(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:G(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:G(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(NP.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),wF=`SelectItemText`,TF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=HP(wF,n),s=oF(wF,n),c=SF(wF,n),l=WP(wF,n),[u,d]=v.useState(null),f=iu(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=_l(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,y.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Su(()=>(g(h),()=>_(h)),[g,_,h]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eu.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!LF(o.value)?Zl.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),EF=`SelectItemIndicator`,DF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e;return SF(EF,n).isSelected?(0,y.jsx)(eu.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),OF=`SelectScrollUpButton`,kF=v.forwardRef(jP(function(e,t){let n=oF(OF,e.__scopeSelect),r=fF(OF,e.__scopeSelect),[i,a]=v.useState(!1),o=_l(t,r.onScrollButtonChange);return Su(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};jP(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,y.jsx)(MF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),AF=`SelectScrollDownButton`,jF=v.forwardRef(jP(function(e,t){let n=oF(AF,e.__scopeSelect),r=fF(AF,e.__scopeSelect),[i,a]=v.useState(!1),o=_l(t,r.onScrollButtonChange);return Su(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};jP(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,y.jsx)(MF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),MF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=oF(`SelectScrollButton`,n),o=v.useRef(null),s=IP(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Su(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,y.jsx)(eu.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:G(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:G(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:G(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),NF=v.forwardRef(jP(function(e,t){let{__scopeSelect:n,...r}=e;return(0,y.jsx)(eu.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),PF=`SelectBubbleInput`,FF=v.forwardRef(jP(function({__scopeSelect:e,...t},n){let r=HP(PF,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=v.useRef(null),m=_l(n,p),h=i??``,g=dN(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,y.jsxs)(eu.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Yu,...t.style},ref:m,defaultValue:h,children:[LF(i)&&!_?(0,y.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function IF(e){return typeof e==`function`}jP(IF,`isFunction`);function LF(e){return e===``||e===void 0}jP(LF,`shouldShowPlaceholder`);function RF(e){let t=iu(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),jP((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}jP(RF,`useTypeaheadSearch`);function zF(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=BF(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}jP(zF,`findNextItem`);function BF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}jP(BF,`wrapArray`);var VF=KP,HF=_F,UF=XP,WF=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,y.jsxs)(JP,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,y.jsx)(ZP,{asChild:!0,children:(0,y.jsx)(_f,{className:`size-4 opacity-50`})})]}),GF=({className:e,...t})=>(0,y.jsx)(kF,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,y.jsx)(gf,{})}),KF=({className:e,...t})=>(0,y.jsx)(jF,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,y.jsx)(pf,{})}),qF=({className:e,children:t,position:n=`popper`,...r})=>(0,y.jsx)(eF,{children:(0,y.jsxs)(nF,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,y.jsx)(GF,{}),(0,y.jsx)(mF,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,y.jsx)(KF,{})]})}),JF=({className:e,...t})=>(0,y.jsx)(yF,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),YF=({className:e,children:t,...n})=>(0,y.jsxs)(CF,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,y.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,y.jsx)(DF,{children:(0,y.jsx)(ff,{className:`size-4`})})}),(0,y.jsx)(TF,{children:t})]}),XF=({className:e,...t})=>(0,y.jsx)(NF,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Y=VF;Y.Group=HF,Y.Value=UF,Y.Trigger=WF,Y.ScrollUpButton=GF,Y.ScrollDownButton=KF,Y.Content=qF,Y.Label=JF,Y.Item=YF,Y.Separator=XF;var ZF=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},QF=e=>{let t=(0,V.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=ZF(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,v.useState)(a??null),[l,u]=(0,v.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,v.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,y.jsxs)(`div`,{className:`flex gap-1`,children:[(0,y.jsxs)(Y,{onValueChange:c,defaultValue:a,children:[(0,y.jsx)(Y.Trigger,{className:`w-20`,children:(0,y.jsx)(Y.Value,{placeholder:`Select a comparator`})}),(0,y.jsxs)(Y.Content,{children:[(0,y.jsx)(Y.Item,{value:`<`,children:`<`}),(0,y.jsx)(Y.Item,{value:`<=`,children:`<=`}),(0,y.jsx)(Y.Item,{value:`=`,children:`=`}),(0,y.jsx)(Y.Item,{value:`>=`,children:`>=`}),(0,y.jsx)(Y.Item,{value:`>`,children:`>`})]})]}),(0,y.jsx)(RO,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},$F=({rawContent:e})=>{let[t,n]=(0,v.useState)(``);return(0,v.useEffect)(()=>{ht(async()=>{let{default:e}=await import(`./purify.es-JEAr64Sr.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,y.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,y.jsx)(`div`,{})},eI=(0,v.lazy)(()=>ht(()=>import(`./MarkDownRender-CDk9zs5-.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3]))),tI=(0,v.lazy)(()=>ht(()=>import(`./MarkdownEditor-o0H3vQy2.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([4,2,3,1,5]))),nI=(0,v.memo)(function(e){let t=(0,V.c)(2),{label:n,...r}=e,[i,a]=(0,v.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,y.jsx)(SO,{header:n,label:n,onToggle:o,children:i?(0,y.jsx)(xI,{...r}):null})}),rI=e=>{let t=(0,V.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=nT(),s=eT(),{mutate:c,isPending:l}=iO(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,y.jsx)(Ok,{variant:`default`,onContentChange:u,additionalButtons:(0,y.jsx)(bO,{Icon:Nf,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},iI=e=>{let t=(0,V.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=nT(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,y.jsx)(lk,{variant:`default`,onContentChange:o,...i})},aI=[{content:`False`,value:!1},{content:`True`,value:!0}],oI=e=>{let t=(0,V.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=nT(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,y.jsx)(MO,{choices:aI,value:!0,onChange:o,color:`text`,size:`sm`,...i})},sI=e=>{let t=(0,V.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=fn(),{selectedLocales:c}=Nk(),l=n[S],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:Yt(e,o)})}),(0,y.jsx)(`tr`,{className:`flex`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:l[e]??nn(l[s]),keyPath:[...r,{type:S,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},cI=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewEnumeration:s,removeEnumeration:c}=dn(`navigation-view`),l=n[C],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,nn(l[d])??``,[...r,{type:C,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[C]).map(e=>{let t=[...r,{type:C,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(`div`,{className:`flex flex-1`,children:(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Mf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,y.jsx)(`tr`,{className:`w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(QF,{value:e,onChange:t=>{let a=n[C],s=Fk(a,e,t),c={...n,[C]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:l[e]??nn(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Of,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},lI=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewSelectCase:s,removeSelectCase:c}=dn(`navigation-view`),l=n[ne],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,nn(l[d])??``,[...r,{type:ne,key:`newCase`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(l).map(e=>{let t=[...r,{type:ne,key:e}],s=`${JSON.stringify(r)}-select-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(`div`,{className:`flex flex-1`,children:(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Mf,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,y.jsx)(`tr`,{className:`w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(lk,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:t=>{let a={...n,[ne]:Fk(l,e,String(t))};o(i.localId,a,r)},children:e})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:l[e]??nn(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Of,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},uI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[T];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.true),keyPath:[...t,{type:T,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},dI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[te];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.male),keyPath:[...t,{type:te,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},fI=[`zero`,`one`,`two`,`few`,`many`,`other`],pI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[w];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:fI.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:i[e]??nn(i.other),keyPath:[...t,{type:w,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},mI=e=>{let t=(0,V.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=nT(),{addNewElement:s,removeElement:c}=dn(`navigation-view`),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,y.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,y.jsx)(bO,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:k,key:t}];o(i.localId,void 0,e)},Icon:Mf,children:c.text})]})})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(SI,{section:e??nn(n[0]),keyPath:[...r,{type:k,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:k,key:n.length}];o(i.localId,nn(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,y.jsx)(bO,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Of,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},hI=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,y.jsx)(`table`,{className:`w-full`,children:(0,y.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:O,key:e}],s=i[e]??nn(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,y.jsx)(`tr`,{className:`block w-full`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(xI,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,y.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,y.jsx)(`td`,{className:`flex w-full`,children:(0,y.jsx)(nI,{label:Rt(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},gI=e=>{let t=(0,V.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,v.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:F}],l=n[F];s=(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsx)(MO,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,y.jsx)(SI,{section:l,keyPath:c,dictionary:i,renderSection:a===1?CI:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},_I=e=>{let t=(0,V.c)(12),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,v.useState)(0),{addEditedContent:c}=nT(),l;if(t[0]!==c||t[1]!==i||t[2]!==a||t[3]!==r||t[4]!==o||t[5]!==n){let e=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],u=[...r,{type:P}],d=n.markdown??``,f;t[7]!==c||t[8]!==i?(f=(e,t)=>(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(_O,{}),children:(0,y.jsx)(tI,{defaultValue:e,onChange:e=>c(i.localId,e,t)},JSON.stringify(t))}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let p=f,m;t[10]===a?m=t[11]:(m=e=>(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(_O,{}),children:(0,y.jsx)(eI,{isDarkMode:a,children:e})}),t[10]=a,t[11]=m);let h=m;l=(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsx)(MO,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,y.jsx)(SI,{section:d,keyPath:u,dictionary:i,renderSection:o===0?p:o===2?h:void 0})]}),t[0]=c,t[1]=i,t[2]=a,t[3]=r,t[4]=o,t[5]=n,t[6]=l}else l=t[6];return l},vI=({section:e,keyPath:t,...n})=>{let r=[...t,{type:E}],i=e[E];return(0,y.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,y.jsx)(SI,{section:i,keyPath:r,...n})})},yI=({section:e,keyPath:t,...n})=>{let r=[...t,{type:D}],i=e[D],{content:a}=e;return(0,y.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,y.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,y.jsx)(SI,{section:a,keyPath:r,...n})]})},bI=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=nT(),s=i[A],c=[...t,{type:A}];return(0,y.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,y.jsx)(Ik,{children:`Dictionary key`}),(0,y.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,y.jsx)(Ik,{children:`Path (optional)`}),(0,y.jsx)(lk,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},xI=(0,v.memo)(function(e){let t=(0,V.c)(87),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=dn(`navigation-view`),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=cn(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,y.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,y.jsx)(`span`,{children:`(React Node)`}),(0,y.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,y.jsx)(bI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,y.jsx)(sI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,y.jsx)(cI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,y.jsx)(uI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`select`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,y.jsx)(lI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`gender`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,y.jsx)(dI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`plural`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,y.jsx)(pI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`insertion`){let e;t[45]!==i||t[46]!==r||t[47]!==a||t[48]!==n?(e=(0,y.jsx)(vI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=a,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`markdown`){let e;t[50]!==i||t[51]!==o||t[52]!==r||t[53]!==n?(e=(0,y.jsx)(_I,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[50]=i,t[51]=o,t[52]=r,t[53]=n,t[54]=e):e=t[54],l=e;break bb0}if(e===`html`){let e;t[55]!==i||t[56]!==r||t[57]!==n?(e=(0,y.jsx)(gI,{dictionary:i,keyPath:r,section:n}),t[55]=i,t[56]=r,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`file`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,y.jsx)(yI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`array`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,y.jsx)(mI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`object`){let e;t[69]!==i||t[70]!==r||t[71]!==a||t[72]!==n?(e=(0,y.jsx)(hI,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[69]=i,t[70]=r,t[71]=a,t[72]=n,t[73]=e):e=t[73],l=e;break bb0}if(e===`number`){let e;t[74]!==i||t[75]!==r||t[76]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:(0,y.jsx)(iI,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[74]=i,t[75]=r,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`text`){let e;t[78]!==i||t[79]!==r||t[80]!==a||t[81]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n,r):(0,y.jsx)(rI,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[78]=i,t[79]=r,t[80]=a,t[81]=n,t[82]=e):e=t[82],l=e;break bb0}if(e===`boolean`){let e;t[83]!==i||t[84]!==r||t[85]!==n?(e=(0,y.jsx)(`div`,{className:`w-full p-2`,children:(0,y.jsx)(oI,{dictionary:i,keyPath:r,value:n})}),t[83]=i,t[84]=r,t[85]=n,t[86]=e):e=t[86],l=e;break bb0}c=(0,y.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),SI=(0,v.memo)(function(e){return(0,y.jsx)(ck,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,y.jsx)(xI,{...e})})});function CI(e){return(0,y.jsx)($F,{rawContent:e})}var wI=Qd(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{primary:`text-primary`,secondary:`text-secondary`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`custom`}}),TI=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},EI=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(EI):(0,v.isValidElement)(e)?EI(e.props.children):!1,DI=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=t===`button`||t===`button-outlined`,g=u??(h?`md`:`custom`),_=d??TI(e),v=f??p?.startsWith(`#`)??!1,b=EI(i),x=_?`noopener noreferrer nofollow`:void 0,S=_?`_blank`:`_self`,C=l&&p&&!_&&!v?Kt(p,l):p;return(0,y.jsxs)(`a`,{href:C===``?void 0:C,"aria-label":a,rel:x,target:S,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(wI({variant:t,color:n,roundedSize:r,underlined:c,size:g,className:o})),...m,children:[h&&b?(0,y.jsx)(`span`,{children:i}):i,_&&b&&(0,y.jsx)(Sf,{className:`ml-2 inline-block size-4`}),v&&(0,y.jsx)(wf,{className:`ml-2 inline-block size-4`})]})},OI=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,kI=Qd(`flex flex-row flex-wrap items-center`,{variants:{size:{xs:`gap-1 text-xs`,sm:`gap-1.5 text-sm`,md:`gap-2 text-base`,lg:`gap-3 text-lg`,xl:`gap-4 text-xl`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`md`,spacing:`normal`}}),AI=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Pe(`breadcrumb`).linkLabel;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(DI,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`custom`,children:(0,y.jsx)(`span`,{itemProp:`name`,children:n})}),(0,y.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},jI=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=dn(`breadcrumb`);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(bO,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,size:`custom`,...o,children:(0,y.jsx)(`span`,{itemProp:`name`,children:t})}),(0,y.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},MI=({children:e,position:t,className:n,...r})=>(0,y.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,y.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,y.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),NI=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,y.jsx)(hf,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,y.jsx)(`nav`,{"aria-label":o,children:(0,y.jsx)(`ol`,{className:W(kI({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=OI(n);if(p)return(0,y.jsxs)(v.Fragment,{children:[(0,y.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,y.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,y.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,y.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,y.jsx)(MI,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,y.jsx)(AI,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,y.jsx)(jI,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,v.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,y.jsxs)(v.Fragment,{children:[_,(0,y.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,y.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},PI=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>{let o=[...a?[{text:Rt(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:Rt(t.key?.toString()??``)}))];return(0,y.jsx)(NI,{links:o,locale:r,elementType:`location`,color:i})},FI=({children:e,className:t,identifier:n,...r})=>(0,y.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});FI.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,y.jsx)(bO,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),FI.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,y.jsx)(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,y.jsx)(xO,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function II(e){return Array.isArray?Array.isArray(e):KI(e)===`[object Array]`}function LI(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function RI(e){return e==null?``:LI(e)}function zI(e){return typeof e==`string`}function BI(e){return typeof e==`number`}function VI(e){return e===!0||e===!1||UI(e)&&KI(e)==`[object Boolean]`}function HI(e){return typeof e==`object`}function UI(e){return HI(e)&&e!==null}function WI(e){return e!=null}function GI(e){return!e.trim().length}function KI(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var qI=`Incorrect 'index' type`,JI=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,YI=e=>`Invalid value for key ${e}`,XI=e=>`Pattern length exceeds max of ${e}.`,ZI=e=>`Missing ${e} property in key`,QI=e=>`Property 'weight' in key '${e}' must be a positive integer`,$I=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,eL=Object.prototype.hasOwnProperty,tL=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=nL(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function nL(e){let t=null,n=null,r=null,i=1,a=null;if(zI(e)||II(e))r=e,t=rL(e),n=iL(e);else{if(!eL.call(e,`name`))throw Error(ZI(`name`));let o=e.name;if(r=o,eL.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(QI(iL(o)));t=rL(o),n=iL(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function rL(e){return II(e)?e:e.split(`.`)}function iL(e){return II(e)?e.join(`.`):e}function aL(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(WI(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!WI(s))return;if(a===t.length-1&&(zI(s)||BI(s)||VI(s)||typeof s==`bigint`))n.push(o===void 0?RI(s):{v:RI(s),i:o});else if(II(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,zI(t)?t.split(`.`):t,0),r?n:n[0]}var oL={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},sL={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},cL={location:0,threshold:.6,distance:100},lL={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:aL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},X=Object.freeze({...sL,...oL,...cL,...lL});function uL(e){return e>=9&&e<=13||e===32||e===160}function dL(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)uL(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var fL=class{constructor({getFn:e=X.getFn,fieldNormWeight:t=X.fieldNormWeight}={}){this.norm=dL(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(zI(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(JI);if(zI(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(JI);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!WI(e)||GI(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(WI(i)){if(II(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(WI(n)){if(zI(n)){if(!GI(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(WI(n.v)){let t=zI(n.v)?n.v:RI(n.v);if(!GI(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(zI(i)&&!GI(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function pL(e,t,{getFn:n=X.getFn,fieldNormWeight:r=X.fieldNormWeight}={}){let i=new fL({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(nL)),i.setSources(t),i.create(),i}function mL(e,{getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new fL({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function hL(e=[],t=X.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function gL(e,t,n,{location:r=X.location,distance:i=X.distance,threshold:a=X.threshold,findAllMatches:o=X.findAllMatches,minMatchCharLength:s=X.minMatchCharLength,includeMatches:c=X.includeMatches,ignoreLocation:l=X.ignoreLocation}={}){if(t.length>32)throw Error(XI(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=hL(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function _L(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function vL(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var yL={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},bL=RegExp(`[`+Object.keys(yL).join(``)+`]`,`g`),xL=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(bL,e=>yL[e]):e=>e,SL=class{constructor(e,{location:t=X.location,threshold:n=X.threshold,distance:r=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:o=X.minMatchCharLength,isCaseSensitive:s=X.isCaseSensitive,ignoreDiacritics:c=X.ignoreDiacritics,ignoreLocation:l=X.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?xL(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:_L(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?xL(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=gL(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=vL(u)),p}},CL=new Set([`fuzzy`,`include`]);function wL(e){return e.startsWith(`inverse`)}var TL=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new SL(e,{location:t.location??X.location,threshold:t.threshold??X.threshold,distance:t.distance??X.distance,includeMatches:t.includeMatches??X.includeMatches,findAllMatches:t.findAllMatches??X.findAllMatches,minMatchCharLength:t.minMatchCharLength??X.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??X.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??X.ignoreDiacritics,ignoreLocation:t.ignoreLocation??X.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],EL=TL.length,DL=`\0`,OL=`|`;function kL(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function AL(e,t){let n=e.match(t);return n?n[1]:null}function jL(e,t={}){return e.replace(/\\\|/g,DL).split(OL).map(e=>{let n=kL(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<EL;){let e=TL[o],n=AL(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<EL;){let e=TL[o],n=AL(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var ML=class{constructor(e,{isCaseSensitive:t=X.isCaseSensitive,ignoreDiacritics:n=X.ignoreDiacritics,includeMatches:r=X.includeMatches,minMatchCharLength:i=X.minMatchCharLength,ignoreLocation:a=X.ignoreLocation,findAllMatches:o=X.findAllMatches,location:s=X.location,threshold:c=X.threshold,distance:l=X.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?xL(e):e,this.pattern=e,this.query=jL(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?xL(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,wL(r.type)&&(c=!0),n&&(CL.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=vL(o)),e}}return{isMatch:!1,score:1}}},NL=[];function PL(...e){NL.push(...e)}function FL(e,t){for(let n=0,r=NL.length;n<r;n+=1){let r=NL[n];if(r.condition(e,t))return new r(e,t)}return new SL(e,t)}var IL={AND:`$and`,OR:`$or`},LL={PATH:`$path`,PATTERN:`$val`},RL=e=>!!(e[IL.AND]||e[IL.OR]),zL=e=>!!e[LL.PATH],BL=e=>!II(e)&&HI(e)&&!RL(e),VL=e=>({[IL.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function HL(e,t,{auto:n=!0}={}){let r=e=>{if(zI(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=FL(e,t)),r}let i=Object.keys(e),a=zL(e);if(!a&&i.length>1&&!RL(e))return r(VL(e));if(BL(e)){let r=a?e[LL.PATH]:i[0],o=a?e[LL.PATTERN]:e[r];if(!zI(o))throw Error(YI(r));let s={keyId:iL(r),pattern:o};return n&&(s.searcher=FL(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];II(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return RL(e)||(e=VL(e)),r(e)}function UL(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function WL(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){e.forEach(e=>{e.score=UL(e.matches,{ignoreFieldNorm:t})})}var GL=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function KL(e){let t=[];return e.matches.forEach(e=>{if(!WI(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function qL(e,t,{includeMatches:n=X.includeMatches,includeScore:r=X.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=KL(e)),r&&(a.score=e.score),a})}var JL=/[\p{L}\p{M}\p{N}_]+/gu,YL=new WeakSet;function XL(e){YL.has(e)||(YL.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function ZL(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||XL(e),t=>t.match(e)||[]):e=>e.match(JL)||[]}function QL({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=ZL(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=xL(n)),r(n)}}}var $L=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=QL({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new SL(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=vL(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function eR(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function tR(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){eR(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)eR(e,t.v,i,r);else eR(e,n.v,i,r)}}}function nR(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)tR(r,i,t,n);return r}function rR(e,t,n,r){tR(e,t,n,r)}function iR(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function aR(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)iR(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var oR=class{constructor(e,t,n){this.options={...X,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new tL(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=FL(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof fL))throw Error(qI);if(this._myIndex=t||pL(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=QL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=nR(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!WI(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=QL({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});rR(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&aR(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(JI);this._invertedIndex&&aR(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(zI(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return BI(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&BI(n)&&n>0&&zI(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new GL(n,u);zI(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=zI(e)?zI(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),WL(d,{ignoreFieldNorm:s}),a&&d.sort(zI(e)?u:l),BI(n)&&n>-1&&(d=d.slice(0,n));return qL(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!WI(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=UL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=HL(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===IL.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(WI(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!WI(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=UL(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!WI(t))return[];let r=[];if(II(t))t.forEach(({v:t,i,n:a})=>{if(!WI(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};oR.version=`7.5.0`,oR.createIndex=pL,oR.parseIndex=mL,oR.config=X,oR.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error($I);return FL(e,{...X,...n}).searchIn(t)},oR.parseQuery=HL,PL(ML),PL($L),oR.use=function(...e){e.forEach(e=>PL(e))};var sR=oR,cR=`locale-switcher-content`,lR=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=dn(`locale-switcher-content`),s=(0,v.useRef)(null),{locale:c}=fn(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=Nk(),f=(0,v.useMemo)(()=>l.map(e=>({locale:e,englishName:Yt(e,`en`),currentLocaleName:Yt(e,c),ownLocaleName:Yt(e)})),[l,c]),[p,m]=(0,v.useState)(``),[h,g]=jk(`locale-content-selector-see-all-locales`,!1),_=(0,v.useMemo)(()=>new sR(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),b=(0,v.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),x=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},S=e=>{g(e),d(e?l:[c])};return(0,y.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,y.jsxs)(FI,{identifier:cR,children:[(0,y.jsx)(FI.Trigger,{identifier:cR,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,y.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,y.jsx)(`div`,{className:`px-2 py-1`,children:(0,y.jsx)(Cf,{size:16})}),(0,y.jsx)(Tf,{className:`self-center`,size:16})]})}),(0,y.jsx)(FI.Panel,{identifier:cR,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,y.jsxs)(ck,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,y.jsx)(`div`,{className:`m-auto p-2`,children:(0,y.jsx)(MO,{defaultValue:h,onChange:S,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`div`,{className:`p-3`,children:(0,y.jsx)(RO,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,y.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:b.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,y.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,y.jsx)(bO,{onClick:()=>x(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,y.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,y.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,y.jsx)(ff,{className:`size-full`})}),(0,y.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,y.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,y.jsx)(`span`,{dir:Jt(e),lang:e,children:i}),(0,y.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,y.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},uR=Qd(`flex items-center justify-center gap-1`,{variants:{size:{sm:`gap-1`,md:`gap-2`,lg:`gap-3`},color:{text:`background-text`,primary:`background-primary`,secondary:`background-secondary`,neutral:`background-neutral`},variant:{default:``,bordered:`rounded-lg border border-border p-2`,ghost:`bg-transparent`}},defaultVariants:{size:`md`,variant:`default`}}),dR=(e,t,n)=>{if(t<=n)return Array.from({length:t},(e,t)=>t+1);let r=[],i=Math.floor(n/2);if(r.push(1),e<=i+2){for(let e=2;e<=Math.min(n-1,t-1);e++)r.push(e);t>n&&r.push(`ellipsis`),t>1&&r.push(t)}else if(e>=t-i-1){t>n&&r.push(`ellipsis`);for(let e=Math.max(2,t-n+2);e<=t;e++)r.push(e)}else{r.push(`ellipsis`);let n=e-i,a=e+i;for(let e=n;e<=a;e++)r.push(e);r.push(`ellipsis`),r.push(t)}return r},fR=e=>e?.getAttribute(`aria-current`)===`true`,pR=e=>e===`sm`?`icon-sm`:e===`lg`?`icon-lg`:`icon-md`,mR=e=>(0,y.jsx)(`div`,{className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/10 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),hR=({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!1,showPrevNext:i=!0,maxVisiblePages:a=5,disabled:o=!1,size:s=`md`,variant:c=`default`,color:l=`text`,className:u,...d})=>{let{goToNextPage:f,goToPreviousPage:p}=dn(`pagination`),m=dR(e,t,a),h=pR(s),g=e===1,_=e===t,b=(0,v.useRef)([]),x=(0,v.useRef)(null),{choiceIndicatorPosition:S,calculatePosition:C}=EO(b,{selector:fR,isHoverable:!0});if((0,v.useEffect)(()=>{let e=setTimeout(()=>{C()},300);return()=>clearTimeout(e)},[e,C]),t<=1)return null;let w=r=>{!o&&r>=1&&r<=t&&r!==e&&n(r)};return(0,y.jsx)(`div`,{className:W(uR({size:s,variant:c}),u),...d,children:(0,y.jsxs)(`div`,{className:`relative flex items-center gap-1`,children:[S&&(0,y.jsx)(mR,{style:S,ref:x}),i&&(0,y.jsx)(bO,{variant:`outline`,size:h,color:`text`,onClick:()=>w(e-1),disabled:o||g,label:p.value,Icon:mf,ref:e=>{e&&(b.current[0]=e)},className:`min-w-0 px-2`}),(0,y.jsx)(`div`,{className:`flex items-center gap-1 max-md:gap-0.5`,children:m.map((t,n)=>{if(t===`ellipsis`){let e=n===m.indexOf(`ellipsis`)?`ellipsis-start`:`ellipsis-end`;return(0,y.jsx)(`div`,{className:`flex h-8 min-w-8 items-center justify-center px-1`,children:(0,y.jsx)(xf,{className:`h-4 w-4 text-muted-foreground`})},e)}let r=t===e,a=+!!i+m.slice(0,n).filter(e=>e!==`ellipsis`).length;return(0,y.jsx)(bO,{variant:r?`default`:`outline`,size:h,color:`text`,onClick:()=>w(t),disabled:o,label:`Go to page ${t}`,"aria-current":r?`true`:`false`,ref:e=>{e&&(b.current[a]=e)},className:W(`flex aspect-square h-8 w-8 min-w-0 items-center justify-center p-0 text-sm`,s===`sm`&&`h-6 w-6 text-xs`,s===`lg`&&`size-10 text-base`,r&&`font-semibold`),children:t},t)})}),i&&(0,y.jsx)(bO,{variant:`outline`,size:h,color:`text`,onClick:()=>w(e+1),disabled:o||_,label:f.value,Icon:hf,ref:e=>{let t=+!!i+m.filter(e=>e!==`ellipsis`).length;e&&(b.current[t]=e)},className:`min-w-0 px-2`})]})})},gR=e=>{let t=rn(e),n=cn(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?gR(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},_R=e=>{let t=(0,V.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,v.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,y.jsx)(SO,{...i,onToggle:s,children:a?n:null})},vR=e=>{let t=(0,V.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=Nk(),o=en(n,r,Yw()),{addEditedContent:s}=tT(),{setFocusedContentKeyPath:c,focusedContent:l}=Zw(),{addNewElement:u,goToField:d}=dn(`navigation-view`),f=cn(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&Pt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=gR(o);if(!o)return(0,y.jsx)(y.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,y.jsx)(bO,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:hf,children:Rt(r[r.length-1]?.key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,y.jsx)(y.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>{let t=[...r,{type:S,key:e}];return(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i},e)},t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,y.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,y.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>{let t=[...r,{type:f,key:e}];return(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i},e)})});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:k,key:t}];return gR(e)?(0,y.jsxs)(bO,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:hf,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,y.jsx)(_R,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,y.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,y.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,y.jsx)(vR,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,y.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,y.jsx)(bO,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:k,key:o.length}],t=o,n=nn(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Of,children:u.text})]})}if(typeof o.nodeType==`string`){let e=[...r,{type:o.nodeType}];return(0,y.jsx)(vR,{keyPath:e,section:n,dictionary:i})}let e=Object.keys(o);return(0,y.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:e.map(e=>{let t=[...r,{type:O,key:e}];return gR(en(n,t))?(0,y.jsx)(bO,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:hf,children:Rt(e)},e):(0,y.jsx)(_R,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:Rt(e),children:(0,y.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,y.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,y.jsx)(vR,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,y.jsxs)(y.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},yR=e=>typeof e==`object`&&e?JSON.stringify(e):e??``,bR=e=>{let t=(0,V.c)(35),{dictionary:n,isDarkMode:r}=e,{itemPagination:i,variantSwitcher:a}=dn(`content-editor`),{editedContent:o}=nT(),{focusedContent:s,setFocusedContentKeyPath:c}=Zw(),[,l]=(0,v.useTransition)(),u;t[0]!==c||t[1]!==l?(u=e=>l(()=>c(e)),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,[f,p]=(0,v.useState)(n),m,h;t[3]===n?(m=t[4],h=t[5]):(m=()=>{p(n)},h=[n],t[3]=n,t[4]=m,t[5]=h),(0,v.useEffect)(m,h);let g=n.item!==void 0||n.variant!==void 0,_;t[6]===n.key?_=t[7]:(_={keys:[n.key]},t[6]=n.key,t[7]=_);let b=g&&!!n.key,x;t[8]===b?x=t[9]:(x={enabled:b},t[8]=b,t[9]=x);let{data:S}=cO(_,x),C;t[10]===S?.data?C=t[11]:(C=S?.data??[],t[10]=S?.data,t[11]=C);let w=C,T;bb0:{if(n.item===void 0){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[12]=e):e=t[12],T=e;break bb0}let e;t[13]===w?e=t[14]:(e=w.filter(xR).sort(SR),t[13]=w,t[14]=e),T=e}let E=T,D;bb1:{if(n.variant===void 0){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[15]=e):e=t[15],D=e;break bb1}let e;t[16]===w?e=t[17]:(e=w.filter(CR),t[16]=w,t[17]=e),D=e}let O=D,k;t[18]===d?k=t[19]:(k=e=>{p(e),d([])},t[18]=d,t[19]=k);let A=k,{content:j,key:M,localId:N}=f,P=s?.keyPath,F=o?.[N]?.content===void 0?j:o?.[N]?.content,I=Yw(),L;t[20]===P?L=t[21]:(L=P??[],t[20]=P,t[21]=L);let ee;t[22]!==I||t[23]!==F||t[24]!==L?(ee=en(F,L,I),t[22]=I,t[23]=F,t[24]=L,t[25]=ee):ee=t[25];let te=ee,ne=(0,v.useDeferredValue)(P),R=(0,v.useDeferredValue)(te),z=R!==te,B;t[26]===F?B=t[27]:(B=gR(F),t[26]=F,t[27]=B);let re=B,ie=gR(R),ae;t[28]!==s?.keyPath||t[29]!==te||t[30]!==d?(ae=()=>{te===void 0&&d(s?.keyPath?.slice(0,-1)??[])},t[28]=s?.keyPath,t[29]=te,t[30]=d,t[31]=ae):ae=t[31];let oe;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(oe=[],t[32]=oe):oe=t[32],(0,v.useEffect)(ae,oe);let se;t[33]===f.localId?se=t[34]:(se=e=>e.localId===f.localId,t[33]=f.localId,t[34]=se);let ce=E.findIndex(se),le=f.variant;return(0,y.jsxs)(`div`,{children:[g&&(0,y.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-4`,children:[E.length>0&&(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`font-medium text-muted text-xs`,children:i.label}),(0,y.jsx)(hR,{currentPage:ce>=0?ce+1:1,totalPages:E.length,onPageChange:e=>{let t=E[e-1];t&&A(t)},size:`sm`})]}),O.length>0&&(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsxs)(`span`,{className:`font-medium text-muted text-xs`,children:[a.label,`:`]}),O.map(e=>{let t=e.localId===f.localId;return(0,y.jsx)(`button`,{type:`button`,onClick:()=>!t&&A(e),className:`rounded-lg px-3 py-1 text-xs transition-colors ${t?`bg-text font-semibold text-text-opposite`:`cursor-pointer border border-border hover:bg-text/10`}`,children:yR(e.variant)},e.localId)}),le!==void 0&&!O.some(e=>e.localId===n.localId)&&(0,y.jsx)(`span`,{className:`rounded-lg bg-text px-3 py-1 font-semibold text-text-opposite text-xs`,children:yR(le)})]})]}),(0,y.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,y.jsx)(PI,{dictionaryKey:M,keyPath:P??[],onClickKeyPath:d}),(0,y.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,y.jsx)(lR,{})})]}),(0,y.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof F==`object`&&F&&!re&&Object.keys(F).length>0&&(0,y.jsx)(ck,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,y.jsx)(vR,{keyPath:[],section:F,dictionary:f})}),(ie||(ne??[]).length>0)&&(0,y.jsx)(`div`,{className:z?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,y.jsx)(SI,{keyPath:ne??[],section:R,dictionary:f,isDarkMode:r})})]})]})};function xR(e){return e.item!==void 0}function SR(e,t){return(e.item??0)-(t.item??0)}function CR(e){return e.variant!==void 0}var wR=Qd(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{primary:`border-primary bg-primary text-primary hover:bg-primary-500`,secondary:`border-secondary bg-secondary text-secondary hover:bg-secondary-300`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-500`,neutral:`border-neutral bg-neutral text-neutral hover:bg-neutral-600`,light:`border-white bg-white text-white hover:bg-neutral-500`,dark:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,text:`border-text bg-text text-text hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-text-opposite`,none:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,outline:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),TR=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,y.jsxs)(p,{className:W(wR({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,y.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,y.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,y.jsx)(`title`,{children:`Remove badge`}),(0,y.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},ER=Object.defineProperty,DR=(e,t)=>ER(e,`name`,{value:t,configurable:!0}),OR=`Dialog`,[kR,AR]=xl(OR),[jR,MR]=kR(OR),NR=DR(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=Hu({prop:r,defaultProp:i??!1,onChange:a,caller:OR}),[d,f]=v.useState(0),[p,m]=v.useState(0);return(0,y.jsx)(jR,{scope:t,triggerRef:s,contentRef:c,contentId:vA(),titleId:vA(),descriptionId:vA(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),[PR,FR]=kR(`DialogPortal`,{forceMount:void 0}),IR=`DialogContent`,LR=v.forwardRef(DR(function(e,t){let n=FR(IR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=MR(IR,e.__scopeDialog);return(0,y.jsx)(Ou,{present:r||a.open,children:a.modal?(0,y.jsx)(RR,{...i,ref:t}):(0,y.jsx)(zR,{...i,ref:t})})},`DialogContent`)),RR=v.forwardRef(DR(function(e,t){let n=MR(IR,e.__scopeDialog),r=v.useRef(null),i=_l(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return bN(e)},[]),(0,y.jsx)(BR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),zR=v.forwardRef(DR(function(e,t){let n=MR(IR,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(BR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),BR=v.forwardRef(DR(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=MR(IR,n);return Yk(),(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(nA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(fu,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":VR(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function VR(e){return e?`open`:`closed`}DR(VR,`getState`);var HR=1,UR=.9,WR=.8,GR=.17,KR=.1,qR=.999,JR=.9999,YR=.99,XR=/[\\\/_+.#"@\[\(\{&]/,ZR=/[\\\/_+.#"@\[\(\{&]/g,QR=/[\s-]/,$R=/[\s-]/g;function ez(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?HR:YR;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=ez(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=HR:XR.test(e.charAt(l-1))?(d*=WR,p=e.slice(i,l-1).match(ZR),p&&i>0&&(d*=qR**+p.length)):QR.test(e.charAt(l-1))?(d*=UR,m=e.slice(i,l-1).match($R),m&&i>0&&(d*=qR**+m.length)):(d*=GR,i>0&&(d*=qR**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=JR)),(d<KR&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=ez(e,t,n,r,l+1,a+2,o),f*KR>d&&(d=f*KR)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function tz(e){return e.toLowerCase().replace($R,` `)}function nz(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,ez(e,t,tz(e),tz(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function rz(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function iz(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function az(...e){return t=>{let n=!1,r=e.map(e=>{let r=iz(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():iz(e[t],null)}}}}function oz(...e){return v.useCallback(az(...e),e)}function sz(e,t){let n=v.createContext(t),r=e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,y.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=v.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function cz(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,y.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=v.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>v.createContext(e));return function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,lz(i,...t)]}function lz(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var uz=globalThis?.document?v.useLayoutEffect:()=>{},dz=v.useId||(()=>void 0),fz=0;function pz(e){let[t,n]=v.useState(dz());return uz(()=>{e||n(e=>e??String(fz++))},[e]),e||(t?`radix-${t}`:``)}var mz=v.useInsertionEffect||uz;function hz({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=gz({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=v.useRef(e!==void 0);v.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,v.useCallback(t=>{if(s){let n=_z(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function gz({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return mz(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function _z(e){return typeof e==`function`}function vz(e){let t=yz(e),n=v.forwardRef((e,n)=>{let{children:r,...i}=e,a=v.Children.toArray(r),o=a.find(xz);if(o){let e=o.props.children,r=a.map(t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t);return(0,y.jsx)(t,{...i,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return(0,y.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function yz(e){let t=v.forwardRef((e,t)=>{let{children:n,...r}=e;if(v.isValidElement(n)){let e=Cz(n),i=Sz(r,n.props);return n.type!==v.Fragment&&(i.ref=t?az(t,e):e),v.cloneElement(n,i)}return v.Children.count(n)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bz=Symbol(`radix.slottable`);function xz(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===bz}function Sz(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Cz(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wz=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=vz(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,y.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tz(e,t){e&&Zl.flushSync(()=>e.dispatchEvent(t))}function Ez(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...e)=>t.current?.(...e),[])}function Dz(e,t=globalThis?.document){let n=Ez(e);v.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Oz=`DismissableLayer`,kz=`dismissableLayer.update`,Az=`dismissableLayer.pointerDownOutside`,jz=`dismissableLayer.focusOutside`,Mz,Nz=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pz=v.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=v.useContext(Nz),[u,d]=v.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=v.useState({}),m=oz(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),b=u?h.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=_,C=Lz(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),w=Rz(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Dz(e=>{b===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),v.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Mz=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),zz(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Mz)}},[u,f,n,l]),v.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),zz())},[u,l]),v.useEffect(()=>{let e=()=>p({});return document.addEventListener(kz,e),()=>document.removeEventListener(kz,e)},[]),(0,y.jsx)(wz.div,{...c,ref:m,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:rz(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rz(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rz(e.onPointerDownCapture,C.onPointerDownCapture)})});Pz.displayName=Oz;var Fz=`DismissableLayerBranch`,Iz=v.forwardRef((e,t)=>{let n=v.useContext(Nz),r=v.useRef(null),i=oz(t,r);return v.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,y.jsx)(wz.div,{...e,ref:i})});Iz.displayName=Fz;function Lz(e,t=globalThis?.document){let n=Ez(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Bz(Az,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Rz(e,t=globalThis?.document){let n=Ez(e),r=v.useRef(!1);return v.useEffect(()=>{let e=e=>{e.target&&!r.current&&Bz(jz,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zz(){let e=new CustomEvent(kz);document.dispatchEvent(e)}function Bz(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Tz(i,a):i.dispatchEvent(a)}var Vz=`focusScope.autoFocusOnMount`,Hz=`focusScope.autoFocusOnUnmount`,Uz={bubbles:!1,cancelable:!0},Wz=`FocusScope`,Gz=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Ez(i),u=Ez(a),d=v.useRef(null),f=oz(t,e=>c(e)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Qz(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Qz(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Qz(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){$z.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Vz,Uz);s.addEventListener(Vz,l),s.dispatchEvent(t),t.defaultPrevented||(Kz(nB(Jz(s)),{select:!0}),document.activeElement===e&&Qz(s))}return()=>{s.removeEventListener(Vz,l),setTimeout(()=>{let t=new CustomEvent(Hz,Uz);s.addEventListener(Hz,u),s.dispatchEvent(t),t.defaultPrevented||Qz(e??document.body,{select:!0}),s.removeEventListener(Hz,u),$z.remove(p)},0)}}},[s,l,u,p]);let m=v.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=qz(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Qz(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Qz(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,y.jsx)(wz.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Gz.displayName=Wz;function Kz(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Qz(r,{select:t}),document.activeElement!==n)return}function qz(e){let t=Jz(e);return[Yz(t,e),Yz(t.reverse(),e)]}function Jz(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yz(e,t){for(let n of e)if(!Xz(n,{upTo:t}))return n}function Xz(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Zz(e){return e instanceof HTMLInputElement&&`select`in e}function Qz(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zz(e)&&t&&e.select()}}var $z=eB();function eB(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tB(e,t),e.unshift(t)},remove(t){e=tB(e,t),e[0]?.resume()}}}function tB(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nB(e){return e.filter(e=>e.tagName!==`A`)}var rB=`Portal`,iB=v.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=v.useState(!1);uz(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Zl.createPortal((0,y.jsx)(wz.div,{...r,ref:t}),o):null});iB.displayName=rB;function aB(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}var oB=e=>{let{present:t,children:n}=e,r=sB(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=oz(r.ref,lB(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null};oB.displayName=`Presence`;function sB(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),[o,s]=aB(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{let e=cB(r.current);a.current=o===`mounted`?e:`none`},[o]),uz(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=cB(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),uz(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=cB(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=cB(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:v.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function cB(e){return e?.animationName||`none`}function lB(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uB=0;function dB(){v.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??fB()),document.body.insertAdjacentElement(`beforeend`,e[1]??fB()),uB++,()=>{uB===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),uB--}},[])}function fB(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var pB=`Dialog`,[mB,hB]=cz(pB),[gB,_B]=mB(pB),vB=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=hz({prop:r,defaultProp:i??!1,onChange:a,caller:pB});return(0,y.jsx)(gB,{scope:t,triggerRef:s,contentRef:c,contentId:pz(),titleId:pz(),descriptionId:pz(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};vB.displayName=pB;var yB=`DialogTrigger`,bB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(yB,n),a=oz(t,i.triggerRef);return(0,y.jsx)(wz.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":BB(i.open),...r,ref:a,onClick:rz(e.onClick,i.onOpenToggle)})});bB.displayName=yB;var xB=`DialogPortal`,[SB,CB]=mB(xB,{forceMount:void 0}),wB=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=_B(xB,t);return(0,y.jsx)(SB,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(oB,{present:n||a.open,children:(0,y.jsx)(iB,{asChild:!0,container:i,children:e})}))})};wB.displayName=xB;var TB=`DialogOverlay`,EB=v.forwardRef((e,t)=>{let n=CB(TB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_B(TB,e.__scopeDialog);return a.modal?(0,y.jsx)(oB,{present:r||a.open,children:(0,y.jsx)(OB,{...i,ref:t})}):null});EB.displayName=TB;var DB=vz(`DialogOverlay.RemoveScroll`),OB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(TB,n);return(0,y.jsx)(kP,{as:DB,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(wz.div,{"data-state":BB(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),kB=`DialogContent`,AB=v.forwardRef((e,t)=>{let n=CB(kB,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=_B(kB,e.__scopeDialog);return(0,y.jsx)(oB,{present:r||a.open,children:a.modal?(0,y.jsx)(jB,{...i,ref:t}):(0,y.jsx)(MB,{...i,ref:t})})});AB.displayName=kB;var jB=v.forwardRef((e,t)=>{let n=_B(kB,e.__scopeDialog),r=v.useRef(null),i=oz(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return bN(e)},[]),(0,y.jsx)(NB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rz(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:rz(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:rz(e.onFocusOutside,e=>e.preventDefault())})}),MB=v.forwardRef((e,t)=>{let n=_B(kB,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(NB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),NB=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=_B(kB,n),c=v.useRef(null),l=oz(t,c);return dB(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Gz,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(Pz,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":BB(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(WB,{titleId:s.titleId}),(0,y.jsx)(KB,{contentRef:c,descriptionId:s.descriptionId})]})]})}),PB=`DialogTitle`,FB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(PB,n);return(0,y.jsx)(wz.h2,{id:i.titleId,...r,ref:t})});FB.displayName=PB;var IB=`DialogDescription`,LB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(IB,n);return(0,y.jsx)(wz.p,{id:i.descriptionId,...r,ref:t})});LB.displayName=IB;var RB=`DialogClose`,zB=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=_B(RB,n);return(0,y.jsx)(wz.button,{type:`button`,...r,ref:t,onClick:rz(e.onClick,()=>i.onOpenChange(!1))})});zB.displayName=RB;function BB(e){return e?`open`:`closed`}var VB=`DialogTitleWarning`,[HB,UB]=sz(VB,{contentName:kB,titleName:PB,docsSlug:`dialog`}),WB=({titleId:e})=>{let t=UB(VB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
99
99
 
100
100
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
101
101