const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunk_HighlightedCodeBlock.js","assets/HighlightedCodeBlock.css","assets/chunk_index.js","assets/index2.css","assets/chunk_OntologyGraph.js","assets/OntologyGraph.css"])))=>i.map(i=>d[i]);
function cP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var l0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c0e(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var cC={exports:{}},jh={},uC={exports:{}},qe={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var od=Symbol.for("react.element"),uP=Symbol.for("react.portal"),dP=Symbol.for("react.fragment"),pP=Symbol.for("react.strict_mode"),fP=Symbol.for("react.profiler"),hP=Symbol.for("react.provider"),mP=Symbol.for("react.context"),gP=Symbol.for("react.forward_ref"),vP=Symbol.for("react.suspense"),yP=Symbol.for("react.memo"),bP=Symbol.for("react.lazy"),Pw=Symbol.iterator;function xP(e){return e===null||typeof e!="object"?null:(e=Pw&&e[Pw]||e["@@iterator"],typeof e=="function"?e:null)}var dC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pC=Object.assign,fC={};function Yl(e,t,n){this.props=e,this.context=t,this.refs=fC,this.updater=n||dC}Yl.prototype.isReactComponent={};Yl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hC(){}hC.prototype=Yl.prototype;function Zy(e,t,n){this.props=e,this.context=t,this.refs=fC,this.updater=n||dC}var e2=Zy.prototype=new hC;e2.constructor=Zy;pC(e2,Yl.prototype);e2.isPureReactComponent=!0;var Tw=Array.isArray,mC=Object.prototype.hasOwnProperty,t2={current:null},gC={key:!0,ref:!0,__self:!0,__source:!0};function vC(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)mC.call(t,r)&&!gC.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:od,type:e,key:i,ref:s,props:o,_owner:t2.current}}function wP(e,t){return{$$typeof:od,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function n2(e){return typeof e=="object"&&e!==null&&e.$$typeof===od}function SP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dw=/\/+/g;function pg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SP(""+e.key):t.toString(36)}function Ep(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case od:case uP:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+pg(s,0):r,Tw(o)?(n="",e!=null&&(n=e.replace(Dw,"$&/")+"/"),Ep(o,t,n,"",function(u){return u})):o!=null&&(n2(o)&&(o=wP(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Dw,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Tw(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+pg(i,l);s+=Ep(i,t,n,c,o)}else if(c=xP(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+pg(i,l++),s+=Ep(i,t,n,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Fd(e,t,n){if(e==null)return e;var r=[],o=0;return Ep(e,r,"","",function(i){return t.call(n,i,o++)}),r}function CP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ar={current:null},_p={transition:null},jP={ReactCurrentDispatcher:ar,ReactCurrentBatchConfig:_p,ReactCurrentOwner:t2};function yC(){throw Error("act(...) is not supported in production builds of React.")}qe.Children={map:Fd,forEach:function(e,t,n){Fd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fd(e,function(){t++}),t},toArray:function(e){return Fd(e,function(t){return t})||[]},only:function(e){if(!n2(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};qe.Component=Yl;qe.Fragment=dP;qe.Profiler=fP;qe.PureComponent=Zy;qe.StrictMode=pP;qe.Suspense=vP;qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jP;qe.act=yC;qe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=pC({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=t2.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)mC.call(t,c)&&!gC.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:od,type:e.type,key:o,ref:i,props:r,_owner:s}};qe.createContext=function(e){return e={$$typeof:mP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hP,_context:e},e.Consumer=e};qe.createElement=vC;qe.createFactory=function(e){var t=vC.bind(null,e);return t.type=e,t};qe.createRef=function(){return{current:null}};qe.forwardRef=function(e){return{$$typeof:gP,render:e}};qe.isValidElement=n2;qe.lazy=function(e){return{$$typeof:bP,_payload:{_status:-1,_result:e},_init:CP}};qe.memo=function(e,t){return{$$typeof:yP,type:e,compare:t===void 0?null:t}};qe.startTransition=function(e){var t=_p.transition;_p.transition={};try{e()}finally{_p.transition=t}};qe.unstable_act=yC;qe.useCallback=function(e,t){return ar.current.useCallback(e,t)};qe.useContext=function(e){return ar.current.useContext(e)};qe.useDebugValue=function(){};qe.useDeferredValue=function(e){return ar.current.useDeferredValue(e)};qe.useEffect=function(e,t){return ar.current.useEffect(e,t)};qe.useId=function(){return ar.current.useId()};qe.useImperativeHandle=function(e,t,n){return ar.current.useImperativeHandle(e,t,n)};qe.useInsertionEffect=function(e,t){return ar.current.useInsertionEffect(e,t)};qe.useLayoutEffect=function(e,t){return ar.current.useLayoutEffect(e,t)};qe.useMemo=function(e,t){return ar.current.useMemo(e,t)};qe.useReducer=function(e,t,n){return ar.current.useReducer(e,t,n)};qe.useRef=function(e){return ar.current.useRef(e)};qe.useState=function(e){return ar.current.useState(e)};qe.useSyncExternalStore=function(e,t,n){return ar.current.useSyncExternalStore(e,t,n)};qe.useTransition=function(){return ar.current.useTransition()};qe.version="18.3.1";uC.exports=qe;var f=uC.exports;const ce=co(f),bC=cP({__proto__:null,default:ce},[f]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kP=f,EP=Symbol.for("react.element"),_P=Symbol.for("react.fragment"),IP=Object.prototype.hasOwnProperty,RP=kP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,AP={key:!0,ref:!0,__self:!0,__source:!0};function xC(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)IP.call(t,r)&&!AP.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:EP,type:e,key:i,ref:s,props:o,_owner:RP.current}}jh.Fragment=_P;jh.jsx=xC;jh.jsxs=xC;cC.exports=jh;var a=cC.exports,wC={exports:{}},Vr={},SC={exports:{}},CC={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(B,H){var N=B.length;B.push(H);e:for(;0<N;){var xe=N-1>>>1,fe=B[xe];if(0<o(fe,H))B[xe]=H,B[N]=fe,N=xe;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var H=B[0],N=B.pop();if(N!==H){B[0]=N;e:for(var xe=0,fe=B.length,O=fe>>>1;xe<O;){var Te=2*(xe+1)-1,Oe=B[Te],ke=Te+1,He=B[ke];if(0>o(Oe,N))ke<fe&&0>o(He,Oe)?(B[xe]=He,B[ke]=N,xe=ke):(B[xe]=Oe,B[Te]=N,xe=Te);else if(ke<fe&&0>o(He,N))B[xe]=He,B[ke]=N,xe=ke;else break e}}return H}function o(B,H){var N=B.sortIndex-H.sortIndex;return N!==0?N:B.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,p=null,h=3,m=!1,v=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=B)r(u),H.sortIndex=H.expirationTime,t(c,H);else break;H=n(u)}}function S(B){if(g=!1,w(B),!v)if(n(c)!==null)v=!0,ue(k);else{var H=n(u);H!==null&&K(S,H.startTime-B)}}function k(B,H){v=!1,g&&(g=!1,y(P),P=-1),m=!0;var N=h;try{for(w(H),p=n(c);p!==null&&(!(p.expirationTime>H)||B&&!F());){var xe=p.callback;if(typeof xe=="function"){p.callback=null,h=p.priorityLevel;var fe=xe(p.expirationTime<=H);H=e.unstable_now(),typeof fe=="function"?p.callback=fe:p===n(c)&&r(c),w(H)}else r(c);p=n(c)}if(p!==null)var O=!0;else{var Te=n(u);Te!==null&&K(S,Te.startTime-H),O=!1}return O}finally{p=null,h=N,m=!1}}var _=!1,I=null,P=-1,z=5,D=-1;function F(){return!(e.unstable_now()-D<z)}function $(){if(I!==null){var B=e.unstable_now();D=B;var H=!0;try{H=I(!0,B)}finally{H?Z():(_=!1,I=null)}}else _=!1}var Z;if(typeof x=="function")Z=function(){x($)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,W=ee.port2;ee.port1.onmessage=$,Z=function(){W.postMessage(null)}}else Z=function(){b($,0)};function ue(B){I=B,_||(_=!0,Z())}function K(B,H){P=b(function(){B(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,ue(k))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(B){switch(h){case 1:case 2:case 3:var H=3;break;default:H=h}var N=h;h=H;try{return B()}finally{h=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,H){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var N=h;h=B;try{return H()}finally{h=N}},e.unstable_scheduleCallback=function(B,H,N){var xe=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?xe+N:xe):N=xe,B){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=N+fe,B={id:d++,callback:H,priorityLevel:B,startTime:N,expirationTime:fe,sortIndex:-1},N>xe?(B.sortIndex=N,t(u,B),n(c)===null&&B===n(u)&&(g?(y(P),P=-1):g=!0,K(S,N-xe))):(B.sortIndex=fe,t(c,B),v||m||(v=!0,ue(k))),B},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(B){var H=h;return function(){var N=h;h=H;try{return B.apply(this,arguments)}finally{h=N}}}})(CC);SC.exports=CC;var PP=SC.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var TP=f,Ur=PP;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jC=new Set,vu={};function xa(e,t){El(e,t),El(e+"Capture",t)}function El(e,t){for(vu[e]=t,e=0;e<t.length;e++)jC.add(t[e])}var Ci=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v1=Object.prototype.hasOwnProperty,DP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nw={},Ow={};function NP(e){return v1.call(Ow,e)?!0:v1.call(Nw,e)?!1:DP.test(e)?Ow[e]=!0:(Nw[e]=!0,!1)}function OP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LP(e,t,n,r){if(t===null||typeof t>"u"||OP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lr(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nn[e]=new lr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nn[t]=new lr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nn[e]=new lr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nn[e]=new lr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Nn[e]=new lr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nn[e]=new lr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nn[e]=new lr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nn[e]=new lr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nn[e]=new lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var r2=/[\-:]([a-z])/g;function o2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(r2,o2);Nn[t]=new lr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(r2,o2);Nn[t]=new lr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(r2,o2);Nn[t]=new lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nn[e]=new lr(e,1,!1,e.toLowerCase(),null,!1,!1)});Nn.xlinkHref=new lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nn[e]=new lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function i2(e,t,n,r){var o=Nn.hasOwnProperty(t)?Nn[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LP(t,n,o,r)&&(n=null),r||o===null?NP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ti=TP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Md=Symbol.for("react.element"),Ya=Symbol.for("react.portal"),Xa=Symbol.for("react.fragment"),s2=Symbol.for("react.strict_mode"),y1=Symbol.for("react.profiler"),kC=Symbol.for("react.provider"),EC=Symbol.for("react.context"),a2=Symbol.for("react.forward_ref"),b1=Symbol.for("react.suspense"),x1=Symbol.for("react.suspense_list"),l2=Symbol.for("react.memo"),Yi=Symbol.for("react.lazy"),_C=Symbol.for("react.offscreen"),Lw=Symbol.iterator;function _c(e){return e===null||typeof e!="object"?null:(e=Lw&&e[Lw]||e["@@iterator"],typeof e=="function"?e:null)}var Ot=Object.assign,fg;function Bc(e){if(fg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fg=t&&t[1]||""}return`
`+fg+e}var hg=!1;function mg(e,t){if(!e||hg)return"";hg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
`),i=r.stack.split(`
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var c=`
`+o[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{hg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bc(e):""}function zP(e){switch(e.tag){case 5:return Bc(e.type);case 16:return Bc("Lazy");case 13:return Bc("Suspense");case 19:return Bc("SuspenseList");case 0:case 2:case 15:return e=mg(e.type,!1),e;case 11:return e=mg(e.type.render,!1),e;case 1:return e=mg(e.type,!0),e;default:return""}}function w1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xa:return"Fragment";case Ya:return"Portal";case y1:return"Profiler";case s2:return"StrictMode";case b1:return"Suspense";case x1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case EC:return(e.displayName||"Context")+".Consumer";case kC:return(e._context.displayName||"Context")+".Provider";case a2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case l2:return t=e.displayName||null,t!==null?t:w1(e.type)||"Memo";case Yi:t=e._payload,e=e._init;try{return w1(e(t))}catch{}}return null}function FP(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w1(t);case 8:return t===s2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function bs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function IC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MP(e){var t=IC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $d(e){e._valueTracker||(e._valueTracker=MP(e))}function RC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=IC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function S1(e,t){var n=t.checked;return Ot({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=bs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function AC(e,t){t=t.checked,t!=null&&i2(e,"checked",t,!1)}function C1(e,t){AC(e,t);var n=bs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?j1(e,t.type,n):t.hasOwnProperty("defaultValue")&&j1(e,t.type,bs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function j1(e,t,n){(t!=="number"||uf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hc=Array.isArray;function dl(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+bs(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function k1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Ot({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(Hc(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:bs(n)}}function PC(e,t){var n=bs(t.value),r=bs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function $w(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function TC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function E1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?TC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bd,DC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Bd=Bd||document.createElement("div"),Bd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Bd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$P=["Webkit","ms","Moz","O"];Object.keys(Xc).forEach(function(e){$P.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xc[t]=Xc[e]})});function NC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xc.hasOwnProperty(e)&&Xc[e]?(""+t).trim():t+"px"}function OC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=NC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var BP=Ot({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _1(e,t){if(t){if(BP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function I1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var R1=null;function c2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var A1=null,pl=null,fl=null;function Bw(e){if(e=ad(e)){if(typeof A1!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Rh(t),A1(e.stateNode,e.type,t))}}function LC(e){pl?fl?fl.push(e):fl=[e]:pl=e}function zC(){if(pl){var e=pl,t=fl;if(fl=pl=null,Bw(e),t)for(e=0;e<t.length;e++)Bw(t[e])}}function FC(e,t){return e(t)}function MC(){}var gg=!1;function $C(e,t,n){if(gg)return e(t,n);gg=!0;try{return FC(e,t,n)}finally{gg=!1,(pl!==null||fl!==null)&&(MC(),zC())}}function bu(e,t){var n=e.stateNode;if(n===null)return null;var r=Rh(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ae(231,t,typeof n));return n}var P1=!1;if(Ci)try{var Ic={};Object.defineProperty(Ic,"passive",{get:function(){P1=!0}}),window.addEventListener("test",Ic,Ic),window.removeEventListener("test",Ic,Ic)}catch{P1=!1}function HP(e,t,n,r,o,i,s,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Qc=!1,df=null,pf=!1,T1=null,UP={onError:function(e){Qc=!0,df=e}};function WP(e,t,n,r,o,i,s,l,c){Qc=!1,df=null,HP.apply(UP,arguments)}function VP(e,t,n,r,o,i,s,l,c){if(WP.apply(this,arguments),Qc){if(Qc){var u=df;Qc=!1,df=null}else throw Error(ae(198));pf||(pf=!0,T1=u)}}function wa(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function BC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Hw(e){if(wa(e)!==e)throw Error(ae(188))}function qP(e){var t=e.alternate;if(!t){if(t=wa(e),t===null)throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Hw(o),e;if(i===r)return Hw(o),t;i=i.sibling}throw Error(ae(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function HC(e){return e=qP(e),e!==null?UC(e):null}function UC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=UC(e);if(t!==null)return t;e=e.sibling}return null}var WC=Ur.unstable_scheduleCallback,Uw=Ur.unstable_cancelCallback,GP=Ur.unstable_shouldYield,KP=Ur.unstable_requestPaint,Gt=Ur.unstable_now,YP=Ur.unstable_getCurrentPriorityLevel,u2=Ur.unstable_ImmediatePriority,VC=Ur.unstable_UserBlockingPriority,ff=Ur.unstable_NormalPriority,XP=Ur.unstable_LowPriority,qC=Ur.unstable_IdlePriority,kh=null,Yo=null;function QP(e){if(Yo&&typeof Yo.onCommitFiberRoot=="function")try{Yo.onCommitFiberRoot(kh,e,void 0,(e.current.flags&128)===128)}catch{}}var So=Math.clz32?Math.clz32:eT,JP=Math.log,ZP=Math.LN2;function eT(e){return e>>>=0,e===0?32:31-(JP(e)/ZP|0)|0}var Hd=64,Ud=4194304;function Uc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Uc(l):(i&=s,i!==0&&(r=Uc(i)))}else s=n&~o,s!==0?r=Uc(s):i!==0&&(r=Uc(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-So(t),o=1<<n,r|=e[n],t&=~o;return r}function tT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-So(i),l=1<<s,c=o[s];c===-1?(!(l&n)||l&r)&&(o[s]=tT(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function D1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function GC(){var e=Hd;return Hd<<=1,!(Hd&4194240)&&(Hd=64),e}function vg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function id(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-So(t),e[t]=n}function rT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-So(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function d2(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-So(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var dt=0;function KC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var YC,p2,XC,QC,JC,N1=!1,Wd=[],as=null,ls=null,cs=null,xu=new Map,wu=new Map,Zi=[],oT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ww(e,t){switch(e){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":xu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wu.delete(t.pointerId)}}function Rc(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ad(t),t!==null&&p2(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function iT(e,t,n,r,o){switch(t){case"focusin":return as=Rc(as,e,t,n,r,o),!0;case"dragenter":return ls=Rc(ls,e,t,n,r,o),!0;case"mouseover":return cs=Rc(cs,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return xu.set(i,Rc(xu.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,wu.set(i,Rc(wu.get(i)||null,e,t,n,r,o)),!0}return!1}function ZC(e){var t=Ks(e.target);if(t!==null){var n=wa(t);if(n!==null){if(t=n.tag,t===13){if(t=BC(n),t!==null){e.blockedOn=t,JC(e.priority,function(){XC(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=O1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);R1=r,n.target.dispatchEvent(r),R1=null}else return t=ad(n),t!==null&&p2(t),e.blockedOn=n,!1;t.shift()}return!0}function Vw(e,t,n){Ip(e)&&n.delete(t)}function sT(){N1=!1,as!==null&&Ip(as)&&(as=null),ls!==null&&Ip(ls)&&(ls=null),cs!==null&&Ip(cs)&&(cs=null),xu.forEach(Vw),wu.forEach(Vw)}function Ac(e,t){e.blockedOn===t&&(e.blockedOn=null,N1||(N1=!0,Ur.unstable_scheduleCallback(Ur.unstable_NormalPriority,sT)))}function Su(e){function t(o){return Ac(o,e)}if(0<Wd.length){Ac(Wd[0],e);for(var n=1;n<Wd.length;n++){var r=Wd[n];r.blockedOn===e&&(r.blockedOn=null)}}for(as!==null&&Ac(as,e),ls!==null&&Ac(ls,e),cs!==null&&Ac(cs,e),xu.forEach(t),wu.forEach(t),n=0;n<Zi.length;n++)r=Zi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zi.length&&(n=Zi[0],n.blockedOn===null);)ZC(n),n.blockedOn===null&&Zi.shift()}var hl=Ti.ReactCurrentBatchConfig,mf=!0;function aT(e,t,n,r){var o=dt,i=hl.transition;hl.transition=null;try{dt=1,f2(e,t,n,r)}finally{dt=o,hl.transition=i}}function lT(e,t,n,r){var o=dt,i=hl.transition;hl.transition=null;try{dt=4,f2(e,t,n,r)}finally{dt=o,hl.transition=i}}function f2(e,t,n,r){if(mf){var o=O1(e,t,n,r);if(o===null)_g(e,t,r,gf,n),Ww(e,r);else if(iT(o,e,t,n,r))r.stopPropagation();else if(Ww(e,r),t&4&&-1<oT.indexOf(e)){for(;o!==null;){var i=ad(o);if(i!==null&&YC(i),i=O1(e,t,n,r),i===null&&_g(e,t,r,gf,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else _g(e,t,r,null,n)}}var gf=null;function O1(e,t,n,r){if(gf=null,e=c2(r),e=Ks(e),e!==null)if(t=wa(e),t===null)e=null;else if(n=t.tag,n===13){if(e=BC(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return gf=e,null}function ej(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(YP()){case u2:return 1;case VC:return 4;case ff:case XP:return 16;case qC:return 536870912;default:return 16}default:return 16}}var rs=null,h2=null,Rp=null;function tj(){if(Rp)return Rp;var e,t=h2,n=t.length,r,o="value"in rs?rs.value:rs.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Rp=o.slice(e,1<r?1-r:void 0)}function Ap(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Vd(){return!0}function qw(){return!1}function qr(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Vd:qw,this.isPropagationStopped=qw,this}return Ot(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Vd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),t}var Xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},m2=qr(Xl),sd=Ot({},Xl,{view:0,detail:0}),cT=qr(sd),yg,bg,Pc,Eh=Ot({},sd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:g2,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Pc&&(Pc&&e.type==="mousemove"?(yg=e.screenX-Pc.screenX,bg=e.screenY-Pc.screenY):bg=yg=0,Pc=e),yg)},movementY:function(e){return"movementY"in e?e.movementY:bg}}),Gw=qr(Eh),uT=Ot({},Eh,{dataTransfer:0}),dT=qr(uT),pT=Ot({},sd,{relatedTarget:0}),xg=qr(pT),fT=Ot({},Xl,{animationName:0,elapsedTime:0,pseudoElement:0}),hT=qr(fT),mT=Ot({},Xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gT=qr(mT),vT=Ot({},Xl,{data:0}),Kw=qr(vT),yT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bT={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xT[e])?!!t[e]:!1}function g2(){return wT}var ST=Ot({},sd,{key:function(e){if(e.key){var t=yT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ap(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:g2,charCode:function(e){return e.type==="keypress"?Ap(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ap(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CT=qr(ST),jT=Ot({},Eh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yw=qr(jT),kT=Ot({},sd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:g2}),ET=qr(kT),_T=Ot({},Xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),IT=qr(_T),RT=Ot({},Eh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),AT=qr(RT),PT=[9,13,27,32],v2=Ci&&"CompositionEvent"in window,Jc=null;Ci&&"documentMode"in document&&(Jc=document.documentMode);var TT=Ci&&"TextEvent"in window&&!Jc,nj=Ci&&(!v2||Jc&&8<Jc&&11>=Jc),Xw=" ",Qw=!1;function rj(e,t){switch(e){case"keyup":return PT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qa=!1;function DT(e,t){switch(e){case"compositionend":return oj(t);case"keypress":return t.which!==32?null:(Qw=!0,Xw);case"textInput":return e=t.data,e===Xw&&Qw?null:e;default:return null}}function NT(e,t){if(Qa)return e==="compositionend"||!v2&&rj(e,t)?(e=tj(),Rp=h2=rs=null,Qa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nj&&t.locale!=="ko"?null:t.data;default:return null}}var OT={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OT[e.type]:t==="textarea"}function ij(e,t,n,r){LC(r),t=vf(t,"onChange"),0<t.length&&(n=new m2("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zc=null,Cu=null;function LT(e){gj(e,0)}function _h(e){var t=el(e);if(RC(t))return e}function zT(e,t){if(e==="change")return t}var sj=!1;if(Ci){var wg;if(Ci){var Sg="oninput"in document;if(!Sg){var Zw=document.createElement("div");Zw.setAttribute("oninput","return;"),Sg=typeof Zw.oninput=="function"}wg=Sg}else wg=!1;sj=wg&&(!document.documentMode||9<document.documentMode)}function e4(){Zc&&(Zc.detachEvent("onpropertychange",aj),Cu=Zc=null)}function aj(e){if(e.propertyName==="value"&&_h(Cu)){var t=[];ij(t,Cu,e,c2(e)),$C(LT,t)}}function FT(e,t,n){e==="focusin"?(e4(),Zc=t,Cu=n,Zc.attachEvent("onpropertychange",aj)):e==="focusout"&&e4()}function MT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _h(Cu)}function $T(e,t){if(e==="click")return _h(t)}function BT(e,t){if(e==="input"||e==="change")return _h(t)}function HT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _o=typeof Object.is=="function"?Object.is:HT;function ju(e,t){if(_o(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!v1.call(t,o)||!_o(e[o],t[o]))return!1}return!0}function t4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function n4(e,t){var n=t4(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=t4(n)}}function lj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cj(){for(var e=window,t=uf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uf(e.document)}return t}function y2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function UT(e){var t=cj(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lj(n.ownerDocument.documentElement,n)){if(r!==null&&y2(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=n4(n,i);var s=n4(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var WT=Ci&&"documentMode"in document&&11>=document.documentMode,Ja=null,L1=null,eu=null,z1=!1;function r4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;z1||Ja==null||Ja!==uf(r)||(r=Ja,"selectionStart"in r&&y2(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),eu&&ju(eu,r)||(eu=r,r=vf(L1,"onSelect"),0<r.length&&(t=new m2("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ja)))}function qd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Za={animationend:qd("Animation","AnimationEnd"),animationiteration:qd("Animation","AnimationIteration"),animationstart:qd("Animation","AnimationStart"),transitionend:qd("Transition","TransitionEnd")},Cg={},uj={};Ci&&(uj=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function Ih(e){if(Cg[e])return Cg[e];if(!Za[e])return e;var t=Za[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in uj)return Cg[e]=t[n];return e}var dj=Ih("animationend"),pj=Ih("animationiteration"),fj=Ih("animationstart"),hj=Ih("transitionend"),mj=new Map,o4="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rs(e,t){mj.set(e,t),xa(t,[e])}for(var jg=0;jg<o4.length;jg++){var kg=o4[jg],VT=kg.toLowerCase(),qT=kg[0].toUpperCase()+kg.slice(1);Rs(VT,"on"+qT)}Rs(dj,"onAnimationEnd");Rs(pj,"onAnimationIteration");Rs(fj,"onAnimationStart");Rs("dblclick","onDoubleClick");Rs("focusin","onFocus");Rs("focusout","onBlur");Rs(hj,"onTransitionEnd");El("onMouseEnter",["mouseout","mouseover"]);El("onMouseLeave",["mouseout","mouseover"]);El("onPointerEnter",["pointerout","pointerover"]);El("onPointerLeave",["pointerout","pointerover"]);xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));xa("onBeforeInput",["compositionend","keypress","textInput","paste"]);xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wc));function i4(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,VP(r,t,void 0,e),e.currentTarget=null}function gj(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&o.isPropagationStopped())break e;i4(o,l,u),i=c}else for(s=0;s<r.length;s++){if(l=r[s],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&o.isPropagationStopped())break e;i4(o,l,u),i=c}}}if(pf)throw e=T1,pf=!1,T1=null,e}function wt(e,t){var n=t[H1];n===void 0&&(n=t[H1]=new Set);var r=e+"__bubble";n.has(r)||(vj(t,e,2,!1),n.add(r))}function Eg(e,t,n){var r=0;t&&(r|=4),vj(n,e,r,t)}var Gd="_reactListening"+Math.random().toString(36).slice(2);function ku(e){if(!e[Gd]){e[Gd]=!0,jC.forEach(function(n){n!=="selectionchange"&&(GT.has(n)||Eg(n,!1,e),Eg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gd]||(t[Gd]=!0,Eg("selectionchange",!1,t))}}function vj(e,t,n,r){switch(ej(t)){case 1:var o=aT;break;case 4:o=lT;break;default:o=f2}n=o.bind(null,t,n,e),o=void 0,!P1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function _g(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;s=s.return}for(;l!==null;){if(s=Ks(l),s===null)return;if(c=s.tag,c===5||c===6){r=i=s;continue e}l=l.parentNode}}r=r.return}$C(function(){var u=i,d=c2(n),p=[];e:{var h=mj.get(e);if(h!==void 0){var m=m2,v=e;switch(e){case"keypress":if(Ap(n)===0)break e;case"keydown":case"keyup":m=CT;break;case"focusin":v="focus",m=xg;break;case"focusout":v="blur",m=xg;break;case"beforeblur":case"afterblur":m=xg;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=dT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=ET;break;case dj:case pj:case fj:m=hT;break;case hj:m=IT;break;case"scroll":m=cT;break;case"wheel":m=AT;break;case"copy":case"cut":case"paste":m=gT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Yw}var g=(t&4)!==0,b=!g&&e==="scroll",y=g?h!==null?h+"Capture":null:h;g=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=bu(x,y),S!=null&&g.push(Eu(x,S,w)))),b)break;x=x.return}0<g.length&&(h=new m(h,v,null,n,d),p.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==R1&&(v=n.relatedTarget||n.fromElement)&&(Ks(v)||v[ji]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=u,v=v?Ks(v):null,v!==null&&(b=wa(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(g=Gw,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=Yw,S="onPointerLeave",y="onPointerEnter",x="pointer"),b=m==null?h:el(m),w=v==null?h:el(v),h=new g(S,x+"leave",m,n,d),h.target=b,h.relatedTarget=w,S=null,Ks(d)===u&&(g=new g(y,x+"enter",v,n,d),g.target=w,g.relatedTarget=b,S=g),b=S,m&&v)t:{for(g=m,y=v,x=0,w=g;w;w=Oa(w))x++;for(w=0,S=y;S;S=Oa(S))w++;for(;0<x-w;)g=Oa(g),x--;for(;0<w-x;)y=Oa(y),w--;for(;x--;){if(g===y||y!==null&&g===y.alternate)break t;g=Oa(g),y=Oa(y)}g=null}else g=null;m!==null&&s4(p,h,m,g,!1),v!==null&&b!==null&&s4(p,b,v,g,!0)}}e:{if(h=u?el(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var k=zT;else if(Jw(h))if(sj)k=BT;else{k=MT;var _=FT}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=$T);if(k&&(k=k(e,u))){ij(p,k,n,d);break e}_&&_(e,h,u),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&j1(h,"number",h.value)}switch(_=u?el(u):window,e){case"focusin":(Jw(_)||_.contentEditable==="true")&&(Ja=_,L1=u,eu=null);break;case"focusout":eu=L1=Ja=null;break;case"mousedown":z1=!0;break;case"contextmenu":case"mouseup":case"dragend":z1=!1,r4(p,n,d);break;case"selectionchange":if(WT)break;case"keydown":case"keyup":r4(p,n,d)}var I;if(v2)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Qa?rj(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(nj&&n.locale!=="ko"&&(Qa||P!=="onCompositionStart"?P==="onCompositionEnd"&&Qa&&(I=tj()):(rs=d,h2="value"in rs?rs.value:rs.textContent,Qa=!0)),_=vf(u,P),0<_.length&&(P=new Kw(P,e,null,n,d),p.push({event:P,listeners:_}),I?P.data=I:(I=oj(n),I!==null&&(P.data=I)))),(I=TT?DT(e,n):NT(e,n))&&(u=vf(u,"onBeforeInput"),0<u.length&&(d=new Kw("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:u}),d.data=I))}gj(p,t)})}function Eu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vf(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=bu(e,n),i!=null&&r.unshift(Eu(e,i,o)),i=bu(e,t),i!=null&&r.push(Eu(e,i,o))),e=e.return}return r}function Oa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function s4(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=bu(n,i),c!=null&&s.unshift(Eu(n,c,l))):o||(c=bu(n,i),c!=null&&s.push(Eu(n,c,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var KT=/\r\n?/g,YT=/\u0000|\uFFFD/g;function a4(e){return(typeof e=="string"?e:""+e).replace(KT,`
`).replace(YT,"")}function Kd(e,t,n){if(t=a4(t),a4(e)!==t&&n)throw Error(ae(425))}function yf(){}var F1=null,M1=null;function $1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var B1=typeof setTimeout=="function"?setTimeout:void 0,XT=typeof clearTimeout=="function"?clearTimeout:void 0,l4=typeof Promise=="function"?Promise:void 0,QT=typeof queueMicrotask=="function"?queueMicrotask:typeof l4<"u"?function(e){return l4.resolve(null).then(e).catch(JT)}:B1;function JT(e){setTimeout(function(){throw e})}function Ig(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Su(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Su(t)}function us(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function c4(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ql=Math.random().toString(36).slice(2),Wo="__reactFiber$"+Ql,_u="__reactProps$"+Ql,ji="__reactContainer$"+Ql,H1="__reactEvents$"+Ql,ZT="__reactListeners$"+Ql,eD="__reactHandles$"+Ql;function Ks(e){var t=e[Wo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ji]||n[Wo]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=c4(e);e!==null;){if(n=e[Wo])return n;e=c4(e)}return t}e=n,n=e.parentNode}return null}function ad(e){return e=e[Wo]||e[ji],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function el(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Rh(e){return e[_u]||null}var U1=[],tl=-1;function As(e){return{current:e}}function Ct(e){0>tl||(e.current=U1[tl],U1[tl]=null,tl--)}function vt(e,t){tl++,U1[tl]=e.current,e.current=t}var xs={},Vn=As(xs),br=As(!1),sa=xs;function _l(e,t){var n=e.type.contextTypes;if(!n)return xs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function xr(e){return e=e.childContextTypes,e!=null}function bf(){Ct(br),Ct(Vn)}function u4(e,t,n){if(Vn.current!==xs)throw Error(ae(168));vt(Vn,t),vt(br,n)}function yj(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ae(108,FP(e)||"Unknown",o));return Ot({},n,r)}function xf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xs,sa=Vn.current,vt(Vn,e),vt(br,br.current),!0}function d4(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=yj(e,t,sa),r.__reactInternalMemoizedMergedChildContext=e,Ct(br),Ct(Vn),vt(Vn,e)):Ct(br),vt(br,n)}var mi=null,Ah=!1,Rg=!1;function bj(e){mi===null?mi=[e]:mi.push(e)}function tD(e){Ah=!0,bj(e)}function Ps(){if(!Rg&&mi!==null){Rg=!0;var e=0,t=dt;try{var n=mi;for(dt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mi=null,Ah=!1}catch(o){throw mi!==null&&(mi=mi.slice(e+1)),WC(u2,Ps),o}finally{dt=t,Rg=!1}}return null}var nl=[],rl=0,wf=null,Sf=0,Jr=[],Zr=0,aa=null,gi=1,vi="";function Hs(e,t){nl[rl++]=Sf,nl[rl++]=wf,wf=e,Sf=t}function xj(e,t,n){Jr[Zr++]=gi,Jr[Zr++]=vi,Jr[Zr++]=aa,aa=e;var r=gi;e=vi;var o=32-So(r)-1;r&=~(1<<o),n+=1;var i=32-So(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,gi=1<<32-So(t)+o|n<<o|r,vi=i+e}else gi=1<<i|n<<o|r,vi=e}function b2(e){e.return!==null&&(Hs(e,1),xj(e,1,0))}function x2(e){for(;e===wf;)wf=nl[--rl],nl[rl]=null,Sf=nl[--rl],nl[rl]=null;for(;e===aa;)aa=Jr[--Zr],Jr[Zr]=null,vi=Jr[--Zr],Jr[Zr]=null,gi=Jr[--Zr],Jr[Zr]=null}var $r=null,zr=null,_t=!1,wo=null;function wj(e,t){var n=to(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function p4(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$r=e,zr=us(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$r=e,zr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=aa!==null?{id:gi,overflow:vi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=to(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$r=e,zr=null,!0):!1;default:return!1}}function W1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function V1(e){if(_t){var t=zr;if(t){var n=t;if(!p4(e,t)){if(W1(e))throw Error(ae(418));t=us(n.nextSibling);var r=$r;t&&p4(e,t)?wj(r,n):(e.flags=e.flags&-4097|2,_t=!1,$r=e)}}else{if(W1(e))throw Error(ae(418));e.flags=e.flags&-4097|2,_t=!1,$r=e}}}function f4(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$r=e}function Yd(e){if(e!==$r)return!1;if(!_t)return f4(e),_t=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$1(e.type,e.memoizedProps)),t&&(t=zr)){if(W1(e))throw Sj(),Error(ae(418));for(;t;)wj(e,t),t=us(t.nextSibling)}if(f4(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){zr=us(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}zr=null}}else zr=$r?us(e.stateNode.nextSibling):null;return!0}function Sj(){for(var e=zr;e;)e=us(e.nextSibling)}function Il(){zr=$r=null,_t=!1}function w2(e){wo===null?wo=[e]:wo.push(e)}var nD=Ti.ReactCurrentBatchConfig;function Tc(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function Xd(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function h4(e){var t=e._init;return t(e._payload)}function Cj(e){function t(y,x){if(e){var w=y.deletions;w===null?(y.deletions=[x],y.flags|=16):w.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function o(y,x){return y=hs(y,x),y.index=0,y.sibling=null,y}function i(y,x,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<x?(y.flags|=2,x):w):(y.flags|=2,x)):(y.flags|=1048576,x)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,w,S){return x===null||x.tag!==6?(x=Lg(w,y.mode,S),x.return=y,x):(x=o(x,w),x.return=y,x)}function c(y,x,w,S){var k=w.type;return k===Xa?d(y,x,w.props.children,S,w.key):x!==null&&(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Yi&&h4(k)===x.type)?(S=o(x,w.props),S.ref=Tc(y,x,w),S.return=y,S):(S=zp(w.type,w.key,w.props,null,y.mode,S),S.ref=Tc(y,x,w),S.return=y,S)}function u(y,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=zg(w,y.mode,S),x.return=y,x):(x=o(x,w.children||[]),x.return=y,x)}function d(y,x,w,S,k){return x===null||x.tag!==7?(x=ea(w,y.mode,S,k),x.return=y,x):(x=o(x,w),x.return=y,x)}function p(y,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Lg(""+x,y.mode,w),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Md:return w=zp(x.type,x.key,x.props,null,y.mode,w),w.ref=Tc(y,null,x),w.return=y,w;case Ya:return x=zg(x,y.mode,w),x.return=y,x;case Yi:var S=x._init;return p(y,S(x._payload),w)}if(Hc(x)||_c(x))return x=ea(x,y.mode,w,null),x.return=y,x;Xd(y,x)}return null}function h(y,x,w,S){var k=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:l(y,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Md:return w.key===k?c(y,x,w,S):null;case Ya:return w.key===k?u(y,x,w,S):null;case Yi:return k=w._init,h(y,x,k(w._payload),S)}if(Hc(w)||_c(w))return k!==null?null:d(y,x,w,S,null);Xd(y,w)}return null}function m(y,x,w,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,l(x,y,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Md:return y=y.get(S.key===null?w:S.key)||null,c(x,y,S,k);case Ya:return y=y.get(S.key===null?w:S.key)||null,u(x,y,S,k);case Yi:var _=S._init;return m(y,x,w,_(S._payload),k)}if(Hc(S)||_c(S))return y=y.get(w)||null,d(x,y,S,k,null);Xd(x,S)}return null}function v(y,x,w,S){for(var k=null,_=null,I=x,P=x=0,z=null;I!==null&&P<w.length;P++){I.index>P?(z=I,I=null):z=I.sibling;var D=h(y,I,w[P],S);if(D===null){I===null&&(I=z);break}e&&I&&D.alternate===null&&t(y,I),x=i(D,x,P),_===null?k=D:_.sibling=D,_=D,I=z}if(P===w.length)return n(y,I),_t&&Hs(y,P),k;if(I===null){for(;P<w.length;P++)I=p(y,w[P],S),I!==null&&(x=i(I,x,P),_===null?k=I:_.sibling=I,_=I);return _t&&Hs(y,P),k}for(I=r(y,I);P<w.length;P++)z=m(I,y,P,w[P],S),z!==null&&(e&&z.alternate!==null&&I.delete(z.key===null?P:z.key),x=i(z,x,P),_===null?k=z:_.sibling=z,_=z);return e&&I.forEach(function(F){return t(y,F)}),_t&&Hs(y,P),k}function g(y,x,w,S){var k=_c(w);if(typeof k!="function")throw Error(ae(150));if(w=k.call(w),w==null)throw Error(ae(151));for(var _=k=null,I=x,P=x=0,z=null,D=w.next();I!==null&&!D.done;P++,D=w.next()){I.index>P?(z=I,I=null):z=I.sibling;var F=h(y,I,D.value,S);if(F===null){I===null&&(I=z);break}e&&I&&F.alternate===null&&t(y,I),x=i(F,x,P),_===null?k=F:_.sibling=F,_=F,I=z}if(D.done)return n(y,I),_t&&Hs(y,P),k;if(I===null){for(;!D.done;P++,D=w.next())D=p(y,D.value,S),D!==null&&(x=i(D,x,P),_===null?k=D:_.sibling=D,_=D);return _t&&Hs(y,P),k}for(I=r(y,I);!D.done;P++,D=w.next())D=m(I,y,P,D.value,S),D!==null&&(e&&D.alternate!==null&&I.delete(D.key===null?P:D.key),x=i(D,x,P),_===null?k=D:_.sibling=D,_=D);return e&&I.forEach(function($){return t(y,$)}),_t&&Hs(y,P),k}function b(y,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Xa&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Md:e:{for(var k=w.key,_=x;_!==null;){if(_.key===k){if(k=w.type,k===Xa){if(_.tag===7){n(y,_.sibling),x=o(_,w.props.children),x.return=y,y=x;break e}}else if(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Yi&&h4(k)===_.type){n(y,_.sibling),x=o(_,w.props),x.ref=Tc(y,_,w),x.return=y,y=x;break e}n(y,_);break}else t(y,_);_=_.sibling}w.type===Xa?(x=ea(w.props.children,y.mode,S,w.key),x.return=y,y=x):(S=zp(w.type,w.key,w.props,null,y.mode,S),S.ref=Tc(y,x,w),S.return=y,y=S)}return s(y);case Ya:e:{for(_=w.key;x!==null;){if(x.key===_)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(y,x.sibling),x=o(x,w.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=zg(w,y.mode,S),x.return=y,y=x}return s(y);case Yi:return _=w._init,b(y,x,_(w._payload),S)}if(Hc(w))return v(y,x,w,S);if(_c(w))return g(y,x,w,S);Xd(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(y,x.sibling),x=o(x,w),x.return=y,y=x):(n(y,x),x=Lg(w,y.mode,S),x.return=y,y=x),s(y)):n(y,x)}return b}var Rl=Cj(!0),jj=Cj(!1),Cf=As(null),jf=null,ol=null,S2=null;function C2(){S2=ol=jf=null}function j2(e){var t=Cf.current;Ct(Cf),e._currentValue=t}function q1(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ml(e,t){jf=e,S2=ol=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gr=!0),e.firstContext=null)}function oo(e){var t=e._currentValue;if(S2!==e)if(e={context:e,memoizedValue:t,next:null},ol===null){if(jf===null)throw Error(ae(308));ol=e,jf.dependencies={lanes:0,firstContext:e}}else ol=ol.next=e;return t}var Ys=null;function k2(e){Ys===null?Ys=[e]:Ys.push(e)}function kj(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,k2(t)):(n.next=o.next,o.next=n),t.interleaved=n,ki(e,r)}function ki(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xi=!1;function E2(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ej(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ds(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,tt&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ki(e,n)}return o=r.interleaved,o===null?(t.next=t,k2(r)):(t.next=o.next,o.next=t),r.interleaved=t,ki(e,n)}function Pp(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d2(e,n)}}function m4(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function kf(e,t,n,r){var o=e.updateQueue;Xi=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,s===null?i=u:s.next=u,s=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var p=o.baseState;s=0,d=u=c=null,l=i;do{var h=l.lane,m=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,g=l;switch(h=t,m=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){p=v.call(m,p,h);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,h=typeof v=="function"?v.call(m,p,h):v,h==null)break e;p=Ot({},p,h);break e;case 2:Xi=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=p):d=d.next=m,s|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(c=p),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ca|=s,e.lanes=s,e.memoizedState=p}}function g4(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(ae(191,o));o.call(r)}}}var ld={},Xo=As(ld),Iu=As(ld),Ru=As(ld);function Xs(e){if(e===ld)throw Error(ae(174));return e}function _2(e,t){switch(vt(Ru,t),vt(Iu,e),vt(Xo,ld),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:E1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=E1(t,e)}Ct(Xo),vt(Xo,t)}function Al(){Ct(Xo),Ct(Iu),Ct(Ru)}function _j(e){Xs(Ru.current);var t=Xs(Xo.current),n=E1(t,e.type);t!==n&&(vt(Iu,e),vt(Xo,n))}function I2(e){Iu.current===e&&(Ct(Xo),Ct(Iu))}var Dt=As(0);function Ef(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ag=[];function R2(){for(var e=0;e<Ag.length;e++)Ag[e]._workInProgressVersionPrimary=null;Ag.length=0}var Tp=Ti.ReactCurrentDispatcher,Pg=Ti.ReactCurrentBatchConfig,la=0,Nt=null,rn=null,hn=null,_f=!1,tu=!1,Au=0,rD=0;function Mn(){throw Error(ae(321))}function A2(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_o(e[n],t[n]))return!1;return!0}function P2(e,t,n,r,o,i){if(la=i,Nt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tp.current=e===null||e.memoizedState===null?aD:lD,e=n(r,o),tu){i=0;do{if(tu=!1,Au=0,25<=i)throw Error(ae(301));i+=1,hn=rn=null,t.updateQueue=null,Tp.current=cD,e=n(r,o)}while(tu)}if(Tp.current=If,t=rn!==null&&rn.next!==null,la=0,hn=rn=Nt=null,_f=!1,t)throw Error(ae(300));return e}function T2(){var e=Au!==0;return Au=0,e}function Bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?Nt.memoizedState=hn=e:hn=hn.next=e,hn}function io(){if(rn===null){var e=Nt.alternate;e=e!==null?e.memoizedState:null}else e=rn.next;var t=hn===null?Nt.memoizedState:hn.next;if(t!==null)hn=t,rn=e;else{if(e===null)throw Error(ae(310));rn=e,e={memoizedState:rn.memoizedState,baseState:rn.baseState,baseQueue:rn.baseQueue,queue:rn.queue,next:null},hn===null?Nt.memoizedState=hn=e:hn=hn.next=e}return hn}function Pu(e,t){return typeof t=="function"?t(e):t}function Tg(e){var t=io(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=rn,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,c=null,u=i;do{var d=u.lane;if((la&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=p,s=r):c=c.next=p,Nt.lanes|=d,ca|=d}u=u.next}while(u!==null&&u!==i);c===null?s=r:c.next=l,_o(r,t.memoizedState)||(gr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Nt.lanes|=i,ca|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dg(e){var t=io(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);_o(i,t.memoizedState)||(gr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ij(){}function Rj(e,t){var n=Nt,r=io(),o=t(),i=!_o(r.memoizedState,o);if(i&&(r.memoizedState=o,gr=!0),r=r.queue,D2(Tj.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||hn!==null&&hn.memoizedState.tag&1){if(n.flags|=2048,Tu(9,Pj.bind(null,n,r,o,t),void 0,null),wn===null)throw Error(ae(349));la&30||Aj(n,t,o)}return o}function Aj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Nt.updateQueue,t===null?(t={lastEffect:null,stores:null},Nt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Pj(e,t,n,r){t.value=n,t.getSnapshot=r,Dj(t)&&Nj(e)}function Tj(e,t,n){return n(function(){Dj(t)&&Nj(e)})}function Dj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_o(e,n)}catch{return!0}}function Nj(e){var t=ki(e,1);t!==null&&Co(t,e,1,-1)}function v4(e){var t=Bo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pu,lastRenderedState:e},t.queue=e,e=e.dispatch=sD.bind(null,Nt,e),[t.memoizedState,e]}function Tu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Nt.updateQueue,t===null?(t={lastEffect:null,stores:null},Nt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Oj(){return io().memoizedState}function Dp(e,t,n,r){var o=Bo();Nt.flags|=e,o.memoizedState=Tu(1|t,n,void 0,r===void 0?null:r)}function Ph(e,t,n,r){var o=io();r=r===void 0?null:r;var i=void 0;if(rn!==null){var s=rn.memoizedState;if(i=s.destroy,r!==null&&A2(r,s.deps)){o.memoizedState=Tu(t,n,i,r);return}}Nt.flags|=e,o.memoizedState=Tu(1|t,n,i,r)}function y4(e,t){return Dp(8390656,8,e,t)}function D2(e,t){return Ph(2048,8,e,t)}function Lj(e,t){return Ph(4,2,e,t)}function zj(e,t){return Ph(4,4,e,t)}function Fj(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mj(e,t,n){return n=n!=null?n.concat([e]):null,Ph(4,4,Fj.bind(null,t,e),n)}function N2(){}function $j(e,t){var n=io();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A2(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Bj(e,t){var n=io();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&A2(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hj(e,t,n){return la&21?(_o(n,t)||(n=GC(),Nt.lanes|=n,ca|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gr=!0),e.memoizedState=n)}function oD(e,t){var n=dt;dt=n!==0&&4>n?n:4,e(!0);var r=Pg.transition;Pg.transition={};try{e(!1),t()}finally{dt=n,Pg.transition=r}}function Uj(){return io().memoizedState}function iD(e,t,n){var r=fs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wj(e))Vj(t,n);else if(n=kj(e,t,n,r),n!==null){var o=ir();Co(n,e,r,o),qj(n,t,r)}}function sD(e,t,n){var r=fs(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wj(e))Vj(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,_o(l,s)){var c=t.interleaved;c===null?(o.next=o,k2(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=kj(e,t,o,r),n!==null&&(o=ir(),Co(n,e,r,o),qj(n,t,r))}}function Wj(e){var t=e.alternate;return e===Nt||t!==null&&t===Nt}function Vj(e,t){tu=_f=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d2(e,n)}}var If={readContext:oo,useCallback:Mn,useContext:Mn,useEffect:Mn,useImperativeHandle:Mn,useInsertionEffect:Mn,useLayoutEffect:Mn,useMemo:Mn,useReducer:Mn,useRef:Mn,useState:Mn,useDebugValue:Mn,useDeferredValue:Mn,useTransition:Mn,useMutableSource:Mn,useSyncExternalStore:Mn,useId:Mn,unstable_isNewReconciler:!1},aD={readContext:oo,useCallback:function(e,t){return Bo().memoizedState=[e,t===void 0?null:t],e},useContext:oo,useEffect:y4,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dp(4194308,4,Fj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dp(4,2,e,t)},useMemo:function(e,t){var n=Bo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iD.bind(null,Nt,e),[r.memoizedState,e]},useRef:function(e){var t=Bo();return e={current:e},t.memoizedState=e},useState:v4,useDebugValue:N2,useDeferredValue:function(e){return Bo().memoizedState=e},useTransition:function(){var e=v4(!1),t=e[0];return e=oD.bind(null,e[1]),Bo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Nt,o=Bo();if(_t){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),wn===null)throw Error(ae(349));la&30||Aj(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,y4(Tj.bind(null,r,i,e),[e]),r.flags|=2048,Tu(9,Pj.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Bo(),t=wn.identifierPrefix;if(_t){var n=vi,r=gi;n=(r&~(1<<32-So(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Au++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rD++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lD={readContext:oo,useCallback:$j,useContext:oo,useEffect:D2,useImperativeHandle:Mj,useInsertionEffect:Lj,useLayoutEffect:zj,useMemo:Bj,useReducer:Tg,useRef:Oj,useState:function(){return Tg(Pu)},useDebugValue:N2,useDeferredValue:function(e){var t=io();return Hj(t,rn.memoizedState,e)},useTransition:function(){var e=Tg(Pu)[0],t=io().memoizedState;return[e,t]},useMutableSource:Ij,useSyncExternalStore:Rj,useId:Uj,unstable_isNewReconciler:!1},cD={readContext:oo,useCallback:$j,useContext:oo,useEffect:D2,useImperativeHandle:Mj,useInsertionEffect:Lj,useLayoutEffect:zj,useMemo:Bj,useReducer:Dg,useRef:Oj,useState:function(){return Dg(Pu)},useDebugValue:N2,useDeferredValue:function(e){var t=io();return rn===null?t.memoizedState=e:Hj(t,rn.memoizedState,e)},useTransition:function(){var e=Dg(Pu)[0],t=io().memoizedState;return[e,t]},useMutableSource:Ij,useSyncExternalStore:Rj,useId:Uj,unstable_isNewReconciler:!1};function bo(e,t){if(e&&e.defaultProps){t=Ot({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function G1(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ot({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Th={isMounted:function(e){return(e=e._reactInternals)?wa(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ir(),o=fs(e),i=wi(r,o);i.payload=t,n!=null&&(i.callback=n),t=ds(e,i,o),t!==null&&(Co(t,e,o,r),Pp(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ir(),o=fs(e),i=wi(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ds(e,i,o),t!==null&&(Co(t,e,o,r),Pp(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ir(),r=fs(e),o=wi(n,r);o.tag=2,t!=null&&(o.callback=t),t=ds(e,o,r),t!==null&&(Co(t,e,r,n),Pp(t,e,r))}};function b4(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!ju(n,r)||!ju(o,i):!0}function Gj(e,t,n){var r=!1,o=xs,i=t.contextType;return typeof i=="object"&&i!==null?i=oo(i):(o=xr(t)?sa:Vn.current,r=t.contextTypes,i=(r=r!=null)?_l(e,o):xs),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Th,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function x4(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Th.enqueueReplaceState(t,t.state,null)}function K1(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},E2(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=oo(i):(i=xr(t)?sa:Vn.current,o.context=_l(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(G1(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Th.enqueueReplaceState(o,o.state,null),kf(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Pl(e,t){try{var n="",r=t;do n+=zP(r),r=r.return;while(r);var o=n}catch(i){o=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ng(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Y1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uD=typeof WeakMap=="function"?WeakMap:Map;function Kj(e,t,n){n=wi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Af||(Af=!0,iv=r),Y1(e,t)},n}function Yj(e,t,n){n=wi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Y1(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Y1(e,t),typeof r!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function w4(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uD;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=jD.bind(null,e,t,n),t.then(e,e))}function S4(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function C4(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wi(-1,1),t.tag=2,ds(n,t,1))),n.lanes|=1),e)}var dD=Ti.ReactCurrentOwner,gr=!1;function tr(e,t,n,r){t.child=e===null?jj(t,null,n,r):Rl(t,e.child,n,r)}function j4(e,t,n,r,o){n=n.render;var i=t.ref;return ml(t,o),r=P2(e,t,n,r,i,o),n=T2(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ei(e,t,o)):(_t&&n&&b2(t),t.flags|=1,tr(e,t,r,o),t.child)}function k4(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!H2(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Xj(e,t,i,r,o)):(e=zp(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:ju,n(s,r)&&e.ref===t.ref)return Ei(e,t,o)}return t.flags|=1,e=hs(i,r),e.ref=t.ref,e.return=t,t.child=e}function Xj(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ju(i,r)&&e.ref===t.ref)if(gr=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(gr=!0);else return t.lanes=e.lanes,Ei(e,t,o)}return X1(e,t,n,r,o)}function Qj(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(sl,Pr),Pr|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,vt(sl,Pr),Pr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,vt(sl,Pr),Pr|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,vt(sl,Pr),Pr|=r;return tr(e,t,o,n),t.child}function Jj(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function X1(e,t,n,r,o){var i=xr(n)?sa:Vn.current;return i=_l(t,i),ml(t,o),n=P2(e,t,n,r,i,o),r=T2(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ei(e,t,o)):(_t&&r&&b2(t),t.flags|=1,tr(e,t,n,o),t.child)}function E4(e,t,n,r,o){if(xr(n)){var i=!0;xf(t)}else i=!1;if(ml(t,o),t.stateNode===null)Np(e,t),Gj(t,n,r),K1(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=oo(u):(u=xr(n)?sa:Vn.current,u=_l(t,u));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==u)&&x4(t,s,r,u),Xi=!1;var h=t.memoizedState;s.state=h,kf(t,r,s,o),c=t.memoizedState,l!==r||h!==c||br.current||Xi?(typeof d=="function"&&(G1(t,n,d,r),c=t.memoizedState),(l=Xi||b4(t,n,l,r,h,c,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ej(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:bo(t.type,l),s.props=u,p=t.pendingProps,h=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=oo(c):(c=xr(n)?sa:Vn.current,c=_l(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||h!==c)&&x4(t,s,r,c),Xi=!1,h=t.memoizedState,s.state=h,kf(t,r,s,o);var v=t.memoizedState;l!==p||h!==v||br.current||Xi?(typeof m=="function"&&(G1(t,n,m,r),v=t.memoizedState),(u=Xi||b4(t,n,u,r,h,v,c)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Q1(e,t,n,r,i,o)}function Q1(e,t,n,r,o,i){Jj(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&d4(t,n,!1),Ei(e,t,i);r=t.stateNode,dD.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Rl(t,e.child,null,i),t.child=Rl(t,null,l,i)):tr(e,t,l,i),t.memoizedState=r.state,o&&d4(t,n,!0),t.child}function Zj(e){var t=e.stateNode;t.pendingContext?u4(e,t.pendingContext,t.pendingContext!==t.context):t.context&&u4(e,t.context,!1),_2(e,t.containerInfo)}function _4(e,t,n,r,o){return Il(),w2(o),t.flags|=256,tr(e,t,n,r),t.child}var J1={dehydrated:null,treeContext:null,retryLane:0};function Z1(e){return{baseLanes:e,cachePool:null,transitions:null}}function e8(e,t,n){var r=t.pendingProps,o=Dt.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),vt(Dt,o&1),e===null)return V1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Oh(s,r,0,null),e=ea(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Z1(n),t.memoizedState=J1,e):O2(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return pD(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=hs(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=hs(l,i):(i=ea(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Z1(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=J1,r}return i=e.child,e=i.sibling,r=hs(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function O2(e,t){return t=Oh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qd(e,t,n,r){return r!==null&&w2(r),Rl(t,e.child,null,n),e=O2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pD(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Ng(Error(ae(422))),Qd(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Oh({mode:"visible",children:r.children},o,0,null),i=ea(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Rl(t,e.child,null,s),t.child.memoizedState=Z1(s),t.memoizedState=J1,i);if(!(t.mode&1))return Qd(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(ae(419)),r=Ng(i,r,void 0),Qd(e,t,s,r)}if(l=(s&e.childLanes)!==0,gr||l){if(r=wn,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,ki(e,o),Co(r,e,o,-1))}return B2(),r=Ng(Error(ae(421))),Qd(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=kD.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,zr=us(o.nextSibling),$r=t,_t=!0,wo=null,e!==null&&(Jr[Zr++]=gi,Jr[Zr++]=vi,Jr[Zr++]=aa,gi=e.id,vi=e.overflow,aa=t),t=O2(t,r.children),t.flags|=4096,t)}function I4(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),q1(e.return,t,n)}function Og(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function t8(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(tr(e,t,r.children,n),r=Dt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&I4(e,n,t);else if(e.tag===19)I4(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(vt(Dt,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ef(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Og(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ef(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Og(t,!0,n,null,i);break;case"together":Og(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Np(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ei(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ca|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=hs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=hs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fD(e,t,n){switch(t.tag){case 3:Zj(t),Il();break;case 5:_j(t);break;case 1:xr(t.type)&&xf(t);break;case 4:_2(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;vt(Cf,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(vt(Dt,Dt.current&1),t.flags|=128,null):n&t.child.childLanes?e8(e,t,n):(vt(Dt,Dt.current&1),e=Ei(e,t,n),e!==null?e.sibling:null);vt(Dt,Dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return t8(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),vt(Dt,Dt.current),r)break;return null;case 22:case 23:return t.lanes=0,Qj(e,t,n)}return Ei(e,t,n)}var n8,ev,r8,o8;n8=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ev=function(){};r8=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Xs(Xo.current);var i=null;switch(n){case"input":o=S1(e,o),r=S1(e,r),i=[];break;case"select":o=Ot({},o,{value:void 0}),r=Ot({},r,{value:void 0}),i=[];break;case"textarea":o=k1(e,o),r=k1(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=yf)}_1(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(vu.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(vu.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&wt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};o8=function(e,t,n,r){n!==r&&(t.flags|=4)};function Dc(e,t){if(!_t)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $n(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hD(e,t,n){var r=t.pendingProps;switch(x2(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $n(t),null;case 1:return xr(t.type)&&bf(),$n(t),null;case 3:return r=t.stateNode,Al(),Ct(br),Ct(Vn),R2(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wo!==null&&(lv(wo),wo=null))),ev(e,t),$n(t),null;case 5:I2(t);var o=Xs(Ru.current);if(n=t.type,e!==null&&t.stateNode!=null)r8(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return $n(t),null}if(e=Xs(Xo.current),Yd(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Wo]=t,r[_u]=i,e=(t.mode&1)!==0,n){case"dialog":wt("cancel",r),wt("close",r);break;case"iframe":case"object":case"embed":wt("load",r);break;case"video":case"audio":for(o=0;o<Wc.length;o++)wt(Wc[o],r);break;case"source":wt("error",r);break;case"img":case"image":case"link":wt("error",r),wt("load",r);break;case"details":wt("toggle",r);break;case"input":zw(r,i),wt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},wt("invalid",r);break;case"textarea":Mw(r,i),wt("invalid",r)}_1(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Kd(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Kd(r.textContent,l,e),o=["children",""+l]):vu.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&wt("scroll",r)}switch(n){case"input":$d(r),Fw(r,i,!0);break;case"textarea":$d(r),$w(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=yf)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=TC(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Wo]=t,e[_u]=r,n8(e,t,!1,!1),t.stateNode=e;e:{switch(s=I1(n,r),n){case"dialog":wt("cancel",e),wt("close",e),o=r;break;case"iframe":case"object":case"embed":wt("load",e),o=r;break;case"video":case"audio":for(o=0;o<Wc.length;o++)wt(Wc[o],e);o=r;break;case"source":wt("error",e),o=r;break;case"img":case"image":case"link":wt("error",e),wt("load",e),o=r;break;case"details":wt("toggle",e),o=r;break;case"input":zw(e,r),o=S1(e,r),wt("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ot({},r,{value:void 0}),wt("invalid",e);break;case"textarea":Mw(e,r),o=k1(e,r),wt("invalid",e);break;default:o=r}_1(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?OC(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&DC(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&yu(e,c):typeof c=="number"&&yu(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(vu.hasOwnProperty(i)?c!=null&&i==="onScroll"&&wt("scroll",e):c!=null&&i2(e,i,c,s))}switch(n){case"input":$d(e),Fw(e,r,!1);break;case"textarea":$d(e),$w(e);break;case"option":r.value!=null&&e.setAttribute("value",""+bs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?dl(e,!!r.multiple,i,!1):r.defaultValue!=null&&dl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=yf)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $n(t),null;case 6:if(e&&t.stateNode!=null)o8(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=Xs(Ru.current),Xs(Xo.current),Yd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wo]=t,(i=r.nodeValue!==n)&&(e=$r,e!==null))switch(e.tag){case 3:Kd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Kd(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wo]=t,t.stateNode=r}return $n(t),null;case 13:if(Ct(Dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_t&&zr!==null&&t.mode&1&&!(t.flags&128))Sj(),Il(),t.flags|=98560,i=!1;else if(i=Yd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ae(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ae(317));i[Wo]=t}else Il(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$n(t),i=!1}else wo!==null&&(lv(wo),wo=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?sn===0&&(sn=3):B2())),t.updateQueue!==null&&(t.flags|=4),$n(t),null);case 4:return Al(),ev(e,t),e===null&&ku(t.stateNode.containerInfo),$n(t),null;case 10:return j2(t.type._context),$n(t),null;case 17:return xr(t.type)&&bf(),$n(t),null;case 19:if(Ct(Dt),i=t.memoizedState,i===null)return $n(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Dc(i,!1);else{if(sn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ef(e),s!==null){for(t.flags|=128,Dc(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return vt(Dt,Dt.current&1|2),t.child}e=e.sibling}i.tail!==null&&Gt()>Tl&&(t.flags|=128,r=!0,Dc(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ef(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!_t)return $n(t),null}else 2*Gt()-i.renderingStartTime>Tl&&n!==1073741824&&(t.flags|=128,r=!0,Dc(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Gt(),t.sibling=null,n=Dt.current,vt(Dt,r?n&1|2:n&1),t):($n(t),null);case 22:case 23:return $2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pr&1073741824&&($n(t),t.subtreeFlags&6&&(t.flags|=8192)):$n(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function mD(e,t){switch(x2(t),t.tag){case 1:return xr(t.type)&&bf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Al(),Ct(br),Ct(Vn),R2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return I2(t),null;case 13:if(Ct(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(Dt),null;case 4:return Al(),null;case 10:return j2(t.type._context),null;case 22:case 23:return $2(),null;case 24:return null;default:return null}}var Jd=!1,Bn=!1,gD=typeof WeakSet=="function"?WeakSet:Set,ye=null;function il(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$t(e,t,r)}else n.current=null}function tv(e,t,n){try{n()}catch(r){$t(e,t,r)}}var R4=!1;function vD(e,t){if(F1=mf,e=cj(),y2(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,p=e,h=null;t:for(;;){for(var m;p!==n||o!==0&&p.nodeType!==3||(l=s+o),p!==i||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(m=p.firstChild)!==null;)h=p,p=m;for(;;){if(p===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++d===r&&(c=s),(m=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(M1={focusedElem:e,selectionRange:n},mf=!1,ye=t;ye!==null;)if(t=ye,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ye=e;else for(;ye!==null;){t=ye;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,b=v.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:bo(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(S){$t(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ye=e;break}ye=t.return}return v=R4,R4=!1,v}function nu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&tv(t,n,i)}o=o.next}while(o!==r)}}function Dh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nv(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function i8(e){var t=e.alternate;t!==null&&(e.alternate=null,i8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wo],delete t[_u],delete t[H1],delete t[ZT],delete t[eD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function s8(e){return e.tag===5||e.tag===3||e.tag===4}function A4(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||s8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yf));else if(r!==4&&(e=e.child,e!==null))for(rv(e,t,n),e=e.sibling;e!==null;)rv(e,t,n),e=e.sibling}function ov(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ov(e,t,n),e=e.sibling;e!==null;)ov(e,t,n),e=e.sibling}var Rn=null,xo=!1;function $i(e,t,n){for(n=n.child;n!==null;)a8(e,t,n),n=n.sibling}function a8(e,t,n){if(Yo&&typeof Yo.onCommitFiberUnmount=="function")try{Yo.onCommitFiberUnmount(kh,n)}catch{}switch(n.tag){case 5:Bn||il(n,t);case 6:var r=Rn,o=xo;Rn=null,$i(e,t,n),Rn=r,xo=o,Rn!==null&&(xo?(e=Rn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rn.removeChild(n.stateNode));break;case 18:Rn!==null&&(xo?(e=Rn,n=n.stateNode,e.nodeType===8?Ig(e.parentNode,n):e.nodeType===1&&Ig(e,n),Su(e)):Ig(Rn,n.stateNode));break;case 4:r=Rn,o=xo,Rn=n.stateNode.containerInfo,xo=!0,$i(e,t,n),Rn=r,xo=o;break;case 0:case 11:case 14:case 15:if(!Bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&tv(n,t,s),o=o.next}while(o!==r)}$i(e,t,n);break;case 1:if(!Bn&&(il(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){$t(n,t,l)}$i(e,t,n);break;case 21:$i(e,t,n);break;case 22:n.mode&1?(Bn=(r=Bn)||n.memoizedState!==null,$i(e,t,n),Bn=r):$i(e,t,n);break;default:$i(e,t,n)}}function P4(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gD),t.forEach(function(r){var o=ED.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function yo(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Rn=l.stateNode,xo=!1;break e;case 3:Rn=l.stateNode.containerInfo,xo=!0;break e;case 4:Rn=l.stateNode.containerInfo,xo=!0;break e}l=l.return}if(Rn===null)throw Error(ae(160));a8(i,s,o),Rn=null,xo=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){$t(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)l8(t,e),t=t.sibling}function l8(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yo(t,e),Fo(e),r&4){try{nu(3,e,e.return),Dh(3,e)}catch(g){$t(e,e.return,g)}try{nu(5,e,e.return)}catch(g){$t(e,e.return,g)}}break;case 1:yo(t,e),Fo(e),r&512&&n!==null&&il(n,n.return);break;case 5:if(yo(t,e),Fo(e),r&512&&n!==null&&il(n,n.return),e.flags&32){var o=e.stateNode;try{yu(o,"")}catch(g){$t(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&AC(o,i),I1(l,s);var u=I1(l,i);for(s=0;s<c.length;s+=2){var d=c[s],p=c[s+1];d==="style"?OC(o,p):d==="dangerouslySetInnerHTML"?DC(o,p):d==="children"?yu(o,p):i2(o,d,p,u)}switch(l){case"input":C1(o,i);break;case"textarea":PC(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?dl(o,!!i.multiple,m,!1):h!==!!i.multiple&&(i.defaultValue!=null?dl(o,!!i.multiple,i.defaultValue,!0):dl(o,!!i.multiple,i.multiple?[]:"",!1))}o[_u]=i}catch(g){$t(e,e.return,g)}}break;case 6:if(yo(t,e),Fo(e),r&4){if(e.stateNode===null)throw Error(ae(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){$t(e,e.return,g)}}break;case 3:if(yo(t,e),Fo(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Su(t.containerInfo)}catch(g){$t(e,e.return,g)}break;case 4:yo(t,e),Fo(e);break;case 13:yo(t,e),Fo(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(F2=Gt())),r&4&&P4(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Bn=(u=Bn)||d,yo(t,e),Bn=u):yo(t,e),Fo(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ye=e,d=e.child;d!==null;){for(p=ye=d;ye!==null;){switch(h=ye,m=h.child,h.tag){case 0:case 11:case 14:case 15:nu(4,h,h.return);break;case 1:il(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){$t(r,n,g)}}break;case 5:il(h,h.return);break;case 22:if(h.memoizedState!==null){D4(p);continue}}m!==null?(m.return=h,ye=m):D4(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=p.stateNode,c=p.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=NC("display",s))}catch(g){$t(e,e.return,g)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(g){$t(e,e.return,g)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:yo(t,e),Fo(e),r&4&&P4(e);break;case 21:break;default:yo(t,e),Fo(e)}}function Fo(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(s8(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(yu(o,""),r.flags&=-33);var i=A4(e);ov(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=A4(e);rv(e,l,s);break;default:throw Error(ae(161))}}catch(c){$t(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yD(e,t,n){ye=e,c8(e)}function c8(e,t,n){for(var r=(e.mode&1)!==0;ye!==null;){var o=ye,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Jd;if(!s){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Bn;l=Jd;var u=Bn;if(Jd=s,(Bn=c)&&!u)for(ye=o;ye!==null;)s=ye,c=s.child,s.tag===22&&s.memoizedState!==null?N4(o):c!==null?(c.return=s,ye=c):N4(o);for(;i!==null;)ye=i,c8(i),i=i.sibling;ye=o,Jd=l,Bn=u}T4(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,ye=i):T4(e)}}function T4(e){for(;ye!==null;){var t=ye;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Bn||Dh(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Bn)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:bo(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&g4(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}g4(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var p=d.dehydrated;p!==null&&Su(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}Bn||t.flags&512&&nv(t)}catch(h){$t(t,t.return,h)}}if(t===e){ye=null;break}if(n=t.sibling,n!==null){n.return=t.return,ye=n;break}ye=t.return}}function D4(e){for(;ye!==null;){var t=ye;if(t===e){ye=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ye=n;break}ye=t.return}}function N4(e){for(;ye!==null;){var t=ye;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dh(4,t)}catch(c){$t(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){$t(t,o,c)}}var i=t.return;try{nv(t)}catch(c){$t(t,i,c)}break;case 5:var s=t.return;try{nv(t)}catch(c){$t(t,s,c)}}}catch(c){$t(t,t.return,c)}if(t===e){ye=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ye=l;break}ye=t.return}}var bD=Math.ceil,Rf=Ti.ReactCurrentDispatcher,L2=Ti.ReactCurrentOwner,no=Ti.ReactCurrentBatchConfig,tt=0,wn=null,tn=null,Tn=0,Pr=0,sl=As(0),sn=0,Du=null,ca=0,Nh=0,z2=0,ru=null,mr=null,F2=0,Tl=1/0,fi=null,Af=!1,iv=null,ps=null,Zd=!1,os=null,Pf=0,ou=0,sv=null,Op=-1,Lp=0;function ir(){return tt&6?Gt():Op!==-1?Op:Op=Gt()}function fs(e){return e.mode&1?tt&2&&Tn!==0?Tn&-Tn:nD.transition!==null?(Lp===0&&(Lp=GC()),Lp):(e=dt,e!==0||(e=window.event,e=e===void 0?16:ej(e.type)),e):1}function Co(e,t,n,r){if(50<ou)throw ou=0,sv=null,Error(ae(185));id(e,n,r),(!(tt&2)||e!==wn)&&(e===wn&&(!(tt&2)&&(Nh|=n),sn===4&&es(e,Tn)),wr(e,r),n===1&&tt===0&&!(t.mode&1)&&(Tl=Gt()+500,Ah&&Ps()))}function wr(e,t){var n=e.callbackNode;nT(e,t);var r=hf(e,e===wn?Tn:0);if(r===0)n!==null&&Uw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Uw(n),t===1)e.tag===0?tD(O4.bind(null,e)):bj(O4.bind(null,e)),QT(function(){!(tt&6)&&Ps()}),n=null;else{switch(KC(r)){case 1:n=u2;break;case 4:n=VC;break;case 16:n=ff;break;case 536870912:n=qC;break;default:n=ff}n=v8(n,u8.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function u8(e,t){if(Op=-1,Lp=0,tt&6)throw Error(ae(327));var n=e.callbackNode;if(gl()&&e.callbackNode!==n)return null;var r=hf(e,e===wn?Tn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Tf(e,r);else{t=r;var o=tt;tt|=2;var i=p8();(wn!==e||Tn!==t)&&(fi=null,Tl=Gt()+500,Zs(e,t));do try{SD();break}catch(l){d8(e,l)}while(!0);C2(),Rf.current=i,tt=o,tn!==null?t=0:(wn=null,Tn=0,t=sn)}if(t!==0){if(t===2&&(o=D1(e),o!==0&&(r=o,t=av(e,o))),t===1)throw n=Du,Zs(e,0),es(e,r),wr(e,Gt()),n;if(t===6)es(e,r);else{if(o=e.current.alternate,!(r&30)&&!xD(o)&&(t=Tf(e,r),t===2&&(i=D1(e),i!==0&&(r=i,t=av(e,i))),t===1))throw n=Du,Zs(e,0),es(e,r),wr(e,Gt()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:Us(e,mr,fi);break;case 3:if(es(e,r),(r&130023424)===r&&(t=F2+500-Gt(),10<t)){if(hf(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ir(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=B1(Us.bind(null,e,mr,fi),t);break}Us(e,mr,fi);break;case 4:if(es(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-So(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bD(r/1960))-r,10<r){e.timeoutHandle=B1(Us.bind(null,e,mr,fi),r);break}Us(e,mr,fi);break;case 5:Us(e,mr,fi);break;default:throw Error(ae(329))}}}return wr(e,Gt()),e.callbackNode===n?u8.bind(null,e):null}function av(e,t){var n=ru;return e.current.memoizedState.isDehydrated&&(Zs(e,t).flags|=256),e=Tf(e,t),e!==2&&(t=mr,mr=n,t!==null&&lv(t)),e}function lv(e){mr===null?mr=e:mr.push.apply(mr,e)}function xD(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!_o(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function es(e,t){for(t&=~z2,t&=~Nh,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-So(t),r=1<<n;e[n]=-1,t&=~r}}function O4(e){if(tt&6)throw Error(ae(327));gl();var t=hf(e,0);if(!(t&1))return wr(e,Gt()),null;var n=Tf(e,t);if(e.tag!==0&&n===2){var r=D1(e);r!==0&&(t=r,n=av(e,r))}if(n===1)throw n=Du,Zs(e,0),es(e,t),wr(e,Gt()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Us(e,mr,fi),wr(e,Gt()),null}function M2(e,t){var n=tt;tt|=1;try{return e(t)}finally{tt=n,tt===0&&(Tl=Gt()+500,Ah&&Ps())}}function ua(e){os!==null&&os.tag===0&&!(tt&6)&&gl();var t=tt;tt|=1;var n=no.transition,r=dt;try{if(no.transition=null,dt=1,e)return e()}finally{dt=r,no.transition=n,tt=t,!(tt&6)&&Ps()}}function $2(){Pr=sl.current,Ct(sl)}function Zs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XT(n)),tn!==null)for(n=tn.return;n!==null;){var r=n;switch(x2(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bf();break;case 3:Al(),Ct(br),Ct(Vn),R2();break;case 5:I2(r);break;case 4:Al();break;case 13:Ct(Dt);break;case 19:Ct(Dt);break;case 10:j2(r.type._context);break;case 22:case 23:$2()}n=n.return}if(wn=e,tn=e=hs(e.current,null),Tn=Pr=t,sn=0,Du=null,z2=Nh=ca=0,mr=ru=null,Ys!==null){for(t=0;t<Ys.length;t++)if(n=Ys[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Ys=null}return e}function d8(e,t){do{var n=tn;try{if(C2(),Tp.current=If,_f){for(var r=Nt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}_f=!1}if(la=0,hn=rn=Nt=null,tu=!1,Au=0,L2.current=null,n===null||n.return===null){sn=1,Du=t,tn=null;break}e:{var i=e,s=n.return,l=n,c=t;if(t=Tn,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=S4(s);if(m!==null){m.flags&=-257,C4(m,s,l,i,t),m.mode&1&&w4(i,u,t),t=m,c=u;var v=t.updateQueue;if(v===null){var g=new Set;g.add(c),t.updateQueue=g}else v.add(c);break e}else{if(!(t&1)){w4(i,u,t),B2();break e}c=Error(ae(426))}}else if(_t&&l.mode&1){var b=S4(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),C4(b,s,l,i,t),w2(Pl(c,l));break e}}i=c=Pl(c,l),sn!==4&&(sn=2),ru===null?ru=[i]:ru.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=Kj(i,c,t);m4(i,y);break e;case 1:l=c;var x=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ps===null||!ps.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Yj(i,l,t);m4(i,S);break e}}i=i.return}while(i!==null)}h8(n)}catch(k){t=k,tn===n&&n!==null&&(tn=n=n.return);continue}break}while(!0)}function p8(){var e=Rf.current;return Rf.current=If,e===null?If:e}function B2(){(sn===0||sn===3||sn===2)&&(sn=4),wn===null||!(ca&268435455)&&!(Nh&268435455)||es(wn,Tn)}function Tf(e,t){var n=tt;tt|=2;var r=p8();(wn!==e||Tn!==t)&&(fi=null,Zs(e,t));do try{wD();break}catch(o){d8(e,o)}while(!0);if(C2(),tt=n,Rf.current=r,tn!==null)throw Error(ae(261));return wn=null,Tn=0,sn}function wD(){for(;tn!==null;)f8(tn)}function SD(){for(;tn!==null&&!GP();)f8(tn)}function f8(e){var t=g8(e.alternate,e,Pr);e.memoizedProps=e.pendingProps,t===null?h8(e):tn=t,L2.current=null}function h8(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mD(n,t),n!==null){n.flags&=32767,tn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{sn=6,tn=null;return}}else if(n=hD(n,t,Pr),n!==null){tn=n;return}if(t=t.sibling,t!==null){tn=t;return}tn=t=e}while(t!==null);sn===0&&(sn=5)}function Us(e,t,n){var r=dt,o=no.transition;try{no.transition=null,dt=1,CD(e,t,n,r)}finally{no.transition=o,dt=r}return null}function CD(e,t,n,r){do gl();while(os!==null);if(tt&6)throw Error(ae(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(rT(e,i),e===wn&&(tn=wn=null,Tn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Zd||(Zd=!0,v8(ff,function(){return gl(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=no.transition,no.transition=null;var s=dt;dt=1;var l=tt;tt|=4,L2.current=null,vD(e,n),l8(n,e),UT(M1),mf=!!F1,M1=F1=null,e.current=n,yD(n),KP(),tt=l,dt=s,no.transition=i}else e.current=n;if(Zd&&(Zd=!1,os=e,Pf=o),i=e.pendingLanes,i===0&&(ps=null),QP(n.stateNode),wr(e,Gt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Af)throw Af=!1,e=iv,iv=null,e;return Pf&1&&e.tag!==0&&gl(),i=e.pendingLanes,i&1?e===sv?ou++:(ou=0,sv=e):ou=0,Ps(),null}function gl(){if(os!==null){var e=KC(Pf),t=no.transition,n=dt;try{if(no.transition=null,dt=16>e?16:e,os===null)var r=!1;else{if(e=os,os=null,Pf=0,tt&6)throw Error(ae(331));var o=tt;for(tt|=4,ye=e.current;ye!==null;){var i=ye,s=i.child;if(ye.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(ye=u;ye!==null;){var d=ye;switch(d.tag){case 0:case 11:case 15:nu(8,d,i)}var p=d.child;if(p!==null)p.return=d,ye=p;else for(;ye!==null;){d=ye;var h=d.sibling,m=d.return;if(i8(d),d===u){ye=null;break}if(h!==null){h.return=m,ye=h;break}ye=m}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}ye=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,ye=s;else e:for(;ye!==null;){if(i=ye,i.flags&2048)switch(i.tag){case 0:case 11:case 15:nu(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,ye=y;break e}ye=i.return}}var x=e.current;for(ye=x;ye!==null;){s=ye;var w=s.child;if(s.subtreeFlags&2064&&w!==null)w.return=s,ye=w;else e:for(s=x;ye!==null;){if(l=ye,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Dh(9,l)}}catch(k){$t(l,l.return,k)}if(l===s){ye=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,ye=S;break e}ye=l.return}}if(tt=o,Ps(),Yo&&typeof Yo.onPostCommitFiberRoot=="function")try{Yo.onPostCommitFiberRoot(kh,e)}catch{}r=!0}return r}finally{dt=n,no.transition=t}}return!1}function L4(e,t,n){t=Pl(n,t),t=Kj(e,t,1),e=ds(e,t,1),t=ir(),e!==null&&(id(e,1,t),wr(e,t))}function $t(e,t,n){if(e.tag===3)L4(e,e,n);else for(;t!==null;){if(t.tag===3){L4(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ps===null||!ps.has(r))){e=Pl(n,e),e=Yj(t,e,1),t=ds(t,e,1),e=ir(),t!==null&&(id(t,1,e),wr(t,e));break}}t=t.return}}function jD(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ir(),e.pingedLanes|=e.suspendedLanes&n,wn===e&&(Tn&n)===n&&(sn===4||sn===3&&(Tn&130023424)===Tn&&500>Gt()-F2?Zs(e,0):z2|=n),wr(e,t)}function m8(e,t){t===0&&(e.mode&1?(t=Ud,Ud<<=1,!(Ud&130023424)&&(Ud=4194304)):t=1);var n=ir();e=ki(e,t),e!==null&&(id(e,t,n),wr(e,n))}function kD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),m8(e,n)}function ED(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),m8(e,n)}var g8;g8=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||br.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,fD(e,t,n);gr=!!(e.flags&131072)}else gr=!1,_t&&t.flags&1048576&&xj(t,Sf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Np(e,t),e=t.pendingProps;var o=_l(t,Vn.current);ml(t,n),o=P2(null,t,r,e,o,n);var i=T2();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(i=!0,xf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,E2(t),o.updater=Th,t.stateNode=o,o._reactInternals=t,K1(t,r,e,n),t=Q1(null,t,r,!0,i,n)):(t.tag=0,_t&&i&&b2(t),tr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Np(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ID(r),e=bo(r,e),o){case 0:t=X1(null,t,r,e,n);break e;case 1:t=E4(null,t,r,e,n);break e;case 11:t=j4(null,t,r,e,n);break e;case 14:t=k4(null,t,r,bo(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bo(r,o),X1(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bo(r,o),E4(e,t,r,o,n);case 3:e:{if(Zj(t),e===null)throw Error(ae(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ej(e,t),kf(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Pl(Error(ae(423)),t),t=_4(e,t,r,n,o);break e}else if(r!==o){o=Pl(Error(ae(424)),t),t=_4(e,t,r,n,o);break e}else for(zr=us(t.stateNode.containerInfo.firstChild),$r=t,_t=!0,wo=null,n=jj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Il(),r===o){t=Ei(e,t,n);break e}tr(e,t,r,n)}t=t.child}return t;case 5:return _j(t),e===null&&V1(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,$1(r,o)?s=null:i!==null&&$1(r,i)&&(t.flags|=32),Jj(e,t),tr(e,t,s,n),t.child;case 6:return e===null&&V1(t),null;case 13:return e8(e,t,n);case 4:return _2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rl(t,null,r,n):tr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bo(r,o),j4(e,t,r,o,n);case 7:return tr(e,t,t.pendingProps,n),t.child;case 8:return tr(e,t,t.pendingProps.children,n),t.child;case 12:return tr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,vt(Cf,r._currentValue),r._currentValue=s,i!==null)if(_o(i.value,s)){if(i.children===o.children&&!br.current){t=Ei(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=wi(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),q1(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ae(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),q1(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}tr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ml(t,n),o=oo(o),r=r(o),t.flags|=1,tr(e,t,r,n),t.child;case 14:return r=t.type,o=bo(r,t.pendingProps),o=bo(r.type,o),k4(e,t,r,o,n);case 15:return Xj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bo(r,o),Np(e,t),t.tag=1,xr(r)?(e=!0,xf(t)):e=!1,ml(t,n),Gj(t,r,o),K1(t,r,o,n),Q1(null,t,r,!0,e,n);case 19:return t8(e,t,n);case 22:return Qj(e,t,n)}throw Error(ae(156,t.tag))};function v8(e,t){return WC(e,t)}function _D(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function to(e,t,n,r){return new _D(e,t,n,r)}function H2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ID(e){if(typeof e=="function")return H2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===a2)return 11;if(e===l2)return 14}return 2}function hs(e,t){var n=e.alternate;return n===null?(n=to(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zp(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")H2(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Xa:return ea(n.children,o,i,t);case s2:s=8,o|=8;break;case y1:return e=to(12,n,t,o|2),e.elementType=y1,e.lanes=i,e;case b1:return e=to(13,n,t,o),e.elementType=b1,e.lanes=i,e;case x1:return e=to(19,n,t,o),e.elementType=x1,e.lanes=i,e;case _C:return Oh(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kC:s=10;break e;case EC:s=9;break e;case a2:s=11;break e;case l2:s=14;break e;case Yi:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=to(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ea(e,t,n,r){return e=to(7,e,r,t),e.lanes=n,e}function Oh(e,t,n,r){return e=to(22,e,r,t),e.elementType=_C,e.lanes=n,e.stateNode={isHidden:!1},e}function Lg(e,t,n){return e=to(6,e,null,t),e.lanes=n,e}function zg(e,t,n){return t=to(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RD(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vg(0),this.expirationTimes=vg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vg(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function U2(e,t,n,r,o,i,s,l,c){return e=new RD(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=to(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},E2(i),e}function AD(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ya,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function y8(e){if(!e)return xs;e=e._reactInternals;e:{if(wa(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(xr(n))return yj(e,n,t)}return t}function b8(e,t,n,r,o,i,s,l,c){return e=U2(n,r,!0,e,o,i,s,l,c),e.context=y8(null),n=e.current,r=ir(),o=fs(n),i=wi(r,o),i.callback=t??null,ds(n,i,o),e.current.lanes=o,id(e,o,r),wr(e,r),e}function Lh(e,t,n,r){var o=t.current,i=ir(),s=fs(o);return n=y8(n),t.context===null?t.context=n:t.pendingContext=n,t=wi(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ds(o,t,s),e!==null&&(Co(e,o,s,i),Pp(e,o,s)),s}function Df(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function z4(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function W2(e,t){z4(e,t),(e=e.alternate)&&z4(e,t)}function PD(){return null}var x8=typeof reportError=="function"?reportError:function(e){console.error(e)};function V2(e){this._internalRoot=e}zh.prototype.render=V2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));Lh(e,t,null,null)};zh.prototype.unmount=V2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ua(function(){Lh(null,e,null,null)}),t[ji]=null}};function zh(e){this._internalRoot=e}zh.prototype.unstable_scheduleHydration=function(e){if(e){var t=QC();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zi.length&&t!==0&&t<Zi[n].priority;n++);Zi.splice(n,0,e),n===0&&ZC(e)}};function q2(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function F4(){}function TD(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Df(s);i.call(u)}}var s=b8(t,r,e,0,null,!1,!1,"",F4);return e._reactRootContainer=s,e[ji]=s.current,ku(e.nodeType===8?e.parentNode:e),ua(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Df(c);l.call(u)}}var c=U2(e,0,!1,null,null,!1,!1,"",F4);return e._reactRootContainer=c,e[ji]=c.current,ku(e.nodeType===8?e.parentNode:e),ua(function(){Lh(t,c,n,r)}),c}function Mh(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var c=Df(s);l.call(c)}}Lh(t,s,e,o)}else s=TD(n,t,e,o,r);return Df(s)}YC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Uc(t.pendingLanes);n!==0&&(d2(t,n|1),wr(t,Gt()),!(tt&6)&&(Tl=Gt()+500,Ps()))}break;case 13:ua(function(){var r=ki(e,1);if(r!==null){var o=ir();Co(r,e,1,o)}}),W2(e,1)}};p2=function(e){if(e.tag===13){var t=ki(e,134217728);if(t!==null){var n=ir();Co(t,e,134217728,n)}W2(e,134217728)}};XC=function(e){if(e.tag===13){var t=fs(e),n=ki(e,t);if(n!==null){var r=ir();Co(n,e,t,r)}W2(e,t)}};QC=function(){return dt};JC=function(e,t){var n=dt;try{return dt=e,t()}finally{dt=n}};A1=function(e,t,n){switch(t){case"input":if(C1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Rh(r);if(!o)throw Error(ae(90));RC(r),C1(r,o)}}}break;case"textarea":PC(e,n);break;case"select":t=n.value,t!=null&&dl(e,!!n.multiple,t,!1)}};FC=M2;MC=ua;var DD={usingClientEntryPoint:!1,Events:[ad,el,Rh,LC,zC,M2]},Nc={findFiberByHostInstance:Ks,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ND={bundleType:Nc.bundleType,version:Nc.version,rendererPackageName:Nc.rendererPackageName,rendererConfig:Nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ti.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=HC(e),e===null?null:e.stateNode},findFiberByHostInstance:Nc.findFiberByHostInstance||PD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ep=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ep.isDisabled&&ep.supportsFiber)try{kh=ep.inject(ND),Yo=ep}catch{}}Vr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DD;Vr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!q2(t))throw Error(ae(200));return AD(e,t,null,n)};Vr.createRoot=function(e,t){if(!q2(e))throw Error(ae(299));var n=!1,r="",o=x8;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=U2(e,1,!1,null,null,n,!1,r,o),e[ji]=t.current,ku(e.nodeType===8?e.parentNode:e),new V2(t)};Vr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=HC(t),e=e===null?null:e.stateNode,e};Vr.flushSync=function(e){return ua(e)};Vr.hydrate=function(e,t,n){if(!Fh(t))throw Error(ae(200));return Mh(null,e,t,!0,n)};Vr.hydrateRoot=function(e,t,n){if(!q2(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=x8;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=b8(t,null,e,1,n??null,o,!1,i,s),e[ji]=t.current,ku(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new zh(t)};Vr.render=function(e,t,n){if(!Fh(t))throw Error(ae(200));return Mh(null,e,t,!1,n)};Vr.unmountComponentAtNode=function(e){if(!Fh(e))throw Error(ae(40));return e._reactRootContainer?(ua(function(){Mh(null,null,e,!1,function(){e._reactRootContainer=null,e[ji]=null})}),!0):!1};Vr.unstable_batchedUpdates=M2;Vr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Fh(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return Mh(e,t,n,!1,r)};Vr.version="18.3.1-next-f1338f8080-20240426";function w8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(w8)}catch(e){console.error(e)}}w8(),wC.exports=Vr;var yn=wC.exports;const OD=co(yn);var S8,M4=yn;S8=M4.createRoot,M4.hydrateRoot;/**
* @remix-run/router v1.19.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Nu(){return Nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nu.apply(this,arguments)}var is;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(is||(is={}));const $4="popstate";function LD(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return cv("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:j8(o)}return FD(t,n,null,e)}function an(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function C8(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zD(){return Math.random().toString(36).substr(2,8)}function B4(e,t){return{usr:e.state,key:e.key,idx:t}}function cv(e,t,n,r){return n===void 0&&(n=null),Nu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jl(t):t,{state:n,key:t&&t.key||r||zD()})}function j8(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Jl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function FD(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=is.Pop,c=null,u=d();u==null&&(u=0,s.replaceState(Nu({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function p(){l=is.Pop;let b=d(),y=b==null?null:b-u;u=b,c&&c({action:l,location:g.location,delta:y})}function h(b,y){l=is.Push;let x=cv(g.location,b,y);u=d()+1;let w=B4(x,u),S=g.createHref(x);try{s.pushState(w,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(S)}i&&c&&c({action:l,location:g.location,delta:1})}function m(b,y){l=is.Replace;let x=cv(g.location,b,y);u=d();let w=B4(x,u),S=g.createHref(x);s.replaceState(w,"",S),i&&c&&c({action:l,location:g.location,delta:0})}function v(b){let y=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof b=="string"?b:j8(b);return x=x.replace(/ $/,"%20"),an(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let g={get action(){return l},get location(){return e(o,s)},listen(b){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener($4,p),c=b,()=>{o.removeEventListener($4,p),c=null}},createHref(b){return t(o,b)},createURL:v,encodeLocation(b){let y=v(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(b){return s.go(b)}};return g}var H4;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(H4||(H4={}));function MD(e,t,n){return n===void 0&&(n="/"),$D(e,t,n,!1)}function $D(e,t,n,r){let o=typeof t=="string"?Jl(t):t,i=_8(o.pathname||"/",n);if(i==null)return null;let s=k8(e);BD(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let u=JD(i);l=XD(s[c],u,r)}return l}function k8(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,s,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(an(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ta([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(an(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),k8(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:KD(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let c of E8(i.path))o(i,s,c)}),t}function E8(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=E8(r.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function BD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const HD=/^:[\w-]+$/,UD=3,WD=2,VD=1,qD=10,GD=-2,U4=e=>e==="*";function KD(e,t){let n=e.split("/"),r=n.length;return n.some(U4)&&(r+=GD),t&&(r+=WD),n.filter(o=>!U4(o)).reduce((o,i)=>o+(HD.test(i)?UD:i===""?VD:qD),r)}function YD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function XD(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",p=W4({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!p&&u&&n&&!r[r.length-1].route.index&&(p=W4({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!p)return null;Object.assign(o,p.params),s.push({params:o,pathname:ta([i,p.pathname]),pathnameBase:oN(ta([i,p.pathnameBase])),route:h}),p.pathnameBase!=="/"&&(i=ta([i,p.pathnameBase]))}return s}function W4(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=QD(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,d,p)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let g=l[p]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const v=l[p];return m&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function QD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),C8(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function JD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return C8(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _8(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ZD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Jl(e):e;return{pathname:n?n.startsWith("/")?n:eN(n,t):t,search:iN(r),hash:sN(o)}}function eN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Fg(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tN(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nN(e,t){let n=tN(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rN(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Jl(e):(o=Nu({},e),an(!o.pathname||!o.pathname.includes("?"),Fg("?","pathname","search",o)),an(!o.pathname||!o.pathname.includes("#"),Fg("#","pathname","hash",o)),an(!o.search||!o.search.includes("#"),Fg("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let p=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),p-=1;o.pathname=h.join("/")}l=p>=0?t[p]:"/"}let c=ZD(o,l),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ta=e=>e.join("/").replace(/\/\/+/g,"/"),oN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,sN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const I8=["post","put","patch","delete"];new Set(I8);const lN=["get",...I8];new Set(lN);/**
* React Router v6.26.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ou.apply(this,arguments)}const G2=f.createContext(null),cN=f.createContext(null),$h=f.createContext(null),cd=f.createContext(null),Zl=f.createContext({outlet:null,matches:[],isDataRoute:!1}),R8=f.createContext(null);function Bh(){return f.useContext(cd)!=null}function Sa(){return Bh()||an(!1),f.useContext(cd).location}function A8(){return f.useContext(cd).navigationType}function P8(e){f.useContext($h).static||f.useLayoutEffect(e)}function kt(){let{isDataRoute:e}=f.useContext(Zl);return e?SN():uN()}function uN(){Bh()||an(!1);let e=f.useContext(G2),{basename:t,future:n,navigator:r}=f.useContext($h),{matches:o}=f.useContext(Zl),{pathname:i}=Sa(),s=JSON.stringify(nN(o,n.v7_relativeSplatPath)),l=f.useRef(!1);return P8(()=>{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let p=rN(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:ta([t,p.pathname])),(d.replace?r.replace:r.push)(p,d.state,d)},[t,r,s,i,e])}function dN(e,t){return pN(e,t)}function pN(e,t,n,r){Bh()||an(!1);let{navigator:o}=f.useContext($h),{matches:i}=f.useContext(Zl),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let c=s?s.pathnameBase:"/";s&&s.route;let u=Sa(),d;if(t){var p;let b=typeof t=="string"?Jl(t):t;c==="/"||(p=b.pathname)!=null&&p.startsWith(c)||an(!1),d=b}else d=u;let h=d.pathname||"/",m=h;if(c!=="/"){let b=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=MD(e,{pathname:m}),g=vN(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:ta([c,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:ta([c,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&g?f.createElement(cd.Provider,{value:{location:Ou({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:is.Pop}},g):g}function fN(){let e=wN(),t=aN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const hN=f.createElement(fN,null);class mN extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(Zl.Provider,{value:this.props.routeContext},f.createElement(R8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gN(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(G2);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(Zl.Provider,{value:t},r)}function vN(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let d=s.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);d>=0||an(!1),s=s.slice(0,Math.min(s.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<s.length;d++){let p=s[d];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=d),p.route.id){let{loaderData:h,errors:m}=n,v=p.route.loader&&h[p.route.id]===void 0&&(!m||m[p.route.id]===void 0);if(p.route.lazy||v){c=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,p,h)=>{let m,v=!1,g=null,b=null;n&&(m=l&&p.route.id?l[p.route.id]:void 0,g=p.route.errorElement||hN,c&&(u<0&&h===0?(v=!0,b=null):u===h&&(v=!0,b=p.route.hydrateFallbackElement||null)));let y=t.concat(s.slice(0,h+1)),x=()=>{let w;return m?w=g:v?w=b:p.route.Component?w=f.createElement(p.route.Component,null):p.route.element?w=p.route.element:w=d,f.createElement(gN,{match:p,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:w})};return n&&(p.route.ErrorBoundary||p.route.errorElement||h===0)?f.createElement(mN,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var T8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(T8||{}),Nf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Nf||{});function yN(e){let t=f.useContext(G2);return t||an(!1),t}function bN(e){let t=f.useContext(cN);return t||an(!1),t}function xN(e){let t=f.useContext(Zl);return t||an(!1),t}function D8(e){let t=xN(),n=t.matches[t.matches.length-1];return n.route.id||an(!1),n.route.id}function wN(){var e;let t=f.useContext(R8),n=bN(Nf.UseRouteError),r=D8(Nf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function SN(){let{router:e}=yN(T8.UseNavigateStable),t=D8(Nf.UseNavigateStable),n=f.useRef(!1);return P8(()=>{n.current=!0}),f.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ou({fromRouteId:t},i)))},[e,t])}function _n(e){an(!1)}function CN(e){let{basename:t="/",children:n=null,location:r,navigationType:o=is.Pop,navigator:i,static:s=!1,future:l}=e;Bh()&&an(!1);let c=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:c,navigator:i,static:s,future:Ou({v7_relativeSplatPath:!1},l)}),[c,l,i,s]);typeof r=="string"&&(r=Jl(r));let{pathname:d="/",search:p="",hash:h="",state:m=null,key:v="default"}=r,g=f.useMemo(()=>{let b=_8(d,c);return b==null?null:{location:{pathname:b,search:p,hash:h,state:m,key:v},navigationType:o}},[c,d,p,h,m,v,o]);return g==null?null:f.createElement($h.Provider,{value:u},f.createElement(cd.Provider,{children:n,value:g}))}function jN(e){let{children:t,location:n}=e;return dN(uv(t),n)}new Promise(()=>{});function uv(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let i=[...t,o];if(r.type===f.Fragment){n.push.apply(n,uv(r.props.children,i));return}r.type!==_n&&an(!1),!r.props.index||!r.props.children||an(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=uv(r.props.children,i)),n.push(s)}),n}/**
* React Router DOM v6.26.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function dv(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function kN(e,t){let n=dv(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const EN="6";try{window.__reactRouterVersion=EN}catch{}const _N="startTransition",V4=bC[_N];function IN(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=LD({window:o,v5Compat:!0}));let s=i.current,[l,c]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(p=>{u&&V4?V4(()=>c(p)):c(p)},[c,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.createElement(CN,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}var q4;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(q4||(q4={}));var G4;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(G4||(G4={}));function RN(e){let t=f.useRef(dv(e)),n=f.useRef(!1),r=Sa(),o=f.useMemo(()=>kN(r.search,n.current?null:t.current),[r.search]),i=kt(),s=f.useCallback((l,c)=>{const u=dv(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,c)},[i,o]);return[o,s]}var N8={exports:{}},AN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PN=AN,TN=PN;function O8(){}function L8(){}L8.resetWarningCache=O8;var DN=function(){function e(r,o,i,s,l,c){if(c!==TN){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:L8,resetWarningCache:O8};return n.PropTypes=n,n};N8.exports=DN();var NN=N8.exports;const te=co(NN);var ON=typeof Element<"u",LN=typeof Map=="function",zN=typeof Set=="function",FN=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Fp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Fp(e[r],t[r]))return!1;return!0}var i;if(LN&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Fp(r.value[1],t.get(r.value[0])))return!1;return!0}if(zN&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(FN&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(ON&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((o[r]==="_owner"||o[r]==="__v"||o[r]==="__o")&&e.$$typeof)&&!Fp(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}var MN=function(t,n){try{return Fp(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const $N=co(MN);var BN=function(e,t,n,r,o,i,s,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,s,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},HN=BN;const K4=co(HN);var UN=function(t,n,r,o){var i=r?r.call(o,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var s=Object.keys(t),l=Object.keys(n);if(s.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<s.length;u++){var d=s[u];if(!c(d))return!1;var p=t[d],h=n[d];if(i=r?r.call(o,p,h,d):void 0,i===!1||i===void 0&&p!==h)return!1}return!0};const z8=co(UN);function qt(){return qt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qt.apply(this,arguments)}function K2(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pv(e,t)}function pv(e,t){return pv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},pv(e,t)}function Y4(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var Re={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},WN={rel:["amphtml","canonical","alternate"]},VN={type:["application/ld+json"]},qN={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},X4=Object.keys(Re).map(function(e){return Re[e]}),Of={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},GN=Object.keys(Of).reduce(function(e,t){return e[Of[t]]=t,e},{}),vl=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},KN=function(e){var t=vl(e,Re.TITLE),n=vl(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=vl(e,"defaultTitle");return t||r||void 0},YN=function(e){return vl(e,"onChangeClientState")||function(){}},Mg=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,r){return qt({},n,r)},{})},XN=function(e,t){return t.filter(function(n){return n[Re.BASE]!==void 0}).map(function(n){return n[Re.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var o=Object.keys(r),i=0;i<o.length;i+=1){var s=o[i].toLowerCase();if(e.indexOf(s)!==-1&&r[s])return n.concat(r)}return n},[])},Oc=function(e,t,n){var r={};return n.filter(function(o){return!!Array.isArray(o[e])||(o[e]!==void 0&&console&&typeof console.warn=="function"&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof o[e]+'"'),!1)}).map(function(o){return o[e]}).reverse().reduce(function(o,i){var s={};i.filter(function(p){for(var h,m=Object.keys(p),v=0;v<m.length;v+=1){var g=m[v],b=g.toLowerCase();t.indexOf(b)===-1||h==="rel"&&p[h].toLowerCase()==="canonical"||b==="rel"&&p[b].toLowerCase()==="stylesheet"||(h=b),t.indexOf(g)===-1||g!=="innerHTML"&&g!=="cssText"&&g!=="itemprop"||(h=g)}if(!h||!p[h])return!1;var y=p[h].toLowerCase();return r[h]||(r[h]={}),s[h]||(s[h]={}),!r[h][y]&&(s[h][y]=!0,!0)}).reverse().forEach(function(p){return o.push(p)});for(var l=Object.keys(s),c=0;c<l.length;c+=1){var u=l[c],d=qt({},r[u],s[u]);r[u]=d}return o},[]).reverse()},QN=function(e,t){if(Array.isArray(e)&&e.length){for(var n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},F8=function(e){return Array.isArray(e)?e.join(""):e},$g=function(e,t){return Array.isArray(e)?e.reduce(function(n,r){return function(o,i){for(var s=Object.keys(o),l=0;l<s.length;l+=1)if(i[s[l]]&&i[s[l]].includes(o[s[l]]))return!0;return!1}(r,t)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:e}},Q4=function(e,t){var n;return qt({},e,((n={})[t]=void 0,n))},JN=[Re.NOSCRIPT,Re.SCRIPT,Re.STYLE],Bg=function(e,t){return t===void 0&&(t=!0),t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},J4=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Z4=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,r){return n[Of[r]||r]=e[r],n},t)},Mp=function(e,t){return t.map(function(n,r){var o,i=((o={key:r})["data-rh"]=!0,o);return Object.keys(n).forEach(function(s){var l=Of[s]||s;l==="innerHTML"||l==="cssText"?i.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:i[l]=n[s]}),ce.createElement(e,i)})},Yr=function(e,t,n){switch(e){case Re.TITLE:return{toComponent:function(){return o=t.titleAttributes,(i={key:r=t.title})["data-rh"]=!0,s=Z4(o,i),[ce.createElement(Re.TITLE,s,r)];var r,o,i,s},toString:function(){return function(r,o,i,s){var l=J4(i),c=F8(o);return l?"<"+r+' data-rh="true" '+l+">"+Bg(c,s)+"</"+r+">":"<"+r+' data-rh="true">'+Bg(c,s)+"</"+r+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return Z4(t)},toString:function(){return J4(t)}};default:return{toComponent:function(){return Mp(e,t)},toString:function(){return function(r,o,i){return o.reduce(function(s,l){var c=Object.keys(l).filter(function(p){return!(p==="innerHTML"||p==="cssText")}).reduce(function(p,h){var m=l[h]===void 0?h:h+'="'+Bg(l[h],i)+'"';return p?p+" "+m:m},""),u=l.innerHTML||l.cssText||"",d=JN.indexOf(r)===-1;return s+"<"+r+' data-rh="true" '+c+(d?"/>":">"+u+"</"+r+">")},"")}(e,t,n)}}}},fv=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.noscriptTags,s=e.styleTags,l=e.title,c=l===void 0?"":l,u=e.titleAttributes,d=e.linkTags,p=e.metaTags,h=e.scriptTags,m={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var v=function(g){var b=g.linkTags,y=g.scriptTags,x=g.encode,w=$g(g.metaTags,qN),S=$g(b,WN),k=$g(y,VN);return{priorityMethods:{toComponent:function(){return[].concat(Mp(Re.META,w.priority),Mp(Re.LINK,S.priority),Mp(Re.SCRIPT,k.priority))},toString:function(){return Yr(Re.META,w.priority,x)+" "+Yr(Re.LINK,S.priority,x)+" "+Yr(Re.SCRIPT,k.priority,x)}},metaTags:w.default,linkTags:S.default,scriptTags:k.default}}(e);m=v.priorityMethods,d=v.linkTags,p=v.metaTags,h=v.scriptTags}return{priority:m,base:Yr(Re.BASE,t,r),bodyAttributes:Yr("bodyAttributes",n,r),htmlAttributes:Yr("htmlAttributes",o,r),link:Yr(Re.LINK,d,r),meta:Yr(Re.META,p,r),noscript:Yr(Re.NOSCRIPT,i,r),script:Yr(Re.SCRIPT,h,r),style:Yr(Re.STYLE,s,r),title:Yr(Re.TITLE,{title:c,titleAttributes:u},r)}},tp=[],hv=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(r){n.context.helmet=r},helmetInstances:{get:function(){return n.canUseDOM?tp:n.instances},add:function(r){(n.canUseDOM?tp:n.instances).push(r)},remove:function(r){var o=(n.canUseDOM?tp:n.instances).indexOf(r);(n.canUseDOM?tp:n.instances).splice(o,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=fv({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},M8=ce.createContext({}),ZN=te.shape({setHelmet:te.func,helmetInstances:te.shape({get:te.func,add:te.func,remove:te.func})}),eO=typeof document<"u",al=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new hv(r.props.context,t.canUseDOM),r}return K2(t,e),t.prototype.render=function(){return ce.createElement(M8.Provider,{value:this.helmetData.value},this.props.children)},t}(f.Component);al.canUseDOM=eO,al.propTypes={context:te.shape({helmet:te.shape()}),children:te.node.isRequired},al.defaultProps={context:{}},al.displayName="HelmetProvider";var La=function(e,t){var n,r=document.head||document.querySelector(Re.HEAD),o=r.querySelectorAll(e+"[data-rh]"),i=[].slice.call(o),s=[];return t&&t.length&&t.forEach(function(l){var c=document.createElement(e);for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(u==="innerHTML"?c.innerHTML=l.innerHTML:u==="cssText"?c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText)):c.setAttribute(u,l[u]===void 0?"":l[u]));c.setAttribute("data-rh","true"),i.some(function(d,p){return n=p,c.isEqualNode(d)})?i.splice(n,1):s.push(c)}),i.forEach(function(l){return l.parentNode.removeChild(l)}),s.forEach(function(l){return r.appendChild(l)}),{oldTags:i,newTags:s}},Hg=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),o=r?r.split(","):[],i=[].concat(o),s=Object.keys(t),l=0;l<s.length;l+=1){var c=s[l],u=t[c]||"";n.getAttribute(c)!==u&&n.setAttribute(c,u),o.indexOf(c)===-1&&o.push(c);var d=i.indexOf(c);d!==-1&&i.splice(d,1)}for(var p=i.length-1;p>=0;p-=1)n.removeAttribute(i[p]);o.length===i.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==s.join(",")&&n.setAttribute("data-rh",s.join(","))}},e3=function(e,t){var n=e.baseTag,r=e.htmlAttributes,o=e.linkTags,i=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,d=e.title,p=e.titleAttributes;Hg(Re.BODY,e.bodyAttributes),Hg(Re.HTML,r),function(g,b){g!==void 0&&document.title!==g&&(document.title=F8(g)),Hg(Re.TITLE,b)}(d,p);var h={baseTag:La(Re.BASE,n),linkTags:La(Re.LINK,o),metaTags:La(Re.META,i),noscriptTags:La(Re.NOSCRIPT,s),scriptTags:La(Re.SCRIPT,c),styleTags:La(Re.STYLE,u)},m={},v={};Object.keys(h).forEach(function(g){var b=h[g],y=b.newTags,x=b.oldTags;y.length&&(m[g]=y),x.length&&(v[g]=h[g].oldTags)}),t&&t(),l(e,m,v)},Lc=null,Lf=function(e){function t(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return(r=e.call.apply(e,[this].concat(i))||this).rendered=!1,r}K2(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!z8(r,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var r,o,i=this.props.context,s=i.setHelmet,l=null,c=(r=i.helmetInstances.get().map(function(u){var d=qt({},u.props);return delete d.context,d}),{baseTag:XN(["href"],r),bodyAttributes:Mg("bodyAttributes",r),defer:vl(r,"defer"),encode:vl(r,"encodeSpecialCharacters"),htmlAttributes:Mg("htmlAttributes",r),linkTags:Oc(Re.LINK,["rel","href"],r),metaTags:Oc(Re.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:Oc(Re.NOSCRIPT,["innerHTML"],r),onChangeClientState:YN(r),scriptTags:Oc(Re.SCRIPT,["src","innerHTML"],r),styleTags:Oc(Re.STYLE,["cssText"],r),title:KN(r),titleAttributes:Mg("titleAttributes",r),prioritizeSeoTags:QN(r,"prioritizeSeoTags")});al.canUseDOM?(o=c,Lc&&cancelAnimationFrame(Lc),o.defer?Lc=requestAnimationFrame(function(){e3(o,function(){Lc=null})}):(e3(o),Lc=null)):fv&&(l=fv(c)),s(l)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(f.Component);Lf.propTypes={context:ZN.isRequired},Lf.displayName="HelmetDispatcher";var tO=["children"],nO=["children"],$p=function(e){function t(){return e.apply(this,arguments)||this}K2(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!$N(Q4(this.props,"helmetData"),Q4(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,o){if(!o)return null;switch(r.type){case Re.SCRIPT:case Re.NOSCRIPT:return{innerHTML:o};case Re.STYLE:return{cssText:o};default:throw new Error("<"+r.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(r){var o,i=r.child,s=r.arrayTypeChildren;return qt({},s,((o={})[i.type]=[].concat(s[i.type]||[],[qt({},r.newChildProps,this.mapNestedChildrenToProps(i,r.nestedChildren))]),o))},n.mapObjectTypeChildren=function(r){var o,i,s=r.child,l=r.newProps,c=r.newChildProps,u=r.nestedChildren;switch(s.type){case Re.TITLE:return qt({},l,((o={})[s.type]=u,o.titleAttributes=qt({},c),o));case Re.BODY:return qt({},l,{bodyAttributes:qt({},c)});case Re.HTML:return qt({},l,{htmlAttributes:qt({},c)});default:return qt({},l,((i={})[s.type]=qt({},c),i))}},n.mapArrayTypeChildrenToProps=function(r,o){var i=qt({},o);return Object.keys(r).forEach(function(s){var l;i=qt({},i,((l={})[s]=r[s],l))}),i},n.warnOnInvalidChildren=function(r,o){return K4(X4.some(function(i){return r.type===i}),typeof r.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+X4.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),K4(!o||typeof o=="string"||Array.isArray(o)&&!o.some(function(i){return typeof i!="string"}),"Helmet expects a string as a child of <"+r.type+">. Did you forget to wrap your children in braces? ( <"+r.type+">{``}</"+r.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(r,o){var i=this,s={};return ce.Children.forEach(r,function(l){if(l&&l.props){var c=l.props,u=c.children,d=Y4(c,tO),p=Object.keys(d).reduce(function(m,v){return m[GN[v]||v]=d[v],m},{}),h=l.type;switch(typeof h=="symbol"?h=h.toString():i.warnOnInvalidChildren(l,u),h){case Re.FRAGMENT:o=i.mapChildrenToProps(u,o);break;case Re.LINK:case Re.META:case Re.NOSCRIPT:case Re.SCRIPT:case Re.STYLE:s=i.flattenArrayTypeChildren({child:l,arrayTypeChildren:s,newChildProps:p,nestedChildren:u});break;default:o=i.mapObjectTypeChildren({child:l,newProps:o,newChildProps:p,nestedChildren:u})}}}),this.mapArrayTypeChildrenToProps(s,o)},n.render=function(){var r=this.props,o=r.children,i=Y4(r,nO),s=qt({},i),l=i.helmetData;return o&&(s=this.mapChildrenToProps(o,s)),!l||l instanceof hv||(l=new hv(l.context,l.instances)),l?ce.createElement(Lf,qt({},s,{context:l.value,helmetData:void 0})):ce.createElement(M8.Consumer,null,function(c){return ce.createElement(Lf,qt({},s,{context:c}))})},t}(f.Component);$p.propTypes={base:te.object,bodyAttributes:te.object,children:te.oneOfType([te.arrayOf(te.node),te.node]),defaultTitle:te.string,defer:te.bool,encodeSpecialCharacters:te.bool,htmlAttributes:te.object,link:te.arrayOf(te.object),meta:te.arrayOf(te.object),noscript:te.arrayOf(te.object),onChangeClientState:te.func,script:te.arrayOf(te.object),style:te.arrayOf(te.object),title:te.string,titleAttributes:te.object,titleTemplate:te.string,prioritizeSeoTags:te.bool,helmetData:te.object},$p.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},$p.displayName="Helmet";const mv=new Map;function rO(...e){for(const t of e){for(const[n,r]of Object.entries(t.classes))mv.set(r,n);for(const[n,r]of Object.entries(t.properties))mv.set(r,n)}}function oO(e){return mv.get(e)}const E={classes:{class:"https://atomicdata.dev/classes/Class",property:"https://atomicdata.dev/classes/Property",agent:"https://atomicdata.dev/classes/Agent",datatype:"https://atomicdata.dev/classes/Datatype",ontology:"https://atomicdata.dev/class/ontology"},properties:{allowsOnly:"https://atomicdata.dev/properties/allowsOnly",classtype:"https://atomicdata.dev/properties/classtype",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",write:"https://atomicdata.dev/properties/write",publicKey:"https://atomicdata.dev/properties/publicKey",instances:"https://atomicdata.dev/properties/instances",properties:"https://atomicdata.dev/properties/properties",classes:"https://atomicdata.dev/properties/classes",isLocked:"https://atomicdata.dev/properties/isLocked",localId:"https://atomicdata.dev/properties/localId"}},qn={classes:{commit:"https://atomicdata.dev/classes/Commit"},properties:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"}},Lr={classes:{collection:"https://atomicdata.dev/classes/Collection"},properties:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value",sortBy:"https://atomicdata.dev/properties/collection/sortBy",sortDesc:"https://atomicdata.dev/properties/collection/sortDesc",includeExternal:"https://atomicdata.dev/properties/collection/includeExternal"}},X={classes:{article:"https://atomicdata.dev/classes/Article",bookmark:"https://atomicdata.dev/class/Bookmark",chatroom:"https://atomicdata.dev/classes/ChatRoom",currencyProperty:"https://atomicdata.dev/ontology/data-browser/class/currency-property",dateFormat:"https://atomicdata.dev/classes/DateFormat",displayStyle:"https://atomicdata.dev/class/DisplayStyle",document:"https://atomicdata.dev/classes/Document",floatRangeProperty:"https://atomicdata.dev/classes/FloatRangeProperty",folder:"https://atomicdata.dev/classes/Folder",formattedDate:"https://atomicdata.dev/classes/FormattedDate",formattedNumber:"https://atomicdata.dev/classes/FormattedNumber",importer:"https://atomicdata.dev/classes/Importer",message:"https://atomicdata.dev/classes/Message",numberFormat:"https://atomicdata.dev/classes/NumberFormat",paragraph:"https://atomicdata.dev/classes/elements/Paragraph",rangeProperty:"https://atomicdata.dev/classes/RangeProperty",selectProperty:"https://atomicdata.dev/classes/SelectProperty",table:"https://atomicdata.dev/classes/Table",tag:"https://atomicdata.dev/classes/Tag",template:"https://atomicdata.dev/ontology/data-browser/class/template"},properties:{color:"https://atomicdata.dev/properties/color",currency:"https://atomicdata.dev/ontology/data-browser/property/currency",customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning",dateFormat:"https://atomicdata.dev/properties/dateFormat",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",displayStyle:"https://atomicdata.dev/property/display-style",elements:"https://atomicdata.dev/properties/documents/elements",emoji:"https://atomicdata.dev/properties/emoji",image:"https://atomicdata.dev/ontology/data-browser/property/image",imageUrl:"https://atomicdata.dev/properties/imageUrl",max:"https://atomicdata.dev/properties/max",maxFloat:"https://atomicdata.dev/properties/maxFloat",messages:"https://atomicdata.dev/properties/messages",min:"https://atomicdata.dev/properties/min",minFloat:"https://atomicdata.dev/properties/minFloat",nextPage:"https://atomicdata.dev/properties/nextPage",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",preview:"https://atomicdata.dev/property/preview",publishedAt:"https://atomicdata.dev/properties/published-at",replyTo:"https://atomicdata.dev/properties/replyTo",resources:"https://atomicdata.dev/ontology/data-browser/property/resources",subResources:"https://atomicdata.dev/properties/subresources",tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths",tags:"https://atomicdata.dev/properties/tags",url:"https://atomicdata.dev/property/url"}},Ne={classes:{error:"https://atomicdata.dev/classes/Error",endpoint:"https://atomicdata.dev/classes/Endpoint",drive:"https://atomicdata.dev/classes/Drive",redirect:"https://atomicdata.dev/classes/Redirect",file:"https://atomicdata.dev/classes/File",invite:"https://atomicdata.dev/classes/Invite",endpointResponse:"https://atomicdata.dev/ontology/server/class/endpoint-response"},properties:{drives:"https://atomicdata.dev/properties/drives",results:"https://atomicdata.dev/properties/endpoint/results",property:"https://atomicdata.dev/properties/search/property",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent",agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write",filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments",createdBy:"https://atomicdata.dev/properties/createdBy",checksum:"https://atomicdata.dev/properties/checksum",internalId:"https://atomicdata.dev/properties/internalId",children:"https://atomicdata.dev/properties/children",parameters:"https://atomicdata.dev/properties/endpoint/parameters",destination:"https://atomicdata.dev/properties/destination",status:"https://atomicdata.dev/ontology/server/property/status",responseMessage:"https://atomicdata.dev/ontology/server/property/response-message",defaultOntology:"https://atomicdata.dev/ontology/server/property/default-ontology",imageWidth:"https://atomicdata.dev/properties/imageWidth",imageHeight:"https://atomicdata.dev/properties/imageHeight"}};function iO(){rO(E,qn,Lr,X,Ne)}function Bp(){return globalThis===globalThis.window}const sO={};/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const bn=BigInt(0),et=BigInt(1),rr=BigInt(2),$8=BigInt(255),t3=rr**BigInt(252)+BigInt("27742317777372353535851937790883648493"),It={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:rr**$8-BigInt(19),l:t3,n:t3,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")},B8=rr**BigInt(256),iu=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742");const aO=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),lO=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),cO=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),uO=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");let Fr=class er{constructor(t,n,r,o){this.x=t,this.y=n,this.z=r,this.t=o}static fromAffine(t){if(!(t instanceof Un))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return t.equals(Un.ZERO)?er.ZERO:new er(t.x,t.y,et,re(t.x*t.y))}static toAffineBatch(t){const n=fO(t.map(r=>r.z));return t.map((r,o)=>r.toAffine(n[o]))}static normalizeZ(t){return this.toAffineBatch(t).map(this.fromAffine)}equals(t){n3(t);const{x:n,y:r,z:o}=this,{x:i,y:s,z:l}=t,c=re(n*l),u=re(i*o),d=re(r*l),p=re(s*o);return c===u&&d===p}negate(){return new er(re(-this.x),this.y,this.z,re(-this.t))}double(){const{x:t,y:n,z:r}=this,{a:o}=It,i=re(t**rr),s=re(n**rr),l=re(rr*re(r**rr)),c=re(o*i),u=re(re((t+n)**rr)-i-s),d=c+s,p=d-l,h=c-s,m=re(u*p),v=re(d*h),g=re(u*h),b=re(p*d);return new er(m,v,b,g)}add(t){n3(t);const{x:n,y:r,z:o,t:i}=this,{x:s,y:l,z:c,t:u}=t,d=re((r-n)*(l+s)),p=re((r+n)*(l-s)),h=re(p-d);if(h===bn)return this.double();const m=re(o*rr*u),v=re(i*rr*c),g=v+m,b=p+d,y=v-m,x=re(g*h),w=re(b*y),S=re(g*y),k=re(h*b);return new er(x,w,k,S)}subtract(t){return this.add(t.negate())}precomputeWindow(t){const n=1+256/t,r=[];let o=this,i=o;for(let s=0;s<n;s++){i=o,r.push(i);for(let l=1;l<2**(t-1);l++)i=i.add(o),r.push(i);o=i.double()}return r}wNAF(t,n){!n&&this.equals(er.BASE)&&(n=Un.BASE);const r=n&&n._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let o=n&&gv.get(n);o||(o=this.precomputeWindow(r),n&&r!==1&&(o=er.normalizeZ(o),gv.set(n,o)));let i=er.ZERO,s=er.ZERO;const l=1+256/r,c=2**(r-1),u=BigInt(2**r-1),d=2**r,p=BigInt(r);for(let h=0;h<l;h++){const m=h*c;let v=Number(t&u);if(t>>=p,v>c&&(v-=d,t+=et),v===0){let g=o[m];h%2&&(g=g.negate()),s=s.add(g)}else{let g=o[m+Math.abs(v)-1];v<0&&(g=g.negate()),i=i.add(g)}}return er.normalizeZ([i,s])[0]}multiply(t,n){return this.wNAF(zf(t,It.l),n)}multiplyUnsafe(t){let n=zf(t,It.l,!1);const r=er.BASE,o=er.ZERO;if(n===bn)return o;if(this.equals(o)||n===et)return this;if(this.equals(r))return this.wNAF(n);let i=o,s=this;for(;n>bn;)n&et&&(i=i.add(s)),s=s.double(),n>>=et;return i}isSmallOrder(){return this.multiplyUnsafe(It.h).equals(er.ZERO)}isTorsionFree(){return this.multiplyUnsafe(It.l).equals(er.ZERO)}toAffine(t=Hh(this.z)){const{x:n,y:r,z:o}=this,i=re(n*t),s=re(r*t);if(re(o*t)!==et)throw new Error("invZ was invalid");return new Un(i,s)}fromRistrettoBytes(){Wg()}toRistrettoBytes(){Wg()}fromRistrettoHash(){Wg()}};Fr.BASE=new Fr(It.Gx,It.Gy,et,re(It.Gx*It.Gy));Fr.ZERO=new Fr(bn,et,et,bn);function n3(e){if(!(e instanceof Fr))throw new TypeError("ExtendedPoint expected")}function Ug(e){if(!(e instanceof Lu))throw new TypeError("RistrettoPoint expected")}function Wg(){throw new Error("Legacy method: switch to RistrettoPoint")}let Lu=class Ws{constructor(t){this.ep=t}static calcElligatorRistrettoMap(t){const{d:n}=It,r=re(iu*t*t),o=re((r+et)*cO);let i=BigInt(-1);const s=re((i-n*r)*re(r+n));let{isValid:l,value:c}=X2(o,s),u=re(c*t);qi(u)||(u=re(-u)),l||(c=u),l||(i=r);const d=re(i*(r-et)*uO-s),p=c*c,h=re((c+c)*s),m=re(d*aO),v=re(et-p),g=re(et+p);return new Fr(re(h*g),re(v*m),re(m*g),re(h*v))}static hashToCurve(t){t=da(t,64);const n=Vg(t.slice(0,32)),r=this.calcElligatorRistrettoMap(n),o=Vg(t.slice(32,64)),i=this.calcElligatorRistrettoMap(o);return new Ws(r.add(i))}static fromHex(t){t=da(t,32);const{a:n,d:r}=It,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=Vg(t);if(!mO(zu(i),t)||qi(i))throw new Error(o);const s=re(i*i),l=re(et+n*s),c=re(et-n*s),u=re(l*l),d=re(c*c),p=re(n*r*u-d),{isValid:h,value:m}=r3(re(p*d)),v=re(m*c),g=re(m*v*p);let b=re((i+i)*v);qi(b)&&(b=re(-b));const y=re(l*g),x=re(b*y);if(!h||qi(x)||y===bn)throw new Error(o);return new Ws(new Fr(b,y,et,x))}toRawBytes(){let{x:t,y:n,z:r,t:o}=this.ep;const i=re(re(r+n)*re(r-n)),s=re(t*n),{value:l}=r3(re(i*s**rr)),c=re(l*i),u=re(l*s),d=re(c*u*o);let p;if(qi(o*d)){let m=re(n*iu),v=re(t*iu);t=m,n=v,p=re(c*lO)}else p=u;qi(t*d)&&(n=re(-n));let h=re((r-n)*p);return qi(h)&&(h=re(-h)),zu(h)}toHex(){return ud(this.toRawBytes())}toString(){return this.toHex()}equals(t){Ug(t);const n=this.ep,r=t.ep,o=re(n.x*r.y)===re(n.y*r.x),i=re(n.y*r.y)===re(n.x*r.x);return o||i}add(t){return Ug(t),new Ws(this.ep.add(t.ep))}subtract(t){return Ug(t),new Ws(this.ep.subtract(t.ep))}multiply(t){return new Ws(this.ep.multiply(t))}multiplyUnsafe(t){return new Ws(this.ep.multiplyUnsafe(t))}};Lu.BASE=new Lu(Fr.BASE);Lu.ZERO=new Lu(Fr.ZERO);const gv=new WeakMap;let Un=class vv{constructor(t,n){this.x=t,this.y=n}_setWindowSize(t){this._WINDOW_SIZE=t,gv.delete(this)}static fromHex(t,n=!0){const{d:r,P:o}=It;t=da(t,32);const i=t.slice();i[31]=t[31]&-129;const s=ec(i);if(n&&s>=o)throw new Error("Expected 0 < hex < P");if(!n&&s>=B8)throw new Error("Expected 0 < hex < 2**256");const l=re(s*s),c=re(l-et),u=re(r*l+et);let{isValid:d,value:p}=X2(c,u);if(!d)throw new Error("Point.fromHex: invalid y coordinate");const h=(p&et)===et;return(t[31]&128)!==0!==h&&(p=re(-p)),new vv(p,s)}static async fromPrivateKey(t){return(await Uh(t)).point}toRawBytes(){const t=zu(this.y);return t[31]|=this.x&et?128:0,t}toHex(){return ud(this.toRawBytes())}toX25519(){const{y:t}=this,n=re((et+t)*Hh(et-t));return zu(n)}isTorsionFree(){return Fr.fromAffine(this).isTorsionFree()}equals(t){return this.x===t.x&&this.y===t.y}negate(){return new vv(re(-this.x),this.y)}add(t){return Fr.fromAffine(this).add(Fr.fromAffine(t)).toAffine()}subtract(t){return this.add(t.negate())}multiply(t){return Fr.fromAffine(this).multiply(t,this).toAffine()}};Un.BASE=new Un(It.Gx,It.Gy);Un.ZERO=new Un(bn,et);class Y2{constructor(t,n){this.r=t,this.s=n,this.assertValidity()}static fromHex(t){const n=da(t,64),r=Un.fromHex(n.slice(0,32),!1),o=ec(n.slice(32,64));return new Y2(r,o)}assertValidity(){const{r:t,s:n}=this;if(!(t instanceof Un))throw new Error("Expected Point instance");return zf(n,It.l,!1),this}toRawBytes(){const t=new Uint8Array(64);return t.set(this.r.toRawBytes()),t.set(zu(this.s),32),t}toHex(){return ud(this.toRawBytes())}}function dO(...e){if(!e.every(r=>r instanceof Uint8Array))throw new Error("Expected Uint8Array list");if(e.length===1)return e[0];const t=e.reduce((r,o)=>r+o.length,0),n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const i=e[r];n.set(i,o),o+=i.length}return n}const pO=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ud(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=pO[e[n]];return t}function H8(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=n*2,o=e.slice(r,r+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");t[n]=i}return t}function U8(e){const t=e.toString(16).padStart(64,"0");return H8(t)}function zu(e){return U8(e).reverse()}function qi(e){return(re(e)&et)===et}function ec(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");return BigInt("0x"+ud(Uint8Array.from(e).reverse()))}function Vg(e){return re(ec(e)&rr**$8-et)}function re(e,t=It.P){const n=e%t;return n>=bn?n:t+n}function Hh(e,t=It.P){if(e===bn||t<=bn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=re(e,t),r=t,o=bn,i=et;for(;n!==bn;){const s=r/n,l=r%n,c=o-i*s;r=n,n=l,o=i,i=c}if(r!==et)throw new Error("invert: does not exist");return re(o,t)}function fO(e,t=It.P){const n=new Array(e.length),r=e.reduce((i,s,l)=>s===bn?i:(n[l]=i,re(i*s,t)),et),o=Hh(r,t);return e.reduceRight((i,s,l)=>s===bn?i:(n[l]=re(i*n[l],t),re(i*s,t)),o),n}function Mo(e,t){const{P:n}=It;let r=e;for(;t-- >bn;)r*=r,r%=n;return r}function hO(e){const{P:t}=It,n=BigInt(5),r=BigInt(10),o=BigInt(20),i=BigInt(40),s=BigInt(80),l=e*e%t*e%t,c=Mo(l,rr)*l%t,u=Mo(c,et)*e%t,d=Mo(u,n)*u%t,p=Mo(d,r)*d%t,h=Mo(p,o)*p%t,m=Mo(h,i)*h%t,v=Mo(m,s)*m%t,g=Mo(v,s)*m%t,b=Mo(g,r)*d%t;return{pow_p_5_8:Mo(b,rr)*e%t,b2:l}}function X2(e,t){const n=re(t*t*t),r=re(n*n*t),o=hO(e*r).pow_p_5_8;let i=re(e*n*o);const s=re(t*i*i),l=i,c=re(i*iu),u=s===e,d=s===re(-e),p=s===re(-e*iu);return u&&(i=l),(d||p)&&(i=c),qi(i)&&(i=re(-i)),{isValid:u||d,value:i}}function r3(e){return X2(et,e)}async function o3(...e){const t=await dd.sha512(dO(...e)),n=ec(t);return re(n,It.l)}function mO(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function da(e,t){const n=e instanceof Uint8Array?Uint8Array.from(e):H8(e);if(typeof t=="number"&&n.length!==t)throw new Error(`Expected ${t} bytes`);return n}function zf(e,t,n=!0){if(!t)throw new TypeError("Specify max value");if(typeof e=="number"&&Number.isSafeInteger(e)&&(e=BigInt(e)),typeof e=="bigint"&&e<t){if(n){if(bn<e)return e}else if(bn<=e)return e}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function gO(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}async function Uh(e){if(e=typeof e=="bigint"||typeof e=="number"?U8(zf(e,B8)):da(e),e.length!==32)throw new Error("Expected 32 bytes");const t=await dd.sha512(e),n=gO(t.slice(0,32)),r=t.slice(32,64),o=re(ec(n),It.l),i=Un.BASE.multiply(o),s=i.toRawBytes();return{head:n,prefix:r,scalar:o,point:i,pointBytes:s}}async function W8(e){return(await Uh(e)).pointBytes}async function vO(e,t){e=da(e);const{prefix:n,scalar:r,pointBytes:o}=await Uh(t),i=await o3(n,e),s=Un.BASE.multiply(i),l=await o3(s.toRawBytes(),o,e),c=re(i+l*r,It.l);return new Y2(s,c).toRawBytes()}Un.BASE._setWindowSize(8);const Bi={node:sO,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},dd={TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],bytesToHex:ud,getExtendedPublicKey:Uh,mod:re,invert:Hh,hashToPrivateScalar:e=>{if(e=da(e),e.length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");const t=re(ec(e),It.l);if(t===bn||t===et)throw new Error("Invalid private key");return t},randomBytes:(e=32)=>{if(Bi.web)return Bi.web.getRandomValues(new Uint8Array(e));if(Bi.node){const{randomBytes:t}=Bi.node;return new Uint8Array(t(e).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>dd.randomBytes(32),sha512:async e=>{if(Bi.web){const t=await Bi.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}else{if(Bi.node)return Uint8Array.from(Bi.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(e=8,t=Un.BASE){const n=t.equals(Un.BASE)?t:new Un(t.x,t.y);return n._setWindowSize(e),n.multiply(rr),n}};function yO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bO=function(e,t){t||(t={}),typeof t=="function"&&(t={cmp:t});var n=typeof t.cycles=="boolean"?t.cycles:!1,r=t.cmp&&function(i){return function(s){return function(l,c){var u={key:l,value:s[l]},d={key:c,value:s[c]};return i(u,d)}}}(t.cmp),o=[];return function i(s){if(s&&s.toJSON&&typeof s.toJSON=="function"&&(s=s.toJSON()),s!==void 0){if(typeof s=="number")return isFinite(s)?""+s:"null";if(typeof s!="object")return JSON.stringify(s);var l,c;if(Array.isArray(s)){for(c="[",l=0;l<s.length;l++)l&&(c+=","),c+=i(s[l])||"null";return c+"]"}if(s===null)return"null";if(o.indexOf(s)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=o.push(s)-1,d=Object.keys(s).sort(r&&r(s));for(c="",l=0;l<d.length;l++){var p=d[l],h=i(s[p]);h&&(c&&(c+=","),c+=JSON.stringify(p)+":"+h)}return o.splice(u,1),"{"+c+"}"}}(e)};const xO=yO(bO);var ll="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var np=0;np<ll.length;np++)Vc[ll.charCodeAt(np)]=np;var Ff=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=ll[t[n]>>2],o+=ll[(t[n]&3)<<4|t[n+1]>>4],o+=ll[(t[n+1]&15)<<2|t[n+2]>>6],o+=ll[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},V8=function(e){var t=e.length*.75,n=e.length,r,o=0,i,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)i=Vc[e.charCodeAt(r)],s=Vc[e.charCodeAt(r+1)],l=Vc[e.charCodeAt(r+2)],c=Vc[e.charCodeAt(r+3)],d[o++]=i<<2|s>>4,d[o++]=(s&15)<<4|l>>2,d[o++]=(l&3)<<6|c&63;return u};/*! noble-hashes - MIT License (c) 2021 Paul Miller (paulmillr.com) */const qg=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),wO=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!wO)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));(()=>{const e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);try{if(e){const{setImmediate:t}=e("timers");return()=>new Promise(n=>t(n))}}catch{}return()=>new Promise(t=>setTimeout(t,0))})();function SO(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}function q8(e){if(typeof e=="string"&&(e=SO(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}let CO=class{clone(){return this._cloneInto()}};function Q2(e){const t=r=>e().update(q8(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t.init=t.create,t}function jO(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),l=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,l,r)}let kO=class extends CO{constructor(t,n,r,o){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=qg(this.buffer)}update(t){if(this.destroyed)throw new Error("instance is destroyed");const{view:n,buffer:r,blockLen:o,finished:i}=this;if(i)throw new Error("digest() was already called");t=q8(t);const s=t.length;for(let l=0;l<s;){const c=Math.min(o-this.pos,s-l);if(c===o){const u=qg(t);for(;o<=s-l;l+=o)this.process(u,l);continue}r.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array)||t.length<this.outputLen)throw new Error("_Sha2: Invalid output buffer");if(this.finished)throw new Error("digest() was already called");this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:i}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let c=s;c<o;c++)n[c]=0;jO(r,o-8,BigInt(this.length*8),i),this.process(r,0);const l=qg(t);this.get().forEach((c,u)=>l.setUint32(4*u,c,i))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:i,destroyed:s,pos:l}=this;return t.length=o,t.pos=l,t.finished=i,t.destroyed=s,o%n&&t.buffer.set(r),t}};const rp=BigInt(2**32-1),i3=BigInt(32);function EO(e,t=!1){return t?{h:Number(e&rp),l:Number(e>>i3&rp)}:{h:Number(e>>i3&rp)|0,l:Number(e&rp)|0}}function _O(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:s}=EO(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}const s3=(e,t,n)=>e>>>n,a3=(e,t,n)=>e<<32-n|t>>>n,za=(e,t,n)=>e>>>n|t<<32-n,Fa=(e,t,n)=>e<<32-n|t>>>n,op=(e,t,n)=>e<<64-n|t>>>n-32,ip=(e,t,n)=>e>>>n-32|t<<64-n;function ci(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const IO=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),RO=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,AO=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),PO=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,TO=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),DO=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0,[NO,OO]=_O(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Hi=new Uint32Array(80),Ui=new Uint32Array(80);class J2 extends kO{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:i,Cl:s,Dh:l,Dl:c,Eh:u,El:d,Fh:p,Fl:h,Gh:m,Gl:v,Hh:g,Hl:b}=this;return[t,n,r,o,i,s,l,c,u,d,p,h,m,v,g,b]}set(t,n,r,o,i,s,l,c,u,d,p,h,m,v,g,b){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=i|0,this.Cl=s|0,this.Dh=l|0,this.Dl=c|0,this.Eh=u|0,this.El=d|0,this.Fh=p|0,this.Fl=h|0,this.Gh=m|0,this.Gl=v|0,this.Hh=g|0,this.Hl=b|0}process(t,n){for(let w=0;w<16;w++,n+=4)Hi[w]=t.getUint32(n),Ui[w]=t.getUint32(n+=4);for(let w=16;w<80;w++){const S=Hi[w-15]|0,k=Ui[w-15]|0,_=za(S,k,1)^za(S,k,8)^s3(S,k,7),I=Fa(S,k,1)^Fa(S,k,8)^a3(S,k,7),P=Hi[w-2]|0,z=Ui[w-2]|0,D=za(P,z,19)^op(P,z,61)^s3(P,z,6),F=Fa(P,z,19)^ip(P,z,61)^a3(P,z,6),$=AO(I,F,Ui[w-7],Ui[w-16]),Z=PO($,_,D,Hi[w-7],Hi[w-16]);Hi[w]=Z|0,Ui[w]=$|0}let{Ah:r,Al:o,Bh:i,Bl:s,Ch:l,Cl:c,Dh:u,Dl:d,Eh:p,El:h,Fh:m,Fl:v,Gh:g,Gl:b,Hh:y,Hl:x}=this;for(let w=0;w<80;w++){const S=za(p,h,14)^za(p,h,18)^op(p,h,41),k=Fa(p,h,14)^Fa(p,h,18)^ip(p,h,41),_=p&m^~p&g,I=h&v^~h&b,P=TO(x,k,I,OO[w],Ui[w]),z=DO(P,y,S,_,NO[w],Hi[w]),D=P|0,F=za(r,o,28)^op(r,o,34)^op(r,o,39),$=Fa(r,o,28)^ip(r,o,34)^ip(r,o,39),Z=r&i^r&l^i&l,ee=o&s^o&c^s&c;y=g|0,x=b|0,g=m|0,b=v|0,m=p|0,v=h|0,{h:p,l:h}=ci(u|0,d|0,z|0,D|0),u=l|0,d=c|0,l=i|0,c=s|0,i=r|0,s=o|0;const W=IO(D,$,ee);r=RO(W,z,F,Z),o=W|0}({h:r,l:o}=ci(this.Ah|0,this.Al|0,r|0,o|0)),{h:i,l:s}=ci(this.Bh|0,this.Bl|0,i|0,s|0),{h:l,l:c}=ci(this.Ch|0,this.Cl|0,l|0,c|0),{h:u,l:d}=ci(this.Dh|0,this.Dl|0,u|0,d|0),{h:p,l:h}=ci(this.Eh|0,this.El|0,p|0,h|0),{h:m,l:v}=ci(this.Fh|0,this.Fl|0,m|0,v|0),{h:g,l:b}=ci(this.Gh|0,this.Gl|0,g|0,b|0),{h:y,l:x}=ci(this.Hh|0,this.Hl|0,y|0,x|0),this.set(r,o,i,s,l,c,u,d,p,h,m,v,g,b,y,x)}roundClean(){Hi.fill(0),Ui.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class LO extends J2{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class zO extends J2{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const FO=Q2(()=>new J2);Q2(()=>new LO);Q2(()=>new zO);var Y=(e=>(e.ATOMIC_URL="https://atomicdata.dev/datatypes/atomicURL",e.BOOLEAN="https://atomicdata.dev/datatypes/boolean",e.DATE="https://atomicdata.dev/datatypes/date",e.FLOAT="https://atomicdata.dev/datatypes/float",e.INTEGER="https://atomicdata.dev/datatypes/integer",e.MARKDOWN="https://atomicdata.dev/datatypes/markdown",e.RESOURCEARRAY="https://atomicdata.dev/datatypes/resourceArray",e.SLUG="https://atomicdata.dev/datatypes/slug",e.STRING="https://atomicdata.dev/datatypes/string",e.TIMESTAMP="https://atomicdata.dev/datatypes/timestamp",e.UNKNOWN="unknown-datatype",e))(Y||{});const MO=new Set(Object.values(Y)),G8=e=>MO.has(e)?e:"unknown-datatype",$O=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,BO=/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/,Do=(e,t)=>{let n=null;if(e===void 0)throw new Error(`Value is undefined, expected ${t}`);switch(t){case"https://atomicdata.dev/datatypes/string":{if(!ts(e)){n="Not a string";break}break}case"https://atomicdata.dev/datatypes/markdown":{if(!ts(e)){n="Not a string";break}break}case"https://atomicdata.dev/datatypes/slug":{if(!ts(e)){n="Not a slug, not even a string";break}e.match($O)===null&&(n="Not a valid slug. Only lowercase letters and numbers with dashes `-` between them");break}case"https://atomicdata.dev/datatypes/atomicURL":{if(!ts(e)){n="Not a string. Should be a URL";break}Bt.tryValidSubject(e);break}case"https://atomicdata.dev/datatypes/resourceArray":{if(!Z2(e)){n="Not an array";break}e.map((r,o)=>{try{Bt.tryValidSubject(r)}catch{const i=new Error("Invalid URL");throw i.index=o,i}});break}case"https://atomicdata.dev/datatypes/integer":{if(!Wh(e)){n="Not a number";break}e%1!==0&&(n="Not an integer");break}case"https://atomicdata.dev/datatypes/date":{if(!ts(e)){n="Not a string";break}e.match(BO)===null&&(n="Not a date string: YYYY-MM-DD");break}}if(n!==null)throw new Error(n)};function Z2(e){return Object.prototype.toString.call(e)==="[object Array]"}function ts(e){return typeof e=="string"}function Wh(e){return typeof e=="number"}const K8={"https://atomicdata.dev/datatypes/string":"String","https://atomicdata.dev/datatypes/slug":"Slug","https://atomicdata.dev/datatypes/markdown":"Markdown","https://atomicdata.dev/datatypes/integer":"Integer","https://atomicdata.dev/datatypes/float":"Float","https://atomicdata.dev/datatypes/boolean":"Boolean","https://atomicdata.dev/datatypes/date":"Date","https://atomicdata.dev/datatypes/timestamp":"Timestamp","https://atomicdata.dev/datatypes/atomicURL":"Resource","https://atomicdata.dev/datatypes/resourceArray":"ResourceArray","unknown-datatype":"Unknown"};var yi=(e=>(e.Unauthorized="Unauthorized",e.NotFound="NotFound",e.Server="Server",e.Client="Client",e))(yi||{});function Y8(e){return!!(e instanceof Nr&&(e.type==="Unauthorized"||e.message.includes("Unauthorized")))}function HO(e){return e instanceof Nr}let Nr=class yv extends Error{constructor(t,n="Client"){super(t),Object.setPrototypeOf(this,yv.prototype),this.type=n,this.message=t;try{const r=JSON.parse(t)[E.properties.description];r&&(this.message=r)}catch{}this.message||(this.message=this.createMessage())}static fromResource(t){return new yv(t.get(E.properties.description).toString())}createMessage(){switch(this.type){case"Unauthorized":return"You don't have the rights to do this.";case"NotFound":return"404 Not found.";case"Server":return"500 Unknown server error.";default:return"Unknown error."}}},X8=class{constructor(){this.subscriptions=new Map}register(t,n){const r=this.subscriptions.get(t)??new Set;return r.add(n),this.subscriptions.set(t,r),()=>{r.delete(n)}}async emit(t,...n){if(!this.subscriptions.has(t))return;const r=this.subscriptions.get(t),o=async i=>i(...n);r&&await Promise.allSettled([...r].map(i=>o(i)))}hasSubscriptions(t){return this.subscriptions.has(t)}};class eb{constructor(t,n,r,o=!1){this.__internalObject=this,this.pages=new Map,this._totalMembers=0,this.store=t,this.server=n,this.params=r,o||(this._waitForReady=this.fetchPage(0)),this.clearPages=this.clearPages.bind(this)}get property(){return this.params.property}get value(){return this.params.value}get sortBy(){return this.params.sort_by}get sortDesc(){return!!this.params.sort_desc}get pageSize(){return parseInt(this.params.page_size,10)}get totalMembers(){return this._totalMembers}get totalPages(){return Math.ceil(this.totalMembers/this.pageSize)}waitForReady(){return this._waitForReady}async getMemberWithIndex(t){if(t>=this.totalMembers)throw new Error("Index out of bounds");const n=Math.floor(t/this.pageSize);return this.pages.has(n)||(this._waitForReady=this.fetchPage(n),await this._waitForReady),this.pages.get(n).getSubjects(Lr.properties.members)[t%this.pageSize]}clearPages(){this.pages=new Map}async refresh(){return this.clearPages(),this._waitForReady=this.fetchPage(0),this._waitForReady}clone(){const t=new eb(this.store,this.server,this.params);return t._totalMembers=this._totalMembers,t._waitForReady=this._waitForReady,t.pages=this.pages,t}async*[Symbol.asyncIterator](){await this.waitForReady();for(let t=0;t<this.totalMembers;t++){const n=await this.getMemberWithIndex(t);n!==void 0&&(yield n)}}async getAllMembers(){const t=[];for await(const n of this)t.push(n);return t}async getMembersOnPage(t){return this.pages.has(t)||await this.fetchPage(t),(this.pages.get(t).props.members??[]).filter(n=>n!==void 0)}buildSubject(t){const n=new URL(`${this.server}/query`);for(const[r,o]of Object.entries(this.params))n.searchParams.set(r,o);return n.searchParams.set("current_page",`${t}`),n.toString()}async fetchPage(t){const n=this.buildSubject(t),r=await this.store.fetchResourceFromServer(n);if(!r)throw new Error("Invalid collection: resource does not exist");if(r.error)throw new Error(`Invalid collection: resource has error: ${r.error}`);this.pages.set(t,r);const o=r.props.totalMembers;if(!Wh(o))throw new Error("Invalid collection: total-members is not a number");this._totalMembers=o}}function Gg(e){return e.__internalObject!==e&&console.warn("Attempted to proxy a proxy for a collection"),new Proxy(e.__internalObject,{})}class tb{constructor(t,n){this.params={page_size:"30"},this.store=t,this.server=n??new URL(t.getServerUrl()).origin}setProperty(t){return this.params.property=t,this}setValue(t){return this.params.value=t,this}setSortBy(t){return this.params.sort_by=t,this}setSortDesc(t){return this.params.sort_desc=t,this}setPageSize(t){return this.params.page_size=`${t}`,this}build(){return new eb(this.store,this.server,this.params)}async buildAndFetch(){const t=this.build();return await t.waitForReady(),t}}const Dl={agent:"https://atomicdata.dev/classes/Agent",chatRoom:"https://atomicdata.dev/classes/ChatRoom",collection:"https://atomicdata.dev/classes/Collection",commit:"https://atomicdata.dev/classes/Commit",class:"https://atomicdata.dev/classes/Class",document:"https://atomicdata.dev/classes/Document",bookmark:"https://atomicdata.dev/class/Bookmark",elements:{paragraph:"https://atomicdata.dev/classes/elements/Paragraph"},error:"https://atomicdata.dev/classes/Error",property:"https://atomicdata.dev/classes/Property",datatype:"https://atomicdata.dev/classes/Datatype",endpoint:"https://atomicdata.dev/classes/Endpoint",drive:"https://atomicdata.dev/classes/Drive",redirect:"https://atomicdata.dev/classes/Redirect",invite:"https://atomicdata.dev/classes/Invite",file:"https://atomicdata.dev/classes/File",message:"https://atomicdata.dev/classes/Message",importer:"https://atomicdata.dev/classes/Importer",folder:"https://atomicdata.dev/classes/Folder",article:"https://atomicdata.dev/classes/Article",displayStyle:"https://atomicdata.dev/class/DisplayStyle",displayStyles:{grid:"https://atomicdata.dev/display-style/grid",list:"https://atomicdata.dev/display-style/list"},dateFormat:"https://atomicdata.dev/classes/DateFormat",numberFormat:"https://atomicdata.dev/classes/NumberFormat",constraintProperties:{rangeProperty:"https://atomicdata.dev/classes/RangeProperty",floatRangeProperty:"https://atomicdata.dev/classes/FloatRangeProperty",formattedNumber:"https://atomicdata.dev/classes/FormattedNumber",selectProperty:"https://atomicdata.dev/classes/SelectProperty",formattedDate:"https://atomicdata.dev/classes/FormattedDate"},table:"https://atomicdata.dev/classes/Table",tag:"https://atomicdata.dev/classes/Tag",ontology:"https://atomicdata.dev/class/ontology"},pe={allowsOnly:"https://atomicdata.dev/properties/allowsOnly",getAll:"https://atomicdata.dev/properties/?page_size=999",children:"https://atomicdata.dev/properties/children",classType:"https://atomicdata.dev/properties/classtype",createdBy:"https://atomicdata.dev/properties/createdBy",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",drives:"https://atomicdata.dev/properties/drives",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",paymentPointer:"https://atomicdata.dev/properties/paymentPointer",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",subResources:"https://atomicdata.dev/properties/subresources",write:"https://atomicdata.dev/properties/write",displayStyle:"https://atomicdata.dev/property/display-style",publishedAt:"https://atomicdata.dev/properties/published-at",agent:{publicKey:"https://atomicdata.dev/properties/publicKey"},collection:{members:"https://atomicdata.dev/properties/collection/members",currentPage:"https://atomicdata.dev/properties/collection/currentPage",pageSize:"https://atomicdata.dev/properties/collection/pageSize",property:"https://atomicdata.dev/properties/collection/property",totalMembers:"https://atomicdata.dev/properties/collection/totalMembers",totalPages:"https://atomicdata.dev/properties/collection/totalPages",value:"https://atomicdata.dev/properties/collection/value"},commit:{subject:"https://atomicdata.dev/properties/subject",createdAt:"https://atomicdata.dev/properties/createdAt",lastCommit:"https://atomicdata.dev/properties/lastCommit",previousCommit:"https://atomicdata.dev/properties/previousCommit",signer:"https://atomicdata.dev/properties/signer",set:"https://atomicdata.dev/properties/set",push:"https://atomicdata.dev/properties/push",remove:"https://atomicdata.dev/properties/remove",destroy:"https://atomicdata.dev/properties/destroy",signature:"https://atomicdata.dev/properties/signature"},document:{elements:"https://atomicdata.dev/properties/documents/elements"},endpoint:{parameters:"https://atomicdata.dev/properties/endpoint/parameters",results:"https://atomicdata.dev/properties/endpoint/results"},search:{query:"https://atomicdata.dev/properties/search/query",limit:"https://atomicdata.dev/properties/search/limit",property:"https://atomicdata.dev/properties/search/property"},redirect:{destination:"https://atomicdata.dev/properties/destination",redirectAgent:"https://atomicdata.dev/properties/invite/redirectAgent"},invite:{agent:"https://atomicdata.dev/properties/invite/agent",publicKey:"https://atomicdata.dev/properties/invite/publicKey",target:"https://atomicdata.dev/properties/invite/target",usagesLeft:"https://atomicdata.dev/properties/invite/usagesLeft",users:"https://atomicdata.dev/properties/invite/users",write:"https://atomicdata.dev/properties/invite/write"},file:{filename:"https://atomicdata.dev/properties/filename",filesize:"https://atomicdata.dev/properties/filesize",downloadUrl:"https://atomicdata.dev/properties/downloadURL",mimetype:"https://atomicdata.dev/properties/mimetype",attachments:"https://atomicdata.dev/properties/attachments"},chatRoom:{messages:"https://atomicdata.dev/properties/messages",nextPage:"https://atomicdata.dev/properties/nextPage",replyTo:"https://atomicdata.dev/properties/replyTo"},bookmark:{url:"https://atomicdata.dev/property/url",preview:"https://atomicdata.dev/property/preview",imageUrl:"https://atomicdata.dev/properties/imageUrl"},constraints:{max:"https://atomicdata.dev/properties/max",min:"https://atomicdata.dev/properties/min",maxFloat:"https://atomicdata.dev/properties/maxFloat",minFloat:"https://atomicdata.dev/properties/minFloat",numberFormatting:"https://atomicdata.dev/properties/numberFormatting",decimalPlaces:"https://atomicdata.dev/properties/decimalPlaces",dateFormat:"https://atomicdata.dev/properties/dateFormat"},table:{tableColumnWidths:"https://atomicdata.dev/properties/tableColumnWidths"},ontology:{customNodePositioning:"https://atomicdata.dev/properties/custom-node-positioning"},color:"https://atomicdata.dev/properties/color",emoji:"https://atomicdata.dev/properties/emoji",classes:"https://atomicdata.dev/properties/classes",properties:"https://atomicdata.dev/properties/properties",instances:"https://atomicdata.dev/properties/instances"},bv={atomicUrl:"https://atomicdata.dev/datatypes/atomicURL",boolean:"https://atomicdata.dev/datatypes/boolean",date:"https://atomicdata.dev/datatypes/date",float:"https://atomicdata.dev/datatypes/float",integer:"https://atomicdata.dev/datatypes/integer",markdown:"https://atomicdata.dev/datatypes/markdown",resourceArray:"https://atomicdata.dev/datatypes/resourceArray",slug:"https://atomicdata.dev/datatypes/slug",string:"https://atomicdata.dev/datatypes/string",timestamp:"https://atomicdata.dev/datatypes/timestamp"},Q8={publicAgent:"https://atomicdata.dev/agents/publicAgent",displayStyleGrid:"https://atomicdata.dev/agents/publicAgent",numberFormats:{number:"https://atomicdata.dev/classes/NumberFormat/number",percentage:"https://atomicdata.dev/classes/NumberFormat/Percentage",currency:"https://atomicdata.dev/ontology/data-browser/number-format/vAikhI3z"},dateFormats:{localNumeric:"https://atomicdata.dev/classes/DateFormat/localNumeric",localLong:"https://atomicdata.dev/classes/DateFormat/localLong",localRelative:"https://atomicdata.dev/classes/DateFormat/localRelative"}},J8={import:"/import"},J={properties:pe,endpoints:J8,classes:Dl,datatypes:bv,instances:Q8};function su(e){if(e===void 0)throw new Error(`Not an array: ${e}, is ${typeof e}`);if(e.constructor===Array)return e;throw new Error(`Not an array: ${e}, is a ${typeof e}`)}function UO(e){if(typeof e!="boolean")throw new Error(`Not a boolean: ${e}, is a ${typeof e}`);return e}function Z8(e){if(typeof e=="number"){const t=new Date(0);return t.setUTCMilliseconds(e),t}if(typeof e=="string")return new Date(e.toString());throw new Error(`Cannot be converted into Date: ${e}, is a ${typeof e}`)}function WO(e){if(typeof e!="number")throw new Error(`Not a number: ${e}, is a ${typeof e}`);return e}function xv(e){return(e==null?void 0:e.toString())??"undefined"}function VO(e){if(typeof e=="string")return e;if(e instanceof Date)throw new Error(`Not a resource: ${e}, is a Date`);if((e==null?void 0:e.constructor)===Array)throw new Error(`Not a resource: ${e}, is an Array`);if(typeof e=="object"){const t=new pa,[n]=t.parseObject(e,"nested-resource");return n}throw typeof e!="object"?new Error(`Not a resource: ${e}, is a ${typeof e}`):new Error(`Not a resource: ${e}, is a ${typeof e}`)}const ut="unknown-subject";var nb=(e=>(e.LocalChange="local-change",e))(nb||{});let na=class wv{constructor(t,n){if(this.loading=!1,this.appliedCommitSignatures=new Set,this.__internalObject=this,this.propvals=new Map,this.hasQueue=!1,this.eventManager=new X8,typeof t!="string")throw new Error("Invalid subject given to resource, must be a string, found "+typeof t);this.new=!!n,this._subject=t,this.commitBuilder=new Kg(t)}get subject(){return this._subject}get title(){return this.get(E.properties.name)??this.get(E.properties.shortname)??this.get(Ne.properties.filename)??this.subject}get props(){const t={};for(const n of this.propvals.keys()){const r=oO(n);r&&(t[r]=this.get(n))}return t}get store(){if(!this._store)throw console.error(`Resource ${this.title} has no store`),new Error("Resource has no store");return this._store}on(t,n){return this.eventManager.register(t,n)}setStore(t){this._store=t}equals(t){return this===t.__internalObject?!0:!(this.subject!==t.subject||this.new!==t.new||this.error!==t.error||this.loading!==t.loading||JSON.stringify(Array.from(this.propvals.entries()))!==JSON.stringify(Array.from(t.propvals.entries()))||JSON.stringify(Array.from(this.commitBuilder.set.entries()))!==JSON.stringify(Array.from(t.commitBuilder.set.entries())))}async canWrite(t,n){const r=this.get(pe.write);if(!t)return[!1,"No agent given"];if(r&&su(r).includes(t))return[!0,void 0];if(r&&su(r).includes(Q8.publicAgent))return[!0,void 0];const o=this.get(pe.parent);return o?o===t?[!0,void 0]:n===o?(console.warn("Circular parent",n),[!0,`Circular parent in ${this.subject}`]):await(await this.store.getResource(o)).canWrite(t,this.subject):[!1,`No write right or parent in ${this.subject}`]}clone(){const t=new wv(this.subject);return t.propvals=structuredClone(this.propvals),t.loading=this.loading,t.new=this.new,t.error=structuredClone(this.error),t.commitError=this.commitError,t.commitBuilder=this.commitBuilder.clone(),t.appliedCommitSignatures=this.appliedCommitSignatures,t}isReady(){return!this.loading&&this.error===void 0}get(t){return this.propvals.get(t)}getSubjects(t){return this.getArray(t).map(n=>typeof n=="string"?n:n["@id"])}getArray(t){const n=this.propvals.get(t)??[];return su(n)}getClasses(){return this.getSubjects(E.properties.isA)}hasClasses(...t){return t.every(n=>this.getClasses().includes(n))}matchClass(t,n){for(const[r,o]of Object.entries(t))if(this.hasClasses(r))return o;return n}removeClasses(...t){this.set(E.properties.isA,this.getClasses().filter(n=>!t.includes(n)),!1)}addClasses(...t){const n=new Set([...this.getClasses(),...t]);return this.set(E.properties.isA,Array.from(n))}hasUnsavedChanges(){return this.commitBuilder.hasUnsavedChanges()}getCommitsCollectionSubject(){const t=new URL(this.subject);return t.pathname="/commits",t.searchParams.append("property",J.properties.commit.subject),t.searchParams.append("value",this.subject),t.searchParams.append("sort_by",J.properties.commit.createdAt),t.searchParams.append("include_nested","true"),t.searchParams.append("page_size","9999"),t.toString()}async getChildrenCollection(t=100){return await new tb(this.store).setPageSize(t).setProperty(E.properties.parent).setValue(this.subject).buildAndFetch()}async getHistory(t){const n=(await this.store.fetchResourceFromServer(this.getCommitsCollectionSubject())).get(pe.collection.members),r=[];let o=new wv(this.subject);for(let i=0;i<n.length;i++){const s=await this.store.getResource(n[i]),l=YO(s),c=o7(o.clone(),l);r.push({commit:l,resource:c}),o=c,t&&i%30===0&&(t(Math.round(i/n.length*100)),await qO())}return r}async setVersion(t){const n=t.resource.getPropVals();for(const r of this.propvals.keys())n.has(r)||this.remove(r);for(const[r,o]of n.entries())await this.set(r,o);await this.save()}getSubject(){return this.subject}getSubjectNoParams(){const t=new URL(this.subject);return t.origin+t.pathname}getPropVals(){return this.propvals}async getRights(){const t=[];this.getSubjects(pe.write).forEach(r=>{t.push({for:r,type:"write",setIn:this.subject})}),this.getSubjects(pe.read).forEach(r=>{t.push({for:r,type:"read",setIn:this.subject})});const n=this.get(pe.parent);if(n){if(n===this.subject)return console.warn("Circular parent",n),t;const r=await(await this.store.getResource(n)).getRights();t.push(...r)}return t}isUnauthorized(){return!!this.error&&Y8(this.error)}async destroy(t){if(this.new){this.store.removeResource(this.subject);return}const n=new Kg(this.subject);if(n.setDestroy(!0),t===void 0&&(t=this.store.getAgent()),(t==null?void 0:t.subject)===void 0)throw new Error("No agent has been set or passed, you cannot delete this.");const r=await n.sign(t.privateKey,t.subject),o=new URL(this.subject).origin+"/commit";await this.store.postCommit(r,o),this.store.removeResource(this.subject)}pushPropVal(t,n,r){this.push(t,n,r)}push(t,n,r){const o=this.get(t)??[];r&&(n=n.filter(i=>!o.includes(i)).filter(i=>{var s;return!((s=this.commitBuilder.push[t])!=null&&s.includes(i))}).filter((i,s,l)=>l.indexOf(i)===s)),this.commitBuilder.addPushAction(t,...n),this.propvals.set(t,[...o,...n])}removePropVal(t){this.remove(t)}remove(t){this.propvals.delete(t),this.commitBuilder.addRemoveAction(t)}removePropValLocally(t){this.propvals.delete(t)}async save(t){var n,r;if(!this.commitBuilder.hasUnsavedChanges()){console.warn(`No changes to ${this.subject}, not saving`);return}const o=this.store.getAgent()??t;if(!o)throw new Error("No agent has been set or passed, you cannot save.");if(this.hasQueue)return;if(this.isParentNew()){this.store.batchResource(this.subject);return}if(this.inProgressCommit)return this.hasQueue=!0,await this.inProgressCommit,this.hasQueue=!1,this.inProgressCommit=void 0,this.save(t);const i=(n=this.get(pe.commit.lastCommit))==null?void 0:n.toString();i&&this.commitBuilder.setPreviousCommit(i);const s=this.new;let l=()=>{};this.inProgressCommit=new Promise(p=>{l=()=>{p()}});const c=this.commitBuilder.clone();this.commitBuilder=new Kg(this.subject);const u=await c.sign(o.privateKey,o.subject);this.appliedCommitSignatures.add(u.signature),this.loading=!1,this.new=!1;const d=new URL(this.subject).origin+"/commit";try{this.commitError=void 0,this.store.addResources(this,{skipCommitCompare:!0});const p=await this.store.postCommit(u,d);return this.setUnsafe(pe.commit.lastCommit,p.id),this.store.notifyResourceSaved(this),s&&(this.store.subscribeWebSocket(this.subject),await this.store.saveBatchForParent(this.subject)),l(),p.id}catch(p){if(p.message.includes("previousCommit")){console.warn("previousCommit missing or mismatch, retrying...");const h=(r=(await this.store.fetchResourceFromServer(this.subject)).get(pe.commit.lastCommit))==null?void 0:r.toString();return h&&this.setUnsafe(pe.commit.lastCommit,h),l(),await this.save(o)}throw this.commitBuilder=c,this.commitError=p,this.store.addResources(this,{skipCommitCompare:!0}),l(),p}}async set(t,n,r=!0){if(this.store.isOffline()&&r&&(console.warn("Offline, not validating"),r=!1),r){const o=await this.store.getProperty(t);try{Do(n,o.datatype)}catch(i){throw i instanceof Error&&(i.message=`Error validating ${o.shortname} with value ${n} for ${this.subject}: ${i.message}`),i}}if(n===void 0){this.remove(t),this.eventManager.emit("local-change",t,n);return}this.propvals.set(t,n),this.commitBuilder.addSetAction(t,n),this.eventManager.emit("local-change",t,n)}setUnsafe(t,n){this.propvals.set(t,n)}setError(t){this.error=t}setSubject(t){Bt.tryValidSubject(t),this.commitBuilder.setSubject(t),this._subject=t}async refresh(){await this.store.fetchResourceFromServer(this.subject,{noWebSocket:!0})}isParentNew(){const t=this.propvals.get(E.properties.parent);return t?this.store.getResourceLoading(t).new:!1}};var Sv=(e=>(e.READ="read",e.WRITE="write",e))(Sv||{});function Mf(e){return e.__internalObject!==e&&console.warn("Attempted to proxy a proxy for "+e.subject),new Proxy(e.__internalObject,{})}const qO=()=>new Promise(e=>setTimeout(e));let pa=class{constructor(){this.parsedResources=[]}parseObject(t,n){return this.parsedResources=[],[this.parseJsonADResource(t,n),[...this.parsedResources]]}parseArray(t){return this.parsedResources=[],[this.parseJsonADArray(t),[...this.parsedResources]]}parseValue(t,n){return this.parsedResources=[],[this.parseJsonAdResourceValue(t,n),[...this.parsedResources]]}parseJsonADResource(t,n=ut){const r=new na(n);this.parsedResources.push(r);try{for(const[o,i]of Object.entries(t)){if(o==="@id"){if(typeof i!="string")throw new Error("'@id' field must be a string");if(r.subject!=="undefined"&&r.subject!==ut&&i!==r.subject)throw new Error(`Resource has wrong subject in @id. Received subject was ${i}, expected ${r.subject}.`);r.setSubject(i);continue}try{if(Z2(i)){const s=i.map(l=>this.parseJsonAdResourceValue(l,o));r.setUnsafe(o,s)}else if(typeof i=="string")r.setUnsafe(o,i);else if(typeof i=="number")r.setUnsafe(o,i);else if(typeof i=="boolean")r.setUnsafe(o,i);else{const s=this.parseJsonAdResourceValue(i,o);r.setUnsafe(o,s)}}catch(s){const l=`${`Failed creating value ${i} for key ${o} in resource ${r.subject}`}. ${s.message}`;throw new Error(l)}}r.loading=!1,r.hasClasses(Ne.classes.error)&&(r.error=Nr.fromResource(r))}catch(o){throw o.message="Failed parsing JSON "+o.message,r.setError(o),r.loading=!1,o}return r}parseJsonAdResourceValue(t,n){if(typeof t=="string")return t;if((t==null?void 0:t.constructor)==={}.constructor)if(Object.keys(t).includes("@id")){const r=t["@id"];return this.parseJsonADResource(t),r}else return t;throw new Error(`Value ${t} in ${n} not a string or a nested Resource`)}parseJsonADArray(t){const n=[];try{for(const r of t){const o=this.parseJsonADResource(r);n.push(o)}}catch(r){throw r.message="Failed parsing JSON "+r.message,r}return n}};dd.sha512=e=>Promise.resolve(FO(e));function Vh(){return Math.round(new Date().getTime())}let Kg=class e7{constructor(t,n={}){this._subject=Bt.removeQueryParamsFromURL(t),this._set=n.set??new Map,this._push=n.push??new Map,this._remove=n.remove??new Set,this._destroy=n.destroy,this._previousCommit=n.previousCommit}get subject(){return this._subject}get set(){return this._set}get push(){return this._push}get remove(){return this._remove}get destroy(){return this._destroy}get previousCommit(){return this._previousCommit}addSetAction(t,n){return this.removeRemoveAction(t),this._set.set(t,n),this}addPushAction(t,...n){const r=this._push.get(t)??new Set;for(const o of n)r.add(o);return this._push.set(t,r),this}addRemoveAction(t){return this._set.delete(t),this._push.delete(t),this._remove.add(t),this}removeRemoveAction(t){return this._remove.delete(t),this}setDestroy(t){return this._destroy=t,this}setPreviousCommit(t){return this._previousCommit=t,this}setSubject(t){return this._subject=t,this}async sign(t,n){return await this.signAt(n,t,Vh())}hasUnsavedChanges(){return this.set.size>0||this.push.size>0||this.destroy||this.remove.size>0}clone(){const t={set:this.set,push:this.push,remove:this.remove,destroy:this.destroy,previousCommit:this.previousCommit};return new e7(this.subject,structuredClone(t))}toPlainObject(){return{subject:this.subject,set:Object.fromEntries(this.set.entries()),push:Object.fromEntries(Array.from(this.push.entries()).map(([t,n])=>[t,Array.from(n)])),remove:Array.from(this.remove),destroy:this.destroy,previousCommit:this.previousCommit}}async signAt(t,n,r){if(t===void 0)throw new Error("No agent passed to sign commit");if(!this.hasUnsavedChanges())throw new Error(`No changes to commit in ${this.subject}`);const o={...this.clone().toPlainObject(),createdAt:r,signer:t},i=t7({...o}),s=await n7(i,n);return{...o,signature:s}}};function ui(e,t,n){t in e&&t!==n&&(Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(e,t)),delete e[t])}function t7(e){return e.remove&&Object.keys(e.remove).length===0&&delete e.remove,e.set&&Object.keys(e.set).length===0&&delete e.set,e.push&&Object.keys(e.push).length===0&&delete e.push,e.destroy===!1&&delete e.destroy,ui(e,"createdAt",J.properties.commit.createdAt),ui(e,"subject",J.properties.commit.subject),ui(e,"set",J.properties.commit.set),ui(e,"push",J.properties.commit.push),ui(e,"signer",J.properties.commit.signer),ui(e,"signature",J.properties.commit.signature),ui(e,"remove",J.properties.commit.remove),ui(e,"destroy",J.properties.commit.destroy),ui(e,"previousCommit",J.properties.commit.previousCommit),e[J.properties.isA]=[J.classes.commit],xO(e)}const n7=async(e,t)=>{const n=V8(t),r=new Uint8Array(n),o=new TextEncoder().encode(e),i=await vO(o,r);return Ff(i)},GO=async e=>{const t=V8(e),n=new Uint8Array(t),r=await W8(n);return Ff(r)};async function KO(){const e=dd.randomPrivateKey(),t=await W8(e),n=Ff(e);return{publicKey:Ff(t),privateKey:n}}function YO(e){return{id:e.getSubject(),subject:e.get(J.properties.commit.subject),set:e.get(J.properties.commit.set),push:e.get(J.properties.commit.push),signer:e.get(J.properties.commit.signer),createdAt:e.get(J.properties.commit.createdAt),remove:e.get(J.properties.commit.remove),destroy:e.get(J.properties.commit.destroy),signature:e.get(J.properties.commit.signature)}}function r7(e){try{const t=JSON.parse(e);if(typeof t!="object")throw new Error("Commit is not an object");const n=t[J.properties.commit.subject],r=t[J.properties.commit.set],o=t[J.properties.commit.push],i=t[J.properties.commit.signer],s=t[J.properties.commit.createdAt],l=t[J.properties.commit.remove],c=t[J.properties.commit.destroy],u=t[J.properties.commit.signature],d=t["@id"],p=t[J.properties.commit.previousCommit];if(!u)throw new Error("Commit has no signature");return{subject:n,set:r,push:o,signer:i,createdAt:s,remove:l,destroy:c,signature:u,id:d,previousCommit:p}}catch(t){throw new Error(`Could not parse commit: ${t}, Commit: ${e}`)}}function o7(e,t){const{set:n,remove:r,push:o}=t;return n&&QO(n,e),r&&JO(r,e),o&&ZO(o,e),e}function XO(e,t){const n=r7(e),{subject:r,id:o,destroy:i,signature:s}=n;let l=t.resources.get(r);if(!l)l=new na(r);else if(l.appliedCommitSignatures.has(s))return;if(l=o7(l,n),o&&l.setUnsafe(pe.commit.lastCommit,o),i){t.removeResource(r);return}else l.appliedCommitSignatures.add(s),t.addResources(l,{skipCommitCompare:!0})}function QO(e,t,n){const r=new pa,o=[];for(const[i,s]of Object.entries(e)){let l=s;if((s==null?void 0:s.constructor)==={}.constructor){const[c,u]=r.parseValue(s,i);l=c,o.push(...u)}Z2(s)&&(l=s.map(c=>{const[u,d]=r.parseValue(c,i);return o.push(...d),u})),t.setUnsafe(i,l)}}function JO(e,t){for(const n of e)t.removePropValLocally(n)}function ZO(e,t,n){const r=new pa,o=[];for(const[i,s]of Object.entries(e)){const l=t.get(i)||[],c=s.map(d=>{const[p,h]=r.parseValue(d,i);return o.push(...h),p}),u=[...l,...c];t.setUnsafe(i,u)}}async function rb(e,t){const n=Vh();if(!t.subject)throw new Error("Agent has no subject, cannot authenticate");return{"https://atomicdata.dev/properties/auth/agent":t.subject,"https://atomicdata.dev/properties/auth/requestedSubject":e,"https://atomicdata.dev/properties/auth/publicKey":await t.getPublicKey(),"https://atomicdata.dev/properties/auth/timestamp":n,"https://atomicdata.dev/properties/auth/signature":await i7(e,t,n)}}async function i7(e,t,n){const r=`${e} ${n}`;return await n7(r,t.privateKey)}function eL(e,t){var n;return!e.startsWith("http://localhost")&&((n=t==null?void 0:t.subject)==null?void 0:n.startsWith("http://localhost"))}async function Cv(e,t,n){const r=Vh();return t!=null&&t.subject&&!eL(e,t)&&(n["x-atomic-public-key"]=await t.getPublicKey(),n["x-atomic-signature"]=await i7(e,t,r),n["x-atomic-timestamp"]=r,n["x-atomic-agent"]=t==null?void 0:t.subject),n}const tL=24*60*60*1e3,nL=(e,t,n,r=tL)=>{const o=new Date(Date.now()+r).toUTCString(),i=encodeURIComponent(t),s=new URL(n).hostname,l=`${e}=${i};Expires=${o};Domain=${s};SameSite=Lax;path=/`;document.cookie=l},s7="atomic_session",a7=(e,t)=>{rb(e,t).then(n=>{nL(s7,btoa(JSON.stringify(n)),e)})},rL=()=>{const e=document.cookie.match(/^(.*;)?\s*atomic_session\s*=\s*[^;]+(.*)?$/);return e?e.length>0:!1},oL=()=>{document.cookie=`${s7}=;Max-Age=-99999999`},iL=e=>"blob"in e&&"name"in e,sL="application/ad+json";class Bt{constructor(t){t&&this.setFetch(t)}static tryValidSubject(t){try{new URL(t)}catch(n){throw new Error(`Not a valid URL: ${t}. ${n}`)}}static isValidSubject(t){if(typeof t!="string")return!1;try{return Bt.tryValidSubject(t),!0}catch{return!1}}static removeQueryParamsFromURL(t){return t==null?void 0:t.split("?")[0]}setFetch(t){this.__fetchOverride=t.bind(globalThis)}async fetchResourceHTTP(t,n={}){const{signInfo:r,from:o,body:i,method:s}=n;let l=[];const c=new pa;let u=new na(t);try{Bt.tryValidSubject(t);const d={};d.Accept=sL,r&&(Bp()&&t.startsWith(window.location.origin)?rL()||a7(r.serverURL,r.agent):await Cv(t,r.agent,d));let p=t;if(o!==void 0){const v=new URL(`${o}/path`);v.searchParams.set("path",t),p=v.href}const h=await this.fetch(p,{headers:d,method:s??"GET",body:i}),m=await h.text();if(h.status===200)try{const v=JSON.parse(m);if(n.noNested)u=v;else{const[g,b]=c.parseObject(v,t);u=g,l.push(...b)}}catch(v){throw new Nr(`Could not parse JSON from fetching ${t}. Is it an Atomic Data resource? Error message: ${v.message}`)}else throw h.status===401?new Nr(m,yi.Unauthorized):h.status===500?new Nr(m,yi.Server):h.status===404?new Nr(m,yi.NotFound):new Nr(m)}catch(d){u.setError(d),l=[u],console.error(t,d)}return u.loading=!1,{resource:u,createdResources:l}}async postCommit(t,n){const r=t7({...t}),o=new Headers;o.set("Content-Type","application/ad+json");let i;try{i=await this.fetch(n,{headers:o,method:"POST",body:r})}catch(l){throw new Nr(`Posting Commit to ${n} failed: ${l}`)}const s=await i.text();if(i.status!==200)throw new Nr(s,yi.Server);return r7(s)}async uploadFiles(t,n,r,o){const i=new pa,s=new FormData;t.map(v=>{iL(v)?s.append("assets",v.blob,v.name):s.append("assets",v,v.name)});const l=new URL(`${n}/upload`);l.searchParams.set("parent",o);const c=await Cv(l.toString(),r,{}),u={method:"POST",body:s,headers:c},d=await this.fetch(l.toString(),u),p=await d.text();if(d.status!==200)throw Error(p);const h=JSON.parse(p),[m]=i.parseArray(h);return m}fetch(...t){return this.__fetchOverride?this.__fetchOverride(...t):fetch(...t)}}let $f=class l7{constructor(t,n){if(n&&Bt.tryValidSubject(n),!t)throw new Nr("Agent requires a private key");this.client=new Bt,this.subject=n,this.privateKey=t}static fromSecret(t){const n=atob(t),r=JSON.parse(n),{privateKey:o,subject:i}=r;return new l7(o,i)}async getPublicKey(){if(!this.publicKey){const t=await GO(this.privateKey);this.publicKey=t}return this.publicKey}buildSecret(){const t=JSON.stringify(this);return btoa(t)}async verifyPublicKeyWithServer(){var t;if(!this.subject)throw new Nr("Agent has no subject");const{resource:n}=await this.client.fetchResourceHTTP(this.subject);if(n.error)throw new Error(`Could not fetch agent, and could therefore not check validity of public key. ${n.error}`);if(((t=n.get(E.properties.publicKey))==null?void 0:t.toString())!==await this.getPublicKey())throw new Error("Fetched publickey does not match current one - is the private key correct?")}};const c7=e=>{const t=new URL(e);return t.pathname="search",t},aL=["+","^","`",":","{","}",'"',"[","]","(",")","!","\\","*"," ","."];function lL(e){return e.replace(new RegExp(`([${aL.join("\\")}])`,"g"),"\\$1")}function cL(e){return Object.entries(e).map(([t,n])=>n&&`${lL(t)}:"${n}"`).join(" AND ")}function u7(e,t,n={}){const{include:r=!1,limit:o=30,parents:i,filters:s}=n,l=c7(e),c=s&&Object.keys(s).length>0&&Object.values(s).filter(u=>u&&u.length>0).length>0;return t&&l.searchParams.set("q",t),r&&l.searchParams.set("include",r.toString()),o&&l.searchParams.set("limit",o.toString()),c&&l.searchParams.set("filters",cL(s)),i&&(Array.isArray(i)?l.searchParams.append("parents",i.join(",")):l.searchParams.append("parents",i)),l.toString()}function ob(e){const t=c7(e.getServerUrl()).toString(),n=e.clientSideQuery(r=>r.subject!==t&&r.subject.startsWith(t));for(const r of n)e.removeResource(r.subject)}function Yg(e){if(!ib(e))throw new Error("Parameter was not an error")}function ib(e){return!!e&&typeof e=="object"&&uL(e)==="[object Error]"||e instanceof Error}function uL(e){return Object.prototype.toString.call(e)}const dL="Layerr";let pL=dL;function fL(){return pL}function hL(e){let t,n="";if(e.length===0)t={};else if(ib(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&typeof e[0]=="object")t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else if(typeof e[0]=="string")t={},n=n=e.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:t,shortMessage:n}}let qc=class Gc extends Error{constructor(t,n){const r=[...arguments],{options:o,shortMessage:i}=hL(r);let s=i;if(o.cause&&(s=`${s}: ${o.cause.message}`),super(s),this.message=s,o.name&&typeof o.name=="string"?this.name=o.name:this.name=fL(),o.cause&&Object.defineProperty(this,"_cause",{value:o.cause}),Object.defineProperty(this,"_info",{value:{}}),o.info&&typeof o.info=="object"&&Object.assign(this._info,o.info),Error.captureStackTrace){const l=o.constructorOpt||this.constructor;Error.captureStackTrace(this,l)}}static cause(t){return Yg(t),t._cause&&ib(t._cause)?t._cause:null}static fullStack(t){Yg(t);const n=Gc.cause(t);return n?`${t.stack}
caused by: ${Gc.fullStack(n)}`:t.stack??""}static info(t){Yg(t);const n={},r=Gc.cause(t);return r&&Object.assign(n,Gc.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}};const d7="0123456789ABCDEFGHJKMNPQRSTVWXYZ",au=32,l3=0xffffffffffff,mL=10,gL=16,Kc=Object.freeze({source:"ulid"});function vL(e){const t=yL(),n=t&&(t.crypto||t.msCrypto)||null;if(typeof(n==null?void 0:n.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return n.getRandomValues(r),r[0]/255};if(typeof(n==null?void 0:n.randomBytes)=="function")return()=>n.randomBytes(1).readUInt8()/255;throw new qc({info:{code:"PRNG_DETECT",...Kc}},"Failed to find a reliable PRNG")}function yL(){return wL()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function bL(e,t){let n="";for(;e>0;e--)n=SL(t)+n;return n}function xL(e,t){if(isNaN(e))throw new qc({info:{code:"ENC_TIME_NAN",...Kc}},`Time must be a number: ${e}`);if(e>l3)throw new qc({info:{code:"ENC_TIME_SIZE_EXCEED",...Kc}},`Cannot encode a time larger than ${l3}: ${e}`);if(e<0)throw new qc({info:{code:"ENC_TIME_NEG",...Kc}},`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new qc({info:{code:"ENC_TIME_TYPE",...Kc}},`Time must be an integer: ${e}`);let n,r="";for(let o=t;o>0;o--)n=e%au,r=d7.charAt(n)+r,e=(e-n)/au;return r}function wL(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function SL(e){let t=Math.floor(e()*au);return t===au&&(t=au-1),d7.charAt(t)}function CL(e,t){const n=vL(),r=isNaN(e)?Date.now():e;return xL(r,mL)+bL(gL,n)}function jL(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/[^\w-]+/g,"")}function c3(e,t){const n=new URL(e);n.protocol==="http:"?n.protocol="ws":n.protocol="wss",n.pathname="/ws";const r=new WebSocket(n.toString());return r.onopen=o=>kL(t,r),r.onmessage=o=>EL(o,t),r.onerror=_L,r}function kL(e,t){jv(t,e).then(()=>{for(const n of e.subscribers.keys())e.subscribeWebSocket(n)})}function EL(e,t){if(e.data.startsWith("COMMIT ")){const n=e.data.slice(7);XO(n,t)}else if(e.data.startsWith("ERROR "))t.notifyError(e.data.slice(6));else if(e.data.startsWith("RESOURCE ")){const n=p7(e);t.addResources(n)}else console.warn("Unknown websocket message:",e)}function _L(e){console.error("websocket error:",e)}function p7(e){const t=e.data.slice(9),n=JSON.parse(t),r=new pa,[o,i]=r.parseObject(n);return i}async function jv(e,t,n=!1){var r;const o=t.getAgent();if(!o||!o.subject)return;if(!e.url.startsWith("ws://localhost")&&(r=o==null?void 0:o.subject)!=null&&r.startsWith("http://localhost")){console.warn(`Can't authenticate localhost Agent over websocket with remote server ${e.url} because the server will nog be able to retrieve your Agent and verify your public key.`);return}const i=await rb(e.url,o);e.send("AUTHENTICATE "+JSON.stringify(i)),n&&t.resources.forEach(s=>{(s.isUnauthorized()||s.loading)&&t.fetchResourceFromServer(s.subject)})}const u3=5e3;async function IL(e,t){return new Promise((n,r)=>{e.addEventListener("message",function o(i){const s=setTimeout(()=>{e.removeEventListener("message",o),r(new Error(`Request for subject "${t}" timed out after ${u3}ms.`))},u3);i.data.startsWith("RESOURCE ")&&p7(i).forEach(l=>{l.subject===t&&(clearTimeout(s),e.removeEventListener("message",o),n(l))})}),e.send("GET "+t)})}var bi=(e=>(e.ResourceSaved="resource-saved",e.ResourceRemoved="resource-removed",e.ResourceManuallyCreated="resource-manually-created",e.AgentChanged="agent-changed",e.ServerURLChanged="server-url-changed",e.Error="error",e))(bi||{});const Xg=()=>typeof WebSocket<"u";class f7{constructor(t={}){this.batchedResources=new Map,this.eventManager=new X8,this._resources=new Map,this.webSockets=new Map,this.subscribers=new Map,t.serverUrl&&this.setServerUrl(t.serverUrl),t.agent&&this.setAgent(t.agent),this.client=new Bt(this.injectedFetch),this.getAgent=this.getAgent.bind(this),this.setAgent=this.setAgent.bind(this)}get resources(){return this._resources}injectFetch(t){this.injectedFetch=t,this.client.setFetch(t)}addResources(t,n){for(const r of Array.isArray(t)?t:[t])this.addResource(r,n??{})}addResource(t,{skipCommitCompare:n}){if(t.setStore(this),t.get(E.properties.incomplete)){const r=this.resources.get(t.subject);if(r&&!r.loading)return}if(!n){const r=this.resources.get(t.subject);if(r&&!r.hasClasses(Lr.classes.collection)&&!r.loading&&!r.new&&r.get(qn.properties.lastCommit)===t.get(qn.properties.lastCommit))return}this.resources.set(t.subject,t.__internalObject),this.notify(t.__internalObject)}async newResource({subject:t,parent:n,isA:r,propVals:o,noParent:i}={}){const s=Array.isArray(r)?r:[r],l=t??this.createSubject(),c=this.getResourceLoading(l,{newResource:!0});if(s[0]&&await c.addClasses(...s),i||await c.set(E.properties.parent,n??this.serverUrl),o)for(const[u,d]of Object.entries(o))await c.set(u,d);return c}async search(t,n={}){const r=u7(this.serverUrl,t,n);return(await this.fetchResourceFromServer(r,{noWebSocket:!0})).get(Ne.properties.results)??[]}async checkSubjectTaken(t){var n;const r=this.resources.get(t);if(r!=null&&r.isReady()&&!(r!=null&&r.new))return!0;try{const o=this.agent?{agent:this.agent,serverURL:this.getServerUrl()}:void 0,{createdResources:i}=await this.client.fetchResourceHTTP(t,{method:"GET",signInfo:o});if((n=i.find(s=>s.subject===t))!=null&&n.isReady())return!0}catch{}return!1}async buildUniqueSubjectFromParts(t,n){const r=t.map(i=>jL(i)).join("/"),o=n??this.getServerUrl();return this.findAvailableSubject(r,o)}createSubject(t){return t?`${t}/${this.randomPart()}`:new URL(`/${this.randomPart()}`,this.serverUrl).toString()}async fetchResourceFromServer(t,n={}){if(n.setLoading){const o=new na(t);o.loading=!0,this.addResources(o,{skipCommitCompare:!0})}const r=this.getWebSocketForSubject(t);if(!n.fromProxy&&!n.noWebSocket&&Xg()&&(r==null?void 0:r.readyState)===WebSocket.OPEN)await IL(r,t);else{const o=this.agent?{agent:this.agent,serverURL:this.getServerUrl()}:void 0,{createdResources:i}=await this.client.fetchResourceHTTP(t,{from:n.fromProxy?this.getServerUrl():void 0,method:n.method,body:n.body,signInfo:o});this.addResources(i,{skipCommitCompare:!0})}return this.resources.get(t)}getAllSubjects(){return Array.from(this.resources.keys())}getDefaultWebSocket(){return this.webSockets.get(this.getServerUrl())}getWebSocketForSubject(t){const n=new URL(t),r=this.webSockets.get(n.origin);if(r)return r;typeof window<"u"&&this.webSockets.set(n.origin,c3(n.origin,this))}getServerUrl(){return this.serverUrl}getAgent(){return this.agent??void 0}getResourceLoading(t=ut,n={}){if(t===ut||t===null){const o=new na(ut,n.newResource);return o.setStore(this),o}let r=this.resources.get(t);if(r)!n.allowIncomplete&&r.loading===!1&&r.get(E.properties.incomplete)&&(r.loading=!0,this.addResources(r),this.fetchResourceFromServer(t,n));else return r=new na(t,n.newResource),r.loading=!0,this.addResources(r),n.newResource||this.fetchResourceFromServer(t,n),r;return r}async getResourceAsync(t){return this.getResource(t)}async getResource(t){const n=this.resources.get(t);if(n&&n.isReady())return n;if(n&&!n.isReady())return new Promise((o,i)=>{const s=l=>{this.unsubscribe(t,s),o(l)};this.subscribe(t,s),setTimeout(()=>{this.unsubscribe(t,s),i(new Error(`Async Request for subject "${t}" timed out after 5000ms.`))},5e3)});const r=await this.fetchResourceFromServer(t);return this.subscribeWebSocket(t),r}async getProperty(t){var n;const r=await this.getResource(t);if(r===void 0)throw Error(`Property ${t} is not found`);if(r.error)throw Error(`Property ${t} cannot be loaded: ${r.error}`);const o=r.get(E.properties.datatype);if(o===void 0)throw Error(`Property ${t} has no datatype: ${r.getPropVals()}`);const i=r.get(E.properties.shortname);if(i===void 0)throw Error(`Property ${t} has no shortname: ${r.getPropVals()}`);const s=r.get(E.properties.description);if(s===void 0)throw Error(`Property ${t} has no description: ${r.getPropVals()}`);const l=(n=r.get(E.properties.classtype))==null?void 0:n.toString();return{subject:t,classType:l,shortname:i.toString(),description:s.toString(),datatype:G8(o.toString()),allowsOnly:r.get(E.properties.allowsOnly)}}notifyError(t){const n=t instanceof Error?t:new Error(t);if(this.eventManager.hasSubscriptions("error"))this.eventManager.emit("error",n);else throw n}isOffline(){var t;return Bp()?!((t=window==null?void 0:window.navigator)!=null&&t.onLine):!1}async notifyResourceSaved(t){await this.eventManager.emit("resource-saved",t)}async notifyResourceManuallyCreated(t){await this.eventManager.emit("resource-manually-created",t)}parseMetaTags(){const t=document.querySelectorAll('meta[property="json-ad-initial"]'),n=new pa;t.forEach(r=>{const o=r.getAttribute("content");if(o===null)return;const i=JSON.parse(atob(o)),[s,l]=n.parseObject(i);this.addResources(l)})}async preloadPropsAndClasses(){const t=new URL("/classes",this.serverUrl),n=new URL("/properties",this.serverUrl);t.searchParams.set("include_external","true"),n.searchParams.set("include_external","true"),t.searchParams.set("include_nested","true"),n.searchParams.set("include_nested","true"),t.searchParams.set("page_size","999"),n.searchParams.set("page_size","999"),await Promise.all([this.fetchResourceFromServer(t.toString()),this.fetchResourceFromServer(n.toString())])}async postToServer(t,n){return this.fetchResourceFromServer(t,{body:n,noWebSocket:!0,method:"POST"})}removeResource(t){const n=this.resources.get(t);n&&(this.resources.delete(t),this.eventManager.emit("resource-removed",n))}async renameSubject(t,n){Bt.tryValidSubject(n);const r=t.subject;if(await this.checkSubjectTaken(n))throw Error(`New subject name is already taken: ${n}`);t.setSubject(n);const o=this.subscribers.get(r)??[];this.subscribers.set(n,o),this.removeResource(r),this.addResources(t)}setAgent(t){this.agent=t,t&&t.subject?(Bp()&&a7(this.serverUrl,t),this.webSockets.forEach(n=>{n.readyState===n.OPEN?jv(n,this,!0):n.onopen=()=>{jv(n,this,!0)}})):Bp()&&oL(),this.eventManager.emit("agent-changed",t)}setServerUrl(t){if(Bt.tryValidSubject(t),t.substring(-1)==="/")throw Error("baseUrl should not have a trailing slash");this.serverUrl=t,this.eventManager.emit("server-url-changed",t),Xg()&&this.openWebSocket(t)}openWebSocket(t){if(Xg()){if(this.webSockets.has(t))return;this.webSockets.set(t,c3(t,this))}else console.warn("WebSockets not supported, no window available")}subscribe(t,n){if(t===void 0)throw Error("Cannot subscribe to undefined subject");let r=this.subscribers.get(t);return r===void 0&&(this.subscribeWebSocket(t),r=[]),r.push(n),this.subscribers.set(t,r),()=>{this.unsubscribe(t,n)}}subscribeWebSocket(t){if(t!==ut)try{const n=this.getWebSocketForSubject(t);(n==null?void 0:n.readyState)===1&&(n==null||n.send(`SUBSCRIBE ${t}`))}catch(n){console.error(n)}}unSubscribeWebSocket(t){var n;if(t!==ut)try{(n=this.getDefaultWebSocket())==null||n.send(`UNSUBSCRIBE ${t}`)}catch(r){console.error(r)}}unsubscribe(t,n){if(t===void 0)return;let r=this.subscribers.get(t);r&&(r=r==null?void 0:r.filter(o=>o!==n),this.subscribers.set(t,r))}on(t,n){return this.eventManager.register(t,n)}async uploadFiles(t,n){const r=this.getAgent();if(!r)throw Error("No agent set, cannot upload files");const o=await this.client.uploadFiles(t,this.getServerUrl(),r,n);return this.addResources(o),o.map(i=>i.subject)}async postCommit(t,n){return this.client.postCommit(t,n)}async getResourceAncestry(t){const n=[t.subject];let r=t.get(E.properties.parent);for(r&&n.push(r);r;){const o=await this.getResource(r);if(o){if(r=o.get(E.properties.parent),n.includes(r))throw new Error(`Resource ${t.subject} ancestry is cyclical. ${r} is already in the ancestry}`);n.push(r)}}return n}clientSideQuery(t){return Array.from(this.resources.values()).filter(t)}batchResource(t){const n=this._resources.get(t);if(!n)throw new Error(`Resource ${t} can not be saved because it is not in the store.`);const r=n.get(E.properties.parent);if(r===void 0)throw new Error(`Resource ${t} can not be added to a batch because it's missing a parent.`);this.batchedResources.has(r)?this.batchedResources.get(r).add(t):this.batchedResources.set(r,new Set([t]))}async saveBatchForParent(t){const n=this.batchedResources.get(t);if(n){for(const r of n){const o=this._resources.get(r);await(o==null?void 0:o.save())}this.batchedResources.delete(t)}}async importJsonAD(t,n){const r=new URL(J8.import,this.serverUrl);r.searchParams.set("parent",n.parent),r.searchParams.set("overwrite-outside",n.overwriteOutside?"true":"false");const o=await this.postToServer(r.toString(),t);if(o.error)throw o.error}randomPart(){return CL().toLowerCase()}async findAvailableSubject(t,n,r=!0){let o=new URL(`${n}/${t}`).toString();if(!r){const i=this.randomPart();o+=`-${i}`}return await this.checkSubjectTaken(o)?this.findAvailableSubject(t,n,!1):o}async notify(t){const n=t.subject,r=this.subscribers.get(n);r!==void 0&&Promise.allSettled(r.map(async o=>o(t)))}}function h7(e,t,n){let r=e.replace(/(^\w+:|^)\/\//,"");if(typeof window<"u"&&window!=null&&window.location&&r.startsWith(window.location.hostname)&&(r=r.slice(window.location.hostname.length)),r.length<=t)return r;if(n){const o=r.length-t;return"..."+r.slice(o)}return r.slice(0,t)+"..."}iO();var m7=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?i(d.value):o(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})},g7=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Dn=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},d3=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function q(e,t){e===void 0&&(e=ut);var n=Ce(),r=Dn(f.useState(function(){return n.getResourceLoading(e,t)}),2),o=r[0],i=r[1];return f.useEffect(function(){return i(Mf(n.getResourceLoading(e,t))),n.subscribe(e,function(s){i(Mf(s))})},[n,e]),o}var RL=[];function fa(e,t){e===void 0&&(e=RL),t===void 0&&(t={});var n=Dn(f.useState(new Map),2),r=n[0],o=n[1],i=Ce();return f.useEffect(function(){function s(l){o(function(c){return c.set(l.getSubject(),Mf(l)),new Map(c)})}return o(function(l){var c,u;try{for(var d=d3(e),p=d.next();!p.done;p=d.next()){var h=p.value,m=i.getResourceLoading(h,t);l.set(h,Mf(m)),i.subscribe(h,s)}}catch(v){c={error:v}}finally{try{p&&!p.done&&(u=d.return)&&u.call(d)}finally{if(c)throw c.error}}return new Map(l)}),function(){var l,c;try{for(var u=d3(e),d=u.next();!d.done;d=u.next()){var p=d.value;i.unsubscribe(p,s)}}catch(h){l={error:h}}finally{try{d&&!d.done&&(c=u.return)&&c.call(u)}finally{if(l)throw l.error}}}},[e,i]),r}function sr(e){var t=q(e),n=f.useMemo(function(){return t.loading?{subject:e,datatype:Y.UNKNOWN,shortname:"loading",description:"Loading property ".concat(e),loading:!0}:t.error?{subject:e,datatype:Y.UNKNOWN,shortname:"error",description:"Error getting Property. "+t.error.message,error:t.error}:{subject:e,datatype:G8(t.props.datatype),shortname:t.props.shortname,description:t.props.description,classType:t.props.classtype,isDynamic:!!t.props.isDynamic,allowsOnly:t.props.allowsOnly}},[t]);return n}function Jo(e,t,n){var r=this;n===void 0&&(n={});var o=n.commit,i=o===void 0?!1:o,s=n.validate,l=s===void 0?!0:s,c=n.commitDebounce,u=c===void 0?100:c,d=n.handleValidationError,p=Dn(f.useState(e.get(t)),2),h=p[0],m=p[1],v=Dn(f.useState(e),2),g=v[0],b=v[1],y=Ce(),x=Dn(x7(function(){i&&e.save().catch(function(k){return y.notifyError(k)})},u,[e,y]),1),w=x[0],S=f.useCallback(function(k){return m7(r,void 0,void 0,function(){var _;return g7(this,function(I){switch(I.label){case 0:if(k===void 0)return e.remove(t),m(void 0),w(),[2];m(k),I.label=1;case 1:return I.trys.push([1,3,,4]),[4,e.set(t,k,l)];case 2:return I.sent(),w(),d==null||d(void 0),[3,4];case 3:return _=I.sent(),d?d(_):y.notifyError(_),[3,4];case 4:return[2]}})})},[e,d,y,l,w]);if(e!==g){try{m(e.get(t))}catch(k){y.notifyError(k)}b(e)}return f.useEffect(function(){return e.on(nb.LocalChange,function(k,_){k===t&&m(_)})},[e,t]),[h,S]}function ne(e,t,n){var r=Dn(Jo(e,t,n),2),o=r[0],i=r[1];return typeof o=="string"?[o,i]:o===void 0?[void 0,i]:[xv(o),i]}var v7="error:no_support_for_editing_nested_resources_yet";function Io(e,t,n){var r=Dn(Jo(e,t,n),2),o=r[0],i=r[1];return o?typeof o=="string"?[o,i]:[v7,i]:[void 0,i]}var AL={commit:!0};function rt(e,t,n){t===void 0&&(t=40),n===void 0&&(n=AL);var r=Dn(ne(e,J.properties.name,n),2),o=r[0],i=r[1],s=Dn(ne(e,J.properties.shortname,n),2),l=s[0],c=s[1],u=Dn(ne(e,J.properties.file.filename,n),2),d=u[0],p=u[1];if(e.loading)return["...",i];if(o!==void 0)return[o,i];if(l!==void 0)return[l,c];if(d!==void 0)return[d,p];var h=e==null?void 0:e.getSubject();return typeof h=="string"&&h.length>0?[h7(h,t),i]:[h,i]}function we(e,t,n){var r=Dn(Jo(e,t,n),2),o=r[0],i=r[1],s=f.useRef([]),l=f.useMemo(function(){if(o===void 0)return s.current;try{return su(o)}catch(u){return console.error(u,o,t,e.subject),s.current}},[o,e,t]),c=f.useCallback(function(u){e.push(t,u),n!=null&&n.commit&&e.save()},[e,t]);return[l,i,c]}function Ro(e,t,n){var r=Dn(Jo(e,t,n),2),o=r[0],i=r[1];return o===void 0?[void 0,i]:[WO(o),i]}function y7(e,t,n){var r=Dn(Jo(e,t,n),2),o=r[0],i=r[1];return f.useEffect(function(){o===void 0&&i(!1)},[o,i]),o===void 0?[!1,i]:[UO(o),i]}function PL(e,t,n){var r=Ce(),o=Dn(Jo(e,t,n),1),i=o[0];if(i!==void 0)try{return Z8(i)}catch(s){r.notifyError(s);return}}function Ce(){var e=f.useContext(b7);if(e===void 0)throw new Error("Store is not found in react context. Have you wrapped your application in `<StoreContext.Provider value={new Store}>`?");return e}function jt(e,t){var n=Ce(),r=Dn(f.useState(!1),2),o=r[0],i=r[1],s=Dn(f.useState(void 0),2),l=s[0],c=s[1],u=n.getAgent();return f.useEffect(function(){if(t===void 0&&(t=u==null?void 0:u.subject),t===void 0){c("No Agent set"),i(!1);return}if(e.new){i(!0),c(void 0);return}c("Checking write rights...");function d(){return m7(this,void 0,void 0,function(){var p,h,m;return g7(this,function(v){switch(v.label){case 0:return[4,e.canWrite(t)];case 1:return p=Dn.apply(void 0,[v.sent(),2]),h=p[0],m=p[1],i(h),c(h?void 0:"You don't have write rights in this resource or its parents: "+m),[2]}})})}d()},[e,t,u==null?void 0:u.subject]),[o,l]}var b7=f.createContext(new f7),TL=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},sb=function(){var e=Ce(),t=TL(f.useState(e.getServerUrl()),2),n=t[0],r=t[1],o=f.useCallback(function(i){if(i){var s="https://atomicdata.dev";Bt.isValidSubject(i)?s=i:e.notifyError(new Error("Invalid Server URL: ".concat(i,", defaulting to atomicdata.dev"))),e.setServerUrl(s)}},[e]);return f.useEffect(function(){return e.on(bi.ServerURLChanged,r)},[e]),[n,o]},ab=function(){var e=Ce(),t=f.useCallback(function(r){return e.on(bi.AgentChanged,r)},[e]),n=f.useSyncExternalStore(t,e.getAgent);return[n,e.setAgent]},DL=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},NL=function(e){var t=DL(f.useState([]),2),n=t[0],r=t[1];return f.useEffect(function(){e.getChildrenCollection().then(function(o){o.getAllMembers().then(function(i){r(i)})})},[e]),n},OL=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?i(d.value):o(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})},LL=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Hp=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},Qg=function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function Bf(e,t){var n=Hp(f.useState(e),2),r=n[0],o=n[1];return f.useEffect(function(){var i=setTimeout(function(){o(e)},t);return function(){clearTimeout(i)}},[e,t]),r}function x7(e,t,n){var r=this,o=f.useRef(),i=Hp(f.useState(!1),2),s=i[0],l=i[1],c=f.useCallback(function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];o.current&&clearTimeout(o.current);var p=setTimeout(function(){return OL(r,void 0,void 0,function(){return LL(this,function(h){switch(h.label){case 0:return[4,e.apply(void 0,Qg([],Hp(u),!1))];case 1:return h.sent(),o.current=void 0,l(!1),[2]}})})},t);l(!0),o.current=p},Qg(Qg([],Hp(n),!1),[t,o],!1));return[c,s]}pe.name,pe.shortname,pe.file.filename,pe.description,pe.write,pe.read;var Jg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},zL={results:[],loading:!1,error:void 0};function Ca(e,t){var n;t===void 0&&(t={});var r=t.debounce,o=r===void 0?50:r,i=Ce(),s=Jg(f.useState([]),2),l=s[0],c=s[1],u=Jg(sb(),1),d=u[0],p=(n=Bf(e,o))!==null&&n!==void 0?n:"",h=f.useMemo(function(){return u7(d,p,t)},[p,t,d]),m=q(h,{noWebSocket:!0}),v=Jg(we(m,J.properties.endpoint.results),1),g=v[0];f.useEffect(function(){!m.loading&&g&&c(g)},[g==null?void 0:g.toString(),m.loading]),f.useEffect(function(){return function(){ob(i)}},[]);var b=f.useMemo(function(){return{results:l,loading:m.loading,error:m.error}},[l,m.loading,m.error]);return!e&&!t.allowEmptyQuery?zL:b}var FL=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?i(d.value):o(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})},ML=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},p3=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},f3=function(e,t,n,r){var o=n.property,i=n.value,s=n.sort_by,l=n.sort_desc,c=new tb(e,t);return o&&c.setProperty(o),i&&c.setValue(i),s&&c.setSortBy(s),l!==void 0&&c.setSortDesc(l),r&&c.setPageSize(r),c.build()};function Qo(e,t){var n=this,r=t===void 0?{pageSize:void 0,server:void 0}:t,o=r.pageSize,i=r.server,s=p3(f.useState(!0),2),l=s[0],c=s[1],u=Ce(),d=$L(e),p=p3(f.useState(function(){return f3(u,i,d,o)}),2),h=p[0],m=p[1],v=f.useCallback(function(b){for(var y=[],x=0;x<h.totalMembers;x++)y.push(b({index:x,collection:h}));return y},[h]);f.useEffect(function(){h.waitForReady().then(function(){m(Gg(h.__internalObject))})},[]),f.useEffect(function(){if(l){c(!1);return}var b=f3(u,i,d,o);b.waitForReady().then(function(){m(Gg(b.__internalObject))})},[d,o,u,i]);var g=f.useCallback(function(){return FL(n,void 0,void 0,function(){return ML(this,function(b){switch(b.label){case 0:return[4,h.refresh()];case 1:return b.sent(),m(Gg(h.__internalObject)),[2]}})})},[h,u,i,e,o]);return{collection:h,invalidateCollection:g,mapAll:v}}function $L(e){return f.useMemo(function(){return e},[e.property,e.value,e.sort_by,e.sort_desc])}var BL=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i};function w7(e,t){var n=BL(f.useState(ut),2),r=n[0],o=n[1],i=q(r);return f.useEffect(function(){e.getMemberWithIndex(t).then(function(s){return s&&o(s)})},[e,t]),i}var HL=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i};function UL(e,t){var n=HL(f.useState([]),2),r=n[0],o=n[1];return f.useEffect(function(){e.getMembersOnPage(t).then(o)},[e,t]),r}var Nl=function(){return Nl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nl.apply(this,arguments)},lb=function(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},qh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},WL=new Set(["image/svg+xml","image/vnd.adobe.photoshop","image/heif","image/heif-sequence","image/heic-sequence","image/avif-sequence","image/gif","image/heic","image/heif"]),VL=new Set(["image/png","image/jpeg","image/vnd.microsoft.icon","image/webp","image/bmp","image/tiff","image/avif"]),h3=[100,300,500,800,1200,1600,2e3],cb=function(e){var t=e.subject,n=lb(e,["subject"]),r=q(t),o=qh(ne(r,Ne.properties.mimetype),1),i=o[0];if(r.loading||r.subject===ut)return null;if(!r.hasClasses(Ne.classes.file))throw new Error("Incompatible resource class, resource is not a file");if(i===void 0)return null;if(WL.has(i))return ce.createElement(GL,Nl({resource:r},n));if(!VL.has(i))throw new Error("Incompatible or missing mime-type: "+i);return ce.createElement(qL,Nl({resource:r},n))},qL=function(e){var t=e.resource,n=e.sizeIndication,r=e.quality,o=r===void 0?60:r,i=lb(e,["resource","sizeIndication","quality"]),s=qh(ne(t,Ne.properties.downloadUrl),1),l=s[0],c=YL(l??"");return ce.createElement("picture",null,ce.createElement("source",{srcSet:c("avif",o,h3),type:"image/avif",sizes:m3(n),height:t.props.imageHeight,width:t.props.imageWidth}),ce.createElement("source",{srcSet:c("webp",o,h3),type:"image/webp",sizes:m3(n),height:t.props.imageHeight,width:t.props.imageWidth}),ce.createElement("img",Nl({src:l},i,{height:t.props.imageHeight,width:t.props.imageWidth})))},GL=function(e){var t=e.resource;e.sizeIndication,e.quality;var n=lb(e,["resource","sizeIndication","quality"]),r=qh(ne(t,Ne.properties.downloadUrl),1),o=r[0];return ce.createElement("img",Nl({src:o},n))},m3=function(e){return e===void 0?"100vw":typeof e=="number"||typeof e=="string"?Zg(e):Object.entries(e).map(function(t){var n=qh(t,2),r=n[0],o=n[1];return r==="default"?Zg(o):"(max-width: ".concat(r,") ").concat(Zg(o))}).join(", ")},Zg=function(e){return typeof e=="number"?"".concat(e,"vw"):e},KL=function(e,t,n,r){var o=new URL(e),i=new URLSearchParams;return t&&i.set("f",t),r&&i.set("w",r.toString()),n&&i.set("q",n.toString()),o.search=i.toString(),o.toString()},YL=function(e){return function(t,n,r){return r.map(function(o){return"".concat(KL(e,t,n,o)," ").concat(o,"w")}).join(", ")}},xn=function(){return xn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xn.apply(this,arguments)};function Ol(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var St="-ms-",lu="-moz-",st="-webkit-",S7="comm",Gh="rule",ub="decl",XL="@import",C7="@keyframes",QL="@layer",j7=Math.abs,db=String.fromCharCode,kv=Object.assign;function JL(e,t){return mn(e,0)^45?(((t<<2^mn(e,0))<<2^mn(e,1))<<2^mn(e,2))<<2^mn(e,3):0}function k7(e){return e.trim()}function hi(e,t){return(e=t.exec(e))?e[0]:e}function Ue(e,t,n){return e.replace(t,n)}function Up(e,t,n){return e.indexOf(t,n)}function mn(e,t){return e.charCodeAt(t)|0}function Ll(e,t,n){return e.slice(t,n)}function Uo(e){return e.length}function E7(e){return e.length}function Yc(e,t){return t.push(e),e}function ZL(e,t){return e.map(t).join("")}function g3(e,t){return e.filter(function(n){return!hi(n,t)})}var Kh=1,zl=1,_7=0,so=0,en=0,tc="";function Yh(e,t,n,r,o,i,s,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Kh,column:zl,length:s,return:"",siblings:l}}function Gi(e,t){return kv(Yh("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ma(e){for(;e.root;)e=Gi(e.root,{children:[e]});Yc(e,e.siblings)}function ez(){return en}function tz(){return en=so>0?mn(tc,--so):0,zl--,en===10&&(zl=1,Kh--),en}function jo(){return en=so<_7?mn(tc,so++):0,zl++,en===10&&(zl=1,Kh++),en}function ra(){return mn(tc,so)}function Wp(){return so}function Xh(e,t){return Ll(tc,e,t)}function Ev(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nz(e){return Kh=zl=1,_7=Uo(tc=e),so=0,[]}function rz(e){return tc="",e}function e0(e){return k7(Xh(so-1,_v(e===91?e+2:e===40?e+1:e)))}function oz(e){for(;(en=ra())&&en<33;)jo();return Ev(e)>2||Ev(en)>3?"":" "}function iz(e,t){for(;--t&&jo()&&!(en<48||en>102||en>57&&en<65||en>70&&en<97););return Xh(e,Wp()+(t<6&&ra()==32&&jo()==32))}function _v(e){for(;jo();)switch(en){case e:return so;case 34:case 39:e!==34&&e!==39&&_v(en);break;case 40:e===41&&_v(e);break;case 92:jo();break}return so}function sz(e,t){for(;jo()&&e+en!==57;)if(e+en===84&&ra()===47)break;return"/*"+Xh(t,so-1)+"*"+db(e===47?e:jo())}function az(e){for(;!Ev(ra());)jo();return Xh(e,so)}function lz(e){return rz(Vp("",null,null,null,[""],e=nz(e),0,[0],e))}function Vp(e,t,n,r,o,i,s,l,c){for(var u=0,d=0,p=s,h=0,m=0,v=0,g=1,b=1,y=1,x=0,w="",S=o,k=i,_=r,I=w;b;)switch(v=x,x=jo()){case 40:if(v!=108&&mn(I,p-1)==58){Up(I+=Ue(e0(x),"&","&\f"),"&\f",j7(u?l[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:I+=e0(x);break;case 9:case 10:case 13:case 32:I+=oz(v);break;case 92:I+=iz(Wp()-1,7);continue;case 47:switch(ra()){case 42:case 47:Yc(cz(sz(jo(),Wp()),t,n,c),c);break;default:I+="/"}break;case 123*g:l[u++]=Uo(I)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:b=0;case 59+d:y==-1&&(I=Ue(I,/\f/g,"")),m>0&&Uo(I)-p&&Yc(m>32?y3(I+";",r,n,p-1,c):y3(Ue(I," ","")+";",r,n,p-2,c),c);break;case 59:I+=";";default:if(Yc(_=v3(I,t,n,u,d,o,l,w,S=[],k=[],p,i),i),x===123)if(d===0)Vp(I,t,_,_,S,i,p,l,k);else switch(h===99&&mn(I,3)===110?100:h){case 100:case 108:case 109:case 115:Vp(e,_,_,r&&Yc(v3(e,_,_,0,0,o,l,w,o,S=[],p,k),k),o,k,p,l,r?S:k);break;default:Vp(I,_,_,_,[""],k,0,l,k)}}u=d=m=0,g=y=1,w=I="",p=s;break;case 58:p=1+Uo(I),m=v;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&tz()==125)continue}switch(I+=db(x),x*g){case 38:y=d>0?1:(I+="\f",-1);break;case 44:l[u++]=(Uo(I)-1)*y,y=1;break;case 64:ra()===45&&(I+=e0(jo())),h=ra(),d=p=Uo(w=I+=az(Wp())),x++;break;case 45:v===45&&Uo(I)==2&&(g=0)}}return i}function v3(e,t,n,r,o,i,s,l,c,u,d,p){for(var h=o-1,m=o===0?i:[""],v=E7(m),g=0,b=0,y=0;g<r;++g)for(var x=0,w=Ll(e,h+1,h=j7(b=s[g])),S=e;x<v;++x)(S=k7(b>0?m[x]+" "+w:Ue(w,/&\f/g,m[x])))&&(c[y++]=S);return Yh(e,t,n,o===0?Gh:l,c,u,d,p)}function cz(e,t,n,r){return Yh(e,t,n,S7,db(ez()),Ll(e,2,-2),0,r)}function y3(e,t,n,r,o){return Yh(e,t,n,ub,Ll(e,0,r),Ll(e,r+1,-1),r,o)}function I7(e,t,n){switch(JL(e,t)){case 5103:return st+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return st+e+e;case 4789:return lu+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return st+e+lu+e+St+e+e;case 5936:switch(mn(e,t+11)){case 114:return st+e+St+Ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return st+e+St+Ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return st+e+St+Ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return st+e+St+e+e;case 6165:return st+e+St+"flex-"+e+e;case 5187:return st+e+Ue(e,/(\w+).+(:[^]+)/,st+"box-$1$2"+St+"flex-$1$2")+e;case 5443:return st+e+St+"flex-item-"+Ue(e,/flex-|-self/g,"")+(hi(e,/flex-|baseline/)?"":St+"grid-row-"+Ue(e,/flex-|-self/g,""))+e;case 4675:return st+e+St+"flex-line-pack"+Ue(e,/align-content|flex-|-self/g,"")+e;case 5548:return st+e+St+Ue(e,"shrink","negative")+e;case 5292:return st+e+St+Ue(e,"basis","preferred-size")+e;case 6060:return st+"box-"+Ue(e,"-grow","")+st+e+St+Ue(e,"grow","positive")+e;case 4554:return st+Ue(e,/([^-])(transform)/g,"$1"+st+"$2")+e;case 6187:return Ue(Ue(Ue(e,/(zoom-|grab)/,st+"$1"),/(image-set)/,st+"$1"),e,"")+e;case 5495:case 3959:return Ue(e,/(image-set\([^]*)/,st+"$1$`$1");case 4968:return Ue(Ue(e,/(.+:)(flex-)?(.*)/,st+"box-pack:$3"+St+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+st+e+e;case 4200:if(!hi(e,/flex-|baseline/))return St+"grid-column-align"+Ll(e,t)+e;break;case 2592:case 3360:return St+Ue(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,hi(r.props,/grid-\w+-end/)})?~Up(e+(n=n[t].value),"span",0)?e:St+Ue(e,"-start","")+e+St+"grid-row-span:"+(~Up(n,"span",0)?hi(n,/\d+/):+hi(n,/\d+/)-+hi(e,/\d+/))+";":St+Ue(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return hi(r.props,/grid-\w+-start/)})?e:St+Ue(Ue(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ue(e,/(.+)-inline(.+)/,st+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Uo(e)-1-t>6)switch(mn(e,t+1)){case 109:if(mn(e,t+4)!==45)break;case 102:return Ue(e,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+lu+(mn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Up(e,"stretch",0)?I7(Ue(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ue(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,s,l,c,u){return St+o+":"+i+u+(s?St+o+"-span:"+(l?c:+c-+i)+u:"")+e});case 4949:if(mn(e,t+6)===121)return Ue(e,":",":"+st)+e;break;case 6444:switch(mn(e,mn(e,14)===45?18:11)){case 120:return Ue(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+st+(mn(e,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+St+"$2box$3")+e;case 100:return Ue(e,":",":"+St)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ue(e,"scroll-","scroll-snap-")+e}return e}function Hf(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function uz(e,t,n,r){switch(e.type){case QL:if(e.children.length)break;case XL:case ub:return e.return=e.return||e.value;case S7:return"";case C7:return e.return=e.value+"{"+Hf(e.children,r)+"}";case Gh:if(!Uo(e.value=e.props.join(",")))return""}return Uo(n=Hf(e.children,r))?e.return=e.value+"{"+n+"}":""}function dz(e){var t=E7(e);return function(n,r,o,i){for(var s="",l=0;l<t;l++)s+=e[l](n,r,o,i)||"";return s}}function pz(e){return function(t){t.root||(t=t.return)&&e(t)}}function fz(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ub:e.return=I7(e.value,e.length,n);return;case C7:return Hf([Gi(e,{value:Ue(e.value,"@","@"+st)})],r);case Gh:if(e.length)return ZL(n=e.props,function(o){switch(hi(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ma(Gi(e,{props:[Ue(o,/:(read-\w+)/,":"+lu+"$1")]})),Ma(Gi(e,{props:[o]})),kv(e,{props:g3(n,r)});break;case"::placeholder":Ma(Gi(e,{props:[Ue(o,/:(plac\w+)/,":"+st+"input-$1")]})),Ma(Gi(e,{props:[Ue(o,/:(plac\w+)/,":"+lu+"$1")]})),Ma(Gi(e,{props:[Ue(o,/:(plac\w+)/,St+"input-$1")]})),Ma(Gi(e,{props:[o]})),kv(e,{props:g3(n,r)});break}return""})}}var hz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ar={},Fl=typeof process<"u"&&Ar!==void 0&&(Ar.REACT_APP_SC_ATTR||Ar.SC_ATTR)||"data-styled",R7="active",A7="data-styled-version",Qh="6.1.12",pb=`/*!sc*/
`,Uf=typeof window<"u"&&"HTMLElement"in window,mz=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&Ar!==void 0&&Ar.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Ar.REACT_APP_SC_DISABLE_SPEEDY!==""?Ar.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Ar.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&Ar!==void 0&&Ar.SC_DISABLE_SPEEDY!==void 0&&Ar.SC_DISABLE_SPEEDY!==""&&Ar.SC_DISABLE_SPEEDY!=="false"&&Ar.SC_DISABLE_SPEEDY),gz={},Jh=Object.freeze([]),Ml=Object.freeze({});function P7(e,t,n){return n===void 0&&(n=Ml),e.theme!==n.theme&&e.theme||t||n.theme}var T7=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),vz=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,yz=/(^-|-$)/g;function b3(e){return e.replace(vz,"-").replace(yz,"")}var bz=/(a)(d)/gi,sp=52,x3=function(e){return String.fromCharCode(e+(e>25?39:97))};function Iv(e){var t,n="";for(t=Math.abs(e);t>sp;t=t/sp|0)n=x3(t%sp)+n;return(x3(t%sp)+n).replace(bz,"$1-$2")}var t0,D7=5381,cl=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},N7=function(e){return cl(D7,e)};function fb(e){return Iv(N7(e)>>>0)}function xz(e){return e.displayName||e.name||"Component"}function n0(e){return typeof e=="string"&&!0}var O7=typeof Symbol=="function"&&Symbol.for,L7=O7?Symbol.for("react.memo"):60115,wz=O7?Symbol.for("react.forward_ref"):60112,Sz={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Cz={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},jz=((t0={})[wz]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},t0[L7]=z7,t0);function w3(e){return("type"in(t=e)&&t.type.$$typeof)===L7?z7:"$$typeof"in e?jz[e.$$typeof]:Sz;var t}var kz=Object.defineProperty,Ez=Object.getOwnPropertyNames,S3=Object.getOwnPropertySymbols,_z=Object.getOwnPropertyDescriptor,Iz=Object.getPrototypeOf,C3=Object.prototype;function F7(e,t,n){if(typeof t!="string"){if(C3){var r=Iz(t);r&&r!==C3&&F7(e,r,n)}var o=Ez(t);S3&&(o=o.concat(S3(t)));for(var i=w3(e),s=w3(t),l=0;l<o.length;++l){var c=o[l];if(!(c in Cz||n&&n[c]||s&&c in s||i&&c in i)){var u=_z(t,c);try{kz(e,c,u)}catch{}}}}return e}function ha(e){return typeof e=="function"}function hb(e){return typeof e=="object"&&"styledComponentId"in e}function Qs(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Wf(e,t){if(e.length===0)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function Fu(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Rv(e,t,n){if(n===void 0&&(n=!1),!n&&!Fu(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Rv(e[r],t[r]);else if(Fu(t))for(var r in t)e[r]=Rv(e[r],t[r]);return e}function mb(e,t){Object.defineProperty(e,"toString",{value:t})}function ws(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Rz=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r<t;r++)n+=this.groupSizes[r];return n},e.prototype.insertRules=function(t,n){if(t>=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,i=o;t>=i;)if((i<<=1)<0)throw ws(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var s=o;s<i;s++)this.groupSizes[s]=0}for(var l=this.indexOfGroup(t+1),c=(s=0,n.length);s<c;s++)this.tag.insertRule(l,n[s])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var n=this.groupSizes[t],r=this.indexOfGroup(t),o=r+n;this.groupSizes[t]=0;for(var i=r;i<o;i++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(t){var n="";if(t>=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],o=this.indexOfGroup(t),i=o+r,s=o;s<i;s++)n+="".concat(this.tag.getRule(s)).concat(pb);return n},e}(),qp=new Map,Vf=new Map,Gp=1,ap=function(e){if(qp.has(e))return qp.get(e);for(;Vf.has(Gp);)Gp++;var t=Gp++;return qp.set(e,t),Vf.set(t,e),t},Az=function(e,t){Gp=t+1,qp.set(e,t),Vf.set(t,e)},Pz="style[".concat(Fl,"][").concat(A7,'="').concat(Qh,'"]'),Tz=new RegExp("^".concat(Fl,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Dz=function(e,t,n){for(var r,o=n.split(","),i=0,s=o.length;i<s;i++)(r=o[i])&&e.registerName(t,r)},Nz=function(e,t){for(var n,r=((n=t.textContent)!==null&&n!==void 0?n:"").split(pb),o=[],i=0,s=r.length;i<s;i++){var l=r[i].trim();if(l){var c=l.match(Tz);if(c){var u=0|parseInt(c[1],10),d=c[2];u!==0&&(Az(d,u),Dz(e,d,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(l)}}},j3=function(e){for(var t=document.querySelectorAll(Pz),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(Fl)!==R7&&(Nz(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Oz(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var M7=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(l){var c=Array.from(l.querySelectorAll("style[".concat(Fl,"]")));return c[c.length-1]}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(Fl,R7),r.setAttribute(A7,Qh);var s=Oz();return s&&r.setAttribute("nonce",s),n.insertBefore(r,i),r},Lz=function(){function e(t){this.element=M7(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,o=0,i=r.length;o<i;o++){var s=r[o];if(s.ownerNode===n)return s}throw ws(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var n=this.sheet.cssRules[t];return n&&n.cssText?n.cssText:""},e}(),zz=function(){function e(t){this.element=M7(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,n){if(t<=this.length&&t>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),Fz=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,n){return t<=this.length&&(this.rules.splice(t,0,n),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),k3=Uf,Mz={isServer:!Uf,useCSSOMInjection:!mz},qf=function(){function e(t,n,r){t===void 0&&(t=Ml),n===void 0&&(n={});var o=this;this.options=xn(xn({},Mz),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Uf&&k3&&(k3=!1,j3(this)),mb(this,function(){return function(i){for(var s=i.getTag(),l=s.length,c="",u=function(p){var h=function(y){return Vf.get(y)}(p);if(h===void 0)return"continue";var m=i.names.get(h),v=s.getGroup(p);if(m===void 0||!m.size||v.length===0)return"continue";var g="".concat(Fl,".g").concat(p,'[id="').concat(h,'"]'),b="";m!==void 0&&m.forEach(function(y){y.length>0&&(b+="".concat(y,","))}),c+="".concat(v).concat(g,'{content:"').concat(b,'"}').concat(pb)},d=0;d<l;d++)u(d);return c}(o)})}return e.registerId=function(t){return ap(t)},e.prototype.rehydrate=function(){!this.server&&Uf&&j3(this)},e.prototype.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(xn(xn({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(n){var r=n.useCSSOMInjection,o=n.target;return n.isServer?new Fz(o):r?new Lz(o):new zz(o)}(this.options),new Rz(t)));var t},e.prototype.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.prototype.registerName=function(t,n){if(ap(t),this.names.has(t))this.names.get(t).add(n);else{var r=new Set;r.add(n),this.names.set(t,r)}},e.prototype.insertRules=function(t,n,r){this.registerName(t,n),this.getTag().insertRules(ap(t),r)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(ap(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),$z=/&/g,Bz=/^\s*\/\/.*$/gm;function $7(e,t){return e.map(function(n){return n.type==="rule"&&(n.value="".concat(t," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(t," ")),n.props=n.props.map(function(r){return"".concat(t," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=$7(n.children,t)),n})}function B7(e){var t,n,r,o=e===void 0?Ml:e,i=o.options,s=i===void 0?Ml:i,l=o.plugins,c=l===void 0?Jh:l,u=function(h,m,v){return v.startsWith(n)&&v.endsWith(n)&&v.replaceAll(n,"").length>0?".".concat(t):h},d=c.slice();d.push(function(h){h.type===Gh&&h.value.includes("&")&&(h.props[0]=h.props[0].replace($z,n).replace(r,u))}),s.prefix&&d.push(fz),d.push(uz);var p=function(h,m,v,g){m===void 0&&(m=""),v===void 0&&(v=""),g===void 0&&(g="&"),t=g,n=m,r=new RegExp("\\".concat(n,"\\b"),"g");var b=h.replace(Bz,""),y=lz(v||m?"".concat(v," ").concat(m," { ").concat(b," }"):b);s.namespace&&(y=$7(y,s.namespace));var x=[];return Hf(y,dz(d.concat(pz(function(w){return x.push(w)})))),x};return p.hash=c.length?c.reduce(function(h,m){return m.name||ws(15),cl(h,m.name)},D7).toString():"",p}var Hz=new qf,Av=B7(),gb=ce.createContext({shouldForwardProp:void 0,styleSheet:Hz,stylis:Av});gb.Consumer;var Uz=ce.createContext(void 0);function Gf(){return f.useContext(gb)}function Wz(e){var t=f.useState(e.stylisPlugins),n=t[0],r=t[1],o=Gf().styleSheet,i=f.useMemo(function(){var c=o;return e.sheet?c=e.sheet:e.target&&(c=c.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(c=c.reconstructWithOptions({useCSSOMInjection:!1})),c},[e.disableCSSOMInjection,e.sheet,e.target,o]),s=f.useMemo(function(){return B7({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);f.useEffect(function(){z8(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var l=f.useMemo(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:i,stylis:s}},[e.shouldForwardProp,i,s]);return ce.createElement(gb.Provider,{value:l},ce.createElement(Uz.Provider,{value:s},e.children))}var H7=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=Av);var s=r.name+i.hash;o.hasNameForId(r.id,s)||o.insertRules(r.id,s,i(r.rules,s,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,mb(this,function(){throw ws(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Av),this.name+t.hash},e}(),Vz=function(e){return e>="A"&&e<="Z"};function E3(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(n===1&&r==="-"&&e[0]==="-")return e;Vz(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var U7=function(e){return e==null||e===!1||e===""},W7=function(e){var t,n,r=[];for(var o in e){var i=e[o];e.hasOwnProperty(o)&&!U7(i)&&(Array.isArray(i)&&i.isCss||ha(i)?r.push("".concat(E3(o),":"),i,";"):Fu(i)?r.push.apply(r,Ol(Ol(["".concat(o," {")],W7(i),!1),["}"],!1)):r.push("".concat(E3(o),": ").concat((t=o,(n=i)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||t in hz||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function ms(e,t,n,r){if(U7(e))return[];if(hb(e))return[".".concat(e.styledComponentId)];if(ha(e)){if(!ha(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return[e];var o=e(t);return ms(o,t,n,r)}var i;return e instanceof H7?n?(e.inject(n,r),[e.getName(r)]):[e]:Fu(e)?W7(e):Array.isArray(e)?Array.prototype.concat.apply(Jh,e.map(function(s){return ms(s,t,n,r)})):[e.toString()]}function V7(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(ha(n)&&!hb(n))return!1}return!0}var qz=N7(Qh),Gz=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&V7(t),this.componentId=n,this.baseHash=cl(qz,n),this.baseStyle=r,qf.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))o=Qs(o,this.staticRulesId);else{var i=Wf(ms(this.rules,t,n,r)),s=Iv(cl(this.baseHash,i)>>>0);if(!n.hasNameForId(this.componentId,s)){var l=r(i,".".concat(s),void 0,this.componentId);n.insertRules(this.componentId,s,l)}o=Qs(o,s),this.staticRulesId=s}else{for(var c=cl(this.baseHash,r.hash),u="",d=0;d<this.rules.length;d++){var p=this.rules[d];if(typeof p=="string")u+=p;else if(p){var h=Wf(ms(p,t,n,r));c=cl(c,h+d),u+=h}}if(u){var m=Iv(c>>>0);n.hasNameForId(this.componentId,m)||n.insertRules(this.componentId,m,r(u,".".concat(m),void 0,this.componentId)),o=Qs(o,m)}}return o},e}(),$l=ce.createContext(void 0);$l.Consumer;function Kz(){var e=f.useContext($l);if(!e)throw ws(18);return e}function Yz(e){var t=ce.useContext($l),n=f.useMemo(function(){return function(r,o){if(!r)throw ws(14);if(ha(r)){var i=r(o);return i}if(Array.isArray(r)||typeof r!="object")throw ws(8);return o?xn(xn({},o),r):r}(e.theme,t)},[e.theme,t]);return e.children?ce.createElement($l.Provider,{value:n},e.children):null}var r0={};function Xz(e,t,n){var r=hb(e),o=e,i=!n0(e),s=t.attrs,l=s===void 0?Jh:s,c=t.componentId,u=c===void 0?function(S,k){var _=typeof S!="string"?"sc":b3(S);r0[_]=(r0[_]||0)+1;var I="".concat(_,"-").concat(fb(Qh+_+r0[_]));return k?"".concat(k,"-").concat(I):I}(t.displayName,t.parentComponentId):c,d=t.displayName,p=d===void 0?function(S){return n0(S)?"styled.".concat(S):"Styled(".concat(xz(S),")")}(e):d,h=t.displayName&&t.componentId?"".concat(b3(t.displayName),"-").concat(t.componentId):t.componentId||u,m=r&&o.attrs?o.attrs.concat(l).filter(Boolean):l,v=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;v=function(S,k){return g(S,k)&&b(S,k)}}else v=g}var y=new Gz(n,h,r?o.componentStyle:void 0);function x(S,k){return function(_,I,P){var z=_.attrs,D=_.componentStyle,F=_.defaultProps,$=_.foldedComponentIds,Z=_.styledComponentId,ee=_.target,W=ce.useContext($l),ue=Gf(),K=_.shouldForwardProp||ue.shouldForwardProp,B=P7(I,W,F)||Ml,H=function(Oe,ke,He){for(var Ke,it=xn(xn({},ke),{className:void 0,theme:He}),Pe=0;Pe<Oe.length;Pe+=1){var bt=ha(Ke=Oe[Pe])?Ke(it):Ke;for(var Ye in bt)it[Ye]=Ye==="className"?Qs(it[Ye],bt[Ye]):Ye==="style"?xn(xn({},it[Ye]),bt[Ye]):bt[Ye]}return ke.className&&(it.className=Qs(it.className,ke.className)),it}(z,I,B),N=H.as||ee,xe={};for(var fe in H)H[fe]===void 0||fe[0]==="$"||fe==="as"||fe==="theme"&&H.theme===B||(fe==="forwardedAs"?xe.as=H.forwardedAs:K&&!K(fe,N)||(xe[fe]=H[fe]));var O=function(Oe,ke){var He=Gf(),Ke=Oe.generateAndInjectStyles(ke,He.styleSheet,He.stylis);return Ke}(D,H),Te=Qs($,Z);return O&&(Te+=" "+O),H.className&&(Te+=" "+H.className),xe[n0(N)&&!T7.has(N)?"class":"className"]=Te,xe.ref=P,f.createElement(N,xe)}(w,S,k)}x.displayName=p;var w=ce.forwardRef(x);return w.attrs=m,w.componentStyle=y,w.displayName=p,w.shouldForwardProp=v,w.foldedComponentIds=r?Qs(o.foldedComponentIds,o.styledComponentId):"",w.styledComponentId=h,w.target=r?o.target:e,Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(S){this._foldedDefaultProps=r?function(k){for(var _=[],I=1;I<arguments.length;I++)_[I-1]=arguments[I];for(var P=0,z=_;P<z.length;P++)Rv(k,z[P],!0);return k}({},o.defaultProps,S):S}}),mb(w,function(){return".".concat(w.styledComponentId)}),i&&F7(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),w}function _3(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var I3=function(e){return Object.assign(e,{isCss:!0})};function Kt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(ha(e)||Fu(e))return I3(ms(_3(Jh,Ol([e],t,!0))));var r=e;return t.length===0&&r.length===1&&typeof r[0]=="string"?ms(r):I3(ms(_3(r,t)))}function Pv(e,t,n){if(n===void 0&&(n=Ml),!t)throw ws(1,t);var r=function(o){for(var i=[],s=1;s<arguments.length;s++)i[s-1]=arguments[s];return e(t,n,Kt.apply(void 0,Ol([o],i,!1)))};return r.attrs=function(o){return Pv(e,t,xn(xn({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},r.withConfig=function(o){return Pv(e,t,xn(xn({},n),o))},r}var q7=function(e){return Pv(Xz,e)},C=q7;T7.forEach(function(e){C[e]=q7(e)});var Qz=function(){function e(t,n){this.rules=t,this.componentId=n,this.isStatic=V7(t),qf.registerId(this.componentId+1)}return e.prototype.createStyles=function(t,n,r,o){var i=o(Wf(ms(this.rules,n,r,o)),""),s=this.componentId+t;r.insertRules(s,s,i)},e.prototype.removeStyles=function(t,n){n.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,n,r,o){t>2&&qf.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,n,r,o)},e}();function Jz(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Kt.apply(void 0,Ol([e],t,!1)),o="sc-global-".concat(fb(JSON.stringify(r))),i=new Qz(r,o),s=function(c){var u=Gf(),d=ce.useContext($l),p=ce.useRef(u.styleSheet.allocateGSInstance(o)).current;return u.styleSheet.server&&l(p,c,u.styleSheet,d,u.stylis),ce.useLayoutEffect(function(){if(!u.styleSheet.server)return l(p,c,u.styleSheet,d,u.stylis),function(){return i.removeStyles(p,u.styleSheet)}},[p,c,u.styleSheet,d,u.stylis]),null};function l(c,u,d,p,h){if(i.isStatic)i.renderStyles(c,gz,d,h);else{var m=xn(xn({},u),{theme:P7(u,p,s.defaultProps)});i.renderStyles(c,m,d,h)}}return ce.memo(s)}function ni(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Wf(Kt.apply(void 0,Ol([e],t,!1))),o=fb(r);return new H7(o,r)}function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gn.apply(null,arguments)}function Tv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mu(e,t){return Mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Mu(e,t)}function G7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Mu(e,t)}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dv(e)}function Zz(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function K7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K7=function(){return!!e})()}function eF(e,t,n){if(K7())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Mu(o,n.prototype),o}function Nv(e){var t=typeof Map=="function"?new Map:void 0;return Nv=function(r){if(r===null||!Zz(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return eF(r,arguments,Dv(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Mu(o,r)},Nv(e)}var qo=function(e){G7(t,e);function t(n){var r;return r=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this,Tv(r)}return t}(Nv(Error));function o0(e){return Math.round(e*255)}function tF(e,t,n){return o0(e)+","+o0(t)+","+o0(n)}function $u(e,t,n,r){if(r===void 0&&(r=tF),t===0)return r(n,n,n);var o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*t,s=i*(1-Math.abs(o%2-1)),l=0,c=0,u=0;o>=0&&o<1?(l=i,c=s):o>=1&&o<2?(l=s,c=i):o>=2&&o<3?(c=i,u=s):o>=3&&o<4?(c=s,u=i):o>=4&&o<5?(l=s,u=i):o>=5&&o<6&&(l=i,u=s);var d=n-i/2,p=l+d,h=c+d,m=u+d;return r(p,h,m)}var R3={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function nF(e){if(typeof e!="string")return e;var t=e.toLowerCase();return R3[t]?"#"+R3[t]:e}var rF=/^#[a-fA-F0-9]{6}$/,oF=/^#[a-fA-F0-9]{8}$/,iF=/^#[a-fA-F0-9]{3}$/,sF=/^#[a-fA-F0-9]{4}$/,i0=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,aF=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,lF=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,cF=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Bl(e){if(typeof e!="string")throw new qo(3);var t=nF(e);if(t.match(rF))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(oF)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(iF))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(sF)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=i0.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=aF.exec(t.substring(0,50));if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])>1?parseFloat(""+i[4])/100:parseFloat(""+i[4])};var s=lF.exec(t);if(s){var l=parseInt(""+s[1],10),c=parseInt(""+s[2],10)/100,u=parseInt(""+s[3],10)/100,d="rgb("+$u(l,c,u)+")",p=i0.exec(d);if(!p)throw new qo(4,t,d);return{red:parseInt(""+p[1],10),green:parseInt(""+p[2],10),blue:parseInt(""+p[3],10)}}var h=cF.exec(t.substring(0,50));if(h){var m=parseInt(""+h[1],10),v=parseInt(""+h[2],10)/100,g=parseInt(""+h[3],10)/100,b="rgb("+$u(m,v,g)+")",y=i0.exec(b);if(!y)throw new qo(4,t,b);return{red:parseInt(""+y[1],10),green:parseInt(""+y[2],10),blue:parseInt(""+y[3],10),alpha:parseFloat(""+h[4])>1?parseFloat(""+h[4])/100:parseFloat(""+h[4])}}throw new qo(5)}function uF(e){var t=e.red/255,n=e.green/255,r=e.blue/255,o=Math.max(t,n,r),i=Math.min(t,n,r),s=(o+i)/2;if(o===i)return e.alpha!==void 0?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var l,c=o-i,u=s>.5?c/(2-o-i):c/(o+i);switch(o){case t:l=(n-r)/c+(n<r?6:0);break;case n:l=(r-t)/c+2;break;default:l=(t-n)/c+4;break}return l*=60,e.alpha!==void 0?{hue:l,saturation:u,lightness:s,alpha:e.alpha}:{hue:l,saturation:u,lightness:s}}function Di(e){return uF(Bl(e))}var dF=function(t){return t.length===7&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t},Ov=dF;function Vs(e){var t=e.toString(16);return t.length===1?"0"+t:t}function s0(e){return Vs(Math.round(e*255))}function pF(e,t,n){return Ov("#"+s0(e)+s0(t)+s0(n))}function Kf(e,t,n){return $u(e,t,n,pF)}function fF(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Kf(e,t,n);if(typeof e=="object"&&t===void 0&&n===void 0)return Kf(e.hue,e.saturation,e.lightness);throw new qo(1)}function hF(e,t,n,r){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?Kf(e,t,n):"rgba("+$u(e,t,n)+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?Kf(e.hue,e.saturation,e.lightness):"rgba("+$u(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new qo(2)}function Lv(e,t,n){if(typeof e=="number"&&typeof t=="number"&&typeof n=="number")return Ov("#"+Vs(e)+Vs(t)+Vs(n));if(typeof e=="object"&&t===void 0&&n===void 0)return Ov("#"+Vs(e.red)+Vs(e.green)+Vs(e.blue));throw new qo(6)}function Zh(e,t,n,r){if(typeof e=="string"&&typeof t=="number"){var o=Bl(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof n=="number"&&typeof r=="number")return r>=1?Lv(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if(typeof e=="object"&&t===void 0&&n===void 0&&r===void 0)return e.alpha>=1?Lv(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new qo(7)}var mF=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},gF=function(t){return typeof t.red=="number"&&typeof t.green=="number"&&typeof t.blue=="number"&&typeof t.alpha=="number"},vF=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&(typeof t.alpha!="number"||typeof t.alpha>"u")},yF=function(t){return typeof t.hue=="number"&&typeof t.saturation=="number"&&typeof t.lightness=="number"&&typeof t.alpha=="number"};function Ni(e){if(typeof e!="object")throw new qo(8);if(gF(e))return Zh(e);if(mF(e))return Lv(e);if(yF(e))return hF(e);if(vF(e))return fF(e);throw new qo(8)}function Y7(e,t,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=t?e.apply(this,o):Y7(e,t,o)}}function Gr(e){return Y7(e,e.length,[])}function bF(e,t){if(t==="transparent")return t;var n=Di(t);return Ni(Gn({},n,{hue:n.hue+parseFloat(e)}))}Gr(bF);function vb(e){if(e==="transparent")return e;var t=Di(e);return Ni(Gn({},t,{hue:(t.hue+180)%360}))}function nc(e,t,n){return Math.max(e,Math.min(t,n))}function xF(e,t){if(t==="transparent")return t;var n=Di(t);return Ni(Gn({},n,{lightness:nc(0,1,n.lightness-parseFloat(e))}))}var wF=Gr(xF),pi=wF;function SF(e,t){if(t==="transparent")return t;var n=Di(t);return Ni(Gn({},n,{saturation:nc(0,1,n.saturation-parseFloat(e))}))}Gr(SF);function CF(e,t){if(t==="transparent")return t;var n=Di(t);return Ni(Gn({},n,{lightness:nc(0,1,n.lightness+parseFloat(e))}))}var jF=Gr(CF),Tr=jF;function kF(e,t,n){if(t==="transparent")return n;if(n==="transparent")return t;if(e===0)return n;var r=Bl(t),o=Gn({},r,{alpha:typeof r.alpha=="number"?r.alpha:1}),i=Bl(n),s=Gn({},i,{alpha:typeof i.alpha=="number"?i.alpha:1}),l=o.alpha-s.alpha,c=parseFloat(e)*2-1,u=c*l===-1?c:c+l,d=1+c*l,p=(u/d+1)/2,h=1-p,m={red:Math.floor(o.red*p+s.red*h),green:Math.floor(o.green*p+s.green*h),blue:Math.floor(o.blue*p+s.blue*h),alpha:o.alpha*parseFloat(e)+s.alpha*(1-parseFloat(e))};return Zh(m)}var EF=Gr(kF),X7=EF;function _F(e,t){if(t==="transparent")return t;var n=Bl(t),r=typeof n.alpha=="number"?n.alpha:1,o=Gn({},n,{alpha:nc(0,1,(r*100+parseFloat(e)*100)/100)});return Zh(o)}Gr(_F);function IF(e,t){if(t==="transparent")return t;var n=Di(t);return Ni(Gn({},n,{saturation:nc(0,1,n.saturation+parseFloat(e))}))}Gr(IF);function RF(e,t){return t==="transparent"?t:Ni(Gn({},Di(t),{hue:parseFloat(e)}))}Gr(RF);function AF(e,t){return t==="transparent"?t:Ni(Gn({},Di(t),{lightness:parseFloat(e)}))}var PF=Gr(AF),cu=PF;function TF(e,t){return t==="transparent"?t:Ni(Gn({},Di(t),{saturation:parseFloat(e)}))}var DF=Gr(TF),NF=DF;function OF(e,t){return t==="transparent"?t:X7(parseFloat(e),"rgb(0, 0, 0)",t)}Gr(OF);function LF(e,t){return t==="transparent"?t:X7(parseFloat(e),"rgb(255, 255, 255)",t)}Gr(LF);function zF(e,t){if(t==="transparent")return t;var n=Bl(t),r=typeof n.alpha=="number"?n.alpha:1,o=Gn({},n,{alpha:nc(0,1,+(r*100-parseFloat(e)*100).toFixed(2)/100)});return Zh(o)}var FF=Gr(zF),Zo=FF;const zc=new Map;function Dr(e,t){const[n,r]=f.useState(()=>{try{const i=window.localStorage.getItem(e);return i==="undefined"?t:i?JSON.parse(i):t}catch(i){return console.error(`Error finding ${e} in localStorage:`,i),t}}),o=f.useCallback(i=>{try{const s=i instanceof Function?i(n):i;for(const l of zc.get(e)||[])l(s);window.localStorage.setItem(e,JSON.stringify(s))}catch(s){console.error(s)}},[n,e]);return f.useEffect(()=>{var i;return zc.has(e)||zc.set(e,new Set),(i=zc.get(e))==null||i.add(r),()=>{var s;(s=zc.get(e))==null||s.delete(r)}},[e]),[n,o]}var yl;(function(e){e.always="always",e.never="never",e.auto="auto"})(yl||(yl={}));const MF=()=>{const[e,t]=f.useState(()=>a0()),[n,r]=Dr("darkMode","auto");function o(i){i===void 0?(t(a0()),r("auto")):i===!0?(t(i),r("always")):i===!1&&(t(i),r("never"))}return f.useEffect(()=>{const i=l=>{n==="auto"&&t(l.matches)},s=window.matchMedia("(prefers-color-scheme: dark)");return s.addEventListener("change",i),()=>s.removeEventListener("change",i)},[]),f.useEffect(()=>{n==="auto"?t(a0()):n==="always"?t(!0):n==="never"&&t(!1)},[n]),[e,o,n]};function a0(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}let $F={data:""},BF=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||$F,HF=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,UF=/\/\*[^]*?\*\/| +/g,A3=/\n+/g,ns=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+s+";":r+=i[1]=="f"?ns(s,i):i+"{"+ns(s,i[1]=="k"?"":t)+"}":typeof s=="object"?r+=ns(s,t?t.replace(/([^,])+/g,l=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ns.p?ns.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},di={},Q7=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Q7(e[n]);return t}return e},WF=(e,t,n,r,o)=>{let i=Q7(e),s=di[i]||(di[i]=(c=>{let u=0,d=11;for(;u<c.length;)d=101*d+c.charCodeAt(u++)>>>0;return"go"+d})(i));if(!di[s]){let c=i!==e?e:(u=>{let d,p,h=[{}];for(;d=HF.exec(u.replace(UF,""));)d[4]?h.shift():d[3]?(p=d[3].replace(A3," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][d[1]]=d[2].replace(A3," ").trim();return h[0]})(e);di[s]=ns(o?{["@keyframes "+s]:c}:c,n?"":"."+s)}let l=n&&di.g?di.g:null;return n&&(di.g=di[s]),((c,u,d,p)=>{p?u.data=u.data.replace(p,c):u.data.indexOf(c)===-1&&(u.data=d?c+u.data:u.data+c)})(di[s],t,r,l),s},VF=(e,t,n)=>e.reduce((r,o,i)=>{let s=t[i];if(s&&s.call){let l=s(n),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=c?"."+c:l&&typeof l=="object"?l.props?"":ns(l,""):l===!1?"":l}return r+o+(s??"")},"");function em(e){let t=this||{},n=e.call?e(t.p):e;return WF(n.unshift?n.raw?VF(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,BF(t.target),t.g,t.o,t.k)}let J7,zv,Fv;em.bind({g:1});let _i=em.bind({k:1});function qF(e,t,n,r){ns.p=t,J7=e,zv=n,Fv=r}function Ts(e,t){let n=this||{};return function(){let r=arguments;function o(i,s){let l=Object.assign({},i),c=l.className||o.className;n.p=Object.assign({theme:zv&&zv()},l),n.o=/ *go\d+/.test(c),l.className=em.apply(n,r)+(c?" "+c:"");let u=e;return e[0]&&(u=l.as||e,delete l.as),Fv&&u[0]&&Fv(l),J7(u,l)}return o}}var GF=e=>typeof e=="function",Yf=(e,t)=>GF(e)?e(t):e,KF=(()=>{let e=0;return()=>(++e).toString()})(),Z7=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),YF=20,Kp=new Map,XF=1e3,P3=e=>{if(Kp.has(e))return;let t=setTimeout(()=>{Kp.delete(e),ja({type:4,toastId:e})},XF);Kp.set(e,t)},QF=e=>{let t=Kp.get(e);t&&clearTimeout(t)},Mv=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,YF)};case 1:return t.toast.id&&QF(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?Mv(e,{type:1,toast:n}):Mv(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?P3(r):e.toasts.forEach(i=>{P3(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},Yp=[],Xp={toasts:[],pausedAt:void 0},ja=e=>{Xp=Mv(Xp,e),Yp.forEach(t=>{t(Xp)})},JF={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ZF=(e={})=>{let[t,n]=f.useState(Xp);f.useEffect(()=>(Yp.push(n),()=>{let o=Yp.indexOf(n);o>-1&&Yp.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,s;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||JF[o.type],style:{...e.style,...(s=e[o.type])==null?void 0:s.style,...o.style}}});return{...t,toasts:r}},eM=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||KF()}),pd=e=>(t,n)=>{let r=eM(t,e,n);return ja({type:2,toast:r}),r.id},vr=(e,t)=>pd("blank")(e,t);vr.error=pd("error");vr.success=pd("success");vr.loading=pd("loading");vr.custom=pd("custom");vr.dismiss=e=>{ja({type:3,toastId:e})};vr.remove=e=>ja({type:4,toastId:e});vr.promise=(e,t,n)=>{let r=vr.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(vr.success(Yf(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{vr.error(Yf(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var tM=(e,t)=>{ja({type:1,toast:{id:e,height:t}})},nM=()=>{ja({type:5,time:Date.now()})},rM=e=>{let{toasts:t,pausedAt:n}=ZF(e);f.useEffect(()=>{if(n)return;let i=Date.now(),s=t.map(l=>{if(l.duration===1/0)return;let c=(l.duration||0)+l.pauseDuration-(i-l.createdAt);if(c<0){l.visible&&vr.dismiss(l.id);return}return setTimeout(()=>vr.dismiss(l.id),c)});return()=>{s.forEach(l=>l&&clearTimeout(l))}},[t,n]);let r=f.useCallback(()=>{n&&ja({type:6,time:Date.now()})},[n]),o=f.useCallback((i,s)=>{let{reverseOrder:l=!1,gutter:c=8,defaultPosition:u}=s||{},d=t.filter(m=>(m.position||u)===(i.position||u)&&m.height),p=d.findIndex(m=>m.id===i.id),h=d.filter((m,v)=>v<p&&m.visible).length;return d.filter(m=>m.visible).slice(...l?[h+1]:[0,h]).reduce((m,v)=>m+(v.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:tM,startPause:nM,endPause:r,calculateOffset:o}}},oM=_i`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,iM=_i`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,sM=_i`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,aM=Ts("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${oM} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${iM} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${sM} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,lM=_i`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,cM=Ts("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${lM} 1s linear infinite;
`,uM=_i`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,dM=_i`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,pM=Ts("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${uM} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${dM} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,fM=Ts("div")`
position: absolute;
`,hM=Ts("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,mM=_i`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,gM=Ts("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${mM} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,vM=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?f.createElement(gM,null,t):t:n==="blank"?null:f.createElement(hM,null,f.createElement(cM,{...r}),n!=="loading"&&f.createElement(fM,null,n==="error"?f.createElement(aM,{...r}):f.createElement(pM,{...r})))},yM=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,bM=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,xM="0%{opacity:0;} 100%{opacity:1;}",wM="0%{opacity:1;} 100%{opacity:0;}",SM=Ts("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,CM=Ts("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,jM=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Z7()?[xM,wM]:[yM(n),bM(n)];return{animation:t?`${_i(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${_i(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ek=f.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?jM(e.position||t||"top-center",e.visible):{opacity:0},i=f.createElement(vM,{toast:e}),s=f.createElement(CM,{...e.ariaProps},Yf(e.message,e));return f.createElement(SM,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:s}):f.createElement(f.Fragment,null,i,s))});qF(f.createElement);var kM=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=f.useCallback(s=>{if(s){let l=()=>{let c=s.getBoundingClientRect().height;r(e,c)};l(),new MutationObserver(l).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return f.createElement("div",{ref:i,className:t,style:n},o)},EM=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Z7()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},_M=em`
z-index: 9999;
> * {
pointer-events: auto;
}
`,lp=16,IM=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:s})=>{let{toasts:l,handlers:c}=rM(n);return f.createElement("div",{style:{position:"fixed",zIndex:9999,top:lp,left:lp,right:lp,bottom:lp,pointerEvents:"none",...i},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(u=>{let d=u.position||t,p=c.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),h=EM(d,p);return f.createElement(kM,{id:u.id,key:u.id,onHeightUpdate:c.updateHeight,className:u.visible?_M:"",style:h},u.type==="custom"?Yf(u.message,u):o?o(u):f.createElement(ek,{toast:u,position:d}))}))},at=vr;function RM(){const[e,t]=f.useState(!1),n=f.useRef(null),r=f.useCallback(()=>t(!0),[]),o=f.useCallback(()=>t(!1),[]),i=f.useCallback(c=>{var u;(u=n.current)!=null&&u.contains(c.target)&&t(!0)},[]),s=f.useCallback(()=>{var c;(c=n.current)!=null&&c.contains(document.activeElement)||t(!1)},[]),l=f.useMemo(()=>({onMouseOver:r,onMouseOut:o,onFocus:i,onBlur:s}),[r,o,i,s]);return window.matchMedia("(pointer: coarse)").matches?[n,!1,{}]:[n,e,l]}var tk={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},T3=ce.createContext&&ce.createContext(tk),gs=function(){return gs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},gs.apply(this,arguments)},AM=function(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function nk(e){return e&&e.map(function(t,n){return ce.createElement(t.tag,gs({key:n},t.attr),nk(t.child))})}function G(e){return function(t){return ce.createElement(PM,gs({attr:gs({},e.attr)},t),nk(e.child))}}function PM(e){var t=function(n){var r=e.attr,o=e.size,i=e.title,s=AM(e,["attr","size","title"]),l=o||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),ce.createElement("svg",gs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:c,style:gs(gs({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&ce.createElement("title",null,i),e.children)};return T3!==void 0?ce.createElement(T3.Consumer,null,function(n){return t(n)}):t(tk)}function TM(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"}}]})(e)}function DM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"}}]})(e)}function NM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 398.8c-11.8 5.1-23.4 9.7-34.9 13.5c16.7 33.8 31 35.7 34.9 35.7s18.1-1.9 34.9-35.7c-11.4-3.9-23.1-8.4-34.9-13.5zM446 256c33 45.2 44.3 90.9 23.6 128c-20.2 36.3-62.5 49.3-115.2 43.2c-22 52.1-55.6 84.8-98.4 84.8s-76.4-32.7-98.4-84.8c-52.7 6.1-95-6.8-115.2-43.2C21.7 346.9 33 301.2 66 256c-33-45.2-44.3-90.9-23.6-128c20.2-36.3 62.5-49.3 115.2-43.2C179.6 32.7 213.2 0 256 0s76.4 32.7 98.4 84.8c52.7-6.1 95 6.8 115.2 43.2c20.7 37.1 9.4 82.8-23.6 128zm-65.8 67.4c-1.7 14.2-3.9 28-6.7 41.2c31.8 1.4 38.6-8.7 40.2-11.7c2.3-4.2 7-17.9-11.9-48.1c-6.8 6.3-14 12.5-21.6 18.6zm-6.7-175.9c2.8 13.1 5 26.9 6.7 41.2c7.6 6.1 14.8 12.3 21.6 18.6c18.9-30.2 14.2-44 11.9-48.1c-1.6-2.9-8.4-13-40.2-11.7zM290.9 99.7C274.1 65.9 259.9 64 256 64s-18.1 1.9-34.9 35.7c11.4 3.9 23.1 8.4 34.9 13.5c11.8-5.1 23.4-9.7 34.9-13.5zm-159 88.9c1.7-14.3 3.9-28 6.7-41.2c-31.8-1.4-38.6 8.7-40.2 11.7c-2.3 4.2-7 17.9 11.9 48.1c6.8-6.3 14-12.5 21.6-18.6zM110.2 304.8C91.4 335 96 348.7 98.3 352.9c1.6 2.9 8.4 13 40.2 11.7c-2.8-13.1-5-26.9-6.7-41.2c-7.6-6.1-14.8-12.3-21.6-18.6zM336 256a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zm-80-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"}}]})(e)}function h0e(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M0 64C0 46.3 14.3 32 32 32H80 96 224c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128H96 80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V256 96H32C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64H112V224H224zM112 288V416H256c35.3 0 64-28.7 64-64s-28.7-64-64-64H224 112z"}}]})(e)}function OM(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M96 0C43 0 0 43 0 96V416c0 53 43 96 96 96H384h32c17.7 0 32-14.3 32-32s-14.3-32-32-32V384c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32H384 96zm0 384H352v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16zm16 48H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16z"}}]})(e)}function LM(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}}]})(e)}function zM(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"}}]})(e)}function FM(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"}}]})(e)}function MM(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"}}]})(e)}function yb(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"}}]})(e)}function rk(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"}}]})(e)}function $M(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4l0 0 0 0 0 0 0 0 .3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"}}]})(e)}function m0e(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"}}]})(e)}function BM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6V377.4c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4V134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1v-188L288 246.6v188z"}}]})(e)}function HM(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M290.8 48.6l78.4 29.7L288 109.5 206.8 78.3l78.4-29.7c1.8-.7 3.8-.7 5.7 0zM136 92.5V204.7c-1.3 .4-2.6 .8-3.9 1.3l-96 36.4C14.4 250.6 0 271.5 0 294.7V413.9c0 22.2 13.1 42.3 33.5 51.3l96 42.2c14.4 6.3 30.7 6.3 45.1 0L288 457.5l113.5 49.9c14.4 6.3 30.7 6.3 45.1 0l96-42.2c20.3-8.9 33.5-29.1 33.5-51.3V294.7c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-1.3-.5-2.6-.9-3.9-1.3V92.5c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-12.8-4.8-26.9-4.8-39.7 0l-96 36.4C150.4 48.4 136 69.3 136 92.5zM392 210.6l-82.4 31.2V152.6L392 121v89.6zM154.8 250.9l78.4 29.7L152 311.7 70.8 280.6l78.4-29.7c1.8-.7 3.8-.7 5.7 0zm18.8 204.4V354.8L256 323.2v95.9l-82.4 36.2zM421.2 250.9c1.8-.7 3.8-.7 5.7 0l78.4 29.7L424 311.7l-81.2-31.1 78.4-29.7zM523.2 421.2l-77.6 34.1V354.8L528 323.2v90.7c0 3.2-1.9 6-4.8 7.3z"}}]})(e)}function ok(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"}}]})(e)}function ik(e){return G({tag:"svg",attr:{viewBox:"0 0 128 512"},child:[{tag:"path",attr:{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"}}]})(e)}function UM(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384v38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v48H368c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v48c0 8.8 7.2 16 16 16s16-7.2 16-16V384h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H448V304z"}}]})(e)}function WM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"}}]})(e)}function VM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M128 64c0-35.3 28.7-64 64-64H352V128c0 17.7 14.3 32 32 32H512V448c0 35.3-28.7 64-64 64H192c-35.3 0-64-28.7-64-64V336H302.1l-39 39c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l39 39H128V64zm0 224v48H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H128zM512 128H384V0L512 128z"}}]})(e)}function qM(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM112 256H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H272c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z"}}]})(e)}function GM(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z"}}]})(e)}function sk(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"}}]})(e)}function KM(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M88.7 223.8L0 375.8V96C0 60.7 28.7 32 64 32H181.5c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 28.3 18.7 45.3 18.7H416c35.3 0 64 28.7 64 64v32H144c-22.8 0-43.8 12.1-55.3 31.8zm27.6 16.1C122.1 230 132.6 224 144 224H544c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-112 192C453.9 474 443.4 480 432 480H32c-11.5 0-22-6.1-27.7-16.1s-5.7-22.2 .1-32.1l112-192z"}}]})(e)}function YM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"}}]})(e)}function D3(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32h-1.8l18-48H303.8l18 48H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H390.2L254 52.8zM279.8 304H168.2L224 155.1 279.8 304z"}}]})(e)}function XM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"}}]})(e)}function tm(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"}}]})(e)}function QM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V280.4c-17-15.2-39.4-24.4-64-24.4H64c-24.6 0-47 9.2-64 24.4V96zM64 288H448c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V352c0-35.3 28.7-64 64-64zM320 416a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm128-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"}}]})(e)}function $v(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128h95.1l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H347.1L325.8 320H384c17.7 0 32 14.3 32 32s-14.3 32-32 32H315.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7H155.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l21.3-128H64c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320h95.1l21.3-128H187.1z"}}]})(e)}function g0e(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 64C0 46.3 14.3 32 32 32H80h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H112V208H336V96H320c-17.7 0-32-14.3-32-32s14.3-32 32-32h48 48c17.7 0 32 14.3 32 32s-14.3 32-32 32H400V240 416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H368 320c-17.7 0-32-14.3-32-32s14.3-32 32-32h16V272H112V416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V240 96H32C14.3 96 0 81.7 0 64z"}}]})(e)}function v0e(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"}}]})(e)}function y0e(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M128 64c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H293.3L160 416h64c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H90.7L224 96H160c-17.7 0-32-14.3-32-32z"}}]})(e)}function b0e(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"}}]})(e)}function JM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"}}]})(e)}function ZM(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"}}]})(e)}function ak(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"}}]})(e)}function x0e(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M192 32h64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H384l0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-352H288V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V352H192c-88.4 0-160-71.6-160-160s71.6-160 160-160z"}}]})(e)}function bb(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"}}]})(e)}function nm(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"}}]})(e)}function w0e(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 216C0 149.7 53.7 96 120 96h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V320 288 216zm256 0c0-66.3 53.7-120 120-120h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H320c-35.3 0-64-28.7-64-64V320 288 216z"}}]})(e)}function e$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"}}]})(e)}function t$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2H384c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312V456c0 22.1 17.9 40 40 40H472c22.1 0 40-17.9 40-40V312c0-22.1-17.9-40-40-40H328c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z"}}]})(e)}function n$(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M352 224H305.5c-45 0-81.5 36.5-81.5 81.5c0 22.3 10.3 34.3 19.2 40.5c6.8 4.7 12.8 12 12.8 20.3c0 9.8-8 17.8-17.8 17.8h-2.5c-2.4 0-4.8-.4-7.1-1.4C210.8 374.8 128 333.4 128 240c0-79.5 64.5-144 144-144h80V34.7C352 15.5 367.5 0 386.7 0c8.6 0 16.8 3.2 23.2 8.9L548.1 133.3c7.6 6.8 11.9 16.5 11.9 26.7s-4.3 19.9-11.9 26.7l-139 125.1c-5.9 5.3-13.5 8.2-21.4 8.2H384c-17.7 0-32-14.3-32-32V224zM80 96c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16H400c8.8 0 16-7.2 16-16V384c0-17.7 14.3-32 32-32s32 14.3 32 32v48c0 44.2-35.8 80-80 80H80c-44.2 0-80-35.8-80-80V112C0 67.8 35.8 32 80 32h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H80z"}}]})(e)}function lk(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M307 34.8c-11.5 5.1-19 16.6-19 29.2v64H176C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96h96v64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"}}]})(e)}function S0e(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M161.3 144c3.2-17.2 14-30.1 33.7-38.6c21.1-9 51.8-12.3 88.6-6.5c11.9 1.9 48.8 9.1 60.1 12c17.1 4.5 34.6-5.6 39.2-22.7s-5.6-34.6-22.7-39.2c-14.3-3.8-53.6-11.4-66.6-13.4c-44.7-7-88.3-4.2-123.7 10.9c-36.5 15.6-64.4 44.8-71.8 87.3c-.1 .6-.2 1.1-.2 1.7c-2.8 23.9 .5 45.6 10.1 64.6c4.5 9 10.2 16.9 16.7 23.9H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H270.1c-.1 0-.3-.1-.4-.1l-1.1-.3c-36-10.8-65.2-19.6-85.2-33.1c-9.3-6.3-15-12.6-18.2-19.1c-3.1-6.1-5.2-14.6-3.8-27.4zM348.9 337.2c2.7 6.5 4.4 15.8 1.9 30.1c-3 17.6-13.8 30.8-33.9 39.4c-21.1 9-51.7 12.3-88.5 6.5c-18-2.9-49.1-13.5-74.4-22.1c-5.6-1.9-11-3.7-15.9-5.4c-16.8-5.6-34.9 3.5-40.5 20.3s3.5 34.9 20.3 40.5c3.6 1.2 7.9 2.7 12.7 4.3l0 0 0 0c24.9 8.5 63.6 21.7 87.6 25.6l0 0 .2 0c44.7 7 88.3 4.2 123.7-10.9c36.5-15.6 64.4-44.8 71.8-87.3c3.6-21 2.7-40.4-3.1-58.1H335.1c7 5.6 11.4 11.2 13.9 17.2z"}}]})(e)}function r$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"}}]})(e)}function o$(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"}}]})(e)}function ck(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"}}]})(e)}function uk(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"}}]})(e)}function xb(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"}}]})(e)}function i$(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"}}]})(e)}const Fe={agentSettings:"/app/agent",themeSettings:"/app/theme",serverSettings:"/app/server",new:"/app/new",shortcuts:"/app/shortcuts",search:"/app/search",share:"/app/share",show:"/app/show",token:"/app/token",data:"/app/data",edit:"/app/edit",about:"/app/about",import:"/app/import",history:"/app/history",allVersions:"/all-versions",sandbox:"/sandbox",fetchBookmark:"/fetch-bookmark",pruneTests:"/prunetests"};function ka(e,t){const n=new URLSearchParams(t);return`${e}?${n}`}function lt(e,t={}){if(e===ut)return"#";const n=new URL(e);return window.location.origin===n.origin?n.pathname+n.search:ka(Fe.show,{subject:e,...t})}function N3(e,t){return ka(Fe.search,{query:e,...t?{queryscope:t}:{}})}function ma(e){const[t,n]=RN(),r=i=>{i===void 0?t.delete(e):t.set(e,i),n(t)},o=t.get(e);return o===null?[void 0,r]:[o,r]}function dk(){return ma("query")}const l0={classSubject:"classSubject",parent:"parent",newSubject:"newSubject"};function pk(e,t,n){const r=new URL(location.origin);return r.pathname=Fe.new,r.searchParams.append(l0.classSubject,e),t&&r.searchParams.append(l0.parent,t),n&&r.searchParams.append(l0.newSubject,n),Fe.new+r.search}function fd(e){return ka(Fe.edit,{subject:e})}function s$(e){return ka(Fe.share,{subject:e})}function fk(e){return ka(Fe.data,{subject:e})}function a$(e){return window.location.origin+e}function l$(e){return ka(Fe.import,{subject:e})}function c$(e){return ka(Fe.history,{subject:e})}function u$(e,t){const n=new URL(t);return n.pathname=Fe.allVersions,n.searchParams.append("subject",e),lt(n.toString())}function Yt(...e){const t=n=>e.map(r=>`${r} ${n.animation.duration} ease-in-out`).join(",");return Kt(["transition:",";"],({theme:n})=>t(n))}const hk=()=>a.jsx(d$,{viewBox:"0 0 50 50",children:a.jsx("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"})}),d$=C.svg.withConfig({displayName:"Spinner__StyledSpinner",componentId:"sc-ce6514f4-0"})(["animation:rotate 2s linear infinite;width:50px;height:50px;max-width:100%;max-height:100%;& .path{stroke:",";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"],e=>e.theme.colors.main),p$=({clean:e,icon:t,subtle:n,alert:r})=>{let o=rc;return n&&(o=f$),r&&(o=h$),t&&(o=m$),e&&(o=rm),o},oe=f.forwardRef(({children:e,loading:t,...n},r)=>{const{icon:o,...i}=n,s=p$(n);return a.jsx(s,{type:"button",...i,ref:r,children:t?a.jsx(hk,{}):e})});oe.displayName="Button";const rm=C.button.withConfig({displayName:"Button__ButtonClean",componentId:"sc-76c9c4fd-0"})(["cursor:pointer;border:none;font-size:inherit;padding:0;color:inherit;margin:0;appearance:none;background-color:initial;-webkit-tap-highlight-color:transparent;user-select:none;"]),mk=C(rm).withConfig({displayName:"Button__ButtonBase",componentId:"sc-76c9c4fd-1"})(["height:2rem;display:flex;align-items:center;gap:1ch;justify-content:center;background-color:",";color:",";white-space:nowrap;margin-bottom:",";",";@media (hover:hover) and (pointer:fine){&:hover:not([disabled]),&:focus-visible:not([disabled]){border-color:",";outline:0;}}&:active:not([disabled]){transition:all 0s;}&:disabled{cursor:default;display:auto;opacity:0.5;}"],e=>e.theme.colors.main,e=>e.theme.colors.bg,e=>e.gutter?`${e.theme.margin}rem`:"",Yt("background-color","box-shadow","transform","color","border-color","opacity"),e=>e.theme.colors.main),c0=C(rm).withConfig({displayName:"Button__ButtonBar",componentId:"sc-76c9c4fd-2"})(["padding-right:0.5rem;padding-left:0.5rem;color:",";background-color:",";height:100%;display:flex;align-items:center;&:hover:not([disabled]),&:focus-visible:not([disabled]){background-color:",";}&:active:not([disabled]){background-color:",";}padding-left:",";padding-right:",";"],e=>e.theme.colors.main,e=>e.selected?e.theme.colors.bg2:e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.leftPadding?"1.2rem":"",e=>e.rightPadding?"1.2rem":""),rc=C(mk).withConfig({displayName:"Button__ButtonDefault",componentId:"sc-76c9c4fd-3"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";--button-text-color:",";--button-text-color-hover:",";border-radius:",";padding-block:0.4rem;padding-inline:","rem;display:inline-flex;background-color:var(--button-bg-color);color:var(--button-text-color);border:solid 1px var(--button-border-color);&:focus-visible:not([disabled]),&:hover:not([disabled]){box-shadow:",";background-color:var(--button-bg-color-hover);color:var(--button-text-color-hover);border-color:var(--button-border-color-hover);}&:active:not([disabled]){box-shadow:inset ",";}"],e=>e.theme.colors.main,e=>e.theme.colors.mainLight,e=>e.theme.colors.main,e=>e.theme.colors.mainLight,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.boxShadowSoft,e=>e.theme.boxShadowIntense),f$=C(rc).withConfig({displayName:"Button__ButtonSubtle",componentId:"sc-76c9c4fd-4"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";--button-text-color:",";--button-text-color-hover:",";box-shadow:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.darkMode?"none":e.theme.boxShadow),h$=C(rc).withConfig({displayName:"Button__ButtonAlert",componentId:"sc-76c9c4fd-5"})(["--button-bg-color:",";--button-bg-color-hover:",";--button-border-color:",";--button-border-color-hover:",";"],e=>e.theme.colors.alert,e=>e.theme.colors.alertLight,e=>e.theme.colors.alert,e=>e.theme.colors.alertLight),m$=C(rc).withConfig({displayName:"Button__ButtonIcon",componentId:"sc-76c9c4fd-6"})(["box-shadow:none;border-color:transparent;border-radius:999px;font-size:0.8rem;width:1.3rem;height:1.3rem;display:inline-flex;margin:0;padding:0;&:active:not([disabled]){box-shadow:",";}&:active:not([disabled]){box-shadow:inset ",";}"],e=>e.theme.boxShadowIntense,e=>e.theme.boxShadowIntense),Js=C(mk).withConfig({displayName:"Button__ButtonInput",componentId:"sc-76c9c4fd-7"})(["padding:0 0.5rem;background-color:",";color:",";flex:0;height:auto;border-left:solid 1px ",";border-radius:0;@media (hover:hover) and (pointer:fine){&:hover:not([disabled]),&:active:not([disabled]),&:focus-visible:not([disabled]){color:",";background-color:",";}}&:last-child{border-radius:",";border-top-left-radius:0;border-bottom-left-radius:0;}"],e=>e.theme.colors.bg,e=>e.theme.colors.textLight,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.bg1,e=>e.theme.radius);function cr(e){const[t,n]=ma("subject"),r=kt(),{pathname:o,search:i}=Sa();function s(l){const c=new URL(l);window.location.origin===c.origin?r(c.pathname+c.search):n(l)}if(t===void 0){if(o.startsWith("/app/"))return[void 0,s];const l=o==="/"?"":o;return[window.location.origin+l+i,s]}return[t,s]}function Xf(e){const[t,n]=cr(),[r,o]=f.useState(void 0);f.useEffect(()=>{o(t?new URL(t).searchParams:void 0)},[t]);function i(l){if(!r||!t)return;l===void 0?r.delete(e):r.set(e,l);const c=new URL(t);l&&c.searchParams.set(e,l),(l===void 0||l===""||l===null)&&c.searchParams.delete(e),n(c.href)}let s=r==null?void 0:r.get(e);return s==null&&(s=void 0),[s,i]}const ga=C("span").withConfig({displayName:"SideBarItem",componentId:"sc-c5a5e7ae-0"})(["display:flex;min-height:","rem;align-items:center;justify-content:flex-start;color:",";padding:0.2rem;padding-left:1rem;text-overflow:ellipsis;text-decoration:none;border-radius:",";&:hover,&:focus{background-color:",";color:",";}&:active{opacity:0.5;}svg{font-size:0.8rem;}"],e=>e.theme.margin*.5+1,e=>e.disabled?e.theme.colors.main:e.theme.colors.textLight,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.disabled?e.theme.colors.main:e.theme.colors.text);function g$(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function v$(e){return G({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function y$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z"}}]})(e)}function b$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"}}]})(e)}function om(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function gk(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function x$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function wb(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M223.99908,224a32,32,0,1,0,32.00782,32A32.06431,32.06431,0,0,0,223.99908,224Zm214.172-96c-10.877-19.5-40.50979-50.75-116.27544-41.875C300.39168,34.875,267.63386,0,223.99908,0s-76.39066,34.875-97.89653,86.125C50.3369,77.375,20.706,108.5,9.82907,128-6.54984,157.375-5.17484,201.125,34.958,256-5.17484,310.875-6.54984,354.625,9.82907,384c29.13087,52.375,101.64652,43.625,116.27348,41.875C147.60842,477.125,180.36429,512,223.99908,512s76.3926-34.875,97.89652-86.125c14.62891,1.75,87.14456,10.5,116.27544-41.875C454.55,354.625,453.175,310.875,413.04017,256,453.175,201.125,454.55,157.375,438.171,128ZM63.33886,352c-4-7.25-.125-24.75,15.00391-48.25,6.87695,6.5,14.12891,12.875,21.88087,19.125,1.625,13.75,4,27.125,6.75,40.125C82.34472,363.875,67.09081,358.625,63.33886,352Zm36.88478-162.875c-7.752,6.25-15.00392,12.625-21.88087,19.125-15.12891-23.5-19.00392-41-15.00391-48.25,3.377-6.125,16.37891-11.5,37.88478-11.5,1.75,0,3.875.375,5.75.375C104.09864,162.25,101.84864,175.625,100.22364,189.125ZM223.99908,64c9.50195,0,22.25586,13.5,33.88282,37.25-11.252,3.75-22.50391,8-33.88282,12.875-11.377-4.875-22.62892-9.125-33.88283-12.875C201.74516,77.5,214.49712,64,223.99908,64Zm0,384c-9.502,0-22.25392-13.5-33.88283-37.25,11.25391-3.75,22.50587-8,33.88283-12.875C235.378,402.75,246.62994,407,257.8819,410.75,246.25494,434.5,233.501,448,223.99908,448Zm0-112a80,80,0,1,1,80-80A80.00023,80.00023,0,0,1,223.99908,336ZM384.6593,352c-3.625,6.625-19.00392,11.875-43.63479,11,2.752-13,5.127-26.375,6.752-40.125,7.75195-6.25,15.00391-12.625,21.87891-19.125C384.7843,327.25,388.6593,344.75,384.6593,352ZM369.65538,208.25c-6.875-6.5-14.127-12.875-21.87891-19.125-1.625-13.5-3.875-26.875-6.752-40.25,1.875,0,4.002-.375,5.752-.375,21.50391,0,34.50782,5.375,37.88283,11.5C388.6593,167.25,384.7843,184.75,369.65538,208.25Z"}}]})(e)}function w$(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"}}]})(e)}function S$(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"}}]})(e)}function vk(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"}}]})(e)}function Sb(e){return G({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"}}]})(e)}function C$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function j$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM273 369.9l135.5-135.5c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L256 285.1 154.4 183.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L239 369.9c9.4 9.4 24.6 9.4 34 0z"}}]})(e)}function k$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"}}]})(e)}function O3(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}}]})(e)}function Cb(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]})(e)}function jb(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function kb(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"}}]})(e)}function yk(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function oc(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"}}]})(e)}function bk(e){return G({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"}}]})(e)}function Eb(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"}}]})(e)}function E$(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M212.686 315.314L120 408l32.922 31.029c15.12 15.12 4.412 40.971-16.97 40.971h-112C10.697 480 0 469.255 0 456V344c0-21.382 25.803-32.09 40.922-16.971L72 360l92.686-92.686c6.248-6.248 16.379-6.248 22.627 0l25.373 25.373c6.249 6.248 6.249 16.378 0 22.627zm22.628-118.628L328 104l-32.922-31.029C279.958 57.851 290.666 32 312.048 32h112C437.303 32 448 42.745 448 56v112c0 21.382-25.803 32.09-40.922 16.971L376 152l-92.686 92.686c-6.248 6.248-16.379 6.248-22.627 0l-25.373-25.373c-6.249-6.248-6.249-16.378 0-22.627z"}}]})(e)}function _b(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"}}]})(e)}function L3(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function Bu(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function _$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function I$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zM128.4 336c-17.9 0-32.4 12.1-32.4 27 0 15 14.6 27 32.5 27s32.4-12.1 32.4-27-14.6-27-32.5-27zM224 136V0h-63.6v32h-32V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zM95.9 32h32v32h-32zm32.3 384c-33.2 0-58-30.4-51.4-62.9L96.4 256v-32h32v-32h-32v-32h32v-32h-32V96h32V64h32v32h-32v32h32v32h-32v32h32v32h-32v32h22.1c5.7 0 10.7 4.1 11.8 9.7l17.3 87.7c6.4 32.4-18.4 62.6-51.4 62.6z"}}]})(e)}function R$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-64 268c0 10.7-12.9 16-20.5 8.5L104 376H76c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h28l35.5-36.5c7.6-7.6 20.5-2.2 20.5 8.5v136zm33.2-47.6c9.1-9.3 9.1-24.1 0-33.4-22.1-22.8 12.2-56.2 34.4-33.5 27.2 27.9 27.2 72.4 0 100.4-21.8 22.3-56.9-10.4-34.4-33.5zm86-117.1c54.4 55.9 54.4 144.8 0 200.8-21.8 22.4-57-10.3-34.4-33.5 36.2-37.2 36.3-96.5 0-133.8-22.1-22.8 12.3-56.3 34.4-33.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function A$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-96 144c0 4.42-3.58 8-8 8h-8c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h8c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-8c-26.51 0-48-21.49-48-48v-32c0-26.51 21.49-48 48-48h8c4.42 0 8 3.58 8 8v16zm44.27 104H160c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h12.27c5.95 0 10.41-3.5 10.41-6.62 0-1.3-.75-2.66-2.12-3.84l-21.89-18.77c-8.47-7.22-13.33-17.48-13.33-28.14 0-21.3 19.02-38.62 42.41-38.62H200c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-12.27c-5.95 0-10.41 3.5-10.41 6.62 0 1.3.75 2.66 2.12 3.84l21.89 18.77c8.47 7.22 13.33 17.48 13.33 28.14.01 21.29-19 38.62-42.39 38.62zM256 264v20.8c0 20.27 5.7 40.17 16 56.88 10.3-16.7 16-36.61 16-56.88V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v20.8c0 35.48-12.88 68.89-36.28 94.09-3.02 3.25-7.27 5.11-11.72 5.11s-8.7-1.86-11.72-5.11c-23.4-25.2-36.28-58.61-36.28-94.09V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8zm121-159L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"}}]})(e)}function P$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm60.1 106.5L224 336l60.1 93.5c5.1 8-.6 18.5-10.1 18.5h-34.9c-4.4 0-8.5-2.4-10.6-6.3C208.9 405.5 192 373 192 373c-6.4 14.8-10 20-36.6 68.8-2.1 3.9-6.1 6.3-10.5 6.3H110c-9.5 0-15.2-10.5-10.1-18.5l60.3-93.5-60.3-93.5c-5.2-8 .6-18.5 10.1-18.5h34.8c4.4 0 8.5 2.4 10.6 6.3 26.1 48.8 20 33.6 36.6 68.5 0 0 6.1-11.7 36.6-68.5 2.1-3.9 6.2-6.3 10.6-6.3H274c9.5-.1 15.2 10.4 10.1 18.4zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function T$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"}}]})(e)}function D$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"}}]})(e)}function N$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 0 1 384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v38.059l55.029-55.013c15.011-15.01 40.971-4.491 40.971 16.97z"}}]})(e)}function O$(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm57.1 120H305c7.7 0 13.4 7.1 11.7 14.7l-38 168c-1.2 5.5-6.1 9.3-11.7 9.3h-38c-5.5 0-10.3-3.8-11.6-9.1-25.8-103.5-20.8-81.2-25.6-110.5h-.5c-1.1 14.3-2.4 17.4-25.6 110.5-1.3 5.3-6.1 9.1-11.6 9.1H117c-5.6 0-10.5-3.9-11.7-9.4l-37.8-168c-1.7-7.5 4-14.6 11.7-14.6h24.5c5.7 0 10.7 4 11.8 9.7 15.6 78 20.1 109.5 21 122.2 1.6-10.2 7.3-32.7 29.4-122.7 1.3-5.4 6.1-9.1 11.7-9.1h29.1c5.6 0 10.4 3.8 11.7 9.2 24 100.4 28.8 124 29.6 129.4-.2-11.2-2.6-17.8 21.6-129.2 1-5.6 5.9-9.5 11.5-9.5zM384 121.9v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function xk(e){return G({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"}}]})(e)}function L$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"}}]})(e)}function z$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"}}]})(e)}function F$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M96 32H32C14.33 32 0 46.33 0 64v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160H32c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zM288 32h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32zm0 160h-64c-17.67 0-32 14.33-32 32v64c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32v-64c0-17.67-14.33-32-32-32z"}}]})(e)}function im(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"}}]})(e)}function M$(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M576 304v96c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48v-96c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48zm-48-80a79.557 79.557 0 0 1 30.777 6.165L462.25 85.374A48.003 48.003 0 0 0 422.311 64H153.689a48 48 0 0 0-39.938 21.374L17.223 230.165A79.557 79.557 0 0 1 48 224h480zm-48 96c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm-96 0c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"}}]})(e)}function sm(e){return G({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"}}]})(e)}function $$(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function B$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"}}]})(e)}function H$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function U$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"}}]})(e)}function W$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"}}]})(e)}function ur(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function V$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"}}]})(e)}function am(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(e)}function u0(e){return G({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M216 288h-48c-8.84 0-16 7.16-16 16v192c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V304c0-8.84-7.16-16-16-16zM88 384H40c-8.84 0-16 7.16-16 16v96c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16v-96c0-8.84-7.16-16-16-16zm256-192h-48c-8.84 0-16 7.16-16 16v288c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V208c0-8.84-7.16-16-16-16zm128-96h-48c-8.84 0-16 7.16-16 16v384c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V112c0-8.84-7.16-16-16-16zM600 0h-48c-8.84 0-16 7.16-16 16v480c0 8.84 7.16 16 16 16h48c8.84 0 16-7.16 16-16V16c0-8.84-7.16-16-16-16z"}}]})(e)}function q$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function G$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41z"}}]})(e)}function K$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M279 224H41c-21.4 0-32.1-25.9-17-41L143 64c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"}}]})(e)}function Y$(e){return G({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"}}]})(e)}function X$(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"}}]})(e)}function wk(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"}}]})(e)}function Q$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"}}]})(e)}function J$(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M149.333 56v80c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24h101.333c13.255 0 24 10.745 24 24zm181.334 240v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm32-240v80c0 13.255 10.745 24 24 24H488c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24zm-32 80V56c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.256 0 24.001-10.745 24.001-24zm-205.334 56H24c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24zM0 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm386.667-56H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zm0 160H488c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H386.667c-13.255 0-24 10.745-24 24v80c0 13.255 10.745 24 24 24zM181.333 376v80c0 13.255 10.745 24 24 24h101.333c13.255 0 24-10.745 24-24v-80c0-13.255-10.745-24-24-24H205.333c-13.255 0-24 10.745-24 24z"}}]})(e)}function ri(e){return G({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"}}]})(e)}function lm(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function Sk(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function Ck(e){return G({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function z3(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"}}]})(e)}function F3(e){return G({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"}}]})(e)}function Z$(e){return G({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"}}]})(e)}const jk=Kt(["color:",";font-family:monospace;line-height:1.2rem;"],e=>e.theme.colors.alert),yt=C.span.withConfig({displayName:"ErrorLook",componentId:"sc-bd04e840-0"})(["",""],jk);function Hu({error:e,showTrace:t}){return a.jsxs(eB,{children:[a.jsxs(nB,{children:[a.jsx(Eb,{}),"Something went wrong"]}),a.jsxs(tB,{children:[a.jsx("code",{children:e.message}),t&&a.jsxs(a.Fragment,{children:[a.jsx("br",{}),a.jsx("br",{}),a.jsx("span",{children:"Stack trace:"}),a.jsx("br",{}),a.jsx("code",{children:e.stack})]})]})]})}const eB=C.div.withConfig({displayName:"ErrorLook__ErrorLookBig",componentId:"sc-bd04e840-1"})(["color:",";font-size:1rem;padding:","rem;border-radius:",";border:1px solid ",";background-color:",";"],e=>e.theme.colors.alert,e=>e.theme.margin,e=>e.theme.radius,e=>Tr(.2,e.theme.colors.alert),e=>e.theme.colors.bg1),tB=C.pre.withConfig({displayName:"ErrorLook__Pre",componentId:"sc-bd04e840-2"})(["white-space:pre-wrap;border-radius:",";padding:","rem;background-color:",";font-size:0.9rem;"],e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.colors.bg),nB=C.p.withConfig({displayName:"ErrorLook__BiggerText",componentId:"sc-bd04e840-3"})(["font-size:1.3rem;display:flex;align-items:center;gap:1ch;"]);function kk(){return typeof window<"u"&&window.__TAURI_METADATA__!==void 0}const rB=e=>new Promise(t=>setTimeout(t,e));function uo(){const e=kt(),{viewTransitionsDisabled:t}=Le();return f.useCallback(r=>{if(t||!document.startViewTransition){e(r);return}document.startViewTransition(async()=>new Promise(o=>{yn.flushSync(()=>{e(r),rB(1).then(()=>{o()})})}))},[e])}const Me=f.forwardRef(({children:e,clean:t,subject:n,path:r,href:o,untabbable:i,className:s,...l},c)=>{const u=uo();if(!n&&!o&&!r)return a.jsx(yt,{children:"No `subject`, `path` or `href` passed to this AtomicLink."});let d;try{d=n?window.location.toString()===lt(n):!1}catch{return a.jsx("span",{children:n})}const p=m=>{if(!o){if(m.preventDefault(),r){u(r);return}if(n){if(d)return;u(lt(n))}}},h=o||n||a$(r);return a.jsxs(oB,{clean:t,className:s,about:n,onClick:p,href:h,disabled:d,tabIndex:d||i?-1:0,target:kk()&&!o?"":"_blank",...l,ref:c,children:[e,o&&!t&&a.jsx(_b,{})]})});Me.displayName="AtomicLink";const oB=C.a.withConfig({displayName:"AtomicLink__LinkView",componentId:"sc-70fcb46d-0"})(["color:",";text-decoration:none;cursor:pointer;pointer-events:",";&:hover{color:",";text-decoration:",";}&:active{color:",";}"],e=>e.disabled?e.theme.colors.text:e.theme.colors.main,e=>e.disabled?"none":"inherit",e=>e.theme.colors.mainLight,e=>e.clean?"none":"underline",e=>e.theme.colors.mainDark);function M3(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}const Bv=()=>f_*1.5;function cm({open:e,className:t,children:n}){const[r,o]=f.useState(e),[i,s]=f.useState(!1);return f.useEffect(()=>e?(o(!0),M3(()=>{s(!0)},Bv())):(s(!1),M3(()=>{o(!1)},Bv())),[e]),a.jsx(iB,{open:e,className:t,children:a.jsx(sB,{$overflow:i,children:r&&n})})}const iB=C.div.withConfig({displayName:"Collapse__GridCollapser",componentId:"sc-b273c88d-0"})(["display:grid;grid-template-rows:",";grid-template-columns:100%;transition:grid-template-rows ","ms ease-in-out;@media (prefers-reduced-motion){transition:unset;}"],({open:e})=>e?"1fr":"0fr",()=>Bv()),sB=C.div.withConfig({displayName:"Collapse__InnerWrapper",componentId:"sc-b273c88d-1"})(["width:100%;overflow:",";"],({$overflow:e})=>e?"visible":"hidden");function oa({open:e=!1,initialState:t,children:n,title:r,disabled:o,noIndent:i,onStateToggle:s}){const[l,c]=f.useState(t);f.useEffect(()=>{c(e)},[e]),f.useEffect(()=>{c(t)},[t]);const u=f.useCallback(()=>{c(d=>(s==null||s(!d),!d))},[]);return a.jsxs(a.Fragment,{children:[a.jsxs(aB,{children:[a.jsx(uB,{type:"button",onClick:u,turn:!!l,hide:!!o,"aria-label":l?"collapse":"expand",children:a.jsx(cB,{})}),a.jsx(lB,{children:r})]}),a.jsx(dB,{open:!!l,noIndent:i,children:n})]})}const aB=C.div.withConfig({displayName:"Details__SummaryWrapper",componentId:"sc-f69bf2d7-0"})(["max-width:100%;display:flex;align-items:center;gap:0.4rem;"]),lB=C.div.withConfig({displayName:"Details__TitleWrapper",componentId:"sc-f69bf2d7-1"})(["flex:1;width:1px;*{user-select:none;}"]),cB=C(Sb).withConfig({displayName:"Details__Icon",componentId:"sc-f69bf2d7-2"})(["color:",";margin-top:auto;cursor:pointer;*{cursor:pointer;}font-size:1.2rem;"],({theme:e})=>e.colors.main),uB=C.button.withConfig({displayName:"Details__IconButton",componentId:"sc-f69bf2d7-3"})(["--speed:",";aspect-ratio:1/1;display:flex;align-items:center;padding:0.2rem;visibility:",";transition:transform var(--speed) ease-in-out,background-color var(--speed) ease;transform:rotate(",");background-color:transparent;border:none;border-radius:50%;&:hover,&:focus{background-color:",";}"],e=>e.theme.animation.duration,e=>e.hide?"hidden":"visible",e=>e.turn?"90deg":"0deg",e=>e.theme.colors.bg1),dB=C(cm).withConfig({displayName:"Details__StyledCollapse",componentId:"sc-f69bf2d7-4"})(["overflow-x:hidden;margin-left:",";"],e=>(e.noIndent?0:e.theme.margin)+"rem"),Ek=ni(["from{background-color:var(--loader-bg-from);}to{background-color:var(--loader-bg-to);}"]),_k=C.span.withConfig({displayName:"Loader__LoaderInline",componentId:"sc-5a4734c8-0"})(["--loader-bg-from:",";--loader-bg-to:",";background-color:",";border-radius:",";animation:"," 0.8s infinite ease-in-out alternate;width:100%;height:1rem;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.radius,Ek),pB=C.div.withConfig({displayName:"Loader__LoaderBlock",componentId:"sc-5a4734c8-1"})(["--loader-bg-from:",";--loader-bg-to:",";background-color:",";border-radius:",";animation:"," 0.8s infinite ease-in-out alternate;width:100%;height:100%;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.theme.radius,Ek);function fB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const um=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ic(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ib(e){return"nodeType"in e}function dr(e){var t,n;return e?ic(e)?e:Ib(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Rb(e){const{Document:t}=dr(e);return e instanceof t}function hd(e){return ic(e)?!1:e instanceof dr(e).HTMLElement}function Ik(e){return e instanceof dr(e).SVGElement}function sc(e){return e?ic(e)?e.document:Ib(e)?Rb(e)?e:hd(e)||Ik(e)?e.ownerDocument:document:document:document}const ao=um?f.useLayoutEffect:f.useEffect;function dm(e){const t=f.useRef(e);return ao(()=>{t.current=e}),f.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function hB(){const e=f.useRef(null),t=f.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=f.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Uu(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return ao(()=>{n.current!==e&&(n.current=e)},t),n}function md(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Qf(e){const t=dm(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Jf(e){const t=f.useRef();return f.useEffect(()=>{t.current=e},[e]),t.current}let d0={};function gd(e,t){return f.useMemo(()=>{if(t)return t;const n=d0[e]==null?0:d0[e]+1;return d0[e]=n,e+"-"+n},[e,t])}function Rk(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const l=Object.entries(s);for(const[c,u]of l){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const bl=Rk(1),Wu=Rk(-1);function mB(e){return"clientX"in e&&"clientY"in e}function pm(e){if(!e)return!1;const{KeyboardEvent:t}=dr(e.target);return t&&e instanceof t}function gB(e){if(!e)return!1;const{TouchEvent:t}=dr(e.target);return t&&e instanceof t}function Zf(e){if(gB(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return mB(e)?{x:e.clientX,y:e.clientY}:null}const Ss=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ss.Translate.toString(e),Ss.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),$3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function vB(e){return e.matches($3)?e:e.querySelector($3)}const yB={display:"none"};function bB(e){let{id:t,value:n}=e;return ce.createElement("div",{id:t,style:yB},n)}function xB(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ce.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function wB(){const[e,t]=f.useState("");return{announce:f.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ak=f.createContext(null);function Ab(e){const t=f.useContext(Ak);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function SB(){const[e]=f.useState(()=>new Set),t=f.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[f.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,i)})},[e]),t]}const CB={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},jB={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function kB(e){let{announcements:t=jB,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=CB}=e;const{announce:i,announcement:s}=wB(),l=gd("DndLiveRegion"),[c,u]=f.useState(!1);if(f.useEffect(()=>{u(!0)},[]),Ab(f.useMemo(()=>({onDragStart(p){let{active:h}=p;i(t.onDragStart({active:h}))},onDragMove(p){let{active:h,over:m}=p;t.onDragMove&&i(t.onDragMove({active:h,over:m}))},onDragOver(p){let{active:h,over:m}=p;i(t.onDragOver({active:h,over:m}))},onDragEnd(p){let{active:h,over:m}=p;i(t.onDragEnd({active:h,over:m}))},onDragCancel(p){let{active:h,over:m}=p;i(t.onDragCancel({active:h,over:m}))}}),[i,t])),!c)return null;const d=ce.createElement(ce.Fragment,null,ce.createElement(bB,{id:r,value:o.draggable}),ce.createElement(xB,{id:l,announcement:s}));return n?yn.createPortal(d,n):d}var on;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(on||(on={}));function eh(){}function vs(e,t){return f.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Pb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Ao=Object.freeze({x:0,y:0});function Pk(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function EB(e,t){const n=Zf(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Tk(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function _B(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function B3(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Dk(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function H3(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const IB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=H3(t,t.left,t.top),i=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const u=Pk(H3(c),o);i.push({id:l,data:{droppableContainer:s,value:u}})}}return i.sort(Tk)},Nk=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=B3(t),i=[];for(const s of r){const{id:l}=s,c=n.get(l);if(c){const u=B3(c),d=o.reduce((h,m,v)=>h+Pk(u[v],m),0),p=Number((d/4).toFixed(4));i.push({id:l,data:{droppableContainer:s,value:p}})}}return i.sort(Tk)};function RB(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,l=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=s*l,p=d/(c+u-d);return Number(p.toFixed(4))}return 0}const AB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=RB(l,t);c>0&&o.push({id:s,data:{droppableContainer:i,value:c}})}}return o.sort(_B)};function PB(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ok(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ao}function TB(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}const DB=TB(1);function Lk(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function NB(e,t,n){const r=Lk(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:l}=r,c=e.left-s-(1-o)*parseFloat(n),u=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,p=i?e.height/i:e.height;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c}}const OB={ignoreTransform:!1};function ac(e,t){t===void 0&&(t=OB);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=dr(e).getComputedStyle(e);u&&(n=NB(n,u,d))}const{top:r,left:o,width:i,height:s,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:s,bottom:l,right:c}}function U3(e){return ac(e,{ignoreTransform:!0})}function LB(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function zB(e,t){return t===void 0&&(t=dr(e).getComputedStyle(e)),t.position==="fixed"}function FB(e,t){t===void 0&&(t=dr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function fm(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Rb(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!hd(o)||Ik(o)||n.includes(o))return n;const i=dr(e).getComputedStyle(o);return o!==e&&FB(o,i)&&n.push(o),zB(o,i)?n:r(o.parentNode)}return e?r(e):n}function zk(e){const[t]=fm(e,1);return t??null}function p0(e){return!um||!e?null:ic(e)?e:Ib(e)?Rb(e)||e===sc(e).scrollingElement?window:hd(e)?e:null:null}function Fk(e){return ic(e)?e.scrollX:e.scrollLeft}function Mk(e){return ic(e)?e.scrollY:e.scrollTop}function Hv(e){return{x:Fk(e),y:Mk(e)}}var gn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(gn||(gn={}));function $k(e){return!um||!e?!1:e===document.scrollingElement}function Bk(e){const t={x:0,y:0},n=$k(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:l,maxScroll:r,minScroll:t}}const MB={x:.2,y:.2};function $B(e,t,n,r,o){let{top:i,left:s,right:l,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=MB);const{isTop:u,isBottom:d,isLeft:p,isRight:h}=Bk(e),m={x:0,y:0},v={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+g.height?(m.y=gn.Backward,v.y=r*Math.abs((t.top+g.height-i)/g.height)):!d&&c>=t.bottom-g.height&&(m.y=gn.Forward,v.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!h&&l>=t.right-g.width?(m.x=gn.Forward,v.x=r*Math.abs((t.right-g.width-l)/g.width)):!p&&s<=t.left+g.width&&(m.x=gn.Backward,v.x=r*Math.abs((t.left+g.width-s)/g.width)),{direction:m,speed:v}}function BB(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Hk(e){return e.reduce((t,n)=>bl(t,Hv(n)),Ao)}function HB(e){return e.reduce((t,n)=>t+Fk(n),0)}function UB(e){return e.reduce((t,n)=>t+Mk(n),0)}function Uk(e,t){if(t===void 0&&(t=ac),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);zk(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const WB=[["x",["left","right"],HB],["y",["top","bottom"],UB]];class Tb{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=fm(n),o=Hk(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,l]of WB)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class uu{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function VB(e){const{EventTarget:t}=dr(e);return e instanceof t?e:sc(e)}function f0(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Qr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Qr||(Qr={}));function W3(e){e.preventDefault()}function qB(e){e.stopPropagation()}var Xe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Xe||(Xe={}));const Wk={start:[Xe.Space,Xe.Enter],cancel:[Xe.Esc],end:[Xe.Space,Xe.Enter]},GB=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Xe.Right:return{...n,x:n.x+25};case Xe.Left:return{...n,x:n.x-25};case Xe.Down:return{...n,y:n.y+25};case Xe.Up:return{...n,y:n.y-25}}};class vd{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new uu(sc(n)),this.windowListeners=new uu(dr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Qr.Resize,this.handleCancel),this.windowListeners.add(Qr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Qr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Uk(r),n(Ao)}handleKeyDown(t){if(pm(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=Wk,coordinateGetter:s=GB,scrollBehavior:l="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:Ao;this.referenceCoordinates||(this.referenceCoordinates=d);const p=s(t,{active:n,context:r.current,currentCoordinates:d});if(p){const h=Wu(p,d),m={x:0,y:0},{scrollableAncestors:v}=r.current;for(const g of v){const b=t.code,{isTop:y,isRight:x,isLeft:w,isBottom:S,maxScroll:k,minScroll:_}=Bk(g),I=BB(g),P={x:Math.min(b===Xe.Right?I.right-I.width/2:I.right,Math.max(b===Xe.Right?I.left:I.left+I.width/2,p.x)),y:Math.min(b===Xe.Down?I.bottom-I.height/2:I.bottom,Math.max(b===Xe.Down?I.top:I.top+I.height/2,p.y))},z=b===Xe.Right&&!x||b===Xe.Left&&!w,D=b===Xe.Down&&!S||b===Xe.Up&&!y;if(z&&P.x!==p.x){const F=g.scrollLeft+h.x,$=b===Xe.Right&&F<=k.x||b===Xe.Left&&F>=_.x;if($&&!h.y){g.scrollTo({left:F,behavior:l});return}$?m.x=g.scrollLeft-F:m.x=b===Xe.Right?g.scrollLeft-k.x:g.scrollLeft-_.x,m.x&&g.scrollBy({left:-m.x,behavior:l});break}else if(D&&P.y!==p.y){const F=g.scrollTop+h.y,$=b===Xe.Down&&F<=k.y||b===Xe.Up&&F>=_.y;if($&&!h.x){g.scrollTo({top:F,behavior:l});return}$?m.y=g.scrollTop-F:m.y=b===Xe.Down?g.scrollTop-k.y:g.scrollTop-_.y,m.y&&g.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(t,bl(Wu(p,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}vd.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Wk,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const l=i.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function V3(e){return!!(e&&"distance"in e)}function q3(e){return!!(e&&"delay"in e)}class Db{constructor(t,n,r){var o;r===void 0&&(r=VB(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=sc(s),this.documentListeners=new uu(this.document),this.listeners=new uu(r),this.windowListeners=new uu(dr(s)),this.initialCoordinates=(o=Zf(i))!=null?o:Ao,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Qr.Resize,this.handleCancel),this.windowListeners.add(Qr.DragStart,W3),this.windowListeners.add(Qr.VisibilityChange,this.handleCancel),this.windowListeners.add(Qr.ContextMenu,W3),this.documentListeners.add(Qr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(q3(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(V3(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Qr.Click,qB,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Qr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:l}}=i;if(!o)return;const c=(n=Zf(t))!=null?n:Ao,u=Wu(o,c);if(!r&&l){if(V3(l)){if(l.tolerance!=null&&f0(u,l.tolerance))return this.handleCancel();if(f0(u,l.distance))return this.handleStart()}return q3(l)&&f0(u,l.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Xe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const KB={move:{name:"pointermove"},end:{name:"pointerup"}};class Nb extends Db{constructor(t){const{event:n}=t,r=sc(n.target);super(t,KB,r)}}Nb.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const YB={move:{name:"mousemove"},end:{name:"mouseup"}};var Uv;(function(e){e[e.RightClick=2]="RightClick"})(Uv||(Uv={}));class Ob extends Db{constructor(t){super(t,YB,sc(t.event.target))}}Ob.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Uv.RightClick?!1:(r==null||r({event:n}),!0)}}];const h0={move:{name:"touchmove"},end:{name:"touchend"}};class Lb extends Db{constructor(t){super(t,h0)}static setup(){return window.addEventListener(h0.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(h0.move.name,t)};function t(){}}}Lb.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var du;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(du||(du={}));var th;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(th||(th={}));function XB(e){let{acceleration:t,activator:n=du.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:l=th.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:p,threshold:h}=e;const m=JB({delta:p,disabled:!i}),[v,g]=hB(),b=f.useRef({x:0,y:0}),y=f.useRef({x:0,y:0}),x=f.useMemo(()=>{switch(n){case du.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case du.DraggableRect:return o}},[n,o,c]),w=f.useRef(null),S=f.useCallback(()=>{const _=w.current;if(!_)return;const I=b.current.x*y.current.x,P=b.current.y*y.current.y;_.scrollBy(I,P)},[]),k=f.useMemo(()=>l===th.TreeOrder?[...u].reverse():u,[l,u]);f.useEffect(()=>{if(!i||!u.length||!x){g();return}for(const _ of k){if((r==null?void 0:r(_))===!1)continue;const I=u.indexOf(_),P=d[I];if(!P)continue;const{direction:z,speed:D}=$B(_,P,x,t,h);for(const F of["x","y"])m[F][z[F]]||(D[F]=0,z[F]=0);if(D.x>0||D.y>0){g(),w.current=_,v(S,s),b.current=D,y.current=z;return}}b.current={x:0,y:0},y.current={x:0,y:0},g()},[t,S,r,g,i,s,JSON.stringify(x),JSON.stringify(m),v,u,k,d,JSON.stringify(h)])}const QB={x:{[gn.Backward]:!1,[gn.Forward]:!1},y:{[gn.Backward]:!1,[gn.Forward]:!1}};function JB(e){let{delta:t,disabled:n}=e;const r=Jf(t);return md(o=>{if(n||!r||!o)return QB;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[gn.Backward]:o.x[gn.Backward]||i.x===-1,[gn.Forward]:o.x[gn.Forward]||i.x===1},y:{[gn.Backward]:o.y[gn.Backward]||i.y===-1,[gn.Forward]:o.y[gn.Forward]||i.y===1}}},[n,t,r])}function ZB(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return md(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function eH(e,t){return f.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var Vu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Vu||(Vu={}));var Wv;(function(e){e.Optimized="optimized"})(Wv||(Wv={}));const G3=new Map;function tH(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=f.useState(null),{frequency:l,measure:c,strategy:u}=o,d=f.useRef(e),p=b(),h=Uu(p),m=f.useCallback(function(y){y===void 0&&(y=[]),!h.current&&s(x=>x===null?y:x.concat(y.filter(w=>!x.includes(w))))},[h]),v=f.useRef(null),g=md(y=>{if(p&&!n)return G3;if(!y||y===G3||d.current!==e||i!=null){const x=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const S=w.node.current,k=S?new Tb(c(S),S):null;w.rect.current=k,k&&x.set(w.id,k)}return x}return y},[e,i,n,p,c]);return f.useEffect(()=>{d.current=e},[e]),f.useEffect(()=>{p||m()},[n,p]),f.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),f.useEffect(()=>{p||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{m(),v.current=null},l))},[l,p,m,...r]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:i!=null};function b(){switch(u){case Vu.Always:return!1;case Vu.BeforeDragging:return n;default:return!n}}}function zb(e,t){return md(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function nH(e,t){return zb(e,t)}function rH(e){let{callback:t,disabled:n}=e;const r=dm(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return f.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function hm(e){let{callback:t,disabled:n}=e;const r=dm(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return f.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function oH(e){return new Tb(ac(e),e)}function K3(e,t,n){t===void 0&&(t=oH);const[r,o]=f.useReducer(l,null),i=rH({callback(c){if(e)for(const u of c){const{type:d,target:p}=u;if(d==="childList"&&p instanceof HTMLElement&&p.contains(e)){o();break}}}}),s=hm({callback:o});return ao(()=>{o(),e?(s==null||s.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),i==null||i.disconnect())},[e]),r;function l(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function iH(e){const t=zb(e);return Ok(e,t)}const Y3=[];function sH(e){const t=f.useRef(e),n=md(r=>e?r&&r!==Y3&&e&&t.current&&e.parentNode===t.current.parentNode?r:fm(e):Y3,[e]);return f.useEffect(()=>{t.current=e},[e]),n}function aH(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(i=>{const s=p0(i.target);s&&n(l=>l?(l.set(s,Hv(s)),new Map(l)):null)},[]);return f.useEffect(()=>{const i=r.current;if(e!==i){s(i);const l=e.map(c=>{const u=p0(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Hv(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{s(e),s(i)};function s(l){l.forEach(c=>{const u=p0(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>bl(i,s),Ao):Hk(e):Ao,[e,t])}function X3(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null},t),f.useEffect(()=>{const r=e!==Ao;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Wu(e,n.current):Ao}function lH(e){f.useEffect(()=>{if(!um)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function cH(e,t){return f.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function Vk(e){return f.useMemo(()=>e?LB(e):null,[e])}const m0=[];function uH(e,t){t===void 0&&(t=ac);const[n]=e,r=Vk(n?dr(n):null),[o,i]=f.useReducer(l,m0),s=hm({callback:i});return e.length>0&&o===m0&&i(),ao(()=>{e.length?e.forEach(c=>s==null?void 0:s.observe(c)):(s==null||s.disconnect(),i())},[e]),o;function l(){return e.length?e.map(c=>$k(c)?r:new Tb(t(c),c)):m0}}function qk(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hd(t)?t:e}function dH(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(u=>{for(const{target:d}of u)if(hd(d)){r(p=>{const h=t(d);return p?{...p,width:h.width,height:h.height}:h});break}},[t]),i=hm({callback:o}),s=f.useCallback(u=>{const d=qk(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[l,c]=Qf(s);return f.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const pH=[{sensor:Nb,options:{}},{sensor:vd,options:{}}],fH={current:{}},Qp={draggable:{measure:U3},droppable:{measure:U3,strategy:Vu.WhileDragging,frequency:Wv.Optimized},dragOverlay:{measure:ac}};class pu extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const hH={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new pu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:eh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Qp,measureDroppableContainers:eh,windowRect:null,measuringScheduled:!1},Gk={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:eh,draggableNodes:new Map,over:null,measureDroppableContainers:eh},yd=f.createContext(Gk),Kk=f.createContext(hH);function mH(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new pu}}}function gH(e,t){switch(t.type){case on.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case on.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case on.DragEnd:case on.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case on.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new pu(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case on.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new pu(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case on.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new pu(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function vH(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(yd),i=Jf(r),s=Jf(n==null?void 0:n.id);return f.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!pm(i)||document.activeElement===i.target)return;const l=o.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const p=vB(d);if(p){p.focus();break}}})}},[r,t,o,s,i]),null}function Yk(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function yH(e){return f.useMemo(()=>({draggable:{...Qp.draggable,...e==null?void 0:e.draggable},droppable:{...Qp.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Qp.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function bH(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=f.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;ao(()=>{if(!s&&!l||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),p=Ok(d,r);if(s||(p.x=0),l||(p.y=0),i.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const h=zk(u);h&&h.scrollBy({top:p.y,left:p.x})}},[t,s,l,r,n])}const mm=f.createContext({...Ao,scaleX:1,scaleY:1});var Qi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Qi||(Qi={}));const gm=f.memo(function(t){var n,r,o,i;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:d=pH,collisionDetection:p=AB,measuring:h,modifiers:m,...v}=t;const g=f.useReducer(gH,void 0,mH),[b,y]=g,[x,w]=SB(),[S,k]=f.useState(Qi.Uninitialized),_=S===Qi.Initialized,{draggable:{active:I,nodes:P,translate:z},droppable:{containers:D}}=b,F=I?P.get(I):null,$=f.useRef({initial:null,translated:null}),Z=f.useMemo(()=>{var Mt;return I!=null?{id:I,data:(Mt=F==null?void 0:F.data)!=null?Mt:fH,rect:$}:null},[I,F]),ee=f.useRef(null),[W,ue]=f.useState(null),[K,B]=f.useState(null),H=Uu(v,Object.values(v)),N=gd("DndDescribedBy",s),xe=f.useMemo(()=>D.getEnabled(),[D]),fe=yH(h),{droppableRects:O,measureDroppableContainers:Te,measuringScheduled:Oe}=tH(xe,{dragging:_,dependencies:[z.x,z.y],config:fe.droppable}),ke=ZB(P,I),He=f.useMemo(()=>K?Zf(K):null,[K]),Ke=jc(),it=nH(ke,fe.draggable.measure);bH({activeNode:I?P.get(I):null,config:Ke.layoutShiftCompensation,initialRect:it,measure:fe.draggable.measure});const Pe=K3(ke,fe.draggable.measure,it),bt=K3(ke?ke.parentElement:null),Ye=f.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:O,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qt=D.getNodeFor((n=Ye.current.over)==null?void 0:n.id),zt=dH({measure:fe.dragOverlay.measure}),Ft=(r=zt.nodeRef.current)!=null?r:ke,Cn=_?(o=zt.rect)!=null?o:Pe:null,Cr=!!(zt.nodeRef.current&&zt.rect),un=iH(Cr?null:Pe),Xn=Vk(Ft?dr(Ft):null),Ln=sH(_?Qt??ke:null),vo=uH(Ln),he=Yk(m,{transform:{x:z.x-un.x,y:z.y-un.y,scaleX:1,scaleY:1},activatorEvent:K,active:Z,activeNodeRect:Pe,containerNodeRect:bt,draggingNodeRect:Cn,over:Ye.current.over,overlayNodeRect:zt.rect,scrollableAncestors:Ln,scrollableAncestorRects:vo,windowRect:Xn}),Ae=He?bl(He,z):null,xt=aH(Ln),Wt=X3(xt),dn=X3(xt,[Pe]),V=bl(he,Wt),ie=Cn?DB(Cn,he):null,Se=Z&&ie?p({active:Z,collisionRect:ie,droppableRects:O,droppableContainers:xe,pointerCoordinates:Ae}):null,We=Dk(Se,"id"),[ze,Pt]=f.useState(null),jn=Cr?he:bl(he,dn),pn=PB(jn,(i=ze==null?void 0:ze.rect)!=null?i:null,Pe),pr=f.useCallback((Mt,zn)=>{let{sensor:Fn,options:Oo}=zn;if(ee.current==null)return;const Qn=P.get(ee.current);if(!Qn)return;const kr=Mt.nativeEvent,Kr=new Fn({active:ee.current,activeNode:Qn,event:kr,options:Oo,context:Ye,onStart(Er){const zs=ee.current;if(zs==null)return;const ai=P.get(zs);if(!ai)return;const{onDragStart:_r}=H.current,Da={active:{id:zs,data:ai.data,rect:$}};yn.unstable_batchedUpdates(()=>{_r==null||_r(Da),k(Qi.Initializing),y({type:on.DragStart,initialCoordinates:Er,active:zs}),x({type:"onDragStart",event:Da})})},onMove(Er){y({type:on.DragMove,coordinates:Er})},onEnd:Lo(on.DragEnd),onCancel:Lo(on.DragCancel)});yn.unstable_batchedUpdates(()=>{ue(Kr),B(Mt.nativeEvent)});function Lo(Er){return async function(){const{active:ai,collisions:_r,over:Da,scrollAdjustedTranslate:Od}=Ye.current;let Fs=null;if(ai&&Od){const{cancelDrop:li}=H.current;Fs={activatorEvent:kr,active:ai,collisions:_r,delta:Od,over:Da},Er===on.DragEnd&&typeof li=="function"&&await Promise.resolve(li(Fs))&&(Er=on.DragCancel)}ee.current=null,yn.unstable_batchedUpdates(()=>{y({type:Er}),k(Qi.Uninitialized),Pt(null),ue(null),B(null);const li=Er===on.DragEnd?"onDragEnd":"onDragCancel";if(Fs){const zo=H.current[li];zo==null||zo(Fs),x({type:li,event:Fs})}})}}},[P]),jr=f.useCallback((Mt,zn)=>(Fn,Oo)=>{const Qn=Fn.nativeEvent,kr=P.get(Oo);if(ee.current!==null||!kr||Qn.dndKit||Qn.defaultPrevented)return;const Kr={active:kr};Mt(Fn,zn.options,Kr)===!0&&(Qn.dndKit={capturedBy:zn.sensor},ee.current=Oo,pr(Fn,zn))},[P,pr]),ft=eH(d,jr);lH(d),ao(()=>{Pe&&S===Qi.Initializing&&k(Qi.Initialized)},[Pe,S]),f.useEffect(()=>{const{onDragMove:Mt}=H.current,{active:zn,activatorEvent:Fn,collisions:Oo,over:Qn}=Ye.current;if(!zn||!Fn)return;const kr={active:zn,activatorEvent:Fn,collisions:Oo,delta:{x:V.x,y:V.y},over:Qn};yn.unstable_batchedUpdates(()=>{Mt==null||Mt(kr),x({type:"onDragMove",event:kr})})},[V.x,V.y]),f.useEffect(()=>{const{active:Mt,activatorEvent:zn,collisions:Fn,droppableContainers:Oo,scrollAdjustedTranslate:Qn}=Ye.current;if(!Mt||ee.current==null||!zn||!Qn)return;const{onDragOver:kr}=H.current,Kr=Oo.get(We),Lo=Kr&&Kr.rect.current?{id:Kr.id,rect:Kr.rect.current,data:Kr.data,disabled:Kr.disabled}:null,Er={active:Mt,activatorEvent:zn,collisions:Fn,delta:{x:Qn.x,y:Qn.y},over:Lo};yn.unstable_batchedUpdates(()=>{Pt(Lo),kr==null||kr(Er),x({type:"onDragOver",event:Er})})},[We]),ao(()=>{Ye.current={activatorEvent:K,active:Z,activeNode:ke,collisionRect:ie,collisions:Se,droppableRects:O,draggableNodes:P,draggingNode:Ft,draggingNodeRect:Cn,droppableContainers:D,over:ze,scrollableAncestors:Ln,scrollAdjustedTranslate:V},$.current={initial:Cn,translated:ie}},[Z,ke,Se,ie,P,Ft,Cn,O,D,ze,Ln,V]),XB({...Ke,delta:z,draggingRect:ie,pointerCoordinates:Ae,scrollableAncestors:Ln,scrollableAncestorRects:vo});const Mi=f.useMemo(()=>({active:Z,activeNode:ke,activeNodeRect:Pe,activatorEvent:K,collisions:Se,containerNodeRect:bt,dragOverlay:zt,draggableNodes:P,droppableContainers:D,droppableRects:O,over:ze,measureDroppableContainers:Te,scrollableAncestors:Ln,scrollableAncestorRects:vo,measuringConfiguration:fe,measuringScheduled:Oe,windowRect:Xn}),[Z,ke,Pe,K,Se,bt,zt,P,D,O,ze,Te,Ln,vo,fe,Oe,Xn]),kn=f.useMemo(()=>({activatorEvent:K,activators:ft,active:Z,activeNodeRect:Pe,ariaDescribedById:{draggable:N},dispatch:y,draggableNodes:P,over:ze,measureDroppableContainers:Te}),[K,ft,Z,Pe,y,N,P,ze,Te]);return ce.createElement(Ak.Provider,{value:w},ce.createElement(yd.Provider,{value:kn},ce.createElement(Kk.Provider,{value:Mi},ce.createElement(mm.Provider,{value:pn},u)),ce.createElement(vH,{disabled:(l==null?void 0:l.restoreFocus)===!1})),ce.createElement(kB,{...l,hiddenTextDescribedById:N}));function jc(){const Mt=(W==null?void 0:W.autoScrollEnabled)===!1,zn=typeof c=="object"?c.enabled===!1:c===!1,Fn=_&&!Mt&&!zn;return typeof c=="object"?{...c,enabled:Fn}:{enabled:Fn}}}),xH=f.createContext(null),Q3="button",wH="Droppable";function vm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=gd(wH),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:p,over:h}=f.useContext(yd),{role:m=Q3,roleDescription:v="draggable",tabIndex:g=0}=o??{},b=(c==null?void 0:c.id)===t,y=f.useContext(b?mm:xH),[x,w]=Qf(),[S,k]=Qf(),_=cH(s,t),I=Uu(n);ao(()=>(p.set(t,{id:t,key:i,node:x,activatorNode:S,data:I}),()=>{const z=p.get(t);z&&z.key===i&&p.delete(t)}),[p,t]);const P=f.useMemo(()=>({role:m,tabIndex:g,"aria-disabled":r,"aria-pressed":b&&m===Q3?!0:void 0,"aria-roledescription":v,"aria-describedby":d.draggable}),[r,m,g,b,v,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:P,isDragging:b,listeners:r?void 0:_,node:x,over:h,setNodeRef:w,setActivatorNodeRef:k,transform:y}}function Xk(){return f.useContext(Kk)}const SH="Droppable",CH={timeout:25};function ym(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=gd(SH),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=f.useContext(yd),d=f.useRef({disabled:n}),p=f.useRef(!1),h=f.useRef(null),m=f.useRef(null),{disabled:v,updateMeasurementsFor:g,timeout:b}={...CH,...o},y=Uu(g??r),x=f.useCallback(()=>{if(!p.current){p.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),m.current=null},b)},[b]),w=hm({callback:x,disabled:v||!s}),S=f.useCallback((P,z)=>{w&&(z&&(w.unobserve(z),p.current=!1),P&&w.observe(P))},[w]),[k,_]=Qf(S),I=Uu(t);return f.useEffect(()=>{!w||!k.current||(w.disconnect(),p.current=!1,w.observe(k.current))},[k,w]),ao(()=>(l({type:on.RegisterDroppable,element:{id:r,key:i,disabled:n,node:k,rect:h,data:I}}),()=>l({type:on.UnregisterDroppable,key:i,id:r})),[r]),f.useEffect(()=>{n!==d.current.disabled&&(l({type:on.SetDroppableDisabled,id:r,key:i,disabled:n}),d.current.disabled=n)},[r,i,n,l]),{active:s,rect:h,isOver:(c==null?void 0:c.id)===r,node:k,over:c,setNodeRef:_}}function jH(e){let{animation:t,children:n}=e;const[r,o]=f.useState(null),[i,s]=f.useState(null),l=Jf(n);return!n&&!r&&l&&o(l),ao(()=>{if(!i)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),ce.createElement(ce.Fragment,null,n,r?f.cloneElement(r,{ref:s}):null)}const kH={x:0,y:0,scaleX:1,scaleY:1};function EH(e){let{children:t}=e;return ce.createElement(yd.Provider,{value:Gk},ce.createElement(mm.Provider,{value:kH},t))}const _H={position:"fixed",touchAction:"none"},IH=e=>pm(e)?"transform 250ms ease":void 0,RH=f.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:l,style:c,transform:u,transition:d=IH}=e;if(!l)return null;const p=o?u:{...u,scaleX:1,scaleY:1},h={..._H,width:l.width,height:l.height,top:l.top,left:l.left,transform:Ss.Transform.toString(p),transformOrigin:o&&r?EB(r,l):void 0,transition:typeof d=="function"?d(r):d,...c};return ce.createElement(n,{className:s,style:h,ref:t},i)}),AH=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[l,c]of Object.entries(i.active))c!==void 0&&(o[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,c));if(i!=null&&i.dragOverlay)for(const[l,c]of Object.entries(i.dragOverlay))c!==void 0&&r.node.style.setProperty(l,c);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[c,u]of Object.entries(o))n.node.style.setProperty(c,u);s!=null&&s.active&&n.node.classList.remove(s.active)}},PH=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Ss.Transform.toString(t)},{transform:Ss.Transform.toString(n)}]},TH={duration:250,easing:"ease",keyframes:PH,sideEffects:AH({styles:{active:{opacity:"0"}}})};function DH(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return dm((i,s)=>{if(t===null)return;const l=n.get(i);if(!l)return;const c=l.node.current;if(!c)return;const u=qk(s);if(!u)return;const{transform:d}=dr(s).getComputedStyle(s),p=Lk(d);if(!p)return;const h=typeof t=="function"?t:NH(t);return Uk(c,o.draggable.measure),h({active:{id:i,data:l.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:p})})}function NH(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...TH,...e};return i=>{let{active:s,dragOverlay:l,transform:c,...u}=i;if(!t)return;const d={x:l.rect.left-s.rect.left,y:l.rect.top-s.rect.top},p={scaleX:c.scaleX!==1?s.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?s.rect.height*c.scaleY/l.rect.height:1},h={x:c.x-d.x,y:c.y-d.y,...p},m=o({...u,active:s,dragOverlay:l,transform:{initial:c,final:h}}),[v]=m,g=m[m.length-1];if(JSON.stringify(v)===JSON.stringify(g))return;const b=r==null?void 0:r({active:s,dragOverlay:l,...u}),y=l.node.animate(m,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{y.onfinish=()=>{b==null||b(),x()}})}}let J3=0;function OH(e){return f.useMemo(()=>{if(e!=null)return J3++,J3},[e])}const Fb=ce.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:p,activeNodeRect:h,containerNodeRect:m,draggableNodes:v,droppableContainers:g,dragOverlay:b,over:y,measuringConfiguration:x,scrollableAncestors:w,scrollableAncestorRects:S,windowRect:k}=Xk(),_=f.useContext(mm),I=OH(p==null?void 0:p.id),P=Yk(s,{activatorEvent:d,active:p,activeNodeRect:h,containerNodeRect:m,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:S,transform:_,windowRect:k}),z=zb(h),D=DH({config:r,draggableNodes:v,droppableContainers:g,measuringConfiguration:x}),F=z?b.setRef:void 0;return ce.createElement(EH,null,ce.createElement(jH,{animation:D},p&&I?ce.createElement(RH,{key:I,id:p.id,ref:F,as:l,activatorEvent:d,adjustScale:t,className:c,transition:i,rect:z,style:{zIndex:u,...o},transform:P},n):null))});var Ii;(function(e){e[e.Simple=0]="Simple",e[e.Outline=1]="Outline",e[e.Fill=2]="Fill",e[e.Colored=3]="Colored",e[e.Square=4]="Square"})(Ii||(Ii={}));const ot=f.forwardRef(({variant:e,children:t,color:n,...r},o)=>{const i=Zk.get(e)??Jk;return a.jsx(i,{ref:o,color:n,...r,children:t})});ot.displayName="IconButton";const Qk={variant:0,color:"inherit",size:"1em"};ot.defaultProps=Qk;const Mb=f.forwardRef(({variant:e,children:t,color:n,...r},o)=>{const i=Zk.get(e??0);return a.jsx(i,{ref:o,color:n,as:"a",...r,children:t})});Mb.displayName="IconButtonLink";Mb.defaultProps=Qk;const bd=C.button.withConfig({displayName:"IconButton__IconButtonBase",componentId:"sc-f858a439-0"})(["--button-padding:0.4em;cursor:pointer;display:inline-grid;place-items:center;",";color:",";font-size:",";border:none;user-select:none;padding:var(--button-padding);aspect-ratio:1/1;height:2em;margin-inline-start:",";margin-inline-end:",";&[disabled]{opacity:0.5;cursor:not-allowed;}"],Yt("background-color","color","box-shadow","filter"),e=>e.theme.colors.text,e=>e.size??"1em",e=>e.edgeAlign==="start"?"calc(var(--button-padding) * -1)":"0",e=>e.edgeAlign==="end"?"calc(var(--button-padding) * -1)":"0"),Jk=C(bd).withConfig({displayName:"IconButton__SimpleIconButton",componentId:"sc-f858a439-1"})(["color:",";background-color:transparent;border-radius:",";&:not([disabled]){&:hover,&:focus-visible{background-color:",";}&:active{background-color:",";}}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.bg2),LH=C(bd).withConfig({displayName:"IconButton__OutlineIconButton",componentId:"sc-f858a439-2"})(["color:",";background-color:",";border-radius:50%;&:not([disabled]){&:hover,&:focus-visible{color:",";box-shadow:0px 0px 0px 1.5px ",",",";}}&&:active{background-color:",";color:white;}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),zH=C(bd).withConfig({displayName:"IconButton__SquareIconButton",componentId:"sc-f858a439-3"})(["color:",";background-color:",";border-radius:",";border:1px solid ",";&:not([disabled]){&:hover,&:focus-visible{color:",";border-color:",";box-shadow:",";}}&&:active{background-color:",";color:white;}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),FH=C(bd).withConfig({displayName:"IconButton__FillIconButton",componentId:"sc-f858a439-4"})(["color:",";background-color:unset;border-radius:50%;&:hover,&:focus-visible{color:white;background-color:",";box-shadow:",";}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.colors.main,e=>e.theme.boxShadowSoft),MH=C(bd).withConfig({displayName:"IconButton__ColoredIconButton",componentId:"sc-f858a439-5"})(["color:white;background-color:",";border-radius:50%;&:hover,&:focus-visible{color:white;filter:brightness(1.3);box-shadow:",";}"],e=>e.color==="inherit"?"inherit":e.theme.colors[e.color],e=>e.theme.boxShadowSoft),Zk=new Map([[0,Jk],[1,LH],[2,FH],[3,MH],[4,zH]]),lc=(e,t="Open menu",n=ot)=>{const r=({onClick:o,menuId:i,isActive:s},l)=>{const c=f.useId();return a.jsx(n,{id:c,"aria-controls":i,"aria-expanded":s,"aria-haspopup":"menu",onClick:o,ref:l,title:t,children:e})};return r.DisplayName="DefaultTrigger",r};var g0=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function v0(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function e9(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function t9(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function $H(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i<n.length;i++)r.indexOf(n[i])===-1&&(o=!1);return o}var $b={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":g0?173:189,"=":g0?61:187,";":g0?59:186,"'":222,"[":219,"]":221,"\\":220},Cs={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Vv={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},An={16:!1,18:!1,17:!1,91:!1},Zt={};for(var cp=1;cp<20;cp++)$b["f".concat(cp)]=111+cp;var Et=[],Z3=!1,n9="all",r9=[],bm=function(t){return $b[t.toLowerCase()]||Cs[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function o9(e){n9=e||"all"}function qu(){return n9||"all"}function BH(){return Et.slice(0)}function HH(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function UH(e){return typeof e=="string"&&(e=bm(e)),Et.indexOf(e)!==-1}function WH(e,t){var n,r;e||(e=qu());for(var o in Zt)if(Object.prototype.hasOwnProperty.call(Zt,o))for(n=Zt[o],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;qu()===e&&o9(t||"all")}function VH(e){var t=e.keyCode||e.which||e.charCode,n=Et.indexOf(t);if(n>=0&&Et.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Et.splice(0,Et.length),(t===93||t===224)&&(t=91),t in An){An[t]=!1;for(var r in Cs)Cs[r]===t&&(Mr[r]=!1)}}function qH(e){if(typeof e>"u")Object.keys(Zt).forEach(function(s){return delete Zt[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&y0(s)});else if(typeof e=="object")e.key&&y0(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n[0],i=n[1];typeof o=="function"&&(i=o,o=""),y0({key:e,scope:o,method:i,splitKey:"+"})}}var y0=function(t){var n=t.key,r=t.scope,o=t.method,i=t.splitKey,s=i===void 0?"+":i,l=t9(n);l.forEach(function(c){var u=c.split(s),d=u.length,p=u[d-1],h=p==="*"?"*":bm(p);if(Zt[h]){r||(r=qu());var m=d>1?e9(Cs,u):[];Zt[h]=Zt[h].filter(function(v){var g=o?v.method===o:!0;return!(g&&v.scope===r&&$H(v.mods,m))})}})};function e6(e,t,n,r){if(t.element===r){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var i in An)Object.prototype.hasOwnProperty.call(An,i)&&(!An[i]&&t.mods.indexOf(+i)>-1||An[i]&&t.mods.indexOf(+i)===-1)&&(o=!1);(t.mods.length===0&&!An[16]&&!An[18]&&!An[17]&&!An[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function t6(e,t){var n=Zt["*"],r=e.keyCode||e.which||e.charCode;if(Mr.filter.call(this,e)){if((r===93||r===224)&&(r=91),Et.indexOf(r)===-1&&r!==229&&Et.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(v){var g=Vv[v];e[v]&&Et.indexOf(g)===-1?Et.push(g):!e[v]&&Et.indexOf(g)>-1?Et.splice(Et.indexOf(g),1):v==="metaKey"&&e[v]&&Et.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Et=Et.slice(Et.indexOf(g))))}),r in An){An[r]=!0;for(var o in Cs)Cs[o]===r&&(Mr[o]=!0);if(!n)return}for(var i in An)Object.prototype.hasOwnProperty.call(An,i)&&(An[i]=e[Vv[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Et.indexOf(17)===-1&&Et.push(17),Et.indexOf(18)===-1&&Et.push(18),An[17]=!0,An[18]=!0);var s=qu();if(n)for(var l=0;l<n.length;l++)n[l].scope===s&&(e.type==="keydown"&&n[l].keydown||e.type==="keyup"&&n[l].keyup)&&e6(e,n[l],s,t);if(r in Zt){for(var c=0;c<Zt[r].length;c++)if((e.type==="keydown"&&Zt[r][c].keydown||e.type==="keyup"&&Zt[r][c].keyup)&&Zt[r][c].key){for(var u=Zt[r][c],d=u.splitKey,p=u.key.split(d),h=[],m=0;m<p.length;m++)h.push(bm(p[m]));h.sort().join("")===Et.sort().join("")&&e6(e,u,s,t)}}}}function GH(e){return r9.indexOf(e)>-1}function Mr(e,t,n){Et=[];var r=t9(e),o=[],i="all",s=document,l=0,c=!1,u=!0,d="+",p=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(s=t.element),t.keyup&&(c=t.keyup),t.keydown!==void 0&&(u=t.keydown),t.capture!==void 0&&(p=t.capture),typeof t.splitKey=="string"&&(d=t.splitKey)),typeof t=="string"&&(i=t);l<r.length;l++)e=r[l].split(d),o=[],e.length>1&&(o=e9(Cs,e)),e=e[e.length-1],e=e==="*"?"*":bm(e),e in Zt||(Zt[e]=[]),Zt[e].push({keyup:c,keydown:u,scope:i,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:d,element:s});typeof s<"u"&&!GH(s)&&window&&(r9.push(s),v0(s,"keydown",function(h){t6(h,s)},p),Z3||(Z3=!0,v0(window,"focus",function(){Et=[]},p)),v0(s,"keyup",function(h){t6(h,s),VH(h)},p))}function KH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Zt).forEach(function(n){var r=Zt[n].find(function(o){return o.scope===t&&o.shortcut===e});r&&r.method&&r.method()})}var b0={setScope:o9,getScope:qu,deleteScope:WH,getPressedKeyCodes:BH,isPressed:UH,filter:HH,trigger:KH,unbind:qH,keyMap:$b,modifier:Cs,modifierMap:Vv};for(var x0 in b0)Object.prototype.hasOwnProperty.call(b0,x0)&&(Mr[x0]=b0[x0]);if(typeof window<"u"){var YH=window.hotkeys;Mr.noConflict=function(e){return e&&window.hotkeys===Mr&&(window.hotkeys=YH),Mr},window.hotkeys=Mr}Mr.filter=function(){return!0};var i9=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},XH=function(t){return i9(t,["INPUT","TEXTAREA","SELECT"])};function De(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},i=o.enableOnTags,s=o.filter,l=o.keyup,c=o.keydown,u=o.filterPreventDefault,d=u===void 0?!0:u,p=o.enabled,h=p===void 0?!0:p,m=o.enableOnContentEditable,v=m===void 0?!1:m,g=f.useRef(null),b=f.useCallback(function(y,x){var w,S;return s&&!s(y)?!d:XH(y)&&!i9(y,i)||(w=y.target)!=null&&w.isContentEditable&&!v?!0:g.current===null||document.activeElement===g.current||(S=g.current)!=null&&S.contains(document.activeElement)?(t(y,x),!0):!1},r?[g,i,s].concat(r):[g,i,s]);return f.useEffect(function(){if(!h){Mr.unbind(e,b);return}return l&&c!==!0&&(n.keydown=!1),Mr(e,n||{},b),function(){return Mr.unbind(e,b)}},[b,e,h]),g}Mr.isPressed;const QH=(e,t)=>e.filter(n=>n.current).some(n=>{var r;return n.current===t||((r=n.current)==null?void 0:r.contains(t))}),JH=(e,t)=>{e.forEach(n=>window.addEventListener(n,t))},n6=(e,t)=>{e.forEach(n=>window.removeEventListener(n,t))},Bb=(e,t,n=!0,r=["mousedown"])=>{f.useEffect(()=>{const o=i=>{n&&!QH(e,i.target)&&(i.preventDefault(),t(),n6(r,o))};return JH(r,o),()=>{n6(r,o)}},[e,t,n])},ct={edit:$s("e"),data:$s("d"),home:$s("h"),new:$s("n"),userSettings:$s("u"),themeSettings:$s("t"),keyboardShortcuts:"shift+/",search:"/",menu:$s("m"),sidebarToggle:"\\",moveLineUp:w0("up"),moveLineDown:w0("down"),deleteLine:w0("backspace")};function $s(e){return navigator.platform.includes("Mac")?`cmd+${e}`:`ctrl+${e}`}function w0(e){return navigator.platform.includes("Mac")?`option+${e}`:`alt+${e}`}function ZH(e){return navigator.platform.includes("Mac")?e.replace("cmd+","⌘").replace("option+","⌥").replace("shift+","⇧").replace("backspace","⌫"):e}function eU({children:e}){const t=kt(),[n]=cr(),{sideBarLocked:r,setSideBarLocked:o}=Le();return De(ct.edit,i=>{i.preventDefault(),Bt.isValidSubject(n)&&t(fd(n))},{},[n]),De(ct.data,i=>{i.preventDefault(),Bt.isValidSubject(n)&&t(fk(n))},{},[n]),De(ct.home,i=>{i.preventDefault(),t("/")}),De(ct.new,i=>{i.preventDefault(),t(Fe.new)}),De(ct.userSettings,i=>{i.preventDefault(),t(Fe.agentSettings)}),De(ct.themeSettings,i=>{i.preventDefault(),t(Fe.themeSettings)}),De(ct.keyboardShortcuts,i=>{i.preventDefault(),t(Fe.shortcuts)}),De(ct.sidebarToggle,i=>{i.preventDefault(),o(!r)},{},[r]),a.jsx(a.Fragment,{children:e})}function s9({shortcut:e,className:t}){const n=ZH(e).split("+");return a.jsx(tU,{className:t,children:n.map((r,o)=>a.jsxs(f.Fragment,{children:[a.jsx(nU,{children:r})," ",o<n.length-1&&"+ "]},o))})}const tU=C.span.withConfig({displayName:"Shortcut__Wrapper",componentId:"sc-929032b2-0"})(["font-size:10px;"]),nU=C.kbd.withConfig({displayName:"Shortcut__KBD",componentId:"sc-929032b2-1"})(["display:inline-block;border:"," solid 1px;background-color:",";text-transform:capitalize;border-radius:5px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI Adjusted','Segoe UI','Liberation Sans',sans-serif;padding:0.3em;"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg1),xm=f.createContext(null),wm=(e,t)=>(e%t+t)%t,Hb=f.createContext({locks:new Set,requestLock:()=>{},releaseLock:()=>{}});function rU({children:e}){const[t,n]=f.useState(new Set),r=f.useCallback(s=>{n(l=>new Set([...l,s]))},[]),o=f.useCallback(s=>{t.has(s)&&n(l=>{const c=new Set(l);return c.delete(s),c})},[t]),i=f.useMemo(()=>({locks:t,requestLock:r,releaseLock:o}),[t,r,o]);return a.jsx(Hb.Provider,{value:i,children:e})}function Ub(e){const t=f.useId(),{requestLock:n,releaseLock:r}=f.useContext(Hb),o=f.useRef({requestLock:n,releaseLock:r});f.useEffect(()=>{o.current={requestLock:n,releaseLock:r}},[r,n]),f.useEffect(()=>(e?o.current.requestLock(t):o.current.releaseLock(t),()=>{o.current.releaseLock(t)}),[e])}function oU(){const{locks:e}=f.useContext(Hb);return e.size>0}const nh="divider",xl=e=>typeof e!="string"&&typeof(e==null?void 0:e.label)=="string",iU=e=>!xl(e)||e.disabled,sU=e=>e===0?1:Math.sign(e),aU=e=>(t,n)=>{const r=(o,i)=>{const s=wm(o+i,e.length),l=sU(n);return iU(e[s])?r(s,l):s};return r(t,n)};function lU(e){return e.reduce((t,n,r)=>(r===0||r===e.length-1)&&!xl(n)||!xl(n)&&!xl(t[r-1])?t:[...t,n],[])}function xd({items:e,trigger:t,isMainMenu:n,bindActive:r=()=>{}}){var _;const o=f.useId(),i=f.useRef(null),s=f.useRef(null),[l,c]=f.useState(!1);Ub(l);const u=f.useCallback(I=>{c(I),r(I)},[r]),d=f.useCallback(()=>{var I;(I=s.current)==null||I.focus(),u(!1)},[u]);Bb([s,i],d,l,["click"]);const p=f.useMemo(()=>lU(e),[e]),h=aU(p),[m,v]=f.useState(h(0,0)),[g,b]=f.useState(!0),y=f.useCallback(()=>{if(l){d();return}u(!0),requestAnimationFrame(()=>{if(!s.current||!i.current)return;const I=s.current.getBoundingClientRect(),P=i.current.getBoundingClientRect(),z=I.y-P.height;z<0?i.current.style.top=`${I.y+I.height/2}px`:i.current.style.top=`${z+I.height/2}px`,I.x-P.width<0?i.current.style.left=`${I.x}px`:i.current.style.left=`${I.x-P.width+I.width}px`,i.current.style.visibility="visible"})},[l,u]),x=f.useCallback(()=>{b(!1)},[]),w=f.useCallback(()=>{b(!0),v(h(0,0)),y()},[y]);De("esc",d,{enabled:l}),De("tab",I=>{I.preventDefault(),d()},{enabled:l}),De(ct.menu,I=>{I.preventDefault(),y(),b(!0)},{enabled:!!n},[l]),De("enter",I=>{I.preventDefault(),p[m].onClick(),d()},{enabled:l},[m,p]),De("up",I=>{I.preventDefault(),I.stopPropagation(),b(!0),v(P=>h(P,-1))},{enabled:l},[h]),De("down",I=>(I.preventDefault(),I.stopPropagation(),b(!0),v(P=>h(P,1)),!1),{enabled:l},[h]);const S=f.useMemo(()=>f.forwardRef(t),[]),k=f.useCallback(()=>{requestAnimationFrame(()=>{i.current&&(i.current.contains(document.activeElement)||d())})},[d]);return a.jsxs(a.Fragment,{children:[a.jsx(S,{ref:s,onClick:w,isActive:l,menuId:o}),l&&a.jsx(cU,{children:a.jsx(mU,{ref:i,isActive:l,id:o,onMouseOver:x,onBlur:k,"aria-labelledby":(_=s.current)==null?void 0:_.id,role:"menu",children:p.map((I,P)=>{if(!xl(I))return a.jsx(hU,{},P);const{label:z,onClick:D,helper:F,id:$,disabled:Z,shortcut:ee,icon:W}=I;return a.jsx(uU,{onClick:()=>{d(),D()},id:$,"data-test":`menu-item-${$}`,disabled:Z,helper:ee?`${F} (${ee})`:F,label:z,selected:g&&m===P,icon:W,shortcut:ee},$)})})})]})}const cU=({children:e})=>{const t=f.useContext(xm);return t.current?yn.createPortal(e,t.current):null};function uU({onClick:e,selected:t,helper:n,disabled:r,shortcut:o,icon:i,label:s,...l}){var u;const c=f.useRef(null);return t&&document.activeElement!==c.current&&((u=c.current)==null||u.focus()),a.jsxs(fU,{clean:!0,ref:c,onClick:e,selected:t,title:n,disabled:r,role:"menuitem",tabIndex:-1,...l,children:[i,a.jsx(pU,{children:s}),o&&a.jsx(dU,{shortcut:o})]})}const dU=C(s9).withConfig({displayName:"Dropdown__StyledShortcut",componentId:"sc-7f655391-0"})(["margin-left:0.3rem;"]),pU=C.span.withConfig({displayName:"Dropdown__StyledLabel",componentId:"sc-7f655391-1"})(["flex:1;"]),fU=C(oe).withConfig({displayName:"Dropdown__MenuItemStyled",componentId:"sc-7f655391-2"})(["align-items:center;display:flex;gap:0.5rem;width:100%;text-align:left;color:",";padding:0.4rem 1rem;height:auto;background-color:",";text-decoration:",";& svg{color:",";}&:hover{background-color:",";}&:active{background-color:",";}&:disabled{color:",";cursor:default;background-color:",";&:hover{cursor:'default';}& svg{color:",";}}svg{color:",";}"],e=>e.theme.colors.text,e=>e.selected?e.theme.colors.bg1:e.theme.colors.bg,e=>e.selected?"underline":"none",e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight2,e=>e.theme.colors.bg,e=>e.theme.colors.textLight2,e=>e.theme.colors.textLight),hU=C.div.withConfig({displayName:"Dropdown__ItemDivider",componentId:"sc-7f655391-3"})(["width:100%;border-bottom:1px solid ",";"],e=>e.theme.colors.bg2),mU=C.div.withConfig({displayName:"Dropdown__Menu",componentId:"sc-7f655391-4"})(["visibility:hidden;font-size:0.9rem;overflow:auto;max-height:80vh;background:",";border:",";padding-top:0.4rem;padding-bottom:0.4rem;border-radius:8px;position:fixed;z-index:",";width:auto;box-shadow:",";opacity:",";@starting-style{opacity:0;}",";"],e=>e.theme.colors.bg,e=>e.theme.darkMode?`solid 1px ${e.theme.colors.bg2}`:"none",e=>e.theme.zIndex.dropdown,e=>e.theme.boxShadowSoft,e=>e.isActive?1:0,Yt("opacity"));function Wb(e){const[t,n]=ma("queryscope"),r=kt(),o=f.useCallback(()=>{const s=new URLSearchParams({queryscope:e??""});r(`/app/search?${s.toString()}`,{replace:!0})},[n,e]),i=f.useCallback(()=>{n(void 0)},[n]);return{scope:t,enableScope:o,clearScope:i}}const gU=(e,t)=>{const n=setTimeout(e,t);return()=>clearTimeout(n)},qv=({children:e})=>{const t=f.useRef(null);return a.jsxs(xm.Provider,{value:t,children:[e,a.jsx(vU,{ref:t})]})},vU=C.div.withConfig({displayName:"DropdownContainer__DropdownContainerDiv",componentId:"sc-b56ccc3-0"})(["display:contents;"]);function Rt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function a9(...e){return t=>e.forEach(n=>yU(n,t))}function On(...e){return f.useCallback(a9(...e),e)}function cc(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:h,children:m,...v}=p,g=(h==null?void 0:h[e][c])||l,b=f.useMemo(()=>v,Object.values(v));return a.jsx(g.Provider,{value:b,children:m})}function d(p,h){const m=(h==null?void 0:h[e][c])||l,v=f.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const c=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,bU(o,...t)]}function bU(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...l,...p}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Gu=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(wU);if(i){const s=i.props.children,l=o.map(c=>c===i?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return a.jsx(Gv,{...r,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,l):null})}return a.jsx(Gv,{...r,ref:t,children:n})});Gu.displayName="Slot";var Gv=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=CU(n);return f.cloneElement(n,{...SU(r,n.props),ref:t?a9(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Gv.displayName="SlotClone";var xU=({children:e})=>a.jsx(a.Fragment,{children:e});function wU(e){return f.isValidElement(e)&&e.type===xU}function SU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function CU(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],nn=jU.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?Gu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kU(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function Hn(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function EU(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _U="DismissableLayer",Kv="dismissableLayer.update",IU="dismissableLayer.pointerDownOutside",RU="dismissableLayer.focusOutside",r6,l9=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),c9=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=f.useContext(l9),[d,p]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),v=On(t,I=>p(I)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,k=TU(I=>{const P=I.target,z=[...u.branches].some(D=>D.contains(P));!S||z||(o==null||o(I),s==null||s(I),I.defaultPrevented||l==null||l())},h),_=DU(I=>{const P=I.target;[...u.branches].some(D=>D.contains(P))||(i==null||i(I),s==null||s(I),I.defaultPrevented||l==null||l())},h);return EU(I=>{x===u.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&l&&(I.preventDefault(),l()))},h),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(r6=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),o6(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=r6)}},[d,h,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),o6())},[d,u]),f.useEffect(()=>{const I=()=>m({});return document.addEventListener(Kv,I),()=>document.removeEventListener(Kv,I)},[]),a.jsx(nn.div,{...c,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Rt(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Rt(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Rt(e.onPointerDownCapture,k.onPointerDownCapture)})});c9.displayName=_U;var AU="DismissableLayerBranch",PU=f.forwardRef((e,t)=>{const n=f.useContext(l9),r=f.useRef(null),o=On(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(nn.div,{...e,ref:o})});PU.displayName=AU;function TU(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){u9(IU,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DU(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&u9(RU,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function o6(){const e=new CustomEvent(Kv);document.dispatchEvent(e)}function u9(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?kU(o,i):o.dispatchEvent(i)}var S0=0;function NU(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i6()),document.body.insertAdjacentElement("beforeend",e[1]??i6()),S0++,()=>{S0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),S0--}},[])}function i6(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var C0="focusScope.autoFocusOnMount",j0="focusScope.autoFocusOnUnmount",s6={bubbles:!1,cancelable:!0},OU="FocusScope",d9=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=f.useState(null),u=Hn(o),d=Hn(i),p=f.useRef(null),h=On(t,g=>c(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?p.current=S:Ki(p.current,{select:!0})},b=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||Ki(p.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const k of w)k.removedNodes.length>0&&Ki(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),x.disconnect()}}},[r,l,m.paused]),f.useEffect(()=>{if(l){l6.add(m);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(C0,s6);l.addEventListener(C0,u),l.dispatchEvent(y),y.defaultPrevented||(LU(BU(p9(l)),{select:!0}),document.activeElement===g&&Ki(l))}return()=>{l.removeEventListener(C0,u),setTimeout(()=>{const y=new CustomEvent(j0,s6);l.addEventListener(j0,d),l.dispatchEvent(y),y.defaultPrevented||Ki(g??document.body,{select:!0}),l.removeEventListener(j0,d),l6.remove(m)},0)}}},[l,u,d,m]);const v=f.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const x=g.currentTarget,[w,S]=zU(x);w&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&Ki(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&Ki(S,{select:!0})):y===x&&g.preventDefault()}},[n,r,m.paused]);return a.jsx(nn.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});d9.displayName=OU;function LU(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ki(r,{select:t}),document.activeElement!==n)return}function zU(e){const t=p9(e),n=a6(t,e),r=a6(t.reverse(),e);return[n,r]}function p9(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function a6(e,t){for(const n of e)if(!FU(n,{upTo:t}))return n}function FU(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 MU(e){return e instanceof HTMLInputElement&&"select"in e}function Ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&MU(e)&&t&&e.select()}}var l6=$U();function $U(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=c6(e,t),e.unshift(t)},remove(t){var n;e=c6(e,t),(n=e[0])==null||n.resume()}}}function c6(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function BU(e){return e.filter(t=>t.tagName!=="A")}var js=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},HU=bC.useId||(()=>{}),UU=0;function Vb(e){const[t,n]=f.useState(HU());return js(()=>{e||n(r=>r??String(UU++))},[e]),e||(t?`radix-${t}`:"")}const WU=["top","right","bottom","left"],Go=Math.min,Or=Math.max,rh=Math.round,up=Math.floor,ks=e=>({x:e,y:e}),VU={left:"right",right:"left",bottom:"top",top:"bottom"},qU={start:"end",end:"start"};function Yv(e,t,n){return Or(e,Go(t,n))}function Ri(e,t){return typeof e=="function"?e(t):e}function Ai(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function qb(e){return e==="x"?"y":"x"}function Gb(e){return e==="y"?"height":"width"}function Es(e){return["top","bottom"].includes(Ai(e))?"y":"x"}function Kb(e){return qb(Es(e))}function GU(e,t,n){n===void 0&&(n=!1);const r=uc(e),o=Kb(e),i=Gb(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=oh(s)),[s,oh(s)]}function KU(e){const t=oh(e);return[Xv(e),t,Xv(t)]}function Xv(e){return e.replace(/start|end/g,t=>qU[t])}function YU(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function XU(e,t,n,r){const o=uc(e);let i=YU(Ai(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Xv)))),i}function oh(e){return e.replace(/left|right|bottom|top/g,t=>VU[t])}function QU(e){return{top:0,right:0,bottom:0,left:0,...e}}function f9(e){return typeof e!="number"?QU(e):{top:e,right:e,bottom:e,left:e}}function ih(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function u6(e,t,n){let{reference:r,floating:o}=e;const i=Es(t),s=Kb(t),l=Gb(s),c=Ai(t),u=i==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(uc(t)){case"start":m[s]-=h*(n&&u?-1:1);break;case"end":m[s]+=h*(n&&u?-1:1);break}return m}const JU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=u6(u,r,c),h=r,m={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x,y:w,data:S,reset:k}=await y({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});d=x??d,p=w??p,m={...m,[b]:{...m[b],...S}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:p}=u6(u,h,c)),g=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:m}};async function Ku(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=Ri(t,e),v=f9(m),b=l[h?p==="floating"?"reference":"floating":p],y=ih(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),x=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},k=ih(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-k.top+v.top)/S.y,bottom:(k.bottom-y.bottom+v.bottom)/S.y,left:(y.left-k.left+v.left)/S.x,right:(k.right-y.right+v.right)/S.x}}const ZU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Ri(e,t)||{};if(u==null)return{};const p=f9(d),h={x:n,y:r},m=Kb(o),v=Gb(m),g=await s.getDimensions(u),b=m==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[m]-h[m]-i.floating[v],k=h[m]-i.reference[m],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=_?_[w]:0;(!I||!await(s.isElement==null?void 0:s.isElement(_)))&&(I=l.floating[w]||i.floating[v]);const P=S/2-k/2,z=I/2-g[v]/2-1,D=Go(p[y],z),F=Go(p[x],z),$=D,Z=I-g[v]-F,ee=I/2-g[v]/2+P,W=Yv($,ee,Z),ue=!c.arrow&&uc(o)!=null&&ee!==W&&i.reference[v]/2-(ee<$?D:F)-g[v]/2<0,K=ue?ee<$?ee-$:ee-Z:0;return{[m]:h[m]+K,data:{[m]:W,centerOffset:ee-W-K,...ue&&{alignmentOffset:K}},reset:ue}}}),eW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=Ri(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Ai(o),x=Es(l),w=Ai(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(w||!g?[oh(l)]:KU(l)),_=v!=="none";!h&&_&&k.push(...XU(l,g,v,S));const I=[l,...k],P=await Ku(t,b),z=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&z.push(P[y]),p){const ee=GU(o,s,S);z.push(P[ee[0]],P[ee[1]])}if(D=[...D,{placement:o,overflows:z}],!z.every(ee=>ee<=0)){var F,$;const ee=(((F=i.flip)==null?void 0:F.index)||0)+1,W=I[ee];if(W)return{data:{index:ee,overflows:D},reset:{placement:W}};let ue=($=D.filter(K=>K.overflows[0]<=0).sort((K,B)=>K.overflows[1]-B.overflows[1])[0])==null?void 0:$.placement;if(!ue)switch(m){case"bestFit":{var Z;const K=(Z=D.filter(B=>{if(_){const H=Es(B.placement);return H===x||H==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(H=>H>0).reduce((H,N)=>H+N,0)]).sort((B,H)=>B[1]-H[1])[0])==null?void 0:Z[0];K&&(ue=K);break}case"initialPlacement":ue=l;break}if(o!==ue)return{reset:{placement:ue}}}return{}}}};function d6(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function p6(e){return WU.some(t=>e[t]>=0)}const tW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ri(e,t);switch(r){case"referenceHidden":{const i=await Ku(t,{...o,elementContext:"reference"}),s=d6(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:p6(s)}}}case"escaped":{const i=await Ku(t,{...o,altBoundary:!0}),s=d6(i,n.floating);return{data:{escapedOffsets:s,escaped:p6(s)}}}default:return{}}}}};async function nW(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ai(n),l=uc(n),c=Es(n)==="y",u=["left","top"].includes(s)?-1:1,d=i&&c?-1:1,p=Ri(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const rW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,c=await nW(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},oW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...c}=Ri(e,t),u={x:n,y:r},d=await Ku(t,c),p=Es(Ai(o)),h=qb(p);let m=u[h],v=u[p];if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[b],w=m-d[y];m=Yv(x,m,w)}if(s){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=v+d[b],w=v-d[y];v=Yv(x,v,w)}const g=l.fn({...t,[h]:m,[p]:v});return{...g,data:{x:g.x-n,y:g.y-r}}}}},iW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Ri(e,t),d={x:n,y:r},p=Es(o),h=qb(p);let m=d[h],v=d[p];const g=Ri(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=h==="y"?"height":"width",S=i.reference[h]-i.floating[w]+b.mainAxis,k=i.reference[h]+i.reference[w]-b.mainAxis;m<S?m=S:m>k&&(m=k)}if(u){var y,x;const w=h==="y"?"width":"height",S=["top","left"].includes(Ai(o)),k=i.reference[p]-i.floating[w]+(S&&((y=s.offset)==null?void 0:y[p])||0)+(S?0:b.crossAxis),_=i.reference[p]+i.reference[w]+(S?0:((x=s.offset)==null?void 0:x[p])||0)-(S?b.crossAxis:0);v<k?v=k:v>_&&(v=_)}return{[h]:m,[p]:v}}}},sW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...l}=Ri(e,t),c=await Ku(t,l),u=Ai(n),d=uc(n),p=Es(n)==="y",{width:h,height:m}=r.floating;let v,g;u==="top"||u==="bottom"?(v=u,g=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,v=d==="end"?"top":"bottom");const b=m-c.top-c.bottom,y=h-c.left-c.right,x=Go(m-c[v],b),w=Go(h-c[g],y),S=!t.middlewareData.shift;let k=x,_=w;if(p?_=d||S?Go(w,y):y:k=d||S?Go(x,b):b,S&&!d){const P=Or(c.left,0),z=Or(c.right,0),D=Or(c.top,0),F=Or(c.bottom,0);p?_=h-2*(P!==0||z!==0?P+z:Or(c.left,c.right)):k=m-2*(D!==0||F!==0?D+F:Or(c.top,c.bottom))}await s({...t,availableWidth:_,availableHeight:k});const I=await o.getDimensions(i.floating);return h!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function dc(e){return h9(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oi(e){var t;return(t=(h9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function h9(e){return e instanceof Node||e instanceof Br(e).Node}function Po(e){return e instanceof Element||e instanceof Br(e).Element}function ei(e){return e instanceof HTMLElement||e instanceof Br(e).HTMLElement}function f6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function wd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function aW(e){return["table","td","th"].includes(dc(e))}function Sm(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yb(e){const t=Xb(),n=Po(e)?To(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function lW(e){let t=_s(e);for(;ei(t)&&!Hl(t);){if(Yb(t))return t;if(Sm(t))return null;t=_s(t)}return null}function Xb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hl(e){return["html","body","#document"].includes(dc(e))}function To(e){return Br(e).getComputedStyle(e)}function Cm(e){return Po(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _s(e){if(dc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||f6(e)&&e.host||Oi(e);return f6(t)?t.host:t}function m9(e){const t=_s(e);return Hl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ei(t)&&wd(t)?t:m9(t)}function Yu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=m9(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Br(o);if(i){const l=Qv(s);return t.concat(s,s.visualViewport||[],wd(o)?o:[],l&&n?Yu(l):[])}return t.concat(o,Yu(o,[],n))}function Qv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g9(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ei(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=rh(n)!==i||rh(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Qb(e){return Po(e)?e:e.contextElement}function wl(e){const t=Qb(e);if(!ei(t))return ks(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=g9(t);let s=(i?rh(n.width):n.width)/r,l=(i?rh(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const cW=ks(0);function v9(e){const t=Br(e);return!Xb()||!t.visualViewport?cW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Br(e)?!1:t}function va(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Qb(e);let s=ks(1);t&&(r?Po(r)&&(s=wl(r)):s=wl(e));const l=uW(i,n,r)?v9(i):ks(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(i){const h=Br(i),m=r&&Po(r)?Br(r):r;let v=h,g=Qv(v);for(;g&&r&&m!==v;){const b=wl(g),y=g.getBoundingClientRect(),x=To(g),w=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,S=y.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,p*=b.y,c+=w,u+=S,v=Br(g),g=Qv(v)}}return ih({width:d,height:p,x:c,y:u})}function dW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Oi(r),l=t?Sm(t.floating):!1;if(r===s||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ks(1);const d=ks(0),p=ei(r);if((p||!p&&!i)&&((dc(r)!=="body"||wd(s))&&(c=Cm(r)),ei(r))){const h=va(r);u=wl(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function pW(e){return Array.from(e.getClientRects())}function y9(e){return va(Oi(e)).left+Cm(e).scrollLeft}function fW(e){const t=Oi(e),n=Cm(e),r=e.ownerDocument.body,o=Or(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Or(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+y9(e);const l=-n.scrollTop;return To(r).direction==="rtl"&&(s+=Or(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}function hW(e,t){const n=Br(e),r=Oi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const u=Xb();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function mW(e,t){const n=va(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ei(e)?wl(e):ks(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:l,x:c,y:u}}function h6(e,t,n){let r;if(t==="viewport")r=hW(e,n);else if(t==="document")r=fW(Oi(e));else if(Po(t))r=mW(t,n);else{const o=v9(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ih(r)}function b9(e,t){const n=_s(e);return n===t||!Po(n)||Hl(n)?!1:To(n).position==="fixed"||b9(n,t)}function gW(e,t){const n=t.get(e);if(n)return n;let r=Yu(e,[],!1).filter(l=>Po(l)&&dc(l)!=="body"),o=null;const i=To(e).position==="fixed";let s=i?_s(e):e;for(;Po(s)&&!Hl(s);){const l=To(s),c=Yb(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wd(s)&&!c&&b9(e,s))?r=r.filter(d=>d!==s):o=l,s=_s(s)}return t.set(e,r),r}function vW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Sm(t)?[]:gW(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((u,d)=>{const p=h6(t,d,o);return u.top=Or(p.top,u.top),u.right=Go(p.right,u.right),u.bottom=Go(p.bottom,u.bottom),u.left=Or(p.left,u.left),u},h6(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yW(e){const{width:t,height:n}=g9(e);return{width:t,height:n}}function bW(e,t,n){const r=ei(t),o=Oi(t),i=n==="fixed",s=va(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=ks(0);if(r||!r&&!i)if((dc(t)!=="body"||wd(o))&&(l=Cm(t)),r){const p=va(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=y9(o));const u=s.left+l.scrollLeft-c.x,d=s.top+l.scrollTop-c.y;return{x:u,y:d,width:s.width,height:s.height}}function k0(e){return To(e).position==="static"}function m6(e,t){return!ei(e)||To(e).position==="fixed"?null:t?t(e):e.offsetParent}function x9(e,t){const n=Br(e);if(Sm(e))return n;if(!ei(e)){let o=_s(e);for(;o&&!Hl(o);){if(Po(o)&&!k0(o))return o;o=_s(o)}return n}let r=m6(e,t);for(;r&&aW(r)&&k0(r);)r=m6(r,t);return r&&Hl(r)&&k0(r)&&!Yb(r)?n:r||lW(e)||n}const xW=async function(e){const t=this.getOffsetParent||x9,n=this.getDimensions,r=await n(e.floating);return{reference:bW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wW(e){return To(e).direction==="rtl"}const SW={convertOffsetParentRelativeRectToViewportRelativeRect:dW,getDocumentElement:Oi,getClippingRect:vW,getOffsetParent:x9,getElementRects:xW,getClientRects:pW,getDimensions:yW,getScale:wl,isElement:Po,isRTL:wW};function CW(e,t){let n=null,r;const o=Oi(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:p,height:h}=e.getBoundingClientRect();if(l||t(),!p||!h)return;const m=up(d),v=up(o.clientWidth-(u+p)),g=up(o.clientHeight-(d+h)),b=up(u),x={rootMargin:-m+"px "+-v+"px "+-g+"px "+-b+"px",threshold:Or(0,Go(1,c))||1};let w=!0;function S(k){const _=k[0].intersectionRatio;if(_!==c){if(!w)return s();_?s(!1,_):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function jW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Qb(e),d=o||i?[...u?Yu(u):[],...Yu(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const p=u&&l?CW(u,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let v,g=c?va(e):null;c&&b();function b(){const y=va(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,v=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const kW=rW,EW=oW,_W=eW,IW=sW,RW=tW,g6=ZU,AW=iW,PW=(e,t,n)=>{const r=new Map,o={platform:SW,...n},i={...o.platform,_c:r};return JU(e,t,{...o,platform:i})};var Jp=typeof document<"u"?f.useLayoutEffect:f.useEffect;function sh(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,o;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(!sh(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!sh(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function w9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function v6(e,t){const n=w9(e);return Math.round(t*n)/n}function y6(e){const t=f.useRef(e);return Jp(()=>{t.current=e}),t}function TW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,p]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(r);sh(h,r)||m(r);const[v,g]=f.useState(null),[b,y]=f.useState(null),x=f.useCallback(K=>{K!==_.current&&(_.current=K,g(K))},[]),w=f.useCallback(K=>{K!==I.current&&(I.current=K,y(K))},[]),S=i||v,k=s||b,_=f.useRef(null),I=f.useRef(null),P=f.useRef(d),z=c!=null,D=y6(c),F=y6(o),$=f.useCallback(()=>{if(!_.current||!I.current)return;const K={placement:t,strategy:n,middleware:h};F.current&&(K.platform=F.current),PW(_.current,I.current,K).then(B=>{const H={...B,isPositioned:!0};Z.current&&!sh(P.current,H)&&(P.current=H,yn.flushSync(()=>{p(H)}))})},[h,t,n,F]);Jp(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(K=>({...K,isPositioned:!1})))},[u]);const Z=f.useRef(!1);Jp(()=>(Z.current=!0,()=>{Z.current=!1}),[]),Jp(()=>{if(S&&(_.current=S),k&&(I.current=k),S&&k){if(D.current)return D.current(S,k,$);$()}},[S,k,$,D,z]);const ee=f.useMemo(()=>({reference:_,floating:I,setReference:x,setFloating:w}),[x,w]),W=f.useMemo(()=>({reference:S,floating:k}),[S,k]),ue=f.useMemo(()=>{const K={position:n,left:0,top:0};if(!W.floating)return K;const B=v6(W.floating,d.x),H=v6(W.floating,d.y);return l?{...K,transform:"translate("+B+"px, "+H+"px)",...w9(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:H}},[n,l,W.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:$,refs:ee,elements:W,floatingStyles:ue}),[d,$,ee,W,ue])}const DW=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?g6({element:r.current,padding:o}).fn(n):{}:r?g6({element:r,padding:o}).fn(n):{}}}},NW=(e,t)=>({...kW(e),options:[e,t]}),OW=(e,t)=>({...EW(e),options:[e,t]}),LW=(e,t)=>({...AW(e),options:[e,t]}),zW=(e,t)=>({..._W(e),options:[e,t]}),FW=(e,t)=>({...IW(e),options:[e,t]}),MW=(e,t)=>({...RW(e),options:[e,t]}),$W=(e,t)=>({...DW(e),options:[e,t]});var BW="Arrow",S9=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return a.jsx(nn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});S9.displayName=BW;var HW=S9;function UW(e){const[t,n]=f.useState(void 0);return js(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Jb="Popper",[C9,j9]=cc(Jb),[WW,k9]=C9(Jb),E9=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return a.jsx(WW,{scope:t,anchor:r,onAnchorChange:o,children:n})};E9.displayName=Jb;var _9="PopperAnchor",I9=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=k9(_9,n),s=f.useRef(null),l=On(t,s);return f.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:a.jsx(nn.div,{...o,ref:l})});I9.displayName=_9;var Zb="PopperContent",[VW,qW]=C9(Zb),R9=f.forwardRef((e,t)=>{var He,Ke,it,Pe,bt,Ye;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,b=k9(Zb,n),[y,x]=f.useState(null),w=On(t,Qt=>x(Qt)),[S,k]=f.useState(null),_=UW(S),I=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,z=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],$=F.length>0,Z={padding:D,boundary:F.filter(KW),altBoundary:$},{refs:ee,floatingStyles:W,placement:ue,isPositioned:K,middlewareData:B}=TW({strategy:"fixed",placement:z,whileElementsMounted:(...Qt)=>jW(...Qt,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[NW({mainAxis:o+P,alignmentAxis:s}),c&&OW({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?LW():void 0,...Z}),c&&zW({...Z}),FW({...Z,apply:({elements:Qt,rects:zt,availableWidth:Ft,availableHeight:Cn})=>{const{width:Cr,height:un}=zt.reference,Xn=Qt.floating.style;Xn.setProperty("--radix-popper-available-width",`${Ft}px`),Xn.setProperty("--radix-popper-available-height",`${Cn}px`),Xn.setProperty("--radix-popper-anchor-width",`${Cr}px`),Xn.setProperty("--radix-popper-anchor-height",`${un}px`)}}),S&&$W({element:S,padding:l}),YW({arrowWidth:I,arrowHeight:P}),h&&MW({strategy:"referenceHidden",...Z})]}),[H,N]=T9(ue),xe=Hn(v);js(()=>{K&&(xe==null||xe())},[K,xe]);const fe=(He=B.arrow)==null?void 0:He.x,O=(Ke=B.arrow)==null?void 0:Ke.y,Te=((it=B.arrow)==null?void 0:it.centerOffset)!==0,[Oe,ke]=f.useState();return js(()=>{y&&ke(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:K?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[(Pe=B.transformOrigin)==null?void 0:Pe.x,(bt=B.transformOrigin)==null?void 0:bt.y].join(" "),...((Ye=B.hide)==null?void 0:Ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(VW,{scope:n,placedSide:H,onArrowChange:k,arrowX:fe,arrowY:O,shouldHideArrow:Te,children:a.jsx(nn.div,{"data-side":H,"data-align":N,...g,ref:w,style:{...g.style,animation:K?void 0:"none"}})})})});R9.displayName=Zb;var A9="PopperArrow",GW={top:"bottom",right:"left",bottom:"top",left:"right"},P9=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=qW(A9,r),s=GW[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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:a.jsx(HW,{...o,ref:n,style:{...o.style,display:"block"}})})});P9.displayName=A9;function KW(e){return e!==null}var YW=e=>({name:"transformOrigin",options:e,fn(t){var b,y,x;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=T9(n),p={start:"0%",center:"50%",end:"100%"}[d],h=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let v="",g="";return u==="bottom"?(v=s?p:`${h}px`,g=`${-c}px`):u==="top"?(v=s?p:`${h}px`,g=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=s?p:`${m}px`):u==="left"&&(v=`${r.floating.width+c}px`,g=s?p:`${m}px`),{data:{x:v,y:g}}}});function T9(e){const[t,n="center"]=e.split("-");return[t,n]}var XW=E9,D9=I9,QW=R9,JW=P9,ZW="Portal",N9=f.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=f.useState(!1);js(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?OD.createPortal(a.jsx(nn.div,{...r,ref:t}),s):null});N9.displayName=ZW;function eV(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ds=e=>{const{present:t,children:n}=e,r=tV(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=On(r.ref,nV(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Ds.displayName="Presence";function tV(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[l,c]=eV(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=dp(r.current);i.current=l==="mounted"?u:"none"},[l]),js(()=>{const u=r.current,d=o.current;if(d!==e){const h=i.current,m=dp(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),js(()=>{if(t){const u=p=>{const m=dp(r.current).includes(p.animationName);p.target===t&&m&&yn.flushSync(()=>c("ANIMATION_END"))},d=p=>{p.target===t&&(i.current=dp(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function dp(e){return(e==null?void 0:e.animationName)||"none"}function nV(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ex({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=rV({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,l=Hn(n),c=f.useCallback(u=>{if(i){const p=typeof u=="function"?u(e):u;p!==e&&l(p)}else o(u)},[i,e,o,l]);return[s,c]}function rV({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,o=f.useRef(r),i=Hn(t);return f.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var oV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$a=new WeakMap,pp=new WeakMap,fp={},E0=0,O9=function(e){return e&&(e.host||O9(e.parentNode))},iV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=O9(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sV=function(e,t,n,r){var o=iV(t,Array.isArray(e)?e:[e]);fp[n]||(fp[n]=new WeakMap);var i=fp[n],s=[],l=new Set,c=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var d=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(h){if(l.has(h))d(h);else try{var m=h.getAttribute(r),v=m!==null&&m!=="false",g=($a.get(h)||0)+1,b=(i.get(h)||0)+1;$a.set(h,g),i.set(h,b),s.push(h),g===1&&v&&pp.set(h,!0),b===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),l.clear(),E0++,function(){s.forEach(function(p){var h=$a.get(p)-1,m=i.get(p)-1;$a.set(p,h),i.set(p,m),h||(pp.has(p)||p.removeAttribute(r),pp.delete(p)),m||p.removeAttribute(n)}),E0--,E0||($a=new WeakMap,$a=new WeakMap,pp=new WeakMap,fp={})}},aV=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=oV(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),sV(r,o,n,"aria-hidden")):function(){return null}},Vo=function(){return Vo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vo.apply(this,arguments)};function L9(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function pc(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?i(d.value):o(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}function fc(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function lV(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function cV(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(lV(arguments[t]));return e}function uV(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Zp="right-scroll-bar-position",ef="width-before-scroll-bar",dV="with-scroll-bars-hidden",pV="--removed-body-scroll-bar-size";function _0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fV(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var hV=typeof window<"u"?f.useLayoutEffect:f.useEffect,b6=new WeakMap;function mV(e,t){var n=fV(null,function(r){return e.forEach(function(o){return _0(o,r)})});return hV(function(){var r=b6.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(l){i.has(l)||_0(l,null)}),i.forEach(function(l){o.has(l)||_0(l,s)})}b6.set(n,e)},[e]),n}function gV(e){return e}function vV(e,t){t===void 0&&(t=gV);var n=[],r=!1,o={read:function(){if(r)throw new 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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function yV(e){e===void 0&&(e={});var t=vV(null);return t.options=Vo({async:!0,ssr:!1},e),t}var z9=function(e){var t=e.sideCar,n=L9(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Vo({},n))};z9.isSideCarExport=!0;function bV(e,t){return e.useMedium(t),z9}var F9=yV(),I0=function(){},jm=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:I0,onWheelCapture:I0,onTouchMoveCapture:I0}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,m=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,w=L9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,k=mV([n,t]),_=Vo(Vo({},w),o);return f.createElement(f.Fragment,null,d&&f.createElement(S,{sideCar:F9,removeScrollBar:u,shards:p,noIsolation:m,inert:v,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:x}),s?f.cloneElement(f.Children.only(l),Vo(Vo({},_),{ref:k})):f.createElement(y,Vo({},_,{className:c,ref:k}),l))});jm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jm.classNames={fullWidth:ef,zeroRight:Zp};var xV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xV();return t&&e.setAttribute("nonce",t),e}function SV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function CV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wV())&&(SV(t,n),CV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kV=function(){var e=jV();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},M9=function(){var e=kV(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},EV={left:0,top:0,right:0,gap:0},R0=function(e){return parseInt(e||"",10)||0},_V=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[R0(n),R0(r),R0(o)]},IV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return EV;var t=_V(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])}},RV=M9(),Sl="data-scroll-locked",AV=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
.`.concat(dV,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"px ").concat(r,`;
}
body[`).concat(Sl,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Zp,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(ef,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Zp," .").concat(Zp,` {
right: 0 `).concat(r,`;
}
.`).concat(ef," .").concat(ef,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(Sl,`] {
`).concat(pV,": ").concat(l,`px;
}
`)},x6=function(){var e=parseInt(document.body.getAttribute(Sl)||"0",10);return isFinite(e)?e:0},PV=function(){f.useEffect(function(){return document.body.setAttribute(Sl,(x6()+1).toString()),function(){var e=x6()-1;e<=0?document.body.removeAttribute(Sl):document.body.setAttribute(Sl,e.toString())}},[])},TV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;PV();var i=f.useMemo(function(){return IV(o)},[o]);return f.createElement(RV,{styles:AV(i,!t,o,n?"":"!important")})},Jv=!1;if(typeof window<"u")try{var hp=Object.defineProperty({},"passive",{get:function(){return Jv=!0,!0}});window.addEventListener("test",hp,hp),window.removeEventListener("test",hp,hp)}catch{Jv=!1}var Ba=Jv?{passive:!1}:!1,DV=function(e){return e.tagName==="TEXTAREA"},$9=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!DV(e)&&n[t]==="visible")},NV=function(e){return $9(e,"overflowY")},OV=function(e){return $9(e,"overflowX")},w6=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=B9(e,r);if(o){var i=H9(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},LV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},B9=function(e,t){return e==="v"?NV(t):OV(t)},H9=function(e,t){return e==="v"?LV(t):zV(t)},FV=function(e,t){return e==="h"&&t==="rtl"?-1:1},MV=function(e,t,n,r,o){var i=FV(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,c=t.contains(l),u=!1,d=s>0,p=0,h=0;do{var m=H9(e,l),v=m[0],g=m[1],b=m[2],y=g-b-i*v;(v||y)&&B9(e,l)&&(p+=y,h+=v),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(p)<1||!o)||!d&&(Math.abs(h)<1||!o))&&(u=!0),u},mp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},S6=function(e){return[e.deltaX,e.deltaY]},C6=function(e){return e&&"current"in e?e.current:e},$V=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BV=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},HV=0,Ha=[];function UV(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(HV++)[0],i=f.useState(M9)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=uV([e.lockRef.current],(e.shards||[]).map(C6),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(g,b){if("touches"in g&&g.touches.length===2)return!s.current.allowPinchZoom;var y=mp(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-y[0],S="deltaY"in g?g.deltaY:x[1]-y[1],k,_=g.target,I=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&I==="h"&&_.type==="range")return!1;var P=w6(I,_);if(!P)return!0;if(P?k=I:(k=I==="v"?"h":"v",P=w6(I,_)),!P)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=k),!k)return!0;var z=r.current||k;return MV(z,b,g,z==="h"?w:S,!0)},[]),c=f.useCallback(function(g){var b=g;if(!(!Ha.length||Ha[Ha.length-1]!==i)){var y="deltaY"in b?S6(b):mp(b),x=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&$V(k.delta,y)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var w=(s.current.shards||[]).map(C6).filter(Boolean).filter(function(k){return k.contains(b.target)}),S=w.length>0?l(b,w[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=f.useCallback(function(g,b,y,x){var w={name:g,delta:b,target:y,should:x,shadowParent:WV(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=f.useCallback(function(g){n.current=mp(g),r.current=void 0},[]),p=f.useCallback(function(g){u(g.type,S6(g),g.target,l(g,e.lockRef.current))},[]),h=f.useCallback(function(g){u(g.type,mp(g),g.target,l(g,e.lockRef.current))},[]);f.useEffect(function(){return Ha.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Ba),document.addEventListener("touchmove",c,Ba),document.addEventListener("touchstart",d,Ba),function(){Ha=Ha.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Ba),document.removeEventListener("touchmove",c,Ba),document.removeEventListener("touchstart",d,Ba)}},[]);var m=e.removeScrollBar,v=e.inert;return f.createElement(f.Fragment,null,v?f.createElement(i,{styles:BV(o)}):null,m?f.createElement(TV,{gapMode:e.gapMode}):null)}function WV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const VV=bV(F9,UV);var U9=f.forwardRef(function(e,t){return f.createElement(jm,Vo({},e,{ref:t,sideCar:VV}))});U9.classNames=jm.classNames;var tx="Popover",[W9,C0e]=cc(tx,[j9]),Sd=j9(),[qV,Ns]=W9(tx),V9=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,l=Sd(t),c=f.useRef(null),[u,d]=f.useState(!1),[p=!1,h]=ex({prop:r,defaultProp:o,onChange:i});return a.jsx(XW,{...l,children:a.jsx(qV,{scope:t,contentId:Vb(),triggerRef:c,open:p,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>d(!0),[]),onCustomAnchorRemove:f.useCallback(()=>d(!1),[]),modal:s,children:n})})};V9.displayName=tx;var q9="PopoverAnchor",G9=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ns(q9,n),i=Sd(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return f.useEffect(()=>(s(),()=>l()),[s,l]),a.jsx(D9,{...i,...r,ref:t})});G9.displayName=q9;var K9="PopoverTrigger",Y9=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ns(K9,n),i=Sd(n),s=On(t,o.triggerRef),l=a.jsx(nn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tE(o.open),...r,ref:s,onClick:Rt(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:a.jsx(D9,{asChild:!0,...i,children:l})});Y9.displayName=K9;var nx="PopoverPortal",[GV,KV]=W9(nx,{forceMount:void 0}),X9=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Ns(nx,t);return a.jsx(GV,{scope:t,forceMount:n,children:a.jsx(Ds,{present:n||i.open,children:a.jsx(N9,{asChild:!0,container:o,children:r})})})};X9.displayName=nx;var Ul="PopoverContent",Q9=f.forwardRef((e,t)=>{const n=KV(Ul,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Ns(Ul,e.__scopePopover);return a.jsx(Ds,{present:r||i.open,children:i.modal?a.jsx(YV,{...o,ref:t}):a.jsx(XV,{...o,ref:t})})});Q9.displayName=Ul;var YV=f.forwardRef((e,t)=>{const n=Ns(Ul,e.__scopePopover),r=f.useRef(null),o=On(t,r),i=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return aV(s)},[]),a.jsx(U9,{as:Gu,allowPinchZoom:!0,children:a.jsx(J9,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rt(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Rt(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Rt(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),XV=f.forwardRef((e,t)=>{const n=Ns(Ul,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return a.jsx(J9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),J9=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...p}=e,h=Ns(Ul,n),m=Sd(n);return NU(),a.jsx(d9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:a.jsx(c9,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:a.jsx(QW,{"data-state":tE(h.open),role:"dialog",id:h.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Z9="PopoverClose",QV=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ns(Z9,n);return a.jsx(nn.button,{type:"button",...r,ref:t,onClick:Rt(e.onClick,()=>o.onOpenChange(!1))})});QV.displayName=Z9;var JV="PopoverArrow",eE=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Sd(n);return a.jsx(JW,{...o,...r,ref:t})});eE.displayName=JV;function tE(e){return e?"open":"closed"}var rx=V9,nE=G9,ox=Y9,ix=X9,sx=Q9,ZV=eE;const ax=f.createContext({inDialog:!1,hasOpenInnerPopup:!1,setHasOpenInnerPopup:()=>{}}),eq=({children:e})=>{const[t,n]=f.useState(!1),r=f.useMemo(()=>({inDialog:!0,hasOpenInnerPopup:t,setHasOpenInnerPopup:n}),[t,n]);return a.jsx(ax.Provider,{value:r,children:e})};function tq(){const{inDialog:e,hasOpenInnerPopup:t,setHasOpenInnerPopup:n}=f.useContext(ax);return{inDialog:e,hasOpenInnerPopup:t,setHasOpenInnerPopup:n}}function nq(){return f.useContext(ax)}function lx({children:e,className:t,open:n,defaultOpen:r,noArrow:o,noLock:i,modal:s,onOpenChange:l,Trigger:c}){const{setHasOpenInnerPopup:u}=tq(),p=f.useContext(rE).current??void 0;Ub(!i&&!!n);const h=f.useCallback(m=>{u(m),l(m)},[l,u]);return f.useEffect(()=>{u(!!n)},[n,u]),a.jsxs(rx,{modal:s,open:n,onOpenChange:h,defaultOpen:r,children:[c,a.jsx(ix,{container:p,children:a.jsxs(rq,{collisionPadding:10,sticky:"always",className:t,children:[e,!o&&a.jsx(oq,{})]})})]})}const j6=ni(["from{opacity:0;transform:scale(0);}to{opacity:1;transform:scale(1);}"]),rq=C(sx).withConfig({displayName:"Popover__Content",componentId:"sc-a62a0da2-0"})(["--popover-close-offset:","rem;--popover-close-size:25px;--popover-close-safe-area:calc( var(--popover-close-size) + (var(--popover-close-offset) * 2) - ","rem );background-color:",";backdrop-filter:blur(10px);box-shadow:",";border-radius:",";z-index:10000000;animation:"," 0.1s ease-in-out;&[data-state='closed']{animation:"," 0.1s ease-in-out reverse;}"],e=>e.theme.margin,e=>e.theme.margin,e=>Zo(.2,e.theme.colors.bgBody),e=>e.theme.boxShadowSoft,e=>e.theme.radius,j6,j6),oq=C(ZV).withConfig({displayName:"Popover__Arrow",componentId:"sc-a62a0da2-1"})(["fill:",";"],e=>e.theme.colors.bg2),rE=f.createContext(f.createRef()),oE=({children:e})=>{const t=f.useRef(null);return a.jsx(iq,{ref:t,children:a.jsx(rE.Provider,{value:t,children:e})})},iq=C.div.withConfig({displayName:"Popover__ContainerDiv",componentId:"sc-a62a0da2-2"})(["display:contents;"]),km=C.div.withConfig({displayName:"Slot",componentId:"sc-5963ea68-0"})(["grid-area:",";"],e=>e.slot);function Ht(e){const{bindShow:t,onCancel:n,onSuccess:r,triggerRef:o}=e??{},[i,s]=f.useState(!1),[l,c]=f.useState(!1),[u,d]=f.useState(!1),p=f.useCallback(()=>{document.body.setAttribute("inert",""),s(!0),c(!0),t==null||t(!0)},[]),h=f.useCallback((g=!1)=>{d(g),s(!1)},[]),m=f.useCallback(()=>{var g;document.body.removeAttribute("inert"),t==null||t(!1),c(!1),u?r==null||r():n==null||n(),d(!1),(g=o==null?void 0:o.current)==null||g.focus()},[u,r,n]);return[f.useMemo(()=>({show:i,onClose:h,onClosed:m}),[i,h,m]),p,h,l]}const iE=f.createContext(null),sq=({children:e})=>{const[t,n]=f.useState([]),r=f.useRef(null),o=f.useCallback((s,l)=>{n(l?c=>c.includes(s)?c:[...c,s]:c=>c.filter(u=>u!==s))},[]),i=f.useMemo(()=>({openDialogs:t,setDialogOpen:o,portal:r}),[t,o,r]);return a.jsxs(iE.Provider,{value:i,children:[e,a.jsx(aq,{ref:r})]})};function cx(e){const t=f.useId(),{openDialogs:n,setDialogOpen:r,...o}=f.useContext(iE),i=n.at(-1)===t;return f.useEffect(()=>{r(t,e)},[e,t]),{isTopLevel:i,...o}}const aq=C.div.withConfig({displayName:"DialogGlobalContextProvider__StyledDiv",componentId:"sc-40e3e53b-0"})(["display:contents;"]);var k6;(function(e){e.Title="title",e.Content="content",e.Actions="actions"})(k6||(k6={}));const sE="640px",ux="--dialog-inner-width",aE=80,Ua=`${aE}ms`;function Ut(e){const{portal:t}=cx(!1);return t.current?yn.createPortal(a.jsx(eq,{children:a.jsx(lq,{...e})}),t.current):null}const lq=({children:e,show:t,width:n,onClose:r,onClosed:o})=>{const i=f.useRef(null),s=f.useRef(null),{hasOpenInnerPopup:l}=nq(),{isTopLevel:c}=cx(t);Ub(t);const u=f.useCallback(()=>{r(!1)},[r]),d=f.useCallback(p=>{var h;c&&!((h=s.current)!=null&&h.contains(p.target))&&s.current!==p.target&&u()},[s.current,u,c]);return De("esc",()=>{u()},{enabled:t&&!l&&c}),f.useLayoutEffect(()=>{!t&&i.current&&i.current.hasAttribute("open")&&i.current.setAttribute("data-closing","true")},[t]),f.useEffect(()=>{if(i.current&&(t&&(i.current.hasAttribute("open")||i.current.showModal()),i.current.hasAttribute("data-closing")))return gU(()=>{var p;i.current.close(),(p=i.current)==null||p.removeAttribute("data-closing"),o()},aE)},[t,o]),a.jsx(mq,{ref:i,onMouseDown:d,$width:n,"data-top-level":c,children:a.jsx(pq,{ref:s,children:a.jsx(oE,{children:a.jsxs(qv,{children:[a.jsx(cq,{slot:"close",children:a.jsx(oe,{icon:!0,onClick:u,"aria-label":"close",children:a.jsx(ri,{})})}),e]})})})})},Sn=({children:e,className:t})=>a.jsx(km,{slot:"title",as:"header",className:t,children:e}),Xt=({children:e,className:t})=>a.jsx(uq,{slot:"content",as:"main",className:t,children:e}),Yn=({children:e,className:t})=>a.jsx(dq,{slot:"actions",as:"footer",className:t,children:e}),cq=C(km).withConfig({displayName:"Dialog__CloseButtonSlot",componentId:"sc-365e9195-0"})(["justify-self:end;"]),uq=C(km).withConfig({displayName:"Dialog__DialogContentSlot",componentId:"sc-365e9195-1"})(["overflow-x:auto;overflow-y:visible;max-height:calc(80vh - 8rem);padding-bottom:","rem;margin-inline:-","rem;padding-inline:","rem;"],({theme:e})=>e.margin,e=>e.theme.margin,e=>e.theme.margin),dq=C(km).withConfig({displayName:"Dialog__DialogActionsSlot",componentId:"sc-365e9195-2"})(["display:flex;gap:","rem;align-items:center;justify-content:flex-end;border-top:1px solid ",";padding-top:1rem;"],e=>e.theme.margin,e=>e.theme.colors.bg2),pq=C.div.withConfig({displayName:"Dialog__StyledInnerDialog",componentId:"sc-365e9195-3"})(["display:grid;grid-template-columns:auto 2rem;grid-template-rows:1fr auto auto;gap:1rem;grid-template-areas:'title close' 'content content' 'actions actions';max-block-size:calc(100vh - ","rem * 2);"],e=>e.theme.margin),fq=ni(["from{opacity:0;transform:translateY(5rem);}to{opacity:1;transform:translateY(0);}"]),hq=ni(["from{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px);}to{background-color:rgba(0,0,0,0.383);backdrop-filter:blur(5px);}"]),mq=C.dialog.withConfig({displayName:"Dialog__StyledDialog",componentId:"sc-365e9195-4"})(["--animation-speed:500ms;--dialog-width:min(90vw,",");",":calc( var(--dialog-width) - 2 * ","rem );box-sizing:border-box;inset:0px;position:relative;z-index:",";padding:","rem;color:",";background-color:",";border-radius:",";border:solid 1px ",";inline-size:var(--dialog-width);max-block-size:100vh;height:fit-content;overflow:visible;box-shadow:",";opacity:0;transform:translateY(5rem);transition:opacity "," ease-in-out,transform "," ease-in-out;&::backdrop{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px) grayscale(0%);transition:background-color "," ease-out,backdrop-filter "," ease-out;will-change:background-color,backdrop-filter;}&[open]{opacity:1;transform:translateY(0);animation:"," "," ease-in-out;}&[data-closing='true']{opacity:0;transform:translateY(5rem);}&[open]::backdrop{background-color:rgba(0,0,0,0.383);backdrop-filter:blur(5px) grayscale(90%);animation:"," "," ease-out;}&[data-closing='true']::backdrop{background-color:rgba(0,0,0,0);backdrop-filter:blur(0px) grayscale(0%);}@media (max-width:","){max-inline-size:100%;max-block-size:100vh;}"],e=>e.$width??"60ch",ux,e=>e.theme.margin,e=>e.theme.zIndex.dialog,e=>e.theme.margin,e=>e.theme.colors.text,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.boxShadowSoft,Ua,Ua,Ua,Ua,fq,Ua,hq,Ua,sE);var ah;(function(e){e.Default="default",e.Alert="alert"})(ah||(ah={}));function lE({title:e,confirmLabel:t="Confirm",onConfirm:n,onCancel:r,children:o,show:i,bindShow:s,theme:l="default"}){const[c,u,d]=Ht({bindShow:s,onCancel:r,onSuccess:n});return f.useEffect(()=>{i&&u()},[i]),i?a.jsxs(Ut,{...c,children:[a.jsx(Sn,{children:a.jsx("h1",{children:e})}),a.jsx(Xt,{children:o}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>d(!0),alert:l==="alert",children:t})]})]}):a.jsx(a.Fragment,{})}const be=f.forwardRef(({children:e,reverse:t,...n},r)=>a.jsx(cE,{...n,direction:t?"row-reverse":"row",ref:r,children:e}));be.displayName="Row";const ge=f.forwardRef(({children:e,reverse:t,...n},r)=>a.jsx(cE,{...n,direction:t?"column-reverse":"column",ref:r,children:e}));ge.displayName="Column";const cE=C.div.withConfig({displayName:"Row__Flex",componentId:"sc-1e48c6c1-0"})(["align-items:",";display:flex;gap:",";justify-content:",";flex-direction:",";flex-wrap:",";width:",";height:",";& > :is(h1,h2,h3,h4,h5,h6){margin-bottom:0;}& ","{align-self:flex-start;}& > p{margin:0;}"],e=>e.center?"center":"initial",e=>e.gap??`${e.theme.margin}rem`,e=>e.justify??"start",e=>e.direction??"row",e=>e.wrapItems?"wrap":"nowrap",e=>e.fullWidth?"100%":"initial",e=>e.fullHeight?"100%":"initial",rc);function uE({palette:e,onChange:t}){const n=r=>()=>t(r);return a.jsx(be,{wrapItems:!0,children:e.map(r=>a.jsx(gq,{color:r,onClick:n(r)},r))})}const gq=C.button.withConfig({displayName:"PalettePicker__PaletteButton",componentId:"sc-4745160f-0"})(["background-color:",";border:none;height:1.5rem;aspect-ratio:1/1;border-radius:50%;cursor:pointer;transform-origin:center;transform:scale(1);",";&:hover,&:focus-visible{outline:none;transform:scale(1.3);}&:active{transform:scale(1.1);}"],({color:e})=>e,Yt("transform")),dx=ni(["from{opacity:0;}to{opacity:1;}"]),px=["#FFBE0B","#FB5607","#FF006E","#8338EC","#3A86FF","#5FF56E"],fx=e=>{const t=q(e),[n]=rt(t),[r,o]=ne(t,J.properties.color,{commit:!0}),[i]=ne(t,J.properties.emoji),s=i?`${i} ${n}`:n;return f.useMemo(()=>({color:r??"#FFFFFF",setColor:o,text:s}),[r,o,s])};function Em({subject:e,children:t}){const{color:n,text:r}=fx(e);return a.jsxs(dE,{color:n,children:[r,t]})}const dE=C.span.withConfig({displayName:"Tag__TagWrapper",componentId:"sc-3e49f8cb-0"})(["--tag-dark-color:",";--tag-mid-color:",";--tag-light-color:",";display:inline-flex;gap:1ch;align-items:center;padding-inline:0.5em;padding-block:0.4em;border-radius:1em;border:1px solid var(--tag-mid-color);color:",";line-height:1;text-align:center;min-width:3rem;background-color:",";&.selected-tag{text-decoration:underline;}"],e=>cu(.11,e.color),e=>cu(.4,e.color),e=>NF(.5,cu(.9,e.color)),e=>e.theme.darkMode?"var(--tag-light-color)":"var(--tag-dark-color)",e=>e.theme.darkMode?"var(--tag-dark-color)":"var(--tag-light-color)");function vq({onClick:e,selected:t,subject:n}){const{color:r,text:o}=fx(n),i=f.useCallback(l=>{l.preventDefault(),l.stopPropagation(),e(n)},[e]),s=t?"selected-tag":"";return a.jsx(fE,{color:r,as:"button",onClick:i,className:s,tabIndex:-1,children:o})}function pE({subject:e,onDelete:t}){const{color:n,setColor:r,text:o}=fx(e),[i,s]=f.useState(!1),l=f.useCallback(c=>{r(c),s(!1)},[r,s]);return a.jsx(lx,{modal:!0,open:i,onOpenChange:s,Trigger:a.jsx(fE,{color:n,as:ox,children:o}),children:a.jsx(yq,{children:a.jsxs(ge,{children:[a.jsx(uE,{palette:px,onChange:l}),a.jsx(bq,{onClick:()=>t(e),children:a.jsxs(be,{gap:"0.5rem",children:[a.jsx(lm,{}),"Delete"]})})]})})})}const fE=C(dE).withConfig({displayName:"Tag__TagWrapperButton",componentId:"sc-3e49f8cb-1"})(["cursor:pointer;user-select:none;transition:",";animation:"," 0.2s ease-in-out;&:hover,&:focus,&.selected-tag{--shadow-color:",";filter:brightness(1.05);box-shadow:0 1px 20px 0px var(--shadow-color);}"],Yt("filter","box-shadow"),dx,({theme:e})=>e.darkMode?"var(--dark-color)":"var(--light-color)"),yq=C.div.withConfig({displayName:"Tag__PopoverContent",componentId:"sc-3e49f8cb-2"})(["padding:1rem;border-radius:",";border:1px solid ",";max-width:20rem;"],e=>e.theme.radius,e=>e.theme.colors.bg2),bq=C(oe).withConfig({displayName:"Tag__DeleteButton",componentId:"sc-3e49f8cb-3"})(["background-color:",";border:none;&:hover,&:focus{background-color:"," !important;}"],e=>e.theme.colors.alert,e=>Tr(.1,e.theme.colors.alert));function xq(e){return e[Math.floor(Math.random()*e.length)]}function lo(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/[^\w-]+/g,"")}const wq=C.div.withConfig({displayName:"InputStyles__FieldStyled",componentId:"sc-1ce1df27-0"})(["margin-bottom:","rem;"],e=>e.theme.margin),Sq=C.div.withConfig({displayName:"InputStyles__LabelWrapper",componentId:"sc-1ce1df27-1"})(["display:flex;align-items:center;margin-bottom:0.5rem;"]),hE=C.label.withConfig({displayName:"InputStyles__LabelStyled",componentId:"sc-1ce1df27-2"})(["font-weight:bold;display:block;"]),Cq=C.label.withConfig({displayName:"InputStyles__LabelHelper",componentId:"sc-1ce1df27-3"})(["font-size:0.9em;display:block;"]),Je=C.div.withConfig({displayName:"InputStyles__InputWrapper",componentId:"sc-1ce1df27-4"})(["display:flex;flex:1;--border-color:",";border:solid 1px var(--border-color);border-radius:",";overflow:hidden;align-items:center;padding-inline-start:",";& svg{color:",";}&:hover:has(input:not(:disabled)){border-color:",";}&:focus-within{border:solid 1px ",";background-color:",";}"],({$invalid:e,theme:t})=>e?t.colors.alert:t.colors.bg2,e=>e.theme.radius,e=>e.hasPrefix?`${e.theme.margin/2}rem`:"0",e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.bg),hx=Kt(["height:2rem;flex:1;color:",";font-size:1em;padding:","rem;border:none;--webkit-appearance:none;box-shadow:none;display:block;background-color:",";border:solid 1px ",";outline:none;box-sizing:border-box;border-top-left-radius:",";border-bottom-left-radius:",";transition:border 100ms ease-in-out;&:disabled{background-color:",";border-color:",";color:",";}&:last-child{border-radius:",";}"],e=>e.theme.colors.text,e=>e.theme.margin/2,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.bg1,e=>e.theme.colors.textLight,e=>e.theme.radius),nt=C.input.withConfig({displayName:"InputStyles__InputStyled",componentId:"sc-1ce1df27-5"})(["",""],hx),jq=C.textarea.withConfig({displayName:"InputStyles__TextAreaStyled",componentId:"sc-1ce1df27-6"})([""," min-height:5rem;height:unset;"],hx),vn=C.div.withConfig({displayName:"InputStyles__ErrMessage",componentId:"sc-1ce1df27-7"})(["font-size:0.8em;line-height:1rem;color:",";margin-bottom:","rem;"],e=>e.theme.colors.alert,e=>e.theme.margin),Zv=C.span.withConfig({displayName:"InputStyles__InlineErrMessage",componentId:"sc-1ce1df27-8"})(["font-size:0.8em;line-height:1rem;color:",";"],e=>e.theme.colors.alert),kq=C.div.withConfig({displayName:"InputStyles__InputOverlay",componentId:"sc-1ce1df27-9"})([""," position:absolute;pointer-events:none !important;border:transparent;line-height:1rem;width:100%;border-color:rgba(0,0,0,0);"],hx),Eq="modulepreload",_q=function(e){return"/"+e},E6={},hc=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(n.map(l=>{if(l=_q(l),l in E6)return;E6[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Eq,c||(d.as="script",d.crossOrigin=""),d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),c)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}return o.then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})},Iq=f.lazy(()=>hc(()=>import("./chunk_EmojiInput.js"),[]));function mE(e){return a.jsx(f.Suspense,{fallback:a.jsx(Rq,{}),children:a.jsx(Iq,{...e})})}const Rq=C.span.withConfig({displayName:"EmojiInput__Fallback",componentId:"sc-ccc5a278-0"})(["display:inline-block;width:2rem;height:2rem;"]);function gE({parent:e,onNewTag:t}){const n=Ce(),[r,o]=f.useState(""),[i,s]=f.useState(),[l,c]=f.useState(0),u=f.useCallback(async()=>{const h=await n.buildUniqueSubjectFromParts(["tag",r],e),m=await n.newResource({subject:h,parent:e,isA:X.classes.tag,propVals:{[E.properties.shortname]:r,[X.properties.color]:xq(px)}});i&&await m.set(X.properties.emoji,i),t(m),o(""),s(void 0),c(v=>v+1)},[e,n,r,i,t]),d=f.useCallback(h=>{o(lo(h.target.value))},[]),p=f.useCallback(h=>{h.key==="Enter"&&(h.preventDefault(),u())},[u]);return a.jsxs(be,{children:[a.jsxs(Je,{children:[a.jsx(mE,{onChange:s},l),a.jsx(nt,{placeholder:"New tag",value:r,onChange:d,onKeyDown:p})]}),a.jsx(oe,{title:"Add tag",onClick:u,disabled:!r,children:a.jsx(ur,{})})]})}function Aq({subject:e}){return a.jsx(Pq,{children:a.jsx(Em,{subject:e})})}const Pq=C.span.withConfig({displayName:"TagInline__TagWrapper",componentId:"sc-4ed0d003-0"})(["display:inline-block;padding-block:2px;"]),vE=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/bmp","image/tiff","image/vnd.microsoft.icon","image/vnd.adobe.photoshop","image/heic","image/heif","image/heif-sequence","image/heic-sequence","image/avif","image/avif-sequence"]),Tq=new Set(["application/zip","application/x-7z-compressed","application/x-rar-compressed","application/x-tar","application/x-gzip","application/x-bzip2","application/x-xz","application/x-lzip","application/x-lzma","application/x-lzop","application/vnd.rar","application/x-rar-compressed"]),Dq=new Set(["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-word.document.macroEnabled.12"]),Nq=new Set(["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]);function yE(e){return e==="application/pdf"?D$:Dq.has(e)?O$:Nq.has(e)?P$:Tq.has(e)?I$:e==="text/csv"?A$:e.startsWith("audio/")?R$:e.startsWith("video/")?N$:e.startsWith("image/")?T$:e!=null&&e.startsWith("text/")?_$:xk}const lh="2rem";function Oq({subject:e}){const t=q(e),[n]=ne(t,Ne.properties.filename),[r]=ne(t,Ne.properties.mimetype),o=vE.has(r??""),i=yE(r??"");return a.jsxs(Lq,{children:[o?a.jsx(zq,{subject:e,alt:t.title,loading:"lazy",sizeIndication:lh}):a.jsx(i,{}),n]})}const Lq=C.span.withConfig({displayName:"FileInline__Wrapper",componentId:"sc-84d8f97c-0"})(["display:inline-flex;align-items:center;height:",";gap:0.7ch;& svg{font-size:1rem;}"],lh),zq=C(cb).withConfig({displayName:"FileInline__Img",componentId:"sc-84d8f97c-1"})(["object-fit:cover;border-radius:5px;height:",";width:",";"],lh,lh);function Fq(e){if(HO(e))switch(e.type){case yi.NotFound:return"Resource not found";case yi.Unauthorized:return"Unauthorized";case yi.Server:return"Server error";case yi.Client:return"Something went wrong"}else return"Error loading resource"}function Lt({subject:e,untabbable:t,basic:n,className:r}){const o=q(e,{allowIncomplete:!0}),[i]=we(o,E.properties.isA),s=n?_6:Mq.get(i[0])??_6;return e?o.error?a.jsx(Me,{subject:e,untabbable:t,children:a.jsx(yt,{about:e,title:o.error.message,children:Fq(o.error)})}):o.loading?a.jsx(_k,{about:e,children:"loading..."}):Bt.isValidSubject(e)?a.jsx(Me,{subject:e,untabbable:t,className:r,children:a.jsx(s,{subject:e})}):a.jsxs(yt,{children:[e," is not a valid subject."]}):a.jsx(yt,{children:"No subject passed"})}function _6({subject:e}){const t=q(e),[n]=ne(t,E.properties.description);return a.jsx("span",{title:n||"",children:t.title})}const Mq=new Map([[X.classes.tag,Aq],[Ne.classes.file,Oq]]);function $q({subject:e}){const t=q(e);return e===ut?a.jsx(I6,{children:a.jsx(yt,{children:"Insufficient rights to view resource"})}):t.hasClasses(qn.classes.commit)?a.jsx(a.Fragment,{}):a.jsx(I6,{children:a.jsx(Lt,{subject:e})})}const I6=C.li.withConfig({displayName:"UsageRow__ListItem",componentId:"sc-19b709c7-0"})(["display:flex;align-items:center;list-style:none;padding:0.5rem 1rem;border-radius:",";margin:0;height:3rem;&:nth-child(odd){background-color:",";}"],({theme:e})=>e.radius,({theme:e})=>e.colors.bg1);function ia({collection:e,title:t,initialOpenState:n=!1}){const[r,o]=f.useState(0),[i,s]=f.useState(n),l=UL(e,r),c=a.jsxs(be,{center:!0,children:[a.jsx(ot,{title:"Previous page",onClick:()=>o(u=>u-1),disabled:r===0,children:a.jsx(FM,{})}),a.jsx(Wq,{children:r+1}),a.jsx(ot,{title:"Next page",onClick:()=>o(u=>u+1),disabled:r===e.totalPages-1,children:a.jsx(MM,{})})]});return a.jsx(Bq,{children:a.jsx(oa,{noIndent:!0,title:a.jsxs(be,{justify:"space-between",children:[a.jsx("span",{children:t}),i&&c]}),initialState:n,onStateToggle:s,children:a.jsxs(Uq,{children:[a.jsx(Hq,{children:Array.from(new Set(l)).map(u=>a.jsx($q,{subject:u},u))}),a.jsx(be,{justify:"end",children:c})]})})})}const Bq=C.div.withConfig({displayName:"UsageCard__DetailsCard",componentId:"sc-7f04cd01-0"})(["border:1px solid ",";border-radius:",";padding:","rem;background-color:",";"],({theme:e})=>e.colors.bg2,({theme:e})=>e.radius,({theme:e})=>e.margin,({theme:e})=>e.colors.bg),Hq=C.ul.withConfig({displayName:"UsageCard__List",componentId:"sc-7f04cd01-1"})(["margin:0;padding:0;"]),Uq=C(ge).withConfig({displayName:"UsageCard__ContentWrapper",componentId:"sc-7f04cd01-2"})(["margin-top:","rem;"],({theme:e})=>e.margin),Wq=C.span.withConfig({displayName:"UsageCard__PageNumber",componentId:"sc-7f04cd01-3"})(["color:",";"],({theme:e})=>e.colors.textLight);function mx({resource:e}){const{collection:t}=Qo({property:pe.parent,value:e.getSubject()});return t.totalMembers===0?a.jsx(a.Fragment,{}):a.jsx(ia,{collection:t,title:a.jsxs("span",{children:["This resource has ",a.jsx("strong",{children:t.totalMembers})," children"]})})}function Vq({resource:e}){const{collection:t}=Qo({property:e.getSubject()}),{collection:n}=Qo({property:pe.requires,value:e.getSubject()}),{collection:r}=Qo({property:pe.recommends,value:e.getSubject()}),o=t.totalMembers,i=n.totalMembers,s=r.totalMembers;return a.jsxs(ge,{children:[a.jsx(mx,{resource:e}),o>0&&a.jsx(ia,{collection:t,title:a.jsxs("span",{children:[a.jsx("strong",{children:o})," resources have a ",e.title," ","property"]})}),i>0&&a.jsx(ia,{collection:n,title:a.jsxs("span",{children:[a.jsx("strong",{children:i})," classes require this property"]})}),s>0&&a.jsx(ia,{collection:r,title:a.jsxs("span",{children:[a.jsx("strong",{children:s})," classes recommend this property"]})})]})}function qq({resource:e}){const{collection:t}=Qo({property:pe.isA,value:e.getSubject()}),{collection:n}=Qo({property:pe.classType,value:e.getSubject()}),r=t.totalMembers,o=n.totalMembers,i=r+o;return a.jsxs(ge,{children:[a.jsx(mx,{resource:e}),i===0&&"No usage of class found.",r>0&&a.jsx(ia,{collection:t,title:a.jsxs("span",{children:[a.jsx("strong",{children:r})," resources are an instance of"," ",e.title]})}),o>0&&a.jsx(ia,{collection:n,title:a.jsxs("span",{children:[a.jsx("strong",{children:o})," properties have ",e.title," ","as a classtype."]})})]})}function bE({resource:e,initialOpenState:t}){const{collection:n}=Qo({value:e.subject});return a.jsx(ia,{initialOpenState:t,collection:n,title:a.jsxs("span",{children:[a.jsx("strong",{children:n.totalMembers})," resources reference"," ",e.title]})})}function gx({resource:e}){return e.hasClasses(E.classes.property)?a.jsx(Vq,{resource:e}):e.hasClasses(E.classes.class)?a.jsx(qq,{resource:e}):a.jsx(Gq,{resource:e})}function Gq({resource:e}){return a.jsxs(ge,{children:[a.jsx(mx,{resource:e}),a.jsx(bE,{resource:e})]})}function yr({checked:e,onChange:t,...n}){const r=o=>{t(o.target.checked)};return a.jsx(Kq,{type:"checkbox",checked:e,onChange:r,...n})}const Kq=C.input.withConfig({displayName:"Checkbox__InputCheckBox",componentId:"sc-6781ec48-0"})(["--inset:1px;--size:calc(100% - (var(--inset) * 2));background-color:",";border:1px solid ",";width:1rem;height:1rem;border-radius:3px;position:relative;&:checked{border:none;}&:checked::before{content:'';position:absolute;inset:0;width:100%;height:100%;border-radius:2px;background-color:",";}&:checked::after{--inset:3px;--size:calc(100% - (var(--inset) * 2));content:'';position:absolute;inset:var(--inset);width:var(--size);height:var(--size);background-color:",";clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.main,e=>e.theme.colors.bg),Ko=C.label.withConfig({displayName:"Checkbox__CheckboxLabel",componentId:"sc-6781ec48-1"})(["display:flex;align-items:center;gap:0.5rem;cursor:pointer;justify-content:flex-start;user-select:none;"]);var ko;(function(e){e.React="react",e.Other="other"})(ko||(ko={}));const R6=e=>{const t=e.replace(/-([a-z])/g,n=>n[1].toUpperCase());return t.charAt(0).toLowerCase()+t.slice(1)},A6=e=>e.replace(/(^\w|-\w)/g,t=>t.replace(/-/,"").toUpperCase());function nr(e,...t){const n=typeof e=="string"?e:"",o=(typeof e=="string"?t:[e,...t]).reduce((s,l)=>{if(!l)return s;const c=Array.isArray(l.name)?l.name:[l.name];return{...s,[l.file]:Array.from(new Set([...s[l.file]??[],...c]))}},{}),i=Object.entries(o).sort(([s],l)=>s.startsWith("./")?1:-1).map(([s,l])=>`${n}import ${Yq(n,l)} from '${s}';`).join(`
`);return i?`${i}
`:""}const Yq=(e,t)=>t.length>3?`{
${e} ${t.join(`,
`+e)},
${e}}`:`{ ${t.join(", ")} }`;var Ji;(function(e){e.JS="js",e.TS="ts",e.JSX="jsx",e.TSX="tsx",e.Svelte="svelte",e.SvelteTS="svelte-ts"})(Ji||(Ji={}));const Xq=new Set(["https://atomicdata.dev/ontology/core","https://atomicdata.dev/ontology/commit","https://atomicdata.dev/ontology/collections","https://atomicdata.dev/ontology/data-browser","https://atomicdata.dev/ontology/server"]);class xE{constructor(t,n){this.store=t,this.resource=n}generateWithOptions({language:t,property:n}){switch(t){case"js":return n?this.generateJSCodeWithPropUsage(n):this.generateJSCodeBasic();case"ts":return n?this.generateTSCodeWithPropUsage(n):this.generateTSCodeBasic();case"jsx":return n?this.generateJSXCodeWithPropUsage(n):this.generateJSXCodeBasic();case"tsx":return n?this.generateTSXCodeWithPropUsage(n):this.generateTSXCodeBasic();case"svelte":return n?this.generateSvelteCodeWithPropUsage(n):this.generateSvelteCodeBasic();case"svelte-ts":return n?this.generateSvelteTSCodeWithPropUsage(n):this.generateSvelteTSCodeBasic();default:throw new Error("Invalid language")}}async getPropertyOntology(t,{env:n=ko.Other,resourceVarName:r="resource"}={}){const o=await this.getReferencedOntology(t,"property");if(!o)return{propSubjectRef:`'${t}'`,resourceShorthand:void 0,propImport:void 0};const[i,s]=await Promise.all([this.store.getResource(t),this.store.getResource(o)]),l=R6(s.title),c=R6(i.props.shortname);return{propImport:this.isOntologyIncludedInLib(s.subject)?{name:l,file:P6(n)}:{name:l,file:"./ontologies"},propSubjectRef:`${l}.properties.${c}`,resourceShorthand:`${r}.props.${c}`}}async getClassOntology(t,n=ko.Other){const r=await this.getReferencedOntology(t,"class");if(!r)return{classImport:void 0,genericName:void 0};const[o,i]=await Promise.all([this.store.getResource(t),this.store.getResource(r)]),s=A6(i.title),l=A6(o.title),c=this.isOntologyIncludedInLib(i.subject)?`<${s}.${l}>`:`<${l}>`;return{classImport:this.isOntologyIncludedInLib(i.subject)?{name:`type ${s}`,file:P6(n)}:{name:`type ${l}`,file:"./ontologies"},genericName:c}}async getReferencedOntology(t,n){const r=new URL(t).origin,o=await new tb(this.store,r).setProperty(n==="property"?E.properties.properties:E.properties.classes).setValue(t).buildAndFetch();try{return await o.getMemberWithIndex(0)}catch{return}}async getHookForProperty(t){switch((await this.store.getResource(t)).props.datatype){case Y.STRING:case Y.SLUG:case Y.MARKDOWN:case Y.DATE:return"useString";case Y.BOOLEAN:return"useBoolean";case Y.INTEGER:case Y.FLOAT:case Y.TIMESTAMP:return"useNumber";case Y.ATOMIC_URL:return"useSubject";case Y.RESOURCEARRAY:return"useArray";default:return"useValue"}}isOntologyIncludedInLib(t){return Xq.has(t)}}const P6=e=>e===ko.React?"@tomic/react":"@tomic/lib",Qq=f.lazy(()=>hc(()=>import("./chunk_HighlightedCodeBlock.js"),__vite__mapDeps([0,1])));function Jq({children:e,...t}){return a.jsx(f.Suspense,{fallback:a.jsx("div",{children:"Loading..."}),children:a.jsx(Qq,{...t,children:e})})}function Zq(e){const t=e+"CollectionProvider",[n,r]=cc(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:g}=m,b=ce.useRef(null),y=ce.useRef(new Map).current;return a.jsx(o,{scope:v,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const l=e+"CollectionSlot",c=ce.forwardRef((m,v)=>{const{scope:g,children:b}=m,y=i(l,g),x=On(v,y.collectionRef);return a.jsx(Gu,{ref:x,children:b})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ce.forwardRef((m,v)=>{const{scope:g,children:b,...y}=m,x=ce.useRef(null),w=On(v,x),S=i(u,g);return ce.useEffect(()=>(S.itemMap.set(x,{ref:x,...y}),()=>void S.itemMap.delete(x))),a.jsx(Gu,{[d]:"",ref:w,children:b})});p.displayName=u;function h(m){const v=i(e+"CollectionConsumer",m);return ce.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((S,k)=>y.indexOf(S.ref.current)-y.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},h,r]}var eG=f.createContext(void 0);function vx(e){const t=f.useContext(eG);return e||t||"ltr"}var A0="rovingFocusGroup.onEntryFocus",tG={bubbles:!1,cancelable:!0},_m="RovingFocusGroup",[ey,wE,nG]=Zq(_m),[rG,SE]=cc(_m,[nG]),[oG,iG]=rG(_m),CE=f.forwardRef((e,t)=>a.jsx(ey.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(ey.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(sG,{...e,ref:t})})}));CE.displayName=_m;var sG=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=e,h=f.useRef(null),m=On(t,h),v=vx(i),[g=null,b]=ex({prop:s,defaultProp:l,onChange:c}),[y,x]=f.useState(!1),w=Hn(u),S=wE(n),k=f.useRef(!1),[_,I]=f.useState(0);return f.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(A0,w),()=>P.removeEventListener(A0,w)},[w]),a.jsx(oG,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:f.useCallback(P=>b(P),[b]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>I(P=>P+1),[]),onFocusableItemRemove:f.useCallback(()=>I(P=>P-1),[]),children:a.jsx(nn.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:Rt(e.onMouseDown,()=>{k.current=!0}),onFocus:Rt(e.onFocus,P=>{const z=!k.current;if(P.target===P.currentTarget&&z&&!y){const D=new CustomEvent(A0,tG);if(P.currentTarget.dispatchEvent(D),!D.defaultPrevented){const F=S().filter(ue=>ue.focusable),$=F.find(ue=>ue.active),Z=F.find(ue=>ue.id===g),W=[$,Z,...F].filter(Boolean).map(ue=>ue.ref.current);EE(W,d)}}k.current=!1}),onBlur:Rt(e.onBlur,()=>x(!1))})})}),jE="RovingFocusGroupItem",kE=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,l=Vb(),c=i||l,u=iG(jE,n),d=u.currentTabStopId===c,p=wE(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return f.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),a.jsx(ey.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:a.jsx(nn.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Rt(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:Rt(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Rt(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=cG(v,u.orientation,u.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=p().filter(x=>x.focusable).map(x=>x.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const x=y.indexOf(v.currentTarget);y=u.loop?uG(y,x+1):y.slice(x+1)}setTimeout(()=>EE(y))}})})})});kE.displayName=jE;var aG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function lG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function cG(e,t,n){const r=lG(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aG[r]}function EE(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function uG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dG=CE,pG=kE,yx="Tabs",[fG,j0e]=cc(yx,[SE]),_E=SE(),[hG,bx]=fG(yx),IE=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=vx(l),[p,h]=ex({prop:r,onChange:o,defaultProp:i});return a.jsx(hG,{scope:n,baseId:Vb(),value:p,onValueChange:h,orientation:s,dir:d,activationMode:c,children:a.jsx(nn.div,{dir:d,"data-orientation":s,...u,ref:t})})});IE.displayName=yx;var RE="TabsList",AE=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=bx(RE,n),s=_E(n);return a.jsx(dG,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:a.jsx(nn.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});AE.displayName=RE;var PE="TabsTrigger",TE=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=bx(PE,n),l=_E(n),c=OE(s.baseId,r),u=LE(s.baseId,r),d=r===s.value;return a.jsx(pG,{asChild:!0,...l,focusable:!o,active:d,children:a.jsx(nn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...i,ref:t,onMouseDown:Rt(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(r):p.preventDefault()}),onKeyDown:Rt(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(r)}),onFocus:Rt(e.onFocus,()=>{const p=s.activationMode!=="manual";!d&&!o&&p&&s.onValueChange(r)})})})});TE.displayName=PE;var DE="TabsContent",NE=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,l=bx(DE,n),c=OE(l.baseId,r),u=LE(l.baseId,r),d=r===l.value,p=f.useRef(d);return f.useEffect(()=>{const h=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(h)},[]),a.jsx(Ds,{present:o||d,children:({present:h})=>a.jsx(nn.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:h&&i})})});NE.displayName=DE;function OE(e,t){return`${e}-trigger-${t}`}function LE(e,t){return`${e}-content-${t}`}var mG=IE,gG=AE,vG=TE,yG=NE;const zE=({children:e,tabs:t,label:n,className:r})=>a.jsxs(mG,{defaultValue:t[0].value,className:r,children:[a.jsx(bG,{"aria-label":n,children:t.map(o=>a.jsx(xG,{value:o.value,children:o.label},o.value))}),e]}),ty=({value:e,className:t,children:n})=>a.jsx(yG,{className:t,value:e,children:n}),bG=C(gG).withConfig({displayName:"Tabs__TabList",componentId:"sc-56dc48d5-0"})(["display:flex;justify-content:space-evenly;margin-bottom:","rem;"],e=>e.theme.margin),xG=C(vG).withConfig({displayName:"Tabs__TabButton",componentId:"sc-56dc48d5-1"})(["background:none;border:none;color:",";border-bottom:1px solid ",";padding:1rem;flex:1;"," cursor:pointer;&:hover,&:focus-visible{outline:none;background:",";}&[data-state='active']{border-bottom:2px solid ",";}"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,Yt("background","border-bottom"),e=>e.theme.colors.bg1,e=>e.theme.colors.main);var ch;(function(e){e[e.Plain=0]="Plain",e[e.Button=1]="Button"})(ch||(ch={}));function ul({to:e,children:t,variant:n=0}){const r=n===1?SG:wG;return a.jsxs(r,{href:e,target:"_blank",rel:"noreferrer",children:[t,a.jsx(_b,{})]})}const wG=C.a.withConfig({displayName:"ExternalLink__ExternalLinkPlain",componentId:"sc-85059f78-0"})(["display:inline-flex;align-items:center;gap:0.6ch;color:",";text-decoration:none;"],e=>e.theme.colors.main),SG=C.a.withConfig({displayName:"ExternalLink__ExternalLinkButton",componentId:"sc-85059f78-1"})(["padding-inline:0.8rem;padding-block:0.4rem;width:fit-content;background-color:",";border:1.5px solid ",";border-radius:",";text-decoration:none;gap:1ch;display:flex;align-items:center;font-weight:600;justify-content:center;color:",";white-space:nowrap;transition:0.1s transform,0.1s background-color,0.1s box-shadow,0.1s color;&:hover,&:focus-within{background-color:",";color:white;}"],e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.main),CG=[{label:"Vanilla",value:"vanilla"},{label:"React",value:"react"},{label:"Svelte",value:"svelte"}];function jG({generator:e,property:t,ts:n}){return a.jsxs(kG,{label:"syntax",tabs:CG,children:[a.jsxs(T0,{value:"vanilla",children:[a.jsx(P0,{codePromise:e.generateWithOptions({language:n?Ji.TS:Ji.JS,property:t})}),a.jsxs("span",{children:["Read the"," ",a.jsx(ul,{to:"https://docs.atomicdata.dev/js",children:"@tomic/lib docs"})," ","for more info."]})]}),a.jsxs(T0,{value:"react",children:[a.jsx(P0,{codePromise:e.generateWithOptions({language:n?Ji.TSX:Ji.JSX,property:t})}),a.jsxs("span",{children:["Read the"," ",a.jsx(ul,{to:"https://docs.atomicdata.dev/usecases/react",children:"@tomic/react docs"})," ","for more info."]})]}),a.jsxs(T0,{value:"svelte",children:[a.jsx(P0,{codePromise:e.generateWithOptions({language:n?Ji.SvelteTS:Ji.Svelte,property:t})}),a.jsxs("span",{children:["Read the"," ",a.jsx(ul,{to:"https://docs.atomicdata.dev/svelte",children:"@tomic/svelte docs"})," ","for more info."]})]}),a.jsxs("span",{children:["Read more about generating schema's using"," ",a.jsx(ul,{to:"https://docs.atomicdata.dev/js-cli",children:"@tomic/cli"}),"."]})]})}function P0({codePromise:e}){const[t,n]=f.useState([]);return f.useEffect(()=>{e.then(n)},[e]),a.jsx(ge,{children:t.map((r,o)=>a.jsx(EG,{code:r},o))})}const kG=C(zE).withConfig({displayName:"CodeUsage__StyledTabs",componentId:"sc-17a33ff1-0"})(["display:flex;flex-direction:column;flex:1;"]),T0=C(ty).withConfig({displayName:"CodeUsage__StyledTabPanel",componentId:"sc-17a33ff1-1"})(["flex:1;flex-direction:column;max-width:var(",");&[data-state='active']{display:grid;grid-template-rows:1fr 1.5rem;height:min-content;gap:1rem;}"],ux),EG=C(Jq).withConfig({displayName:"CodeUsage__StyledHiglightedCodeBlock",componentId:"sc-17a33ff1-2"})(["max-width:var(",");"],ux),FE=({children:e,className:t,...n})=>a.jsx(_G,{className:t,children:a.jsx(IG,{disabled:!!n.disabled,children:a.jsx(RG,{...n,children:e})})}),_G=C(Je).withConfig({displayName:"BasicSelect__StyledInputWrapper",componentId:"sc-d796372b-0"})(["min-width:15ch;"]),IG=C.span.withConfig({displayName:"BasicSelect__SelectWrapper",componentId:"sc-d796372b-1"})(["width:100%;padding-inline:0.5rem;background-color:",";position:relative;&:after{content:'▾';position:absolute;display:flex;right:0.5rem;top:0;height:100%;align-items:center;pointer-events:none;color:",";}"],e=>e.disabled?e.theme.colors.bg1:e.theme.colors.bg,e=>e.theme.colors.textLight),RG=C.select.withConfig({displayName:"BasicSelect__Select",componentId:"sc-d796372b-2"})(["cursor:pointer;appearance:none;width:100%;border:none;outline:none;height:2rem;background-color:transparent;color:",";&:disabled{color:",";background-color:transparent;}"],e=>e.theme.colors.text,e=>e.theme.colors.textLight);function AG({classSubject:e,onPropSelect:t}){const n=q(e),r=f.useMemo(()=>[...n.props.requires??[],...n.props.recommends??[]],[n.props.requires,n.props.recommends]),o=fa(r);return a.jsxs(FE,{onChange:i=>t(i.target.value),defaultValue:"",children:[a.jsx("option",{value:"",children:"None"}),a.jsx("hr",{}),Array.from(o.entries()).map(([i,s])=>a.jsx("option",{value:i,children:s.title},i))]})}class PG extends xE{async generateJSCodeBasic(){return[`const resource = await store.getResource('${this.resource.subject}');`]}async generateJSCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t);return[`${nr(n)}${await this.generateJSCodeBasic()}
const value = resource.get(${r});
`]}async generateTSCodeBasic(){const{classImport:t,genericName:n}=await this.getClassOntology(this.resource.getClasses()[0]);return[`${nr(t)}const resource = await store.getResource${n??""}('${this.resource.subject}');`]}async generateTSCodeWithPropUsage(t){const{resourceShorthand:n}=await this.getPropertyOntology(t);return[`${await this.generateTSCodeBasic()}
const value = ${n??`resource.get('${t}')`};
`]}async generateJSXCodeBasic(){return[`${nr({name:"useResource",file:"@tomic/react"})}const Component = () => {
const resource = useResource('${this.resource.subject}');
return <div>{resource.title}</div>;
}`]}async generateJSXCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t,{env:ko.React}),o=await this.getHookForProperty(t);return[`${nr({name:[o,"useResource"],file:"@tomic/react"},n)}
const Component = () => {
const resource = useResource('${this.resource.subject}');
const [value] = ${o}(resource, ${r});
return <div>{value}</div>;
}`]}async generateTSXCodeBasic(){return this.generateJSXCodeBasic()}async generateTSXCodeWithPropUsage(t){const{propSubjectRef:n,resourceShorthand:r}=await this.getPropertyOntology(t,{env:ko.React}),{classImport:o,genericName:i}=await this.getClassOntology(this.resource.getClasses()[0],ko.React),s=await this.getHookForProperty(t),l=nr(r?void 0:{name:s,file:"@tomic/react"},{name:"useResource",file:"@tomic/react"},o),c=r?`
return <div>{${r}}</div>;`:` const [value] = ${s}(resource, ${n});
return <div>{value}</div>;`;return[`${l}
const Component = () => {
const resource = useResource${i}('${this.resource.subject}');
${c}
}`]}async generateSvelteCodeBasic(){return[`<script>
${nr({name:"getResource",file:"@tomic/svelte"})}
let resource = getResource('${this.resource.subject}');
<\/script>
<div>{$resource.title}</div> `]}async generateSvelteCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t);return[`<script>
${nr(" ",{name:"getResource",file:"@tomic/svelte"},{name:"getValue",file:"@tomic/svelte"},n)}
let resource = getResource('${this.resource.subject}');
let value = getValue(resource, ${r});
<\/script>
<div>{$value}</div>`]}async generateSvelteTSCodeBasic(){return[`<script lang='ts'>
${nr({name:"getResource",file:"@tomic/svelte"})}
let resource = getResource('${this.resource.subject}');
<\/script>
<div>{$resource.title}</div>`]}async generateSvelteTSCodeWithPropUsage(t){const{classImport:n,genericName:r}=await this.getClassOntology(this.resource.getClasses()[0]),{propImport:o,propSubjectRef:i,resourceShorthand:s}=await this.getPropertyOntology(t),l=nr(" ",n,{name:"getResource",file:"@tomic/svelte"},{name:"getValue",file:"@tomic/svelte"},s?void 0:o),c=s?"":`
let value = getValue(resource, ${i});`;return[`<script lang='ts'>
${l}
let resource = getResource${r}('${this.resource.subject}');${c}
<\/script>
<div>{${s??"$value"}}</div> `]}}class TG extends xE{constructor(t,n){super(t,n),this.store=t,this.resource=n}async generateJSCodeBasic(){return[`import { CollectionBuilder, core, commits } from '@tomic/lib';
// Create a collection containing the children of the table
const table = new CollectionBuilder(store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
// Iterate over the collection, fetch the children and log their title
// Check the docs on how to use collection for other use cases like pagenation
for await (const rowSubject of table) {
const row = await store.getResource(rowSubject);
console.log(row.title);
}`]}async generateJSCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t);return[`${nr({name:"CollectionBuilder",file:"@tomic/lib"},{name:"core",file:"@tomic/lib"},{name:"commits",file:"@tomic/lib"},n)}
// Create a collection containing the children of the table
const table = new CollectionBuilder(store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
// Iterate over the collection, fetch the children and log a value
// Check the docs on how to use collection for other use cases like pagenation
for await (const rowSubject of table) {
const row = await store.getResource(rowSubject);
const value = row.get(${r});
console.log(\`\${row.title}: \${value}\`);
}`]}async generateTSCodeBasic(){return this.generateJSCodeBasic()}async generateTSCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r,resourceShorthand:o}=await this.getPropertyOntology(t,{resourceVarName:"row"}),{classImport:i,genericName:s}=await this.getClassOntology(this.resource.props.classtype),l=nr({name:"CollectionBuilder",file:"@tomic/lib"},{name:"core",file:"@tomic/lib"},{name:"commits",file:"@tomic/lib"},o?void 0:n,i),c=o?` console.log(\`\${row.title}: \${${o}}\`);`:` const value = row.get(${r});
console.log(value);`;return[`${l}
// Create a collection containing the children of the table
const table = new CollectionBuilder(store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
// Iterate over the collection, fetch the children and log a value
// Check the docs on how to use collection for other use cases like pagenation
for await (const rowSubject of table) {
const row = await store.getResource${s}(rowSubject);
${c}
}`]}async generateJSXCodeBasic(){return[`import {
commits,
core,
useCollection,
useCollectionPage,
useResource,
} from '@tomic/react';
import { useState } from 'react';
const Component = () => {
const [page, setPage] = useState(0);
const { collection } = useCollection({
property: core.properties.parent,
value: '${this.resource.subject}',
sort_by: commits.properties.createdAt,
});
const rows = useCollectionPage(collection, page);
return (
<>
<ul>
{rows.map(row => (
<Row key={row} subject={row} />
))}
</ul>
<button onClick={() => setPage(p => p - 1)}>Prev</button>
<button onClick={() => setPage(p => p + 1)}>Next</button>
</>
);
};
const Row = ({ subject }) => {
const resource = useResource(subject);
return <li>{resource.title}</li>;
};`]}async generateJSXCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t,{env:ko.React}),o=await this.getHookForProperty(t);return[`${nr({name:[o,"commits","useResource","core","useCollection","useCollectionPage"],file:"@tomic/react"},{name:"useState",file:"react"},n)}
const Component = () => {
const [page, setPage] = useState(0);
const { collection } = useCollection({
property: core.properties.parent,
value: '${this.resource.subject}',
sort_by: commits.properties.createdAt,
});
const rows = useCollectionPage(collection, page);
return (
<>
<ul>
{rows.map(row => (
<Row key={row} subject={row} />
))}
</ul>
<button onClick={() => setPage(p => p - 1)}>Prev</button>
<button onClick={() => setPage(p => p + 1)}>Next</button>
</>
);
};
const Row = ({ subject }) => {
const row = useResource(subject);
const [value] = ${o}(row, ${r});
return <li>{resource.title}: {value}</li>;
};`]}async generateTSXCodeBasic(){return this.generateJSXCodeBasic()}async generateTSXCodeWithPropUsage(t){const{propSubjectRef:n,resourceShorthand:r}=await this.getPropertyOntology(t,{env:ko.React,resourceVarName:"row"}),{classImport:o,genericName:i}=await this.getClassOntology(this.resource.getClasses()[0],ko.React),s=await this.getHookForProperty(t),l=nr(r?void 0:{name:s,file:"@tomic/react"},{name:["commits","useResource","core","useCollection","useCollectionPage"],file:"@tomic/react"},{name:"useState",file:"react"},o),c=r?`
return <li>{row.title}: {${r}}</div>;`:` const [value] = ${s}(resource, ${n});
return <li>{row.title}: {value}</li>;`;return[`${l}
const Component = () => {
const [page, setPage] = useState(0);
const { collection } = useCollection({
property: core.properties.parent,
value: '${this.resource.subject}',
sort_by: commits.properties.createdAt,
});
const rows = useCollectionPage(collection, page);
return (
<>
<ul>
{rows.map(row => (
<Row key={row} subject={row} />
))}
</ul>
<button onClick={() => setPage(p => p - 1)}>Prev</button>
<button onClick={() => setPage(p => p + 1)}>Next</button>
</>
);
};
const Row = ({ subject }: { subject: string }) => {
const row = useResource${i}(subject);
${c}
};`]}async generateSvelteCodeBasic(){return[`// Component.svelte
<script>
import { CollectionBuilder } from '@tomic/lib';
import { store } from '@tomic/svelte';
let page = 0;
let items = [];
// Create a collection containing the children of the table
const table = new CollectionBuilder($store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
$: table.getMembersOnPage(page).then(members => {
items = members;
});
<\/script>
<ul>
{#each items as item (item)}
<li>
<Item subject={item} />
</li>
{/each}
</ul>
<button on:click={() => page -= 1}>Prev</button>
<button on:click={() => page += 1}>Next</button>`,`// Item.svelte
<script>
import { getResource } from '@tomic/svelte';
export let subject: string;
let resource = getResource(subject);
<\/script>
<span>{$resource.title}</span>`]}async generateSvelteCodeWithPropUsage(t){const{propImport:n,propSubjectRef:r}=await this.getPropertyOntology(t),o=nr(" ",{name:"getResource",file:"@tomic/svelte"},{name:"getValue",file:"@tomic/svelte"},n);return[`// Component.svelte
<script>
import { CollectionBuilder } from '@tomic/lib';
import { store } from '@tomic/svelte';
let page = 0;
let items = [];
// Create a collection containing the children of the table
const table = new CollectionBuilder($store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
$: table.getMembersOnPage(page).then(members => {
items = members;
});
<\/script>
<ul>
{#each items as item (item)}
<li>
<Item subject={item} />
</li>
{/each}
</ul>
<button on:click={() => page -= 1}>Prev</button>
<button on:click={() => page += 1}>Next</button>`,`// Item.svelte
<script>
${o}
export let subject: string;
let resource = getResource(subject);
let value = getValue(resource, ${r});
<\/script>
<span>{$resource.title}: {$value}</span>`]}async generateSvelteTSCodeBasic(){return[`// Component.svelte
<script lang='ts'>
import { CollectionBuilder } from '@tomic/lib';
import { store } from '@tomic/svelte';
let page = 0;
let items = [];
// Create a collection containing the children of the table
const table = new CollectionBuilder($store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
$: table.getMembersOnPage(page).then(members => {
items = members;
});
<\/script>
<ul>
{#each items as item (item)}
<li>
<Item subject={item} />
</li>
{/each}
</ul>
<button on:click={() => page -= 1}>Prev</button>
<button on:click={() => page += 1}>Next</button>`,`// Item.svelte
<script lang='ts'>
import { getResource } from '@tomic/svelte';
export let subject: string;
let resource = getResource(subject);
<\/script>
<span>{$resource.title}</span>`]}async generateSvelteTSCodeWithPropUsage(t){const{classImport:n,genericName:r}=await this.getClassOntology(this.resource.props.classtype),{propImport:o,propSubjectRef:i,resourceShorthand:s}=await this.getPropertyOntology(t),l=nr(" ",n,{name:"getResource",file:"@tomic/svelte"},{name:"getValue",file:"@tomic/svelte"},s?void 0:o),c=s?"":`
let value = getValue(resource, ${i});`;return[`// Component.svelte
<script lang='ts'>
import { CollectionBuilder } from '@tomic/lib';
import { store } from '@tomic/svelte';
let page = 0;
let items = [];
// Create a collection containing the children of the table
const table = new CollectionBuilder($store)
.setProperty(core.properties.parent)
.setValue('${this.resource.subject}')
.setSortBy(commits.properties.createdAt)
.build();
$: table.getMembersOnPage(page).then(members => {
items = members;
});
<\/script>
<ul>
{#each items as item (item)}
<li>
<Item subject={item} />
</li>
{/each}
</ul>
<button on:click={() => page -= 1}>Prev</button>
<button on:click={() => page += 1}>Next</button>`,`// Item.svelte
<script lang='ts'>
${l}
export let subject: string;
let resource = getResource${r}(subject);${c}
<\/script>
<span>{$resource.title}: {${s??"$value"}}</span>`]}}function DG({subject:e}){const t=Ce(),n=q(e),[r,o]=f.useState(),[i,s]=f.useState(!0),l=f.useMemo(()=>n.matchClass({[X.classes.table]:new TG(t,n)},new PG(t,n)),[t,n]),c=n.matchClass({[X.classes.table]:n.get(E.properties.classtype)},n.getClasses()[0]);return a.jsxs(ge,{fullHeight:!0,children:[a.jsxs(ge,{wrapItems:!0,as:"label",children:["Read a property:",a.jsx(AG,{classSubject:c,onPropSelect:o})]}),a.jsxs(Ko,{children:[a.jsx(yr,{onChange:s,checked:i}),"Typescript"]}),a.jsx(jG,{generator:l,property:r,ts:i})]})}function ME({subject:e,show:t,bindShow:n}){const r=q(e),[o,i,s,l]=Ht({bindShow:n});return f.useEffect(()=>{t?i():s()},[t]),a.jsx(Ut,{...o,width:"85ch",children:l&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsxs("h1",{children:["Use ",a.jsx(OG,{children:r.title})," in code"]})}),a.jsx(NG,{children:a.jsx(DG,{subject:e})})]})})}const NG=C(Xt).withConfig({displayName:"ResourceCodeUsageDialog__StyledDialogContent",componentId:"sc-c829424a-0"})(["max-height:90vh;overflow-x:hidden;"]),OG=C.span.withConfig({displayName:"ResourceCodeUsageDialog__Name",componentId:"sc-c829424a-1"})(["color:",";"],e=>e.theme.colors.textLight);function LG(e){const t=new URLSearchParams({...e?{parentSubject:e}:{}});return`${Fe.new}?${t.toString()}`}function $E(e){const t=kt();return f.useCallback(()=>{const r=LG(e);t(r)},[e])}const D0=(e,...t)=>e?t:[];var Wl;(function(e){e.View="view",e.Data="data",e.Edit="edit",e.Scope="scope",e.Share="share",e.Delete="delete",e.History="history",e.Import="import",e.UseInCode="useInCode",e.NewChild="newChild",e.Export="export"})(Wl||(Wl={}));function Im({subject:e,showOnly:t,trigger:n,simple:r,isMainMenu:o,title:i,bindActive:s,onAfterDelete:l}){const c=kt(),u=Sa(),d=q(e),[p,h]=f.useState(!1),[m,v]=f.useState(!1),g=$E(e),[b]=cr(),[y]=jt(d),{enableScope:x}=Wb(e),w=f.useCallback(async()=>{const I=d.get(E.properties.parent);try{await d.destroy(),l==null||l(),at.success("Resource deleted!"),b===e&&c(I?lt(I):"/")}catch(P){at.error(P.message)}},[d,c,b,l]);if(e===void 0||!Bt.isValidSubject(e))return null;const S=[...D0(!r,{disabled:u.pathname.startsWith(Fe.show),id:"view",label:"Normal View",helper:"Open the regular, default View.",onClick:()=>c(lt(e))},{disabled:u.pathname.startsWith(Fe.data),id:"data",label:"Data View",helper:"View the resource and its properties in the Data View.",shortcut:ct.data,onClick:()=>c(fk(e))},nh),...D0(y,{id:"edit",label:"Edit",helper:"Open the edit form.",icon:a.jsx(bb,{}),shortcut:r?"":ct.edit,onClick:()=>c(fd(e))},{id:"newChild",label:"Add child",helper:"Create a new resource under this resource.",icon:a.jsx(nm,{}),onClick:g}),{id:"useInCode",label:"Use in code",helper:"Usage instructions for how to fetch and use the resource in your code.",icon:a.jsx(rk,{}),onClick:()=>v(!0)},{id:"scope",label:"Search children",helper:"Scope search to resource",icon:a.jsx(ak,{}),onClick:x},{id:"share",label:"Permissions & Invites",icon:a.jsx(lk,{}),helper:"Edit permissions and create invites.",onClick:()=>c(s$(e))},{id:"history",icon:a.jsx(yb,{}),label:"History",helper:"Show the history of this resource",onClick:()=>c(c$(e))},...D0(y,{id:"import",icon:a.jsx(ok,{}),label:"Import",helper:"Import Atomic Data to this resource",onClick:()=>c(l$(e))},{disabled:!y,id:"delete",icon:a.jsx(ck,{}),label:"Delete",helper:"Delete this resource.",onClick:()=>h(!0)})],k=t?S.filter(I=>!xl(I)||t.includes(I.id)):S,_=n??lc(a.jsx(ik,{}),i??`Open ${d.title} menu`);return a.jsxs(a.Fragment,{children:[a.jsx(xd,{items:k,trigger:_,isMainMenu:o,bindActive:s}),a.jsx(lE,{title:"Delete resource",show:p,bindShow:h,theme:ah.Alert,confirmLabel:"Delete",onConfirm:w,children:a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:["Are you sure you want to delete ",a.jsx(Lt,{subject:e})]}),a.jsx(gx,{resource:d})]})}),b&&a.jsx(ME,{subject:b,show:m,bindShow:v})]})}function zG({subject:e,className:t}){const[n,r]=f.useState(!1);return a.jsx(ny,{className:t,dropdownActive:n,children:a.jsx(Im,{simple:!0,subject:e,trigger:MG,bindActive:r})})}const ny=C.span.withConfig({displayName:"FloatingActions__Wrapper",componentId:"sc-96b2eb31-0"})(["visibility:hidden;font-size:0.9rem;color:",";@media (pointer:fine){visibility:",";}"],e=>e.theme.colors.main,e=>e.dropdownActive?"visible":"hidden"),FG=Kt(["position:relative;&:hover ",",&:focus-within ","{@media (pointer:fine){visibility:visible;}}"],ny,ny),MG=lc(a.jsx(ik,{})),$G=new Map([[X.classes.folder,YM],[X.classes.bookmark,OM],[X.classes.chatroom,$M],[X.classes.document,qM],[Ne.classes.file,GM],[Ne.classes.drive,QM],[qn.classes.commit,yb],[X.classes.importer,VM],[Ne.classes.invite,n$],[Lr.classes.collection,ZM],[E.classes.class,BM],[E.classes.property,HM],[X.classes.table,r$],[E.classes.property,$v],[E.classes.ontology,t$],[X.classes.tag,o$]]);function No(e,t=NM){return $G.get(e)??t}const Ea=new Map([[Y.STRING,D3],[Y.SLUG,D3],[Y.MARKDOWN,TM],[Y.ATOMIC_URL,DM],[Y.INTEGER,$v],[Y.FLOAT,$v],[Y.RESOURCEARRAY,JM],[Y.BOOLEAN,i$],[Y.DATE,LM],[Y.TIMESTAMP,yb]]),T6=C(Me).withConfig({displayName:"shared__StyledLink",componentId:"sc-bbce44db-0"})(["flex:1;overflow:hidden;white-space:nowrap;"]),ry=C.span.withConfig({displayName:"shared__TextWrapper",componentId:"sc-bbce44db-1"})(["display:inline-flex;align-items:center;gap:0.4rem;"]),BG="file-image",BE="sidebar",Rm="page-title",Am="resource-page",HG="breadcrumb-bar",UG="navbar",WG=(e,t=0)=>{let n=3735928559^t,r=1103547991^t;for(let o=0,i;o<e.length;o++)i=e.charCodeAt(o),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)};function Cd(e,t){if(!t)throw new Error("Subject is required for transition name");return`${e}-${WG(t??"")}`}function jd(e,t){let n;try{n=Cd(e,t)}catch{return"view-transition-name: none"}return`view-transition-name: ${n}`}function xx(e,t){let n;try{n=Cd(e,t)}catch{return{}}return{viewTransitionName:n}}const oy=({resource:e})=>{const[t,n]=f.useState(e.hasUnsavedChanges());return f.useEffect(()=>(n(e.hasUnsavedChanges()),e.on(nb.LocalChange,()=>{n(e.hasUnsavedChanges())})),[e]),t?a.jsx(VG,{children:"*"}):null},VG=C.span.withConfig({displayName:"UnsavedIndicator__Indicator",componentId:"sc-6e7cb75f-0"})(["color:",";"],e=>e.theme.colors.warning),wx=f.forwardRef(({subject:e,active:t,listeners:n,attributes:r,hideActionButtons:o,isDragging:i,onClick:s},l)=>{const c=q(e),{sidebarKeyboardDndEnabled:u}=Le(),[d]=we(c,E.properties.isA),[p]=ne(c,E.properties.description),h=No(d[0]);return a.jsxs(GG,{isDragging:i,"data-sidebar-id":Cd(BE,e),children:[u?a.jsx(T6,{subject:e,clean:!0,ref:l,children:a.jsx(ga,{onClick:s,disabled:t,resource:e,title:p,children:a.jsxs(ry,{children:[a.jsxs(tf,{title:`Rearange ${c.title}`,...n??{},...r??{},children:[a.jsx(h,{}),a.jsx(tm,{})]}),c.title,a.jsx(oy,{resource:c})]})})}):a.jsx(T6,{subject:e,clean:!0,ref:l,...n??{},...r??{},children:a.jsx(ga,{onClick:s,disabled:t,resource:e,title:p,children:a.jsxs(ry,{children:[a.jsx(h,{}),c.title,a.jsx(oy,{resource:c})]})})}),!o&&a.jsx(zG,{subject:e})]})});wx.displayName="SidebarItemTitle";const qG=ni(["from{box-shadow:var(--aw-box-shadow-start);scale:0.9;}to{box-shadow:var(--aw-box-shadow-end);scale:1;}"]),tf=C(ot).withConfig({displayName:"SidebarItemTitle__StyledIconButton",componentId:"sc-4705fd6c-0"})(["--button-padding:0;"]),GG=C.div.withConfig({displayName:"SidebarItemTitle__ActionWrapper",componentId:"sc-4705fd6c-1"})(["--aw-box-shadow-start:0 0 0 0px rgba(0,0,0,0.1);--aw-box-shadow-end:0 0 0 1px ",",",";display:flex;width:100%;margin-left:-0.7rem;"," border-radius:",";"," "," svg:last-of-type{display:none;visibility:hidden;}&:focus-within,&:hover{"," svg:first-of-type{display:none;visibility:hidden;}"," svg:last-of-type{display:block;visibility:visible;cursor:grab;}}"],e=>e.theme.colors.main,e=>e.theme.boxShadowSoft,FG,e=>e.theme.radius,e=>e.isDragging&&Kt(["animation:"," 0.2s ease-in-out forwards;opacity:0.9;"],qG),tf,tf,tf),nf="--sidebar-width";function uh({parentHierarchy:e,position:t}){if(e.length===0)throw new Error("renderedHierargy should not be empty");const[n,r]=f.useState(),o=e.at(-1),i=q(o),[s]=jt(i);Ab({onDragStart:p=>r(p.active.id),onDragEnd:()=>r(void 0)});const l={parent:o,position:t},{setNodeRef:c,isOver:u}=ym({id:`${o}-${t}`,data:l});if(!s)return a.jsx(a.Fragment,{});const d=!!n&&!e.includes(n);return a.jsx(KG,{ref:c,active:u,visible:d})}const KG=C.div.withConfig({displayName:"DropEdge__DropEdgeElement",componentId:"sc-c22183b6-0"})(["display:",";position:absolute;left:0;height:3px;border-radius:1.5px;transform:scaleX(",");background:",";opacity:",";z-index:2;width:calc(var(",") - 2rem);",""],e=>e.visible?"block":"none",e=>e.active?1:.9,e=>e.theme.colors.main,e=>e.active?1:0,nf,Yt("opacity","transform")),HE=({subject:e,renderedHierargy:t,ancestry:n,onClick:r})=>{var P;if(t.length===0)throw new Error("renderedHierargy should not be empty");const o=q(e,{allowIncomplete:!0}),[i]=cr(),[s]=rt(o),[l]=ne(o,E.properties.description),[c]=jt(o),u=i===e,[d,p]=f.useState(u),[h]=we(o,X.properties.subResources),m={renderedUnder:t.at(-1)},{setNodeRef:v,listeners:g,attributes:b,over:y,active:x}=vm({id:e,data:m,disabled:!c}),w=f.useMemo(()=>a.jsx(wx,{subject:e,active:u,onClick:r,ref:v,listeners:g,attributes:b}),[e,u,r,l,s,g,b]),S=h.length>0,k=(x==null?void 0:x.id)===e,_=((P=y==null?void 0:y.data.current)==null?void 0:P.parent)===e,I=[...t,e];return f.useEffect(()=>{k&&p(!1)},[k]),f.useEffect(()=>{n.includes(e)&&n[0]!==e&&p(!0)},[n]),!e||e===ut?null:o.loading?a.jsx(ga,{onClick:r,disabled:u,resource:e,title:`${e} is loading...`,children:a.jsx(_k,{})}):o.error?a.jsx(XG,{subject:e,clean:!0,children:a.jsx(ga,{onClick:r,disabled:u,resource:e,children:a.jsxs(QG,{children:[a.jsx(Eb,{}),"Resource with error"]})})}):a.jsx(YG,{highlight:_,children:a.jsxs(oa,{initialState:d,open:d,disabled:!S,onStateToggle:p,"data-test":"resource-sidebar",title:w,children:[a.jsx(uh,{parentHierarchy:I,position:0}),S&&h.map((z,D)=>a.jsxs(f.Fragment,{children:[a.jsx(HE,{subject:z,renderedHierargy:I,ancestry:n,onClick:r}),a.jsx(uh,{parentHierarchy:I,position:D+1})]},z))]})})},YG=C.div.withConfig({displayName:"ResourceSideBar__Wrapper",componentId:"sc-a3d04f8c-0"})(["background-color:",";border-radius:",";",""],e=>e.highlight?Zo(.9,e.theme.colors.main):"none",({theme:e})=>e.radius,Yt("background-color")),XG=C(Me).withConfig({displayName:"ResourceSideBar__StyledLink",componentId:"sc-a3d04f8c-1"})(["flex:1;overflow:hidden;white-space:nowrap;"]),QG=C(ry).withConfig({displayName:"ResourceSideBar__SideBarErrorWrapper",componentId:"sc-a3d04f8c-2"})(["margin-left:1.3rem;",""],jk),JG=C("div").withConfig({displayName:"SideBarHeader",componentId:"sc-9ccced4f-0"})(["margin-top:","rem;margin-bottom:0.5rem;padding-left:","rem;padding-right:0.7rem;font-size:1.4rem;font-weight:bold;display:flex;"],e=>e.theme.margin,e=>e.theme.margin);function Sx(){return!1}const N0=[window.location.origin,"https://atomicdata.dev"],ZG={commit:!0};function Pm(){const{agent:e}=Le(),t=q(e==null?void 0:e.subject),[n,r]=we(t,J.properties.drives,ZG),o=f.useMemo(()=>[...N0,...n],[n]),i=f.useCallback(l=>{N0.includes(l)||n.includes(l)||r([...n,l]).then(()=>{t.save()})},[n,r]),s=f.useCallback(l=>{N0.includes(l)||n.includes(l)&&r(n.filter(c=>c!==l)).then(()=>{t.save()})},[n,r]);return[o,i,s]}const eK=5;function Cx(e=[],t=Number.MAX_VALUE){const[n]=Pm(),[r,o]=Dr("driveHistory",[]),i=f.useCallback(c=>{o(u=>u[0]===c?u:[c,...u.filter(d=>d!==c)].slice(0,eK))},[n,o]),s=f.useCallback(c=>{o(u=>u.filter(d=>d!==c))},[o]);return[f.useMemo(()=>r.slice(0,t).filter(c=>!e.includes(c)),[r,e]),i,s]}function _a(){const e=Ce(),t=kt();return f.useCallback(async(r,o,{parent:i,extraParams:s,onCreated:l,subject:c,noParent:u})=>{const d=await e.getResource(r),p=await e.newResource({subject:c,isA:r,parent:i,propVals:o,noParent:u});try{await p.save(),l&&await l(p),t(lt(p.subject,s)),at.success(`${d.title} created`),e.notifyResourceManuallyCreated(p)}catch(h){e.notifyError(h)}return p},[e,t,parent])}const iy=new Map,sy=new Map;function kd(){const{showNewResourceUI:e}=f.useContext(UE);return e}const Wa=(e,t)=>{iy.set(e,t)},O0=(e,t)=>{sy.set(e,t)},UE=f.createContext({showNewResourceUI:()=>{}});function tK({children:e}){const t=Ce(),n=Le(),r=_a(),[o,i]=f.useState(void 0),s=uo(),l=f.useCallback(async(u,d)=>{var p;if(iy.has(u)){const h=()=>{i(void 0)},m=iy.get(u);i(a.jsx(m,{parent:d,onClose:h}));return}if(sy.has(u)){try{await((p=sy.get(u))==null?void 0:p(d,r,{store:t,settings:n}))}catch(h){t.notifyError(h)}return}s(pk(u,d,t.createSubject()))},[]),c=f.useMemo(()=>({showNewResourceUI:l}),[l]);return a.jsxs(UE.Provider,{value:c,children:[e,o]})}const nK=lc(a.jsx(M$,{}),"Open Drive Settings");function gp(e){return e.get(E.properties.name)??e.getSubject()}function rK(e,t){return new Map([...e].filter(([n])=>!t.has(n)))}function oK(){const e=kt(),{drive:t,setDrive:n,agent:r}=Le(),[o]=Pm(),[i,s]=Cx(o,5),l=fa(o),c=fa(i),u=h=>()=>{n(h),s(h),e(lt(h))},d=kd(),p=f.useMemo(()=>[...Array.from(l.entries()).filter(([h,m])=>!m.error).map(([h,m])=>({id:h,label:gp(m),helper:`Switch to ${gp(m)}`,disabled:h===t,onClick:()=>{n(h),e(lt(h))},icon:h===t?a.jsx(z3,{}):a.jsx(F3,{})})),nh,...Array.from(rK(c,l)).map(([h,m])=>({label:gp(m),id:h,helper:`Switch to ${gp(m)}`,icon:h===t?a.jsx(z3,{}):a.jsx(F3,{}),onClick:u(h),disabled:h===t})).slice(0,5),nh,{id:"configure-drives",label:"Configure Drives",icon:a.jsx(Cb,{}),helper:"Load drives not displayed in this list.",onClick:()=>e(Fe.serverSettings)},{id:"new-drive",label:"New Drive",icon:a.jsx(ur,{}),helper:"Create a new drive",onClick:()=>d(Ne.classes.drive,(r==null?void 0:r.subject)??""),disabled:!r}],[l,t,c,r]);return a.jsx(xd,{trigger:nK,items:p})}function iK(e,[t,n]){return Math.min(n,Math.max(t,e))}function sK(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var jx="ScrollArea",[WE,k0e]=cc(jx),[aK,po]=WE(jx),VE=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[l,c]=f.useState(null),[u,d]=f.useState(null),[p,h]=f.useState(null),[m,v]=f.useState(null),[g,b]=f.useState(null),[y,x]=f.useState(0),[w,S]=f.useState(0),[k,_]=f.useState(!1),[I,P]=f.useState(!1),z=On(t,F=>c(F)),D=vx(o);return a.jsx(aK,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:d,content:p,onContentChange:h,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:k,onScrollbarXEnabledChange:_,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:I,onScrollbarYEnabledChange:P,onCornerWidthChange:x,onCornerHeightChange:S,children:a.jsx(nn.div,{dir:D,...s,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});VE.displayName=jx;var qE="ScrollAreaViewport",GE=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=po(qE,n),l=f.useRef(null),c=On(t,l,s.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),a.jsx(nn.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});GE.displayName=qE;var oi="ScrollAreaScrollbar",KE=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=po(oi,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,l=e.orientation==="horizontal";return f.useEffect(()=>(l?i(!0):s(!0),()=>{l?i(!1):s(!1)}),[l,i,s]),o.type==="hover"?a.jsx(lK,{...r,ref:t,forceMount:n}):o.type==="scroll"?a.jsx(cK,{...r,ref:t,forceMount:n}):o.type==="auto"?a.jsx(YE,{...r,ref:t,forceMount:n}):o.type==="always"?a.jsx(kx,{...r,ref:t}):null});KE.displayName=oi;var lK=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=po(oi,e.__scopeScrollArea),[i,s]=f.useState(!1);return f.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),s(!0)},d=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),a.jsx(Ds,{present:n||i,children:a.jsx(YE,{"data-state":i?"visible":"hidden",...r,ref:t})})}),cK=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=po(oi,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Dm(()=>c("SCROLL_END"),100),[l,c]=sK("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),f.useEffect(()=>{const u=o.viewport,d=i?"scrollLeft":"scrollTop";if(u){let p=u[d];const h=()=>{const m=u[d];p!==m&&(c("SCROLL"),s()),p=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,i,c,s]),a.jsx(Ds,{present:n||l!=="hidden",children:a.jsx(kx,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Rt(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Rt(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),YE=f.forwardRef((e,t)=>{const n=po(oi,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=f.useState(!1),l=e.orientation==="horizontal",c=Dm(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(l?u:d)}},10);return Vl(n.viewport,c),Vl(n.content,c),a.jsx(Ds,{present:r||i,children:a.jsx(kx,{"data-state":i?"visible":"hidden",...o,ref:t})})}),kx=f.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=po(oi,e.__scopeScrollArea),i=f.useRef(null),s=f.useRef(0),[l,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=e_(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function p(h,m){return mK(h,s.current,l,m)}return n==="horizontal"?a.jsx(uK,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollLeft,m=D6(h,l,o.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=p(h,o.dir))}}):n==="vertical"?a.jsx(dK,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const h=o.viewport.scrollTop,m=D6(h,l);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=p(h))}}):null}),uK=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=po(oi,e.__scopeScrollArea),[s,l]=f.useState(),c=f.useRef(null),u=On(t,c,i.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(QE,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Tm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),n_(h,p)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:ph(s.paddingLeft),paddingEnd:ph(s.paddingRight)}})}})}),dK=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=po(oi,e.__scopeScrollArea),[s,l]=f.useState(),c=f.useRef(null),u=On(t,c,i.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(QE,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Tm(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),n_(h,p)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:ph(s.paddingTop),paddingEnd:ph(s.paddingBottom)}})}})}),[pK,XE]=WE(oi),QE=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:p,...h}=e,m=po(oi,n),[v,g]=f.useState(null),b=On(t,z=>g(z)),y=f.useRef(null),x=f.useRef(""),w=m.viewport,S=r.content-r.viewport,k=Hn(d),_=Hn(c),I=Dm(p,10);function P(z){if(y.current){const D=z.clientX-y.current.left,F=z.clientY-y.current.top;u({x:D,y:F})}}return f.useEffect(()=>{const z=D=>{const F=D.target;(v==null?void 0:v.contains(F))&&k(D,S)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[w,v,S,k]),f.useEffect(_,[r,_]),Vl(v,I),Vl(m.content,I),a.jsx(pK,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:Hn(i),onThumbPointerUp:Hn(s),onThumbPositionChange:_,onThumbPointerDown:Hn(l),children:a.jsx(nn.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Rt(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),y.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),P(z))}),onPointerMove:Rt(e.onPointerMove,P),onPointerUp:Rt(e.onPointerUp,z=>{const D=z.target;D.hasPointerCapture(z.pointerId)&&D.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),dh="ScrollAreaThumb",JE=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=XE(dh,e.__scopeScrollArea);return a.jsx(Ds,{present:n||o.hasThumb,children:a.jsx(fK,{ref:t,...r})})}),fK=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=po(dh,n),s=XE(dh,n),{onThumbPositionChange:l}=s,c=On(t,p=>s.onThumbChange(p)),u=f.useRef(),d=Dm(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const p=i.viewport;if(p){const h=()=>{if(d(),!u.current){const m=gK(p,l);u.current=m,l()}};return l(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[i.viewport,d,l]),a.jsx(nn.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Rt(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),v=p.clientX-m.left,g=p.clientY-m.top;s.onThumbPointerDown({x:v,y:g})}),onPointerUp:Rt(e.onPointerUp,s.onThumbPointerUp)})});JE.displayName=dh;var Ex="ScrollAreaCorner",ZE=f.forwardRef((e,t)=>{const n=po(Ex,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(hK,{...e,ref:t}):null});ZE.displayName=Ex;var hK=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=po(Ex,n),[i,s]=f.useState(0),[l,c]=f.useState(0),u=!!(i&&l);return Vl(o.scrollbarX,()=>{var p;const d=((p=o.scrollbarX)==null?void 0:p.offsetHeight)||0;o.onCornerHeightChange(d),c(d)}),Vl(o.scrollbarY,()=>{var p;const d=((p=o.scrollbarY)==null?void 0:p.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),u?a.jsx(nn.div,{...r,ref:t,style:{width:i,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ph(e){return e?parseInt(e,10):0}function e_(e,t){const n=e/t;return isNaN(n)?0:n}function Tm(e){const t=e_(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function mK(e,t,n,r="ltr"){const o=Tm(n),i=o/2,s=t||i,l=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,p=r==="ltr"?[0,d]:[d*-1,0];return t_([c,u],p)(e)}function D6(e,t,n="ltr"){const r=Tm(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,l=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=iK(e,c);return t_([0,s],[0,l])(u)}function t_(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function n_(e,t){return e>0&&e<t}var gK=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,l=n.top!==i.top;(s||l)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Dm(e,t){const n=Hn(e),r=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),f.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Vl(e,t){const n=Hn(t);js(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var vK=VE,yK=GE,bK=KE,xK=JE,wK=ZE;const ay="0.8rem",Ia=f.forwardRef(({children:e,className:t,type:n="scroll"},r)=>a.jsxs(vK,{type:n,className:t,children:[a.jsx(r_,{ref:r,children:e}),a.jsx(N6,{orientation:"vertical",children:a.jsx(O6,{})}),a.jsx(N6,{orientation:"horizontal",children:a.jsx(O6,{})}),a.jsx(wK,{})]}));Ia.displayName="ScrollArea";const N6=C(bK).withConfig({displayName:"ScrollArea__ScrollBar",componentId:"sc-702e6f8f-0"})(["display:flex;user-select:none;touch-action:none;padding:2px;background-color:transparent;transition:background-color "," ease-out;&[data-orientation='horizontal']{flex-direction:column;height:",";}&[data-orientation='vertical']{width:",";}"],e=>e.theme.animation.duration,()=>ay,()=>ay),O6=C(xK).withConfig({displayName:"ScrollArea__Thumb",componentId:"sc-702e6f8f-1"})(["position:relative;bottom:1px;flex:1;background-color:",";border-radius:",";backdrop-filter:blur(10px);z-index:2;"],e=>Zo(.25,e.theme.colors.bg2),()=>ay),r_=C(yK).withConfig({displayName:"ScrollArea__ScrollViewPort",componentId:"sc-702e6f8f-2"})(["width:100%;height:100%;& > div[style]{display:block !important;}"]);async function SK(e,t,n){const r=e.get(X.properties.subResources)??[],o=r.indexOf(t),i=[...r],[s]=i.splice(o,1);i.splice(n>o?n-1:n,0,s),await e.set(X.properties.subResources,i),await e.save()}async function CK(e,t,n,r){const o=e.get(X.properties.subResources)??[];await e.set(X.properties.subResources,o.filter(s=>s!==n.subject));const i=t.get(X.properties.subResources)??[];await t.set(X.properties.subResources,i.toSpliced(r,0,n.subject)),await n.set(E.properties.parent,t.subject),await e.save(),await t.save(),await n.save()}const jK=e=>{const t=Ce(),{sidebarKeyboardDndEnabled:n}=Le(),r=vs(vd),o=Pb(vs(Ob,{activationConstraint:{distance:10}}),vs(Lb,{activationConstraint:{delay:250,tolerance:5}}),n?r:void 0),[i,s]=f.useState(),[l,c]=f.useState(),u=f.useCallback(({active:v,dragOverlay:g,transform:b})=>{if(!(!v||!g))return new Promise(y=>{l==null||l.then(()=>{const x=document.querySelector(`[data-sidebar-id="${Cd(BE,v.id)}"]`);if(!x)return y();x.style.opacity="0";const{top:w,left:S}=g.rect,{x:k,y:_}=b,{top:I,left:P}=x.getBoundingClientRect(),z=P-S+k,D=I-w+_,F=g.node.animate([{transform:`translate(${k}px, ${_}px)`},{transform:`translate(${z}px, ${D}px)`}],{duration:300,easing:"cubic-bezier(0.2, 0, 0, 1)"});F.onfinish=()=>{x.style.opacity="1",y()}})})},[l]);return{handleDragStart:v=>{e(!0),s(v.active.id)},handleDragEnd:async v=>{if(!v.over){s(void 0),e(!1),c(Promise.resolve());return}const g=v.active.id,{renderedUnder:b}=v.active.data.current,{position:y,parent:x}=v.over.data.current,w=t.getResourceLoading(x),S=t.getResourceLoading(b),k=t.getResourceLoading(g);if(g===x){e(!1),s(void 0),c(Promise.resolve());return}let _;b===x?_=SK(w,g,y):_=CK(S,w,k,y),c(_),await _,s(void 0),e(!1)},draggingResource:i,sensors:o,animateDrop:u,dndExplanation:n?"To rearange items, press space or enter to start dragging. While dragging, use the arrow keys to move the item in any given direction. Press space or enter again to drop the item in its new position, or press escape to cancel.":"Keyboard support for drag and drop is disabled. Enable it in the settings.",announcements:{onDragStart:({active:v})=>`Picked up ${t.getResourceLoading(v.id).title}`,onDragOver:({active:v,over:g})=>{if(!g||!g.data.current)return;const b=t.getResourceLoading(v.id),y=t.getResourceLoading(g.data.current.parent),x=g.data.current.position;return`Draggable item ${b.title} was moved over droppable area in ${y.title} at position ${x+1}`},onDragEnd:({active:v,over:g})=>{if(!g||!g.data.current)return"Dragging canceled";const b=t.getResourceLoading(v.id),y=t.getResourceLoading(g.data.current.parent),x=g.data.current.position;return`${b.title} was moved to ${y.title} at position ${x+1}`},onDragCancel:()=>"Dragging canceled"}}};function kK({onItemClick:e,onIsRearangingChange:t}){const n=Ce(),{drive:r,agent:o}=Le(),{handleDragStart:i,handleDragEnd:s,draggingResource:l,sensors:c,animateDrop:u,dndExplanation:d,announcements:p}=jK(t),h=q(r),[m]=we(h,X.properties.subResources),[v]=rt(h),g=kt(),[b]=jt(h),[y]=cr(),x=q(y),[w,S]=f.useState([]);return f.useEffect(()=>{n.getResourceAncestry(x).then(k=>{S(k)})},[n,x]),a.jsxs(a.Fragment,{children:[a.jsxs(JG,{children:[a.jsx(_K,{clean:!0,title:`Your current baseURL is ${r}`,"data-test":"sidebar-drive-open",onClick:()=>{e(),g(lt(r))},children:a.jsxs(EK,{"data-testid":"current-drive-title",children:[v||r," "]})}),a.jsx(AK,{gap:"0",children:a.jsx(oK,{})})]}),a.jsxs(gm,{onDragStart:i,onDragEnd:s,sensors:c,accessibility:{announcements:p,screenReaderInstructions:{draggable:d}},children:[a.jsx(PK,{children:a.jsxs(RK,{children:[a.jsx(uh,{parentHierarchy:[r],position:0}),h.isReady()?m.map((k,_)=>a.jsxs(f.Fragment,{children:[a.jsx(HE,{subject:k,renderedHierargy:[r],ancestry:w,onClick:e}),a.jsx(uh,{parentHierarchy:[r],position:_+1})]},k)):h.loading?null:a.jsx(IK,{children:h.error&&(h.isUnauthorized()&&o?"unauthorized":h.error.message)}),b&&a.jsx(TK,{title:"New resource","data-testid":"sidebar-new-resource",onClick:()=>g(Fe.new),children:a.jsx(nm,{})})]})}),yn.createPortal(a.jsx(Fb,{dropAnimation:u,children:l&&a.jsx(wx,{subject:l,hideActionButtons:!0,isDragging:!0})}),document.body)]})]})}const EK=C.h2.withConfig({displayName:"SideBarDrive__DriveTitle",componentId:"sc-c0fe675f-0"})(["margin:0;padding:0;font-size:1.4rem;flex:1;"]),_K=C(oe).withConfig({displayName:"SideBarDrive__TitleButton",componentId:"sc-c0fe675f-1"})(["text-align:left;flex:1;"]),IK=C(yt).withConfig({displayName:"SideBarDrive__SideBarErr",componentId:"sc-c0fe675f-2"})(["padding-left:","rem;"],e=>e.theme.margin),RK=C.div.withConfig({displayName:"SideBarDrive__ListWrapper",componentId:"sc-c0fe675f-3"})(["overflow-x:hidden;position:relative;margin-left:0.5rem;"]),AK=C(be).withConfig({displayName:"SideBarDrive__HeadingButtonWrapper",componentId:"sc-c0fe675f-4"})(["color:",";font-size:0.9rem;"],e=>e.theme.colors.main),PK=C(Ia).withConfig({displayName:"SideBarDrive__StyledScrollArea",componentId:"sc-c0fe675f-5"})(["overflow:hidden;"]),TK=C.button.withConfig({displayName:"SideBarDrive__AddButton",componentId:"sc-c0fe675f-6"})(["display:flex;justify-content:center;color:",";background:none;appearance:none;border:1px dashed ",";border-radius:",";width:calc(100% - 5rem);padding-block:0.3rem;margin-inline-start:2rem;margin-block-start:0.5rem;margin-block-end:1rem;cursor:pointer;"," & svg{","}&:hover,&:focus-visible{color:",";border:1px solid ",";& svg{transform:scale(1.3);}}&:active{background-color:",";}"],e=>e.theme.colors.textLight,e=>e.theme.colors.bg2,e=>e.theme.radius,Yt("color","border"),Yt("transform"),e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.bg1),DK=`
* {
cursor: col-resize;
user-select: none;
pointer-events: none;
}
`;function NK(e){const t=document.getElementById(e);if(t)return t;const n=document.createElement("style");return n.setAttribute("id",e),document.head.appendChild(n),n}function L6(e){const t=document.getElementById(e);t&&document.head.contains(t)&&document.head.removeChild(t)}function z6(e,t){const n=NK(e);t?n.innerHTML=DK:n.innerHTML=""}function o_({initialSize:e,onResize:t,minSize:n=0,maxSize:r=1/0}){const o=f.useRef(null),i=f.useRef(null),[s,l]=f.useState(!1),[c,u]=f.useState(`${e}px`),d=f.useId(),p=f.useRef(t);f.useEffect(()=>{p.current=t},[t]);const h=f.useRef(v=>{var x;const g=(x=o.current)==null?void 0:x.getBoundingClientRect(),b=v.clientX-((g==null?void 0:g.x)??0),y=Math.min(r,Math.max(n,b));requestAnimationFrame(()=>{var w;u(`${y}px`),(w=p.current)==null||w.call(p,y)})}),m=f.useCallback(v=>{v.stopPropagation(),v.target===i.current&&l(!0)},[]);return f.useEffect(()=>{if(!o.current||!i.current)return()=>{L6(d)};const v=()=>{l(!1)};return window.addEventListener("mouseup",v),()=>{window.removeEventListener("mouseup",v),L6(d)}},[]),f.useEffect(()=>(s?(window.addEventListener("mousemove",h.current),z6(d,!0)):(window.removeEventListener("mousemove",h.current),z6(d,!1)),()=>{window.removeEventListener("mousemove",h.current)}),[s]),{size:c,targetRef:o,dragAreaRef:i,isDragging:s,dragAreaListeners:{onMouseDown:m}}}const i_=C.div.withConfig({displayName:"useResizable__DragAreaBase",componentId:"sc-aaa790a9-0"})(["--drag-color:",";position:absolute;cursor:col-resize;background-color:",";backdrop-filter:",";&:hover{transition:background-color 0.2s;background-color:var(--drag-color);backdrop-filter:blur(5px);}border-radius:",";"],e=>Zo(.7,e.theme.colors.main),({isDragging:e})=>e?"var(--drag-color)":"transparent",({isDragging:e})=>e?"blur(5px)":"none",({theme:e})=>e.radius);function OK(e,t=[]){return f.useCallback(n=>{for(const r of e)r.current=n},t)}const LK="2rem",zK=` + ${LK}`,F6=(e="0rem",t)=>`calc(${e}${t?zK:""})`;function fh({position:e,baseMargin:t}){const{navbarFloating:n,navbarTop:r}=Le(),o=()=>e==="top"?F6(t,r):F6(t,!n&&!r);return a.jsx(FK,{size:o()})}const FK=C.div.withConfig({displayName:"NavBarSpacer__Spacing",componentId:"sc-a34116f3-0"})(["height:",";transition:height 0.2s ease-out;"],e=>e.size);function Ra(e,t=!1){const[n,r]=f.useState(t);return f.useEffect(()=>{if(!window.matchMedia)return;const o=s=>{r(s.matches)},i=window.matchMedia(e);return r(i.matches),i.addEventListener("change",o),()=>i.removeEventListener("change",o)},[]),n}function MK(){const e=Ra("(max-width: 950px)"),{navbarFloating:t}=Le(),n=e&&t;return a.jsx($K,{$elivate:n})}const $K=C.div.withConfig({displayName:"OverlapSpacer__Elivator",componentId:"sc-639400e-0"})(["height:",";",""],e=>e.$elivate?"3.5rem":"0rem",Yt("height"));function Fc({helper:e,label:t,icon:n,path:r,href:o,subject:i,onClick:s}){return a.jsx(Me,{href:o,subject:i,path:r,clean:!0,children:a.jsxs(ga,{title:e,onClick:s,children:[n&&a.jsx(BK,{children:n}),t]},t)})}const BK=C.span.withConfig({displayName:"SideBarMenuItem__SideBarIcon",componentId:"sc-7837304f-0"})(["display:flex;margin-right:0.5rem;font-size:1.5rem;"]);function HK({onItemClick:e}){const t=f.useRef(null),[n]=cr(),[r,o]=f.useState(!1),[i]=ab(),s=q((i==null?void 0:i.subject)??ut),l=f.useCallback(()=>{t.current&&t.current.prompt().then(c=>{c.outcome==="accepted"&&o(!1)})},[t.current]);return f.useEffect(()=>{const c=u=>{u.preventDefault(),o(!0),t.current=u};return window.addEventListener("beforeinstallprompt",c),()=>window.removeEventListener("beforeinstallprompt",c)},[]),a.jsxs("section",{"aria-label":"App menu",children:[a.jsx(Fc,{icon:a.jsx(Ck,{}),label:i?s.get(E.properties.name)??"User Settings":"Login",helper:"See and edit the current Agent / User (u)",path:Fe.agentSettings,onClick:e}),a.jsx(Fc,{icon:a.jsx(Cb,{}),label:"Settings",helper:"Change client settings (t)",path:Fe.themeSettings,onClick:e}),a.jsx(Fc,{icon:a.jsx($$,{}),label:"Keyboard Shortcuts",helper:"View the keyboard shortcuts (?)",path:Fe.shortcuts,onClick:e}),a.jsx(Fc,{icon:a.jsx(sm,{}),label:"About",helper:"Welcome page, tells about this app",path:Fe.about,onClick:e}),r&&a.jsx(Fc,{icon:a.jsx(W$,{}),label:"Install App",helper:"Install app to desktop",path:lt(n??window.location.href),onClick:l})]})}const UK=[{icon:a.jsx(v$,{}),helper:"Github; View the source code for this application",href:"https://github.com/atomicdata-dev/atomic-server"},{icon:a.jsx(g$,{}),helper:"Discord; Chat with the Atomic Data community",href:"https://discord.gg/a72Rv2P"},{icon:a.jsx(S$,{}),helper:"Docs; Read the Atomic Data documentation",href:"https://docs.atomicdata.dev"}];function WK(){return a.jsx(a.Fragment,{children:a.jsxs(VK,{children:[UK.map(({href:e,icon:t,helper:n})=>a.jsx(Mb,{target:"_blank",rel:"noreferrer",href:e,title:n,size:"1.2em",color:"textLight",variant:Ii.Square,children:t},e)),Sx()]})})}const VK=C.div.withConfig({displayName:"About__AboutWrapper",componentId:"sc-e7c0f181-0"})(["--inner-padding:0.5rem;display:flex;align-items:center;gap:0.5rem;margin-left:calc(1rem - var(--inner-padding));"]);function qK(){const e=Ce(),[t,n]=f.useState([]),{drive:r}=Le(),o=f.useCallback(async()=>{ob(e);const i=await e.search("",{filters:{[E.properties.isA]:E.classes.ontology},parents:r});n(i)},[e,r]);return f.useEffect(()=>{o(),setTimeout(()=>{o()},5e3)},[r,o]),a.jsx(GK,{children:a.jsx(KK,{children:t.map(i=>a.jsx(YK,{subject:i},i))},r)})}const GK=C.div.withConfig({displayName:"OntologiesPanel__Wrapper",componentId:"sc-a6c99e47-0"})(["padding-top:0;max-height:10rem;overflow:hidden;"]),KK=C(Ia).withConfig({displayName:"OntologiesPanel__StyledScrollArea",componentId:"sc-a6c99e47-1"})(["max-height:10rem;overflow-x:hidden;"]);function YK({subject:e}){const t=q(e),n=No(E.classes.ontology);return t.loading?a.jsx("div",{children:"loading"}):t.error||t.subject===ut?a.jsx(ga,{children:a.jsx(yt,{children:"Invalid Resource"})}):a.jsx(XK,{subject:e,clean:!0,children:a.jsx(ga,{children:a.jsxs(be,{gap:"1ch",center:!0,children:[a.jsx(n,{}),t.title]})})})}const XK=C(Me).withConfig({displayName:"OntologiesPanel__StyledLink",componentId:"sc-a6c99e47-2"})(["flex:1;overflow:hidden;white-space:nowrap;"]);function M6({children:e,title:t}){const[n,r]=f.useState(!0);return a.jsxs(eY,{children:[a.jsx(JK,{onClick:()=>r(o=>!o),children:a.jsxs(QK,{children:[a.jsx(ZK,{$open:n}),t]})}),a.jsx(cm,{open:n,children:e})]})}const QK=C.h2.withConfig({displayName:"SideBarPanel__PanelDevider",componentId:"sc-49555287-0"})(["font-size:inherit;font-weight:normal;font-family:inherit;width:100%;display:flex;align-items:center;gap:1ch;color:",";margin-bottom:0;&::before,&::after{content:'';flex:1;border-top:1px solid ",";}cursor:pointer;&:hover,&:focus{&::before,&::after{border-color:",";}}"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,e=>e.theme.colors.text),JK=C.button.withConfig({displayName:"SideBarPanel__DeviderButton",componentId:"sc-49555287-1"})(["background:none;border:none;margin:0;padding:0;"]),ZK=C(Sb).withConfig({displayName:"SideBarPanel__Arrow",componentId:"sc-49555287-2"})(["transform:rotate(",");",""],e=>e.$open?"90deg":"0deg",Yt("transform")),eY=C.div.withConfig({displayName:"SideBarPanel__Wrapper",componentId:"sc-49555287-3"})(["width:100%;max-height:fit-content;display:flex;flex-direction:column;"]);var Xu;(function(e){e.Ontologies="ontologies"})(Xu||(Xu={}));const s_=()=>{const[e,t]=Dr("sidebar-panels",[]),n=f.useCallback(i=>{e.includes(i)||t([...e,i])},[e,t]),r=f.useCallback(i=>{e.includes(i)&&t(e.filter(s=>s!==i))},[e,t]);return{enabledPanels:f.useMemo(()=>new Set(e),[e]),enablePanel:n,disablePanel:r}},a_=600,tY=f.memo(kK);function nY(){const[e,t]=f.useState(!1),{drive:n,sideBarLocked:r,setSideBarLocked:o}=Le(),[i,s,l]=RM(),c=Ra(`(min-width: ${a_}px)`,!0),{size:u,targetRef:d,dragAreaRef:p,isDragging:h,dragAreaListeners:m}=o_({initialSize:300,minSize:200,maxSize:2e3}),{enabledPanels:v}=s_(),g=OK([i,d]),b=f.useCallback(()=>{c||o(!1)},[c]),y=r||s&&c;return a.jsxs(iY,{children:[a.jsxs(rY,{ref:g,size:u,"data-testid":"sidebar",locked:c&&r,exposed:y,...l,children:[a.jsx(fh,{position:"top"}),a.jsx(tY,{onItemClick:b,onIsRearangingChange:t},n),a.jsx(oY,{children:a.jsxs(ge,{gap:"0.5rem",children:[v.has(Xu.Ontologies)&&a.jsx(M6,{title:"Ontologies",children:a.jsx(qK,{})},n),a.jsx(M6,{title:"App",children:a.jsxs(ge,{children:[a.jsx(HK,{onItemClick:b}),a.jsx(WK,{})]})})]})}),a.jsx(MK,{}),a.jsx(fh,{baseMargin:"1rem",position:"bottom"}),!e&&a.jsx(aY,{ref:p,isDragging:h,...m})]}),a.jsx(sY,{onClick:()=>o(!1),visible:r&&!c})]})}const rY=C.nav.attrs(e=>({style:{[nf]:e.size}})).withConfig({displayName:"SideBar__SideBarStyled",componentId:"sc-7ce26df5-0"})(["z-index:",";box-sizing:border-box;background:",";transition:opacity 0.3s,left 0.3s;left:",";opacity:",";height:100vh;width:var(",");position:",";border-right:",";box-shadow:",";display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;"],e=>e.theme.zIndex.sidebar,e=>e.theme.colors.bg,e=>e.exposed?"0":`calc(var(${nf}) * -1 + 0.5rem)`,e=>e.exposed?1:0,nf,e=>e.locked?"relative":"absolute",e=>`1px solid ${e.theme.colors.bg2}`,e=>e.locked?"none":e.theme.boxShadowSoft),oY=C.div.withConfig({displayName:"SideBar__MenuWrapper",componentId:"sc-7ce26df5-1"})(["margin-top:auto;flex-direction:column;justify-items:flex-end;display:flex;justify-content:end;"]),iY=C("div").withConfig({displayName:"SideBar__SideBarContainer",componentId:"sc-7ce26df5-2"})(["position:relative;"]),sY=C.div.withConfig({displayName:"SideBar__SideBarOverlay",componentId:"sc-7ce26df5-3"})(["position:absolute;left:0;top:0;bottom:0;right:0;width:100vw;transition:background-color 0.2s;background-color:",";pointer-events:",";height:100%;cursor:pointer;z-index:1;-webkit-tap-highlight-color:transparent;"],e=>e.visible?"rgba(0, 0, 0, .5)":"rgba(0, 0, 0, 0.0)",e=>e.visible?"auto":"none"),aY=C(i_).withConfig({displayName:"SideBar__SideBarDragArea",componentId:"sc-7ce26df5-4"})(["--handle-margin:1rem;height:calc(100% - var(--handle-margin) * 2);margin-top:var(--handle-margin);width:12px;right:-6px;top:0;bottom:0;"]);var l_={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n=["navigation","request","process","log","user","state","error","manual"],r=function(j,R,T){for(var A=T,L=0,M=j.length;L<M;L++)A=R(A,j[L],L,j);return A},o=function(j,R){return r(j,function(T,A,L,M){return R(A,L,M)?T.concat(A):T},[])},i=function(j,R){return r(j,function(T,A,L,M){return T===!0||A===R},!1)},s=function(j){return Object.prototype.toString.call(j)==="[object Array]"},l=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(j){var R=[],T;for(T in j)Object.prototype.hasOwnProperty.call(j,T)&&R.push(T);if(!l)return R;for(var A=0,L=c.length;A<L;A++)Object.prototype.hasOwnProperty.call(j,c[A])&&R.push(c[A]);return R},d=function(j,R){return j===void 0&&(j=1),function(T){return typeof T=="number"&&parseInt(""+T,10)===T&&T>=j&&T<=R}},p=function(j){return typeof j=="function"||s(j)&&o(j,function(R){return typeof R=="function"}).length===j.length},h=function(j){return typeof j=="string"&&!!j.length},m={},v=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};m.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:h},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(j){return j===void 0||h(j)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(j){return j===void 0||h(j)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(j){return j===!0||j===!1}},enabledErrorTypes:{defaultValue:function(){return v()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(j){if(typeof j!="object"||!j)return!1;var R=u(j),T=u(v());return!(o(R,function(A){return i(T,A)}).length<R.length||o(u(j),function(A){return typeof j[A]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:p},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:p},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:p},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(j){return j&&typeof j=="object"&&h(j.notify)&&h(j.sessions)&&o(u(j),function(R){return!i(["notify","sessions"],R)}).length===0}},autoTrackSessions:{defaultValue:function(j){return!0},message:"should be true|false",validate:function(j){return j===!0||j===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(j){return j===null||s(j)&&o(j,function(R){return typeof R=="string"}).length===j.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(j){return typeof j=="string"&&j.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(j){return d(0,100)(j)}},enabledBreadcrumbTypes:{defaultValue:function(){return n},message:"should be null or a list of available breadcrumb types ("+n.join(",")+")",validate:function(j){return j===null||s(j)&&r(j,function(R,T){return R===!1?R:i(n,T)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(j){return j===void 0||typeof j=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(j){return j===null||j&&r(u(j),function(R,T){return R&&i(["id","email","name"],T)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(j){return typeof j=="object"&&j!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(j){return!j||j&&r(["debug","info","warn","error"],function(R,T){return R&&typeof j[T]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(j){return s(j)&&j.length===o(j,function(R){return typeof R=="string"||R&&typeof R.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(j){return s(j)&&j.length===o(j,function(R){return R&&typeof R=="object"&&typeof R.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(j){return s(j)&&j.length===o(j,function(R){return R&&typeof R=="object"&&typeof R.name=="string"}).length}}};var g=function(j){for(var R=1;R<arguments.length;R++){var T=arguments[R];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(j[A]=T[A])}return j},b=function(j,R){return r(j,function(T,A,L,M){return T.concat(R(A,L,M))},[])};function y(){return y=Object.assign?Object.assign.bind():function(j){for(var R=1;R<arguments.length;R++){var T=arguments[R];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(j[A]=T[A])}return j},y.apply(this,arguments)}var x=m.schema,w={releaseStage:g({},x.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:y({},x.appType,{defaultValue:function(){return"browser"}}),logger:g({},x.logger,{defaultValue:function(){return typeof console<"u"&&typeof console.debug=="function"?S():void 0}})},S=function(){var j={},R=console.log;return b(["debug","info","warn","error"],function(T){var A=console[T];j[T]=typeof A=="function"?A.bind(console,"[bugsnag]"):R.bind(console,"[bugsnag]")}),j},k=function(){function j(T,A,L,M){M===void 0&&(M=new Date),this.type=L,this.message=T,this.metadata=A,this.timestamp=M}var R=j.prototype;return R.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},j}(),_=k,I={};(function(j,R){typeof I=="object"?I=R():j.StackFrame=R()})(this,function(){function j(de){return!isNaN(parseFloat(de))&&isFinite(de)}function R(de){return de.charAt(0).toUpperCase()+de.substring(1)}function T(de){return function(){return this[de]}}var A=["isConstructor","isEval","isNative","isToplevel"],L=["columnNumber","lineNumber"],M=["fileName","functionName","source"],U=["args"],se=A.concat(L,M,U);function Q(de){if(de instanceof Object)for(var $e=0;$e<se.length;$e++)de.hasOwnProperty(se[$e])&&de[se[$e]]!==void 0&&this["set"+R(se[$e])](de[se[$e]])}Q.prototype={getArgs:function(){return this.args},setArgs:function(de){if(Object.prototype.toString.call(de)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=de},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(de){if(de instanceof Q)this.evalOrigin=de;else if(de instanceof Object)this.evalOrigin=new Q(de);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var de=this.getFunctionName()||"{anonymous}",$e="("+(this.getArgs()||[]).join(",")+")",Ze=this.getFileName()?"@"+this.getFileName():"",Vt=j(this.getLineNumber())?":"+this.getLineNumber():"",_e=j(this.getColumnNumber())?":"+this.getColumnNumber():"";return de+$e+Ze+Vt+_e}};for(var ve=0;ve<A.length;ve++)Q.prototype["get"+R(A[ve])]=T(A[ve]),Q.prototype["set"+R(A[ve])]=function(de){return function($e){this[de]=!!$e}}(A[ve]);for(var me=0;me<L.length;me++)Q.prototype["get"+R(L[me])]=T(L[me]),Q.prototype["set"+R(L[me])]=function(de){return function($e){if(!j($e))throw new TypeError(de+" must be a Number");this[de]=Number($e)}}(L[me]);for(var Ee=0;Ee<M.length;Ee++)Q.prototype["get"+R(M[Ee])]=T(M[Ee]),Q.prototype["set"+R(M[Ee])]=function(de){return function($e){this[de]=String($e)}}(M[Ee]);return Q});var P={};(function(j,R){typeof P=="object"?P=R(I):j.ErrorStackParser=R(j.StackFrame)})(this,function(R){var T=/(^|@)\S+\:\d+/,A=/^\s*at .*(\S+\:\d+|\(native\))/m,L=/^(eval@)?(\[native code\])?$/;return{parse:function(U){if(typeof U.stacktrace<"u"||typeof U["opera#sourceloc"]<"u")return this.parseOpera(U);if(U.stack&&U.stack.match(A))return this.parseV8OrIE(U);if(U.stack)return this.parseFFOrSafari(U);throw new Error("Cannot parse given Error object")},extractLocation:function(U){if(U.indexOf(":")===-1)return[U];var se=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,Q=se.exec(U.replace(/[\(\)]/g,""));return[Q[1],Q[2]||void 0,Q[3]||void 0]},parseV8OrIE:function(U){var se=U.stack.split(`
`).filter(function(Q){return!!Q.match(A)},this);return se.map(function(Q){Q.indexOf("(eval ")>-1&&(Q=Q.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var ve=Q.replace(/^\s+/,"").replace(/\(eval code/g,"("),me=ve.match(/ (\((.+):(\d+):(\d+)\)$)/);ve=me?ve.replace(me[0],""):ve;var Ee=ve.split(/\s+/).slice(1),de=this.extractLocation(me?me[1]:Ee.pop()),$e=Ee.join(" ")||void 0,Ze=["eval","<anonymous>"].indexOf(de[0])>-1?void 0:de[0];return new R({functionName:$e,fileName:Ze,lineNumber:de[1],columnNumber:de[2],source:Q})},this)},parseFFOrSafari:function(U){var se=U.stack.split(`
`).filter(function(Q){return!Q.match(L)},this);return se.map(function(Q){if(Q.indexOf(" > eval")>-1&&(Q=Q.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),Q.indexOf("@")===-1&&Q.indexOf(":")===-1)return new R({functionName:Q});var ve=/((.*".+"[^@]*)?[^@]*)(?:@)/,me=Q.match(ve),Ee=me&&me[1]?me[1]:void 0,de=this.extractLocation(Q.replace(ve,""));return new R({functionName:Ee,fileName:de[0],lineNumber:de[1],columnNumber:de[2],source:Q})},this)},parseOpera:function(U){return!U.stacktrace||U.message.indexOf(`
`)>-1&&U.message.split(`
`).length>U.stacktrace.split(`
`).length?this.parseOpera9(U):U.stack?this.parseOpera11(U):this.parseOpera10(U)},parseOpera9:function(U){for(var se=/Line (\d+).*script (?:in )?(\S+)/i,Q=U.message.split(`
`),ve=[],me=2,Ee=Q.length;me<Ee;me+=2){var de=se.exec(Q[me]);de&&ve.push(new R({fileName:de[2],lineNumber:de[1],source:Q[me]}))}return ve},parseOpera10:function(U){for(var se=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,Q=U.stacktrace.split(`
`),ve=[],me=0,Ee=Q.length;me<Ee;me+=2){var de=se.exec(Q[me]);de&&ve.push(new R({functionName:de[3]||void 0,fileName:de[2],lineNumber:de[1],source:Q[me]}))}return ve},parseOpera11:function(U){var se=U.stack.split(`
`).filter(function(Q){return!!Q.match(T)&&!Q.match(/^Error created at/)},this);return se.map(function(Q){var ve=Q.split("@"),me=this.extractLocation(ve.pop()),Ee=ve.shift()||"",de=Ee.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0,$e;Ee.match(/\(([^\)]*)\)/)&&($e=Ee.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var Ze=$e===void 0||$e==="[arguments not available]"?void 0:$e.split(",");return new R({functionName:de,args:Ze,fileName:me[0],lineNumber:me[1],columnNumber:me[2],source:Q})},this)}}});var z=P,D=function(j,R,T,A){var L=A&&A.redactedKeys?A.redactedKeys:[],M=A&&A.redactedPaths?A.redactedPaths:[];return JSON.stringify(fe(j,L,M),R,T)},F=20,$=25e3,Z=8,ee="...";function W(j){return j instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(j))}function ue(j){return"[Throws: "+(j?j.message:"?")+"]"}function K(j,R){for(var T=0,A=j.length;T<A;T++)if(j[T]===R)return!0;return!1}function B(j,R){for(var T=0,A=j.length;T<A;T++)if(R.indexOf(j[T])===0)return!0;return!1}function H(j,R){for(var T=0,A=j.length;T<A;T++)if(typeof j[T]=="string"&&j[T].toLowerCase()===R.toLowerCase()||j[T]&&typeof j[T].test=="function"&&j[T].test(R))return!0;return!1}function N(j){return Object.prototype.toString.call(j)==="[object Array]"}function xe(j,R){try{return j[R]}catch(T){return ue(T)}}function fe(j,R,T){var A=[],L=0;function M(U,se){function Q(){return se.length>Z&&L>$}if(L++,se.length>F||Q())return ee;if(U===null||typeof U!="object")return U;if(K(A,U))return"[Circular]";if(A.push(U),typeof U.toJSON=="function")try{L--;var ve=M(U.toJSON(),se);return A.pop(),ve}catch(Ge){return ue(Ge)}var me=W(U);if(me){L--;var Ee=M({name:U.name,message:U.message},se);return A.pop(),Ee}if(N(U)){for(var de=[],$e=0,Ze=U.length;$e<Ze;$e++){if(Q()){de.push(ee);break}de.push(M(U[$e],se.concat("[]")))}return A.pop(),de}var Vt={};try{for(var _e in U)if(Object.prototype.hasOwnProperty.call(U,_e)){if(B(T,se.join("."))&&H(R,_e)){Vt[_e]="[REDACTED]";continue}if(Q()){Vt[_e]=ee;break}Vt[_e]=M(xe(U,_e),se.concat(_e))}}catch{}return A.pop(),Vt}return M(j,[])}function O(j,R,T,A){if(typeof T=="string"){A===void 0?A=null:A!==null&&typeof A!="string"&&(A=D(A));var L=R[T];if(typeof L=="number"){j[L]={name:T,variant:A};return}j.push({name:T,variant:A}),R[T]=j.length-1}}function Te(j,R,T){if(s(R)){for(var A=0;A<R.length;++A){var L=R[A];L===null||typeof L!="object"||O(j,T,L.name,L.variant)}return j}}function Oe(j){return b(o(j,Boolean),function(R){var T=R.name,A=R.variant,L={featureFlag:T};return typeof A=="string"&&(L.variant=A),L})}function ke(j,R,T){var A=R[T];typeof A=="number"&&(j[A]=null,delete R[T])}var He={add:O,clear:ke,merge:Te,toEventApi:Oe},Ke=function(j){return!!j&&(!!j.stack||!!j.stacktrace||!!j["opera#sourceloc"])&&typeof(j.stack||j.stacktrace||j["opera#sourceloc"])=="string"&&j.stack!==j.name+": "+j.message},it=Pe;function Pe(j){switch(Object.prototype.toString.call(j)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return j instanceof Error}}var bt=it,Ye=function(j,R,T,A){var L;if(R){var M;if(T===null)return zt(j,R);typeof T=="object"&&(M=T),typeof T=="string"&&(M=(L={},L[T]=A,L)),M&&(R==="__proto__"||R==="constructor"||R==="prototype"||(j[R]||(j[R]={}),j[R]=g({},j[R],M)))}},Qt=function(j,R,T){if(typeof R=="string"){if(!T)return j[R];if(j[R])return j[R][T]}},zt=function(j,R,T){if(typeof R=="string"){if(!T){delete j[R];return}R==="__proto__"||R==="constructor"||R==="prototype"||j[R]&&delete j[R][T]}},Ft={add:Ye,get:Qt,clear:zt},Cn={};(function(j,R){typeof Cn=="object"?Cn=R(I):j.StackGenerator=R(j.StackFrame)})(this,function(j){return{backtrace:function(T){var A=[],L=10;typeof T=="object"&&typeof T.maxStackSize=="number"&&(L=T.maxStackSize);for(var M=arguments.callee;M&&A.length<L&&M.arguments;){for(var U=new Array(M.arguments.length),se=0;se<U.length;++se)U[se]=M.arguments[se];/function(?:\s+([\w$]+))+\s*\(/.test(M.toString())?A.push(new j({functionName:RegExp.$1||void 0,args:U})):A.push(new j({args:U}));try{M=M.caller}catch{break}}return A}}});function Cr(){return Cr=Object.assign?Object.assign.bind():function(j){for(var R=1;R<arguments.length;R++){var T=arguments[R];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(j[A]=T[A])}return j},Cr.apply(this,arguments)}var un=function(){function j(T,A,L,M,U){L===void 0&&(L=[]),M===void 0&&(M=vo()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=U,this._handledState=M,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this.errors=[Ae(T,A,j.__type,L)]}var R=j.prototype;return R.addMetadata=function(A,L,M){return Ft.add(this._metadata,A,L,M)},R.setTraceCorrelation=function(A,L){typeof A=="string"&&(this._correlation=Cr({traceId:A},typeof L=="string"?{spanId:L}:{}))},R.getMetadata=function(A,L){return Ft.get(this._metadata,A,L)},R.clearMetadata=function(A,L){return Ft.clear(this._metadata,A,L)},R.addFeatureFlag=function(A,L){L===void 0&&(L=null),He.add(this._features,this._featuresIndex,A,L)},R.addFeatureFlags=function(A){He.merge(this._features,A,this._featuresIndex)},R.getFeatureFlags=function(){return He.toEventApi(this._features)},R.clearFeatureFlag=function(A){He.clear(this._features,this._featuresIndex,A)},R.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},R.getUser=function(){return this._user},R.setUser=function(A,L,M){this._user={id:A,email:L,name:M}},R.toJSON=function(){return{payloadVersion:"4",exceptions:b(this.errors,function(A){return g({},A,{message:A.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},j}(),Xn=function(j){var R={file:j.fileName,method:Ln(j.functionName),lineNumber:j.lineNumber,columnNumber:j.columnNumber,code:void 0,inProject:void 0};return R.lineNumber>-1&&!R.file&&!R.method&&(R.file="global code"),R},Ln=function(j){return/^global code$/i.test(j)?"global code":j},vo=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},he=function(j){return typeof j=="string"?j:""};function Ae(j,R,T,A){return{errorClass:he(j),errorMessage:he(R),type:T,stacktrace:r(A,function(L,M){var U=Xn(M);try{return JSON.stringify(U)==="{}"?L:L.concat(U)}catch{return L}},[])}}function xt(j){return j.cause?[j].concat(xt(j.cause)):[j]}un.getStacktrace=function(j,R,T){if(Ke(j))return z.parse(j).slice(R);try{return o(Cn.backtrace(),function(A){return(A.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+T)}catch{return[]}},un.create=function(j,R,T,A,L,M){L===void 0&&(L=0);var U=dn(j,R,A,M),se=U[0],Q=U[1],ve;try{var me=un.getStacktrace(se,Q>0?1+Q+L:0,1+L);ve=new un(se.name,se.message,me,T,j)}catch{ve=new un(se.name,se.message,[],T,j)}if(se.name==="InvalidError"&&ve.addMetadata(""+A,"non-error parameter",Wt(j)),se.cause){var Ee,de=xt(se).slice(1),$e=b(de,function(Ze){var Vt=bt(Ze)&&Ke(Ze)?z.parse(Ze):[],_e=dn(Ze,!0,"error cause"),Ge=_e[0];return Ge.name==="InvalidError"&&ve.addMetadata("error cause",Wt(Ze)),Ae(Ge.name,Ge.message,un.__type,Vt)});(Ee=ve.errors).push.apply(Ee,$e)}return ve};var Wt=function(j){return j===null?"null":j===void 0?"undefined":j},dn=function(j,R,T,A){var L,M=0,U=function(se){var Q=T==="error cause"?"was":"received";A&&A.warn(T+" "+Q+' a non-error: "'+se+'"');var ve=new Error(T+" "+Q+' a non-error. See "'+T+'" tab for more detail.');return ve.name="InvalidError",ve};if(!R)bt(j)?L=j:(L=U(typeof j),M+=2);else switch(typeof j){case"string":case"number":case"boolean":L=new Error(String(j)),M+=1;break;case"function":L=U("function"),M+=2;break;case"object":j!==null&&bt(j)?L=j:j!==null&&V(j)?(L=new Error(j.message||j.errorMessage),L.name=j.name||j.errorClass,M+=1):(L=U(j===null?"null":"unsupported object"),M+=2);break;default:L=U("nothing"),M+=2}if(!Ke(L))try{throw L}catch(se){Ke(se)&&(L=se,M=1)}return[L,M]};un.__type="browserjs";var V=function(j){return(typeof j.name=="string"||typeof j.errorClass=="string")&&(typeof j.message=="string"||typeof j.errorMessage=="string")},ie=un,Se=function(j,R,T){var A=0,L=function(){if(A>=j.length)return T(null,!0);R(j[A],function(M,U){if(M)return T(M);if(U===!1)return T(null,!1);A++,L()})};L()},We=function(j,R,T,A){var L=function(M,U){if(typeof M!="function")return U(null);try{if(M.length!==2){var se=M(R);return se&&typeof se.then=="function"?se.then(function(Q){return setTimeout(function(){return U(null,Q)})},function(Q){setTimeout(function(){return T(Q),U(null,!0)})}):U(null,se)}M(R,function(Q,ve){if(Q)return T(Q),U(null);U(null,ve)})}catch(Q){T(Q),U(null)}};Se(j,L,A)},ze=function(j,R,T,A){for(var L=!1,M=j.slice();!L&&M.length;)try{L=M.pop()(R)===!1}catch(U){A.error("Error occurred in "+T+" callback, continuing anyway…"),A.error(U)}return L},Pt=function(R,T){var A="000000000"+R;return A.substr(A.length-T)},jn=typeof window=="object"?window:self,pn=0;for(var pr in jn)Object.hasOwnProperty.call(jn,pr)&&pn++;var jr=navigator.mimeTypes?navigator.mimeTypes.length:0,ft=Pt((jr+navigator.userAgent.length).toString(36)+pn.toString(36),4),Mi=function(){return ft},kn=0,jc=4,Mt=36,zn=Math.pow(Mt,jc);function Fn(){return Pt((Math.random()*zn<<0).toString(Mt),jc)}function Oo(){return kn=kn<zn?kn:0,kn++,kn-1}function Qn(){var j="c",R=new Date().getTime().toString(Mt),T=Pt(Oo().toString(Mt),jc),A=Mi(),L=Fn()+Fn();return j+R+T+A+L}Qn.fingerprint=Mi;var kr=Qn,Kr=function(){function j(){this.id=kr(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var R=j.prototype;return R.getUser=function(){return this._user},R.setUser=function(A,L,M){this._user={id:A,email:L,name:M}},R.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},R._track=function(A){this[A._handledState.unhandled?"_unhandled":"_handled"]+=1},j}(),Lo=Kr,Er=He.add,zs=He.clear,ai=He.merge,_r=function(){},Da=function(){function j(T,A,L,M){var U=this;A===void 0&&(A=m.schema),L===void 0&&(L=[]),this._notifier=M,this._config={},this._schema=A,this._delivery={sendSession:_r,sendEvent:_r},this._logger={debug:_r,info:_r,warn:_r,error:_r},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=j,this.Event=ie,this.Breadcrumb=_,this.Session=Lo,this._config=this._configure(T,L),b(L.concat(this._config.plugins),function(ve){ve&&U._loadPlugin(ve)}),this._depth=1;var se=this,Q=this.notify;this.notify=function(){return Q.apply(se,arguments)}}var R=j.prototype;return R.addMetadata=function(A,L,M){return Ft.add(this._metadata,A,L,M)},R.getMetadata=function(A,L){return Ft.get(this._metadata,A,L)},R.clearMetadata=function(A,L){return Ft.clear(this._metadata,A,L)},R.addFeatureFlag=function(A,L){L===void 0&&(L=null),Er(this._features,this._featuresIndex,A,L)},R.addFeatureFlags=function(A){ai(this._features,A,this._featuresIndex)},R.clearFeatureFlag=function(A){zs(this._features,this._featuresIndex,A)},R.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},R.getContext=function(){return this._context},R.setContext=function(A){this._context=A},R._configure=function(A,L){var M=r(L,function(ve,me){return me&&me.configSchema?g({},ve,me.configSchema):ve},this._schema),U=r(u(M),function(ve,me){var Ee=M[me].defaultValue(A[me]);if(A[me]!==void 0){var de=M[me].validate(A[me]);de?M[me].allowPartialObject?ve.config[me]=g(Ee,A[me]):ve.config[me]=A[me]:(ve.errors[me]=M[me].message,ve.config[me]=Ee)}else ve.config[me]=Ee;return ve},{errors:{},config:{}}),se=U.errors,Q=U.config;if(M.apiKey){if(!Q.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(Q.apiKey)||(se.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=g({},Q.metadata),ai(this._features,Q.featureFlags,this._featuresIndex),this._user=g({},Q.user),this._context=Q.context,Q.logger&&(this._logger=Q.logger),Q.onError&&(this._cbs.e=this._cbs.e.concat(Q.onError)),Q.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(Q.onBreadcrumb)),Q.onSession&&(this._cbs.s=this._cbs.s.concat(Q.onSession)),u(se).length&&this._logger.warn(Od(se,A)),Q},R.getUser=function(){return this._user},R.setUser=function(A,L,M){this._user={id:A,email:L,name:M}},R._loadPlugin=function(A){var L=A.load(this);return A.name&&(this._plugins["~"+A.name+"~"]=L),this},R.getPlugin=function(A){return this._plugins["~"+A+"~"]},R._setDelivery=function(A){this._delivery=A(this)},R.startSession=function(){var A=new Lo;A.app.releaseStage=this._config.releaseStage,A.app.version=this._config.appVersion,A.app.type=this._config.appType,A._user=g({},this._user);var L=ze(this._cbs.s,A,"onSession",this._logger);return L?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,A)},R.addOnError=function(A,L){L===void 0&&(L=!1),this._cbs.e[L?"unshift":"push"](A)},R.removeOnError=function(A){this._cbs.e=o(this._cbs.e,function(L){return L!==A})},R._addOnSessionPayload=function(A){this._cbs.sp.push(A)},R.addOnSession=function(A){this._cbs.s.push(A)},R.removeOnSession=function(A){this._cbs.s=o(this._cbs.s,function(L){return L!==A})},R.addOnBreadcrumb=function(A,L){L===void 0&&(L=!1),this._cbs.b[L?"unshift":"push"](A)},R.removeOnBreadcrumb=function(A){this._cbs.b=o(this._cbs.b,function(L){return L!==A})},R.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},R.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},R.leaveBreadcrumb=function(A,L,M){if(A=typeof A=="string"?A:"",M=typeof M=="string"&&i(n,M)?M:"manual",L=typeof L=="object"&&L!==null?L:{},!!A){var U=new _(A,L,M),se=ze(this._cbs.b,U,"onBreadcrumb",this._logger);if(se){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(U),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},R._isBreadcrumbTypeEnabled=function(A){var L=this._config.enabledBreadcrumbTypes;return L===null||i(L,A)},R.notify=function(A,L,M){M===void 0&&(M=_r);var U=ie.create(A,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(U,L,M)},R._notify=function(A,L,M){var U=this;if(M===void 0&&(M=_r),A.app=g({},A.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),A.context=A.context||this._context,A._metadata=g({},A._metadata,this._metadata),A._user=g({},A._user,this._user),A.breadcrumbs=this._breadcrumbs.slice(),ai(A._features,this._features,A._featuresIndex),this._config.enabledReleaseStages!==null&&!i(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),M(null,A);var se=A.severity,Q=function(me){U._logger.error("Error occurred in onError callback, continuing anyway…"),U._logger.error(me)},ve=[].concat(this._cbs.e).concat(L);We(ve,A,Q,function(me,Ee){if(me&&Q(me),!Ee)return U._logger.debug("Event not sent due to onError callback"),M(null,A);U._isBreadcrumbTypeEnabled("error")&&j.prototype.leaveBreadcrumb.call(U,A.errors[0].errorClass,{errorClass:A.errors[0].errorClass,errorMessage:A.errors[0].errorMessage,severity:A.severity},"error"),se!==A.severity&&(A._handledState.severityReason={type:"userCallbackSetSeverity"}),A.unhandled!==A._handledState.unhandled&&(A._handledState.severityReason.unhandledOverridden=!0,A._handledState.unhandled=A.unhandled),U._session&&(U._session._track(A),A._session=U._session),U._delivery.sendEvent({apiKey:A.apiKey||U._config.apiKey,notifier:U._notifier,events:[A]},function(de){return M(de,A)})})},j}(),Od=function(j,R){var T=new Error(`Invalid configuration
`+b(u(j),function(A){return" - "+A+" "+j[A]+", got "+Fs(R[A])}).join(`
`));return T},Fs=function(j){switch(typeof j){case"string":case"number":case"object":return JSON.stringify(j);default:return String(j)}},li=Da,zo={},dw=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];zo.event=function(j,R){var T=D(j,null,null,{redactedPaths:dw,redactedKeys:R});return T.length>1e6&&(j.events[0]._metadata={notifier:`WARNING!
Serialized payload was `+T.length/1e6+`MB (limit = 1MB)
metadata was removed`},T=D(j,null,null,{redactedPaths:dw,redactedKeys:R})),T},zo.session=function(j,R){var T=D(j,null,null);return T};var ig={};ig=function(j,R){return R===void 0&&(R=window),{sendEvent:function(T,A){A===void 0&&(A=function(){});var L=pw(j._config,"notify","4",R),M=zo.event(T,j._config.redactedKeys),U=new R.XDomainRequest;U.onload=function(){A(null)},U.onerror=function(){var se=new Error("Event failed to send");j._logger.error("Event failed to send…",se),M.length>1e6&&j._logger.warn("Event oversized ("+(M.length/1e6).toFixed(2)+" MB)"),A(se)},U.open("POST",L),setTimeout(function(){try{U.send(M)}catch(se){j._logger.error(se),A(se)}},0)},sendSession:function(T,A){A===void 0&&(A=function(){});var L=pw(j._config,"sessions","1",R),M=new R.XDomainRequest;M.onload=function(){A(null)},M.open("POST",L),setTimeout(function(){try{M.send(zo.session(T,j._config.redactedKeys))}catch(U){j._logger.error(U),A(U)}},0)}}};var pw=function(j,R,T,A){var L=JSON.parse(JSON.stringify(new Date)),M=AA(j.endpoints[R],A.location.protocol);return M+"?apiKey="+encodeURIComponent(j.apiKey)+"&payloadVersion="+T+"&sentAt="+encodeURIComponent(L)},AA=ig._matchPageProtocol=function(j,R){return R==="http:"?j.replace(/^https:/,"http:"):j},PA=function(j,R){return R===void 0&&(R=window),{sendEvent:function(T,A){A===void 0&&(A=function(){});try{var L=j._config.endpoints.notify,M=new R.XMLHttpRequest,U=zo.event(T,j._config.redactedKeys);M.onreadystatechange=function(){if(M.readyState===R.XMLHttpRequest.DONE){var se=M.status;if(se===0||se>=400){var Q=new Error("Request failed with status "+se);j._logger.error("Event failed to send…",Q),U.length>1e6&&j._logger.warn("Event oversized ("+(U.length/1e6).toFixed(2)+" MB)"),A(Q)}else A(null)}},M.open("POST",L),M.setRequestHeader("Content-Type","application/json"),M.setRequestHeader("Bugsnag-Api-Key",T.apiKey||j._config.apiKey),M.setRequestHeader("Bugsnag-Payload-Version","4"),M.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),M.send(U)}catch(se){j._logger.error(se)}},sendSession:function(T,A){A===void 0&&(A=function(){});try{var L=j._config.endpoints.sessions,M=new R.XMLHttpRequest;M.onreadystatechange=function(){if(M.readyState===R.XMLHttpRequest.DONE){var U=M.status;if(U===0||U>=400){var se=new Error("Request failed with status "+U);j._logger.error("Session failed to send…",se),A(se)}else A(null)}},M.open("POST",L),M.setRequestHeader("Content-Type","application/json"),M.setRequestHeader("Bugsnag-Api-Key",j._config.apiKey),M.setRequestHeader("Bugsnag-Payload-Version","1"),M.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),M.send(zo.session(T,j._config.redactedKeys))}catch(U){j._logger.error(U)}}}},fw=new Date,TA=function(){fw=new Date},DA={name:"appDuration",load:function(j){return j.addOnError(function(R){var T=new Date;R.app.duration=T-fw},!0),{reset:TA}}},NA=function(j){return j===void 0&&(j=window),{load:function(R){R.addOnError(function(T){T.context===void 0&&(T.context=j.location.pathname)},!0)}}},sg=function(R,T){var A="000000000"+R;return A.substr(A.length-T)},hw=typeof window=="object"?window:self,mw=0;for(var OA in hw)Object.hasOwnProperty.call(hw,OA)&&mw++;var LA=navigator.mimeTypes?navigator.mimeTypes.length:0,zA=sg((LA+navigator.userAgent.length).toString(36)+mw.toString(36),4),gw=function(){return zA},kc=0,ag=4,Ld=36,vw=Math.pow(Ld,ag);function yw(){return sg((Math.random()*vw<<0).toString(Ld),ag)}function FA(){return kc=kc<vw?kc:0,kc++,kc-1}function bw(){var j="c",R=new Date().getTime().toString(Ld),T=sg(FA().toString(Ld),ag),A=gw(),L=yw()+yw();return j+R+T+A+L}bw.fingerprint=gw;var MA=bw,xw="bugsnag-anonymous-id",$A=function(j){try{var R=j.localStorage,T=R.getItem(xw);return T&&/^c[a-z0-9]{20,32}$/.test(T)||(T=MA(),R.setItem(xw,T)),T}catch{}},BA=function(j,R){return j===void 0&&(j=navigator),R===void 0&&(R=window),{load:function(T){var A={locale:j.browserLanguage||j.systemLanguage||j.userLanguage||j.language,userAgent:j.userAgent};R&&R.screen&&R.screen.orientation&&R.screen.orientation.type?A.orientation=R.screen.orientation.type:R&&R.document&&(A.orientation=R.document.documentElement.clientWidth>R.document.documentElement.clientHeight?"landscape":"portrait"),T._config.generateAnonymousId&&(A.id=$A(R)),T.addOnSession(function(L){L.device=g({},L.device,A),T._config.collectUserIp||ww(L)}),T.addOnError(function(L){L.device=g({},L.device,A,{time:new Date}),T._config.collectUserIp||ww(L)},!0)},configSchema:{generateAnonymousId:{validate:function(T){return T===!0||T===!1},defaultValue:function(){return!0},message:"should be true|false"}}}},ww=function(j){var R=j.getUser();(!R||!R.id)&&j.setUser(j.device.id)},HA=function(j){return j===void 0&&(j=window),{load:function(R){R.addOnError(function(T){T.request&&T.request.url||(T.request=g({},T.request,{url:j.location.href}))},!0)}}},UA={load:function(j){j._sessionDelegate=WA}},WA={startSession:function(j,R){var T=j;return T._session=R,T._pausedSession=null,T._config.enabledReleaseStages!==null&&!i(T._config.enabledReleaseStages,T._config.releaseStage)?(T._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),T):(T._delivery.sendSession({notifier:T._notifier,device:R.device,app:R.app,sessions:[{id:R.id,startedAt:R.startedAt,user:R._user}]}),T)},resumeSession:function(j){return j._session?j:j._pausedSession?(j._session=j._pausedSession,j._pausedSession=null,j):j.startSession()},pauseSession:function(j){j._pausedSession=j._session,j._session=null}},VA={load:function(j){j._config.collectUserIp||j.addOnError(function(R){R._user&&typeof R._user.id>"u"&&delete R._user.id,R._user=g({id:"[REDACTED]"},R._user),R.request=g({clientIp:"[REDACTED]"},R.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(j){return j===!0||j===!1}}}},Sw={};Sw.load=function(j){var R=/^(local-)?dev(elopment)?$/.test(j._config.releaseStage);R||!j._isBreadcrumbTypeEnabled("log")||b(qA,function(T){var A=console[T];console[T]=function(){for(var L=arguments.length,M=new Array(L),U=0;U<L;U++)M[U]=arguments[U];j.leaveBreadcrumb("Console output",r(M,function(se,Q,ve){var me="[Unknown value]";try{me=String(Q)}catch{}if(me==="[object Object]")try{me=JSON.stringify(Q)}catch{}return se["["+ve+"]"]=me,se},{severity:T.indexOf("group")===0?"log":T}),"log"),A.apply(console,M)},console[T]._restore=function(){console[T]=A}})};var qA=o(["log","debug","info","warn","error"],function(j){return typeof console<"u"&&typeof console[j]=="function"}),Cw=200,jw=5e5,GA=function(j,R){return j===void 0&&(j=document),R===void 0&&(R=window),{load:function(T){if(!T._config.trackInlineScripts)return;var A=R.location.href,L="",M=!!j.attachEvent,U=M?j.readyState==="complete":j.readyState!=="loading",se=function(){return j.documentElement.outerHTML};L=se();var Q=j.onreadystatechange;j.onreadystatechange=function(){j.readyState==="interactive"&&(L=se(),U=!0);try{Q.apply(this,arguments)}catch{}};var ve=null,me=function(_e){ve=_e},Ee=function(){var _e=j.currentScript||ve;if(!_e&&!U){var Ge=j.scripts||j.getElementsByTagName("script");_e=Ge[Ge.length-1]}return _e},de=function(_e){(!U||!L)&&(L=se());var Ge=["<!-- DOC START -->"].concat(L.split(`
`)),En=_e-1,fn=Math.max(En-3,0),fr=Math.min(En+3,Ge.length);return r(Ge.slice(fn,fr),function(Zn,Ec,dg){return Zn[fn+1+dg]=Ec.length<=Cw?Ec:Ec.substr(0,Cw),Zn},{})};T.addOnError(function(_e){_e.errors[0].stacktrace=o(_e.errors[0].stacktrace,function(Zn){return!/__trace__$/.test(Zn.method)});var Ge=_e.errors[0].stacktrace[0],En=function(Zn){return Zn.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!(Ge&&Ge.file&&En(Ge.file)!==En(A))){var fn=Ee();if(fn){var fr=fn.innerHTML;_e.addMetadata("script","content",fr.length<=jw?fr:fr.substr(0,jw)),Ge&&Ge.lineNumber&&(Ge.code=de(Ge.lineNumber))}}},!0);var $e=b(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(_e){return lg(R,_e,function(Ge){return Vt(Ge,function(En){return{get:function(){return En[0]},replace:function(fn){En[0]=fn}}})})}),Ze=$e[0];b(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],function(_e){!R[_e]||!R[_e].prototype||!Object.prototype.hasOwnProperty.call(R[_e].prototype,"addEventListener")||(lg(R[_e].prototype,"addEventListener",function(Ge){return Vt(Ge,kw)}),lg(R[_e].prototype,"removeEventListener",function(Ge){return Vt(Ge,kw,!0)}))});function Vt(_e,Ge,En){return En===void 0&&(En=!1),function(){var fn=[].slice.call(arguments);try{var fr=Ge(fn),Zn=fr.get();if(En&&_e.apply(this,fn),typeof Zn!="function")return _e.apply(this,fn);if(Zn.__trace__)fr.replace(Zn.__trace__);else{var Ec=Ee();Zn.__trace__=function(){me(Ec),Ze(function(){me(null)},0);var lP=Zn.apply(this,arguments);return me(null),lP},Zn.__trace__.__trace__=Zn.__trace__,fr.replace(Zn.__trace__)}}catch{}if(_e.apply)return _e.apply(this,fn);switch(fn.length){case 1:return _e(fn[0]);case 2:return _e(fn[0],fn[1]);default:return _e()}}}},configSchema:{trackInlineScripts:{validate:function(T){return T===!0||T===!1},defaultValue:function(){return!0},message:"should be true|false"}}}};function lg(j,R,T){var A=j[R];if(!A)return A;var L=T(A);return j[R]=L,A}function kw(j){var R=!!j[1]&&typeof j[1].handleEvent=="function";return{get:function(){return R?j[1].handleEvent:j[1]},replace:function(T){R?j[1].handleEvent=T:j[1]=T}}}var KA=function(j){return j===void 0&&(j=window),{load:function(R){"addEventListener"in j&&R._isBreadcrumbTypeEnabled("user")&&j.addEventListener("click",function(T){var A,L;try{A=XA(T.target),L=Ew(T.target,j)}catch{A="[hidden]",L="[hidden]",R._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}R.leaveBreadcrumb("UI click",{targetText:A,targetSelector:L},"user")},!0)}}},YA=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/;function XA(j){var R=j.textContent||j.innerText||"";return!R&&(j.type==="submit"||j.type==="button")&&(R=j.value),R=R.replace(YA,"$1"),R.length>140?R.slice(0,135)+"(...)":R}function Ew(j,R){var T=[j.tagName];if(j.id&&T.push("#"+j.id),j.className&&j.className.length&&T.push("."+j.className.split(" ").join(".")),!R.document.querySelectorAll||!Array.prototype.indexOf)return T.join("");try{if(R.document.querySelectorAll(T.join("")).length===1)return T.join("")}catch{return T.join("")}if(j.parentNode.childNodes.length>1){var A=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1;T.push(":nth-child("+A+")")}return R.document.querySelectorAll(T.join("")).length===1?T.join(""):j.parentNode?Ew(j.parentNode,R)+" > "+T.join(""):T.join("")}var _w={};_w=function(j){j===void 0&&(j=window);var R={load:function(T){if("addEventListener"in j&&T._isBreadcrumbTypeEnabled("navigation")){var A=function(L){return function(){return T.leaveBreadcrumb(L,{},"navigation")}};j.addEventListener("pagehide",A("Page hidden"),!0),j.addEventListener("pageshow",A("Page shown"),!0),j.addEventListener("load",A("Page loaded"),!0),j.document.addEventListener("DOMContentLoaded",A("DOMContentLoaded"),!0),j.addEventListener("load",function(){return j.addEventListener("popstate",A("Navigated back"),!0)}),j.addEventListener("hashchange",function(L){var M=L.oldURL?{from:zd(L.oldURL,j),to:zd(L.newURL,j),state:Rw(j)}:{to:zd(j.location.href,j)};T.leaveBreadcrumb("Hash changed",M,"navigation")},!0),j.history.replaceState&&Iw(T,j.history,"replaceState",j),j.history.pushState&&Iw(T,j.history,"pushState",j)}}};return R};var zd=function(j,R){var T=R.document.createElement("A");return T.href=j,""+T.pathname+T.search+T.hash},QA=function(j,R,T,A){var L=zd(j.location.href,j);return{title:T,state:R,prevState:Rw(j),to:A||L,from:L}},Iw=function(j,R,T,A){var L=R[T];R[T]=function(M,U,se){j.leaveBreadcrumb("History "+T,QA(A,M,U,se),"navigation"),typeof j.resetEventCount=="function"&&j.resetEventCount(),j._config.autoTrackSessions&&j.startSession(),L.apply(R,[M,U].concat(se!==void 0?se:[]))}},Rw=function(j){try{return j.history.state}catch{}},Na="request",JA=function(j,R){j===void 0&&(j=[]),R===void 0&&(R=window);var T={load:function(A){if(!A._isBreadcrumbTypeEnabled("request"))return;var L=[A._config.endpoints.notify,A._config.endpoints.sessions].concat(j);M(),Q();function M(){if("addEventListener"in R.XMLHttpRequest.prototype){var Ee=R.XMLHttpRequest.prototype.open;R.XMLHttpRequest.prototype.open=function($e,Ze){var Vt=this,_e=!1,Ge=function(){return se($e,Ze)},En=function(){return U($e,Ze,Vt.status)};_e&&(this.removeEventListener("load",En),this.removeEventListener("error",Ge)),this.addEventListener("load",En),this.addEventListener("error",Ge),_e=!0,Ee.apply(this,arguments)}}}function U(Ee,de,$e){if(de===void 0){A._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!(typeof de=="string"&&i(L,de.replace(/\?.*$/,"")))){var Ze={status:$e,request:Ee+" "+de};$e>=400?A.leaveBreadcrumb("XMLHttpRequest failed",Ze,Na):A.leaveBreadcrumb("XMLHttpRequest succeeded",Ze,Na)}}function se(Ee,de){if(de===void 0){A._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}typeof de=="string"&&i(L,de.replace(/\?.*$/,""))||A.leaveBreadcrumb("XMLHttpRequest error",{request:Ee+" "+de},Na)}function Q(){if(!(!("fetch"in R)||R.fetch.polyfill)){var Ee=R.fetch;R.fetch=function(){var $e=arguments,Ze=arguments[0],Vt=arguments[1],_e,Ge=null;return Ze&&typeof Ze=="object"?(Ge=Ze.url,Vt&&"method"in Vt?_e=Vt.method:Ze&&"method"in Ze&&(_e=Ze.method)):(Ge=Ze,Vt&&"method"in Vt&&(_e=Vt.method)),_e===void 0&&(_e="GET"),new Promise(function(En,fn){Ee.apply(void 0,$e).then(function(fr){ve(fr,_e,Ge),En(fr)}).catch(function(fr){me(_e,Ge),fn(fr)})})}}}var ve=function(Ee,de,$e){var Ze={status:Ee.status,request:de+" "+$e};Ee.status>=400?A.leaveBreadcrumb("fetch() failed",Ze,Na):A.leaveBreadcrumb("fetch() succeeded",Ze,Na)},me=function(Ee,de){A.leaveBreadcrumb("fetch() error",{request:Ee+" "+de},Na)}}};return T},ZA={load:function(j){var R=0;j.addOnError(function(T){if(R>=j._config.maxEvents)return j._logger.warn("Cancelling event send due to maxEvents per session limit of "+j._config.maxEvents+" being reached"),!1;R++}),j.resetEventCount=function(){R=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(j){return d(1,100)(j)}}}},cg={};cg={load:function(j){j.addOnError(function(R){var T=r(R.errors,function(A,L){return A.concat(L.stacktrace)},[]);b(T,function(A){A.file=eP(A.file)})})}};var eP=cg._strip=function(j){return typeof j=="string"?j.replace(/\?.*$/,"").replace(/#.*$/,""):j},tP=function(j,R){return j===void 0&&(j=window),R===void 0&&(R="window onerror"),{load:function(T){if(!T._config.autoDetectErrors||!T._config.enabledErrorTypes.unhandledExceptions)return;function A(M,U,se,Q,ve){if(se===0&&/Script error\.?/.test(M))T._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var me={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},Ee;if(ve)Ee=T.Event.create(ve,!0,me,R,1),Aw(Ee.errors[0].stacktrace,U,se,Q);else if(typeof M=="object"&&M!==null&&(!U||typeof U!="string")&&!se&&!Q&&!ve){var de=M.type?"Event: "+M.type:"Error",$e=M.message||M.detail||"";Ee=T.Event.create({name:de,message:$e},!0,me,R,1),Ee.originalError=M,Ee.addMetadata(R,{event:M,extraParameters:U})}else Ee=T.Event.create(M,!0,me,R,1),Aw(Ee.errors[0].stacktrace,U,se,Q);T._notify(Ee)}typeof L=="function"&&L.apply(this,arguments)}var L=j.onerror;j.onerror=A}}},Aw=function(j,R,T,A){j[0]||j.push({});var L=j[0];!L.file&&typeof R=="string"&&(L.file=R),!L.lineNumber&&ug(T)&&(L.lineNumber=T),L.columnNumber||(ug(A)?L.columnNumber=A:window.event&&ug(window.event.errorCharacter)&&(L.columnNumber=window.event.errorCharacter))},ug=function(j){return typeof j=="number"&&String.call(j)!=="NaN"},nP=function(j){j===void 0&&(j=window);var R={load:function(T){if(!(!T._config.autoDetectErrors||!T._config.enabledErrorTypes.unhandledRejections)){var A=function(L){var M=L.reason,U=!1;try{L.detail&&L.detail.reason&&(M=L.detail.reason,U=!0)}catch{}var se=T.Event.create(M,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,T._logger);U&&b(se.errors[0].stacktrace,rP(M)),T._notify(se,function(Q){if(bt(Q.originalError)&&!Q.originalError.stack){var ve;Q.addMetadata("unhandledRejection handler",(ve={},ve[Object.prototype.toString.call(Q.originalError)]={name:Q.originalError.name,message:Q.originalError.message,code:Q.originalError.code},ve))}})};"addEventListener"in j?j.addEventListener("unhandledrejection",A):j.onunhandledrejection=function(L,M){A({detail:{reason:L,promise:M}})}}}};return R},rP=function(j){return function(R){R.file!==j.toString()&&R.method&&(R.method=R.method.replace(/^\s+/,""))}},Ms={},oP="Bugsnag JavaScript",iP="7.25.0",sP="https://github.com/bugsnag/bugsnag-js",aP=g({},m.schema,w),Jn={_client:null,createClient:function(j){typeof j=="string"&&(j={apiKey:j}),j||(j={});var R=[DA,BA(),NA(),HA(),ZA,UA,VA,cg,tP(),nP(),_w(),KA(),JA(),Sw,GA()],T=new li(j,aP,R,{name:oP,version:iP,url:sP});return T._setDelivery(window.XDomainRequest?ig:PA),T._logger.debug("Loaded!"),T.leaveBreadcrumb("Bugsnag loaded",{},"state"),T._config.autoTrackSessions?T.startSession():T},start:function(j){return Jn._client?(Jn._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),Jn._client):(Jn._client=Jn.createClient(j),Jn._client)},isStarted:function(){return Jn._client!=null}};return b(["resetEventCount"].concat(u(li.prototype)),function(j){/^_/.test(j)||(Jn[j]=function(){if(!Jn._client)return console.log("Bugsnag."+j+"() was called before Bugsnag.start()");Jn._client._depth+=1;var R=Jn._client[j].apply(Jn._client,arguments);return Jn._client._depth-=1,R})}),Ms=Jn,Ms.Client=li,Ms.Event=ie,Ms.Session=Lo,Ms.Breadcrumb=_,Ms.default=Jn,Ms})})(l_);var lY=l_.exports,cY=lY;const ly=co(cY);var c_={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(){var n={};function r(){return r=Object.assign?Object.assign.bind():function(u){for(var d=1;d<arguments.length;d++){var p=arguments[d];for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(u[h]=p[h])}return u},r.apply(this,arguments)}function o(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function i(u,d){u.prototype=Object.create(d.prototype),u.prototype.constructor=u,s(u,d)}function s(u,d){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,m){return h.__proto__=m,h},s(u,d)}n=function(){function u(){var p=typeof window<"u"&&window.React;if(this.name="react",this.lazy=arguments.length===0&&!p,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||p,!this.React))throw new Error("@bugsnag/plugin-react reference to `React` was undefined")}var d=u.prototype;return d.load=function(h){if(!this.lazy){var m=c(this.React,h);return m.createErrorBoundary=function(){return m},m}var v=function(){throw new Error(`@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:
Pass React to the plugin constructor
\`Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })\`
and then call \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()\`
Or if React is not available until after Bugsnag has started,
construct the plugin with no arguments
\`Bugsnag.start({ plugins: [new BugsnagPluginReact()] })\`,
then pass in React when available to construct your error boundary
\`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)\``)};return v.createErrorBoundary=function(g){if(!g)throw new Error("@bugsnag/plugin-react reference to `React` was undefined");return c(g,h)},v},u}();var l=function(u){for(var d=u.split(/\n/g),p="",h=0,m=d.length;h<m;h++)d[h].length&&(p+=(p.length?`
`:"")+d[h].trim());return p},c=function(u,d){return function(p){i(h,p);function h(v){var g;return g=p.call(this,v)||this,g.state={error:null,info:null},g.handleClearError=g.handleClearError.bind(o(g)),g}var m=h.prototype;return m.handleClearError=function(){this.setState({error:null,info:null})},m.componentDidCatch=function(g,b){var y=this.props.onError,x={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},w=d.Event.create(g,!0,x,1);b&&b.componentStack&&(b.componentStack=l(b.componentStack)),w.addMetadata("react",b),d._notify(w,y),this.setState({error:g,info:b})},m.render=function(){var g=this.state.error;if(g){var b=this.props.FallbackComponent;return b?u.createElement(b,r({},this.state,{clearError:this.handleClearError})):null}return this.props.children},h}(u.Component)};return n.formatComponentStack=l,n.default=n,n})})(c_);var uY=c_.exports;const dY=co(uY);function u_(e){console.error(e),Sx||ly.notify(e)}function pY(e){return ly.start({apiKey:e,plugins:[new dY],releaseStage:"production",enabledReleaseStages:["production"],autoDetectErrors:!Sx()}),ly.getPlugin("react").createErrorBoundary(ce)}const $6="serverUrl",d_={set(e){localStorage.setItem($6,JSON.stringify(e))},get(){try{const e=localStorage.getItem($6);return JSON.parse(e)}catch{return}}},fY=e=>{const[t,n,r]=MF(),[o,i]=Dr("mainColor","#1b50d8"),[s,l]=Dr("navbarTop",!1),[c,u]=Dr("hideTemplates",!1),[d,p]=Dr("viewTransitionsDisabled",!1),[h,m]=Dr("navbarFloating",!0),[v,g]=Dr("sideBarOpen",window.innerWidth>a_),[b,y]=Dr("sidebarKeyboardDndEnabled",!1),[x,w]=ab(),[S,k]=sb(),[_,I]=Dr("drive",S),P=f.useCallback(F=>{const $=new URL(F);I(F),k($.origin),d_.set($.origin)},[I,k]),z=f.useCallback(F=>{try{w(F),F!=null&&F.subject&&at.success("Signed in!"),F===void 0&&at.success("Signed out.")}catch($){u_(new Error("Agent setting failed: "+$.message))}},[w]),D=f.useMemo(()=>({drive:_,setDrive:P,darkMode:t,darkModeSetting:r,setDarkMode:n,mainColor:o,setMainColor:i,navbarTop:s,setNavbarTop:l,navbarFloating:h,setNavbarFloating:m,sideBarLocked:v,setSideBarLocked:g,agent:x,setAgent:z,viewTransitionsDisabled:d,setViewTransitionsDisabled:p,sidebarKeyboardDndEnabled:b,setSidebarKeyboardDndEnabled:y,hideTemplates:c,setHideTemplates:u}),[_,P,t,r,n,o,i,s,l,h,m,v,g,x,z,d,p,b,y,c,u]);return a.jsx(_x.Provider,{value:D,children:e.children})},hY={darkMode:!1,darkModeSetting:yl.auto,setDarkMode:()=>{},mainColor:"",setMainColor:()=>{},drive:"",setDrive:()=>{},navbarTop:!1,setNavbarTop:()=>{},navbarFloating:!1,setNavbarFloating:()=>{},sideBarLocked:!1,setSideBarLocked:()=>{},agent:void 0,setAgent:()=>{},viewTransitionsDisabled:!0,setViewTransitionsDisabled:()=>{},sidebarKeyboardDndEnabled:!1,setSidebarKeyboardDndEnabled:()=>{},hideTemplates:!1,setHideTemplates:()=>{}},Le=()=>f.useContext(_x),_x=f.createContext(hY),mY=({children:e})=>{const{mainColor:t,darkMode:n}=f.useContext(_x);return a.jsx(a.Fragment,{children:a.jsx(Yz,{theme:vY(n,t),children:e},t)})},p_={sidebar:10,dialog:100,dropdown:200,networkIndicator:300,toast:400},f_=100,B6="2.2rem",gY="4.2rem";function In(e=3){const n=[In.raw(.25),In.raw(.5),In.raw(1),In.raw(1.25),In.raw(1.5),In.raw(1.75),In.raw(2),In.raw(3),In.raw(4),In.raw(5),In.raw(7.5),In.raw(10),In.raw(15),In.raw(20),In.raw(30)][e-1];if(n===void 0)throw new Error(`Size index ${e} out of bounds`);return n}In.raw=e=>`${e}rem`;const vY=(e,t)=>{const n=e?Tr(.2,t):t,r=e?"#000000":"#ffffff",o=e?"#fff":"#000",i=e?"rgba(255,255,255,.15)":"rgba(0,0,0,0.07)",s=e?"rgba(255,255,255,.3)":"rgba(0,0,0,0.2)";return{darkMode:e,fontFamilyHeader:"'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",fontFamily:"'Open Sans', 'Helvetica Neue', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",boxShadow:`0 0 10px 0px ${i}`,boxShadowIntense:`0 0 22px 0px ${s}`,boxShadowSoft:`0px 1.5px 2.2px rgba(0, 0, 0, 0.02),
0px 3.5px 5.3px rgba(0, 0, 0, 0.028), 0px 6.6px 10px rgba(0, 0, 0, 0.035),
0px 11.8px 17.9px rgba(0, 0, 0, 0.042),
0px 22.1px 33.4px rgba(0, 0, 0, 0.05), 0px 53px 80px rgba(0, 0, 0, 0.07);`,containerWidth:40,containerWidthWide:"900px",fontSizeBody:1,fontSizeH1:2,sideBarWidth:15,margin:1,radius:"9px",heights:{breadCrumbBar:B6,floatingSearchBarPadding:gY,fullPage:`calc(100% - ${B6})`},size:In,colors:{main:n,mainLight:Tr(.08)(n),mainDark:pi(.08)(n),bg:r,bgBody:e?r:pi(.02)(r),bg1:e?Tr(.1)(r):pi(.05)(r),bg2:e?Tr(.3)(r):pi(.2)(r),text:o,text1:e?pi(.1)(o):Tr(.1)(o),textLight:e?pi(.4)(o):Tr(.4)(o),textLight2:e?pi(.8)(o):Tr(.8)(o),alert:"#cf5b5b",alertLight:"#e66f6f",warning:"#f5a623"},animation:{duration:`${f_}ms`},zIndex:p_}},yY=Jz([":root{--view-transition-duration:150ms;}*{box-sizing:border-box;scrollbar-color:"," ",";&::-webkit-scrollbar{width:10px;height:10px;padding:3px;background-color:",";}&::-webkit-scrollbar-thumb{width:8px;margin:auto;background-color:",";border-radius:",";&:hover{background-color:",";}}}body{background-color:",";color:",";font-family:",";line-height:1.5em;word-wrap:break-word;overflow-wrap:anywhere;margin:0;transition:background-color .2s ease,border-color .2s ease,color .2s ease;font-size:0.95rem;}input,button,body{overflow-wrap:normal;}a{color:",";}h1{font-size:","rem;}h2{font-size:1.7rem;}h1,h2,h3,h4,h5,h6{margin-bottom:",";font-weight:bold;font-family:",";line-height:1em;margin-top:0;word-break:break-word;}i{font-style:italic;}p{margin-top:0;margin-bottom:",";}ul{margin-top:0;margin-bottom:",";padding:0;li{list-style-type:disc;margin-left:",";margin-bottom:",";}}b{font-weight:bold;}::view-transition-old(*),::view-transition-new(*){animation-duration:var(--view-transition-duration);}::view-transition-old(root),::view-transition-new(root){animation-duration:0ms;}@keyframes slide-in-from-right{from{transform:translateX(5rem);opacity:0;}to{transform:translateX(0);opacity:1;}}::view-transition-image-pair(download-button){mix-blend-mode:normal;}::view-transition-old(download-button):only-child,::view-transition-new(download-button):only-child{animation:slide-in-from-right var(--view-transition-duration) ease-in-out;animation-fill-mode:both;}::view-transition-old(download-button):only-child{animation-direction:reverse;}::view-transition-group(navbar){z-index:10;}@media (prefers-reduced-motion){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important;}}@keyframes toast-enter{0%{left:110%;}100%{left:0;}}@keyframes toast-exit{0%{left:0;}100%{left:110%;}}"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg,e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>pi(.1)(e.theme.colors.bg2),e=>e.theme.colors.bgBody,e=>e.theme.colors.text,e=>e.theme.fontFamily,e=>e.theme.colors.main,e=>e.theme.fontSizeH1,e=>e.theme.size(),e=>e.theme.fontFamilyHeader,e=>e.theme.size(),e=>e.theme.size(),e=>e.theme.size(7),e=>e.theme.size(7)),ht=C.div.withConfig({displayName:"Containers__ContainerNarrow",componentId:"sc-2050a54a-0"})(["width:min(100%,","rem);margin:auto;padding:","rem;padding-bottom:10rem;"],e=>e.theme.containerWidth,e=>e.theme.margin),Is=C.div.withConfig({displayName:"Containers__ContainerWide",componentId:"sc-2050a54a-1"})(["width:min(100%,",");margin:auto;padding:","rem;padding-bottom:10rem;"],e=>e.theme.containerWidthWide,e=>e.theme.margin),ql=C.div.withConfig({displayName:"Containers__ContainerFull",componentId:"sc-2050a54a-2"})(["padding:","rem;padding-bottom:10rem;"],e=>e.theme.margin),bY=()=>{const[e,t]=f.useState(window.innerWidth);return f.useEffect(()=>{const n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},H6=["http","https","mailto","tel"];function xY(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let o=-1;for(;++o<H6.length;){const i=H6[o];if(r===i.length&&t.slice(0,i.length).toLowerCase()===i)return t}return o=t.indexOf("?"),o!==-1&&r>o||(o=t.indexOf("#"),o!==-1&&r>o)?t:"javascript:void(0)"}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var wY=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const h_=co(wY);function fu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?U6(e.position):"start"in e||"end"in e?U6(e):"line"in e||"column"in e?cy(e):""}function cy(e){return W6(e&&e.line)+":"+W6(e&&e.column)}function U6(e){return cy(e&&e.start)+"-"+cy(e&&e.end)}function W6(e){return e&&typeof e=="number"?e:1}class fo extends Error{constructor(t,n,r){const o=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?o[1]=r:(o[0]=r.slice(0,s),o[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(i=n.position):"start"in n||"end"in n?i=n:("line"in n||"column"in n)&&(i.start=n)),this.name=fu(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=o[0],this.ruleId=o[1],this.file,this.actual,this.expected,this.url,this.note}}fo.prototype.file="";fo.prototype.name="";fo.prototype.reason="";fo.prototype.message="";fo.prototype.stack="";fo.prototype.fatal=null;fo.prototype.column=null;fo.prototype.line=null;fo.prototype.source=null;fo.prototype.ruleId=null;fo.prototype.position=null;const Ho={basename:SY,dirname:CY,extname:jY,join:kY,sep:"/"};function SY(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ed(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),l>-1&&(e.charCodeAt(o)===t.charCodeAt(l--)?l<0&&(r=o):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function CY(e){if(Ed(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function jY(e){Ed(e);let t=e.length,n=-1,r=0,o=-1,i=0,s;for(;t--;){const l=e.charCodeAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function kY(...e){let t=-1,n;for(;++t<e.length;)Ed(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":EY(n)}function EY(e){Ed(e);const t=e.charCodeAt(0)===47;let n=_Y(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function _Y(e,t){let n="",r=0,o=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.charCodeAt(s);else{if(l===47)break;l=47}if(l===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",r=0,o=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),r=s-o-1;o=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Ed(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IY={cwd:RY};function RY(){return"/"}function uy(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function AY(e){if(typeof e=="string")e=new URL(e);else if(!uy(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return PY(e)}function PY(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const L0=["history","path","basename","stem","extname","dirname"];class m_{constructor(t){let n;t?typeof t=="string"||TY(t)?n={value:t}:uy(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=IY.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<L0.length;){const i=L0[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)L0.includes(o)||(this[o]=n[o])}get path(){return this.history[this.history.length-1]}set path(t){uy(t)&&(t=AY(t)),F0(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?Ho.dirname(this.path):void 0}set dirname(t){V6(this.basename,"dirname"),this.path=Ho.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?Ho.basename(this.path):void 0}set basename(t){F0(t,"basename"),z0(t,"basename"),this.path=Ho.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?Ho.extname(this.path):void 0}set extname(t){if(z0(t,"extname"),V6(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ho.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?Ho.basename(this.path,this.extname):void 0}set stem(t){F0(t,"stem"),z0(t,"stem"),this.path=Ho.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const o=new fo(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=null,o}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}}function z0(e,t){if(e&&e.includes(Ho.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ho.sep+"`")}function F0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function V6(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function TY(e){return h_(e)}function q6(e){if(e)throw e}var rf=Object.prototype.hasOwnProperty,g_=Object.prototype.toString,G6=Object.defineProperty,K6=Object.getOwnPropertyDescriptor,Y6=function(t){return typeof Array.isArray=="function"?Array.isArray(t):g_.call(t)==="[object Array]"},X6=function(t){if(!t||g_.call(t)!=="[object Object]")return!1;var n=rf.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&rf.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||rf.call(t,o)},Q6=function(t,n){G6&&n.name==="__proto__"?G6(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},J6=function(t,n){if(n==="__proto__")if(rf.call(t,n)){if(K6)return K6(t,n).value}else return;return t[n]},DY=function e(){var t,n,r,o,i,s,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=J6(l,n),o=J6(t,n),l!==o&&(d&&o&&(X6(o)||(i=Y6(o)))?(i?(i=!1,s=r&&Y6(r)?r:[]):s=r&&X6(r)?r:{},Q6(l,{name:n,newValue:e(d,s,o)})):typeof o<"u"&&Q6(l,{name:n,newValue:o}));return l};const Z6=co(DY);function dy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function NY(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...o);function l(c,...u){const d=e[++i];let p=-1;if(c){s(c);return}for(;++p<o.length;)(u[p]===null||u[p]===void 0)&&(u[p]=o[p]);o=u,d?OY(d,l)(...u):s(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function OY(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(o);try{c=e.apply(this,s)}catch(u){const d=u;if(l&&n)throw d;return o(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,o):c instanceof Error?o(c):i(c))}function o(s,...l){n||(n=!0,t(s,...l))}function i(s){o(null,s)}}const LY=y_().freeze(),v_={}.hasOwnProperty;function y_(){const e=NY(),t=[];let n={},r,o=-1;return i.data=s,i.Parser=void 0,i.Compiler=void 0,i.freeze=l,i.attachers=t,i.use=c,i.parse=u,i.stringify=d,i.run=p,i.runSync=h,i.process=m,i.processSync=v,i;function i(){const g=y_();let b=-1;for(;++b<t.length;)g.use(...t[b]);return g.data(Z6(!0,{},n)),g}function s(g,b){return typeof g=="string"?arguments.length===2?(B0("data",r),n[g]=b,i):v_.call(n,g)&&n[g]||null:g?(B0("data",r),n=g,i):n}function l(){if(r)return i;for(;++o<t.length;){const[g,...b]=t[o];if(b[0]===!1)continue;b[0]===!0&&(b[0]=void 0);const y=g.call(i,...b);typeof y=="function"&&e.use(y)}return r=!0,o=Number.POSITIVE_INFINITY,i}function c(g,...b){let y;if(B0("use",r),g!=null)if(typeof g=="function")k(g,...b);else if(typeof g=="object")Array.isArray(g)?S(g):w(g);else throw new TypeError("Expected usable value, not `"+g+"`");return y&&(n.settings=Object.assign(n.settings||{},y)),i;function x(_){if(typeof _=="function")k(_);else if(typeof _=="object")if(Array.isArray(_)){const[I,...P]=_;k(I,...P)}else w(_);else throw new TypeError("Expected usable value, not `"+_+"`")}function w(_){S(_.plugins),_.settings&&(y=Object.assign(y||{},_.settings))}function S(_){let I=-1;if(_!=null)if(Array.isArray(_))for(;++I<_.length;){const P=_[I];x(P)}else throw new TypeError("Expected a list of plugins, not `"+_+"`")}function k(_,I){let P=-1,z;for(;++P<t.length;)if(t[P][0]===_){z=t[P];break}z?(dy(z[1])&&dy(I)&&(I=Z6(!0,z[1],I)),z[1]=I):t.push([...arguments])}}function u(g){i.freeze();const b=Mc(g),y=i.Parser;return M0("parse",y),e5(y,"parse")?new y(String(b),b).parse():y(String(b),b)}function d(g,b){i.freeze();const y=Mc(b),x=i.Compiler;return $0("stringify",x),t5(g),e5(x,"compile")?new x(g,y).compile():x(g,y)}function p(g,b,y){if(t5(g),i.freeze(),!y&&typeof b=="function"&&(y=b,b=void 0),!y)return new Promise(x);x(null,y);function x(w,S){e.run(g,Mc(b),k);function k(_,I,P){I=I||g,_?S(_):w?w(I):y(null,I,P)}}}function h(g,b){let y,x;return i.run(g,b,w),n5("runSync","run",x),y;function w(S,k){q6(S),y=k,x=!0}}function m(g,b){if(i.freeze(),M0("process",i.Parser),$0("process",i.Compiler),!b)return new Promise(y);y(null,b);function y(x,w){const S=Mc(g);i.run(i.parse(S),S,(_,I,P)=>{if(_||!I||!P)k(_);else{const z=i.stringify(I,P);z==null||(MY(z)?P.value=z:P.result=z),k(_,P)}});function k(_,I){_||!I?w(_):x?x(I):b(null,I)}}}function v(g){let b;i.freeze(),M0("processSync",i.Parser),$0("processSync",i.Compiler);const y=Mc(g);return i.process(y,x),n5("processSync","process",b),y;function x(w){b=!0,q6(w)}}}function e5(e,t){return typeof e=="function"&&e.prototype&&(zY(e.prototype)||t in e.prototype)}function zY(e){let t;for(t in e)if(v_.call(e,t))return!0;return!1}function M0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function $0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function B0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function t5(e){if(!dy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function n5(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mc(e){return FY(e)?e:new m_(e)}function FY(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MY(e){return typeof e=="string"||h_(e)}const $Y={};function BY(e,t){const n=$Y,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return b_(e,r,o)}function b_(e,t,n){if(HY(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return r5(e.children,t,n)}return Array.isArray(e)?r5(e,t,n):""}function r5(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=b_(e[o],t,n);return r.join("")}function HY(e){return!!(e&&typeof e=="object")}function Hr(e,t,n,r){const o=e.length;let i=0,s;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function eo(e,t){return e.length>0?(Hr(e,e.length,0,t),e):t}const o5={}.hasOwnProperty;function x_(e){const t={};let n=-1;for(;++n<e.length;)UY(t,e[n]);return t}function UY(e,t){let n;for(n in t){const o=(o5.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){o5.call(o,s)||(o[s]=[]);const l=i[s];WY(o[s],Array.isArray(l)?l:l?[l]:[])}}}function WY(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Hr(e,0,0,r)}const VY=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,or=Os(/[A-Za-z]/),Wn=Os(/[\dA-Za-z]/),qY=Os(/[#-'*+\--9=?A-Z^-~]/);function hh(e){return e!==null&&(e<32||e===127)}const py=Os(/\d/),GY=Os(/[\dA-Fa-f]/),KY=Os(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const Nm=Os(VY),ya=Os(/\s/);function Os(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return Ve(c)?(e.enter(n),l(c)):t(c)}function l(c){return Ve(c)&&i++<o?(e.consume(c),l):(e.exit(n),t(c))}}const YY={tokenize:XY};function XY(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ie(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const QY={tokenize:JY},i5={tokenize:ZY};function JY(e){const t=this,n=[];let r=0,o,i,s;return l;function l(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&x();const S=t.events.length;let k=S,_;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){_=t.events[k][1].end;break}y(r);let I=S;for(;I<t.events.length;)t.events[I][1].end=Object.assign({},_),I++;return Hr(t.events,k+1,0,t.events.slice(S)),t.events.length=I,u(w)}return l(w)}function u(w){if(r===n.length){if(!o)return h(w);if(o.currentConstruct&&o.currentConstruct.concrete)return v(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(i5,d,p)(w)}function d(w){return o&&x(),y(r),h(w)}function p(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,v(w)}function h(w){return t.containerState={},e.attempt(i5,m,v)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),h(w)}function v(w){if(w===null){o&&x(),y(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),g(w)}function g(w){if(w===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return Ie(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),g)}function b(w,S){const k=t.sliceStream(w);if(S&&k.push(null),w.previous=i,i&&(i.next=w),i=w,o.defineSkip(w.start),o.write(k),t.parser.lazy[w.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<s&&(!o.events[_][1].end||o.events[_][1].end.offset>s))return;const I=t.events.length;let P=I,z,D;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(z){D=t.events[P][1].end;break}z=!0}for(y(r),_=I;_<t.events.length;)t.events[_][1].end=Object.assign({},D),_++;Hr(t.events,P+1,0,t.events.slice(I)),t.events.length=_}}function y(w){let S=n.length;for(;S-- >w;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=w}function x(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function ZY(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mh(e){if(e===null||mt(e)||ya(e))return 1;if(Nm(e))return 2}function Om(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const fy={name:"attention",tokenize:tX,resolveAll:eX};function eX(e,t){let n=-1,r,o,i,s,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);s5(p,-c),s5(h,c),s={type:c>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},l={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},l.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=eo(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=eo(u,[["enter",o,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=eo(u,Om(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=eo(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=eo(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Hr(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tX(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mh(r);let i;return s;function s(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=mh(c),p=!d||d===2&&o||n.includes(c),h=!o||o===2&&d||n.includes(r);return u._open=!!(i===42?p:p&&(o||!h)),u._close=!!(i===42?h:h&&(d||!p)),t(c)}}function s5(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nX={name:"autolink",tokenize:rX};function rX(e,t,n){let r=0;return o;function o(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return or(m)?(e.consume(m),s):u(m)}function s(m){return m===43||m===45||m===46||Wn(m)?(r=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||Wn(m))&&r++<32?(e.consume(m),l):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||hh(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):qY(m)?(e.consume(m),u):n(m)}function d(m){return Wn(m)?p(m):n(m)}function p(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):h(m)}function h(m){if((m===45||Wn(m))&&r++<63){const v=m===45?h:p;return e.consume(m),v}return n(m)}}const _d={tokenize:oX,partial:!0};function oX(e,t,n){return r;function r(i){return Ve(i)?Qe(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ie(i)?t(i):n(i)}}const w_={name:"blockQuote",tokenize:iX,continuation:{tokenize:sX},exit:aX};function iX(e,t,n){const r=this;return o;function o(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return Ve(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function sX(e,t,n){const r=this;return o;function o(s){return Ve(s)?Qe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(w_,t,n)(s)}}function aX(e){e.exit("blockQuote")}const S_={name:"characterEscape",tokenize:lX};function lX(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return KY(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const a5=document.createElement("i");function Ix(e){const t="&"+e+";";a5.innerHTML=t;const n=a5.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const C_={name:"characterReference",tokenize:cX};function cX(e,t,n){const r=this;let o=0,i,s;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,s=Wn,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=GY,d):(e.enter("characterReferenceValue"),i=7,s=py,d(p))}function d(p){if(p===59&&o){const h=e.exit("characterReferenceValue");return s===Wn&&!Ix(r.sliceSerialize(h))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&o++<i?(e.consume(p),d):n(p)}}const l5={tokenize:dX,partial:!0},c5={name:"codeFenced",tokenize:uX,concrete:!0};function uX(e,t,n){const r=this,o={tokenize:k,partial:!0};let i=0,s=0,l;return c;function c(_){return u(_)}function u(_){const I=r.events[r.events.length-1];return i=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,l=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(_)}function d(_){return _===l?(s++,e.consume(_),d):s<3?n(_):(e.exit("codeFencedFenceSequence"),Ve(_)?Qe(e,p,"whitespace")(_):p(_))}function p(_){return _===null||Ie(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(l5,g,S)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(_)):Ve(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,m,"whitespace")(_)):_===96&&_===l?n(_):(e.consume(_),h)}function m(_){return _===null||Ie(_)?p(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(_)):_===96&&_===l?n(_):(e.consume(_),v)}function g(_){return e.attempt(o,S,b)(_)}function b(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),y}function y(_){return i>0&&Ve(_)?Qe(e,x,"linePrefix",i+1)(_):x(_)}function x(_){return _===null||Ie(_)?e.check(l5,g,S)(_):(e.enter("codeFlowValue"),w(_))}function w(_){return _===null||Ie(_)?(e.exit("codeFlowValue"),x(_)):(e.consume(_),w)}function S(_){return e.exit("codeFenced"),t(_)}function k(_,I,P){let z=0;return D;function D(W){return _.enter("lineEnding"),_.consume(W),_.exit("lineEnding"),F}function F(W){return _.enter("codeFencedFence"),Ve(W)?Qe(_,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):$(W)}function $(W){return W===l?(_.enter("codeFencedFenceSequence"),Z(W)):P(W)}function Z(W){return W===l?(z++,_.consume(W),Z):z>=s?(_.exit("codeFencedFenceSequence"),Ve(W)?Qe(_,ee,"whitespace")(W):ee(W)):P(W)}function ee(W){return W===null||Ie(W)?(_.exit("codeFencedFence"),I(W)):P(W)}}}function dX(e,t,n){const r=this;return o;function o(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const H0={name:"codeIndented",tokenize:fX},pX={tokenize:hX,partial:!0};function fX(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),Qe(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):Ie(u)?e.attempt(pX,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||Ie(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function hX(e,t,n){const r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):Ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):Qe(e,i,"linePrefix",5)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Ie(s)?o(s):n(s)}}const mX={name:"codeText",tokenize:yX,resolve:gX,previous:vX};function gX(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function vX(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yX(e,t,n){let r=0,o,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),r++,l):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(i=e.enter("codeTextSequence"),o=0,d(p)):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||Ie(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),u)}function d(p){return p===96?(e.consume(p),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",u(p))}}function j_(e){const t={};let n=-1,r,o,i,s,l,c,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bX(e,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(s=e[i],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},e[o][1].start),l=e.slice(o,n),l.unshift(r),Hr(e,o,n-o+1,l))}}return!u}function bX(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const i=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,c=[],u={};let d,p,h=-1,m=n,v=0,g=0;const b=[g];for(;m;){for(;e[++o][1]!==m;);i.push(o),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),p&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=m,m=m.next}for(m=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(g=h+1,b.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):b.pop(),h=b.length;h--;){const y=l.slice(b[h],b[h+1]),x=i.pop();c.unshift([x,x+y.length-1]),Hr(e,x,2,y)}for(h=-1;++h<c.length;)u[v+c[h][0]]=v+c[h][1],v+=c[h][1]-c[h][0]-1;return u}const xX={tokenize:CX,resolve:SX},wX={tokenize:jX,partial:!0};function SX(e){return j_(e),e}function CX(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?i(l):Ie(l)?e.check(wX,s,i)(l):(e.consume(l),o)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function jX(e,t,n){const r=this;return o;function o(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Qe(e,i,"linePrefix")}function i(s){if(s===null||Ie(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function k_(e,t,n,r,o,i,s,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return p;function p(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),h):y===null||y===32||y===41||hh(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(y))}function h(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(l),h(y)):y===null||y===60||Ie(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function g(y){return!d&&(y===null||y===41||mt(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):d<u&&y===40?(e.consume(y),d++,g):y===41?(e.consume(y),d--,g):y===null||y===32||y===40||hh(y)?n(y):(e.consume(y),y===92?b:g)}function b(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}function E_(e,t,n,r,o,i){const s=this;let l=0,c;return u;function u(m){return e.enter(r),e.enter(o),e.consume(m),e.exit(o),e.enter(i),d}function d(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(i),e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):Ie(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===null||m===91||m===93||Ie(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Ve(m)),m===92?h:p)}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,p):p(m)}}function __(e,t,n,r,o,i){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),s=h===40?41:h,c):n(h)}function c(h){return h===s?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===s?(e.exit(i),c(s)):h===null?n(h):Ie(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Qe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===s||h===null||Ie(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?p:d)}function p(h){return h===s||h===92?(e.consume(h),d):d(h)}}function hu(e,t){let n;return r;function r(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ve(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function Eo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kX={name:"definition",tokenize:_X},EX={tokenize:IX,partial:!0};function _X(e,t,n){const r=this;let o;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return E_.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return o=Eo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return mt(m)?hu(e,u)(m):u(m)}function u(m){return k_(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(EX,p,p)(m)}function p(m){return Ve(m)?Qe(e,h,"whitespace")(m):h(m)}function h(m){return m===null||Ie(m)?(e.exit("definition"),r.parser.defined.push(o),t(m)):n(m)}}function IX(e,t,n){return r;function r(l){return mt(l)?hu(e,o)(l):n(l)}function o(l){return __(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Ve(l)?Qe(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Ie(l)?t(l):n(l)}}const RX={name:"hardBreakEscape",tokenize:AX};function AX(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ie(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const PX={name:"headingAtx",tokenize:DX,resolve:TX};function TX(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Hr(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function DX(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||mt(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Ie(d)?(e.exit("atxHeading"),t(d)):Ve(d)?Qe(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||mt(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const NX=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],u5=["pre","script","style","textarea"],OX={name:"htmlFlow",tokenize:MX,resolveTo:FX,concrete:!0},LX={tokenize:BX,partial:!0},zX={tokenize:$X,partial:!0};function FX(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function MX(e,t,n){const r=this;let o,i,s,l,c;return u;function u(O){return d(O)}function d(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),p}function p(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),i=!0,g):O===63?(e.consume(O),o=3,r.interrupt?t:N):or(O)?(e.consume(O),s=String.fromCharCode(O),b):n(O)}function h(O){return O===45?(e.consume(O),o=2,m):O===91?(e.consume(O),o=5,l=0,v):or(O)?(e.consume(O),o=4,r.interrupt?t:N):n(O)}function m(O){return O===45?(e.consume(O),r.interrupt?t:N):n(O)}function v(O){const Te="CDATA[";return O===Te.charCodeAt(l++)?(e.consume(O),l===Te.length?r.interrupt?t:$:v):n(O)}function g(O){return or(O)?(e.consume(O),s=String.fromCharCode(O),b):n(O)}function b(O){if(O===null||O===47||O===62||mt(O)){const Te=O===47,Oe=s.toLowerCase();return!Te&&!i&&u5.includes(Oe)?(o=1,r.interrupt?t(O):$(O)):NX.includes(s.toLowerCase())?(o=6,Te?(e.consume(O),y):r.interrupt?t(O):$(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):i?x(O):w(O))}return O===45||Wn(O)?(e.consume(O),s+=String.fromCharCode(O),b):n(O)}function y(O){return O===62?(e.consume(O),r.interrupt?t:$):n(O)}function x(O){return Ve(O)?(e.consume(O),x):D(O)}function w(O){return O===47?(e.consume(O),D):O===58||O===95||or(O)?(e.consume(O),S):Ve(O)?(e.consume(O),w):D(O)}function S(O){return O===45||O===46||O===58||O===95||Wn(O)?(e.consume(O),S):k(O)}function k(O){return O===61?(e.consume(O),_):Ve(O)?(e.consume(O),k):w(O)}function _(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),c=O,I):Ve(O)?(e.consume(O),_):P(O)}function I(O){return O===c?(e.consume(O),c=null,z):O===null||Ie(O)?n(O):(e.consume(O),I)}function P(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||mt(O)?k(O):(e.consume(O),P)}function z(O){return O===47||O===62||Ve(O)?w(O):n(O)}function D(O){return O===62?(e.consume(O),F):n(O)}function F(O){return O===null||Ie(O)?$(O):Ve(O)?(e.consume(O),F):n(O)}function $(O){return O===45&&o===2?(e.consume(O),ue):O===60&&o===1?(e.consume(O),K):O===62&&o===4?(e.consume(O),xe):O===63&&o===3?(e.consume(O),N):O===93&&o===5?(e.consume(O),H):Ie(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(LX,fe,Z)(O)):O===null||Ie(O)?(e.exit("htmlFlowData"),Z(O)):(e.consume(O),$)}function Z(O){return e.check(zX,ee,fe)(O)}function ee(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),W}function W(O){return O===null||Ie(O)?Z(O):(e.enter("htmlFlowData"),$(O))}function ue(O){return O===45?(e.consume(O),N):$(O)}function K(O){return O===47?(e.consume(O),s="",B):$(O)}function B(O){if(O===62){const Te=s.toLowerCase();return u5.includes(Te)?(e.consume(O),xe):$(O)}return or(O)&&s.length<8?(e.consume(O),s+=String.fromCharCode(O),B):$(O)}function H(O){return O===93?(e.consume(O),N):$(O)}function N(O){return O===62?(e.consume(O),xe):O===45&&o===2?(e.consume(O),N):$(O)}function xe(O){return O===null||Ie(O)?(e.exit("htmlFlowData"),fe(O)):(e.consume(O),xe)}function fe(O){return e.exit("htmlFlow"),t(O)}}function $X(e,t,n){const r=this;return o;function o(s){return Ie(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function BX(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(_d,t,n)}}const HX={name:"htmlText",tokenize:UX};function UX(e,t,n){const r=this;let o,i,s;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),k):N===63?(e.consume(N),w):or(N)?(e.consume(N),P):n(N)}function u(N){return N===45?(e.consume(N),d):N===91?(e.consume(N),i=0,v):or(N)?(e.consume(N),x):n(N)}function d(N){return N===45?(e.consume(N),m):n(N)}function p(N){return N===null?n(N):N===45?(e.consume(N),h):Ie(N)?(s=p,K(N)):(e.consume(N),p)}function h(N){return N===45?(e.consume(N),m):p(N)}function m(N){return N===62?ue(N):N===45?h(N):p(N)}function v(N){const xe="CDATA[";return N===xe.charCodeAt(i++)?(e.consume(N),i===xe.length?g:v):n(N)}function g(N){return N===null?n(N):N===93?(e.consume(N),b):Ie(N)?(s=g,K(N)):(e.consume(N),g)}function b(N){return N===93?(e.consume(N),y):g(N)}function y(N){return N===62?ue(N):N===93?(e.consume(N),y):g(N)}function x(N){return N===null||N===62?ue(N):Ie(N)?(s=x,K(N)):(e.consume(N),x)}function w(N){return N===null?n(N):N===63?(e.consume(N),S):Ie(N)?(s=w,K(N)):(e.consume(N),w)}function S(N){return N===62?ue(N):w(N)}function k(N){return or(N)?(e.consume(N),_):n(N)}function _(N){return N===45||Wn(N)?(e.consume(N),_):I(N)}function I(N){return Ie(N)?(s=I,K(N)):Ve(N)?(e.consume(N),I):ue(N)}function P(N){return N===45||Wn(N)?(e.consume(N),P):N===47||N===62||mt(N)?z(N):n(N)}function z(N){return N===47?(e.consume(N),ue):N===58||N===95||or(N)?(e.consume(N),D):Ie(N)?(s=z,K(N)):Ve(N)?(e.consume(N),z):ue(N)}function D(N){return N===45||N===46||N===58||N===95||Wn(N)?(e.consume(N),D):F(N)}function F(N){return N===61?(e.consume(N),$):Ie(N)?(s=F,K(N)):Ve(N)?(e.consume(N),F):z(N)}function $(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,Z):Ie(N)?(s=$,K(N)):Ve(N)?(e.consume(N),$):(e.consume(N),ee)}function Z(N){return N===o?(e.consume(N),o=void 0,W):N===null?n(N):Ie(N)?(s=Z,K(N)):(e.consume(N),Z)}function ee(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||mt(N)?z(N):(e.consume(N),ee)}function W(N){return N===47||N===62||mt(N)?z(N):n(N)}function ue(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function K(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),B}function B(N){return Ve(N)?Qe(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):H(N)}function H(N){return e.enter("htmlTextData"),s(N)}}const Rx={name:"labelEnd",tokenize:YX,resolveTo:KX,resolveAll:GX},WX={tokenize:XX},VX={tokenize:QX},qX={tokenize:JX};function GX(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function KX(e,t){let n=e.length,r=0,o,i,s,l;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(s=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return l=[["enter",c,t],["enter",u,t]],l=eo(l,e.slice(i+1,i+r+3)),l=eo(l,[["enter",d,t]]),l=eo(l,Om(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),l=eo(l,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),l=eo(l,e.slice(s+1)),l=eo(l,[["exit",c,t]]),Hr(e,i,e.length,l),e}function YX(e,t,n){const r=this;let o=r.events.length,i,s;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return l;function l(h){return i?i._inactive?p(h):(s=r.parser.defined.includes(Eo(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):n(h)}function c(h){return h===40?e.attempt(WX,d,s?d:p)(h):h===91?e.attempt(VX,d,s?u:p)(h):s?d(h):p(h)}function u(h){return e.attempt(qX,d,p)(h)}function d(h){return t(h)}function p(h){return i._balanced=!0,n(h)}}function XX(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return mt(p)?hu(e,i)(p):i(p)}function i(p){return p===41?d(p):k_(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return mt(p)?hu(e,c)(p):d(p)}function l(p){return n(p)}function c(p){return p===34||p===39||p===40?__(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return mt(p)?hu(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function QX(e,t,n){const r=this;return o;function o(l){return E_.call(r,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(Eo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function JX(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const ZX={name:"labelStartImage",tokenize:eQ,resolveAll:Rx.resolveAll};function eQ(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const tQ={name:"labelStartLink",tokenize:nQ,resolveAll:Rx.resolveAll};function nQ(e,t,n){const r=this;return o;function o(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const U0={name:"lineEnding",tokenize:rQ};function rQ(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const of={name:"thematicBreak",tokenize:oQ};function oQ(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),s(u)}function s(u){return o=u,l(u)}function l(u){return u===o?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||Ie(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===o?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Ve(u)?Qe(e,l,"whitespace")(u):l(u))}}const hr={name:"list",tokenize:aQ,continuation:{tokenize:lQ},exit:uQ},iQ={tokenize:dQ,partial:!0},sQ={tokenize:cQ,partial:!0};function aQ(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return l;function l(m){const v=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:py(m)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(of,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return py(m)&&++s<10?(e.consume(m),c):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(_d,r.interrupt?n:d,e.attempt(iQ,h,p))}function d(m){return r.containerState.initialBlankLine=!0,i++,h(m)}function p(m){return Ve(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function lQ(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_d,o,i);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!Ve(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(sQ,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function cQ(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function uQ(e){e.exit(this.containerState.type)}function dQ(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const s=r.events[r.events.length-1];return!Ve(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const d5={name:"setextUnderline",tokenize:fQ,resolveTo:pQ};function pQ(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function fQ(e,t,n){const r=this;let o;return i;function i(u){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===o?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Ve(u)?Qe(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Ie(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const hQ={tokenize:mQ};function mQ(e){const t=this,n=e.attempt(_d,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(xX,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const gQ={resolveAll:R_()},vQ=I_("string"),yQ=I_("text");function I_(e){return{tokenize:t,resolveAll:R_(e==="text"?bQ:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,s,l);return s;function s(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const p=o[d];let h=-1;if(p)for(;++h<p.length;){const m=p[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function R_(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function bQ(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,s=-1,l=0,c;for(;i--;){const u=o[i];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+i,_bufferIndex:i?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function xQ(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let s=[],l=[];const c={consume:x,enter:w,exit:S,attempt:I(k),check:I(_),interrupt:I(_,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:m,sliceSerialize:h,now:v,defineSkip:g,write:p};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function p(F){return s=eo(s,F),b(),s[s.length-1]!==null?[]:(P(t,0),u.events=Om(i,u.events,u),u.events)}function h(F,$){return SQ(m(F),$)}function m(F){return wQ(s,F)}function v(){const{line:F,column:$,offset:Z,_index:ee,_bufferIndex:W}=r;return{line:F,column:$,offset:Z,_index:ee,_bufferIndex:W}}function g(F){o[F.line]=F.column,D()}function b(){let F;for(;r._index<s.length;){const $=s[r._index];if(typeof $=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<$.length;)y($.charCodeAt(r._bufferIndex));else y($)}}function y(F){d=d(F)}function x(F){Ie(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,D()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function w(F,$){const Z=$||{};return Z.type=F,Z.start=v(),u.events.push(["enter",Z,u]),l.push(Z),Z}function S(F){const $=l.pop();return $.end=v(),u.events.push(["exit",$,u]),$}function k(F,$){P(F,$.from)}function _(F,$){$.restore()}function I(F,$){return Z;function Z(ee,W,ue){let K,B,H,N;return Array.isArray(ee)?fe(ee):"tokenize"in ee?fe([ee]):xe(ee);function xe(ke){return He;function He(Ke){const it=Ke!==null&&ke[Ke],Pe=Ke!==null&&ke.null,bt=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return fe(bt)(Ke)}}function fe(ke){return K=ke,B=0,ke.length===0?ue:O(ke[B])}function O(ke){return He;function He(Ke){return N=z(),H=ke,ke.partial||(u.currentConstruct=ke),ke.name&&u.parser.constructs.disable.null.includes(ke.name)?Oe():ke.tokenize.call($?Object.assign(Object.create(u),$):u,c,Te,Oe)(Ke)}}function Te(ke){return F(H,N),W}function Oe(ke){return N.restore(),++B<K.length?O(K[B]):ue}}}function P(F,$){F.resolveAll&&!i.includes(F)&&i.push(F),F.resolve&&Hr(u.events,$,u.events.length-$,F.resolve(u.events.slice($),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function z(){const F=v(),$=u.previous,Z=u.currentConstruct,ee=u.events.length,W=Array.from(l);return{restore:ue,from:ee};function ue(){r=F,u.previous=$,u.currentConstruct=Z,u.events.length=ee,l=W,D()}}function D(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function wQ(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}function SQ(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
`;break}case-3:{s=`\r
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,r.push(s)}return r.join("")}const CQ={42:hr,43:hr,45:hr,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,62:w_},jQ={91:kX},kQ={[-2]:H0,[-1]:H0,32:H0},EQ={35:PX,42:of,45:[d5,of],60:OX,61:d5,95:of,96:c5,126:c5},_Q={38:C_,92:S_},IQ={[-5]:U0,[-4]:U0,[-3]:U0,33:ZX,38:C_,42:fy,60:[nX,HX],91:tQ,92:[RX,S_],93:Rx,95:fy,96:mX},RQ={null:[fy,gQ]},AQ={null:[42,95]},PQ={null:[]},TQ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:AQ,contentInitial:jQ,disable:PQ,document:CQ,flow:EQ,flowInitial:kQ,insideSpan:RQ,string:_Q,text:IQ},Symbol.toStringTag,{value:"Module"}));function DQ(e){const n=x_([TQ,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(YY),document:o(QY),flow:o(hQ),string:o(vQ),text:o(yQ)};return r;function o(i){return s;function s(l){return xQ(r,i,l)}}}const p5=/[\0\t\n\r]/g;function NQ(){let e=1,t="",n=!0,r;return o;function o(i,s,l){const c=[];let u,d,p,h,m;for(i=t+i.toString(s),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(p5.lastIndex=p,u=p5.exec(i),h=u&&u.index!==void 0?u.index:i.length,m=i.charCodeAt(h),!u){t=i.slice(p);break}if(m===10&&p===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<h&&(c.push(i.slice(p,h)),e+=h-p),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=h+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}function OQ(e){for(;!j_(e););return e}function A_(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const LQ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function P_(e){return e.replace(LQ,zQ)}function zQ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return A_(n.slice(i?2:1),i?16:10)}return Ix(n)||e}const T_={}.hasOwnProperty,FQ=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),MQ(n)(OQ(DQ(n).document().write(NQ()(e,t,!0))))};function MQ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ln),autolinkProtocol:F,autolinkEmail:F,atxHeading:l(Cn),blockQuote:l(bt),characterEscape:F,characterReference:F,codeFenced:l(Ye),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(Ye,c),codeText:l(Qt,c),codeTextData:F,data:F,codeFlowValue:F,definition:l(zt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Ft),hardBreakEscape:l(Cr),hardBreakTrailing:l(Cr),htmlFlow:l(un,c),htmlFlowData:F,htmlText:l(un,c),htmlTextData:F,image:l(Xn),label:c,link:l(Ln),listItem:l(he),listItemValue:v,listOrdered:l(vo,m),listUnordered:l(vo),paragraph:l(Ae),reference:Oe,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(Cn),strong:l(xt),thematicBreak:l(dn)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:Pe,autolinkProtocol:it,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:He,characterReferenceMarkerNumeric:He,characterReferenceValue:Ke,codeFenced:d(x),codeFencedFence:y,codeFencedFenceInfo:g,codeFencedFenceMeta:b,codeFlowValue:$,codeIndented:d(w),codeText:d(K),codeTextData:$,data:$,definition:d(),definitionDestinationString:_,definitionLabelString:S,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(W),htmlFlowData:$,htmlText:d(ue),htmlTextData:$,image:d(H),label:xe,labelText:N,lineEnding:Z,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ke,resourceDestinationString:fe,resourceTitleString:O,resource:Te,setextHeading:d(D),setextHeadingLineSequence:z,setextHeadingText:P,strong:d(),thematicBreak:d()}};D_(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(V){let ie={type:"root",children:[]};const Se={stack:[ie],tokenStack:[],config:t,enter:u,exit:p,buffer:c,resume:h,setData:i,getData:s},We=[];let ze=-1;for(;++ze<V.length;)if(V[ze][1].type==="listOrdered"||V[ze][1].type==="listUnordered")if(V[ze][0]==="enter")We.push(ze);else{const Pt=We.pop();ze=o(V,Pt,ze)}for(ze=-1;++ze<V.length;){const Pt=t[V[ze][0]];T_.call(Pt,V[ze][1].type)&&Pt[V[ze][1].type].call(Object.assign({sliceSerialize:V[ze][2].sliceSerialize},Se),V[ze][1])}if(Se.tokenStack.length>0){const Pt=Se.tokenStack[Se.tokenStack.length-1];(Pt[1]||f5).call(Se,void 0,Pt[0])}for(ie.position={start:Wi(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Wi(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<t.transforms.length;)ie=t.transforms[ze](ie)||ie;return ie}function o(V,ie,Se){let We=ie-1,ze=-1,Pt=!1,jn,pn,pr,jr;for(;++We<=Se;){const ft=V[We];if(ft[1].type==="listUnordered"||ft[1].type==="listOrdered"||ft[1].type==="blockQuote"?(ft[0]==="enter"?ze++:ze--,jr=void 0):ft[1].type==="lineEndingBlank"?ft[0]==="enter"&&(jn&&!jr&&!ze&&!pr&&(pr=We),jr=void 0):ft[1].type==="linePrefix"||ft[1].type==="listItemValue"||ft[1].type==="listItemMarker"||ft[1].type==="listItemPrefix"||ft[1].type==="listItemPrefixWhitespace"||(jr=void 0),!ze&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||ze===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(jn){let Mi=We;for(pn=void 0;Mi--;){const kn=V[Mi];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;pn&&(V[pn][1].type="lineEndingBlank",Pt=!0),kn[1].type="lineEnding",pn=Mi}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}pr&&(!pn||pr<pn)&&(jn._spread=!0),jn.end=Object.assign({},pn?V[pn][1].start:ft[1].end),V.splice(pn||We,0,["exit",jn,ft[2]]),We++,Se++}ft[1].type==="listItemPrefix"&&(jn={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0},V.splice(We,0,["enter",jn,ft[2]]),We++,Se++,pr=void 0,jr=!0)}}return V[ie][1]._spread=Pt,Se}function i(V,ie){n[V]=ie}function s(V){return n[V]}function l(V,ie){return Se;function Se(We){u.call(this,V(We),We),ie&&ie.call(this,We)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(V,ie,Se){return this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([ie,Se]),V.position={start:Wi(ie.start)},V}function d(V){return ie;function ie(Se){V&&V.call(this,Se),p.call(this,Se)}}function p(V,ie){const Se=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==V.type&&(ie?ie.call(this,V,We[0]):(We[1]||f5).call(this,V,We[0]));else throw new Error("Cannot close `"+V.type+"` ("+fu({start:V.start,end:V.end})+"): it’s not open");return Se.position.end=Wi(V.end),Se}function h(){return BY(this.stack.pop())}function m(){i("expectingFirstListItemValue",!0)}function v(V){if(s("expectingFirstListItemValue")){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(V),10),i("expectingFirstListItemValue")}}function g(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=V}function b(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=V}function y(){s("flowCodeInside")||(this.buffer(),i("flowCodeInside",!0))}function x(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),i("flowCodeInside")}function w(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/(\r?\n|\r)$/g,"")}function S(V){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=Eo(this.sliceSerialize(V)).toLowerCase()}function k(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function _(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function I(V){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Se=this.sliceSerialize(V).length;ie.depth=Se}}function P(){i("setextHeadingSlurpLineEnding",!0)}function z(V){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(V).charCodeAt(0)===61?1:2}function D(){i("setextHeadingSlurpLineEnding")}function F(V){const ie=this.stack[this.stack.length-1];let Se=ie.children[ie.children.length-1];(!Se||Se.type!=="text")&&(Se=Wt(),Se.position={start:Wi(V.start)},ie.children.push(Se)),this.stack.push(Se)}function $(V){const ie=this.stack.pop();ie.value+=this.sliceSerialize(V),ie.position.end=Wi(V.end)}function Z(V){const ie=this.stack[this.stack.length-1];if(s("atHardBreak")){const Se=ie.children[ie.children.length-1];Se.position.end=Wi(V.end),i("atHardBreak");return}!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(ie.type)&&(F.call(this,V),$.call(this,V))}function ee(){i("atHardBreak",!0)}function W(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function ue(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function K(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function B(){const V=this.stack[this.stack.length-1];if(s("inReference")){const ie=s("referenceType")||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;i("referenceType")}function H(){const V=this.stack[this.stack.length-1];if(s("inReference")){const ie=s("referenceType")||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;i("referenceType")}function N(V){const ie=this.sliceSerialize(V),Se=this.stack[this.stack.length-2];Se.label=P_(ie),Se.identifier=Eo(ie).toLowerCase()}function xe(){const V=this.stack[this.stack.length-1],ie=this.resume(),Se=this.stack[this.stack.length-1];if(i("inReference",!0),Se.type==="link"){const We=V.children;Se.children=We}else Se.alt=ie}function fe(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function O(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function Te(){i("inReference")}function Oe(){i("referenceType","collapsed")}function ke(V){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=Eo(this.sliceSerialize(V)).toLowerCase(),i("referenceType","full")}function He(V){i("characterReferenceType",V.type)}function Ke(V){const ie=this.sliceSerialize(V),Se=s("characterReferenceType");let We;Se?(We=A_(ie,Se==="characterReferenceMarkerNumeric"?10:16),i("characterReferenceType")):We=Ix(ie);const ze=this.stack.pop();ze.value+=We,ze.position.end=Wi(V.end)}function it(V){$.call(this,V);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(V)}function Pe(V){$.call(this,V);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(V)}function bt(){return{type:"blockquote",children:[]}}function Ye(){return{type:"code",lang:null,meta:null,value:""}}function Qt(){return{type:"inlineCode",value:""}}function zt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ft(){return{type:"emphasis",children:[]}}function Cn(){return{type:"heading",depth:void 0,children:[]}}function Cr(){return{type:"break"}}function un(){return{type:"html",value:""}}function Xn(){return{type:"image",title:null,url:"",alt:null}}function Ln(){return{type:"link",title:null,url:"",children:[]}}function vo(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function he(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function xt(){return{type:"strong",children:[]}}function Wt(){return{type:"text",value:""}}function dn(){return{type:"thematicBreak"}}}function Wi(e){return{line:e.line,column:e.column,offset:e.offset}}function D_(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?D_(e,r):$Q(e,r)}}function $Q(e,t){let n;for(n in t)if(T_.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function f5(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fu({start:t.start,end:t.end})+") is still open")}function BQ(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return FQ(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function HQ(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function UQ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function WQ(e,t){const n=t.value?t.value+`
`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function VQ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qQ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mc(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&Wn(e.charCodeAt(n+1))&&Wn(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),o=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function N_(e,t){const n=String(t.identifier).toUpperCase(),r=mc(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let i;o===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,i=e.footnoteOrder.length):(e.footnoteCounts[n]++,i=o+1);const s=e.footnoteCounts[n],l={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function GQ(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const o=String(r);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},N_(e,{type:"footnoteReference",identifier:o,position:t.position})}function KQ(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YQ(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function O_(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=r:o.push({type:"text",value:r}),o}function XQ(e,t){const n=e.definition(t.identifier);if(!n)return O_(e,t);const r={src:mc(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}function QQ(e,t){const n={src:mc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function JQ(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZQ(e,t){const n=e.definition(t.identifier);if(!n)return O_(e,t);const r={href:mc(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function eJ(e,t){const n={href:mc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tJ(e,t,n){const r=e.all(t),o=n?nJ(n):L_(t),i={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(o||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!o?s.push(...d.children):s.push(d)}const c=r[r.length-1];c&&(o||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,u),e.applyData(t,u)}function nJ(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=L_(n[r])}return t}function L_(e){const t=e.spread;return t??e.children.length>1}function rJ(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function oJ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iJ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sJ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ax=z_("start"),Px=z_("end");function aJ(e){return{start:Ax(e),end:Px(e)}}function z_(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function lJ(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),o.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ax(t.children[1]),c=Px(t.children[t.children.length-1]);l.line&&c.line&&(s.position={start:l,end:c}),o.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function cJ(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const p=t.children[c],h={},m=s?s[c]:void 0;m&&(h.align=m);let v={type:"element",tagName:i,properties:h,children:[]};p&&(v.children=e.all(p),e.patch(p,v),v=e.applyData(t,v)),u.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function uJ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const h5=9,m5=32;function dJ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(g5(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(g5(t.slice(o),o>0,!1)),i.join("")}function g5(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===h5||i===m5;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===h5||i===m5;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function pJ(e,t){const n={type:"text",value:dJ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fJ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hJ={blockquote:HQ,break:UQ,code:WQ,delete:VQ,emphasis:qQ,footnoteReference:N_,footnote:GQ,heading:KQ,html:YQ,imageReference:XQ,image:QQ,inlineCode:JQ,linkReference:ZQ,link:eJ,listItem:tJ,list:rJ,paragraph:oJ,root:iJ,strong:sJ,table:lJ,tableCell:uJ,tableRow:cJ,text:pJ,thematicBreak:fJ,toml:vp,yaml:vp,definition:vp,footnoteDefinition:vp};function vp(){return null}const Tx=function(e){if(e==null)return yJ;if(typeof e=="string")return vJ(e);if(typeof e=="object")return Array.isArray(e)?mJ(e):gJ(e);if(typeof e=="function")return Lm(e);throw new Error("Expected function, string, or object as test")};function mJ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tx(e[n]);return Lm(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].call(this,...o))return!0;return!1}}function gJ(e){return Lm(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function vJ(e){return Lm(t);function t(n){return n&&n.type===e}}function Lm(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function yJ(){return!0}const bJ=!0,v5=!1,xJ="skip",F_=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const o=Tx(t),i=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=[],m,v,g;if((!t||o(l,c,u[u.length-1]||null))&&(h=wJ(n(l,u)),h[0]===v5))return h;if(l.children&&h[0]!==xJ)for(v=(r?l.children.length:-1)+i,g=u.concat(l);v>-1&&v<l.children.length;){if(m=s(l.children[v],v,g)(),m[0]===v5)return m;v=typeof m[1]=="number"?m[1]:v+i}return h}}};function wJ(e){return Array.isArray(e)?e:typeof e=="number"?[bJ,e]:[e]}const Dx=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),F_(e,t,o,r);function o(i,s){const l=s[s.length-1];return n(i,l?l.children.indexOf(i):null,l)}};function SJ(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const y5={}.hasOwnProperty;function CJ(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Dx(e,"definition",r=>{const o=b5(r.identifier);o&&!y5.call(t,o)&&(t[o]=r)}),n;function n(r){const o=b5(r);return o&&y5.call(t,o)?t[o]:null}}function b5(e){return String(e||"").toUpperCase()}const gh={}.hasOwnProperty;function jJ(e,t){const n=t||{},r=n.allowDangerousHtml||!1,o={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,s.handlers={...hJ,...n.handlers},s.definition=CJ(e),s.footnoteById=o,s.footnoteOrder=[],s.footnoteCounts={},s.patch=kJ,s.applyData=EJ,s.one=l,s.all=c,s.wrap=IJ,s.augment=i,Dx(e,"footnoteDefinition",u=>{const d=String(u.identifier).toUpperCase();gh.call(o,d)||(o[d]=u)}),s;function i(u,d){if(u&&"data"in u&&u.data){const p=u.data;p.hName&&(d.type!=="element"&&(d={type:"element",tagName:"",properties:{},children:[]}),d.tagName=p.hName),d.type==="element"&&p.hProperties&&(d.properties={...d.properties,...p.hProperties}),"children"in d&&d.children&&p.hChildren&&(d.children=p.hChildren)}if(u){const p="type"in u?u:{position:u};SJ(p)||(d.position={start:Ax(p),end:Px(p)})}return d}function s(u,d,p,h){return Array.isArray(p)&&(h=p,p={}),i(u,{type:"element",tagName:d,properties:p||{},children:h||[]})}function l(u,d){return M_(s,u,d)}function c(u){return Nx(s,u)}}function kJ(e,t){e.position&&(t.position=aJ(e))}function EJ(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function M_(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return gh.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Nx(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):_J(e,t)}function Nx(e,t){const n=[];if("children"in t){const r=t.children;let o=-1;for(;++o<r.length;){const i=M_(e,r[o],t);if(i){if(o&&r[o-1].type==="break"&&(!Array.isArray(i)&&i.type==="text"&&(i.value=i.value.replace(/^\s+/,"")),!Array.isArray(i)&&i.type==="element")){const s=i.children[0];s&&s.type==="text"&&(s.value=s.value.replace(/^\s+/,""))}Array.isArray(i)?n.push(...i):n.push(i)}}}return n}function _J(e,t){const n=t.data||{},r="value"in t&&!(gh.call(n,"hProperties")||gh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:Nx(e,t)};return e.patch(t,r),e.applyData(t,r)}function IJ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function RJ(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const o=e.all(r),i=String(r.identifier).toUpperCase(),s=mc(i.toLowerCase());let l=0;const c=[];for(;++l<=e.footnoteCounts[i];){const p={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};l>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(l)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(p)}const u=o[o.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const p=u.children[u.children.length-1];p&&p.type==="text"?p.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...c)}else o.push(...c);const d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(o,!0)};e.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
`}]}}function $_(e,t){const n=jJ(e,t),r=n.one(e,null),o=RJ(n);return o&&r.children.push({type:"text",value:`
`},o),Array.isArray(r)?{type:"root",children:r}:r}const AJ=function(e,t){return e&&"run"in e?PJ(e,t):TJ(e||t)};function PJ(e,t){return(n,r,o)=>{e.run($_(n,t),r,i=>{o(i)})}}function TJ(e){return t=>$_(t,e)}class Id{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Id.prototype.property={};Id.prototype.normal={};Id.prototype.space=null;function B_(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Id(n,r,t)}function hy(e){return e.toLowerCase()}class ho{constructor(t,n){this.property=t,this.attribute=n}}ho.prototype.space=null;ho.prototype.boolean=!1;ho.prototype.booleanish=!1;ho.prototype.overloadedBoolean=!1;ho.prototype.number=!1;ho.prototype.commaSeparated=!1;ho.prototype.spaceSeparated=!1;ho.prototype.commaOrSpaceSeparated=!1;ho.prototype.mustUseProperty=!1;ho.prototype.defined=!1;let DJ=0;const Be=Aa(),Jt=Aa(),H_=Aa(),le=Aa(),gt=Aa(),Cl=Aa(),Rr=Aa();function Aa(){return 2**++DJ}const my=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Jt,commaOrSpaceSeparated:Rr,commaSeparated:Cl,number:le,overloadedBoolean:H_,spaceSeparated:gt},Symbol.toStringTag,{value:"Module"})),W0=Object.keys(my);class Ox extends ho{constructor(t,n,r,o){let i=-1;if(super(t,n),x5(this,"space",o),typeof r=="number")for(;++i<W0.length;){const s=W0[i];x5(this,W0[i],(r&my[s])===my[s])}}}Ox.prototype.defined=!0;function x5(e,t,n){n&&(e[t]=n)}const NJ={}.hasOwnProperty;function gc(e){const t={},n={};let r;for(r in e.properties)if(NJ.call(e.properties,r)){const o=e.properties[r],i=new Ox(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[hy(r)]=r,n[hy(i.attribute)]=r}return new Id(t,n,e.space)}const U_=gc({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),W_=gc({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function V_(e,t){return t in e?e[t]:t}function q_(e,t){return V_(e,t.toLowerCase())}const G_=gc({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:q_,properties:{xmlns:null,xmlnsXLink:null}}),K_=gc({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Jt,ariaAutoComplete:null,ariaBusy:Jt,ariaChecked:Jt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:gt,ariaCurrent:null,ariaDescribedBy:gt,ariaDetails:null,ariaDisabled:Jt,ariaDropEffect:gt,ariaErrorMessage:null,ariaExpanded:Jt,ariaFlowTo:gt,ariaGrabbed:Jt,ariaHasPopup:null,ariaHidden:Jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gt,ariaLevel:le,ariaLive:null,ariaModal:Jt,ariaMultiLine:Jt,ariaMultiSelectable:Jt,ariaOrientation:null,ariaOwns:gt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Jt,ariaReadOnly:Jt,ariaRelevant:null,ariaRequired:Jt,ariaRoleDescription:gt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Jt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null}}),OJ=gc({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:q_,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cl,acceptCharset:gt,accessKey:gt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:gt,autoFocus:Be,autoPlay:Be,blocking:gt,capture:null,charSet:null,checked:Be,cite:null,className:gt,cols:le,colSpan:null,content:null,contentEditable:Jt,controls:Be,controlsList:gt,coords:le|Cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:H_,draggable:Jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:gt,height:le,hidden:Be,high:le,href:null,hrefLang:null,htmlFor:gt,httpEquiv:gt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:gt,itemRef:gt,itemScope:Be,itemType:gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:le,pattern:null,ping:gt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:gt,required:Be,reversed:Be,rows:le,rowSpan:le,sandbox:gt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Jt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Jt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:le,security:null,unselectable:null}}),LJ=gc({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:V_,properties:{about:Rr,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:gt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cl,g2:Cl,glyphName:Cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Rr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rr,rev:Rr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rr,requiredFeatures:Rr,requiredFonts:Rr,requiredFormats:Rr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Rr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rr,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),zJ=/^data[-\w.:]+$/i,w5=/-[a-z]/g,FJ=/[A-Z]/g;function MJ(e,t){const n=hy(t);let r=t,o=ho;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zJ.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(w5,BJ);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!w5.test(i)){let s=i.replace(FJ,$J);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=Ox}return new o(r,t)}function $J(e){return"-"+e.toLowerCase()}function BJ(e){return e.charAt(1).toUpperCase()}const S5={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},HJ=B_([W_,U_,G_,K_,OJ],"html"),UJ=B_([W_,U_,G_,K_,LJ],"svg");function WJ(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Dx(t,"element",(n,r,o)=>{const i=o;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,i)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?i.children.splice(r,1,...n.children):i.children.splice(r,1),r})}}var Y_={exports:{}},pt={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Lx=Symbol.for("react.element"),zx=Symbol.for("react.portal"),zm=Symbol.for("react.fragment"),Fm=Symbol.for("react.strict_mode"),Mm=Symbol.for("react.profiler"),$m=Symbol.for("react.provider"),Bm=Symbol.for("react.context"),VJ=Symbol.for("react.server_context"),Hm=Symbol.for("react.forward_ref"),Um=Symbol.for("react.suspense"),Wm=Symbol.for("react.suspense_list"),Vm=Symbol.for("react.memo"),qm=Symbol.for("react.lazy"),qJ=Symbol.for("react.offscreen"),X_;X_=Symbol.for("react.module.reference");function mo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lx:switch(e=e.type,e){case zm:case Mm:case Fm:case Um:case Wm:return e;default:switch(e=e&&e.$$typeof,e){case VJ:case Bm:case Hm:case qm:case Vm:case $m:return e;default:return t}}case zx:return t}}}pt.ContextConsumer=Bm;pt.ContextProvider=$m;pt.Element=Lx;pt.ForwardRef=Hm;pt.Fragment=zm;pt.Lazy=qm;pt.Memo=Vm;pt.Portal=zx;pt.Profiler=Mm;pt.StrictMode=Fm;pt.Suspense=Um;pt.SuspenseList=Wm;pt.isAsyncMode=function(){return!1};pt.isConcurrentMode=function(){return!1};pt.isContextConsumer=function(e){return mo(e)===Bm};pt.isContextProvider=function(e){return mo(e)===$m};pt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lx};pt.isForwardRef=function(e){return mo(e)===Hm};pt.isFragment=function(e){return mo(e)===zm};pt.isLazy=function(e){return mo(e)===qm};pt.isMemo=function(e){return mo(e)===Vm};pt.isPortal=function(e){return mo(e)===zx};pt.isProfiler=function(e){return mo(e)===Mm};pt.isStrictMode=function(e){return mo(e)===Fm};pt.isSuspense=function(e){return mo(e)===Um};pt.isSuspenseList=function(e){return mo(e)===Wm};pt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zm||e===Mm||e===Fm||e===Um||e===Wm||e===qJ||typeof e=="object"&&e!==null&&(e.$$typeof===qm||e.$$typeof===Vm||e.$$typeof===$m||e.$$typeof===Bm||e.$$typeof===Hm||e.$$typeof===X_||e.getModuleId!==void 0)};pt.typeOf=mo;Y_.exports=pt;var GJ=Y_.exports;const KJ=co(GJ);function YJ(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function XJ(e){return e.join(" ").trim()}function QJ(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Fx={exports:{}},C5=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JJ=/\n/g,ZJ=/^\s*/,eZ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tZ=/^:\s*/,nZ=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,rZ=/^[;\s]*/,oZ=/^\s+|\s+$/g,iZ=`
`,j5="/",k5="*",Gs="",sZ="comment",aZ="declaration",lZ=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(v){var g=v.match(JJ);g&&(n+=g.length);var b=v.lastIndexOf(iZ);r=~b?v.length-b:r+v.length}function i(){var v={line:n,column:r};return function(g){return g.position=new s(v),u(),g}}function s(v){this.start=v,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(v){var g=new Error(t.source+":"+n+":"+r+": "+v);if(g.reason=v,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function c(v){var g=v.exec(e);if(g){var b=g[0];return o(b),e=e.slice(b.length),g}}function u(){c(ZJ)}function d(v){var g;for(v=v||[];g=p();)g!==!1&&v.push(g);return v}function p(){var v=i();if(!(j5!=e.charAt(0)||k5!=e.charAt(1))){for(var g=2;Gs!=e.charAt(g)&&(k5!=e.charAt(g)||j5!=e.charAt(g+1));)++g;if(g+=2,Gs===e.charAt(g-1))return l("End of comment missing");var b=e.slice(2,g-2);return r+=2,o(b),e=e.slice(g),r+=2,v({type:sZ,comment:b})}}function h(){var v=i(),g=c(eZ);if(g){if(p(),!c(tZ))return l("property missing ':'");var b=c(nZ),y=v({type:aZ,property:E5(g[0].replace(C5,Gs)),value:b?E5(b[0].replace(C5,Gs)):Gs});return c(rZ),y}}function m(){var v=[];d(v);for(var g;g=h();)g!==!1&&(v.push(g),d(v));return v}return u(),m()};function E5(e){return e?e.replace(oZ,Gs):Gs}var cZ=lZ;function Q_(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=cZ(e),i=typeof t=="function",s,l,c=0,u=o.length;c<u;c++)r=o[c],s=r.property,l=r.value,i?t(s,l,r):l&&(n||(n={}),n[s]=l);return n}Fx.exports=Q_;Fx.exports.default=Q_;var uZ=Fx.exports;const dZ=co(uZ),gy={}.hasOwnProperty,pZ=new Set(["table","thead","tbody","tfoot","tr"]);function J_(e,t){const n=[];let r=-1,o;for(;++r<t.children.length;)o=t.children[r],o.type==="element"?n.push(fZ(e,o,r,t)):o.type==="text"?(t.type!=="element"||!pZ.has(t.tagName)||!YJ(o))&&n.push(o.value):o.type==="raw"&&!e.options.skipHtml&&n.push(o.value);return n}function fZ(e,t,n,r){const o=e.options,i=o.transformLinkUri===void 0?xY:o.transformLinkUri,s=e.schema,l=t.tagName,c={};let u=s,d;if(s.space==="html"&&l==="svg"&&(u=UJ,e.schema=u),t.properties)for(d in t.properties)gy.call(t.properties,d)&&mZ(c,d,t.properties[d],e);(l==="ol"||l==="ul")&&e.listDepth++;const p=J_(e,t);(l==="ol"||l==="ul")&&e.listDepth--,e.schema=s;const h=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},m=o.components&&gy.call(o.components,l)?o.components[l]:l,v=typeof m=="string"||m===ce.Fragment;if(!KJ.isValidElementType(m))throw new TypeError(`Component for name \`${l}\` not defined or is not renderable`);if(c.key=n,l==="a"&&o.linkTarget&&(c.target=typeof o.linkTarget=="function"?o.linkTarget(String(c.href||""),t.children,typeof c.title=="string"?c.title:null):o.linkTarget),l==="a"&&i&&(c.href=i(String(c.href||""),t.children,typeof c.title=="string"?c.title:null)),!v&&l==="code"&&r.type==="element"&&r.tagName!=="pre"&&(c.inline=!0),!v&&(l==="h1"||l==="h2"||l==="h3"||l==="h4"||l==="h5"||l==="h6")&&(c.level=Number.parseInt(l.charAt(1),10)),l==="img"&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),typeof c.title=="string"?c.title:null)),!v&&l==="li"&&r.type==="element"){const g=hZ(t);c.checked=g&&g.properties?!!g.properties.checked:null,c.index=V0(r,t),c.ordered=r.tagName==="ol"}return!v&&(l==="ol"||l==="ul")&&(c.ordered=l==="ol",c.depth=e.listDepth),(l==="td"||l==="th")&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),v||(c.isHeader=l==="th")),!v&&l==="tr"&&r.type==="element"&&(c.isHeader=r.tagName==="thead"),o.sourcePos&&(c["data-sourcepos"]=yZ(h)),!v&&o.rawSourcePos&&(c.sourcePosition=t.position),!v&&o.includeElementIndex&&(c.index=V0(r,t),c.siblingCount=V0(r)),v||(c.node=t),p.length>0?ce.createElement(m,c,p):ce.createElement(m,c)}function hZ(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function V0(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function mZ(e,t,n,r){const o=MJ(r.schema,t);let i=n;i==null||i!==i||(Array.isArray(i)&&(i=o.commaSeparated?QJ(i):XJ(i)),o.property==="style"&&typeof i=="string"&&(i=gZ(i)),o.space&&o.property?e[gy.call(S5,o.property)?S5[o.property]:o.property]=i:o.attribute&&(e[o.attribute]=i))}function gZ(e){const t={};try{dZ(e,n)}catch{}return t;function n(r,o){const i=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[i.replace(/-([a-z])/g,vZ)]=o}}function vZ(e,t){return t.toUpperCase()}function yZ(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const _5={}.hasOwnProperty,bZ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yp={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Z_(e){for(const i in yp)if(_5.call(yp,i)&&_5.call(e,i)){const s=yp[i];console.warn(`[react-markdown] Warning: please ${s.to?`use \`${s.to}\` instead of`:"remove"} \`${i}\` (see <${bZ}#${s.id}> for more info)`),delete yp[i]}const t=LY().use(BQ).use(e.remarkPlugins||[]).use(AJ,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(WJ,e),n=new m_;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=ce.createElement(ce.Fragment,{},J_({options:e,schema:HJ,listDepth:0},r));return e.className&&(o=ce.createElement("div",{className:e.className},o)),o}Z_.propTypes={children:te.string,className:te.string,allowElement:te.func,allowedElements:te.arrayOf(te.string),disallowedElements:te.arrayOf(te.string),unwrapDisallowed:te.bool,remarkPlugins:te.arrayOf(te.oneOfType([te.object,te.func,te.arrayOf(te.oneOfType([te.bool,te.string,te.object,te.func,te.arrayOf(te.any)]))])),rehypePlugins:te.arrayOf(te.oneOfType([te.object,te.func,te.arrayOf(te.oneOfType([te.bool,te.string,te.object,te.func,te.arrayOf(te.any)]))])),sourcePos:te.bool,rawSourcePos:te.bool,skipHtml:te.bool,includeElementIndex:te.bool,transformLinkUri:te.oneOfType([te.func,te.bool]),linkTarget:te.oneOfType([te.func,te.string]),transformImageUri:te.func,components:te.object};const xZ={tokenize:EZ,partial:!0},eI={tokenize:_Z,partial:!0},tI={tokenize:IZ,partial:!0},nI={tokenize:RZ,partial:!0},wZ={tokenize:AZ,partial:!0},rI={tokenize:jZ,previous:iI},oI={tokenize:kZ,previous:sI},Li={tokenize:CZ,previous:aI},ii={},SZ={text:ii};let Bs=48;for(;Bs<123;)ii[Bs]=Li,Bs++,Bs===58?Bs=65:Bs===91&&(Bs=97);ii[43]=Li;ii[45]=Li;ii[46]=Li;ii[95]=Li;ii[72]=[Li,oI];ii[104]=[Li,oI];ii[87]=[Li,rI];ii[119]=[Li,rI];function CZ(e,t,n){const r=this;let o,i;return s;function s(p){return!vy(p)||!aI.call(r,r.previous)||Mx(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return vy(p)?(e.consume(p),l):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(wZ,d,u)(p):p===45||p===95||Wn(p)?(i=!0,e.consume(p),c):d(p)}function u(p){return e.consume(p),o=!0,c}function d(p){return i&&o&&or(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function jZ(e,t,n){const r=this;return o;function o(s){return s!==87&&s!==119||!iI.call(r,r.previous)||Mx(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xZ,e.attempt(eI,e.attempt(tI,i),n),n)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function kZ(e,t,n){const r=this;let o="",i=!1;return s;function s(p){return(p===72||p===104)&&sI.call(r,r.previous)&&!Mx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(or(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),l;if(p===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),i?u:(i=!0,c)):n(p)}function u(p){return p===null||hh(p)||mt(p)||ya(p)||Nm(p)?n(p):e.attempt(eI,e.attempt(tI,d),n)(p)}function d(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function EZ(e,t,n){let r=0;return o;function o(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),o):s===46&&r===3?(e.consume(s),i):n(s)}function i(s){return s===null?n(s):t(s)}}function _Z(e,t,n){let r,o,i;return s;function s(u){return u===46||u===95?e.check(nI,c,l)(u):u===null||mt(u)||ya(u)||u!==45&&Nm(u)?c(u):(i=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),s}function c(u){return o||r||!i?n(u):t(u)}}function IZ(e,t){let n=0,r=0;return o;function o(s){return s===40?(n++,e.consume(s),o):s===41&&r<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(nI,t,i)(s):s===null||mt(s)||ya(s)?t(s):(e.consume(s),o)}function i(s){return s===41&&r++,e.consume(s),o}}function RZ(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),o):l===60||l===null||mt(l)||ya(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||ya(l)?t(l):r(l)}function i(l){return or(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):or(l)?(e.consume(l),s):n(l)}}function AZ(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Wn(i)?n(i):t(i)}}function iI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function sI(e){return!or(e)}function aI(e){return!(e===47||vy(e))}function vy(e){return e===43||e===45||e===46||e===95||Wn(e)}function Mx(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const PZ={tokenize:MZ,partial:!0};function TZ(){return{document:{91:{tokenize:LZ,continuation:{tokenize:zZ},exit:FZ}},text:{91:{tokenize:OZ},93:{add:"after",tokenize:DZ,resolveTo:NZ}}}}function DZ(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;o--;){const c=r.events[o][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const u=Eo(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function NZ(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function OZ(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,s;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(i>999||p===93&&!s||p===null||p===91||mt(p))return n(p);if(p===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Eo(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return mt(p)||(s=!0),i++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}}function LZ(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(v)}function d(v){if(s>999||v===93&&!l||v===null||v===91||mt(v))return n(v);if(v===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return i=Eo(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return mt(v)||(l=!0),s++,e.consume(v),v===92?p:d}function p(v){return v===91||v===92||v===93?(e.consume(v),s++,d):d(v)}function h(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(i)||o.push(i),Qe(e,m,"gfmFootnoteDefinitionWhitespace")):n(v)}function m(v){return t(v)}}function zZ(e,t,n){return e.check(_d,t,e.attempt(PZ,t,n))}function FZ(e){e.exit("gfmFootnoteDefinition")}function MZ(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}function $Z(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let u=c;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[c][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[c][1].end)},p={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[c][1].start)},h=[["enter",d,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",p,l]],m=l.parser.constructs.insideSpan.null;m&&Hr(h,h.length,0,Om(m,s.slice(u+1,c),l)),Hr(h,h.length,0,[["exit",p,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",d,l]]),Hr(s,u-1,c-u+3,h),c=u+h.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function i(s,l,c){const u=this.previous,d=this.events;let p=0;return h;function h(v){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(v):(s.enter("strikethroughSequenceTemporary"),m(v))}function m(v){const g=mh(u);if(v===126)return p>1?c(v):(s.consume(v),p++,m);if(p<2&&!n)return c(v);const b=s.exit("strikethroughSequenceTemporary"),y=mh(v);return b._open=!y||y===2&&!!g,b._close=!g||g===2&&!!y,l(v)}}}class BZ{constructor(){this.map=[]}add(t,n,r){HZ(this,t,n,r)}consume(t){if(this.map.sort((i,s)=>i[0]-s[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function HZ(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function UZ(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}const WZ={flow:{null:{tokenize:VZ,resolveAll:qZ}}};function VZ(e,t,n){const r=this;let o=0,i=0,s;return l;function l(D){let F=r.events.length-1;for(;F>-1;){const ee=r.events[F][1].type;if(ee==="lineEnding"||ee==="linePrefix")F--;else break}const $=F>-1?r.events[F][1].type:null,Z=$==="tableHead"||$==="tableRow"?_:c;return Z===_&&r.parser.lazy[r.now().line]?n(D):Z(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(s=!0,i+=1),d(D)}function d(D){return D===null?n(D):Ie(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):n(D):Ve(D)?Qe(e,d,"whitespace")(D):(i+=1,s&&(s=!1,o+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||mt(D)?(e.exit("data"),d(D)):(e.consume(D),D===92?h:p)}function h(D){return D===92||D===124?(e.consume(D),p):p(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),s=!1,Ve(D)?Qe(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):v(D))}function v(D){return D===45||D===58?b(D):D===124?(s=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),g):k(D)}function g(D){return Ve(D)?Qe(e,b,"whitespace")(D):b(D)}function b(D){return D===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):D===45?(i+=1,y(D)):D===null||Ie(D)?S(D):k(D)}function y(D){return D===45?(e.enter("tableDelimiterFiller"),x(D)):k(D)}function x(D){return D===45?(e.consume(D),x):D===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(D))}function w(D){return Ve(D)?Qe(e,S,"whitespace")(D):S(D)}function S(D){return D===124?v(D):D===null||Ie(D)?!s||o!==i?k(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):k(D)}function k(D){return n(D)}function _(D){return e.enter("tableRow"),I(D)}function I(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),I):D===null||Ie(D)?(e.exit("tableRow"),t(D)):Ve(D)?Qe(e,I,"whitespace")(D):(e.enter("data"),P(D))}function P(D){return D===null||D===124||mt(D)?(e.exit("data"),I(D)):(e.consume(D),D===92?z:P)}function z(D){return D===92||D===124?(e.consume(D),P):P(D)}}function qZ(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,u,d,p;const h=new BZ;for(;++n<e.length;){const m=e[n],v=m[1];m[0]==="enter"?v.type==="tableHead"?(l=!1,c!==0&&(I5(h,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},h.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,p=void 0,i=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},h.add(n,0,[["enter",d,t]])),o=v.type==="tableDelimiterRow"?2:d?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],p=bp(h,t,i,o,void 0,p),i=[0,0,0,0]),s[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(s[0]=s[1],p=bp(h,t,i,o,void 0,p)),i=s,s=[i[1],n,0,0])):v.type==="tableHead"?(l=!0,c=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(c=n,i[1]!==0?(s[0]=s[1],p=bp(h,t,i,o,n,p)):s[1]!==0&&(p=bp(h,t,s,o,n,p)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&I5(h,t,c,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=UZ(t.events,n))}return e}function bp(e,t,n,r,o,i){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},Ka(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Ka(t.events,n[1]);if(i={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Ka(t.events,n[2]),d=Ka(t.events,n[3]),p={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const h=t.events[n[2]],m=t.events[n[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,g=n[3]-n[2]-1;e.add(v,g,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(i.end=Object.assign({},Ka(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function I5(e,t,n,r,o){const i=[],s=Ka(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function Ka(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const GZ={tokenize:YZ},KZ={text:{91:GZ}};function YZ(e,t,n){const r=this;return o;function o(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return mt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Ie(c)?t(c):Ve(c)?e.check({tokenize:XZ},t,n)(c):n(c)}}function XZ(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function QZ(e){return x_([SZ,TZ(),$Z(e),WZ,KZ])}function R5(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function JZ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const ZZ={}.hasOwnProperty,eee=function(e,t,n,r){let o,i;typeof t=="string"||t instanceof RegExp?(i=[[t,n]],o=r):(i=t,o=n),o||(o={});const s=Tx(o.ignore||[]),l=tee(i);let c=-1;for(;++c<l.length;)F_(e,"text",u);return e;function u(p,h){let m=-1,v;for(;++m<h.length;){const g=h[m];if(s(g,v?v.children.indexOf(g):void 0,v))return;v=g}if(v)return d(p,h)}function d(p,h){const m=h[h.length-1],v=l[c][0],g=l[c][1];let b=0;const y=m.children.indexOf(p);let x=!1,w=[];v.lastIndex=0;let S=v.exec(p.value);for(;S;){const k=S.index,_={index:S.index,input:S.input,stack:[...h,p]};let I=g(...S,_);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I!==!1&&(b!==k&&w.push({type:"text",value:p.value.slice(b,k)}),Array.isArray(I)?w.push(...I):I&&w.push(I),b=k+S[0].length,x=!0),!v.global)break;S=v.exec(p.value)}return x?(b<p.value.length&&w.push({type:"text",value:p.value.slice(b)}),m.children.splice(y,1,...w)):w=[p],y+w.length}};function tee(e){const t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([A5(e[n][0]),P5(e[n][1])])}else{let n;for(n in e)ZZ.call(e,n)&&t.push([A5(n),P5(e[n])])}return t}function A5(e){return typeof e=="string"?new RegExp(JZ(e),"g"):e}function P5(e){return typeof e=="function"?e:()=>e}const q0="phrasing",G0=["autolink","link","image","label"],nee={transforms:[cee],enter:{literalAutolink:oee,literalAutolinkEmail:K0,literalAutolinkHttp:K0,literalAutolinkWww:K0},exit:{literalAutolink:lee,literalAutolinkEmail:aee,literalAutolinkHttp:iee,literalAutolinkWww:see}},ree={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:q0,notInConstruct:G0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:q0,notInConstruct:G0},{character:":",before:"[ps]",after:"\\/",inConstruct:q0,notInConstruct:G0}]};function oee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function K0(e){this.config.enter.autolinkProtocol.call(this,e)}function iee(e){this.config.exit.autolinkProtocol.call(this,e)}function see(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function aee(e){this.config.exit.autolinkEmail.call(this,e)}function lee(e){this.exit(e)}function cee(e){eee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uee],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,dee]],{ignore:["link","linkReference"]})}function uee(e,t,n,r,o){let i="";if(!lI(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!pee(n)))return!1;const s=fee(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function dee(e,t,n,r){return!lI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pee(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fee(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=R5(e,"(");let i=R5(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function lI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ya(n)||Nm(n))&&(!t||n!==47)}function cI(e){return e.label||!e.identifier?e.label||"":P_(e.identifier)}function hee(e,t,n){const r=t.indexStack,o=e.children||[],i=t.createTracker(n),s=[];let l=-1;for(r.push(-1);++l<o.length;){const c=o[l];r[r.length-1]=l,s.push(i.move(t.handle(c,e,t,{before:`
`,after:`
`,...i.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),l<o.length-1&&s.push(i.move(mee(c,o[l+1],e,t)))}return r.pop(),s.join("")}function mee(e,t,n,r){let o=r.join.length;for(;o--;){const i=r.join[o](e,t,n,r);if(i===!0||i===1)break;if(typeof i=="number")return`
`.repeat(1+i);if(i===!1)return`
<!---->
`}return`
`}const gee=/\r?\n|\r/g;function vee(e,t){const n=[];let r=0,o=0,i;for(;i=gee.exec(e);)s(e.slice(r,i.index)),n.push(i[0]),r=i.index+i[0].length,o++;return s(e.slice(r)),n.join("");function s(l){n.push(t(l,o,!l))}}function uI(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function yee(e,t){return T5(e,t.inConstruct,!0)&&!T5(e,t.notInConstruct,!1)}function T5(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function dI(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),o=[],i=[],s={};let l=-1;for(;++l<e.unsafe.length;){const d=e.unsafe[l];if(!yee(e.stack,d))continue;const p=uI(d);let h;for(;h=p.exec(r);){const m="before"in d||!!d.atBreak,v="after"in d,g=h.index+(m?h[1].length:0);o.includes(g)?(s[g].before&&!m&&(s[g].before=!1),s[g].after&&!v&&(s[g].after=!1)):(o.push(g),s[g]={before:m,after:v})}}o.sort(bee);let c=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(l=-1;++l<o.length;){const d=o[l];d<c||d>=u||d+1<u&&o[l+1]===d+1&&s[d].after&&!s[d+1].before&&!s[d+1].after||o[l-1]===d-1&&s[d].before&&!s[d-1].before&&!s[d-1].after||(c!==d&&i.push(D5(r.slice(c,d),"\\")),c=d,/[!-/:-@[-`{-~]/.test(r.charAt(d))&&(!n.encode||!n.encode.includes(r.charAt(d)))?i.push("\\"):(i.push("&#x"+r.charCodeAt(d).toString(16).toUpperCase()+";"),c++))}return i.push(D5(r.slice(c,u),n.after)),i.join("")}function bee(e,t){return e-t}function D5(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],o=[],i=e+t;let s=-1,l=0,c;for(;c=n.exec(i);)r.push(c.index);for(;++s<r.length;)l!==r[s]&&o.push(e.slice(l,r[s])),o.push("\\"),l=r[s];return o.push(e.slice(l)),o.join("")}function Gm(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,o=n.line||1,i=n.column||1;return{move:c,current:s,shift:l};function s(){return{now:{line:o,column:i},lineShift:r}}function l(u){r+=u}function c(u){const d=u||"",p=d.split(/\r?\n|\r/g),h=p[p.length-1];return o+=p.length-1,i=p.length===1?i+h.length:1+h.length+r,d}}pI.peek=Aee;function xee(){return{enter:{gfmFootnoteDefinition:See,gfmFootnoteDefinitionLabelString:Cee,gfmFootnoteCall:Eee,gfmFootnoteCallString:_ee},exit:{gfmFootnoteDefinition:kee,gfmFootnoteDefinitionLabelString:jee,gfmFootnoteCall:Ree,gfmFootnoteCallString:Iee}}}function wee(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Pee,footnoteReference:pI}}}function See(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Cee(){this.buffer()}function jee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Eo(this.sliceSerialize(e)).toLowerCase()}function kee(e){this.exit(e)}function Eee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _ee(){this.buffer()}function Iee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Eo(this.sliceSerialize(e)).toLowerCase()}function Ree(e){this.exit(e)}function pI(e,t,n,r){const o=Gm(r);let i=o.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return i+=o.move(dI(n,cI(e),{...o.current(),before:i,after:"]"})),l(),s(),i+=o.move("]"),i}function Aee(){return"["}function Pee(e,t,n,r){const o=Gm(r);let i=o.move("[^");const s=n.enter("footnoteDefinition"),l=n.enter("label");return i+=o.move(dI(n,cI(e),{...o.current(),before:i,after:"]"})),l(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(vee(hee(e,n,o.current()),Tee)),s(),i}function Tee(e,t,n){return t===0?e:(n?"":" ")+e}function fI(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let s=-1,l=n.before;r.push(-1);let c=t.createTracker(n);for(;++s<o.length;){const u=o[s];let d;if(r[r.length-1]=s,s+1<o.length){let p=t.handle.handlers[o[s+1].type];p&&p.peek&&(p=p.peek),d=p?p(o[s+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else d=n.after;i.length>0&&(l==="\r"||l===`
`)&&u.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),l=" ",c=t.createTracker(n),c.move(i.join(""))),i.push(c.move(t.handle(u,e,t,{...c.current(),before:l,after:d}))),l=i[i.length-1].slice(-1)}return r.pop(),i.join("")}const Dee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];hI.peek=Fee;const Nee={canContainEols:["delete"],enter:{strikethrough:Lee},exit:{strikethrough:zee}},Oee={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Dee}],handlers:{delete:hI}};function Lee(e){this.enter({type:"delete",children:[]},e)}function zee(e){this.exit(e)}function hI(e,t,n,r){const o=Gm(r),i=n.enter("strikethrough");let s=o.move("~~");return s+=fI(e,n,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function Fee(){return"~"}mI.peek=Mee;function mI(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const s=n.unsafe[i],l=uI(s);let c;if(s.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return o+r+o}function Mee(){return"`"}function $ee(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Hee,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const v=[],g=[];let b=-1;for(e[u].length>c&&(c=e[u].length);++b<e[u].length;){const y=Bee(e[u][b]);if(t.alignDelimiters!==!1){const x=r(y);g[b]=x,(l[b]===void 0||x>l[b])&&(l[b]=x)}v.push(y)}i[u]=v,s[u]=g}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<c;)o[d]=N5(n[d]);else{const v=N5(n);for(;++d<c;)o[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=o[d];let g="",b="";v===99?(g=":",b=":"):v===108?g=":":v===114&&(b=":");let y=t.alignDelimiters===!1?1:Math.max(1,l[d]-g.length-b.length);const x=g+"-".repeat(y)+b;t.alignDelimiters!==!1&&(y=g.length+y+b.length,y>l[d]&&(l[d]=y),h[d]=y),p[d]=x}i.splice(1,0,p),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const v=i[u],g=s[u];d=-1;const b=[];for(;++d<c;){const y=v[d]||"";let x="",w="";if(t.alignDelimiters!==!1){const S=l[d]-(g[d]||0),k=o[d];k===114?x=" ".repeat(S):k===99?S%2?(x=" ".repeat(S/2+.5),w=" ".repeat(S/2-.5)):(x=" ".repeat(S/2),w=x):w=" ".repeat(S)}t.delimiterStart!==!1&&!d&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&y==="")&&(t.delimiterStart!==!1||d)&&b.push(" "),t.alignDelimiters!==!1&&b.push(x),b.push(y),t.alignDelimiters!==!1&&b.push(w),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||d!==c-1)&&b.push("|")}m.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
`)}function Bee(e){return e==null?"":String(e)}function Hee(e){return e.length}function N5(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Uee={enter:{table:Wee,tableData:O5,tableHeader:O5,tableRow:qee},exit:{codeText:Gee,table:Vee,tableData:Y0,tableHeader:Y0,tableRow:Y0}};function Wee(e){const t=e._align;this.enter({type:"table",align:t.map(n=>n==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function Vee(e){this.exit(e),this.setData("inTable")}function qee(e){this.enter({type:"tableRow",children:[]},e)}function Y0(e){this.exit(e)}function O5(e){this.enter({type:"tableCell",children:[]},e)}function Gee(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Kee));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Kee(e,t){return t==="|"?t:e}function Yee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:l,tableCell:c,inlineCode:h}};function s(m,v,g,b){return u(d(m,g,b),m.align)}function l(m,v,g,b){const y=p(m,g,b),x=u([y]);return x.slice(0,x.indexOf(`
`))}function c(m,v,g,b){const y=g.enter("tableCell"),x=g.enter("phrasing"),w=fI(m,g,{...b,before:i,after:i});return x(),y(),w}function u(m,v){return $ee(m,{align:v,alignDelimiters:r,padding:n,stringLength:o})}function d(m,v,g){const b=m.children;let y=-1;const x=[],w=v.enter("table");for(;++y<b.length;)x[y]=p(b[y],v,g);return w(),x}function p(m,v,g){const b=m.children;let y=-1;const x=[],w=v.enter("tableRow");for(;++y<b.length;)x[y]=c(b[y],m,v,g);return w(),x}function h(m,v,g){let b=mI(m,v,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Xee(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Qee(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Jee(e,t,n,r){const o=Qee(n);let i=n.bulletCurrent||Xee(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(p,h,m){return h?(m?"":" ".repeat(s))+p:(m?i:i+" ".repeat(s-i.length))+p}}const Zee={exit:{taskListCheckValueChecked:L5,taskListCheckValueUnchecked:L5,paragraph:tte}},ete={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nte}};function L5(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function tte(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,s;for(;++i<o.length;){const l=o[i];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function nte(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=Gm(r);i&&l.move(s);let c=Jee(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+s}}function rte(){return[nee,xee(),Nee,Uee,Zee]}function ote(e){return{extensions:[ree,wee(),Oee,Yee(e),ete]}}function ite(e={}){const t=this.data();n("micromarkExtensions",QZ(e)),n("fromMarkdownExtensions",rte()),n("toMarkdownExtensions",ote(e));function n(r,o){(t[r]?t[r]:t[r]=[]).push(o)}}function ste(e,t){if(e.length<=t)return e;const n=e.slice(0,t);if(n.endsWith(`
`))return n+"...";const r=e.slice(t),o=r.indexOf(`
`);return e.slice(0,t+(o===-1?r.length:o))+"..."}function ate(e){let t=e.replace(/#+/g,"");return t=t.replace(/\*+/g,""),t=t.replace(/_+/g,""),t=t.replace(/`+/g,""),t=t.replace(/~+/g,""),t=t.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),t}const lte=["a"],At=({text:e,renderGFM:t=!0,maxLength:n,className:r,nestedInLink:o=!1})=>{const[i,s]=f.useState(!0);return n=n||5e3,e?a.jsxs(cte,{className:r,children:[a.jsx(Z_,{remarkPlugins:t?[ite]:[],disallowedElements:o?lte:void 0,children:i?ste(e,n):e}),e.length>n&&i&&a.jsx(oe,{subtle:!0,onClick:()=>s(!1),children:"Read more "})]}):null},cte=C.div.withConfig({displayName:"Markdown__MarkdownWrapper",componentId:"sc-ce6a4ee7-0"})(["width:100%;overflow-x:hidden;img{max-width:100%;}*{white-space:unset;}p,h1,h2,h3,h4,h5,h6{margin-bottom:1.5rem;}p:only-child{margin-bottom:0;}blockquote{margin-inline-start:0rem;padding-inline-start:1rem;border-inline-start:solid 3px ",";color:",";}code{font-family:Monaco,monospace;font-size:0.8em;}:not(pre) > code{background-color:",";padding:0rem 0.2rem;font-family:Monaco,monospace;display:inline-flex;white-space:nowrap;overflow:auto;max-width:100%;}pre{background-color:",";padding:0.5rem ","rem;border-radius:",";white-space:pre;overflow-x:auto;}table{margin-bottom:1.5rem;width:100%;}table,thead,tbody,th,td{border-collapse:collapse;padding:0.5rem;border:1px solid ",";}"],e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.colors.bg1,e=>e.theme.margin,e=>e.theme.radius,e=>e.theme.colors.bg2);function ute({children:e,subtle:t,title:n,icon:r,onClick:o,IconComponent:i,label:s,className:l}){const u=Ce().getAgent(),d=kt(),p=f.useCallback(()=>{if(!u){at.error("You need to be logged in to create new things"),d(Fe.agentSettings);return}o()},[u,d]),h=i??ur;return a.jsxs(oe,{onClick:p,subtle:t,title:u?`Create a new ${n}`:"No User set - sign in first",className:l,children:[r?a.jsxs(dte,{children:[a.jsx(h,{}),s]}):s??n,e]})}const dte=C.div.withConfig({displayName:"Base__IconWrapper",componentId:"sc-8dc8d4b9-0"})(["display:flex;align-items:center;gap:0.5rem;"]);function Qu({klass:e,subtle:t,icon:n,IconComponent:r,parent:o,children:i,label:s,className:l}){const{drive:c}=Le(),u=q(e),d=kd(),p=()=>{d(e,o??c)};return a.jsx(ute,{className:l,onClick:p,IconComponent:r,title:u.title,icon:n,subtle:t,label:s,children:i})}var yy=new Map,xp=new WeakMap,z5=0,pte=void 0;function fte(e){return e?(xp.has(e)||(z5+=1,xp.set(e,z5.toString())),xp.get(e)):"0"}function hte(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?fte(e.root):e[t]}`).toString()}function mte(e){const t=hte(e);let n=yy.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(s=>{s.forEach(l=>{var c;const u=l.isIntersecting&&o.some(d=>l.intersectionRatio>=d);e.trackVisibility&&typeof l.isVisible>"u"&&(l.isVisible=u),(c=r.get(l.target))==null||c.forEach(d=>{d(u,l)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},yy.set(t,n)}return n}function gte(e,t,n={},r=pte){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const c=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),()=>{}}const{id:o,observer:i,elements:s}=mte(n),l=s.get(e)||[];return s.has(e)||s.set(e,l),l.push(t),i.observe(e),function(){l.splice(l.indexOf(t),1),l.length===0&&(s.delete(e),i.unobserve(e)),s.size===0&&(i.disconnect(),yy.delete(o))}}function vte({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:s,initialInView:l,fallbackInView:c,onChange:u}={}){var d;const[p,h]=f.useState(null),m=f.useRef(),[v,g]=f.useState({inView:!!l,entry:void 0});m.current=u,f.useEffect(()=>{if(s||!p)return;let w;return w=gte(p,(S,k)=>{g({inView:S,entry:k}),m.current&&m.current(S,k),k.isIntersecting&&i&&w&&(w(),w=void 0)},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{w&&w()}},[Array.isArray(e)?e.toString():e,p,o,r,i,s,n,c,t]);const b=(d=v.entry)==null?void 0:d.target,y=f.useRef();!p&&b&&!i&&!s&&y.current!==b&&(y.current=b,g({inView:!!l,entry:void 0}));const x=[h,v.inView,v.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}function $x({date:e}){return a.jsxs("time",{dateTime:e.toISOString(),children:[e.toLocaleDateString()," at ",e.toLocaleTimeString()]})}function yte({resource:e}){return a.jsx(bte,{children:a.jsx(Pa,{resource:e})})}const bte=C.div.withConfig({displayName:"NestedResource__NestedWrapper",componentId:"sc-15c18500-0"})(["margin-left:","rem;"],e=>e.theme.margin),X0=10;function xte({subjects:e}){const[t,n]=f.useState(!1),r=e.length>X0;let o=e;return!t&&r&&(o=o.slice(0,X0)),a.jsxs(a.Fragment,{children:[o.map((i,s)=>typeof i!="string"?(console.warn(`ResourceArray: subject ${i} isn't a string`,i),null):a.jsxs(f.Fragment,{children:[a.jsx(Lt,{subject:i}),s!==o.length-1&&", "]},i)),r&&a.jsx(wte,{onClick:()=>n(!t),children:t?"show less":`show ${e.length-X0} more`})]})}const wte=C.span.withConfig({displayName:"ResourceArray__ShowMoreButton",componentId:"sc-a0005101-0"})(["cursor:pointer;margin-left:0.5em;&:hover{text-decoration:underline;}"]);function gI({value:e,datatype:t}){try{switch(t){case Y.ATOMIC_URL:{const n=VO(e);return typeof n=="string"?a.jsx(Lt,{subject:n}):a.jsx(yte,{resource:n})}case(Y.DATE,Y.TIMESTAMP):return a.jsx($x,{date:Z8(e)});case Y.MARKDOWN:return a.jsx(At,{text:xv(e)});case Y.RESOURCEARRAY:return a.jsx(xte,{subjects:su(e)});default:return a.jsx("div",{children:xv(e)})}}catch(n){return a.jsxs(vn,{children:[n.message," original value: ",e==null?void 0:e.toString()]})}}const Ste=ni(["from{opacity:0;top:var(--error-chip-start);}to{opacity:1;top:var(--error-chip-end);}"]),Rd=C.span.withConfig({displayName:"ErrorChip",componentId:"sc-64d81e2-0"})(["--error-chip-end:",";--error-chip-start:calc(var(--error-chip-end) - 0.5rem);position:relative;top:var(--error-chip-end);background-color:",";color:white;padding:0.25rem 0.5rem;border-radius:",";box-shadow:",";"," &::before{--triangle-size:0.5rem;content:'';position:absolute;top:calc(-1 * var(--triangle-size) + 1px);left:1rem;width:var(--triangle-size);aspect-ratio:1/1;background-color:",";clip-path:polygon(0% 100%,100% 100%,50% 0%);}"],e=>e.top??"0.5rem",e=>e.theme.colors.alert,e=>e.theme.radius,e=>e.theme.boxShadowSoft,e=>e.noMovement?"":Kt(["animation:"," 0.1s ease-in-out;"],Ste),e=>e.theme.colors.alert),vc=C(Rd).withConfig({displayName:"ErrorChip__ErrorChipInput",componentId:"sc-64d81e2-1"})(["position:absolute;--error-chip-end:",";"],e=>e.top??"2rem"),vI=f.createContext({validations:{},setValidations:()=>{}});function Ad({children:e,onValidationChange:t}){const[n,r]=f.useState({}),o=f.useCallback(s=>{r(l=>{const c=s(l);return t(Object.values(c).every(u=>u===void 0)),c})},[t]),i=f.useMemo(()=>({validations:n,setValidations:o}),[n,o]);return a.jsx(vI.Provider,{value:i,children:e})}function Cte(e,t){const n=f.useRef(e),r=f.useRef(t);n.current=e,r.current=t,f.useEffect(()=>(n.current(),()=>{r.current()}),[])}function go(e){const t=f.useId(),[n,r]=f.useState(!1),{setValidations:o,validations:i}=f.useContext(vI),s=f.useCallback((u,d=!1)=>{const p=u instanceof Error?u.message:u;o(h=>h[t]===p?h:{...h,[t]:p}),d&&r(!0)},[o,t]),l=f.useCallback(()=>{r(!0)},[]);return Cte(()=>{o(u=>({...u,[t]:e}))},()=>{o(u=>{const{[t]:d,...p}=u;return p})}),{error:n?i[t]:void 0,setError:s,setTouched:l}}function Ls(e,t){if(typeof e=="string"&&t&&e===""||Array.isArray(e)&&t&&e.length===0||t&&e===void 0)return"Required"}function by({resource:e,property:t,commit:n,commitDebounceInterval:r,...o}){const[i,s]=ne(e,t.subject,{commit:n,commitDebounce:r,validate:!1}),{error:l,setError:c,setTouched:u}=go(Ls(i,o.required));function d(p){const h=p.target.value??void 0;s(h);try{Do(h,t.datatype),c(void 0)}catch{c("Invalid value")}o.required&&h===""&&c("Required")}return a.jsxs(jte,{children:[a.jsx(Je,{$invalid:!!l,children:a.jsx(nt,{value:i===void 0?"":i,onChange:d,...o,onBlur:u})}),l&&a.jsx(vc,{children:l})]})}const jte=C.div.withConfig({displayName:"InputString__Wrapper",componentId:"sc-1e17ab7-0"})(["flex:1;position:relative;"]);function yI(e){const t=f.useRef(!1);f.useEffect(()=>{if(!t.current)return t.current=!0,e()},[])}const bI=(e,t)=>{const n=Ce(),[r,o]=f.useState(!1),[i,s]=f.useState(void 0);return[f.useCallback(async c=>{c.preventDefault(),o(!0),s(void 0);try{await e.save(),o(!1),t==null||t(),at.success("Resource saved"),e.new&&n.notifyResourceManuallyCreated(e)}catch(u){s(u),o(!1),at.error("Could not save resource")}},[e,n]),r,i]};function ln({label:e,helper:t,children:n,error:r,handleDelete:o,required:i,disabled:s,fieldId:l,labelId:c}){const[u,d]=f.useState(!0);return a.jsxs(wq,{children:[a.jsx(Sq,{children:a.jsxs(be,{gap:"0.4rem",center:!0,children:[a.jsxs(kte,{"data-test":`field-label-${e}`,htmlFor:l,id:c,children:[a.jsx("span",{children:e}),i&&a.jsx(Ete,{title:"Required field",size:"0.6em"})]}),t&&a.jsx(ot,{variant:Ii.Outline,color:"textLight",type:"button",size:"0.7rem",onClick:()=>d(!u),title:"Show helper",children:a.jsx(sm,{})}),!s&&o&&a.jsx(ot,{variant:Ii.Outline,title:"Delete this property",color:"textLight",type:"button",size:"0.7rem",onClick:()=>o("test"),children:a.jsx(lm,{})})]})}),a.jsx(Cq,{children:a.jsxs(cm,{open:!u,children:[t,i&&a.jsx("p",{children:"Required field."})]})}),n,r&&a.jsx(vn,{title:`Error: ${JSON.stringify(r)}`,children:r.message})]})}const kte=C.label.withConfig({displayName:"Field__FieldLabel",componentId:"sc-167708ab-0"})(["text-transform:capitalize;display:inline-flex;gap:0.2rem;align-items:center;font-weight:bold;"]),Ete=C(x$).withConfig({displayName:"Field__Astrisk",componentId:"sc-167708ab-1"})(["margin-bottom:0.5em;color:",";"],e=>vb(e.theme.colors.main));function _te(e){return e.error?e.subject.split("/").pop()||"error":e.shortname}function xi({handleDelete:e,propertyURL:t,resource:n,required:r,autoFocus:o,disabled:i,label:s}){const l=f.useId(),c=f.useId(),u=sr(t);if(!u)return a.jsx(ln,{label:s||"loading...",fieldId:l,children:a.jsx(Je,{children:a.jsx(nt,{disabled:i,placeholder:"loading property...",id:l})})});const d=s??(u.error?_te(u):u.shortname);return u.isDynamic?a.jsxs(ln,{helper:a.jsx(F5,{text:u.description,link:u.subject}),label:d,disabled:!0,fieldId:l,children:[a.jsx(Pi,{id:l,"data-testId":`input-${u.shortname}`,resource:n,property:u,autoFocus:o,disabled:!0},t+" input-switcher"),a.jsxs(Rte,{center:!0,gap:"1ch",children:[a.jsx(e$,{}),"This field is calculated server-side."]})]}):a.jsx(ln,{helper:a.jsx(F5,{text:u.description,link:u.subject}),label:d,handleDelete:e,required:r,disabled:i,fieldId:l,labelId:c,children:a.jsx(Pi,{id:l,labelId:c,"data-test":`input-${u.shortname}`,resource:n,property:u,required:r,autoFocus:o,disabled:i},t+" input-switcher")})}const Ite=C.div.withConfig({displayName:"ResourceField__HelperTextWraper",componentId:"sc-713b4fe1-0"})(["position:relative;margin-bottom:0rem;"]),Rte=C(be).withConfig({displayName:"ResourceField__Extra",componentId:"sc-713b4fe1-1"})(["color:",";margin-top:0.5rem;"],e=>e.theme.colors.textLight);function F5({text:e,link:t}){return a.jsxs(Ite,{children:[a.jsx(At,{text:e}),a.jsx(Me,{subject:t,children:t})]})}const Ate=C.div.withConfig({displayName:"Gutter",componentId:"sc-ae6f9552-0"})(["height:","rem;"],e=>e.theme.margin);var xy;(function(e){e[e.Default=0]="Default",e[e.Dialog=1]="Dialog"})(xy||(xy={}));const M5=[E.properties.isA,E.properties.parent,E.properties.write,E.properties.read,qn.properties.lastCommit];function Bx({classSubject:e,resource:t,variant:n=0,onSave:r,onCancel:o,onValidationChange:i}){const[s]=we(t,E.properties.isA);e===void 0&&(s==null?void 0:s.length)>0&&(e=s[0]);const[l,c]=f.useState(!1),u=q(e),[d]=we(u,E.properties.requires),[p]=we(u,E.properties.recommends),[h,m]=f.useState(void 0),v=kt(),[g,b]=f.useState([]),[y,x]=f.useState(!1),w=Ce(),S=t.new,[k,_,I]=bI(t,()=>{S&&w.notifyResourceManuallyCreated(t),r==null||r(),v(lt(t.subject))}),P=Bf(t,5e3),[z,D]=jt(P),F=f.useMemo(()=>[...Array.from(t.getPropVals().keys()).filter(K=>{const B=!(d.includes(K)||p.includes(K)||g.includes(K)),H=!M5.includes(K);return B&&H}),...g],[t,g,d.length,p.length]),$=W=>{c(W),i==null||i(W)};if(!t.new&&t.loading)return a.jsx(a.Fragment,{children:"Loading resource..."});if(t.error)return a.jsx(vn,{children:t.error.message});if(u.loading)return a.jsx(a.Fragment,{children:"Loading class..."});if(!u.hasClasses(E.classes.class))return a.jsxs(vn,{children:[e," is not a Class. Only resources with valid classes can be created or edited at this moment."]});function Z(W){if(m(void 0),!Bt.isValidSubject(W)){m(new Error("Invalid URL"));return}W&&(g.includes(W)||d.includes(W)||p.includes(W)?m(new Error("That property already exists in this resource. It can only be added once.")):b(ue=>[...ue,W]))}function ee(W){t.remove(W),b(g.filter(ue=>ue!==W))}return a.jsx(Ad,{onValidationChange:$,children:a.jsxs("form",{about:t.subject,onSubmit:k,children:[a.jsxs(ge,{children:[e&&u.error&&a.jsxs(vn,{children:["Error in class, so this form could miss properties. You can still edit the resource, though. Error message: `",u.error.message,"`"]}),D&&a.jsxs(vn,{children:["Cannot save edits: ",D]}),d.map(W=>a.jsx(xi,{propertyURL:W,resource:t,required:!0},W+" field")),p.map(W=>a.jsx(xi,{propertyURL:W,resource:t},W+" field")),F.map(W=>a.jsx(xi,{propertyURL:W,resource:t,handleDelete:()=>ee(W)},W+" field"))]}),a.jsx(Ate,{}),a.jsx(oe,{title:"show / hide advanced form fields",clean:!0,style:{display:"flex",marginBottom:"1rem",alignItems:"center"},onClick:()=>x(!y),children:a.jsxs(be,{as:"strong",gap:"0.4rem",center:!0,children:[y?a.jsx(vk,{}):a.jsx(Sb,{})," Advanced"]})}),a.jsx(Pte,{open:y,children:a.jsxs(ge,{children:[a.jsxs(ln,{label:"add another property...",helper:"In Atomic Data, any Resource could have any single Property. Use this field to add new property-value combinations to your resource.",children:[a.jsx("div",{children:a.jsx(Wr,{value:void 0,setSubject:W=>{Z(W)},isA:E.classes.property})}),h&&a.jsx(vn,{children:h.message})]}),M5.map(W=>a.jsx(xi,{propertyURL:W,resource:t},W))]})}),n!==1&&a.jsxs(a.Fragment,{children:[I&&a.jsx(vn,{children:I.message}),a.jsxs(be,{justify:"flex-end",children:[o&&a.jsx(oe,{subtle:!0,onClick:o,children:"Cancel"}),a.jsxs(oe,{disabled:_||!l,"data-test":"save",type:"submit",children:[a.jsx(sk,{}),_?"wait...":"Save"]})]})]})]})})}const Pte=C(cm).withConfig({displayName:"ResourceForm__StyledCollapse",componentId:"sc-e9c79b62-0"})(["max-width:70ch;"]);var wy;(function(e){e[e.FullPage=0]="FullPage",e[e.Dialog=1]="Dialog"})(wy||(wy={}));const Tte=new Map([[0,"h2"],[1,"h1"]]),xI=({classSubject:e,variant:t})=>{const n=q(e),[r]=rt(n),[o]=ne(n,E.properties.description),[i,s]=f.useState(!1),l=Tte.get(t)??"h2";return a.jsxs(ge,{children:[a.jsxs(be,{center:!0,children:[a.jsxs(Dte,{as:l,children:["new ",e?r:"Resource"]}),a.jsx(ot,{variant:Ii.Outline,onClick:()=>s(!i),title:"Toggle show Class details",children:a.jsx(sm,{})})]}),i&&o&&a.jsx(At,{text:o})]})},Dte=C.h1.withConfig({displayName:"NewFormTitle__Heading",componentId:"sc-47121c43-0"})(["margin:0;"]),Nte=e=>{const t=new URL(e),n=t.pathname.slice(1);return[t.origin+"/",n]},wI=e=>e.startsWith("/")?wI(e.slice(1)):"/"+e;function SI({error:e,value:t,onChange:n}){const[r,o]=Nte(t),[i,s]=f.useState(o),l=c=>{const u=new URL(wI(c),t);s(u.pathname.slice(1)),n(u.toString())};return a.jsx(ln,{error:e,label:"subject",helper:"The identifier of the resource. This also determines where the resource is saved, by default.",children:a.jsxs(Je,{children:[a.jsx(Ote,{children:r}),a.jsx(Lte,{value:i,onChange:c=>l(c.target.value),placeholder:"URL of the new resource..."})]})})}const Ote=C.span.withConfig({displayName:"SubjectField__OriginPart",componentId:"sc-efb3a778-0"})(["height:2rem;display:flex;align-items:center;padding-inline:0.5rem;background-color:",";color:",";"],e=>e.theme.colors.bg1,e=>e.theme.colors.textLight),Lte=C(nt).withConfig({displayName:"SubjectField__StyledInputStyled",componentId:"sc-efb3a778-1"})(["&&{border-radius:0;}"]),zte={newResource:!0},CI=e=>{const{klass:t,setSubject:n,initialSubject:r,parent:o}=e,i=Ce(),[s,l]=f.useState(!1),[c,u]=f.useState(()=>r===void 0?i.createSubject():r),[d,p]=f.useState(void 0),h=q(c,zte),[m]=ne(h,E.properties.parent),[v]=we(h,E.properties.isA);f.useEffect(()=>{(async()=>h.new&&(m!==o&&await h.set(E.properties.parent,o),v.length===0&&await h.addClasses(t.subject),l(!0)))()},[h]);async function g(b){if(u(b),p(void 0),n(b),h.get(E.properties.parent)===o)try{await i.renameSubject(h,b)}catch(y){p(y)}}return{subjectErr:d,subjectValue:c,setSubjectValue:g,resource:h,initialized:s}},jI=({classSubject:e,onCancel:t,initialProps:n,onSaveClick:r,parent:o})=>{const i=q(e),[s,l]=f.useState(),[c,u]=f.useState(!1),{subjectErr:d,subjectValue:p,setSubjectValue:h,resource:m}=CI({klass:i,setSubject:l,initialSubject:s,parent:o}),v=f.useCallback(k=>{u(k)},[]),[g,b]=f.useState(!1),y=f.useCallback(()=>{r(m.subject)},[r,m]);yI(()=>{(async()=>{for(const[k,_]of Object.entries(n??{}))await m.set(k,_);b(!0)})()});const[x,w,S]=bI(m,y);return o?m.error?a.jsx(Hu,{error:m.error}):g?a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsx(xI,{classSubject:e,variant:wy.Dialog})}),a.jsxs(Xt,{children:[a.jsx(SI,{error:d,value:p,onChange:h}),a.jsx(Bx,{resource:m,classSubject:e,variant:xy.Dialog,onSave:y,onValidationChange:v},`${e}+${p}`)]}),a.jsxs(Yn,{children:[S&&a.jsx(Zv,{children:S.message}),a.jsx(oe,{subtle:!0,onClick:t,children:"Cancel"}),a.jsx(oe,{onClick:x,disabled:w||!c,children:"Save"})]})]}):a.jsx(a.Fragment,{children:"loading"}):a.jsx(yt,{children:"No parent set"})};function kI({selected:e,children:t,onMouseOver:n,onClick:r}){const o=f.useRef(null);return f.useEffect(()=>{var i;e&&((i=o.current)==null||i.scrollIntoView({block:"nearest"}))},[e]),a.jsx(Bte,{selected:e,ref:o,tabIndex:-1,onMouseMove:()=>n(),onClick:r,children:t})}function Fte({subject:e,...t}){const n=q(e),[r]=ne(n,J.properties.description);return a.jsxs(kI,{...t,children:[a.jsx(Mte,{resource:n}),n.title,r&&a.jsxs($te,{children:[" - ",r.slice(0,70)]})]})}function Mte({resource:e}){const t=No(e.getClasses()[0]??"");if(e.hasClasses(X.classes.tag)){const n=e.get(X.properties.emoji);return n?a.jsx("span",{children:n}):a.jsx(t,{})}return a.jsx(t,{})}const $te=C.span.withConfig({displayName:"ResultLine__Description",componentId:"sc-637674fb-0"})(["white-space:nowrap;color:",";"],({theme:e})=>e.colors.textLight),Bte=C.li.withConfig({displayName:"ResultLine__ListItem",componentId:"sc-637674fb-1"})(["padding:0.5rem;list-style:none;margin:0;padding-left:","rem;border-bottom:1px solid ",";min-width:100%;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:flex;align-items:center;gap:0.7ch;cursor:pointer;"," svg{color:",";min-width:1rem;height:1rem;}"],({theme:e})=>e.margin,({theme:e})=>e.colors.bg2,e=>e.selected&&Kt(["box-shadow:inset 0 0 0px 1px ",";color:",";"],({theme:t})=>t.colors.main,({theme:t})=>t.colors.main),({selected:e,theme:t})=>e?t.colors.main:t.colors.textLight),Hte='a[href]:not([disabled]), button:not([disabled]), input:not([disabled], [type=hidden]), [tabindex]:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]), select:not([disabled]), [contenteditable]:not([disabled])';function Sy(e,t){const n=t??document.activeElement;if(n){const r=[];document.querySelectorAll(Hte).forEach(i=>{(i.offsetWidth>0||i.offsetHeight>0||i===n)&&r.push(i)});const o=r.indexOf(n);o>-1&&(r[wm(o+e,r.length)]||r[0]).focus()}}function EI(e){try{return new URL(e),!0}catch{return!1}}function _I(e,t){const[n,r]=f.useState({above:0,below:0,width:0}),o=f.useDeferredValue(e);return f.useLayoutEffect(()=>{if(e){const{top:i,bottom:s,width:l}=t.current.getBoundingClientRect(),{innerHeight:c}=window;r({above:i,below:c-s,width:l})}},[o]),{above:n.above,below:n.below,width:n.width}}function Ute(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}class qs{constructor(t=-1,n=0){this.location=t,this.length=n}max(t){return typeof t=="number"&&(this.length=t-this.location),this.location+this.length}isValid(){return this.location>-1}toArray(){return[this.location,this.max()]}toString(){return this.location==-1?"invalid range":"["+this.location+","+this.max()+")"}}const Wte={wordSeparators:`-/\\:()<>%._=&[]+
\r`,uppercaseLetters:(()=>{const t=[];for(let n=0;n<26;n++)t.push(String.fromCharCode(65+n));return t.join("")})(),ignoredScore:.9,skippedScore:.15,emptyQueryScore:0,maxIterations:Math.pow(2,16)},Vte={longStringLength:150,maxMatchStartPct:.15,minMatchDensityPct:.75,maxMatchDensityPct:.95,beginningOfStringPct:.1};class Km{constructor(t){Object.assign(this,Wte,t)}useSkipReduction(){return!0}adjustRemainingScore(t,n,r,o,i,s,l,c){return r*s.length}}class qte extends Km{constructor(t){super(Object.assign({},Vte,t))}useSkipReduction(t,n,r,o,i,s,l){const c=t.length,u=c<=this.longStringLength,d=l.location/c;return u||d<this.maxMatchStartPct}adjustRemainingScore(t,n,r,o,i,s,l,c){const u=t.length<=this.longStringLength,d=c.location/t.length;let p=1,h=1-d;return o||(p=n.length/c.length,p=u&&d<=this.beginningOfStringPct&&p>=this.minMatchDensityPct?1:p,h=p>=this.maxMatchDensityPct?1:h),r*Math.min(s.length,this.longStringLength)*p*h}}function II(e){return e instanceof Km?e:new qte(e)}const Gte=II();new Km;new Km({emptyQueryScore:.9,adjustRemainingScore:function(e,t,n,r,o,i,s,l){let c=n*i.length;return r||(c+=(s.location-o.location)/2),c}});function RI(e,t,n,r=e.toLocaleLowerCase(),o=t.toLocaleLowerCase(),i=Gte,s=new qs(0,e.length)){let l=0;if(t)return c(s,new qs(0,t.length),new qs);return i.emptyQueryScore;function c(u,d,p){if(d.length){if(d.length>u.length)return 0}else return i.ignoredScore;const h=n&&n.length;for(let m=d.length;m>0;m--){if(l>i.maxIterations)return 0;l++;const v=o.substring(d.location,d.location+m),g=Kte(r,v,new qs(u.location,u.length-d.length+m));if(!g.isValid())continue;p.isValid()?p.location=Math.min(p.location,g.location):p.location=g.location,p.max(g.max()),n&&n.push(g.toArray());const b=new qs(g.max(),u.max()-g.max()),y=new qs(d.location+m,d.length-m),x=c(b,y,p);if(x){let w=b.location-u.location,S=!0;const k=i.useSkipReduction(e,t,x,b,u,b,g,p);if(g.location>u.location)if(k&&i.wordSeparators.indexOf(e[g.location-1])>-1)for(let _=g.location-2;_>=u.location;_--)i.wordSeparators.indexOf(e[_])>-1?w--:w-=i.skippedScore;else if(k&&i.uppercaseLetters.indexOf(e[g.location])>-1)for(let _=g.location-1;_>=u.location;_--)i.uppercaseLetters.indexOf(e[_])>-1?w--:w-=i.skippedScore;else w-=g.location-u.location,S=!1;return w+=i.adjustRemainingScore(e,t,x,S,u,b,g,p),w/=u.length,w}else n&&(n.length=h)}return 0}}RI.createConfig=II;function Kte(e,t,n){const r=e.indexOf(t,n.location),o=new qs;return r>-1&&r<n.max()&&(o.location=r,o.length=t.length),o}class AI{constructor(t=[],n={}){const{scorer:r=RI,transformString:o=Yte,keys:i=[],sortKey:s="",minimumScore:l=0,config:c}=Array.isArray(n)?{keys:n}:n;this.scorer=r,this.minimumScore=l,this.config=c,this.transformStringFunc=o,typeof r.createConfig=="function"&&(this.config=r.createConfig(c)),this.setKeys(i,s),this.setItems(t),this.compareScoredStrings=this.compareScoredStrings.bind(this)}search(t){const n=[],{items:r,transformedItems:o,keys:i,config:s}=this,l=t?this.minimumScore:-1,c=this.transformString(t),u=r.length,d=i.length;if(typeof r[0]=="string")for(let p=0;p<u;p++){const h=r[p],m=o[p],v=[],g=this.scorer(h,t,v,m,c,s);g>l&&n.push({item:h,score:g,matches:v,_:m})}else for(let p=0;p<u;p++){const h=r[p],m=o[p],v={item:h,score:0,scoreKey:"",scoreValue:"",scores:{},matches:{},_:m},g=d?i:Object.keys(m),b=g.length;let y=0,x="",w="";for(let S=0;S<b;S++){const k=g[S],{name:_=k,scorer:I=this.scorer}=k,P=m[_];if(P){const z=this.getItemString(h,k),D=[],F=I(z,t,D,P,c,s);v.scores[_]=F,v.matches[_]=D,F>y&&(y=F,x=_,w=z)}}y>l&&(v.score=y,v.scoreKey=x,v.scoreValue=w,n.push(v))}return n.sort(this.compareScoredStrings),n}setKeys(t,n){if(this.keys=t.slice(),this.sortKey=n,this.keys.length){const{scorer:r}=this;this.keys=this.keys.map(o=>{const i=o.length?{name:o,scorer:r}:o;return Array.isArray(i.name)?i.name.length>1?(i.path=i.name,i.name=i.path.join(".")):[i.name]=i.name:i.name.indexOf(".")>-1&&(i.path=i.name.split(".")),i}),this.sortKey=this.sortKey||this.keys[0].name}}setItems(t){const n=t.slice(),r=n.length,o=[],i=this.keys,s=i.length;if(typeof n[0]=="string")for(let l=0;l<r;l++)o.push(this.transformString(n[l]));else for(let l=0;l<r;l++){const c=n[l],u={},d=s?i:Object.keys(c),p=d.length;for(let h=0;h<p;h++){const m=d[h],v=this.getItemString(c,m);v&&typeof v=="string"&&(u[m.name||m]=this.transformString(v))}o.push(u)}this.items=n,this.transformedItems=o}getItemString(t,n){const{name:r,path:o}=n;return o?o.reduce((i,s)=>i&&i[s],t):t[r||n]}transformString(t){return this.transformStringFunc(t)}compareScoredStrings(t,n){const r=t._,o=n._,i=typeof r=="string"?r:r[this.sortKey],s=typeof o=="string"?o:o[this.sortKey];return t.score===n.score?i===void 0||s===void 0?i===void 0&&s===void 0?0:i===void 0?1:-1:i===s?0:i<s?-1:1:n.score-t.score}}function Yte(e){return e.toLocaleLowerCase()}async function PI(e,t){if(e===void 0)return{titleProp:void 0,classTitle:void 0};const n=await t.getResource(e);if(n.error)return{titleProp:void 0,classTitle:void 0};const r=[...n.props.requires??[],...n.props.recommends??[]];return r.includes(E.properties.shortname)?{titleProp:E.properties.shortname,classTitle:n.title}:r.includes(E.properties.name)?{titleProp:E.properties.name,classTitle:n.title}:{titleProp:void 0,classTitle:n.title}}function Xte(e){const t=Ce(),[n,r]=f.useState({titleProp:void 0,classTitle:void 0});return f.useEffect(()=>{e!==void 0&&PI(e,t).then(r)},[e,t]),n}const TI=20;function Qte({searchValue:e,onChange:t,isA:n,scopes:r,placeholder:o,triggerRef:i,allowsOnly:s,onExit:l,onSelect:c,onCreateItem:u}){const{drive:d}=Le(),[p,h]=f.useState(void 0),[m,v]=f.useState([]),[g,b]=f.useState(),[y,x]=f.useState(!1),{below:w}=_I(!0,i),S=f.useRef(null),{titleProp:k,classTitle:_}=Xte(n),I=w<Ute(TI),P=u&&e&&!y&&!s,z=P?1:0,D=p!==void 0?wm(p,m.length+z):void 0,F=H=>{if(H.key==="Enter"){H.preventDefault(),ee();return}if(H.key==="Escape"){l(!1);return}if(H.key==="Tab"&&H.shiftKey){H.preventDefault(),Sy(-1,i.current);return}if(H.key==="Tab"){H.preventDefault(),Sy(1,i.current);return}if(H.key==="ArrowDown"){H.preventDefault(),h(N=>N===void 0?0:N+1);return}if(H.key==="ArrowUp"){H.preventDefault(),h(N=>(N??0)-1);return}h(void 0)},$=H=>{h(H)},Z=H=>{if(!u)throw new Error("No onCreateItem function provided");u(H,n)},ee=()=>{if(D===void 0){c(e);return}if(D===0&&P){Z(e);return}c(m[D-z])},W=f.useCallback((H,N)=>{v(H),b(N)},[]),ue=()=>{requestAnimationFrame(()=>{var H;(H=S.current)!=null&&H.contains(document.activeElement)||l(!0)})},K=H=>{const N=H.clipboardData.getData("text");EI(N)&&(H.preventDefault(),c(N))},B=H=>{if(H.target.value.startsWith("http:")||H.target.value.startsWith("https:")){t(H.target.value),x(!0);return}k===E.properties.shortname?t(lo(H.target.value)):t(H.target.value),x(!1)};return g?a.jsx($5,{onBlur:ue,ref:S,$above:I,children:a.jsxs(Q0,{children:["Error: ",g.message]})}):a.jsxs($5,{onBlur:ue,ref:S,$above:I,children:[a.jsxs(Cy,{children:[a.jsx(am,{}),a.jsx(jy,{autoFocus:!0,placeholder:o,value:e,onChange:B,onKeyDown:F,onPaste:K})]}),a.jsxs(ky,{"data-testid":"searchbox-results",children:[!e&&m.length===0&&a.jsx(Q0,{children:"Start Searching"}),a.jsxs(ene,{children:[a.jsxs("ul",{children:[P?a.jsx(kI,{selected:D===0,onMouseOver:()=>$(0),onClick:()=>Z(e),children:k?a.jsxs(a.Fragment,{children:["Create"," ",a.jsx(tne,{children:e})]}):`Create new ${_??"resource"}`}):null,m.map((H,N)=>a.jsx(Fte,{subject:H,selected:N+z===D,onMouseOver:()=>$(N+z),onClick:ee},H))]}),!!e&&m.length===0&&a.jsx(Q0,{children:"No Results"})]})]}),s?a.jsx(Zte,{searchValue:e,allowsOnly:s,onResult:W}):a.jsx(Jte,{drive:d,isA:n,scopes:r,searchValue:e,onResult:W})]})}const Jte=({searchValue:e,isA:t,scopes:n,drive:r,onResult:o})=>{const i=f.useMemo(()=>({filters:{...t?{[E.properties.isA]:t}:{}},parents:n??[r,"https://atomicdata.dev"],allowEmptyQuery:!!t}),[t,n]),{results:s,error:l}=Ca(e,i);return f.useEffect(()=>{o(s,l)},[s,l,o]),null},Zte=({searchValue:e,allowsOnly:t,onResult:n})=>{const r=fa(t),o=f.useMemo(()=>{const i=Array.from(r.entries()).map(([s,l])=>({title:l.title,subject:s}));return new AI(i,["title"])},[r]);return f.useEffect(()=>{if(e===""){n(t);return}const i=o.search(e).map(s=>s.item.subject);n(i)},[e,o]),null},Cy=C.div.withConfig({displayName:"SearchBoxWindow__SearchInputWrapper",componentId:"sc-d1c03105-0"})(["display:flex;flex-direction:row;align-items:center;border:solid 1px ",";height:var(--radix-popover-trigger-height);padding-inline-start:0.5rem;width:100%;& svg{color:",";}&:focus-within{border-color:",";box-shadow:0 0 0 1px ",";outline:none;}"],e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main),jy=C.input.withConfig({displayName:"SearchBoxWindow__Input",componentId:"sc-d1c03105-1"})(["background-color:transparent;color:",";padding:0.5rem;height:100%;flex:1;border:none;&:focus-visible{outline:none;}"],e=>e.theme.colors.text),ky=C.div.withConfig({displayName:"SearchBoxWindow__ResultBox",componentId:"sc-d1c03105-2"})(["flex:1;border:solid 1px ",";height:calc(100% - 2rem);overflow:hidden;"],e=>e.theme.colors.bg2),$5=C.div.withConfig({displayName:"SearchBoxWindow__Wrapper",componentId:"sc-d1c03105-3"})(["display:flex;background-color:",";border-radius:",";box-shadow:",";width:100%;height:","rem;position:absolute;width:var(--radix-popover-trigger-width);"," left:0;animation:"," 0.2s ease-in-out;"],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.boxShadowSoft,TI,({$above:e,theme:t})=>e?Kt(["bottom:0;flex-direction:column-reverse;",",","{border-bottom-left-radius:",";border-bottom-right-radius:",";}","{border-bottom:none;border-top-left-radius:",";border-top-right-radius:",";}"],Cy,jy,t.radius,t.radius,ky,n=>n.theme.radius,n=>n.theme.radius):Kt(["top:calc(var(--radix-popover-trigger-height) * -1);flex-direction:column;",",","{border-top-left-radius:",";border-top-right-radius:",";}","{border-top:none;border-bottom-left-radius:",";border-bottom-right-radius:",";}"],Cy,jy,t.radius,t.radius,ky,n=>n.theme.radius,n=>n.theme.radius),dx),Q0=C.div.withConfig({displayName:"SearchBoxWindow__CenteredMessage",componentId:"sc-d1c03105-4"})(["display:grid;place-items:center;height:100%;width:100%;color:",";"],e=>e.theme.colors.textLight),ene=C(Ia).withConfig({displayName:"SearchBoxWindow__StyledScrollArea",componentId:"sc-d1c03105-5"})(["overflow:hidden;height:100%;"]),tne=C.span.withConfig({displayName:"SearchBoxWindow__CreateLineInputText",componentId:"sc-d1c03105-6"})(["color:",";font-style:italic;"],e=>e.theme.colors.textLight),Ey=C.button.withConfig({displayName:"SearchBoxButton",componentId:"sc-7fde43e1-0"})(["background-color:transparent;border:none;border-left:",";display:flex;align-items:center;padding:0.5rem;color:",";cursor:pointer;&:hover,&:focus-visible{color:var(--search-box-hightlight);background-color:",";border-color:var(--search-box-hightlight);}visibility:",";div:hover > &{visibility:visible;}"],e=>e.ephimeral?"none":"1px solid "+e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.ephimeral?"hidden":"visible");function Hx({autoFocus:e,value:t,isA:n,scopes:r,placeholder:o,disabled:i,className:s,children:l,prefix:c,hideClearButton:u,allowsOnly:d,visualError:p,onChange:h,onCreateItem:m,onClose:v,onResourceError:g}){const b=Ce(),y=uo(),x=q(t),w=f.useRef(null),[S,k]=f.useState(""),_=q(n),[I,P]=f.useState(!1),z=f.useContext(xm),[D,F]=f.useState(!1),$=o??`Search for a ${n?_.title:"resource"} or enter a URL...`,Z=f.useCallback(H=>{var N;P(!1),H?F(!1):(N=w.current)==null||N.focus(),v==null||v()},[v]),ee=f.useCallback(H=>{try{new URL(H),h(H),k("")}catch(N){console.error(N)}Z(!1),ob(b)},[S,h,Z,b]),W=()=>{if(D){F(!1);return}P(!0),F(!0)};f.useEffect(()=>{if(x){if(x.error){g==null||g(!0);return}g==null||g(!1)}},[g,x]);const ue=!t||x.error?"#":lt(x.subject),K=H=>{H.preventDefault(),y(ue)},B=x.error?x.subject:x.title;return a.jsxs(rx,{open:I,children:[a.jsx(nE,{children:a.jsxs(nne,{disabled:!!i,className:s,invalid:!!p,children:[c,a.jsx(_y,{type:"button",autoFocus:e,disabled:i,ref:w,tabIndex:0,$empty:S.length===0,onFocus:W,onClick:()=>{P(!0),F(!0)},children:t?a.jsx(rne,{children:B}):a.jsxs(a.Fragment,{children:[a.jsx(am,{}),a.jsx(one,{children:$})]})}),t&&a.jsxs(a.Fragment,{children:[!i&&!u&&a.jsx(Ey,{ephimeral:!0,title:"clear",onClick:()=>h(void 0),type:"button",children:a.jsx(ri,{})}),a.jsx(Ey,{as:"a",href:ue,title:`go to ${B}`,onClick:K,type:"button",children:a.jsx(_b,{})})]}),l,p&&a.jsx(ine,{noMovement:!0,children:p})]})}),a.jsx(ix,{container:z.current,children:a.jsx(sx,{align:"start",children:I&&a.jsx(Qte,{searchValue:S,onChange:k,scopes:r,isA:n,placeholder:$,triggerRef:w,allowsOnly:d,onExit:Z,onSelect:ee,onCreateItem:m})})})]})}const _y=C.button.withConfig({displayName:"SearchBox__TriggerButton",componentId:"sc-ed830f25-0"})(["display:flex;align-items:center;padding:0.5rem;border-radius:",";background:transparent;border:none;text-align:start;height:2rem;gap:0.5rem;width:100%;overflow:hidden;cursor:text;color:",";"],e=>e.theme.radius,e=>e.$empty?e.theme.colors.textLight:e.theme.colors.text),nne=C.div.withConfig({displayName:"SearchBox__TriggerButtonWrapper",componentId:"sc-ed830f25-1"})(["--search-box-hightlight:",";display:flex;position:relative;border:1px solid ",";border-radius:",";background-color:var(--search-box-bg,",");&:has(:disabled){background-color:",";}&:has(",":hover(),",":focus-visible){}&:hover,&:focus-visible{border-color:transparent;box-shadow:0 0 0 2px var(--search-box-hightlight);z-index:1000;}"],e=>e.invalid?e.theme.colors.alert:e.theme.colors.main,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.bg,e=>e.theme.colors.bg1,_y,_y),rne=C.span.withConfig({displayName:"SearchBox__ResourceTitle",componentId:"sc-ed830f25-2"})(["color:var(--search-box-hightlight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),one=C.span.withConfig({displayName:"SearchBox__PlaceholderText",componentId:"sc-ed830f25-3"})(["color:",";"],e=>e.theme.colors.textLight),ine=C(Rd).withConfig({displayName:"SearchBox__PositionedErrorChip",componentId:"sc-ed830f25-4"})(["position:absolute;top:2rem;z-index:1001;"]);function Ux({title:e,children:t}){return a.jsxs(sne,{children:[a.jsx(ane,{children:e}),a.jsx(be,{wrapItems:!0,children:t})]})}const sne=C.div.withConfig({displayName:"OutlinedSection__SectionWrapper",componentId:"sc-877fe8ee-0"})(["display:flex;flex-direction:column;gap:",";border:1px solid ",";border-radius:",";padding:",";position:relative;margin-block-start:0.5rem;"],e=>e.theme.size(),e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.size(6)),ane=C.h2.withConfig({displayName:"OutlinedSection__Heading",componentId:"sc-877fe8ee-1"})(["display:flex;align-items:center;font-size:1rem;gap:1ch;width:fit-content;padding-inline:",";color:",";font-weight:normal;margin:0;background-color:",";position:absolute;top:-0.5rem;left:",";"],e=>e.theme.size(),e=>e.theme.colors.textLight,e=>e.theme.colors.bgBody,e=>e.theme.size());function lne({show:e,bindShow:t,onClassSelect:n}){const[r,o,i]=Ht({bindShow:t}),{drive:s}=Le(),{results:l}=Ca("",{filters:{[E.properties.isA]:E.classes.ontology},parents:[s],allowEmptyQuery:!0,limit:100}),c=u=>{n(u),i(!0)};return f.useEffect(()=>{e&&o()},[e]),a.jsxs(Ut,{...r,width:"45rem",children:[a.jsx(Sn,{children:a.jsx("h1",{children:"Select a class"})}),a.jsx(Xt,{children:a.jsx(ge,{gap:"2rem",children:l.map(u=>a.jsx(cne,{subject:u,onClassSelect:c},u))})})]})}const cne=({subject:e,onClassSelect:t})=>{var r;const n=q(e);return a.jsx(Ux,{title:n.title,children:a.jsx(be,{wrapItems:!0,children:(r=n.props.classes)==null?void 0:r.map(o=>a.jsx(une,{subject:o,onClassSelect:t},o))})})},une=({subject:e,onClassSelect:t})=>{const n=q(e);return a.jsx(oe,{onClick:()=>t(e),subtle:!0,children:n.title},e)},dne="Invalid Resource",Wr=f.memo(function({required:t,setSubject:n,value:r,handleRemove:o,isA:i,disabled:s,parent:l,hideClearButton:c,hideCreateOption:u,first:d=!0,last:p=!0,prefix:h,allowsOnly:m,onBlur:v}){const g=Ce(),[b,y]=f.useState(),[x,w]=f.useState(i),[S,k]=f.useState(),[_,I]=f.useState(!1),[P,z]=f.useState(),[D,F,$,Z]=Ht({onSuccess:()=>{n(b)}}),{error:ee,setError:W,setTouched:ue}=go(Ls(r,t)),[K,B]=f.useState(""),{drive:H}=Le(),N=f.useMemo(()=>{if(!u)return async(Oe,ke)=>{if(Oe!==void 0&&B(Oe),!ke){I(!0);return}const{titleProp:He}=await PI(ke,g);z(He),w(ke),F()}},[u,F,i,g]),xe=Oe=>{y(Oe),$(!0),W(void 0)},fe=Oe=>{k(Oe?dne:void 0)},O=()=>{ue(),v==null||v()},Te=Oe=>{n(Oe),t&&W(Oe?void 0:"Required")};return a.jsxs(pne,{first:d,last:p,children:[a.jsx(Iy,{prefix:h,value:r,isA:i,required:t,disabled:s,hideClearButton:c,allowsOnly:m,visualError:ee||S,onChange:Te,onCreateItem:N,onClose:O,onResourceError:fe,children:o&&!s&&a.jsx(Ey,{onClick:o,title:"Remove",type:"button",children:a.jsx(lm,{})})}),x&&a.jsx(Ut,{...D,width:"50rem",children:Z&&a.jsx(jI,{parent:l||H,classSubject:x,onCancel:()=>$(!1),initialProps:P?{[P]:P===E.properties.shortname?lo(K):K}:void 0,onSaveClick:xe})}),!i&&a.jsx(lne,{show:_,bindShow:I,onClassSelect:Oe=>{N==null||N(K,Oe)}})]})}),Iy=C(Hx).withConfig({displayName:"ResourceSelector__StyledSearchBox",componentId:"sc-d3add52d-0"})([""]),pne=C.div.withConfig({displayName:"ResourceSelector__Wrapper",componentId:"sc-d3add52d-1"})(["--top-radius:",";--bottom-radius:",";flex:1;max-width:100%;position:relative;","{border-radius:0;}& ","{border-top-left-radius:var(--top-radius);border-top-right-radius:var(--top-radius);border-bottom-left-radius:var(--bottom-radius);border-bottom-right-radius:var(--bottom-radius);","}"],e=>e.first?e.theme.radius:0,e=>e.last?e.theme.radius:0,Iy,Iy,e=>!e.last&&Kt(["border-bottom:none;"]));function fne({resource:e,property:t,commit:n,...r}){const[o,i]=Io(e,t.subject,{commit:n});return o===v7?a.jsx(yt,{children:"Sorry, there is no support for editing nested resources yet"}):a.jsx("div",{children:a.jsx(Wr,{isA:t.classType,setSubject:i,value:o,allowsOnly:t.allowsOnly,parent:e.subject,...r})})}function hne(e,t,n){return f.useMemo(()=>t.map((r,o)=>e(o)),[t,...n])}function Wx({resource:e,property:t,commit:n,required:r,...o}){const[i,s]=f.useState(),[l,c]=f.useState(!1),[u,d]=we(e,t.subject,{validate:!1,commit:n}),{error:p,setError:h,setTouched:m}=go(r?u.length>0?void 0:"Required":void 0);function v(){c(!0)}function g(){d(void 0),c(!1)}const b=hne(S=>()=>{const k=[...u];k.splice(S,1),d(k.length===0?void 0:k),r&&k.length===0&&h("Required")},u,[d,r,h]),y=f.useCallback((S,k)=>{const _=[...u];if(k){_[S]=k;try{Do(_,t.datatype),d(_),h(void 0)}catch(I){h(I.message);return}}r&&h(_.length===0?"Required":void 0)},[t.datatype,d,h,r,l,u]),x=f.useMemo(()=>u.map((S,k)=>_=>y(k,_)),[u,y]),w=({active:S,over:k})=>{if(s(void 0),!k)return;const _=u.indexOf(S.id),I=k.id,P=[...u],[z]=P.splice(_,1);P.splice(I>_?I-1:I,0,z),d(P)};return a.jsxs(ge,{children:[(u.length>0||l)&&a.jsx(gm,{onDragStart:S=>s(S.active.id),onDragCancel:()=>s(void 0),onDragEnd:w,children:a.jsxs(yne,{children:[a.jsx(B5,{visible:!!i,index:0}),u.map((S,k)=>a.jsxs(ce.Fragment,{children:[a.jsx(mne,{first:k===0,last:k===u.length-1&&!l,subject:S,value:S,setSubject:x[k],isA:t.classType,handleRemove:b[k],parent:e.subject,allowsOnly:t.allowsOnly,hideClearButton:!0,onBlur:m,...o}),!(S===void 0&&k===u.length-1)&&a.jsx(B5,{visible:!!i,index:k+1})]},`${t.subject}${k}`)),l&&a.jsx(Wr,{first:u.length===0,last:!0,value:void 0,setSubject:S=>{y(u.length,S),c(!1)},isA:t.classType,handleRemove:()=>c(!1),parent:e.subject,allowsOnly:t.allowsOnly,hideClearButton:!0,onBlur:m,...o}),yn.createPortal(a.jsx(vne,{children:!!i&&a.jsx(gne,{first:!0,last:!0,id:i,value:i,setSubject:()=>{},isA:t.classType,handleRemove:()=>{},hideClearButton:!0,onBlur:m,parent:e.subject,...o})}),document.body)]})}),!o.disabled&&a.jsxs(be,{justify:"space-between",children:[a.jsx(xne,{title:`Add an item to the ${t.shortname} list`,"data-testid":`input-${t.shortname}-add-resource`,subtle:!0,type:"button",onClick:v,disabled:l,children:a.jsx(nm,{})}),u.length>1&&a.jsx(bne,{title:"Remove all items from this list","data-testid":`input-${t.shortname}-clear`,subtle:!0,type:"button",onClick:g,children:a.jsxs(be,{gap:".5rem",children:[a.jsx(ck,{})," Clear"]})})]}),!!p&&a.jsx(vn,{children:p})]})}const B5=({index:e,visible:t})=>{const{setNodeRef:n,isOver:r}=ym({id:e});return a.jsx(wne,{ref:n,active:r,visible:t})},mne=({subject:e,...t})=>{const{attributes:n,listeners:r,setNodeRef:o,active:i}=vm({id:e,disabled:t.disabled});return e===void 0?a.jsx(Wr,{...t}):a.jsx(DI,{ref:o,active:(i==null?void 0:i.id)===e,children:a.jsx(Wr,{...t,prefix:t.disabled?null:a.jsx(Vx,{...r,...n,disabled:t.disabled,type:"button",title:"Move item",children:a.jsx(tm,{})})})})},gne=e=>a.jsx(DI,{active:!1,children:a.jsx(Wr,{...e,prefix:a.jsx(Vx,{type:"button",children:a.jsx(tm,{})})})}),vne=C(Fb).withConfig({displayName:"InputResourceArray__StyledDragOverlay",componentId:"sc-3bb0313f-0"})(["--search-box-bg:",";backdrop-filter:blur(3px);"],e=>Zo(.5,e.theme.colors.bg)),yne=C.div.withConfig({displayName:"InputResourceArray__RelativeContainer",componentId:"sc-3bb0313f-1"})(["position:relative;"]),Vx=C.button.withConfig({displayName:"InputResourceArray__DragHandle",componentId:"sc-3bb0313f-2"})(["display:flex;align-items:center;cursor:grab;appearance:none;background:transparent;border:none;&:active{cursor:grabbing;svg{color:",";}}svg{color:",";}"],e=>e.theme.colors.textLight,e=>e.theme.colors.textLight2),DI=C(be).withConfig({displayName:"InputResourceArray__DragWrapper",componentId:"sc-3bb0313f-3"})(["position:relative;opacity:",";width:100%;&:hover{"," svg{color:",";}}"],e=>e.active?.4:1,Vx,e=>e.theme.colors.textLight),bne=C(oe).withConfig({displayName:"InputResourceArray__StyledButton",componentId:"sc-3bb0313f-4"})(["align-self:flex-start;"]),xne=C(oe).withConfig({displayName:"InputResourceArray__AddButton",componentId:"sc-3bb0313f-5"})(["align-self:flex-start;width:100%;box-shadow:none;border:1px dashed ",";background:none;&:not(:disabled){&:hover,&:focus-visible{border:1px solid ",";box-shadow:none !important;}}"],e=>e.theme.colors.bg2,e=>e.theme.colors.main),wne=C.div.withConfig({displayName:"InputResourceArray__DropEdgeElement",componentId:"sc-3bb0313f-6"})(["display:",";position:absolute;height:3px;border-radius:1.5px;transform:scaleX(",");background:",";opacity:",";z-index:2;width:100%;",""],e=>e.visible?"block":"none",e=>e.active?1.1:1,e=>e.theme.colors.main,e=>e.active?1:0,Yt("opacity","transform")),Sne=f.lazy(()=>hc(()=>import("./chunk_AsyncMarkdownEditor.js"),[]));function Cne(e){return a.jsx(f.Suspense,{fallback:a.jsx(jne,{}),children:a.jsx(Sne,{...e})})}const jne=C.div.withConfig({displayName:"MarkdownInput__DummyEditor",componentId:"sc-99d5b54c-0"})(["background-color:",";padding:","rem;border-radius:",";box-shadow:0 0 0 1px ",";width:min(100%,75ch);min-height:10rem;"],e=>e.theme.colors.bg,e=>e.theme.margin,e=>e.theme.radius,e=>e.theme.colors.bg2);function NI({resource:e,property:t,commit:n,id:r,labelId:o,...i}){const[s,l]=ne(e,t.subject,{validate:!1,commit:n}),{error:c,setError:u,setTouched:d}=go(Ls(s,i.required)),p=f.useCallback(h=>{try{Do(h,t.datatype),u(void 0)}catch{u("Invalid value")}i.required&&(h===""||h===void 0)&&u("Required"),l(h)},[t.datatype,i.required,u,l]);return a.jsxs(a.Fragment,{children:[a.jsx(Cne,{initialContent:s,id:r,labelId:o,onChange:p,onBlur:d}),c&&a.jsx(vn,{children:c})]})}function H5({resource:e,property:t,commit:n,...r}){const[o,i]=Ro(e,t.subject,{validate:!1,commit:n}),{error:s,setError:l,setTouched:c}=go(Ls(o,r.required));function u(d){if(l(void 0),d.target.value==="")r.required&&l("Required"),i(void 0);else try{const p=+d.target.value;Do(p,t.datatype),i(p)}catch{l("Invalid Number")}r.required&&d.target.value===""&&l("Required")}return a.jsxs(kne,{children:[a.jsx(Je,{$invalid:!!s,children:a.jsx(nt,{placeholder:"Enter a number...",type:"number",value:o===void 0||Number.isNaN(o)?"":o,step:t.datatype===Y.INTEGER?1:"any",onChange:u,onBlur:c,...r})}),s&&a.jsx(vc,{top:"2rem",children:s})]})}const kne=C.div.withConfig({displayName:"InputNumber__Wrapper",componentId:"sc-7d99289e-0"})(["flex:1;width:fit-content;position:relative;"]);function Ene({resource:e,property:t,commit:n,...r}){const{required:o,...i}=r,[s,l]=f.useState(void 0),[c,u]=y7(e,t.subject,{handleValidationError:l,commit:n});return a.jsxs(a.Fragment,{children:[a.jsx(yr,{checked:c,onChange:u,...i}),s&&a.jsx(vn,{children:s.message})]})}function _ne({resource:e,property:t,commit:n,commitDebounceInterval:r,...o}){const[i,s]=ne(e,t.subject,{validate:!1,commit:n,commitDebounce:r}),{error:l,setError:c,setTouched:u}=go(Ls(i,o.required)),[d,p]=f.useState(i);function h(m){const v=lo(m.target.value);p(v),c(void 0);try{v===""?s(void 0):(Do(v,t.datatype),s(v))}catch{c("Invalid Slug")}o.required&&v===""&&c("Required")}return a.jsxs(Ine,{children:[a.jsx(Je,{$invalid:!!l,children:a.jsx(nt,{value:d??"",onChange:h,onBlur:u,...o})}),l&&a.jsx(vc,{top:"2rem",children:l})]})}const Ine=C.div.withConfig({displayName:"InputSlug__Wrapper",componentId:"sc-64cd4df2-0"})(["flex:1;position:relative;"]),wp=e=>`${e}`.padStart(2,"0"),Rne=e=>{const t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate(),i=t.getHours(),s=t.getMinutes();return`${n}-${wp(r)}-${wp(o)}T${wp(i)}:${wp(s)}`},Ane=e=>new Date(e).getTime(),OI=(e,t)=>{const n=f.useCallback(o=>{o.target.value?t(Ane(o.target.value)):t(void 0)},[t]);let r;return Wh(e)&&(r=Rne(e)),[r,n]};function Pne({resource:e,property:t,commit:n,required:r,...o}){const[i,s]=Ro(e,t.subject,{commit:n,validate:!1}),{error:l,setError:c,setTouched:u}=go(Ls(i,r)),[d,p]=OI(i,h=>{r&&h===void 0?(c("Required"),s(void 0)):(c(void 0),s(h))});return a.jsxs(Tne,{children:[a.jsx(Dne,{$invalid:!!l,children:a.jsx(nt,{type:"datetime-local",value:d,required:r,onChange:p,onBlur:u,...o})}),l&&a.jsx(vc,{children:l})]})}const Tne=C.div.withConfig({displayName:"InputTimestamp__Wrapper",componentId:"sc-cad43e69-0"})(["flex:1;position:relative;"]),Dne=C(Je).withConfig({displayName:"InputTimestamp__StyledInputWrapper",componentId:"sc-cad43e69-1"})(["width:min-content;"]);function Nne({resource:e,property:t,commit:n,required:r,...o}){const[i,s]=ne(e,t.subject,{commit:n,validate:!1}),{error:l,setError:c,setTouched:u}=go(Ls(i,r)),d=p=>{const h=p.target.value;if(r&&h)c("Required"),s(void 0);else try{Do(h,t.datatype),s(h),c(void 0)}catch(m){c(m)}};return a.jsxs(One,{children:[a.jsx(Lne,{children:a.jsx(nt,{type:"date",value:i,onChange:d,onBlur:u,required:r,...o})}),l&&a.jsx(vc,{children:l})]})}const One=C.div.withConfig({displayName:"InputDate__Wrapper",componentId:"sc-b238dde1-0"})(["position:relative;"]),Lne=C(Je).withConfig({displayName:"InputDate__StyledInputWrapper",componentId:"sc-b238dde1-1"})(["width:min-content;"]);function zne(){const e=kt();return a.jsx(oe,{type:"button",onClick:()=>e(Fe.agentSettings),title:"Go the the User Settings page",children:"Sign in"})}function LI({resource:e,children:t,error:n,clearError:r}){return a.jsx(Is,{resource:e==null?void 0:e.getSubject(),children:a.jsxs(ge,{children:[t||a.jsx(Hu,{error:n,showTrace:!0}),a.jsxs(be,{children:[r&&a.jsx(oe,{onClick:r,children:"Clear error"}),a.jsx(oe,{onClick:()=>window.setTimeout(window.location.reload.bind(window.location),200),children:"Try Again"})]})]})})}function Fne(){const e=document.cookie.split(";");for(let t=0;t<e.length;t++){const n=e[t],r=n.indexOf("="),o=r>-1?n.substr(0,r):n;document.cookie=o+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT"}}function Mne(){Fne(),localStorage.clear(),sessionStorage.clear(),window.location.reload()}function $ne({resource:e}){const{agent:t}=Le(),n=Ce(),r=e.getSubject();return Y8(e.error)?a.jsx(Is,{children:a.jsxs(ge,{children:[a.jsx("h1",{children:"Unauthorized"}),t?a.jsxs(a.Fragment,{children:[a.jsx(Hu,{error:e.error}),a.jsx("span",{children:a.jsx(oe,{onClick:()=>n.fetchResourceFromServer(r),children:"Retry"})})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"You don't have access to this, try signing in:"}),a.jsx(zne,{})]})]})}):a.jsx(Is,{children:a.jsxs(ge,{children:[a.jsxs("h1",{children:["Could not open ",e.getSubject()]}),a.jsx(Hu,{error:e.error}),a.jsxs(be,{children:[a.jsx(oe,{onClick:()=>n.fetchResourceFromServer(r,{setLoading:!0}),children:"Retry"}),a.jsx(oe,{title:"Clear all local data & refresh page",onClick:Mne,children:"Hard reset"}),a.jsx(oe,{onClick:()=>n.fetchResourceFromServer(r,{fromProxy:!0,setLoading:!0}),title:`Fetches the URL from your current Atomic-Server (${n.getServerUrl()}), instead of from the actual URL itself. Can be useful if the URL is down, but the resource is cached in your server.`,children:"Use proxy"})]})]})})}class yc extends f.Component{constructor(t){super(t),this.state={error:void 0}}static getDerivedStateFromError(t){return{error:t}}render(){return this.state.error?this.props.FallBackComponent?a.jsx(this.props.FallBackComponent,{error:this.state.error}):a.jsx(LI,{error:this.state.error,clearError:()=>this.setState({error:void 0}),info:{}}):this.props.children}}const U5=10*1024*1024,Bne=1024*100;function qx(){const[e,t]=f.useState(U5),n=Ra("(prefers-reduced-data: reduce)");return f.useEffect(()=>{t(n?Bne:U5)},[n]),e}const Hne=e=>{const t=document.getElementById(e);if(t)return t;const n=document.createElement("style");return n.id=e,document.head.appendChild(n),n};function Une(e){const t=f.useId();f.useInsertionEffect(()=>{const n=Hne(t);return n.innerHTML=e,()=>{document.head.removeChild(n)}},[e])}function zI(e){let t="",n="none";try{n=Cd(BG,e),t=`
::view-transition-old(${n}),
::view-transition-new(${n}) {
mix-blend-mode: normal;
height: 100%;
overflow: clip;
}
::view-transition-old(${n}) {
object-fit: contain;
}
::view-transition-new(${n}) {
animation: none;
object-fit: cover;
}
`}catch{}return Une(t),{viewTransitionName:n}}function Ym(e){const[t]=ne(e,pe.file.downloadUrl),[n]=ne(e,pe.file.mimetype),[r]=Ro(e,pe.file.filesize),o=f.useCallback(()=>{window.open(t)},[t]);if(t===void 0||n===void 0||r===void 0)throw new Error("File resource is missing properties");return{downloadFile:o,downloadUrl:t,bytes:r,mimeType:n}}const Ju=C.div.attrs(e=>({style:xx(Am,e.subject)})).withConfig({displayName:"components__GridCard",componentId:"sc-81bf5f3a-0"})(["grid-area:card;background-color:",";border-radius:",";overflow:hidden;box-shadow:var(--shadow),var(--interaction-shadow);border:1px solid ",";transition:border 0.1s ease-in-out,box-shadow 0.1s ease-in-out;"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.colors.bg2),Zu=C.a.withConfig({displayName:"components__GridItemWrapper",componentId:"sc-81bf5f3a-1"})(["--shadow:0px 0.7px 1.3px rgba(0,0,0,0.06),0px 1.8px 3.2px rgba(0,0,0,0.043),0px 3.4px 6px rgba(0,0,0,0.036),0px 6px 10.7px rgba(0,0,0,0.03),0px 11.3px 20.1px rgba(0,0,0,0.024),0px 27px 48px rgba(0,0,0,0.017);--interaction-shadow:0px 0px 0px 0px ",";--card-banner-padding:1rem;--card-banner-height:calc(var(--card-banner-padding) * 2 + 1.5em);outline:none;text-decoration:none;color:",";display:grid;grid-template-columns:1fr;grid-template-rows:1fr 2rem;grid-template-areas:'card' 'title';width:100%;aspect-ratio:1 / 1;cursor:pointer;gap:1rem;&:hover ",",&:focus ","{--interaction-shadow:0px 0px 0px 1px ",";border:1px solid ",";}&:hover,&:focus{color:",";}"],e=>e.theme.colors.main,e=>e.theme.colors.text1,Ju,Ju,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.main),FI=C.div.attrs(e=>({style:xx(Rm,e.subject)})).withConfig({displayName:"components__GridItemTitle",componentId:"sc-81bf5f3a-2"})(["grid-area:title;font-size:1rem;text-align:center;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;padding-inline:0.5rem;transition:color 0.1s ease-in-out;"]),Gx=C.div.withConfig({displayName:"components__GridItemDescription",componentId:"sc-81bf5f3a-3"})(["font-size:1.1rem;color:",";margin:","rem;overflow:hidden;height:calc(100% - ","rem);"],e=>e.theme.colors.textLight,e=>e.theme.margin,e=>e.theme.margin*2),bc=C.div.withConfig({displayName:"components__InnerWrapper",componentId:"sc-81bf5f3a-4"})(["pointer-events:none;width:100%;height:calc(100% - var(--card-banner-height));"]);function MI({subject:e,style:t}){return a.jsx(bc,{children:a.jsx(Wne,{subject:e,alt:"",loading:"lazy",style:t,sizeIndication:{"55px":100,default:30}})})}const Wne=C(cb).withConfig({displayName:"Thumbnail__StyledImage",componentId:"sc-8bd2b60a-0"})(["width:100%;height:100%;object-fit:cover;object-position:center;"]),Vne=new Set(["application/json","application/ld+json","application/ad+json","application/x-httpd-php","application/xhtml+xml","application/xml","application/x-sh"]),qne=new Set(["image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/avif"]),$I=e=>(e==null?void 0:e.startsWith("text/"))||Vne.has(e),BI=e=>qne.has(e),Gne=async(e,t,n)=>(await fetch(e,{credentials:"include",headers:{Accept:n},signal:t})).text();function HI({downloadUrl:e,mimeType:t,className:n,nestedInLink:r=!1}){const[o,i]=f.useState("");return f.useEffect(()=>{if(!e)return;const s=new AbortController;return Gne(e,s.signal,t).then(l=>i(l)).catch(l=>{if(l.name!=="AbortError")throw l}),()=>s.abort()},[e]),t==="text/markdown"?a.jsx("div",{className:n,children:a.jsx(At,{text:o,nestedInLink:r})}):a.jsx(Kne,{className:n,children:o})}const Kne=C.pre.withConfig({displayName:"TextPreview__Wrapper",componentId:"sc-a7192ed2-0"})(["white-space:pre-wrap;"]);function Kx(e){return a.jsx(yc,{FallBackComponent:()=>a.jsx(Ry,{error:!0,children:a.jsxs(be,{gap:"1ch",center:!0,children:[a.jsx(uk,{}),"Could not display file preview."]})}),children:a.jsx(Yne,{...e})})}function Yne({resource:e}){const{downloadUrl:t,mimeType:n,bytes:r}=Ym(e),o=qx(),i=zI(e.subject);return r>=o?a.jsx(Ry,{children:"To large for preview"}):BI(n)?a.jsx(MI,{subject:e.subject,style:i}):$I(n)?a.jsx(Xne,{nestedInLink:!0,downloadUrl:t,mimeType:n}):a.jsx(Ry,{children:"No preview available"})}const Ry=C(bc).withConfig({displayName:"FilePreviewThumbnail__TextWrapper",componentId:"sc-3b7a570c-0"})(["display:grid;place-items:center;color:",";"],e=>e.error?e.theme.colors.alert:e.theme.colors.textLight),Xne=C(HI).withConfig({displayName:"FilePreviewThumbnail__StyledTextPreview",componentId:"sc-3b7a570c-1"})(["padding:",";color:",";&:is(pre){padding:0;padding-inline:",";}"],e=>e.theme.size(),e=>e.theme.colors.textLight,e=>e.theme.size());function Qne({subject:e,allowedMimes:t,onClick:n}){const r=q(e),o=(t==null?void 0:t.has(r.props.mimetype??""))??!0;return r.error?a.jsxs(W5,{disabled:!0,children:[a.jsx(Ay,{}),a.jsx("span",{children:"Resource not found"})]}):r.loading?a.jsx("div",{children:"loading"}):a.jsx(yc,{FallBackComponent:Jne,children:a.jsxs(W5,{onClick:n,disabled:!o,children:[a.jsx(Ay,{children:a.jsx(Kx,{resource:r})}),a.jsx("span",{children:r.title})]})})}const Ay=C.div.withConfig({displayName:"FilePickerItem__ItemCard",componentId:"sc-2dd2631e-0"})(["background-color:",";border-radius:",";overflow:hidden;box-shadow:var(--shadow),var(--interaction-shadow);border:1px solid ",";height:100%;width:100%;touch-action:none;pointer-events:none;user-select:none;transition:border 0.1s ease-in-out,box-shadow 0.1s ease-in-out;"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.colors.bg2),W5=C.button.withConfig({displayName:"FilePickerItem__ItemWrapper",componentId:"sc-2dd2631e-1"})(["appearance:none;text-align:start;border:none;padding:0;background-color:transparent;--shadow:0px 0.7px 1.3px rgba(0,0,0,0.06),0px 1.8px 3.2px rgba(0,0,0,0.043),0px 3.4px 6px rgba(0,0,0,0.036),0px 6px 10.7px rgba(0,0,0,0.03),0px 11.3px 20.1px rgba(0,0,0,0.024),0px 27px 48px rgba(0,0,0,0.017);--interaction-shadow:0px 0px 0px 0px ",";--card-banner-height:0px;display:flex;gap:0.5rem;flex-direction:column;align-items:center;outline:none;text-decoration:none;color:",";width:100%;aspect-ratio:1 / 1;&:not(:disabled):is(:hover,:focus) ","{--interaction-shadow:0px 0px 0px 1px ",";border:1px solid ",";}&:not(:disabled):is(:hover,:focus){cursor:pointer;color:",";}&:disabled{opacity:0.3;}"],e=>e.theme.colors.main,e=>e.theme.colors.text1,Ay,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.main),Jne=({error:e})=>a.jsx(Zne,{children:e.message}),Zne=C.div.withConfig({displayName:"FilePickerItem__ItemErrorWrapper",componentId:"sc-2dd2631e-2"})(["color:",";text-align:center;"],e=>e.theme.colors.alert);function ere({show:e,onShowChange:t,onNewFilePicked:n,onResourcePicked:r,allowedMimes:o,noUpload:i=!1}){const{drive:s}=Le(),[l,c,u]=Ht({bindShow:t}),d=Ra(`(max-width: ${sE})`,!1),[p,h]=f.useState(""),[m,v]=f.useState(!1),{results:g}=Ca(p,{filters:{[E.properties.isA]:Ne.classes.file},allowEmptyQuery:!0,parents:[s]}),b=m?[p]:g,y=S=>{r(S),u(!0)},x=S=>{var _;const k=(_=S.target.files)==null?void 0:_[0];k&&(n(k),u(!0))},w=S=>{Bt.isValidSubject(S)?(v(!0),h(S)):(v(!1),h(S))};return f.useEffect(()=>{e&&(c(),w(""))},[e,c]),a.jsx(Ut,{...l,width:"70rem",children:e&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsxs(be,{wrapItems:!0,children:[a.jsxs(Je,{hasPrefix:!0,children:[a.jsx(am,{}),a.jsx(nt,{type:"search",placeholder:"Search or enter a URL...",value:p,onChange:S=>w(S.target.value)})]}),!i&&a.jsxs(nre,{children:[a.jsxs(oe,{as:"div",children:[a.jsx(ur,{"aria-hidden":!0})," ",d?"":"Upload"]}),a.jsx("input",{type:"file",style:{display:"none"},onChange:x})]})]})}),a.jsx(tre,{children:b.map(S=>a.jsx(Qne,{allowedMimes:o,subject:S,onClick:()=>y(S)},S))})]})})}const tre=C(Xt).withConfig({displayName:"FilePickerDialog__StyledDialogContent",componentId:"sc-e8b86c52-0"})(["padding-top:1px;display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:","rem;height:80dvh;"],e=>e.theme.margin*2),nre=C.label.withConfig({displayName:"FilePickerDialog__StyledLabel",componentId:"sc-e8b86c52-1"})(["& div{height:100%;}"]),rre={commit:!0};function Xm(e){const t=Ce(),[n,r]=f.useState(!1),[o,i]=f.useState(void 0),[s,l]=we(e,pe.subResources,rre);return{upload:f.useCallback(async u=>{try{i(void 0),r(!0);const p=[...await t.uploadFiles(u,e.getSubject())];return r(!1),l([...s,...p]),p}catch(d){return i(new Nr(d==null?void 0:d.message)),r(!1),[]}},[e,t,l,s]),isUploading:n,error:o}}const Yx=C.div.withConfig({displayName:"VisuallyHidden",componentId:"sc-3f3f890d-0"})(["clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;"]);function UI({title:e,helperText:t,disabled:n,children:r,onClear:o}){return a.jsxs(ire,{children:[a.jsxs(be,{children:[a.jsx(ore,{children:e}),!n&&a.jsx(ot,{title:"clear",onClick:o,children:a.jsx(ri,{})})]}),a.jsx(sre,{children:r}),t&&a.jsx(are,{children:t})]})}const ore=C.span.withConfig({displayName:"SelectedFileLayout__Title",componentId:"sc-c0c54404-0"})(["flex:1;"]),ire=C.div.withConfig({displayName:"SelectedFileLayout__Wrapper",componentId:"sc-c0c54404-1"})(["border:1px solid ",";border-radius:",";width:min(100%,20rem);padding:1rem;display:flex;flex-direction:column;gap:1rem;"],e=>e.theme.colors.bg2,e=>e.theme.radius),sre=C.div.withConfig({displayName:"SelectedFileLayout__PreviewWrapper",componentId:"sc-c0c54404-2"})(["aspect-ratio:1 / 1;width:100%;display:grid;overflow:hidden;border-radius:",";"],e=>e.theme.radius),are=C.p.withConfig({displayName:"SelectedFileLayout__Helper",componentId:"sc-c0c54404-3"})(["color:",";margin:0;"],e=>e.theme.colors.textLight);function lre({subject:e,disabled:t,onClear:n}){const r=q(e);return a.jsx(UI,{title:r.title,onClear:n,disabled:t,children:a.jsx(WI,{"aria-label":`${r.title} preview`,children:a.jsx(Kx,{resource:r})})})}function cre({file:e,disabled:t,onClear:n}){return a.jsx(UI,{title:e.name,helperText:"Will be uploaded when resource is saved",onClear:n,disabled:t,children:a.jsx(WI,{"aria-label":`${e.name} preview`,children:BI(e.type)?a.jsx(ure,{src:URL.createObjectURL(e),alt:e.name}):a.jsx(dre,{children:"File preview not available at this time"})})})}const ure=C.img.withConfig({displayName:"SelectedFile__Image",componentId:"sc-7d0c50ce-0"})(["width:100%;height:100%;object-fit:cover;"]),dre=C.div.withConfig({displayName:"SelectedFile__NoPreview",componentId:"sc-7d0c50ce-1"})(["background-color:",";display:grid;padding:","rem;place-items:center;color:",";text-wrap:balance;text-align:center;"],({theme:e})=>e.colors.bg1,({theme:e})=>e.margin,({theme:e})=>e.colors.textLight),WI=C.section.withConfig({displayName:"SelectedFile__Section",componentId:"sc-7d0c50ce-2"})(["display:contents;"]);var Py;(function(e){e.File="file",e.Subject="subject"})(Py||(Py={}));function pre({subject:e,file:t,disabled:n,onButtonClick:r,onClear:o}){return a.jsxs(a.Fragment,{children:[!t&&!e&&a.jsxs(oe,{subtle:!0,onClick:r,disabled:n,children:[a.jsx(UM,{}),"Select File"]}),e&&a.jsx(lre,{disabled:n,subject:e,onClear:()=>o("subject")}),t&&a.jsx(cre,{file:t,disabled:n,onClear:()=>o("file")})]})}function fre({resource:e,property:t,disabled:n,required:r,commit:o}){const i=Ce(),{upload:s}=Xm(e),[l,c]=Io(e,t.subject,{validate:!1,commit:o}),{error:u,setError:d,setTouched:p}=go(Ls(l,r)),[h,m]=f.useState(!1),[v,g]=f.useState(l),[b,y]=f.useState(),[x,w]=f.useState();return f.useEffect(()=>{if(v)c(v);else if(b)e.new?(c("https://placeholder"),w(S=>{S==null||S();const k=i.on(bi.ResourceSaved,async _=>{if(_.subject===e.subject){k();const[I]=await s([b]);await c(I),e.save()}});return k})):s([b]).then(([S])=>{c(S)});else{c(void 0),r&&d("Required");return}d(void 0)},[v,b]),a.jsxs(hre,{children:[a.jsxs(Yx,{"aria-hidden":"true",children:[l,a.jsx("input",{tabIndex:-1,type:"text",defaultValue:l??"",required:r,disabled:n})]}),a.jsx(pre,{file:b,subject:v,disabled:n,onButtonClick:()=>{m(!0),p()},onClear:S=>{S===Py.File?(y(void 0),x==null||x()):g(void 0)}}),a.jsx(ere,{show:h,onShowChange:m,onResourcePicked:g,onNewFilePicked:y}),u&&a.jsx(vn,{children:u})]})}const hre=C.div.withConfig({displayName:"FilePicker__Wrapper",componentId:"sc-8107266-0"})(["position:relative;"]);function Pi(e){switch(e.property.datatype){case Y.STRING:return a.jsx(by,{...e});case Y.MARKDOWN:return a.jsx(NI,{...e});case Y.SLUG:return a.jsx(_ne,{...e});case Y.INTEGER:return a.jsx(H5,{...e});case Y.FLOAT:return a.jsx(H5,{...e});case Y.ATOMIC_URL:return e.property.classType===Ne.classes.file?a.jsx(fre,{...e}):a.jsx(fne,{...e});case Y.RESOURCEARRAY:return a.jsx(Wx,{...e});case Y.BOOLEAN:return a.jsx(Ene,{...e});case Y.TIMESTAMP:return a.jsx(Pne,{...e});case Y.DATE:return a.jsx(Nne,{...e});default:return a.jsx(by,{...e})}}function mre({resource:e,property:t,onClose:n}){const[r,o]=f.useState(void 0),i=async()=>{try{await e.save(),n(),at.success("Resource saved")}catch(l){o(l),at.error("Could not save resource...")}},s=()=>{o(void 0),n()};return f.useEffect(()=>()=>{e.refresh()},[]),a.jsxs(ge,{gap:"0.5rem",children:[a.jsx(Pi,{"data-test":`input-${t.subject}`,resource:e,property:t,autoFocus:!0}),r&&a.jsx(vn,{children:r.message}),a.jsxs(be,{gap:"0.5rem",children:[a.jsx(oe,{subtle:!0,onClick:s,children:"Cancel"}),a.jsxs(oe,{onClick:i,children:[a.jsx(sk,{}),"Save"]})]})]})}function zi({resource:e,propertyURL:t,datatype:n}){const[r,o]=f.useState(!1),i=sr(t),[s]=Jo(e,t),{agent:l}=Le(),[c]=jt(e);De("esc",()=>{o(!1)},{enableOnTags:["INPUT","TEXTAREA","SELECT"]});const d=l!==void 0&&c&&!i.isDynamic;return s===void 0?null:!i&&!n?a.jsx("span",{title:`loading ${t}...`,children:"..."}):r?a.jsx(mre,{resource:e,property:i,onClose:()=>o(!1)}):a.jsxs(VI,{children:[a.jsx(gI,{value:s,datatype:n||i.datatype}),d&&a.jsx(gre,{title:"Edit value",children:a.jsx(oc,{onClick:()=>o(!r)})})]})}const VI=C.div.withConfig({displayName:"ValueForm__ValueFormWrapper",componentId:"sc-6f7d577f-0"})(["position:relative;flex:1;word-wrap:break-word;max-width:100%;"]),gre=C.div.withConfig({displayName:"ValueForm__EditButton",componentId:"sc-6f7d577f-1"})(["position:absolute;top:0;color:",";right:100%;cursor:pointer;opacity:0;@media (hover:hover) and (pointer:fine){",":hover &{opacity:0.5;&:hover{opacity:1;}}}"],e=>e.theme.colors.main,VI),vre="main",qI="all-props",Qm="card";function yre({propertyURL:e,resource:t,editable:n,columns:r,className:o}){const i=sr(e),s=h7(e,10,!0);return i.loading?a.jsx(sf,{columns:r,children:a.jsx(af,{title:e+" is loading",children:"loading..."})}):i.error?a.jsxs(sf,{columns:r,children:[a.jsx(af,{title:e+" could not be loaded",children:a.jsx(Me,{subject:e,children:a.jsx(yt,{children:s})})}),a.jsx("code",{children:JSON.stringify(t.get(e))})]}):a.jsxs(sf,{columns:r,className:o,children:[a.jsx(Me,{subject:e,children:a.jsx(af,{title:i.description,children:i.shortname||s})}),n?a.jsx(zi,{resource:t,propertyURL:e}):a.jsx(gI,{datatype:i.datatype,value:t.get(e)})]})}const sf=C.div.withConfig({displayName:"PropVal__PropValRow",componentId:"sc-251b19b1-0"})(["word-break:break-word;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr;@container "," (min-width:500px){grid-template-columns:23ch auto;grid-template-rows:1fr;}"],qI),af=C.span.withConfig({displayName:"PropVal__PropertyLabel",componentId:"sc-251b19b1-1"})(["font-weight:bold;"]);function Pa({resource:e,except:t=[],editable:n,columns:r,basic:o}){const i=bre(e,t);return!i||i.length===0?null:a.jsx(xre,{basic:o,children:i.map(([s])=>a.jsx(wre,{columns:r,basic:o,propertyURL:s,resource:e,editable:!!n},s))})}function bre(e,t){const n=q(e.getClasses()[0]),r=[...n.props.requires??[],...n.props.recommends??[]],o=[...e.getPropVals()];return o.sort((i,s)=>{const l=r.indexOf(i[0]),c=r.indexOf(s[0]);return l===-1?1:l-c}),o.filter(([i])=>!t.includes(i))}const xre=C.div.withConfig({displayName:"AllProps__AllPropsWrapper",componentId:"sc-6e88e6ec-0"})(["container:"," / inline-size;display:flex;flex-direction:column;border-radius:",";background-color:",";border:",";"],qI,e=>e.theme.radius,e=>e.basic?"transparent":e.theme.colors.bg,e=>e.basic?"none":`1px solid ${e.theme.colors.bg2}`),wre=C(yre).withConfig({displayName:"AllProps__StyledPropVal",componentId:"sc-6e88e6ec-1"})(["",""],e=>!e.basic&&Kt(["padding:0.5rem;border-top:solid 1px ",";&:nth-child(1){border-top-left-radius:",";border-top:none;border-top-right-radius:",";}"],e.theme.colors.bg1,e.theme.radius,e.theme.radius)),Kn=C.div.attrs(e=>({style:xx(Am,e.about)})).withConfig({displayName:"Card",componentId:"sc-31836b58-0"})(["background-color:",";container:"," / inline-size;border:solid 1px ",";box-shadow:",";padding:",";border-radius:",";max-height:",";overflow:",";"],e=>e.theme.colors.bg,Qm,e=>e.highlight?e.theme.colors.main:e.theme.colors.bg2,e=>e.highlight?`0 0 0 1px ${e.theme.colors.main}, ${e.theme.boxShadow}`:e.theme.boxShadow,e=>e.theme.size(),e=>e.theme.radius,e=>e.small?e.theme.size(12):"initial",e=>e.small?"hidden":"visible"),ba=C.div.withConfig({displayName:"Card__CardRow",componentId:"sc-31836b58-1"})(["--border:solid 1px ",";display:block;border-top:",";padding:"," ",";"],e=>e.theme.colors.bg2,e=>e.noBorder?"none":"var(--border)",e=>e.theme.size(2),e=>e.theme.size()),ed=C.div.withConfig({displayName:"Card__CardInsideFull",componentId:"sc-31836b58-2"})(["margin-left:-",";margin-right:-",";"],e=>e.theme.size(),e=>e.theme.size()),Sre=C.div.withConfig({displayName:"Card__Margin",componentId:"sc-31836b58-3"})(["display:block;height:",";"],e=>e.theme.size()),Pd=({resource:e,children:t})=>{const[n]=we(e,E.properties.isA),r=No(n[0]);return a.jsxs(jre,{center:!0,gap:"1ch",children:[a.jsx(r,{}),a.jsx(Me,{subject:e.subject,children:a.jsx(Cre,{subject:e.subject,children:e.title})}),t]})},Cre=C.h2.withConfig({displayName:"ResourceCardTitle__Title",componentId:"sc-1f2e032b-0"})(["font-size:1.4rem;margin:0;",";white-space:nowrap;text-overflow:ellipsis;"],e=>jd(Rm,e.subject)),jre=C(be).withConfig({displayName:"ResourceCardTitle__TitleRow",componentId:"sc-1f2e032b-1"})(["max-width:100%;height:2rem;overflow:hidden;color:",";svg{min-width:1em;}"],({theme:e})=>e.colors.textLight),J0=5;function kre({resource:e,small:t}){const[n]=ne(e,E.properties.description),[r]=we(e,Lr.properties.members),[o,i]=f.useState(!1),s=r.length>J0;let l=r;return!o&&s&&(l=l.slice(0,J0)),a.jsxs(ge,{gap:"0.5rem",children:[a.jsx(Pd,{resource:e}),n&&a.jsx(At,{text:n}),a.jsx(Ere,{show:!t,children:l.length===0?a.jsx(_re,{children:"No resources"}):a.jsxs(ed,{children:[l.map(c=>a.jsx(ba,{children:a.jsx(Lt,{subject:c})},c)),s&&a.jsx(ba,{children:a.jsx(oe,{clean:!0,onClick:()=>i(!o),children:o?"show less":`show ${r.length-J0} more`})})]})})]})}const Ere=({show:e,children:t})=>e?t:null,_re=C.span.withConfig({displayName:"CollectionCard__Empty",componentId:"sc-11fab6dd-0"})(["color:",";"],({theme:e})=>e.colors.textLight),Ire=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function vh(e){let t=0;for(;e>=1024&&++t;)e=e/1024;return e.toFixed(e<10&&t>0?1:0)+" "+Ire[t]}function GI({downloadFile:e,fileSize:t}){return a.jsx(ot,{title:`Download file (${vh(t??0)})`,onClick:e,children:a.jsx(Rre,{})})}const Rre=C(yk).withConfig({displayName:"DownloadButton__DownloadIcon",componentId:"sc-cdb23237-0"})(["color:",";"],({theme:e})=>e.colors.main);function Are({downloadFile:e,fileSize:t}){return a.jsx(Pre,{onClick:e,title:`Download file (${vh(t??0)})`,children:a.jsxs(be,{gap:"0.5rem",children:[a.jsx(yk,{}),"Download"]})})}const Pre=C(oe).withConfig({displayName:"DownloadButton__StyledButton",componentId:"sc-cdb23237-1"})(["view-transition-name:download-button;"]);function Tre({src:e,alt:t,className:n,subject:r}){const[o,i]=f.useState(!1),{portal:s}=cx(!1),l=zI(r);return De("esc",()=>i(!1),{enabled:o}),s.current?a.jsxs(Dre,{showFull:o,title:"Click to enlarge",onClick:()=>i(c=>!c),children:[!o&&a.jsx("img",{src:e,alt:t??"",className:n,"data-test":"image-viewer",loading:"lazy",style:l}),o&&yn.createPortal(a.jsx(Nre,{children:a.jsx("img",{src:e,alt:t??"","data-test":"image-viewer"})}),s.current)]}):a.jsx(a.Fragment,{})}const Dre=C.button.withConfig({displayName:"ImageViewer__WrapperButton",componentId:"sc-23ff5d07-0"})(["cursor:",";border:none;padding:0;width:fit-content;height:fit-content;user-select:none;border-radius:",";background-color:transparent;&:hover,&:focus{outline:2px solid ",";}& img{border-radius:",";vertical-align:sub;}"],e=>e.showFull?"zoom-out":"zoom-in",e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.radius),Nre=C.div.withConfig({displayName:"ImageViewer__Viewer",componentId:"sc-23ff5d07-1"})(["position:fixed;inset:0;width:100vw;height:100%;max-height:100vh;max-height:100dvh;display:grid;place-items:center;padding:","rem;z-index:200;background-color:rgba(0,0,0,0.85);cursor:zoom-out;backdrop-filter:blur(5px);& img{height:90%;max-width:100%;max-height:100vh;object-fit:contain;border-radius:",";}"],e=>e.theme.margin,e=>e.theme.radius),Ore=f.lazy(()=>hc(()=>import("./chunk_index.js"),__vite__mapDeps([2,3])));function KI({resource:e,hideTypes:t}){const{downloadUrl:n,mimeType:r,bytes:o}=Ym(e),[i,s]=f.useState(!1),l=qx(),c=Mre(r,t);return o>l&&!i?a.jsx(Fre,{bytes:o,onClick:()=>s(!0)}):c("image/")?a.jsx(Lre,{src:n,subject:e.getSubject()}):c("video/")?a.jsxs("video",{controls:!0,width:"100%",children:[a.jsx("source",{src:n,type:r}),"Sorry, your browser doesn't support embedded videos."]}):c("audio/")?a.jsx("audio",{controls:!0,children:a.jsx("source",{src:n,type:r})}):$I(r)?a.jsx(zre,{downloadUrl:n,mimeType:r}):c("application/pdf")?a.jsx(f.Suspense,{children:a.jsx(Ore,{url:n})}):a.jsx(YI,{children:"No preview available"})}const Lre=C(Tre).withConfig({displayName:"FilePreview__StyledImageViewer",componentId:"sc-21465cf3-0"})(["width:100%;"]),YI=C.div.withConfig({displayName:"FilePreview__NoPreview",componentId:"sc-21465cf3-1"})(["display:grid;place-items:center;border:1px solid ",";border-radius:",";background-color:",";height:8rem;"],({theme:e})=>e.colors.bg2,({theme:e})=>e.radius,({theme:e})=>e.colors.bg1),zre=C(HI).withConfig({displayName:"FilePreview__StyledTextPreview",componentId:"sc-21465cf3-2"})(["width:100%;border:1px solid ",";background-color:",";border-radius:",";padding:","rem;"],({theme:e})=>e.colors.bg2,({theme:e})=>e.colors.bg,({theme:e})=>e.radius,({theme:e})=>e.margin);function Fre({bytes:e,onClick:t}){const n=qx();return a.jsxs(YI,{children:[a.jsxs("p",{children:["Preview hidden because the file is larger than"," ",vh(n),"."]}),a.jsx("p",{children:a.jsxs(oe,{onClick:t,children:["Load anyway (",vh(e),")"]})})]})}const Mre=(e,t=[])=>n=>!t.includes(n)&&e.startsWith(n);function $re(e){const t=f.useMemo(()=>{const n=()=>a.jsxs(a.Fragment,{children:[a.jsx(Me,{subject:e.resource.getSubject(),children:e.resource.title}),a.jsx("div",{children:"Can not show file due to invalid data."})]});return n.displayName="FileError",n},[e.resource.getSubject(),e.resource.title]);return a.jsx(yc,{FallBackComponent:t,children:a.jsx(Bre,{...e})})}function Bre({resource:e}){const{downloadFile:t,bytes:n}=Ym(e);return a.jsxs(a.Fragment,{children:[a.jsxs(be,{justify:"space-between",children:[a.jsx(Pd,{resource:e}),a.jsx(GI,{downloadFile:t,fileSize:n})]}),a.jsx(KI,{resource:e,hideTypes:["application/pdf"]})]})}const Gl=C.div.withConfig({displayName:"Detail",componentId:"sc-e60f571f-0"})(["display:inline-flex;align-items:center;gap:0.5ch;margin-right:2rem;"]),Xx=C.div.withConfig({displayName:"Detail__Details",componentId:"sc-e60f571f-1"})(["font-style:italic;"]),Hre=new Intl.ListFormat("en-GB",{style:"long",type:"conjunction"});function Td({subjects:e,RenderComp:t}){const n=e.filter(o=>o!==void 0),r=Hre.formatToParts(n);return a.jsx(a.Fragment,{children:r.map(({type:o,value:i},s)=>{if(o==="literal")return i;let l=i;return r.findIndex(c=>c.value===i)!==s&&(l=`${i}-${s}`),t?a.jsx(t,{subject:i},l):a.jsx(Lt,{subject:i},l)})})}const Qx=({resource:e})=>e.getClasses().length===0?null:a.jsx(Gl,{children:a.jsx(Td,{subjects:e.getClasses(),RenderComp:Ure})}),Ure=({subject:e})=>{const t=q(e),n=No(e);return a.jsxs(Gl,{children:[a.jsx(n,{}),a.jsx(Me,{subject:e,children:t.title})]})};function xc({commitSubject:e}){const t=q(e),[n]=ne(t,pe.commit.signer),[r]=ne(t,pe.commit.previousCommit),o=PL(t,pe.commit.createdAt);return e?!e||!t.isReady?a.jsx(Gl,{children:"loading..."}):a.jsxs(Gl,{children:[n&&a.jsx(Lt,{subject:n}),"-",a.jsxs(Me,{subject:e,children:[r?"edited ":"",o&&a.jsx($x,{date:o})]})," "]}):null}const Wre={commit:!0,validate:!1};function si({resource:e,parentRef:t,id:n,className:r,...o}){const[i,s]=rt(e,1/0,Wre),[l,c]=f.useState(!1),u=f.useRef(null),d=t||u,[p]=jt(e);De("enter",()=>{c(!1)},{enableOnTags:["INPUT"]}),De("esc",()=>{c(!1)},{enableOnTags:["INPUT"]});function h(){c(!0)}const m=p?"set a title":"Untitled";return f.useEffect(()=>{var v,g;(v=d.current)==null||v.focus(),(g=d.current)==null||g.select()},[l]),l?a.jsx(Vre,{ref:d,"data-test":"editable-title",...o,onFocus:h,placeholder:m,onChange:v=>s(v.target.value),value:i||"",onBlur:()=>c(!1),className:r}):a.jsx(QI,{disabled:!p,id:n,canEdit:!!p,title:p?"Click to edit title":"","data-test":"editable-title",onClick:h,subtle:!!p&&!i,subject:e.subject,className:r,children:a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[i||m,a.jsx(oy,{resource:e})]}),p&&a.jsx(qre,{})]})})}const XI=Kt(["line-height:1.1;"]),QI=C.h1.withConfig({displayName:"EditableTitle__Title",componentId:"sc-d3427525-0"})([""," display:flex;align-items:center;gap:",";cursor:",";opacity:",";",";"],XI,e=>e.theme.size(),e=>e.canEdit?"pointer":"initial",e=>e.subtle?.5:1,e=>jd(Rm,e.subject)),Vre=C.input.withConfig({displayName:"EditableTitle__TitleInput",componentId:"sc-d3427525-1"})([""," margin-bottom:","rem;font-size:","rem;color:",";border:none;font-weight:bold;display:block;padding:0;margin-top:0;outline:none;background-color:transparent;margin-bottom:","rem;font-family:",";word-wrap:break-word;word-break:break-all;overflow:visible;&:focus{outline:none;}"],XI,e=>e.theme.margin,e=>e.theme.fontSizeH1,e=>e.theme.colors.text,e=>e.theme.margin,e=>e.theme.fontFamilyHeader),qre=C(bb).withConfig({displayName:"EditableTitle__Icon",componentId:"sc-d3427525-2"})(["opacity:0;font-size:0.8em;",":hover &{opacity:0.5;}"],QI),Jx=[E.properties.name,E.properties.shortname,Ne.properties.filename,E.properties.description,E.properties.isA,E.properties.parent,E.properties.write,E.properties.read,qn.properties.lastCommit];function Gre({resource:e}){const[t]=ne(e,qn.properties.lastCommit),[n]=jt(e),r=uo();return a.jsx(ht,{children:a.jsxs(ge,{children:[a.jsxs(be,{justify:"space-between",children:[a.jsx(si,{resource:e}),n&&a.jsx(ot,{title:"Edit",variant:Ii.Square,onClick:()=>r(fd(e.subject)),children:a.jsx(bb,{})})]}),a.jsxs(Xx,{children:[a.jsx(Qx,{resource:e}),a.jsx(xc,{commitSubject:t})]}),a.jsx(zi,{resource:e,propertyURL:E.properties.description}),a.jsx(Pa,{resource:e,except:Jx,editable:!0,columns:!0})]})})}function Kre({resource:e}){const[t]=ne(e,pe.description),[n]=ne(e,pe.parent),[r]=ne(e,pe.commit.lastCommit);return a.jsxs(a.Fragment,{children:[a.jsxs(Xx,{children:[a.jsxs(Gl,{children:["Message in ",a.jsx(Lt,{subject:n})]}),a.jsx(xc,{commitSubject:r})]}),a.jsx(At,{text:t||""})]})}function Yre({resource:e}){const[t]=ne(e,J.properties.bookmark.url),[n]=ne(e,J.properties.bookmark.preview);return a.jsxs(ge,{gap:"0.5rem",children:[a.jsx(Pd,{resource:e}),a.jsx(ul,{to:t,variant:ch.Button,children:"Open site"}),n&&a.jsx(Xre,{children:a.jsx(At,{maxLength:1e3,renderGFM:!0,text:n})})]})}const Xre=C.div.withConfig({displayName:"BookmarkCard__MarkdownWrapper",componentId:"sc-4b6072c6-0"})(["margin-top:","rem;margin-inline:-","rem;padding:","rem;background-color:",";border-top:1px solid ",";img{border-radius:",";}"],e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.margin,e=>e.theme.colors.bgBody,e=>e.theme.colors.bg2,e=>e.theme.radius);function Qre({resource:e}){const[t]=ne(e,J.properties.parent),n=q(t),[r]=ne(e,J.properties.description);return a.jsxs(ge,{gap:"0.5rem",children:[a.jsx(Pd,{resource:n}),a.jsx(At,{text:r??""})]})}var Jre=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Dd(e,t){var n=Zre(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Zre(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=Jre.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var eoe=[".DS_Store","Thumbs.db"];function toe(e){return pc(this,void 0,void 0,function(){return fc(this,function(t){return yh(e)&&noe(e)?[2,soe(e.dataTransfer,e.type)]:roe(e)?[2,ooe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ioe(e)]:[2,[]]})})}function noe(e){return yh(e.dataTransfer)}function roe(e){return yh(e)&&yh(e.target)}function yh(e){return typeof e=="object"&&e!==null}function ooe(e){return Ty(e.target.files).map(function(t){return Dd(t)})}function ioe(e){return pc(this,void 0,void 0,function(){var t;return fc(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return Dd(r)})]}})})}function soe(e,t){return pc(this,void 0,void 0,function(){var n,r;return fc(this,function(o){switch(o.label){case 0:return e===null?[2,[]]:e.items?(n=Ty(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(aoe))]):[3,2];case 1:return r=o.sent(),[2,V5(JI(r))];case 2:return[2,V5(Ty(e.files).map(function(i){return Dd(i)}))]}})})}function V5(e){return e.filter(function(t){return eoe.indexOf(t.name)===-1})}function Ty(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function aoe(e){if(typeof e.webkitGetAsEntry!="function")return q5(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ZI(t):q5(e)}function JI(e){return e.reduce(function(t,n){return cV(t,Array.isArray(n)?JI(n):[n])},[])}function q5(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=Dd(t);return Promise.resolve(n)}function loe(e){return pc(this,void 0,void 0,function(){return fc(this,function(t){return[2,e.isDirectory?ZI(e):coe(e)]})})}function ZI(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(l){return pc(s,void 0,void 0,function(){var c,u,d;return fc(this,function(p){switch(p.label){case 0:if(l.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=p.sent(),n(c),[3,4];case 3:return u=p.sent(),r(u),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(loe)),o.push(d),i(),p.label=6;case 6:return[2]}})})},function(l){r(l)})}i()})}function coe(e){return pc(this,void 0,void 0,function(){return fc(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Dd(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var uoe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var l=s.trim().toLowerCase();return l.charAt(0)==="."?r.toLowerCase().endsWith(l):l.endsWith("/*")?i===l.replace(/\/.*$/,""):o===l})}return!0};function G5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G5(Object(n),!0).forEach(function(r){eR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y5(e,t){return hoe(e)||foe(e,t)||poe(e,t)||doe()}function doe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function poe(e,t){if(e){if(typeof e=="string")return X5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X5(e,t)}}function X5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function foe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,l;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,l=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw l}}return r}}function hoe(e){if(Array.isArray(e))return e}var moe="file-invalid-type",goe="file-too-large",voe="file-too-small",yoe="too-many-files",boe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:moe,message:"File type must be ".concat(n)}},Q5=function(t){return{code:goe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},J5=function(t){return{code:voe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},xoe={code:yoe,message:"Too many files"};function tR(e,t){var n=e.type==="application/x-moz-file"||uoe(e,t);return[n,n?null:boe(t)]}function nR(e,t,n){if($c(e.size))if($c(t)&&$c(n)){if(e.size>n)return[!1,Q5(n)];if(e.size<t)return[!1,J5(t)]}else{if($c(t)&&e.size<t)return[!1,J5(t)];if($c(n)&&e.size>n)return[!1,Q5(n)]}return[!0,null]}function $c(e){return e!=null}function woe(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=tR(l,n),u=Y5(c,1),d=u[0],p=nR(l,r,o),h=Y5(p,1),m=h[0];return d&&m})}function bh(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Sp(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Z5(e){e.preventDefault()}function Soe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Coe(e){return e.indexOf("Edge/")!==-1}function joe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Soe(e)||Coe(e)}function $o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(l){return!bh(r)&&l&&l.apply(void 0,[r].concat(i)),bh(r)})}}function eS(){return"showOpenFilePicker"in window}function koe(e){return e=typeof e=="string"?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter(function(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}).reduce(function(t,n){return K5(K5({},t),{},eR({},n,[]))},{}):{}}]}var Eoe=["children"],_oe=["open"],Ioe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Roe=["refKey","onChange","onClick"];function Aoe(e){return Doe(e)||Toe(e)||rR(e)||Poe()}function Poe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Toe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Doe(e){if(Array.isArray(e))return Dy(e)}function Z0(e,t){return Loe(e)||Ooe(e,t)||rR(e,t)||Noe()}function Noe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rR(e,t){if(e){if(typeof e=="string")return Dy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dy(e,t)}}function Dy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ooe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,l;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,l=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw l}}return r}}function Loe(e){if(Array.isArray(e))return e}function tS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(n),!0).forEach(function(r){Ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ny(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xh(e,t){if(e==null)return{};var n=zoe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zoe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Zx=f.forwardRef(function(e,t){var n=e.children,r=xh(e,Eoe),o=Jm(r),i=o.open,s=xh(o,_oe);return f.useImperativeHandle(t,function(){return{open:i}},[i]),ce.createElement(f.Fragment,null,n(Tt(Tt({},s),{},{open:i})))});Zx.displayName="Dropzone";var oR={disabled:!1,getFilesFromEvent:toe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};Zx.defaultProps=oR;Zx.propTypes={children:te.func,accept:te.oneOfType([te.string,te.arrayOf(te.string)]),multiple:te.bool,preventDropOnDocument:te.bool,noClick:te.bool,noKeyboard:te.bool,noDrag:te.bool,noDragEventsBubbling:te.bool,minSize:te.number,maxSize:te.number,maxFiles:te.number,disabled:te.bool,getFilesFromEvent:te.func,onFileDialogCancel:te.func,onFileDialogOpen:te.func,useFsAccessApi:te.bool,onDragEnter:te.func,onDragLeave:te.func,onDragOver:te.func,onDrop:te.func,onDropAccepted:te.func,onDropRejected:te.func,validator:te.func};var Oy={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Jm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},oR),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,h=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,b=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.preventDropOnDocument,w=t.noClick,S=t.noKeyboard,k=t.noDrag,_=t.noDragEventsBubbling,I=t.validator,P=f.useMemo(function(){return typeof b=="function"?b:nS},[b]),z=f.useMemo(function(){return typeof g=="function"?g:nS},[g]),D=f.useRef(null),F=f.useRef(null),$=f.useReducer(Foe,Oy),Z=Z0($,2),ee=Z[0],W=Z[1],ue=ee.isFocused,K=ee.isFileDialogActive,B=ee.draggedFiles,H=function(){K&&setTimeout(function(){if(F.current){var Ae=F.current.files;Ae.length||(W({type:"closeDialog"}),z())}},300)};f.useEffect(function(){return y&&eS()?function(){}:(window.addEventListener("focus",H,!1),function(){window.removeEventListener("focus",H,!1)})},[F,K,z,y]);var N=f.useRef([]),xe=function(Ae){D.current&&D.current.contains(Ae.target)||(Ae.preventDefault(),N.current=[])};f.useEffect(function(){return x&&(document.addEventListener("dragover",Z5,!1),document.addEventListener("drop",xe,!1)),function(){x&&(document.removeEventListener("dragover",Z5),document.removeEventListener("drop",xe))}},[D,x]);var fe=f.useCallback(function(he){he.preventDefault(),he.persist(),Ft(he),N.current=[].concat(Aoe(N.current),[he.target]),Sp(he)&&Promise.resolve(o(he)).then(function(Ae){bh(he)&&!_||(W({draggedFiles:Ae,isDragActive:!0,type:"setDraggedFiles"}),u&&u(he))})},[o,u,_]),O=f.useCallback(function(he){he.preventDefault(),he.persist(),Ft(he);var Ae=Sp(he);if(Ae&&he.dataTransfer)try{he.dataTransfer.dropEffect="copy"}catch{}return Ae&&p&&p(he),!1},[p,_]),Te=f.useCallback(function(he){he.preventDefault(),he.persist(),Ft(he);var Ae=N.current.filter(function(Wt){return D.current&&D.current.contains(Wt)}),xt=Ae.indexOf(he.target);xt!==-1&&Ae.splice(xt,1),N.current=Ae,!(Ae.length>0)&&(W({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Sp(he)&&d&&d(he))},[D,d,_]),Oe=f.useCallback(function(he,Ae){var xt=[],Wt=[];he.forEach(function(dn){var V=tR(dn,n),ie=Z0(V,2),Se=ie[0],We=ie[1],ze=nR(dn,s,i),Pt=Z0(ze,2),jn=Pt[0],pn=Pt[1],pr=I?I(dn):null;if(Se&&jn&&!pr)xt.push(dn);else{var jr=[We,pn];pr&&(jr=jr.concat(pr)),Wt.push({file:dn,errors:jr.filter(function(ft){return ft})})}}),(!l&&xt.length>1||l&&c>=1&&xt.length>c)&&(xt.forEach(function(dn){Wt.push({file:dn,errors:[xoe]})}),xt.splice(0)),W({acceptedFiles:xt,fileRejections:Wt,type:"setFiles"}),h&&h(xt,Wt,Ae),Wt.length>0&&v&&v(Wt,Ae),xt.length>0&&m&&m(xt,Ae)},[W,l,n,s,i,c,h,m,v,I]),ke=f.useCallback(function(he){he.preventDefault(),he.persist(),Ft(he),N.current=[],Sp(he)&&Promise.resolve(o(he)).then(function(Ae){bh(he)&&!_||Oe(Ae,he)}),W({type:"reset"})},[o,Oe,_]),He=f.useCallback(function(){if(y&&eS()){W({type:"openDialog"}),P();var he={multiple:l,types:koe(n)};window.showOpenFilePicker(he).then(function(Ae){return o(Ae)}).then(function(Ae){return Oe(Ae,null)}).catch(function(Ae){return z(Ae)}).finally(function(){return W({type:"closeDialog"})});return}F.current&&(W({type:"openDialog"}),P(),F.current.value=null,F.current.click())},[W,P,z,y,Oe,n,l]),Ke=f.useCallback(function(he){!D.current||!D.current.isEqualNode(he.target)||(he.keyCode===32||he.keyCode===13)&&(he.preventDefault(),He())},[D,F,He]),it=f.useCallback(function(){W({type:"focus"})},[]),Pe=f.useCallback(function(){W({type:"blur"})},[]),bt=f.useCallback(function(){w||(joe()?setTimeout(He,0):He())},[F,w,He]),Ye=function(Ae){return r?null:Ae},Qt=function(Ae){return S?null:Ye(Ae)},zt=function(Ae){return k?null:Ye(Ae)},Ft=function(Ae){_&&Ae.stopPropagation()},Cn=f.useMemo(function(){return function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ae=he.refKey,xt=Ae===void 0?"ref":Ae,Wt=he.role,dn=he.onKeyDown,V=he.onFocus,ie=he.onBlur,Se=he.onClick,We=he.onDragEnter,ze=he.onDragOver,Pt=he.onDragLeave,jn=he.onDrop,pn=xh(he,Ioe);return Tt(Tt(Ny({onKeyDown:Qt($o(dn,Ke)),onFocus:Qt($o(V,it)),onBlur:Qt($o(ie,Pe)),onClick:Ye($o(Se,bt)),onDragEnter:zt($o(We,fe)),onDragOver:zt($o(ze,O)),onDragLeave:zt($o(Pt,Te)),onDrop:zt($o(jn,ke)),role:typeof Wt=="string"&&Wt!==""?Wt:"button"},xt,D),!r&&!S?{tabIndex:0}:{}),pn)}},[D,Ke,it,Pe,bt,fe,O,Te,ke,S,k,r]),Cr=f.useCallback(function(he){he.stopPropagation()},[]),un=f.useMemo(function(){return function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ae=he.refKey,xt=Ae===void 0?"ref":Ae,Wt=he.onChange,dn=he.onClick,V=xh(he,Roe),ie=Ny({accept:n,multiple:l,type:"file",style:{display:"none"},onChange:Ye($o(Wt,ke)),onClick:Ye($o(dn,Cr)),autoComplete:"off",tabIndex:-1},xt,F);return Tt(Tt({},ie),V)}},[F,n,l,ke,r]),Xn=B.length,Ln=Xn>0&&woe({files:B,accept:n,minSize:s,maxSize:i,multiple:l,maxFiles:c}),vo=Xn>0&&!Ln;return Tt(Tt({},ee),{},{isDragAccept:Ln,isDragReject:vo,isFocused:ue&&!r,getRootProps:Cn,getInputProps:un,rootRef:D,inputRef:F,open:Ye(He)})}function Foe(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},Oy),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Tt(Tt({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Tt({},Oy);default:return e}}function nS(){}function Moe({subject:e}){const t=q(e),[n]=rt(t);return a.jsx($oe,{"data-test":"file-pill",children:a.jsx(Me,{subject:t.getSubject(),children:a.jsx("span",{children:n})})})}const $oe=C.div.withConfig({displayName:"FilePill__FilePillStyled",componentId:"sc-e7381fdc-0"})(["display:inline-flex;border:solid 1px ",";border-radius:",";padding:0.4rem;margin-bottom:","rem;margin-right:","rem;"],e=>e.theme.colors.main,e=>e.theme.radius,e=>e.theme.margin,e=>e.theme.margin);function Boe({parentResource:e}){const[t,n]=f.useState([]),{upload:r,isUploading:o,error:i}=Xm(e),s=f.useCallback(async d=>{const p=await r(d);n(p)},[r]),{getRootProps:l,getInputProps:c,isDragActive:u}=Jm({onDrop:s});return e.new?a.jsx("p",{children:"You can add attachments after saving the resource."}):a.jsxs("div",{children:[a.jsxs("div",{...l(),children:[a.jsx("input",{...c()}),u?a.jsx("p",{children:"Drop the files here ..."}):a.jsx(oe,{subtle:!0,onClick:()=>null,loading:o?"Uploading...":void 0,children:"Upload file(s)..."}),i&&a.jsx(vn,{children:i.message})]}),t.length>0&&t.map(d=>a.jsx(Moe,{subject:d},d))]})}function Hoe({onClick:e}){return a.jsx(Uoe,{as:"button",onClick:e,children:a.jsx(ur,{})})}const Uoe=C(Ju).withConfig({displayName:"NewCard__Thing",componentId:"sc-95463b31-0"})(["background-color:",";border:1px solid ",";cursor:pointer;display:grid;place-items:center;height:100%;width:100%;font-size:3rem;color:",";transition:color 0.1s ease-in-out,font-size 0.1s ease-out,border-color 0.1s ease-in-out;&:hover,&:focus{color:",";font-size:3.8rem;border-color:",";}:active{font-size:3rem;}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main);function Zm({accept:e,parentResource:t,text:n,maxFiles:r,className:o,onFilesUploaded:i}){const{upload:s,isUploading:l,error:c}=Xm(t),u=f.useCallback(async m=>{const v=await s(m);i==null||i(v)},[s]),{getRootProps:d,getInputProps:p}=Jm({onDrop:u,maxFiles:r,accept:e}),h=r===1?"Drop a file or click here to upload.":"Drop files or click here to upload.";return a.jsx(a.Fragment,{children:a.jsxs(Woe,{...d(),className:o,children:[c&&a.jsx(vn,{children:c.message}),a.jsx("input",{...p()}),a.jsxs(Voe,{children:[a.jsx(Sk,{})," ",l?"Uploading...":n??h]})]})})}const Woe=C.div.withConfig({displayName:"FileDropzoneInput__VisualDropZone",componentId:"sc-396bd1b8-0"})(["backdrop-filter:blur(10px);border:2px dashed ",";border-radius:",";display:grid;place-items:center;font-size:1.3rem;color:",";min-height:10rem;cursor:pointer;&:hover,&:focus{color:",";border-color:",";}"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main),Voe=C.div.withConfig({displayName:"FileDropzoneInput__TextWrapper",componentId:"sc-396bd1b8-1"})(["display:flex;align-items:center;padding:","rem;gap:1rem;"],e=>e.theme.margin),iR={properties:{coverImage:"https://atomicdata.dev/Folder/wp8ame4nqf/urHO7G8FKm"}},qoe={commit:!0},rS={accept:["image/*"],maxFiles:1,text:"Click or drop image to use as a cover"};function Goe({resource:e,canEdit:t}){const[n,r]=ne(e,iR.properties.coverImage,qoe),o=q(n),[i]=ne(o,pe.file.downloadUrl),s=f.useCallback(l=>{r(l[0])},[r]);return!i&&!t?a.jsx(a.Fragment,{}):i?a.jsxs(Yoe,{children:[a.jsx(Koe,{src:i,alt:""}),t&&a.jsx(Ly,{children:a.jsx(Xoe,{...rS,parentResource:e,onFilesUploaded:s})})]}):a.jsx(Zm,{...rS,parentResource:e,onFilesUploaded:s})}const Koe=C.img.withConfig({displayName:"ArticleCover__CoverImage",componentId:"sc-9c78373d-0"})(["object-fit:cover;height:100%;width:100%;"]),Ly=C.div.withConfig({displayName:"ArticleCover__DropzoneWrapper",componentId:"sc-9c78373d-1"})(["opacity:0;position:absolute;z-index:2;inset:0;height:100%;width:100%;",""],Yt("opacity")),Yoe=C.div.withConfig({displayName:"ArticleCover__CoverWrapper",componentId:"sc-9c78373d-2"})(["&:hover ",",&:focus-within ","{opacity:1 !important;}position:relative;width:calc(100% + ","rem);margin-inline:-","rem;margin-top:-","rem;height:13rem;"],Ly,Ly,({theme:e})=>e.margin*2,({theme:e})=>e.margin,({theme:e})=>e.margin),Xoe=C(Zm).withConfig({displayName:"ArticleCover__StyledDropzone",componentId:"sc-9c78373d-3"})(["height:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;"]);function Qoe({resource:e,canEdit:t}){const[n]=ne(e,E.properties.description),[r,o]=f.useState(!1),i=async()=>{try{await e.save(),o(!1),at.success("Content saved")}catch{o(!0),at.error("Could not save resource...")}};return!r&&t&&!n?a.jsxs(eie,{onClick:()=>o(!0),children:[a.jsx(ur,{}),"Add Content"]}):r?a.jsxs(a.Fragment,{children:[a.jsx(xi,{resource:e,propertyURL:E.properties.description}),a.jsx("div",{children:a.jsx(oe,{onClick:i,children:"Save"})})]}):a.jsxs(Joe,{children:[t&&a.jsx(Zoe,{onClick:()=>o(!0),title:"Edit content",variant:Ii.Colored,color:"main",children:a.jsx(oc,{})}),a.jsx(At,{text:n??""})]})}const Joe=C.div.withConfig({displayName:"ArticleDescription__DescriptionWrapper",componentId:"sc-bec8cace-0"})(["position:relative;"]),Zoe=C(ot).withConfig({displayName:"ArticleDescription__EditButton",componentId:"sc-bec8cace-1"})(["position:absolute;top:0;right:0;"]),eie=C.button.withConfig({displayName:"ArticleDescription__AddContentButton",componentId:"sc-bec8cace-2"})(["width:100%;border:1px solid ",";background-color:",";border-radius:",";height:25rem;display:flex;align-items:center;justify-content:center;gap:1ch;color:",";cursor:pointer;",";&:hover,&:focus{border-color:",";color:",";}"],({theme:e})=>e.colors.bg2,({theme:e})=>e.colors.bgBody,({theme:e})=>e.radius,({theme:e})=>e.colors.textLight,Yt("border-color","color"),({theme:e})=>e.colors.main,({theme:e})=>e.colors.main);function tie({resource:e}){const[t]=ne(e,qn.properties.lastCommit),[n]=jt(e),r=NL(e),o=kd(),i=f.useCallback(()=>{o(X.classes.article,e.subject)},[o,e]);return a.jsx(a.Fragment,{children:a.jsxs(ge,{gap:"2rem",children:[a.jsx(oie,{children:a.jsx(nie,{children:a.jsxs(ge,{children:[a.jsx(Goe,{resource:e,canEdit:n}),a.jsxs(rie,{children:[a.jsx(si,{resource:e}),a.jsx(xc,{commitSubject:t})]}),a.jsx(Qoe,{resource:e,canEdit:n}),a.jsx(Boe,{parentResource:e})]})})}),a.jsx(iie,{children:a.jsxs(aie,{children:[a.jsx("h2",{children:"Children"}),a.jsxs(sie,{children:[r.map(s=>a.jsx(oS,{children:a.jsx(wc,{subject:s})},s)),n&&a.jsx(oS,{children:a.jsx(Hoe,{onClick:i})})]})]})})]})})}const nie=C.div.withConfig({displayName:"ArticlePage__Content",componentId:"sc-178c70f4-0"})(["position:relative;background-color:",";padding:","rem;border-radius:",";border:solid 1px ",";overflow:hidden;"],({theme:e})=>e.colors.bg,({theme:e})=>e.margin,({theme:e})=>e.radius,({theme:e})=>e.colors.bg2),rie=C.div.withConfig({displayName:"ArticlePage__HeadingWrapper",componentId:"sc-178c70f4-1"})(["display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;h1{margin-bottom:0;}"]),oie=C(Is).withConfig({displayName:"ArticlePage__ArticleContainer",componentId:"sc-178c70f4-2"})(["padding-bottom:0;&:last-child{padding-bottom:10rem;}"]),iie=C.section.withConfig({displayName:"ArticlePage__ChildrenSection",componentId:"sc-178c70f4-3"})(["width:100%;background-color:",";padding-top:","rem;"],({theme:e})=>e.colors.bg,({theme:e})=>e.margin),sie=C.div.withConfig({displayName:"ArticlePage__Grid",componentId:"sc-178c70f4-4"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(20rem,1fr));gap:","rem;"],({theme:e})=>e.margin),aie=C(Is).withConfig({displayName:"ArticlePage__ContainerWider",componentId:"sc-178c70f4-5"})(["width:min(100%,80rem);"]),oS=C.div.withConfig({displayName:"ArticlePage__Height",componentId:"sc-178c70f4-6"})(["min-height:12rem;& > *{height:100%;}"]),iS=200;function lie({resource:e}){const[t]=ne(e,E.properties.description),n=ate(t??"").slice(0,iS),r=n.length<iS?"":"...";return a.jsxs("div",{children:[a.jsx(Me,{subject:e.subject,children:a.jsx(cie,{subject:e.subject,children:e.title})}),a.jsxs("p",{children:[n,r]})]})}const cie=C.h2.withConfig({displayName:"ArticleCard__Title",componentId:"sc-cf24eaa8-0"})(["white-space:nowrap;text-overflow:ellipsis;width:100%;overflow:hidden;font-size:1.3rem;",""],e=>jd(Rm,e.subject));function wc(e){const{subject:t,initialInView:n}=e,[r,o]=f.useState(!1),{ref:i,inView:s}=vte({threshold:0,initialInView:n});return f.useEffect(()=>{s&&!r&&o(!0)},[s,r]),a.jsx(f.Suspense,{children:a.jsx(Kn,{ref:i,...e,about:t,children:r?a.jsx(uie,{...e}):a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:a.jsx(Me,{subject:t,children:t})}),a.jsx("p",{children:"Resource is loading..."})]})})})}function uie(e){const{subject:t}=e,n=q(t),[r]=rt(n),[o]=ne(n,E.properties.isA);if(n.loading)return a.jsx("p",{children:"Loading..."});if(n.error)return a.jsxs(yt,{children:[a.jsx(Me,{subject:t,children:a.jsx("h2",{children:r})}),n.error.message]});switch(o){case Lr.classes.collection:return a.jsx(kre,{resource:n,...e});case Ne.classes.file:return a.jsx($re,{resource:n,...e});case X.classes.message:return a.jsx(Kre,{resource:n,...e});case X.classes.bookmark:return a.jsx(Yre,{resource:n,...e});case X.classes.paragraph:return a.jsx(Qre,{resource:n,...e});case X.classes.article:return a.jsx(lie,{resource:n,...e});default:return a.jsx(ew,{resource:n,...e})}}function ew({resource:e,small:t}){const[n]=we(e,E.properties.isA),r=q(n[0]);return a.jsxs(ge,{gap:"0.5rem",children:[a.jsx(Pd,{resource:e,children:a.jsx(pie,{children:r.title})}),a.jsx(die,{children:a.jsx(zi,{resource:e,propertyURL:E.properties.description})}),!t&&a.jsx(Pa,{basic:!0,resource:e,except:Jx,editable:!0})]})}const die=C.div.withConfig({displayName:"ResourceCard__DescriptionWrapper",componentId:"sc-a71226a-0"})(["max-height:10rem;overflow:hidden;"]),pie=C.span.withConfig({displayName:"ResourceCard__ClassName",componentId:"sc-a71226a-1"})(["margin-left:auto;"]);function fie({resource:e,members:t,columns:n}){const r=n.filter(o=>o!==J.properties.shortname);return e===null?null:a.jsxs(hie,{children:[a.jsx(mie,{columns:r}),t.length>0?a.jsx("tbody",{children:t.map(o=>a.jsx(vie,{propsArray:r,subject:o},o))}):a.jsx("p",{children:"This collection is empty"})]})}const hie=C.table.withConfig({displayName:"Table__TableStyled",componentId:"sc-1788747f-0"})(["overflow-y:auto;border-collapse:collapse;margin-left:","rem;margin-right:","rem;margin-bottom:","rem;width:calc(100% + 2rem);"],e=>-e.theme.margin,e=>-e.theme.margin,e=>e.theme.margin);function mie({columns:e}){return a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx(aR,{style:{minWidth:"10rem"},children:"subject"}),e.map(t=>a.jsx(gie,{subject:t},t))]})})}function gie({subject:e}){const[t,n]=Xf("sort_by"),[r,o]=Xf("sort_desc"),i=sr(e),s=!i.isDynamic;function l(){t===e?o(r==="true"?void 0:"true"):n(e)}const c=t===e;let u="6rem";switch(i.datatype){case Y.STRING:case Y.RESOURCEARRAY:u="15rem";break;case Y.MARKDOWN:u="25rem";break;case Y.BOOLEAN:case Y.INTEGER:u="6rem";break}return a.jsxs(aR,{style:{minWidth:u},children:[a.jsx(Lt,{subject:e})," ",s&&a.jsx(oe,{onClick:l,subtle:!c,icon:!0,"data-test":`sort-${e}`,children:c?r==="true"?a.jsx(G$,{}):a.jsx(K$,{}):a.jsx(Y$,{})})]})}const vie=f.memo(function({subject:t,propsArray:n}){const r=q(t,{allowIncomplete:!0});return r===null?null:a.jsxs(yie,{about:t,children:[a.jsx(lR,{children:a.jsx(Lt,{subject:t})}),n.map(o=>a.jsx(xie,{resource:r,prop:o},o))]})}),yie=C.tr.withConfig({displayName:"Table__RowStyled",componentId:"sc-1788747f-1"})(["background-color:",";border-top:solid 1px ",";&:last-child{border-bottom:solid 1px ",";}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.bg2),bie=C.div.withConfig({displayName:"Table__CellContainer",componentId:"sc-1788747f-2"})(["overflow:auto;max-height:5rem;max-width:40rem;"]);function xie({resource:e,prop:t}){return a.jsx(lR,{children:a.jsx(bie,{children:a.jsx(zi,{resource:e,propertyURL:t},t)})})}const sR=Kt(["padding:","rem;padding-left:","rem;vertical-align:top;&:last-child{width:100% !important;max-width:100% !important;}"],e=>e.theme.margin/2,e=>e.theme.margin),aR=C.th.withConfig({displayName:"Table__CellHeaderStyled",componentId:"sc-1788747f-3"})(["text-align:left;"," font-weight:bold;white-space:nowrap;"],sR),lR=C.td.withConfig({displayName:"Table__CellStyled",componentId:"sc-1788747f-4"})(["",""],sR);function wie(e,t,n){const[r,o]=f.useState(void 0),[i,s]=f.useState([]),l=Ce();let c=fa(t||[]);const u=Bf(e,40);t===void 0&&(c=l.resources);const d=Bf(c,100);return f.useEffect(()=>{o(Sie(d))},[d,n]),f.useEffect(()=>{if(r===void 0||Bt.isValidSubject(u))return;const p=r&&r.search(u);s(p)},[u,r,n]),i}function Sie(e){const n=Array.from((e==null?void 0:e.values())||[]).reduce((i,s)=>{if(!s.isReady()||s.getSubject()===void 0||s.getClasses().includes(J.classes.commit))return i;const l=JSON.stringify(Array.from(s.getPropVals().values()).sort().join(`
`)),c={subject:s.getSubject(),valuesArray:l};return i.push(c),i},[]),r={keys:["subject","valuesArray"]};return new AI(n,r)}function Cie({subject:e,clickable:t,className:n}){const r=q(e),[o]=rt(r);let[i]=ne(r,J.properties.description);if(r.loading)return a.jsx("span",{about:e,children:"Loading..."});if(r.error)return a.jsxs(yt,{about:e,children:["Error: ",r.error.message]});const s=40;return i&&i.length>=s&&(i=i.slice(0,s)+"..."),a.jsxs("span",{about:e,className:n,children:[t?a.jsx(Lt,{untabbable:!0,subject:e,basic:!0}):a.jsx("b",{children:o}),a.jsx(zy,{children:i?` - ${i}`:null})]})}const zy=C.span.withConfig({displayName:"ResourceLine__ResourceLineDescription",componentId:"sc-6babed8d-0"})(["color:",";"],e=>e.theme.colors.textLight);function jie({subject:e}){const t=q(e,{allowIncomplete:!0}),n=!(t.error||t.loading);return a.jsx(kie,{valid:n,children:t.title})}const kie=C.span.withConfig({displayName:"InlineOverlay__Wrapper",componentId:"sc-62e3ec7a-0"})(["margin-left:1px;color:",";"],e=>e.valid?e.theme.colors.main:"currentColor");function sS(e){return(e==null?void 0:e.type)==="createOption"}const Eie=({required:e,initial:t,placeholder:n,onRemove:r,onUpdate:o,options:i,disabled:s,classType:l,onCreateClick:c,onInputChange:u,onBlur:d,invalid:p,...h})=>{const[m,v]=f.useState(t||""),[g,b]=f.useState(t),[y,x]=f.useState(0),[w,S]=f.useState(!1),[k,_]=f.useState(!1),[I,P]=f.useState(!1),z=f.useRef(null),D=f.useRef(null),F=f.useRef(null),$=f.useContext(xm),Z=f.useRef(null),{above:ee,below:W,width:ue}=_I(w,Z),K=f.useCallback(()=>{S(!1),_(!1),d==null||d(),b(m)},[d,m]);Bb([z,D,F],K,w),f.useEffect(()=>{_(!1),b(t)},[t]),De("esc",fe=>{fe.preventDefault(),S(!1)},{enabled:w,enableOnTags:["INPUT"]});const B=f.useCallback(fe=>{const O=fe.target.value;v(O),u&&u(O),P(!0),_(!0),S(!0),x(-1),b(O===""?void 0:O)},[u,v]);function H(){var fe;v(""),b(void 0),o(void 0),(fe=F.current)==null||fe.focus()}function N(fe){x(-1),_(!0),S(!0),fe.target.select(),setTimeout(function(){fe.target.select()},20)}const xe=f.useCallback(fe=>{v(fe),b(fe),o(fe),S(!1),_(!1)},[v,b,o,S]);return a.jsx(rx,{open:w,children:a.jsxs(Rie,{children:[a.jsx(nE,{children:a.jsxs(Je,{ref:Z,children:[a.jsxs(Iie,{children:[g&&!k&&a.jsx(Nie,{children:p?a.jsx(yt,{children:g}):a.jsx(jie,{subject:g})}),a.jsx(nt,{onFocus:N,disabled:s,size:5,required:e,placeholder:n,value:m,onChange:B,ref:F,...h})]}),g?a.jsx(Js,{disabled:s,type:"button",onClick:H,title:"clear selection","aria-label":"clear selection",children:a.jsx(ri,{})}):null,i.length>0&&g===void 0&&a.jsx(Js,{disabled:s,type:"button",onClick:()=>S(!w),title:"toggle menu",ref:D,"aria-label":"toggle menu",children:a.jsx(vk,{})}),r!==void 0&&a.jsx(Js,{disabled:s,type:"button",onClick:r,title:"remove item","aria-label":"remove item",children:a.jsx(lm,{})})]})}),a.jsx(ix,{container:$.current,children:a.jsx(sx,{collisionPadding:2,sideOffset:8,children:a.jsx("div",{onMouseEnter:()=>P(!1),children:w&&a.jsx(_ie,{options:i,dropdownRef:z,selectedIndex:y,setSelectedIndex:x,onCreateClick:c,isOpen:w,useKeys:I,setUseKeys:P,inputValue:m,classType:l,maxHeight:Math.max(ee,W),width:ue,onItemSelect:xe})})})})]})})};function _ie({dropdownRef:e,inputValue:t,isOpen:n,onCreateClick:r,options:o,selectedIndex:i,setSelectedIndex:s,setUseKeys:l,useKeys:c,classType:u,maxHeight:d,width:p,onItemSelect:h}){const m=f.useRef(null),v=wie(t,o),b=[...r&&!t.startsWith("http")?[{type:"createOption"}]:[],...v],y=q(u),[x]=rt(y);return De("enter",w=>{w.preventDefault();const S=b[i];if(sS(S)){r&&r();return}i>0?h(S.item.subject):h(t)},{enabled:n,enableOnTags:["INPUT"]},[i]),De("up",w=>{w.preventDefault(),l(!0);const S=i<=0?b.length-1:i-1;s(S)},{enabled:n,enableOnTags:["INPUT"]},[i]),De("down",w=>{w.preventDefault(),l(!0);const S=i===b.length-1?0:i+1;return s(S),!1},{enabled:n,enableOnTags:["INPUT"]},[i]),f.useEffect(()=>{var w;(w=m.current)==null||w.scrollIntoView({block:"nearest"})},[i]),!b||b.length===0?null:a.jsx(Pie,{ref:e,height:d,width:p,children:a.jsx(Aie,{height:d,children:b.map((w,S)=>sS(w)?a.jsxs(aS,{onClick:r,useKeys:c,selected:S===i,ref:S===i?m:null,children:["Create ",u?x:"new item",":"," ",a.jsx(Die,{children:t})]},t):a.jsx(aS,{onClick:()=>h(w.item.subject),selected:S===i,useKeys:c,ref:S===i?m:null,children:a.jsx(Cie,{subject:w.item.subject})},w.item.subject))})})}const Iie=C.div.withConfig({displayName:"DropdownInput__ResourceInputOverlayWrapper",componentId:"sc-ab239acc-0"})(["position:relative;display:flex;flex:1;"]),Rie=C.div.withConfig({displayName:"DropdownInput__DropDownStyled",componentId:"sc-ab239acc-1"})(["position:relative;flex:1;"]),Aie=C(Ia).withConfig({displayName:"DropdownInput__StyledScrollArea",componentId:"sc-ab239acc-2"})(["height:min(calc(","px - 2rem),30rem);width:var(--dropdown-width);overflow-x:hidden;"],e=>e.height),Pie=C.ul.withConfig({displayName:"DropdownInput__DropDownWrapper",componentId:"sc-ab239acc-3"})(["display:flex;flex-direction:column;background-color:",";border:solid 1px ",";border-radius:",";box-shadow:",";max-height:min(calc(","px - 2rem),30rem);contain:paint;--dropdown-width:","px;width:var(--dropdown-width);min-width:10rem;"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.boxShadowSoft,e=>e.height,e=>e.width),aS=C.li.withConfig({displayName:"DropdownInput__DropDownItem",componentId:"sc-ab239acc-4"})(["display:flex;width:var(--dropdown-width);overflow-x:hidden;flex-direction:row;border-bottom:solid 1px ",";cursor:pointer;margin:0;white-space:nowrap;padding:0.3rem;"," ",""],e=>e.theme.colors.bg2,e=>e.selected&&Kt(["background-color:",";color:",";& ","{color:",";}"],t=>t.theme.colors.main,t=>t.theme.colors.bg,zy,t=>t.theme.colors.bg),e=>!e.useKeys&&Kt(["&:hover,&:active,&:focus{background-color:",";color:",";& ","{color:",";}}"],t=>t.theme.colors.main,t=>t.theme.colors.bg,zy,t=>t.theme.colors.bg)),Tie=C.div.withConfig({displayName:"DropdownInput__DropDownMini",componentId:"sc-ab239acc-5"})(["display:inline-flex;margin-bottom:1rem;flex:1;max-width:20rem;"]),Die=C.span.withConfig({displayName:"DropdownInput__NewItemName",componentId:"sc-ab239acc-6"})(["font-style:italic;margin-left:1ch;"]),Nie=C(kq).withConfig({displayName:"DropdownInput__StyledInputOverlay",componentId:"sc-ab239acc-7"})(["span{width:100%;height:2rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"]),e1=[{id:"cards",icon:a.jsx(Q$,{})},{id:"table",icon:a.jsx(wk,{})}];function Oie({resource:e}){const[t]=ne(e,pe.description),r=bY()<700?0:1,[o,i]=Dr("CollectionDisplayStyle",r),[s]=we(e,pe.collection.members),[l]=ne(e,pe.collection.value),[c]=ne(e,pe.collection.property),[u]=Ro(e,pe.collection.currentPage),d=u||0,[p]=Ro(e,pe.collection.totalPages),h=p||1,[,m]=Xf("current_page"),[v,g]=Xf("sort_by"),b=q(l),[y]=we(b,pe.requires),[x]=we(b,pe.recommends),w=y.concat(x),[S]=ne(b,pe.description),[k]=ne(b,pe.shortname),[_,I]=f.useState(!1),P=l&&c===pe.isA,z=Ce();yI(()=>{z.fetchResourceFromServer(e.getSubject())});function D(){i(F())}function F(){let B=o+1;return B>=e1.length&&(B=0),B}function $(){if(d!==0){const B=d-1;m(B.toString())}}function Z(){if(d!==h-1){const B=d+1;m(B.toString())}}function ee(B){g(B)}const W=e1[o],ue=e1[F()];De("right",Z,{},[d]),De("left",$,{},[d]);const K=()=>a.jsxs(be,{children:[a.jsx(oe,{subtle:!0,onClick:$,title:"previous page (left arrow)",disabled:d===0,children:a.jsx(om,{})}),a.jsx(oe,{subtle:!0,onClick:Z,title:"next page (right arrow)",disabled:d===h-1,"data-test":"next-page",children:a.jsx(gk,{})})]});return a.jsxs(ql,{children:[a.jsx(si,{resource:e}),t&&a.jsx(At,{text:t}),a.jsxs(Fie,{children:[h>1&&a.jsx(K,{}),a.jsx(oe,{subtle:!0,onClick:D,title:`use ${ue.id} view (v)`,children:ue.icon}),P&&a.jsx(Qu,{subtle:!0,icon:!0,klass:l,parent:e.getSubjectNoParams()}),P&&a.jsx(oe,{subtle:!0,onClick:()=>I(!_),title:_?`Hide ${k} info`:`Show ${k} info`,children:a.jsx(sm,{})}),P&&a.jsx(Tie,{children:a.jsx(Eie,{placeholder:"sort by...",initial:v,options:w,onUpdate:ee})})]}),_&&l&&a.jsxs(a.Fragment,{children:[a.jsx(Me,{subject:l,children:a.jsx("h3",{children:k})}),a.jsx(At,{text:S||""})]}),s.length===0?l?a.jsx(Qu,{klass:l,parent:e.getSubject()}):a.jsx(a.Fragment,{children:"empty"}):a.jsxs(a.Fragment,{children:[W.id==="cards"&&a.jsx(Lie,{members:s,subject:e.getSubject()}),W.id==="table"&&a.jsx(fie,{resource:e,members:s,columns:w})]}),h>1&&a.jsx(K,{})]})}function Lie({members:e,subject:t}){return e.length===0?a.jsx("p",{children:"This collection is empty"}):a.jsx(Mie,{children:e.map((n,r)=>a.jsx(zie,{children:a.jsx(wc,{initialInView:r<10,subject:n},n)},t+" "+n+r))})}const zie=C.div.withConfig({displayName:"CollectionPage__GridItem",componentId:"sc-3f724af3-0"})(["margin:0;word-break:break-word;overflow:hidden;break-inside:avoid-column;margin-bottom:","rem;"],e=>e.theme.margin),Fie=C.div.withConfig({displayName:"CollectionPage__ButtonsBar",componentId:"sc-3f724af3-1"})(["display:flex;flex-wrap:wrap;gap:","rem;"],e=>e.theme.margin),Mie=C.div.withConfig({displayName:"CollectionPage__Masonry",componentId:"sc-3f724af3-2"})(["column-count:1;column-gap:","rem;overflow:visible;box-sizing:border-box;@supports (grid-template-rows:masonry){display:grid;grid-template-columns:repeat(1,1fr);grid-template-rows:masonry;grid-column-gap:","rem;}@media only screen and (min-width:600px){grid-template-columns:repeat(2,1fr);column-count:2;}@media only screen and (min-width:1000px){grid-template-columns:repeat(3,1fr);column-count:3;}@media only screen and (min-width:1400px){grid-template-columns:repeat(4,1fr);column-count:4;}"],e=>e.theme.margin,e=>e.theme.margin);function $ie({resource:e}){const[t]=rt(e),[n]=ne(e,pe.description),[r]=we(e,pe.endpoint.parameters),[o]=we(e,pe.endpoint.results),i=q(void 0,{newResource:!0}),s=Ce(),l=kt();async function c(u){u&&u.preventDefault();const d=new URL(e.getSubject());await Promise.all(r.map(async p=>{const h=i.get(p);if(h!==void 0){const m=await s.getProperty(p);d.searchParams.set(m.shortname,h.toString())}})),l(lt(d.href))}return a.jsxs(ht,{children:[a.jsxs("h1",{children:[t," endpoint"]}),n&&a.jsx(At,{text:n}),a.jsx("form",{onSubmit:c,children:r.map(u=>a.jsx(xi,{propertyURL:u,resource:i},u))}),a.jsx(oe,{onClick:c,children:"Go"}),o&&o.length===0?a.jsx("p",{children:"No hits"}):o.map(u=>a.jsx(wc,{subject:u},u))]})}function Bie({resource:e}){const[t]=we(e,X.properties.subResources),{drive:n,setDrive:r}=Le(),o=sr(Ne.properties.defaultOntology),[i]=jt(e);return n||r(e.subject),a.jsx(ht,{children:a.jsxs(ge,{children:[a.jsxs(be,{children:[a.jsx(si,{resource:e}),n!==e.subject&&a.jsx(oe,{onClick:()=>r(e.subject),children:"Set as current drive"})]}),a.jsx(zi,{resource:e,propertyURL:E.properties.description,datatype:Y.MARKDOWN}),a.jsxs("div",{children:[a.jsx(lS,{children:"Default Ontology"}),a.jsx(Pi,{commit:!0,resource:e,property:o,disabled:!i})]}),a.jsxs(Kn,{children:[a.jsx(lS,{children:"Resources:"}),a.jsxs(ed,{children:[t.map(s=>a.jsx(ba,{children:a.jsx(Lt,{subject:s})},s)),a.jsx(ba,{children:a.jsxs(Me,{path:Fe.new,children:[a.jsx(ur,{})," Create new resource"]})})]})]}),n.startsWith("http://localhost")&&a.jsx("p",{children:"You are running Atomic-Server on `localhost`, which means that it will not be available from any other machine than your current local device. If you want your Atomic-Server to be available from the web, you should set this up at a Domain on a server."})]})})}const lS=C.h2.withConfig({displayName:"DrivePage__Heading",componentId:"sc-57ddf1eb-0"})(["font-size:1.3rem;"]);function Hie({resource:e}){const[t,n]=f.useState(),[r]=ne(e,pe.redirect.destination),[o]=ne(e,pe.redirect.redirectAgent),i=kt(),{agent:s,setAgent:l}=Le(),c=Ce(),u=A8();return f.useEffect(()=>{o&&s&&!s.subject&&(s.subject=o,at.success(a.jsxs("div",{children:[a.jsx("p",{children:"New User created!"}),a.jsx(oe,{onClick:()=>i(Fe.agentSettings),children:"User Settings"})]}),{duration:6e3}),l(s)),r&&u!=="POP"&&c.fetchResourceFromServer(r).then(()=>{i(lt(r))}).catch(d=>{n(d)})},[o,s,r]),a.jsxs(ht,{children:[a.jsx(zi,{resource:e,propertyURL:pe.description}),a.jsx("h1",{children:"Redirect"}),a.jsx("p",{children:"This page should redirect you automatically (unless you have just pressed the back button)"}),t&&a.jsx(Hu,{error:t}),a.jsx(Pa,{resource:e,except:[pe.isA]})]})}function Uie({resource:e}){const[t]=Ro(e,pe.invite.usagesLeft),[n]=y7(e,pe.invite.write),r=kt();A8();const{agent:o,setAgent:i}=Le(),s=q(o==null?void 0:o.subject),[l]=rt(s,15),c=o==null?void 0:o.subject;async function u(){const p=await KO(),h=new $f(p.privateKey);i(h);const m=await h.getPublicKey();d(m)}function d(p){const h=new URL(e.getSubject());p?h.searchParams.set("public-key",p):h.searchParams.set("agent",c),r(lt(h.href))}return a.jsxs(ht,{children:[a.jsxs("h1",{children:["Invite to ",n?"edit":"view"]}),a.jsx(zi,{resource:e,propertyURL:pe.description}),t===0?a.jsx("em",{children:"Sorry, this Invite has no usages left. Ask for a new one."}):a.jsxs(be,{children:[c?a.jsx(a.Fragment,{children:a.jsxs(oe,{"data-test":"accept-existing",onClick:()=>d(void 0),children:["Accept as ",l]})}):a.jsxs(a.Fragment,{children:[a.jsx(oe,{"data-test":"accept-new",onClick:u,children:"Accept as new user"}),a.jsx(oe,{"data-test":"accept-sign-in",onClick:()=>r(Fe.agentSettings),subtle:!0,children:"Sign in"})]}),t!==void 0&&a.jsxs("p",{children:["(",t," usages left)"]})]})]})}function cR(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Wie(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function Cp(e){return e!==null&&e>=0}function Vie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function qie(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const uR=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=cR(t,r,n),s=t[o],l=i[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},jp={scaleX:1,scaleY:1},Gie=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const l=(t=i[n])!=null?t:r;if(!l)return null;if(o===n){const u=i[s];return u?{x:0,y:n<s?u.top+u.height-(l.top+l.height):u.top-l.top,...jp}:null}const c=Kie(i,o,n);return o>n&&o<=s?{x:0,y:-l.height-c,...jp}:o<n&&o>=s?{x:0,y:l.height+c,...jp}:{x:0,y:0,...jp}};function Kie(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const dR="Sortable",pR=ce.createContext({activeIndex:-1,containerId:dR,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:uR,disabled:{draggable:!1,droppable:!1}});function Yie(e){let{children:t,id:n,items:r,strategy:o=uR,disabled:i=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:d}=Xk(),p=gd(dR,n),h=l.rect!==null,m=f.useMemo(()=>r.map(_=>typeof _=="object"&&"id"in _?_.id:_),[r]),v=s!=null,g=s?m.indexOf(s.id):-1,b=u?m.indexOf(u.id):-1,y=f.useRef(m),x=!Vie(m,y.current),w=b!==-1&&g===-1||x,S=qie(i);ao(()=>{x&&v&&d(m)},[x,m,v,d]),f.useEffect(()=>{y.current=m},[m]);const k=f.useMemo(()=>({activeIndex:g,containerId:p,disabled:S,disableTransforms:w,items:m,overIndex:b,useDragOverlay:h,sortedRects:Wie(m,c),strategy:o}),[g,p,S.draggable,S.droppable,w,m,b,c,h,o]);return ce.createElement(pR.Provider,{value:k},t)}const Xie=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return cR(n,r,o).indexOf(t)},Qie=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==i&&o===s?!1:n?!0:s!==o&&t===c},Jie={duration:200,easing:"ease"},fR="transform",Zie=Ss.Transition.toString({property:fR,duration:0,easing:"linear"}),ese={roleDescription:"sortable"};function tse(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=f.useState(null),l=f.useRef(n);return ao(()=>{if(!t&&n!==l.current&&r.current){const c=o.current;if(c){const u=ac(r.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&s(d)}}n!==l.current&&(l.current=n)},[t,n,r,o]),f.useEffect(()=>{i&&s(null)},[i]),i}function nse(e){let{animateLayoutChanges:t=Qie,attributes:n,disabled:r,data:o,getNewIndex:i=Xie,id:s,strategy:l,resizeObserverConfig:c,transition:u=Jie}=e;const{items:d,containerId:p,activeIndex:h,disabled:m,disableTransforms:v,sortedRects:g,overIndex:b,useDragOverlay:y,strategy:x}=f.useContext(pR),w=rse(r,m),S=d.indexOf(s),k=f.useMemo(()=>({sortable:{containerId:p,index:S,items:d},...o}),[p,o,S,d]),_=f.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:I,node:P,isOver:z,setNodeRef:D}=ym({id:s,data:k,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...c}}),{active:F,activatorEvent:$,activeNodeRect:Z,attributes:ee,setNodeRef:W,listeners:ue,isDragging:K,over:B,setActivatorNodeRef:H,transform:N}=vm({id:s,data:k,attributes:{...ese,...n},disabled:w.draggable}),xe=fB(D,W),fe=!!F,O=fe&&!v&&Cp(h)&&Cp(b),Te=!y&&K,Oe=Te&&O?N:null,He=O?Oe??(l??x)({rects:g,activeNodeRect:Z,activeIndex:h,overIndex:b,index:S}):null,Ke=Cp(h)&&Cp(b)?i({id:s,items:d,activeIndex:h,overIndex:b}):S,it=F==null?void 0:F.id,Pe=f.useRef({activeId:it,items:d,newIndex:Ke,containerId:p}),bt=d!==Pe.current.items,Ye=t({active:F,containerId:p,isDragging:K,isSorting:fe,id:s,index:S,items:d,newIndex:Pe.current.newIndex,previousItems:Pe.current.items,previousContainerId:Pe.current.containerId,transition:u,wasDragging:Pe.current.activeId!=null}),Qt=tse({disabled:!Ye,index:S,node:P,rect:I});return f.useEffect(()=>{fe&&Pe.current.newIndex!==Ke&&(Pe.current.newIndex=Ke),p!==Pe.current.containerId&&(Pe.current.containerId=p),d!==Pe.current.items&&(Pe.current.items=d)},[fe,Ke,p,d]),f.useEffect(()=>{if(it===Pe.current.activeId)return;if(it&&!Pe.current.activeId){Pe.current.activeId=it;return}const Ft=setTimeout(()=>{Pe.current.activeId=it},50);return()=>clearTimeout(Ft)},[it]),{active:F,activeIndex:h,attributes:ee,data:k,rect:I,index:S,newIndex:Ke,items:d,isOver:z,isSorting:fe,isDragging:K,listeners:ue,node:P,overIndex:b,over:B,setNodeRef:xe,setActivatorNodeRef:H,setDroppableNodeRef:D,setDraggableNodeRef:W,transform:Qt??He,transition:zt()};function zt(){if(Qt||bt&&Pe.current.newIndex===S)return Zie;if(!(Te&&!pm($)||!u)&&(fe||Ye))return Ss.Transition.toString({...u,property:fR})}}function rse(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function wh(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ose=[Xe.Down,Xe.Right,Xe.Up,Xe.Left],ise=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:l}}=t;if(ose.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];i.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const h=o.get(p.id);if(h)switch(e.code){case Xe.Down:r.top<h.top&&c.push(p);break;case Xe.Up:r.top>h.top&&c.push(p);break;case Xe.Left:r.left>h.left&&c.push(p);break;case Xe.Right:r.left<h.left&&c.push(p);break}});const u=Nk({active:n,collisionRect:r,droppableRects:o,droppableContainers:c,pointerCoordinates:null});let d=Dk(u,"id");if(d===(s==null?void 0:s.id)&&u.length>1&&(d=u[1].id),d!=null){const p=i.get(n.id),h=i.get(d),m=h?o.get(h.id):null,v=h==null?void 0:h.node.current;if(v&&m&&p&&h){const b=fm(v).some((_,I)=>l[I]!==_),y=hR(p,h),x=sse(p,h),w=b||!y?{x:0,y:0}:{x:x?r.width-m.width:0,y:x?r.height-m.height:0},S={x:m.left,y:m.top};return w.x&&w.y?S:Wu(S,w)}}}};function hR(e,t){return!wh(e)||!wh(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function sse(e,t){return!wh(e)||!wh(t)||!hR(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const cS="/",uS="?",ase="[",lse="#";function cse({subject:e,deleteElement:t,index:n,setCurrent:r,setElementSubject:o,active:i,canDrag:s}){const l=q(e,{newResource:!0}),[c,u]=f.useState(void 0),[d,p]=ne(l,pe.description,{commit:!0,handleValidationError:u,validate:!1}),[h]=we(l,pe.isA),m=f.useRef(null),[v,g]=jt(l),b=h.length>0&&!h.includes(Dl.elements.paragraph);function y(S){x(),u(void 0),p(S.target.value)}function x(){var S;(S=m.current)!=null&&S.style&&(m.current.style.height="0",m.current.style.height=m.current.scrollHeight+"px")}f.useEffect(()=>{x()},[m,d,i]),f.useEffect(()=>{var S,k;(S=m==null?void 0:m.current)==null||S.focus(),d&&((k=m==null?void 0:m.current)==null||k.setSelectionRange(d==null?void 0:d.length,d==null?void 0:d.length))},[i]),De("backspace",S=>{(i&&(d===""||d===void 0)||i&&b)&&(S.preventDefault(),t(n))},{enableOnTags:["TEXTAREA"],enabled:i},[n,d,i]),De(ct.deleteLine,S=>{i&&(S.preventDefault(),t(n))},{enableOnTags:["TEXTAREA"],enabled:i},[n,i]);function w(){return c!=null&&c.message?a.jsx(yt,{children:c.message}):i&&!v&&g?a.jsx(yt,{children:g}):null}return b?a.jsxs(lf,{canDrag:s,tabIndex:0,className:"element",active:i,onFocus:()=>r(n),onBlur:()=>r(-1),children:[a.jsx(wc,{subject:e}),a.jsx(w,{})]}):i?a.jsxs(lf,{canDrag:s,active:i,onClick:()=>n&&r(n),children:[a.jsx(dse,{canDrag:s,"data-test":"element-input",className:"element",active:i,ref:m,onChange:y,onFocus:()=>r(n),onBlur:()=>r(-1),placeholder:`type something (try ${uS} or ${cS})`,autoFocus:i,value:d||""}),(d==null?void 0:d.startsWith(cS))&&a.jsx(pse,{query:d.substring(1),setElement:S=>n&&o(n,S)}),(d==null?void 0:d.startsWith(uS))&&a.jsx(fse,{query:d.substring(1),setElement:S=>n&&o(n,S)}),(d==null?void 0:d.startsWith(ase))&&a.jsx(jl,{children:a.jsx("p",{children:"[link text](https://example.com)"})}),(d==null?void 0:d.startsWith(lse))&&a.jsxs(jl,{children:[a.jsx("p",{children:"# Big Header"}),a.jsx("p",{children:"## Header"}),a.jsx("p",{children:"### Smaller Header"})]}),a.jsx(w,{})]}):a.jsxs(lf,{canDrag:s,tabIndex:0,active:i,onFocus:()=>r(n),onBlur:()=>r(-1),children:[a.jsx(At,{text:d||""}),a.jsx(w,{})]})}function use({subject:e}){const t=q(e),[n]=ne(t,pe.description);return a.jsx(lf,{children:a.jsx(At,{text:n||""})})}const Fy=Kt(["border-radius:5px;outline:none;"]),mR=Kt(["line-height:1.4rem;font-family:",";font-size:","rem;"],e=>e.theme.fontFamily,e=>e.theme.fontSizeBody),lf=C.div.withConfig({displayName:"Element__ElementWrapper",componentId:"sc-dede1efe-0"})(["position:relative;display:block;width:100%;border:none;resize:none;padding:0.5rem;padding-left:0rem;cursor:text;white-space:pre-line;display:flex;flex-direction:column;min-height:2.7rem;"," "," &:focus{","}"],e=>e.active&&e.canDrag&&Fy,mR,Fy),dse=C.textarea.withConfig({displayName:"Element__ElementView",componentId:"sc-dede1efe-1"})([""," border:none;width:100%;resize:none;background-color:",";color:",";padding:0;margin-bottom:0.5rem;&:focus{outline:none;","}"],mR,e=>e.theme.colors.bg,e=>e.theme.colors.text,Fy);function pse({query:e,setElement:t}){const{results:n}=Ca(e),[r,o]=f.useState(0);return De("tab,enter",i=>{i.preventDefault(),n[r]&&t(n[r])},{enableOnTags:["TEXTAREA"]},[]),De("left",i=>{i.preventDefault();let s=r-1;s<0&&(s=n.length-1),o(r-1)},{enableOnTags:["TEXTAREA"]},[r]),De("right",i=>{i.preventDefault();let s=r+1;s>n.length-1&&(s=0),o(r+1)},{enableOnTags:["TEXTAREA"]},[r]),e===""?a.jsx(jl,{children:a.jsx("p",{children:"Search something..."})}):n.length===0?a.jsx(jl,{children:a.jsx("p",{children:"No results"})}):a.jsxs(jl,{children:[a.jsx("p",{children:" (press tab to select, left / right to browse)"}),a.jsx("p",{children:a.jsx(Lt,{subject:n[r]})})]})}const jl=C.div.withConfig({displayName:"Element__WidgetWrapper",componentId:"sc-dede1efe-2"})(["position:absolute;top:100%;right:0;left:-1rem;border-radius:",";border:solid 1px ",";padding:","rem;padding-bottom:0;background-color:",";backdrop-filter:blur(6px);opacity:0.9;z-index:1;"],e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.margin,e=>e.theme.colors.bg1);function fse({query:e}){return a.jsxs(jl,{children:[e&&a.jsx(At,{text:e}),a.jsx("p",{children:"Try typing these:"}),a.jsxs("p",{children:["links: ",a.jsx("code",{children:"[clickable link](https://example.com)"})]}),a.jsxs("p",{children:["styling:",a.jsx("code",{children:"**bold** and _cursive_"})]}),a.jsxs("p",{children:["headings:",a.jsx("code",{children:"## Header"})]})]})}function gR({parentResource:e,children:t,onFilesUploaded:n}){const{upload:r,isUploading:o,error:i}=Xm(e),s=f.useRef(null),l=f.useCallback(async d=>{const p=await r(d);n==null||n(p)},[r]),{getRootProps:c,isDragActive:u}=Jm({onDrop:l});return f.useEffect(()=>{if(u&&s.current){const d=s.current.getBoundingClientRect();d.top<0&&(s.current.style.top=`calc(${Math.abs(d.top)}px + 1rem)`)}},[u]),a.jsxs(hse,{...c(),tabIndex:-1,children:[o&&a.jsx("p",{children:"Uploading..."}),i&&a.jsx(vn,{children:i.message}),t,u&&a.jsx(gse,{ref:s,children:a.jsxs(vse,{children:[a.jsx(Sk,{})," Drop files here to upload."]})})]})}const hse=C.div.withConfig({displayName:"FileDropzone__Root",componentId:"sc-1fa61e1-0"})(["height:100%;position:relative;"]),mse=ni(["from{opacity:0;backdrop-filter:blur(0px);}to{opacity:1;backdrop-filter:blur(10px);}"]),gse=C.div.withConfig({displayName:"FileDropzone__VisualDropzone",componentId:"sc-1fa61e1-1"})(["position:absolute;inset:0;height:90vh;background-color:",";backdrop-filter:blur(10px);border:3px dashed ",";border-radius:",";display:grid;place-items:center;font-size:1.8rem;color:",";animation:0.1s "," ease-in;"],e=>e.theme.darkMode?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.8)",e=>e.theme.colors.textLight,e=>e.theme.radius,e=>e.theme.colors.textLight,mse),vse=C.div.withConfig({displayName:"FileDropzone__TextWrapper",componentId:"sc-1fa61e1-2"})(["display:flex;align-items:center;gap:1rem;padding:","rem;"],e=>e.theme.margin);function yse({resource:e}){const[t]=jt(e),[n,r]=f.useState(t);return f.useEffect(()=>{r(t)},[t]),a.jsx(Ese,{children:a.jsx(Sse,{children:n?a.jsx(bse,{resource:e,setEditMode:r}):a.jsx(xse,{resource:e,setEditMode:r})})})}function bse({resource:e,setEditMode:t}){const[n,r]=we(e,X.properties.elements,{commit:!1,validate:!1,commitDebounce:0}),o=f.useRef(null),i=Ce(),s=f.useRef(null),[l,c]=f.useState(void 0),[u,d]=f.useState(0),p=Pb(vs(Nb),vs(vd,{coordinateGetter:ise}));f.useEffect(()=>{d(n.length-1)},[]),f.useEffect(()=>{n.length===0&&h(0)},[JSON.stringify(n)]),De("enter",S=>{S.preventDefault(),h(u+1)},{enableOnTags:["TEXTAREA"]},[u]),De("enter",S=>{S.preventDefault(),h(0)},{enableOnTags:["INPUT"]},[u]),De("up",S=>{var k;S.preventDefault(),!u||u===0?(k=o.current)==null||k.focus():m(u-1)},{enableOnTags:["TEXTAREA"]},[u]),De("down",S=>{S.preventDefault(),document.activeElement===o.current?m(0):m(u+1)},{enableOnTags:["TEXTAREA","INPUT"]},[u]),De(ct.moveLineUp,S=>{S.preventDefault(),b(u,u-1)},{enableOnTags:["TEXTAREA"]},[u]),De(ct.moveLineDown,S=>{S.preventDefault(),b(u,u+1)},{enableOnTags:["TEXTAREA"]},[u]),De("esc",S=>{S.preventDefault(),d(-1)},{enableOnTags:["TEXTAREA"]});async function h(S){const k=i.createSubject(e.subject),_=[...n];_.splice(S,0,k);try{const I=await i.newResource({subject:k,isA:X.classes.paragraph,parent:e.subject,propVals:{[E.properties.description]:""}});await r(_),m(S),await I.save(),await e.save()}catch(I){c(I)}}function m(S){var _,I,P,z;S>n.length-1?S=n.length-1:S<0&&(S=0),d(S);let k=(I=(_=s==null?void 0:s.current)==null?void 0:_.children[S])==null?void 0:I.getElementsByClassName("element")[0];k||(k=(P=s==null?void 0:s.current)==null?void 0:P.children[S]),k?k.focus():(z=s.current)==null||z.focus()}async function v(S){if(n.length===1){r([]),m(0),e.save();return}n.splice(S,1),r([...n]),m(S-1),e.save()}async function g(S,k){n[S]=k,r(n),S===n.length-1?h(S+1):(m(S+1),e.save())}function b(S,k){const _=n[S];n.splice(S,1),n.splice(k,0,_),r([...n]),m(k),e.save()}function y(S){const{active:k,over:_}=S;if(k.id!==(_==null?void 0:_.id)){const I=n.indexOf(k.id.toString());if(!(_!=null&&_.id))return;const P=n.indexOf(_.id.toString());b(I,P)}}function x(S){at.success("Upload succeeded!"),S.map(k=>n.push(k)),r([...n]),e.save()}async function w(){var _,I;const S=n[n.length-1];((I=(_=(await i.getResource(S)).get(E.properties.description))==null?void 0:_.toString())==null?void 0:I.length)===0?m(n.length-1):h(n.length)}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[a.jsx(si,{parentRef:o,resource:e}),a.jsx(oe,{icon:!0,subtle:!0,onClick:()=>t(!1),title:"Read mode",children:a.jsx(Bu,{})})]}),(l==null?void 0:l.message)&&a.jsx(yt,{children:l.message}),a.jsx(gR,{onFilesUploaded:x,parentResource:e,children:a.jsxs("div",{ref:s,children:[a.jsx(gm,{sensors:p,collisionDetection:IB,onDragEnd:y,children:a.jsx(Yie,{items:[...n],strategy:Gie,children:n.map((S,k)=>a.jsx(wse,{canDrag:!0,index:k,subject:S,deleteElement:v,setCurrent:d,current:u,setElementSubject:g,active:k===u},k+S))})}),a.jsx(Cse,{onClick:w})]})})]})}function xse({resource:e,setEditMode:t}){const[n]=we(e,X.properties.elements),[r]=jt(e);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[a.jsx("h1",{style:{flex:1},children:e.title}),r&&a.jsx(oe,{"data-test":"document-edit",icon:!0,subtle:!0,onClick:()=>t(!0),title:"Edit mode",children:a.jsx(oc,{})})]}),n.map(o=>a.jsx(use,{subject:o},o))]})}function wse(e){const{subject:t,active:n}=e,{attributes:r,listeners:o,setNodeRef:i,transform:s,transition:l}=nse({id:t}),c={transform:Ss.Transform.toString(s),transition:l};return a.jsxs(jse,{ref:i,style:c,children:[a.jsx(kse,{active:n,...r,...o}),a.jsx(cse,{...e})]})}const Sse=C.div.withConfig({displayName:"DocumentPage__DocumentContainer",componentId:"sc-722e6923-0"})(["width:min(100%,","rem);margin:auto;display:flex;flex:1;flex-direction:column;padding:2rem;@media (max-width:","rem){padding:","rem;}"],e=>e.theme.containerWidth,e=>e.theme.containerWidth,e=>e.theme.margin),Cse=C.div.withConfig({displayName:"DocumentPage__NewLine",componentId:"sc-722e6923-1"})(["height:20rem;flex:1;cursor:text;"]),jse=C.div.withConfig({displayName:"DocumentPage__SortableItemWrapper",componentId:"sc-722e6923-2"})(["display:flex;flex-direction:row;position:relative;"]),kse=e=>a.jsx(_se,{...e,title:"Grab to re-order",children:a.jsx(F$,{})}),Ese=C.div.withConfig({displayName:"DocumentPage__FullPageWrapper",componentId:"sc-722e6923-3"})(["background-color:",";display:flex;flex:1;flex-direction:column;min-height:",";box-sizing:border-box;"],e=>e.theme.colors.bg,e=>e.theme.heights.fullPage),_se=C.div.withConfig({displayName:"DocumentPage__SortHandleStyled",componentId:"sc-722e6923-4"})(["width:1rem;flex:1;display:flex;align-items:center;opacity:",";position:absolute;left:-1rem;bottom:0;height:100%;cursor:grab;border:solid 1px transparent;border-radius:",";&:drop(active),&:focus,&:active{opacity:0.5;}&:hover{opacity:0.5;}"],e=>e.active?.3:0,e=>e.theme.radius);function Ta({resource:e,prefix:t,link:n}){const[r]=rt(e);return a.jsxs(Ise,{children:[t&&`${t} `,n?a.jsx(Me,{subject:e.getSubject(),children:r}):r]})}const Ise=C.h1.withConfig({displayName:"Title__H1",componentId:"sc-10f839c4-0"})(["margin-bottom:0;"]);function Rse({resource:e}){return a.jsx(ht,{about:e.subject,children:a.jsxs(ge,{children:[a.jsx(Ta,{resource:e}),a.jsx(Qx,{resource:e}),a.jsx(zi,{resource:e,propertyURL:E.properties.description}),a.jsx(Pa,{resource:e,except:Jx,editable:!0,columns:!0}),a.jsx(be,{children:a.jsx(Qu,{icon:!0,klass:e.subject})})]})})}function Ase({resource:e}){const{downloadFile:t,bytes:n}=Ym(e),r=Ra("(min-width: 600px)");return a.jsx(Is,{children:a.jsxs(ge,{gap:"2rem",children:[a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsx(Pse,{resource:e}),r&&a.jsx(Are,{downloadFile:t,fileSize:n}),!r&&a.jsx(GI,{downloadFile:t,fileSize:n})]}),a.jsx(zi,{resource:e,propertyURL:pe.description}),a.jsx(KI,{resource:e})]})})}const Pse=C(si).withConfig({displayName:"FilePage__StyledEditableTitle",componentId:"sc-34cb5413-0"})(["margin:0;"]);function Tse({resource:e}){const[t]=we(e,X.properties.messages),[n,r]=f.useState(""),o=Ce(),[i,s]=f.useState(void 0),l=f.useRef(null),c=f.useRef(null),[u,d]=f.useState(1);De("enter",y=>{y.preventDefault(),m()},{enableOnTags:["TEXTAREA"]},[]),De("escape",y=>{var x;(x=c==null?void 0:c.current)==null||x.blur()},{enableOnTags:["TEXTAREA"]},[]),f.useEffect(p,[t.length,e]);function p(){l.current&&(l.current.scrollTop=l.current.scrollHeight)}const h=n.length===0;async function m(y){const x=n;try{if(p(),r(""),y&&y.preventDefault(),!h){const w=o.createSubject(e.subject);await(await o.newResource({subject:w,parent:e.subject,isA:X.classes.message,propVals:{[E.properties.description]:n,[qn.properties.createdAt]:Vh(),...i&&{[X.properties.replyTo]:i}}})).save(),s(void 0)}}catch(w){r(x),at.error(w.message)}}const v=f.useCallback(g,[c]);function g(y){var x;s(y),(x=c==null?void 0:c.current)==null||x.focus()}function b(y){if(r(y.target.value),y.target.value===""){d(1);return}const x=y.target.style.overflow;y.target.style.overflow="scroll";const w=y.target.scrollHeight;y.target.style.overflow=x;const k=Math.ceil(w/30)-1;k!==u&&d(k)}return a.jsxs(Mse,{children:[a.jsx(si,{resource:e}),a.jsx($se,{ref:l,children:a.jsx(xR,{subject:e.getSubject(),setReplyTo:v})}),i&&a.jsxs(Gl,{children:[a.jsx(vR,{subject:i}),a.jsx(oe,{icon:!0,subtle:!0,onClick:()=>s(void 0),children:a.jsx(ri,{})})]}),a.jsxs(Fse,{onSubmit:m,children:[a.jsx(zse,{rows:u,ref:c,autoFocus:!0,value:n,onChange:b,placeholder:"type a message","data-test":"message-input"}),a.jsx(Lse,{title:"Send message [enter]",disabled:h,clean:!0,onClick:m,children:"Send"})]}),a.jsx(fh,{baseMargin:"2rem",position:"bottom"})]})}const Dse=500,Nse=f.memo(function({subject:t,setReplyTo:n}){const r=q(t),[o]=ne(r,E.properties.description),[i]=Io(r,qn.properties.lastCommit),[s]=Io(r,X.properties.replyTo),l=kt(),[c]=jt(r);function u(){navigator.clipboard.writeText(t),at.success("Copied message URL to clipboard")}function d(){navigator.clipboard.writeText(o||""),at.success("Copied message text to clipboard")}return a.jsxs(Ose,{about:t,children:[a.jsxs(yR,{children:[a.jsx(xc,{commitSubject:i}),s&&a.jsx(vR,{subject:s}),a.jsxs(bR,{children:[c&&a.jsx(oe,{icon:!0,subtle:!0,onClick:()=>l(fd(t)),title:"Edit message",children:a.jsx(U$,{})}),a.jsx(oe,{icon:!0,subtle:!0,onClick:()=>n(t),title:"Reply to this message",children:a.jsx(V$,{})}),a.jsx(oe,{icon:!0,subtle:!0,onClick:u,title:"Copy link to this message",children:a.jsx(B$,{})}),a.jsx(oe,{icon:!0,subtle:!0,onClick:d,title:"Copy message text",children:a.jsx(jb,{})})]})]}),a.jsx(At,{text:o||"",maxLength:Dse})]})}),dS=50;function vR({subject:e}){const t=q(e),[n]=ne(t,E.properties.description),[r]=Io(t,qn.properties.lastCommit),o=q(r),[i]=Io(o,qn.properties.signer);if(!t.isReady()||!o.isReady())return a.jsx(pS,{children:"loading..."});const s=n==null?void 0:n.substring(0,dS),l=n&&n.length>dS?"...":"";return a.jsxs(pS,{children:[a.jsx("span",{children:"to "}),a.jsx(Lt,{subject:i}),a.jsx(Me,{subject:e,children:`: ${s}${l}`})]})}const pS=C.span.withConfig({displayName:"ChatRoomPage__MessageLineStyled",componentId:"sc-90d7f901-0"})(["font-size:0.7rem;white-space:nowrap;overflow:hidden;flex:1;"]),yR=C.div.withConfig({displayName:"ChatRoomPage__MessageDetails",componentId:"sc-90d7f901-1"})(["font-size:0.7rem;margin-bottom:0;opacity:0.4;display:flex;flex:1;"]),bR=C.div.withConfig({displayName:"ChatRoomPage__MessageActions",componentId:"sc-90d7f901-2"})(["display:flex;align-self:flex-end;justify-content:flex-end;flex:1;opacity:0;margin-right:1rem;"]),Ose=C.div.withConfig({displayName:"ChatRoomPage__MessageComponent",componentId:"sc-90d7f901-3"})(["min-height:1.5rem;padding-bottom:0.5rem;padding-left:1rem;&:hover{background:",";& ","{opacity:1;}& ","{opacity:1;}}"],e=>e.theme.colors.bg,yR,bR),Lse=C(oe).withConfig({displayName:"ChatRoomPage__SendButton",componentId:"sc-90d7f901-4"})(["padding-left:1rem;padding-right:1rem;color:",";background:",";&:disabled{cursor:default;display:auto;opacity:0.5;}"],e=>e.theme.colors.bg,e=>e.theme.colors.main),zse=C.textarea.withConfig({displayName:"ChatRoomPage__MessageInput",componentId:"sc-90d7f901-5"})(["color:",";background:none;flex:1;padding:0.5rem 1rem;border:"," solid 1px;border-right:none;line-height:inherit;min-height:2rem;max-height:50vh;font-family:",";"],e=>e.theme.colors.text,e=>e.theme.colors.bg2,e=>e.theme.fontFamily),Fse=C.form.withConfig({displayName:"ChatRoomPage__MessageForm",componentId:"sc-90d7f901-6"})(["display:flex;flex-basis:3rem;flex-direction:row;border-radius:",";background:",";view-transition-name:chat-input;> :first-child{border-top-left-radius:",";border-bottom-left-radius:",";}> :last-child{border-top-right-radius:",";border-bottom-right-radius:",";}"],e=>e.theme.radius,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius),Mse=C.div.withConfig({displayName:"ChatRoomPage__FullPageWrapper",componentId:"sc-90d7f901-7"})(["display:flex;flex-direction:column;height:calc(100vh - 4rem);padding:1rem;flex:1;"]),$se=C.div.withConfig({displayName:"ChatRoomPage__ScrollingContent",componentId:"sc-90d7f901-8"})(["margin-left:-1rem;margin-right:-1rem;overflow-y:scroll;flex:1;"]);function xR({subject:e,setReplyTo:t}){const n=q(e),[r]=we(n,X.properties.messages),[o]=ne(n,X.properties.nextPage);return n.isReady()?a.jsxs("div",{children:[o&&a.jsx(xR,{subject:o,setReplyTo:t}),r.map(i=>a.jsx(Nse,{subject:i,setReplyTo:t},"message"+i))]}):a.jsx(a.Fragment,{children:"loading..."})}function Bse({resource:e}){const[t]=ne(e,pe.description),[n]=ne(e,pe.parent),[r]=ne(e,pe.commit.lastCommit);return a.jsxs(ht,{children:[a.jsxs("h3",{children:["Message in ",a.jsx(Lt,{subject:n})]}),a.jsx(Xx,{children:a.jsx(xc,{commitSubject:r})}),a.jsx(At,{text:t||""})]})}function Hse({preview:e,error:t,loading:n}){return n?a.jsx(My,{children:"loading..."}):t?a.jsx(Use,{error:t}):!e||e===""?a.jsx(My,{children:"no preview..."}):a.jsx(Wse,{children:a.jsx(At,{renderGFM:!0,text:e})})}const Use=({error:e})=>a.jsx(My,{children:a.jsxs("div",{children:[a.jsx("p",{children:"Could not load preview 😞"}),a.jsx(yt,{style:{fontSize:"1rem"},children:e.message})]})}),My=C.div.withConfig({displayName:"BookmarkPreview__CenterGrid",componentId:"sc-7558a2ea-0"})(["display:grid;height:min(80vh,1000px);width:100%;place-items:center;font-size:calc(clamp(1rem,5vw,2.4rem) + 0.1rem);"]),Wse=C(ht).withConfig({displayName:"BookmarkPreview__StyledContainerNarrow",componentId:"sc-7558a2ea-1"})(["max-width:85ch;"]),fS={classes:{class:"https://atomicdata.dev/classes/Class",property:"https://atomicdata.dev/classes/Property",agent:"https://atomicdata.dev/classes/Agent",datatype:"https://atomicdata.dev/classes/Datatype",ontology:"https://atomicdata.dev/class/ontology"},properties:{allowsOnly:"https://atomicdata.dev/properties/allowsOnly",classtype:"https://atomicdata.dev/properties/classtype",datatype:"https://atomicdata.dev/properties/datatype",description:"https://atomicdata.dev/properties/description",incomplete:"https://atomicdata.dev/properties/incomplete",isA:"https://atomicdata.dev/properties/isA",isDynamic:"https://atomicdata.dev/properties/isDynamic",name:"https://atomicdata.dev/properties/name",parent:"https://atomicdata.dev/properties/parent",read:"https://atomicdata.dev/properties/read",recommends:"https://atomicdata.dev/properties/recommends",requires:"https://atomicdata.dev/properties/requires",shortname:"https://atomicdata.dev/properties/shortname",write:"https://atomicdata.dev/properties/write",publicKey:"https://atomicdata.dev/properties/publicKey",instances:"https://atomicdata.dev/properties/instances",properties:"https://atomicdata.dev/properties/properties",classes:"https://atomicdata.dev/properties/classes",isLocked:"https://atomicdata.dev/properties/isLocked",localId:"https://atomicdata.dev/properties/localId"}};var $y;(function(e){e.Unauthorized="Unauthorized",e.NotFound="NotFound",e.Server="Server",e.Client="Client"})($y||($y={}));class Sh extends Error{constructor(t,n="Client"){super(t),Object.setPrototypeOf(this,Sh.prototype),this.type=n,this.message=t;try{const o=JSON.parse(t)[fS.properties.description];o&&(this.message=o)}catch{}this.message||(this.message=this.createMessage())}static fromResource(t){return new Sh(t.get(fS.properties.description).toString())}createMessage(){switch(this.type){case"Unauthorized":return"You don't have the rights to do this.";case"NotFound":return"404 Not found.";case"Server":return"500 Unknown server error.";default:return"Unknown error."}}}const hS=new Map;function Vse(e,t=500){return(...r)=>{const o=hS.get(e);o&&window.clearTimeout(o),hS.set(e,window.setTimeout(()=>e(...r),t))}}async function qse(e,t="",n){const r=new URL(Fe.fetchBookmark,n),o=new URLSearchParams({name:t,url:e});r.search=o.toString();const i=await fetch(r.toString(),{headers:{Accept:"application/json"}});if(i.status!==200)throw new Sh(await i.text(),$y.Server);return await i.json()}const Gse=Vse((e,t,n,r,o,i,s,l,c,u)=>{f.startTransition(()=>{qse(e,t,n).then(async d=>{await Promise.all([o(d.preview),i(d.name),c(d["image-url"]),u(d.description)]),s(void 0),l(!1),r.save()}).catch(d=>{console.error(d),s(d),l(!1)})})});function Kse(e){const t=Ce(),[n,r]=ne(e,J.properties.bookmark.preview),[o]=ne(e,J.properties.bookmark.url),[i,s]=ne(e,J.properties.name),[l,c]=ne(e,J.properties.bookmark.imageUrl),[u,d]=ne(e,J.properties.description),[p,h]=f.useState(void 0),[m,v]=f.useState(!1),g=f.useCallback(b=>{try{new URL(b)}catch(y){h(y);return}v(!0),Gse(b,i,t.getServerUrl(),e,r,s,h,v,c,d)},[i,e,t]);return f.useEffect(()=>{e.isReady()&&n===void 0&&o&&g(o)},[n,e.isReady()]),{preview:n,error:p,update:g,loading:m}}function Yse({resource:e}){const[t,n]=ne(e,J.properties.bookmark.url,{commit:!0}),{preview:r,error:o,update:i,loading:s}=Kse(e),[l]=jt(e),c=f.useCallback(async u=>{await n(u.target.value),i(u.target.value)},[n,i]);return a.jsx(a.Fragment,{children:a.jsxs(Xse,{children:[a.jsx(ql,{children:a.jsx(si,{resource:e})}),a.jsx(Qse,{children:a.jsx(ql,{children:a.jsxs(Zse,{children:[a.jsx(Jse,{children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"https://example.com",value:t,onChange:c,disabled:!l})})}),t?a.jsxs(ul,{to:t,variant:ch.Button,children:["Open site"," "]}):a.jsx(yt,{children:"No url"})]})})}),a.jsx(eae,{children:a.jsx(Hse,{preview:r||"",error:o,loading:s})})]})})}const Xse=C.div.withConfig({displayName:"BookmarkPage__Wrapper",componentId:"sc-c18463e7-0"})(["margin-top:","rem;position:relative;display:flex;flex-direction:column;min-height:100%;",",","{padding-bottom:unset;}"],e=>e.theme.margin,ql,ht),Qse=C.div.withConfig({displayName:"BookmarkPage__ControlWrapper",componentId:"sc-c18463e7-1"})(["position:sticky;top:0rem;background-color:",";border-bottom:solid 1px ",";padding:0rem;align-items:center;"],e=>e.theme.colors.bgBody,e=>e.theme.colors.bg2),Jse=C.div.withConfig({displayName:"BookmarkPage__FieldWrapper",componentId:"sc-c18463e7-2"})(["flex:1;"]),Zse=C.div.withConfig({displayName:"BookmarkPage__ControlBar",componentId:"sc-c18463e7-3"})(["display:flex;align-items:center;gap:","rem;margin-bottom:","rem;"],e=>e.theme.margin,e=>e.theme.margin),eae=C.div.withConfig({displayName:"BookmarkPage__PreviewWrapper",componentId:"sc-c18463e7-4"})(["background-color:",";flex:1;padding-bottom:",";"],e=>e.theme.colors.bg,e=>e.theme.heights.floatingSearchBarPadding);function wR({resource:e}){const t=f.useId(),[n,r]=f.useState(!1),[o,i]=cr(),s=q(o),[l,c]=f.useState(!1);e=s||e;const u=Ce(),[d,p]=f.useState(""),h=f.useCallback(async()=>{try{c(!0),await u.importJsonAD(d,{overwriteOutside:n,parent:o}),at.success("Imported!"),c(!1)}catch(m){at.error(m.message),c(!1)}},[o,d,n,u]);return a.jsxs(ht,{children:[a.jsx(Ta,{resource:e,prefix:"Import to",link:!0}),a.jsxs("p",{children:["Read more about how importing Atomic Data works"," ",a.jsx("a",{href:"https://docs.atomicdata.dev/create-json-ad.html",children:"in the docs"}),"."]}),a.jsxs(ge,{children:[a.jsx(ln,{label:"JSON-AD",children:a.jsx(Je,{children:a.jsx(jq,{rows:15,placeholder:"Paste your JSON-AD...",value:d,onChange:m=>p(m.target.value),children:d})})}),a.jsx(rae,{children:"Options"}),a.jsxs(nae,{children:[a.jsxs(tae,{children:[a.jsx("input",{type:"checkbox",checked:n,onChange:m=>r(m.target.checked)}),"Overwrite resources that are outside the scope of the parent. Do this only if you trust the imported data."]}),a.jsx(ln,{label:"Target parent",helper:"This URL will be used as the default Parent for imported resources.",required:!0,fieldId:t,children:a.jsx(Je,{children:a.jsx(nt,{id:t,required:!0,placeholder:"Enter subject",value:o,onChange:m=>i(m.target.value)})})})]}),d!==""&&a.jsx(oe,{"data-test":"import-post",disabled:!o,onClick:h,children:l?"Importing...":"Send JSON"})]})]})}const tae=C.label.withConfig({displayName:"ImporterPage__Label",componentId:"sc-c74f6d45-0"})(["display:flex;gap:1ch;align-items:center;"]),nae=C.div.withConfig({displayName:"ImporterPage__Group",componentId:"sc-c74f6d45-1"})(["display:flex;padding:1rem;flex-direction:column;gap:1rem;border:1px solid ",";border-radius:",";"],e=>e.theme.colors.bg2,e=>e.theme.radius),rae=C.h2.withConfig({displayName:"ImporterPage__Header",componentId:"sc-c74f6d45-2"})(["font-size:1.2rem;"]);function oae({options:e,name:t,onChange:n}){const[r,o]=f.useState(()=>{var s;return(s=e.find(l=>l.checked))==null?void 0:s.value}),i=f.useCallback((s,l)=>{s&&(n(l),o(l))},[n]);return a.jsx(sae,{children:e.map(s=>f.createElement(iae,{...s,key:s.value,onChange:i,checked:r===s.value,name:t}))})}function iae({onChange:e,icon:t,label:n,name:r,value:o,checked:i}){const s=f.useId(),l=c=>{e(c.target.checked,o)};return a.jsxs(aae,{children:[a.jsx(cae,{id:s,type:"radio",onChange:l,name:r,value:o,checked:i}),a.jsx(lae,{htmlFor:s,title:n,children:t})]})}const sae=C.form.withConfig({displayName:"ButtonGroup__Group",componentId:"sc-e56f9410-0"})(["display:flex;height:2rem;gap:0.5rem;"]),aae=C.div.withConfig({displayName:"ButtonGroup__Item",componentId:"sc-e56f9410-1"})(["position:relative;width:2rem;aspect-ratio:1/1;"]),lae=C.label.withConfig({displayName:"ButtonGroup__Label",componentId:"sc-e56f9410-2"})(["position:absolute;inset:0;width:100%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;border-radius:",";color:",";cursor:pointer;transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;input:checked + &{background-color:",";color:",";}:hover{background-color:",";}"],e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.colors.text,e=>e.theme.colors.bg1),cae=C.input.withConfig({displayName:"ButtonGroup__Input",componentId:"sc-e56f9410-3"})(["position:absolute;inset:0;width:100%;aspect-ratio:1/1;visibility:hidden;"]),{grid:mS,list:gS}=Dl.displayStyles;function uae({displayStyle:e,onClick:t}){const n=f.useMemo(()=>[{icon:a.jsx(H$,{}),label:"List View",value:gS,checked:e===gS},{icon:a.jsx(J$,{}),label:"Grid View",value:mS,checked:e===mS}],[e]);return a.jsx(oae,{options:n,name:"display-style",onChange:t})}function By({resource:e}){const[t]=ne(e,pe.description);return a.jsx(bc,{children:a.jsx(Gx,{children:t})})}function dae({resource:e}){const[t]=ne(e,pe.bookmark.imageUrl);return t?a.jsx(bc,{children:a.jsx(pae,{src:t,alt:""})}):a.jsx(By,{resource:e})}const pae=C.img.withConfig({displayName:"BookmarkGridItem__Image",componentId:"sc-ac064349-0"})(["width:100%;height:100%;object-fit:cover;object-position:center;"]);function fae({resource:e}){return a.jsx("ul",{children:[...e.getPropVals()].map(([t,n])=>a.jsx(hae,{prop:t,val:n},t))})}function hae({prop:e,val:t}){const n=q(e),[r]=rt(n),[o]=Io(n,pe.datatype),i=f.useMemo(()=>o===bv.atomicUrl?a.jsx(vS,{subject:t}):o===bv.resourceArray?a.jsx(Td,{subjects:t,RenderComp:vS}):a.jsx(a.Fragment,{children:t}),[t,o]);return a.jsxs(gae,{children:[a.jsx(mae,{children:r}),": ",i]})}const mae=C.span.withConfig({displayName:"AllPropsSimple__Key",componentId:"sc-993c57c9-0"})(["font-weight:bold;"]),gae=C.ul.withConfig({displayName:"AllPropsSimple__List",componentId:"sc-993c57c9-1"})(["list-style:none;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";"],e=>e.theme.colors.textLight);function vS({subject:e}){const t=q(e),[n]=rt(t);return a.jsx(a.Fragment,{children:n})}function vae({resource:e}){return a.jsx(yae,{children:a.jsx(fae,{resource:e})})}const yae=C.div.withConfig({displayName:"DefaultGridItem__DefaultGridWrapper",componentId:"sc-b2e41399-0"})(["padding:","rem;pointer-events:none;"],e=>e.theme.margin);function bae({resource:e}){const[t]=we(e,pe.chatRoom.messages);return a.jsx(Sae,{children:t.length>0?a.jsxs(a.Fragment,{children:[a.jsx(yS,{subject:t[t.length-2]}),a.jsx(yS,{subject:t[t.length-1],alignment:"right"})]}):a.jsx(Gx,{children:"Empty Chat"})})}const yS=({subject:e,alignment:t})=>{const n=q(e),[r]=Io(n,pe.commit.lastCommit),o=q(r),[i]=Io(o,pe.commit.signer),s=q(i),[l]=rt(s),[c]=ne(n,pe.description);return a.jsxs(xae,{alignment:t,children:[a.jsx(wae,{children:l}),a.jsx(SR,{children:c})]})},SR=C.div.withConfig({displayName:"ChatRoomGridItem__TextWrapper",componentId:"sc-658a3520-0"})(["background-color:",";padding:0.5rem;border-radius:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.text),xae=C.div.withConfig({displayName:"ChatRoomGridItem__MessageWrapper",componentId:"sc-658a3520-1"})(["padding-inline:","rem;width:100%;text-align:",";","{border-bottom-left-radius:",";border-bottom-right-radius:",";}"],e=>e.theme.margin,e=>e.alignment??"left",SR,e=>e.alignment!=="right"?"0":"15px",e=>e.alignment==="right"?"0":"15px"),wae=C.div.withConfig({displayName:"ChatRoomGridItem__CommitWrapper",componentId:"sc-658a3520-2"})(["color:",";padding-inline:0.5rem;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.theme.colors.textLight),Sae=C(bc).withConfig({displayName:"ChatRoomGridItem__ChatWrapper",componentId:"sc-658a3520-3"})(["display:flex;flex-direction:column;justify-content:space-evenly;"]);function Cae({resource:e}){const[t]=we(e,pe.document.elements),n=q(t[0]),[r]=ne(n,pe.description);return a.jsx(bc,{children:a.jsx(Gx,{children:a.jsx(At,{text:r??""})})})}function jae({resource:e}){const[t]=Io(e,iR.properties.coverImage);return a.jsx(MI,{subject:t??ut})}const kae=new Map([[X.classes.bookmark,dae],[E.classes.class,By],[E.classes.property,By],[X.classes.chatroom,bae],[X.classes.document,Cae],[Ne.classes.file,Kx],[X.classes.article,jae]]);function Eae(e){return kae.get(e)??vae}function _ae({subject:e}){const t=uo(),n=q(e),[r]=rt(n),[o]=ne(n,E.properties.isA),i=q(o),[s]=rt(i),l=No(o??""),c=f.useCallback(h=>{h.preventDefault(),t(lt(e))},[e,t]),u=f.useMemo(()=>Eae(o??""),[o]);if(o===void 0)return a.jsx(Tae,{});const d=o===X.classes.folder,p=d?void 0:e;return a.jsxs(Zu,{onClick:c,href:e,children:[a.jsx(FI,{subject:p,children:r}),d?a.jsx(Rae,{}):a.jsxs(Ju,{subject:p,children:[a.jsxs(Iae,{children:[a.jsx(l,{}),a.jsx("span",{children:s})]}),a.jsx(yc,{FallBackComponent:Aae,children:a.jsx(u,{resource:n})})]})]})}const Iae=C.div.withConfig({displayName:"ResourceGridItem__ClassBanner",componentId:"sc-c8102fc4-0"})(["display:flex;background-color:",";border-top-left-radius:",";border-top-right-radius:",";align-items:center;gap:0.5rem;justify-content:center;padding-block:var(--card-banner-padding);color:",";border-bottom:1px solid ",";span{text-transform:capitalize;}"],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg2),Rae=C(z$).withConfig({displayName:"ResourceGridItem__FolderIcon",componentId:"sc-c8102fc4-1"})(["height:100%;width:100%;color:",";transition:color 0.1s ease-in-out;",":hover &{color:",";}"],e=>e.theme.colors.textLight,Zu,e=>e.theme.colors.main),Aae=({error:e})=>a.jsx(Pae,{children:e.message}),Pae=C.div.withConfig({displayName:"ResourceGridItem__GridItemErrorWrapper",componentId:"sc-c8102fc4-2"})(["color:",";text-align:center;"],e=>e.theme.colors.alert),Tae=C(pB).withConfig({displayName:"ResourceGridItem__Loader",componentId:"sc-c8102fc4-3"})(["--loader-bg-to:",";height:unset;aspect-ratio:1/1;"],e=>e.theme.colors.bgBody);function Dae({subResources:e,onNewClick:t,showNewButton:n}){return a.jsxs(Nae,{children:[Array.from(e.values()).map(r=>a.jsx(_ae,{subject:r.getSubject()},r.getSubject())),n&&a.jsxs(Zu,{children:[a.jsx(Oae,{as:"button",onClick:t,title:"Create new resource",children:a.jsx(ur,{})}),a.jsx(FI,{children:"New Resource"})]})]})}const Nae=C.div.withConfig({displayName:"GridView__Grid",componentId:"sc-a4f33264-0"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));width:var(--container-width);margin-inline:auto;gap:3rem;"]),Oae=C(Ju).withConfig({displayName:"GridView__NewCard",componentId:"sc-a4f33264-1"})(["background-color:",";border:1px solid ",";cursor:pointer;display:grid;place-items:center;font-size:3rem;color:",";transition:color 0.1s ease-in-out,font-size 0.1s ease-out,box-shadow 0.1s ease-in-out;",":hover &,",":focus &{color:",";font-size:3.8rem;}:active{font-size:3rem;}"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,Zu,Zu,e=>e.theme.colors.main);function CR({subResources:e,onNewClick:t,showNewButton:n}){return a.jsxs(Mae,{children:[a.jsx($ae,{"data-test":"folder-list",children:a.jsxs(a.Fragment,{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:a.jsx(Uae,{children:"Title"})}),a.jsx(xS,{as:"th",children:"Class"}),a.jsx(bS,{as:"th",children:"Last Modified"})]})}),a.jsx("tbody",{children:Array.from(e.values()).map(r=>a.jsxs(Wae,{children:[a.jsx("td",{children:a.jsx(Lae,{resource:r})}),a.jsx(xS,{children:a.jsx(Fae,{resource:r})}),a.jsx(bS,{children:a.jsx(zae,{resource:r})})]},r.getSubject()))})]})}),n&&a.jsx(Vae,{clean:!0,onClick:t,"data-testid":"new-resource-folder",children:a.jsxs("span",{children:[a.jsx(ur,{})," New Resource"]})})]})}function Lae({resource:e}){const[t]=rt(e),[n]=ne(e,pe.isA),r=No(n??"");return a.jsxs(Hae,{children:[a.jsx(Bae,{children:a.jsx(r,{})}),a.jsx(Me,{subject:e.getSubject(),children:t})]})}function zae({resource:e}){const[t]=ne(e,pe.commit.lastCommit);return a.jsx(jR,{children:a.jsx(xc,{commitSubject:t})})}function Fae({resource:e}){const[t]=ne(e,pe.isA),n=q(t),[r]=rt(n);return a.jsx(jR,{children:a.jsx(Me,{subject:t,children:r})})}const Mae=C.div.withConfig({displayName:"ListView__Wrapper",componentId:"sc-20900dfe-0"})(["--icon-width:1rem;--icon-title-spacing:1rem;--cell-padding:0.4rem;width:var(--container-width);margin-inline:auto;"]),$ae=C.table.withConfig({displayName:"ListView__StyledTable",componentId:"sc-20900dfe-1"})(["text-align:left;border-collapse:collapse;width:100%;th{padding-bottom:1rem;}th:last-child{padding-right:2rem;}"]),Bae=C.span.withConfig({displayName:"ListView__IconWrapper",componentId:"sc-20900dfe-2"})(["width:var(--icon-width);display:inline-flex;align-items:center;"]),Hae=C.div.withConfig({displayName:"ListView__TitleWrapper",componentId:"sc-20900dfe-3"})(["display:flex;align-items:center;gap:var(--icon-title-spacing);svg{color:",";}"],e=>e.theme.colors.textLight),Uae=C.span.withConfig({displayName:"ListView__TitleHeaderWrapper",componentId:"sc-20900dfe-4"})(["margin-inline-start:calc( var(--icon-width) + var(--icon-title-spacing) + var(--cell-padding) );"]),bS=C.td.withConfig({displayName:"ListView__AlignRight",componentId:"sc-20900dfe-5"})(["text-align:right;"]),jR=C.span.withConfig({displayName:"ListView__LinkWrapper",componentId:"sc-20900dfe-6"})(["a{color:",";}"],e=>e.theme.colors.textLight),Wae=C.tr.withConfig({displayName:"ListView__TableRow",componentId:"sc-20900dfe-7"})(["&:nth-child(odd){td{background-color:",";}td:first-child{border-top-left-radius:",";border-bottom-left-radius:",";}td:last-child{border-top-right-radius:",";border-bottom-right-radius:",";}}td{padding:var(--cell-padding);}"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius,e=>e.theme.radius),xS=C.td.withConfig({displayName:"ListView__ClassCell",componentId:"sc-20900dfe-8"})(["@container (max-width:500px){display:none;}"]),Vae=C(oe).withConfig({displayName:"ListView__NewButton",componentId:"sc-20900dfe-9"})(["margin-top:1rem;margin-inline-start:calc( var(--icon-width) + var(--icon-title-spacing) + var(--cell-padding) );> span{display:flex;align-items:center;gap:0.5rem;}"]),qae=new Map([[Dl.displayStyles.list,CR],[Dl.displayStyles.grid,Dae]]),Gae="folderDisplayPrefs",Kae=e=>{const[t,n]=Dr(Gae,{}),r=o=>{n({...t,[e]:o})};return[t[e],r]};function Yae({resource:e}){const[t,n]=Kae(e.subject),r=t??e.props.displayStyle,o=f.useMemo(()=>qae.get(r)??CR,[r]),i=fa(e.props.subResources),s=$E(e.subject),[l]=jt(e);return a.jsxs(Zae,{view:r,children:[a.jsx(Xae,{children:a.jsxs(Qae,{children:[a.jsx(si,{resource:e}),a.jsx(uae,{onClick:n,displayStyle:r})]})}),a.jsx(Jae,{children:a.jsx(gR,{parentResource:e,children:a.jsx(o,{subResources:i,onNewClick:s,showNewButton:l})})})]})}const Xae=C.div.withConfig({displayName:"FolderPage__TitleBar",componentId:"sc-39f953ec-0"})(["padding:","rem;"],e=>e.theme.margin),Qae=C.div.withConfig({displayName:"FolderPage__TitleBarInner",componentId:"sc-39f953ec-1"})(["display:flex;width:var(--container-width);margin-inline:auto;justify-content:space-between;"]),Jae=C.div.withConfig({displayName:"FolderPage__Wrapper",componentId:"sc-39f953ec-2"})(["width:100%;padding:","rem;flex:1;"],e=>e.theme.margin),Zae=C.div.withConfig({displayName:"FolderPage__FullPageWrapper",componentId:"sc-39f953ec-3"})(["--container-width:min(1300px,100%);min-height:",";padding-bottom:",";display:flex;flex-direction:column;"],e=>e.theme.heights.fullPage,e=>e.theme.heights.floatingSearchBarPadding);var wS=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ele(e,t){return!!(e===t||wS(e)&&wS(t))}function tle(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ele(e[n],t[n]))return!1;return!0}function t1(e,t){t===void 0&&(t=tle);var n,r=[],o,i=!1;function s(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return i&&n===this&&t(l,r)||(o=e.apply(this,l),i=!0,n=this,r=l),o}return s}var nle=typeof performance=="object"&&typeof performance.now=="function",SS=nle?function(){return performance.now()}:function(){return Date.now()};function CS(e){cancelAnimationFrame(e.id)}function rle(e,t){var n=SS();function r(){SS()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var n1=-1;function jS(e){if(e===void 0&&(e=!1),n1===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),n1=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return n1}var Va=null;function kS(e){if(e===void 0&&(e=!1),Va===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Va="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Va="negative":Va="positive-ascending"),document.body.removeChild(t),Va}return Va}var ole=150,ile=function(t,n){return t};function sle(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(p){G7(h,p);function h(v){var g;return g=p.call(this,v)||this,g._instanceProps=c(g.props,Tv(g)),g._outerRef=void 0,g._resetIsScrollingTimeoutId=null,g.state={instance:Tv(g),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof g.props.initialScrollOffset=="number"?g.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},g._callOnItemsRendered=void 0,g._callOnItemsRendered=t1(function(b,y,x,w){return g.props.onItemsRendered({overscanStartIndex:b,overscanStopIndex:y,visibleStartIndex:x,visibleStopIndex:w})}),g._callOnScroll=void 0,g._callOnScroll=t1(function(b,y,x){return g.props.onScroll({scrollDirection:b,scrollOffset:y,scrollUpdateWasRequested:x})}),g._getItemStyle=void 0,g._getItemStyle=function(b){var y=g.props,x=y.direction,w=y.itemSize,S=y.layout,k=g._getItemStyleCache(u&&w,u&&S,u&&x),_;if(k.hasOwnProperty(b))_=k[b];else{var I=n(g.props,b,g._instanceProps),P=o(g.props,b,g._instanceProps),z=x==="horizontal"||S==="horizontal",D=x==="rtl",F=z?I:0;k[b]=_={position:"absolute",left:D?void 0:F,right:D?F:void 0,top:z?0:I,height:z?"100%":P,width:z?P:"100%"}}return _},g._getItemStyleCache=void 0,g._getItemStyleCache=t1(function(b,y,x){return{}}),g._onScrollHorizontal=function(b){var y=b.currentTarget,x=y.clientWidth,w=y.scrollLeft,S=y.scrollWidth;g.setState(function(k){if(k.scrollOffset===w)return null;var _=g.props.direction,I=w;if(_==="rtl")switch(kS()){case"negative":I=-w;break;case"positive-descending":I=S-x-w;break}return I=Math.max(0,Math.min(I,S-x)),{isScrolling:!0,scrollDirection:k.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._onScrollVertical=function(b){var y=b.currentTarget,x=y.clientHeight,w=y.scrollHeight,S=y.scrollTop;g.setState(function(k){if(k.scrollOffset===S)return null;var _=Math.max(0,Math.min(S,w-x));return{isScrolling:!0,scrollDirection:k.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},g._resetIsScrollingDebounced)},g._outerRefSetter=function(b){var y=g.props.outerRef;g._outerRef=b,typeof y=="function"?y(b):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=b)},g._resetIsScrollingDebounced=function(){g._resetIsScrollingTimeoutId!==null&&CS(g._resetIsScrollingTimeoutId),g._resetIsScrollingTimeoutId=rle(g._resetIsScrolling,ole)},g._resetIsScrolling=function(){g._resetIsScrollingTimeoutId=null,g.setState({isScrolling:!1},function(){g._getItemStyleCache(-1,null)})},g}h.getDerivedStateFromProps=function(g,b){return ale(g,b),d(g),null};var m=h.prototype;return m.scrollTo=function(g){g=Math.max(0,g),this.setState(function(b){return b.scrollOffset===g?null:{scrollDirection:b.scrollOffset<g?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},m.scrollToItem=function(g,b){b===void 0&&(b="auto");var y=this.props,x=y.itemCount,w=y.layout,S=this.state.scrollOffset;g=Math.max(0,Math.min(g,x-1));var k=0;if(this._outerRef){var _=this._outerRef;w==="vertical"?k=_.scrollWidth>_.clientWidth?jS():0:k=_.scrollHeight>_.clientHeight?jS():0}this.scrollTo(i(this.props,g,b,S,this._instanceProps,k))},m.componentDidMount=function(){var g=this.props,b=g.direction,y=g.initialScrollOffset,x=g.layout;if(typeof y=="number"&&this._outerRef!=null){var w=this._outerRef;b==="horizontal"||x==="horizontal"?w.scrollLeft=y:w.scrollTop=y}this._callPropsCallbacks()},m.componentDidUpdate=function(){var g=this.props,b=g.direction,y=g.layout,x=this.state,w=x.scrollOffset,S=x.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var k=this._outerRef;if(b==="horizontal"||y==="horizontal")if(b==="rtl")switch(kS()){case"negative":k.scrollLeft=-w;break;case"positive-ascending":k.scrollLeft=w;break;default:var _=k.clientWidth,I=k.scrollWidth;k.scrollLeft=I-_-w;break}else k.scrollLeft=w;else k.scrollTop=w}this._callPropsCallbacks()},m.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&CS(this._resetIsScrollingTimeoutId)},m.render=function(){var g=this.props,b=g.children,y=g.className,x=g.direction,w=g.height,S=g.innerRef,k=g.innerElementType,_=g.innerTagName,I=g.itemCount,P=g.itemData,z=g.itemKey,D=z===void 0?ile:z,F=g.layout,$=g.outerElementType,Z=g.outerTagName,ee=g.style,W=g.useIsScrolling,ue=g.width,K=this.state.isScrolling,B=x==="horizontal"||F==="horizontal",H=B?this._onScrollHorizontal:this._onScrollVertical,N=this._getRangeToRender(),xe=N[0],fe=N[1],O=[];if(I>0)for(var Te=xe;Te<=fe;Te++)O.push(f.createElement(b,{data:P,key:D(Te,P),index:Te,isScrolling:W?K:void 0,style:this._getItemStyle(Te)}));var Oe=r(this.props,this._instanceProps);return f.createElement($||Z||"div",{className:y,onScroll:H,ref:this._outerRefSetter,style:Gn({position:"relative",height:w,width:ue,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},ee)},f.createElement(k||_||"div",{children:O,ref:S,style:{height:B?"100%":Oe,pointerEvents:K?"none":void 0,width:B?Oe:"100%"}}))},m._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var g=this.props.itemCount;if(g>0){var b=this._getRangeToRender(),y=b[0],x=b[1],w=b[2],S=b[3];this._callOnItemsRendered(y,x,w,S)}}if(typeof this.props.onScroll=="function"){var k=this.state,_=k.scrollDirection,I=k.scrollOffset,P=k.scrollUpdateWasRequested;this._callOnScroll(_,I,P)}},m._getRangeToRender=function(){var g=this.props,b=g.itemCount,y=g.overscanCount,x=this.state,w=x.isScrolling,S=x.scrollDirection,k=x.scrollOffset;if(b===0)return[0,0,0,0];var _=s(this.props,k,this._instanceProps),I=l(this.props,_,k,this._instanceProps),P=!w||S==="backward"?Math.max(1,y):1,z=!w||S==="forward"?Math.max(1,y):1;return[Math.max(0,_-P),Math.max(0,Math.min(b-1,I+z)),_,I]},h}(f.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ale=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},lle=sle({getItemOffset:function(t,n){var r=t.itemSize;return n*r},getItemSize:function(t,n){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var n=t.itemCount,r=t.itemSize;return r*n},getOffsetForIndexAndAlignment:function(t,n,r,o,i,s){var l=t.direction,c=t.height,u=t.itemCount,d=t.itemSize,p=t.layout,h=t.width,m=l==="horizontal"||p==="horizontal",v=m?h:c,g=Math.max(0,u*d-v),b=Math.min(g,n*d),y=Math.max(0,n*d-v+d+s);switch(r==="smart"&&(o>=y-v&&o<=b+v?r="auto":r="center"),r){case"start":return b;case"end":return y;case"center":{var x=Math.round(y+(b-y)/2);return x<Math.ceil(v/2)?0:x>g+Math.floor(v/2)?g:x}case"auto":default:return o>=y&&o<=b?o:o<y?y:b}},getStartIndexForOffset:function(t,n){var r=t.itemCount,o=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/o)))},getStopIndexForStartIndex:function(t,n,r){var o=t.direction,i=t.height,s=t.itemCount,l=t.itemSize,c=t.layout,u=t.width,d=o==="horizontal"||c==="horizontal",p=n*l,h=d?u:i,m=Math.ceil((h+r-p)/l);return Math.max(0,Math.min(s-1,n+m-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});let ro;typeof window<"u"?ro=window:typeof self<"u"?ro=self:ro=global;let Hy=null,Uy=null;const ES=20,r1=ro.clearTimeout,_S=ro.setTimeout,o1=ro.cancelAnimationFrame||ro.mozCancelAnimationFrame||ro.webkitCancelAnimationFrame,IS=ro.requestAnimationFrame||ro.mozRequestAnimationFrame||ro.webkitRequestAnimationFrame;o1==null||IS==null?(Hy=r1,Uy=function(t){return _S(t,ES)}):(Hy=function([t,n]){o1(t),r1(n)},Uy=function(t){const n=IS(function(){r1(r),t()}),r=_S(function(){o1(n),t()},ES);return[n,r]});function cle(e){let t,n,r,o,i,s,l;const c=typeof document<"u"&&document.attachEvent;if(!c){s=function(y){const x=y.__resizeTriggers__,w=x.firstElementChild,S=x.lastElementChild,k=w.firstElementChild;S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight,k.style.width=w.offsetWidth+1+"px",k.style.height=w.offsetHeight+1+"px",w.scrollLeft=w.scrollWidth,w.scrollTop=w.scrollHeight},i=function(y){return y.offsetWidth!==y.__resizeLast__.width||y.offsetHeight!==y.__resizeLast__.height},l=function(y){if(y.target.className&&typeof y.target.className.indexOf=="function"&&y.target.className.indexOf("contract-trigger")<0&&y.target.className.indexOf("expand-trigger")<0)return;const x=this;s(this),this.__resizeRAF__&&Hy(this.__resizeRAF__),this.__resizeRAF__=Uy(function(){i(x)&&(x.__resizeLast__.width=x.offsetWidth,x.__resizeLast__.height=x.offsetHeight,x.__resizeListeners__.forEach(function(k){k.call(x,y)}))})};let h=!1,m="";r="animationstart";const v="Webkit Moz O ms".split(" ");let g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),b="";{const y=document.createElement("fakeelement");if(y.style.animationName!==void 0&&(h=!0),h===!1){for(let x=0;x<v.length;x++)if(y.style[v[x]+"AnimationName"]!==void 0){b=v[x],m="-"+b.toLowerCase()+"-",r=g[x],h=!0;break}}}n="resizeanim",t="@"+m+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=m+"animation: 1ms "+n+"; "}const u=function(h){if(!h.getElementById("detectElementResize")){const m=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=h.head||h.getElementsByTagName("head")[0],g=h.createElement("style");g.id="detectElementResize",g.type="text/css",e!=null&&g.setAttribute("nonce",e),g.styleSheet?g.styleSheet.cssText=m:g.appendChild(h.createTextNode(m)),v.appendChild(g)}};return{addResizeListener:function(h,m){if(c)h.attachEvent("onresize",m);else{if(!h.__resizeTriggers__){const v=h.ownerDocument,g=ro.getComputedStyle(h);g&&g.position==="static"&&(h.style.position="relative"),u(v),h.__resizeLast__={},h.__resizeListeners__=[],(h.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const b=v.createElement("div");b.className="expand-trigger",b.appendChild(v.createElement("div"));const y=v.createElement("div");y.className="contract-trigger",h.__resizeTriggers__.appendChild(b),h.__resizeTriggers__.appendChild(y),h.appendChild(h.__resizeTriggers__),s(h),h.addEventListener("scroll",l,!0),r&&(h.__resizeTriggers__.__animationListener__=function(w){w.animationName===n&&s(h)},h.__resizeTriggers__.addEventListener(r,h.__resizeTriggers__.__animationListener__))}h.__resizeListeners__.push(m)}},removeResizeListener:function(h,m){if(c)h.detachEvent("onresize",m);else if(h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(m),1),!h.__resizeListeners__.length){h.removeEventListener("scroll",l,!0),h.__resizeTriggers__.__animationListener__&&(h.__resizeTriggers__.removeEventListener(r,h.__resizeTriggers__.__animationListener__),h.__resizeTriggers__.__animationListener__=null);try{h.__resizeTriggers__=!h.removeChild(h.__resizeTriggers__)}catch{}}}}}class ule extends f.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:o}=this.props;if(this._parentNode){const i=window.getComputedStyle(this._parentNode)||{},s=parseFloat(i.paddingLeft||"0"),l=parseFloat(i.paddingRight||"0"),c=parseFloat(i.paddingTop||"0"),u=parseFloat(i.paddingBottom||"0"),d=this._parentNode.getBoundingClientRect(),p=d.height-c-u,h=d.width-s-l,m=this._parentNode.offsetHeight-c-u,v=this._parentNode.offsetWidth-s-l;(!n&&(this.state.height!==m||this.state.scaledHeight!==p)||!r&&(this.state.width!==v||this.state.scaledWidth!==h))&&(this.setState({height:m,width:v,scaledHeight:p,scaledWidth:h}),typeof o=="function"&&o({height:m,scaledHeight:p,scaledWidth:h,width:v}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=cle(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:o=!1,disableWidth:i=!1,doNotBailOutOnEmptyChildren:s=!1,nonce:l,onResize:c,style:u={},tagName:d="div",...p}=this.props,{height:h,scaledHeight:m,scaledWidth:v,width:g}=this.state,b={overflow:"visible"},y={};let x=!1;return o||(h===0&&(x=!0),b.height=0,y.height=h,y.scaledHeight=m),i||(g===0&&(x=!0),b.width=0,y.width=g,y.scaledWidth=v),s&&(x=!1),f.createElement(d,{ref:this._setRef,style:{...b,...u},...p},!x&&t(y))}}class dle{constructor(){this.subscriptions=new Map}register(t,n){const r=this.subscriptions.get(t)??new Set;return r.add(n),this.subscriptions.set(t,r),()=>{r.delete(n)}}async emit(t,...n){if(!this.subscriptions.has(t))return;const r=this.subscriptions.get(t),o=async i=>{i(...n)};r&&await Promise.allSettled([...r].map(i=>o(i)))}}var Kl;(function(e){e.EnterEditModeWithCharacter="enterEditModeWithCharacter",e.ClearCell="clearCell",e.ClearRow="clearRow",e.InteractionsFired="interactionsFired"})(Kl||(Kl={}));var je;(function(e){e[e.Visual=0]="Visual",e[e.Edit=1]="Edit",e[e.MultiSelect=2]="MultiSelect"})(je||(je={}));function qa(e){}const ple={mouseDown:!1,setMouseDown:qa,tableRef:{current:null},disabledKeyboardInteractions:new Set,setDisabledKeyboardInteractions:qa,selectedRow:void 0,selectedColumn:void 0,multiSelectCornerRow:void 0,multiSelectCornerColumn:void 0,setActiveCell:()=>{},indicatorHidden:!1,setIndicatorHidden:qa,setMultiSelectCorner:()=>{},activeCellRef:{current:null},multiSelectCornerCellRef:{current:null},isDragging:!1,setIsDragging:qa,listRef:{current:null},cursorMode:0,setCursorMode:qa,clearCell:()=>{},clearRow:e=>{},enterEditModeWithCharacter:e=>{},markings:new Map,setMarkings:qa,registerEventListener:()=>()=>{},emitInteractionsFired:()=>{}},kR=f.createContext(ple);function fle({children:e}){const[t,n]=f.useState(!1),r=f.useRef(null),o=f.useRef(null),[i]=f.useState(()=>new dle),[s,l]=f.useState(new Set),[c,u]=f.useState(),[d,p]=f.useState(),[h,m]=f.useState(),[v,g]=f.useState(),[b,y]=f.useState(!1),[x,w]=f.useState(0),[S,k]=f.useState(!1),[_,I]=f.useState(new Map),P=f.useRef(null),z=f.useRef(null),D=f.useCallback((K,B)=>{u(K),p(B)},[]),F=f.useCallback((K,B)=>{m(K),g(B)},[]),$=f.useCallback(()=>{i.emit("clearCell")},[i]),Z=f.useCallback(K=>{i.emit("clearRow",K)},[i]),ee=f.useCallback(K=>{i.emit("enterEditModeWithCharacter",K)},[i]),W=f.useCallback(K=>{i.emit("interactionsFired",K)},[i]),ue=f.useMemo(()=>({mouseDown:t,setMouseDown:n,tableRef:r,disabledKeyboardInteractions:s,setDisabledKeyboardInteractions:l,selectedRow:c,selectedColumn:d,multiSelectCornerRow:h,multiSelectCornerColumn:v,indicatorHidden:S,setIndicatorHidden:k,setActiveCell:D,setMultiSelectCorner:F,activeCellRef:P,multiSelectCornerCellRef:z,isDragging:b,setIsDragging:y,listRef:o,cursorMode:x,setCursorMode:w,registerEventListener:i.register.bind(i),clearCell:$,clearRow:Z,enterEditModeWithCharacter:ee,emitInteractionsFired:W,markings:_,setMarkings:I}),[s,c,d,v,h,S,D,F,b,x,W,t,_]);return a.jsx(kR.Provider,{value:ue,children:e})}function cn(){return f.useContext(kR)}const hle='abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=[]{};:"|,./<>?`~ø';var ti;(function(e){e[e.ExitEditMode=0]="ExitEditMode",e[e.EditNextRow=1]="EditNextRow",e[e.EditNextCell=2]="EditNextCell",e[e.EditPreviousCell=3]="EditPreviousCell",e[e.ExpandRow=4]="ExpandRow",e[e.Copy=5]="Copy",e[e.DeleteCell=6]="DeleteCell",e[e.DeleteRow=7]="DeleteRow",e[e.MoveCursorUp=8]="MoveCursorUp",e[e.MoveCursorDown=9]="MoveCursorDown",e[e.MoveCursorLeft=10]="MoveCursorLeft",e[e.MoveCursorRight=11]="MoveCursorRight",e[e.EnterEditModeWithEnter=12]="EnterEditModeWithEnter",e[e.EnterEditModeByTyping=13]="EnterEditModeByTyping",e[e.MoveMultiSelectCornerUp=14]="MoveMultiSelectCornerUp",e[e.MoveMultiSelectCornerDown=15]="MoveMultiSelectCornerDown",e[e.MoveMultiSelectCornerLeft=16]="MoveMultiSelectCornerLeft",e[e.MoveMultiSelectCornerRight=17]="MoveMultiSelectCornerRight",e[e.Undo=18]="Undo"})(ti||(ti={}));const eg=({cursorMode:e,multiSelectCornerRow:t,multiSelectCornerColumn:n,selectedRow:r,selectedColumn:o})=>{const i=(e===je.MultiSelect?t:r)??0,s=(e===je.MultiSelect?n:o)??0;return{row:i,col:s}},mle=({multiSelectCornerColumn:e,multiSelectCornerRow:t,selectedColumn:n,selectedRow:r})=>{const o=(t??r??0)-(r??0),i=(e??n??0)-(n??0);return[o,i]},tg=(e,t)=>({translateCursor:n,tableContext:r})=>{let o=e,i=t;if(r.cursorMode===je.MultiSelect){const[s,l]=mle(r);o+=s,i+=l,r.setMultiSelectCorner(void 0,void 0)}r.setCursorMode(je.Visual),n(o,i)},gle={id:0,keys:new Set(["Escape"]),cursorMode:new Set([je.Edit]),handler:({tableContext:e,tableRef:t})=>{var n;e.setCursorMode(je.Visual),(n=t.current)==null||n.focus()}},vle={id:1,keys:new Set(["Enter"]),shift:!1,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(1,0)}},yle={id:2,keys:new Set(["Tab"]),shift:!1,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(0,1)}},ble={id:3,keys:new Set(["Tab"]),shift:!0,cursorMode:new Set([je.Edit]),preventDefault:!0,handler:({translateCursor:e})=>{e(0,-1)}},xle={id:5,keys:new Set(["c"]),mod:!0,cursorMode:new Set([je.Visual,je.MultiSelect]),condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({event:e,copy:t})=>{e.preventDefault(),t==null||t()}},wle={id:18,keys:new Set(["z"]),mod:!0,cursorMode:new Set([je.Visual,je.MultiSelect]),condition:()=>{var e;return((e=document.activeElement)==null?void 0:e.tagName)!=="INPUT"},handler:({undo:e})=>{e==null||e()}},Sle={id:6,keys:new Set(["Delete","Backspace"]),cursorMode:new Set([je.Visual,je.MultiSelect]),condition:({tableContext:e})=>e.selectedColumn!==0&&e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.clearCell()}},Cle={id:7,keys:new Set(["Delete","Backspace"]),cursorMode:new Set([je.Visual]),condition:({tableContext:e})=>e.selectedColumn===0&&e.selectedColumn!==void 0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.clearRow(e.selectedRow)}},jle={id:8,keys:new Set(["ArrowUp"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:tg(-1,0)},kle={id:9,keys:new Set(["ArrowDown"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:tg(1,0)},Ele={id:10,keys:new Set(["ArrowLeft"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:tg(0,-1)},_le={id:11,keys:new Set(["ArrowRight"]),shift:!1,cursorMode:new Set([je.Visual,je.MultiSelect]),preventDefault:!0,handler:tg(0,1)},Ile={id:12,keys:new Set(["Enter"]),cursorMode:new Set([je.Visual]),condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedColumn!==0&&e.selectedRow!==void 0,handler:({tableContext:e})=>{e.setCursorMode(je.Edit)}},Rle={id:4,cursorMode:new Set([je.Visual]),keys:new Set(["Enter"]),condition:({tableContext:e})=>e.selectedColumn===0,handler:({expand:e,tableContext:t})=>{e==null||e(t.selectedRow)}},Ale={id:13,keys:new Set(hle.split("")),cursorMode:new Set([je.Visual]),mod:!1,condition:({tableContext:e})=>e.selectedColumn!==void 0&&e.selectedColumn!==0&&e.selectedRow!==void 0,preventDefault:!0,handler:({tableContext:e,event:t})=>{e.enterEditModeWithCharacter(t.key),e.setCursorMode(je.Edit)}},Ple={id:14,keys:new Set(["ArrowUp"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e})=>{const{row:t,col:n}=eg(e);e.setMultiSelectCorner(Math.max(0,t-1),n),e.setCursorMode(je.MultiSelect)}},Tle={id:15,keys:new Set(["ArrowDown"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e})=>{const{row:t,col:n}=eg(e);e.setMultiSelectCorner(Math.max(0,t+1),n),e.setCursorMode(je.MultiSelect)}},Dle={id:16,keys:new Set(["ArrowLeft"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e,columnCount:t})=>{const{row:n,col:r}=eg(e);e.setMultiSelectCorner(n,Math.min(Math.max(r-1,0),t)),e.setCursorMode(je.MultiSelect)}},Nle={id:17,keys:new Set(["ArrowRight"]),cursorMode:new Set([je.Visual,je.MultiSelect]),shift:!0,preventDefault:!0,handler:({tableContext:e,columnCount:t})=>{const{row:n,col:r}=eg(e);e.setMultiSelectCorner(n,Math.min(Math.max(r+1,0),t)),e.setCursorMode(je.MultiSelect)}},Ole=[gle,vle,yle,ble,Rle,xle,wle,Sle,Cle,jle,kle,Ele,_le,Ile,Ale,Ple,Tle,Dle,Nle];var kl;(function(e){e.Start="flex-start",e.End="flex-end",e.Center="center"})(kl||(kl={}));function tw({rowIndex:e,columnIndex:t,className:n,children:r,disabled:o,align:i,role:s,onEnterEditModeWithCharacter:l=()=>{},onEditNextRow:c}){const u=f.useRef(null),[d,p]=f.useState(!1),{mouseDown:h,selectedRow:m,selectedColumn:v,multiSelectCornerRow:g,multiSelectCornerColumn:b,cursorMode:y,setActiveCell:x,setMultiSelectCorner:w,activeCellRef:S,multiSelectCornerCellRef:k,setCursorMode:_,registerEventListener:I,disabledKeyboardInteractions:P,setMouseDown:z}=cn(),D=e===m&&t===v,F=e===g&&t===b,$=f.useCallback(()=>{z(!1)},[]),Z=f.useCallback(()=>{h&&(w(e,t),_(je.MultiSelect))},[h,e,t]),ee=f.useCallback(K=>K.target.tagName==="INPUT"||K.target.tagName==="BUTTON"?!1:D&&t!==0,[D,t]),W=f.useCallback(K=>{if(z(!0),K.shiftKey){K.stopPropagation(),_(je.MultiSelect),w(e,t);return}if(t===1/0||e===1/0){x(void 0,void 0);return}if(ee(K)){p(!0);return}P.has(ti.ExitEditMode)||D&&y===je.Edit||(_(je.Visual),x(e,t))},[x,t,ee,y,D,P]),ue=f.useCallback(()=>{d&&(w(void 0,void 0),z(!1),_(je.Edit),p(!1))},[d]);return f.useLayoutEffect(()=>{u.current&&F&&(k.current=u.current)},[F]),f.useEffect(()=>{if(u.current&&D){u.current.contains(document.activeElement)||u.current.focus({preventScroll:!0}),S.current=u.current;const K=[I(Kl.EnterEditModeWithCharacter,l),I(Kl.InteractionsFired,B=>{B.includes(ti.EditNextRow)&&D&&(c==null||c())})];return()=>{for(const B of K)B()}}},[D,l,c]),a.jsx(Fle,{"aria-colindex":t+1,ref:u,disabled:o,role:s??"gridcell",className:n,allowUserSelect:y===je.Edit,align:i,tabIndex:D?0:-1,onMouseDown:W,onMouseUp:$,onClick:ue,onMouseEnter:Z,children:r})}function Lle({children:e,onExpand:t,...n}){const{markings:r}=cn(),o=r.get(n.rowIndex);return a.jsxs(zle,{role:"rowheader",...n,hasMarking:!!o,children:[a.jsx(ot,{title:"Open resource",onClick:()=>t(n.rowIndex),children:a.jsx(E$,{})}),o||a.jsx(Wy,{children:e})]})}const Wy=C.span.withConfig({displayName:"Cell__IndexNumber",componentId:"sc-b61ac725-0"})([""]),zle=C(tw).withConfig({displayName:"Cell__StyledIndexCell",componentId:"sc-b61ac725-1"})(["justify-content:flex-end !important;color:",";& button{display:none;}&:hover ",",&:focus-within ","{display:none;}&:not([data-hasmarking='true']):hover button,&:not([data-hasmarking='true']):focus-within button{display:",";}"],e=>e.theme.colors.textLight,Wy,Wy,e=>e.hasMarking?"none":"block"),Fle=C.div.withConfig({displayName:"Cell__CellWrapper",componentId:"sc-b61ac725-2"})(["background-color:",";cursor:",";display:flex;width:100%;justify-content:",";align-items:center;user-select:",";padding-inline:var(--table-inner-padding);white-space:nowrap;text-overflow:ellipsis;position:relative;outline:none;"],e=>e.disabled?e.theme.colors.bg1:e.theme.colors.bg,e=>e.disabled?"not-allowed":"pointer",e=>e.align??"flex-start",e=>e.allowUserSelect?"text":"none"),nw=f.forwardRef(({children:e,...t},n)=>a.jsx(Mle,{role:"row",...t,ref:n,children:e}));nw.displayName="TableRow";const Mle=C.div.withConfig({displayName:"TableRow__StyledDiv",componentId:"sc-a9308d57-0"})(["display:grid;grid-template-columns:var(--table-template-columns);height:var(--table-row-height);& > div{border-bottom:1px solid ",";border-right:1px solid ",";&:last-child{border-right:none;}}&:last-child > div{border-bottom:none;}"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg2);function ER({index:e}){const{setNodeRef:t,isOver:n}=ym({id:`droppable-${e}`,data:{index:e}});return a.jsx($le,{ref:t,hover:n})}const $le=C.div.withConfig({displayName:"ReorderDropArea__ReorderDropZone",componentId:"sc-5be5df54-0"})(["--dropzone-width:0.4rem;position:absolute;background-color:",";opacity:0.4;width:var(--dropzone-width);height:min( var(--table-height),var(--table-content-height) + var(--table-row-height) );top:0;left:calc(var(--dropzone-width) * 0.5 * -1);z-index:10;box-shadow:0 0 7px 0 ",";transform:scaleX(",");",""],e=>e.theme.colors.main,e=>Zo(.3,e.theme.colors.main),e=>e.hover?1:0,Yt("transform","opacity")),RS="6ch",Ble=e=>{try{return Number.parseFloat(e.replace("px",""))}catch(t){return console.error("parseSize error",t),rw}},AS=e=>e.map(t=>`${t}px`),rw=300,PS=rw+"px";function Hle(e,t,n){const[r,o]=f.useState(e?AS(e):Array(t.length).fill(PS)),i=f.useCallback((c,u)=>{o(d=>{d.length!==t.length&&console.error("prevSizes.length !== columns.length",t,d);const p=[...d];return p[c]=u,p}),n(r.map(Ble))},[t,r,n]);f.useEffect(()=>{e&&o(AS(e))},[e]),f.useEffect(()=>{if(t.length===0)return;const c=t.length-r.length;c>0&&o([...r,...Array(c).fill(PS)]),c<0&&o(r.slice(0,t.length))},[t]);const s=`${RS} ${r.join(" ")} minmax(50px, 1fr)`,l=`calc(${RS} + ${r.join(" + ")})`;return{templateColumns:s,contentRowWidth:l,resizeCell:i}}function Ule({dragKey:e,index:t,isReordering:n,column:r,onResize:o,HeadingComponent:i}){const{attributes:s,listeners:l,setNodeRef:c,isDragging:u}=vm({id:e,data:{index:t}}),{targetRef:d,dragAreaRef:p,isDragging:h,dragAreaListeners:m}=o_({initialSize:rw,minSize:100,onResize:b=>o(t,`${b}px`)}),{setIsDragging:v}=cn();f.useEffect(()=>{v(h)},[h]);const g=f.useCallback(b=>{c(b),d.current=b},[]);return a.jsxs(Ch,{ref:g,reordering:u,role:"columnheader","aria-colindex":t+2,children:[a.jsx(i,{column:r,dragListeners:l,dragAttributes:s}),n&&a.jsx(ER,{index:t}),a.jsx(qle,{isDragging:h,ref:p,...m})]})}function Wle({children:e}){return a.jsx(Vle,{children:e})}const Ch=C.div.withConfig({displayName:"TableHeading__TableHeadingWrapper",componentId:"sc-11b45ab2-0"})(["position:relative;background-color:",";display:flex;width:100%;align-items:center;justify-content:",";padding-inline:var(--table-inner-padding);font-weight:bold;white-space:nowrap;isolation:isolate;color:",";"],e=>e.reordering?Zo(.5,e.theme.colors.bg):e.theme.colors.bgBody,e=>e.align??"start",e=>e.reordering?Zo(.5,e.theme.colors.textLight):e.theme.colors.textLight),Vle=C(Ch).withConfig({displayName:"TableHeading__TableHeadingWrapperDummy",componentId:"sc-11b45ab2-1"})(["cursor:grabbing;"]),qle=C(i_).withConfig({displayName:"TableHeading__ResizeHandle",componentId:"sc-11b45ab2-2"})(["--handle-margin:4px;right:-2px;top:0;height:calc(var(--table-row-height) - (var(--handle-margin) * 2));width:4px;margin-top:var(--handle-margin);z-index:10;position:absolute;"]);function Gle({columns:e,onResize:t,columnToKey:n,onColumnReorder:r,HeadingComponent:o,NewColumnButtonComponent:i,headerRef:s}){const[l,c]=f.useState(),u=f.useCallback(p=>{const h=e.map(n).indexOf(p.active.id);c(h),document.body.style.cursor="grabbing"},[e,n]),d=f.useCallback(({active:p,over:h})=>{if(c(void 0),document.body.style.cursor="unset",h){const m=p.data.current.index;let v=h.data.current.index;if(m===v||m+1===v)return;v>m&&(v-=1),r==null||r(m,v)}},[r]);return Ab({onDragStart:u,onDragEnd:d}),a.jsxs("div",{role:"rowgroup",children:[a.jsxs(Kle,{ref:s,"aria-rowindex":1,children:[a.jsx(Ch,{align:"end","aria-colindex":1,role:"columnheader",children:"#"}),e.map((p,h)=>a.jsx(Ule,{dragKey:n(p),index:h,onResize:t,isReordering:l!==void 0,column:p,HeadingComponent:o},n(p))),a.jsxs(Ch,{"aria-colindex":e.length+2,children:[a.jsx(ER,{index:e.length}),a.jsx(i,{})]})]}),yn.createPortal(a.jsx(Yle,{children:l!==void 0&&a.jsx(Wle,{children:a.jsx(o,{column:e[l]})})}),document.body)]})}const Kle=C(nw).withConfig({displayName:"TableHeader__StyledTableRow",componentId:"sc-8907b61b-0"})(["z-index:10;position:relative;"]),Yle=C(Fb).withConfig({displayName:"TableHeader__StyledDragOverlay",componentId:"sc-8907b61b-1"})(["box-shadow:",";background-color:",";display:flex;align-items:center;border-radius:",";padding-inline:","rem;opacity:0.88;"],e=>e.theme.boxShadowSoft,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin),Xle=(e,t)=>e.shift===void 0||e.shift===t.shiftKey,Qle=(e,t)=>e.mod===void 0||e.mod===(navigator.platform.includes("Mac")?t.metaKey:t.ctrlKey),Jle=(e,t)=>e.condition===void 0||e.condition(t),Zle=e=>{var t;return(t=e.current)==null?void 0:t.contains(document.activeElement)};function ece(e,t,n,r,o){const i=cn(),{disabledKeyboardInteractions:s,selectedRow:l,selectedColumn:c,multiSelectCornerRow:u,multiSelectCornerColumn:d,setActiveCell:p,listRef:h,emitInteractionsFired:m}=i,v=oU();return f.useCallback(b=>{if(v||Zle(r))return;const x={tableContext:i,event:b,tableRef:n,columnCount:e,...o,translateCursor:(S,k)=>{let _=(l??0)+S,I=(c??0)+k;I<0&&(_-=1,I=e),I>e&&(_+=1,I=1),h.current&&h.current.scrollToItem(_,"auto"),p(Math.min(Math.max(_,0),t-1),I)}},w=Ole.filter(S=>!s.has(S.id)&&S.keys.has(b.key)&&S.cursorMode.has(i.cursorMode)&&Xle(S,b)&&Qle(S,b)&&Jle(S,x));for(const S of w)S.preventDefault&&b.preventDefault(),S.handler(x);m(w.map(S=>S.id))},[s,l,c,u,d,i,o.copy,o.undo,o.expand,v,m])}function tce(e,t,n,r){return r?Math.min(n.left-e,r.left-e)+t-1:n.left-e+t-1}function nce(e,t,n){return n?Math.min(t.top,n.top)-e-1:t.top-e-1}function rce(e,t){if(!t)return e.width+1;const n=Math.min(e.left,t.left);return Math.max(e.left+e.width,t.left+t.width)-n+1}function oce(e,t){if(!t)return e.height+1;const n=Math.min(e.top,t.top);return Math.max(e.top+e.height,t.top+t.height)-n+1}function ice(e,t,n,r,o){const i=e-1;return o&&t.height===0?n.top+n.height-r-i:!o&&n.height===0?t.top+t.height-r-i:o&&n.height===0?t.top-i:!o&&t.height===0?n.top-i:0}const sce=(e,t,n)=>{const r=n+e.left-t.left;return e.left<=t.left?r:r+e.width-t.width};function ace(e,t,n){requestAnimationFrame(()=>{const r=sce(n,t,e.scrollLeft);e.scroll(r,0)})}const lce=(e,t)=>t.left<e.left||t.right>e.right,cce=(e,t)=>{if(e===je.MultiSelect&&t.current)return t.current.getBoundingClientRect()};function uce({sizeStr:e,scrollerRef:t,setOnScroll:n}){const[r,o]=f.useState(!1),[i,s]=f.useState(!1),[l,c]=f.useState(!1),[{top:u,left:d,width:p,height:h},m]=f.useState({top:0,left:0,width:0,height:0}),{selectedColumn:v,selectedRow:g,multiSelectCornerColumn:b,multiSelectCornerRow:y,activeCellRef:x,isDragging:w,cursorMode:S,indicatorHidden:k,multiSelectCornerCellRef:_}=cn(),I=f.useCallback((P=!0)=>{if(!x.current||!t.current){o(!1);return}const z=x.current.getBoundingClientRect(),D=t.current.getBoundingClientRect(),F=cce(S,_);if(P&&lce(D,z)?(c(!0),ace(t.current,D,z)):c(!1),S===je.MultiSelect&&(z.height===0||(F==null?void 0:F.height)===0)){m($=>({top:ice(D.top,z,F,$.height,(g??0)<(y??0)),left:$.left,width:$.width,height:$.height}));return}m({top:nce(D.top,z,F),left:tce(D.left,t.current.scrollLeft,z,F),width:v===0?-1:rce(z,F),height:oce(z,F)})},[v,g,e,S,b,y]);return f.useEffect(()=>{n(()=>({scrollUpdateWasRequested:P})=>{P||(s(!0),I(!1))})},[I]),f.useEffect(()=>{if(v===void 0||g===void 0){o(!1);return}o(!0),s(!1),I()},[v,g,b,y]),f.useEffect(()=>{S===je.MultiSelect&&I(!1)},[S,_]),f.useEffect(()=>{s(!1),I(!1)},[e]),r?a.jsx(dce,{top:u,left:d,width:p,height:h,noTransition:w||i||l,cursorMode:S,hidden:k}):a.jsx("span",{})}const dce=C.div.attrs(e=>({style:{transform:`translate(${e.left}px, ${e.top}px)`,width:e.width>0?`${e.width}px`:"calc(var(--table-content-width) + 1px)",height:`${e.height}px`}})).withConfig({displayName:"ActiveCellIndicator__Indicator",componentId:"sc-2a8bacc5-0"})(["--speed:","ms;visibility:",";position:absolute;top:0;left:0;border:2px solid ",";pointer-events:none;will-change:transform,width;transition:transform var(--speed) ease-out,width var(--speed) ease-out,height var(--speed) ease-out;z-index:1;background-color:",";"],e=>e.noTransition?0:70,e=>e.hidden?"hidden":"visible",e=>e.theme.colors.main,e=>e.cursorMode===je.Edit?"none":Zo(.85,e.theme.colors.main));function TS(e,t){return e.map(n=>n.map(r=>r[t]))}const pce=e=>`<tr>${e}</tr>`,fce=e=>`<td>${e??""}</td>`;function hce(e){return`<table><tbody>${e.map(n=>pce(n.map(fce).join(""))).join("")}</tbody></table>`}function mce(e){return e.map(t=>t.join(" ")).join(`
`)}function gce(e){const t=TS(e,"html"),n=TS(e,"plain"),r=hce(t),o=mce(n),i="text/html",s=new Blob([r],{type:i}),l="text/plain",c=new Blob([o],{type:l}),u=new ClipboardItem({[i]:s,[l]:c});return navigator.clipboard.write([u])}function vce(e){const t=document.createElement("template");t.innerHTML=e;const n=t.content.querySelector("table tbody");if(!n)return[[t.content.textContent??""]];const r=[];return n.querySelectorAll("tr").forEach(o=>{const i=[];o.querySelectorAll("td").forEach(s=>{const l=[];if(s.querySelectorAll("a").forEach(c=>{l.push(c.href)}),l.length>0){i.push(l.join(","));return}i.push(s.textContent??"")}),r.push(i)}),t.remove(),r}const yce=(e,t,n)=>{if(t===0)return[[e,0],[e,n.length-1]];const r=[e,t-1];return[[...r],[...r]]},bce=(e,t,n,r,o)=>{if(t===0||r===0)return[[Math.min(e,n),0],[Math.max(e,n),o.length-1]];const i=[e,t-1],s=[n,r-1];return[i,s]};function xce([e,t],[n,r],o){const i=[];for(let s=Math.min(t,r);s<=Math.max(t,r);s++)for(let l=Math.min(e,n);l<=Math.max(e,n);l++)i.push([l,o[s]]);return i}function _R(e){const{selectedRow:t,selectedColumn:n,multiSelectCornerRow:r,multiSelectCornerColumn:o,cursorMode:i}=cn();return f.useCallback(()=>{if(n===void 0||t===void 0)return[];const[s,l]=i===je.MultiSelect?bce(t,n,r,o,e):yce(t,n,e);return xce(s,l,e)},[t,n,r,o,i,e])}function wce(e,t){const{selectedRow:n,selectedColumn:r}=cn(),o=_R(e);return f.useCallback(async()=>{if(r===void 0||n===void 0)return;const s=o(),l=await(t==null?void 0:t(s));l!==void 0&&gce(l)},[n,r,t,o])}function Sce(e,t,n){const{registerEventListener:r}=cn(),o=_R(e);f.useEffect(()=>{if(t)return r(Kl.ClearRow,t)},[t,r]),f.useEffect(()=>{if(!n)return;const i=()=>{const s=o();n==null||n(s)};return r(Kl.ClearCell,i)},[r,n,o])}const Cce=(e,t,n,r)=>{const o=[];for(const[i,s]of e.entries())for(const[l,c]of s.entries())o.push({index:[i+n,t[l+Math.max(0,r-1)]],data:c});return o};function jce(e,t){const{selectedRow:n,selectedColumn:r}=cn();return f.useCallback(async i=>{var l,c;if(r===void 0||n===void 0||((l=document.activeElement)==null?void 0:l.tagName)==="INPUT")return;const s=(c=i.clipboardData)==null?void 0:c.getData("text/html");if(s){const u=vce(s),d=Cce(u,e,n,r);t==null||t(d)}},[n,r,t])}function kce(){const e=vs(Ob,{activationConstraint:{distance:10}}),t=vs(Lb,{activationConstraint:{delay:250,tolerance:5}}),n=vs(vd);return Pb(e,t,n)}const Ece=({transform:e})=>({...e,y:0});function _ce({children:e}){const t=kce();return a.jsx(gm,{sensors:t,collisionDetection:Nk,modifiers:[Ece],children:e})}const Ice="Use the arrow keys to navigate the table. Press enter to edit a cell. Press escape to exit edit mode.";function IR(e){return a.jsx(fle,{children:a.jsx(Rce,{...e})})}IR.defaultProps={rowHeight:40};function Rce({children:e,columns:t,itemCount:n,rowHeight:r,columnSizes:o,columnToKey:i,labelledBy:s,onCellResize:l=()=>{},onClearCells:c,onClearRow:u,onCopyCommand:d,onUndoCommand:p,onPasteCommand:h,onColumnReorder:m,onRowExpand:v=()=>{},HeadingComponent:g,NewColumnButtonComponent:b}){const y=f.useId(),x=f.useRef(null),w=f.useRef(null),{listRef:S,tableRef:k,setCursorMode:_,disabledKeyboardInteractions:I}=cn(),[P,z]=f.useState(()=>{}),{templateColumns:D,contentRowWidth:F,resizeCell:$}=Hle(o,t,l),Z=f.useCallback(()=>{I.has(ti.ExitEditMode)||_(je.Visual)},[I]);Bb([k],Z,!0);const ee=wce(t,d),W=jce(t,h),ue=f.useMemo(()=>({copy:ee,undo:p,expand:v}),[ee,p,v]),K=ece(t.length,n,k,w,ue);Sce(t,u,c);const B=f.useCallback(({index:N,style:xe})=>a.jsxs(nw,{style:xe,"aria-rowindex":N+2,children:[a.jsx(Lle,{rowIndex:N,columnIndex:0,onExpand:v,children:N+1}),e({index:N}),a.jsx(tw,{rowIndex:1/0,columnIndex:1/0,disabled:!0})]}),[n,e]),H=f.useCallback(({height:N})=>a.jsx(Tce,{height:N,width:"100%",itemSize:r,itemCount:n,overscanCount:4,onScroll:P,ref:S,children:B}),[r,n,S,B,P]);return f.useEffect(()=>(document.addEventListener("paste",W),()=>{document.removeEventListener("paste",W)}),[W]),a.jsxs(_ce,{children:[a.jsx(Yx,{id:y,children:a.jsx("p",{children:Ice})}),a.jsx(Ace,{"aria-labelledby":s,"aria-rowcount":n,"aria-colcount":t.length+2,"aria-describedby":y,role:"grid",gridTemplateColumns:D,contentRowWidth:F,rowHeight:r,tabIndex:0,onKeyDown:K,totalContentHeight:n*r,ref:k,children:a.jsx(Nce,{ref:x,type:"hover",children:a.jsxs(Pce,{children:[a.jsx(Gle,{headerRef:w,columns:t,columnToKey:i,onResize:$,onColumnReorder:m,HeadingComponent:g,NewColumnButtonComponent:b}),a.jsx(Dce,{role:"rowgroup",children:a.jsx(ule,{disableWidth:!0,children:H})}),a.jsx(uce,{sizeStr:D,scrollerRef:x,setOnScroll:z})]})})})]})}const Ace=C.div.attrs(e=>({style:{"--table-template-columns":e.gridTemplateColumns,"--table-content-width":e.contentRowWidth}})).withConfig({displayName:"TableEditor__Table",componentId:"sc-221cbe59-0"})(["--table-height:80vh;--table-row-height:","px;--table-inner-padding:0.5rem;--table-content-height:","px;background:",";border-radius:",";overflow:hidden;overflow-x:auto;border:1px solid ",";width:100%;position:relative;contain:paint;overscroll-behavior:contain;&:focus-visible{outline:none;box-shadow:0 0 0 2px ",";}"],e=>e.rowHeight,e=>e.totalContentHeight,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.colors.main),Pce=C.div.withConfig({displayName:"TableEditor__PercentageInsanityFix",componentId:"sc-221cbe59-1"})(["width:fit-content;min-width:100%;"]),Tce=C(lle).withConfig({displayName:"TableEditor__StyledFixedSizeList",componentId:"sc-221cbe59-2"})(["overflow-x:hidden !important;overflow-y:auto !important;"]),Dce=C.div.withConfig({displayName:"TableEditor__AutoSizeTamer",componentId:"sc-221cbe59-3"})(["height:min(var(--table-height),var(--table-content-height));width:100%;"]),Nce=C(Ia).withConfig({displayName:"TableEditor__RelativeScrollArea",componentId:"sc-221cbe59-4"})(["& ","{position:relative;}"],r_);function Oce(e,t,n){const r=[...e],[o]=r.splice(t,1);return r.splice(n,0,o),r}function ow(e){const{setIndicatorHidden:t,setDisabledKeyboardInteractions:n}=cn();f.useEffect(()=>(e.hideActiveIndicator&&t(!0),()=>{e.hideActiveIndicator&&t(!1)}),[e.hideActiveIndicator]),f.useEffect(()=>(e.disabledKeyboardInteractions&&n(e.disabledKeyboardInteractions),()=>{n(new Set)}),[e.disabledKeyboardInteractions])}function Lce({resource:e}){return f.useEffect(()=>{e.set(E.properties.datatype,Y.BOOLEAN)},[]),a.jsx(a.Fragment,{})}function Si({children:e,disabled:t,...n}){return a.jsxs(zce,{"aria-disabled":t,children:[a.jsx(Fce,{type:"radio",...n,disabled:t}),e]})}const zce=C.label.withConfig({displayName:"RadioInput__Label",componentId:"sc-74a43bf8-0"})(["display:grid;grid-template-columns:1em auto;gap:0.5rem;line-height:1;&:not([aria-disabled='true']){cursor:pointer;}&[aria-disabled='true']{color:",";}&:focus-within{color:",";}transition:",";"],e=>e.theme.colors.textLight,e=>e.theme.colors.main,Yt("color")),Fce=C.input.withConfig({displayName:"RadioInput__Input",componentId:"sc-74a43bf8-1"})(["display:grid;transform:translateY(-0.15em);place-items:center;appearance:none;margin:0;width:1.15em;background-color:",";border:solid 1px ",";border-radius:50%;aspect-ratio:1/1;transition:",";&:not(:disabled):checked,&:not(:disabled):hover{border-color:",";}&::before{content:'';background-color:",";width:75%;aspect-ratio:1/1;border-radius:50%;transform:scale(0);transition:",";}&:disabled::before{background-color:",";}&:checked::before{transform:scale(1);}&:not(:disabled){cursor:pointer;}&:focus{outline-color:",";}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,Yt("border-color"),e=>e.theme.colors.main,e=>e.theme.colors.main,Yt("transform"),e=>e.theme.colors.bg2,e=>e.theme.colors.main),RR=C.div.withConfig({displayName:"RadioInput__RadioGroup",componentId:"sc-74a43bf8-2"})(["display:flex;flex-direction:column;gap:0.5rem;"]),AR=e=>{const t={hour:"numeric",minute:"numeric"},n={day:"numeric",year:"numeric"},r=new Intl.DateTimeFormat("default",t),o=new Intl.DateTimeFormat("default",{...n,...e?t:{},month:"long"}),i=new Intl.DateTimeFormat("default",{...n,...e?t:{},month:"numeric"});return{longDateFormatter:o,numericDateFormatter:i,timeFormatter:r}},i1=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),PR=60*1e3,TR=60*PR,Mce=24*TR;function $ce(e,t){if(t){const i=Bce(e);if(i>=-60&&i<=60)return i1.format(i,"minute");const s=Hce(e);if(s>=-12&&s<=12)return i1.format(s,"hour")}const{longDateFormatter:n,timeFormatter:r}=AR(t),o=Uce(e);if(o>=-3&&o<=3){const i=`${i1.format(o,"day")}`;return t?`${i} at ${r.format(e)}`:i}return n.format(e)}function Bce(e){return Math.round((e.getTime()-Date.now())/PR)}function Hce(e){return Math.round((e.getTime()-Date.now())/TR)}function Uce(e){const t=new Date;t.setHours(0,0,0,0);const r=(e.getTime()-t.getTime())/Mce;return Math.floor(r)}const{instances:{dateFormats:s1}}=J;function mu(e,t,n){const{longDateFormatter:r,numericDateFormatter:o}=AR(n);switch(e){case s1.localLong:return r.format(t);case s1.localNumeric:return o.format(t);case s1.localRelative:return $ce(t,n);default:throw new Error(`Unknown formatting: ${e}`)}}const{instances:{dateFormats:Xr}}=J,Wce=1e3*60*60*15,a1=new Date(Date.now()-Wce);function Vce({value:e,onChange:t,withTime:n=!1}){return a.jsxs(qce,{children:[a.jsxs(l1,{children:[a.jsx(Si,{type:"radio",name:"date-format",value:Xr.localNumeric,checked:e===Xr.localNumeric,onChange:()=>t(Xr.localNumeric),children:"Numeric"}),a.jsx(c1,{children:mu(Xr.localNumeric,a1,n)})]}),a.jsxs(l1,{children:[a.jsx(Si,{type:"radio",name:"date-format",value:Xr.localLong,checked:e===Xr.localLong,onChange:()=>t(Xr.localLong),children:"Long"}),a.jsx(c1,{children:mu(Xr.localLong,a1,n)})]}),a.jsxs(l1,{children:[a.jsx(Si,{type:"radio",name:"date-format",value:Xr.localRelative,checked:e===Xr.localRelative,onChange:()=>t(Xr.localRelative),children:"Relative"}),a.jsx(c1,{children:mu(Xr.localRelative,a1,n)})]})]})}const qce=C.div.withConfig({displayName:"DateFormatPicker__Wrapper",componentId:"sc-292097ab-0"})(["display:flex;flex-direction:column;border:1px solid ",";border-radius:",";"],e=>e.theme.colors.bg2,e=>e.theme.radius),l1=C.div.withConfig({displayName:"DateFormatPicker__OptionWrapper",componentId:"sc-292097ab-1"})(["padding:","rem;&:not(:last-child){border-bottom:1px solid ",";}"],e=>e.theme.margin,e=>e.theme.colors.bg2),c1=C.span.withConfig({displayName:"DateFormatPicker__FormattedDate",componentId:"sc-292097ab-2"})(["color:",";font-style:italic;"],e=>e.theme.colors.textLight);function Gce({resource:e}){const[t,n]=f.useState(e.get(E.properties.datatype)===Y.TIMESTAMP),[r,o]=ne(e,J.properties.constraints.dateFormat,{commit:!0});return f.useEffect(()=>{const i=t?Y.TIMESTAMP:Y.DATE;(async()=>(await e.set(E.properties.datatype,i),await e.set(E.properties.isA,[X.classes.formattedDate]),r===void 0&&await e.set(X.properties.dateFormat,J.instances.dateFormats.localNumeric)))()},[r,t]),a.jsxs(f.Suspense,{children:[a.jsxs(Ko,{children:[a.jsx(yr,{onChange:n,checked:t}),"Include Time"]}),a.jsx(Vce,{value:r,onChange:o,withTime:t})]})}function Kce({resource:e}){return f.useEffect(()=>{e.set(E.properties.datatype,Y.ATOMIC_URL),e.set(E.properties.classtype,Ne.classes.file)},[]),a.jsx(a.Fragment,{})}const td=C.h2.withConfig({displayName:"FormGroupHeading",componentId:"sc-52a3f924-0"})(["font-size:1.1rem;margin-bottom:0.2rem;font-family:",";font-weight:bold;"],e=>e.theme.fontFamilyHeader);function Yce({resource:e}){const t=f.useId(),{error:n,setError:r,setTouched:o}=go(),[i,s]=ne(e,J.properties.datatype,{commit:!0}),[l,c]=Ro(e,J.properties.constraints.decimalPlaces,{commit:!0}),u=f.useCallback(async d=>{const p=d.target.value,h=Number.parseInt(p,10);if(h<0||h>20){r("Value must be between 0 and 20.",!0);return}else r(void 0);if(h===0?await s(J.datatypes.integer):await s(J.datatypes.float),isNaN(h))return await c(void 0);c(h)},[r]);return a.jsxs(a.Fragment,{children:[a.jsx(td,{as:"label",htmlFor:t,children:"Decimal Places"}),a.jsxs("div",{children:[a.jsx(Je,{$invalid:n!==void 0,children:a.jsx(nt,{id:t,type:"number",defaultValue:l,min:0,max:20,onBlur:o,onChange:u})}),n&&a.jsx(Rd,{children:n})]})]})}const DS=(e,t)=>{const n=Number.parseFloat(e);if(!Number.isNaN(n))return t?Math.floor(n):n};function Xce(e,t,n=!1){let r;return e!==void 0&&n&&(r=Number.isInteger(e)?void 0:"Value should be a round number."),t!==void 0&&n&&(r=Number.isInteger(e)?void 0:"Value should be a round number."),e!==void 0&&t!==void 0&&(r=e<t?void 0:"Min must be a less than max"),r}function Qce({round:e=!1,minValue:t,maxValue:n,invalid:r,onBlur:o,onChange:i}){const s=f.useCallback(c=>{const u=DS(c.target.value,e);i(u,n)},[i,n]),l=f.useCallback(c=>{const u=DS(c.target.value,e);i(t,u)},[i,t]);return a.jsxs(be,{center:!0,gap:"0.5rem",children:[a.jsx(Je,{$invalid:r,children:a.jsx(nt,{type:"number",max:n,placeholder:"min",defaultValue:t,onBlur:o,onChange:s})})," - ",a.jsx(Je,{$invalid:r,children:a.jsx(nt,{type:"number",placeholder:"max",min:t,defaultValue:n,onBlur:o,onChange:l})})]})}function DR({resource:e,minProp:t,maxProp:n,constraintClass:r}){const[o,i]=Ro(e,t),[s,l]=Ro(e,n),{error:c,setError:u,setTouched:d}=go(),p=f.useCallback((h,m)=>{i(h),l(m),h!==void 0||m!==void 0?e.addClasses(r):e.removeClasses(r);const v=Xce(h,m,!0);u(v),v||e.save()},[i,l,e]);return a.jsxs("div",{children:[a.jsx(Qce,{round:!0,maxValue:s,minValue:o,invalid:!!c,onBlur:d,onChange:p}),c&&a.jsx(Rd,{children:c})]})}const{numberFormats:Vi}=J.instances,Jce=f.lazy(()=>hc(()=>import("./chunk_CurrencyPicker.js"),[])),Zce=({resource:e})=>{const[t,n]=ne(e,X.properties.numberFormatting),[r]=Ro(e,X.properties.decimalPlaces),[o,i]=ne(e,E.properties.datatype),s=async l=>{n(l.target.value),l.target.value===Vi.currency?(await e.addClasses(X.classes.currencyProperty),await i(Y.FLOAT)):(e.removeClasses(X.classes.currencyProperty),e.remove(X.properties.currency))};return f.useEffect(()=>{e.addClasses(X.classes.formattedNumber),r===void 0&&e.set(E.properties.datatype,Y.FLOAT),t===void 0&&n(Vi.number)},[]),a.jsxs(f.Suspense,{fallback:a.jsx("div",{children:"loading..."}),children:[a.jsx(td,{children:"Number Format"}),a.jsxs(RR,{children:[a.jsx(Si,{name:"number-format",value:Vi.number,checked:t===Vi.number,onChange:s,children:"Number"}),a.jsx(Si,{name:"number-format",value:Vi.percentage,checked:t===Vi.percentage,onChange:s,children:"Percentage"}),a.jsx(Si,{name:"number-format",value:Vi.currency,checked:t===Vi.currency,onChange:s,children:"Currency"})]}),e.hasClasses(X.classes.currencyProperty)?a.jsx(Jce,{resource:e}):a.jsx(Yce,{resource:e}),a.jsx(td,{children:"Range"}),a.jsx(DR,{resource:e,minProp:X.properties.min,maxProp:X.properties.max,constraintClass:X.classes.rangeProperty})]})},eue={commit:!1},tue=new Set([Y.RESOURCEARRAY,Y.ATOMIC_URL]);function nue({resource:e}){const[t,n]=ne(e,E.properties.classtype,eue),[r,o]=ne(e,E.properties.datatype),i=s=>{o(s?Y.RESOURCEARRAY:Y.ATOMIC_URL)};return f.useEffect(()=>{tue.has(e.props.datatype)||o(Y.ATOMIC_URL)},[o]),a.jsxs(a.Fragment,{children:[a.jsxs(rue,{as:"label",children:[a.jsx("strong",{children:"Resource type:"}),a.jsx(Wr,{isA:E.classes.class,value:t,setSubject:n})]}),a.jsxs(Ko,{children:[a.jsx(yr,{onChange:i,checked:r===Y.RESOURCEARRAY}),"Allow multiple values"]})]})}const rue=C.label.withConfig({displayName:"RelationPropertyForm__Label",componentId:"sc-47b45b07-0"})(["display:flex;flex-direction:column;gap:0.5rem;cursor:pointer;"]),oue={commit:!1,validate:!1};function iue(e,t){return e.filter(n=>n!==t)}function sue({resource:e}){const t=Ce(),[n,r]=we(e,E.properties.allowsOnly,oue),o=f.useCallback(async s=>{await r([...n,s.subject]),await s.save()},[n,r]),i=f.useCallback(async s=>{t.getResourceLoading(s).destroy(),await r(iue(n,s))},[t,r,n]);return f.useEffect(()=>{e.addClasses(X.classes.selectProperty),e.set(E.properties.datatype,Y.RESOURCEARRAY),e.set(E.properties.classtype,X.classes.tag)},[]),a.jsxs(a.Fragment,{children:[a.jsx(be,{wrapItems:!0,children:n.map(s=>a.jsx(pE,{subject:s,onDelete:i},s))}),a.jsx(gE,{parent:e.subject,onNewTag:o})]})}const aue=({resource:e})=>{const[t,n]=f.useState(Y.STRING),r=async o=>{n(o.target.value),await e.set(E.properties.datatype,o.target.value,!1),await e.save()};return a.jsxs(a.Fragment,{children:[a.jsx(td,{children:"Text Format:"}),a.jsxs(RR,{children:[a.jsx(Si,{name:"text-format",value:Y.STRING,checked:t===Y.STRING,onChange:r,children:"Plain text"}),a.jsx(Si,{name:"text-format",value:Y.MARKDOWN,checked:t===Y.MARKDOWN,onChange:r,children:"Rich text"}),a.jsx(Si,{name:"text-format",value:Y.SLUG,checked:t===Y.SLUG,onChange:r,children:"Slug"})]}),a.jsx(td,{children:"Length"}),a.jsx(DR,{resource:e,minProp:X.properties.min,maxProp:X.properties.max,constraintClass:X.classes.rangeProperty})]})};function lue(e,t){return n=>e.get(n)??t}const cue=new Set([Y.STRING,Y.MARKDOWN,Y.SLUG]),uue=new Set([Y.INTEGER,Y.FLOAT]),due=new Set([Y.DATE,Y.TIMESTAMP]),iw=e=>{const t=e.props.datatype;if(cue.has(t))return"text";if(uue.has(t))return"number";if(t===Y.BOOLEAN)return"checkbox";if(due.has(t))return"date";if(t===Y.RESOURCEARRAY)return e.props.classtype===X.classes.tag||e.hasClasses(J.classes.constraintProperties.selectProperty)?"select":"relation";if(t===Y.ATOMIC_URL)return"relation";throw new Error(`Unknown datatype: ${t}`)},pue=()=>a.jsx("span",{children:"No Type selected"}),fue=lue(new Map([["text",aue],["number",Zce],["checkbox",Lce],["select",sue],["date",Gce],["file",Kce],["relation",nue]]),pue);function NR({resource:e,onSubmit:t,existingProperty:n,category:r}){const{error:o,setError:i,setTouched:s}=go("Required"),l=f.useMemo(()=>({handleValidationError(g){i(g?"Invalid Name":void 0)}}),[]),[c,u]=ne(e,E.properties.name,l),[d,p]=ne(e,E.properties.shortname,l),h=f.useCallback(g=>{const b=g.target.value,y=lo((b??"").trim());u(b),p(y)},[u,p]),m=f.useCallback(g=>{g.preventDefault(),t()},[t]);f.useEffect(()=>{n&&!c&&d&&(u(d),i(void 0)),c&&i(void 0)},[]);const v=fue(r);return a.jsxs(hue,{onSubmit:m,children:[a.jsxs("div",{children:[a.jsx(Je,{$invalid:!!o,children:a.jsx(nt,{id:"name-form",type:"text",value:c,onChange:h,placeholder:"New Column",onBlur:s})}),o&&a.jsx(Rd,{children:o})]}),a.jsx(v,{resource:e}),a.jsx(mue,{type:"submit"})]})}const hue=C.form.withConfig({displayName:"PropertyForm__Form",componentId:"sc-fcb8c743-0"})(["display:flex;flex-direction:column;gap:1rem;"]),mue=C.button.withConfig({displayName:"PropertyForm__HiddenSubmitButton",componentId:"sc-fcb8c743-1"})(["display:none;"]);function gue({resource:e,showDialog:t,bindShow:n}){const[r,o]=f.useState(!0),i=iw(e),s=f.useCallback(()=>{e.save()},[e]),[l,c,u]=Ht({bindShow:n,onSuccess:s});f.useEffect(()=>{t?c():u()},[t]);const d=f.useCallback(()=>{u(!0)},[u]);return a.jsx(Ad,{onValidationChange:o,children:a.jsxs(Ut,{...l,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"Edit Column"})}),a.jsx(Xt,{children:a.jsx(NR,{existingProperty:!0,resource:e,category:i,onSubmit:d})}),a.jsx(Yn,{children:a.jsx(oe,{onClick:d,disabled:!r,children:"Save"})})]})})}const Sc=f.createContext({tableClassSubject:ut,sorting:{prop:"",sortDesc:!0},setSortBy:()=>{},addItemsToHistoryStack:()=>{}}),vue=lc(a.jsx(bk,{}),"Edit column"),yue=e=>{const{tableClassSubject:t}=f.useContext(Sc),[n]=ne(e,pe.parent);return n!==t};function bue({resource:e}){const[t,n]=f.useState(!1),[r,o]=f.useState(!1),[i,s]=f.useState(!1),{tableClassSubject:l}=f.useContext(Sc),c=q(l),[u]=jt(c),[d]=jt(e),p=kt(),h=yue(e),m=f.useCallback(async()=>{const y=c.getArray(E.properties.recommends),x=c.getArray(E.properties.requires);await c.set(E.properties.recommends,y.filter(w=>w!==e.subject)),await c.set(E.properties.requires,x.filter(w=>w!==e.subject)),await c.save()},[c,e]),v=f.useCallback(async()=>{await m(),e.destroy()},[m]),g=f.useCallback(()=>{h?m():v()},[v,m,h]),b=f.useMemo(()=>[{id:"view",label:"View",onClick:()=>{p(lt(e.subject))},icon:a.jsx(Bu,{})},{id:"edit",label:"Edit",onClick:()=>n(!0),icon:a.jsx(oc,{}),disabled:!d},{id:"remove",label:"Remove",onClick:()=>o(!0),icon:a.jsx(ri,{}),disabled:!u}],[u,d,p,e]);return f.useEffect(()=>{r||s(!1)},[r]),a.jsxs(xue,{children:[a.jsx(xd,{trigger:vue,items:b}),a.jsx(gue,{resource:e,showDialog:t,bindShow:n}),a.jsx(lE,{title:i?"Delete property":"Remove column",confirmLabel:i?"Delete":"Remove",show:r,bindShow:o,theme:ah.Alert,onConfirm:g,children:a.jsxs(ge,{children:[a.jsxs("p",{children:["Remove ",a.jsx(Lt,{subject:e.subject})," from"," ",a.jsx(Lt,{subject:l})]}),a.jsx(gx,{resource:e}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:i,onChange:s}),"Delete property and its children"]})]})})]})}const xue=C.div.withConfig({displayName:"TableHeadingMenu__Wrapper",componentId:"sc-e6976e4d-0"})(["margin-left:auto;& > button{color:",";}"],e=>e.theme.colors.textLight);function wue(e,t,n,r){return t.prop===e.getSubject()?t.sortDesc?y$:b$:n?tm:Ea.get(r)??wb}const Sue=({column:e,dragListeners:t,dragAttributes:n})=>{const[r,o]=f.useState(!1),i=q(e.subject),[s]=rt(i),{setSortBy:l,sorting:c,tableClassSubject:u}=f.useContext(Sc),p=(q(u).props.requires??[]).includes(e.subject),h=wue(i,c,r,e.datatype),m=c.prop===i.subject,v=`${s||e.shortname}${p?"*":""}`;return a.jsx(a.Fragment,{children:a.jsxs(Cue,{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[a.jsx(kue,{...t,...n,children:a.jsx(h,{title:"Drag column"})}),a.jsx(jue,{onClick:()=>l(i.subject),bold:m,title:v,children:a.jsx("span",{"aria-hidden":!0,children:v})}),a.jsx(bue,{resource:i})]})})},Cue=C.div.withConfig({displayName:"TableHeading__Wrapper",componentId:"sc-8db0d250-0"})(["display:flex;align-items:center;gap:0.5rem;width:100%;"]),jue=C.button.withConfig({displayName:"TableHeading__NameButton",componentId:"sc-8db0d250-1"})(["background:none;border:none;color:currentColor;cursor:pointer;font-weight:",";overflow:hidden;text-overflow:ellipsis;padding:0;"],e=>e.bold?"bold":"normal"),kue=C.button.withConfig({displayName:"TableHeading__DragIconButton",componentId:"sc-8db0d250-2"})(["background:none;color:currentColor;display:flex;align-items:center;border:none;height:1rem;padding:0;cursor:grab;&:active{cursor:grabbing;}svg{color:currentColor;max-width:1rem;min-width:1rem;flex:1;}"]),NS={commit:!0};function Eue(e){const t=Ce(),[n,r]=we(e,J.properties.requires,NS),[o,i]=we(e,J.properties.recommends,NS),[s,l]=f.useState([]),c=f.useCallback(async(u,d)=>{const h=Oce(s,u,d).map(g=>g.subject),m=h.filter(g=>n.includes(g)),v=h.filter(g=>o.includes(g));await r(m),await i(v)},[n,o,i,r,s]);return f.useEffect(()=>{const u=[...n,...o];Promise.all(u.map(d=>t.getProperty(d))).then(d=>{l(d)})},[n,o]),{columns:s,reorderColumns:c}}function OR(e,t,n,r){const[o,i]=f.useState(0),{drive:s}=Le(),l=f.useMemo(()=>({parents:s,filters:t?{[J.properties.isA]:t}:void 0}),[s,t]),{results:c}=Ca(e,l),u=f.useCallback(d=>{if(d.key==="Escape"){d.preventDefault(),n(!1);return}if(d.key!=="Tab"){if(d.stopPropagation(),d.key==="ArrowUp"){d.preventDefault(),i(p=>Math.max(0,p-1));return}if(d.key==="ArrowDown"){d.preventDefault(),i(p=>Math.min(c.length-1,p+1));return}if(d.key==="Enter"){d.preventDefault(),d.stopPropagation(),r(c[o]);return}i(0)}},[c,r,o]);return{results:c,selectedIndex:o,handleKeyDown:u}}function sw({resource:e,children:t,...n}){const r=uo(),o=f.useMemo(()=>{try{return lt(e.getSubject())}catch{return"#"}},[e]),i=s=>{s.preventDefault(),r(o)};try{return a.jsx(_ue,{href:o,onClick:i,...n,children:t})}catch{return a.jsx(a.Fragment,{children:e.getSubject()})}}const _ue=C.a.withConfig({displayName:"SimpleResourceLink__StyledAnchor",componentId:"sc-235b4be0-0"})(["text-decoration:none;&:hover,&:focus-visible{text-decoration:underline;}"]);function Iue({subject:e}){const t=q(e),[n]=rt(t);return a.jsxs(Rue,{resource:t,children:[a.jsx("span",{children:"@"})," ",n]})}const Rue=C(sw).withConfig({displayName:"AgentCell__StyledLink",componentId:"sc-47b5e29c-0"})(["background-color:",";padding-inline:8px;padding-block:1px;border-radius:40px;color:",";text-decoration:none;span{color:",";}:hover{box-shadow:0px 0px 0px 1px ",";}"],e=>Aue(e.theme.colors.main,e.theme.darkMode),e=>OS(e.theme.colors.main,e.theme.darkMode),e=>e.theme.colors.textLight,e=>OS(e.theme.colors.main,e.theme.darkMode)),LR=e=>cu(.92,vb(e)),zR=e=>cu(.25,vb(e)),OS=(e,t)=>t?LR(e):zR(e),Aue=(e,t)=>t?zR(e):LR(e);function Pue({subject:e}){const t=q(e),[n]=rt(t),[r]=ne(t,Ne.properties.mimetype),o=vE.has(r??""),i=yE(r??"");return a.jsxs(Due,{children:[o?a.jsx(LS,{resource:t,tabIndex:-1,"aria-hidden":!0,children:a.jsx(Tue,{subject:e,alt:n,loading:"lazy",sizeIndication:"100px"})}):a.jsx(i,{}),a.jsx(LS,{resource:t,children:n})]})}const Tue=C(cb).withConfig({displayName:"FileCell__Img",componentId:"sc-4dde0089-0"})(["width:calc(var(--table-row-height) - 6px);height:calc(var(--table-row-height) - 6px);aspect-ratio:1/1;object-fit:cover;border-radius:5px;vertical-align:middle;"]),Due=C.div.withConfig({displayName:"FileCell__Wrapper",componentId:"sc-4dde0089-1"})(["display:flex;align-items:center;gap:0.5rem;color:",";"],e=>e.theme.colors.main),LS=C(sw).withConfig({displayName:"FileCell__StyledLink",componentId:"sc-4dde0089-2"})(["display:flex;height:fit-content;align-items:center;"]);function FR({subject:e}){const n=q(e).matchClass({[E.classes.agent]:Iue,[Ne.classes.file]:Pue},Nue);return a.jsx(n,{subject:e})}function Nue({subject:e}){const t=q(e),[n]=rt(t);return a.jsx(sw,{resource:t,children:n})}const MR=C.div.withConfig({displayName:"CellComponents__AbsoluteCell",componentId:"sc-387b34f5-0"})(["position:absolute;display:flex;align-items:center;z-index:10;left:0;top:0;background-color:",";box-shadow:",";border:2px solid ",";height:fit-content;width:100%;padding-inline:var(--table-inner-padding);padding-block:3px;min-height:40px;"],e=>e.theme.colors.bg,e=>e.theme.boxShadowSoft,e=>e.theme.colors.main),$R=C(lx).withConfig({displayName:"CellComponents__SearchPopover",componentId:"sc-387b34f5-1"})(["padding:1rem;border:1px solid ",";display:flex;flex-direction:column;gap:1rem;"],e=>e.theme.colors.bg2),BR=C.div.withConfig({displayName:"CellComponents__SearchResultWrapper",componentId:"sc-387b34f5-2"})(["height:min(90vh,20rem);width:min(90vw,35rem);overflow-x:hidden;overflow-y:auto;ol{padding:0;margin:0;}li{list-style:none;&[data-selected='true'] button{background:",";color:white;svg{color:white;}}}"],e=>e.theme.colors.main),HR=C(ox).withConfig({displayName:"CellComponents__PopoverTrigger",componentId:"sc-387b34f5-3"})(["border:none;background:none;color:",";display:inline-flex;gap:1ch;align-items:center;user-select:none;cursor:pointer;"],e=>e.theme.colors.main),Oue=e=>{const t=q(e),n=q(t.props.classtype),r=(n==null?void 0:n.subject)!==ut;return{classType:n,hasClassType:r}};function Lue({value:e,onChange:t,property:n,resource:r}){const o=q(e),{classType:i,hasClassType:s}=Oue(n),[l]=rt(o),[c,u]=f.useState(!0),{setCursorMode:d}=cn(),p=f.useRef(null),[h,m]=f.useState(""),v=f.useMemo(()=>c?{disabledKeyboardInteractions:new Set([ti.ExitEditMode])}:{},[c]);ow(v);const g=f.useCallback(D=>{D.preventDefault(),D.stopPropagation(),m(D.target.value)},[]),b=f.useCallback(D=>{t(D),u(!1)},[t]),y=f.useCallback(D=>{u(D),D||d(je.Visual)},[d]),{results:x,selectedIndex:w,handleKeyDown:S}=OR(h,s?i.subject:void 0,u,b),k=f.useCallback(D=>{const F=D[0];F&&(t(F),u(!1))},[t,u]),_=f.useMemo(()=>a.jsxs(HR,{children:[a.jsx(oc,{})," ",o.subject===ut?`select ${s?i.title:"resource"}`:l]}),[l,o,i,s]);f.useEffect(()=>{p.current&&p.current.scrollIntoView({block:"nearest"})},[w]);const I=s?`Search ${i.title}`:"Search...",P=x.length===0&&i.subject===Ne.classes.file,z=x.length===0&&i.subject!==Ne.classes.file;return a.jsxs($R,{modal:!0,Trigger:_,open:c,onOpenChange:y,noLock:!0,children:[a.jsx(Je,{children:a.jsx(nt,{type:"search",value:h,placeholder:I,onChange:g,onKeyDown:S})}),a.jsxs(BR,{children:[x.length>0&&a.jsx("ol",{children:x.map((D,F)=>a.jsx("li",{"data-selected":F===w,ref:F===w?p:null,children:a.jsx(Fue,{subject:D,onClick:b})},D))}),z&&"No results",P&&a.jsx(Mue,{cellResource:o,onChange:t,row:r,onFilesUploaded:k})]})]})}function zue({value:e}){return e?a.jsx(FR,{subject:e}):a.jsx(a.Fragment,{})}function Fue({subject:e,onClick:t}){const n=q(e),[r]=rt(n),[[o]]=we(n,E.properties.isA),i=No(o),s=f.useCallback(()=>{t(e)},[e]);return a.jsxs(Bue,{onClick:s,tabIndex:-1,children:[a.jsx(i,{}),r]})}function Mue({cellResource:e,onFilesUploaded:t,row:n,onChange:r}){const[o]=ne(e,Ne.properties.mimetype),[i]=ne(e,Ne.properties.downloadUrl),[s]=ne(e,Ne.properties.filename),[l]=ne(e,E.properties.description),c=o==null?void 0:o.startsWith("image/");return o?a.jsxs(Uue,{children:[c&&a.jsx(Vue,{src:i??"",alt:l??""}),c?null:a.jsx(Me,{subject:e.subject,children:s}),a.jsx(Wue,{title:"Clear",onClick:()=>r(void 0),children:a.jsx(xb,{})})]}):a.jsx(Hue,{parentResource:n,onFilesUploaded:t})}const $ue={Edit:Lue,Display:zue},Bue=C.button.withConfig({displayName:"AtomicURLCell__ResultButton",componentId:"sc-e4b6f319-0"})(["display:flex;width:100%;align-items:center;gap:0.5rem;background:none;border:none;color:currentColor;cursor:pointer;padding:0.3rem;border-radius:",";&:hover{background:",";color:white;svg{color:white;}}svg{color:",";}"],e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.textLight),Hue=C(Zm).withConfig({displayName:"AtomicURLCell__StyledFileDropzoneInput",componentId:"sc-e4b6f319-1"})(["height:100%;"]),Uue=C.div.withConfig({displayName:"AtomicURLCell__ViewerWrapper",componentId:"sc-e4b6f319-2"})(["display:flex;justify-content:center;align-items:center;height:100%;position:relative;padding:","rem;border-radius:",";border:1px solid ",";"],e=>e.theme.margin,e=>e.theme.radius,e=>e.theme.colors.bg2),Wue=C(ot).withConfig({displayName:"AtomicURLCell__ClearFileButton",componentId:"sc-e4b6f319-3"})(["position:absolute;height:fit-content;top:","rem;right:","rem;"],e=>e.theme.margin,e=>e.theme.margin),Vue=C.img.withConfig({displayName:"AtomicURLCell__PreviewImg",componentId:"sc-e4b6f319-4"})(["height:100%;border-radius:",";"],e=>e.theme.radius);function que({value:e,onChange:t}){return a.jsx(yr,{autoFocus:!0,checked:e,onChange:t})}function Gue({value:e,onChange:t}){return a.jsx(yr,{checked:e,onChange:t})}const Kue={Edit:que,Display:Gue},Cc=C.input.withConfig({displayName:"InputBase",componentId:"sc-5cf37e3d-0"})(["position:absolute;inset:0;padding-inline:var(--table-inner-padding);background-color:",";color:",";"],e=>e.theme.colors.bg,e=>e.theme.colors.text);function Yue({value:e,onChange:t}){const[n,r]=f.useState(e),o=f.useCallback(i=>{r(i.target.value);try{Do(i.target.value,Y.DATE),t(i.target.value)}catch{}},[t]);return f.useEffect(()=>{r(e)},[e]),a.jsx(Cc,{type:"date",value:n,autoFocus:!0,onChange:o})}const Xue=(e,t)=>{if(ts(e)){const n=`${e}T00:00:00`,r=new Date(n);return mu(t,r,!1)}};function Que({value:e,property:t}){const n=q(t),[r]=ne(n,J.properties.constraints.dateFormat),o=Xue(e,r??J.instances.dateFormats.localNumeric);return a.jsx(a.Fragment,{children:o})}const Jue={Edit:Yue,Display:Que};function Zue({value:e,onChange:t}){const[n,r]=OI(e,t);return a.jsx(Cc,{type:"datetime-local",value:n,autoFocus:!0,onChange:r})}const u1=(e,t,n)=>{if(Wh(e)){const r=new Date(e);return mu(t,r,n)}};function ede({value:e,property:t}){const n=q(t),[r]=ne(n,J.properties.constraints.dateFormat),[o,i]=f.useState(()=>u1(e,r??J.instances.dateFormats.localNumeric,!0));return f.useEffect(()=>{if(i(u1(e,r??J.instances.dateFormats.localNumeric,!0)),r===J.instances.dateFormats.localRelative){const s=setInterval(()=>{i(u1(e,J.instances.dateFormats.localRelative,!0))},6e4);return()=>clearInterval(s)}},[e,r]),a.jsx(a.Fragment,{children:o})}const tde={Edit:Zue,Display:ede},UR=C.span.withConfig({displayName:"ProgressBar",componentId:"sc-818fe261-0"})(["--off:transparent;--on:",";position:absolute;background-image:",";height:4px;width:100%;left:0;bottom:0px;"],({theme:e})=>e.colors.main,e=>`linear-gradient(to right, var(--on), var(--on) ${e.percentage}%, var(--off) ${e.percentage}%)`);function WR(e,t,n,r){if(e===void 0)return"";const o=nde(t);if(n===J.instances.numberFormats.percentage)return new Intl.NumberFormat("default",{style:"percent",minimumFractionDigits:o}).format(e/100);if(n===J.instances.numberFormats.currency)try{return new Intl.NumberFormat("default",{style:"currency",currency:r,currencyDisplay:"narrowSymbol",currencySign:"accounting"}).format(e)}catch(s){return console.error(s),e.toString()}return new Intl.NumberFormat("default",{style:"decimal",minimumFractionDigits:o}).format(e)}function nde(e){if(e!==void 0)return Math.min(20,Math.max(0,e))}const{numberFormats:rde}=J.instances;function ode({value:e,onChange:t}){return a.jsx(Cc,{value:e,type:"number",autoFocus:!0,onChange:n=>{const r=Number.parseFloat(n.target.value);return Number.isNaN(r)?t(void 0):t(r)}})}function ide({value:e,property:t}){const n=q(t),[r]=ne(n,J.properties.constraints.numberFormatting),[o]=Ro(n,J.properties.constraints.decimalPlaces),[i]=ne(n,X.properties.currency),s=r===rde.percentage,l=WR(e,o,r,i);return a.jsxs(a.Fragment,{children:[a.jsx(ade,{children:e!==void 0&&l}),s&&a.jsx(UR,{percentage:e})]})}const sde={Edit:ode,Display:ide},ade=C.span.withConfig({displayName:"FloatCell__Aligned",componentId:"sc-1c14da55-0"})(["text-align:end;display:inline-block;width:100%;"]),{numberFormats:lde}=J.instances;function cde({value:e,onChange:t}){return a.jsx(Cc,{value:e,type:"number",autoFocus:!0,onChange:n=>{const r=Number.parseInt(n.target.value);return Number.isNaN(r)?t(void 0):t(r)}})}function ude({value:e,property:t}){const n=q(t),[r]=ne(n,J.properties.constraints.numberFormatting),o=r===lde.percentage;return a.jsxs(a.Fragment,{children:[a.jsx(pde,{children:WR(e,0,r)}),o&&a.jsx(UR,{percentage:e})]})}const dde={Edit:cde,Display:ude},pde=C.span.withConfig({displayName:"IntegerCell__Aligned",componentId:"sc-9a72ed1a-0"})(["text-align:end;display:inline-block;width:100%;"]),Vy="0.5rem",fde=[];function hde(e,t,n){return t.filter(r=>!n.includes(r)).map(r=>{const o=e.getResourceLoading(r),i=(o==null?void 0:o.get(E.properties.shortname))??r;return{subject:r,title:i}})}function mde({value:e,property:t,onChange:n}){const r=e??fde,o=Ce(),i=q(t),[s]=we(i,E.properties.allowsOnly),[l,c]=f.useState(""),u=f.useMemo(()=>hde(o,s,r).filter(_=>_.title.includes(l)).map(_=>_.subject),[o,s,r,l]),[d,p]=f.useState(!0),[h,m]=f.useState(0),{activeCellRef:v}=cn(),g=f.useMemo(()=>{const k=new Set([ti.EditNextRow]);return d&&k.add(ti.ExitEditMode),{disabledKeyboardInteractions:k,hideActiveIndicator:!0}},[r,d]);ow(g);const b=f.useCallback(k=>{c(lo(k.target.value)),m(0)},[]),y=f.useCallback(k=>{n(Array.from(new Set([...r,k])))},[r,n]),x=f.useCallback(k=>{n(r.filter(_=>_!==k))},[r,n]),w=f.useCallback(k=>{m(_=>wm(_+k,u.length))},[u]);f.useEffect(()=>{var k;d||(k=v.current)==null||k.focus()},[d]);const S=f.useCallback(k=>{switch(k.key){case"ArrowUp":k.preventDefault(),w(-1);break;case"ArrowDown":k.preventDefault(),w(1);break;case"Enter":k.preventDefault(),y(u[h]);break;case"Escape":k.preventDefault(),p(!1);break}},[w,u,h,d]);return a.jsx(MR,{children:a.jsxs(be,{gap:Vy,center:!0,wrapItems:!0,children:[r.map(k=>a.jsx(Em,{subject:k,children:a.jsx(yde,{title:"remove tag",onClick:()=>x(k),children:a.jsx(xb,{})})},k)),a.jsx(lx,{modal:!0,defaultOpen:!0,noLock:!0,open:d,onOpenChange:p,Trigger:a.jsx(ot,{title:"Add tag",as:ox,children:a.jsx(vde,{})}),children:a.jsxs(bde,{onKeyDown:S,children:[a.jsx(wde,{children:a.jsx(nt,{placeholder:"Filter tags...",onChange:b})}),a.jsx(xde,{children:a.jsx(be,{wrapItems:!0,gap:Vy,children:u.map((k,_)=>a.jsx(vq,{subject:k,onClick:y,selected:_===h},k))})})]})})]})})}function gde({value:e}){return e?a.jsx(be,{gap:Vy,children:e.map(t=>a.jsx(Em,{subject:t},t))}):a.jsx(a.Fragment,{})}const vde=C(ur).withConfig({displayName:"SelectCell__StyledIcon",componentId:"sc-9a2bd419-0"})(["animation:"," 0.1s ease-in-out;color:",";"],dx,e=>e.theme.colors.textLight),yde=C(ot).withConfig({displayName:"SelectCell__TagIconButton",componentId:"sc-9a2bd419-1"})(["height:unset;width:unset;padding:unset;color:var(--tag-dark-color);background-blend-mode:lighten;&:not([disabled]):hover,&:not([disabled]):focus{transform:scale(1.2);background-color:unset;}"]),bde=C.div.withConfig({displayName:"SelectCell__Content",componentId:"sc-9a2bd419-2"})(["width:min(40ch,90vh);border-radius:",";"],e=>e.theme.radius),xde=C.div.withConfig({displayName:"SelectCell__ResultWrapper",componentId:"sc-9a2bd419-3"})(["padding:","rem;"],e=>e.theme.margin),wde=C(Je).withConfig({displayName:"SelectCell__SearchInputWrapper",componentId:"sc-9a2bd419-4"})(["border-bottom-left-radius:0;border-bottom-right-radius:0;"]),VR={Edit:mde,Display:gde},Sde=e=>{const t=q(e),n=q(t.props.classtype),r=(n==null?void 0:n.subject)!==ut;return{classType:n,hasClassType:r}};function Cde({value:e,onChange:t,property:n}){const r=Array.isArray(e)?e:[],{classType:o,hasClassType:i}=Sde(n),[s,l]=f.useState(!0),{setCursorMode:c,activeCellRef:u}=cn(),d=f.useRef(null),[p,h]=f.useState(""),m=f.useMemo(()=>{const P=new Set([ti.EditNextRow]);return s&&P.add(ti.ExitEditMode),{disabledKeyboardInteractions:P,hideActiveIndicator:!0}},[r,s]);ow(m);const v=f.useCallback(P=>{P.preventDefault(),P.stopPropagation(),h(P.target.value)},[]),g=f.useCallback(P=>{P&&(r.includes(P)?t(r.filter(z=>z!==P)):t([...r,P]))},[t,r]),b=P=>{t(r.filter(z=>z!==P))},y=f.useCallback(P=>{l(P)},[c]),{results:x,selectedIndex:w,handleKeyDown:S}=OR(p,i?o.subject:void 0,l,g),k=f.useMemo(()=>a.jsx(HR,{children:a.jsx(ot,{title:"Add resource",children:a.jsx(nm,{})})}),[]);f.useEffect(()=>{var P;s||(P=u.current)==null||P.focus()},[s]),f.useEffect(()=>{d.current&&d.current.scrollIntoView({block:"nearest"})},[w]);const _=i?`Search ${o.title}`:"Search...",I=x.length===0&&o.subject!==J.classes.file;return a.jsx(MR,{children:a.jsxs(be,{wrapItems:!0,gap:"1ch",children:[e==null?void 0:e.map(P=>a.jsx(jde,{subject:P,onRemove:b},P)),a.jsxs($R,{modal:!0,Trigger:k,open:s,onOpenChange:y,noLock:!0,children:[a.jsx(Je,{children:a.jsx(nt,{type:"search",value:p,placeholder:_,onChange:v,onKeyDown:S})}),a.jsxs(BR,{children:[x.length>0&&a.jsx("ol",{children:x.map((P,z)=>a.jsx("li",{"data-selected":z===w,ref:z===w?d:null,children:a.jsx(Ede,{subject:P,onClick:g,selected:r.includes(P)})},P))}),I&&"No results"]})]})]})})}function jde({subject:e,onRemove:t}){const n=q(e);return a.jsxs(_de,{children:[a.jsx(Me,{clean:!0,subject:n.subject,children:n.title}),a.jsx(ot,{title:`remove ${n.title}`,onClick:()=>t(e),children:a.jsx(xb,{})})]})}function kde({value:e}){return!e||!Array.isArray(e)?a.jsx(a.Fragment,{}):a.jsx("div",{children:a.jsx(Td,{subjects:e,RenderComp:FR})})}function Ede({subject:e,onClick:t,selected:n}){const r=q(e),[o]=rt(r),[[i]]=we(r,J.properties.isA),s=No(i);return a.jsxs(Ide,{onClick:()=>t(e),tabIndex:-1,children:[a.jsx(yr,{checked:n,onChange:()=>{}}),a.jsx(s,{}),o]})}const qR={Edit:Cde,Display:kde},_de=C.span.withConfig({displayName:"MultiRelationCell__ResourceItemButtonWrapper",componentId:"sc-7bc61b1c-0"})(["display:inline-flex;padding-inline:1ch;align-items:center;border:1px solid ",";color:",";border-radius:",";"],e=>e.theme.colors.main,e=>e.theme.colors.mainDark,e=>e.theme.radius),Ide=C.button.withConfig({displayName:"MultiRelationCell__ResultButton",componentId:"sc-7bc61b1c-1"})(["display:flex;width:100%;align-items:center;gap:0.5rem;background:none;border:none;color:currentColor;cursor:pointer;padding:0.3rem;border-radius:",";&:hover{background:",";color:white;svg{color:white;}}svg{color:",";}"],e=>e.theme.radius,e=>e.theme.colors.main,e=>e.theme.colors.textLight);function Rde(e){const t=q(e.property);return iw(t)==="select"?a.jsx(VR.Edit,{...e}):a.jsx(qR.Edit,{...e})}function Ade(e){const t=q(e.property);return iw(t)==="select"?a.jsx(VR.Display,{...e}):a.jsx(qR.Display,{...e})}const Pde={Edit:Rde,Display:Ade};function Tde({value:e,onChange:t}){const n=f.useCallback(r=>{const o=r.target.value.toLowerCase().replace(/\s/g,"-");t(o)},[t]);return a.jsx(Cc,{value:e,autoFocus:!0,onChange:n})}function Dde({value:e}){return a.jsx(a.Fragment,{children:e})}const Nde={Edit:Tde,Display:Dde};function Ode({value:e,onChange:t}){return a.jsx(Cc,{value:e,autoFocus:!0,onChange:n=>t(n.target.value)})}function Lde({value:e}){return a.jsx(a.Fragment,{children:e})}const GR={Edit:Ode,Display:Lde},zde=new Map([[Y.STRING,GR],[Y.SLUG,Nde],[Y.ATOMIC_URL,$ue],[Y.RESOURCEARRAY,Pde],[Y.INTEGER,dde],[Y.FLOAT,sde],[Y.BOOLEAN,Kue],[Y.TIMESTAMP,tde],[Y.DATE,Jue]]),Fde=new Map([[Y.INTEGER,kl.End],[Y.FLOAT,kl.End],[Y.DATE,kl.End]]),zS=e=>{try{return new URL(e),!0}catch{return!1}};function KR(e,t,n){const r="";switch(n){case Y.STRING:case Y.SLUG:case Y.MARKDOWN:return`${r}${t}`;case Y.INTEGER:return Number.parseInt(`${r}${Number.isNaN(Number.parseInt(t))?"":t}`);case Y.FLOAT:return Number.parseFloat(`${r}${Number.isNaN(Number.parseFloat(t))?"":t}`);case Y.ATOMIC_URL:return zS(t)?t:e;case Y.TIMESTAMP:return Number.isNaN(Number.parseInt(t,10))?e:Number.parseInt(t,10);case Y.DATE:return/^\d{4}-\d{2}-\d{2}/.test(t)?t:e;case Y.RESOURCEARRAY:{const o=t.split(",");return o.every(zS)?o:e}case Y.BOOLEAN:return t==="true"||t==="false"?t==="true":void 0;default:return e}}var FS;(function(e){e[e.ValueChange=0]="ValueChange",e[e.ResourceCreated=1]="ResourceCreated",e[e.ResourceDeleted=2]="ResourceDeleted"})(FS||(FS={}));const YR=e=>!Array.isArray(e)&&e.type===0,Mde=e=>!Array.isArray(e)&&e.type===1;function aw(e,t){return{type:0,subject:e.subject,property:t,previousValue:e.get(t)}}function $de(e){return{type:1,subject:e.subject}}function Bde(e){return{type:2,subject:e.subject,propVals:e.getPropVals()}}async function Hde(e,t){const n=t.getResourceLoading(e.subject);await n.set(e.property,e.previousValue,!1),await n.save()}async function Ude(e,t){return await t.getResourceLoading(e.subject).destroy(),!0}async function Wde(e,t){const n=t.getResourceLoading(e.subject,{newResource:!0});for(const[r,o]of e.propVals)await n.set(r,o,!1);return await n.save(),!0}async function MS(e,t){switch(e.type){case 0:return Hde(e,t);case 1:return Ude(e,t);case 2:return Wde(e,t)}}const Vde=(e,t)=>{const n=YR(t)&&t.subject===e.subject&&t.property===e.property,r=Mde(t)&&t.subject===e.subject;return n||r};function qde(e,t){const n=t[t.length-1];return n&&YR(e)&&Vde(e,n)?t:[...t,e]}function Gde(e,t){return[...t,e]}function Kde(e){const t=Ce(),[n,r]=f.useState([]),o=f.useCallback(s=>{r(l=>Array.isArray(s)?Gde(s,l):qde(s,l))},[]),i=f.useCallback(async()=>{const s=n[n.length-1];let l=!1;if(s){if(Array.isArray(s))for(const c of s)await MS(c,t)&&(l=!0);else await MS(s,t)&&(l=!0);r(c=>c.slice(0,c.length-1)),l&&e()}},[n,t,e]);return{addItemsToHistoryStack:o,undoLastItem:i}}function Yde(e,t){const{cursorMode:n,selectedColumn:r,selectedRow:o}=cn();return n===je.Edit&&r===t&&o===e}const Xde={commitDebounce:0,commit:!1,validate:!1};function Qde({columnIndex:e,rowIndex:t,resource:n,property:r,onEditNextRow:o}){const{setActiveCell:i}=cn(),{addItemsToHistoryStack:s}=f.useContext(Sc),[l,c]=x7(async()=>{await n.save()},200,[n]),[u,d]=Jo(n,r.subject,Xde),[p,h]=Jo(n,qn.properties.createdAt,{commit:!1,commitDebounce:0}),m=r.datatype,v=Yde(t,e),g=f.useMemo(()=>zde.get(m)??GR,[m]),b=Fde.get(m)??kl.Start,y=f.useCallback(async S=>{p||await h(Date.now()),s(aw(n,r.subject)),await d(S),l()},[d,h,p,n,r,l]),x=f.useCallback(S=>{y(KR(void 0,S,m))},[y,m]),w=f.useCallback(()=>{c||(o==null||o(),n.getPropVals().size>2&&i(t+1,e))},[c,i,t,e]);return a.jsx(tw,{rowIndex:t,columnIndex:e,align:b,onEnterEditModeWithCharacter:x,onEditNextRow:w,children:v?a.jsx(g.Edit,{value:u,onChange:y,property:r.subject,resource:n}):a.jsx(a.Fragment,{children:a.jsx(g.Display,{value:u,onChange:y,property:r.subject})})})}const XR=(e=15)=>{const t="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n},QR=(e,t)=>`${e}${`/${t}/`}${XR(15)}`;function Jde(e,t){const[n,r]=f.useState(t);n.some((o,i)=>o!==t[i])&&(r(t),e())}function Zde(e,t){const n=Ce(),{cursorMode:r,selectedColumn:o,selectedRow:i}=cn(),[s,l]=f.useState(!1),c=f.useCallback(()=>{s&&t()},[t,s]);return Jde(()=>{s&&t()},[i,o]),f.useEffect(()=>{s&&r!==je.Edit&&t()},[s,r]),f.useEffect(()=>n.on(bi.ResourceSaved,u=>{!s&&u.subject===e.subject&&l(!0)}),[e,n,s]),c}const epe=C(uk).withConfig({displayName:"TableRow__WarningIcon",componentId:"sc-fff06550-0"})(["color:",";"],e=>e.theme.colors.warning),tpe=a.jsx(epe,{title:"Row is incomplete or has invalid data"}),JR=f.memo(Qde);function ZR(e,t){const{setMarkings:n}=cn();f.useEffect(()=>(e.commitError&&n(r=>{const o=new Map(r);return o.set(t,tpe),o}),()=>{n(r=>{const o=new Map(r);return o.delete(t),o})}),[e,t])}function npe({collection:e,index:t,columns:n}){const r=w7(e,t);return ZR(r,t),r.subject===ut?a.jsx(a.Fragment,{children:n.map((o,i)=>a.jsx(eA,{delay:i*100,title:"loading"},o.subject))}):a.jsx(a.Fragment,{children:n.map((o,i)=>a.jsx(JR,{rowIndex:t,columnIndex:i+1,resource:r,property:o},o.subject))})}const rpe={newResource:!0};function ope({index:e,columns:t,parent:n,invalidateTable:r}){const[o]=f.useState(()=>QR(n.subject,"row")),[i,s]=f.useState(!0),l=q(o,rpe),c=Zde(l,r);return ZR(l,e),f.useEffect(()=>{l.subject!==ut&&l.set(E.properties.parent,n.subject).then(()=>l.set(E.properties.isA,[n.props.classtype])).then(()=>{s(!1)})},[l.subject]),i?a.jsx(a.Fragment,{children:t.map((u,d)=>a.jsx(eA,{delay:d*100},u.subject))}):a.jsx(a.Fragment,{children:t.map((u,d)=>a.jsx(JR,{rowIndex:e,columnIndex:d+1,resource:l,property:u,onEditNextRow:c},u.subject))})}const ipe=ni(["from{background-color:var(--from-color);}to{background-color:var(--to-color);}"]),eA=C.div.withConfig({displayName:"TableRow__Loader",componentId:"sc-fff06550-1"})(["width:100%;--from-color:",";--to-color:",";animation:0.8s ","ms ease-in-out infinite alternate ",";"],e=>e.theme.colors.bg,e=>e.theme.colors.bg1,e=>e.delay,ipe),spe=J.properties.commit.createdAt,ape=30,$S={prop:spe,sortDesc:!1},lpe=()=>f.useReducer((e,t)=>e.prop===t&&e.sortDesc?$S:e.prop===t?{...e,sortDesc:!0}:{prop:t,sortDesc:!1},$S);function cpe(e){const[t,n]=lpe(),[r]=Io(e,E.properties.classtype),o=q(r),i=f.useMemo(()=>({property:E.properties.parent,value:e.subject,sort_by:t.prop,sort_desc:t.sortDesc}),[e.subject,t.prop,t.sortDesc]);return{tableClass:o,sorting:t,setSortBy:n,...Qo(i,{pageSize:ape,server:new URL(e.subject).origin})}}async function nd(e,t){const n=[];for(const r of t)n.push(await e.getResource(r));return n.sort((r,o)=>r.title.localeCompare(o.title)),n.map(r=>r.subject)}const upe=e=>{const t=e.endsWith("/")?"":"/";return`${e}${t}property-${XR(8)}`},dpe=async(e,t)=>{await e.set(E.properties.isA,[E.classes.property]),await e.set(E.properties.parent,t.props.parent),await e.set(E.properties.shortname,"new-column",!1),await e.set(E.properties.name,"",!1),await e.set(E.properties.description,"A column in a table"),await e.set(E.properties.datatype,Y.STRING),await e.save()},tA=(e,t)=>e.clientSideQuery(n=>n.get(E.properties.parent)===(t==null?void 0:t.subject)),ppe=async(e,t)=>{const n=tA(e,t);await Promise.all(n.map(r=>{try{r.destroy()}catch{return}}))},fpe=async(e,t)=>{const n=tA(e,t);await Promise.all(n.map(r=>r.save()))};function hpe({showDialog:e,selectedCategory:t,tableClassResource:n,bindShow:r}){const[o,i]=f.useState(!1),s=Ce(),[l,c]=f.useState(null),[u,d,p]=we(n,E.properties.recommends,{commit:!0}),h=f.useCallback(async()=>{if(l)try{await ppe(s,l),await l.destroy()}finally{c(null)}},[l,s]),m=f.useCallback(async()=>{if(!l)return;const S=await s.getResource(n.props.parent);if(S.hasClasses(E.classes.ontology)){await l.set(E.properties.parent,S.subject);const k=S.get(E.properties.properties)??[];await S.set(E.properties.properties,await nd(s,[...k,l.subject])),await S.save()}await l.save(),await fpe(s,l),p([l.subject]),c(null)},[l,s,n,p]),[v,g,b]=Ht({bindShow:r,onCancel:h,onSuccess:m}),y=async()=>{const S=upe(n.subject),k=s.getResourceLoading(S,{newResource:!0});await dpe(k,n),c(k)},x=f.useCallback(()=>{b()},[b]),w=f.useCallback(()=>{o&&b(!0)},[b,o]);return f.useEffect(()=>{e&&y().then(()=>{g()})},[e]),l?a.jsx(Ad,{onValidationChange:i,children:a.jsxs(Ut,{...v,children:[a.jsx(Sn,{children:a.jsxs("h1",{children:["New ",a.jsx(mpe,{children:t})," Column"]})}),a.jsx(Xt,{children:a.jsx(NR,{resource:l,category:t,onSubmit:w})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:x,subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:w,disabled:!o,type:"submit",children:"Create"})]})]})}):a.jsx(a.Fragment,{})}const mpe=C("span").withConfig({displayName:"NewPropertyDialog__Capitalize",componentId:"sc-70d2794d-0"})(["text-transform:capitalize;"]);function gpe({open:e,bindShow:t,tableClassResource:n}){const[r,o]=f.useState(),[i,s]=f.useState(!1),[l,c]=we(n,J.properties.recommends,{commit:!0}),[u,d,p]=Ht({bindShow:t}),h=()=>{r&&(c([...l,r]),p())};return f.useEffect(()=>{e&&(d(),o(void 0))},[e,d]),a.jsx(Ut,{...u,children:a.jsxs(Ad,{onValidationChange:s,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"Add external property"})}),a.jsx(Xt,{children:a.jsx(Wr,{required:!0,hideCreateOption:!0,setSubject:o,value:r,isA:J.classes.property})}),a.jsxs(Yn,{children:[a.jsx(oe,{subtle:!0,onClick:()=>p(),children:"Cancel"}),a.jsx(oe,{disabled:!i,onClick:h,children:"Add"})]})]})})}const vpe=lc(a.jsx(ur,{}),"Add column"),ype=Ea.get(Y.STRING),bpe=Ea.get(Y.INTEGER),xpe=Ea.get(Y.DATE),wpe=Ea.get(Y.BOOLEAN),Spe=j$,Cpe=xk,jpe=Ea.get(Y.ATOMIC_URL);function kpe(){const[e,t]=f.useState(!1),[n,r]=f.useState(!1),[o,i]=f.useState(),{tableClassSubject:s}=f.useContext(Sc),l=q(s),c=f.useCallback(d=>()=>{i(d),t(!0)},[]),u=f.useMemo(()=>[{id:"text",label:"Text",onClick:c("text"),icon:a.jsx(ype,{})},{id:"number",label:"Number",onClick:c("number"),icon:a.jsx(bpe,{})},{id:"date",label:"Date",onClick:c("date"),icon:a.jsx(xpe,{})},{id:"checkbox",label:"Checkbox",onClick:c("checkbox"),icon:a.jsx(wpe,{})},{id:"select",label:"Select",onClick:c("select"),icon:a.jsx(Spe,{})},{id:"file",label:"File",onClick:c("file"),icon:a.jsx(Cpe,{})},{id:"relation",label:"Relation",onClick:c("relation"),icon:a.jsx(jpe,{})},nh,{id:"external",label:"External Property",onClick:()=>r(!0),icon:a.jsx(im,{})}],[]);return a.jsxs(a.Fragment,{children:[a.jsx(xd,{trigger:vpe,items:u}),a.jsx(hpe,{showDialog:e,tableClassResource:l,selectedCategory:o,bindShow:t}),a.jsx(gpe,{open:n,tableClassResource:l,bindShow:r})]})}function Epe(e,t,n,r,o){const i=Ce();return f.useCallback(async s=>{const l=[],c=new Map;let u=!1;for(const d of s){let p=c.get(d.index[0]);if(!p){let v;try{v=await t.getMemberWithIndex(d.index[0])}catch{}v?p=await i.getResource(v):(u=!0,p=await i.newResource({subject:QR(e.subject,"row"),isA:n.subject,parent:e.subject,propVals:{[qn.properties.createdAt]:Date.now()}}),l.push($de(p)))}const h=d.index[1];l.push(aw(p,h.subject));const m=KR(void 0,d.data,h.datatype);await p.set(h.subject,m),await p.save(),c.set(d.index[0],p)}o(l),u&&r()},[t,r,i])}const _pe={commit:!0,commitDebounce:1e3};function Ipe(e){const[t,n]=ne(e,J.properties.table.tableColumnWidths,_pe),r=f.useCallback(async s=>{const l=JSON.stringify(s);n(l)},[n]),o=f.useDeferredValue(t);return[f.useMemo(()=>{const s=JSON.parse(o??"[]");return s.length>0?s:void 0},[o]),r]}const nA=async(e,t)=>{const n={};for(const[r,o]of e){const i=await t.getMemberWithIndex(r);i&&(n[i]=[...n[i]??[],o])}return n};function Rpe(e,t){const n=Ce();return f.useCallback(async r=>{const o=await nA(r,e),i=[],s=async([l,c])=>{const u=await n.getResource(l);await Promise.all(c.map(d=>(i.push(aw(u,d.subject)),u.set(d.subject,void 0,!1)))),await u.save()};await Promise.all(Array.from(Object.entries(o)).map(s)),t(i)},[n,e])}const Ape=e=>e.get(pe.name)??e.get(pe.file.filename)??e.get(pe.shortname)??e.getSubject(),Ppe=e=>Array.isArray(e)?e.join(", "):`${e??""}`,rA=async(e,t)=>{if(e===void 0)return{plain:"",html:""};const n=await t.getResourceAsync(e),r=Ape(n);return{plain:r,html:`<a href="${e}">${r}</a>`}},Tpe=async(e,t)=>{if(!e)return{plain:"",html:""};const n=await Promise.all(e.map(async r=>rA(r,t)));return{plain:n.map(r=>r.plain).join(", "),html:n.map(r=>r.html).join(", ")}},Dpe=async(e,t,n)=>{switch(t.datatype){case Y.ATOMIC_URL:return rA(e.get(t.subject),n);case Y.RESOURCEARRAY:return Tpe(e.get(t.subject),n);default:{const r=Ppe(e.get(t.subject));return{plain:r,html:r}}}},Npe=async(e,t,n)=>{const r=await n.getResourceAsync(e);return Promise.all(t.map(o=>Dpe(r,o,n)))};function Ope(e){const t=Ce();return f.useCallback(async n=>{const r=await nA(n,e),o=Array.from(Object.entries(r)).map(([i,s])=>Npe(i,s,t));return Promise.all(o)},[e,t])}const Lpe=[qn.properties.lastCommit,E.properties.parent,E.properties.isA];function zpe({subject:e,open:t,bindOpen:n}){const{tableRef:r}=cn(),o=q(e),[i,s]=Ht({bindShow:n,triggerRef:r});return f.useEffect(()=>{t&&s()},[t,s]),a.jsxs(Ut,{...i,children:[a.jsx(Sn,{children:a.jsx(Ta,{resource:o,link:!0})}),a.jsx(Xt,{children:a.jsx(Pa,{editable:!0,columns:!0,resource:o,except:Lpe})})]})}function Fpe(e){return a.jsx(Mpe,{as:"a",...e,children:e.children})}const Mpe=C(rc).withConfig({displayName:"ButtonLink__StyledButtonDefault",componentId:"sc-ef14e26e-0"})(["text-decoration:none;"]),$pe=(e,t,n)=>{const r=new URL(`${n.getServerUrl()}/export`);return r.searchParams.set("format","csv"),r.searchParams.set("subject",e),r.searchParams.set("display_refs_as_name",t?"false":"true"),r.toString()};function Bpe({subject:e,show:t,bindShow:n}){const r=Ce(),[o,i]=Ht({bindShow:n}),[s,l]=f.useState(!1),c=$pe(e,s,r);return f.useEffect(()=>{t&&i()},[t,i]),a.jsx(a.Fragment,{children:a.jsxs(Ut,{...o,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"Export table as CSV"})}),a.jsx(Xt,{children:a.jsxs(Ko,{children:[a.jsx(yr,{checked:s,onChange:l})," ","Reference resources by subject instead of name."]})}),a.jsx(Yn,{children:a.jsxs(Fpe,{download:!0,href:c,children:[a.jsx(ok,{}),"Download"]})})]})})}const Hpe=e=>e.subject;function Upe({resource:e}){const t=Ce(),n=f.useId(),[r,o]=f.useState(!1),[i,s]=f.useState(!1),{tableClass:l,sorting:c,setSortBy:u,collection:d,invalidateCollection:p}=cpe(e),{columns:h,reorderColumns:m}=Eue(l),{undoLastItem:v,addItemsToHistoryStack:g}=Kde(p),b=Epe(e,d,l,p,g),[y,x]=f.useState(!1),[w,S]=f.useState(),k=f.useCallback(async Z=>{const ee=await d.getMemberWithIndex(Z);S(ee),x(!0)},[d]),_=f.useMemo(()=>({tableClassSubject:l.subject,sorting:c,setSortBy:u,addItemsToHistoryStack:g}),[l,u,c,g]),I=f.useCallback(async Z=>{const ee=await d.getMemberWithIndex(Z);if(!ee)return;const W=t.getResourceLoading(ee);g(Bde(W)),await W.destroy(),p()},[d,t,p]),P=Rpe(d,g),z=Ope(d),[D,F]=Ipe(e),$=f.useCallback(({index:Z})=>Z<d.totalMembers?a.jsx(npe,{collection:d,index:Z,columns:h}):a.jsx(ope,{parent:e,columns:h,index:Z,invalidateTable:p}),[d,h]);return a.jsxs(ql,{children:[a.jsxs(Sc.Provider,{value:_,children:[a.jsxs(ge,{children:[a.jsxs(be,{justify:"space-between",children:[a.jsx(si,{resource:e,id:n}),a.jsxs(be,{style:{marginRight:"1rem"},children:[a.jsx(ot,{title:"Use in code",onClick:()=>o(!0),children:a.jsx(rk,{})}),a.jsx(ot,{title:"Use in code",onClick:()=>s(!0),children:a.jsx(WM,{})})]})]}),a.jsx(IR,{columns:h,columnSizes:D,itemCount:d.totalMembers+1,columnToKey:Hpe,labelledBy:n,onClearRow:I,onCellResize:F,onClearCells:P,onCopyCommand:z,onPasteCommand:b,onUndoCommand:v,onColumnReorder:m,onRowExpand:k,HeadingComponent:Sue,NewColumnButtonComponent:kpe,children:$})]}),a.jsx(zpe,{subject:w??ut,open:y,bindOpen:x})]}),a.jsx(ME,{subject:e.subject,show:r,bindShow:o}),a.jsx(Bpe,{subject:e.subject,show:i,bindShow:s})]})}const oA=({onClick:e,menuId:t},n)=>a.jsx(ot,{"aria-controls":t,ref:n,title:`Open menu (${ct.menu})`,type:"button","data-test":"context-menu",onClick:e,children:a.jsx(bk,{})});oA.displayName="MenuBarDropdownTrigger";function Wpe({resource:e}){const[t]=ne(e,E.properties.parent);return a.jsx(Vpe,{"aria-label":"Breadcrumbs",children:a.jsxs(be,{fullWidth:!0,center:!0,gap:"initial",children:[t?a.jsx(sA,{subject:t,depth:0}):a.jsx(iA,{subject:e.subject}),a.jsx(Kpe,{children:e.title}),a.jsx(Ype,{}),a.jsx(Xpe,{children:a.jsx(Im,{isMainMenu:!0,subject:e.subject,trigger:oA})})]})})}const Vpe=C.nav.withConfig({displayName:"Parent__ParentWrapper",componentId:"sc-9b69d02d-0"})(["height:",";padding-inline:",";border-bottom:1px solid ",";background-color:",";display:flex;flex-direction:row;align-items:center;justify-content:flex-start;view-transition-name:",";"],e=>e.theme.heights.breadCrumbBar,e=>e.theme.size(2),e=>e.theme.colors.bg2,e=>e.theme.colors.bg,HG),qpe=4;function iA({subject:e}){const{drive:t,setDrive:n}=Le(),r=q(e,{allowIncomplete:!0}),[o]=rt(r),i=r.getClasses(),s=()=>{n(e)};return e&&e!==t&&i[0]===Ne.classes.drive?a.jsx(oe,{title:`Set ${o} as current drive`,subtle:!0,onClick:s,children:"Set Drive"}):null}function sA({subject:e,depth:t}){const n=q(e,{allowIncomplete:!0}),[r]=ne(n,E.properties.parent),o=uo(),[i]=rt(n);if(t>qpe)return a.jsx(BS,{children:"Set as drive"});const s=l=>{l.preventDefault(),o(lt(e))};return a.jsxs(a.Fragment,{children:[r?a.jsx(sA,{subject:r,depth:t+1}):a.jsx(iA,{subject:e}),a.jsx(BS,{href:e,onClick:s,children:i}),a.jsx(Gpe,{children:"/"})]})}const Gpe=C.div.withConfig({displayName:"Parent__Divider",componentId:"sc-9b69d02d-1"})(["padding:0.1rem 0.2rem;"]),aA=Kt(["font-size:","rem;font-family:",";padding:0.1rem 0.5rem;color:",";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"],e=>e.theme.fontSizeBody,e=>e.theme.fontFamily,e=>e.theme.colors.textLight),Kpe=C.span.withConfig({displayName:"Parent__BreadCrumbCurrent",componentId:"sc-9b69d02d-2"})(["",""],aA),BS=C.a.withConfig({displayName:"Parent__Breadcrumb",componentId:"sc-9b69d02d-3"})([""," align-self:center;cursor:'pointer';text-decoration:none;border-radius:",";&:hover{background:",";color:",";}&:active{background:",";}"],aA,e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.theme.colors.text,e=>e.theme.colors.bg2),Ype=C.span.withConfig({displayName:"Parent__Spacer",componentId:"sc-9b69d02d-4"})(["flex:1;"]),Xpe=C.div.withConfig({displayName:"Parent__ButtonArea",componentId:"sc-9b69d02d-5"})(["justify-self:flex-end;color:",";"],e=>e.theme.colors.textLight);function Sr({subject:e,children:t}){const n=q(e);return a.jsxs(a.Fragment,{children:[e&&a.jsx(Wpe,{resource:n}),a.jsxs(Qpe,{subject:e,about:e,children:[a.jsx(Yx,{children:a.jsx("a",{href:"#skip-to-content",id:"skip-to-content",tabIndex:-1,children:"Start of main content"})}),t]})]})}const Qpe=f.memo(C.main.withConfig({displayName:"Main__StyledMain",componentId:"sc-3439508a-0"})(["container:"," / inline-size;",";height:calc(100vh - ",");overflow-y:auto;scroll-padding:calc( "," + "," );width:100%;@media (prefers-reduced-motion:no-preference){scroll-behavior:smooth;}"],vre,e=>jd(Am,e.subject),e=>e.theme.heights.breadCrumbBar,e=>e.theme.heights.breadCrumbBar,e=>e.theme.size(2))),Fi=e=>`list-item-${e}`;function Jpe({ontology:e}){const[t]=we(e,J.properties.classes),[n]=we(e,J.properties.properties),[r]=we(e,J.properties.instances);return a.jsx(Zpe,{children:a.jsxs(nfe,{children:[a.jsx(oa,{initialState:!0,title:a.jsxs(p1,{children:[a.jsx(kb,{}),"Classes"]}),children:a.jsx("ul",{children:t.map(o=>a.jsx(d1,{subject:o},o))})}),a.jsx(oa,{initialState:!0,title:a.jsxs(p1,{children:[a.jsx(im,{}),"Properties"]}),children:a.jsx("ul",{children:n.map(o=>a.jsx(d1,{subject:o},o))})}),a.jsx(oa,{initialState:!0,title:a.jsxs(p1,{children:[a.jsx(wb,{}),"Instances"]}),children:a.jsx("ul",{children:r.map(o=>a.jsx(d1,{subject:o},o))})})]})})}function d1({subject:e}){const t=q(e);return a.jsx(efe,{children:a.jsx(tfe,{href:`#${Fi(e)}`,error:!!t.error,children:t.title})})}const Zpe=C.div.withConfig({displayName:"OntologySidebar__Wrapper",componentId:"sc-1000aa75-0"})(["position:sticky;top:0px;display:flex;flex-direction:column;background-color:",";height:100vh;border-left:1px solid ",";min-width:10rem;"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2),p1=C.b.withConfig({displayName:"OntologySidebar__Title",componentId:"sc-1000aa75-1"})(["display:inline-flex;align-items:center;gap:0.8ch;"]),efe=C.li.withConfig({displayName:"OntologySidebar__StyledLi",componentId:"sc-1000aa75-2"})(["list-style:none;margin-left:0;width:100%;margin-bottom:0;"]),tfe=C.a.withConfig({displayName:"OntologySidebar__ItemLink",componentId:"sc-1000aa75-3"})(["padding-left:1rem;padding-block:0.2rem;border-radius:",";display:block;color:",";text-decoration:none;width:100%;&:hover,&:focus-visible{color:",";background-color:",";}white-space:nowrap;"],e=>e.theme.radius,e=>e.error?e.theme.colors.alert:e.theme.colors.textLight,e=>e.theme.colors.text,e=>e.theme.colors.bg1),nfe=C(Ia).withConfig({displayName:"OntologySidebar__SideBarScrollArea",componentId:"sc-1000aa75-4"})(["overflow:hidden;padding:","rem;padding-left:0.5rem;max-height:100vh;"],e=>e.theme.margin),lA=f.createContext({addClass:()=>Promise.resolve(),removeClass:()=>Promise.resolve(),addProperty:()=>Promise.resolve(),removeProperty:()=>Promise.resolve(),hasProperty:()=>!1,hasClass:()=>!1,ontology:new na(ut)});function rfe({ontology:e,children:t}){const n=Ce(),[r,o]=we(e,E.properties.classes,{commit:!0}),[i,s]=we(e,J.properties.properties,{commit:!0}),l=f.useCallback(async v=>{await o([...r,v])},[r,o]),c=f.useCallback(async v=>{await o(r.filter(g=>g!==v))},[r,o]),u=f.useCallback(async v=>{await s(await nd(n,[...i,v]))},[i,s]),d=f.useCallback(async v=>{await s(i.filter(g=>g!==v))},[i,s]),p=f.useCallback(v=>i.includes(v),[i]),h=f.useCallback(v=>r.includes(v),[r]),m=f.useMemo(()=>({addClass:l,removeClass:c,addProperty:u,removeProperty:d,hasProperty:p,hasClass:h,ontology:e}),[l,c,u,d,p,h,e]);return a.jsx(lA.Provider,{value:m,children:t})}function Nd(){return f.useContext(lA)}function cA({resource:e}){const[t]=ne(e,J.properties.datatype),[n]=ne(e,J.properties.classType),{hasClass:r}=Nd(),o=K8[t??ut];return n?a.jsxs("span",{children:[o,"<",r(n)?a.jsx(ofe,{subject:n}):a.jsx(Lt,{subject:n}),">"]}):a.jsx("span",{children:o})}function ofe({subject:e}){const t=q(e);return a.jsx("a",{href:`#${Fi(e)}`,children:t.title})}function HS({subject:e}){const t=q(e),[n]=ne(t,J.properties.description),r=Ea.get(t.props.datatype);return t.error?a.jsx("tr",{children:a.jsx(yt,{children:"Property does not exist anymore"})}):a.jsxs(ife,{children:[a.jsxs(be,{center:!0,gap:"1ch",children:[r&&a.jsx(r,{}),a.jsx(afe,{children:t.title})]}),a.jsx(lfe,{children:a.jsx(cA,{resource:t})}),a.jsx(sfe,{children:a.jsx(At,{text:n??""})})]})}const ife=C.div.withConfig({displayName:"PropertyLineRead__SubGrid",componentId:"sc-48b9ee9f-0"})(["display:grid;grid-template-columns:1fr auto;gap:1rem;padding:",";border-radius:",";@container "," (inline-size < 400px){grid-template-columns:1fr;}&:nth-child(even){background-color:",";}& svg{fill:",";}"],e=>e.theme.size(),e=>e.theme.radius,Qm,e=>e.theme.colors.bg1,e=>e.theme.colors.textLight),sfe=C.span.withConfig({displayName:"PropertyLineRead__MarkdownWrapper",componentId:"sc-48b9ee9f-1"})(["@container "," (inline-size > 400px){grid-column:1 / 3;}color:",";padding-bottom:0.5rem;"],Qm,({theme:e})=>e.colors.textLight),afe=C.span.withConfig({displayName:"PropertyLineRead__PropTitle",componentId:"sc-48b9ee9f-2"})(["font-weight:bold;"]),lfe=C.span.withConfig({displayName:"PropertyLineRead__DatatypeSlot",componentId:"sc-48b9ee9f-3"})(["@container "," (inline-size > 400px){justify-self:end;}"],Qm),cfe=e=>e.hasClasses(X.classes.folder)||e.hasClasses(Ne.classes.drive),uA=({subject:e,...t})=>{const n=q(e);return!n.hasClasses(X.classes.folder)&&!n.hasClasses(Ne.classes.drive)?null:a.jsx(ufe,{subject:e,...t})},ufe=({subject:e,selectedValue:t,inialOpen:n,onClick:r})=>{const o=Ce(),{collection:i}=Qo({property:E.properties.parent,value:e}),[s,l]=f.useState([]);return f.useEffect(()=>{i.getAllMembers().then(async c=>{const d=(await Promise.all(c.map(p=>o.getResource(p)))).filter(cfe);l(d.map(p=>p.subject))})},[i]),s.length===0?a.jsx(US,{indented:!0,subject:e,onClick:r,selected:t===e}):a.jsx(oa,{initialState:n,open:n,title:a.jsx(US,{subject:e,selected:t===e,onClick:r}),children:s.map(c=>a.jsx(uA,{subject:c,selectedValue:t,onClick:r},c))})},US=({subject:e,indented:t,selected:n,onClick:r})=>{const o=q(e),[i]=we(o,E.properties.isA),s=No(i[0]);return a.jsxs(dfe,{selected:n,indented:t,onClick:()=>r(e),children:[a.jsx(s,{}),o.title]})},dfe=C.button.withConfig({displayName:"ParentPickerItem__FolderButton",componentId:"sc-8ff57982-0"})(["display:flex;align-items:center;gap:1ch;background-color:",";color:",";cursor:pointer;border:none;padding:0.3rem 0.5rem;margin-inline-start:",";border-radius:",";user-select:none;&:hover{background-color:",";color:",";}"],e=>e.selected?e.theme.colors.bg1:"transparent",e=>e.selected?e.theme.colors.main:e.theme.colors.textLight,e=>e.indented?"2rem":"0",e=>e.theme.radius,e=>e.theme.colors.bg1,e=>e.selected?e.theme.colors.main:e.theme.colors.text);function pfe({root:e,value:t,onChange:n}){const{drive:r}=Le();return a.jsxs(ge,{children:[a.jsxs(Je,{hasPrefix:!0,children:[a.jsx(KM,{size:"1rem"}),a.jsx(nt,{placeholder:"Enter a subject",value:t??"",onChange:o=>n(o.target.value)})]}),a.jsx(ffe,{"aria-label":"parent selector",children:a.jsx(uA,{inialOpen:!0,subject:e??r,onClick:n,selectedValue:t})})]})}const ffe=C.section.withConfig({displayName:"ParentPicker__PickerWrapper",componentId:"sc-f3cd8f74-0"})(["background-color:",";border-radius:",";border:1px solid ",";padding:","rem;height:20.5rem;overflow-y:auto;"],e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.colors.bg2,e=>e.theme.margin);function hfe(e){const t=new MutationObserver(()=>{document.body.hasAttribute("inert")||(e(),t.disconnect())});t.observe(document.body,{attributes:!0,attributeFilter:["inert"]})}function mfe({open:e,root:t,title:n,onSelect:r,onCancel:o,onOpenChange:i}){const[s,l]=f.useState(),[c,u,d,p]=Ht({onCancel:o,bindShow:i}),h=()=>{s&&(hfe(()=>{r(s)}),d(!0))};return f.useEffect(()=>{e?u():(d(),l(void 0))},[e]),a.jsx(Ut,{...c,children:p&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsx("h1",{children:n??"Select a location"})}),a.jsx(Xt,{children:a.jsx(pfe,{root:t,value:s,onChange:l})}),a.jsxs(Yn,{children:[a.jsx(oe,{subtle:!0,onClick:()=>d(!1),children:"Cancel"}),a.jsx(oe,{onClick:h,disabled:!s,children:"Select"})]})]})})}function gfe(){return a.jsx(vfe,{children:"BETA"})}const vfe=C.span.withConfig({displayName:"BetaBadge__Badge",componentId:"sc-98d0b90b-0"})(["background-color:",";border-radius:0.25rem;color:white;font-weight:bold;padding-inline:0.25rem;box-shadow:0px 3px 5px rgba(0,0,0,0.25);"],e=>e.theme.colors.main);function yfe(e){const t=Ce(),{drive:n}=Le(),r=q(n),o=q(r.props.defaultOntology??ut);return f.useCallback(async i=>{if(o.subject===ut){await i.set(E.properties.parent,n),i.save();return}await i.set(E.properties.parent,o.subject),await i.save(),i.hasClasses(E.classes.class)?await o.set(E.properties.classes,await nd(t,[...o.props.classes??[],i.subject])):i.hasClasses(E.classes.property)?await o.set(E.properties.properties,await nd(t,[...o.props.properties??[],i.subject])):o.push(E.properties.instances,[i.subject],!0),await o.save()},[t,r,o])}const dA=({parent:e,initialExistingClass:t,onClose:n})=>{const r=Ce(),[o,i]=f.useState(!!t),[s,l]=f.useState(t),[c,u]=f.useState(""),d=yfe(),p=_a(),h=f.useCallback(()=>{n()},[n]),m=f.useCallback(async()=>{let S;if(o){if(s===void 0)throw new Error("Existing class is undefined");S=s}else{const k=await r.newResource({isA:E.classes.class,propVals:{[E.properties.shortname]:lo(c),[E.properties.description]:`Represents a row in the ${c} table`,[E.properties.recommends]:[E.properties.name]}});await d(k),S=k.subject}p(X.classes.table,{[E.properties.name]:c,[E.properties.classtype]:S},{parent:e}),n()},[c,n,e,o,s,d,p]),[v,g,b,y]=Ht({onCancel:h,onSuccess:m});f.useEffect(()=>{g()},[]);const x=c.trim()!=="",w=o?!x||!s:!x;return a.jsx(Ut,{...v,children:y&&a.jsxs(a.Fragment,{children:[a.jsxs(xfe,{children:[a.jsx("h1",{children:"New Table"}),a.jsx(gfe,{})]}),a.jsx(bfe,{children:a.jsxs("form",{onSubmit:S=>{S.preventDefault(),b(!0)},children:[a.jsx(ln,{required:!0,label:"Name",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"New Table",value:c,autoFocus:!0,onChange:S=>u(S.target.value)})})}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:o,onChange:i}),"Use existing class"]}),a.jsx(ln,{children:o&&a.jsx(Wr,{hideCreateOption:!0,disabled:!o,isA:E.classes.class,setSubject:l,value:s})})]})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>b(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>b(!0),disabled:w,children:"Create"})]})]})})},bfe=C(Xt).withConfig({displayName:"NewTableDialog__WiderDialogContent",componentId:"sc-2d47b38b-0"})([""]),xfe=C(Sn).withConfig({displayName:"NewTableDialog__RelativeDialogTitle",componentId:"sc-2d47b38b-1"})(["display:flex;align-items:flex-start;gap:1ch;"]);var WS;(function(e){e[e.SingleInstance=0]="SingleInstance",e[e.Table=1]="Table"})(WS||(WS={}));function wfe({resource:e}){const t=kd(),[n,r]=f.useState(!1),[o,i]=f.useState(),[s,l]=f.useState(),c=h=>{s===0?t(e.subject,h):i(h),l(void 0)},u=()=>{i(void 0)},d=lc(a.jsx(Sfe,{}),`New instance of ${e.title}`),p=[{id:"new-instance",label:"Single instance",icon:a.jsx(wb,{}),onClick:()=>{l(0),r(!0)}},{id:"new-table",label:"Table",icon:a.jsx(wk,{}),onClick:()=>{l(1),r(!0)}}];return a.jsxs(a.Fragment,{children:[a.jsx(xd,{items:p,trigger:d}),a.jsx(mfe,{open:n,onOpenChange:r,onSelect:c}),o&&a.jsx(dA,{parent:o,initialExistingClass:e.subject,onClose:u})]})}const Sfe=C(ur).withConfig({displayName:"NewClassInstanceButton__PlusIcon",componentId:"sc-5d4cd47-0"})(["color:",";"],e=>e.theme.colors.textLight);function Cfe({subject:e}){const t=q(e),[n]=ne(t,E.properties.description),[r]=we(t,E.properties.requires),[o]=we(t,E.properties.recommends);return a.jsx(jfe,{subject:e,children:a.jsxs(ge,{children:[a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsxs(kfe,{id:Fi(e),children:[a.jsx(kb,{}),a.jsx(Me,{subject:e,children:t.title})]}),a.jsx(wfe,{resource:t})]}),a.jsx(At,{text:n??"",maxLength:1500}),a.jsx(VS,{children:"Requires"}),a.jsx(qS,{children:r.length>0?r.map(i=>a.jsx(HS,{subject:i},i)):a.jsx("span",{children:"none"})}),a.jsx(VS,{children:"Recommends"}),a.jsx(qS,{children:o.length>0?o.map(i=>a.jsx(HS,{subject:i},i)):a.jsx("span",{children:"none"})})]})})}const jfe=C(Kn).withConfig({displayName:"ClassCardRead__StyledCard",componentId:"sc-5ed33400-0"})(["padding-bottom:",";",";"],e=>e.theme.size(),e=>jd(Am,e.subject)),kfe=C.h3.withConfig({displayName:"ClassCardRead__StyledH3",componentId:"sc-5ed33400-1"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;font-size:1.5rem;"]),VS=C.h4.withConfig({displayName:"ClassCardRead__StyledH4",componentId:"sc-5ed33400-2"})(["margin-bottom:0px;"]),qS=C.div.withConfig({displayName:"ClassCardRead__StyledTable",componentId:"sc-5ed33400-3"})([""]);function Efe({subject:e}){const t=q(e),[n]=ne(t,J.properties.description),[r]=we(t,J.properties.allowsOnly);return a.jsx(Rfe,{id:Fi(e),children:a.jsxs(ge,{children:[a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsxs(_fe,{children:[a.jsx(im,{}),a.jsx(Me,{subject:e,children:t.title})]}),a.jsx(cA,{resource:t})]}),a.jsx(At,{text:n??""}),r.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(Ife,{children:"Allows only:"}),a.jsx("div",{children:a.jsx(Td,{subjects:r})})]})]})})}const _fe=C.h3.withConfig({displayName:"PropertyCardRead__Heading",componentId:"sc-dd841a97-0"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;font-size:1.5rem;"]),Ife=C.h4.withConfig({displayName:"PropertyCardRead__SubHeading",componentId:"sc-dd841a97-1"})(["margin-bottom:0px;"]),Rfe=C(Kn).withConfig({displayName:"PropertyCardRead__StyledCard",componentId:"sc-dd841a97-2"})(["padding-bottom:","rem;"],e=>e.theme.margin);function lw({resource:e,edit:t}){const[n]=ne(e,J.properties.description),r=sr(J.properties.description),[o]=jt(e);return!t||!o?a.jsx(At,{text:n??""}):a.jsx(NI,{commit:!0,resource:e,property:r})}function Afe({resource:e,property:t,options:n,commit:r=!1,onChange:o,...i}){const[s,l]=Jo(e,t,{commit:r}),c=u=>{l(u.target.value),o==null||o(u.target.value)};return a.jsx(FE,{...i,onChange:c,value:s,children:n.map(u=>a.jsx("option",{value:u.value,children:u.label},u.value))})}const Pfe=Object.entries(K8).map(([e,t])=>({value:e,label:t.toUpperCase()})).filter(e=>e.value!=="unknown-datatype"),Tfe=e=>e===Y.ATOMIC_URL||e===Y.RESOURCEARRAY;function pA({resource:e,disabled:t}){const[,n]=we(e,E.properties.allowsOnly,{commit:!0}),[,r]=ne(e,E.properties.classtype,{commit:!0}),o=i=>{Tfe(i)||(r(void 0),n(void 0))};return a.jsx(Dfe,{commit:!0,disabled:t,resource:e,property:E.properties.datatype,options:Pfe,onChange:o})}const Dfe=C(Afe).withConfig({displayName:"PropertyDatatypePicker__StyledAtomicSelectInput",componentId:"sc-1ed55e38-0"})(["min-width:18ch;"]),Nfe="Change me",fA=(e,t)=>`${e.subject}/class/${t}`;async function hA(e,t,n){const r=fA(t,e);await(await n.newResource({subject:r,parent:t.subject,isA:E.classes.class,propVals:{[E.properties.shortname]:e,[E.properties.description]:Nfe}})).save();const i=t.props.classes??[];return await t.set(E.properties.classes,await nd(n,[...i,r])),await t.save(),r}const cf=C.span.withConfig({displayName:"LabelText",componentId:"sc-c9b5b084-0"})(["font-weight:bold;color:",";"],e=>e.theme.colors.textLight);function Ofe(e,t){const n=Ce(),[r,o]=we(e,E.properties.allowsOnly,{commit:!0}),[i,s]=we(t,E.properties.instances,{commit:!0}),l=f.useCallback(async u=>{const d=[...r,u.subject],p=[...i??[],u.subject];await o(d),await s(p),await u.save()},[i,r,o,s]),c=f.useCallback(async u=>{const d=r.filter(p=>p!==u);if(await o(d),!await Lfe(u,t,n)){const p=i==null?void 0:i.filter(h=>h!==u);await s(p),await n.getResourceLoading(u).destroy()}},[r,o,i,s,n]);return{addTag:l,removeTag:c}}const Lfe=async(e,t,n)=>{var o;if(n.getResourceLoading(e).props.parent!==t.subject)return!0;for(const i of t.props.properties??[])if((o=(await n.getResource(i)).props.allowsOnly)!=null&&o.includes(e))return!0;return!1};async function mA(e,t,n){const r=e.props.allowsOnly;if(r===void 0)return;const o=[];for(const i of r)(await n.getResource(i)).hasClasses(t)&&o.push(i);return o}const zfe=[{label:"Enum",value:"enum"},{label:"Custom",value:"custom"}],Ffe=({resource:e,ontology:t})=>{const n=sr(J.properties.allowsOnly);return a.jsx(zE,{label:"ResourceArray Types",tabs:zfe,children:a.jsxs(a.Fragment,{children:[a.jsx(ty,{value:"enum",children:a.jsx(Mfe,{resource:e,ontology:t})}),a.jsx(ty,{value:"custom",children:a.jsxs(ge,{children:[a.jsx(cf,{children:"Allows Only"}),a.jsx(Wx,{resource:e,property:n})]})})]})})},Mfe=({resource:e,ontology:t})=>{const n=Ce(),[r,o]=f.useState([]),[i,s]=we(e,E.properties.allowsOnly,{commit:!0}),{addTag:l,removeTag:c}=Ofe(e,t);return f.useEffect(()=>{mA(e,X.classes.tag,n).then(u=>{o(u??[]),!(u===void 0||u.length===i.length)&&s(u)})},[e,i,s]),a.jsxs(ge,{children:[a.jsx("p",{children:"Only allow its value to be one of the following tags:"}),a.jsx(be,{wrapItems:!0,children:r.map(u=>a.jsx(pE,{subject:u,onDelete:c},u))}),a.jsx(gE,{parent:t.getSubject(),onNewTag:l})]})},GS=new Set([J.datatypes.atomicUrl,J.datatypes.resourceArray]);function gA({resource:e,canEdit:t,onClassCreated:n}){const r=Ce(),[o,i]=ne(e,E.properties.classtype,{commit:!0}),[s]=ne(e,E.properties.datatype),[l,c]=we(e,E.properties.allowsOnly,{commit:!0}),[u]=cr(),d=q(u),p=sr(E.properties.allowsOnly),h=f.useCallback(async y=>{const x=await hA(y,d,r);await i(x),n==null||n(),requestAnimationFrame(()=>{var w;(w=document.getElementById(Fi(x)))==null||w.scrollIntoView({behavior:"smooth"})})},[d,r,n]),m=f.useCallback(async y=>{if(y===void 0)return;const x=await mA(e,y,r);c(x)},[r,e,c]),v=f.useCallback(y=>{i(y),m(y)},[i,m]),g=!GS.has(s??""),b=!o&&GS.has(s??"");return a.jsxs(ge,{children:[a.jsx(lw,{resource:e,edit:!0}),a.jsxs(be,{children:[a.jsxs(ge,{fullWidth:!0,as:"label",children:[a.jsx(cf,{children:"Datatype"}),a.jsx(pA,{disabled:!t,resource:e})]}),a.jsxs(ge,{fullWidth:!0,as:"label",children:[a.jsx(cf,{children:"Classtype"}),a.jsx(Hx,{disabled:!t||g,value:o,onChange:v,isA:E.classes.class,onCreateItem:h})]})]}),b&&a.jsx(Ffe,{resource:e,ontology:d}),o&&a.jsxs(ge,{children:[a.jsx(cf,{children:"Allows Only"}),a.jsx(Wx,{resource:e,property:p,isA:o})]})]})}function $fe({resource:e,close:t,...n}){const[r]=jt(e),o=sr(J.properties.shortname);return a.jsx(Ut,{...n,width:"min(40rem, 90vw)",children:n.show&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsx(Pi,{commit:!0,disabled:!r,resource:e,property:o})}),a.jsxs(Xt,{children:[a.jsx(Bfe,{}),a.jsx(gA,{resource:e,canEdit:r,onClassCreated:t})]})]})})}const Bfe=C.div.withConfig({displayName:"PropertyWriteDialog__Spacer",componentId:"sc-e72d079d-0"})(["height:2px;"]);function KS({subject:e,onRemove:t}){const n=q(e),r=sr(E.properties.shortname),o=sr(E.properties.description),[i,s,l]=Ht(),[c]=jt(n),{hasProperty:u}=Nd(),d=!c||!u(e);return n.error?a.jsx(YS,{children:a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsxs(Hfe,{children:["This property does not exist anymore (",e,")"]}),a.jsx(oe,{alert:!0,onClick:()=>t(e),children:"Remove"})]})}):a.jsxs(YS,{children:[a.jsxs(be,{center:!0,wrapItems:!0,children:[a.jsx(Pi,{commit:!0,required:!0,disabled:d,resource:n,property:r}),a.jsx(by,{commit:!0,required:!0,disabled:d,resource:n,property:o}),a.jsxs(be,{center:!0,children:[a.jsx(pA,{disabled:d,resource:n}),a.jsx(ot,{title:`Configure ${n.title}`,color:"textLight",onClick:s,children:a.jsx(q$,{})}),a.jsx(ot,{title:"remove",color:"textLight",onClick:()=>t(e),children:a.jsx(ri,{})})]})]}),a.jsx($fe,{resource:n,...i,close:l})]})}const YS=C.li.withConfig({displayName:"PropertyLineWrite__ListItem",componentId:"sc-cebb682c-0"})(["margin-left:0px;list-style:none;"]),Hfe=C(yt).withConfig({displayName:"PropertyLineWrite__StyledErrorLook",componentId:"sc-cebb682c-1"})(["max-lines:2;overflow:hidden;flex:1;"]),vA="calc(100% - 5.6rem + 4px)";async function Ufe(e,t,n){const r=`${t.subject}/property/${e}`;return await(await n.newResource({subject:r,parent:t.subject,isA:E.classes.property,propVals:{[E.properties.shortname]:e,[E.properties.description]:"a property",[E.properties.datatype]:Y.STRING}})).save(),r}function XS({creator:e,type:t}){const n=Ce(),r=f.useRef(null),[o,i]=f.useState(!1),{ontology:s,addProperty:l}=Nd(),c=async d=>{if(i(!1),!d)return;const p=t==="required"?E.properties.requires:E.properties.recommends;e.push(p,[d]),await e.save()},u=async d=>{const p=await Ufe(d,s,n);await c(p),await l(p),Sy(-4,r.current)};return o?a.jsx(Wfe,{children:a.jsx(Hx,{autoFocus:!0,value:"",onChange:c,isA:E.classes.property,onClose:()=>i(!1),onCreateItem:u})}):a.jsx(Vfe,{title:`add ${t} property`,onClick:()=>i(!0),ref:r,children:a.jsx(ur,{})})}const Wfe=C.div.withConfig({displayName:"AddPropertyButton__SearchBoxWrapper",componentId:"sc-5b2cb306-0"})(["width:",";"],vA),Vfe=C.button.withConfig({displayName:"AddPropertyButton__AddButton",componentId:"sc-5b2cb306-1"})(["background:none;border:1px dashed ",";height:2.5rem;width:",";border-radius:",";display:flex;align-items:center;justify-content:center;gap:1ch;cursor:pointer;color:",";"," &:hover,&:focus-visible{border-style:solid;border-color:",";color:",";}"],e=>e.theme.colors.bg2,vA,e=>e.theme.radius,e=>e.theme.colors.textLight,Yt("border-color","color"),e=>e.theme.colors.main,e=>e.theme.colors.main),qfe=[Wl.Delete,Wl.History];function Gfe({subject:e}){const t=q(e),[n,r]=we(t,J.properties.requires,{commit:!0}),[o,i]=we(t,J.properties.recommends,{commit:!0}),s=sr(J.properties.shortname),{removeClass:l}=Nd(),c=f.useCallback(()=>{l(e)},[l,e]),u=(d,p)=>{d==="requires"?r(n.filter(h=>h!==p)):i(o.filter(h=>h!==p))};return a.jsx(Kfe,{"data-testid":`class-card-write-${t.title}`,children:a.jsxs(ge,{id:Fi(e),children:[a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsxs(Yfe,{children:[a.jsx(kb,{}),a.jsx(Pi,{commit:!0,resource:t,property:s})]}),a.jsx(Im,{subject:e,showOnly:qfe,onAfterDelete:c})]}),a.jsx(lw,{edit:!0,resource:t}),a.jsx(QS,{children:"Requires"}),a.jsxs(ge,{as:"ul",gap:"0.5rem",children:[n.map(d=>a.jsx(KS,{subject:d,onRemove:p=>u("requires",p)},d)),a.jsx(JS,{children:a.jsx(XS,{creator:t,type:"required"})})]}),a.jsx(QS,{children:"Recommends"}),a.jsxs(ge,{as:"ul",gap:"0.5rem",children:[o.map(d=>a.jsx(KS,{subject:d,onRemove:p=>u("recommends",p)},d)),a.jsx(JS,{children:a.jsx(XS,{creator:t,type:"recommended"})})]})]})})}const Kfe=C(Kn).withConfig({displayName:"ClassCardWrite__StyledCard",componentId:"sc-b8cb01e0-0"})(["padding-bottom:","rem;max-width:100rem;border:",";input,select{height:2.5rem;}","{--error-chip-end:2.5rem;}"],e=>e.theme.margin,e=>e.theme.darkMode?`1px solid ${e.theme.colors.bg2}`:"none",vc),QS=C.h4.withConfig({displayName:"ClassCardWrite__StyledH4",componentId:"sc-b8cb01e0-1"})(["margin-bottom:0px;"]),JS=C.li.withConfig({displayName:"ClassCardWrite__ButtonWrapper",componentId:"sc-b8cb01e0-2"})(["margin-left:0px;list-style:none;"]),Yfe=C.div.withConfig({displayName:"ClassCardWrite__TitleWrapper",componentId:"sc-b8cb01e0-3"})(["display:flex;align-items:center;gap:1ch;width:min(100%,50ch);svg{font-size:1.5rem;}"]);function Xfe({resource:e}){const t=Ce(),[n,r]=f.useState(""),[o,i]=f.useState(!1),s=f.useRef(null),l=fA(e,n),[c,u,d,p]=Ht({onSuccess:async()=>{var x;const b=await hA(n,e,t),y=Fi(b);(x=document.getElementById(y))==null||x.scrollIntoView({behavior:"smooth"})}}),h=b=>{const y=lo(b.target.value);r(y),m(y)},m=b=>{if(!b){i(!1);return}try{Do(b,Y.SLUG),i(!0)}catch{i(!1)}},v=()=>{r(""),i(!1),u(),requestAnimationFrame(()=>{var b;(b=s.current)==null||b.focus()})},g=b=>{b.key==="Escape"&&d(!1),b.key==="Enter"&&o&&d(!0)};return a.jsxs(a.Fragment,{children:[a.jsxs(Qfe,{onClick:v,children:[a.jsx(ur,{})," Add class"]}),a.jsx(Ut,{...c,children:p&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsx("h1",{children:"New Class"})}),a.jsx(Xt,{children:a.jsxs(ge,{children:[a.jsx(Je,{children:a.jsx(nt,{ref:s,placeholder:"shortname",value:n,onChange:h,onKeyDown:g})}),a.jsx(Jfe,{children:l},0)]})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>d(!0),disabled:!o,children:"Save"})]})]})})]})}const Qfe=C.button.withConfig({displayName:"NewClassButton__DashedButton",componentId:"sc-338b59df-0"})(["width:100%;height:20rem;display:flex;align-items:center;justify-content:center;gap:1ch;appearance:none;background:none;border:2px dashed ",";border-radius:",";color:",";cursor:pointer;&:hover,&:focus-visible{background:",";border-color:",";color:",";}",""],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.bg,e=>e.theme.colors.main,e=>e.theme.colors.main,Yt("background","color","border-color")),Jfe=C.div.withConfig({displayName:"NewClassButton__SubjectWrapper",componentId:"sc-338b59df-1"})(["width:100%;max-width:60ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:",";background-color:",";padding-inline:0.5rem;padding-block:0.2rem;border-radius:",";"],e=>e.theme.colors.textLight,e=>e.theme.colors.bg1,e=>e.theme.radius),Zfe=[Wl.Delete,Wl.History];function ehe({subject:e}){const t=q(e),n=sr(J.properties.shortname),[r]=jt(t),{removeProperty:o}=Nd(),i=f.useCallback(()=>{o(e)},[o,e]);return a.jsx(nhe,{id:Fi(e),children:a.jsxs(ge,{children:[a.jsxs(be,{center:!0,justify:"space-between",children:[a.jsxs(the,{children:[a.jsx(im,{}),a.jsx(Pi,{commit:!0,resource:t,property:n})]}),a.jsx(Im,{subject:e,showOnly:Zfe,onAfterDelete:i})]}),a.jsx(gA,{resource:t,canEdit:r})]})})}const the=C.div.withConfig({displayName:"PropertyCardWrite__TitleWrapper",componentId:"sc-89d3ae2b-0"})(["display:flex;align-items:center;gap:1ch;margin-bottom:0px;svg{font-size:1.5rem;}"]),nhe=C(Kn).withConfig({displayName:"PropertyCardWrite__StyledCard",componentId:"sc-89d3ae2b-1"})(["border:",";padding-bottom:","rem;"],e=>e.theme.darkMode?`1px solid ${e.theme.colors.bg2}`:"none",e=>e.theme.margin),rhe=f.lazy(()=>hc(()=>import("./chunk_OntologyGraph.js"),__vite__mapDeps([4,5])));function ohe({ontology:e}){return a.jsx(ihe,{children:a.jsx(f.Suspense,{fallback:"loading...",children:a.jsx(rhe,{ontology:e})})})}const ihe=C.div.withConfig({displayName:"Graph__GraphWrapper",componentId:"sc-972a46a2-0"})(["position:var(--ontology-graph-position);display:grid;place-items:center;background-color:",";border:1px solid ",";aspect-ratio:var(--ontology-graph-ratio);border-radius:",";top:1rem;overflow:hidden;"],e=>e.theme.colors.bg1,e=>e.theme.colors.bg2,e=>e.theme.radius);function she({ontology:e}){const[t,n]=f.useState(!1),[r,o]=f.useState(),[i,s,l,c]=Ht({onSuccess:()=>{o(void 0),n(!1),e.save()}}),u=p=>{o(p),p!==void 0&&s()},d=p=>{e.push(E.properties.instances,[p],!0),l(!0)};return a.jsx(a.Fragment,{children:t?a.jsxs(a.Fragment,{children:[a.jsx(lhe,{children:a.jsxs(ge,{children:[a.jsx("strong",{children:"Select the class for this instance"}),a.jsx(Wr,{autoFocus:!0,isA:E.classes.class,setSubject:u,value:r})]})}),a.jsx(Ut,{...i,children:c&&r&&a.jsx(jI,{classSubject:r,onCancel:()=>l(!1),onSaveClick:d,parent:e.subject})})]}):a.jsxs(ahe,{onClick:()=>n(!0),children:[a.jsx(ur,{}),"New Instance"]})})}const ahe=C.button.withConfig({displayName:"CreateInstanceButton__InstanceButton",componentId:"sc-92473d05-0"})(["display:flex;align-items:center;justify-content:center;gap:1ch;cursor:pointer;appearance:none;border:2px dashed ",";height:10rem;background-color:transparent;border-radius:",";color:",";&:hover,&:focus{border-color:",";color:",";background-color:",";}"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.textLight,e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.colors.bg),lhe=C.div.withConfig({displayName:"CreateInstanceButton__ChooseClassFormWrapper",componentId:"sc-92473d05-1"})(["min-height:10rem;border:2px dashed ",";background-color:",";border-radius:",";padding:","rem;"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg,e=>e.theme.radius,e=>e.theme.margin),f1=e=>e.length===0;function che({resource:e}){const[t]=we(e,E.properties.classes),[n]=we(e,E.properties.properties),[r]=we(e,E.properties.instances),[o]=jt(e),[i,s]=f.useState(f1(t)&&f1(n)&&f1(r));return a.jsx(rfe,{ontology:e,children:a.jsxs(uhe,{edit:i,children:[a.jsx(dhe,{children:a.jsxs(be,{justify:"space-between",children:[a.jsx("h1",{children:e.title}),o&&(i?a.jsxs(oe,{onClick:()=>s(!1),children:[a.jsx(Bu,{}),"Read"]}):a.jsxs(oe,{onClick:()=>s(!0),children:[a.jsx(oc,{}),"Edit"]}))]})}),a.jsx(yA,{children:a.jsx(Jpe,{ontology:e})}),a.jsx(bA,{children:a.jsxs(ge,{style:{paddingBottom:"3rem"},children:[a.jsx(lw,{edit:i,resource:e}),a.jsx("h2",{children:"Classes"}),a.jsxs(h1,{children:[i&&a.jsx("li",{children:a.jsx(Xfe,{resource:e})}),t.map(l=>a.jsx("li",{children:i?a.jsx(Gfe,{subject:l}):a.jsx(Cfe,{subject:l})},l))]}),a.jsx("h2",{children:"Properties"}),a.jsx(h1,{children:n.map(l=>a.jsx("li",{children:i?a.jsx(ehe,{subject:l}):a.jsx(Efe,{subject:l})},l))}),a.jsx("h2",{children:"Instances"}),a.jsxs(h1,{children:[r.map(l=>a.jsx("li",{children:a.jsx(wc,{subject:l,id:Fi(l)})},l)),i&&a.jsx(she,{ontology:e})]})]})}),!i&&a.jsx(phe,{children:a.jsx(ohe,{ontology:e})})]})})}const yA=C.div.withConfig({displayName:"OntologyPage__SidebarSlot",componentId:"sc-c318252c-0"})(["grid-area:sidebar;"]),bA=C.div.withConfig({displayName:"OntologyPage__ListSlot",componentId:"sc-c318252c-1"})(["grid-area:list;padding:",";"],e=>e.theme.size()),uhe=C.div.withConfig({displayName:"OntologyPage__FullPageWrapper",componentId:"sc-c318252c-2"})(["--ontology-graph-position:sticky;--ontology-graph-ratio:9 / 16;display:grid;grid-template-areas:",";grid-template-columns:3fr 2fr minmax(auto,13rem);grid-template-rows:4rem auto;width:100%;min-height:",";@container (max-width:950px){grid-template-areas:",";grid-template-columns:5fr minmax(auto,13rem);grid-template-rows:4rem auto auto;--ontology-graph-position:sticky;--ontology-graph-ratio:16/9;}@container (max-width:600px){grid-template-areas:",";grid-template-columns:100vw;","{display:none;}}","{width:",";margin:",";}"],e=>e.edit?"'title title sidebar' 'list list sidebar'":"'title graph sidebar' 'list graph sidebar'",e=>e.theme.heights.fullPage,e=>e.edit?"'title sidebar' 'list sidebar' 'list sidebar'":"'title sidebar' 'graph sidebar' 'list sidebar'",e=>e.edit?"'title' 'list' 'list'":"'title' 'graph' 'list'",yA,bA,e=>e.edit?"min(100%, 80rem)":"unset",e=>e.edit?"0 auto":"unset"),dhe=C.div.withConfig({displayName:"OntologyPage__TitleSlot",componentId:"sc-c318252c-3"})(["grid-area:title;padding:",";"],e=>e.theme.size()),phe=C.div.withConfig({displayName:"OntologyPage__GraphSlot",componentId:"sc-c318252c-4"})(["grid-area:graph;padding:",";height:100%;"],e=>e.theme.size()),h1=C.ul.withConfig({displayName:"OntologyPage__StyledUl",componentId:"sc-c318252c-5"})(["display:flex;flex-direction:column;gap:2rem;& > li{margin-left:0px;list-style:none;}"]);function fhe({resource:e}){const{collection:t}=Qo({property:E.properties.allowsOnly,value:e.subject},{pageSize:100});return t.totalMembers===0?a.jsx(Kn,{children:"Not used in any properties"}):a.jsx(Kn,{children:a.jsx(ge,{children:Array.from({length:t.totalMembers}).map((n,r)=>a.jsx(hhe,{index:r,collection:t},r))})})}function hhe({index:e,collection:t}){const n=w7(t,e),[r]=we(n,E.properties.allowsOnly),[o]=rt(n);return n.loading?a.jsx(a.Fragment,{}):a.jsxs(ge,{children:[a.jsx("h2",{children:o}),a.jsx("div",{children:a.jsx(Td,{subjects:r})})]})}function mhe({resource:e}){const[,t]=ne(e,X.properties.color,{commit:!0}),[n,r]=ne(e,X.properties.emoji,{commit:!0}),o=sr(E.properties.shortname),[i]=jt(e);return a.jsx(ht,{children:a.jsxs(ge,{children:[a.jsx(vhe,{children:a.jsx(Em,{subject:e.subject})}),i&&a.jsx(Kn,{children:a.jsxs(ge,{children:[a.jsx("h2",{children:"Edit tag"}),a.jsxs(be,{gap:"0.5rem",children:[a.jsx(ghe,{children:a.jsx(mE,{initialValue:n,onChange:r})}),a.jsx(Pi,{commit:!0,resource:e,property:o,commitDebounceInterval:1e3})]}),a.jsx(uE,{palette:px,onChange:t})]})}),a.jsx(fhe,{resource:e}),a.jsx(bE,{resource:e,initialOpenState:!0})]})})}const ghe=C.div.withConfig({displayName:"TagPage__EmojiInputWrapper",componentId:"sc-9368a5b9-0"})(["border:1px solid ",";height:2.2rem;width:2.2rem;display:flex;align-items:center;justify-content:center;border-radius:",";"],e=>e.theme.colors.bg2,e=>e.theme.radius),vhe=C.span.withConfig({displayName:"TagPage__TagWrapper",componentId:"sc-9368a5b9-1"})(["font-size:2rem;width:fit-content;"]);function cw({subject:e}){const t=q(e),[n]=ne(t,E.properties.isA);if(f.useEffect(()=>{document.body.removeAttribute("inert")},[]),t.loading)return a.jsx(Sr,{subject:e,children:a.jsxs(ht,{children:[a.jsx("p",{children:"Loading..."}),a.jsx(hk,{})]})});if(t.error)return a.jsx(Sr,{subject:e,children:a.jsx($ne,{resource:t})});const r=yhe(n);return a.jsx(Sr,{subject:e,children:a.jsx(yc,{children:a.jsx(r,{resource:t})})})}function yhe(e){switch(e){case Lr.classes.collection:return Oie;case Ne.classes.endpoint:return $ie;case Ne.classes.drive:return Bie;case Ne.classes.redirect:return Hie;case Ne.classes.invite:return Uie;case X.classes.document:return yse;case E.classes.class:return Rse;case Ne.classes.file:return Ase;case X.classes.chatroom:return Tse;case X.classes.message:return Bse;case X.classes.bookmark:return Yse;case X.classes.importer:return wR;case X.classes.folder:return Yae;case X.classes.article:return tie;case X.classes.table:return Upe;case E.classes.ontology:return che;case X.classes.tag:return mhe;default:return Gre}}function bhe({filters:e,setFilters:t}){const[n,r]=f.useState(void 0),o=q(n),[i]=we(o,J.properties.requires),[s]=we(o,J.properties.recommends),l=[...i,...s];return f.useEffect(()=>{t({...e,[J.properties.isA]:n})},[n,JSON.stringify(e)]),a.jsxs("div",{children:[a.jsx(Wr,{setSubject:r,value:n,isA:J.classes.class}),l==null?void 0:l.map(c=>a.jsx(xhe,{subject:c,filters:e,setFilters:t},c))]})}function xhe({filters:e,setFilters:t,subject:n}){const r=sr(n);function o(i){t({...e,[r.shortname]:i.target.value})}return a.jsxs("div",{children:[a.jsx("label",{children:r.shortname}),a.jsx("input",{type:"text",value:e[r.shortname],onChange:o})]})}function xA(){const[e]=dk(),{drive:t}=Le(),{scope:n}=Wb(),[r,o]=f.useState({}),[i,s]=f.useState(!1);De("f12",x=>{x.preventDefault(),s(!i)},[i]);const[l,c]=f.useState(!1),[u,d]=f.useState(0),{results:p,loading:h,error:m}=Ca(e,{debounce:0,parents:n||t,filters:r,include:!0}),v=kt(),g=f.useRef(null);function b(x){var S;d(x);const w=(S=g==null?void 0:g.current)==null?void 0:S.children[x];w==null||w.scrollIntoView({block:"nearest"})}De("enter",x=>{var S,k,_;x.preventDefault();const w=(k=(S=g==null?void 0:g.current)==null?void 0:S.children[u])==null?void 0:k.getAttribute("about");if(w){(_=document==null?void 0:document.activeElement)==null||_.blur();const I=lt(w);v(I)}},{enableOnTags:["INPUT"]}),De("up",x=>{x.preventDefault();const w=u>0?u-1:0;b(w)},{enableOnTags:["INPUT"]}),De("down",x=>{x.preventDefault();const w=u===p.length-1?p.length-1:u+1;b(w)},{enableOnTags:["INPUT"]});let y="No hits";return(e==null?void 0:e.length)===0&&(y="Enter a search query"),h&&(y="Loading results..."),p.length>0&&(y=void 0),a.jsx(Sr,{children:a.jsx(ht,{children:m?a.jsx(yt,{children:m.message}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[a.jsxs(whe,{children:[a.jsx(am,{}),a.jsx("span",{children:y||a.jsxs(a.Fragment,{children:[p.length," ",p.length>1?"Results":"Result"," for"," ",a.jsx(She,{children:e})]})})]}),i&&a.jsxs(oe,{onClick:()=>c(!l),children:[a.jsx(L$,{}),"Filter"]})]}),l&&a.jsx(bhe,{setFilters:o,filters:r}),a.jsx(ge,{ref:g,gap:"1rem",children:p.map((x,w)=>a.jsx(wc,{initialInView:w<5,subject:x,highlight:w===u},x))})]})})})}const whe=C.h1.withConfig({displayName:"SearchRoute__Heading",componentId:"sc-854ab4c0-0"})(["color:",";display:flex;align-items:center;gap:0.7ch;white-space:nowrap;overflow:hidden;line-height:1.5;margin-bottom:","rem;> span{overflow:hidden;text-overflow:ellipsis;}"],e=>e.theme.colors.text,e=>e.theme.margin*3),She=C.span.withConfig({displayName:"SearchRoute__QueryText",componentId:"sc-854ab4c0-1"})(["color:",";"],e=>e.theme.colors.textLight);function Che({style:e}){const{darkMode:t}=Le(),n=t?"white":"black";return a.jsxs("svg",{style:e,viewBox:"0 0 647 75",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M57.512 58.4H23.712L17.264 74H0L32.448 1.19995H49.088L81.64 74H63.96L57.512 58.4ZM52.208 45.608L40.664 17.736L29.12 45.608H52.208Z",fill:n}),a.jsx("path",{d:"M119.469 71.296C117.875 72.4746 115.899 73.376 113.541 74C111.253 74.5546 108.827 74.832 106.261 74.832C99.6052 74.832 94.4398 73.1333 90.7652 69.736C87.1598 66.3386 85.3572 61.3466 85.3572 54.76V31.776H76.7252V19.296H85.3572V5.67196H101.581V19.296H115.517V31.776H101.581V54.552C101.581 56.9093 102.171 58.7466 103.349 60.064C104.597 61.312 106.331 61.936 108.549 61.936C111.115 61.936 113.299 61.2426 115.101 59.856L119.469 71.296Z",fill:n}),a.jsx("path",{d:"M258.334 17.216C265.337 17.216 270.884 19.296 274.974 23.456C279.134 27.5466 281.214 33.7173 281.214 41.9679V74H264.99V44.464C264.99 40.0266 264.054 36.7333 262.182 34.584C260.38 32.3653 257.78 31.256 254.382 31.256C250.569 31.256 247.553 32.504 245.334 35C243.116 37.4266 242.006 41.0666 242.006 45.92V74H225.782V44.464C225.782 35.6586 222.246 31.256 215.174 31.256C211.43 31.256 208.449 32.504 206.23 35C204.012 37.4266 202.902 41.0666 202.902 45.92V74H186.678V18.048H202.174V24.496C204.254 22.1386 206.785 20.336 209.766 19.088C212.817 17.84 216.145 17.216 219.75 17.216C223.702 17.216 227.273 18.0133 230.462 19.608C233.652 21.1333 236.217 23.3866 238.158 26.368C240.446 23.456 243.324 21.2026 246.79 19.608C250.326 18.0133 254.174 17.216 258.334 17.216Z",fill:n}),a.jsx("path",{d:"M291.596 18.048H307.82V74H291.596V18.048Z",fill:n}),a.jsx("path",{d:"M345.758 74.832C339.795 74.832 334.422 73.6186 329.638 71.192C324.923 68.696 321.214 65.264 318.51 60.896C315.875 56.528 314.558 51.5706 314.558 46.0239C314.558 40.4773 315.875 35.52 318.51 31.152C321.214 26.784 324.923 23.3866 329.638 20.96C334.422 18.464 339.795 17.216 345.758 17.216C351.651 17.216 356.782 18.464 361.15 20.96C365.587 23.3866 368.811 26.888 370.822 31.464L358.238 38.224C355.326 33.0933 351.131 30.528 345.654 30.528C341.424 30.528 337.923 31.9146 335.15 34.688C332.376 37.4613 330.99 41.2399 330.99 46.0239C330.99 50.808 332.376 54.5866 335.15 57.36C337.923 60.1333 341.424 61.52 345.654 61.52C351.2 61.52 355.395 58.9546 358.238 53.824L370.822 60.688C368.811 65.1253 365.587 68.592 361.15 71.088C356.782 73.584 351.651 74.832 345.758 74.832Z",fill:n}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M137.633 17.5725C139.483 22.4964 144.235 26 149.806 26C155.376 26 160.128 22.4964 161.979 17.5725C172.482 22.241 179.806 32.7652 179.806 45C179.806 61.5685 166.374 75 149.806 75C133.237 75 119.806 61.5685 119.806 45C119.806 32.7652 127.13 22.241 137.633 17.5725ZM141.39 16.1965C142.679 19.589 145.961 22 149.806 22C153.65 22 156.932 19.589 158.221 16.1965C155.551 15.4176 152.727 15 149.806 15C146.884 15 144.06 15.4176 141.39 16.1965ZM163.806 45C163.806 52.732 157.538 59 149.806 59C142.074 59 135.806 52.732 135.806 45C135.806 37.268 142.074 31 149.806 31C157.538 31 163.806 37.268 163.806 45Z",fill:n}),a.jsx("path",{d:"M143.442 19.364C139.927 15.8492 139.927 10.1508 143.442 6.63604C146.956 3.12132 152.655 3.12132 156.17 6.63604C157.784 8.25001 158.656 10.3245 158.788 12.4365C158.943 14.9238 158.07 17.4632 156.17 19.364C152.655 22.8787 146.956 22.8787 143.442 19.364Z",fill:"url(#paint0_linear)"}),a.jsx("path",{d:"M415.806 1.19995H448.878C456.782 1.19995 463.75 2.72528 469.782 5.77595C475.883 8.75729 480.598 12.9866 483.926 18.464C487.323 23.9413 489.022 30.32 489.022 37.6C489.022 44.88 487.323 51.2586 483.926 56.736C480.598 62.2133 475.883 66.4773 469.782 69.528C463.75 72.5093 456.782 74 448.878 74H415.806V1.19995ZM448.046 60.168C455.326 60.168 461.115 58.1573 465.414 54.136C469.782 50.0453 471.966 44.5333 471.966 37.6C471.966 30.6666 469.782 25.1893 465.414 21.168C461.115 17.0773 455.326 15.032 448.046 15.032H432.654V60.168H448.046Z",fill:n}),a.jsx("path",{d:"M518.992 17.216C527.658 17.216 534.314 19.296 538.96 23.456C543.605 27.5466 545.928 33.752 545.928 42.072V74H530.744V67.032C527.693 72.232 522.008 74.832 513.688 74.832C509.389 74.832 505.645 74.104 502.456 72.648C499.336 71.192 496.944 69.1813 495.28 66.616C493.616 64.0506 492.784 61.1386 492.784 57.88C492.784 52.68 494.725 48.5893 498.608 45.608C502.56 42.6266 508.626 41.136 516.808 41.136H529.704C529.704 37.6 528.629 34.896 526.48 33.024C524.33 31.0826 521.106 30.112 516.808 30.112C513.826 30.112 510.88 30.5973 507.968 31.568C505.125 32.4693 502.698 33.7173 500.688 35.312L494.864 23.976C497.914 21.8266 501.554 20.1626 505.784 18.9839C510.082 17.8053 514.485 17.216 518.992 17.216ZM517.744 63.912C520.517 63.912 522.978 63.288 525.128 62.04C527.277 60.7226 528.802 58.816 529.704 56.32V50.6H518.576C511.92 50.6 508.592 52.784 508.592 57.152C508.592 59.232 509.389 60.896 510.984 62.144C512.648 63.3226 514.901 63.912 517.744 63.912Z",fill:n}),a.jsx("path",{d:"M592.539 71.296C590.944 72.4746 588.968 73.376 586.611 74C584.323 74.5546 581.896 74.832 579.331 74.832C572.675 74.832 567.51 73.1333 563.835 69.736C560.23 66.3386 558.427 61.3466 558.427 54.76V31.776H549.795V19.296H558.427V5.67196H574.651V19.296H588.587V31.776H574.651V54.552C574.651 56.9093 575.24 58.7466 576.419 60.064C577.667 61.312 579.4 61.936 581.619 61.936C584.184 61.936 586.368 61.2426 588.171 59.856L592.539 71.296Z",fill:n}),a.jsx("path",{d:"M620.054 17.216C628.721 17.216 635.377 19.296 640.022 23.456C644.668 27.5466 646.99 33.752 646.99 42.072V74H631.806V67.032C628.756 72.232 623.07 74.832 614.75 74.832C610.452 74.832 606.708 74.104 603.518 72.648C600.398 71.192 598.006 69.1813 596.342 66.616C594.678 64.0506 593.846 61.1386 593.846 57.88C593.846 52.68 595.788 48.5893 599.67 45.608C603.622 42.6266 609.689 41.136 617.87 41.136H630.766C630.766 37.6 629.692 34.896 627.542 33.024C625.393 31.0826 622.169 30.112 617.87 30.112C614.889 30.112 611.942 30.5973 609.03 31.568C606.188 32.4693 603.761 33.7173 601.75 35.312L595.926 23.976C598.977 21.8266 602.617 20.1626 606.846 18.9839C611.145 17.8053 615.548 17.216 620.054 17.216ZM618.806 63.912C621.58 63.912 624.041 63.288 626.19 62.04C628.34 60.7226 629.865 58.816 630.766 56.32V50.6H619.638C612.982 50.6 609.654 52.784 609.654 57.152C609.654 59.232 610.452 60.896 612.046 62.144C613.71 63.3226 615.964 63.912 618.806 63.912Z",fill:n}),a.jsx("defs",{children:a.jsxs("linearGradient",{id:"paint0_linear",x1:"156.17",y1:"19.364",x2:"143.442",y2:"6.63604",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{stopColor:"#033049"}),a.jsx("stop",{offset:"1",stopColor:"#00C2FF"})]})})]})}const wA=()=>a.jsxs(ht,{children:[a.jsx(Che,{style:{width:"30rem",maxWidth:"100%",marginBottom:"1rem"}}),a.jsx("p",{children:a.jsxs("em",{children:["The easiest way to ",a.jsx("b",{children:"create"}),", ",a.jsx("b",{children:"share"})," and ",a.jsx("b",{children:"model"})," linked data."]})}),a.jsx("p",{children:"Atomic Data is a modular specification for sharing, modifying and modeling graph data. It combines the ease of use of JSON, the connectivity of RDF (linked data) and the reliability of type-safety."}),a.jsxs("p",{children:["Atomic Data is especially suitable for knowledge graphs, distributed datasets, semantic data, p2p applications, decentralized apps, and data that is meant to be shared. It is designed to be highly extensible, easy to use, and to make the process of domain specific standardization as simple as possible. Check out"," ",a.jsx("b",{children:a.jsx(Me,{href:"https://docs.atomicdata.dev/",children:"the docs"})})," ","for more information about Atomic Data."]}),a.jsx("h2",{children:"About this app"}),a.jsxs("p",{children:["You're looking at"," ",a.jsx(Me,{href:"https://github.com/atomicdata-dev/atomic-data-browser",children:"atomic-data-browser"}),", an open-source client for viewing and editing data. Please add an issue if you encouter problems or have a feature request. Expect bugs and issues, because this stuff is pretty beta."]}),a.jsxs("p",{children:["The back-end of this app is"," ",a.jsx(Me,{href:"https://github.com/atomicdata-dev/atomic-data-rust",children:"atomic-server"}),", which you can think of as an open source, web-native database."]}),a.jsx("h2",{children:"Things to visit"}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx(Me,{path:"/collections",children:"List of lists"})}),a.jsx("li",{children:a.jsx(Me,{path:"/classes",children:"List of Classes"})}),a.jsx("li",{children:a.jsx(Me,{path:"/properties",children:"List of Properties"})})]}),a.jsx("h2",{children:"Run your own server"}),a.jsxs("p",{children:["The easiest way to run an"," ",a.jsx(Me,{href:"https://github.com/atomicdata-dev/atomic-data-rust",children:"atomic-server"})," ","is by using Docker:"]}),a.jsx("p",{children:a.jsx("code",{children:"docker run -p 80:80 -p 443:443 -v atomic-storage:/atomic-storage joepmeneer/atomic-server"})}),a.jsxs("p",{children:["...and visit"," ",a.jsx(Me,{subject:"http://localhost",children:"localhost"}),"."]}),a.jsx("h2",{children:"Join the community"}),a.jsxs("p",{children:["Atomic Data is open and fully powered by volunteers. We're looking for people who want to help discuss various design challenges and work on implmenentations. If you have any questions, or want to help out, feel free to join our"," ",a.jsx(Me,{href:"https://discord.gg/a72Rv2P",children:"Discord"}),"! Sign up to"," ",a.jsx(Me,{href:"https://docs.atomicdata.dev/newsletter.html",children:"our newsletter"})," ","if you","'","d like to get updated! ."]})]}),jhe=()=>{const[e]=cr();return e===void 0||e===""?a.jsx(wA,{}):Bt.isValidSubject(e)?a.jsx(cw,{subject:e},e):a.jsx(xA,{})},khe=({classSubject:e})=>{const t=q(e),[n,r]=ma("newSubject"),[o]=ma("parent"),{initialized:i,subjectErr:s,subjectValue:l,setSubjectValue:c,resource:u}=CI({klass:t,setSubject:r,initialSubject:n,parent:o});return i?a.jsxs(ge,{children:[a.jsx(xI,{classSubject:e}),a.jsx(SI,{error:s,value:l,onChange:c}),a.jsx(Bx,{resource:u,classSubject:e},`${e}+${n}`)]}):a.jsx(a.Fragment,{children:"Initializing Resource"})};function SA({classType:e,parent:t}){const n=q(e),[r]=rt(n);return a.jsx(Qu,{icon:!0,IconComponent:No(e),klass:e,parent:t,label:r,subtle:!0})}const Ehe=[X.classes.table,X.classes.folder,X.classes.document,X.classes.chatroom,X.classes.bookmark,E.classes.ontology];function _he({parent:e}){return a.jsx(Ux,{title:"Base classes",children:Ehe.map(t=>a.jsx(SA,{classType:t,parent:e},t))})}function Ihe({parent:e}){const{drive:t}=Le(),{results:n}=Ca("",{filters:{[E.properties.isA]:E.classes.ontology},parents:[t],allowEmptyQuery:!0,limit:100});return a.jsx(a.Fragment,{children:n.map(r=>a.jsx(Rhe,{subject:r,parent:e},r))})}const Rhe=({subject:e,parent:t})=>{const n=q(e),r=n.props.classes??[];return r.length===0?null:a.jsx(Ux,{title:n.title,children:r.map(o=>a.jsx(SA,{classType:o,parent:t},o))})};function Ahe({title:e,id:t,onClick:n,Image:r}){return a.jsxs(Phe,{onClick:()=>n(t),children:[a.jsx(r,{}),a.jsx(The,{children:a.jsx("span",{children:e})})]})}const Phe=C.button.withConfig({displayName:"TemplateListItem__Wrapper",componentId:"sc-2e751df9-0"})(["--template-color-bg:",";--template-color-bg1:",";--template-color-bg2:",";appearance:none;padding:0;cursor:pointer;background-color:",";border:1px solid ",";border-radius:",";overflow:clip;color:",";&:hover,&:focus-visible{border-color:",";--template-color-bg2:",";}& svg{width:100%;height:auto;}"],e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight,e=>e.theme.colors.bg,e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.text,e=>e.theme.colors.main,e=>e.theme.colors.main),The=C.div.withConfig({displayName:"TemplateListItem__Content",componentId:"sc-2e751df9-1"})(["border-top:1px solid ",";padding:1rem;"],e=>e.theme.colors.bg2),Dhe=()=>a.jsx("svg",{width:"1803",height:"1200",viewBox:"0 0 1803 1200",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsxs("g",{clipPath:"url(#clip0_930_4)",children:[a.jsx("rect",{width:"1803",height:"1200",fill:"var(--template-color-bg"}),a.jsx("rect",{width:"1920",height:"130",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"116",y:"37",width:"258",height:"55",rx:"15",fill:"var(--template-color-bg"}),a.jsx("rect",{x:"1548",y:"49",width:"139",height:"32",rx:"15",fill:"var(--template-color-bg"}),a.jsx("rect",{x:"1363",y:"49",width:"139",height:"32",rx:"15",fill:"var(--template-color-bg"}),a.jsx("rect",{x:"1178",y:"49",width:"139",height:"32",rx:"15",fill:"var(--template-color-bg"}),a.jsx("rect",{x:"117",y:"201",width:"944",height:"87",rx:"15",fill:"var(--template-color-bg2)"}),a.jsx("rect",{x:"117",y:"357",width:"718",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"117",y:"417",width:"846",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"117",y:"477",width:"798",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"117",y:"537",width:"694",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"117",y:"597",width:"857",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"117",y:"657",width:"760",height:"29",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"116",y:"755",width:"430",height:"369",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"687",y:"755",width:"430",height:"369",rx:"15",fill:"var(--template-color-bg1)"}),a.jsx("rect",{x:"1258",y:"755",width:"430",height:"369",rx:"15",fill:"var(--template-color-bg1)"})]})}),Nhe={title:"website",id:"website",description:e=>`This template adds a website ontology to your AtomicServer along with some sample website data.
The website features blog posts, nested menu items and content blocks to create expressive pages from data.
An \`@tomic/template\` template is also available to setup a fully working website in a variety of front-end frameworks that you can then customize to your preferences.
\`\`\`
npm create @tomic/template my-project -- --template sveltekit-site --server-url ${e.serverUrl}
pnpm create @tomic/template my-project --template sveltekit-site --server-url ${e.serverUrl}
yarn create @tomic/template my-project --template sveltekit-site --server-url ${e.serverUrl}
\`\`\`
Currently available @tomic/templates for the website template are:
- sveltekit-site`,Image:Dhe,rootResourceLocalIDs:["01j6zqa7qgamwh5960dzy99j70","01j5zr8e919ph7g5xgyehv0g17"],resources:[{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.classes]:["01j6zqa7qgamwh5960dzy99j70/class/blog-index-page","01j6zqa7qgamwh5960dzy99j70/class/blogpost","01j6zqa7qgamwh5960dzy99j70/class/image-gallery-block","01j6zqa7qgamwh5960dzy99j70/class/menu-item","01j6zqa7qgamwh5960dzy99j70/class/page","01j6zqa7qgamwh5960dzy99j70/class/text-block","01j6zqa7qgamwh5960dzy99j70/class/website"],[E.properties.description]:"Ontology for the template website.",[E.properties.instances]:[],[E.properties.isA]:[E.classes.ontology],[E.properties.properties]:["01j6zqa7qgamwh5960dzy99j70/property/blocks","01j6zqa7qgamwh5960dzy99j70/property/cover-image","01j6zqa7qgamwh5960dzy99j70/property/external-link","01j6zqa7qgamwh5960dzy99j70/property/homepage","01j6zqa7qgamwh5960dzy99j70/property/path","01j6zqa7qgamwh5960dzy99j70/property/images","01j6zqa7qgamwh5960dzy99j70/property/links-to","01j6zqa7qgamwh5960dzy99j70/property/menu-items","01j6zqa7qgamwh5960dzy99j70/property/published-at","01j6zqa7qgamwh5960dzy99j70/property/sub-items"],[E.properties.shortname]:"website"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/blog-index-page",[E.properties.description]:"Page with a list of blogposts.",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.requires]:[E.properties.name,E.properties.description,"01j6zqa7qgamwh5960dzy99j70/property/path"],[E.properties.shortname]:"blog-index-page"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/blogpost",[E.properties.description]:"A blogpost on a website",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.requires]:[E.properties.name,E.properties.description,"01j6zqa7qgamwh5960dzy99j70/property/path","01j6zqa7qgamwh5960dzy99j70/property/cover-image","01j6zqa7qgamwh5960dzy99j70/property/published-at"],[E.properties.shortname]:"blogpost"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/image-gallery-block",[E.properties.description]:"A list of images",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.recommends]:[E.properties.name],[E.properties.requires]:["01j6zqa7qgamwh5960dzy99j70/property/images"],[E.properties.shortname]:"image-gallery-block"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/menu-item",[E.properties.description]:"A link or dropdown menu in the navbar of the website.",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.recommends]:["01j6zqa7qgamwh5960dzy99j70/property/sub-items","01j6zqa7qgamwh5960dzy99j70/property/links-to","01j6zqa7qgamwh5960dzy99j70/property/external-link"],[E.properties.requires]:[E.properties.name],[E.properties.shortname]:"menu-item"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/page",[E.properties.description]:`A page of a website.\\
\\
Name and description are used for title and meta-tags.`,[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.recommends]:["01j6zqa7qgamwh5960dzy99j70/property/blocks"],[E.properties.requires]:[E.properties.name,E.properties.description,"01j6zqa7qgamwh5960dzy99j70/property/path"],[E.properties.shortname]:"page"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/text-block",[E.properties.description]:"A block of text",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.requires]:[E.properties.description],[E.properties.shortname]:"text-block"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/class/website",[E.properties.description]:"Root data of the website.",[E.properties.isA]:[E.classes.class],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.recommends]:["01j6zqa7qgamwh5960dzy99j70/property/menu-items"],[E.properties.requires]:["01j6zqa7qgamwh5960dzy99j70/property/homepage",E.properties.name],[E.properties.shortname]:"website"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/blocks",[E.properties.datatype]:"https://atomicdata.dev/datatypes/resourceArray",[E.properties.description]:"A list of blocks to display on the page",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"blocks"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/cover-image",[E.properties.classtype]:"https://atomicdata.dev/classes/File",[E.properties.datatype]:"https://atomicdata.dev/datatypes/atomicURL",[E.properties.description]:"Image that is displayed at the top of the blogpost.",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"cover-image"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/external-link",[E.properties.datatype]:"https://atomicdata.dev/datatypes/string",[E.properties.description]:"Link to an external website",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"external-link"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/homepage",[E.properties.classtype]:"01j6zqa7qgamwh5960dzy99j70/class/page",[E.properties.datatype]:"https://atomicdata.dev/datatypes/atomicURL",[E.properties.description]:"Homepage of the website",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"homepage"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/path",[E.properties.datatype]:"https://atomicdata.dev/datatypes/string",[E.properties.description]:"The path a page should live on. Should be relative to the root of the website.",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"href"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/images",[E.properties.classtype]:"https://atomicdata.dev/classes/File",[E.properties.datatype]:"https://atomicdata.dev/datatypes/resourceArray",[E.properties.description]:"A list of images to display",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"images"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/links-to",[E.properties.datatype]:"https://atomicdata.dev/datatypes/atomicURL",[E.properties.description]:"Determines to what resource the menu item links.",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"links-to"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/menu-items",[E.properties.classtype]:"01j6zqa7qgamwh5960dzy99j70/class/menu-item",[E.properties.datatype]:"https://atomicdata.dev/datatypes/resourceArray",[E.properties.description]:"A lists of menu items",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"menu-items"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/published-at",[E.properties.datatype]:"https://atomicdata.dev/datatypes/timestamp",[E.properties.description]:"The date and time something was published",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"published-at"},{[E.properties.localId]:"01j6zqa7qgamwh5960dzy99j70/property/sub-items",[E.properties.classtype]:"01j6zqa7qgamwh5960dzy99j70/class/menu-item",[E.properties.datatype]:"https://atomicdata.dev/datatypes/resourceArray",[E.properties.description]:"A list of menu items that are nested under this menu item.",[E.properties.isA]:[E.classes.property],[E.properties.parent]:"01j6zqa7qgamwh5960dzy99j70",[E.properties.shortname]:"sub-items"},{[E.properties.localId]:"01j5zr8e919ph7g5xgyehv0g17",[E.properties.isA]:[X.classes.folder],[E.properties.name]:"Site Data",[X.properties.subResources]:["01j5zrd23mxam4mdg2ak97gqcm","01j5zrevq917dp0wm4p2vnd7nr","01j67112t57y1nefp8gerjz4ba","01j67hpt3x1jpwq3pnhh57kcph","01j67hnx3j12j9skvhhjw44v7v","01j6cbg9djf269zdwwv5114jsd","01j6cjpvhc8sgmqeg6v84fgxtv"],[X.properties.displayStyle]:"https://atomicdata.dev/display-style/list"},{[E.properties.localId]:"01j5zrevq917dp0wm4p2vnd7nr","01j6zqa7qgamwh5960dzy99j70/property/homepage":"01j5zrd23mxam4mdg2ak97gqcm","01j6zqa7qgamwh5960dzy99j70/property/menu-items":["01j670xy9me8yk6fte8wrqwxfd","01j5zrecgbejcbpvtkj1g8f2cn","01j6cbh8bgpvvn0e8hk87bvgnr","01j67bedjzrpp6mva2a6576fh6"],[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/website"],[E.properties.name]:"Atomic Website Template",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j670xy9me8yk6fte8wrqwxfd","01j5zrecgbejcbpvtkj1g8f2cn","01j6cbh8bgpvvn0e8hk87bvgnr","01j67bedjzrpp6mva2a6576fh6"]},{[E.properties.localId]:"01j670xy9me8yk6fte8wrqwxfd","01j6zqa7qgamwh5960dzy99j70/property/links-to":"01j5zrd23mxam4mdg2ak97gqcm",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"Home",[E.properties.parent]:"01j5zrevq917dp0wm4p2vnd7nr"},{[E.properties.localId]:"01j5zrecgbejcbpvtkj1g8f2cn","01j6zqa7qgamwh5960dzy99j70/property/links-to":"01j67112t57y1nefp8gerjz4ba",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"About",[E.properties.parent]:"01j5zrevq917dp0wm4p2vnd7nr"},{[E.properties.localId]:"01j6cbh8bgpvvn0e8hk87bvgnr","01j6zqa7qgamwh5960dzy99j70/property/links-to":"01j6cjpvhc8sgmqeg6v84fgxtv",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"Blog",[E.properties.parent]:"01j5zrevq917dp0wm4p2vnd7nr"},{[E.properties.localId]:"01j67bedjzrpp6mva2a6576fh6","01j6zqa7qgamwh5960dzy99j70/property/sub-items":["01j67bmrfhxf1m9wqy2eajzcps","01j67bnfz2wwt67gr7jxep4rn8"],[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"Projects",[E.properties.parent]:"01j5zrevq917dp0wm4p2vnd7nr",[X.properties.subResources]:["01j67bmrfhxf1m9wqy2eajzcps","01j67bnfz2wwt67gr7jxep4rn8"]},{[E.properties.localId]:"01j67bmrfhxf1m9wqy2eajzcps","01j6zqa7qgamwh5960dzy99j70/property/links-to":"01j67hnx3j12j9skvhhjw44v7v",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"This website",[E.properties.parent]:"01j67bedjzrpp6mva2a6576fh6"},{[E.properties.localId]:"01j67bnfz2wwt67gr7jxep4rn8","01j6zqa7qgamwh5960dzy99j70/property/links-to":"01j67hpt3x1jpwq3pnhh57kcph",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/menu-item"],[E.properties.name]:"Making Cheese",[E.properties.parent]:"01j67bedjzrpp6mva2a6576fh6"},{[E.properties.localId]:"01j5zrd23mxam4mdg2ak97gqcm","01j6zqa7qgamwh5960dzy99j70/property/blocks":["01j69w16079grvs7x9x0bk5kjb","01j69weee5kvxedekcsm9z8hgd"],"01j6zqa7qgamwh5960dzy99j70/property/path":"/",[E.properties.description]:"A Sveltekit site made with Atomic Data",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/page"],[E.properties.name]:"Atomic Website Template",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j69w16079grvs7x9x0bk5kjb","01j69weee5kvxedekcsm9z8hgd"]},{[E.properties.localId]:"01j69w16079grvs7x9x0bk5kjb",[E.properties.description]:`This is a template site generated with @tomic/template.
This content can be changed in the AtomicServer UI.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/text-block"],[E.properties.parent]:"01j5zrd23mxam4mdg2ak97gqcm"},{[E.properties.localId]:"01j69weee5kvxedekcsm9z8hgd","01j6zqa7qgamwh5960dzy99j70/property/images":["https://atomicdata.dev/files/1726131947878-matt-flores-auOYGNcPSw8-unsplash.jpg","https://atomicdata.dev/files/1726131961564-carson-arias-7Z03R1wOdmI-unsplash.jpg","https://atomicdata.dev/files/1726131980022-nick-baker-VuPIUePS_vU-unsplash.jpg","https://atomicdata.dev/files/1726131992774-crawford-jolly--gFxMygtgsg-unsplash.jpg","https://atomicdata.dev/files/1726131984886-philipp-hofmann-q8FpoS21UQE-unsplash.jpg","https://atomicdata.dev/files/1726131998153-mike-dorner-sf_1ZDA1YFw-unsplash.jpg"],[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/image-gallery-block"],[E.properties.name]:"Some pictures",[E.properties.parent]:"01j5zrd23mxam4mdg2ak97gqcm"},{[E.properties.localId]:"01j67112t57y1nefp8gerjz4ba","01j6zqa7qgamwh5960dzy99j70/property/blocks":["01j6c7hs5z48pgdxrms4a3n91h"],"01j6zqa7qgamwh5960dzy99j70/property/path":"/about",[E.properties.description]:"About this template site",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/page"],[E.properties.name]:"About",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j6c7hs5z48pgdxrms4a3n91h"]},{[E.properties.localId]:"01j6c7hs5z48pgdxrms4a3n91h",[E.properties.description]:`Hi I’m —— and I love ——!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ut pellentesque tortor. Sed a lobortis tellus. Phasellus at consequat metus, nec luctus eros. Aliquam erat volutpat. Pellentesque malesuada felis ut augue pulvinar venenatis. Vestibulum condimentum ut leo et pellentesque. Nam lobortis bibendum malesuada. Nam eu augue neque. Nam est quam, ultricies ac accumsan quis, gravida at quam. Aliquam mollis fermentum odio quis ultrices. Vestibulum sagittis, metus vel fringilla ultrices, nibh tellus pellentesque sapien, mollis hendrerit nunc orci id felis. Nullam accumsan eros a ante ultrices fringilla. Mauris ut faucibus felis.
Proin at condimentum velit, id sollicitudin nibh. Sed dapibus vehicula congue. Vestibulum risus velit, rutrum non mattis in, placerat auctor libero. Fusce nec augue condimentum, posuere justo eget, ornare ex. Fusce euismod ultrices rhoncus. Aenean congue est et dui vestibulum, sed gravida dui iaculis. Aenean imperdiet molestie arcu vel fringilla. Quisque sit amet elementum lorem. Vestibulum id fringilla mauris. Ut congue et nunc a rhoncus. Nullam a auctor erat. Cras id nibh pharetra, suscipit arcu sagittis, rutrum urna. Maecenas sed arcu justo. Vivamus eu lorem ac enim tincidunt volutpat quis eget nisl. Vivamus posuere est ac elit efficitur, ut viverra leo pretium. Suspendisse eleifend tortor sit amet turpis laoreet vulputate.
Quisque lobortis dolor quis vulputate tristique. Nullam dignissim nec nulla non mattis. Pellentesque bibendum, ipsum vel volutpat faucibus, nisi enim condimentum magna, vitae lobortis libero diam ac turpis. Nam luctus a erat non blandit. Quisque ultrices dictum tortor, sed ultrices turpis gravida id. Mauris sed lacus ultricies tellus pulvinar convallis. Vivamus purus felis, sagittis nec pharetra in, pharetra a metus. Suspendisse congue lacus massa, auctor hendrerit augue dictum vel. Cras varius sollicitudin rhoncus. Integer convallis dui nec elit pellentesque, in commodo quam rutrum. Proin vitae mauris tortor.`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/text-block"],[E.properties.parent]:"01j67112t57y1nefp8gerjz4ba"},{[E.properties.localId]:"01j67hpt3x1jpwq3pnhh57kcph","01j6zqa7qgamwh5960dzy99j70/property/blocks":["01j7jyh9e626k4gb1w0c7mkjp1"],"01j6zqa7qgamwh5960dzy99j70/property/path":"/making-cheese",[E.properties.description]:"I made my own cheese!",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/page"],[E.properties.name]:"Making Cheese",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j7jyh9e626k4gb1w0c7mkjp1"]},{[E.properties.localId]:"01j7jyh9e626k4gb1w0c7mkjp1",[E.properties.description]:`Recently I started making my own cheese! It’s really cool.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ut pellentesque tortor. Sed a lobortis tellus. Phasellus at consequat metus, nec luctus eros. Aliquam erat volutpat. Pellentesque malesuada felis ut augue pulvinar venenatis. Vestibulum condimentum ut leo et pellentesque. Nam lobortis bibendum malesuada. Nam eu augue neque. Nam est quam, ultricies ac accumsan quis, gravida at quam. Aliquam mollis fermentum odio quis ultrices. Vestibulum sagittis, metus vel fringilla ultrices, nibh tellus pellentesque sapien, mollis hendrerit nunc orci id felis. Nullam accumsan eros a ante ultrices fringilla. Mauris ut faucibus felis.
Proin at condimentum velit, id sollicitudin nibh. Sed dapibus vehicula congue. Vestibulum risus velit, rutrum non mattis in, placerat auctor libero. Fusce nec augue condimentum, posuere justo eget, ornare ex. Fusce euismod ultrices rhoncus. Aenean congue est et dui vestibulum, sed gravida dui iaculis. Aenean imperdiet molestie arcu vel fringilla. Quisque sit amet elementum lorem. Vestibulum id fringilla mauris. Ut congue et nunc a rhoncus. Nullam a auctor erat. Cras id nibh pharetra, suscipit arcu sagittis, rutrum urna. Maecenas sed arcu justo. Vivamus eu lorem ac enim tincidunt volutpat quis eget nisl. Vivamus posuere est ac elit efficitur, ut viverra leo pretium. Suspendisse eleifend tortor sit amet turpis laoreet vulputate.
Quisque lobortis dolor quis vulputate tristique. Nullam dignissim nec nulla non mattis. Pellentesque bibendum, ipsum vel volutpat faucibus, nisi enim condimentum magna, vitae lobortis libero diam ac turpis. Nam luctus a erat non blandit. Quisque ultrices dictum tortor, sed ultrices turpis gravida id. Mauris sed lacus ultricies tellus pulvinar convallis. Vivamus purus felis, sagittis nec pharetra in, pharetra a metus. Suspendisse congue lacus massa, auctor hendrerit augue dictum vel. Cras varius sollicitudin rhoncus. Integer convallis dui nec elit pellentesque, in commodo quam rutrum. Proin vitae mauris tortor.`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/text-block"],[E.properties.parent]:"01j67hpt3x1jpwq3pnhh57kcph"},{[E.properties.localId]:"01j67hnx3j12j9skvhhjw44v7v","01j6zqa7qgamwh5960dzy99j70/property/blocks":["01j7jzsj3ec6twny6wp1g3gcx3"],"01j6zqa7qgamwh5960dzy99j70/property/path":"/this-website",[E.properties.description]:"I created this website to try out AtomicServer",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/page"],[E.properties.name]:"This website",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j7jzsj3ec6twny6wp1g3gcx3"]},{[E.properties.localId]:"01j7jzsj3ec6twny6wp1g3gcx3",[E.properties.description]:`A project I’ve been working recently is creating this website.
It was very easy! The only thing I had to do was apply the Website template to my AtomicServer drive, run an npm command to generate some code and then edit the site to make it my own.`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/text-block"],[E.properties.parent]:"01j67hnx3j12j9skvhhjw44v7v"},{[E.properties.localId]:"01j6cbg9djf269zdwwv5114jsd",[E.properties.isA]:[X.classes.folder],[E.properties.name]:"Blog posts",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17",[X.properties.subResources]:["01j6cbmtr2nq8fhhjkq764rcf3","01j6cc8pn7rpg4pymv6v0bvx2c","01j6ccm53p4bv9f92m4tpehcba","01j6ewtynjsyq7b3sc1pgqppde"],"https://atomicdata.dev/property/display-style":"https://atomicdata.dev/display-style/list"},{[E.properties.localId]:"01j6cbmtr2nq8fhhjkq764rcf3","01j6zqa7qgamwh5960dzy99j70/property/cover-image":"https://atomicdata.dev/files/1726129537342-pexels-photo-4498553.webp","01j6zqa7qgamwh5960dzy99j70/property/path":"/blog/how-to-tie-your-shoe-laces-correctly-everytime","01j6zqa7qgamwh5960dzy99j70/property/published-at":172424898e4,[E.properties.description]:`Tying your shoes might seem simple, but many people struggle with laces that come undone throughout the day. Whether you’re a runner or just want to keep your sneakers snug, here’s a foolproof way to tie your shoe laces correctly every time!
#### 1. **Start with a Solid Foundation**
Begin by crossing one lace over the other and pulling it tight, forming a secure "X." This is the base of your knot and helps keep your shoes firmly on your feet.
#### 2. **Create the Bunny Ears**
Now, make a loop (or "bunny ear") with each lace. Pinch the loops between your thumb and index finger. The loops should look like bunny ears!
#### 3. **Cross and Tuck**
Take one loop and cross it over the other. Then, tuck it underneath, just like you did with the initial "X." Pull both loops tight. This is your basic knot, but with loops that will hold their shape.
#### 4. **The Secret to Staying Power**
Here’s the trick most people miss: **double knot it.** To do this, simply tie the loops together one more time. This adds extra friction and ensures the knot stays intact all day.
#### 5. **Adjust for Comfort**
Finally, pull the loops until the laces feel snug but not too tight. Make sure the knot sits flat and comfortably against your foot to avoid discomfort.
With this method, you'll tie your shoes right every time, keeping them secure for longer, whether you're walking, running, or just going about your day. Happy tying!`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/blogpost"],[E.properties.name]:"How to tie your shoe laces correctly every time!",[E.properties.parent]:"01j6cbg9djf269zdwwv5114jsd"},{[E.properties.localId]:"01j6cc8pn7rpg4pymv6v0bvx2c","01j6zqa7qgamwh5960dzy99j70/property/cover-image":"https://atomicdata.dev/files/1726129561923-pexels-olly-3760809.jpg","01j6zqa7qgamwh5960dzy99j70/property/path":"/blog/10-weird-but-genious-lifehacks","01j6zqa7qgamwh5960dzy99j70/property/published-at":172278756e4,[E.properties.description]:`You know those life hacks that sound so clever, you’re convinced they’ll change your life forever—but then you realize you’ll probably never use them? Well, here’s a list of some truly weird but *genius* life hacks that are so brilliant, you’ll still find reasons to never actually try them.
#### 1. **Turn Your Hoodie Backwards for a Built-In Snack Pouch**
Why balance that bowl of popcorn on your lap when you can wear your hoodie backwards, and voilà—a snack pouch! The hoodie’s hood can hold popcorn, chips, or candy while you binge Netflix. Is it genius? Absolutely. Will you ever do it? Probably only if you're *really* committed to laziness.
#### 2. **Use a Fork to Hold Your Taco Together**
Tacos falling apart faster than your New Year's resolutions? Stick a fork through the open end to keep all the delicious ingredients intact. The fork tines also act as handy little prongs to hold the taco in place while you eat. Practical? Yes. But let’s be real, you’re just going to grab a pile of napkins and hope for the best.
#### 3. **Bread Clips as Flip-Flop Fixers**
You know those annoying little plastic clips that keep bread bags closed? Next time the strap pops out of your flip-flop, pop one of these bad boys on the bottom to hold it in place. Your flip-flop is fixed! This hack is genius, but the likelihood of having a bread clip when your flip-flop breaks is about the same as winning the lottery.
#### 4. **Aluminum Foil to Sharpen Scissors**
Blunt scissors? No problem! Fold some aluminum foil a few times and cut through it with your scissors. It's like a mini workout for the blades. A few snips and your scissors will be sharper than your wit. But let’s face it, the only time you’ll remember this is when you’re halfway through wrapping a gift with a pair of very sad, very dull scissors.
#### 5. **Rubber Bands Around a Paint Can to Wipe Excess Paint Off**
Why get paint all over the rim of the can? Stretch a rubber band across the opening of the can, and wipe your brush on it to remove excess paint. It keeps things clean and prevents that dreaded crusty paint layer from forming. Yet, somehow, we all just end up with crusty paint cans.
#### 6. **Store Your Headphones in an Old Mint Container**
That tangled mess of headphones at the bottom of your bag? Avoid it entirely by using an old mint tin as a little headphone holder. It keeps them untangled and fresh-smelling! But honestly, wireless earbuds are calling your name, and this will remain an unused, albeit genius, hack.
#### 7. **Use an Empty Toilet Paper Roll to Amplify Your Phone's Sound**
No Bluetooth speaker? No problem! Take an empty toilet paper roll, cut a slot big enough for your phone, and pop it in. The sound will echo through the roll and give you an instant volume boost. Will you try it? Maybe, but likely only once just to see if it works. Then you’ll put it aside and forget about it forever.
#### 8. **Freeze Grapes to Chill Wine Without Watering It Down**
You’re having a nice glass of white wine and it’s just not cold enough. Instead of adding ice cubes (ugh, watered-down wine!), freeze grapes and toss them in. They’ll chill your drink without diluting it. Genius? Absolutely. Will you remember to pre-freeze the grapes? Probably not—good luck with that warm Chardonnay.
#### 9. **Use a Dustpan to Fill a Bucket That Doesn’t Fit in the Sink**
Got a bucket that’s too big to fit under the faucet? Grab a dustpan, hold it under the stream, and let the water slide down the handle and into the bucket. Instant problem-solver! The only catch? You’ll definitely forget this trick the next time you’re awkwardly splashing water everywhere.
#### 10. **Use a Staple Remover to Save Your Fingernails When Adding Keys to a Keyring**
Adding a new key to your keyring is a nail-destroying nightmare. Enter: the humble staple remover. Just use it to pry the ring open and slide the key right on, no broken nails required. Will you remember this hack when you need it? Unlikely—you’ll probably still be wrestling with that keyring like it’s your nemesis.
---
### Conclusion: Hacks You Won't Try (But Really Should)
There you have it: 10 life hacks that are weirdly genius but, let’s be honest, probably won’t make it into your daily routine. The ideas are brilliant, but the execution? Well, that’s another story. However, if you do attempt any of these, you’ll feel like a life-hack legend. And hey, that counts for something!
So, next time you’re snacking out of a backward hoodie or fixing flip-flops with a bread clip, just remember: you’re living your best (weird) life.`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/blogpost"],[E.properties.name]:"10 Weird But Genius Life Hacks You Probably Won’t Use",[E.properties.parent]:"01j6cbg9djf269zdwwv5114jsd"},{[E.properties.localId]:"01j6ccm53p4bv9f92m4tpehcba","01j6zqa7qgamwh5960dzy99j70/property/cover-image":"https://atomicdata.dev/files/1726129572468-pexels-adam-lukac-254247-773958.jpg","01j6zqa7qgamwh5960dzy99j70/property/path":"/blog/can-you-really-survive-on-coffee-alone","01j6zqa7qgamwh5960dzy99j70/property/published-at":172485384e4,[E.properties.description]:`Let’s face it: coffee is more than just a beverage—it’s a lifestyle. It fuels our mornings, powers our afternoons, and sometimes becomes a late-night lifeline. But what if coffee was the *only* thing keeping you going? Could you survive an entire week on nothing but liquid caffeine? Well, I decided to find out, so here’s my highly caffeinated journey through a week where coffee was my only sustenance. Spoiler: things got weird.
#### Day 1: Optimistic Beginnings
**8:00 AM**: I’m feeling great. My morning coffee tastes like motivation in a cup, and I’m fully convinced I’ll breeze through this week. Coffee is practically a food group, right? It’s made from beans, which technically makes it a salad. I’m starting my day with a large mug of French press, imagining myself as some sort of coffee-fueled superhero.
**12:00 PM**: Time for lunch… of coffee. I opt for a cold brew to mix things up, and surprisingly, I feel fine. My productivity levels are soaring, and I’m firing off emails at the speed of light. Who needs food when you have caffeine?
**6:00 PM**: Dinner rolls around, and I’m starting to get hungry. I decide to jazz things up with a fancy cappuccino. Frothy milk counts as food, right? So far, so good. I head to bed with a slight headache but still confident.
#### Day 2: Caffeine Highs and Lows
**8:00 AM**: Woke up with a slight jitter. I blame it on excitement for another day of coffee-only living (and not the three cups I had before bed). I pour myself a large Americano and push through. My body may be craving nutrients, but my mind? Still riding that caffeine wave.
**1:00 PM**: I’m starting to lose focus. My cold brew lunch is just not hitting the spot today. Is it possible to feel both wired and exhausted at the same time? The answer is yes.
**4:00 PM**: I decide to take a nap, but my heart is racing too fast to sleep. Is this what being a hummingbird feels like? I can’t remember what food tastes like, but I think I’m fine.
#### Day 3: Questioning My Life Choices
**9:00 AM**: I missed my morning alarm because I stayed up until 3 AM Googling "how much coffee is too much coffee." Turns out, no one really knows. I pour a double espresso to catch up on lost energy. It’s not working.
**12:00 PM**: My co-workers keep asking why I’m shaking, and I tell them I’m fine. I am not fine.
**5:00 PM**: I swear I just saw my chair move on its own. I decide to switch to decaf for dinner. Decaf is basically salad dressing on my coffee-salad, right? Definitely still counts.
#### Day 4: Caffeine Delirium
**8:00 AM**: At this point, I’m pretty sure my body has transcended hunger. Who needs solid food when you can run on pure espresso? I’ve stopped feeling full (or hungry), and I’ve reached a zen state of caffeinated consciousness. I like to call it "Java Nirvana."
**11:00 AM**: My hands won’t stop trembling, so I just hold my coffee mug constantly now. People assume I’m drinking and not vibrating into a higher dimension.
**3:00 PM**: I attempt to meditate but can’t sit still for more than 10 seconds. It feels like ants are dancing inside my skin. Note to self: drinking coffee during a yoga session was a *bad* idea.
#### Day 5: Coffee-fueled Creativity (or Insanity?)
**7:00 AM**: My morning coffee is starting to taste… boring. In a desperate attempt to switch things up, I add some cocoa powder to my cold brew and call it a mocha smoothie. I’m basically a barista now. I feel slightly less shaky, though I may be hallucinating from the sheer amount of caffeine in my bloodstream.
**1:00 PM**: I think I’ve become one with my coffee mug. It’s not just a vessel for my drink anymore—it’s an extension of my being. I try to write a blog post, but my fingers are typing faster than my brain can keep up. I end up with a garbled mess of letters and decide it’s a poetic expression of my current mental state.
**7:00 PM**: I forgot to have dinner. But then again, I haven’t really “had” any meals all week, so why start now?
#### Day 6: Coffee, My Constant Companion
**9:00 AM**: Coffee is life. Coffee is love. I’m convinced my cells are now made of pure caffeine. I brew a pot of drip coffee just for the aroma and bask in the smell like it’s the nectar of the gods. I may be a little delirious, but I feel strangely enlightened.
**3:00 PM**: I have developed the ability to hear colors. Or maybe I’ve lost it. Either way, I can smell time and it smells like espresso.
**9:00 PM**: I try to watch a movie, but I can’t sit still for more than 20 minutes. I pace around the room like a caffeinated cheetah, plotting my next coffee creation. Maybe a double macchiato with whipped cream and regret.
#### Day 7: The Final Frontier
**8:00 AM**: I’ve done it. I’ve survived nearly a week on coffee alone. My head hurts, my hands are shaking, and I haven’t slept a full night in days—but I’m still here. I pour myself a final celebratory cup and try to savor it, but honestly, I don’t think I can handle another drop of coffee.
**12:00 PM**: I cave. My stomach can’t take it anymore. I eat an actual meal—a sandwich—and it feels like heaven. I wash it down with water. Plain, boring, wonderful water.
#### Conclusion: Can You Really Survive on Coffee Alone?
Technically, yes. Should you? Absolutely not. While coffee is a wonderful, magical elixir that fuels the modern world, it turns out the human body still needs things like food and water to survive. After a week of jittery limbs, sleepless nights, and coffee-induced paranoia, I’m happy to report that I’ve returned to solid foods. My love for coffee? Still strong, but we’ve learned that maybe moderation isn’t such a bad idea after all.
So, can you survive on coffee alone? You sure can! But you might not want to… unless you enjoy vibrating through the space-time continuum.
---
This approach gives a humorous and exaggerated look at the experience while still highlighting the fact that coffee alone is *definitely* not enough to survive on!`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/blogpost"],[E.properties.name]:"Can You Really Survive on Coffee Alone?",[E.properties.parent]:"01j6cbg9djf269zdwwv5114jsd"},{[E.properties.localId]:"01j6ewtynjsyq7b3sc1pgqppde","01j6zqa7qgamwh5960dzy99j70/property/cover-image":"https://atomicdata.dev/files/1726129576337-pexels-karolina-grabowska-7273405.jpg","01j6zqa7qgamwh5960dzy99j70/property/path":"/blog/the-biology-of-balloon-animals","01j6zqa7qgamwh5960dzy99j70/property/published-at":172492956e4,[E.properties.description]:`Balloon animals, those delightful creatures found at birthday parties, fairs, and street performances, are often overlooked in the annals of biology. Yet, these fascinating beings have an intricate life cycle, unique dietary needs, and habitats that are, tragically, under threat from climate change. Let's explore the mysterious biology of balloon animals and uncover the truth about these inflatable creatures.
#### Habitat: Where Do Balloon Animals Live?
The natural habitat of the balloon animal is a curious one. While you may have spotted them in urban environments, twisting and squeaking in the hands of street performers or children, balloon animals originate from the rare and mystical land known as **Balloonia**.
**Balloonia** is an elusive place, often forming in the back rooms of party supply stores, deep within the hands of skilled balloon artists. It’s a warm, dry region, ideal for balloon creatures who thrive in low-humidity environments (their number-one predator is moisture). In Balloonia, these animals are free to roam under ceilings and occasionally drift near HVAC systems for an exhilarating ride on air currents.
However, the changing climate is taking its toll on this once-thriving habitat. Rising temperatures and unpredictable weather patterns are wreaking havoc on the delicate balloons, causing rapid deflation and increased rates of premature "popping," a tragic end for any balloon creature.
#### Diet: What Do Balloon Animals Eat?
Contrary to popular belief, balloon animals have a very specific diet. Though they may appear weightless and hollow, they subsist on a steady intake of **party vibes** and **laughter energy**. These animals feed off the joyful atmosphere at birthday parties, weddings, and carnivals, thriving best when surrounded by giggling children and adults exclaiming, "How do they do that?"
While balloon animals can absorb happiness through osmosis, they have a special fondness for being gently bopped on the head or having their squeaky surfaces rubbed by curious hands. This helps stimulate their "fun receptors," boosting their buoyancy and prolonging their lifespan.
However, with the decline in in-person celebrations due to various global challenges (we’re looking at you, pandemic), balloon animals are facing a food crisis. Zoom parties, though cheerful, do not emit the same level of concentrated joy energy, leaving many balloon creatures feeling deflated—literally and figuratively.
#### Balloon Animal Taxonomy: From Dogs to Dinosaurs
Balloon animals come in a wide variety of shapes and species, much like any other animal kingdom. The **Canis Latex**, commonly known as the Balloon Dog, is one of the most ubiquitous species, often found bouncing around children’s parties. These creatures are characterized by their perky tails, elongated snouts, and irresistible urge to be bopped around.
Other notable species include:
- **Equus Inflateus (The Balloon Horse)**: Known for its long, wobbly legs and majestic mane, the balloon horse can be seen galloping across festive fields.
- **Sauris Popperus (The Balloon Dinosaur)**: Once thought extinct, this species can still be found at prehistoric-themed parties, usually crafted into a fierce-looking T-Rex or a friendly brontosaurus.
- **Serpentis Twisticus (The Balloon Snake)**: A simple, yet elegant species, the balloon snake is often the first balloon animal to emerge from the hands of novice balloon artists. It’s long, sleek, and sometimes given an adorable face with a permanent marker.
Balloon animals, while plentiful in variety, all share the same genetic makeup: a latex exterior and a hollow, air-filled core. The complex twists and knots of their bodies are akin to their evolutionary armor, protecting them from predators (except for sharp objects, of course—more on those enemies later).
#### Natural Predators and Threats
Balloon animals, despite their festive appearance, face numerous threats in the wild. Their greatest nemesis? **Sharp objects**. This includes everything from wayward tree branches to the terrifying claws of household cats. The sight of a balloon dog trembling as it senses a nearby cactus is enough to tug at anyone’s heartstrings.
Other natural enemies include:
- **Direct sunlight**: Prolonged exposure to UV rays causes balloon animals to lose their elasticity, resulting in drooping and eventual death by slow deflation.
- **Over-excited children**: Though balloon animals thrive in environments filled with joy, an overly enthusiastic child’s rough handling can lead to an untimely pop.
- **Humidity**: A balloon animal’s worst nightmare. Moisture weakens their latex skin, causing it to break down more easily. Balloonia’s dry climate is the perfect breeding ground, but humid places like basements or rainy outdoor parties? Pure balloon carnage.
#### Climate Change: The Balloon Animal Crisis
In recent years, climate change has posed a significant threat to balloon animals and their habitats. The rise in global temperatures has resulted in the **Balloonia Heatwave Phenomenon**, where balloon animals are now subjected to extreme heat, causing rapid expansion and the dreaded "pop" syndrome. As the air inside them heats up, it expands, stretching their latex bodies to the breaking point.
Additionally, the increase in natural disasters, like thunderstorms, has made balloon parties more unpredictable. Lightning strikes and sudden gusts of wind pose serious dangers to balloon animals, often flinging them into hazardous environments filled with sharp debris.
**Deflation rates have skyrocketed**, with some species, like the intricate balloon giraffe, now considered endangered due to their fragile long necks, which are more prone to bursting under pressure.
In an effort to combat this crisis, balloon conservationists have suggested several mitigation strategies:
- **Indoor-only parties**: By holding celebrations indoors, balloon animals are kept safe from harmful UV rays and weather-related threats.
- **Humidity control measures**: Balloon sanctuaries now include humidifiers and coolers to preserve their latex structures.
- **Adopting biodegradable balloons**: These are not only eco-friendly but less prone to the environmental damage caused by traditional balloon material, giving balloon animals a fighting chance in a warming world.
#### The Future of Balloon Animals
With climate change on the rise and unpredictable party attendance rates, the future of balloon animals is uncertain. Conservation efforts are underway, and balloon scientists are exploring the possibility of more resilient latex species that can survive in a variety of conditions.
In the meantime, you can do your part by adopting sustainable party practices, holding celebrations in climate-controlled environments, and treating balloon animals with the gentle care they deserve. Every bounce, every squeak prolongs their precious, inflatable lives.
Remember: a world without balloon animals is a world without joy. Let’s keep these delightful creatures thriving for future generations!`,[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/blogpost"],[E.properties.name]:"The Biology of Balloon Animals: A Deep Dive into Their Wild World",[E.properties.parent]:"01j6cbg9djf269zdwwv5114jsd"},{[E.properties.localId]:"01j6cjpvhc8sgmqeg6v84fgxtv","01j6zqa7qgamwh5960dzy99j70/property/path":"/blog",[E.properties.description]:"List of blog posts",[E.properties.isA]:["01j6zqa7qgamwh5960dzy99j70/class/blog-index-page"],[E.properties.name]:"Blog",[E.properties.parent]:"01j5zr8e919ph7g5xgyehv0g17"}]};function ng({content:e,loading:t}){const[n,r]=f.useState(void 0);function o(){r(e),navigator.clipboard.writeText(e||""),at.success("Copied to clipboard")}return a.jsx(Ohe,{"data-code-content":e,children:t?"loading...":a.jsxs(a.Fragment,{children:[e,a.jsx(oe,{subtle:!0,style:{position:"absolute",bottom:0,top:0,margin:0,right:0},onClick:o,title:n===e?"Copied!":"Copy to clipboard","data-test":"copy-response",children:n===e?a.jsx(C$,{}):a.jsx(jb,{})})]})})}const Ohe=C.pre.withConfig({displayName:"CodeBlock__CodeBlockStyled",componentId:"sc-744a1727-0"})(["position:relative;background-color:",";border-radius:",";border:solid 1px ",";padding:0.3rem;font-family:monospace;width:100%;overflow-x:auto;"],e=>e.theme.colors.bg1,e=>e.theme.radius,e=>e.theme.colors.bg2),Lhe=[];function zhe({template:e,bindOpen:t,open:n=!1}){const r=Ce(),o=uo(),[i,s,l,c]=Ht({bindShow:t}),{drive:u}=Le(),d=q(u),[p,h]=f.useState(),m=f.useMemo(()=>(e==null?void 0:e.rootResourceLocalIDs.map(x=>new URL(x,u+"/").toString()))??Lhe,[e,u]),v=fa(m),g=e?JSON.stringify(e.resources,null,2):"",b=Array.from(v.values()).some(x=>!x.error),y=async()=>{if(e){for(const x of v.keys())r.removeResource(x);try{await r.importJsonAD(JSON.stringify(e.resources),{parent:u}),d.push(X.properties.subResources,m),await d.save(),l(),at.success("Template applied!"),o(lt(m[0]))}catch(x){h(x.message)}}};return f.useEffect(()=>{n&&s()},[n]),a.jsx(Ut,{...i,width:"50rem",children:c&&e&&a.jsxs(a.Fragment,{children:[a.jsx(Sn,{children:a.jsxs("h1",{children:["Apply ",e.title," template"]})}),a.jsx(Xt,{children:a.jsxs(ge,{children:[a.jsx(At,{text:e.description({serverUrl:r.getServerUrl()})}),a.jsx(oa,{title:"Preview JSON-AD",children:a.jsx(ng,{content:g})})]})}),a.jsxs(Yn,{children:[p&&a.jsx(Zv,{children:p}),b&&a.jsx(Zv,{children:"This template has already been applied to this drive"}),a.jsxs(oe,{onClick:y,disabled:!!p||b,children:[a.jsx(zM,{}),"Apply template"]})]})]})})}const ZS=[Nhe];function Fhe(){const[e,t]=f.useState(!1),[n,r]=f.useState();return a.jsxs(a.Fragment,{children:[a.jsx(Mhe,{children:ZS.map(o=>a.jsx("li",{children:a.jsx(Ahe,{id:o.id,title:o.title,Image:o.Image,onClick:i=>{r(ZS.find(s=>s.id===i)),t(!0)}})},o.id))}),a.jsx(zhe,{template:n,open:e,bindOpen:t})]})}const Mhe=C.ul.withConfig({displayName:"TemplateList__List",componentId:"sc-b54b8f93-0"})(["li{list-style:none;padding:0;margin:0;}"]);function $he(){const[e]=ma("classSubject");return a.jsx(Sr,{children:e?a.jsx(ht,{children:a.jsx(khe,{classSubject:e.toString()})}):a.jsx(ql,{children:a.jsx(Bhe,{})})})}function Bhe(){const[e]=ma("parentSubject"),{drive:t,hideTemplates:n}=Le(),r=e||t,o=q(r),i=!n&&r===t,s=i?Is:ht,l=kt(),c=kd();function u(p){p&&c(p,r)}const d=f.useCallback(p=>{at.success(`Uploaded ${p.length} files.`),r&&l(lt(r))},[e,l]);return a.jsx(s,{children:a.jsxs(ge,{gap:"2rem",children:[a.jsxs("h1",{children:["Create new resource"," ",r&&a.jsxs(a.Fragment,{children:["under ",a.jsx(Lt,{subject:r})]})]}),a.jsxs(Hhe,{noTemplates:!i,children:[a.jsxs(ge,{gap:"2rem",children:[a.jsx("h2",{children:"Classes"}),a.jsx("div",{children:a.jsx(Wr,{hideCreateOption:!0,setSubject:u,isA:E.classes.class})}),a.jsx(_he,{parent:r}),a.jsx(Ihe,{parent:r}),a.jsx(Zm,{parentResource:o,onFilesUploaded:d})]}),i&&a.jsxs(a.Fragment,{children:[a.jsx(Uhe,{}),a.jsxs(ge,{children:[a.jsx("h2",{children:"Templates"}),a.jsx(Fhe,{})]})]})]})]})})}const Hhe=C.div.withConfig({displayName:"NewRoute__SideBySide",componentId:"sc-6c945b68-0"})(["display:grid;grid-template-columns:",";gap:2rem;@container (max-width:700px){grid-template-columns:1fr;}"],e=>e.noTemplates?"1fr":"2.5fr 1px 1fr"),Uhe=C.div.withConfig({displayName:"NewRoute__Devider",componentId:"sc-6c945b68-1"})(["border-right:1px solid ",";"],e=>e.theme.colors.bg2);function rg(){return(rg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function CA(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function qy(e){var t=f.useRef(e),n=f.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var rd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},gu=function(e){return"touches"in e},Gy=function(e){return e&&e.ownerDocument.defaultView||self},eC=function(e,t,n){var r=e.getBoundingClientRect(),o=gu(t)?function(i,s){for(var l=0;l<i.length;l++)if(i[l].identifier===s)return i[l];return i[0]}(t.touches,n):t;return{left:rd((o.pageX-(r.left+Gy(e).pageXOffset))/r.width),top:rd((o.pageY-(r.top+Gy(e).pageYOffset))/r.height)}},tC=function(e){!gu(e)&&e.preventDefault()},jA=ce.memo(function(e){var t=e.onMove,n=e.onKey,r=CA(e,["onMove","onKey"]),o=f.useRef(null),i=qy(t),s=qy(n),l=f.useRef(null),c=f.useRef(!1),u=f.useMemo(function(){var m=function(b){tC(b),(gu(b)?b.touches.length>0:b.buttons>0)&&o.current?i(eC(o.current,b,l.current)):g(!1)},v=function(){return g(!1)};function g(b){var y=c.current,x=Gy(o.current),w=b?x.addEventListener:x.removeEventListener;w(y?"touchmove":"mousemove",m),w(y?"touchend":"mouseup",v)}return[function(b){var y=b.nativeEvent,x=o.current;if(x&&(tC(y),!function(S,k){return k&&!gu(S)}(y,c.current)&&x)){if(gu(y)){c.current=!0;var w=y.changedTouches||[];w.length&&(l.current=w[0].identifier)}x.focus(),i(eC(x,y,l.current)),g(!0)}},function(b){var y=b.which||b.keyCode;y<37||y>40||(b.preventDefault(),s({left:y===39?.05:y===37?-.05:0,top:y===40?.05:y===38?-.05:0}))},g]},[s,i]),d=u[0],p=u[1],h=u[2];return f.useEffect(function(){return h},[h]),ce.createElement("div",rg({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:p,tabIndex:0,role:"slider"}))}),uw=function(e){return e.filter(Boolean).join(" ")},kA=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,i=uw(["react-colorful__pointer",e.className]);return ce.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},ce.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Pn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Whe=function(e){return Yhe(Ky(e))},Ky=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Pn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Pn(parseInt(e.substring(6,8),16)/255,2):1}},Vhe=function(e){return Khe(Ghe(e))},qhe=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Pn(e.h),s:Pn(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Pn(o/2),a:Pn(r,2)}},Yy=function(e){var t=qhe(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ghe=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),s=r*(1-n),l=r*(1-(t-i)*n),c=r*(1-(1-t+i)*n),u=i%6;return{r:Pn(255*[r,l,s,s,c,r][u]),g:Pn(255*[c,r,r,l,s,s][u]),b:Pn(255*[s,s,c,r,r,l][u]),a:Pn(o,2)}},kp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Khe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o<1?kp(Pn(255*o)):"";return"#"+kp(t)+kp(n)+kp(r)+i},Yhe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),s=i-Math.min(t,n,r),l=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Pn(60*(l<0?l+6:l)),s:Pn(i?s/i*100:0),v:Pn(i/255*100),a:o}},Xhe=ce.memo(function(e){var t=e.hue,n=e.onChange,r=uw(["react-colorful__hue",e.className]);return ce.createElement("div",{className:r},ce.createElement(jA,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:rd(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":Pn(t),"aria-valuemax":"360","aria-valuemin":"0"},ce.createElement(kA,{className:"react-colorful__hue-pointer",left:t/360,color:Yy({h:t,s:100,v:100,a:1})})))}),Qhe=ce.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Yy({h:t.h,s:100,v:100,a:1})};return ce.createElement("div",{className:"react-colorful__saturation",style:r},ce.createElement(jA,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:rd(t.s+100*o.left,0,100),v:rd(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Pn(t.s)+"%, Brightness "+Pn(t.v)+"%"},ce.createElement(kA,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Yy(t)})))}),EA=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Jhe=function(e,t){return e.toLowerCase()===t.toLowerCase()||EA(Ky(e),Ky(t))};function Zhe(e,t,n){var r=qy(n),o=f.useState(function(){return e.toHsva(t)}),i=o[0],s=o[1],l=f.useRef({color:t,hsva:i});f.useEffect(function(){if(!e.equal(t,l.current.color)){var u=e.toHsva(t);l.current={hsva:u,color:t},s(u)}},[t,e]),f.useEffect(function(){var u;EA(i,l.current.hsva)||e.equal(u=e.fromHsva(i),l.current.color)||(l.current={hsva:i,color:u},r(u))},[i,e,r]);var c=f.useCallback(function(u){s(function(d){return Object.assign({},d,u)})},[]);return[i,c]}var eme=typeof window<"u"?f.useLayoutEffect:f.useEffect,tme=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},nC=new Map,nme=function(e){eme(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!nC.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,nC.set(t,n);var r=tme();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},rme=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,i=e.onChange,s=CA(e,["className","colorModel","color","onChange"]),l=f.useRef(null);nme(l);var c=Zhe(n,o,i),u=c[0],d=c[1],p=uw(["react-colorful",t]);return ce.createElement("div",rg({},s,{ref:l,className:p}),ce.createElement(Qhe,{hsva:u,onChange:d}),ce.createElement(Xhe,{hue:u.h,onChange:d,className:"react-colorful__last-control"}))},ome={defaultColor:"000",toHsva:Whe,fromHsva:function(e){return Vhe({h:e.h,s:e.s,v:e.v,a:1})},equal:Jhe},ime=function(e){return ce.createElement(rme,rg({},e,{colorModel:ome}))};function m1({top:e,floating:t,title:n}){const{navbarTop:r,setNavbarTop:o,navbarFloating:i,setNavbarFloating:s}=Le();return a.jsx(sme,{title:n,current:r===e&&i===t,onClick:()=>{o(e),s(t)},children:a.jsx("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t?a.jsx("rect",{x:"10",y:"60",width:"60",height:"10",rx:"5"}):a.jsx("rect",{x:"0",y:e?"0":"70",width:"80",height:"10"})})})}const sme=C.button.withConfig({displayName:"NavStyleButton__NavStyleButtonStyling",componentId:"sc-e96a4534-0"})(["rect{fill:",";}&:hover{border-color:",";}&:active{border-color:",";}background-color:",";cursor:pointer;border:solid 1px ",";border-radius:",";padding:0;overflow:hidden;line-height:0;"],e=>e.current?e.theme.colors.main:e.theme.colors.bg2,e=>e.theme.colors.mainLight,e=>e.theme.colors.mainDark,e=>e.theme.colors.bg,e=>e.current?e.theme.colors.mainLight:e.theme.colors.bg2,e=>e.theme.radius),ame=()=>{const{darkModeSetting:e,setDarkMode:t,viewTransitionsDisabled:n,setViewTransitionsDisabled:r,sidebarKeyboardDndEnabled:o,setSidebarKeyboardDndEnabled:i,hideTemplates:s,setHideTemplates:l}=Le(),{enabledPanels:c,enablePanel:u,disablePanel:d}=s_(),p=h=>m=>{m?u(h):d(h)};return a.jsx(Sr,{children:a.jsxs(ht,{children:[a.jsx("h1",{children:"Settings"}),a.jsxs(ge,{children:[a.jsx(Ga,{children:"Theme"}),a.jsxs(be,{children:[a.jsx(oe,{subtle:e!==yl.auto,onClick:()=>t(void 0),title:"Use the browser's / OS dark mode settings",children:"🌓 Auto"}),a.jsx(oe,{subtle:e!==yl.always,onClick:()=>t(!0),children:"🌑 Dark"}),a.jsx(oe,{subtle:e!==yl.never,onClick:()=>t(!1),children:"🌕 Light"})]}),a.jsx(Ga,{children:"Navigation bar position"}),a.jsxs(be,{children:[a.jsx(m1,{floating:!0,top:!1,title:"Floating"}),a.jsx(m1,{floating:!1,top:!1,title:"Bottom"}),a.jsx(m1,{floating:!1,top:!0,title:"Top"})]}),a.jsx(Ga,{children:"Main color"}),a.jsx(lme,{}),a.jsx(Ga,{children:"Templates"}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:s,onChange:l})," ","Hide templates on new resource page."]}),a.jsx(Ga,{children:"Panels"}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:c.has(Xu.Ontologies),onChange:p(Xu.Ontologies)})," ","Enable Ontology panel"]}),a.jsx(Ga,{children:"Accessibility"}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:n,onChange:h=>r(h)})," ","Disable page transition animations"]}),a.jsxs(Ko,{children:[a.jsx(yr,{checked:o,onChange:h=>i(h)})," ","Enable keyboard drag & drop in sidebar"]})]})]})})},lme=()=>{const{mainColor:e,setMainColor:t}=Le();return a.jsx(ime,{color:e,onChange:n=>t(n)})},Ga=C.h2.withConfig({displayName:"SettingsTheme__Heading",componentId:"sc-86069661-0"})(["font-size:1em;margin:0;margin-top:1rem;"]);function cme(){const[e]=cr(),t=q(e),[n,r]=f.useState(void 0),o=uo(),i=l=>{if(l.preventDefault(),!n)throw new Error("No subject input");o(pk(n))},s=f.useCallback(()=>{o(lt(e??""))},[e,o]);return f.useEffect(()=>()=>{t.refresh()},[]),a.jsx(Sr,{subject:e,children:a.jsx(ht,{children:e?a.jsxs(ge,{children:[a.jsxs(be,{center:!0,gap:"1ch",children:[a.jsx(ot,{title:`Back to ${t.title}`,size:"1.4em",edgeAlign:"start",onClick:s,children:a.jsx(om,{})}),a.jsx(Ta,{resource:t,prefix:"Edit"})]}),a.jsx(Qx,{resource:t}),a.jsx(Bx,{resource:t,onCancel:s},e)]}):a.jsxs("form",{onSubmit:i,children:[a.jsx("h1",{children:"edit a resource"}),a.jsx(nt,{value:n||void 0,onChange:l=>r(l.target.value),placeholder:"Enter a Resource URL..."})]})})})}function ume(){const[e]=cr(),t=q(e),[n,r]=f.useState(void 0),[o,i]=f.useState(!1),[s,l]=f.useState(void 0),{agent:c}=Le(),u=kt();if(t.loading)return a.jsxs(ht,{children:["Loading ",e,"..."]});if(t.error)return a.jsx(ht,{children:a.jsx(yt,{children:t.error.message})});async function d(h){let m={};m.Accept=h,c&&(m=await Cv(e,c,m)),i(!0);try{const g=await(await window.fetch(e,{headers:m})).text();i(!1),r(g),l(void 0)}catch(v){i(!1),l(v)}}const p=()=>{u(lt(e??""))};return a.jsx(Sr,{subject:e,children:a.jsx(ht,{about:e,children:a.jsxs(ge,{children:[a.jsxs(be,{center:!0,gap:"1ch",children:[a.jsx(ot,{size:"1.4em",title:`Back to ${t.title}`,onClick:p,children:a.jsx(om,{})}),a.jsx(Ta,{resource:t,prefix:"Data for",link:!0})]}),a.jsxs(sf,{columns:!0,children:[a.jsx(af,{title:"The URL of the resource",children:"subject:"}),a.jsx(Me,{subject:e,children:e})]}),a.jsx(Pa,{resource:t,editable:!0,columns:!0}),t.hasUnsavedChanges()?a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"⚠️ contains uncommitted changes"}),a.jsx("p",{children:"This means that (some) of your local changes are not yet saved."}),t.commitError&&a.jsx(vn,{children:t.commitError.message}),a.jsx(oe,{onClick:()=>t.save(),children:"save"})]}):null,a.jsx("h2",{children:"Code"}),a.jsxs(be,{wrapItems:!0,children:[a.jsx(oe,{subtle:!0,onClick:()=>d("application/ad+json"),"data-test":"fetch-json-ad",children:"JSON-AD"}),a.jsx(oe,{subtle:!0,onClick:()=>d("application/json"),"data-test":"fetch-json",children:"JSON"}),a.jsx(oe,{subtle:!0,onClick:()=>d("application/ld+json"),"data-test":"fetch-json-ld",children:"JSON-LD"}),a.jsx(oe,{subtle:!0,onClick:()=>d("text/turtle"),"data-test":"fetch-turtle",children:"Turtle / N-triples / N3"})]}),s&&a.jsx(vn,{children:s.message}),!s&&n&&a.jsx(ng,{content:n,loading:o}),a.jsx("h2",{children:"Usage"}),a.jsx(gx,{resource:t})]})})})}const dme=()=>a.jsx(Sr,{children:a.jsxs(ht,{children:[a.jsx("h1",{children:"Keyboard shortcuts"}),a.jsx("h3",{children:"Global"}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.search})," Search"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.sidebarToggle})," Show or hide the sidebar"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:"?"})," Show these keyboard shortcuts"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.edit})," ",a.jsx("b",{children:"E"}),"dit resource"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.data})," Show ",a.jsx("b",{children:"d"}),"ata for resource"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.home})," Show ",a.jsx("b",{children:"h"}),"ome page"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.new})," ",a.jsx("b",{children:"N"}),"ew resource"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.menu})," Open ",a.jsx("b",{children:"m"}),"enu"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.userSettings})," ",a.jsx("b",{children:"U"}),"ser settings"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.themeSettings})," ",a.jsx("b",{children:"T"}),"heme settings"]}),a.jsx("h3",{children:"Document"}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.moveLineUp})," Move line / section up"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.moveLineDown})," Move line / section down"]}),a.jsxs("p",{children:[a.jsx(Ir,{shortcut:ct.deleteLine})," Delete line"]})]})}),Ir=C(s9).withConfig({displayName:"ShortcutsRoute__Key",componentId:"sc-16a772e1-0"})(["font-size:1rem;"]);function pme(){const{pathname:e,search:t}=Sa(),n=window.location.origin+e+t;return a.jsx(cw,{subject:n},n)}function Xy({children:e}){return a.jsx(fme,{children:e})}const fme=C.div.withConfig({displayName:"WarningBlock__Wrapper",componentId:"sc-e5f82570-0"})(["background-color:",";border:2px solid ",";border-radius:",";padding:1rem;"],e=>Tr(.2,e.theme.colors.warning),e=>e.theme.colors.warning,e=>e.theme.radius);Xy.Title=C.p.withConfig({displayName:"WarningBlock",componentId:"sc-e5f82570-1"})(["font-weight:bold;color:",";margin-bottom:0px;"],e=>Tr(-1,e.theme.colors.warning));const hme=()=>{var _;const{agent:e,setAgent:t}=Le(),[n,r]=f.useState(void 0),[o,i]=f.useState(void 0),[s,l]=f.useState(void 0),[c,u]=f.useState(!1),[d,p]=f.useState(!1),[h,m]=f.useState(void 0),v=kt();f.useEffect(()=>{e!==void 0?b():m("")},[e]),f.useEffect(()=>{g()},[n,o]);function g(){e&&m(e.buildSecret())}function b(){try{if(!e)throw new Error("No agent set");r(e.subject),i(e.privateKey)}catch(I){const P=new Error("Cannot fill subject and privatekey fields."+I);l(P),r("")}}function y(){window.confirm("If you sign out, your secret will be removed. If you haven't saved your secret somewhere, you will lose access to this User. Are you sure you want to sign out?")&&(t(void 0),l(void 0),r(""),i(""))}function x(I,P){JSON.stringify(I)!==JSON.stringify(P)&&t(P)}async function w(){g(),l(void 0);try{const I=new $f(o,n);await I.getPublicKey(),await I.verifyPublicKeyWithServer(),x(e,I)}catch(I){const P=new Error("Invalid Agent"+I);l(P)}}function S(){h&&navigator.clipboard.writeText(h)}async function k(I){if(m(I),I===""){m(""),l(void 0);return}l(void 0);try{const P=$f.fromSecret(I);x(e,P),i(P.privateKey),r(P.subject)}catch(P){const z=new Error("Invalid secret. "+P);l(z)}}return a.jsx(Sr,{children:a.jsx(ht,{children:a.jsxs("form",{children:[a.jsx("h1",{children:"User Settings"}),a.jsx("p",{children:"An Agent is a user, consisting of a Subject (its URL) and Private Key. Together, these can be used to edit data and sign Commits."}),e?a.jsxs(ge,{children:[((_=e.subject)==null?void 0:_.startsWith("http://localhost"))&&a.jsxs(Xy,{children:[a.jsx(Xy.Title,{children:"Warning:"}),"You're using a local Agent, which cannot authenticate on other domains, because its URL does not resolve."]}),a.jsxs("div",{children:[a.jsxs(hE,{children:[a.jsx(Ck,{})," You","'","re signed in as"]}),a.jsx(Lt,{subject:e.subject})]}),a.jsx(oe,{onClick:()=>v(fd(e.subject)),children:"Edit profile"}),a.jsx(Sre,{})]}):a.jsxs("p",{children:["You can create your own Agent by hosting an"," ",a.jsx(Me,{href:"https://github.com/atomicdata-dev/atomic-data-rust/tree/master/server",children:"atomic-server"}),". Alternatively, you can use"," ",a.jsx(Me,{subject:"https://atomicdata.dev/invites",children:"an Invite"})," ","to get a guest Agent on someone else","'s"," Atomic Server."]}),a.jsx(ln,{label:e?"Agent Secret":"Enter your Agent Secret",helper:"The Agent Secret is a long string of characters that encodes both the Subject and the Private Key. You can think of it as a combined username + password. Store it safely, and don't share it with others.",error:s,children:a.jsxs(Je,{children:[a.jsx(nt,{value:h,onChange:I=>k(I.target.value),type:c?"text":"password",disabled:e!==void 0,name:"secret",id:"current-password",autoComplete:"current-password",spellCheck:"false"}),a.jsx(Js,{type:"button",title:c?"Hide secret":"Show secret",onClick:()=>u(!c),children:c?a.jsx(L3,{}):a.jsx(Bu,{})}),a.jsx(Js,{type:"button",title:d?"Hide advanced":"Show advanced",onClick:()=>p(!d),children:a.jsx(Cb,{})}),e&&a.jsx(Js,{type:"button",onClick:S,children:"copy"})]})}),d?a.jsxs(a.Fragment,{children:[a.jsx(ln,{label:"Subject URL",helper:"The link to your Agent, e.g. https://atomicdata.dev/agents/someAgent",children:a.jsx(Je,{children:a.jsx(nt,{disabled:e!==void 0,value:n,onChange:I=>{r(I.target.value),w()}})})}),a.jsx(ln,{label:"Private Key",helper:"The private key of the Agent, which is a Base64 encoded string.",children:a.jsxs(Je,{children:[a.jsx(nt,{disabled:e!==void 0,type:c?"text":"password",value:o,onChange:I=>{i(I.target.value),w()}}),a.jsx(Js,{type:"button",title:c?"Hide private key":"Show private key",onClick:()=>u(!c),children:c?a.jsx(L3,{}):a.jsx(Bu,{})})]})})]}):null,e&&a.jsx(oe,{subtle:!0,title:"Sign out with current Agent and reset this form",onClick:y,"data-test":"sign-out",children:"sign out"})]})})})};var ss;(function(e){e[e.CONNECTING=WebSocket.CONNECTING]="CONNECTING",e[e.OPEN=WebSocket.OPEN]="OPEN",e[e.CLOSING=WebSocket.CLOSING]="CLOSING",e[e.CLOSED=WebSocket.CLOSED]="CLOSED"})(ss||(ss={}));function mme(e){switch(e){case ss.OPEN:return[a.jsx(u0,{color:"#3AA55D",title:"Websocket Connected"},"connected"),"green"];case ss.CLOSING:return[a.jsx(u0,{color:"orange",title:"Websocket Closing"},"closing"),"#FAA81A"];case ss.CLOSED:return[a.jsx(Eb,{color:"red",title:"Websocket Closed"},"closed"),"#ED4245"];case ss.CONNECTING:default:return[a.jsx(u0,{color:"gray",title:"Websocket Connecting..."},"connecting"),"gray"]}}function gme({subject:e,className:t}){var c;const n=Ce(),{drive:r}=Le(),[o,i]=f.useState(((c=n.getWebSocketForSubject(e))==null?void 0:c.readyState)??ss.CONNECTING);f.useEffect(()=>{const u=n.getWebSocketForSubject(e);if(!u)return i(ss.CONNECTING);i(u==null?void 0:u.readyState);const d=setInterval(()=>{u.readyState!==o&&i(u.readyState)},1e3);return()=>{clearInterval(d)}},[r,n]);const[s,l]=mme(o);return a.jsx(vme,{color:l,className:t,children:s})}const vme=C.div.withConfig({displayName:"WSIndicator__IconWrapper",componentId:"sc-93ef4c8e-0"})(["display:contents;color:",";font-size:1rem;"],e=>e.color);function yme({subject:e,className:t}){const[n,r,o]=Pm(),[i,s,l]=Cx(),c=n.includes(e),u=c?X$:Z$,d=f.useCallback(()=>{c?(o(e),s(e)):(r(e),l(e))},[e,n,l,s,r,o]);return a.jsx(bme,{className:t,onClick:d,title:c?"Remove from favorites":"Add to favorites",children:a.jsx(u,{})})}const bme=C.button.withConfig({displayName:"FavoriteButton__StyledButton",componentId:"sc-6477e6eb-0"})(["background:none;border:none;cursor:pointer;color:",";width:1.3rem;display:flex;align-items:center;padding:0;"],e=>e.theme.colors.main);function xme({subject:e,disabled:t,onClick:n,onRemove:r}){return a.jsxs(wme,{children:[a.jsxs(Eme,{children:[r&&a.jsx(ot,{title:"Remove drive from list",onClick:()=>r(e),children:a.jsx(ri,{})}),a.jsx(Lt,{subject:e})]}),a.jsx(Cme,{children:e}),a.jsx(jme,{onClick:()=>n(e),disabled:t,children:"Select"}),a.jsx(Sme,{subject:e}),a.jsx(kme,{subject:e})]})}const wme=C.div.withConfig({displayName:"DriveRow__DriveRowWrapper",componentId:"sc-16d48354-0"})(["--title-font-weight:500;display:grid;grid-template-areas:'title ws subject button icon';grid-template-columns:20ch 1.3rem auto 10ch 1.3rem;gap:","rem;align-items:center;padding-block:0.3rem;@container (max-width:500px){grid-template-areas:'ws title icon' 'subject subject subject' 'button button button';grid-template-columns:1.3rem auto 1rem;padding-block:1rem;--title-font-weight:bold;}"],e=>e.theme.margin),Sme=C(yme).withConfig({displayName:"DriveRow__StyledFavoriteButton",componentId:"sc-16d48354-1"})(["grid-area:icon;"]),Cme=C.span.withConfig({displayName:"DriveRow__Subject",componentId:"sc-16d48354-2"})(["grid-area:subject;color:",";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"],e=>e.theme.colors.textLight),jme=C(oe).withConfig({displayName:"DriveRow__SelectButton",componentId:"sc-16d48354-3"})(["grid-area:button;background-color:",";color:",";align-self:flex-end;"],e=>e.disabled?e.theme.colors.main:"transparent",e=>e.disabled?"white":e.theme.colors.main),kme=C(gme).withConfig({displayName:"DriveRow__StyledWSIndicator",componentId:"sc-16d48354-4"})(["grid-area:ws;"]),Eme=C.div.withConfig({displayName:"DriveRow__TitleWrapper",componentId:"sc-16d48354-5"})(["grid-area:title;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--title-font-weight);display:flex;align-items:center;gap:1ch;& svg{color:",";}"],e=>e.theme.colors.textLight);function rC({drives:e,showNewOption:t,onDriveSelect:n,onDriveRemove:r}){const{drive:o}=Le();return e.length===0?a.jsx("span",{children:"Nothing to show"}):a.jsx(_me,{children:a.jsxs(ed,{children:[e.map((i,s)=>a.jsx(ba,{noBorder:s===0,children:a.jsx(xme,{subject:i,disabled:i===o,onRemove:r,onClick:n})},i)),t&&a.jsx(ba,{children:a.jsx(Ime,{klass:Ne.classes.drive,subtle:!0,icon:!0,label:"New Drive"})})]})})}const _me=C(Kn).withConfig({displayName:"DrivesCard__ContainerCard",componentId:"sc-6d1c9b37-0"})(["container-type:inline-size;padding-block:0;"]),Ime=C(Qu).withConfig({displayName:"DrivesCard__StyledNewInstanceButton",componentId:"sc-6d1c9b37-1"})(["border:none;box-shadow:none;padding:0;&&:hover,&&:focus{box-shadow:none;}"]);function Rme(){const{drive:e,setDrive:t}=Le(),n=kt(),[r,o]=f.useState(e),[i,s]=f.useState(),[l]=Pm(),[c,u,d]=Cx(l);function p(h){try{t(h),o(h),u(h),n(lt(h))}catch(m){s(m)}}return a.jsx(Sr,{children:a.jsx(Is,{children:a.jsxs(ge,{children:[a.jsx(g1,{children:"Drive Configuration"}),a.jsx(hE,{children:"Current Drive"}),a.jsxs(be,{children:[a.jsx(Je,{children:a.jsx(nt,{"data-test":"server-url-input",value:r,onChange:h=>o(h.target.value)})}),a.jsx(oe,{onClick:()=>p(r),disabled:e===r,"data-test":"server-url-save",children:"Save"})]}),i&&a.jsx(yt,{children:i==null?void 0:i.message}),a.jsx(g1,{as:"h2",children:"Saved"}),a.jsx(rC,{showNewOption:!0,drives:l,onDriveSelect:h=>p(h)}),a.jsx(g1,{as:"h2",children:"Other"}),a.jsx(rC,{drives:c,onDriveSelect:h=>p(h),onDriveRemove:h=>d(h)})]})})})}const g1=C.h1.withConfig({displayName:"SettingsServer__Heading",componentId:"sc-784969b6-0"})(["margin:0;"]);function Ame({target:e}){const t=Ce(),[n]=f.useState(()=>t.createSubject()),r=q(n,{newResource:!0}),[o,i]=f.useState(void 0),[s]=ab(),[l,c]=f.useState(!1),u=f.useCallback(async()=>{await r.set(E.properties.isA,[Ne.classes.invite]),await r.set(E.properties.read,[J.instances.publicAgent]),await r.set(Ne.properties.target,e.subject);try{if(!s)throw new Error("No agent found");await r.set(E.properties.parent,s.subject),await r.save(),await navigator.clipboard.writeText(r.subject),at.success("Copied to clipboard"),c(!0)}catch(d){i(d)}},[r,s,e]);return l?a.jsxs(Kn,{children:[a.jsx("p",{children:"Invite created and copied to clipboard! 🚀"}),a.jsx(ng,{content:r.subject,"data-test":"invite-code"})]}):a.jsxs(Kn,{children:[a.jsx(xi,{label:"Allow edits",propertyURL:Ne.properties.write,resource:r}),a.jsx(xi,{label:"Invite text (optional)",propertyURL:E.properties.description,resource:r}),a.jsx(xi,{label:"Limit Usages (optional)",propertyURL:Ne.properties.usagesLeft,resource:r}),a.jsx(oe,{onClick:u,children:"Create"}),o&&a.jsx("p",{children:a.jsx(yt,{children:o.message})})]})}function Pme(e,t){const n={commit:!1,handleValidationError:t},[r,o]=we(e,E.properties.write,n),[i,s]=we(e,E.properties.read,n),l=f.useMemo(()=>{const u=new Map;return u.set(J.instances.publicAgent,{read:!1,write:!1}),i.map(d=>{u.set(d,{read:!0,write:!1})}),r.map(d=>{const p=u.get(d)??{read:!1,write:!1};u.set(d,{...p,write:!0})}),Array.from(u.entries()).map(([d,p])=>({agentSubject:d,setIn:e.subject,read:p.read,write:p.write})).sort(d=>d.agentSubject===J.instances.publicAgent?-1:1)},[i,r]);function c(u,d,p){let h=d?r:i;p?h=Array.from(new Set([...h,u])):h=h.filter(m=>m!==u),d?o(h):s(h)}return[l,c]}function ys({children:e,...t}){return a.jsx(be,{...t,center:!0,children:e})}ys.TitleColumn=C.div.withConfig({displayName:"PermissionRow",componentId:"sc-73b960a0-0"})(["overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap;"]);ys.ControlsColumn=C.div.withConfig({displayName:"PermissionRow",componentId:"sc-73b960a0-1"})(["flex-basis:6rem;display:flex;justify-content:space-around;"]);function oC({handleSetRight:e,hideInherit:t,agentSubject:n,setIn:r,read:o,write:i}){const s=n===J.instances.publicAgent,c=!q(n).isReady()||!e;return a.jsx(ba,{children:a.jsxs(ys,{"data-test":s?"right-public":null,children:[a.jsxs(ys.TitleColumn,{children:[s?a.jsxs(a.Fragment,{children:[a.jsx(XM,{})," Public (anyone)"," "]}):a.jsx(Tme,{subject:n}),!t&&r&&a.jsxs(a.Fragment,{children:[" (via ",a.jsx(Lt,{subject:r}),") "]})]}),a.jsxs(ys.ControlsColumn,{children:[a.jsx(iC,{type:"checkbox",disabled:c,onChange:u=>e==null?void 0:e(n,!1,u.target.checked),checked:o,title:o?"Read access. Toggle to remove access.":"No read access. Toggle to give read access."}),a.jsx(iC,{type:"checkbox",disabled:c,onChange:u=>e==null?void 0:e(n,!0,u.target.checked),checked:i,title:i?"Write access. Toggle to remove access.":"No write access. Toggle to give write access."})]})]})})}const iC=C.input.withConfig({displayName:"AgentRights__StyledCheckbox",componentId:"sc-2115dfac-0"})(["width:1rem;height:1rem;"]),Tme=C(Lt).withConfig({displayName:"AgentRights__TruncatedResourceTitle",componentId:"sc-2115dfac-1"})(["text-overflow:ellipsis;white-space:nowrap;"]),Dme=e=>{const[t,n]=f.useState([]);return f.useEffect(()=>{e.getRights().then(r=>{const o=r.filter(i=>i.setIn!==e.subject).toSorted(i=>i.for===J.instances.publicAgent?-1:1);n(Ome(o))})},[e]),t},Nme=e=>`${e.for}::${e.setIn}`;function Ome(e){const t=new Map;return e.forEach(n=>{const r=Nme(n),o=t.get(r)??{read:!1,write:!1,agentSubject:n.for,setIn:n.setIn};o.read||(o.read=n.type===Sv.READ),o.write||(o.write=n.type===Sv.WRITE),t.set(r,o)}),Array.from(t.values())}function Lme(){const[e]=cr(),t=q(e),[n]=jt(t),[r,o]=f.useState(!1),[i,s]=f.useState(void 0),l=kt(),c=Dme(t),[u,d]=Pme(t,s);if(!e)return a.jsx(a.Fragment,{children:"No subject passed"});async function p(){try{await t.save(),at.success("Share settings saved"),l(lt(e))}catch(h){at.error(h.message)}}return a.jsx(Sr,{subject:e,children:a.jsx(ht,{children:a.jsxs(ge,{children:[a.jsx(Ta,{resource:t,prefix:"Permissions for",link:!0}),n&&!r&&a.jsx("span",{children:a.jsxs(oe,{onClick:()=>o(!0),children:[a.jsx(lk,{}),"Create Invite"]})}),r&&a.jsx(Ame,{target:t}),a.jsx(Kn,{children:a.jsxs(ge,{children:[a.jsx(sC,{children:"Permissions set here:"}),a.jsx(ed,{children:u.map(h=>a.jsx(oC,{hideInherit:!0,...h,handleSetRight:n&&t.isReady()?d:void 0},JSON.stringify(h)))})]})}),n&&a.jsx("span",{children:a.jsx(oe,{disabled:!t.hasUnsavedChanges(),onClick:p,children:"Save"})}),i&&a.jsx(yt,{children:i.message}),c.length>0&&a.jsx(Kn,{children:a.jsxs(ge,{children:[a.jsx(sC,{children:"Inherited permissions:"}),a.jsx(ed,{children:c.map(h=>a.jsx(oC,{setIn:h.setIn,read:h.read,write:h.write,agentSubject:h.agentSubject},h.agentSubject+h.setIn))})]})}),a.jsxs("p",{children:["Read more about permissions in the"," ",a.jsx("a",{target:"_blank",href:"https://docs.atomicdata.dev/hierarchy",rel:"noreferrer",children:"Atomic Data Docs"})]})]})})})}function sC({children:e}){return a.jsxs(ys,{children:[a.jsx(zme,{children:e}),a.jsxs(ys.ControlsColumn,{children:[a.jsx("span",{children:"Read"}),a.jsx("span",{children:"Write"})]})]})}const zme=C(ys.TitleColumn).withConfig({displayName:"ShareRoute__PermissionRowTitleHeader",componentId:"sc-c9c58006-0"})(["font-weight:bold;"]),Fme=()=>{const[e,t]=f.useState(""),{agent:n}=Le(),[r]=sb();return f.useEffect(()=>{async function o(){if(n){const i=await rb(r,n);t(btoa(JSON.stringify(i)))}}o()},[n]),a.jsx(Sr,{children:a.jsx(ht,{children:a.jsx(ng,{content:e})})})},Mme=new Intl.DateTimeFormat("default",{month:"long",year:"numeric"});function $me(e){const t=[];let n,r;for(let o=0;o<e.length;o++){if(n=e[o],o===0){t.push(n);continue}if(r=e[o-1],n.commit.signer!==r.commit.signer){t.push(n);continue}Hme(n.resource.getPropVals(),r.resource.getPropVals())||t.push(n)}return t}function Bme(e){return e.reduceRight((t,n)=>{const r=new Date(n.commit.createdAt),o=Mme.format(r),i=t[o]??[];return{...t,[o]:[...i,n]}},{})}function Hme(e,t){let n;if(e.size!==t.size)return!1;for(const[r,o]of e)if(n=t.get(r),n!==o||n===void 0&&!t.has(r)){if(Array.isArray(o)&&JSON.stringify(o)===JSON.stringify(n))continue;return!1}return!0}function Ume(e){const[t,n]=f.useState([]),[r,o]=f.useState(0),i=f.useRef(!1),[s,l]=f.useTransition(),[c,u]=f.useState(!0),[d,p]=f.useState(void 0);return f.useEffect(()=>{e.getSubject()!==ut&&(i.current||l(()=>{(async()=>{try{i.current=!0;const h=await e.getHistory(o),m=$me(h);n(m)}catch(h){p(h)}finally{u(!1),i.current=!1}})()}))},[e]),{versions:t,loading:c,error:d,progress:r}}const Wme=new Intl.DateTimeFormat("default",{month:"long",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"});function _A({version:e}){const t=q(e.commit.signer),[n]=rt(t),r=new Date(e.commit.createdAt),o=Wme.format(r);return a.jsxs("span",{children:["Editted ",a.jsx("time",{dateTime:r.toISOString(),children:o})," by"," ",a.jsx(Me,{subject:e.commit.signer,children:n})]})}function Vme({version:e,selected:t,onClick:n}){return a.jsx(qme,{selected:t,onClick:n,about:e.commit.id,"data-testid":"version-button",children:a.jsx($x,{date:new Date(e.commit.createdAt)})},e.commit.signature)}const qme=C(rm).withConfig({displayName:"VersionButton__VersionRow",componentId:"sc-1bc3c4bc-0"})(["padding:1rem;background-color:",";color:",";border-radius:",";contain:paint;&:hover,&:focus-visible{background-color:",";}"],e=>e.selected?e.theme.colors.main:"transparent",e=>e.selected?"white":e.theme.colors.text,e=>e.theme.radius,e=>e.selected?e.theme.colors.main:e.theme.colors.bg1);function IA({groupedVersions:e,selectedVersion:t,title:n,className:r,subject:o,persistSelection:i=!1,onNextItem:s,onPreviousItem:l,onSelectVersion:c}){const u=Ce(),d=f.useId();return a.jsxs(Gme,{className:r,children:[a.jsx(Xme,{id:d,children:n}),a.jsx(Yme,{"aria-labelledby":d,children:a.jsx(ge,{children:Object.entries(e).map(([p,h])=>a.jsxs(f.Fragment,{children:[a.jsx(Jme,{children:p}),[...h].map(m=>a.jsx(Vme,{onClick:()=>c(m),version:m,selected:i&&(t==null?void 0:t.commit.id)===m.commit.id},m.commit.id))]},p))})}),l&&l&&a.jsxs(Qme,{children:[a.jsx(ot,{color:"main",title:"Previous item",onClick:l,children:a.jsx(k$,{})}),a.jsx(ot,{title:"Next item",color:"main",onClick:s,children:a.jsx(O3,{})})]}),a.jsxs(Kme,{path:u$(o,u.getServerUrl()),children:["All versions",a.jsx(O3,{size:"0.9rem"})]})]})}const Gme=C.section.withConfig({displayName:"VersionScroller__ScrollerSection",componentId:"sc-b28744e-0"})(["border:1px solid ",";border-radius:",";background-color:",";min-width:12rem;max-width:20rem;display:grid;grid-template-rows:auto 1fr auto;position:relative;"],e=>e.theme.colors.bg2,e=>e.theme.radius,e=>e.theme.colors.bg),Kme=C(Me).withConfig({displayName:"VersionScroller__AllVersionsLink",componentId:"sc-b28744e-1"})(["position:absolute;bottom:-2rem;width:100%;display:flex;align-items:center;justify-content:center;gap:0.5ch;vertical-align:middle;line-height:1;"]),Yme=C.div.withConfig({displayName:"VersionScroller__Scroller",componentId:"sc-b28744e-2"})(["padding:1rem;overflow:auto;"]),Xme=C.h2.withConfig({displayName:"VersionScroller__ScrollerTitle",componentId:"sc-b28744e-3"})(["padding:","rem;margin-bottom:0;text-align:center;"],e=>e.theme.margin),Qme=C.div.withConfig({displayName:"VersionScroller__ButtonWrapper",componentId:"sc-b28744e-4"})(["padding:","rem;display:flex;justify-content:space-between;"],e=>e.theme.margin),Jme=C.h3.withConfig({displayName:"VersionScroller__GroupHeading",componentId:"sc-b28744e-5"})(["&::before{content:'';display:block;height:1px;background-color:",";}&::after{content:'';display:block;height:1px;background-color:",";}display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:0.5rem;text-align:center;color:",";"],e=>e.theme.colors.bg2,e=>e.theme.colors.bg2,e=>e.theme.colors.textLight);function Zme({resource:e,groupedVersions:t,selectedVersion:n,isCurrentVersion:r,onNextVersion:o,onPreviousVersion:i,onSelectVersion:s,onVersionAccept:l}){const c=uo();return a.jsxs(a.Fragment,{children:[a.jsx(tge,{children:a.jsxs(ge,{fullHeight:!0,children:[a.jsx(Ta,{resource:e,prefix:"History of",link:!0}),n&&(n==null?void 0:n.resource)&&a.jsxs(a.Fragment,{children:[a.jsx(_A,{version:n}),a.jsx(ege,{children:a.jsx(ew,{resource:n.resource})}),a.jsxs(be,{children:[a.jsx(oe,{onClick:l,disabled:r,children:"Make current version"}),a.jsx(oe,{onClick:()=>c(lt(n.commit.id)),children:"Show Commit"})]})]})]})}),a.jsx(IA,{persistSelection:!0,subject:e.getSubject(),groupedVersions:t,onNextItem:i,onPreviousItem:o,selectedVersion:n,onSelectVersion:s,title:"Versions"})]})}const ege=C(Kn).withConfig({displayName:"HistoryDesktopView__StyledCard",componentId:"sc-9b46016-0"})(["flex:1;overflow:auto;width:100%;"]),tge=C.div.withConfig({displayName:"HistoryDesktopView__CurrentItem",componentId:"sc-9b46016-1"})(["flex:1;& h1{margin-bottom:0;}"]);function nge({resource:e,groupedVersions:t,selectedVersion:n,onSelectVersion:r,onVersionAccept:o}){const[i,s,l]=Ht(),c=f.useCallback(u=>{r(u),s()},[]);return a.jsxs(a.Fragment,{children:[a.jsx(oge,{title:`History of ${e.title}`,subject:e.getSubject(),groupedVersions:t,selectedVersion:n,onSelectVersion:c}),a.jsxs(Ut,{...i,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"Version"})}),a.jsx(Xt,{children:a.jsx(ge,{fullHeight:!0,children:n&&(n==null?void 0:n.resource)&&a.jsxs(a.Fragment,{children:[a.jsx(_A,{version:n}),a.jsx(rge,{children:a.jsx(ew,{resource:n.resource})})]})})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>l(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:o,children:"Make current version"})]})]})]})}const rge=C(Kn).withConfig({displayName:"HistoryMobileView__StyledCard",componentId:"sc-2374c6b0-0"})(["overflow:auto;"]),oge=C(IA).withConfig({displayName:"HistoryMobileView__CenteredScroller",componentId:"sc-2374c6b0-1"})(["margin-inline:auto;"]),ige=({value:e})=>a.jsx(sge,{value:e,max:"100"}),sge=C.progress.withConfig({displayName:"ProgressBar__Progress",componentId:"sc-97a3e182-0"})(["--progress-bg:",";--progress-fg:",";--progress-radius:2rem;--progress-height:0.5rem;flex:1;appearance:none;overflow:hidden;border-radius:var(--progress-radius);height:var(--progress-height);background-color:var(--progress-bg);border:none;&[value]::-moz-progress-bar{background-color:var(--progress-fg);}&[value]::-webkit-progress-bar{background-color:var(--progress-bg);border-radius:var(--progress-radius);height:var(--progress-height);}&[value]::-webkit-progress-value{background-color:var(--progress-fg);}"],e=>e.theme.colors.bg1,e=>e.theme.colors.main);function age(){const e=uo(),t=Ra("(max-width: 500px)"),[n]=cr(),r=q(n),{versions:o,loading:i,error:s,progress:l}=Ume(r),[c,u]=f.useState(),d=f.useMemo(()=>Bme(o),[o]);f.useEffect(()=>{o.length>0&&u(o[o.length-1])},[o]);const p=async()=>{c&&n&&(await r.setVersion(c),vr.success("Resource version updated"),e(lt(n)))},h=f.useCallback(()=>{const b=o.findIndex(y=>y===c);b===-1||b===o.length-1||u(o[b+1])},[o,c]),m=f.useCallback(()=>{const b=o.findIndex(y=>y===c);b===-1||b===0||u(o[b-1])},[o,c]),v=t?nge:Zme,g=c===o[o.length-1];return i?a.jsx(ht,{children:a.jsx(cge,{children:a.jsxs(ge,{fullWidth:!0,children:[a.jsxs("span",{children:["Building history of ",r.title]}),a.jsxs(be,{center:!0,fullWidth:!0,children:[a.jsx(ige,{value:l}),a.jsxs("span",{children:[l,"%"]})]})]})})}):s?a.jsx(ht,{children:a.jsx(yt,{children:s.message})}):a.jsx(Sr,{subject:n,children:a.jsx(lge,{about:n,children:a.jsx(v,{resource:r,groupedVersions:d,selectedVersion:c,isCurrentVersion:g,onNextVersion:h,onPreviousVersion:m,onSelectVersion:u,onVersionAccept:p})})})}const lge=C.main.withConfig({displayName:"HistoryRoute__SplitView",componentId:"sc-16b01ec8-0"})(["display:flex;width:100%;height:100%;height:calc(100vh - 6rem);padding:","rem;gap:","rem;& code{word-break:break-word;}"],e=>e.theme.margin,e=>e.theme.margin),cge=C.div.withConfig({displayName:"HistoryRoute__Centered",componentId:"sc-16b01ec8-1"})(["display:grid;place-items:center;height:100dvh;min-width:100%;"]),uge=window.location.origin,aC=!1;function dge(){return a.jsxs(jN,{children:[a.jsx(_n,{path:Fe.new,element:a.jsx($he,{})}),a.jsx(_n,{path:Fe.themeSettings,element:a.jsx(ame,{})}),a.jsx(_n,{path:Fe.agentSettings,element:a.jsx(hme,{})}),a.jsx(_n,{path:Fe.serverSettings,element:a.jsx(Rme,{})}),a.jsx(_n,{path:Fe.shortcuts,element:a.jsx(dme,{})}),a.jsx(_n,{path:Fe.data,element:a.jsx(ume,{})}),a.jsx(_n,{path:Fe.edit,element:a.jsx(cme,{})}),a.jsx(_n,{path:Fe.import,element:a.jsx(wR,{})}),a.jsx(_n,{path:Fe.share,element:a.jsx(Lme,{})}),a.jsx(_n,{path:Fe.show,element:a.jsx(jhe,{})}),a.jsx(_n,{path:Fe.about,element:a.jsx(wA,{})}),a.jsx(_n,{path:Fe.search,element:a.jsx(xA,{})}),a.jsx(_n,{path:Fe.token,element:a.jsx(Fme,{})}),a.jsx(_n,{path:Fe.history,element:a.jsx(age,{})}),aC,aC,a.jsx(_n,{path:"/",element:a.jsx(cw,{subject:uge})}),a.jsx(_n,{path:"*",element:a.jsx(pme,{})})]})}const pge=()=>{const e=f.useRef(null);return[e,()=>{var n;(n=e.current)==null||n.focus()}]};function fge({onFocus:e,onBlur:t,subject:n}){const[r,o]=f.useState(""),[i]=dk(),{scope:s,clearScope:l}=Wb(),c=f.useRef(null),[u,d]=pge(),p=kt(),h=b=>{EI(r??"")&&b.target.select()};function m(b){o(b.target.value);try{Bt.tryValidSubject(b.target.value),p(lt(b.target.value),{replace:!0})}catch{p(N3(b.target.value,s),{replace:!0})}}const v=b=>{n&&(b.preventDefault(),u.current.blur(),document.activeElement.blur(),p(lt(n)))},g=()=>{p(N3("",s),{replace:!0}),d()};return De(ct.search,b=>{b.preventDefault(),u.current.select(),d()}),De("esc",b=>{b.preventDefault(),u.current.blur()},{enableOnTags:["INPUT"]}),De("backspace",b=>{(r===void 0||r.length===0)&&s&&l()},{enableOnTags:["INPUT"]}),f.useEffect(()=>{o(i||n),(i||s)&&d()},[i,s,n]),a.jsxs(mge,{onSubmit:v,autoComplete:"off",ref:c,children:[a.jsx(ot,{color:"textLight",title:"Start searching",type:"button",onClick:g,children:a.jsx(ak,{})}),s&&a.jsx(hge,{subject:s,onClick:l}),a.jsx(Qy,{autoComplete:"false",ref:u,type:"search","data-test":"address-bar",name:"search","aria-label":"Search",onClick:h,onFocus:e,onBlur:t,value:r||"",onChange:m,placeholder:'Enter an Atomic URL or search (press "/" )'})]})}function hge({subject:e,onClick:t}){const n=q(e),[r]=rt(n);return a.jsxs(gge,{children:[a.jsxs("span",{children:["in:",r," "]}),a.jsx(ot,{onClick:t,title:"Clear scope",variant:Ii.Fill,color:"textLight",size:"0.8rem",children:a.jsx(ri,{})})]})}const Qy=C.input.withConfig({displayName:"Searchbar__Input",componentId:"sc-82b08862-0"})(["border:none;font-size:0.9rem;padding-block:0.4rem;padding-inline-start:0rem;color:",";width:100%;flex:1;min-width:1rem;height:100%;background-color:",";outline:none;color:",";"],e=>e.theme.colors.text,e=>e.theme.colors.bg,e=>e.theme.colors.textLight),mge=C.form.withConfig({displayName:"Searchbar__Form",componentId:"sc-82b08862-1"})(["flex:1;height:100%;gap:0.5rem;display:flex;align-items:center;padding-inline:",";border-radius:999px;:hover{",";","{color:",";}}:focus-within{","{color:",";}outline:none;}"],e=>e.theme.size(3),e=>Zo(.6,e.theme.colors.main),Qy,e=>e.theme.colors.text,Qy,e=>e.theme.colors.text),gge=C.span.withConfig({displayName:"Searchbar__Tag",componentId:"sc-82b08862-2"})(["background-color:",";border-radius:",";padding:0.2rem 0.5rem;display:flex;flex-direction:row;align-items:center;gap:0.3rem;span{max-width:15ch;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"],e=>e.theme.colors.bg1,e=>e.theme.radius);function vge({children:e}){const{navbarTop:t,navbarFloating:n}=Le(),r=f.useRef(null),o=Sa();return f.useEffect(()=>{var i;(i=r==null?void 0:r.current)==null||i.scrollTo(0,0)},[o]),a.jsxs(a.Fragment,{children:[t&&a.jsx(lC,{}),a.jsxs(Sge,{children:[a.jsx(nY,{}),a.jsxs(yge,{ref:r,navbarTop:t,navbarFloating:n,children:[a.jsx(fh,{position:"top"}),e]})]}),!t&&a.jsx(lC,{})]})}const yge=C.div.withConfig({displayName:"Navigation__Content",componentId:"sc-7ba68966-0"})(["display:block;flex:1;overflow-y:auto;"]);function lC(){const[e]=cr(),t=uo(),{navbarTop:n,navbarFloating:r,sideBarLocked:o,setSideBarLocked:i}=Le(),[s,l]=f.useState(!0),c=Ra("(display-mode: standalone) or (display-mode: fullscreen)"),u=f.useMemo(()=>c||window.navigator.standalone||document.referrer.includes("android-app://")||kk(),[c]);function d(h){h.target.getBoundingClientRect().width<280&&l(!1)}const p=r?bge:xge;return a.jsxs(p,{top:n,"aria-label":"search",floating:r,children:[s&&a.jsxs(a.Fragment,{children:[a.jsx(c0,{leftPadding:!0,type:"button",onClick:()=>i(!o),title:`Show / hide sidebar (${ct.sidebarToggle})`,"data-test":"sidebar-toggle",children:a.jsx(w$,{})}),u&&a.jsxs(a.Fragment,{children:[a.jsx(c0,{type:"button",title:"Go back",onClick:()=>t(-1),children:a.jsx(om,{})})," ",a.jsx(c0,{type:"button",title:"Go forward",onClick:()=>t(1),children:a.jsx(gk,{})})]})]}),a.jsx(wge,{}),a.jsx(fge,{subject:e,onFocus:d,onBlur:()=>l(!0)})]})}const RA=C.div.withConfig({displayName:"Navigation__NavBarBase",componentId:"sc-7ba68966-1"})(["position:fixed;z-index:",";height:2.5rem;display:flex;border:solid 1px ",";background-color:",";view-transition-name:",";"],e=>e.theme.zIndex.sidebar,e=>e.theme.colors.bg2,e=>e.theme.colors.bg,UG),bge=C(RA).withConfig({displayName:"Navigation__NavBarFloating",componentId:"sc-7ba68966-2"})(["box-shadow:",";border-radius:999px;overflow:hidden;max-width:calc(100% - 2rem);width:","rem;margin:auto;left:50%;margin-left:-","rem;margin-right:-","rem;top:",";bottom:",";&:has(input:focus){box-shadow:0px 0px 0px 1px ",";border-color:",";}@media (max-width:","rem){max-width:calc(100% - 1rem);left:auto;right:auto;margin-left:0.5rem;bottom:0.5rem;}"],e=>e.theme.boxShadow,e=>e.theme.containerWidth+1,e=>(e.theme.containerWidth+1)/2,e=>(e.theme.containerWidth+1)/2,e=>e.top?"2rem":"auto",e=>e.top?"auto":"1rem",e=>e.theme.colors.main,e=>e.theme.colors.main,e=>e.theme.containerWidth),xge=C(RA).withConfig({displayName:"Navigation__NavBarFixed",componentId:"sc-7ba68966-3"})(["top:",";bottom:",";left:0;right:0;border-width:0;border-bottom:",";border-top:",";&:has(input:focus){box-shadow:0px 0px 0px 2px ",";}"],e=>e.top?"0":"auto",e=>e.top?"auto":"0",e=>e.top?"solid 1px "+e.theme.colors.bg2:"none",e=>e.top?"none":"solid 1px "+e.theme.colors.bg2,e=>e.theme.colors.main),wge=C.div.withConfig({displayName:"Navigation__VerticalDivider",componentId:"sc-7ba68966-4"})(["width:1px;background-color:",";height:100%;margin-left:",";"],e=>e.theme.colors.bg2,e=>e.theme.size(2)),Sge=C("div").withConfig({displayName:"Navigation__SideBarWrapper",componentId:"sc-7ba68966-5"})(["display:flex;height:100vh;position:fixed;top:0;bottom:0;left:0;right:0;opacity:1;transition:opacity 0.3s ease-out;@starting-style{opacity:0;}"]);function Cge(){const{mainColor:e,darkMode:t}=Le(),[n]=cr(),r=q(n);let[o]=rt(r),[i]=ne(r,pe.description);const s=r.isReady()&&r.getSubject()!==ut;return o=s&&o?o:"Atomic Data",i=s&&i?i:"The easiest way to create and share linked data.",a.jsxs($p,{children:[a.jsx("title",{children:o}),a.jsx("meta",{name:"theme-color",content:t?"black":"white"}),a.jsx("meta",{name:"theme-color",content:t?"black":"white"}),a.jsx("meta",{name:"apple-mobile-web-app-status-bar-style",content:t?"black":"default"}),a.jsx("meta",{name:"msapplication-TileColor",content:e}),a.jsx("meta",{name:"description",content:i}),a.jsx("meta",{property:"og:title",content:o}),a.jsx("meta",{property:"og:description",content:i}),a.jsx("meta",{property:"og:url",content:n})]})}function jge(){const e=Kz();return a.jsx(IM,{position:"bottom-right",toastOptions:{style:{zIndex:p_.toast,background:e.colors.bg,color:e.colors.text,wordBreak:"break-word"}},children:t=>a.jsx(ek,{toast:t,style:{...t.style,border:`solid 1px ${e.colors.bg2}`,position:"relative",animation:t.visible?"toast-enter .5s ease":"toast-exit 1s ease"},children:({icon:n,message:r})=>a.jsx(kge,{icon:n,message:r,t})})})}function kge({icon:e,message:t,t:n}){let r=t.props.children;function o(){at.success("Copied error to clipboard"),navigator.clipboard.writeText(t.props.children),at.dismiss(n.id)}return r.length>100&&(r=r.substring(0,100)+"..."),a.jsxs(be,{gap:"1ch",center:!0,children:[e,r,n.type!=="loading"&&a.jsxs("div",{style:{flex:1,flexDirection:"column"},children:[a.jsx(ot,{title:"Clear",onClick:()=>at.dismiss(n.id),children:a.jsx(ri,{})}),n.type!=="success"&&a.jsx(ot,{title:"Copy",onClick:o,children:a.jsx(jb,{})})]})]})}const Jy="agent";function Ege(){const e=localStorage.getItem(Jy);if(e)try{return $f.fromSecret(e)}catch(t){console.error(t);return}}function _ge(e){e?localStorage.setItem(Jy,e.buildSecret()):localStorage.removeItem(Jy)}const Ige=e=>{u_(e);const t=e.message;at.error(t)};function Rge(e){return async t=>{const n=t.get(E.properties.parent);if(!ts(n))throw new Error(`Resource doesn't have a parent: ${t.subject} `);const r=await e.getResource(n);r.getSubjects(X.properties.subResources).includes(t.subject)||(r.push(X.properties.subResources,[t.subject]),await r.save())}}function Age(e){return async t=>{const n=t.get(E.properties.parent);if(!ts(n))throw new Error(`Resource doesn't have a parent: ${t.subject} `);const r=await e.getResource(n),o=r.getSubjects(X.properties.subResources);o.length>0&&(await r.set(X.properties.subResources,o.filter(i=>i!==t.subject)),await r.save())}}function Pge(e){e.on(bi.ResourceManuallyCreated,Rge(e)),e.on(bi.ResourceRemoved,Age(e)),e.on(bi.Error,Ige),e.on(bi.AgentChanged,_ge)}function Tge(e){return G({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8 23.64 7zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.49.01.01.01-.01 3.9-4.86 3.32 3.32 1.27-1.27-3.46-3.46z"}}]})(e)}function Dge(){const[e,t]=f.useState(navigator.onLine);return f.useEffect(()=>{const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}},[]),e}function Nge(){const e=Dge();return f.useEffect(()=>{e||at.error("You are offline, changes might not be persisted.")},[e]),a.jsx(Lge,{shown:!e,"aria-hidden":e,children:a.jsx(Tge,{title:"No Internet Connection."})})}const Oge=ni(["0%{opacity:1;filter:drop-shadow(0 0 5px var(--shadow-color));}100%{opacity:0.8;filter:drop-shadow(0 0 0 var(--shadow-color));}"]),Lge=C.div.withConfig({displayName:"NetworkIndicator__Wrapper",componentId:"sc-e8feaeef-0"})(["--shadow-color:",";position:fixed;bottom:1.2rem;right:2rem;z-index:",";font-size:1.5rem;color:",";pointer-events:",";transition:opacity 0.1s ease-in-out;opacity:",";background-color:",";border:1px solid ",";border-radius:50%;display:grid;place-items:center;box-shadow:",";padding:0.5rem;svg{animation:"," 1.5s alternate ease-in-out infinite;animation-play-state:",";}"],e=>Tr(.15,e.theme.colors.alert),({theme:e})=>e.zIndex.networkIndicator,e=>e.theme.colors.alert,e=>e.shown?"auto":"none",e=>e.shown?1:0,e=>e.theme.colors.bg,e=>e.theme.colors.alert,e=>e.theme.boxShadowSoft,Oge,e=>e.shown?"running":"paused");function zge(){return a.jsx(Fge,{href:"#skip-to-content",children:"Skip Navigation?"})}const Fge=C.a.withConfig({displayName:"SkipNav__SkipLink",componentId:"sc-635e15f2-0"})(["display:flex;justify-content:center;align-items:center;--skip-button-width:min(90vw,20rem);position:absolute;width:100vw;background:",";z-index:100;box-shadow:",";border:none;padding:1rem;color:white;font-size:1.5rem;pointer-events:none;top:-10rem;&:focus{top:1rem;}"],({theme:e})=>e.colors.main,({theme:e})=>e.boxShadowSoft),Mge=()=>{O0(X.classes.folder,async(e,t)=>{await t(X.classes.folder,{[E.properties.name]:"Untitled Folder",[X.properties.displayStyle]:Dl.displayStyles.list},{parent:e})}),O0(X.classes.chatroom,async(e,t)=>{await t(X.classes.chatroom,{[E.properties.name]:"Untitled ChatRoom"},{parent:e})}),O0(X.classes.document,async(e,t)=>{t(X.classes.document,{[E.properties.name]:"Untitled Document"},{parent:e})})};function $ge(e){return/^[http://|https://]/i.test(e)?e:`https://${e}`}const Bge=({parent:e,onClose:t})=>{const[n,r]=f.useState(""),[o,i,s]=Ht({onCancel:t}),l=_a(),c=f.useCallback(u=>{u.preventDefault();const d=$ge(n);l(X.classes.bookmark,{[E.properties.name]:"New Bookmark",[X.properties.url]:d},{parent:e}),t()},[n,t]);return f.useEffect(()=>{i()},[]),a.jsxs(Ut,{...o,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"New Bookmark"})}),a.jsx(Xt,{children:a.jsx("form",{onSubmit:c,children:a.jsx(ln,{required:!0,label:"url",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"https://example.com",value:n,autoFocus:!0,onChange:u=>r(u.target.value)})})})})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>s(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:c,disabled:n.trim()==="",children:"Ok"})]})]})},Hge=({parent:e,onClose:t})=>{const[n,r]=f.useState(""),[o,i]=f.useState(!1),s=_a(),l=f.useCallback(async()=>{s(E.classes.ontology,{[E.properties.shortname]:n,[E.properties.description]:"description",[E.properties.classes]:[],[E.properties.properties]:[],[E.properties.instances]:[]},{parent:e}),t()},[n,s,t,e]),[c,u,d]=Ht({onSuccess:l,onCancel:t}),p=h=>{const m=lo(h.target.value);r(m);try{Do(m,Y.SLUG),i(!0)}catch{i(!1)}};return f.useEffect(()=>{u()},[]),a.jsxs(Ut,{...c,children:[a.jsx(Uge,{children:"New Ontology"}),a.jsx(Xt,{children:a.jsxs("form",{onSubmit:h=>{h.preventDefault(),d(!0)},children:[a.jsx(Wge,{children:"An ontology is a collection of classes and properties that together describe a concept. Great for data models."}),a.jsx(ln,{required:!0,label:"Shortname",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"my-ontology",value:n,autoFocus:!0,onChange:p})})})]})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>d(!0),disabled:!o,children:"Create"})]})]})},Uge=C.h1.withConfig({displayName:"NewOntologyDialog__H1",componentId:"sc-b6e65302-0"})(["margin:0;"]),Wge=C.p.withConfig({displayName:"NewOntologyDialog__Explanation",componentId:"sc-b6e65302-1"})(["color:",";max-width:60ch;"],e=>e.theme.colors.textLight),Vge=({parent:e,onClose:t})=>{const[n,r]=f.useState("New Collection"),[o,i]=f.useState(),[s,l]=f.useState(),[c,u,d]=Ht({onCancel:t}),p=_a(),h=f.useCallback(m=>{m.preventDefault(),p(Lr.classes.collection,{[E.properties.name]:n,[Lr.properties.value]:o,[Lr.properties.property]:s,[Lr.properties.pageSize]:30,[Lr.properties.currentPage]:0},{parent:e}),t()},[o,t,s]);return f.useEffect(()=>{u()},[]),a.jsxs(Ut,{...c,children:[a.jsx(Sn,{children:a.jsx("h1",{children:"New Collection"})}),a.jsx(Xt,{children:a.jsxs("form",{onSubmit:h,children:[a.jsx(ln,{required:!0,label:"name",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"Name your Collection",value:n,autoFocus:!0,onChange:m=>r(m.target.value)})})}),a.jsx(ln,{label:"property",children:a.jsx("div",{children:a.jsx(Wr,{isA:E.classes.property,setSubject:l,value:s})})}),a.jsx(ln,{label:"value",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"Set a value filter (optional)",value:o,onChange:m=>i(m.target.value)})})})]})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:h,disabled:!s&&!o,children:"Ok"})]})]})},qge=({parent:e,onClose:t})=>{const n=Ce(),r=f.useId(),{setDrive:o}=Le(),[i,s]=f.useState(""),l=_a(),c=f.useCallback(async()=>{if(!i.trim())return;const h=n.getAgent();if(!h||h.subject===void 0)throw new Error("No agent set in the Store, required when creating a Drive");const m=await l(Ne.classes.drive,{[E.properties.name]:i,[E.properties.write]:[h.subject],[E.properties.read]:[h.subject]},{noParent:!0,onCreated:async v=>{const g=await n.getResource(h.subject);g.push(Ne.properties.drives,[v.subject]),await g.save();const b=lo(i),y=await n.newResource({subject:await n.buildUniqueSubjectFromParts(["defaultOntology"],v.subject),isA:E.classes.ontology,parent:v.subject,propVals:{[E.properties.shortname]:b,[E.properties.description]:`Default ontology for the ${i} drive`,[E.properties.classes]:[],[E.properties.properties]:[],[E.properties.instances]:[]}});await y.save(),await v.set(Ne.properties.defaultOntology,y.subject),await v.set(X.properties.subResources,[y.subject]),await v.save()}});o(m.subject),t()},[i,l,t,e,o,n]),[u,d,p]=Ht({onSuccess:c,onCancel:t});return f.useEffect(()=>{d()},[]),a.jsxs(Ut,{...u,children:[a.jsx(Gge,{children:"New Drive"}),a.jsx(Xt,{children:a.jsx("form",{onSubmit:h=>{h.preventDefault(),p(!0)},children:a.jsx(ln,{required:!0,label:"Name",fieldId:r,children:a.jsx(Je,{children:a.jsx(nt,{id:r,placeholder:"My Drive",value:i,autoFocus:!0,onChange:h=>s(h.target.value)})})})})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>p(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>p(!0),disabled:!i.trim(),children:"Create"})]})]})},Gge=C.h1.withConfig({displayName:"NewDriveDialog__H1",componentId:"sc-3c0ba0b4-0"})(["margin:0;"]),Kge=({parent:e,onClose:t})=>{const[n,r]=f.useState(""),[o,i]=f.useState(!1),s=_a(),l=f.useCallback(async()=>{const h=lo(n),m=`${e}/${h}`;s(X.classes.article,{[E.properties.name]:n,[E.properties.description]:""},{parent:e,subject:m}),t()},[n,s,t,e]),[c,u,d]=Ht({onSuccess:l,onCancel:t}),p=h=>{r(h.target.value);const m=lo(h.target.value);try{Do(m,Y.SLUG),i(!0)}catch{i(!1)}};return f.useEffect(()=>{u()},[]),a.jsxs(Ut,{...c,children:[a.jsx(Yge,{children:"New Article"}),a.jsx(Xt,{children:a.jsxs("form",{onSubmit:h=>{h.preventDefault(),d(!0)},children:[a.jsx(ln,{required:!0,label:"Title",children:a.jsx(Je,{children:a.jsx(nt,{placeholder:"New Article",value:n,autoFocus:!0,onChange:p})})}),a.jsx(Xge,{children:"Title is used to construct the subject, keep in mind that the subject cannot be changed later."})]})}),a.jsxs(Yn,{children:[a.jsx(oe,{onClick:()=>d(!1),subtle:!0,children:"Cancel"}),a.jsx(oe,{onClick:()=>d(!0),disabled:!o,children:"Create"})]})]})},Yge=C.h1.withConfig({displayName:"NewArticleDialog__H1",componentId:"sc-4bf85eb8-0"})(["margin:0;"]),Xge=C.p.withConfig({displayName:"NewArticleDialog__Explanation",componentId:"sc-4bf85eb8-1"})(["color:",";max-width:60ch;"],e=>e.theme.colors.textLight),Qge=()=>{Wa(X.classes.bookmark,Bge),Wa(E.classes.ontology,Hge),Wa(X.classes.table,dA),Wa(Lr.classes.collection,Vge),Wa(Ne.classes.drive,qge),Wa(X.classes.article,Kge)},Jge=()=>{Qge(),Mge()};function Zge(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var e0e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,t0e=Zge(function(e){return e0e.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const n0e=d_.get()??window.location.origin,r0e=Ege(),og=new f7({agent:r0e,serverUrl:n0e});og.parseMetaTags();const o0e=window.bugsnagApiKey?pY(window.bugsnagApiKey):yc;og.preloadPropsAndClasses();Jge();Pge(og);function i0e(e,t){return typeof t=="string"?t0e(e):!0}function s0e(){return a.jsx(b7.Provider,{value:og,children:a.jsx(fY,{children:a.jsx(al,{children:a.jsx(IN,{basename:"/",children:a.jsx(rU,{children:a.jsx(eU,{children:a.jsx(Wz,{shouldForwardProp:i0e,children:a.jsxs(mY,{children:[a.jsx(yY,{}),a.jsx(o0e,{FallbackComponent:LI,children:a.jsxs(Ad,{onValidationChange:()=>{},children:[a.jsx(jge,{}),a.jsx(Cge,{}),a.jsx(qv,{children:a.jsxs(sq,{children:[a.jsx(oE,{children:a.jsx(qv,{children:a.jsxs(tK,{children:[a.jsx(zge,{}),a.jsx(vge,{children:a.jsx(dge,{})})]})})}),a.jsx(Nge,{})]})})]})})]})})})})})})})})}const a0e=S8(document.getElementById("root"));a0e.render(a.jsx(f.StrictMode,{children:a.jsx(s0e,{})}));export{E as A,oe as B,ge as C,g0e as D,x0e as E,h0e as F,pre as G,Py as H,Je as I,ere as J,vE as K,l0e as L,Ii as M,zM as N,m0e as O,lx as P,VE as Q,ce as R,Ia as S,ox as T,ot as U,X as _,co as a,XR as b,Ce as c,C as d,yI as e,Yt as f,c0e as g,OD as h,yn as i,a as j,nt as k,be as l,FE as m,Kz as n,y0e as o,Y as p,S0e as q,f as r,w0e as s,Fi as t,ne as u,rk as v,b0e as w,Zo as x,JM as y,v0e as z};
//# sourceMappingURL=index.js.map