intlayer-editor 8.7.6-canary.0 → 8.7.6

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.
@@ -97,25 +97,25 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
97
97
  >
98
98
  <slot></slot>
99
99
  </span>
100
- `}};IS([ZC({type:Boolean,attribute:`is-selecting`})],Cw.prototype,`isSelecting`,void 0),IS([ZC({type:Number,attribute:`press-duration`})],Cw.prototype,`pressDuration`,void 0),IS([QC()],Cw.prototype,`_isHovered`,void 0),IS([QC()],Cw.prototype,`_isSelectingState`,void 0),IS([ew(`.wrapper`)],Cw.prototype,`_wrapper`,void 0);var ww=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Cw),nw(),iw(),xw())},Tw=()=>({allowedOrigins:[C?.editorURL,C?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),Ew=0,Dw=()=>{Ew++;let e=NS();if(e)return e;let t=new yw({mode:`client`,messenger:Tw(),configuration:w});return PS(t),ww(),t.start(),t},Ow=()=>{Ew=Math.max(0,Ew-1),!(Ew>0)&&(NS()?.stop(),PS(null))},kw=(e,t,n)=>{let r=(0,b.c)(16),i=SS(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,v.useState)(o),l=(0,v.useRef)(o),u=(0,v.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new sw(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,v.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,y;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{u.current?.postCurrentValue()},r[13]=y):y=r[13];let x=y,S;return r[14]===s?S=r[15]:(S=[s,_,x],r[14]=s,r[15]=S),S},Aw=(e,t)=>kw(OS.INTLAYER_URL_CHANGE,e,t),jw=()=>{let e=(0,b.c)(13),t=SS(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,v.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,v.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},Mw=()=>{let e=(0,b.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=jw(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},Nw=()=>{let e=(0,b.c)(3),t=SS(),[n,r]=(0,v.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a),n},Pw=(e,t,n)=>{for(let r of t)try{if(dw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},Fw=()=>{let e=(0,b.c)(12),{localeDictionaries:t}=jw(),n=Nw(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=wS(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=Pw(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},Iw=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,v.useRef)(null);i.current||=new yw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,v.useEffect)(()=>(ww(),PS(a),a.start(),()=>{a.stop(),PS(null)}),[a]),(0,T.jsx)(xS,{manager:a,children:e})},Lw=(0,v.createContext)(void 0),Rw=()=>{let e=(0,b.c)(4),t=SS(),n=(0,v.useContext)(Lw),[r,i]=(0,v.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,v.useEffect)(a,o),r??n},zw=()=>{let e=(0,b.c)(23),t=SS(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},Bw=()=>{let e=(0,b.c)(6),t=SS(),[n,r]=(0,v.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a);let o=zw(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},Vw=()=>{let e=(0,b.c)(5),t=SS(),[n,r]=(0,v.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},Hw=()=>{let e=(0,b.c)(2),t=SS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},Uw=(e,t,n)=>{let r=(0,b.c)(11),i=SS(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,v.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},Ww=()=>{Uw(OS.INTLAYER_IFRAME_CLICKED,kS)},Gw=e=>{let t=(0,b.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=dw(i,n,Nw());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,u=s??r,d;t[1]!==n||t[2]!==o?(d=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=d):d=t[3];let f;return t[4]!==n||t[5]!==a?(f=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=f):f=t[6],(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:d,children:(0,T.jsx)(yS,{value:u,onChange:f})})},Kw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!hT.includes(e)).map(r=>{let i={type:j,key:r},a=[...t,i],o=n[j][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(gT,{...e,key:r,keyPath:a,section:o})]})})})},qw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!hT.includes(e)).map(r=>{let i={type:A,key:r},a=[...t,i],o=n[A][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(gT,{...e,key:r,keyPath:a,section:o})]})})})},Jw=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,v.useState)(!1),u=(0,v.useRef)(null),d=e=>{e.stopPropagation(),c(!1),n()},f=e=>{e.stopPropagation(),c(!1),t()},p=!e||e===``?`-`:e,m=(0,v.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||u.current&&!u.current.contains(e.target)&&(c(!1),n())},[n]);return(0,v.useEffect)(()=>(s?document.addEventListener(`click`,m):document.removeEventListener(`click`,m),()=>document.removeEventListener(`click`,m)),[m,s]),(0,T.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:u,...o,children:[(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,T.jsx)(oS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:yu,onClick:d,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,T.jsx)(oS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Wu,onClick:f,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,T.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:p}),(0,T.jsx)(oS,{label:`Edit`,Icon:Iu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},Yw=(...e)=>e.filter(Boolean).join(` `),Xw=ou([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),Zw=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,T.jsx)(`input`,{className:Yw(Xw({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),Qw=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,T.jsx)(`textarea`,{className:l(`resize-none`,Xw({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),$w=24,eT=12,tT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,v.useRef)(null);(0,v.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=$w*r+eT,s=$w+eT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,v.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,T.jsx)(Qw,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:l(`overflow-y-auto`,t&&`resize-none`,e),...a})},nT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(Jw,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,T.jsx)(tT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},rT=e=>{let t=(0,b.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,u=Nw(),d;t[0]!==u||t[1]!==i||t[2]!==a||t[3]!==n?(d=a??dw(i,n,u),t[0]=u,t[1]=i,t[2]=a,t[3]=n,t[4]=d):d=t[4];let f=d;if(f&&typeof f!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let p=n.length,m=String(f??r),h;if(t[6]!==m||t[7]!==n||t[8]!==p||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],h=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,p===2&&`hover:bg-card/30`,p>=3&&``),onClick:e,children:typeof c==`function`?c(m):(0,T.jsx)(nT,{"aria-label":`Editable field`,defaultValue:m,onSave:e=>o({keyPath:n,newValue:e}),onCancel:iT})}),t[6]=m,t[7]=n,t[8]=p,t[9]=o,t[10]=s,t[11]=c,t[12]=h}else h=t[12];return h};function iT(){return null}var aT=e=>{let t=(0,b.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=Bw(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=dw(e.editedContent,n),s=r[N],{content:c}=r,l=[...n,{type:N}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,T.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,T.jsx)(rT,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},oT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:ee}],i=n[ee];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},sT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:M}],i=n[M];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},cT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},lT=(0,v.memo)(e=>{let t=(0,b.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(uT),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:P},o=[...n,i],c=pr(o,s);return(0,T.jsx)(lS,{level:n.length,title:_r(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,T.jsx)(gT,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function uT(e){return!hT.includes(e)}var dT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(Jw,{value:(0,v.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,T.jsx)(Zw,{ref:i,...r})})},fT=e=>{let t=(0,b.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Nw(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=dw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let u=c;if(u!==void 0&&typeof u!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let d=n.length,f=String(u??r),p;if(t[5]!==f||t[6]!==n||t[7]!==d||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],p=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,d===2&&`hover:bg-card/30`,d>=3&&``),onClick:e,children:(0,T.jsx)(dT,{"aria-label":`Editable number field`,type:`number`,defaultValue:f,onSave:r,onCancel:pT})}),t[5]=f,t[6]=n,t[7]=d,t[8]=a,t[9]=o,t[10]=p}else p=t[10];return p};function pT(){return null}var mT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,T.jsx)(gT,{...e,keyPath:a,section:o})},hT=[`filePath`,`id`,`nodeType`],gT=(0,v.memo)(e=>{let t=Nw(),n=(0,v.useMemo)(()=>dw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,v.useMemo)(()=>_w(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,T.jsx)(cT,{...e,section:n}):r===`html`?(0,T.jsx)(oT,{...e,section:n}):r===`translation`?(0,T.jsx)(mT,{...e,section:n}):r===`enumeration`?(0,T.jsx)(qw,{...e,section:n}):r===`condition`?(0,T.jsx)(Kw,{...e,section:n}):r===`insertion`?(0,T.jsx)(sT,{...e,section:n}):r===`array`?(0,T.jsx)(uS,{...e,section:n}):r===`file`?(0,T.jsx)(aT,{...e,section:n}):(0,T.jsx)(lT,{...e,section:n});if(typeof n==`string`)return(0,T.jsx)(rT,{...e,section:n});if(typeof n==`number`)return(0,T.jsx)(fT,{...e,section:n});if(typeof n==`boolean`)return(0,T.jsx)(Gw,{...e,section:n})}),_T=e=>{let t=(0,b.c)(6),{dictionary:n,...r}=e,i=Nw(),{editedContent:a,addEditedContent:o}=Bw(),{focusedContent:s,setFocusedContentKeyPath:c}=Fw(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,T.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,v.createElement)(gT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},vT={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},yT={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},bT=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),xT=e=>e.reduce((e,t)=>{let n=e??{},r=bT(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=xT([yT,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=xT([yT.headers,...t.map(e=>e.headers)]),s=xT(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=xT(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},ST=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
101
- `);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},autocomplete:async(t,r={})=>await q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},CT=(e={},t)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
102
- `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},wT=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},TT=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},ET=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},DT=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},OT=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},kT=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},AT=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},jT=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},MT=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},NT=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},PT=(e={},t=w)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`})}},FT=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},IT=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},LT=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function RT(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function zT(e,t,n=`.`,r){if(!RT(t))return zT(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:RT(a)&&RT(i[t])?i[t]=zT(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function BT(e){return(...t)=>t.reduce((t,n)=>zT(t,n,``,e),{})}var VT=BT(),HT=(e={},t)=>{let n=VT(t??{},w);return{organization:jT(e,n),project:MT(e,n),user:IT(e,n),oAuth:AT(n),dictionary:TT(e,n),stripe:PT(e,n),ai:ST(e,n),audit:CT(e,n),tag:FT(e,n),search:NT(e,n),editor:ET(e,n),newsletter:kT(e,n),github:DT(e,n),gitlab:OT(e,n),bitbucket:wT(e,n),showcaseProject:LT(e,n)}},UT=e=>{let t=(0,b.c)(8),n=Rw(),r=e??n??w,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`oAuth2AccessToken`],t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=AT(r),t[1]=r,t[2]=a);let o=!!(r.editor.clientId&&r.editor.clientSecret),s;t[3]!==a.getOAuth2AccessToken||t[4]!==o?(s={queryKey:i,queryFn:a.getOAuth2AccessToken,enabled:o,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[3]=a.getOAuth2AccessToken,t[4]=o,t[5]=s):s=t[5];let{data:c}=lc(s),l=c?.data,u;return t[6]===l?u=t[7]:(u={oAuth2AccessToken:l},t[6]=l,t[7]=u),u};function WT(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var GT=WT({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`,PREVIOUSLY_REGISTERED:`Previously registered`,REGISTRATION_CANCELLED:`Registration cancelled`,AUTH_CANCELLED:`Auth cancelled`,UNKNOWN_ERROR:`Unknown error`,SESSION_REQUIRED:`Passkey registration requires an authenticated session`,RESOLVE_USER_REQUIRED:`Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false`,RESOLVED_USER_INVALID:`Resolved user is invalid`}),KT=`1.6.5`;function qT(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function JT(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function YT(){return XT.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var XT={stubThis:e=>e};function ZT(e){let{id:t}=e;return{...e,id:JT(t),transports:e.transports}}function QT(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var $T=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function eE({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new $T({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new $T({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new $T({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new $T({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new $T({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new $T({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new $T({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new $T({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!QT(t))return new $T({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new $T({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new $T({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new $T({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var tE=new class{constructor(){Object.defineProperty(this,`controller`,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},nE=[`cross-platform`,`platform`];function rE(e){if(e&&!(nE.indexOf(e)<0))return e}async function iE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!YT())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:JT(t.challenge),user:{...t.user,id:JT(t.user.id)},excludeCredentials:t.excludeCredentials?.map(ZT)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=tE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw eE({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){aE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=qT(e))}catch(e){aE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=qT(c.getAuthenticatorData())}catch(e){aE(`getAuthenticatorData()`,e)}return{id:o,rawId:qT(s),response:{attestationObject:qT(c.attestationObject),clientDataJSON:qT(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:rE(a.authenticatorAttachment)}}function aE(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function oE(){if(!YT())return sE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?sE.stubThis(new Promise(e=>e(!1))):sE.stubThis(e.isConditionalMediationAvailable())}var sE={stubThis:e=>e};function cE({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new $T({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new $T({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!QT(t))return new $T({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new $T({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new $T({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function lE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!YT())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(ZT));let a={...t,challenge:JT(t.challenge),allowCredentials:i},o={};if(n){if(!await oE())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=tE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw cE({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=qT(u.userHandle)),{id:c,rawId:qT(l),response:{authenticatorData:qT(u.authenticatorData),clientDataJSON:qT(u.clientDataJSON),signature:qT(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:rE(s.authenticatorAttachment)}}var uE=`1.6.5`,dE=Symbol.for(`better-auth:broadcast-channel`),fE=()=>Math.floor(Date.now()/1e3),pE=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:fE()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function mE(e=`better-auth.message`){return globalThis[dE]||(globalThis[dE]=new pE(e)),globalThis[dE]}var hE=Symbol.for(`better-auth:focus-manager`),gE=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function _E(){return globalThis[hE]||(globalThis[hE]=new gE),globalThis[hE]}var vE=Symbol.for(`better-auth:online-manager`),yE=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function bE(){return globalThis[vE]||(globalThis[vE]=new yE),globalThis[vE]}var xE={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},SE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,CE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},wE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function TE(e){return e instanceof Date&&!isNaN(e.getTime())}function EE(e){let t=wE.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return TE(f)?f:null}function DE(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in CE)return CE[s];if(!SE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(xE).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=EE(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function OE(e,t={strict:!0}){return DE(e,t)}var kE=[],AE=0,jE=4,ME=0,NE=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=AE+jE;t<kE.length;)kE[t]===e?kE.splice(t,jE):t+=jE;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ME++;let i=!kE.length;for(let i of t)kE.push(i,n.value,e,r);if(i){for(AE=0;AE<kE.length;AE+=jE)kE[AE](kE[AE+1],kE[AE+2],kE[AE+3]);kE.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},PE=5,FE=6,IE=10,LE=(e,t,n,r)=>(e.events=e.events||{},e.events[n+IE]||(e.events[n+IE]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+IE](),delete e.events[n+IE])}),RE=1e3,zE=(e,t)=>LE(e,n=>{let r=t(n);r&&e.events[FE].push(r)},PE,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[FE]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[FE])t();e.events[FE]=[]}},RE)},()=>{e.listen=n,e.off=r}}),BE=()=>typeof window>`u`,VE=(e,t,n,r)=>{let i=NE({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{BE()||(o?await a():zE(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},HE=()=>Math.floor(Date.now()/1e3);function UE(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var WE=5;function GE(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||bE().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=HE(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=HE(),r(`/get-session`).then(async e=>{let{data:a,error:o}=UE(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=UE(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=HE(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(HE()-c.lastSessionRequest<WE)return;c.lastSessionRequest=HE()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=HE(),n.set(!n.get()))},d=e=>{mE().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=mE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=_E().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=bE().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),mE().setup(),_E().setup(),bE().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var KE=Object.create(null),qE=e=>({}),JE=new Proxy(KE,{get(e,t){return qE()[t]??KE[t]},has(e,t){return t in qE()||t in KE},set(e,t,n){let r=qE(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=qE(!0);return delete n[t],!0},ownKeys(){let e=qE(!0);return Object.keys(e)}});function YE(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return YE(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return YE(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return YE(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return YE(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return YE(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return YE(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return YE(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function XE(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function ZE(e){let t=e.split(`
100
+ `}};IS([ZC({type:Boolean,attribute:`is-selecting`})],Cw.prototype,`isSelecting`,void 0),IS([ZC({type:Number,attribute:`press-duration`})],Cw.prototype,`pressDuration`,void 0),IS([QC()],Cw.prototype,`_isHovered`,void 0),IS([QC()],Cw.prototype,`_isSelectingState`,void 0),IS([ew(`.wrapper`)],Cw.prototype,`_wrapper`,void 0);var ww=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Cw),nw(),iw(),xw())},Tw=()=>({allowedOrigins:[C?.editorURL,C?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),Ew=0,Dw=()=>{Ew++;let e=NS();if(e)return e;let t=new yw({mode:`client`,messenger:Tw(),configuration:w});return PS(t),ww(),t.start(),t},Ow=()=>{Ew=Math.max(0,Ew-1),!(Ew>0)&&(NS()?.stop(),PS(null))},kw=(e,t,n)=>{let r=(0,b.c)(16),i=SS(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,v.useState)(o),l=(0,v.useRef)(o),u=(0,v.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new sw(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,v.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,y;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{u.current?.postCurrentValue()},r[13]=y):y=r[13];let x=y,S;return r[14]===s?S=r[15]:(S=[s,_,x],r[14]=s,r[15]=S),S},Aw=(e,t)=>kw(OS.INTLAYER_URL_CHANGE,e,t),jw=()=>{let e=(0,b.c)(13),t=SS(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,v.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,v.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},Mw=()=>{let e=(0,b.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=jw(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},Nw=()=>{let e=(0,b.c)(3),t=SS(),[n,r]=(0,v.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a),n},Pw=(e,t,n)=>{for(let r of t)try{if(dw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},Fw=()=>{let e=(0,b.c)(12),{localeDictionaries:t}=jw(),n=Nw(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=wS(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=Pw(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},Iw=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,v.useRef)(null);i.current||=new yw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,v.useEffect)(()=>(ww(),PS(a),a.start(),()=>{a.stop(),PS(null)}),[a]),(0,T.jsx)(xS,{manager:a,children:e})},Lw=(0,v.createContext)(void 0),Rw=()=>{let e=(0,b.c)(4),t=SS(),n=(0,v.useContext)(Lw),[r,i]=(0,v.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,v.useEffect)(a,o),r??n},zw=()=>{let e=(0,b.c)(23),t=SS(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},Bw=()=>{let e=(0,b.c)(6),t=SS(),[n,r]=(0,v.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a);let o=zw(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},Vw=()=>{let e=(0,b.c)(5),t=SS(),[n,r]=(0,v.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,v.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},Hw=()=>{let e=(0,b.c)(2),t=SS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},Uw=(e,t,n)=>{let r=(0,b.c)(11),i=SS(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,v.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},Ww=()=>{Uw(OS.INTLAYER_IFRAME_CLICKED,kS)},Gw=e=>{let t=(0,b.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=dw(i,n,Nw());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,u=s??r,d;t[1]!==n||t[2]!==o?(d=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=d):d=t[3];let f;return t[4]!==n||t[5]!==a?(f=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=f):f=t[6],(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:d,children:(0,T.jsx)(yS,{value:u,onChange:f})})},Kw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!hT.includes(e)).map(r=>{let i={type:j,key:r},a=[...t,i],o=n[j][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(gT,{...e,key:r,keyPath:a,section:o})]})})})},qw=e=>{let{keyPath:t,section:n}=e;return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!hT.includes(e)).map(r=>{let i={type:A,key:r},a=[...t,i],o=n[A][r];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,v.createElement)(gT,{...e,key:r,keyPath:a,section:o})]})})})},Jw=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,v.useState)(!1),u=(0,v.useRef)(null),d=e=>{e.stopPropagation(),c(!1),n()},f=e=>{e.stopPropagation(),c(!1),t()},p=!e||e===``?`-`:e,m=(0,v.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||u.current&&!u.current.contains(e.target)&&(c(!1),n())},[n]);return(0,v.useEffect)(()=>(s?document.addEventListener(`click`,m):document.removeEventListener(`click`,m),()=>document.removeEventListener(`click`,m)),[m,s]),(0,T.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:u,...o,children:[(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,T.jsx)(oS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:yu,onClick:d,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,T.jsx)(oS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Wu,onClick:f,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,T.jsxs)(`div`,{className:l(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,T.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:p}),(0,T.jsx)(oS,{label:`Edit`,Icon:Iu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},Yw=(...e)=>e.filter(Boolean).join(` `),Xw=ou([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),Zw=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,T.jsx)(`input`,{className:Yw(Xw({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),Qw=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,T.jsx)(`textarea`,{className:l(`resize-none`,Xw({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),$w=24,eT=12,tT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,v.useRef)(null);(0,v.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=$w*r+eT,s=$w+eT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,v.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,T.jsx)(Qw,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:l(`overflow-y-auto`,t&&`resize-none`,e),...a})},nT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(Jw,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,T.jsx)(tT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},rT=e=>{let t=(0,b.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,u=Nw(),d;t[0]!==u||t[1]!==i||t[2]!==a||t[3]!==n?(d=a??dw(i,n,u),t[0]=u,t[1]=i,t[2]=a,t[3]=n,t[4]=d):d=t[4];let f=d;if(f&&typeof f!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let p=n.length,m=String(f??r),h;if(t[6]!==m||t[7]!==n||t[8]!==p||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],h=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,p===2&&`hover:bg-card/30`,p>=3&&``),onClick:e,children:typeof c==`function`?c(m):(0,T.jsx)(nT,{"aria-label":`Editable field`,defaultValue:m,onSave:e=>o({keyPath:n,newValue:e}),onCancel:iT})}),t[6]=m,t[7]=n,t[8]=p,t[9]=o,t[10]=s,t[11]=c,t[12]=h}else h=t[12];return h};function iT(){return null}var aT=e=>{let t=(0,b.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=Bw(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=dw(e.editedContent,n),s=r[N],{content:c}=r,l=[...n,{type:N}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,T.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,T.jsx)(rT,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},oT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:ee}],i=n[ee];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},sT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:M}],i=n[M];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},cT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,T.jsx)(gT,{...e,keyPath:r,section:i})})},lT=(0,v.memo)(e=>{let t=(0,b.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(uT),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:P},o=[...n,i],c=pr(o,s);return(0,T.jsx)(lS,{level:n.length,title:_r(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,T.jsx)(gT,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function uT(e){return!hT.includes(e)}var dT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,v.useRef)(null);return(0,v.useImperativeHandle)(n,()=>i.current),(0,T.jsx)(Jw,{value:(0,v.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,T.jsx)(Zw,{ref:i,...r})})},fT=e=>{let t=(0,b.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Nw(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=dw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let u=c;if(u!==void 0&&typeof u!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let d=n.length,f=String(u??r),p;if(t[5]!==f||t[6]!==n||t[7]!==d||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],p=(0,T.jsx)(`button`,{type:`button`,className:l(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,d===2&&`hover:bg-card/30`,d>=3&&``),onClick:e,children:(0,T.jsx)(dT,{"aria-label":`Editable number field`,type:`number`,defaultValue:f,onSave:r,onCancel:pT})}),t[5]=f,t[6]=n,t[7]=d,t[8]=a,t[9]=o,t[10]=p}else p=t[10];return p};function pT(){return null}var mT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,T.jsx)(gT,{...e,keyPath:a,section:o})},hT=[`filePath`,`id`,`nodeType`],gT=(0,v.memo)(e=>{let t=Nw(),n=(0,v.useMemo)(()=>dw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,v.useMemo)(()=>_w(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,T.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,T.jsx)(cT,{...e,section:n}):r===`html`?(0,T.jsx)(oT,{...e,section:n}):r===`translation`?(0,T.jsx)(mT,{...e,section:n}):r===`enumeration`?(0,T.jsx)(qw,{...e,section:n}):r===`condition`?(0,T.jsx)(Kw,{...e,section:n}):r===`insertion`?(0,T.jsx)(sT,{...e,section:n}):r===`array`?(0,T.jsx)(uS,{...e,section:n}):r===`file`?(0,T.jsx)(aT,{...e,section:n}):(0,T.jsx)(lT,{...e,section:n});if(typeof n==`string`)return(0,T.jsx)(rT,{...e,section:n});if(typeof n==`number`)return(0,T.jsx)(fT,{...e,section:n});if(typeof n==`boolean`)return(0,T.jsx)(Gw,{...e,section:n})}),_T=e=>{let t=(0,b.c)(6),{dictionary:n,...r}=e,i=Nw(),{editedContent:a,addEditedContent:o}=Bw(),{focusedContent:s,setFocusedContentKeyPath:c}=Fw(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,T.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,v.createElement)(gT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},vT={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},yT=(e,t)=>{let n=(0,b.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,v.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,v.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,f;n[14]===e?f=n[15]:(f=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=f);let p=f,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},bT=(0,v.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),xT=()=>(0,v.useContext)(bT),ST=e=>{let t=(0,b.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=Sr(),o;t[0]!==r||t[1]!==a?(o=r??[a],t[0]=r,t[1]=a,t[2]=o):o=t[2];let[s,c]=yT(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,T.jsx)(bT,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l):l=t[7],l},CT=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,v.useState)(n),[u,d]=(0,v.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(wT)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let y=_,x=e=>{e.key===`Enter`&&!i&&w?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(TT)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,v.useEffect)(S,C);let w=a?.(c)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,T.jsx)(Zw,{onChange:y,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!w,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,T.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{Icon:yu,label:`Save changes${w?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!w,onClick:g,"aria-describedby":w?void 0:`validation-error`}),(0,T.jsx)(oS,{Icon:Wu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function wT(e){return e+1}function TT(e){return e+1}var ET={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},DT=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),OT=e=>e.reduce((e,t)=>{let n=e??{},r=DT(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=OT([ET,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=OT([ET.headers,...t.map(e=>e.headers)]),s=OT(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=OT(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},kT=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
101
+ `);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},autocomplete:async(t,r={})=>await q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},AT=(e={},t)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
102
+ `);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},jT=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},MT=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},NT=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},PT=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},FT=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},IT=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},LT=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},RT=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},zT=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},BT=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},VT=(e={},t=w)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`})}},HT=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},UT=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},WT=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function GT(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function KT(e,t,n=`.`,r){if(!GT(t))return KT(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:GT(a)&&GT(i[t])?i[t]=KT(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function qT(e){return(...t)=>t.reduce((t,n)=>KT(t,n,``,e),{})}var JT=qT(),YT=(e={},t)=>{let n=JT(t??{},w);return{organization:RT(e,n),project:zT(e,n),user:UT(e,n),oAuth:LT(n),dictionary:MT(e,n),stripe:VT(e,n),ai:kT(e,n),audit:AT(e,n),tag:HT(e,n),search:BT(e,n),editor:NT(e,n),newsletter:IT(e,n),github:PT(e,n),gitlab:FT(e,n),bitbucket:jT(e,n),showcaseProject:WT(e,n)}},XT=e=>{let t=(0,b.c)(8),n=Rw(),r=e??n??w,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`oAuth2AccessToken`],t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=LT(r),t[1]=r,t[2]=a);let o=!!(r.editor.clientId&&r.editor.clientSecret),s;t[3]!==a.getOAuth2AccessToken||t[4]!==o?(s={queryKey:i,queryFn:a.getOAuth2AccessToken,enabled:o,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[3]=a.getOAuth2AccessToken,t[4]=o,t[5]=s):s=t[5];let{data:c}=lc(s),l=c?.data,u;return t[6]===l?u=t[7]:(u={oAuth2AccessToken:l},t[6]=l,t[7]=u),u};function ZT(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var QT=ZT({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`,PREVIOUSLY_REGISTERED:`Previously registered`,REGISTRATION_CANCELLED:`Registration cancelled`,AUTH_CANCELLED:`Auth cancelled`,UNKNOWN_ERROR:`Unknown error`,SESSION_REQUIRED:`Passkey registration requires an authenticated session`,RESOLVE_USER_REQUIRED:`Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false`,RESOLVED_USER_INVALID:`Resolved user is invalid`}),$T=`1.6.5`;function eE(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function tE(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function nE(){return rE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var rE={stubThis:e=>e};function iE(e){let{id:t}=e;return{...e,id:tE(t),transports:e.transports}}function aE(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var oE=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function sE({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new oE({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new oE({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new oE({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new oE({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new oE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new oE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new oE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new oE({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!aE(t))return new oE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new oE({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new oE({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new oE({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var cE=new class{constructor(){Object.defineProperty(this,`controller`,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},lE=[`cross-platform`,`platform`];function uE(e){if(e&&!(lE.indexOf(e)<0))return e}async function dE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!nE())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:tE(t.challenge),user:{...t.user,id:tE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(iE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=cE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw sE({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){fE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=eE(e))}catch(e){fE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=eE(c.getAuthenticatorData())}catch(e){fE(`getAuthenticatorData()`,e)}return{id:o,rawId:eE(s),response:{attestationObject:eE(c.attestationObject),clientDataJSON:eE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:uE(a.authenticatorAttachment)}}function fE(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function pE(){if(!nE())return mE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?mE.stubThis(new Promise(e=>e(!1))):mE.stubThis(e.isConditionalMediationAvailable())}var mE={stubThis:e=>e};function hE({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new oE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new oE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!aE(t))return new oE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new oE({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new oE({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function gE(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!nE())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(iE));let a={...t,challenge:tE(t.challenge),allowCredentials:i},o={};if(n){if(!await pE())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=cE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw hE({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=eE(u.userHandle)),{id:c,rawId:eE(l),response:{authenticatorData:eE(u.authenticatorData),clientDataJSON:eE(u.clientDataJSON),signature:eE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:uE(s.authenticatorAttachment)}}var _E=`1.6.5`,vE=Symbol.for(`better-auth:broadcast-channel`),yE=()=>Math.floor(Date.now()/1e3),bE=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:yE()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function xE(e=`better-auth.message`){return globalThis[vE]||(globalThis[vE]=new bE(e)),globalThis[vE]}var SE=Symbol.for(`better-auth:focus-manager`),CE=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function wE(){return globalThis[SE]||(globalThis[SE]=new CE),globalThis[SE]}var TE=Symbol.for(`better-auth:online-manager`),EE=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function DE(){return globalThis[TE]||(globalThis[TE]=new EE),globalThis[TE]}var OE={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},kE=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,AE={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},jE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function ME(e){return e instanceof Date&&!isNaN(e.getTime())}function NE(e){let t=jE.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return ME(f)?f:null}function PE(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in AE)return AE[s];if(!kE.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(OE).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=NE(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function FE(e,t={strict:!0}){return PE(e,t)}var IE=[],LE=0,RE=4,zE=0,BE=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=LE+RE;t<IE.length;)IE[t]===e?IE.splice(t,RE):t+=RE;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){zE++;let i=!IE.length;for(let i of t)IE.push(i,n.value,e,r);if(i){for(LE=0;LE<IE.length;LE+=RE)IE[LE](IE[LE+1],IE[LE+2],IE[LE+3]);IE.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},VE=5,HE=6,UE=10,WE=(e,t,n,r)=>(e.events=e.events||{},e.events[n+UE]||(e.events[n+UE]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+UE](),delete e.events[n+UE])}),GE=1e3,KE=(e,t)=>WE(e,n=>{let r=t(n);r&&e.events[HE].push(r)},VE,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[HE]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[HE])t();e.events[HE]=[]}},GE)},()=>{e.listen=n,e.off=r}}),qE=()=>typeof window>`u`,JE=(e,t,n,r)=>{let i=BE({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{qE()||(o?await a():KE(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},YE=()=>Math.floor(Date.now()/1e3);function XE(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var ZE=5;function QE(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||DE().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=YE(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=YE(),r(`/get-session`).then(async e=>{let{data:a,error:o}=XE(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=XE(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=YE(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(YE()-c.lastSessionRequest<ZE)return;c.lastSessionRequest=YE()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=YE(),n.set(!n.get()))},d=e=>{xE().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=xE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=wE().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=DE().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),xE().setup(),wE().setup(),DE().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var $E=Object.create(null),eD=e=>({}),tD=new Proxy($E,{get(e,t){return eD()[t]??$E[t]},has(e,t){return t in eD()||t in $E},set(e,t,n){let r=eD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=eD(!0);return delete n[t],!0},ownKeys(){let e=eD(!0);return Object.keys(e)}});function nD(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return nD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return nD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return nD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return nD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return nD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return nD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return nD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function rD(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function iD(e){let t=e.split(`
103
103
  at `);return t.length<=1?e:(t.splice(1,1),t.join(`
104
- at `))}function QE(e,t){class n extends e{#e;constructor(...e){if(XE()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=ZE(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var $E={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};QE(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:$E[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var eD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function tD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new eD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function nD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new eD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof eD?t:new eD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function rD(e,t=`/api/auth`){if(nD(e),tD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function iD(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function aD(e,t,n,r,i){if(e)return rD(e,t);if(r!==!1){let e=JE.BETTER_AUTH_URL||JE.NEXT_PUBLIC_BETTER_AUTH_URL||JE.PUBLIC_BETTER_AUTH_URL||JE.NUXT_PUBLIC_BETTER_AUTH_URL||JE.NUXT_PUBLIC_AUTH_URL||(JE.BASE_URL===`/`?void 0:JE.BASE_URL);if(e)return rD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&iD(o,`proto`)&&iD(a,`host`))try{return rD(`${o}://${a}`,t)}catch{}if(n){let e=oD(n.url);if(!e)throw new eD(`Could not get origin from request. Please provide a valid base URL.`);return rD(e,t)}if(typeof window<`u`&&window.location)return rD(window.location.origin,t)}function oD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var sD={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function cD(e,t){let n=NE(!1),r=VE(n,`/get-session`,e,{method:`GET`}),i=()=>{};return zE(r,()=>{let a=GE({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}function lD(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function uD(e,t,n=`.`,r){if(!lD(t))return uD(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:lD(a)&&lD(i[t])?i[t]=uD(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function dD(e){return(...t)=>t.reduce((t,n)=>uD(t,n,``,e),{})}var fD=dD(),pD=Object.defineProperty,mD=Object.defineProperties,hD=Object.getOwnPropertyDescriptors,gD=Object.getOwnPropertySymbols,_D=Object.prototype.hasOwnProperty,vD=Object.prototype.propertyIsEnumerable,yD=(e,t,n)=>t in e?pD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bD=(e,t)=>{for(var n in t||={})_D.call(t,n)&&yD(e,n,t[n]);if(gD)for(var n of gD(t))vD.call(t,n)&&yD(e,n,t[n]);return e},xD=(e,t)=>mD(e,hD(t)),SD=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},CD=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},wD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},TD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function ED(e){if(typeof e==`number`)return new wD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new wD(e);case`exponential`:return new TD(e);default:throw Error(`Invalid retry strategy`)}}var DD=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},OD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function kD(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return OD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function AD(e){try{return JSON.parse(e),!0}catch{return!1}}function jD(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function MD(e){try{return JSON.parse(e)}catch{return e}}function ND(e){return typeof e==`function`}function PD(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&ND(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&ND(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function FD(e){let t=new Headers(e?.headers),n=await DD(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=ID(e?.body);n&&t.set(`content-type`,n)}return t}function ID(e){return jD(e)?`application/json`:null}function LD(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(jD(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&jD(e.body)?new URLSearchParams(e.body).toString():e.body}function RD(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return HD.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function zD(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var BD=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function VD(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new BD(n.issues);return n.value}var HD=[`get`,`post`,`put`,`patch`,`delete`],UD=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=xD(bD({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=xD(bD({},e),{body:i.input?await VD(i.input,n?.body):n?.body,params:i.params?await VD(i.params,n?.params):n?.params,query:i.query?await VD(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),WD=e=>{async function t(t,n){let r=xD(bD(bD({},e),n),{plugins:[...e?.plugins||[],UD(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await KD(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await KD(t,r)}return t};function GD(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];HD.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var KD=async(e,t)=>{let{hooks:n,url:r,options:i}=await CD(e,t),a=PD(i),o=new AbortController,s=i.signal??o.signal,c=GD(r,i),l=LD(i),u=await FD(i),d=RD(r,i),f=xD(bD({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=zD(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(xD(bD({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=kD(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??MD)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await VD(f.output,r.data));for(let e of n.onSuccess)e&&await e(xD(bD({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??MD,_=await m.text(),v=AD(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:xD(bD({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(xD(bD({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=ED(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await KD(e,xD(bD({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new SD(m.status,m.statusText,v?y:_);return{data:null,error:xD(bD({},y),{status:m.status,statusText:m.statusText})}},qD=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},JD=(e,t)=>{let n=`credentials`in Request.prototype,r=aD(e?.baseURL,e?.basePath,void 0,t)??qD(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=WD({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?OE(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[sD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=cD(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=fD(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function YD(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function XD(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function ZD(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||YD(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=XD(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function QD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function $D(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=JD(e),s={};for(let[e,t]of Object.entries(r))s[`use${QD(e)}`]=t;return ZD({...n,...s,$fetch:i,$store:o},i,t,r,a)}var eO=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await lE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:GT.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name},...n?.context&&{context:n.context}},throw:!1});if(!i.data)return i;try{let a=i.data.extensions||n?.extensions?{...i.data.extensions||{},...n?.extensions||{}}:void 0,o=await iE({optionsJSON:{...i.data,extensions:a},useAutoRegister:n?.useAutoRegister}),{clientExtensionResults:s,...c}=o,l=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:c,name:n?.name},method:`POST`,throw:!1});return l.data?(t.set(Math.random()),n?.returnWebAuthnResponse?{...l,webauthn:{response:o,clientExtensionResults:s}}:l):l}catch(e){return e instanceof $T?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:GT.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:GT.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:GT.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),tO=()=>{let e=NE();return{id:`passkey`,version:KT,$InferServerPlugin:{},getActions:(t,n)=>eO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:VE(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:GT}},nO=`1.6.5`,rO=e=>({id:`sso-client`,version:nO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),iO=()=>({id:`magic-link`,version:uE,$InferServerPlugin:{}}),aO=WT({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),oO=e=>({id:`two-factor`,version:uE,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:aO}),sO=e=>$D({baseURL:e,withCredentials:!0,plugins:[oO({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),tO(),iO(),rO()]}),cO=e=>{let t=e?.editor?.backendURL??w?.editor?.backendURL;t||(t=qn,console.dir({intlayerConfig:e,configuration:w},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=sO(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>[],deleteSSOProvider:async e=>({success:!0})}},lO=(e,t)=>{let n=(0,b.c)(14),r=Rw(),i=t??r??w,a=Js(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await cO(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:6e4,gcTime:3e5,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=lc(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,g;n[8]===f?g=n[9]:(g=async()=>(await f()).data,n[8]=f,n[9]=g);let _=g,v;return n[10]!==_||n[11]!==p||n[12]!==h?(v={session:p,fetchSession:_,revalidateSession:_,setSession:h},n[10]=_,n[11]=p,n[12]=h,n[13]=v):v=n[13],v},uO=e=>{let t=(0,b.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{session:r,intlayerConfiguration:i}=n,{session:a,fetchSession:o,revalidateSession:s,setSession:c}=lO(r,i),{oAuth2AccessToken:l}=UT(i),u=!!(a?.user||l),d;return t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==a||t[6]!==c||t[7]!==u?(d={session:a,fetchSession:o,setSession:c,revalidateSession:s,oAuth2AccessToken:l,isAuthenticated:u},t[2]=o,t[3]=l,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d},dO=e=>{let t=(0,b.c)(5),n=Rw(),{oAuth2AccessToken:r}=uO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=HT({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},fO=e=>{let t=(0,b.c)(2),n=Rw(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=cO(r),t[0]=r,t[1]=i),i},pO=e=>{let t=(0,b.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=Rw(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=uO(o),l=c?c.user:s?.user,u=c?c.organization:s?.organization,d=c?c.project:s?.project,f=(n?!!l:!0)&&(r?!!d:!0)&&(i?!!u:!0),p;return t[2]===f?p=t[3]:(p={enable:f},t[2]=f,t[3]=p),p},mO=e=>{let t=(0,b.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({requireUser:i,requireProject:r,requireOrganization:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={requireUser:i,requireProject:r,requireOrganization:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let{enable:s}=pO(o),c=a?.enabled===!1?!1:s,l;return t[9]!==a||t[10]!==c?(l={enabled:c,...a},t[9]=a,t[10]=c,t[11]=l):l=t[11],lc(l)},hO=()=>{let e=(0,b.c)(6),t=fO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`logout`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=()=>t.signOut(),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},gO=(e,t)=>{let n=(0,b.c)(9),r=dO(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],mO(o)},_O=()=>{let e=(0,b.c)(6),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},vO=()=>{let e=(0,b.c)(6),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},yO=(e,t)=>{let n=(0,b.c)(9),r=dO(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],mO(o)},bO=()=>{let e=(0,b.c)(3),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),uc(r)},xO=()=>{let e=(0,b.c)(3),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),uc(r)},SO=()=>{let e=(0,b.c)(3),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),lc(r)},CO=()=>{let e=(0,b.c)(3),t=dO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),uc(r)},wO=(e,t)=>{let n=(0,b.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,v.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,v.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,f;n[14]===e?f=n[15]:(f=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=f);let p=f,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},TO=(0,v.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),EO=()=>(0,v.useContext)(TO),DO=e=>{let t=(0,b.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=Sr(),o;t[0]!==r||t[1]!==a?(o=r??[a],t[0]=r,t[1]=a,t[2]=o):o=t[2];let[s,c]=wO(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,T.jsx)(TO,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l):l=t[7],l},OO=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,v.useState)(n),[u,d]=(0,v.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(kO)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let y=_,x=e=>{e.key===`Enter`&&!i&&w?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},S,C;t[6]===n?(S=t[7],C=t[8]):(S=()=>{l(n),d(AO)},C=[n],t[6]=n,t[7]=S,t[8]=C),(0,v.useEffect)(S,C);let w=a?.(c)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,T.jsx)(Zw,{onChange:y,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!w,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,T.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{Icon:yu,label:`Save changes${w?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!w,onClick:g,"aria-describedby":w?void 0:`validation-error`}),(0,T.jsx)(oS,{Icon:Wu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function kO(e){return e+1}function AO(e){return e+1}var jO=()=>{let e=(0,b.c)(9),{session:t,revalidateSession:n,setSession:r}=uO(),{mutate:i}=hO(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},MO=`​`,NO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(MO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===MO?``:t.split(MO).join(``)}).join(`
105
- `)},PO=e=>{let t=e.split(`
106
- `);return t.length===0?[``]:t},FO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),IO=(e,t)=>{if(t<=0)return 0;if(FO){let n=[...FO.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},LO=(e,t)=>{if(t>=e.length)return e.length;if(FO){let n=[...FO.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},RO=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},zO=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},BO=(e,t)=>e.slice(0,t).lastIndexOf(`
107
- `)+1,VO=(e,t)=>{let n=e.indexOf(`
108
- `,t);return n===-1?e.length:n},HO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,v.useState)(()=>PO(i)),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=e!==void 0,u=(0,v.useRef)(a);u.current=a,(0,v.useEffect)(()=>{l&&e!==void 0&&o(PO(e))},[e,l]);let d=()=>u.current.join(`
104
+ at `))}function aD(e,t){class n extends e{#e;constructor(...e){if(rD()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=iD(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var oD={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};aD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:oD[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var sD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function cD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new sD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function lD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new sD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof sD?t:new sD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function uD(e,t=`/api/auth`){if(lD(e),cD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function dD(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function fD(e,t,n,r,i){if(e)return uD(e,t);if(r!==!1){let e=tD.BETTER_AUTH_URL||tD.NEXT_PUBLIC_BETTER_AUTH_URL||tD.PUBLIC_BETTER_AUTH_URL||tD.NUXT_PUBLIC_BETTER_AUTH_URL||tD.NUXT_PUBLIC_AUTH_URL||(tD.BASE_URL===`/`?void 0:tD.BASE_URL);if(e)return uD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&dD(o,`proto`)&&dD(a,`host`))try{return uD(`${o}://${a}`,t)}catch{}if(n){let e=pD(n.url);if(!e)throw new sD(`Could not get origin from request. Please provide a valid base URL.`);return uD(e,t)}if(typeof window<`u`&&window.location)return uD(window.location.origin,t)}function pD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var mD={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function hD(e,t){let n=BE(!1),r=JE(n,`/get-session`,e,{method:`GET`}),i=()=>{};return KE(r,()=>{let a=QE({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}function gD(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function _D(e,t,n=`.`,r){if(!gD(t))return _D(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:gD(a)&&gD(i[t])?i[t]=_D(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function vD(e){return(...t)=>t.reduce((t,n)=>_D(t,n,``,e),{})}var yD=vD(),bD=Object.defineProperty,xD=Object.defineProperties,SD=Object.getOwnPropertyDescriptors,CD=Object.getOwnPropertySymbols,wD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,ED=(e,t,n)=>t in e?bD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DD=(e,t)=>{for(var n in t||={})wD.call(t,n)&&ED(e,n,t[n]);if(CD)for(var n of CD(t))TD.call(t,n)&&ED(e,n,t[n]);return e},OD=(e,t)=>xD(e,SD(t)),kD=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},AD=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},jD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},MD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function ND(e){if(typeof e==`number`)return new jD({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new jD(e);case`exponential`:return new MD(e);default:throw Error(`Invalid retry strategy`)}}var PD=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},FD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ID(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return FD.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function LD(e){try{return JSON.parse(e),!0}catch{return!1}}function RD(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function zD(e){try{return JSON.parse(e)}catch{return e}}function BD(e){return typeof e==`function`}function VD(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&BD(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&BD(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function HD(e){let t=new Headers(e?.headers),n=await PD(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=UD(e?.body);n&&t.set(`content-type`,n)}return t}function UD(e){return RD(e)?`application/json`:null}function WD(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(RD(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&RD(e.body)?new URLSearchParams(e.body).toString():e.body}function GD(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return YD.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function KD(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var qD=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function JD(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new qD(n.issues);return n.value}var YD=[`get`,`post`,`put`,`patch`,`delete`],XD=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=OD(DD({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=OD(DD({},e),{body:i.input?await JD(i.input,n?.body):n?.body,params:i.params?await JD(i.params,n?.params):n?.params,query:i.query?await JD(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),ZD=e=>{async function t(t,n){let r=OD(DD(DD({},e),n),{plugins:[...e?.plugins||[],XD(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await $D(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await $D(t,r)}return t};function QD(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];YD.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var $D=async(e,t)=>{let{hooks:n,url:r,options:i}=await AD(e,t),a=VD(i),o=new AbortController,s=i.signal??o.signal,c=QD(r,i),l=WD(i),u=await HD(i),d=GD(r,i),f=OD(DD({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=KD(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(OD(DD({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=ID(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??zD)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await JD(f.output,r.data));for(let e of n.onSuccess)e&&await e(OD(DD({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??zD,_=await m.text(),v=LD(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:OD(DD({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(OD(DD({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=ND(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await $D(e,OD(DD({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new kD(m.status,m.statusText,v?y:_);return{data:null,error:OD(DD({},y),{status:m.status,statusText:m.statusText})}},eO=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},tO=(e,t)=>{let n=`credentials`in Request.prototype,r=fD(e?.baseURL,e?.basePath,void 0,t)??eO(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=ZD({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?FE(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[mD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=hD(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=yD(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function nO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function rO(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function iO(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||nO(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=rO(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function aO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=tO(e),s={};for(let[e,t]of Object.entries(r))s[`use${aO(e)}`]=t;return iO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var sO=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await gE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:QT.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name},...n?.context&&{context:n.context}},throw:!1});if(!i.data)return i;try{let a=i.data.extensions||n?.extensions?{...i.data.extensions||{},...n?.extensions||{}}:void 0,o=await dE({optionsJSON:{...i.data,extensions:a},useAutoRegister:n?.useAutoRegister}),{clientExtensionResults:s,...c}=o,l=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:c,name:n?.name},method:`POST`,throw:!1});return l.data?(t.set(Math.random()),n?.returnWebAuthnResponse?{...l,webauthn:{response:o,clientExtensionResults:s}}:l):l}catch(e){return e instanceof oE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:QT.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:QT.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:QT.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),cO=()=>{let e=BE();return{id:`passkey`,version:$T,$InferServerPlugin:{},getActions:(t,n)=>sO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:JE(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:QT}},lO=`1.6.5`,uO=e=>({id:`sso-client`,version:lO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),dO=()=>({id:`magic-link`,version:_E,$InferServerPlugin:{}}),fO=ZT({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),pO=e=>({id:`two-factor`,version:_E,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:fO}),mO=e=>oO({baseURL:e,withCredentials:!0,plugins:[pO({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),cO(),dO(),uO()]}),hO=e=>{let t=e?.editor?.backendURL??w?.editor?.backendURL;t||(t=qn,console.dir({intlayerConfig:e,configuration:w},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=mO(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>[],deleteSSOProvider:async e=>({success:!0})}},gO=(e,t)=>{let n=(0,b.c)(14),r=Rw(),i=t??r??w,a=Js(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await hO(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:6e4,gcTime:3e5,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=lc(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,g;n[8]===f?g=n[9]:(g=async()=>(await f()).data,n[8]=f,n[9]=g);let _=g,v;return n[10]!==_||n[11]!==p||n[12]!==h?(v={session:p,fetchSession:_,revalidateSession:_,setSession:h},n[10]=_,n[11]=p,n[12]=h,n[13]=v):v=n[13],v},_O=e=>{let t=(0,b.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{session:r,intlayerConfiguration:i}=n,{session:a,fetchSession:o,revalidateSession:s,setSession:c}=gO(r,i),{oAuth2AccessToken:l}=XT(i),u=!!(a?.user||l),d;return t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==a||t[6]!==c||t[7]!==u?(d={session:a,fetchSession:o,setSession:c,revalidateSession:s,oAuth2AccessToken:l,isAuthenticated:u},t[2]=o,t[3]=l,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d},vO=e=>{let t=(0,b.c)(5),n=Rw(),{oAuth2AccessToken:r}=_O(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=YT({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},yO=e=>{let t=(0,b.c)(2),n=Rw(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=hO(r),t[0]=r,t[1]=i),i},bO=e=>{let t=(0,b.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=Rw(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=_O(o),l=c?c.user:s?.user,u=c?c.organization:s?.organization,d=c?c.project:s?.project,f=(n?!!l:!0)&&(r?!!d:!0)&&(i?!!u:!0),p;return t[2]===f?p=t[3]:(p={enable:f},t[2]=f,t[3]=p),p},xO=e=>{let t=(0,b.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({requireUser:i,requireProject:r,requireOrganization:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={requireUser:i,requireProject:r,requireOrganization:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let{enable:s}=bO(o),c=a?.enabled===!1?!1:s,l;return t[9]!==a||t[10]!==c?(l={enabled:c,...a},t[9]=a,t[10]=c,t[11]=l):l=t[11],lc(l)},SO=()=>{let e=(0,b.c)(6),t=yO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`logout`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=()=>t.signOut(),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},CO=(e,t)=>{let n=(0,b.c)(9),r=vO(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],xO(o)},wO=()=>{let e=(0,b.c)(6),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},TO=()=>{let e=(0,b.c)(6),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),uc(a)},EO=(e,t)=>{let n=(0,b.c)(9),r=vO(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],xO(o)},DO=()=>{let e=(0,b.c)(3),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),uc(r)},OO=()=>{let e=(0,b.c)(3),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),uc(r)},kO=()=>{let e=(0,b.c)(3),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),lc(r)},AO=()=>{let e=(0,b.c)(3),t=vO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),uc(r)},jO=`​`,MO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(jO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===jO?``:t.split(jO).join(``)}).join(`
105
+ `)},NO=e=>{let t=e.split(`
106
+ `);return t.length===0?[``]:t},PO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),FO=(e,t)=>{if(t<=0)return 0;if(PO){let n=[...PO.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},IO=(e,t)=>{if(t>=e.length)return e.length;if(PO){let n=[...PO.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},LO=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},RO=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},zO=(e,t)=>e.slice(0,t).lastIndexOf(`
107
+ `)+1,BO=(e,t)=>{let n=e.indexOf(`
108
+ `,t);return n===-1?e.length:n},VO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,v.useState)(()=>NO(i)),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=e!==void 0,u=(0,v.useRef)(a);u.current=a,(0,v.useEffect)(()=>{l&&e!==void 0&&o(NO(e))},[e,l]);let d=()=>u.current.join(`
109
109
  `),f=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`);for(let e=0;e<n.length;e++)if(n[e].contains(t.startContainer))return{line:e,offset:t.startOffset};return null},p=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=u.current,i=(e,t)=>{for(let i=0;i<n.length;i++)if(n[i].contains(e)){let e=0;for(let t=0;t<i;t++)e+=r[t].length+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
110
- `).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,v.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},y=(e,t)=>{let r=PO(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=NO(s.current),i=PO(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
111
- `);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=IO(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=LO(r,t.start);y(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
110
+ `).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,v.useEffect)(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},y=(e,t)=>{let r=NO(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=MO(s.current),i=NO(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
111
+ `);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=FO(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=IO(r,t.start);y(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
112
112
  `),i=t.data??t.dataTransfer?.getData(`text/plain`)??``;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length);return}if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
113
113
  `),i=t.data;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length)}}},handleKeyDown:e=>{if(r){e.preventDefault();return}if(e.nativeEvent.isComposing)return;if((e.metaKey||e.ctrlKey)&&e.key===`z`){e.preventDefault();return}let t=p();if(!t)return;let n=u.current.join(`
114
114
  `);if(e.key===`Enter`){e.preventDefault(),y(n.slice(0,t.start)+`
115
- `+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?BO(n,t.start):e.altKey?RO(n,t.start):IO(n,t.start),y(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?VO(n,t.start):e.altKey?zO(n,t.start):LO(n,t.start),y(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
115
+ `+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?zO(n,t.start):e.altKey?LO(n,t.start):FO(n,t.start),y(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?BO(n,t.start):e.altKey?RO(n,t.start):IO(n,t.start),y(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
116
116
  `),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),y(n.slice(0,t.start)+n.slice(t.end),t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=p();if(!n)return;let i=u.current.join(`
117
- `);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},UO=({index:e,text:t,isLast:n,ghostText:r})=>(0,T.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,T.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,T.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,T.jsx)(`br`,{})]}),WO=24,GO=12,KO=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:u,ghostText:d,ghostLine:f,ghostOffset:p,onClick:m,className:h,dir:g=`auto`,ref:_,...y})=>{let{lines:b,containerRef:x,getText:S,handleInput:C,handleBeforeInput:w,handleKeyDown:E,handleCut:D,handlePaste:O,handleDrop:k,handleDragOver:A,getCursorOffset:j,setCaretPosition:M,caretFromFlatOffset:N}=HO({value:e,defaultValue:t,onChange:n,disabled:i}),P=(0,v.useRef)(null),F=e=>{P.current=e,x.current=e};(0,v.useImperativeHandle)(_,()=>({getContainer:()=>P.current,getText:S,focus:()=>P.current?.focus(),getCursorOffset:j,setCursorAtOffset:e=>{M(N(e,b))}})),(0,v.useEffect)(()=>{if(!s||!P.current)return;let e=P.current,t=WO*o+GO,n=WO*a+GO;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[b,s,o,a]);let I=b.length===1&&b[0]===``,L=d&&f!==void 0&&p!==void 0;return(0,T.jsxs)(`div`,{className:`relative w-full`,children:[I&&r&&(0,T.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,T.jsx)(`div`,{...y,ref:F,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":L?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:C,onBeforeInput:w,onKeyDown:E,onCut:D,onPaste:O,onDrop:k,onDragOver:A,onClick:m,className:l(`resize-none whitespace-pre-wrap break-words outline-none`,Xw({variant:u,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,h),children:b.map((e,t)=>(0,T.jsx)(UO,{index:t,text:e,isLast:t===b.length-1,ghostText:L&&f===t?d:void 0},t))})]})},qO=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,v.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null);(0,v.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
118
- `);return(0,T.jsx)(KO,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},JO=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=jO(),[l,u]=(0,v.useState)(n),[d,f]=(0,v.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(YO)},t[0]=n,t[1]=m);let h=m,g;t[2]!==l||t[3]!==r?(g=()=>{r(l)},t[2]=l,t[3]=r,t[4]=g):g=t[4];let _=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>u(e.currentTarget.value??``),t[5]=y):y=t[5];let x=y,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),h())},C,w;t[6]===n?(C=t[7],w=t[8]):(C=()=>{u(n),f(XO)},w=[n],t[6]=n,t[7]=C,t[8]=w),(0,v.useEffect)(C,w);let E=a?.(l)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,T.jsx)(qO,{onChange:x,onKeyDown:S,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!E,...s},d),(p||o)&&(0,T.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{Icon:yu,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:_,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,T.jsx)(oS,{Icon:Wu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},n)};function YO(e){return e+1}function XO(e){return e+1}var ZO=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},QO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,T.jsxs)(`label`,{className:l(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,T.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),$O=ou(`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 underline-offset-5 hover:bg-current/0`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5`,hoverable:`block rounded-lg border-none bg-current/0 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`,destructive:`text-destructive`,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 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 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:`destructive`,class:`ring-destructive/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:`md`}}),ek=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},tk=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(tk):(0,v.isValidElement)(e)?tk(e.props.children):!1,nk=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:u,size:d,isExternalLink:f,isPageSection:p,href:m,...h}=e,g=f??ek(e),_=p??m?.startsWith(`#`)??!1,v=tk(i),y=t===`button`||t===`button-outlined`,b=g?`noopener noreferrer nofollow`:void 0,x=g?`_blank`:`_self`;return(0,T.jsxs)(`a`,{href:u&&m&&!g&&!_?$n(m,u):m,"aria-label":a,rel:b,target:x,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:l($O({variant:t,color:n,roundedSize:r,underlined:c,size:d,className:o})),...h,children:[y&&v?(0,T.jsx)(`span`,{children:i}):i,g&&v&&(0,T.jsx)(Ou,{className:`ml-2 inline-block size-4`}),_&&(0,T.jsx)(Pu,{className:`ml-2 inline-block size-4`})]})},rk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,ik=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,ak=({className:e,...t})=>(0,T.jsx)(`h1`,{className:l(`font-bold text-2xl`,e),...t}),ok=({className:e,...t})=>(0,T.jsx)(`h2`,{className:l(`mb-2 font-bold text-2xl`,rk,e),...t}),sk=({className:e,...t})=>(0,T.jsx)(`h3`,{className:l(`mb-2 font-bold text-xl`,rk,e),...t}),ck=({className:e,...t})=>(0,T.jsx)(`h4`,{className:l(`font-bold text-lg`,rk,e),...t}),lk=({className:e,...t})=>(0,T.jsx)(`h5`,{className:l(`font-bold text-base`,rk,e),...t}),uk=({className:e,...t})=>(0,T.jsx)(`h6`,{className:l(`ml-3 font-bold text-base`,rk,e),...t}),dk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),fk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},pk=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},mk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?dk(t):void 0;return(0,T.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(pk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),fk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:l(r&&ik,n),...i,children:t})},hk=({isClickable:e,...t})=>(0,T.jsx)(ak,{...t}),gk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:ok,isClickable:e,...t}),_k=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:sk,isClickable:e,...t}),vk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:ck,isClickable:e,...t}),yk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:lk,isClickable:e,...t}),bk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:uk,isClickable:e,...t}),xk=(0,v.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Sk=()=>(0,v.useContext)(xk),Ck=e=>{let t=(0,b.c)(8),{children:n}=e,[r,i]=wO(`packageManager`,`npm`),[a,o]=wO(`codeFormat`,`typescript`),[s,c]=wO(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,T.jsx)(xk,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},wk={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},Tk=700,Ek=({isRollable:e=!0,minHeight:t=Tk,children:n,className:r})=>{let[i,a]=(0,v.useState)(0),[o,s]=(0,v.useState)(!0),c=(0,v.useRef)(null),{expandCollapseContent:u}=xr(wk),d=i>t;return(0,v.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?d?(0,T.jsxs)(sS,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}),(0,T.jsx)(`button`,{className:l(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:u(o)})]}):(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}):n},Dk=e=>{let t=(0,b.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=Sk(),s=r.packageManager===void 0,c=i===r.packageManager,l=r.codeFormat===void 0,u=a===r.codeFormat,d=r.contentDeclarationFormat===void 0,f=o===r.contentDeclarationFormat;if((s||c)&&(l||u)&&(d||f))return n;let p;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,T.jsx)(T.Fragment,{}),t[0]=p):p=t[0],p},Ok={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function kk(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ak=v.createContext(void 0);function jk(e){let t=v.useContext(Ak);return e||t||`ltr`}var Mk=0;function Nk(){v.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Pk()),document.body.insertAdjacentElement(`beforeend`,e[1]??Pk()),Mk++,()=>{Mk===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Mk--}},[])}function Pk(){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 Fk=`focusScope.autoFocusOnMount`,Ik=`focusScope.autoFocusOnUnmount`,Lk={bubbles:!1,cancelable:!0},Rk=`FocusScope`,zk=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Mc(i),u=Mc(a),d=v.useRef(null),f=vc(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:Kk(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Kk(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kk(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){qk.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Fk,Lk);s.addEventListener(Fk,l),s.dispatchEvent(t),t.defaultPrevented||(Bk(Xk(Hk(s)),{select:!0}),document.activeElement===e&&Kk(s))}return()=>{s.removeEventListener(Fk,l),setTimeout(()=>{let t=new CustomEvent(Ik,Lk);s.addEventListener(Ik,u),s.dispatchEvent(t),t.defaultPrevented||Kk(e??document.body,{select:!0}),s.removeEventListener(Ik,u),qk.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]=Vk(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Kk(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Kk(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,T.jsx)(Ac.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});zk.displayName=Rk;function Bk(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kk(r,{select:t}),document.activeElement!==n)return}function Vk(e){let t=Hk(e);return[Uk(t,e),Uk(t.reverse(),e)]}function Hk(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 Uk(e,t){for(let n of e)if(!Wk(n,{upTo:t}))return n}function Wk(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 Gk(e){return e instanceof HTMLInputElement&&`select`in e}function Kk(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gk(e)&&t&&e.select()}}var qk=Jk();function Jk(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Yk(e,t),e.unshift(t)},remove(t){e=Yk(e,t),e[0]?.resume()}}}function Yk(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xk(e){return e.filter(e=>e.tagName!==`A`)}var Zk=v.useId||(()=>void 0),Qk=0;function $k(e){let[t,n]=v.useState(Zk());return Yc(()=>{e||n(e=>e??String(Qk++))},[e]),e||(t?`radix-${t}`:``)}var eA=[`top`,`right`,`bottom`,`left`],tA=Math.min,nA=Math.max,rA=Math.round,iA=Math.floor,aA=e=>({x:e,y:e}),oA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sA(e,t,n){return nA(e,tA(t,n))}function cA(e,t){return typeof e==`function`?e(t):e}function lA(e){return e.split(`-`)[0]}function uA(e){return e.split(`-`)[1]}function dA(e){return e===`x`?`y`:`x`}function fA(e){return e===`y`?`height`:`width`}function pA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function mA(e){return dA(pA(e))}function hA(e,t,n){n===void 0&&(n=!1);let r=uA(e),i=mA(e),a=fA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=wA(o)),[o,wA(o)]}function gA(e){let t=wA(e);return[_A(e),t,_A(t)]}function _A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var vA=[`left`,`right`],yA=[`right`,`left`],bA=[`top`,`bottom`],xA=[`bottom`,`top`];function SA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?yA:vA:t?vA:yA;case`left`:case`right`:return t?bA:xA;default:return[]}}function CA(e,t,n,r){let i=uA(e),a=SA(lA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(_A)))),a}function wA(e){let t=lA(e);return oA[t]+e.slice(t.length)}function TA(e){return{top:0,right:0,bottom:0,left:0,...e}}function EA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:TA(e)}function DA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function OA(e,t,n){let{reference:r,floating:i}=e,a=pA(t),o=mA(t),s=fA(o),c=lA(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function kA(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=cA(t,e),p=EA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=DA(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=DA(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var AA=50,jA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:kA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=OA(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<AA&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=OA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},MA=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=cA(e,t)||{};if(l==null)return{};let d=EA(u),f={x:n,y:r},p=mA(i),m=fA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=tA(d[_],T),D=tA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=sA(O,A,k),M=!c.arrow&&uA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),NA=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=cA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=lA(r),_=pA(o),v=lA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[wA(o)]:gA(o)),x=p!==`none`;!d&&x&&b.push(...CA(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=hA(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==pA(t))||T.every(e=>pA(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=pA(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function PA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FA(e){return eA.some(t=>e[t]>=0)}var IA=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=cA(e,t);switch(i){case`referenceHidden`:{let e=PA(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:FA(e)}}}case`escaped`:{let e=PA(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:FA(e)}}}default:return{}}}}},LA=new Set([`left`,`top`]);async function RA(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lA(n),s=uA(n),c=pA(n)===`y`,l=LA.has(o)?-1:1,u=a&&c?-1:1,d=cA(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zA=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await RA(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},BA=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=cA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=pA(lA(i)),p=dA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=sA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=sA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},VA=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=cA(e,t),u={x:n,y:r},d=pA(i),f=dA(d),p=u[f],m=u[d],h=cA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=LA.has(lA(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},HA=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=cA(e,t),u=await o.detectOverflow(t,l),d=lA(i),f=uA(i),p=pA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=tA(h-u[g],v),x=tA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=nA(u.left,0),t=nA(u.right,0),n=nA(u.top,0),r=nA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:nA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:nA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function UA(){return typeof window<`u`}function WA(e){return qA(e)?(e.nodeName||``).toLowerCase():`#document`}function GA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function KA(e){return((qA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function qA(e){return UA()?e instanceof Node||e instanceof GA(e).Node:!1}function JA(e){return UA()?e instanceof Element||e instanceof GA(e).Element:!1}function YA(e){return UA()?e instanceof HTMLElement||e instanceof GA(e).HTMLElement:!1}function XA(e){return!UA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof GA(e).ShadowRoot}function ZA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function QA(e){return/^(table|td|th)$/.test(WA(e))}function $A(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ej=/transform|translate|scale|rotate|perspective|filter/,tj=/paint|layout|strict|content/,nj=e=>!!e&&e!==`none`,rj;function ij(e){let t=JA(e)?cj(e):e;return nj(t.transform)||nj(t.translate)||nj(t.scale)||nj(t.rotate)||nj(t.perspective)||!oj()&&(nj(t.backdropFilter)||nj(t.filter))||ej.test(t.willChange||``)||tj.test(t.contain||``)}function aj(e){let t=uj(e);for(;YA(t)&&!sj(t);){if(ij(t))return t;if($A(t))return null;t=uj(t)}return null}function oj(){return rj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),rj}function sj(e){return/^(html|body|#document)$/.test(WA(e))}function cj(e){return GA(e).getComputedStyle(e)}function lj(e){return JA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uj(e){if(WA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||XA(e)&&e.host||KA(e);return XA(t)?t.host:t}function dj(e){let t=uj(e);return sj(t)?e.ownerDocument?e.ownerDocument.body:e.body:YA(t)&&ZA(t)?t:dj(t)}function fj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=dj(e),i=r===e.ownerDocument?.body,a=GA(r);if(i){let e=pj(a);return t.concat(a,a.visualViewport||[],ZA(r)?r:[],e&&n?fj(e):[])}else return t.concat(r,fj(r,[],n))}function pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mj(e){let t=cj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=YA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rA(n)!==a||rA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hj(e){return JA(e)?e:e.contextElement}function gj(e){let t=hj(e);if(!YA(t))return aA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=mj(t),o=(a?rA(n.width):n.width)/r,s=(a?rA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var _j=aA(0);function vj(e){let t=GA(e);return!oj()||!t.visualViewport?_j:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==GA(e)?!1:t}function bj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=hj(e),o=aA(1);t&&(r?JA(r)&&(o=gj(r)):o=gj(e));let s=yj(a,n,r)?vj(a):aA(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=GA(a),t=r&&JA(r)?GA(r):r,n=e,i=pj(n);for(;i&&r&&t!==n;){let e=gj(i),t=i.getBoundingClientRect(),r=cj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=GA(i),i=pj(n)}}return DA({width:u,height:d,x:c,y:l})}function xj(e,t){let n=lj(e).scrollLeft;return t?t.left+n:bj(KA(e)).left+n}function Sj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xj(e,n),y:n.top+t.scrollTop}}function Cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=KA(r),s=t?$A(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=aA(1),u=aA(0),d=YA(r);if((d||!d&&!a)&&((WA(r)!==`body`||ZA(o))&&(c=lj(r)),d)){let e=bj(r);l=gj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Sj(o,c):aA(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function wj(e){return Array.from(e.getClientRects())}function Tj(e){let t=KA(e),n=lj(e),r=e.ownerDocument.body,i=nA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=nA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+xj(e),s=-n.scrollTop;return cj(r).direction===`rtl`&&(o+=nA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ej=25;function Dj(e,t){let n=GA(e),r=KA(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=oj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=xj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ej&&(a-=o)}else l<=Ej&&(a+=l);return{width:a,height:o,x:s,y:c}}function Oj(e,t){let n=bj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=YA(e)?gj(e):aA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function kj(e,t,n){let r;if(t===`viewport`)r=Dj(e,n);else if(t===`document`)r=Tj(KA(e));else if(JA(t))r=Oj(t,n);else{let n=vj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return DA(r)}function Aj(e,t){let n=uj(e);return n===t||!JA(n)||sj(n)?!1:cj(n).position===`fixed`||Aj(n,t)}function jj(e,t){let n=t.get(e);if(n)return n;let r=fj(e,[],!1).filter(e=>JA(e)&&WA(e)!==`body`),i=null,a=cj(e).position===`fixed`,o=a?uj(e):e;for(;JA(o)&&!sj(o);){let t=cj(o),n=ij(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ZA(o)&&!n&&Aj(e,o))?r=r.filter(e=>e!==o):i=t,o=uj(o)}return t.set(e,r),r}function Mj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?$A(t)?[]:jj(t,this._c):[].concat(n),r],o=kj(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=kj(t,a[e],i);s=nA(n.top,s),c=tA(n.right,c),l=tA(n.bottom,l),u=nA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nj(e){let{width:t,height:n}=mj(e);return{width:t,height:n}}function Pj(e,t,n){let r=YA(t),i=KA(t),a=n===`fixed`,o=bj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=aA(0);function l(){c.x=xj(i)}if(r||!r&&!a)if((WA(t)!==`body`||ZA(i))&&(s=lj(t)),r){let e=bj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Sj(i,s):aA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Fj(e){return cj(e).position===`static`}function Ij(e,t){if(!YA(e)||cj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return KA(e)===n&&(n=n.ownerDocument.body),n}function Lj(e,t){let n=GA(e);if($A(e))return n;if(!YA(e)){let t=uj(e);for(;t&&!sj(t);){if(JA(t)&&!Fj(t))return t;t=uj(t)}return n}let r=Ij(e,t);for(;r&&QA(r)&&Fj(r);)r=Ij(r,t);return r&&sj(r)&&Fj(r)&&!ij(r)?n:r||aj(e)||n}var Rj=async function(e){let t=this.getOffsetParent||Lj,n=this.getDimensions,r=await n(e.floating);return{reference:Pj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zj(e){return cj(e).direction===`rtl`}var Bj={convertOffsetParentRelativeRectToViewportRelativeRect:Cj,getDocumentElement:KA,getClippingRect:Mj,getOffsetParent:Lj,getElementRects:Rj,getClientRects:wj,getDimensions:Nj,getScale:gj,isElement:JA,isRTL:zj};function Vj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hj(e,t){let n=null,r,i=KA(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=iA(d),h=iA(i.clientWidth-(u+f)),g=iA(i.clientHeight-(d+p)),_=iA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:nA(0,tA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Vj(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Uj(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=hj(e),u=i||a?[...l?fj(l):[],...t?fj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hj(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?bj(e):null;c&&g();function g(){let t=bj(e);h&&!Vj(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wj=zA,Gj=BA,Kj=NA,qj=HA,Jj=IA,Yj=MA,Xj=VA,Zj=(e,t,n)=>{let r=new Map,i={platform:Bj,...n},a={...i.platform,_c:r};return jA(e,t,{...i,platform:a})},Qj=typeof document<`u`?v.useLayoutEffect:function(){};function $j(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$j(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!$j(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function eM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tM(e,t){let n=eM(e);return Math.round(t*n)/n}function nM(e){let t=v.useRef(e);return Qj(()=>{t.current=e}),t}function rM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);$j(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=nM(c),O=nM(i),k=nM(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Zj(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!$j(T.current,t)&&(T.current=t,kc.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Qj(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Qj(()=>(j.current=!0,()=>{j.current=!1}),[]),Qj(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=tM(N.floating,u.x),r=tM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...eM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var iM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Yj({element:r.current,padding:i}).fn(n):r?Yj({element:r,padding:i}).fn(n):{}}}},aM=(e,t)=>{let n=Wj(e);return{name:n.name,fn:n.fn,options:[e,t]}},oM=(e,t)=>{let n=Gj(e);return{name:n.name,fn:n.fn,options:[e,t]}},sM=(e,t)=>({fn:Xj(e).fn,options:[e,t]}),cM=(e,t)=>{let n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}},lM=(e,t)=>{let n=qj(e);return{name:n.name,fn:n.fn,options:[e,t]}},uM=(e,t)=>{let n=Jj(e);return{name:n.name,fn:n.fn,options:[e,t]}},dM=(e,t)=>{let n=iM(e);return{name:n.name,fn:n.fn,options:[e,t]}},fM=`Arrow`,pM=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,T.jsx)(Ac.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,T.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});pM.displayName=fM;var mM=pM;function hM(e){let[t,n]=v.useState(void 0);return Yc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var gM=`Popper`,[_M,vM]=bc(gM),[yM,bM]=_M(gM),xM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return(0,T.jsx)(yM,{scope:t,anchor:r,onAnchorChange:i,children:n})};xM.displayName=gM;var SM=`PopperAnchor`,CM=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=bM(SM,n),o=v.useRef(null),s=vc(t,o),c=v.useRef(null);return v.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,T.jsx)(Ac.div,{...i,ref:s})});CM.displayName=SM;var wM=`PopperContent`,[TM,EM]=_M(wM),DM=v.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=bM(wM,n),[_,y]=v.useState(null),b=vc(t,e=>y(e)),[x,S]=v.useState(null),C=hM(x),w=C?.width??0,E=C?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(jM),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=rM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Uj(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[aM({mainAxis:i+E,alignmentAxis:o}),c&&oM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?sM():void 0,...j}),c&&cM({...j}),lM({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&dM({element:x,padding:s}),MM({arrowWidth:w,arrowHeight:E}),f&&uM({strategy:`referenceHidden`,...j})]}),[L,R]=NM(P),ee=Mc(m);Yc(()=>{F&&ee?.()},[F,ee]);let te=I.arrow?.x,ne=I.arrow?.y,z=I.arrow?.centerOffset!==0,[B,re]=v.useState();return Yc(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,T.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,T.jsx)(TM,{scope:n,placedSide:L,onArrowChange:S,arrowX:te,arrowY:ne,shouldHideArrow:z,children:(0,T.jsx)(Ac.div,{"data-side":L,"data-align":R,...h,ref:b,style:{...h.style,animation:F?void 0:`none`}})})})});DM.displayName=wM;var OM=`PopperArrow`,kM={top:`bottom`,right:`left`,bottom:`top`,left:`right`},AM=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=EM(OM,n),a=kM[i.placedSide];return(0,T.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,T.jsx)(mM,{...r,ref:t,style:{...r.style,display:`block`}})})});AM.displayName=OM;function jM(e){return e!==null}var MM=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=NM(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function NM(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var PM=xM,FM=CM,IM=DM,LM=AM;function RM(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zM=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},BM=new WeakMap,VM=new WeakMap,HM={},UM=0,WM=function(e){return e&&(e.host||WM(e.parentNode))},GM=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=WM(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},KM=function(e,t,n,r){var i=GM(t,Array.isArray(e)?e:[e]);HM[n]||(HM[n]=new WeakMap);var a=HM[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(BM.get(e)||0)+1,l=(a.get(e)||0)+1;BM.set(e,c),a.set(e,l),o.push(e),c===1&&i&&VM.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),UM++,function(){o.forEach(function(e){var t=BM.get(e)-1,i=a.get(e)-1;BM.set(e,t),a.set(e,i),t||(VM.has(e)||e.removeAttribute(r),VM.delete(e)),i||e.removeAttribute(n)}),UM--,UM||(BM=new WeakMap,BM=new WeakMap,VM=new WeakMap,HM={})}},qM=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),KM(r,i,n,`aria-hidden`)):function(){return null}},JM=function(){return JM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JM.apply(this,arguments)};function YM(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function XM(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ZM=`right-scroll-bar-position`,QM=`width-before-scroll-bar`,$M=`with-scroll-bars-hidden`,eN=`--removed-body-scroll-bar-size`;function tN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function nN(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var rN=typeof window<`u`?v.useLayoutEffect:v.useEffect,iN=new WeakMap;function aN(e,t){var n=nN(t||null,function(t){return e.forEach(function(e){return tN(e,t)})});return rN(function(){var t=iN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||tN(e,null)}),i.forEach(function(e){r.has(e)||tN(e,a)})}iN.set(n,e)},[e]),n}function oN(e){return e}function sN(e,t){t===void 0&&(t=oN);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function cN(e){e===void 0&&(e={});var t=sN(null);return t.options=JM({async:!0,ssr:!1},e),t}var lN=function(e){var t=e.sideCar,n=YM(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,JM({},n))};lN.isSideCarExport=!0;function uN(e,t){return e.useMedium(t),lN}var dN=cN(),fN=function(){},pN=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:fN,onWheelCapture:fN,onTouchMoveCapture:fN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=YM(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=aN([n,t]),w=JM(JM({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:dN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),JM(JM({},w),{ref:C})):v.createElement(y,JM({},w,{className:c,ref:C}),s))});pN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pN.classNames={fullWidth:QM,zeroRight:ZM};var mN,hN=function(){if(mN)return mN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function gN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=hN();return t&&e.setAttribute(`nonce`,t),e}function _N(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var yN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gN())&&(_N(t,n),vN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bN=function(){var e=yN();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xN=function(){var e=bN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},SN={left:0,top:0,right:0,gap:0},CN=function(e){return parseInt(e||``,10)||0},wN=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[CN(n),CN(r),CN(i)]},TN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return SN;var t=wN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},EN=xN(),DN=`data-scroll-locked`,ON=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
117
+ `);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},HO=({index:e,text:t,isLast:n,ghostText:r})=>(0,T.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,T.jsx)(`span`,{"data-editable":!0,children:t||`​`}),r&&(0,T.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,T.jsx)(`br`,{})]}),UO=24,WO=12,GO=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:u,ghostText:d,ghostLine:f,ghostOffset:p,onClick:m,className:h,dir:g=`auto`,ref:_,...y})=>{let{lines:b,containerRef:x,getText:S,handleInput:C,handleBeforeInput:w,handleKeyDown:E,handleCut:D,handlePaste:O,handleDrop:k,handleDragOver:A,getCursorOffset:j,setCaretPosition:M,caretFromFlatOffset:N}=VO({value:e,defaultValue:t,onChange:n,disabled:i}),P=(0,v.useRef)(null),F=e=>{P.current=e,x.current=e};(0,v.useImperativeHandle)(_,()=>({getContainer:()=>P.current,getText:S,focus:()=>P.current?.focus(),getCursorOffset:j,setCursorAtOffset:e=>{M(N(e,b))}})),(0,v.useEffect)(()=>{if(!s||!P.current)return;let e=P.current,t=UO*o+WO,n=UO*a+WO;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[b,s,o,a]);let I=b.length===1&&b[0]===``,L=d&&f!==void 0&&p!==void 0;return(0,T.jsxs)(`div`,{className:`relative w-full`,children:[I&&r&&(0,T.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,T.jsx)(`div`,{...y,ref:F,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":L?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:C,onBeforeInput:w,onKeyDown:E,onCut:D,onPaste:O,onDrop:k,onDragOver:A,onClick:m,className:l(`resize-none whitespace-pre-wrap break-words outline-none`,Xw({variant:u,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,h),children:b.map((e,t)=>(0,T.jsx)(HO,{index:t,text:e,isLast:t===b.length-1,ghostText:L&&f===t?d:void 0},t))})]})},KO=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,v.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null);(0,v.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
118
+ `);return(0,T.jsx)(GO,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},qO=()=>{let e=(0,b.c)(9),{session:t,revalidateSession:n,setSession:r}=_O(),{mutate:i}=SO(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},JO=e=>{let t=(0,b.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=qO(),[l,u]=(0,v.useState)(n),[d,f]=(0,v.useState)(0),p=l!==n,m;t[0]===n?m=t[1]:(m=()=>{u(n),f(YO)},t[0]=n,t[1]=m);let h=m,g;t[2]!==l||t[3]!==r?(g=()=>{r(l)},t[2]=l,t[3]=r,t[4]=g):g=t[4];let _=g,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>u(e.currentTarget.value??``),t[5]=y):y=t[5];let x=y,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),_()):e.key===`Escape`&&(e.preventDefault(),h())},C,w;t[6]===n?(C=t[7],w=t[8]):(C=()=>{u(n),f(XO)},w=[n],t[6]=n,t[7]=C,t[8]=w),(0,v.useEffect)(C,w);let E=a?.(l)??!0;return(0,T.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,T.jsx)(KO,{onChange:x,onKeyDown:S,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!E,...s},d),(p||o)&&(0,T.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{Icon:yu,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:_,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,T.jsx)(oS,{Icon:Wu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},n)};function YO(e){return e+1}function XO(e){return e+1}var ZO=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},QO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,T.jsxs)(`label`,{className:l(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,T.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),$O=ou(`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 underline-offset-5 hover:bg-current/0`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5`,hoverable:`block rounded-lg border-none bg-current/0 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`,destructive:`text-destructive`,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 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 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:`destructive`,class:`ring-destructive/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:`md`}}),ek=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},tk=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(tk):(0,v.isValidElement)(e)?tk(e.props.children):!1,nk=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:u,size:d,isExternalLink:f,isPageSection:p,href:m,...h}=e,g=f??ek(e),_=p??m?.startsWith(`#`)??!1,v=tk(i),y=t===`button`||t===`button-outlined`,b=g?`noopener noreferrer nofollow`:void 0,x=g?`_blank`:`_self`;return(0,T.jsxs)(`a`,{href:u&&m&&!g&&!_?$n(m,u):m,"aria-label":a,rel:b,target:x,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:l($O({variant:t,color:n,roundedSize:r,underlined:c,size:d,className:o})),...h,children:[y&&v?(0,T.jsx)(`span`,{children:i}):i,g&&v&&(0,T.jsx)(Ou,{className:`ml-2 inline-block size-4`}),_&&(0,T.jsx)(Pu,{className:`ml-2 inline-block size-4`})]})},rk=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,ik=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,ak=({className:e,...t})=>(0,T.jsx)(`h1`,{className:l(`font-bold text-2xl`,e),...t}),ok=({className:e,...t})=>(0,T.jsx)(`h2`,{className:l(`mb-2 font-bold text-2xl`,rk,e),...t}),sk=({className:e,...t})=>(0,T.jsx)(`h3`,{className:l(`mb-2 font-bold text-xl`,rk,e),...t}),ck=({className:e,...t})=>(0,T.jsx)(`h4`,{className:l(`font-bold text-lg`,rk,e),...t}),lk=({className:e,...t})=>(0,T.jsx)(`h5`,{className:l(`font-bold text-base`,rk,e),...t}),uk=({className:e,...t})=>(0,T.jsx)(`h6`,{className:l(`ml-3 font-bold text-base`,rk,e),...t}),dk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),fk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},pk=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},mk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?dk(t):void 0;return(0,T.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(pk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),fk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:l(r&&ik,n),...i,children:t})},hk=({isClickable:e,...t})=>(0,T.jsx)(ak,{...t}),gk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:ok,isClickable:e,...t}),_k=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:sk,isClickable:e,...t}),vk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:ck,isClickable:e,...t}),yk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:lk,isClickable:e,...t}),bk=({isClickable:e=!1,...t})=>(0,T.jsx)(mk,{H:uk,isClickable:e,...t}),xk=(0,v.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Sk=()=>(0,v.useContext)(xk),Ck=e=>{let t=(0,b.c)(8),{children:n}=e,[r,i]=yT(`packageManager`,`npm`),[a,o]=yT(`codeFormat`,`typescript`),[s,c]=yT(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,T.jsx)(xk,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},wk={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},Tk=700,Ek=({isRollable:e=!0,minHeight:t=Tk,children:n,className:r})=>{let[i,a]=(0,v.useState)(0),[o,s]=(0,v.useState)(!0),c=(0,v.useRef)(null),{expandCollapseContent:u}=xr(wk),d=i>t;return(0,v.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?d?(0,T.jsxs)(sS,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}),(0,T.jsx)(`button`,{className:l(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:u(o)})]}):(0,T.jsx)(`div`,{className:l(`grid w-full`,r),ref:c,children:n}):n},Dk=e=>{let t=(0,b.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=Sk(),s=r.packageManager===void 0,c=i===r.packageManager,l=r.codeFormat===void 0,u=a===r.codeFormat,d=r.contentDeclarationFormat===void 0,f=o===r.contentDeclarationFormat;if((s||c)&&(l||u)&&(d||f))return n;let p;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,T.jsx)(T.Fragment,{}),t[0]=p):p=t[0],p},Ok={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function kk(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ak=v.createContext(void 0);function jk(e){let t=v.useContext(Ak);return e||t||`ltr`}var Mk=0;function Nk(){v.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Pk()),document.body.insertAdjacentElement(`beforeend`,e[1]??Pk()),Mk++,()=>{Mk===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Mk--}},[])}function Pk(){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 Fk=`focusScope.autoFocusOnMount`,Ik=`focusScope.autoFocusOnUnmount`,Lk={bubbles:!1,cancelable:!0},Rk=`FocusScope`,zk=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Mc(i),u=Mc(a),d=v.useRef(null),f=vc(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:Kk(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Kk(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kk(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){qk.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Fk,Lk);s.addEventListener(Fk,l),s.dispatchEvent(t),t.defaultPrevented||(Bk(Xk(Hk(s)),{select:!0}),document.activeElement===e&&Kk(s))}return()=>{s.removeEventListener(Fk,l),setTimeout(()=>{let t=new CustomEvent(Ik,Lk);s.addEventListener(Ik,u),s.dispatchEvent(t),t.defaultPrevented||Kk(e??document.body,{select:!0}),s.removeEventListener(Ik,u),qk.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]=Vk(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Kk(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Kk(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,T.jsx)(Ac.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});zk.displayName=Rk;function Bk(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kk(r,{select:t}),document.activeElement!==n)return}function Vk(e){let t=Hk(e);return[Uk(t,e),Uk(t.reverse(),e)]}function Hk(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 Uk(e,t){for(let n of e)if(!Wk(n,{upTo:t}))return n}function Wk(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 Gk(e){return e instanceof HTMLInputElement&&`select`in e}function Kk(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gk(e)&&t&&e.select()}}var qk=Jk();function Jk(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Yk(e,t),e.unshift(t)},remove(t){e=Yk(e,t),e[0]?.resume()}}}function Yk(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xk(e){return e.filter(e=>e.tagName!==`A`)}var Zk=v.useId||(()=>void 0),Qk=0;function $k(e){let[t,n]=v.useState(Zk());return Yc(()=>{e||n(e=>e??String(Qk++))},[e]),e||(t?`radix-${t}`:``)}var eA=[`top`,`right`,`bottom`,`left`],tA=Math.min,nA=Math.max,rA=Math.round,iA=Math.floor,aA=e=>({x:e,y:e}),oA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sA(e,t,n){return nA(e,tA(t,n))}function cA(e,t){return typeof e==`function`?e(t):e}function lA(e){return e.split(`-`)[0]}function uA(e){return e.split(`-`)[1]}function dA(e){return e===`x`?`y`:`x`}function fA(e){return e===`y`?`height`:`width`}function pA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function mA(e){return dA(pA(e))}function hA(e,t,n){n===void 0&&(n=!1);let r=uA(e),i=mA(e),a=fA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=wA(o)),[o,wA(o)]}function gA(e){let t=wA(e);return[_A(e),t,_A(t)]}function _A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var vA=[`left`,`right`],yA=[`right`,`left`],bA=[`top`,`bottom`],xA=[`bottom`,`top`];function SA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?yA:vA:t?vA:yA;case`left`:case`right`:return t?bA:xA;default:return[]}}function CA(e,t,n,r){let i=uA(e),a=SA(lA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(_A)))),a}function wA(e){let t=lA(e);return oA[t]+e.slice(t.length)}function TA(e){return{top:0,right:0,bottom:0,left:0,...e}}function EA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:TA(e)}function DA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function OA(e,t,n){let{reference:r,floating:i}=e,a=pA(t),o=mA(t),s=fA(o),c=lA(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function kA(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=cA(t,e),p=EA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=DA(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=DA(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var AA=50,jA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:kA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=OA(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<AA&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=OA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},MA=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=cA(e,t)||{};if(l==null)return{};let d=EA(u),f={x:n,y:r},p=mA(i),m=fA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=tA(d[_],T),D=tA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=sA(O,A,k),M=!c.arrow&&uA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),NA=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=cA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=lA(r),_=pA(o),v=lA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[wA(o)]:gA(o)),x=p!==`none`;!d&&x&&b.push(...CA(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=hA(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==pA(t))||T.every(e=>pA(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=pA(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function PA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FA(e){return eA.some(t=>e[t]>=0)}var IA=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=cA(e,t);switch(i){case`referenceHidden`:{let e=PA(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:FA(e)}}}case`escaped`:{let e=PA(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:FA(e)}}}default:return{}}}}},LA=new Set([`left`,`top`]);async function RA(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lA(n),s=uA(n),c=pA(n)===`y`,l=LA.has(o)?-1:1,u=a&&c?-1:1,d=cA(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zA=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await RA(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},BA=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=cA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=pA(lA(i)),p=dA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=sA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=sA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},VA=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=cA(e,t),u={x:n,y:r},d=pA(i),f=dA(d),p=u[f],m=u[d],h=cA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=LA.has(lA(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},HA=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=cA(e,t),u=await o.detectOverflow(t,l),d=lA(i),f=uA(i),p=pA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=tA(h-u[g],v),x=tA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=nA(u.left,0),t=nA(u.right,0),n=nA(u.top,0),r=nA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:nA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:nA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function UA(){return typeof window<`u`}function WA(e){return qA(e)?(e.nodeName||``).toLowerCase():`#document`}function GA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function KA(e){return((qA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function qA(e){return UA()?e instanceof Node||e instanceof GA(e).Node:!1}function JA(e){return UA()?e instanceof Element||e instanceof GA(e).Element:!1}function YA(e){return UA()?e instanceof HTMLElement||e instanceof GA(e).HTMLElement:!1}function XA(e){return!UA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof GA(e).ShadowRoot}function ZA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function QA(e){return/^(table|td|th)$/.test(WA(e))}function $A(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ej=/transform|translate|scale|rotate|perspective|filter/,tj=/paint|layout|strict|content/,nj=e=>!!e&&e!==`none`,rj;function ij(e){let t=JA(e)?cj(e):e;return nj(t.transform)||nj(t.translate)||nj(t.scale)||nj(t.rotate)||nj(t.perspective)||!oj()&&(nj(t.backdropFilter)||nj(t.filter))||ej.test(t.willChange||``)||tj.test(t.contain||``)}function aj(e){let t=uj(e);for(;YA(t)&&!sj(t);){if(ij(t))return t;if($A(t))return null;t=uj(t)}return null}function oj(){return rj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),rj}function sj(e){return/^(html|body|#document)$/.test(WA(e))}function cj(e){return GA(e).getComputedStyle(e)}function lj(e){return JA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uj(e){if(WA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||XA(e)&&e.host||KA(e);return XA(t)?t.host:t}function dj(e){let t=uj(e);return sj(t)?e.ownerDocument?e.ownerDocument.body:e.body:YA(t)&&ZA(t)?t:dj(t)}function fj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=dj(e),i=r===e.ownerDocument?.body,a=GA(r);if(i){let e=pj(a);return t.concat(a,a.visualViewport||[],ZA(r)?r:[],e&&n?fj(e):[])}else return t.concat(r,fj(r,[],n))}function pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mj(e){let t=cj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=YA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rA(n)!==a||rA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hj(e){return JA(e)?e:e.contextElement}function gj(e){let t=hj(e);if(!YA(t))return aA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=mj(t),o=(a?rA(n.width):n.width)/r,s=(a?rA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var _j=aA(0);function vj(e){let t=GA(e);return!oj()||!t.visualViewport?_j:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==GA(e)?!1:t}function bj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=hj(e),o=aA(1);t&&(r?JA(r)&&(o=gj(r)):o=gj(e));let s=yj(a,n,r)?vj(a):aA(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=GA(a),t=r&&JA(r)?GA(r):r,n=e,i=pj(n);for(;i&&r&&t!==n;){let e=gj(i),t=i.getBoundingClientRect(),r=cj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=GA(i),i=pj(n)}}return DA({width:u,height:d,x:c,y:l})}function xj(e,t){let n=lj(e).scrollLeft;return t?t.left+n:bj(KA(e)).left+n}function Sj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xj(e,n),y:n.top+t.scrollTop}}function Cj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=KA(r),s=t?$A(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=aA(1),u=aA(0),d=YA(r);if((d||!d&&!a)&&((WA(r)!==`body`||ZA(o))&&(c=lj(r)),d)){let e=bj(r);l=gj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Sj(o,c):aA(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function wj(e){return Array.from(e.getClientRects())}function Tj(e){let t=KA(e),n=lj(e),r=e.ownerDocument.body,i=nA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=nA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+xj(e),s=-n.scrollTop;return cj(r).direction===`rtl`&&(o+=nA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ej=25;function Dj(e,t){let n=GA(e),r=KA(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=oj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=xj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ej&&(a-=o)}else l<=Ej&&(a+=l);return{width:a,height:o,x:s,y:c}}function Oj(e,t){let n=bj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=YA(e)?gj(e):aA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function kj(e,t,n){let r;if(t===`viewport`)r=Dj(e,n);else if(t===`document`)r=Tj(KA(e));else if(JA(t))r=Oj(t,n);else{let n=vj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return DA(r)}function Aj(e,t){let n=uj(e);return n===t||!JA(n)||sj(n)?!1:cj(n).position===`fixed`||Aj(n,t)}function jj(e,t){let n=t.get(e);if(n)return n;let r=fj(e,[],!1).filter(e=>JA(e)&&WA(e)!==`body`),i=null,a=cj(e).position===`fixed`,o=a?uj(e):e;for(;JA(o)&&!sj(o);){let t=cj(o),n=ij(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ZA(o)&&!n&&Aj(e,o))?r=r.filter(e=>e!==o):i=t,o=uj(o)}return t.set(e,r),r}function Mj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?$A(t)?[]:jj(t,this._c):[].concat(n),r],o=kj(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=kj(t,a[e],i);s=nA(n.top,s),c=tA(n.right,c),l=tA(n.bottom,l),u=nA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nj(e){let{width:t,height:n}=mj(e);return{width:t,height:n}}function Pj(e,t,n){let r=YA(t),i=KA(t),a=n===`fixed`,o=bj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=aA(0);function l(){c.x=xj(i)}if(r||!r&&!a)if((WA(t)!==`body`||ZA(i))&&(s=lj(t)),r){let e=bj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Sj(i,s):aA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Fj(e){return cj(e).position===`static`}function Ij(e,t){if(!YA(e)||cj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return KA(e)===n&&(n=n.ownerDocument.body),n}function Lj(e,t){let n=GA(e);if($A(e))return n;if(!YA(e)){let t=uj(e);for(;t&&!sj(t);){if(JA(t)&&!Fj(t))return t;t=uj(t)}return n}let r=Ij(e,t);for(;r&&QA(r)&&Fj(r);)r=Ij(r,t);return r&&sj(r)&&Fj(r)&&!ij(r)?n:r||aj(e)||n}var Rj=async function(e){let t=this.getOffsetParent||Lj,n=this.getDimensions,r=await n(e.floating);return{reference:Pj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zj(e){return cj(e).direction===`rtl`}var Bj={convertOffsetParentRelativeRectToViewportRelativeRect:Cj,getDocumentElement:KA,getClippingRect:Mj,getOffsetParent:Lj,getElementRects:Rj,getClientRects:wj,getDimensions:Nj,getScale:gj,isElement:JA,isRTL:zj};function Vj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hj(e,t){let n=null,r,i=KA(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=iA(d),h=iA(i.clientWidth-(u+f)),g=iA(i.clientHeight-(d+p)),_=iA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:nA(0,tA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Vj(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Uj(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=hj(e),u=i||a?[...l?fj(l):[],...t?fj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hj(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?bj(e):null;c&&g();function g(){let t=bj(e);h&&!Vj(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wj=zA,Gj=BA,Kj=NA,qj=HA,Jj=IA,Yj=MA,Xj=VA,Zj=(e,t,n)=>{let r=new Map,i={platform:Bj,...n},a={...i.platform,_c:r};return jA(e,t,{...i,platform:a})},Qj=typeof document<`u`?v.useLayoutEffect:function(){};function $j(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$j(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!$j(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function eM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tM(e,t){let n=eM(e);return Math.round(t*n)/n}function nM(e){let t=v.useRef(e);return Qj(()=>{t.current=e}),t}function rM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);$j(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=nM(c),O=nM(i),k=nM(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Zj(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!$j(T.current,t)&&(T.current=t,kc.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Qj(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Qj(()=>(j.current=!0,()=>{j.current=!1}),[]),Qj(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=tM(N.floating,u.x),r=tM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...eM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var iM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Yj({element:r.current,padding:i}).fn(n):r?Yj({element:r,padding:i}).fn(n):{}}}},aM=(e,t)=>{let n=Wj(e);return{name:n.name,fn:n.fn,options:[e,t]}},oM=(e,t)=>{let n=Gj(e);return{name:n.name,fn:n.fn,options:[e,t]}},sM=(e,t)=>({fn:Xj(e).fn,options:[e,t]}),cM=(e,t)=>{let n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}},lM=(e,t)=>{let n=qj(e);return{name:n.name,fn:n.fn,options:[e,t]}},uM=(e,t)=>{let n=Jj(e);return{name:n.name,fn:n.fn,options:[e,t]}},dM=(e,t)=>{let n=iM(e);return{name:n.name,fn:n.fn,options:[e,t]}},fM=`Arrow`,pM=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,T.jsx)(Ac.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,T.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});pM.displayName=fM;var mM=pM;function hM(e){let[t,n]=v.useState(void 0);return Yc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var gM=`Popper`,[_M,vM]=bc(gM),[yM,bM]=_M(gM),xM=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return(0,T.jsx)(yM,{scope:t,anchor:r,onAnchorChange:i,children:n})};xM.displayName=gM;var SM=`PopperAnchor`,CM=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=bM(SM,n),o=v.useRef(null),s=vc(t,o),c=v.useRef(null);return v.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,T.jsx)(Ac.div,{...i,ref:s})});CM.displayName=SM;var wM=`PopperContent`,[TM,EM]=_M(wM),DM=v.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=bM(wM,n),[_,y]=v.useState(null),b=vc(t,e=>y(e)),[x,S]=v.useState(null),C=hM(x),w=C?.width??0,E=C?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(jM),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=rM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Uj(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[aM({mainAxis:i+E,alignmentAxis:o}),c&&oM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?sM():void 0,...j}),c&&cM({...j}),lM({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&dM({element:x,padding:s}),MM({arrowWidth:w,arrowHeight:E}),f&&uM({strategy:`referenceHidden`,...j})]}),[L,R]=NM(P),ee=Mc(m);Yc(()=>{F&&ee?.()},[F,ee]);let te=I.arrow?.x,ne=I.arrow?.y,z=I.arrow?.centerOffset!==0,[B,re]=v.useState();return Yc(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,T.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,T.jsx)(TM,{scope:n,placedSide:L,onArrowChange:S,arrowX:te,arrowY:ne,shouldHideArrow:z,children:(0,T.jsx)(Ac.div,{"data-side":L,"data-align":R,...h,ref:b,style:{...h.style,animation:F?void 0:`none`}})})})});DM.displayName=wM;var OM=`PopperArrow`,kM={top:`bottom`,right:`left`,bottom:`top`,left:`right`},AM=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=EM(OM,n),a=kM[i.placedSide];return(0,T.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,T.jsx)(mM,{...r,ref:t,style:{...r.style,display:`block`}})})});AM.displayName=OM;function jM(e){return e!==null}var MM=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=NM(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function NM(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var PM=xM,FM=CM,IM=DM,LM=AM;function RM(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zM=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},BM=new WeakMap,VM=new WeakMap,HM={},UM=0,WM=function(e){return e&&(e.host||WM(e.parentNode))},GM=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=WM(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},KM=function(e,t,n,r){var i=GM(t,Array.isArray(e)?e:[e]);HM[n]||(HM[n]=new WeakMap);var a=HM[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(BM.get(e)||0)+1,l=(a.get(e)||0)+1;BM.set(e,c),a.set(e,l),o.push(e),c===1&&i&&VM.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),UM++,function(){o.forEach(function(e){var t=BM.get(e)-1,i=a.get(e)-1;BM.set(e,t),a.set(e,i),t||(VM.has(e)||e.removeAttribute(r),VM.delete(e)),i||e.removeAttribute(n)}),UM--,UM||(BM=new WeakMap,BM=new WeakMap,VM=new WeakMap,HM={})}},qM=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),KM(r,i,n,`aria-hidden`)):function(){return null}},JM=function(){return JM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},JM.apply(this,arguments)};function YM(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function XM(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ZM=`right-scroll-bar-position`,QM=`width-before-scroll-bar`,$M=`with-scroll-bars-hidden`,eN=`--removed-body-scroll-bar-size`;function tN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function nN(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var rN=typeof window<`u`?v.useLayoutEffect:v.useEffect,iN=new WeakMap;function aN(e,t){var n=nN(t||null,function(t){return e.forEach(function(e){return tN(e,t)})});return rN(function(){var t=iN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||tN(e,null)}),i.forEach(function(e){r.has(e)||tN(e,a)})}iN.set(n,e)},[e]),n}function oN(e){return e}function sN(e,t){t===void 0&&(t=oN);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function cN(e){e===void 0&&(e={});var t=sN(null);return t.options=JM({async:!0,ssr:!1},e),t}var lN=function(e){var t=e.sideCar,n=YM(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,JM({},n))};lN.isSideCarExport=!0;function uN(e,t){return e.useMedium(t),lN}var dN=cN(),fN=function(){},pN=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:fN,onWheelCapture:fN,onTouchMoveCapture:fN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=YM(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=aN([n,t]),w=JM(JM({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:dN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),JM(JM({},w),{ref:C})):v.createElement(y,JM({},w,{className:c,ref:C}),s))});pN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pN.classNames={fullWidth:QM,zeroRight:ZM};var mN,hN=function(){if(mN)return mN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function gN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=hN();return t&&e.setAttribute(`nonce`,t),e}function _N(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var yN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gN())&&(_N(t,n),vN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bN=function(){var e=yN();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xN=function(){var e=bN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},SN={left:0,top:0,right:0,gap:0},CN=function(e){return parseInt(e||``,10)||0},wN=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[CN(n),CN(r),CN(i)]},TN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return SN;var t=wN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},EN=xN(),DN=`data-scroll-locked`,ON=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
119
119
  .${$M} {
120
120
  overflow: hidden ${r};
121
121
  padding-right: ${s}px ${r};
@@ -156,7 +156,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
156
156
  .block-interactivity-${e} {pointer-events: none;}
157
157
  .allow-interactivity-${e} {pointer-events: all;}
158
158
  `},ZN=0,QN=[];function $N(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(ZN++)[0],a=v.useState(xN)[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=XM([e.lockRef.current],(e.shards||[]).map(JN),!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=KN(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=zN(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=zN(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 GN(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!QN.length||QN[QN.length-1]!==a)){var r=`deltaY`in n?qN(n):KN(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&YN(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(JN).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:eP(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=KN(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,qN(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,KN(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return QN.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,PN),document.addEventListener(`touchmove`,c,PN),document.addEventListener(`touchstart`,u,PN),function(){QN=QN.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,PN),document.removeEventListener(`touchmove`,c,PN),document.removeEventListener(`touchstart`,u,PN)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:XN(i)}):null,p?v.createElement(jN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var tP=uN(dN,$N),nP=v.forwardRef(function(e,t){return v.createElement(pN,JM({},e,{ref:t,sideCar:tP}))});nP.classNames=pN.classNames;var rP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],iP=[` `,`Enter`],aP=`Select`,[oP,sP,cP]=Oc(aP),[lP,uP]=bc(aP,[cP,vM]),dP=vM(),[fP,pP]=lP(aP),[mP,hP]=lP(aP),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}=e,h=dP(t),[g,_]=v.useState(null),[y,b]=v.useState(null),[x,S]=v.useState(!1),C=jk(l),[w,E]=il({prop:r,defaultProp:i??!1,onChange:a,caller:aP}),[D,O]=il({prop:o,defaultProp:s,onChange:c,caller:aP}),k=v.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=v.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,T.jsx)(PM,{...h,children:(0,T.jsxs)(fP,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:$k(),value:D,onValueChange:O,open:w,onOpenChange:E,dir:C,triggerPointerDownPosRef:k,disabled:f,children:[(0,T.jsx)(oP.Provider,{scope:t,children:(0,T.jsx)(mP,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:v.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,T.jsxs)(dF,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:e=>O(e.target.value),disabled:f,form:m,children:[D===void 0?(0,T.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};gP.displayName=aP;var _P=`SelectTrigger`,vP=v.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=dP(n),o=pP(_P,n),s=o.disabled||r,c=vc(t,o.onTriggerChange),l=sP(n),u=v.useRef(`touch`),[d,f,p]=pF(e=>{let t=l().filter(e=>!e.disabled),n=mF(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,T.jsx)(FM,{asChild:!0,...a,children:(0,T.jsx)(Ac.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"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":fF(o.value)?``:void 0,...i,ref:c,onClick:hc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:hc(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:hc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&rP.includes(e.key)&&(m(),e.preventDefault())})})})});vP.displayName=_P;var yP=`SelectValue`,bP=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=pP(yP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=vc(t,c.onValueNodeChange);return Yc(()=>{l(u)},[l,u]),(0,T.jsx)(Ac.span,{...s,ref:d,style:{pointerEvents:`none`},children:fF(c.value)?(0,T.jsx)(T.Fragment,{children:o}):a})});bP.displayName=yP;var xP=`SelectIcon`,SP=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,T.jsx)(Ac.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});SP.displayName=xP;var CP=`SelectPortal`,wP=e=>(0,T.jsx)(Zc,{asChild:!0,...e});wP.displayName=CP;var TP=`SelectContent`,EP=v.forwardRef((e,t)=>{let n=pP(TP,e.__scopeSelect),[r,i]=v.useState();if(Yc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?kc.createPortal((0,T.jsx)(OP,{scope:e.__scopeSelect,children:(0,T.jsx)(oP.Slot,{scope:e.__scopeSelect,children:(0,T.jsx)(`div`,{children:e.children})})}),t):null}return(0,T.jsx)(MP,{...e,ref:t})});EP.displayName=TP;var DP=10,[OP,kP]=lP(TP),AP=`SelectContentImpl`,jP=Sc(`SelectContent.RemoveScroll`),MP=v.forwardRef((e,t)=>{let{__scopeSelect:n,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,y=pP(TP,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=vc(t,e=>x(e)),[E,D]=v.useState(null),[O,k]=v.useState(null),A=sP(n),[j,M]=v.useState(!1),N=v.useRef(!1);v.useEffect(()=>{if(b)return qM(b)},[b]),Nk();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&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,S]),F=v.useCallback(()=>P([E,b]),[P,E,b]);v.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null};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})}}},[b,I,L]),v.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[R,ee]=pF(e=>{let t=A().filter(e=>!e.disabled),n=mF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),te=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&(D(e),r&&(N.current=!0))},[y.value]),ne=v.useCallback(()=>b?.focus(),[b]),z=v.useCallback((e,t,n)=>{let r=!N.current&&!n;(y.value!==void 0&&y.value===t||r)&&k(e)},[y.value]),B=r===`popper`?IP:PP,re=B===IP?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,T.jsx)(OP,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:E,onItemLeave:ne,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:j,searchRef:R,children:(0,T.jsx)(nP,{as:jP,allowPinchZoom:!0,children:(0,T.jsx)(zk,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:hc(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,T.jsx)(Bc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,T.jsx)(B,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:hc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(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()}})})})})})})});MP.displayName=AP;var NP=`SelectItemAlignedPosition`,PP=v.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=pP(TP,n),o=kP(TP,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=vc(t,e=>u(e)),f=sP(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=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-DP,d=kk(a,[DP,Math.max(DP,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-DP,d=kk(a,[DP,Math.max(DP,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-DP*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-DP,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=`${DP}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]);Yc(()=>b(),[b]);let[x,S]=v.useState();return Yc(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,T.jsx)(LP,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,T.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,T.jsx)(Ac.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});PP.displayName=NP;var FP=`SelectPopperPosition`,IP=v.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=DP,...a}=e,o=dP(n);return(0,T.jsx)(IM,{...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)`}})});IP.displayName=FP;var[LP,RP]=lP(TP,{}),zP=`SelectViewport`,BP=v.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=kP(zP,n),o=RP(zP,n),s=vc(t,a.onViewportChange),c=v.useRef(0);return(0,T.jsxs)(T.Fragment,{children:[(0,T.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,T.jsx)(oP.Slot,{scope:n,children:(0,T.jsx)(Ac.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:hc(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-DP*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})})})]})});BP.displayName=zP;var VP=`SelectGroup`,[HP,UP]=lP(VP),WP=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$k();return(0,T.jsx)(HP,{scope:n,id:i,children:(0,T.jsx)(Ac.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});WP.displayName=VP;var GP=`SelectLabel`,KP=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=UP(GP,n);return(0,T.jsx)(Ac.div,{id:i.id,...r,ref:t})});KP.displayName=GP;var qP=`SelectItem`,[JP,YP]=lP(qP),XP=v.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=pP(qP,n),c=kP(qP,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=vc(t,e=>c.itemRefCallback?.(e,r,i)),h=$k(),g=v.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,T.jsx)(JP,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,T.jsx)(oP.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,T.jsx)(Ac.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:hc(o.onFocus,()=>p(!0)),onBlur:hc(o.onBlur,()=>p(!1)),onClick:hc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:hc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:hc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:hc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:hc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:hc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(iP.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});XP.displayName=qP;var ZP=`SelectItemText`,QP=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=pP(ZP,n),s=kP(ZP,n),c=YP(ZP,n),l=hP(ZP,n),[u,d]=v.useState(null),f=vc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=v.useMemo(()=>(0,T.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Yc(()=>(h(m),()=>g(m)),[h,g,m]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ac.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?kc.createPortal(a.children,o.valueNode):null]})});QP.displayName=ZP;var $P=`SelectItemIndicator`,eF=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return YP($P,n).isSelected?(0,T.jsx)(Ac.span,{"aria-hidden":!0,...r,ref:t}):null});eF.displayName=$P;var tF=`SelectScrollUpButton`,nF=v.forwardRef((e,t)=>{let n=kP(tF,e.__scopeSelect),r=RP(tF,e.__scopeSelect),[i,a]=v.useState(!1),o=vc(t,r.onScrollButtonChange);return Yc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,T.jsx)(aF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});nF.displayName=tF;var rF=`SelectScrollDownButton`,iF=v.forwardRef((e,t)=>{let n=kP(rF,e.__scopeSelect),r=RP(rF,e.__scopeSelect),[i,a]=v.useState(!1),o=vc(t,r.onScrollButtonChange);return Yc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,T.jsx)(aF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});iF.displayName=rF;var aF=v.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=kP(`SelectScrollButton`,n),o=v.useRef(null),s=sP(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Yc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,T.jsx)(Ac.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:hc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:hc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:hc(i.onPointerLeave,()=>{c()})})}),oF=`SelectSeparator`,sF=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,T.jsx)(Ac.div,{"aria-hidden":!0,...r,ref:t})});sF.displayName=oF;var cF=`SelectArrow`,lF=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=dP(n),a=pP(cF,n),o=kP(cF,n);return a.open&&o.position===`popper`?(0,T.jsx)(LM,{...i,...r,ref:t}):null});lF.displayName=cF;var uF=`SelectBubbleInput`,dF=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=v.useRef(null),a=vc(r,i),o=RM(t);return v.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,T.jsx)(Ac.select,{...n,style:{...sl,...n.style},ref:a,defaultValue:t})});dF.displayName=uF;function fF(e){return e===``||e===void 0}function pF(e){let t=Mc(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function mF(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=hF(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}function hF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gF=gP,_F=vP,vF=bP,yF=SP,bF=wP,xF=EP,SF=BP,CF=WP,wF=KP,TF=XP,EF=QP,DF=eF,OF=nF,kF=iF,AF=sF,jF=gF,MF=CF,NF=vF,PF=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,T.jsxs)(_F,{suppressHydrationWarning:!0,className:l(`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,T.jsx)(yF,{asChild:!0,children:(0,T.jsx)(wu,{className:`size-4 opacity-50`})})]}),FF=({className:e,...t})=>(0,T.jsx)(OF,{className:l(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,T.jsx)(Cu,{})}),IF=({className:e,...t})=>(0,T.jsx)(kF,{className:l(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,T.jsx)(bu,{})}),LF=({className:e,children:t,position:n=`popper`,...r})=>(0,T.jsx)(bF,{children:(0,T.jsxs)(xF,{className:l(`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,T.jsx)(FF,{}),(0,T.jsx)(SF,{className:l(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,T.jsx)(IF,{})]})}),RF=({className:e,...t})=>(0,T.jsx)(wF,{className:l(`px-1 py-0.5 font-semibold text-sm`,e),...t}),zF=({className:e,children:t,...n})=>(0,T.jsxs)(TF,{className:l(`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,T.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,T.jsx)(DF,{children:(0,T.jsx)(yu,{className:`size-4`})})}),(0,T.jsx)(EF,{children:t})]}),BF=({className:e,...t})=>(0,T.jsx)(AF,{className:l(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=jF;J.Group=MF,J.Value=NF,J.Trigger=PF,J.ScrollUpButton=FF,J.ScrollDownButton=IF,J.Content=LF,J.Label=RF,J.Item=zF,J.Separator=BF;var VF=()=>{let e=(0,b.c)(8),{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=Sk(),i=xr(Ok),a;e[0]!==n||e[1]!==r?(a=e=>{n(e),r(e)},e[0]=n,e[1]=r,e[2]=a):a=e[2];let o;return e[3]!==t||e[4]!==i.codeFormat.label.value||e[5]!==i.codeFormat.placeholder.value||e[6]!==a?(o=(0,T.jsxs)(J,{value:t,onValueChange:a,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:(0,T.jsx)(J.Value,{placeholder:i.codeFormat.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,T.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,T.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`})]})]}),e[3]=t,e[4]=i.codeFormat.label.value,e[5]=i.codeFormat.placeholder.value,e[6]=a,e[7]=o):o=e[7],o},HF=()=>{let e=(0,b.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=Sk(),r=xr(Ok),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,T.jsxs)(J,{value:t,onValueChange:n,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,T.jsx)(J.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`typescript`,children:`TypeScript`}),(0,T.jsx)(J.Item,{value:`commonjs`,children:`CommonJS`}),(0,T.jsx)(J.Item,{value:`esm`,children:`ESM`}),(0,T.jsx)(J.Item,{value:`json`,children:`JSON`})]})]}),e[0]=r.contentDeclarationFormat.label.value,e[1]=r.contentDeclarationFormat.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},UF={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},WF=({children:e,className:t,identifier:n,...r})=>(0,T.jsx)(`div`,{className:l(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),GF=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...u})=>(0,T.jsx)(tS,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:l(`absolute z-50 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...u,children:e});WF.Detail=GF;var KF=e=>(0,T.jsx)(WF,{...e}),qF=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,v.useRef)(null),[i,a]=(0,v.useState)(e),[o,s]=(0,v.useState)(t),[c,l]=(0,v.useState)(void 0);return(0,v.useEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===`bellow`&&o<n.height?l>=n.height&&(r=`above`):t===`above`&&l<n.height&&o>=n.height&&(r=`bellow`);let f=e,p=u-c.left-16,h=c.right-16;e===`start`&&p<n.width?h>=n.width&&(f=`end`):e===`end`&&h<n.width&&p>=n.width&&(f=`start`),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,T.jsx)(GF,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},JF=KF;JF.Detail=qF;var YF={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},XF=e=>{let t=(0,b.c)(6),{content:n,...r}=e,[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),{label:c}=xr(YF),l;t[0]===n?l=t[1]:(l=async()=>{try{s(!1),await navigator.clipboard.writeText(n),a(!0)}catch(e){console.error(`Failed to copy text: `,e),s(!0)}},t[0]=n,t[1]=l);let u=l,d,f;t[2]!==i||t[3]!==o?(d=()=>{if(i||o){let e=setTimeout(()=>{a(!1),s(!1)},1e3);return()=>clearTimeout(e)}},f=[i,o],t[2]=i,t[3]=o,t[4]=d,t[5]=f):(d=t[4],f=t[5]),(0,v.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,T.jsx)(oS,{Icon:i?Tu:Eu,onClick:u,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:p(),...r,label:p(),"aria-describedby":i?`copy-success`:o?`copy-error`:void 0})},ZF=e=>{let{code:t,...n}=e,{title:r,description:i}=xr(UF);return(0,T.jsxs)(JF,{identifier:`copy`,children:[(0,T.jsx)(XF,{content:t,...n}),(0,T.jsxs)(JF.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,T.jsx)(`strong`,{children:r}),(0,T.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},QF=()=>{let e=(0,b.c)(5),{packageManager:t,setPackageManager:n}=Sk(),r=xr(Ok);xr(Ok);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,T.jsxs)(J,{value:t,onValueChange:n,children:[(0,T.jsx)(J.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,T.jsx)(J.Value,{placeholder:r.packageManager.placeholder.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`npm`,children:`npm`}),(0,T.jsx)(J.Item,{value:`pnpm`,children:`pnpm`}),(0,T.jsx)(J.Item,{value:`yarn`,children:`yarn`}),(0,T.jsx)(J.Item,{value:`bun`,children:`bun`})]})]}),e[0]=r.packageManager.label.value,e[1]=r.packageManager.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},$F=700,eI=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:d,isRollable:f=!0,...p})=>{let m=e?.endsWith(`
159
- `)?e.slice(0,-1):e,h=s||c||d;return(0,T.jsx)(Dk,{packageManager:s,codeFormat:c,contentDeclarationFormat:d,children:(0,T.jsxs)(tS,{className:l(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,T.jsx)(`span`,{className:`truncate`,children:o??t}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,T.jsx)(QF,{}),c&&(0,T.jsx)(VF,{}),d&&(0,T.jsx)(HF,{})]})]}),(0,T.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`,h&&`h-11`),children:(0,T.jsx)(ZF,{code:m})})})]}),(0,T.jsx)(Ek,{minHeight:$F,isRollable:f,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:(0,T.jsx)(u,{lang:t,isDarkMode:n,children:m})})]})})},tI=(0,v.createContext)({tabsValues:{},setTabsValues:()=>{}}),nI=()=>(0,v.useContext)(tI),rI=e=>{let t=(0,b.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,v.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,T.jsx)(tI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},iI=e=>{let t=(0,b.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,v.useRef)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(0),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=x):x=t[0];let S=(0,v.useRef)(x),C=(0,v.useRef)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=w):w=t[1];let T=w,E;t[2]!==o||t[3]!==a?(E=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=E):E=t[4];let D=E,O;t[5]===u?O=t[6]:(O=e=>{u&&S.current.pointerId===null&&(S.current.pointerId=e.pointerId,S.current.startX=e.clientX,S.current.startY=e.clientY,S.current.lastX=e.clientX,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current=!1,g(!1),y(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==h?(A=e=>{if(!u||S.current.pointerId!==e.pointerId)return;let t=T();if(!t)return;let n=e.clientX-S.current.startX,r=e.clientY-S.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){C.current=!0;return}}if(!S.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(S.current.axisLocked=!0,S.current.isHorizontal=e>t)}if(S.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),h||g(!0),y(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=h,t[11]=A):A=t[11];let j=A,M;t[12]!==_||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=_;if(g(!1),y(0),S.current.pointerId=null,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current){C.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=_,t[13]=r,t[14]=i,t[15]=d,t[16]=M):M=t[16];let N=M,P;t[17]!==u||t[18]!==N?(P=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[17]=u,t[18]=N,t[19]=P):P=t[19];let F=P,I;t[20]!==u||t[21]!==N?(I=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=I):I=t[22];let L=I,R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{y(0),g(!1)},t[23]=R):R=t[23];let ee;t[24]===a?ee=t[25]:(ee=[a],t[24]=a,t[25]=ee),(0,v.useEffect)(R,ee);let te;t[26]===f?te=t[27]:(te={touchAction:f},t[26]=f,t[27]=te);let ne;t[28]!==L||t[29]!==k||t[30]!==j||t[31]!==F||t[32]!==te?(ne={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:F,onPointerCancel:L,style:te},t[28]=L,t[29]=k,t[30]=j,t[31]=F,t[32]=te,t[33]=ne):ne=t[33];let z;return t[34]!==_||t[35]!==h||t[36]!==ne?(z={containerRef:m,isDragging:h,dragDeltaPct:_,containerProps:ne},t[34]=_,t[35]=h,t[36]=ne,t[37]=z):z=t[37],z},aI=ou(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),oI=ou(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,destructive:`bg-destructive/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),sI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,v.useRef)([]),c=(0,v.useRef)(null),{choiceIndicatorPosition:u,calculatePosition:d}=fS(s,{isHoverable:i,orientation:a});return(0,v.useEffect)(()=>{d()},[t]),(0,T.jsxs)(`div`,{className:l(aI({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,v.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),u&&(0,T.jsx)(`div`,{className:l(oI({color:r,orientation:a})),style:u,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},cI=(0,v.createContext)(void 0),lI=ou(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),uI=({children:e,...t})=>(0,T.jsx)(`div`,{...t,children:e});uI.displayName=`TabItem`;var dI=Object.assign(e=>{let t=(0,b.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...u}=e,d=v.Children.toArray(a).filter(fI),f=d[0]?.props?.value,{tabsValues:p,setTabsValues:m}=nI(),[h,g]=(0,v.useState)(n??f??``),_=(r&&typeof p==`object`?p?.[r]:h)??n??f,y;t[0]===_?y=t[1]:(y=e=>e.props.value===_,t[0]=_,t[1]=y);let x=d.findIndex(y),S=d.length,{containerProps:C,dragDeltaPct:w,isDragging:E}=iI({itemIndex:x,itemCount:S,onSwipeLeft:()=>{let e=d[Math.min(S-1,x+1)]?.props?.value;e&&D(e)},onSwipeRight:()=>{let e=d[Math.max(0,x-1)]?.props?.value;e&&D(e)}}),D=e=>{g(e),typeof m==`function`&&m(t=>({...t,[r]:e}))},O={activeTab:h??f??``,setActiveTab:D},k;return t[2]!==x||t[3]!==c?(k=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===x;return(0,T.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:l(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,T.jsx)(`div`,{className:l(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=x,t[3]=c,t[4]=k):k=t[4],(0,T.jsx)(cI.Provider,{value:O,children:(0,T.jsxs)(`div`,{className:l(lI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...u,children:[(0,T.jsx)(`div`,{className:l(`flex shrink-0 gap-3 p-3`,s),children:(0,T.jsx)(sI,{selectedChoice:_,tabs:d.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=_===n;return(0,T.jsx)(`button`,{className:l(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&D(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,T.jsx)(`div`,{className:l(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...C,children:(0,T.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:l(`grid w-full min-w-0`,c&&`h-full`,E?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${d.length}, 100%)`,transform:`translateX(-${x*100-(E?w:0)}%)`},children:d.map(k)})})]})})},{Item:uI});function fI(e){return(0,v.isValidElement)(e)&&e.type===uI}var pI=e=>{let t=(0,b.c)(3),[n,r]=(0,v.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,v.useEffect)(i,a),n},mI=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},hI=[],gI=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(mI.subscribe,mI.getSnapshot,_I),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:mI.addBlockage,removeBlockage:mI.removeBlockage,isElementScrollBlocked:mI.isElementScrollBlocked},e[0]=t,e[1]=n),n};function _I(){return hI}var vI=e=>{let t=(0,b.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=gI(),d=pI(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,v.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},yI=ou(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),bI={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},xI=Jx.create(tS),SI=e=>{let t=(0,b.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:u,isScrollable:d,disableScroll:f,padding:p,...m}=e,h=o===void 0?!1:o,g=c===void 0?`md`:c,_=d===void 0?!1:d,y=f===void 0?!0:f,x=p===void 0?`none`:p,S=pI(i),C=r&&y,w;t[0]===C?w=t[1]:(w={key:`modal`,disableScroll:C},t[0]=C,t[1]=w),vI(w);let E,D;if(t[2]!==r||t[3]!==a?(E=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},D=[r,a],t[2]=r,t[3]=a,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,v.useEffect)(E,D),!S){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[6]=e):e=t[6],e}let O=!!s,k=bI[x||`none`],A;return t[7]===a?A=t[8]:(A=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=A),(0,kc.createPortal)((0,T.jsx)(Jx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:A,"aria-hidden":!r,children:(0,T.jsxs)(xI,{onClick:CI,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:yI({size:g,className:u}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...m,children:[(0,T.jsxs)(`div`,{className:l(`relative flex-none px-4 pt-4`,h&&O?`flex items-start`:h?`flex justify-end`:O?`items-center`:`hidden`),children:[O&&(0,T.jsx)(_k,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),h&&(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Wu,size:`icon-md`})]}),(0,T.jsx)(`div`,{className:l(`flex min-h-0 w-full flex-1 flex-col`,_===!0&&`overflow-auto`,_===`y`&&`overflow-y-auto overflow-x-hidden`,_===`x`&&`overflow-x-auto overflow-y-hidden`,!_&&`overflow-visible`),children:(0,T.jsx)(`div`,{className:l(`flex h-full w-full flex-1 flex-col`,k),children:n})})]})}),S)};function CI(e){return e.stopPropagation()}var wI={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},TI=e=>{let t=(0,b.c)(6),{setIsModalOpen:n}=e,{modal:r}=xr(wI),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,T.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,T.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,T.jsxs)(JF,{identifier:`expand`,children:[(0,T.jsx)(oS,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:Nu}),(0,T.jsxs)(JF.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,T.jsx)(`strong`,{children:r.title}),(0,T.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},EI=(0,v.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,T.jsx)(`table`,{ref:r,className:l(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),DI=.55,OI=5,kI=30,AI=(e,t,n)=>{let r=(0,b.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(kI,Math.max(OI,(n[t]??0)*DI));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${kI}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,v.useEffect)(i,n)},jI=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,v.useState)(!1),[c,u]=(0,v.useState)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);AI(d,f,[a.children,o]),(0,v.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,v.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,T.jsxs)(`div`,{className:`group relative`,children:[n&&(0,T.jsx)(TI,{setIsModalOpen:s}),(0,T.jsx)(Ek,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,T.jsx)(EI,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,T.jsx)(SI,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,T.jsx)(`div`,{className:`grid`,children:(0,T.jsx)(EI,{ref:f,className:l(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,T.jsx)(T.Fragment,{})})]})},MI=e=>(0,T.jsx)(hk,{isClickable:!0,className:`text-text`,...e}),NI=e=>(0,T.jsx)(gk,{isClickable:!0,className:`mt-16 text-text`,...e}),PI=e=>(0,T.jsx)(_k,{isClickable:!0,className:`mt-5 text-text`,...e}),FI=e=>(0,T.jsx)(vk,{isClickable:!0,className:`mt-3 text-text`,...e}),II=e=>(0,T.jsx)(yk,{isClickable:!0,className:`mt-3 text-text`,...e}),LI=e=>(0,T.jsx)(bk,{isClickable:!0,className:`mt-3 text-text`,...e}),RI=e=>(0,T.jsx)(`strong`,{className:`text-text`,...e}),zI=(0,v.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,T.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,T.jsx)(eI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),BI=e=>function(t){return(0,T.jsx)(zI,{...t,isDarkMode:e})},VI=({className:e,...t})=>(0,T.jsx)(`blockquote`,{className:l(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),HI=({className:e,...t})=>(0,T.jsx)(`ul`,{className:l(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),UI=({className:e,...t})=>(0,T.jsx)(`ol`,{className:l(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),WI=({className:e,alt:t,src:n,...r})=>(0,T.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:l(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),GI=e=>t=>(0,T.jsx)(nk,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),KI={h1:MI,h2:NI,h3:PI,h4:FI,h5:II,h6:LI,strong:RI,blockquote:VI,ul:HI,ol:UI,img:WI,pre:e=>(0,T.jsx)(T.Fragment,{children:e.children}),table:e=>(0,T.jsx)(jI,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,T.jsx)(`th`,{className:l(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,T.jsx)(`tr`,{className:l(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,T.jsx)(`td`,{className:l(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,T.jsx)(`hr`,{className:l(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,T.jsx)(dI,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:dI.Item,Columns:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex-1`,e),...t}),iframe:e=>(0,T.jsx)(tS,{roundedSize:`2xl`,border:!0,background:`none`,borderColor:`neutral`,className:`overflow-hidden`,children:(0,T.jsx)(`iframe`,{...e})})},qI=(e,t)=>({...KI,code:BI(e),a:GI(t)}),JI=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,T.jsx)(Ck,{children:(0,T.jsx)(rI,{children:Tr(e,{components:{...qI(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),YI=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}},XI=e=>{let t=(0,b.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=YI(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,T.jsxs)(`div`,{className:`flex gap-1`,children:[(0,T.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,T.jsx)(J.Trigger,{className:`w-20`,children:(0,T.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`<`,children:`<`}),(0,T.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,T.jsx)(J.Item,{value:`=`,children:`=`}),(0,T.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,T.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,T.jsx)(Zw,{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},ZI=e=>{let t=(0,b.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=Bw(),s=Rw(),{mutate:c,isPending:l}=xO(),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,T.jsx)(JO,{variant:`default`,onContentChange:u,additionalButtons:(0,T.jsx)(oS,{Icon:Uu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},QI=e=>{let t=(0,b.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=Bw(),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,T.jsx)(OO,{variant:`default`,onContentChange:o,...i})},$I=[{content:`False`,value:!1},{content:`True`,value:!0}],eL=e=>{let t=(0,b.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=Bw(),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,T.jsx)(yS,{choices:$I,value:!0,onChange:o,color:`text`,size:`sm`,...i})},tL=e=>{let t=(0,b.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=Sr(),{selectedLocales:c,availableLocales:l}=EO(),u=n[k],d;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==n||t[7]!==u||t[8]!==c){let e=Object.keys(u),f=l.length>c.length?c:[...new Set([...l,...e])],p=n[k],m;t[10]!==p||t[11]!==s||t[12]!==i||t[13]!==r||t[14]!==o||t[15]!==a?(m=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:dr(e,o)})}),(0,T.jsx)(`tr`,{className:`flex`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:p[e]??pw(p[s]),keyPath:[...r,{type:k,key:e}],dictionary:i,renderSection:a})})})]},t)},t[10]=p,t[11]=s,t[12]=i,t[13]=r,t[14]=o,t[15]=a,t[16]=m):m=t[16],d=(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:f.map(m)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=n,t[7]=u,t[8]=c,t[9]=d}else d=t[9];return d},nL=e=>{let t=(0,b.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=Bw(),{addNewEnumeration:s,removeEnumeration:c}=xr(vT),l=n[A],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,pw(l[d])??``,[...r,{type:A,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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[A]).map(e=>{let t=[...r,{type:A,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(`div`,{className:`flex flex-1`,children:(0,T.jsx)(oS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Hu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,T.jsx)(`tr`,{className:`w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(XI,{value:e,onChange:t=>{let a=n[A],s=ZO(a,e,t),c={...n,[A]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:l[e]??pw(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,T.jsx)(oS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Ru,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},rL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[j];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:i[e]??pw(i.true),keyPath:[...t,{type:j,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},iL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[B];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:i[e]??pw(i.male),keyPath:[...t,{type:B,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},aL=e=>{let t=(0,b.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=Bw(),{addNewElement:s,removeElement:c}=xr(vT),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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,T.jsx)(oS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:F,key:t}];o(i.localId,void 0,e)},Icon:Hu,children:c.text})]})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:e??pw(n[0]),keyPath:[...r,{type:F,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:F,key:n.length}];o(i.localId,pw(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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,T.jsx)(oS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Ru,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},oL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:P,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??pw(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),sL=e=>{let t=(0,b.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:ee}],l=n[ee];s=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(yS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(pL,{section:l,keyPath:c,dictionary:i,renderSection:a===1?mL:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},cL=e=>{let t=(0,b.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,v.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n[R],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,T.jsx)(JI,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(yS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(pL,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},lL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:M}],i=e[M];return(0,T.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,T.jsx)(pL,{section:i,keyPath:r,...n})})},uL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:N}],i=e[N],{content:a}=e;return(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,T.jsx)(pL,{section:a,keyPath:r,...n})]})},dL=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=Bw(),s=i[I],c=[...t,{type:I}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,T.jsx)(QO,{children:`Dictionary key`}),(0,T.jsx)(OO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,T.jsx)(QO,{children:`Path (optional)`}),(0,T.jsx)(OO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},fL=e=>{let t=(0,b.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=xr(vT),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=_w(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,T.jsx)(`span`,{children:`(React Node)`}),(0,T.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,T.jsx)(dL,{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,T.jsx)(tL,{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,T.jsx)(nL,{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,T.jsx)(rL,{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===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,T.jsx)(iL,{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===`insertion`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,T.jsx)(lL,{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===`markdown`){let e;t[40]!==i||t[41]!==o||t[42]!==r||t[43]!==n?(e=(0,T.jsx)(cL,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[40]=i,t[41]=o,t[42]=r,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`html`){let e;t[45]!==i||t[46]!==r||t[47]!==n?(e=(0,T.jsx)(sL,{dictionary:i,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=n,t[48]=e):e=t[48],l=e;break bb0}if(e===`file`){let e;t[49]!==i||t[50]!==r||t[51]!==a||t[52]!==n?(e=(0,T.jsx)(uL,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[49]=i,t[50]=r,t[51]=a,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`array`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,T.jsx)(aL,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`object`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,T.jsx)(oL,{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===`number`){let e;t[64]!==i||t[65]!==r||t[66]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)(QI,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[64]=i,t[65]=r,t[66]=n,t[67]=e):e=t[67],l=e;break bb0}if(e===`text`){let e;t[68]!==i||t[69]!==r||t[70]!==a||t[71]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,T.jsx)(ZI,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[68]=i,t[69]=r,t[70]=a,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`boolean`){let e;t[73]!==i||t[74]!==r||t[75]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)(eL,{dictionary:i,keyPath:r,value:n})}),t[73]=i,t[74]=r,t[75]=n,t[76]=e):e=t[76],l=e;break bb0}c=(0,T.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},pL=e=>(0,T.jsx)(tS,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,T.jsx)(fL,{...e})});function mL(e){return(0,T.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var hL={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},gL=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,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]||``,_L=ou(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),vL=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ce(hL).linkLabel;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(nk,{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:`sm`,children:(0,T.jsx)(`span`,{itemProp:`name`,children:n})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},yL=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=xr(hL);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,T.jsx)(`span`,{itemProp:`name`,children:t})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},bL=({children:e,position:t,className:n,...r})=>(0,T.jsxs)(`span`,{itemProp:`item`,className:l(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,T.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,T.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),xL=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,T.jsx)(Su,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:u,spacing:d,...f})=>{let p=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,T.jsx)(`nav`,{"aria-label":o,children:(0,T.jsx)(`ol`,{className:l(_L({size:u,spacing:d}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...f,children:p.map((e,t)=>{let o=t===p.length-1,c=typeof e==`object`&&typeof e.href==`string`,u=typeof e==`object`&&typeof e.onClick==`function`,d=t===p.length-1,f=d?i:void 0,m=e===`...`,h=e.text??e,g=gL(n);if(m)return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,T.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},`truncated-${h}`);let _=(0,T.jsx)(bL,{position:t+1,"aria-current":f,className:l(`transition-colors duration-200`,d&&`text-neutral-900`),children:h},h);c?_=(0,T.jsx)(vL,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h):u&&(_=(0,T.jsx)(yL,{onClick:e.onClick,color:n,position:t+1,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h));let y=(0,v.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return o?y:(0,T.jsxs)(v.Fragment,{children:[y,(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},h)})})})},SL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,T.jsx)(xL,{links:[...a?[{text:_r(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),CL={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},wL=({children:e,className:t,identifier:n,...r})=>(0,T.jsx)(`div`,{className:l(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});wL.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,T.jsx)(oS,{className:l([`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}),wL.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,...c})=>(0,T.jsx)(`div`,{className:l(`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,T.jsx)(sS,{isHidden:t,className:l(`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,children:e})});function TL(e){return Array.isArray?Array.isArray(e):FL(e)===`[object Array]`}function EL(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 DL(e){return e==null?``:EL(e)}function OL(e){return typeof e==`string`}function kL(e){return typeof e==`number`}function AL(e){return e===!0||e===!1||ML(e)&&FL(e)==`[object Boolean]`}function jL(e){return typeof e==`object`}function ML(e){return jL(e)&&e!==null}function NL(e){return e!=null}function PL(e){return!e.trim().length}function FL(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var IL=`Incorrect 'index' type`,LL=e=>`Invalid value for key ${e}`,RL=e=>`Pattern length exceeds max of ${e}.`,zL=e=>`Missing ${e} property in key`,BL=e=>`Property 'weight' in key '${e}' must be a positive integer`,VL=Object.prototype.hasOwnProperty,HL=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=UL(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 UL(e){let t=null,n=null,r=null,i=1,a=null;if(OL(e)||TL(e))r=e,t=WL(e),n=GL(e);else{if(!VL.call(e,`name`))throw Error(zL(`name`));let o=e.name;if(r=o,VL.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(BL(o));t=WL(o),n=GL(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function WL(e){return TL(e)?e:e.split(`.`)}function GL(e){return TL(e)?e.join(`.`):e}function KL(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(NL(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!NL(s))return;if(a===t.length-1&&(OL(s)||kL(s)||AL(s)||typeof s==`bigint`))n.push(o===void 0?DL(s):{v:DL(s),i:o});else if(TL(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,OL(t)?t.split(`.`):t,0),r?n:n[0]}var qL={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},JL={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},YL={location:0,threshold:.6,distance:100},XL={useExtendedSearch:!1,useTokenSearch:!1,getFn:KL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...JL,...qL,...YL,...XL}),ZL=/[^ ]+/g;function QL(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(ZL).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var $L=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=QL(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(){this.isCreated||!this.docs.length||(this.isCreated=!0,OL(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();OL(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!NL(e)||PL(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(NL(i)){if(TL(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(NL(n)){if(OL(n)){if(!PL(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(NL(n.v)){let t=OL(n.v)?n.v:DL(n.v);if(!PL(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(OL(i)&&!PL(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function eR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new $L({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(UL)),i.setSources(t),i.create(),i}function tR(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new $L({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function nR(e=[],t=Y.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}var rR=32;function iR(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>rR)throw Error(RL(rR));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=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=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(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=nR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function aR(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 oR(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 sR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},cR=RegExp(`[`+Object.keys(sR).join(``)+`]`,`g`),lR=String.prototype.normalize?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(cR,e=>sR[e]):e=>e,uR=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.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?lR(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:aR(e),startIndex:t})},d=this.pattern.length;if(d>rR){let e=0,t=d%rR,n=d-t;for(;e<n;)u(this.pattern.substr(e,rR),e),e+=rR;if(t){let e=d-rR;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?lR(e):e,this.pattern===e){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}=iR(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=oR(u)),p}},dR=class{constructor(e){this.pattern=e}static isMultiMatch(e){return fR(e,this.multiRegex)}static isSingleMatch(e){return fR(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function fR(e,t){let n=e.match(t);return n?n[1]:null}var pR=class extends dR{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},mR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},hR=class extends dR{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},gR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},_R=class extends dR{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},vR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},yR=class extends dR{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){super(e),this._bitapSearch=new uR(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},bR=class extends dR{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},xR=[pR,bR,hR,gR,vR,_R,mR,yR],SR=xR.length,CR=`\0`,wR=`|`;function TR(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 ER(e,t={}){return e.replace(/\\\|/g,CR).split(wR).map(e=>{let n=TR(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<SR;){let e=xR[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<SR;){let e=xR[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var DR=new Set([yR.type,bR.type]),OR=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.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?lR(e):e,this.pattern=e,this.query=ER(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?lR(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;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(DR.has(e)?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=oR(o)),e}}return{isMatch:!1,score:1}}},kR=[];function AR(...e){kR.push(...e)}function jR(e,t){for(let n=0,r=kR.length;n<r;n+=1){let r=kR[n];if(r.condition(e,t))return new r(e,t)}return new uR(e,t)}var MR={AND:`$and`,OR:`$or`},NR={PATH:`$path`,PATTERN:`$val`},PR=e=>!!(e[MR.AND]||e[MR.OR]),FR=e=>!!e[NR.PATH],IR=e=>!TL(e)&&jL(e)&&!PR(e),LR=e=>({[MR.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function RR(e,t,{auto:n=!0}={}){let r=e=>{if(OL(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=jR(e,t)),r}let i=Object.keys(e),a=FR(e);if(!a&&i.length>1&&!PR(e))return r(LR(e));if(IR(e)){let r=a?e[NR.PATH]:i[0],o=a?e[NR.PATTERN]:e[r];if(!OL(o))throw Error(LL(r));let s={keyId:GL(r),pattern:o};return n&&(s.searcher=jR(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];TL(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return PR(e)||(e=LR(e)),r(e)}function zR(e,{ignoreFieldNorm:t=Y.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 BR(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=zR(e.matches,{ignoreFieldNorm:t})})}var VR=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)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&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function HR(e,t){let n=e.matches;t.matches=[],NL(n)&&n.forEach(e=>{if(!NL(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function UR(e,t){t.score=e.score}function WR(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(HR),r&&i.push(UR),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var GR=/\b\w+\b/g;function KR({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=lR(n)),n.match(GR)||[]}}}function qR(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function JR(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function YR(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var XR=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new HL(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=jR(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 $L))throw Error(IL);if(this._myIndex=t||eR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=KR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=qR(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(NL(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=KR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});JR(this._invertedIndex,e,this._myIndex.keys.length,t)}}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){if(this._invertedIndex)for(let e of n)YR(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&YR(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(OL(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return kL(n)&&n>-1&&(e=e.slice(0,n)),e}let c=kL(n)&&n>0&&OL(e),l;if(c){let t=new VR(n);OL(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=OL(e)?OL(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),BR(l,{ignoreFieldNorm:s}),a&&l.sort(o),kL(n)&&n>-1&&(l=l.slice(0,n));return WR(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!NL(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=zR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=RR(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===MR.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(NL(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!NL(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=zR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!NL(t))return[];let r=[];if(TL(t))t.forEach(({v:t,i,n:a})=>{if(!NL(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},ZR=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=KR({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});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 uR(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)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=oR(t)),o}};XR.version=`7.3.0`,XR.createIndex=eR,XR.parseIndex=tR,XR.config=Y,XR.match=function(e,t,n){return jR(e,{...Y,...n}).searchIn(t)},XR.parseQuery=RR,AR(OR),AR(ZR),XR.use=function(...e){e.forEach(e=>AR(e))};var QR=`locale-switcher-content`,$R=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=xr(CL),s=(0,v.useRef)(null),{locale:c}=Sr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=EO(),f=(0,v.useMemo)(()=>l.map(e=>({locale:e,englishName:dr(e,`en`),currentLocaleName:dr(e,c),ownLocaleName:dr(e)})),[l,c]),[p,m]=(0,v.useState)(``),[h,g]=wO(`locale-content-selector-see-all-locales`,!1),_=(0,v.useMemo)(()=>new XR(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,v.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{g(e),d(e?l:[c])};return(0,T.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,T.jsxs)(wL,{identifier:QR,children:[(0,T.jsx)(wL.Trigger,{identifier:QR,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,T.jsx)(`div`,{className:`px-2 py-1`,children:(0,T.jsx)(ju,{size:16})}),(0,T.jsx)(Fu,{className:`self-center`,size:16})]})}),(0,T.jsx)(wL.Panel,{identifier:QR,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,T.jsxs)(tS,{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,T.jsx)(`div`,{className:`m-auto p-2`,children:(0,T.jsx)(yS,{defaultValue:h,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`p-3`,children:(0,T.jsx)(Zw,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,T.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:y.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,T.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,T.jsx)(oS,{onClick:()=>b(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,T.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,T.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,T.jsx)(yu,{className:`size-full`})}),(0,T.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,T.jsx)(`span`,{dir:or(e),lang:e,children:i}),(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,T.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},ez=e=>{let t=mw(e),n=_w(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?ez(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},tz=e=>{let t=(0,b.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=x,o=dw(n,r,Nw()),{addEditedContent:s}=zw(),{setFocusedContentKeyPath:c,focusedContent:l}=Fw(),{addNewElement:u,goToField:d}=xr(vT),f=_w(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&pr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=ez(o);if(!o)return(0,T.jsx)(T.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,T.jsx)(oS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:Su,children:_r(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,T.jsx)(T.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,T.jsx)(tz,{keyPath:[...r,{type:k,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,T.jsx)(tz,{keyPath:[...r,{type:f,key:e}],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:F,key:t}];return ez(e)?(0,T.jsxs)(oS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:Su,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,T.jsx)(cS,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(tz,{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,T.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,T.jsx)(oS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:F,key:o.length}],t=o,n=pw(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Ru,children:u.text})]})}return typeof o.nodeType==`string`?(0,T.jsx)(tz,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,T.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:P,key:e}];return ez(dw(n,t))?(0,T.jsx)(oS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:Su,children:_r(e)},e):(0,T.jsx)(cS,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:_r(e),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(tz,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,T.jsxs)(T.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},nz=e=>{let t=(0,b.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=Bw(),{focusedContent:c,setFocusedContentKeyPath:l}=Fw(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=Nw(),p=dw(d,u??[],f),m;t[0]===d?m=t[1]:(m=ez(d),t[0]=d,t[1]=m);let h=m,g=ez(p),_;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],t[2]=_):_=t[2],(0,v.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},_),(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,T.jsx)(SL,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsx)($R,{})})]}),(0,T.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!h&&Object.keys(d).length>0&&(0,T.jsx)(tS,{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:`xl`,transparency:`xs`,children:(0,T.jsx)(tz,{keyPath:[],section:d,dictionary:n})}),(g||(u??[]).length>0)&&(0,T.jsx)(pL,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},rz=ou(`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`,destructive:`border-destructive bg-destructive text-destructive hover:bg-destructive-500`,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`}}),iz=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:u,tabIndex:d,"aria-label":f,...p})=>{let m=a?`button`:`span`,h=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},g=e=>{e.stopPropagation(),c?.()};return(0,T.jsxs)(m,{className:l(rz({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?h:void 0,role:u||(a?`button`:`status`),tabIndex:a?d??0:d,"aria-label":f||(a?`${i} button`:void 0),...p,children:[i,o&&(0,T.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:g,"aria-label":`Remove ${i} badge`,children:(0,T.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,T.jsx)(`title`,{children:`Remove badge`}),(0,T.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`})]})})]})},az=`Dialog`,[oz,sz]=bc(az),[cz,lz]=oz(az),uz=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]=il({prop:r,defaultProp:i??!1,onChange:a,caller:az});return(0,T.jsx)(cz,{scope:t,triggerRef:s,contentRef:c,contentId:$k(),titleId:$k(),descriptionId:$k(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};uz.displayName=az;var dz=`DialogTrigger`,fz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(dz,n),a=vc(t,i.triggerRef);return(0,T.jsx)(Ac.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Mz(i.open),...r,ref:a,onClick:hc(e.onClick,i.onOpenToggle)})});fz.displayName=dz;var pz=`DialogPortal`,[mz,hz]=oz(pz,{forceMount:void 0}),gz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=lz(pz,t);return(0,T.jsx)(mz,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,T.jsx)($c,{present:n||a.open,children:(0,T.jsx)(Zc,{asChild:!0,container:i,children:e})}))})};gz.displayName=pz;var _z=`DialogOverlay`,vz=v.forwardRef((e,t)=>{let n=hz(_z,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lz(_z,e.__scopeDialog);return a.modal?(0,T.jsx)($c,{present:r||a.open,children:(0,T.jsx)(bz,{...i,ref:t})}):null});vz.displayName=_z;var yz=Sc(`DialogOverlay.RemoveScroll`),bz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(_z,n);return(0,T.jsx)(nP,{as:yz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,T.jsx)(Ac.div,{"data-state":Mz(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),xz=`DialogContent`,Sz=v.forwardRef((e,t)=>{let n=hz(xz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lz(xz,e.__scopeDialog);return(0,T.jsx)($c,{present:r||a.open,children:a.modal?(0,T.jsx)(Cz,{...i,ref:t}):(0,T.jsx)(wz,{...i,ref:t})})});Sz.displayName=xz;var Cz=v.forwardRef((e,t)=>{let n=lz(xz,e.__scopeDialog),r=v.useRef(null),i=vc(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return qM(e)},[]),(0,T.jsx)(Tz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:hc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:hc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:hc(e.onFocusOutside,e=>e.preventDefault())})}),wz=v.forwardRef((e,t)=>{let n=lz(xz,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,T.jsx)(Tz,{...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()}})}),Tz=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=lz(xz,n),c=v.useRef(null),l=vc(t,c);return Nk(),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(zk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,T.jsx)(Bc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Mz(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Iz,{titleId:s.titleId}),(0,T.jsx)(Rz,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Ez=`DialogTitle`,Dz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Ez,n);return(0,T.jsx)(Ac.h2,{id:i.titleId,...r,ref:t})});Dz.displayName=Ez;var Oz=`DialogDescription`,kz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Oz,n);return(0,T.jsx)(Ac.p,{id:i.descriptionId,...r,ref:t})});kz.displayName=Oz;var Az=`DialogClose`,jz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Az,n);return(0,T.jsx)(Ac.button,{type:`button`,...r,ref:t,onClick:hc(e.onClick,()=>i.onOpenChange(!1))})});jz.displayName=Az;function Mz(e){return e?`open`:`closed`}var Nz=`DialogTitleWarning`,[Pz,Fz]=yc(Nz,{contentName:xz,titleName:Ez,docsSlug:`dialog`}),Iz=({titleId:e})=>{let t=Fz(Nz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
159
+ `)?e.slice(0,-1):e,h=s||c||d;return(0,T.jsx)(Dk,{packageManager:s,codeFormat:c,contentDeclarationFormat:d,children:(0,T.jsxs)(tS,{className:l(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,T.jsx)(`span`,{className:`truncate`,children:o??t}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,T.jsx)(QF,{}),c&&(0,T.jsx)(VF,{}),d&&(0,T.jsx)(HF,{})]})]}),(0,T.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`,h&&`h-11`),children:(0,T.jsx)(ZF,{code:m})})})]}),(0,T.jsx)(Ek,{minHeight:$F,isRollable:f,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:(0,T.jsx)(u,{lang:t,isDarkMode:n,children:m})})]})})},tI=(0,v.createContext)({tabsValues:{},setTabsValues:()=>{}}),nI=()=>(0,v.useContext)(tI),rI=e=>{let t=(0,b.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,v.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,T.jsx)(tI,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},iI=e=>{let t=(0,b.c)(38),{enable:n,onSwipeLeft:r,onSwipeRight:i,itemIndex:a,itemCount:o,thresholdPct:s,touchAction:c,disableWhenSelectingText:l}=e,u=n===void 0?!0:n,d=s===void 0?20:s,f=c===void 0?`pan-y`:c,p=l===void 0?!0:l,m=(0,v.useRef)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(0),x;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1},t[0]=x):x=t[0];let S=(0,v.useRef)(x),C=(0,v.useRef)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{let e=m.current;return e?e.clientWidth:0},t[1]=w):w=t[1];let T=w,E;t[2]!==o||t[3]!==a?(E=e=>{let t=a<=0,n=a>=o-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},t[2]=o,t[3]=a,t[4]=E):E=t[4];let D=E,O;t[5]===u?O=t[6]:(O=e=>{u&&S.current.pointerId===null&&(S.current.pointerId=e.pointerId,S.current.startX=e.clientX,S.current.startY=e.clientY,S.current.lastX=e.clientX,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current=!1,g(!1),y(0))},t[5]=u,t[6]=O);let k=O,A;t[7]!==D||t[8]!==p||t[9]!==u||t[10]!==h?(A=e=>{if(!u||S.current.pointerId!==e.pointerId)return;let t=T();if(!t)return;let n=e.clientX-S.current.startX,r=e.clientY-S.current.startY;if(p){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){C.current=!0;return}}if(!S.current.axisLocked){let e=Math.abs(n),t=Math.abs(r);(e>6||t>6)&&(S.current.axisLocked=!0,S.current.isHorizontal=e>t)}if(S.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),h||g(!0),y(D(n/t*100)),S.current.lastX=e.clientX}},t[7]=D,t[8]=p,t[9]=u,t[10]=h,t[11]=A):A=t[11];let j=A,M;t[12]!==_||t[13]!==r||t[14]!==i||t[15]!==d?(M=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=S.current.isHorizontal,n=_;if(g(!1),y(0),S.current.pointerId=null,S.current.axisLocked=!1,S.current.isHorizontal=!1,C.current){C.current=!1;return}t&&(n>d?i?.():n<-d&&r?.())},t[12]=_,t[13]=r,t[14]=i,t[15]=d,t[16]=M):M=t[16];let N=M,P;t[17]!==u||t[18]!==N?(P=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[17]=u,t[18]=N,t[19]=P):P=t[19];let F=P,I;t[20]!==u||t[21]!==N?(I=e=>{u&&S.current.pointerId===e.pointerId&&N(e)},t[20]=u,t[21]=N,t[22]=I):I=t[22];let L=I,R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{y(0),g(!1)},t[23]=R):R=t[23];let ee;t[24]===a?ee=t[25]:(ee=[a],t[24]=a,t[25]=ee),(0,v.useEffect)(R,ee);let te;t[26]===f?te=t[27]:(te={touchAction:f},t[26]=f,t[27]=te);let ne;t[28]!==L||t[29]!==k||t[30]!==j||t[31]!==F||t[32]!==te?(ne={ref:m,onPointerDown:k,onPointerMove:j,onPointerUp:F,onPointerCancel:L,style:te},t[28]=L,t[29]=k,t[30]=j,t[31]=F,t[32]=te,t[33]=ne):ne=t[33];let z;return t[34]!==_||t[35]!==h||t[36]!==ne?(z={containerRef:m,isDragging:h,dragDeltaPct:_,containerProps:ne},t[34]=_,t[35]=h,t[36]=ne,t[37]=z):z=t[37],z},aI=ou(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),oI=ou(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,destructive:`bg-destructive/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),sI=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,v.useRef)([]),c=(0,v.useRef)(null),{choiceIndicatorPosition:u,calculatePosition:d}=fS(s,{isHoverable:i,orientation:a});return(0,v.useEffect)(()=>{d()},[t]),(0,T.jsxs)(`div`,{className:l(aI({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,v.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),u&&(0,T.jsx)(`div`,{className:l(oI({color:r,orientation:a})),style:u,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},cI=(0,v.createContext)(void 0),lI=ou(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),uI=({children:e,...t})=>(0,T.jsx)(`div`,{...t,children:e});uI.displayName=`TabItem`;var dI=Object.assign(e=>{let t=(0,b.c)(5),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...u}=e,d=v.Children.toArray(a).filter(fI),f=d[0]?.props?.value,{tabsValues:p,setTabsValues:m}=nI(),[h,g]=(0,v.useState)(n??f??``),_=(r&&typeof p==`object`?p?.[r]:h)??n??f,y;t[0]===_?y=t[1]:(y=e=>e.props.value===_,t[0]=_,t[1]=y);let x=d.findIndex(y),S=d.length,{containerProps:C,dragDeltaPct:w,isDragging:E}=iI({itemIndex:x,itemCount:S,onSwipeLeft:()=>{let e=d[Math.min(S-1,x+1)]?.props?.value;e&&D(e)},onSwipeRight:()=>{let e=d[Math.max(0,x-1)]?.props?.value;e&&D(e)}}),D=e=>{g(e),typeof m==`function`&&m(t=>({...t,[r]:e}))},O={activeTab:h??f??``,setActiveTab:D},k;return t[2]!==x||t[3]!==c?(k=(e,t)=>{let{props:n}=e,{value:r,children:i,className:a}=n,o=t===x;return(0,T.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${r}`,id:`tabpanel-${r}`,"aria-hidden":!o,tabIndex:o?0:-1,"data-active":o,className:l(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!o&&`pointer-events-none opacity-0`,a),children:(0,T.jsx)(`div`,{className:l(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:i})},r)},t[2]=x,t[3]=c,t[4]=k):k=t[4],(0,T.jsx)(cI.Provider,{value:O,children:(0,T.jsxs)(`div`,{className:l(lI({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...u,children:[(0,T.jsx)(`div`,{className:l(`flex shrink-0 gap-3 p-3`,s),children:(0,T.jsx)(sI,{selectedChoice:_,tabs:d.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=_===n;return(0,T.jsx)(`button`,{className:l(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&D(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:`text`})}),(0,T.jsx)(`div`,{className:l(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...C,children:(0,T.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:l(`grid w-full min-w-0`,c&&`h-full`,E?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${d.length}, 100%)`,transform:`translateX(-${x*100-(E?w:0)}%)`},children:d.map(k)})})]})})},{Item:uI});function fI(e){return(0,v.isValidElement)(e)&&e.type===uI}var pI=e=>{let t=(0,b.c)(3),[n,r]=(0,v.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,v.useEffect)(i,a),n},mI=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},hI=[],gI=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(mI.subscribe,mI.getSnapshot,_I),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:mI.addBlockage,removeBlockage:mI.removeBlockage,isElementScrollBlocked:mI.isElementScrollBlocked},e[0]=t,e[1]=n),n};function _I(){return hI}var vI=e=>{let t=(0,b.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=gI(),d=pI(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,v.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},yI=ou(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),bI={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},xI=Jx.create(tS),SI=e=>{let t=(0,b.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:u,isScrollable:d,disableScroll:f,padding:p,...m}=e,h=o===void 0?!1:o,g=c===void 0?`md`:c,_=d===void 0?!1:d,y=f===void 0?!0:f,x=p===void 0?`none`:p,S=pI(i),C=r&&y,w;t[0]===C?w=t[1]:(w={key:`modal`,disableScroll:C},t[0]=C,t[1]=w),vI(w);let E,D;if(t[2]!==r||t[3]!==a?(E=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},D=[r,a],t[2]=r,t[3]=a,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,v.useEffect)(E,D),!S){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[6]=e):e=t[6],e}let O=!!s,k=bI[x||`none`],A;return t[7]===a?A=t[8]:(A=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=A),(0,kc.createPortal)((0,T.jsx)(Jx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:A,"aria-hidden":!r,children:(0,T.jsxs)(xI,{onClick:CI,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:yI({size:g,className:u}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...m,children:[(0,T.jsxs)(`div`,{className:l(`relative flex-none px-4 pt-4`,h&&O?`flex items-start`:h?`flex justify-end`:O?`items-center`:`hidden`),children:[O&&(0,T.jsx)(_k,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),h&&(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Wu,size:`icon-md`})]}),(0,T.jsx)(`div`,{className:l(`flex min-h-0 w-full flex-1 flex-col`,_===!0&&`overflow-auto`,_===`y`&&`overflow-y-auto overflow-x-hidden`,_===`x`&&`overflow-x-auto overflow-y-hidden`,!_&&`overflow-visible`),children:(0,T.jsx)(`div`,{className:l(`flex h-full w-full flex-1 flex-col`,k),children:n})})]})}),S)};function CI(e){return e.stopPropagation()}var wI={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},TI=e=>{let t=(0,b.c)(6),{setIsModalOpen:n}=e,{modal:r}=xr(wI),i;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),i=(0,T.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,T.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,T.jsxs)(JF,{identifier:`expand`,children:[(0,T.jsx)(oS,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:Nu}),(0,T.jsxs)(JF.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,T.jsx)(`strong`,{children:r.title}),(0,T.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=i}else i=t[3];return i},EI=(0,v.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,T.jsx)(`table`,{ref:r,className:l(`w-full table-auto overflow-hidden text-left`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),DI=.55,OI=5,kI=30,AI=(e,t,n)=>{let r=(0,b.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(kI,Math.max(OI,(n[t]??0)*DI));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${kI}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,v.useEffect)(i,n)},jI=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,v.useState)(!1),[c,u]=(0,v.useState)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);AI(d,f,[a.children,o]),(0,v.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,v.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,T.jsxs)(`div`,{className:`group relative`,children:[n&&(0,T.jsx)(TI,{setIsModalOpen:s}),(0,T.jsx)(Ek,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,T.jsx)(EI,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,T.jsx)(SI,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,T.jsx)(`div`,{className:`grid`,children:(0,T.jsx)(EI,{ref:f,className:l(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,T.jsx)(T.Fragment,{})})]})},MI=e=>(0,T.jsx)(hk,{isClickable:!0,className:`text-text`,...e}),NI=e=>(0,T.jsx)(gk,{isClickable:!0,className:`mt-16 text-text`,...e}),PI=e=>(0,T.jsx)(_k,{isClickable:!0,className:`mt-5 text-text`,...e}),FI=e=>(0,T.jsx)(vk,{isClickable:!0,className:`mt-3 text-text`,...e}),II=e=>(0,T.jsx)(yk,{isClickable:!0,className:`mt-3 text-text`,...e}),LI=e=>(0,T.jsx)(bk,{isClickable:!0,className:`mt-3 text-text`,...e}),RI=e=>(0,T.jsx)(`strong`,{className:`text-text`,...e}),zI=(0,v.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,T.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,T.jsx)(eI,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),BI=e=>function(t){return(0,T.jsx)(zI,{...t,isDarkMode:e})},VI=({className:e,...t})=>(0,T.jsx)(`blockquote`,{className:l(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),HI=({className:e,...t})=>(0,T.jsx)(`ul`,{className:l(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),UI=({className:e,...t})=>(0,T.jsx)(`ol`,{className:l(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),WI=({className:e,alt:t,src:n,...r})=>(0,T.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:l(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),GI=e=>t=>(0,T.jsx)(nk,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),KI={h1:MI,h2:NI,h3:PI,h4:FI,h5:II,h6:LI,strong:RI,blockquote:VI,ul:HI,ol:UI,img:WI,pre:e=>(0,T.jsx)(T.Fragment,{children:e.children}),table:e=>(0,T.jsx)(jI,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,T.jsx)(`th`,{className:l(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,T.jsx)(`tr`,{className:l(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,T.jsx)(`td`,{className:l(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,T.jsx)(`hr`,{className:l(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,T.jsx)(dI,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:dI.Item,Columns:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`flex-1`,e),...t}),iframe:e=>(0,T.jsx)(tS,{roundedSize:`2xl`,border:!0,background:`none`,borderColor:`neutral`,className:`overflow-hidden`,children:(0,T.jsx)(`iframe`,{...e})})},qI=(e,t)=>({...KI,code:BI(e),a:GI(t)}),JI=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,T.jsx)(Ck,{children:(0,T.jsx)(rI,{children:Tr(e,{components:{...qI(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),YI=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}},XI=e=>{let t=(0,b.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=YI(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,T.jsxs)(`div`,{className:`flex gap-1`,children:[(0,T.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,T.jsx)(J.Trigger,{className:`w-20`,children:(0,T.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`<`,children:`<`}),(0,T.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,T.jsx)(J.Item,{value:`=`,children:`=`}),(0,T.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,T.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,T.jsx)(Zw,{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},ZI=e=>{let t=(0,b.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=Bw(),s=Rw(),{mutate:c,isPending:l}=OO(),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,T.jsx)(JO,{variant:`default`,onContentChange:u,additionalButtons:(0,T.jsx)(oS,{Icon:Uu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},QI=e=>{let t=(0,b.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=Bw(),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,T.jsx)(CT,{variant:`default`,onContentChange:o,...i})},$I=[{content:`False`,value:!1},{content:`True`,value:!0}],eL=e=>{let t=(0,b.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=Bw(),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,T.jsx)(yS,{choices:$I,value:!0,onChange:o,color:`text`,size:`sm`,...i})},tL=e=>{let t=(0,b.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=Sr(),{selectedLocales:c,availableLocales:l}=xT(),u=n[k],d;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==n||t[7]!==u||t[8]!==c){let e=Object.keys(u),f=l.length>c.length?c:[...new Set([...l,...e])],p=n[k],m;t[10]!==p||t[11]!==s||t[12]!==i||t[13]!==r||t[14]!==o||t[15]!==a?(m=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:dr(e,o)})}),(0,T.jsx)(`tr`,{className:`flex`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:p[e]??pw(p[s]),keyPath:[...r,{type:k,key:e}],dictionary:i,renderSection:a})})})]},t)},t[10]=p,t[11]=s,t[12]=i,t[13]=r,t[14]=o,t[15]=a,t[16]=m):m=t[16],d=(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:f.map(m)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=n,t[7]=u,t[8]=c,t[9]=d}else d=t[9];return d},nL=e=>{let t=(0,b.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=Bw(),{addNewEnumeration:s,removeEnumeration:c}=xr(vT),l=n[A],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,pw(l[d])??``,[...r,{type:A,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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[A]).map(e=>{let t=[...r,{type:A,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(`div`,{className:`flex flex-1`,children:(0,T.jsx)(oS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Hu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,T.jsx)(`tr`,{className:`w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(XI,{value:e,onChange:t=>{let a=n[A],s=ZO(a,e,t),c={...n,[A]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:l[e]??pw(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,T.jsx)(oS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Ru,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},rL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[j];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:i[e]??pw(i.true),keyPath:[...t,{type:j,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},iL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[B];return(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:i[e]??pw(i.male),keyPath:[...t,{type:B,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},aL=e=>{let t=(0,b.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=Bw(),{addNewElement:s,removeElement:c}=xr(vT),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,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,T.jsx)(oS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:F,key:t}];o(i.localId,void 0,e)},Icon:Hu,children:c.text})]})})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(pL,{section:e??pw(n[0]),keyPath:[...r,{type:F,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:F,key:n.length}];o(i.localId,pw(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,T.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,T.jsx)(oS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Ru,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},oL=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(`table`,{className:`w-full`,children:(0,T.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:P,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??pw(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,T.jsx)(`tr`,{className:`block w-full`,children:(0,T.jsx)(`td`,{className:`flex w-full`,children:(0,T.jsx)(fL,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),sL=e=>{let t=(0,b.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:ee}],l=n[ee];s=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(yS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(pL,{section:l,keyPath:c,dictionary:i,renderSection:a===1?mL:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},cL=e=>{let t=(0,b.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,v.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n[R],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,T.jsx)(JI,{isDarkMode:a,children:e}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsx)(yS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,T.jsx)(pL,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},lL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:M}],i=e[M];return(0,T.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,T.jsx)(pL,{section:i,keyPath:r,...n})})},uL=({section:e,keyPath:t,...n})=>{let r=[...t,{type:N}],i=e[N],{content:a}=e;return(0,T.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,T.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,T.jsx)(pL,{section:a,keyPath:r,...n})]})},dL=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=Bw(),s=i[I],c=[...t,{type:I}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,T.jsx)(QO,{children:`Dictionary key`}),(0,T.jsx)(CT,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,T.jsx)(QO,{children:`Path (optional)`}),(0,T.jsx)(CT,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},fL=e=>{let t=(0,b.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=xr(vT),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=_w(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,T.jsx)(`span`,{children:`(React Node)`}),(0,T.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,T.jsx)(dL,{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,T.jsx)(tL,{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,T.jsx)(nL,{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,T.jsx)(rL,{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===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,T.jsx)(iL,{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===`insertion`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,T.jsx)(lL,{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===`markdown`){let e;t[40]!==i||t[41]!==o||t[42]!==r||t[43]!==n?(e=(0,T.jsx)(cL,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[40]=i,t[41]=o,t[42]=r,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`html`){let e;t[45]!==i||t[46]!==r||t[47]!==n?(e=(0,T.jsx)(sL,{dictionary:i,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=n,t[48]=e):e=t[48],l=e;break bb0}if(e===`file`){let e;t[49]!==i||t[50]!==r||t[51]!==a||t[52]!==n?(e=(0,T.jsx)(uL,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[49]=i,t[50]=r,t[51]=a,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`array`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,T.jsx)(aL,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`object`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,T.jsx)(oL,{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===`number`){let e;t[64]!==i||t[65]!==r||t[66]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)(QI,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[64]=i,t[65]=r,t[66]=n,t[67]=e):e=t[67],l=e;break bb0}if(e===`text`){let e;t[68]!==i||t[69]!==r||t[70]!==a||t[71]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,T.jsx)(ZI,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[68]=i,t[69]=r,t[70]=a,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`boolean`){let e;t[73]!==i||t[74]!==r||t[75]!==n?(e=(0,T.jsx)(`div`,{className:`w-full p-2`,children:(0,T.jsx)(eL,{dictionary:i,keyPath:r,value:n})}),t[73]=i,t[74]=r,t[75]=n,t[76]=e):e=t[76],l=e;break bb0}c=(0,T.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},pL=e=>(0,T.jsx)(tS,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,T.jsx)(fL,{...e})});function mL(e){return(0,T.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}var hL={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},gL=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,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]||``,_L=ou(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),vL=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ce(hL).linkLabel;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(nk,{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:`sm`,children:(0,T.jsx)(`span`,{itemProp:`name`,children:n})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},yL=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=xr(hL);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(oS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,T.jsx)(`span`,{itemProp:`name`,children:t})}),(0,T.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},bL=({children:e,position:t,className:n,...r})=>(0,T.jsxs)(`span`,{itemProp:`item`,className:l(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,T.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,T.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),xL=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,T.jsx)(Su,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:u,spacing:d,...f})=>{let p=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,T.jsx)(`nav`,{"aria-label":o,children:(0,T.jsx)(`ol`,{className:l(_L({size:u,spacing:d}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...f,children:p.map((e,t)=>{let o=t===p.length-1,c=typeof e==`object`&&typeof e.href==`string`,u=typeof e==`object`&&typeof e.onClick==`function`,d=t===p.length-1,f=d?i:void 0,m=e===`...`,h=e.text??e,g=gL(n);if(m)return(0,T.jsxs)(v.Fragment,{children:[(0,T.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,T.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},`truncated-${h}`);let _=(0,T.jsx)(bL,{position:t+1,"aria-current":f,className:l(`transition-colors duration-200`,d&&`text-neutral-900`),children:h},h);c?_=(0,T.jsx)(vL,{href:e.href,color:n,position:t+1,locale:r,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h):u&&(_=(0,T.jsx)(yL,{onClick:e.onClick,color:n,position:t+1,"aria-current":f,className:l(d&&`cursor-default text-neutral-900`),children:h},h));let y=(0,v.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return o?y:(0,T.jsxs)(v.Fragment,{children:[y,(0,T.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,T.jsx)(`span`,{className:l(g),children:a})})]},h)})})})},SL=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,T.jsx)(xL,{links:[...a?[{text:_r(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),CL={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},wL=({children:e,className:t,identifier:n,...r})=>(0,T.jsx)(`div`,{className:l(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});wL.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,T.jsx)(oS,{className:l([`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}),wL.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,...c})=>(0,T.jsx)(`div`,{className:l(`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,T.jsx)(sS,{isHidden:t,className:l(`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,children:e})});function TL(e){return Array.isArray?Array.isArray(e):FL(e)===`[object Array]`}function EL(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 DL(e){return e==null?``:EL(e)}function OL(e){return typeof e==`string`}function kL(e){return typeof e==`number`}function AL(e){return e===!0||e===!1||ML(e)&&FL(e)==`[object Boolean]`}function jL(e){return typeof e==`object`}function ML(e){return jL(e)&&e!==null}function NL(e){return e!=null}function PL(e){return!e.trim().length}function FL(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var IL=`Incorrect 'index' type`,LL=e=>`Invalid value for key ${e}`,RL=e=>`Pattern length exceeds max of ${e}.`,zL=e=>`Missing ${e} property in key`,BL=e=>`Property 'weight' in key '${e}' must be a positive integer`,VL=Object.prototype.hasOwnProperty,HL=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=UL(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 UL(e){let t=null,n=null,r=null,i=1,a=null;if(OL(e)||TL(e))r=e,t=WL(e),n=GL(e);else{if(!VL.call(e,`name`))throw Error(zL(`name`));let o=e.name;if(r=o,VL.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(BL(o));t=WL(o),n=GL(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function WL(e){return TL(e)?e:e.split(`.`)}function GL(e){return TL(e)?e.join(`.`):e}function KL(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(NL(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!NL(s))return;if(a===t.length-1&&(OL(s)||kL(s)||AL(s)||typeof s==`bigint`))n.push(o===void 0?DL(s):{v:DL(s),i:o});else if(TL(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,OL(t)?t.split(`.`):t,0),r?n:n[0]}var qL={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},JL={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},YL={location:0,threshold:.6,distance:100},XL={useExtendedSearch:!1,useTokenSearch:!1,getFn:KL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...JL,...qL,...YL,...XL}),ZL=/[^ ]+/g;function QL(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(ZL).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var $L=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=QL(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(){this.isCreated||!this.docs.length||(this.isCreated=!0,OL(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();OL(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!NL(e)||PL(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(NL(i)){if(TL(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(NL(n)){if(OL(n)){if(!PL(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(NL(n.v)){let t=OL(n.v)?n.v:DL(n.v);if(!PL(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(OL(i)&&!PL(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function eR(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new $L({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(UL)),i.setSources(t),i.create(),i}function tR(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new $L({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function nR(e=[],t=Y.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}var rR=32;function iR(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>rR)throw Error(RL(rR));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=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=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(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=nR(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function aR(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 oR(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 sR={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},cR=RegExp(`[`+Object.keys(sR).join(``)+`]`,`g`),lR=String.prototype.normalize?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(cR,e=>sR[e]):e=>e,uR=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.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?lR(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:aR(e),startIndex:t})},d=this.pattern.length;if(d>rR){let e=0,t=d%rR,n=d-t;for(;e<n;)u(this.pattern.substr(e,rR),e),e+=rR;if(t){let e=d-rR;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?lR(e):e,this.pattern===e){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}=iR(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=oR(u)),p}},dR=class{constructor(e){this.pattern=e}static isMultiMatch(e){return fR(e,this.multiRegex)}static isSingleMatch(e){return fR(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function fR(e,t){let n=e.match(t);return n?n[1]:null}var pR=class extends dR{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},mR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},hR=class extends dR{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},gR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},_R=class extends dR{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},vR=class extends dR{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},yR=class extends dR{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){super(e),this._bitapSearch=new uR(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},bR=class extends dR{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},xR=[pR,bR,hR,gR,vR,_R,mR,yR],SR=xR.length,CR=`\0`,wR=`|`;function TR(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 ER(e,t={}){return e.replace(/\\\|/g,CR).split(wR).map(e=>{let n=TR(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<SR;){let e=xR[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<SR;){let e=xR[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var DR=new Set([yR.type,bR.type]),OR=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.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?lR(e):e,this.pattern=e,this.query=ER(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?lR(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;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(DR.has(e)?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=oR(o)),e}}return{isMatch:!1,score:1}}},kR=[];function AR(...e){kR.push(...e)}function jR(e,t){for(let n=0,r=kR.length;n<r;n+=1){let r=kR[n];if(r.condition(e,t))return new r(e,t)}return new uR(e,t)}var MR={AND:`$and`,OR:`$or`},NR={PATH:`$path`,PATTERN:`$val`},PR=e=>!!(e[MR.AND]||e[MR.OR]),FR=e=>!!e[NR.PATH],IR=e=>!TL(e)&&jL(e)&&!PR(e),LR=e=>({[MR.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function RR(e,t,{auto:n=!0}={}){let r=e=>{if(OL(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=jR(e,t)),r}let i=Object.keys(e),a=FR(e);if(!a&&i.length>1&&!PR(e))return r(LR(e));if(IR(e)){let r=a?e[NR.PATH]:i[0],o=a?e[NR.PATTERN]:e[r];if(!OL(o))throw Error(LL(r));let s={keyId:GL(r),pattern:o};return n&&(s.searcher=jR(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];TL(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return PR(e)||(e=LR(e)),r(e)}function zR(e,{ignoreFieldNorm:t=Y.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 BR(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=zR(e.matches,{ignoreFieldNorm:t})})}var VR=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)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&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function HR(e,t){let n=e.matches;t.matches=[],NL(n)&&n.forEach(e=>{if(!NL(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function UR(e,t){t.score=e.score}function WR(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(HR),r&&i.push(UR),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var GR=/\b\w+\b/g;function KR({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=lR(n)),n.match(GR)||[]}}}function qR(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function JR(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function YR(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var XR=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new HL(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=jR(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 $L))throw Error(IL);if(this._myIndex=t||eR(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=KR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=qR(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(NL(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=KR({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});JR(this._invertedIndex,e,this._myIndex.keys.length,t)}}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){if(this._invertedIndex)for(let e of n)YR(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&YR(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(OL(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return kL(n)&&n>-1&&(e=e.slice(0,n)),e}let c=kL(n)&&n>0&&OL(e),l;if(c){let t=new VR(n);OL(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=OL(e)?OL(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),BR(l,{ignoreFieldNorm:s}),a&&l.sort(o),kL(n)&&n>-1&&(l=l.slice(0,n));return WR(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!NL(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=zR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=RR(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===MR.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(NL(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!NL(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=zR(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!NL(t))return[];let r=[];if(TL(t))t.forEach(({v:t,i,n:a})=>{if(!NL(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},ZR=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=KR({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});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 uR(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)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=oR(t)),o}};XR.version=`7.3.0`,XR.createIndex=eR,XR.parseIndex=tR,XR.config=Y,XR.match=function(e,t,n){return jR(e,{...Y,...n}).searchIn(t)},XR.parseQuery=RR,AR(OR),AR(ZR),XR.use=function(...e){e.forEach(e=>AR(e))};var QR=`locale-switcher-content`,$R=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=xr(CL),s=(0,v.useRef)(null),{locale:c}=Sr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=xT(),f=(0,v.useMemo)(()=>l.map(e=>({locale:e,englishName:dr(e,`en`),currentLocaleName:dr(e,c),ownLocaleName:dr(e)})),[l,c]),[p,m]=(0,v.useState)(``),[h,g]=yT(`locale-content-selector-see-all-locales`,!1),_=(0,v.useMemo)(()=>new XR(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),y=(0,v.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),b=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},x=e=>{g(e),d(e?l:[c])};return(0,T.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,T.jsxs)(wL,{identifier:QR,children:[(0,T.jsx)(wL.Trigger,{identifier:QR,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,T.jsx)(`div`,{className:`px-2 py-1`,children:(0,T.jsx)(ju,{size:16})}),(0,T.jsx)(Fu,{className:`self-center`,size:16})]})}),(0,T.jsx)(wL.Panel,{identifier:QR,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,T.jsxs)(tS,{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,T.jsx)(`div`,{className:`m-auto p-2`,children:(0,T.jsx)(yS,{defaultValue:h,onChange:x,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`div`,{className:`p-3`,children:(0,T.jsx)(Zw,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,T.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:y.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,T.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,T.jsx)(oS,{onClick:()=>b(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,T.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,T.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,T.jsx)(yu,{className:`size-full`})}),(0,T.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,T.jsx)(`span`,{dir:or(e),lang:e,children:i}),(0,T.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,T.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},ez=e=>{let t=mw(e),n=_w(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?ez(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},tz=e=>{let t=(0,b.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=x,o=dw(n,r,Nw()),{addEditedContent:s}=zw(),{setFocusedContentKeyPath:c,focusedContent:l}=Fw(),{addNewElement:u,goToField:d}=xr(vT),f=_w(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&pr(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=ez(o);if(!o)return(0,T.jsx)(T.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,T.jsx)(oS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:Su,children:_r(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,T.jsx)(T.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,T.jsx)(tz,{keyPath:[...r,{type:k,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`condition`)return(0,T.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,T.jsx)(tz,{keyPath:[...r,{type:f,key:e}],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:F,key:t}];return ez(e)?(0,T.jsxs)(oS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:Su,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,T.jsx)(cS,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(tz,{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,T.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,T.jsx)(oS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:F,key:o.length}],t=o,n=pw(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Ru,children:u.text})]})}return typeof o.nodeType==`string`?(0,T.jsx)(tz,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,T.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:P,key:e}];return ez(dw(n,t))?(0,T.jsx)(oS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:Su,children:_r(e)},e):(0,T.jsx)(cS,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:_r(e),children:(0,T.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,T.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,T.jsx)(tz,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,T.jsxs)(T.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},nz=e=>{let t=(0,b.c)(3),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=Bw(),{focusedContent:c,setFocusedContentKeyPath:l}=Fw(),u=c?.keyPath,d=s?.[o]?.content===void 0?i:s?.[o]?.content,f=Nw(),p=dw(d,u??[],f),m;t[0]===d?m=t[1]:(m=ez(d),t[0]=d,t[1]=m);let h=m,g=ez(p),_;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],t[2]=_):_=t[2],(0,v.useEffect)(()=>{p===void 0&&l(c?.keyPath?.slice(0,-1)??[])},_),(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,T.jsx)(SL,{dictionaryKey:a,keyPath:u??[],onClickKeyPath:l}),(0,T.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,T.jsx)($R,{})})]}),(0,T.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof d==`object`&&d&&!h&&Object.keys(d).length>0&&(0,T.jsx)(tS,{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:`xl`,transparency:`xs`,children:(0,T.jsx)(tz,{keyPath:[],section:d,dictionary:n})}),(g||(u??[]).length>0)&&(0,T.jsx)(pL,{keyPath:u??[],section:p,dictionary:n,isDarkMode:r})]})]})},rz=ou(`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`,destructive:`border-destructive bg-destructive text-destructive hover:bg-destructive-500`,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`}}),iz=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:u,tabIndex:d,"aria-label":f,...p})=>{let m=a?`button`:`span`,h=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},g=e=>{e.stopPropagation(),c?.()};return(0,T.jsxs)(m,{className:l(rz({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?h:void 0,role:u||(a?`button`:`status`),tabIndex:a?d??0:d,"aria-label":f||(a?`${i} button`:void 0),...p,children:[i,o&&(0,T.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:g,"aria-label":`Remove ${i} badge`,children:(0,T.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,T.jsx)(`title`,{children:`Remove badge`}),(0,T.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`})]})})]})},az=`Dialog`,[oz,sz]=bc(az),[cz,lz]=oz(az),uz=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]=il({prop:r,defaultProp:i??!1,onChange:a,caller:az});return(0,T.jsx)(cz,{scope:t,triggerRef:s,contentRef:c,contentId:$k(),titleId:$k(),descriptionId:$k(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};uz.displayName=az;var dz=`DialogTrigger`,fz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(dz,n),a=vc(t,i.triggerRef);return(0,T.jsx)(Ac.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Mz(i.open),...r,ref:a,onClick:hc(e.onClick,i.onOpenToggle)})});fz.displayName=dz;var pz=`DialogPortal`,[mz,hz]=oz(pz,{forceMount:void 0}),gz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=lz(pz,t);return(0,T.jsx)(mz,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,T.jsx)($c,{present:n||a.open,children:(0,T.jsx)(Zc,{asChild:!0,container:i,children:e})}))})};gz.displayName=pz;var _z=`DialogOverlay`,vz=v.forwardRef((e,t)=>{let n=hz(_z,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lz(_z,e.__scopeDialog);return a.modal?(0,T.jsx)($c,{present:r||a.open,children:(0,T.jsx)(bz,{...i,ref:t})}):null});vz.displayName=_z;var yz=Sc(`DialogOverlay.RemoveScroll`),bz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(_z,n);return(0,T.jsx)(nP,{as:yz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,T.jsx)(Ac.div,{"data-state":Mz(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),xz=`DialogContent`,Sz=v.forwardRef((e,t)=>{let n=hz(xz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=lz(xz,e.__scopeDialog);return(0,T.jsx)($c,{present:r||a.open,children:a.modal?(0,T.jsx)(Cz,{...i,ref:t}):(0,T.jsx)(wz,{...i,ref:t})})});Sz.displayName=xz;var Cz=v.forwardRef((e,t)=>{let n=lz(xz,e.__scopeDialog),r=v.useRef(null),i=vc(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return qM(e)},[]),(0,T.jsx)(Tz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:hc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:hc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:hc(e.onFocusOutside,e=>e.preventDefault())})}),wz=v.forwardRef((e,t)=>{let n=lz(xz,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,T.jsx)(Tz,{...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()}})}),Tz=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=lz(xz,n),c=v.useRef(null),l=vc(t,c);return Nk(),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(zk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,T.jsx)(Bc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Mz(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Iz,{titleId:s.titleId}),(0,T.jsx)(Rz,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Ez=`DialogTitle`,Dz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Ez,n);return(0,T.jsx)(Ac.h2,{id:i.titleId,...r,ref:t})});Dz.displayName=Ez;var Oz=`DialogDescription`,kz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Oz,n);return(0,T.jsx)(Ac.p,{id:i.descriptionId,...r,ref:t})});kz.displayName=Oz;var Az=`DialogClose`,jz=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=lz(Az,n);return(0,T.jsx)(Ac.button,{type:`button`,...r,ref:t,onClick:hc(e.onClick,()=>i.onOpenChange(!1))})});jz.displayName=Az;function Mz(e){return e?`open`:`closed`}var Nz=`DialogTitleWarning`,[Pz,Fz]=yc(Nz,{contentName:xz,titleName:Ez,docsSlug:`dialog`}),Iz=({titleId:e})=>{let t=Fz(Nz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
160
160
 
161
161
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
162
162
 
@@ -217,5 +217,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
217
217
  --nojs-bg: black !important;
218
218
  --nojs-fg: white !important;
219
219
  }
220
- }`,Kq=18,qq=40,Jq=`${qq}px`,Yq=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),Xq=e=>{let t=(0,b.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-Kq,f=c;document.querySelectorAll(Yq).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=qq)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,v.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let y;t[14]!==r||t[15]!==a||t[16]!==i?(y=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=y):y=t[17],(0,v.useEffect)(_,y);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Jq},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},Zq=e=>{let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e}),t.current},Qq=(0,v.createContext)({}),$q=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:u,containerClassName:d,noScriptCSSFallback:f=Gq,render:p,children:m,...h})=>{let[g,_]=(0,v.useState)(typeof h.defaultValue==`string`?h.defaultValue:``),y=e??g,b=Zq(y),x=e=>{t?.(e),_(e)},S=r===void 0?null:typeof r==`string`?new RegExp(r):r,C=(0,v.useRef)(null),w=(0,v.useRef)(null),E=(0,v.useRef)({value:y,onChange:x,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),D=(0,v.useRef)({prev:[C.current?.selectionStart??null,C.current?.selectionEnd??null,C.current?.selectionDirection??`none`]});(0,v.useEffect)(()=>{let e=C.current,t=w.current;if(!e||!t)return;E.current.value!==e.value&&E.current.onChange(e.value),D.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){N(null),F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=D.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&C.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;L(t!==null&&n!==null?t===n?t:u:null),N(u),F(d),D.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&j(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Wq(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Wq(e.sheet,`[data-input-otp]:autofill { ${t} }`),Wq(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Wq(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Wq(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(null),[P,F]=(0,v.useState)(null),[I,L]=(0,v.useState)(null);(0,v.useEffect)(()=>{Uq(()=>{C.current?.dispatchEvent(new Event(`input`));let e=C.current?.selectionStart??null,t=C.current?.selectionEnd??null,n=C.current?.selectionDirection??`none`;e!==null&&t!==null&&(N(e),F(t),L(e),D.current.prev=[e,t,n])})},[y,A]),(0,v.useEffect)(()=>{b!==void 0&&y!==b&&b.length<n&&y.length===n&&o?.(y)},[n,o,b,y]);let R=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=A&&I!==null?I:null;e!==R.current&&(R.current=e,s?.(e))},[A,I,s]);let ee=Xq({containerRef:w,inputRef:C,pushPasswordManagerStrategy:c,isFocused:A}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&S&&!S.test(t)){e.preventDefault();return}typeof b==`string`&&t.length<b.length&&document.dispatchEvent(new Event(`selectionchange`)),x(t)},ne=()=>{if(C.current){let e=Math.min(C.current.value.length,n-1),t=C.current.value.length;C.current?.setSelectionRange(e,t),N(e),F(t)}j(!0)},z=e=>{let t=C.current;if(!u&&(!E.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=u?u(r):r;e.preventDefault();let a=C.current?.selectionStart,o=C.current?.selectionEnd,s=(a===o?y.slice(0,a??0)+i+y.slice(a??0):y.slice(0,a??0)+i+y.slice(o??0)).slice(0,n);if(!(s.length>0&&S&&!S.test(s))&&t){t.value=s,x(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),N(e),F(r)}},B={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},re=(0,T.jsx)(`input`,{autoComplete:h.autoComplete||`one-time-code`,...h,"data-input-otp":!0,"data-input-otp-placeholder-shown":y.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":P,inputMode:a,pattern:S?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:B,maxLength:n,value:y,ref:C,onPaste:e=>{z(e),h.onPaste?.(e)},onChange:te,onMouseOver:e=>{k(!0),h.onMouseOver?.(e)},onMouseLeave:e=>{k(!1),h.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=C.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&L(t)}}),h.onKeyDown?.(e)},onFocus:e=>{ne(),h.onFocus?.(e)},onBlur:e=>{j(!1),h.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=A&&M!==null&&P!==null&&(M===P&&t===M||t>=M&&t<P),r=y[t]===void 0?null:y[t];return{char:r,placeholderChar:y[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:A,isHovering:!h.disabled&&O,setSelection:e=>{let t=C.current;if(!t||h.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=y[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),N(a),F(o),j(!0)}},ae=p===void 0?(0,T.jsx)(Qq.Provider,{value:ie,children:m}):p(ie);return(0,T.jsxs)(T.Fragment,{children:[f!==null&&(0,T.jsx)(`noscript`,{children:(0,T.jsx)(`style`,{children:f})}),(0,T.jsxs)(`div`,{ref:w,className:l(`relative`,h.disabled?`cursor-default`:`cursor-text`,d),children:[ae,(0,T.jsx)(`div`,{className:`absolute inset-0`,children:re})]})]})},eJ=({className:e,render:t,...n})=>(0,T.jsx)($q,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:l(`disabled:cursor-not-allowed`,e),render:t,...n}),tJ=({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`z-10 flex items-center gap-3`,e),...t}),nJ=e=>{let t=(0,b.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,v.useContext)(Qq),{char:c,isActive:u}=s?.slots[n]??{},d;t[0]===s?d=t[1]:(d=s??{},t[0]=s,t[1]=d);let{setSelection:f}=d,p;t[2]!==n||t[3]!==i||t[4]!==f?(p=e=>{f?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=f,t[5]=p):p=t[5];let m=p,h;t[6]!==n||t[7]!==a||t[8]!==f?(h=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=f,t[9]=h):h=t[9];let g=h;return(0,T.jsx)(oS,{isSelected:u,variant:`input`,color:`custom`,tabIndex:-1,className:l(`relative z-10 px-2!`,u&&`ring-4!`,r),onClick:m,onKeyDown:g,label:null,...o,children:(0,T.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},rJ=e=>(0,T.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,T.jsx)(Mu,{})}),iJ=e=>(0,T.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),aJ=e=>e?.getAttribute(`aria-selected`)===`true`,oJ=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=kq(),f=(0,v.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=fS(f,{selector:aJ,isHoverable:!0});return(0,v.useEffect)(()=>{m()},[]),(0,T.jsx)(Pq,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,T.jsx)(eJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(tJ,{children:[(0,T.jsx)(nJ,{index:0,ref:e=>{f.current[0]=e}}),(0,T.jsx)(nJ,{index:1,ref:e=>{f.current[1]=e}}),(0,T.jsx)(nJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,T.jsx)(rJ,{}),(0,T.jsxs)(tJ,{children:[(0,T.jsx)(nJ,{index:3,ref:e=>{f.current[3]=e}}),(0,T.jsx)(nJ,{index:4,ref:e=>{f.current[4]=e}}),(0,T.jsx)(nJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,T.jsx)(iJ,{style:p})]})})})},sJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=ZV();return(0,T.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,T.jsx)(oJ,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},cJ=({className:e,...t})=>(0,T.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,T.jsx)(Vu,{className:`absolute left-2 size-4`}),(0,T.jsx)(Zw,{...t,type:`search`,className:l(`pl-8`,e)})]}),lJ=e=>(0,T.jsx)(Iq,{id:e.name,"data-testid":e.name,Element:cJ,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),uJ=e=>(0,T.jsx)(Iq,{Element:Qw,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),dJ=e=>(0,T.jsx)(Iq,{Element:tT,id:e.name,"data-testid":e.name,...e}),fJ=ou([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),pJ=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,T.jsx)(`input`,{type:`checkbox`,className:l(fJ({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),mJ=e=>{let{label:t,name:n,id:r}=e;return t?(0,T.jsxs)(`label`,{htmlFor:r??n,className:l(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,T.jsx)(pJ,{id:r??n,...e}),t]}):(0,T.jsx)(pJ,{id:r??n,...e})},hJ=({inputLabel:e,value:t,onChange:n,...r})=>(0,T.jsx)(mJ,{...r,label:e,checked:!!t,onChange:n}),gJ=({autoComplete:e,...t})=>(0,T.jsx)(Iq,{Element:hJ,id:t.name,"data-testid":t.name,autoComplete:e,...t}),_J=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(mV,{onValueChange:t.onChange,values:t.value,...l,children:c})})},vJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(_J,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},yJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},bJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(yJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},xJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(yS,{...t,...l,children:c})})},SJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(xJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},CJ=e=>{let t=(0,b.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=kq(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,T.jsx)(lB,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},wJ=e=>{let t=(0,b.c)(3),{formDescriptionId:n}=kq(),r;return t[0]!==n||t[1]!==e?(r=(0,T.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},TJ=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=kq(),a=r?String(r?.message??``):t;return a?(0,T.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=Cq;$.Description=wJ,$.Control=CJ,$.Field=Oq,$.Item=Tq,$.Label=Nq,$.Message=TJ,$.Element=Iq,$.Input=zq,$.InputPassword=Hq,$.Checkbox=gJ,$.TextArea=uJ,$.AutoSizedTextArea=dJ,$.Button=oS,$.Select=bJ,$.MultiSelect=vJ,$.EditableFieldInput=Lq,$.EditableFieldTextArea=Rq,$.SwitchSelector=SJ,$.OTP=sJ,$.SearchInput=lJ;var EJ=Z(`ZodISODateTime`,(e,t)=>{nG.init(e,t),QJ.init(e,t)});function DJ(e){return SK(EJ,e)}var OJ=Z(`ZodISODate`,(e,t)=>{rG.init(e,t),QJ.init(e,t)});function kJ(e){return CK(OJ,e)}var AJ=Z(`ZodISOTime`,(e,t)=>{iG.init(e,t),QJ.init(e,t)});function jJ(e){return wK(AJ,e)}var MJ=Z(`ZodISODuration`,(e,t)=>{aG.init(e,t),QJ.init(e,t)});function NJ(e){return TK(MJ,e)}var PJ=(e,t)=>{FU.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>RU(e,t)},flatten:{value:t=>LU(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,nU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,nU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,PJ);var FJ=Z(`ZodError`,PJ,{Parent:Error}),IJ=zU(FJ),LJ=VU(FJ),RJ=UU(FJ),zJ=GU(FJ),BJ=qU(FJ),VJ=JU(FJ),HJ=YU(FJ),UJ=XU(FJ),WJ=ZU(FJ),GJ=QU(FJ),KJ=$U(FJ),qJ=eW(FJ),JJ=Z(`ZodType`,(e,t)=>(HW.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:$K(e,`input`),output:$K(e,`output`)}}),e.toJSONSchema=QK(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(lU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>yU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>IJ(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>RJ(e,t,n),e.parseAsync=async(t,n)=>LJ(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>zJ(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>BJ(e,t,n),e.decode=(t,n)=>VJ(e,t,n),e.encodeAsync=async(t,n)=>HJ(e,t,n),e.decodeAsync=async(t,n)=>UJ(e,t,n),e.safeEncode=(t,n)=>WJ(e,t,n),e.safeDecode=(t,n)=>GJ(e,t,n),e.safeEncodeAsync=async(t,n)=>KJ(e,t,n),e.safeDecodeAsync=async(t,n)=>qJ(e,t,n),e.refine=(t,n)=>e.check($Y(t,n)),e.superRefine=t=>e.check(eX(t)),e.overwrite=t=>e.check(LK(t)),e.optional=()=>FY(e),e.exactOptional=()=>LY(e),e.nullable=()=>zY(e),e.nullish=()=>FY(zY(e)),e.nonoptional=t=>GY(e,t),e.array=()=>CY(e),e.or=t=>DY([e,t]),e.and=t=>kY(e,t),e.transform=t=>YY(e,NY(t)),e.default=t=>VY(e,t),e.prefault=t=>UY(e,t),e.catch=t=>qY(e,t),e.pipe=t=>YY(e,t),e.readonly=()=>ZY(e),e.describe=t=>{let n=e.clone();return QG.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return QG.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return QG.get(e);let n=e.clone();return QG.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),YJ=Z(`_ZodString`,(e,t)=>{UW.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(jK(...t)),e.includes=(...t)=>e.check(PK(...t)),e.startsWith=(...t)=>e.check(FK(...t)),e.endsWith=(...t)=>e.check(IK(...t)),e.min=(...t)=>e.check(kK(...t)),e.max=(...t)=>e.check(OK(...t)),e.length=(...t)=>e.check(AK(...t)),e.nonempty=(...t)=>e.check(kK(1,...t)),e.lowercase=t=>e.check(MK(t)),e.uppercase=t=>e.check(NK(t)),e.trim=()=>e.check(zK()),e.normalize=(...t)=>e.check(RK(...t)),e.toLowerCase=()=>e.check(BK()),e.toUpperCase=()=>e.check(VK()),e.slugify=()=>e.check(HK())}),XJ=Z(`ZodString`,(e,t)=>{UW.init(e,t),YJ.init(e,t),e.email=t=>e.check(eK($J,t)),e.url=t=>e.check(oK(nY,t)),e.jwt=t=>e.check(xK(_Y,t)),e.emoji=t=>e.check(sK(rY,t)),e.guid=t=>e.check(tK(eY,t)),e.uuid=t=>e.check(nK(tY,t)),e.uuidv4=t=>e.check(rK(tY,t)),e.uuidv6=t=>e.check(iK(tY,t)),e.uuidv7=t=>e.check(aK(tY,t)),e.nanoid=t=>e.check(cK(iY,t)),e.guid=t=>e.check(tK(eY,t)),e.cuid=t=>e.check(lK(aY,t)),e.cuid2=t=>e.check(uK(oY,t)),e.ulid=t=>e.check(dK(sY,t)),e.base64=t=>e.check(vK(mY,t)),e.base64url=t=>e.check(yK(hY,t)),e.xid=t=>e.check(fK(cY,t)),e.ksuid=t=>e.check(pK(lY,t)),e.ipv4=t=>e.check(mK(uY,t)),e.ipv6=t=>e.check(hK(dY,t)),e.cidrv4=t=>e.check(gK(fY,t)),e.cidrv6=t=>e.check(_K(pY,t)),e.e164=t=>e.check(bK(gY,t)),e.datetime=t=>e.check(DJ(t)),e.date=t=>e.check(kJ(t)),e.time=t=>e.check(jJ(t)),e.duration=t=>e.check(NJ(t))});function ZJ(e){return $G(XJ,e)}var QJ=Z(`ZodStringFormat`,(e,t)=>{WW.init(e,t),YJ.init(e,t)}),$J=Z(`ZodEmail`,(e,t)=>{qW.init(e,t),QJ.init(e,t)}),eY=Z(`ZodGUID`,(e,t)=>{GW.init(e,t),QJ.init(e,t)}),tY=Z(`ZodUUID`,(e,t)=>{KW.init(e,t),QJ.init(e,t)}),nY=Z(`ZodURL`,(e,t)=>{JW.init(e,t),QJ.init(e,t)}),rY=Z(`ZodEmoji`,(e,t)=>{YW.init(e,t),QJ.init(e,t)}),iY=Z(`ZodNanoID`,(e,t)=>{XW.init(e,t),QJ.init(e,t)}),aY=Z(`ZodCUID`,(e,t)=>{ZW.init(e,t),QJ.init(e,t)}),oY=Z(`ZodCUID2`,(e,t)=>{QW.init(e,t),QJ.init(e,t)}),sY=Z(`ZodULID`,(e,t)=>{$W.init(e,t),QJ.init(e,t)}),cY=Z(`ZodXID`,(e,t)=>{eG.init(e,t),QJ.init(e,t)}),lY=Z(`ZodKSUID`,(e,t)=>{tG.init(e,t),QJ.init(e,t)}),uY=Z(`ZodIPv4`,(e,t)=>{oG.init(e,t),QJ.init(e,t)}),dY=Z(`ZodIPv6`,(e,t)=>{sG.init(e,t),QJ.init(e,t)}),fY=Z(`ZodCIDRv4`,(e,t)=>{cG.init(e,t),QJ.init(e,t)}),pY=Z(`ZodCIDRv6`,(e,t)=>{lG.init(e,t),QJ.init(e,t)}),mY=Z(`ZodBase64`,(e,t)=>{dG.init(e,t),QJ.init(e,t)}),hY=Z(`ZodBase64URL`,(e,t)=>{pG.init(e,t),QJ.init(e,t)}),gY=Z(`ZodE164`,(e,t)=>{mG.init(e,t),QJ.init(e,t)}),_Y=Z(`ZodJWT`,(e,t)=>{gG.init(e,t),QJ.init(e,t)}),vY=Z(`ZodUnknown`,(e,t)=>{_G.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function yY(){return EK(vY)}var bY=Z(`ZodNever`,(e,t)=>{vG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nq(e,t,n,r)});function xY(e){return DK(bY,e)}var SY=Z(`ZodArray`,(e,t)=>{bG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(kK(t,n)),e.nonempty=t=>e.check(kK(1,t)),e.max=(t,n)=>e.check(OK(t,n)),e.length=(t,n)=>e.check(AK(t,n)),e.unwrap=()=>e.element});function CY(e,t){return UK(SY,e,t)}var wY=Z(`ZodObject`,(e,t)=>{TG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sq(e,t,n,r),sU(e,`shape`,()=>t.shape),e.keyof=()=>jY(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yY()}),e.loose=()=>e.clone({...e._zod.def,catchall:yY()}),e.strict=()=>e.clone({...e._zod.def,catchall:xY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>CU(e,t),e.safeExtend=t=>wU(e,t),e.merge=t=>TU(e,t),e.pick=t=>xU(e,t),e.omit=t=>SU(e,t),e.partial=(...t)=>EU(PY,e,t[0]),e.required=(...t)=>DU(WY,e,t[0])});function TY(e,t){return new wY({type:`object`,shape:e??{},...Q(t)})}var EY=Z(`ZodUnion`,(e,t)=>{DG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cq(e,t,n,r),e.options=t.options});function DY(e,t){return new EY({type:`union`,options:e,...Q(t)})}var OY=Z(`ZodIntersection`,(e,t)=>{OG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lq(e,t,n,r)});function kY(e,t){return new OY({type:`intersection`,left:e,right:t})}var AY=Z(`ZodEnum`,(e,t)=>{jG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rq(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new AY({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new AY({...t,checks:[],...Q(r),entries:i})}});function jY(e,t){return new AY({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var MY=Z(`ZodTransform`,(e,t)=>{MG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new QH(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(NU(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(NU(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function NY(e){return new MY({type:`transform`,transform:e})}var PY=Z(`ZodOptional`,(e,t)=>{PG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_q(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FY(e){return new PY({type:`optional`,innerType:e})}var IY=Z(`ZodExactOptional`,(e,t)=>{FG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_q(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LY(e){return new IY({type:`optional`,innerType:e})}var RY=Z(`ZodNullable`,(e,t)=>{IG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zY(e){return new RY({type:`nullable`,innerType:e})}var BY=Z(`ZodDefault`,(e,t)=>{LG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function VY(e,t){return new BY({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():gU(t)}})}var HY=Z(`ZodPrefault`,(e,t)=>{zG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function UY(e,t){return new HY({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():gU(t)}})}var WY=Z(`ZodNonOptional`,(e,t)=>{BG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GY(e,t){return new WY({type:`nonoptional`,innerType:e,...Q(t)})}var KY=Z(`ZodCatch`,(e,t)=>{HG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qY(e,t){return new KY({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var JY=Z(`ZodPipe`,(e,t)=>{UG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hq(e,t,n,r),e.in=t.in,e.out=t.out});function YY(e,t){return new JY({type:`pipe`,in:e,out:t})}var XY=Z(`ZodReadonly`,(e,t)=>{GG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ZY(e){return new XY({type:`readonly`,innerType:e})}var QY=Z(`ZodCustom`,(e,t)=>{qG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iq(e,t,n,r)});function $Y(e,t={}){return WK(QY,e,t)}function eX(e){return GK(e)}var tX={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},nX=e=>{let t=(0,b.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,u]=(0,v.useState)(!1),{setLocaleDictionary:d}=Mw(),{mutate:f,isPending:p}=vO(),{mutate:m,isPending:h}=CO(),{mutate:g,isPending:_}=_O(),y=h||_,{editedContent:x,restoreEditedContent:S}=Bw(),{deleteButton:C,resetButton:w,saveButton:E,publishButton:D,downloadButton:O,confirmation:k}=xr(tX),{isAuthenticated:A}=uO(),j=x?.[n.localId],M;t[0]!==n||t[1]!==j?(M=j&&JSON.stringify(j)!==JSON.stringify(n),t[0]=n,t[1]=j,t[2]=M):M=t[2];let N=M,P=n?.id!==void 0,F;t[3]!==n||t[4]!==x||t[5]!==o||t[6]!==S||t[7]!==d||t[8]!==m?(F=async()=>{x?.[n.localId]&&m({dictionary:{...n,...x?.[n.localId]}},{onSuccess:()=>{d(x?.[n.localId]),S(n.localId),u(!1),o?.()}})},t[3]=n,t[4]=x,t[5]=o,t[6]=S,t[7]=d,t[8]=m,t[9]=F):F=t[9];let I=F,L;t[10]!==n||t[11]!==x||t[12]!==o||t[13]!==g||t[14]!==S||t[15]!==d?(L=()=>{let e={...n,...x?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(d(e),S(n.localId),o?.())}})},t[10]=n,t[11]=x,t[12]=o,t[13]=g,t[14]=S,t[15]=d,t[16]=L):L=t[16];let R=L,ee;t[17]!==f||t[18]!==n||t[19]!==a?(ee=()=>{n.id&&f({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=f,t[18]=n,t[19]=a,t[20]=ee):ee=t[20];let te=ee,ne;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>u(!1),t[21]=ne):ne=t[21];let z;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>u(!1),t[22]=z):z=t[22],(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(SI,{isOpen:c,title:k.title.value,size:`md`,onClose:ne,padding:`md`,children:(0,T.jsxs)(`form`,{className:`size-full`,children:[(0,T.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:k.message}),(0,T.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,T.jsx)($.Button,{label:k.cancelButton.label.value,disabled:!N||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:z,children:k.cancelButton.text}),(0,T.jsx)($.Button,{label:k.confirmButton.label.value,disabled:!N||y,Icon:Bu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:I,children:k.confirmButton.text})]})]})}),(0,T.jsxs)(`form`,{className:l(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&P&&a&&A&&(0,T.jsx)($.Button,{label:C.label.value,Icon:Hu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:p,onClick:te,children:C.text}),N&&(0,T.jsx)($.Button,{label:w.label.value,disabled:!N,Icon:zu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>S(n.localId),children:w.text}),r.includes(`local`)&&(0,T.jsx)($.Button,{label:O.label.value,disabled:!N||y,Icon:Du,color:`text`,variant:A?`outline`:`default`,className:`max-md:w-full`,isLoading:h,onClick:()=>u(!0),children:O.text}),r.includes(`remote`)&&A&&!P&&(0,T.jsx)($.Button,{label:D.label.value,disabled:y,Icon:vu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:D.text}),r.includes(`remote`)&&A&&P&&N&&(0,T.jsx)($.Button,{label:E.label.value,disabled:!N||y,Icon:Bu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:E.text})]})]})},rX={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},iX=(e,t=2e3,n,r)=>{let[i,a]=(0,v.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},aX=e=>{let t=(0,b.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:u,disable:d,preventDefault:f,stopPropagation:p,size:m}=e,h=a===void 0?`Copy to clipboard`:a,g=o===void 0?`Copied to clipboard`:o,_=s===void 0?2e3:s,v=f===void 0?!0:f,y=p===void 0?!0:p,x=m===void 0?14:m,{isCopied:S,copy:C}=iX(n,_,c,u);if(d){let e;return t[0]!==r||t[1]!==i?(e=(0,T.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let w;if(t[3]!==g||t[4]!==h||t[5]!==r||t[6]!==i||t[7]!==C||t[8]!==S||t[9]!==v||t[10]!==x||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),C()},o=S?g:h,s=S?Tu:Eu;w=(0,T.jsxs)(`span`,{className:l(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":S,"data-testid":`copy-to-clipboard`,children:[(0,T.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,T.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:x,"aria-hidden":`true`})]}),t[3]=g,t[4]=h,t[5]=r,t[6]=i,t[7]=C,t[8]=S,t[9]=v,t[10]=x,t[11]=y,t[12]=n,t[13]=w}else w=t[13];return w},oX={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},sX={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},cX=e=>{let t=(0,b.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=xr(sX),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=TY({title:ZJ({error:y}).refine(lX,{error:i.value}).optional(),key:ZJ({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:ZJ({error:x}).optional(),projectIds:CY(ZJ({error:S})).default([e]),tags:CY(ZJ({error:C})).default([]),location:jY([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:jY([`static`,`dynamic`,`fetch`]).optional(),filePath:ZJ({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function lX(e){return e.length===0||e.length>=4}var uX=e=>{let t=(0,b.c)(55),{dictionary:n,mode:r}=e,{session:i}=lO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=gO(),{data:l}=yO(),u=s?.data??[],d=l?.data??[],f=cX(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=wq(f,m),{editedContent:_,setEditedDictionary:y}=Bw(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:w,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=xr(oX),{mutate:j,isPending:M}=bO(),N=_?.[n.localId],P;t[5]!==n||t[6]!==h?(P=()=>{h.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=P):P=t[7];let F=h?.reset,I;t[8]!==n||t[9]!==F?(I=[n,F],t[8]=n,t[9]=F,t[10]=I):I=t[10],(0,v.useEffect)(P,I);let L;t[11]!==n||t[12]!==h||t[13]!==N?(L=()=>{N===void 0&&h.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=N,t[14]=L):L=t[14];let R;t[15]===N?R=t[16]:(R=[N],t[15]=N,t[16]=R),(0,v.useEffect)(L,R);let ee;t[17]!==j||t[18]!==n||t[19]!==h||t[20]!==y||t[21]!==N?(ee=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;y(t=>({...t,...e,...n})),h.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=h,t[20]=y,t[21]=N,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let z=qV(ne),B=z===`local`||z===`hybrid`,re;t[25]!==n||t[26]!==h||t[27]!==y?(re=e=>{h.setValue(`key`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=h,t[27]=y,t[28]=re):re=t[28];let ie;t[29]!==n||t[30]!==h||t[31]!==y?(ie=e=>{h.setValue(`title`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=h,t[31]=y,t[32]=ie):ie=t[32];let ae;t[33]!==n||t[34]!==h||t[35]!==y?(ae=e=>{h.setValue(`description`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=h,t[35]=y,t[36]=ae):ae=t[36];let oe;t[37]!==n||t[38]!==h||t[39]!==D||t[40]!==r||t[41]!==y?(oe=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),y(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),y(e=>({...n,...e??{},location:r}))};return(0,T.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,T.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,T.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,T.jsx)(mJ,{id:`location-local`,name:`location-local`,label:D.local.value,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,T.jsx)(mJ,{id:`location-remote`,name:`location-remote`,label:D.remote.value,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,T.jsx)($.Description,{children:D.testDescription}),(0,T.jsx)($.Message,{})]})},t[37]=n,t[38]=h,t[39]=D,t[40]=r,t[41]=y,t[42]=oe):oe=t[42];let se;t[43]!==n||t[44]!==h||t[45]!==y?(se=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=h,t[45]=y,t[46]=se):se=t[46];let ce;t[47]!==n||t[48]!==h||t[49]!==y?(ce=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=h,t[49]=y,t[50]=ce):ce=t[50];let le;return t[51]!==n||t[52]!==h||t[53]!==y?(le=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=h,t[53]=y,t[54]=le):le=t[54],(0,T.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:g,isRequired:!0,onSave:re}),(0,T.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ie})]}),(0,T.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:g,onSave:ae}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,T.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,T.jsx)(Xy,{mode:`wait`,children:B&&(0,T.jsx)(Jx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,T.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:g||!B,onChange:e=>{let t=e.target.value;y(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,T.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,T.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:se,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:O.label.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,T.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,T.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsxs)($.MultiSelect,{name:`projectIds`,label:w.label.value,description:w.description,onValueChange:ce,children:[(0,T.jsx)(mV.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,T.jsx)(mV.Input,{placeholder:w.placeholder.value})}),(0,T.jsx)(mV.Content,{children:(0,T.jsx)(rS,{isLoading:c,children:(0,T.jsx)(mV.List,{children:u?.map(dX)})})})]}),(0,T.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:le,children:[(0,T.jsx)(mV.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,T.jsx)(mV.Input,{placeholder:E.placeholder.value})}),(0,T.jsx)(mV.Content,{children:(0,T.jsx)(rS,{isLoading:c,children:(0,T.jsx)(mV.List,{children:d?.map(fX)})})})]})]}),(0,T.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,T.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Uu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||M,isLoading:M})})]})};function dX(e){return(0,T.jsx)(mV.Item,{value:String(e.id),children:e.name},String(e.id))}function fX(e){return(0,T.jsx)(mV.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var pX=(0,v.lazy)(()=>d(()=>import(`./dist-JQ-XU7Cq.js`).then(e=>({default:e.Editor})),__vite__mapDeps([0,1,2]))),mX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,v.useRef)(null),c=(0,v.useRef)(null),[u,d]=(0,v.useState)({height:0,width:0}),f=n?`vs-dark-transparent`:`hc-light-theme`,p=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(f),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),d({height:n,width:s.current?.clientWidth??0})},m=r??(typeof e==`string`?e.split(`
221
- `).length>1:!1);return(0,T.jsxs)(`div`,{className:l(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,T.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,T.jsx)(XF,{content:e})})}),(0,T.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,T.jsx)(v.Suspense,{fallback:(0,T.jsx)(rS,{}),children:(0,T.jsx)(pX,{...u,defaultLanguage:`typescript`,language:t,loading:(0,T.jsx)(rS,{}),defaultValue:String(e).replace(/\n$/,``),onMount:p,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:m?`on`:`off`},theme:f,className:`my-2 rounded-md`})})})]})},hX=e=>{let t=(0,b.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=Bw(),o=gX,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,T.jsx)(mX,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function gX(e){try{return JSON.parse(e),!0}catch{return!1}}var _X={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},vX={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},yX=e=>{let t=(0,b.c)(22),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,triggerPlaceHolder:d,nest:f,gender:p,condition:m,markdown:h,insertion:g,reactNode:_,file:y}=xr(vX),x;t[0]===n?x=t[1]:(x=_w(n),t[0]=n,t[1]=x);let[S,C]=(0,v.useState)(x),w;t[2]===r?w=t[3]:(w=e=>{C(e),r(e)},t[2]=r,t[3]=w);let E=w,D;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==y||t[9]!==p||t[10]!==g||t[11]!==S||t[12]!==h||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==_||t[19]!==a||t[20]!==d?(D=(0,T.jsxs)(J,{value:S,onValueChange:E,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:d})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:k,children:i}),(0,T.jsx)(J.Item,{value:te,children:a}),(0,T.jsx)(J.Item,{value:ne,children:o}),(0,T.jsx)(J.Item,{value:z,children:s}),(0,T.jsx)(J.Item,{value:P,children:c}),(0,T.jsx)(J.Item,{value:F,children:l}),(0,T.jsx)(J.Item,{value:A,children:u}),(0,T.jsx)(J.Item,{value:B,children:p}),(0,T.jsx)(J.Item,{value:M,children:g}),(0,T.jsx)(J.Item,{value:R,children:h}),(0,T.jsx)(J.Item,{value:I,children:f}),(0,T.jsx)(J.Item,{value:j,children:m}),(0,T.jsx)(J.Item,{value:L,disabled:!0,children:_}),(0,T.jsx)(J.Item,{value:N,children:y})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=y,t[9]=p,t[10]=g,t[11]=S,t[12]=h,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=_,t[19]=a,t[20]=d,t[21]=D):D=t[21],D},bX=e=>{let t=(0,b.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=Rw()?.internationalization.locales??[],s=_w(n),c=mw(n),l=e=>{a(fw(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(yX,{section:n,onValueChange:e=>a(fw(e,o))}),(0,T.jsx)(bX,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(yX,{section:n,onValueChange:e=>a(fw(e,o))}),(0,T.jsx)(bX,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(fw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(yX,{section:n,onValueChange:s}),(0,T.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,T.jsx)(CX,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(fw(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,T.jsx)(yX,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},xX=e=>{let t=(0,b.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=Fw(),{renameEditedContent:c,addEditedContent:l}=zw(),{titleInput:u,deleteButton:d}=xr(_X),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,T.jsx)(tS,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":pr(i,o?.keyPath??[]),onClick:e,children:(0,T.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,T.jsxs)(`div`,{className:`w-full`,children:[(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,T.jsx)(dT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,T.jsx)(oS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Hu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,T.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,_r(n),` )`]})]}),(0,T.jsx)(bX,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},SX=e=>{let t=(0,b.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=xr(_X),{setFocusedContentKeyPath:o}=Fw(),{addEditedContent:s}=zw();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:P,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,T.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,T.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,T.jsx)(`li`,{className:`flex w-full`,children:(0,T.jsx)(xX,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:P,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,T.jsx)(oS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Ru,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},CX=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,T.jsx)(xX,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,T.jsx)(SX,{section:e,keyPath:t,dictionaryLocalId:n}),wX=e=>{let t=(0,b.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=Bw(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,T.jsx)(xX,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},TX=e=>{let t=(0,b.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=Rw(),{returnToDictionaryList:d}=xr(rX),{focusedContent:f,setFocusedContent:p}=Fw(),{setLocaleDictionary:m}=Mw(),h;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(h=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=h):h=t[4];let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[5]=g):g=t[5],(0,v.useEffect)(h,g);let _;if(t[6]!==u?.internationalization.locales||t[7]!==n||t[8]!==i||t[9]!==a||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==d||t[14]!==p||t[15]!==l){let e;t[17]!==o||t[18]!==p?(e=()=>{p(null),o?.()},t[17]=o,t[18]=p,t[19]=e):e=t[19],_=(0,T.jsx)(DO,{availableLocales:u?.internationalization.locales??[],children:(0,T.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,T.jsx)(oS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:_u,label:d.label.value,children:d.text}),(0,T.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,T.jsxs)(dI,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,T.jsx)(dI.Item,{label:`Details`,value:`details`,children:(0,T.jsx)(uX,{dictionary:n,mode:a})}),(0,T.jsx)(dI.Item,{label:`Structure`,value:`structure`,children:(0,T.jsx)(wX,{dictionary:n})}),(0,T.jsx)(dI.Item,{label:`Content`,value:`content`,children:(0,T.jsx)(nz,{dictionary:n,isDarkMode:i})}),(0,T.jsx)(dI.Item,{label:`JSON`,value:`json`,children:(0,T.jsx)(hX,{dictionary:n,isDarkMode:i})})]})}),(0,T.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,T.jsx)(aX,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,T.jsx)(nX,{dictionary:n,mode:a,onDelete:e,onSave:s})]})]})}),t[6]=u?.internationalization.locales,t[7]=n,t[8]=i,t[9]=a,t[10]=r,t[11]=o,t[12]=s,t[13]=d,t[14]=p,t[15]=l,t[16]=_}else _=t[16];return _},EX=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},DX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},OX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},kX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},AX=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},jX=(e=`md`)=>{let t=EX(e),n=DX(),r=AX(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:OX(),isMac:kX()}},MX=e=>{let t=(0,b.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=jX(n),t[0]=n,t[1]=r);let[i,a]=(0,v.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(jX(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,v.useEffect)(o,s),i},NX=e=>{let t=(0,b.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,v.useRef)(``),p=(0,v.useRef)(null),[m,h]=(0,v.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,y;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(y=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=y):y=t[8];let x=y,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{_()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,v.useEffect)(S,C);let w=m.length>=l,T;return t[11]!==m||t[12]!==x||t[13]!==w?(T={setSearch:x,search:m,hasMinChars:w},t[11]=m,t[12]=x,t[13]=w,t[14]=T):T=t[14],T},PX=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},FX=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(PX.subscribe,PX.getSnapshot,IX),n;return e[0]===t?n=e[1]:(n={open:PX.open,close:PX.close,set:PX.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function IX(){return{}}var LX={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},RX=e=>e.split(` + `).map(e=>e.trim()),zX=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,BX=(e,t)=>{let n=t.map(zX),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(zX(e)));if(!i)return!1;let a=zX(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},VX=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,HX=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},UX=e=>{let t=(0,b.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,u=a===void 0?!1:a,d=s===void 0?`md`:s,{isMac:f}=MX(),p;t[0]!==f||t[1]!==n?(p=RX(HX(n,f??!1)),t[0]=f,t[1]=n,t[2]=p):p=t[2];let m=p,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[3]=h):h=t[3];let[g,_]=(0,v.useState)(h),y,x;if(t[4]!==u||t[5]!==f||t[6]!==m||t[7]!==r?(y=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(f?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(VX(i))):a.add(i.toUpperCase()),_(a),!u&&r&&BX(e,m)){let t=m.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{_(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},x=[m,r,f,u],t[4]=u,t[5]=f,t[6]=m,t[7]=r,t[8]=y,t[9]=x):(y=t[8],x=t[9]),(0,v.useEffect)(y,x),!c)return null;let S;t[10]===g?S=t[11]:(S=e=>{let t=e.toUpperCase(),n=zX(e);return g.has(e)||g.has(t)||g.has(n)||e===`⌘`&&g.has(`Meta`)||e===`Ctrl`&&g.has(`Control`)||e===`⌥`&&g.has(`Alt`)||e===`Alt`&&g.has(`Alt`)||e===`←`&&g.has(`ArrowLeft`)||e===`→`&&g.has(`ArrowRight`)||e===`↑`&&g.has(`ArrowUp`)||e===`↓`&&g.has(`ArrowDown`)},t[10]=g,t[11]=S);let C=S,w;if(t[12]!==o||t[13]!==C||t[14]!==m||t[15]!==n||t[16]!==d){let e;t[18]!==C||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=VX(e);return(0,T.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,T.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,T.jsx)(`span`,{className:l(`min-w-4 px-0.5 text-center`,C(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=C,t[19]=n,t[20]=e):e=t[20],w=(0,T.jsx)(`kbd`,{className:l(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,d===`sm`&&`text-xs`,d===`md`&&`text-sm`,d===`lg`&&`text-base`,o),children:m.map(e)}),t[12]=o,t[13]=C,t[14]=m,t[15]=n,t[16]=d,t[17]=w}else w=t[17];return w},WX=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,T.jsx)(`div`,{className:l(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,T.jsx)(`div`,{style:{minWidth:`${n}px`},className:l(r===`right`&&`ml-auto`),children:e})}),GX=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},KX=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=xr(LX),{isMobile:d}=MX(`md`),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=pI(l),{open:h,close:g,isOpen:_}=FX(),y=_(t),b=y;vI({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,v.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=GX(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,g,c,a,t]);let x=(0,v.useRef)(c);return(0,v.useEffect)(()=>{x.current=c},[c]),(0,v.useEffect)(()=>{s!==void 0&&s!==y&&(s?h(t):(g(t),x.current?.()))},[s,y,t,h,g]),m?(0,kc.createPortal)((0,T.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,T.jsx)(WX,{isHidden:!b,align:`right`,children:(0,T.jsxs)(tS,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,T.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,T.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,T.jsx)(`div`,{children:o&&(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:xu,children:o?.text})}),(0,T.jsx)(`div`,{children:(0,T.jsxs)(JF,{identifier:`close-drawer`,children:[(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Wu,size:`icon-md`}),(0,T.jsx)(JF.Detail,{identifier:`close-drawer`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,T.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,T.jsx)(UX,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,T.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,T.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,T.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,T.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,T.jsx)(T.Fragment,{})},qX=ou(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`,"3xl":`rounded-3xl`,full:`rounded-full`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-red-500 bg-red-500/10 text-red-500 dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),JX=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,T.jsx)(`div`,{className:qX({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),YX=`dictionaryList`,XX=e=>`dictionary_edition_${e}`,ZX=e=>{let t=(0,b.c)(20),n;t[0]===e?n=t[1]:(n=XX(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=FX(),{getEditedContentValue:s}=zw(),{focusedContent:c,setFocusedContent:l}=Fw(),u,d;t[2]!==c||t[3]!==r||t[4]!==a?(u=()=>{c&&(c.keyPath?.length??0)>0&&a(r)},d=[c,a,r],t[2]=c,t[3]=r,t[4]=a,t[5]=u,t[6]=d):(u=t[5],d=t[6]),(0,v.useEffect)(u,d);let f;t[7]!==i||t[8]!==r?(f=i(r),t[7]=i,t[8]=r,t[9]=f):f=t[9];let p;t[10]!==o||t[11]!==c||t[12]!==r||t[13]!==l?(p=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[10]=o,t[11]=c,t[12]=r,t[13]=l,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==s||t[17]!==f||t[18]!==p?(m={isOpen:f,focusedContent:c,getEditedContentValue:s,close:p},t[15]=c,t[16]=s,t[17]=f,t[18]=p,t[19]=m):m=t[19],m},QX=e=>{let t=(0,b.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=xr($x),l;t[0]===n?l=t[1]:(l=XX(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=ZX(n),{setFocusedContent:p}=Fw(),{open:m}=FX(),h;t[2]===m?h=t[3]:(h=()=>m(YX),t[2]=m,t[3]=h);let g=h,{data:_}=SO(),y;t[4]!==f||t[5]!==g||t[6]!==p?(y=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=y):y=t[7];let x=y,[S,C]=(0,v.useState)(!1),w;t[8]===x?w=t[9]:(w=()=>{C(!1),x()},t[8]=x,t[9]=w);let E=w;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let D,O,k,A,j,M,N,P,F,I;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==_){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=KX,I=u,t[32]!==i.value||t[33]!==x?(k={onBack:x,text:i.value},t[32]=i.value,t[33]=x,t[34]=k):k=t[34],A=f;let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>C(!0),t[35]=e):e=t[35];let n;t[36]===a.label.value?n=t[37]:(n=(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Lu,label:a.label.value,onClick:e}),t[36]=a.label.value,t[37]=n);let r;t[38]===a.popoverContent?r=t[39]:(r=(0,T.jsx)(JF.Detail,{identifier:`open-dictionary-editor`,children:(0,T.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[38]=a.popoverContent,t[39]=r);let o;t[40]!==n||t[41]!==r?(o=(0,T.jsxs)(JF,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],F=(0,T.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,T.jsx)(`h3`,{className:`w-full text-center text-lg`,children:O.title?O.title:O.key}),o]}),M=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,N=(0,T.jsx)(JX,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,T.jsx)(JX,{color:`blue`,roundedSize:`full`,size:`xs`,children:O.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=x,t[17]=u,t[18]=a,t[19]=_,t[20]=D,t[21]=O,t[22]=k,t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I}else D=t[20],O=t[21],k=t[22],A=t[23],j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let L;t[43]===O.id?L=t[44]:(L=O.id&&(0,T.jsx)(JX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=L);let R;t[45]!==L||t[46]!==M||t[47]!==N||t[48]!==P?(R=(0,T.jsxs)(`div`,{className:M,children:[N,P,L]}),t[45]=L,t[46]=M,t[47]=N,t[48]=P,t[49]=R):R=t[49];let ee;t[50]!==R||t[51]!==F?(ee=(0,T.jsxs)(T.Fragment,{children:[F,R]}),t[50]=R,t[51]=F,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[53]=te):te=t[53];let ne;t[54]!==O||t[55]!==x?(ne=(0,T.jsx)(nX,{dictionary:O,mode:te,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=ne):ne=t[56];let z;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(z=d&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(SI,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,T.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,T.jsx)(TX,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,T.jsx)(_T,{dictionary:O})]}),t[57]=O,t[58]=S,t[59]=d,t[60]=x,t[61]=r,t[62]=o,t[63]=E,t[64]=z):z=t[64];let B;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ee||t[69]!==ne||t[70]!==z||t[71]!==I?(B=(0,T.jsx)(D,{identifier:I,backButton:k,onClose:A,header:ee,footer:ne,children:z}),t[65]=D,t[66]=k,t[67]=A,t[68]=ee,t[69]=ne,t[70]=z,t[71]=I,t[72]=B):B=t[72],B},$X=e=>{let t=(0,b.c)(4),{isDarkMode:n}=e,{focusedContent:r}=Fw(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,T.jsx)(QX,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},eZ={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},tZ=()=>{let{drawerTitle:e,buttonLabel:t}=xr(eZ),{set:n}=FX(),{localeDictionaries:r}=jw(),{editedContent:i}=Bw(),{setFocusedContent:a}=Fw(),{setSearch:o,search:s}=NX(),c=(0,v.useMemo)(()=>new XR(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,v.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[YX]:!1,[XX(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,T.jsxs)(KX,{title:e.label.value,identifier:YX,children:[(0,T.jsx)(`div`,{className:`p-3 pb-4`,children:(0,T.jsx)(cJ,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,T.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,T.jsx)(`li`,{className:`w-full`,children:(0,T.jsx)(oS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:Su,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Iu:void 0,children:(0,T.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,T.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,T.jsx)(JX,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,T.jsx)(JX,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,T.jsx)(JX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,T.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},nZ={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},rZ=()=>{let e=(0,b.c)(8),{message:t}=xr(nZ),[n]=kw(OS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=l(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,T.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},iZ=e=>{let t=(0,b.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,T.jsx)(rZ,{})}),i=(0,T.jsx)($X,{}),a=(0,T.jsx)(tZ,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,T.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},aZ=()=>{let e=(0,b.c)(2),[t,n]=(0,v.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(oZ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,v.useEffect)(r,i),t};function oZ(e){return e.json()}var sZ=e=>{let t=(0,b.c)(11),{children:n,iframeRef:r}=e,i=aZ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(rS,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,T.jsx)(Iw,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},cZ={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},lZ=()=>{let e=(0,b.c)(9),{editedContent:t,setEditedContentState:n}=Bw(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,v.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,v.useEffect)(s,c),i},uZ={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},dZ=()=>{let e=(0,b.c)(11),{title:t,description:n,documentationLink:r}=xr(uZ),i;e[0]===t?i=e[1]:(i=(0,T.jsx)(_k,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,T.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,T.jsx)(nk,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},fZ=e=>{let t=(0,b.c)(23),{iframeRef:n,applicationPath:r}=e,i=xr(cZ),{editor:a}=Rw()??{},{enabled:o}=Vw(),s=Hw();lZ(),Ww();let[c,u]=(0,v.useState)(!0),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={receive:!0,emit:!1},t[0]=d):d=t[0];let[f]=Aw(void 0,d),p,m;if(t[1]===f?(p=t[2],m=t[3]):(p=()=>{typeof f==`string`&&window.history.replaceState({},``,f)},m=[f],t[1]=f,t[2]=p,t[3]=m),(0,v.useEffect)(p,m),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(tS,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,T.jsx)(dZ,{})}),t[4]=e):e=t[4],e}let h;t[5]===c?h=t[6]:(h=(0,T.jsx)(rS,{isLoading:c}),t[5]=c,t[6]=h);let g=`${a.applicationURL}${r}`,_=i.intlayerApplication.value,y=c&&`hidden`,x;t[7]===y?x=t[8]:(x=l(`size-full`,y),t[7]=y,t[8]=x);let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{u(!1)},t[9]=S):S=t[9];let C;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==x?(C=(0,T.jsx)(`iframe`,{src:g,title:_,sandbox:`allow-scripts allow-same-origin`,className:x,ref:n,onLoad:S}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=x,t[14]=C):C=t[14];let w;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(w=!o&&(0,T.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,T.jsx)(oS,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=w):w=t[18];let E;return t[19]!==C||t[20]!==w||t[21]!==h?(E=(0,T.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[h,C,w]}),t[19]=C,t[20]=w,t[21]=h,t[22]=E):E=t[22],E},pZ=()=>{let e=(0,b.c)(2),t=(0,v.useRef)(null),n=Vi(),r;return e[0]===n.pathname?r=e[1]:(r=(0,T.jsx)(sZ,{iframeRef:t,children:(0,T.jsx)(yr,{disableEditor:!0,children:(0,T.jsx)(iZ,{children:(0,T.jsx)(fZ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,y.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(v.StrictMode,{children:(0,T.jsx)(()=>{let e=(0,b.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(Qx,{children:(0,T.jsx)(Zx,{children:(0,T.jsx)(pZ,{})})}),e[0]=t):t=e[0],t},{})}));
220
+ }`,Kq=18,qq=40,Jq=`${qq}px`,Yq=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),Xq=e=>{let t=(0,b.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-Kq,f=c;document.querySelectorAll(Yq).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=qq)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,v.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let y;t[14]!==r||t[15]!==a||t[16]!==i?(y=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=y):y=t[17],(0,v.useEffect)(_,y);let x;return t[18]!==o||t[19]!==f?(x={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Jq},t[18]=o,t[19]=f,t[20]=x):x=t[20],x},Zq=e=>{let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e}),t.current},Qq=(0,v.createContext)({}),$q=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:u,containerClassName:d,noScriptCSSFallback:f=Gq,render:p,children:m,...h})=>{let[g,_]=(0,v.useState)(typeof h.defaultValue==`string`?h.defaultValue:``),y=e??g,b=Zq(y),x=e=>{t?.(e),_(e)},S=r===void 0?null:typeof r==`string`?new RegExp(r):r,C=(0,v.useRef)(null),w=(0,v.useRef)(null),E=(0,v.useRef)({value:y,onChange:x,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),D=(0,v.useRef)({prev:[C.current?.selectionStart??null,C.current?.selectionEnd??null,C.current?.selectionDirection??`none`]});(0,v.useEffect)(()=>{let e=C.current,t=w.current;if(!e||!t)return;E.current.value!==e.value&&E.current.onChange(e.value),D.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){N(null),F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=D.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&C.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;L(t!==null&&n!==null?t===n?t:u:null),N(u),F(d),D.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&j(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Wq(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Wq(e.sheet,`[data-input-otp]:autofill { ${t} }`),Wq(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Wq(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Wq(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(null),[P,F]=(0,v.useState)(null),[I,L]=(0,v.useState)(null);(0,v.useEffect)(()=>{Uq(()=>{C.current?.dispatchEvent(new Event(`input`));let e=C.current?.selectionStart??null,t=C.current?.selectionEnd??null,n=C.current?.selectionDirection??`none`;e!==null&&t!==null&&(N(e),F(t),L(e),D.current.prev=[e,t,n])})},[y,A]),(0,v.useEffect)(()=>{b!==void 0&&y!==b&&b.length<n&&y.length===n&&o?.(y)},[n,o,b,y]);let R=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=A&&I!==null?I:null;e!==R.current&&(R.current=e,s?.(e))},[A,I,s]);let ee=Xq({containerRef:w,inputRef:C,pushPasswordManagerStrategy:c,isFocused:A}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&S&&!S.test(t)){e.preventDefault();return}typeof b==`string`&&t.length<b.length&&document.dispatchEvent(new Event(`selectionchange`)),x(t)},ne=()=>{if(C.current){let e=Math.min(C.current.value.length,n-1),t=C.current.value.length;C.current?.setSelectionRange(e,t),N(e),F(t)}j(!0)},z=e=>{let t=C.current;if(!u&&(!E.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=u?u(r):r;e.preventDefault();let a=C.current?.selectionStart,o=C.current?.selectionEnd,s=(a===o?y.slice(0,a??0)+i+y.slice(a??0):y.slice(0,a??0)+i+y.slice(o??0)).slice(0,n);if(!(s.length>0&&S&&!S.test(s))&&t){t.value=s,x(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),N(e),F(r)}},B={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},re=(0,T.jsx)(`input`,{autoComplete:h.autoComplete||`one-time-code`,...h,"data-input-otp":!0,"data-input-otp-placeholder-shown":y.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":P,inputMode:a,pattern:S?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:B,maxLength:n,value:y,ref:C,onPaste:e=>{z(e),h.onPaste?.(e)},onChange:te,onMouseOver:e=>{k(!0),h.onMouseOver?.(e)},onMouseLeave:e=>{k(!1),h.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=C.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&L(t)}}),h.onKeyDown?.(e)},onFocus:e=>{ne(),h.onFocus?.(e)},onBlur:e=>{j(!1),h.onBlur?.(e)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=A&&M!==null&&P!==null&&(M===P&&t===M||t>=M&&t<P),r=y[t]===void 0?null:y[t];return{char:r,placeholderChar:y[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:A,isHovering:!h.disabled&&O,setSelection:e=>{let t=C.current;if(!t||h.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=y[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),N(a),F(o),j(!0)}},ae=p===void 0?(0,T.jsx)(Qq.Provider,{value:ie,children:m}):p(ie);return(0,T.jsxs)(T.Fragment,{children:[f!==null&&(0,T.jsx)(`noscript`,{children:(0,T.jsx)(`style`,{children:f})}),(0,T.jsxs)(`div`,{ref:w,className:l(`relative`,h.disabled?`cursor-default`:`cursor-text`,d),children:[ae,(0,T.jsx)(`div`,{className:`absolute inset-0`,children:re})]})]})},eJ=({className:e,render:t,...n})=>(0,T.jsx)($q,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:l(`disabled:cursor-not-allowed`,e),render:t,...n}),tJ=({className:e,...t})=>(0,T.jsx)(`div`,{className:l(`z-10 flex items-center gap-3`,e),...t}),nJ=e=>{let t=(0,b.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,v.useContext)(Qq),{char:c,isActive:u}=s?.slots[n]??{},d;t[0]===s?d=t[1]:(d=s??{},t[0]=s,t[1]=d);let{setSelection:f}=d,p;t[2]!==n||t[3]!==i||t[4]!==f?(p=e=>{f?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=f,t[5]=p):p=t[5];let m=p,h;t[6]!==n||t[7]!==a||t[8]!==f?(h=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=f,t[9]=h):h=t[9];let g=h;return(0,T.jsx)(oS,{isSelected:u,variant:`input`,color:`custom`,tabIndex:-1,className:l(`relative z-10 px-2!`,u&&`ring-4!`,r),onClick:m,onKeyDown:g,label:null,...o,children:(0,T.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},rJ=e=>(0,T.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,T.jsx)(Mu,{})}),iJ=e=>(0,T.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),aJ=e=>e?.getAttribute(`aria-selected`)===`true`,oJ=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=kq(),f=(0,v.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=fS(f,{selector:aJ,isHoverable:!0});return(0,v.useEffect)(()=>{m()},[]),(0,T.jsx)(Pq,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,T.jsx)(eJ,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(tJ,{children:[(0,T.jsx)(nJ,{index:0,ref:e=>{f.current[0]=e}}),(0,T.jsx)(nJ,{index:1,ref:e=>{f.current[1]=e}}),(0,T.jsx)(nJ,{index:2,ref:e=>{f.current[2]=e}})]}),(0,T.jsx)(rJ,{}),(0,T.jsxs)(tJ,{children:[(0,T.jsx)(nJ,{index:3,ref:e=>{f.current[3]=e}}),(0,T.jsx)(nJ,{index:4,ref:e=>{f.current[4]=e}}),(0,T.jsx)(nJ,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,T.jsx)(iJ,{style:p})]})})})},sJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=ZV();return(0,T.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,T.jsx)(oJ,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},cJ=({className:e,...t})=>(0,T.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,T.jsx)(Vu,{className:`absolute left-2 size-4`}),(0,T.jsx)(Zw,{...t,type:`search`,className:l(`pl-8`,e)})]}),lJ=e=>(0,T.jsx)(Iq,{id:e.name,"data-testid":e.name,Element:cJ,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),uJ=e=>(0,T.jsx)(Iq,{Element:Qw,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),dJ=e=>(0,T.jsx)(Iq,{Element:tT,id:e.name,"data-testid":e.name,...e}),fJ=ou([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),pJ=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,T.jsx)(`input`,{type:`checkbox`,className:l(fJ({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),mJ=e=>{let{label:t,name:n,id:r}=e;return t?(0,T.jsxs)(`label`,{htmlFor:r??n,className:l(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,T.jsx)(pJ,{id:r??n,...e}),t]}):(0,T.jsx)(pJ,{id:r??n,...e})},hJ=({inputLabel:e,value:t,onChange:n,...r})=>(0,T.jsx)(mJ,{...r,label:e,checked:!!t,onChange:n}),gJ=({autoComplete:e,...t})=>(0,T.jsx)(Iq,{Element:hJ,id:t.name,"data-testid":t.name,autoComplete:e,...t}),_J=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(mV,{onValueChange:t.onChange,values:t.value,...l,children:c})})},vJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(_J,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},yJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},bJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(yJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},xJ=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=kq();return(0,T.jsx)(Pq,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,T.jsx)(yS,{...t,...l,children:c})})},SJ=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=ZV();return(0,T.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,T.jsx)(xJ,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},CJ=e=>{let t=(0,b.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=kq(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,T.jsx)(lB,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},wJ=e=>{let t=(0,b.c)(3),{formDescriptionId:n}=kq(),r;return t[0]!==n||t[1]!==e?(r=(0,T.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},TJ=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=kq(),a=r?String(r?.message??``):t;return a?(0,T.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=Cq;$.Description=wJ,$.Control=CJ,$.Field=Oq,$.Item=Tq,$.Label=Nq,$.Message=TJ,$.Element=Iq,$.Input=zq,$.InputPassword=Hq,$.Checkbox=gJ,$.TextArea=uJ,$.AutoSizedTextArea=dJ,$.Button=oS,$.Select=bJ,$.MultiSelect=vJ,$.EditableFieldInput=Lq,$.EditableFieldTextArea=Rq,$.SwitchSelector=SJ,$.OTP=sJ,$.SearchInput=lJ;var EJ=Z(`ZodISODateTime`,(e,t)=>{nG.init(e,t),QJ.init(e,t)});function DJ(e){return SK(EJ,e)}var OJ=Z(`ZodISODate`,(e,t)=>{rG.init(e,t),QJ.init(e,t)});function kJ(e){return CK(OJ,e)}var AJ=Z(`ZodISOTime`,(e,t)=>{iG.init(e,t),QJ.init(e,t)});function jJ(e){return wK(AJ,e)}var MJ=Z(`ZodISODuration`,(e,t)=>{aG.init(e,t),QJ.init(e,t)});function NJ(e){return TK(MJ,e)}var PJ=(e,t)=>{FU.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>RU(e,t)},flatten:{value:t=>LU(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,nU,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,nU,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,PJ);var FJ=Z(`ZodError`,PJ,{Parent:Error}),IJ=zU(FJ),LJ=VU(FJ),RJ=UU(FJ),zJ=GU(FJ),BJ=qU(FJ),VJ=JU(FJ),HJ=YU(FJ),UJ=XU(FJ),WJ=ZU(FJ),GJ=QU(FJ),KJ=$U(FJ),qJ=eW(FJ),JJ=Z(`ZodType`,(e,t)=>(HW.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:$K(e,`input`),output:$K(e,`output`)}}),e.toJSONSchema=QK(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(lU(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>yU(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>IJ(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>RJ(e,t,n),e.parseAsync=async(t,n)=>LJ(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>zJ(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>BJ(e,t,n),e.decode=(t,n)=>VJ(e,t,n),e.encodeAsync=async(t,n)=>HJ(e,t,n),e.decodeAsync=async(t,n)=>UJ(e,t,n),e.safeEncode=(t,n)=>WJ(e,t,n),e.safeDecode=(t,n)=>GJ(e,t,n),e.safeEncodeAsync=async(t,n)=>KJ(e,t,n),e.safeDecodeAsync=async(t,n)=>qJ(e,t,n),e.refine=(t,n)=>e.check($Y(t,n)),e.superRefine=t=>e.check(eX(t)),e.overwrite=t=>e.check(LK(t)),e.optional=()=>FY(e),e.exactOptional=()=>LY(e),e.nullable=()=>zY(e),e.nullish=()=>FY(zY(e)),e.nonoptional=t=>GY(e,t),e.array=()=>CY(e),e.or=t=>DY([e,t]),e.and=t=>kY(e,t),e.transform=t=>YY(e,NY(t)),e.default=t=>VY(e,t),e.prefault=t=>UY(e,t),e.catch=t=>qY(e,t),e.pipe=t=>YY(e,t),e.readonly=()=>ZY(e),e.describe=t=>{let n=e.clone();return QG.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return QG.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return QG.get(e);let n=e.clone();return QG.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),YJ=Z(`_ZodString`,(e,t)=>{UW.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tq(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(jK(...t)),e.includes=(...t)=>e.check(PK(...t)),e.startsWith=(...t)=>e.check(FK(...t)),e.endsWith=(...t)=>e.check(IK(...t)),e.min=(...t)=>e.check(kK(...t)),e.max=(...t)=>e.check(OK(...t)),e.length=(...t)=>e.check(AK(...t)),e.nonempty=(...t)=>e.check(kK(1,...t)),e.lowercase=t=>e.check(MK(t)),e.uppercase=t=>e.check(NK(t)),e.trim=()=>e.check(zK()),e.normalize=(...t)=>e.check(RK(...t)),e.toLowerCase=()=>e.check(BK()),e.toUpperCase=()=>e.check(VK()),e.slugify=()=>e.check(HK())}),XJ=Z(`ZodString`,(e,t)=>{UW.init(e,t),YJ.init(e,t),e.email=t=>e.check(eK($J,t)),e.url=t=>e.check(oK(nY,t)),e.jwt=t=>e.check(xK(_Y,t)),e.emoji=t=>e.check(sK(rY,t)),e.guid=t=>e.check(tK(eY,t)),e.uuid=t=>e.check(nK(tY,t)),e.uuidv4=t=>e.check(rK(tY,t)),e.uuidv6=t=>e.check(iK(tY,t)),e.uuidv7=t=>e.check(aK(tY,t)),e.nanoid=t=>e.check(cK(iY,t)),e.guid=t=>e.check(tK(eY,t)),e.cuid=t=>e.check(lK(aY,t)),e.cuid2=t=>e.check(uK(oY,t)),e.ulid=t=>e.check(dK(sY,t)),e.base64=t=>e.check(vK(mY,t)),e.base64url=t=>e.check(yK(hY,t)),e.xid=t=>e.check(fK(cY,t)),e.ksuid=t=>e.check(pK(lY,t)),e.ipv4=t=>e.check(mK(uY,t)),e.ipv6=t=>e.check(hK(dY,t)),e.cidrv4=t=>e.check(gK(fY,t)),e.cidrv6=t=>e.check(_K(pY,t)),e.e164=t=>e.check(bK(gY,t)),e.datetime=t=>e.check(DJ(t)),e.date=t=>e.check(kJ(t)),e.time=t=>e.check(jJ(t)),e.duration=t=>e.check(NJ(t))});function ZJ(e){return $G(XJ,e)}var QJ=Z(`ZodStringFormat`,(e,t)=>{WW.init(e,t),YJ.init(e,t)}),$J=Z(`ZodEmail`,(e,t)=>{qW.init(e,t),QJ.init(e,t)}),eY=Z(`ZodGUID`,(e,t)=>{GW.init(e,t),QJ.init(e,t)}),tY=Z(`ZodUUID`,(e,t)=>{KW.init(e,t),QJ.init(e,t)}),nY=Z(`ZodURL`,(e,t)=>{JW.init(e,t),QJ.init(e,t)}),rY=Z(`ZodEmoji`,(e,t)=>{YW.init(e,t),QJ.init(e,t)}),iY=Z(`ZodNanoID`,(e,t)=>{XW.init(e,t),QJ.init(e,t)}),aY=Z(`ZodCUID`,(e,t)=>{ZW.init(e,t),QJ.init(e,t)}),oY=Z(`ZodCUID2`,(e,t)=>{QW.init(e,t),QJ.init(e,t)}),sY=Z(`ZodULID`,(e,t)=>{$W.init(e,t),QJ.init(e,t)}),cY=Z(`ZodXID`,(e,t)=>{eG.init(e,t),QJ.init(e,t)}),lY=Z(`ZodKSUID`,(e,t)=>{tG.init(e,t),QJ.init(e,t)}),uY=Z(`ZodIPv4`,(e,t)=>{oG.init(e,t),QJ.init(e,t)}),dY=Z(`ZodIPv6`,(e,t)=>{sG.init(e,t),QJ.init(e,t)}),fY=Z(`ZodCIDRv4`,(e,t)=>{cG.init(e,t),QJ.init(e,t)}),pY=Z(`ZodCIDRv6`,(e,t)=>{lG.init(e,t),QJ.init(e,t)}),mY=Z(`ZodBase64`,(e,t)=>{dG.init(e,t),QJ.init(e,t)}),hY=Z(`ZodBase64URL`,(e,t)=>{pG.init(e,t),QJ.init(e,t)}),gY=Z(`ZodE164`,(e,t)=>{mG.init(e,t),QJ.init(e,t)}),_Y=Z(`ZodJWT`,(e,t)=>{gG.init(e,t),QJ.init(e,t)}),vY=Z(`ZodUnknown`,(e,t)=>{_G.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function yY(){return EK(vY)}var bY=Z(`ZodNever`,(e,t)=>{vG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nq(e,t,n,r)});function xY(e){return DK(bY,e)}var SY=Z(`ZodArray`,(e,t)=>{bG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oq(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(kK(t,n)),e.nonempty=t=>e.check(kK(1,t)),e.max=(t,n)=>e.check(OK(t,n)),e.length=(t,n)=>e.check(AK(t,n)),e.unwrap=()=>e.element});function CY(e,t){return UK(SY,e,t)}var wY=Z(`ZodObject`,(e,t)=>{TG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sq(e,t,n,r),sU(e,`shape`,()=>t.shape),e.keyof=()=>jY(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yY()}),e.loose=()=>e.clone({...e._zod.def,catchall:yY()}),e.strict=()=>e.clone({...e._zod.def,catchall:xY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>CU(e,t),e.safeExtend=t=>wU(e,t),e.merge=t=>TU(e,t),e.pick=t=>xU(e,t),e.omit=t=>SU(e,t),e.partial=(...t)=>EU(PY,e,t[0]),e.required=(...t)=>DU(WY,e,t[0])});function TY(e,t){return new wY({type:`object`,shape:e??{},...Q(t)})}var EY=Z(`ZodUnion`,(e,t)=>{DG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cq(e,t,n,r),e.options=t.options});function DY(e,t){return new EY({type:`union`,options:e,...Q(t)})}var OY=Z(`ZodIntersection`,(e,t)=>{OG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lq(e,t,n,r)});function kY(e,t){return new OY({type:`intersection`,left:e,right:t})}var AY=Z(`ZodEnum`,(e,t)=>{jG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rq(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new AY({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new AY({...t,checks:[],...Q(r),entries:i})}});function jY(e,t){return new AY({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var MY=Z(`ZodTransform`,(e,t)=>{MG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aq(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new QH(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(NU(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(NU(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function NY(e){return new MY({type:`transform`,transform:e})}var PY=Z(`ZodOptional`,(e,t)=>{PG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_q(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FY(e){return new PY({type:`optional`,innerType:e})}var IY=Z(`ZodExactOptional`,(e,t)=>{FG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_q(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LY(e){return new IY({type:`optional`,innerType:e})}var RY=Z(`ZodNullable`,(e,t)=>{IG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zY(e){return new RY({type:`nullable`,innerType:e})}var BY=Z(`ZodDefault`,(e,t)=>{LG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function VY(e,t){return new BY({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():gU(t)}})}var HY=Z(`ZodPrefault`,(e,t)=>{zG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function UY(e,t){return new HY({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():gU(t)}})}var WY=Z(`ZodNonOptional`,(e,t)=>{BG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GY(e,t){return new WY({type:`nonoptional`,innerType:e,...Q(t)})}var KY=Z(`ZodCatch`,(e,t)=>{HG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qY(e,t){return new KY({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var JY=Z(`ZodPipe`,(e,t)=>{UG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hq(e,t,n,r),e.in=t.in,e.out=t.out});function YY(e,t){return new JY({type:`pipe`,in:e,out:t})}var XY=Z(`ZodReadonly`,(e,t)=>{GG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ZY(e){return new XY({type:`readonly`,innerType:e})}var QY=Z(`ZodCustom`,(e,t)=>{qG.init(e,t),JJ.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iq(e,t,n,r)});function $Y(e,t={}){return WK(QY,e,t)}function eX(e){return GK(e)}var tX={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},nX=e=>{let t=(0,b.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,u]=(0,v.useState)(!1),{setLocaleDictionary:d}=Mw(),{mutate:f,isPending:p}=TO(),{mutate:m,isPending:h}=AO(),{mutate:g,isPending:_}=wO(),y=h||_,{editedContent:x,restoreEditedContent:S}=Bw(),{deleteButton:C,resetButton:w,saveButton:E,publishButton:D,downloadButton:O,confirmation:k}=xr(tX),{isAuthenticated:A}=_O(),j=x?.[n.localId],M;t[0]!==n||t[1]!==j?(M=j&&JSON.stringify(j)!==JSON.stringify(n),t[0]=n,t[1]=j,t[2]=M):M=t[2];let N=M,P=n?.id!==void 0,F;t[3]!==n||t[4]!==x||t[5]!==o||t[6]!==S||t[7]!==d||t[8]!==m?(F=async()=>{x?.[n.localId]&&m({dictionary:{...n,...x?.[n.localId]}},{onSuccess:()=>{d(x?.[n.localId]),S(n.localId),u(!1),o?.()}})},t[3]=n,t[4]=x,t[5]=o,t[6]=S,t[7]=d,t[8]=m,t[9]=F):F=t[9];let I=F,L;t[10]!==n||t[11]!==x||t[12]!==o||t[13]!==g||t[14]!==S||t[15]!==d?(L=()=>{let e={...n,...x?.[n.localId]};g({dictionaries:[e]},{onSuccess:t=>{t&&(d(e),S(n.localId),o?.())}})},t[10]=n,t[11]=x,t[12]=o,t[13]=g,t[14]=S,t[15]=d,t[16]=L):L=t[16];let R=L,ee;t[17]!==f||t[18]!==n||t[19]!==a?(ee=()=>{n.id&&f({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=f,t[18]=n,t[19]=a,t[20]=ee):ee=t[20];let te=ee,ne;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>u(!1),t[21]=ne):ne=t[21];let z;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>u(!1),t[22]=z):z=t[22],(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(SI,{isOpen:c,title:k.title.value,size:`md`,onClose:ne,padding:`md`,children:(0,T.jsxs)(`form`,{className:`size-full`,children:[(0,T.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:k.message}),(0,T.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,T.jsx)($.Button,{label:k.cancelButton.label.value,disabled:!N||y,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:z,children:k.cancelButton.text}),(0,T.jsx)($.Button,{label:k.confirmButton.label.value,disabled:!N||y,Icon:Bu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:I,children:k.confirmButton.text})]})]})}),(0,T.jsxs)(`form`,{className:l(`flex justify-end gap-2 max-md:flex-col`,i),...s,children:[r.includes(`remote`)&&P&&a&&A&&(0,T.jsx)($.Button,{label:C.label.value,Icon:Hu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:p,onClick:te,children:C.text}),N&&(0,T.jsx)($.Button,{label:w.label.value,disabled:!N,Icon:zu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>S(n.localId),children:w.text}),r.includes(`local`)&&(0,T.jsx)($.Button,{label:O.label.value,disabled:!N||y,Icon:Du,color:`text`,variant:A?`outline`:`default`,className:`max-md:w-full`,isLoading:h,onClick:()=>u(!0),children:O.text}),r.includes(`remote`)&&A&&!P&&(0,T.jsx)($.Button,{label:D.label.value,disabled:y,Icon:vu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:D.text}),r.includes(`remote`)&&A&&P&&N&&(0,T.jsx)($.Button,{label:E.label.value,disabled:!N||y,Icon:Bu,color:`text`,className:`max-md:w-full`,isLoading:_,onClick:R,children:E.text})]})]})},rX={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},iX=(e,t=2e3,n,r)=>{let[i,a]=(0,v.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},aX=e=>{let t=(0,b.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:u,disable:d,preventDefault:f,stopPropagation:p,size:m}=e,h=a===void 0?`Copy to clipboard`:a,g=o===void 0?`Copied to clipboard`:o,_=s===void 0?2e3:s,v=f===void 0?!0:f,y=p===void 0?!0:p,x=m===void 0?14:m,{isCopied:S,copy:C}=iX(n,_,c,u);if(d){let e;return t[0]!==r||t[1]!==i?(e=(0,T.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let w;if(t[3]!==g||t[4]!==h||t[5]!==r||t[6]!==i||t[7]!==C||t[8]!==S||t[9]!==v||t[10]!==x||t[11]!==y||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{v&&e.preventDefault(),y&&e.stopPropagation(),C()},o=S?g:h,s=S?Tu:Eu;w=(0,T.jsxs)(`span`,{className:l(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":S,"data-testid":`copy-to-clipboard`,children:[(0,T.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,T.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:x,"aria-hidden":`true`})]}),t[3]=g,t[4]=h,t[5]=r,t[6]=i,t[7]=C,t[8]=S,t[9]=v,t[10]=x,t[11]=y,t[12]=n,t[13]=w}else w=t[13];return w},oX={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},sX={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},cX=e=>{let t=(0,b.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=xr(sX),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=TY({title:ZJ({error:y}).refine(lX,{error:i.value}).optional(),key:ZJ({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:ZJ({error:x}).optional(),projectIds:CY(ZJ({error:S})).default([e]),tags:CY(ZJ({error:C})).default([]),location:jY([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:jY([`static`,`dynamic`,`fetch`]).optional(),filePath:ZJ({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function lX(e){return e.length===0||e.length>=4}var uX=e=>{let t=(0,b.c)(55),{dictionary:n,mode:r}=e,{session:i}=gO(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=CO(),{data:l}=EO(),u=s?.data??[],d=l?.data??[],f=cX(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=wq(f,m),{editedContent:_,setEditedDictionary:y}=Bw(),{titleInput:x,keyInput:S,descriptionInput:C,projectInput:w,tagsSelect:E,locationSelect:D,importModeSelect:O,filePathInput:k,auditButton:A}=xr(oX),{mutate:j,isPending:M}=DO(),N=_?.[n.localId],P;t[5]!==n||t[6]!==h?(P=()=>{h.reset({...n,location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=P):P=t[7];let F=h?.reset,I;t[8]!==n||t[9]!==F?(I=[n,F],t[8]=n,t[9]=F,t[10]=I):I=t[10],(0,v.useEffect)(P,I);let L;t[11]!==n||t[12]!==h||t[13]!==N?(L=()=>{N===void 0&&h.reset({...n,location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=N,t[14]=L):L=t[14];let R;t[15]===N?R=t[16]:(R=[N],t[15]=N,t[16]=R),(0,v.useEffect)(L,R);let ee;t[17]!==j||t[18]!==n||t[19]!==h||t[20]!==y||t[21]!==N?(ee=()=>{let e={...n,...N};j({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(t?.data)try{let n=t.data.fileContent;y(t=>({...t,...e,...n})),h.reset({...e,...n})}catch(e){console.error(e)}}})},t[17]=j,t[18]=n,t[19]=h,t[20]=y,t[21]=N,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let z=qV(ne),B=z===`local`||z===`hybrid`,re;t[25]!==n||t[26]!==h||t[27]!==y?(re=e=>{h.setValue(`key`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},key:e}))},t[25]=n,t[26]=h,t[27]=y,t[28]=re):re=t[28];let ie;t[29]!==n||t[30]!==h||t[31]!==y?(ie=e=>{h.setValue(`title`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},title:e}))},t[29]=n,t[30]=h,t[31]=y,t[32]=ie):ie=t[32];let ae;t[33]!==n||t[34]!==h||t[35]!==y?(ae=e=>{h.setValue(`description`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},description:e}))},t[33]=n,t[34]=h,t[35]=y,t[36]=ae):ae=t[36];let oe;t[37]!==n||t[38]!==h||t[39]!==D||t[40]!==r||t[41]!==y?(oe=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),y(e=>({...n,...e??{},location:r,filePath:i}))},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),y(e=>({...n,...e??{},location:r}))};return(0,T.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,T.jsx)($.Label,{className:`ml-1`,children:D.label}),(0,T.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,T.jsx)(mJ,{id:`location-local`,name:`location-local`,label:D.local.value,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,T.jsx)(mJ,{id:`location-remote`,name:`location-remote`,label:D.remote.value,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,T.jsx)($.Description,{children:D.testDescription}),(0,T.jsx)($.Message,{})]})},t[37]=n,t[38]=h,t[39]=D,t[40]=r,t[41]=y,t[42]=oe):oe=t[42];let se;t[43]!==n||t[44]!==h||t[45]!==y?(se=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),y(t=>({...n,...t??{},importMode:e}))},t[43]=n,t[44]=h,t[45]=y,t[46]=se):se=t[46];let ce;t[47]!==n||t[48]!==h||t[49]!==y?(ce=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},projectIds:t}))},t[47]=n,t[48]=h,t[49]=y,t[50]=ce):ce=t[50];let le;return t[51]!==n||t[52]!==h||t[53]!==y?(le=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),y(e=>({...n,...e??{},tags:t}))},t[51]=n,t[52]=h,t[53]=y,t[54]=le):le=t[54],(0,T.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsx)($.EditableFieldInput,{name:`key`,label:S.label,placeholder:S.label.value,description:S.description,disabled:g,isRequired:!0,onSave:re}),(0,T.jsx)($.EditableFieldInput,{name:`title`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ie})]}),(0,T.jsx)($.EditableFieldTextArea,{name:`description`,label:C.label,placeholder:C.placeholder.value,description:C.description,disabled:g,onSave:ae}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,T.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,T.jsx)(Xy,{mode:`wait`,children:B&&(0,T.jsx)(Jx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,T.jsx)($.Input,{name:`filePath`,label:k.label.value,placeholder:k.placeholder.value,description:k.description.value,disabled:g||!B,onChange:e=>{let t=e.target.value;y(e=>({...n,...e??{},filePath:t}))}})},`filePath-input`)})]}),(0,T.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,T.jsxs)($.Select,{name:`importMode`,label:O.label.value,description:O.description.value,onValueChange:se,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:O.label.value})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:`static`,children:O.static.value}),(0,T.jsx)(J.Item,{value:`dynamic`,children:O.dynamic.value}),(0,T.jsx)(J.Item,{value:`live`,children:O.live.value})]})]})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,T.jsxs)($.MultiSelect,{name:`projectIds`,label:w.label.value,description:w.description,onValueChange:ce,children:[(0,T.jsx)(mV.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,T.jsx)(mV.Input,{placeholder:w.placeholder.value})}),(0,T.jsx)(mV.Content,{children:(0,T.jsx)(rS,{isLoading:c,children:(0,T.jsx)(mV.List,{children:u?.map(dX)})})})]}),(0,T.jsxs)($.MultiSelect,{name:`tags`,label:E.label.value,description:E.description,onValueChange:le,children:[(0,T.jsx)(mV.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,T.jsx)(mV.Input,{placeholder:E.placeholder.value})}),(0,T.jsx)(mV.Content,{children:(0,T.jsx)(rS,{isLoading:c,children:(0,T.jsx)(mV.List,{children:d?.map(fX)})})})]})]}),(0,T.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,T.jsx)($.Button,{type:`button`,size:`icon-md`,label:A.label.value,Icon:Uu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||M,isLoading:M})})]})};function dX(e){return(0,T.jsx)(mV.Item,{value:String(e.id),children:e.name},String(e.id))}function fX(e){return(0,T.jsx)(mV.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var pX=(0,v.lazy)(()=>d(()=>import(`./dist-JQ-XU7Cq.js`).then(e=>({default:e.Editor})),__vite__mapDeps([0,1,2]))),mX=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,v.useRef)(null),c=(0,v.useRef)(null),[u,d]=(0,v.useState)({height:0,width:0}),f=n?`vs-dark-transparent`:`hc-light-theme`,p=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(f),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),d({height:n,width:s.current?.clientWidth??0})},m=r??(typeof e==`string`?e.split(`
221
+ `).length>1:!1);return(0,T.jsxs)(`div`,{className:l(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,T.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,T.jsx)(`div`,{className:l(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,T.jsx)(XF,{content:e})})}),(0,T.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,T.jsx)(v.Suspense,{fallback:(0,T.jsx)(rS,{}),children:(0,T.jsx)(pX,{...u,defaultLanguage:`typescript`,language:t,loading:(0,T.jsx)(rS,{}),defaultValue:String(e).replace(/\n$/,``),onMount:p,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:m?`on`:`off`},theme:f,className:`my-2 rounded-md`})})})]})},hX=e=>{let t=(0,b.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=Bw(),o=gX,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,T.jsx)(mX,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function gX(e){try{return JSON.parse(e),!0}catch{return!1}}var _X={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},vX={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},yX=e=>{let t=(0,b.c)(22),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,triggerPlaceHolder:d,nest:f,gender:p,condition:m,markdown:h,insertion:g,reactNode:_,file:y}=xr(vX),x;t[0]===n?x=t[1]:(x=_w(n),t[0]=n,t[1]=x);let[S,C]=(0,v.useState)(x),w;t[2]===r?w=t[3]:(w=e=>{C(e),r(e)},t[2]=r,t[3]=w);let E=w,D;return t[4]!==l||t[5]!==s||t[6]!==m||t[7]!==u||t[8]!==y||t[9]!==p||t[10]!==g||t[11]!==S||t[12]!==h||t[13]!==i||t[14]!==f||t[15]!==c||t[16]!==o||t[17]!==E||t[18]!==_||t[19]!==a||t[20]!==d?(D=(0,T.jsxs)(J,{value:S,onValueChange:E,children:[(0,T.jsx)(J.Trigger,{children:(0,T.jsx)(J.Value,{placeholder:d})}),(0,T.jsxs)(J.Content,{children:[(0,T.jsx)(J.Item,{value:k,children:i}),(0,T.jsx)(J.Item,{value:te,children:a}),(0,T.jsx)(J.Item,{value:ne,children:o}),(0,T.jsx)(J.Item,{value:z,children:s}),(0,T.jsx)(J.Item,{value:P,children:c}),(0,T.jsx)(J.Item,{value:F,children:l}),(0,T.jsx)(J.Item,{value:A,children:u}),(0,T.jsx)(J.Item,{value:B,children:p}),(0,T.jsx)(J.Item,{value:M,children:g}),(0,T.jsx)(J.Item,{value:R,children:h}),(0,T.jsx)(J.Item,{value:I,children:f}),(0,T.jsx)(J.Item,{value:j,children:m}),(0,T.jsx)(J.Item,{value:L,disabled:!0,children:_}),(0,T.jsx)(J.Item,{value:N,children:y})]})]}),t[4]=l,t[5]=s,t[6]=m,t[7]=u,t[8]=y,t[9]=p,t[10]=g,t[11]=S,t[12]=h,t[13]=i,t[14]=f,t[15]=c,t[16]=o,t[17]=E,t[18]=_,t[19]=a,t[20]=d,t[21]=D):D=t[21],D},bX=e=>{let t=(0,b.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=Rw()?.internationalization.locales??[],s=_w(n),c=mw(n),l=e=>{a(fw(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(yX,{section:n,onValueChange:e=>a(fw(e,o))}),(0,T.jsx)(bX,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,T.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,T.jsx)(yX,{section:n,onValueChange:e=>a(fw(e,o))}),(0,T.jsx)(bX,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(fw(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(yX,{section:n,onValueChange:s}),(0,T.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,T.jsx)(CX,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(fw(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,T.jsx)(yX,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},xX=e=>{let t=(0,b.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=Fw(),{renameEditedContent:c,addEditedContent:l}=zw(),{titleInput:u,deleteButton:d}=xr(_X),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,T.jsx)(tS,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":pr(i,o?.keyPath??[]),onClick:e,children:(0,T.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,T.jsxs)(`div`,{className:`w-full`,children:[(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,T.jsx)(dT,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,T.jsx)(oS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Hu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,T.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,_r(n),` )`]})]}),(0,T.jsx)(bX,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},SX=e=>{let t=(0,b.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=xr(_X),{setFocusedContentKeyPath:o}=Fw(),{addEditedContent:s}=zw();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:P,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,T.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,T.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,T.jsx)(`li`,{className:`flex w-full`,children:(0,T.jsx)(xX,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:P,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,T.jsx)(oS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Ru,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},CX=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,T.jsx)(xX,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,T.jsx)(SX,{section:e,keyPath:t,dictionaryLocalId:n}),wX=e=>{let t=(0,b.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=Bw(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,T.jsx)(xX,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},TX=e=>{let t=(0,b.c)(20),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=Rw(),{returnToDictionaryList:d}=xr(rX),{focusedContent:f,setFocusedContent:p}=Fw(),{setLocaleDictionary:m}=Mw(),h;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(h=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=h):h=t[4];let g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[5]=g):g=t[5],(0,v.useEffect)(h,g);let _;if(t[6]!==u?.internationalization.locales||t[7]!==n||t[8]!==i||t[9]!==a||t[10]!==r||t[11]!==o||t[12]!==s||t[13]!==d||t[14]!==p||t[15]!==l){let e;t[17]!==o||t[18]!==p?(e=()=>{p(null),o?.()},t[17]=o,t[18]=p,t[19]=e):e=t[19],_=(0,T.jsx)(ST,{availableLocales:u?.internationalization.locales??[],children:(0,T.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,T.jsx)(oS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:_u,label:d.label.value,children:d.text}),(0,T.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,T.jsxs)(dI,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[a.includes(`remote`)&&(0,T.jsx)(dI.Item,{label:`Details`,value:`details`,children:(0,T.jsx)(uX,{dictionary:n,mode:a})}),(0,T.jsx)(dI.Item,{label:`Structure`,value:`structure`,children:(0,T.jsx)(wX,{dictionary:n})}),(0,T.jsx)(dI.Item,{label:`Content`,value:`content`,children:(0,T.jsx)(nz,{dictionary:n,isDarkMode:i})}),(0,T.jsx)(dI.Item,{label:`JSON`,value:`json`,children:(0,T.jsx)(hX,{dictionary:n,isDarkMode:i})})]})}),(0,T.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,T.jsx)(aX,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,T.jsx)(nX,{dictionary:n,mode:a,onDelete:e,onSave:s})]})]})}),t[6]=u?.internationalization.locales,t[7]=n,t[8]=i,t[9]=a,t[10]=r,t[11]=o,t[12]=s,t[13]=d,t[14]=p,t[15]=l,t[16]=_}else _=t[16];return _},EX=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},DX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},OX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},kX=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},AX=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},jX=(e=`md`)=>{let t=EX(e),n=DX(),r=AX(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:OX(),isMac:kX()}},MX=e=>{let t=(0,b.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=jX(n),t[0]=n,t[1]=r);let[i,a]=(0,v.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(jX(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,v.useEffect)(o,s),i},NX=e=>{let t=(0,b.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,v.useRef)(``),p=(0,v.useRef)(null),[m,h]=(0,v.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,y;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(y=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=y):y=t[8];let x=y,S,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{_()},C=[],t[9]=S,t[10]=C):(S=t[9],C=t[10]),(0,v.useEffect)(S,C);let w=m.length>=l,T;return t[11]!==m||t[12]!==x||t[13]!==w?(T={setSearch:x,search:m,hasMinChars:w},t[11]=m,t[12]=x,t[13]=w,t[14]=T):T=t[14],T},PX=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},FX=()=>{let e=(0,b.c)(2),t=(0,v.useSyncExternalStore)(PX.subscribe,PX.getSnapshot,IX),n;return e[0]===t?n=e[1]:(n={open:PX.open,close:PX.close,set:PX.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function IX(){return{}}var LX={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},RX=e=>e.split(` + `).map(e=>e.trim()),zX=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,BX=(e,t)=>{let n=t.map(zX),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(zX(e)));if(!i)return!1;let a=zX(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},VX=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,HX=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},UX=e=>{let t=(0,b.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,u=a===void 0?!1:a,d=s===void 0?`md`:s,{isMac:f}=MX(),p;t[0]!==f||t[1]!==n?(p=RX(HX(n,f??!1)),t[0]=f,t[1]=n,t[2]=p):p=t[2];let m=p,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Set,t[3]=h):h=t[3];let[g,_]=(0,v.useState)(h),y,x;if(t[4]!==u||t[5]!==f||t[6]!==m||t[7]!==r?(y=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(f?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(VX(i))):a.add(i.toUpperCase()),_(a),!u&&r&&BX(e,m)){let t=m.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{_(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},x=[m,r,f,u],t[4]=u,t[5]=f,t[6]=m,t[7]=r,t[8]=y,t[9]=x):(y=t[8],x=t[9]),(0,v.useEffect)(y,x),!c)return null;let S;t[10]===g?S=t[11]:(S=e=>{let t=e.toUpperCase(),n=zX(e);return g.has(e)||g.has(t)||g.has(n)||e===`⌘`&&g.has(`Meta`)||e===`Ctrl`&&g.has(`Control`)||e===`⌥`&&g.has(`Alt`)||e===`Alt`&&g.has(`Alt`)||e===`←`&&g.has(`ArrowLeft`)||e===`→`&&g.has(`ArrowRight`)||e===`↑`&&g.has(`ArrowUp`)||e===`↓`&&g.has(`ArrowDown`)},t[10]=g,t[11]=S);let C=S,w;if(t[12]!==o||t[13]!==C||t[14]!==m||t[15]!==n||t[16]!==d){let e;t[18]!==C||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=VX(e);return(0,T.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,T.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,T.jsx)(`span`,{className:l(`min-w-4 px-0.5 text-center`,C(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=C,t[19]=n,t[20]=e):e=t[20],w=(0,T.jsx)(`kbd`,{className:l(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,d===`sm`&&`text-xs`,d===`md`&&`text-sm`,d===`lg`&&`text-base`,o),children:m.map(e)}),t[12]=o,t[13]=C,t[14]=m,t[15]=n,t[16]=d,t[17]=w}else w=t[17];return w},WX=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,T.jsx)(`div`,{className:l(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,T.jsx)(`div`,{style:{minWidth:`${n}px`},className:l(r===`right`&&`ml-auto`),children:e})}),GX=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},KX=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=xr(LX),{isMobile:d}=MX(`md`),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=pI(l),{open:h,close:g,isOpen:_}=FX(),y=_(t),b=y;vI({disableScroll:b,key:t?`right_drawer_${t}`:`right_drawer`}),(0,v.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=b&&a,r=e.target&&!f.current.contains(e.target),i=GX(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[b,g,c,a,t]);let x=(0,v.useRef)(c);return(0,v.useEffect)(()=>{x.current=c},[c]),(0,v.useEffect)(()=>{s!==void 0&&s!==y&&(s?h(t):(g(t),x.current?.()))},[s,y,t,h,g]),m?(0,kc.createPortal)((0,T.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,T.jsx)(WX,{isHidden:!b,align:`right`,children:(0,T.jsxs)(tS,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,T.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,T.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,T.jsx)(`div`,{children:o&&(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:xu,children:o?.text})}),(0,T.jsx)(`div`,{children:(0,T.jsxs)(JF,{identifier:`close-drawer`,children:[(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Wu,size:`icon-md`}),(0,T.jsx)(JF.Detail,{identifier:`close-drawer`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,T.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,T.jsx)(UX,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,T.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,T.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,T.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,T.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,T.jsx)(T.Fragment,{})},qX=ou(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`,"3xl":`rounded-3xl`,full:`rounded-full`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-red-500 bg-red-500/10 text-red-500 dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),JX=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,T.jsx)(`div`,{className:qX({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),YX=`dictionaryList`,XX=e=>`dictionary_edition_${e}`,ZX=e=>{let t=(0,b.c)(20),n;t[0]===e?n=t[1]:(n=XX(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=FX(),{getEditedContentValue:s}=zw(),{focusedContent:c,setFocusedContent:l}=Fw(),u,d;t[2]!==c||t[3]!==r||t[4]!==a?(u=()=>{c&&(c.keyPath?.length??0)>0&&a(r)},d=[c,a,r],t[2]=c,t[3]=r,t[4]=a,t[5]=u,t[6]=d):(u=t[5],d=t[6]),(0,v.useEffect)(u,d);let f;t[7]!==i||t[8]!==r?(f=i(r),t[7]=i,t[8]=r,t[9]=f):f=t[9];let p;t[10]!==o||t[11]!==c||t[12]!==r||t[13]!==l?(p=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[10]=o,t[11]=c,t[12]=r,t[13]=l,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==s||t[17]!==f||t[18]!==p?(m={isOpen:f,focusedContent:c,getEditedContentValue:s,close:p},t[15]=c,t[16]=s,t[17]=f,t[18]=p,t[19]=m):m=t[19],m},QX=e=>{let t=(0,b.c)(73),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=xr($x),l;t[0]===n?l=t[1]:(l=XX(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=ZX(n),{setFocusedContent:p}=Fw(),{open:m}=FX(),h;t[2]===m?h=t[3]:(h=()=>m(YX),t[2]=m,t[3]=h);let g=h,{data:_}=kO(),y;t[4]!==f||t[5]!==g||t[6]!==p?(y=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=y):y=t[7];let x=y,[S,C]=(0,v.useState)(!1),w;t[8]===x?w=t[9]:(w=()=>{C(!1),x()},t[8]=x,t[9]=w);let E=w;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let D,O,k,A,j,M,N,P,F,I;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==x||t[17]!==u||t[18]!==a||t[19]!==_){j=Symbol.for(`react.early_return_sentinel`);bb0:{if(O=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!O){let e;t[30]===c?e=t[31]:(e=(0,T.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[30]=c,t[31]=e),j=e;break bb0}D=KX,I=u,t[32]!==i.value||t[33]!==x?(k={onBack:x,text:i.value},t[32]=i.value,t[33]=x,t[34]=k):k=t[34],A=f;let e;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>C(!0),t[35]=e):e=t[35];let n;t[36]===a.label.value?n=t[37]:(n=(0,T.jsx)(oS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Lu,label:a.label.value,onClick:e}),t[36]=a.label.value,t[37]=n);let r;t[38]===a.popoverContent?r=t[39]:(r=(0,T.jsx)(JF.Detail,{identifier:`open-dictionary-editor`,children:(0,T.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[38]=a.popoverContent,t[39]=r);let o;t[40]!==n||t[41]!==r?(o=(0,T.jsxs)(JF,{identifier:`open-dictionary-editor`,children:[n,r]}),t[40]=n,t[41]=r,t[42]=o):o=t[42],F=(0,T.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,T.jsx)(`h3`,{className:`w-full text-center text-lg`,children:O.title?O.title:O.key}),o]}),M=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,N=(0,T.jsx)(JX,{color:`text`,roundedSize:`full`,size:`xs`,children:O.key}),P=O.filePath&&(0,T.jsx)(JX,{color:`blue`,roundedSize:`full`,size:`xs`,children:O.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=x,t[17]=u,t[18]=a,t[19]=_,t[20]=D,t[21]=O,t[22]=k,t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I}else D=t[20],O=t[21],k=t[22],A=t[23],j=t[24],M=t[25],N=t[26],P=t[27],F=t[28],I=t[29];if(j!==Symbol.for(`react.early_return_sentinel`))return j;let L;t[43]===O.id?L=t[44]:(L=O.id&&(0,T.jsx)(JX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[43]=O.id,t[44]=L);let R;t[45]!==L||t[46]!==M||t[47]!==N||t[48]!==P?(R=(0,T.jsxs)(`div`,{className:M,children:[N,P,L]}),t[45]=L,t[46]=M,t[47]=N,t[48]=P,t[49]=R):R=t[49];let ee;t[50]!==R||t[51]!==F?(ee=(0,T.jsxs)(T.Fragment,{children:[F,R]}),t[50]=R,t[51]=F,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[53]=te):te=t[53];let ne;t[54]!==O||t[55]!==x?(ne=(0,T.jsx)(nX,{dictionary:O,mode:te,className:`mb-4 flex-col px-3`,onDelete:x}),t[54]=O,t[55]=x,t[56]=ne):ne=t[56];let z;t[57]!==O||t[58]!==S||t[59]!==d||t[60]!==x||t[61]!==r||t[62]!==o||t[63]!==E?(z=d&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(SI,{isOpen:S,onClose:()=>C(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,T.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,T.jsx)(TX,{dictionary:O,onClickDictionaryList:E,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{C(!1),x()},onSave:()=>{C(!1)}})})}),(0,T.jsx)(_T,{dictionary:O})]}),t[57]=O,t[58]=S,t[59]=d,t[60]=x,t[61]=r,t[62]=o,t[63]=E,t[64]=z):z=t[64];let B;return t[65]!==D||t[66]!==k||t[67]!==A||t[68]!==ee||t[69]!==ne||t[70]!==z||t[71]!==I?(B=(0,T.jsx)(D,{identifier:I,backButton:k,onClose:A,header:ee,footer:ne,children:z}),t[65]=D,t[66]=k,t[67]=A,t[68]=ee,t[69]=ne,t[70]=z,t[71]=I,t[72]=B):B=t[72],B},$X=e=>{let t=(0,b.c)(4),{isDarkMode:n}=e,{focusedContent:r}=Fw(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(T.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,T.jsx)(QX,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},eZ={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},tZ=()=>{let{drawerTitle:e,buttonLabel:t}=xr(eZ),{set:n}=FX(),{localeDictionaries:r}=jw(),{editedContent:i}=Bw(),{setFocusedContent:a}=Fw(),{setSearch:o,search:s}=NX(),c=(0,v.useMemo)(()=>new XR(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,v.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[YX]:!1,[XX(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,T.jsxs)(KX,{title:e.label.value,identifier:YX,children:[(0,T.jsx)(`div`,{className:`p-3 pb-4`,children:(0,T.jsx)(cJ,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,T.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,T.jsx)(`li`,{className:`w-full`,children:(0,T.jsx)(oS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:Su,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Iu:void 0,children:(0,T.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,T.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,T.jsx)(JX,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,T.jsx)(JX,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,T.jsx)(JX,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,T.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},nZ={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},rZ=()=>{let e=(0,b.c)(8),{message:t}=xr(nZ),[n]=kw(OS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=l(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,T.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},iZ=e=>{let t=(0,b.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,T.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,T.jsx)(rZ,{})}),i=(0,T.jsx)($X,{}),a=(0,T.jsx)(tZ,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,T.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},aZ=()=>{let e=(0,b.c)(2),[t,n]=(0,v.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(oZ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,v.useEffect)(r,i),t};function oZ(e){return e.json()}var sZ=e=>{let t=(0,b.c)(11),{children:n,iframeRef:r}=e,i=aZ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(rS,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,T.jsx)(Iw,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},cZ={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},lZ=()=>{let e=(0,b.c)(9),{editedContent:t,setEditedContentState:n}=Bw(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,v.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,v.useEffect)(s,c),i},uZ={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},dZ=()=>{let e=(0,b.c)(11),{title:t,description:n,documentationLink:r}=xr(uZ),i;e[0]===t?i=e[1]:(i=(0,T.jsx)(_k,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,T.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,T.jsx)(nk,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,T.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},fZ=e=>{let t=(0,b.c)(23),{iframeRef:n,applicationPath:r}=e,i=xr(cZ),{editor:a}=Rw()??{},{enabled:o}=Vw(),s=Hw();lZ(),Ww();let[c,u]=(0,v.useState)(!0),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={receive:!0,emit:!1},t[0]=d):d=t[0];let[f]=Aw(void 0,d),p,m;if(t[1]===f?(p=t[2],m=t[3]):(p=()=>{typeof f==`string`&&window.history.replaceState({},``,f)},m=[f],t[1]=f,t[2]=p,t[3]=m),(0,v.useEffect)(p,m),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(tS,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,T.jsx)(dZ,{})}),t[4]=e):e=t[4],e}let h;t[5]===c?h=t[6]:(h=(0,T.jsx)(rS,{isLoading:c}),t[5]=c,t[6]=h);let g=`${a.applicationURL}${r}`,_=i.intlayerApplication.value,y=c&&`hidden`,x;t[7]===y?x=t[8]:(x=l(`size-full`,y),t[7]=y,t[8]=x);let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{u(!1)},t[9]=S):S=t[9];let C;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==g||t[13]!==x?(C=(0,T.jsx)(`iframe`,{src:g,title:_,sandbox:`allow-scripts allow-same-origin`,className:x,ref:n,onLoad:S}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=g,t[13]=x,t[14]=C):C=t[14];let w;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(w=!o&&(0,T.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,T.jsx)(oS,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=w):w=t[18];let E;return t[19]!==C||t[20]!==w||t[21]!==h?(E=(0,T.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[h,C,w]}),t[19]=C,t[20]=w,t[21]=h,t[22]=E):E=t[22],E},pZ=()=>{let e=(0,b.c)(2),t=(0,v.useRef)(null),n=Vi(),r;return e[0]===n.pathname?r=e[1]:(r=(0,T.jsx)(sZ,{iframeRef:t,children:(0,T.jsx)(yr,{disableEditor:!0,children:(0,T.jsx)(iZ,{children:(0,T.jsx)(fZ,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,y.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(v.StrictMode,{children:(0,T.jsx)(()=>{let e=(0,b.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(Qx,{children:(0,T.jsx)(Zx,{children:(0,T.jsx)(pZ,{})})}),e[0]=t):t=e[0],t},{})}));