PageSourceSearch

https://manualmagic.ai/assets/index-CSs1uod6.js

js manualmagic.ai collected 2026-10-05 12:13:35 UTC 2,012,556 bytes, 1,465 lines download raw bytes

vendor: 4,111 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.browser-DLUY02oA.js","assets/_commonjsHelpers-CE1G-McA.js","assets/index-BAMY2Nnw.js","assets/empty-Cl2ND4lu.js","assets/url-Bc-kkpLm.js","assets/index-CEPsZ2kp.js"])))=>i.map(i=>d[i]);
2import{g as getDefaultExportFromCjs,a as getAugmentedNamespace,c as commonjsGlobal}from"./_commonjsHelpers-CE1G-McA.js";import{p as process$1}from"./index-BAMY2Nnw.js";import{e as empty$2}from"./empty-Cl2ND4lu.js";function _mergeNamespaces(ds,dn){for(var ms=0;ms<dn.length;ms++){const xs=dn[ms];if(typeof xs!="string"&&!Array.isArray(xs)){for(const bs in xs)if(bs!=="default"&&!(bs in ds)){const Es=Object.getOwnPropertyDescriptor(xs,bs);Es&&Object.defineProperty(ds,bs,Es.get?Es:{enumerable:!0,get:()=>xs[bs]})}}}return Object.freeze(Object.defineProperty(ds,Symbol.toStringTag,{value:"Module"}))}(function(){const dn=document.createElement("link").relList;if(dn&&dn.supports&&dn.supports("modulepreload"))return;for(const bs of document.querySelectorAll('link[rel="modulepreload"]'))xs(bs);new MutationObserver(bs=>{for(const Es of bs)if(Es.type==="childList")for(const ws of Es.addedNodes)ws.tagName==="LINK"&&ws.rel==="modulepreload"&&xs(ws)}).observe(document,{childList:!0,subtree:!0});function ms(bs){const Es={};return bs.integrity&&(Es.integrity=bs.integrity),bs.referrerPolicy&&(Es.referrerPolicy=bs.referrerPolicy),bs.crossOrigin==="use-credentials"?Es.credentials="include":bs.crossOrigin==="anonymous"?Es.credentials="omit":Es.credentials="same-origin",Es}function xs(bs){if(bs.ep)return;bs.ep=!0;const Es=ms(bs);fetch(bs.href,Es)}})();var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var ds=Symbol.for("react.transitional.element"),dn=Symbol.for("react.fragment");function ms(xs,bs,Es){var ws=null;if(Es!==void 0&&(ws=""+Es),bs.key!==void 0&&(ws=""+bs.key),"key"in bs){Es={};for(var Rs in bs)Rs!=="key"&&(Es[Rs]=bs[Rs])}else Es=bs;return bs=Es.ref,{$$typeof:ds,type:xs,key:ws,ref:bs!==void 0?bs:null,props:Es}}return reactJsxRuntime_production.Fragment=dn,reactJsxRuntime_production.jsx=ms,reactJsxRuntime_production.jsxs=ms,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),react={exports:{}},react_production={},hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var ds=Symbol.for("react.transitional.element"),dn=Symbol.for("react.portal"),ms=Symbol.for("react.fragment"),xs=Symbol.for("react.strict_mode"),bs=Symbol.for("react.profiler"),Es=Symbol.for("react.consumer"),ws=Symbol.for("react.context"),Rs=Symbol.for("react.forward_ref"),js=Symbol.for("react.suspense"),Cs=Symbol.for("react.memo"),As=Symbol.for("react.lazy"),ks=Symbol.for("react.activity"),Os=Symbol.for("react.view_transition"),Ms=Symbol.iterator;function Ds(sa){return sa===null||typeof sa!="object"?null:(sa=Ms&&sa[Ms]||sa["@@iterator"],typeof sa=="function"?sa:null)}var Ps={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ls=Object.assign,Bs={};function Fs(sa,Ra,_a){this.props=sa,this.context=Ra,this.refs=Bs,this.updater=_a||Ps}Fs.prototype.isReactComponent={},Fs.prototype.setState=function(sa,Ra){if(typeof sa!="object"&&typeof sa!="function"&&sa!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,sa,Ra,"setState")},Fs.prototype.forceUpdate=function(sa){this.updater.enqueueForceUpdate(this,sa,"forceUpdate")};function Us(){}Us.prototype=Fs.prototype;function Gs(sa,Ra,_a){this.props=sa,this.context=Ra,this.refs=Bs,this.updater=_a||Ps}var Js=Gs.prototype=new Us;
vendor: 8,908 bytes, line 2
2Js.constructor=Gs,Ls(Js,Fs.prototype),Js.isPureReactComponent=!0;var Ws=Array.isArray;function Zs(){}var Ys={H:null,A:null,T:null,S:null},Qs=Object.prototype.hasOwnProperty;function ai(sa,Ra,_a){var Oa=_a.ref;return{$$typeof:ds,type:sa,key:Ra,ref:Oa!==void 0?Oa:null,props:_a}}function ia(sa,Ra){return ai(sa.type,Ra,sa.props)}function ca(sa){return typeof sa=="object"&&sa!==null&&sa.$$typeof===ds}function ha(sa){var Ra={"=":"=0",":":"=2"};return"$"+sa.replace(/[=:]/g,function(_a){return Ra[_a]})}var ea=/\/+/g;function ta(sa,Ra){return typeof sa=="object"&&sa!==null&&sa.key!=null?ha(""+sa.key):Ra.toString(36)}function aa(sa){switch(sa.status){case"fulfilled":return sa.value;case"rejected":throw sa.reason;default:switch(typeof sa.status=="string"?sa.then(Zs,Zs):(sa.status="pending",sa.then(function(Ra){sa.status==="pending"&&(sa.status="fulfilled",sa.value=Ra)},function(Ra){sa.status==="pending"&&(sa.status="rejected",sa.reason=Ra)})),sa.status){case"fulfilled":return sa.value;case"rejected":throw sa.reason}}throw sa}function fa(sa,Ra,_a,Oa,za){var Ga=typeof sa;(Ga==="undefined"||Ga==="boolean")&&(sa=null);var qa=!1;if(sa===null)qa=!0;else switch(Ga){case"bigint":case"string":case"number":qa=!0;break;case"object":switch(sa.$$typeof){case ds:case dn:qa=!0;break;case As:return qa=sa._init,fa(qa(sa._payload),Ra,_a,Oa,za)}}if(qa)return za=za(sa),qa=Oa===""?"."+ta(sa,0):Oa,Ws(za)?(_a="",qa!=null&&(_a=qa.replace(ea,"$&/")+"/"),fa(za,Ra,_a,"",function(Ka){return Ka})):za!=null&&(ca(za)&&(za=ia(za,_a+(za.key==null||sa&&sa.key===za.key?"":(""+za.key).replace(ea,"$&/")+"/")+qa)),Ra.push(za)),1;qa=0;var Ma=Oa===""?".":Oa+":";if(Ws(sa))for(var Fa=0;Fa<sa.length;Fa++)Oa=sa[Fa],Ga=Ma+ta(Oa,Fa),qa+=fa(Oa,Ra,_a,Ga,za);else if(Fa=Ds(sa),typeof Fa=="function")for(sa=Fa.call(sa),Fa=0;!(Oa=sa.next()).done;)Oa=Oa.value,Ga=Ma+ta(Oa,Fa++),qa+=fa(Oa,Ra,_a,Ga,za);else if(Ga==="object"){if(typeof sa.then=="function")return fa(aa(sa),Ra,_a,Oa,za);throw Ra=String(sa),Error("Objects are not valid as a React child (found: "+(Ra==="[object Object]"?"object with keys {"+Object.keys(sa).join(", ")+"}":Ra)+"). If you meant to render a collection of children, use an array instead.")}return qa}function ua(sa,Ra,_a){if(sa==null)return sa;var Oa=[],za=0;return fa(sa,Oa,"","",function(Ga){return Ra.call(_a,Ga,za++)}),Oa}function Ea(sa){if(sa._status===-1){var Ra=sa._result,_a=Ra();_a.then(function(Oa){(sa._status===0||sa._status===-1)&&(sa._status=1,sa._result=Oa,_a.status===void 0&&(_a.status="fulfilled",_a.value=Oa))},function(Oa){(sa._status===0||sa._status===-1)&&(sa._status=2,sa._result=Oa,_a.status===void 0&&(_a.status="rejected",_a.reason=Oa))}),sa._status===-1&&(sa._status=0,sa._result=_a)}if(sa._status===1)return sa._result.default;throw sa._result}var ra=typeof reportError=="function"?reportError:function(sa){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Ra=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof sa=="object"&&sa!==null&&typeof sa.message=="string"?String(sa.message):String(sa),error:sa});if(!window.dispatchEvent(Ra))return}else if(typeof process$1=="object"&&typeof process$1.emit=="function"){process$1.emit("uncaughtException",sa);return}console.error(sa)};function Ia(sa){var Ra=Ys.T,_a={};_a.types=Ra!==null?Ra.types:null,Ys.T=_a;try{var Oa=sa(),za=Ys.S;za!==null&&za(_a,Oa),typeof Oa=="object"&&Oa!==null&&typeof Oa.then=="function"&&Oa.then(Zs,ra)}catch(Ga){ra(Ga)}finally{Ra!==null&&_a.types!==null&&(Ra.types=_a.types),Ys.T=Ra}}function $a(sa){var Ra=Ys.T;if(Ra!==null){var _a=Ra.types;_a===null?Ra.types=[sa]:_a.indexOf(sa)===-1&&_a.push(sa)}else Ia($a.bind(null,sa))}var oa={map:ua,forEach:function(sa,Ra,_a){ua(sa,function(){Ra.apply(this,arguments)},_a)},count:function(sa){var Ra=0;return ua(sa,function(){Ra++}),Ra},toArray:function(sa){return ua(sa,function(Ra){return Ra})||[]},only:function(sa){if(!ca(sa))throw Error("React.Children.only expected to receive a single React element child.");return sa}};return react_production.Activity=ks,react_production.Children=oa,react_production.Component=Fs,react_production.Fragment=ms,react_production.Profiler=bs,react_production.PureComponent=Gs,react_production.StrictMode=xs,react_production.Suspense=js,react_production.ViewTransition=Os,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ys,react_production.__COMPILER_RUNTIME={__proto__:null,c:function(sa){return Ys.H.useMemoCache(sa)}},react_production.addTransitionType=$a,react_production.cache=function(sa){return function(){return sa.apply(null,arguments)}},react_production.cacheSignal=function(){return null},react_production.cloneElement=function(sa,Ra,_a){if(sa==null)throw Error("The argument must be a React element, but you passed "+sa+".");var Oa=Ls({},sa.props),za=sa.key;if(Ra!=null)for(Ga in Ra.key!==void 0&&(za=""+Ra.key),Ra)!Qs.call(Ra,Ga)||Ga==="key"||Ga==="__self"||Ga==="__source"||Ga==="ref"&&Ra.ref===void 0||(Oa[Ga]=Ra[Ga]);var Ga=arguments.length-2;if(Ga===1)Oa.children=_a;else if(1<Ga){for(var qa=Array(Ga),Ma=0;Ma<Ga;Ma++)qa[Ma]=arguments[Ma+2];Oa.children=qa}return ai(sa.type,za,Oa)},react_production.createContext=function(sa){return sa={$$typeof:ws,_currentValue:sa,_currentValue2:sa,_threadCount:0,Provider:null,Consumer:null},sa.Provider=sa,sa.Consumer={$$typeof:Es,_context:sa},sa},react_production.createElement=function(sa,Ra,_a){var Oa,za={},Ga=null;if(Ra!=null)for(Oa in Ra.key!==void 0&&(Ga=""+Ra.key),Ra)Qs.call(Ra,Oa)&&Oa!=="key"&&Oa!=="__self"&&Oa!=="__source"&&(za[Oa]=Ra[Oa]);var qa=arguments.length-2;if(qa===1)za.children=_a;else if(1<qa){for(var Ma=Array(qa),Fa=0;Fa<qa;Fa++)Ma[Fa]=arguments[Fa+2];za.children=Ma}if(sa&&sa.defaultProps)for(Oa in qa=sa.defaultProps,qa)za[Oa]===void 0&&(za[Oa]=qa[Oa]);return ai(sa,Ga,za)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function(sa){return{$$typeof:Rs,render:sa}},react_production.isValidElement=ca,react_production.lazy=function(sa){return{$$typeof:As,_payload:{_status:-1,_result:sa},_init:Ea}},react_production.memo=function(sa,Ra){return{$$typeof:Cs,type:sa,compare:Ra===void 0?null:Ra}},react_production.startTransition=Ia,react_production.unstable_useCacheRefresh=function(){return Ys.H.useCacheRefresh()},react_production.use=function(sa){return Ys.H.use(sa)},react_production.useActionState=function(sa,Ra,_a){return Ys.H.useActionState(sa,Ra,_a)},react_production.useCallback=function(sa,Ra){return Ys.H.useCallback(sa,Ra)},react_production.useContext=function(sa){return Ys.H.useContext(sa)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function(sa,Ra){return Ys.H.useDeferredValue(sa,Ra)},react_production.useEffect=function(sa,Ra){return Ys.H.useEffect(sa,Ra)},react_production.useEffectEvent=function(sa){return Ys.H.useEffectEvent(sa)},react_production.useId=function(){return Ys.H.useId()},react_production.useImperativeHandle=function(sa,Ra,_a){return Ys.H.useImperativeHandle(sa,Ra,_a)},react_production.useInsertionEffect=function(sa,Ra){return Ys.H.useInsertionEffect(sa,Ra)},react_production.useLayoutEffect=function(sa,Ra){return Ys.H.useLayoutEffect(sa,Ra)},react_production.useMemo=function(sa,Ra){return Ys.H.useMemo(sa,Ra)},react_production.useOptimistic=function(sa,Ra){return Ys.H.useOptimistic(sa,Ra)},react_production.useReducer=function(sa,Ra,_a){return Ys.H.useReducer(sa,Ra,_a)},react_production.useRef=function(sa){return Ys.H.useRef(sa)},react_production.useState=function(sa){return Ys.H.useState(sa)},react_production.useSyncExternalStore=function(sa,Ra,_a){return Ys.H.useSyncExternalStore(sa,Ra,_a)},react_production.useTransition=function(){return Ys.H.useTransition()},react_production.version="19.3.0",react_production}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production()),react.exports}var reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React4=_mergeNamespaces({__proto__:null,default:React},[reactExports]),global=globalThis||void 0||self;var __typeError=ds=>{throw TypeError(ds)},__accessCheck=(ds,dn,ms)=>dn.has(ds)||__typeError("Cannot "+ms),__privateGet=(ds,dn,ms)=>(__accessCheck(ds,dn,"read from private field"),ms?ms.call(ds):dn.get(ds)),__privateAdd=(ds,dn,ms)=>dn.has(ds)?__typeError("Cannot add the same private member more than once"):dn instanceof WeakSet?dn.add(ds):dn.set(ds,ms),__privateSet=(ds,dn,ms,xs)=>(__accessCheck(ds,dn,"write to private field"),dn.set(ds,ms),ms),ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PROTOCOL_RELATIVE_URL_REGEX=/^[\\/]{2}/;function normalizeProtocolRelativeUrl(ds,dn){return dn+ds.replace(/\\/g,"/")}var PopStateEventType="popstate";function isLocation(ds){return typeof ds=="object"&&ds!=null&&"pathname"in ds&&"search"in ds&&"hash"in ds&&"state"in ds&&"key"in ds}function createBrowserHistory(ds={}
2){function dn(xs,bs){let Es=bs.state?.masked,{pathname:ws,search:Rs,hash:js}=Es||xs.location;return createLocation("",{pathname:ws,search:Rs,hash:js},bs.state&&bs.state.usr||null,bs.state&&bs.state.key||"default",Es?{pathname:xs.location.pathname,search:xs.location.search,hash:xs.location.hash}:void 0)}function ms(xs,bs){return typeof bs=="string"?bs:createPath(bs)}return getUrlBasedHistory(dn,ms,null,ds)}function invariant(ds,dn){if(ds===!1||ds===null||typeof ds>"u")throw new Error(dn)}function warning(ds,dn){if(!ds){typeof console<"u"&&console.warn(dn);try{throw new Error(dn)}catch{}}}function createKey(){return Math.random().toString(36).substring(2,10)}function getHistoryState(ds,dn){return{usr:ds.state,key:ds.key,idx:dn,masked:ds.mask?{pathname:ds.pathname,search:ds.search,hash:ds.hash}:void 0}}function createLocation(ds,dn,ms=null,xs,bs){return{pathname:typeof ds=="string"?ds:ds.pathname,search:"",hash:"",...typeof dn=="string"?parsePath(dn):dn,state:ms,key:dn&&dn.key||xs||createKey(),mask:bs}}function createPath({pathname:ds="/",search:dn="",hash:ms=""}){return dn&&dn!=="?"&&(ds+=dn.charAt(0)==="?"?dn:"?"+dn),ms&&ms!=="#"&&(ds+=ms.charAt(0)==="#"?ms:"#"+ms),ds}function parsePath(ds){let dn={};if(ds){let ms=ds.indexOf("#");ms>=0&&(dn.hash=ds.substring(ms),ds=ds.substring(0,ms));let xs=ds.indexOf("?");xs>=0&&(dn.search=ds.substring(xs),ds=ds.substring(0,xs)),ds&&(dn.pathname=ds)}return dn}function getUrlBasedHistory(ds,dn,ms,xs={}){let{window:bs=document.defaultView,v5Compat:Es=!1}=xs,ws=bs.history,Rs="POP",js=null,Cs=As();Cs==null&&(Cs=0,ws.replaceState({...ws.state,idx:Cs},""));function As(){return(ws.state||{idx:null}).idx}function ks(){Rs="POP";let Ls=As(),Bs=Ls==null?null:Ls-Cs;Cs=Ls,js&&js({action:Rs,location:Ps.location,delta:Bs})}function Os(Ls,Bs){Rs="PUSH";let Fs=isLocation(Ls)?Ls:createLocation(Ps.location,Ls,Bs);Cs=As()+1;let Us=getHistoryState(Fs,Cs),Gs=Ps.createHref(Fs.mask||Fs);try{ws.pushState(Us,"",Gs)}catch(Js){if(Js instanceof DOMException&&Js.name==="DataCloneError")throw Js;bs.location.assign(Gs)}Es&&js&&js({action:Rs,location:Ps.location,delta:1})}function Ms(Ls,Bs){Rs="REPLACE";let Fs=isLocation(Ls)?Ls:createLocation(Ps.location,Ls,Bs);Cs=As();let Us=getHistoryState(Fs,Cs),Gs=Ps.createHref(Fs.mask||Fs);ws.replaceState(Us,"",Gs),Es&&js&&js({action:Rs,location:Ps.location,delta:0})}function Ds(Ls){return createBrowserURLImpl(bs,Ls)}let Ps={get action(){return Rs},get location(){return ds(bs,ws)},listen(Ls){if(js)throw new Error("A history only accepts one active listener");return bs.addEventListener(PopStateEventType,ks),js=Ls,()=>{bs.removeEventListener(PopStateEventType,ks),js=null}},createHref(Ls){return dn(bs,Ls)},createURL:Ds,encodeLocation(Ls){let Bs=Ds(Ls);return{pathname:Bs.pathname,search:Bs.search,hash:Bs.hash}},push:Os,replace:Ms,go(Ls){return ws.go(Ls)}};return Ps}function createBrowserURLImpl(ds,dn,ms=!1){let xs="http://localhost";ds&&(xs=ds.location.origin!=="null"?ds.location.origin:ds.location.href),invariant(xs,"No window.location.(origin|href) available to create URL");let bs=typeof dn=="string"?dn:createPath(dn);return bs=bs.replace(/ $/,"%20"),!ms&&PROTOCOL_RELATIVE_URL_REGEX.test(bs)&&(bs=xs+bs),new URL(bs,xs)}var _map,RouterContextProvider=class{constructor(ds){if(__privateAdd(this,_map,new Map),ds)for(let[dn,ms]of ds)this.set(dn,ms)}get(ds){if(__privateGet(this,_map).has(ds))return __privateGet(this,_map).get(ds);if(ds.defaultValue!==void 0)return ds.defaultValue;throw new Error("No value found for context")}set(ds,dn){__privateGet(this,_map).set(ds,dn)}};_map=new WeakMap;var unsupportedLazyRouteObjectKeys=new Set(["lazy","caseSensitive","path","id","index","children"]);function isUnsupportedLazyRouteObjectKey(ds){return unsupportedLazyRouteObjectKeys.has(ds)}var unsupportedLazyRouteFunctionKeys=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function isUnsupportedLazyRouteFunctionKey(ds){return unsupportedLazyRouteFunctionKeys.has(ds)}function isIndexRoute(ds){return ds.index===!0}function convertRoutesToDataRoutes(ds,dn,ms=[],xs={},bs=!1){return ds.map((Es,ws)=>{let Rs=[...ms,String(ws)],js=typeof Es.id=="string"?Es.id:Rs.join("-");if(invariant(Es.index!==!0||!Es.children,"Cannot specify children on an index route"),invariant(bs||!xs[js],`Found a route id collision on i
2d "${js}".  Route id's must be globally unique within Data Router usages`),isIndexRoute(Es)){let Cs={...Es,id:js};return xs[js]=mergeRouteUpdates(Cs,dn(Cs)),Cs}else{let Cs={...Es,id:js,children:void 0};return xs[js]=mergeRouteUpdates(Cs,dn(Cs)),Es.children&&(Cs.children=convertRoutesToDataRoutes(Es.children,dn,Rs,xs,bs)),Cs}})}function mergeRouteUpdates(ds,dn){return Object.assign(ds,{...dn,...typeof dn.lazy=="object"&&dn.lazy!=null?{lazy:{...ds.lazy,...dn.lazy}}:{}})}function matchRoutes(ds,dn,ms="/"){return matchRoutesImpl(ds,dn,ms,!1)}function matchRoutesImpl(ds,dn,ms,xs,bs){let Es=typeof dn=="string"?parsePath(dn):dn,ws=stripBasename(Es.pathname||"/",ms);if(ws==null)return null;let Rs=bs??flattenAndRankRoutes(ds),js=null,Cs=decodePath(ws);for(let As=0;js==null&&As<Rs.length;++As)js=matchRouteBranch(Rs[As],Cs,xs);return js}function convertRouteMatchToUiMatch(ds,dn){let{route:ms,pathname:xs,params:bs}=ds;return{id:ms.id,pathname:xs,params:bs,data:dn[ms.id],loaderData:dn[ms.id],handle:ms.handle}}function flattenAndRankRoutes(ds){let dn=flattenRoutes(ds);return rankRouteBranches(dn),dn}function flattenRoutes(ds,dn=[],ms=[],xs="",bs=!1){let Es=(ws,Rs,js=bs,Cs)=>{let As={relativePath:Cs===void 0?ws.path||"":Cs,caseSensitive:ws.caseSensitive===!0,childrenIndex:Rs,route:ws};if(As.relativePath.startsWith("/")){if(!As.relativePath.startsWith(xs)&&js)return;invariant(As.relativePath.startsWith(xs),`Absolute route path "${As.relativePath}" nested under path "${xs}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),As.relativePath=As.relativePath.slice(xs.length)}let ks=joinPaths([xs,As.relativePath]),Os=ms.concat(As);ws.children&&ws.children.length>0&&(invariant(ws.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${ks}".`),flattenRoutes(ws.children,dn,Os,ks,js)),!(ws.path==null&&!ws.index)&&dn.push({path:ks,score:computeScore(ks,ws.index),routesMeta:Os.map((Ms,Ds)=>{let[Ps,Ls]=compilePath(Ms.relativePath,Ms.caseSensitive,Ds===Os.length-1);return{...Ms,matcher:Ps,compiledParams:Ls}})})};return ds.forEach((ws,Rs)=>{if(ws.path===""||!ws.path?.includes("?"))Es(ws,Rs);else for(let js of explodeOptionalSegments(ws.path))Es(ws,Rs,!0,js)}),dn}function explodeOptionalSegments(ds){let dn=ds.split("/");if(dn.length===0)return[];let[ms,...xs]=dn,bs=ms.endsWith("?"),Es=ms.replace(/\?$/,"");if(xs.length===0)return bs?[Es,""]:[Es];let ws=explodeOptionalSegments(xs.join("/")),Rs=[];return Rs.push(...ws.map(js=>js===""?Es:[Es,js].join("/"))),bs&&Rs.push(...ws),Rs.map(js=>ds.startsWith("/")&&js===""?"/":js)}function rankRouteBranches(ds){ds.sort((dn,ms)=>dn.score!==ms.score?ms.score-dn.score:compareIndexes(dn.routesMeta.map(xs=>xs.childrenIndex),ms.routesMeta.map(xs=>xs.childrenIndex)))}var paramRe=/^:[\w-]+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=ds=>ds==="*";function computeScore(ds,dn){let ms=ds.split("/"),xs=ms.length;return ms.some(isSplat)&&(xs+=splatPenalty),dn&&(xs+=indexRouteValue),ms.filter(bs=>!isSplat(bs)).reduce((bs,Es)=>bs+(paramRe.test(Es)?dynamicSegmentValue:Es===""?emptySegmentValue:staticSegmentValue),xs)}function compareIndexes(ds,dn){return ds.length===dn.length&&ds.slice(0,-1).every((xs,bs)=>xs===dn[bs])?ds[ds.length-1]-dn[dn.length-1]:0}function matchRouteBranch(ds,dn,ms=!1){let{routesMeta:xs}=ds,bs={},Es="/",ws=[];for(let Rs=0;Rs<xs.length;++Rs){let js=xs[Rs],Cs=Rs===xs.length-1,As=Es==="/"?dn:dn.slice(Es.length)||"/",ks={path:js.relativePath,caseSensitive:js.caseSensitive,end:Cs},Os=js.matcher&&js.compiledParams?matchPathImpl(ks,As,js.matcher,js.compiledParams):matchPath(ks,As),Ms=js.route;if(!Os&&Cs&&ms&&!xs[xs.length-1].route.index&&(Os=matchPath({path:js.relativePath,caseSensitive:js.caseSensitive,end:!1},As)),!Os)return null;
2Object.assign(bs,Os.params),ws.push({params:bs,pathname:joinPaths([Es,Os.pathname]),pathnameBase:normalizePathname(joinPaths([Es,Os.pathnameBase])),route:Ms}),Os.pathnameBase!=="/"&&(Es=joinPaths([Es,Os.pathnameBase]))}return ws}function matchPath(ds,dn){typeof ds=="string"&&(ds={path:ds,caseSensitive:!1,end:!0});let[ms,xs]=compilePath(ds.path,ds.caseSensitive,ds.end);return matchPathImpl(ds,dn,ms,xs)}function matchPathImpl(ds,dn,ms,xs){let bs=dn.match(ms);if(!bs)return null;let Es=bs[0],ws=removeTrailingSlash(Es,1),Rs=bs.slice(1);return{params:xs.reduce((Cs,{paramName:As,isOptional:ks},Os)=>{if(As==="*"){let Ds=Rs[Os]||"";ws=removeTrailingSlash(Es.slice(0,Es.length-Ds.length),1)}const Ms=Rs[Os];return ks&&!Ms?Cs[As]=void 0:Cs[As]=(Ms||"").replace(/%2F/g,"/"),Cs},{}),pathname:Es,pathnameBase:ws,pattern:ds}}function compilePath(ds,dn=!1,ms=!0){warning(ds==="*"||!ds.endsWith("*")||ds.endsWith("/*"),`Route path "${ds}" will be treated as if it were "${ds.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${ds.replace(/\*$/,"/*")}".`);let xs=[],bs="^"+ds.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(ws,Rs,js,Cs,As)=>{if(xs.push({paramName:Rs,isOptional:js!=null}),js){let ks=As.charAt(Cs+ws.length);return ks&&ks!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return ds.endsWith("*")?(xs.push({paramName:"*"}),bs+=ds==="*"||ds==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):ms?bs+="\\/*$":ds!==""&&ds!=="/"&&(bs+="(?:(?=\\/|$))"),[new RegExp(bs,dn?void 0:"i"),xs]}function decodePath(ds){try{return ds.split("/").map(dn=>decodeURIComponent(dn).replace(/\//g,"%2F")).join("/")}catch(dn){return warning(!1,`The URL path "${ds}
2" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${dn}).`),ds}}function stripBasename(ds,dn){if(dn==="/")return ds;if(!ds.toLowerCase().startsWith(dn.toLowerCase()))return null;let ms=dn.endsWith("/")?dn.length-1:dn.length,xs=ds.charAt(ms);return xs&&xs!=="/"?null:ds.slice(ms)||"/"}function prependBasename({basename:ds,pathname:dn}){return dn==="/"?ds:joinPaths([ds,dn])}var isAbsoluteUrl=ds=>ABSOLUTE_URL_REGEX.test(ds);function resolvePath(ds,dn="/"){let{pathname:ms,search:xs="",hash:bs=""}=typeof ds=="string"?parsePath(ds):ds,Es;return ms?(ms=removeDoubleSlashes(ms),ms.startsWith("/")||ms.startsWith("\\")?Es=resolvePathname(ms.substring(1),"/"):Es=resolvePathname(ms,dn)):Es=dn,{pathname:Es,search:normalizeSearch(xs),hash:normalizeHash(bs)}}function resolvePathname(ds,dn){let ms=removeTrailingSlash(dn).split("/");return ds.split("/").forEach(bs=>{bs===".."?ms.length>1&&ms.pop():bs!=="."&&ms.push(bs)}),ms.length>1?ms.join("/"):"/"}function getInvalidPathError(ds,dn,ms,xs){return`Cannot include a '${ds}' character in a manually specified \`to.${dn}\` field [${JSON.stringify(xs)}].  Please separate it out to the \`to.${ms}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function getPathContributingMatches(ds){return ds.filter((dn,ms)=>ms===0||dn.route.path&&dn.route.path.length>0)}function getResolveToMatches(ds){let dn=getPathContributingMatches(ds);return dn.map((ms,xs)=>xs===dn.length-1?ms.pathname:ms.pathnameBase)}function resolveTo(ds,dn,ms,xs=!1){let bs;typeof ds=="string"?bs=parsePath(ds):(bs={...ds},invariant(!bs.pathname||!bs.pathname.includes("?"),getInvalidPathError("?","pathname","search",bs)),invariant(!bs.pathname||!bs.pathname.includes("#"),getInvalidPathError("#","pathname","hash",bs)),invariant(!bs.search||!bs.search.includes("#"),getInvalidPathError("#","search","hash",bs)));let Es=ds===""||bs.pathname==="",ws=Es?"/":bs.pathname,Rs;if(ws==null)Rs=ms;else{let ks=dn.length-1;if(!xs&&ws.startsWith("..")){let Os=ws.split("/");for(;Os[0]==="..";)Os.shift(),ks-=1;bs.pathname=Os.join("/")}Rs=ks>=0?dn[ks]:"/"}let js=resolvePath(bs,Rs),Cs=ws&&ws!=="/"&&ws.endsWith("/"),As=(Es||ws===".")&&ms.endsWith("/");return!js.pathname.endsWith("/")&&(Cs||As)&&(js.pathname+="/"),js}var removeDoubleSlashes=ds=>ds.replace(/[\\/]{2,}/g,"/"),joinPaths=ds=>removeDoubleSlashes(ds.join("/"));function removeTrailingSlash(ds,dn=0){let ms=ds.length;for(;ms>dn&&ds.charCodeAt(ms-1)===47;)ms--;return ms===ds.length?ds:ds.slice(0,ms)}var normalizePathname=ds=>removeTrailingSlash(ds).replace(/^\/*/,"/"),normalizeSearch=ds=>!ds||ds==="?"?"":ds.startsWith("?")?ds:"?"+ds,normalizeHash=ds=>!ds||ds==="#"?"":ds.startsWith("#")?ds:"#"+ds,SUPPORTED_ERROR_TYPES=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ErrorResponseImpl=class{constructor(ds,dn,ms,xs=!1){this.status=ds,this.statusText=dn||"",this.internal=xs,ms instanceof Error?(this.data=ms.toString(),this.error=ms):this.data=ms}};function isRouteErrorResponse(ds){return ds!=null&&typeof ds.status=="number"&&typeof ds.statusText=="string"&&typeof ds.internal=="boolean"&&"data"in ds}function getRoutePattern(ds){let dn=ds.map(ms=>ms.route.path).filter(Boolean);return joinPaths(dn)||"/"}var isBrowser=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function parseToInfo(ds,dn){let ms=ds;if(typeof ms!="string"||!ABSOLUTE_URL_REGEX.test(ms))return{absoluteURL:void 0,isExternal:!1,to:ms};let xs=ms,bs=!1;if(isBrowser)try{let Es=new URL(window.location.href),ws=PROTOCOL_RELATIVE_URL_REGEX.test(ms)?new URL(normalizeProtocolRelativeUrl(ms,Es.protocol)):new URL(ms),Rs=stripBasename(ws.pathname,dn);ws.origin===Es.origin&&Rs!=null?ms=Rs+ws.search+ws.hash:bs=!0}catch{warning(!1,`<Link to="${ms}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:xs,isExternal:bs,to:ms}}var UninstrumentedSymbol=Symbol("Uninstrumented");function getRouteInstrumentationUpdates(ds,dn){let ms={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};ds.forEach(bs=>bs({id:dn.id,index:dn.index,path:dn.path,instrument(Es){let ws=Object.keys(ms);for(let Rs of ws)Es[Rs]&&ms[Rs].push(Es[Rs])}}));let xs={};if(typeof dn.lazy=="function"&&ms.lazy.length>0){let bs=wrapImpl(ms.lazy,dn.lazy,()=>{});bs&&(xs.lazy=bs)}if(typeof dn.lazy=="object"){let bs=dn.lazy;["middleware","loader","action"].forEach(Es=>{let ws=bs[Es],Rs=ms[`lazy.${Es}`];if(typeof ws=="function"&&Rs.length>0){let js=wrapImpl(Rs,ws,()=>{});js&&(xs.lazy=Object.assign(xs.lazy||{},{[Es]:js}))}})}return["loader","action"].forEach(bs=>{let Es=dn[bs];if(typeof Es=="function"&&ms[bs].length>0){let ws=Es[UninstrumentedSymbol]??Es,Rs=wrapImpl(ms[bs],ws,(...js)=>getHandlerInfo(js[0]));Rs&&(bs==="loader"&&ws.hydrate===!0&&(Rs.hydrate=!0),Rs[UninstrumentedSymbol]=ws,xs[bs]=Rs)}}),dn.middleware&&dn.middleware.length>0&&ms.middleware.length>0&&(xs.middleware=dn.middleware.map(bs=>{let Es=bs[UninstrumentedSymbol]??bs,ws=wrapImpl(ms.middleware,Es,(...Rs)=>getHandlerInfo(Rs[0]));return ws?(ws[UninstrumentedSymbol]=Es,ws):bs})),xs}function instrumentClientSideRouter(ds,dn){let ms={navigate:[],fetch:[]};if(dn.forEach(xs=>xs({instrument(bs){let Es=Object.keys(bs);for(let ws of Es)bs[ws]&&ms[ws].push(bs[ws])}})),ms.navigate.length>0){let xs=ds.navigate[UninstrumentedSymbol]??ds.navigate,bs=wrapImpl(ms.navigate,xs,(...Es)=>{let[ws,Rs]=Es;
2return{to:typeof ws=="number"||typeof ws=="string"?ws:ws?createPath(ws):".",...getRouterInfo(ds,Rs??{})}});bs&&(bs[UninstrumentedSymbol]=xs,ds.navigate=bs)}if(ms.fetch.length>0){let xs=ds.fetch[UninstrumentedSymbol]??ds.fetch,bs=wrapImpl(ms.fetch,xs,(...Es)=>{let[ws,,Rs,js]=Es;return{href:Rs??".",fetcherKey:ws,...getRouterInfo(ds,js??{})}});bs&&(bs[UninstrumentedSymbol]=xs,ds.fetch=bs)}return ds}function wrapImpl(ds,dn,ms){return ds.length===0?null:async(...xs)=>{let bs=await recurseRight(ds,ms(...xs),()=>dn(...xs),ds.length-1);if(bs.type==="error")throw bs.value;return bs.value}}async function recurseRight(ds,dn,ms,xs){let bs=ds[xs],Es;if(bs){let ws,Rs=async()=>(ws?console.error("You cannot call instrumented handlers more than once"):ws=recurseRight(ds,dn,ms,xs-1),Es=await ws,invariant(Es,"Expected a result"),Es.type==="error"&&Es.value instanceof Error?{status:"error",error:Es.value}:{status:"success",error:void 0});try{await bs(Rs,dn)}catch(js){console.error("An instrumentation function threw an error:",js)}ws||await Rs(),await ws}else try{Es={type:"success",value:await ms()}}catch(ws){Es={type:"error",value:ws}}return Es||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function getHandlerInfo(ds){let{request:dn,context:ms,params:xs,pattern:bs}=ds;return{request:getReadonlyRequest(dn),params:{...xs},pattern:bs,context:getReadonlyContext(ms)}}function getRouterInfo(ds,dn){return{currentUrl:createPath(ds.state.location),..."formMethod"in dn?{formMethod:dn.formMethod}:{},..."formEncType"in dn?{formEncType:dn.formEncType}:{},..."formData"in dn?{formData:dn.formData}:{},..."body"in dn?{body:dn.body}:{}}}function getReadonlyRequest(ds){return{method:ds.method,url:ds.url,headers:{get:(...dn)=>ds.headers.get(...dn)}}}function getReadonlyContext(ds){if(isPlainObject$2(ds)){let dn={...ds};return Object.freeze(dn),dn}else return{get:dn=>ds.get(dn)}}var objectProtoNames=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function isPlainObject$2(ds){if(ds===null||typeof ds!="object")return!1;const dn=Object.getPrototypeOf(ds);return dn===Object.prototype||dn===null||Object.getOwnPropertyNames(dn).sort().join("\0")===objectProtoNames}var DEFAULT_NAVIGATION_URL=new URL("http://localhost");function getNavigatorCurrentUrl(ds){if(ds.createURL)return ds.createURL("/");try{return new URL(ds.createHref("/"),DEFAULT_NAVIGATION_URL)}catch{return DEFAULT_NAVIGATION_URL}}function isSameOrigin(ds,dn){return ds.origin===dn.origin&&(ds.origin!=="null"||ds.protocol===dn.protocol&&ds.host===dn.host)}function isExplicitUrl(ds,dn){if(ds.startsWith("//"))return!0;let ms=dn.protocol.toLowerCase();return ds.toLowerCase().startsWith(ms)?dn.host===""||ds.slice(ms.length).startsWith("//"):!1}function validateNavigationTarget(ds,dn,ms,xs){let bs=null;try{bs=ds==null?null:new URL(ds,ms)}catch{}let Es=new URL(dn,ms),ws=bs!=null&&!isSameOrigin(bs,ms),Rs=!isSameOrigin(Es,ms);if(xs==="reject"){if(ws||Rs)throw new Error("External navigation is not allowed")}else if(Rs&&(bs==null||!isExplicitUrl(ds,bs)||!isSameOrigin(bs,Es)))throw new Error("External navigation is not allowed")}var validMutationMethodsArr=["POST","PUT","PATCH","DELETE"],validMutationMethods=new Set(validMutationMethodsArr),validRequestMethodsArr=["GET",...validMutationMethodsArr],validRequestMethods=new Set(validRequestMethodsArr),redirectStatusCodes=new Set([301,302,303,307,308]),redirectPreserveMethodStatusCodes=new Set([307,308]),IDLE_NAVIGATION={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_FETCHER={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},IDLE_BLOCKER={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},defaultMapRouteProperties=ds=>({hasErrorBoundary:!!ds.hasErrorBoundary}),TRANSITIONS_STORAGE_KEY="remix-router-transitions",ResetLoaderDataSymbol=Symbol("ResetLoaderData"),_routes,_branches,_hmrRoutes,_hmrBranches,DataRoutes=class{constructor(ds){__privateAdd(this,_routes),__privateAdd(this,_branches),__privateAdd(this,_hmrRoutes),__privateAdd(this,_hmrBranches),__privateSet(this,_routes,ds),__privateSet(this,_branches,flattenAndRankRoutes(ds))}get stableRoutes(){return __privateGet(this,_routes)}get activeRoutes(){return __privateGet(this,_hmrRoutes)??__privateGet(this,_routes)}get branches(){return __privateGet(this,_hmrBranches)??__privateGet(this,_branches)}get hasHMRRoutes(){return __privateGet(this,_hmrRoutes)!=null}setRoutes(ds){__privateSet(this,_routes,ds),__privateSet(this,_branches,flattenAndRankRoutes(ds))}setHmrRoutes(ds){__privateSet(this,_hmrRoutes,ds),__privateSet(this,_hmrBranches,flattenAndRankRoutes(ds))}commitHmrRoutes(){__privateGet(this,_hmrRoutes)&&(__privateSet(this,_routes,__privateGet(this,_hmrRoutes)),__privateSet(this,_branches,__privateGet(this,_hmrBranches)),__privateSet(this,_hmrRoutes,void 0),__privateSet(this,_hmrBranches,void 0))}};_routes=new WeakMap;_branches=new WeakMap;_hmrRoutes=new WeakMap;_hmrBranches=new WeakMap;function createRouter(ds){const dn=ds.window?ds.window:typeof window<"u"?window:void 0,ms=typeof dn<"u"&&typeof dn.document<"u"&&typeof dn.document.createElement<"u";invariant(ds.routes.length>0,"You must provide a non-empty routes array to createRouter");let xs=ds.hydrationRouteProperties||[],bs=ds.mapRouteProperties||defaultMapRouteProperties,Es=bs;if(ds.instrumentations){let pa=ds.instrumentations;Es=ba=>({...bs(ba),...getRouteInstrumentationUpdates(pa.map(Ca=>
2Ca.route).filter(Boolean),ba)})}let ws={},Rs=new DataRoutes(convertRoutesToDataRoutes(ds.routes,Es,void 0,ws)),js=ds.basename||"/";js.startsWith("/")||(js=`/${js}`);let Cs=ds.dataStrategy||defaultDataStrategyWithMiddleware,As={...ds.future},ks=null,Os=new Set,Ms=null,Ds=null,Ps=null,Ls=null,Bs=ds.hydrationData!=null,Fs=matchRoutesImpl(Rs.activeRoutes,ds.history.location,js,!1,Rs.branches),Us=!1,Gs=null,Js,Ws;if(Fs==null&&!ds.patchRoutesOnNavigation){let pa=getInternalRouterError(404,{pathname:ds.history.location.pathname}),{matches:ba,route:Ca}=getShortCircuitMatches(Rs.activeRoutes);Js=!0,Ws=!Js,Fs=ba,Gs={[Ca.id]:pa}}else if(Fs&&!ds.hydrationData&&il(Fs,Rs.activeRoutes,ds.history.location.pathname).active&&(Fs=null),Fs)if(Fs.some(pa=>pa.route.lazy))Js=!1,Ws=!Js;else if(!Fs.some(pa=>routeHasLoaderOrMiddleware(pa.route)))Js=!0,Ws=!Js;else{let pa=ds.hydrationData?ds.hydrationData.loaderData:null,ba=ds.hydrationData?ds.hydrationData.errors:null,Ca=Fs;if(ba){let Ua=Fs.findIndex(Ba=>ba[Ba.route.id]!==void 0);Ca=Ca.slice(0,Ua+1)}Ws=!1,Js=!0,Ca.forEach(Ua=>{let Ba=getRouteHydrationStatus(Ua.route,pa,ba);Ws=Ws||Ba.renderFallback,Js=Js&&!Ba.shouldLoad})}else{Js=!1,Ws=!Js,Fs=[];let pa=il(null,Rs.activeRoutes,ds.history.location.pathname);pa.active&&pa.matches&&(Us=!0,Fs=pa.matches)}let Zs,Ys={historyAction:ds.history.action,location:ds.history.location,matches:Fs,initialized:Js,renderFallback:Ws,navigation:IDLE_NAVIGATION,restoreScrollPosition:ds.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:ds.hydrationData&&ds.hydrationData.loaderData||{},actionData:ds.hydrationData&&ds.hydrationData.actionData||null,errors:ds.hydrationData&&ds.hydrationData.errors||Gs,fetchers:new Map,blockers:new Map},Qs="POP",ai=null,ia=!1,ca,ha=!1,ea=new Map,ta=null,aa=!1,fa=!1,ua=new Set,Ea=new Map,ra=0,Ia=-1,$a=new Map,oa=new Set,sa=new Map,Ra=new Map,_a=new Set,Oa=new Map,za,Ga=null;function qa(){if(ks=ds.history.listen(({action:pa,location:ba,delta:Ca})=>{if(za){za(),za=void 0;return}warning(Oa.size===0||Ca!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ua=Za({currentLocation:Ys.location,nextLocation:ba,historyAction:pa});if(Ua&&Ca!=null){let Ba=new Promise(Qa=>{za=Qa});ds.history.go(Ca*-1),Ja(Ua,{state:"blocked",location:ba,proceed(){Ja(Ua,{state:"proceeding",proceed:void 0,reset:void 0,location:ba}),Ba.then(()=>ds.history.go(Ca))},reset(){let Qa=new Map(Ys.blockers);Qa.set(Ua,IDLE_BLOCKER),Ka({blockers:Qa})}}),ai?.resolve(),ai=null;return}return oo(pa,ba)}),ms){restoreAppliedTransitions(dn,ea);let pa=()=>persistAppliedTransitions(dn,ea);dn.addEventListener("pagehide",pa),ta=()=>dn.removeEventListener("pagehide",pa)}return Ys.initialized||oo("POP",Ys.location,{initialHydration:!0}),Zs}function Ma(){ks&&ks(),ta&&ta(),Os.clear(),ca&&ca.abort(),Ys.fetchers.forEach((pa,ba)=>Xs(Ys.fetchers,ba)),Ys.blockers.forEach((pa,ba)=>Wa(ba))}function Fa(pa){if(Os.add(pa),Ms){let{newErrors:ba}=Ms;Ms=null,pa(Ys,{deletedFetchers:[],newErrors:ba,viewTransitionOpts:void 0,flushSync:!1})}return()=>Os.delete(pa)}function Ka(pa,ba={}){pa.matches&&(pa.matches=pa.matches.map(Ba=>{let Qa=ws[Ba.route.id],eo=Ba.route;return eo.element!==Qa.element||eo.errorElement!==Qa.errorElement||eo.hydrateFallbackElement!==Qa.hydrateFallbackElement?{...Ba,route:Qa}:Ba})),Ys={...Ys,...pa};let Ca=[],Ua=[];Ys.fetchers.forEach((Ba,Qa)=>{Ba.state==="idle"&&(_a.has(Qa)?Ca.push(Qa):Ua.push(Qa))}),_a.forEach(Ba=>{!Ys.fetchers.has(Ba)&&!Ea.has(Ba)&&Ca.push(Ba)}),Os.size===0&&(Ms={newErrors:pa.errors??null}),[...Os].forEach(Ba=>Ba(Ys,{deletedFetchers:Ca,newErrors:pa.errors??null,viewTransitionOpts:ba.viewTransitionOpts,flushSync:ba.flushSync===!0})),Ca.forEach(Ba=>Xs(Ys.fetchers,Ba)),Ua.forEach(Ba=>Ys.fetchers.delete(Ba))}function mo(pa,ba,{flushSync:Ca}={}){let Ua=Ys.actionData!=null&&Ys.navigation.formMethod!=null&&isMutationMethod(Ys.navigation.formMethod)&&Ys.navigation.state==="loading"&&pa.state?._isRedirect!==!0,Ba;ba.actionData?Object.keys(ba.actionData).length>0?Ba=ba.actionData:Ba=null:Ua?Ba=Ys.actionData:Ba=null;let Qa=ba.loaderData?mergeLoaderData(Ys.loaderData,ba.loaderData,ba.matches||[],ba.errors):Ys.loaderData,eo=Ys.blockers;eo.size>0&&(eo=new Map(eo),eo.forEach((so,fo)=>eo.set(fo,IDLE_BLOCKER)));let ro=aa?!1:ml(pa,ba.matches||Ys.matches),to=ia===!0||Ys.navigation.formMethod!=null&&isMutationMethod(Ys.navigation.formMethod)&&pa.state?._isRedirect!==!0;Rs.commitHmrRoutes(),aa||Qs==="POP"||(Qs==="PUSH"?ds.history.push(pa,pa.state):Qs==="REPLACE"&&ds.history.replace(pa,pa.state));let lo;if(Qs==="POP"&&!aa&&pa!==Ys.location){let so=ea.get(Ys.location.pathname);so&&so.has(pa.pathname)?lo={currentLocation:Ys.location,nextLocation:pa}:ea.has(pa.pathname)&&(lo={currentLocation:pa,nextLocation:Ys.location})}else if(ha){let so=ea.get(Ys.location.pathname);so?so.add(pa.pathname):(so=new Set([pa.pathname]),ea.set(Ys.location.pathname,so)),lo={currentLocation:Ys.location,nextLocation:pa}}
2Ka({...ba,actionData:Ba,loaderData:Qa,historyAction:Qs,location:pa,initialized:!0,renderFallback:!1,navigation:IDLE_NAVIGATION,revalidation:"idle",restoreScrollPosition:ro,preventScrollReset:to,blockers:eo},{viewTransitionOpts:lo,flushSync:Ca===!0}),Qs="POP",ia=!1,ha=!1,aa=!1,fa=!1,ai?.resolve(),ai=null,Ga?.resolve(),Ga=null}async function ko(pa,ba){if(ai?.resolve(),ai=null,typeof pa=="number"){ai||(ai=createDeferred());let Do=ai.promise;return ds.history.go(pa),Do}let Ca=normalizeTo(Ys.location,Ys.matches,js,pa,ba?.fromRouteId,ba?.relative),{path:Ua,submission:Ba,error:Qa}=normalizeNavigateOptions(!1,Ca,ba),eo;if(ba?.mask){let Do=typeof ba.mask=="string"?parsePath(ba.mask):{...Ys.location.mask,...ba.mask};if(eo={pathname:Do.pathname??"",search:Do.search??"",hash:Do.hash??""},PROTOCOL_RELATIVE_URL_REGEX.test(eo.pathname))throw new Error("External navigation is not allowed");eo.pathname.startsWith("\\")&&(eo.pathname=eo.pathname.replace(/^\\+/,"/")),validateNavigationTarget(typeof ba.mask=="string"?ba.mask:createPath(ba.mask),createPath(eo),ds.history.createURL("/"),"reject")}let ro=Ys.location,to=createLocation(ro,Ua,ba&&ba.state,void 0,eo);to={...to,...ds.history.encodeLocation(to)},validateNavigationTarget(pa==null?ds.history.createHref(Ys.location):typeof pa=="string"?pa:createPath(pa),ds.history.createHref(to.mask||to),ds.history.createURL("/"),"reject");let lo=ba&&ba.replace!=null?ba.replace:void 0,so="PUSH";lo===!0?so="REPLACE":lo===!1||Ba!=null&&isMutationMethod(Ba.formMethod)&&Ba.formAction===Ys.location.pathname+Ys.location.search&&(so="REPLACE");let fo=ba&&"preventScrollReset"in ba?ba.preventScrollReset===!0:void 0,ao=(ba&&ba.flushSync)===!0,No=Za({currentLocation:ro,nextLocation:to,historyAction:so});if(No){Ja(No,{state:"blocked",location:to,proceed(){Ja(No,{state:"proceeding",proceed:void 0,reset:void 0,location:to}),ko(pa,ba)},reset(){let Do=new Map(Ys.blockers);Do.set(No,IDLE_BLOCKER),Ka({blockers:Do})}});return}await oo(so,to,{submission:Ba,pendingError:Qa,preventScrollReset:fo,replace:ba&&ba.replace,enableViewTransition:ba&&ba.viewTransition,flushSync:ao,callSiteDefaultShouldRevalidate:ba&&ba.defaultShouldRevalidate})}function bo(){Ga||(Ga=createDeferred()),ga(),Ka({revalidation:"loading"});let pa=Ga.promise;return Ys.navigation.state==="submitting"?pa:Ys.navigation.state==="idle"?(oo(Ys.historyAction,Ys.location,{startUninterruptedRevalidation:!0}),pa):(oo(Qs||Ys.historyAction,Ys.navigation.location,{overrideNavigation:Ys.navigation,enableViewTransition:ha===!0}),pa)}async function oo(pa,ba,Ca){ca&&ca.abort(),ca=null,Qs=pa,aa=(Ca&&Ca.startUninterruptedRevalidation)===!0,_l(Ys.location,Ys.matches),ia=(Ca&&Ca.preventScrollReset)===!0,ha=(Ca&&Ca.enableViewTransition)===!0;let Ua=Rs.activeRoutes,Ba=Ca?.initialHydration&&Ys.matches&&Ys.matches.length>0&&!Us?Ys.matches:matchRoutesImpl(Ua,ba,js,!1,Rs.branches),Qa=(Ca&&Ca.flushSync)===!0;if(Ba&&Ys.initialized&&!fa&&isHashChangeOnly(Ys.location,ba)&&!(Ca&&Ca.submission&&isMutationMethod(Ca.submission.formMethod))){mo(ba,{matches:Ba},{flushSync:Qa});return}let eo=il(Ba,Ua,ba.pathname);if(eo.active&&eo.matches&&(Ba=eo.matches),!Ba){let{error:Oo,notFoundMatches:To,route:pl}=Xo(ba.pathname);mo(ba,{matches:To,loaderData:{},errors:{[pl.id]:Oo}},{flushSync:Qa});return}let ro=Ca&&Ca.overrideNavigation?{...Ca.overrideNavigation,matches:Ba,historyAction:pa}:void 0;ca=new AbortController;let to=createClientSideRequest(ds.history,ba,ca.signal,Ca&&Ca.submission),lo=ds.getContext?await ds.getContext():new RouterContextProvider,so;if(Ca&&Ca.pendingError)so=[findNearestBoundary(Ba).route.id,{type:"error",error:Ca.pendingError}];else if(Ca&&Ca.submission&&isMutationMethod(Ca.submission.formMethod)){let Oo=await Va(to,ba,Ca.submission,Ba,pa,lo,eo.active,Ca&&Ca.initialHydration===!0,{replace:Ca.replace,flushSync:Qa});if(Oo.shortCircuited)return;if(Oo.pendingActionResult){let[To,pl]=Oo.pendingActionResult;if(isErrorResult(pl)&&isRouteErrorResponse(pl.error)&&pl.error.status===404){ca=null,mo(ba,{matches:Oo.matches,loaderData:{},errors:{[To]:pl.error}});return}}Ba=Oo.matches||Ba,so=Oo.pendingActionResult,ro=getLoadingNavigation(ba,Ba,pa,Ca.submission),Qa=!1,eo.active=!1,to=createClientSideRequest
2(ds.history,to.url,to.signal)}let{shortCircuited:fo,matches:ao,loaderData:No,errors:Do,workingFetchers:el}=await uo(to,ba,Ba,pa,lo,eo.active,ro,Ca&&Ca.submission,Ca&&Ca.fetcherSubmission,Ca&&Ca.replace,Ca&&Ca.initialHydration===!0,Qa,so,Ca&&Ca.callSiteDefaultShouldRevalidate);fo||(ca=null,mo(ba,{matches:ao||Ba,...getActionDataForCommit(so),loaderData:No,errors:Do,...el?{fetchers:el}:{}}))}async function Va(pa,ba,Ca,Ua,Ba,Qa,eo,ro,to={}){ga();let lo=getSubmittingNavigation(ba,Ua,Ba,Ca);if(Ka({navigation:lo},{flushSync:to.flushSync===!0}),eo){let ao=await Wo(Ua,ba.pathname,pa.signal);if(ao.type==="aborted")return{shortCircuited:!0};if(ao.type==="error"){if(ao.partialMatches.length===0){let{matches:Do,route:el}=getShortCircuitMatches(Rs.activeRoutes);return{matches:Do,pendingActionResult:[el.id,{type:"error",error:ao.error}]}}let No=findNearestBoundary(ao.partialMatches).route.id;return{matches:ao.partialMatches,pendingActionResult:[No,{type:"error",error:ao.error}]}}else if(ao.matches)Ua=ao.matches;else{let{notFoundMatches:No,error:Do,route:el}=Xo(ba.pathname);return{matches:No,pendingActionResult:[el.id,{type:"error",error:Do}]}}}let so,fo=getTargetMatch(Ua,ba);if(!fo.route.action&&!fo.route.lazy)so={type:"error",error:getInternalRouterError(405,{method:pa.method,pathname:ba.pathname,routeId:fo.route.id})};else{let ao=getTargetedDataStrategyMatches(Es,ws,pa,ba,Ua,fo,ro?[]:xs,Qa),No=await Vs(pa,ba,ao,Qa,null);if(so=No[fo.route.id],!so){for(let Do of Ua)if(No[Do.route.id]){so=No[Do.route.id];break}}if(pa.signal.aborted)return{shortCircuited:!0}}if(isRedirectResult(so)){let ao;return to&&to.replace!=null?ao=to.replace:ao=normalizeRedirectLocation(so.response.headers.get("Location"),new URL(pa.url),js,ds.history)===Ys.location.pathname+Ys.location.search,await Ro(pa,so,!0,{submission:Ca,replace:ao}),{shortCircuited:!0}}if(isErrorResult(so)){let ao=findNearestBoundary(Ua,fo.route.id);return(to&&to.replace)!==!0&&(Qs="PUSH"),{matches:Ua,pendingActionResult:[ao.route.id,so,fo.route.id]}}return{matches:Ua,pendingActionResult:[fo.route.id,so]}}async function uo(pa,ba,Ca,Ua,Ba,Qa,eo,ro,to,lo,so,fo,ao,No){let Do=eo||getLoadingNavigation(ba,Ca,Ua,ro),el=ro||to||getSubmissionFromNavigation(Do),Oo=!aa&&!so;
2if(Qa){if(Oo){let dl=Eo(ao);Ka({navigation:Do,...dl!==void 0?{actionData:dl}:{}},{flushSync:fo})}let xo=await Wo(Ca,ba.pathname,pa.signal);if(xo.type==="aborted")return{shortCircuited:!0};if(xo.type==="error"){if(xo.partialMatches.length===0){let{matches:gl,route:Al}=getShortCircuitMatches(Rs.activeRoutes);return{matches:gl,loaderData:{},errors:{[Al.id]:xo.error}}}let dl=findNearestBoundary(xo.partialMatches).route.id;return{matches:xo.partialMatches,loaderData:{},errors:{[dl]:xo.error}}}else if(xo.matches)Ca=xo.matches;else{let{error:dl,notFoundMatches:gl,route:Al}=Xo(ba.pathname);return{matches:gl,loaderData:{},errors:{[Al.id]:dl}}}}let To=Rs.activeRoutes,{dsMatches:pl,revalidatingFetchers:vl}=getMatchesToLoad(pa,Ba,Es,ws,ds.history,Ys,Ca,el,ba,so?[]:xs,so===!0,fa,ua,_a,sa,oa,To,js,ds.patchRoutesOnNavigation!=null,Rs.branches,ao,No);if(Ia=++ra,!ds.dataStrategy&&!pl.some(xo=>xo.shouldLoad)&&!pl.some(xo=>xo.route.middleware&&xo.route.middleware.length>0)&&vl.length===0){let xo=new Map(Ys.fetchers),dl=ka(xo);return mo(ba,{matches:Ca,loaderData:{},errors:ao&&isErrorResult(ao[1])?{[ao[0]]:ao[1].error}:null,...getActionDataForCommit(ao),...dl?{fetchers:xo}:{}},{flushSync:fo}),{shortCircuited:!0}}if(Oo){let xo={};if(!Qa){xo.navigation=Do;let dl=Eo(ao);dl!==void 0&&(xo.actionData=dl)}vl.length>0&&(xo.fetchers=Ao(vl)),Ka(xo,{flushSync:fo})}vl.forEach(xo=>{da(xo.key),xo.controller&&Ea.set(xo.key,xo.controller)});let Bc=()=>vl.forEach(xo=>da(xo.key));ca&&ca.signal.addEventListener("abort",Bc);let{loaderResults:hl,fetcherResults:Yo}=await la(pl,vl,pa,ba,Ba);if(pa.signal.aborted)return{shortCircuited:!0};ca&&ca.signal.removeEventListener("abort",Bc),vl.forEach(xo=>Ea.delete(xo.key));let Jo=findRedirect(hl);if(Jo)return await Ro(pa,Jo.result,!0,{replace:lo}),{shortCircuited:!0};if(Jo=findRedirect(Yo),Jo)return oa.add(Jo.key),await Ro(pa,Jo.result,!0,{replace:lo}),{shortCircuited:!0};let wl=new Map(Ys.fetchers),{loaderData:Pu,errors:dc}=processLoaderData(Ys,Ca,hl,ao,vl,Yo,wl);so&&Ys.errors&&(dc={...Ys.errors,...dc});let Lu=ka(wl),hu=Ha(Ia,wl),fc=Lu||hu||vl.length>0;return{matches:Ca,loaderData:Pu,errors:dc,...fc?{workingFetchers:wl}:{}}}function Eo(pa){if(pa&&!isErrorResult(pa[1]))return{[pa[0]]:pa[1].data};if(Ys.actionData)return Object.keys(Ys.actionData).length===0?null:Ys.actionData}function Ao(pa){let ba=new Map(Ys.fetchers);return pa.forEach(Ca=>{let Ua=ba.get(Ca.key),Ba=getLoadingFetcher(void 0,Ua?Ua.data:void 0);ba.set(Ca.key,Ba)}),ba}async function Zo(pa,ba,Ca,Ua){da(pa);let Ba=(Ua&&Ua.flushSync)===!0,Qa=Rs.activeRoutes,eo=normalizeTo(Ys.location,Ys.matches,js,Ca,ba,Ua?.relative),ro=matchRoutesImpl(Qa,eo,js,!1,Rs.branches),to=il(ro,Qa,eo);if(to.active&&to.matches&&(ro=to.matches),!ro){Hs(pa,ba,getInternalRouterError(404,{pathname:eo}),{flushSync:Ba});return}let{path:lo,submission:so,error:fo}=normalizeNavigateOptions(!0,eo,Ua);if(fo){Hs(pa,ba,fo,{flushSync:Ba});return}let ao=ds.getContext?await ds.getContext():new RouterContextProvider,No=(Ua&&Ua.preventScrollReset)===!0;if(so&&isMutationMethod(so.formMethod)){await sl(pa,ba,lo,ro,ao,to.active,Ba,No,so,Ua&&Ua.defaultShouldRevalidate);return}sa.set(pa,{routeId:ba,path:lo}),await Po(pa,ba,lo,ro,ao,to.active,Ba,No,so)}async function sl(pa,ba,Ca,Ua,Ba,Qa,eo,ro,to,lo){ga(),sa.delete(pa);let so=Ys.fetchers.get(pa);Na(pa,getSubmittingFetcher(to,so),{flushSync:eo});let fo=new AbortController,ao=createClientSideRequest(ds.history,Ca,fo.signal,to);if(Qa){let po=await Wo(Ua,new URL(ao.url).pathname,ao.signal,pa);if(po.type==="aborted")return;if(po.type==="error"){Hs(pa,ba,po.error,{flushSync:eo});return}else if(po.matches)Ua=po.matches;else{Hs(pa,ba,getInternalRouterError(404,{pathname:Ca}),{flushSync:eo});return}}let No=getTargetMatch(Ua,Ca);if(!No.route.action&&!No.route.lazy){let po=getInternalRouterError(405,{method:to.formMethod,pathname:Ca,routeId:ba});Hs(pa,ba,po,{flushSync:eo});return}Ea.set(pa,fo);let Do=ra,el=getTargetedDataStrategyMatches(Es,ws,ao,Ca,Ua,No,xs,Ba),Oo=await Vs(ao,Ca,el,Ba,pa),To=Oo[No.route.id];if(!To){for(let po of el)if(Oo[po.route.id]){To=Oo[po.route.id];break}}if(ao.signal.aborted){Ea.get(pa)===fo&&Ea.delete(pa);return}if(_a.has(pa)){if(isRedirectResult(To)||isErrorResult(To)){Na(pa,getDoneFetcher(void 0));return}}else{if(isRedirectResult(To))if(Ea.delete(pa),Ia>Do){Na(pa,getDoneFetcher(void 0));return}else return oa.add(pa),Na(pa,getLoadingFetcher(to)),Ro(ao,To,!1,{fetcherSubmission:to,preventScrollReset:ro});if(isErrorResult(To)){Hs(pa,ba,To.error);return}}let pl=Ys.navigation.location||Ys.location,vl=createClientSideRequest
2(ds.history,pl,fo.signal),Bc=Rs.activeRoutes,hl=Ys.navigation.state!=="idle"?matchRoutesImpl(Bc,Ys.navigation.location,js,!1,Rs.branches):Ys.matches;invariant(hl,"Didn't find any matches after fetcher action");let Yo=++ra;$a.set(pa,Yo);let{dsMatches:Jo,revalidatingFetchers:wl}=getMatchesToLoad(vl,Ba,Es,ws,ds.history,Ys,hl,to,pl,xs,!1,fa,ua,_a,sa,oa,Bc,js,ds.patchRoutesOnNavigation!=null,Rs.branches,[No.route.id,To],lo),Pu=getLoadingFetcher(to,To.data),dc=new Map(Ys.fetchers);dc.set(pa,Pu),wl.filter(po=>po.key!==pa).forEach(po=>{let pc=po.key,jd=dc.get(pc),hf=getLoadingFetcher(void 0,jd?jd.data:void 0);dc.set(pc,hf),da(pc),po.controller&&Ea.set(pc,po.controller)}),Ka({fetchers:dc});let Lu=()=>wl.forEach(po=>da(po.key));fo.signal.addEventListener("abort",Lu);let{loaderResults:hu,fetcherResults:fc}=await la(Jo,wl,vl,pl,Ba);if(fo.signal.aborted)return;fo.signal.removeEventListener("abort",Lu),$a.delete(pa),Ea.delete(pa),wl.forEach(po=>Ea.delete(po.key));let xo=Ys.fetchers.has(pa),dl=po=>{if(!xo)return po;let pc=new Map(po.fetchers);return pc.set(pa,getDoneFetcher(To.data)),{...po,fetchers:pc}},gl=findRedirect(hu);if(gl)return Ys=dl(Ys),Ro(vl,gl.result,!1,{preventScrollReset:ro});if(gl=findRedirect(fc),gl)return oa.add(gl.key),Ys=dl(Ys),Ro(vl,gl.result,!1,{preventScrollReset:ro});let Al=new Map(Ys.fetchers);xo&&Al.set(pa,getDoneFetcher(To.data));let{loaderData:zc,errors:mc}=processLoaderData(Ys,hl,hu,void 0,wl,fc,Al);Ha(Yo,Al),Ys.navigation.state==="loading"&&Yo>Ia?(invariant(Qs,"Expected pending action"),ca&&ca.abort(),mo(Ys.navigation.location,{matches:hl,loaderData:zc,errors:mc,fetchers:Al})):(Ka({errors:mc,loaderData:mergeLoaderData(Ys.loaderData,zc,hl,mc),fetchers:Al}),fa=!1)}async function Po(pa,ba,Ca,Ua,Ba,Qa,eo,ro,to){let lo=Ys.fetchers.get(pa);Na(pa,getLoadingFetcher(to,lo?lo.data:void 0),{flushSync:eo});let so=new AbortController,fo=createClientSideRequest(ds.history,Ca,so.signal);if(Qa){let To=await Wo(Ua,new URL(fo.url).pathname,fo.signal,pa);if(To.type==="aborted")return;if(To.type==="error"){Hs(pa,ba,To.error,{flushSync:eo});return}else if(To.matches)Ua=To.matches;else{Hs(pa,ba,getInternalRouterError(404,{pathname:Ca}),{flushSync:eo});return}}let ao=getTargetMatch(Ua,Ca);Ea.set(pa,so);let No=ra,Do=getTargetedDataStrategyMatches(Es,ws,fo,Ca,Ua,ao,xs,Ba),el=await Vs(fo,Ca,Do,Ba,pa),Oo=el[ao.route.id];if(!Oo){for(let To of Ua)if(el[To.route.id]){Oo=el[To.route.id];break}}if(Ea.get(pa)===so&&Ea.delete(pa),!fo.signal.aborted){if(_a.has(pa)){Na(pa,getDoneFetcher(void 0));return}if(isRedirectResult(Oo))if(Ia>No){Na(pa,getDoneFetcher(void 0));return}else{oa.add(pa),await Ro(fo,Oo,!1,{preventScrollReset:ro});return}if(isErrorResult(Oo)){Hs(pa,ba,Oo.error);return}Na(pa,getDoneFetcher(Oo.data))}}async function Ro(pa,ba,Ca,{submission:Ua,fetcherSubmission:Ba,preventScrollReset:Qa,replace:eo}={}){Ca||(ai?.resolve(),ai=null),ba.response.headers.has("X-Remix-Revalidate")&&(fa=!0);let ro=ba.response.headers.get("Location");invariant(ro,"Expected a Location header on the redirect Response");let to=ro,lo=new URL(pa.url);ro=normalizeRedirectLocation(ro,lo,js,ds.history),validateNavigationTarget(to,ro,lo,"allow-explicit");let so=createLocation(Ys.location,ro,{_isRedirect:!0});if(ms){let Oo=!1;if(ba.response.headers.has("X-Remix-Reload-Document"))Oo=!0;else if(isAbsoluteUrl(ro)){const To=createBrowserURLImpl(dn,ro,!0);Oo=To.origin!==dn.location.origin||stripBasename(To.pathname,js)==null}if(Oo){eo?dn.location.replace(ro):dn.location.assign(ro);return}}ca=null;let fo=eo===!0||ba.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ao,formAction:No,formEncType:Do}=Ys.navigation;!Ua&&!Ba&&ao&&No&&Do&&(Ua=getSubmissionFromNavigation(Ys.navigation));let el=Ua||Ba;if(redirectPreserveMethodStatusCodes.has(ba.response.status)&&el&&isMutationMethod(el.formMethod))await oo(fo,so,{submission:{...el,formAction:ro},preventScrollReset:Qa||ia,enableViewTransition:Ca?ha:void 0});else{let Oo=getLoadingNavigation(so,[],fo,Ua);await oo(fo,so,{overrideNavigation:Oo,fetcherSubmission:Ba,preventScrollReset:Qa||ia,enableViewTransition:Ca?ha:void 0})}}async function Vs(pa,ba,Ca,Ua,Ba){let Qa,eo={};try{Qa=await callDataStrategyImpl(Cs,pa,ba,Ca,Ba,Ua,!1)}catch(ro){return Ca.filter(to=>
2to.shouldLoad).forEach(to=>{eo[to.route.id]={type:"error",error:ro}}),eo}if(pa.signal.aborted)return eo;if(!isMutationMethod(pa.method))for(let ro of Ca){if(Qa[ro.route.id]?.type==="error")break;!Qa.hasOwnProperty(ro.route.id)&&!Ys.loaderData.hasOwnProperty(ro.route.id)&&(!Ys.errors||!Ys.errors.hasOwnProperty(ro.route.id))&&ro.shouldCallHandler()&&(Qa[ro.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ro.route.id}`)})}for(let[ro,to]of Object.entries(Qa))if(isRedirectDataStrategyResult(to)){let lo=to.result;eo[ro]={type:"redirect",response:normalizeRelativeRoutingRedirectResponse(lo,pa,ro,Ca,js)}}else eo[ro]=await convertDataStrategyResultToDataResult(to);return eo}async function la(pa,ba,Ca,Ua,Ba){let Qa=Vs(Ca,Ua,pa,Ba,null),eo=Promise.all(ba.map(async lo=>{if(lo.matches&&lo.match&&lo.request&&lo.controller){let fo=(await Vs(lo.request,lo.path,lo.matches,Ba,lo.key))[lo.match.route.id];return{[lo.key]:fo}}else return Promise.resolve({[lo.key]:{type:"error",error:getInternalRouterError(404,{pathname:lo.path})}})})),ro=await Qa,to=(await eo).reduce((lo,so)=>Object.assign(lo,so),{});return{loaderResults:ro,fetcherResults:to}}function ga(){fa=!0,sa.forEach((pa,ba)=>{Ea.has(ba)&&ua.add(ba),da(ba)})}function Na(pa,ba,Ca={}){let Ua=new Map(Ys.fetchers);Ua.set(pa,ba),Ka({fetchers:Ua},{flushSync:(Ca&&Ca.flushSync)===!0})}function Hs(pa,ba,Ca,Ua={}){let Ba=findNearestBoundary(Ys.matches,ba),Qa=new Map(Ys.fetchers);Xs(Qa,pa),Ka({errors:{[Ba.route.id]:Ca},fetchers:Qa},{flushSync:(Ua&&Ua.flushSync)===!0})}function zs(pa){return Ra.set(pa,(Ra.get(pa)||0)+1),_a.has(pa)&&_a.delete(pa),Ys.fetchers.get(pa)||IDLE_FETCHER}function qs(pa,ba){da(pa,ba?.reason),Na(pa,getDoneFetcher(null))}function Xs(pa,ba){let Ca=Ys.fetchers.get(ba);Ea.has(ba)&&!(Ca&&Ca.state==="loading"&&$a.has(ba))&&da(ba),sa.delete(ba),$a.delete(ba),oa.delete(ba),_a.delete(ba),ua.delete(ba),pa.delete(ba)}function na(pa){let ba=(Ra.get(pa)||0)-1;ba<=0?(Ra.delete(pa),_a.add(pa)):Ra.set(pa,ba),Ka({fetchers:new Map(Ys.fetchers)})}function da(pa,ba){let Ca=Ea.get(pa);Ca&&(Ca.abort(ba),Ea.delete(pa))}function xa(pa,ba){for(let Ca of pa){let Ua=ba.get(Ca);invariant(Ua,`Expected fetcher: ${Ca}`);let Ba=getDoneFetcher(Ua.data);ba.set(Ca,Ba)}}function ka(pa){let ba=[],Ca=!1;for(let Ua of oa){let Ba=pa.get(Ua);invariant(Ba,`Expected fetcher: ${Ua}`),Ba.state==="loading"&&(oa.delete(Ua),ba.push(Ua),Ca=!0)}return xa(ba,pa),Ca}function Ha(pa,ba){let Ca=[];for(let[Ua,Ba]of $a)if(Ba<pa){let Qa=ba.get(Ua);invariant(Qa,`Expected fetcher: ${Ua}`),Qa.state==="loading"&&(da(Ua),$a.delete(Ua),Ca.push(Ua))}return xa(Ca,ba),Ca.length>0}function La(pa,ba){let Ca=Ys.blockers.get(pa)||IDLE_BLOCKER;return Oa.get(pa)!==ba&&Oa.set(pa,ba),Ca}function Wa(pa){Ys.blockers.delete(pa),Oa.delete(pa)}function Ja(pa,ba){let Ca=Ys.blockers.get(pa)||IDLE_BLOCKER;invariant(Ca.state==="unblocked"&&ba.state==="blocked"||Ca.state==="blocked"&&ba.state==="blocked"||Ca.state==="blocked"&&ba.state==="proceeding"||Ca.state==="blocked"&&ba.state==="unblocked"||Ca.state==="proceeding"&&ba.state==="unblocked",`Invalid blocker state transition: ${Ca.state} -> ${ba.state}`);let Ua=new Map(Ys.blockers);Ua.set(pa,ba),Ka({blockers:Ua})}function Za({currentLocation:pa,nextLocation:ba,historyAction:Ca}){if(Oa.size===0)return;Oa.size>1&&warning(!1,"A router only supports one blocker at a time");let Ua=Array.from(Oa.entries()),[Ba,Qa]=Ua[Ua.length-1],eo=Ys.blockers.get(Ba);if(!(eo&&eo.state==="proceeding")&&Qa({currentLocation:pa,nextLocation:ba,historyAction:Ca}))return Ba}function Xo(pa){let ba=getInternalRouterError(404,{pathname:pa}),Ca=Rs.activeRoutes,{matches:Ua,route:Ba}=getShortCircuitMatches(Ca);return{notFoundMatches:Ua,route:Ba,error:ba}}function El(pa,ba,Ca){if(Ds=pa,Ls=ba,Ps=Ca||null,!Bs&&Ys.navigation===IDLE_NAVIGATION){Bs=!0;let Ua=ml(Ys.location,Ys.matches);Ua!=null&&Ka({restoreScrollPosition:Ua})}return()=>{Ds=null,Ls=null,Ps=null}}function Dl(pa,ba){return Ps&&Ps(pa,ba.map(Ua=>convertRouteMatchToUiMatch(Ua,Ys.loaderData)))||pa.key}function _l(pa,ba){if(Ds&&Ls){let Ca=Dl(pa,ba);Ds[Ca]=Ls()}}function ml(pa,ba){if(Ds){let Ca=Dl(pa,ba),Ua=Ds[Ca];if(typeof Ua=="number")return Ua}return null}function il(pa,ba,Ca){if(ds.patchRoutesOnNavigation){let Ua=Rs.branches;if(pa){if(Object.keys(pa[0].params).length>0)return{active:!0,matches:matchRoutesImpl(ba,Ca,js,!0,Ua)}}else return{active:!0,matches:matchRoutesImpl(ba,Ca,js,!0,Ua)||[]}}return{active:!1,matches:null}}async function Wo(pa,ba,Ca,Ua){if(!ds.patchRoutesOnNavigation)return{type:"success",matches:pa};let Ba=pa;for(;;){let Qa=ws;try{await ds.patchRoutesOnNavigation({signal:Ca,path:ba,matches:Ba,fetcherKey:Ua,patch:(lo,so)=>{Ca.aborted||patchRoutesImpl(lo,so,Rs,Qa,Es,!1)}})}catch(lo){return{type:"error",error:lo,partialMatches:Ba}}if(Ca.aborted)return{type:"aborted"};let eo=Rs.branches,ro=matchRoutesImpl(Rs.activeRoutes,ba,js,!1,eo),to=null;if(ro){if(Object.keys(ro[0].params).length===0)return{type:"success",matches:ro};if(to=matchRoutesImpl(Rs.activeRoutes,ba,js,!0,eo),!(to&&Ba.length<to.length&&Lo(Ba,to.slice(0,Ba.length))))return{type:"success",matches:ro}}if(to||(to=matchRoutesImpl(Rs.activeRoutes,ba,js,!0,eo)),!to||Lo(Ba,to))return{type:"success",matches:null};Ba=to}}function Lo(pa,ba){return pa.length===ba.length&&pa.every((Ca,Ua)=>Ca.route.id===ba[Ua].route.id)}function Go(pa){ws={},Rs.setHmrRoutes(convertRoutesToDataRoutes(pa,Es,void 0,ws))}function $l(pa,ba,Ca=!1){patchRoutesImpl(pa,ba,Rs,ws,Es,Ca),Rs.hasHMRRoutes||Ka({})}return Zs={get basename(){return js},get future(){return As},get state(){return Ys},get routes(){return Rs.stableRoutes},get branches(){return Rs.branches},get manifest(){return ws},get window(){return dn},initialize:qa,subscribe:Fa,enableScrollRestoration:El,navigate:ko,fetch:Zo,revalidate:bo,createHref:pa=>ds.history.createHref(pa),createURL:pa=>ds.history.createURL(pa),encodeLocation:pa=>ds.history.encodeLocation(pa),getFetcher:zs,resetFetcher:qs,deleteFetcher:na,dispose:Ma,getBlocker:La,deleteBlocker:Wa,patchRoutes:$l,_internalFetchControllers:Ea,_internalSetRoutes:Go,_internalSetStateDoNotUseOrYouWillBreakYourApp(pa){Ka(pa)}},ds.instrumentations&&(Zs=instrumentClientSideRouter(Zs,ds.instrumentations.map(pa=>
2pa.router).filter(Boolean))),Zs}function isSubmissionNavigation(ds){return ds!=null&&("formData"in ds&&ds.formData!=null||"body"in ds&&ds.body!==void 0)}function normalizeTo(ds,dn,ms,xs,bs,Es){let ws,Rs;if(bs){ws=[];for(let Cs of dn)if(ws.push(Cs),Cs.route.id===bs){Rs=Cs;break}}else ws=dn,Rs=dn[dn.length-1];let js=resolveTo(xs||".",getResolveToMatches(ws),stripBasename(ds.pathname,ms)||ds.pathname,Es==="path");if(xs==null&&(js.search=ds.search,js.hash=ds.hash),(xs==null||xs===""||xs===".")&&Rs){let Cs=hasNakedIndexQuery(js.search);if(Rs.route.index&&!Cs)js.search=js.search?js.search.replace(/^\?/,"?index&"):"?index";else if(!Rs.route.index&&Cs){let As=new URLSearchParams(js.search),ks=As.getAll("index");As.delete("index"),ks.filter(Ms=>Ms).forEach(Ms=>As.append("index",Ms));let Os=As.toString();js.search=Os?`?${Os}`:""}}return ms!=="/"&&(js.pathname=prependBasename({basename:ms,pathname:js.pathname})),createPath(js)}function normalizeNavigateOptions(ds,dn,ms){if(!ms||!isSubmissionNavigation(ms))return{path:dn};if(ms.formMethod&&!isValidMethod(ms.formMethod))return{path:dn,error:getInternalRouterError(405,{method:ms.formMethod})};let xs=()=>({path:dn,error:getInternalRouterError(400,{type:"invalid-body"})}),Es=(ms.formMethod||"get").toUpperCase(),ws=stripHashFromPath(dn);if(ms.body!==void 0){if(ms.formEncType==="text/plain"){if(!isMutationMethod(Es))return xs();let ks=typeof ms.body=="string"?ms.body:ms.body instanceof FormData||ms.body instanceof URLSearchParams?Array.from(ms.body.entries()).reduce((Os,[Ms,Ds])=>`${Os}${Ms}=${Ds}
3`,""):String(ms.body);return{path:dn,submission:{formMethod:Es,formAction:ws,formEncType:ms.formEncType,formData:void 0,json:void 0,text:ks}}}else if(ms.formEncType==="application/json"){if(!isMutationMethod(Es))return xs();try{let ks=typeof ms.body=="string"?JSON.parse(ms.body):ms.body;return{path:dn,submission:{formMethod:Es,formAction:ws,formEncType:ms.formEncType,formData:void 0,json:ks,text:void 0}}}catch{return xs()}}}invariant(typeof FormData=="function","FormData is not available in this environment");let Rs,js;if(ms.formData)Rs=convertFormDataToSearchParams(ms.formData),js=ms.formData;else if(ms.body instanceof FormData)Rs=convertFormDataToSearchParams(ms.body),js=ms.body;else if(ms.body instanceof URLSearchParams)Rs=ms.body,js=convertSearchParamsToFormData(Rs);else if(ms.body==null)Rs=new URLSearchParams,js=new FormData;else try{Rs=new URLSearchParams(ms.body),js=convertSearchParamsToFormData(Rs)}catch{return xs()}let Cs={formMethod:Es,formAction:ws,formEncType:ms&&ms.formEncType||"application/x-www-form-urlencoded",formData:js,json:void 0,text:void 0};if(isMutationMethod(Cs.formMethod))return{path:dn,submission:Cs};let As=parsePath(dn);return ds&&As.search&&hasNakedIndexQuery(As.search)&&Rs.append("index",""),As.search=`?${Rs}`,{path:createPath(As),submission:Cs}}function getMatchesToLoad(ds,dn,ms,xs,bs,Es,ws,Rs,js,Cs,As,ks,Os,Ms,Ds,Ps,Ls,Bs,Fs,Us,Gs,Js){let Ws=Gs?isErrorResult(Gs[1])?Gs[1].error:Gs[1].data:void 0,Zs=bs.createURL(Es.location),Ys=bs.createURL(js),Qs;if(As&&Es.errors){let aa=Object.keys(Es.errors)[0];Qs=ws.findIndex(fa=>fa.route.id===aa)}else if(Gs&&isErrorResult(Gs[1])){let aa=Gs[0];Qs=ws.findIndex(fa=>fa.route.id===aa)-1}let ai=Gs?Gs[1].statusCode:void 0,ia=ai&&ai>=400,ca={currentUrl:Zs,currentParams:Es.matches[0]?.params||{},nextUrl:Ys,nextParams:ws[0].params,...Rs,actionResult:Ws,actionStatus:ai},ha=getRoutePattern(ws),ea=ws.map((aa,fa)=>{let{route:ua}=aa,Ea=null;if(Qs!=null&&fa>Qs)Ea=!1;else if(ua.lazy)Ea=!0;else if(!routeHasLoaderOrMiddleware(ua))Ea=!1;else if(As){let{shouldLoad:oa}=getRouteHydrationStatus(ua,Es.loaderData,Es.errors);Ea=oa}else isNewLoader(Es.loaderData,Es.matches[fa],aa)&&(Ea=!0);if(Ea!==null)return getDataStrategyMatch(ms,xs,ds,js,ha,aa,Cs,dn,Ea);let ra=!1;typeof Js=="boolean"?ra=Js:ia?ra=!1:(ks||Zs.pathname+Zs.search===Ys.pathname+Ys.search||Zs.search!==Ys.search||isNewRouteInstance(Es.matches[fa],aa))&&(ra=!0);let Ia={...ca,defaultShouldRevalidate:ra},$a=shouldRevalidateLoader(aa,Ia);return getDataStrategyMatch(ms,xs,ds,js,ha,aa,Cs,dn,$a,Ia,Js)}),ta=[];return Ds.forEach((aa,fa)=>{if(As||!ws.some(Ra=>Ra.route.id===aa.routeId)||Ms.has(fa))return;let ua=Es.fetchers.get(fa),Ea=ua&&ua.state!=="idle"&&ua.data===void 0,ra=matchRoutesImpl(Ls,aa.path,Bs??"/",!1,Us);if(!ra){if(Fs&&Ea)return;ta.push({key:fa,routeId:aa.routeId,path:aa.path,matches:null,match:null,request:null,controller:null});return}if(Ps.has(fa))return;let Ia=getTargetMatch(ra,aa.path),$a=new AbortController,oa=createClientSideRequest
3(bs,aa.path,$a.signal),sa=null;if(Os.has(fa))Os.delete(fa),sa=getTargetedDataStrategyMatches(ms,xs,oa,aa.path,ra,Ia,Cs,dn);else if(Ea)ks&&(sa=getTargetedDataStrategyMatches(ms,xs,oa,aa.path,ra,Ia,Cs,dn));else{let Ra;typeof Js=="boolean"?Ra=Js:ia?Ra=!1:Ra=ks;let _a={...ca,defaultShouldRevalidate:Ra};shouldRevalidateLoader(Ia,_a)&&(sa=getTargetedDataStrategyMatches(ms,xs,oa,aa.path,ra,Ia,Cs,dn,_a))}sa&&ta.push({key:fa,routeId:aa.routeId,path:aa.path,matches:sa,match:Ia,request:oa,controller:$a})}),{dsMatches:ea,revalidatingFetchers:ta}}function routeHasLoaderOrMiddleware(ds){return ds.loader!=null||ds.middleware!=null&&ds.middleware.length>0}function getRouteHydrationStatus(ds,dn,ms){if(ds.lazy)return{shouldLoad:!0,renderFallback:!0};if(!routeHasLoaderOrMiddleware(ds))return{shouldLoad:!1,renderFallback:!1};let xs=dn!=null&&ds.id in dn,bs=ms!=null&&ms[ds.id]!==void 0;if(!xs&&bs)return{shouldLoad:!1,renderFallback:!1};if(typeof ds.loader=="function"&&ds.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!xs};let Es=!xs&&!bs;return{shouldLoad:Es,renderFallback:Es}}function isNewLoader(ds,dn,ms){let xs=!dn||ms.route.id!==dn.route.id,bs=!ds.hasOwnProperty(ms.route.id);return xs||bs}function isNewRouteInstance(ds,dn){let ms=ds.route.path;return ds.pathname!==dn.pathname||ms!=null&&ms.endsWith("*")&&ds.params["*"]!==dn.params["*"]}function shouldRevalidateLoader(ds,dn){if(ds.route.shouldRevalidate){let ms=ds.route.shouldRevalidate(dn);if(typeof ms=="boolean")return ms}return dn.defaultShouldRevalidate}function patchRoutesImpl(ds,dn,ms,xs,bs,Es){let ws;if(ds){let Cs=xs[ds];invariant(Cs,`No route found to patch children into: routeId = ${ds}`),Cs.children||(Cs.children=[]),ws=Cs.children}else ws=ms.activeRoutes;let Rs=[],js=[];if(dn.forEach(Cs=>{let As=ws.find(ks=>isSameRoute(Cs,ks));As?js.push({existingRoute:As,newRoute:Cs}):Rs.push(Cs)}),Rs.length>0){let Cs=convertRoutesToDataRoutes(Rs,bs,[ds||"_","patch",String(ws?.length||"0")],xs);ws.push(...Cs)}if(Es&&js.length>0)for(let Cs=0;Cs<js.length;Cs++){let{existingRoute:As,newRoute:ks}=js[Cs],Os=As,[Ms]=convertRoutesToDataRoutes([ks],bs,[],{},!0);Object.assign(Os,{element:Ms.element?Ms.element:Os.element,errorElement:Ms.errorElement?Ms.errorElement:Os.errorElement,hydrateFallbackElement:Ms.hydrateFallbackElement?Ms.hydrateFallbackElement:Os.hydrateFallbackElement})}ms.hasHMRRoutes||ms.setRoutes([...ms.activeRoutes])}function isSameRoute(ds,dn){return"id"in ds&&"id"in dn&&ds.id===dn.id?!0:ds.index===dn.index&&ds.path===dn.path&&ds.caseSensitive===dn.caseSensitive?(!ds.children||ds.children.length===0)&&(!dn.children||dn.children.length===0)?!0:ds.children?.every((ms,xs)=>dn.children?.some(bs=>isSameRoute(ms,bs)))??!1:!1}var lazyRoutePropertyCache=new WeakMap,loadLazyRouteProperty=({key:ds,route:dn,manifest:ms,mapRouteProperties:xs})=>{let bs=ms[dn.id];if(invariant(bs,"No route found in manifest"),!bs.lazy||typeof bs.lazy!="object")return;let Es=bs.lazy[ds];if(!Es)return;let ws=lazyRoutePropertyCache.get(bs);ws||(ws={},lazyRoutePropertyCache.set(bs,ws));let Rs=ws[ds];if(Rs)return Rs;let js=(async()=>{let Cs=isUnsupportedLazyRouteObjectKey(ds),ks=bs[ds]!==void 0&&ds!=="hasErrorBoundary";if(Cs)warning(!Cs,"Route property "+ds+" is not a supported lazy route property. This property will be ignored."),ws[ds]=Promise.resolve();else if(ks)warning(!1,`Route "${bs.id}" has a static property "${ds}" defined. The lazy property will be ignored.`);else{let Os=await Es();Os!=null&&(Object.assign(bs,{[ds]:Os}),Object.assign(bs,xs(bs)))}typeof bs.lazy=="object"&&(bs.lazy[ds]=void 0,Object.values(bs.lazy).every(Os=>Os===void 0)&&(bs.lazy=void 0))})();return ws[ds]=js,js},lazyRouteFunctionCache=new WeakMap;function loadLazyRoute(ds,dn,ms,xs,bs){let Es=ms[ds.id];if(invariant(Es,"No route found in manifest"),!ds.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof ds.lazy=="function"){let As=lazyRouteFunctionCache.get(Es);if(As)return{lazyRoutePromise:As,lazyHandlerPromise:As};let ks=(async()=>{invariant(typeof ds.lazy=="function","No lazy route function found");let Os=await ds.lazy(),Ms={};for(let Ds in Os){let Ps=Os[Ds];if(Ps===void 0)continue;let Ls=isUnsupportedLazyRouteFunctionKey(Ds),Fs=Es[Ds]!==void 0&&Ds!=="hasErrorBoundary";Ls?warning(!Ls,"Route property "+Ds+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Fs?warning(!Fs,`Route "${Es.id}" has a static property "${Ds}" defined but its lazy function is also returning a value for this property. The lazy route property "${Ds}" will be ignored.`):Ms[Ds]=Ps}Object.assign(Es,Ms),Object.assign(Es,{...xs(Es),lazy:void 0})})();return lazyRouteFunctionCache.set(Es,ks),ks.catch(()=>{}),{lazyRoutePromise:ks,lazyHandlerPromise:ks}}let ws=Object.keys(ds.lazy),Rs=[],js;for(let As of ws){if(bs&&bs.includes(As))continue;let ks=loadLazyRouteProperty({key:As,route:ds,manifest:ms,mapRouteProperties:xs});ks&&(Rs.push(ks),As===dn&&(js=ks))}let Cs=Rs.length>0?Promise.all(Rs).then(()=>{}):void 0;return Cs?.catch(()=>{}),js?.catch(()=>{}),{lazyRoutePromise:Cs,lazyHandlerPromise:js}}async function defaultDataStrategy(ds){let dn=ds.matches.filter(bs=>bs.shouldLoad),ms={};return(await Promise.all(dn.map(bs=>
3bs.resolve()))).forEach((bs,Es)=>{ms[dn[Es].route.id]=bs}),ms}async function defaultDataStrategyWithMiddleware(ds){return ds.matches.some(dn=>dn.route.middleware)?runClientMiddlewarePipeline(ds,()=>defaultDataStrategy(ds)):defaultDataStrategy(ds)}function runClientMiddlewarePipeline(ds,dn){return runMiddlewarePipeline(ds,dn,xs=>{if(isRedirectResponse(xs))throw xs;return xs},isDataStrategyResults,ms);function ms(xs,bs,Es){if(Es)return Promise.resolve(Object.assign(Es.value,{[bs]:{type:"error",result:xs}}));{let{matches:ws}=ds,Rs=Math.min(Math.max(ws.findIndex(Cs=>Cs.route.id===bs),0),Math.max(ws.findIndex(Cs=>Cs.shouldCallHandler()),0)),js=findNearestBoundary(ws,ws[Rs].route.id).route.id;return Promise.resolve({[js]:{type:"error",result:xs}})}}}async function runMiddlewarePipeline(ds,dn,ms,xs,bs){let{matches:Es,...ws}=ds,Rs=Es.flatMap(Cs=>Cs.route.middleware?Cs.route.middleware.map(As=>[Cs.route.id,As]):[]);return await callRouteMiddleware(ws,Rs,dn,ms,xs,bs)}async function callRouteMiddleware(ds,dn,ms,xs,bs,Es,ws=0){let{request:Rs}=ds;if(Rs.signal.aborted)throw Rs.signal.reason??new Error(`Request aborted: ${Rs.method} ${Rs.url}`);let js=dn[ws];if(!js)return await ms();let[Cs,As]=js,ks,Os=async()=>{if(ks)throw new Error("You may only call `next()` once per middleware");try{return ks={value:await callRouteMiddleware(ds,dn,ms,xs,bs,Es,ws+1)},ks.value}catch(Ms){return ks={value:await Es(Ms,Cs,ks)},ks.value}};try{let Ms=await As(ds,Os),Ds=Ms!=null?xs(Ms):void 0;return bs(Ds)?Ds:ks?Ds??ks.value:(ks={value:await Os()},ks.value)}catch(Ms){return await Es(Ms,Cs,ks)}}function getDataStrategyMatchLazyPromises(ds,dn,ms,xs,bs){let Es=loadLazyRouteProperty({key:"middleware",route:xs.route,manifest:dn,mapRouteProperties:ds}),ws=loadLazyRoute(xs.route,isMutationMethod(ms.method)?"action":"loader",dn,ds,bs);return{middleware:Es,route:ws.lazyRoutePromise,handler:ws.lazyHandlerPromise}}function getDataStrategyMatch(ds,dn,ms,xs,bs,Es,ws,Rs,js,Cs=null,As){let ks=!1,Os=getDataStrategyMatchLazyPromises(ds,dn,ms,Es,ws);return{...Es,_lazyPromises:Os,shouldLoad:js,shouldRevalidateArgs:Cs,shouldCallHandler(Ms){return ks=!0,Cs?typeof As=="boolean"?shouldRevalidateLoader(Es,{...Cs,defaultShouldRevalidate:As}):typeof Ms=="boolean"?shouldRevalidateLoader(Es,{...Cs,defaultShouldRevalidate:Ms}):shouldRevalidateLoader(Es,Cs):js},resolve(Ms){let{lazy:Ds,loader:Ps,middleware:Ls}=Es.route,Bs=ks||js||Ms&&!isMutationMethod(ms.method)&&(Ds||Ps),Fs=Ls&&Ls.length>0&&!Ps&&!Ds;return Bs&&(isMutationMethod(ms.method)||!Fs)?callLoaderOrAction({request:ms,path:xs,pattern:bs,match:Es,lazyHandlerPromise:Os?.handler,lazyRoutePromise:Os?.route,handlerOverride:Ms,scopedContext:Rs}):Promise.resolve({type:"data",result:void 0})}}}function getTargetedDataStrategyMatches(ds,dn,ms,xs,bs,Es,ws,Rs,js=null){return bs.map(Cs=>Cs.route.id!==Es.route.id?{...Cs,shouldLoad:!1,shouldRevalidateArgs:js,shouldCallHandler:()=>!1,_lazyPromises:getDataStrategyMatchLazyPromises(ds,dn,ms,Cs,ws),resolve:()=>Promise.resolve({type:"data",result:void 0})}:getDataStrategyMatch(ds,dn,ms,xs,getRoutePattern(bs),Cs,ws,Rs,!0,js))}async function callDataStrategyImpl(ds,dn,ms,xs,bs,Es,ws){xs.some(As=>As._lazyPromises?.middleware)&&await Promise.all(xs.map(As=>As._lazyPromises?.middleware));let Rs={request:dn,url:createDataFunctionUrl(dn,ms),pattern:getRoutePattern(xs),params:xs[0].params,context:Es,matches:xs},Cs=await ds({...Rs,fetcherKey:bs,runClientMiddleware:As=>{let ks=Rs;return runClientMiddlewarePipeline(ks,()=>As({...ks,fetcherKey:bs,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(xs.flatMap(As=>[As._lazyPromises?.handler,As._lazyPromises?.route]))}catch{}return Cs}async function callLoaderOrAction({request:ds,path:dn,pattern:ms,match:xs,lazyHandlerPromise:bs,lazyRoutePromise:Es,handlerOverride:ws,scopedContext:Rs}){let js,Cs,As=isMutationMethod(ds.method),ks=As?"action":"loader",Os=Ms=>{let Ds,Ps=new Promise((Fs,Us)=>Ds=Us);Cs=()=>Ds(),ds.signal.addEventListener("abort",Cs);let Ls=Fs=>typeof Ms!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${ks}" [routeId: ${xs.route.id}]`)):Ms({request:ds,url:createDataFunctionUrl(ds,dn),pattern:ms,params:xs.params,context:Rs},...Fs!==void 0?[Fs]:[]),Bs=(async()=>{try{return{type:"data",result:await(ws?ws(Us=>Ls(Us)):Ls())}}catch(Fs){return{type:"error",result:Fs}}})();return Promise.race([Bs,Ps])};try{let Ms=As?xs.route.action:xs.route.loader;if(bs||Es)if(Ms){let Ds,[Ps]=await Promise.all([Os(Ms).catch(Ls=>{Ds=Ls}),bs,Es]);if(Ds!==void 0)throw Ds;js=Ps}else{await bs;let Ds=As?xs.route.action:xs.route.loader;if(Ds)[js]=await Promise.all([Os(Ds),Es]);else if(ks==="action"){let Ps=new URL(ds.url),Ls=Ps.pathname+Ps.search;throw getInternalRouterError(405,{method:ds.method,pathname:Ls,routeId:xs.route.id})}else return{type:"data",result:void 0}}
3else if(Ms)js=await Os(Ms);else{let Ds=new URL(ds.url),Ps=Ds.pathname+Ds.search;throw getInternalRouterError(404,{pathname:Ps})}}catch(Ms){return{type:"error",result:Ms}}finally{Cs&&ds.signal.removeEventListener("abort",Cs)}return js}async function parseResponseBody(ds){let dn=ds.headers.get("Content-Type");return dn&&/\bapplication\/json\b/.test(dn)?ds.body==null?null:ds.json():ds.text()}async function convertDataStrategyResultToDataResult(ds){let{result:dn,type:ms}=ds;if(isResponse$1(dn)){let xs;try{xs=await parseResponseBody(dn)}catch(bs){return{type:"error",error:bs}}return ms==="error"?{type:"error",error:new ErrorResponseImpl(dn.status,dn.statusText,xs),statusCode:dn.status,headers:dn.headers}:{type:"data",data:xs,statusCode:dn.status,headers:dn.headers}}return ms==="error"?isDataWithResponseInit(dn)?dn.data instanceof Error?{type:"error",error:dn.data,statusCode:dn.init?.status,headers:dn.init?.headers?new Headers(dn.init.headers):void 0}:{type:"error",error:dataWithResponseInitToErrorResponse(dn),statusCode:isRouteErrorResponse(dn)?dn.status:void 0,headers:dn.init?.headers?new Headers(dn.init.headers):void 0}:{type:"error",error:dn,statusCode:isRouteErrorResponse(dn)?dn.status:void 0}:isDataWithResponseInit(dn)?{type:"data",data:dn.data,statusCode:dn.init?.status,headers:dn.init?.headers?new Headers(dn.init.headers):void 0}:{type:"data",data:dn}}function normalizeRelativeRoutingRedirectResponse(ds,dn,ms,xs,bs){let Es=ds.headers.get("Location");if(invariant(Es,"Redirects returned/thrown from loaders/actions must have a Location header"),!isAbsoluteUrl(Es)){let ws=xs.slice(0,xs.findIndex(Rs=>Rs.route.id===ms)+1);Es=normalizeTo(new URL(dn.url),ws,bs,Es),ds.headers.set("Location",Es)}return ds}var invalidProtocols=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function hasInvalidProtocol(ds){try{return invalidProtocols.includes(new URL(ds).protocol)}catch{return!1}}function normalizeRedirectLocation(ds,dn,ms,xs){if(isAbsoluteUrl(ds)){let bs=ds,Es=PROTOCOL_RELATIVE_URL_REGEX.test(bs)?new URL(normalizeProtocolRelativeUrl(bs,dn.protocol)):new URL(bs);if(hasInvalidProtocol(Es.toString()))throw new Error("Invalid redirect location");let ws=stripBasename(Es.pathname,ms)!=null;if(Es.origin===dn.origin&&ws)return removeDoubleSlashes(Es.pathname)+Es.search+Es.hash}try{let bs=xs.createURL(ds);if(hasInvalidProtocol(bs.toString()))throw new Error("Invalid redirect location")}catch{}return ds}function createClientSideRequest(ds,dn,ms,xs){let bs=ds.createURL(stripHashFromPath(dn)).toString(),Es={signal:ms};if(xs&&isMutationMethod(xs.formMethod)){let{formMethod:ws,formEncType:Rs}=xs;Es.method=ws.toUpperCase(),Rs==="application/json"?(Es.headers=new Headers({"Content-Type":Rs}),Es.body=JSON.stringify(xs.json)):Rs==="text/plain"?Es.body=xs.text:Rs==="application/x-www-form-urlencoded"&&xs.formData?Es.body=convertFormDataToSearchParams(xs.formData):Es.body=xs.formData}return new Request(bs,Es)}function createDataFunctionUrl(ds,dn){let ms=new URL(ds.url),xs=typeof dn=="string"?parsePath(dn):dn;if(ms.pathname=xs.pathname||"/",xs.search){let bs=new URLSearchParams(xs.search),Es=bs.getAll("index");bs.delete("index");for(let ws of Es.filter(Boolean))bs.append("index",ws);ms.search=bs.size?`?${bs.toString()}`:""}else ms.search="";return ms.hash=xs.hash||"",ms}function convertFormDataToSearchParams(ds){let dn=new URLSearchParams;for(let[ms,xs]of ds.entries())dn.append(ms,typeof xs=="string"?xs:xs.name);return dn}function convertSearchParamsToFormData(ds){let dn=new FormData;for(let[ms,xs]of ds.entries())dn.append(ms,xs);return dn}function processRouteLoaderData(ds,dn,ms,xs=!1,bs=!1){let Es={},ws=null,Rs,js=!1,Cs={},As=ms&&isErrorResult(ms[1])?ms[1].error:void 0;return ds.forEach(ks=>{if(!(ks.route.id in dn))return;let Os=ks.route.id,Ms=dn[Os];if(invariant(!isRedirectResult(Ms),"Cannot handle redirect results in processLoaderData"),isErrorResult(Ms)){let Ds=Ms.error;if(As!==void 0&&(Ds=As,As=void 0),ws=ws||{},bs)ws[Os]=Ds;else{let Ps=findNearestBoundary(ds,Os);ws[Ps.route.id]==null&&(ws[Ps.route.id]=Ds)}xs||(Es[Os]=ResetLoaderDataSymbol),js||(js=!0,Rs=isRouteErrorResponse(Ms.error)?Ms.error.status:500),Ms.headers&&(Cs[Os]=Ms.headers)}else Es[Os]=Ms.data,Ms.statusCode&&Ms.statusCode!==200&&!js&&(Rs=Ms.statusCode),Ms.headers&&(Cs[Os]=Ms.headers)}),As!==void 0&&ms&&(ws={[ms[0]]:As},ms[2]&&(Es[ms[2]]=void 0)),{loaderData:Es,errors:ws,statusCode:Rs||200,loaderHeaders:Cs}}function processLoaderData(ds,dn,ms,xs,bs,Es,ws){let{loaderData:Rs,errors:js}=processRouteLoaderData(dn,ms,xs);return bs.filter(Cs=>!Cs.matches||Cs.matches.some(As=>
3As.shouldLoad)).forEach(Cs=>{let{key:As,match:ks,controller:Os}=Cs;if(Os&&Os.signal.aborted)return;let Ms=Es[As];if(invariant(Ms,"Did not find corresponding fetcher result"),isErrorResult(Ms)){let Ds=findNearestBoundary(ds.matches,ks?.route.id);js&&js[Ds.route.id]||(js={...js,[Ds.route.id]:Ms.error}),ws.delete(As)}else if(isRedirectResult(Ms))invariant(!1,"Unhandled fetcher revalidation redirect");else{let Ds=getDoneFetcher(Ms.data);ws.set(As,Ds)}}),{loaderData:Rs,errors:js}}function mergeLoaderData(ds,dn,ms,xs){let bs=Object.entries(dn).filter(([,Es])=>Es!==ResetLoaderDataSymbol).reduce((Es,[ws,Rs])=>(Es[ws]=Rs,Es),{});for(let Es of ms){let ws=Es.route.id;if(!dn.hasOwnProperty(ws)&&ds.hasOwnProperty(ws)&&Es.route.loader&&(bs[ws]=ds[ws]),xs&&xs.hasOwnProperty(ws))break}return bs}function getActionDataForCommit(ds){return ds?isErrorResult(ds[1])?{actionData:{}}:{actionData:{[ds[0]]:ds[1].data}}:{}}function findNearestBoundary(ds,dn){return(dn?ds.slice(0,ds.findIndex(xs=>xs.route.id===dn)+1):[...ds]).reverse().find(xs=>xs.route.hasErrorBoundary===!0)||ds[0]}function getShortCircuitMatches(ds){let dn=ds.length===1?ds[0]:ds.find(ms=>ms.index||!ms.path||ms.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:dn}],route:dn}}function getInternalRouterError(ds,{pathname:dn,routeId:ms,method:xs,type:bs,message:Es}={}){let ws="Unknown Server Error",Rs="Unknown @remix-run/router error";return ds===400?(ws="Bad Request",xs&&dn&&ms?Rs=`You made a ${xs} request to "${dn}" but did not provide a \`loader\` for route "${ms}", so there is no way to handle the request.`:bs==="invalid-body"&&(Rs="Unable to encode submission body")):ds===403?(ws="Forbidden",Rs=`Route "${ms}" does not match URL "${dn}"`):ds===404?(ws="Not Found",Rs=`No route matches URL "${dn}"`):ds===405&&(ws="Method Not Allowed",xs&&dn&&ms?Rs=`You made a ${xs.toUpperCase()} request to "${dn}" but did not provide an \`action\` for route "${ms}", so there is no way to handle the request.`:xs&&(Rs=`Invalid request method "${xs.toUpperCase()}"`)),new ErrorResponseImpl(ds||500,ws,new Error(Rs),!0)}function findRedirect(ds){let dn=Object.entries(ds);for(let ms=dn.length-1;ms>=0;ms--){let[xs,bs]=dn[ms];if(isRedirectResult(bs))return{key:xs,result:bs}}}function stripHashFromPath(ds){let dn=typeof ds=="string"?parsePath(ds):ds;return createPath({...dn,hash:""})}function isHashChangeOnly(ds,dn){return ds.pathname!==dn.pathname||ds.search!==dn.search?!1:ds.hash===""?dn.hash!=="":ds.hash===dn.hash?!0:dn.hash!==""}function dataWithResponseInitToErrorResponse(ds){return new ErrorResponseImpl(ds.init?.status??500,ds.init?.statusText??"Internal Server Error",ds.data)}function isDataStrategyResults(ds){return ds!=null&&typeof ds=="object"&&Object.entries(ds).every(([dn,ms])=>typeof dn=="string"&&isDataStrategyResult(ms))}function isDataStrategyResult(ds){return ds!=null&&typeof ds=="object"&&"type"in ds&&"result"in ds&&(ds.type==="data"||ds.type==="error")}function isRedirectDataStrategyResult(ds){return isResponse$1(ds.result)&&redirectStatusCodes.has(ds.result.status)}function isErrorResult(ds){return ds.type==="error"}function isRedirectResult(ds){return(ds&&ds.type)==="redirect"}function isDataWithResponseInit(ds){return typeof ds=="object"&&ds!=null&&"type"in ds&&"data"in ds&&"init"in ds&&ds.type==="DataWithResponseInit"}function isResponse$1(ds){return ds!=null&&typeof ds.status=="number"&&typeof ds.statusText=="string"&&typeof ds.headers=="object"&&typeof ds.body<"u"}function isRedirectStatusCode(ds){return redirectStatusCodes.has(ds)}function isRedirectResponse(ds){return isResponse$1(ds)&&isRedirectStatusCode(ds.status)&&ds.headers.has("Location")}function isValidMethod(ds){return validRequestMethods.has(ds.toUpperCase())}function isMutationMethod(ds){return validMutationMethods.has(ds.toUpperCase())}function hasNakedIndexQuery(ds){return new URLSearchParams(ds).getAll("index").some(dn=>dn==="")}function getTargetMatch(ds,dn){let ms=typeof dn=="string"?parsePath(dn).search:dn.search;if(ds[ds.length-1].route.index&&hasNakedIndexQuery(ms||""))return ds[ds.length-1];let xs=getPathContributingMatches(ds);return xs[xs.length-1]}function getSubmissionFromNavigation(ds){let{formMethod:dn,formAction:ms,formEncType:xs,text:bs,formData:Es,json:ws}=ds;
3if(!(!dn||!ms||!xs)){if(bs!=null)return{formMethod:dn,formAction:ms,formEncType:xs,formData:void 0,json:void 0,text:bs};if(Es!=null)return{formMethod:dn,formAction:ms,formEncType:xs,formData:Es,json:void 0,text:void 0};if(ws!==void 0)return{formMethod:dn,formAction:ms,formEncType:xs,formData:void 0,json:ws,text:void 0}}}function getLoadingNavigation(ds,dn,ms,xs){return xs?{state:"loading",location:ds,matches:dn,historyAction:ms,formMethod:xs.formMethod,formAction:xs.formAction,formEncType:xs.formEncType,formData:xs.formData,json:xs.json,text:xs.text}:{state:"loading",location:ds,matches:dn,historyAction:ms,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function getSubmittingNavigation(ds,dn,ms,xs){return{state:"submitting",location:ds,matches:dn,historyAction:ms,formMethod:xs.formMethod,formAction:xs.formAction,formEncType:xs.formEncType,formData:xs.formData,json:xs.json,text:xs.text}}function getLoadingFetcher(ds,dn){return ds?{state:"loading",formMethod:ds.formMethod,formAction:ds.formAction,formEncType:ds.formEncType,formData:ds.formData,json:ds.json,text:ds.text,data:dn}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:dn}}function getSubmittingFetcher(ds,dn){return{state:"submitting",formMethod:ds.formMethod,formAction:ds.formAction,formEncType:ds.formEncType,formData:ds.formData,json:ds.json,text:ds.text,data:dn?dn.data:void 0}}function getDoneFetcher(ds){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:ds}}function restoreAppliedTransitions(ds,dn){try{let ms=ds.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);if(ms){let xs=JSON.parse(ms);for(let[bs,Es]of Object.entries(xs||{}))Es&&Array.isArray(Es)&&dn.set(bs,new Set(Es||[]))}}catch{}}function persistAppliedTransitions(ds,dn){if(dn.size>0){let ms={};for(let[xs,bs]of dn)ms[xs]=[...bs];try{ds.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY,JSON.stringify(ms))}catch(xs){warning(!1,`Failed to save applied view transitions in sessionStorage (${xs}).`)}}}function createDeferred(){let ds,dn,ms=new Promise((xs,bs)=>{ds=async Es=>{xs(Es);try{await ms}catch{}},dn=async Es=>{bs(Es);try{await ms}catch{}}});return{promise:ms,resolve:ds,reject:dn}}var DataRouterContext=reactExports.createContext(null);DataRouterContext.displayName="DataRouter";var DataRouterStateContext=reactExports.createContext(null);DataRouterStateContext.displayName="DataRouterState";var RSCRouterContext=reactExports.createContext(!1);function useIsRSCRouterContext(){return reactExports.useContext(RSCRouterContext)}var ViewTransitionContext=reactExports.createContext({isTransitioning:!1});ViewTransitionContext.displayName="ViewTransition";var FetchersContext=reactExports.createContext(new Map);FetchersContext.displayName="Fetchers";var AwaitContext=reactExports.createContext(null);AwaitContext.displayName="Await";var NavigationContext=reactExports.createContext(null);NavigationContext.displayName="Navigation";var LocationContext=reactExports.createContext(null);LocationContext.displayName="Location";var RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});RouteContext.displayName="Route";var RouteErrorContext=reactExports.createContext(null);RouteErrorContext.displayName="RouteError";var ERROR_DIGEST_BASE="REACT_ROUTER_ERROR",ERROR_DIGEST_REDIRECT="REDIRECT",ERROR_DIGEST_ROUTE_ERROR_RESPONSE="ROUTE_ERROR_RESPONSE";function decodeRedirectErrorDigest(ds){if(ds.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_REDIRECT}:{`))try{let dn=JSON.parse(ds.slice(28));if(typeof dn=="object"&&dn&&typeof dn.status=="number"&&typeof dn.statusText=="string"&&typeof dn.location=="string"&&typeof dn.reloadDocument=="boolean"&&typeof dn.replace=="boolean")return dn}catch{}}function decodeRouteErrorResponseDigest(ds){if(ds.startsWith(`${ERROR_DIGEST_BASE}:${ERROR_DIGEST_ROUTE_ERROR_RESPONSE}:{`))try{let dn=JSON.parse(ds.slice(40));if(typeof dn=="object"&&dn&&typeof dn.status=="number"&&typeof dn.statusText=="string")return new ErrorResponseImpl(dn.status,dn.statusText,dn.data)}catch{}}function useHref(ds,{relative:dn}={}){invariant(useInRouterContext(),"useHref() may be used only in the context of a <Router> component.");let{basename:ms,navigator:xs}=reactExports.useContext(NavigationContext),{hash:bs,pathname:Es,search:ws}=useResolvedPath(ds,{relative:dn}),Rs=Es;return ms!=="/"&&(Rs=Es==="/"?ms:joinPaths([ms,Es])),xs.createHref({pathname:Rs,search:ws,hash:bs})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a <Router> component."),reactExports.useContext(LocationContext).location}function useNavigationType(){return reactExports.useContext(LocationContext).navigationType}
3var navigateEffectWarning="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect$1(ds){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(ds)}function useNavigate(){let{isDataRoute:ds}=reactExports.useContext(RouteContext);return ds?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a <Router> component.");let ds=reactExports.useContext(DataRouterContext),{basename:dn,navigator:ms}=reactExports.useContext(NavigationContext),{matches:xs}=reactExports.useContext(RouteContext),{pathname:bs}=useLocation(),Es=JSON.stringify(getResolveToMatches(xs)),ws=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{ws.current=!0}),reactExports.useCallback((js,Cs={})=>{if(warning(ws.current,navigateEffectWarning),!ws.current)return;if(typeof js=="number"){ms.go(js);return}let As=resolveTo(js,JSON.parse(Es),bs,Cs.relative==="path");ds==null&&dn!=="/"&&(As.pathname=As.pathname==="/"?dn:joinPaths([dn,As.pathname])),validateNavigationTarget(typeof js=="string"?js:createPath(js),ms.createHref(As),getNavigatorCurrentUrl(ms),"reject"),(Cs.replace?ms.replace:ms.push)(As,Cs.state,Cs)},[dn,ms,Es,bs,ds])}var OutletContext=reactExports.createContext(null);function useOutlet(ds){let dn=reactExports.useContext(RouteContext).outlet;return reactExports.useMemo(()=>dn&&reactExports.createElement(OutletContext.Provider,{value:ds},dn),[dn,ds])}function useParams(){let{matches:ds}=reactExports.useContext(RouteContext);return ds[ds.length-1]?.params??{}}function useResolvedPath(ds,{relative:dn}={}){let{matches:ms}=reactExports.useContext(RouteContext),{pathname:xs}=useLocation(),bs=JSON.stringify(getResolveToMatches(ms));return reactExports.useMemo(()=>resolveTo(ds,JSON.parse(bs),xs,dn==="path"),[ds,bs,xs,dn])}function useRoutes(ds,dn){return useRoutesImpl(ds,dn)}function useRoutesImpl(ds,dn,ms){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:xs}=reactExports.useContext(NavigationContext),{matches:bs}=reactExports.useContext(RouteContext),Es=bs[bs.length-1],ws=Es?Es.params:{},Rs=Es?Es.pathname:"/",js=Es?Es.pathnameBase:"/",Cs=Es&&Es.route;{let Ls=Cs&&Cs.path||"";warningOnce(Rs,!Cs||Ls.endsWith("*")||Ls.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${Rs}" (under <Route path="${Ls}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
4
5Please change the parent <Route path="${Ls}"> to <Route path="${Ls==="/"?"*":`${Ls}/*`}">.`)}let As=useLocation(),ks;if(dn){let Ls=typeof dn=="string"?parsePath(dn):dn;invariant(js==="/"||Ls.pathname?.startsWith(js),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${js}" but pathname "${Ls.pathname}" was given in the \`location\` prop.`),ks=Ls}else ks=As;let Os=ks.pathname||"/",Ms=Os;if(js!=="/"){let Ls=js.replace(/^\//,"").split("/");Ms="/"+Os.replace(/^\//,"").split("/").slice(Ls.length).join("/")}let Ds=ms&&ms.state.matches.length?ms.state.matches.map(Ls=>Object.assign(Ls,{route:ms.manifest[Ls.route.id]||Ls.route})):matchRoutes(ds,{pathname:Ms});warning(Cs||Ds!=null,`No routes matched location "${ks.pathname}${ks.search}${ks.hash}" `),warning(Ds==null||Ds[Ds.length-1].route.element!==void 0||Ds[Ds.length-1].route.Component!==void 0||Ds[Ds.length-1].route.lazy!==void 0,`Matched leaf route at location "${ks.pathname}${ks.search}${ks.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Ps=_renderMatches(Ds&&Ds.map(Ls=>Object.assign({},Ls,{params:Object.assign({},ws,Ls.params),pathname:joinPaths([js,xs.encodeLocation?xs.encodeLocation(Ls.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Ls.pathname]),pathnameBase:Ls.pathnameBase==="/"?js:joinPaths([js,xs.encodeLocation?xs.encodeLocation(Ls.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Ls.pathnameBase])})),bs,ms);return dn&&Ps?reactExports.createElement(LocationContext.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...ks},navigationType:"POP"}},Ps):Ps}function DefaultErrorComponent(){let ds=useRouteError(),dn=isRouteErrorResponse(ds)?`${ds.status} ${ds.statusText}`:ds instanceof Error?ds.message:JSON.stringify(ds),ms=ds instanceof Error?ds.stack:null,xs="rgba(200,200,200, 0.5)",bs={padding:"0.5rem",backgroundColor:xs},Es={padding:"2px 4px",backgroundColor:xs},ws=null;return console.error("Error handled by React Router default ErrorBoundary:",ds),ws=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("p",null,"💿 Hey developer 👋"),reactExports.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",reactExports.createElement("code",{style:Es},"ErrorBoundary")," or"," ",reactExports.createElement("code",{style:Es},"errorElement")," prop on your route.")),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application 
5Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},dn),ms?reactExports.createElement("pre",{style:bs},ms):null,ws)}var defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null),RenderErrorBoundary=class extends reactExports.Component{constructor(ds){super(ds),this.state={location:ds.location,revalidation:ds.revalidation,error:ds.error}}static getDerivedStateFromError(ds){return{error:ds}}static getDerivedStateFromProps(ds,dn){return dn.location!==ds.location||dn.revalidation!=="idle"&&ds.revalidation==="idle"?{error:ds.error,location:ds.location,revalidation:ds.revalidation}:{error:ds.error!==void 0?ds.error:dn.error,location:dn.location,revalidation:ds.revalidation||dn.revalidation}}componentDidCatch(ds,dn){this.props.onError?this.props.onError(ds,dn):console.error("React Router caught the following error during render",ds)}render(){let ds=this.state.error;if(this.context&&typeof ds=="object"&&ds&&"digest"in ds&&typeof ds.digest=="string"){const ms=decodeRouteErrorResponseDigest(ds.digest);ms&&(ds=ms)}let dn=ds!==void 0?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:ds,children:this.props.component})):this.props.children;return this.context?reactExports.createElement(RSCErrorHandler,{error:ds},dn):dn}};RenderErrorBoundary.contextType=RSCRouterContext;var errorRedirectHandledMap=new WeakMap;function RSCErrorHandler({children:ds,error:dn}){let{basename:ms,navigator:xs}=reactExports.useContext(NavigationContext);if(typeof dn=="object"&&dn&&"digest"in dn&&typeof dn.digest=="string"){let bs=decodeRedirectErrorDigest(dn.digest);if(bs){let Es=errorRedirectHandledMap.get(dn);if(Es)throw Es;let ws=parseToInfo(bs.location,ms),Rs=ws.absoluteURL||ws.to;if(validateNavigationTarget(bs.location,Rs,getNavigatorCurrentUrl(xs),"allow-explicit"),hasInvalidProtocol(Rs))throw new Error("Invalid redirect location");if(isBrowser&&!errorRedirectHandledMap.get(dn))if(ws.isExternal||bs.reloadDocument)window.location.href=Rs;else{const js=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(ws.to,{replace:bs.replace}));throw errorRedirectHandledMap.set(dn,js),js}return reactExports.createElement("meta",{httpEquiv:"refresh",content:`0;url=${Rs}`})}}return ds}function RenderedRoute({routeContext:ds,match:dn,children:ms}){let xs=reactExports.useContext(DataRouterContext);return xs&&xs.static&&xs.staticContext&&(dn.route.errorElement||dn.route.ErrorBoundary)&&(xs.staticContext._deepestRenderedBoundaryId=dn.route.id),reactExports.createElement(RouteContext.Provider,{value:ds},ms)}function _renderMatches(ds,dn=[],ms){let xs=ms?.state;if(ds==null){if(!xs)return null;if(xs.errors)ds=xs.matches;else if(dn.length===0&&!xs.initialized&&xs.matches.length>0)ds=xs.matches;else return null}let bs=ds,Es=xs?.errors;if(Es!=null){let As=bs.findIndex(ks=>ks.route.id&&Es?.[ks.route.id]!==void 0);invariant(As>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(Es).join(",")}`),bs=bs.slice(0,Math.min(bs.length,As+1))}let ws=!1,Rs=-1;if(ms&&xs){ws=xs.renderFallback;for(let As=0;As<bs.length;As++){let ks=bs[As];if((ks.route.HydrateFallback||ks.route.hydrateFallbackElement)&&(Rs=As),ks.route.id){let{loaderData:Os,errors:Ms}=xs,Ds=ks.route.loader&&!Os.hasOwnProperty(ks.route.id)&&(!Ms||Ms[ks.route.id]===void 0);if(ks.route.lazy||Ds){ms.isStatic&&(ws=!0),Rs>=0?bs=bs.slice(0,Rs+1):bs=[bs[0]];break}}}}let js=ms?.onError,Cs=xs&&js?(As,ks)=>{js(As,{location:xs.location,params:xs.matches?.[0]?.params??{},pattern:getRoutePattern(xs.matches),errorInfo:ks})}:void 0;return bs.reduceRight((As,ks,Os)=>{let Ms,Ds=!1,Ps=null,Ls=null;xs&&(Ms=Es&&ks.route.id?Es[ks.route.id]:void 0,Ps=ks.route.errorElement||defaultErrorElement,ws&&(Rs<0&&Os===0?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),Ds=!0,Ls=null):Rs===Os&&(Ds=!0,Ls=ks.route.hydrateFallbackElement||null)));let Bs=dn.concat(bs.slice(0,Os+1)),Fs=()=>{let Us;return Ms?Us=Ps:Ds?Us=Ls:ks.route.Component?Us=reactExports.createElement(ks.route.Component,null):ks.route.element?Us=ks.route.element:Us=As,reactExports.createElement(RenderedRoute,{match:ks,routeContext:{outlet:As,matches:Bs,isDataRoute:xs!=null},children:Us})};return xs&&(ks.route.ErrorBoundary||ks.route.errorElement||Os===0)?reactExports.createElement(RenderErrorBoundary,{location:xs.location,revalidation:xs.revalidation,component:Ps,error:Ms,children:Fs(),routeC
5ontext:{outlet:null,matches:Bs,isDataRoute:!0},onError:Cs}):Fs()},null)}function getDataRouterConsoleError(ds){return`${ds} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(ds){let dn=reactExports.useContext(DataRouterContext);return invariant(dn,getDataRouterConsoleError(ds)),dn}function useDataRouterState(ds){let dn=reactExports.useContext(DataRouterStateContext);return invariant(dn,getDataRouterConsoleError(ds)),dn}function useRouteContext(ds){let dn=reactExports.useContext(RouteContext);return invariant(dn,getDataRouterConsoleError(ds)),dn}function useCurrentRouteId(ds){let dn=useRouteContext(ds),ms=dn.matches[dn.matches.length-1];return invariant(ms.route.id,`${ds} can only be used on routes that contain a unique "id"`),ms.route.id}function useRouteId(){return useCurrentRouteId("useRouteId")}function useNavigation(){let ds=useDataRouterState("useNavigation");return reactExports.useMemo(()=>{let{matches:dn,historyAction:ms,...xs}=ds.navigation;return xs},[ds.navigation])}function useMatches(){let{matches:ds,loaderData:dn}=useDataRouterState("useMatches");return reactExports.useMemo(()=>ds.map(ms=>convertRouteMatchToUiMatch(ms,dn)),[ds,dn])}function useRouteError(){let ds=reactExports.useContext(RouteErrorContext),dn=useDataRouterState("useRouteError"),ms=useCurrentRouteId("useRouteError");return ds!==void 0?ds:dn.errors?.[ms]}function useNavigateStable(){let{router:ds}=useDataRouterContext("useNavigate"),dn=useCurrentRouteId("useNavigate"),ms=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{ms.current=!0}),reactExports.useCallback(async(bs,Es={})=>{warning(ms.current,navigateEffectWarning),ms.current&&(typeof bs=="number"?await ds.navigate(bs):await ds.navigate(bs,{fromRouteId:dn,...Es}))},[ds,dn])}var alreadyWarned={};function warningOnce(ds,dn,ms){!dn&&!alreadyWarned[ds]&&(alreadyWarned[ds]=!0,warning(!1,ms))}var alreadyWarned2={};
5function warnOnce(ds,dn){!ds&&!alreadyWarned2[dn]&&(alreadyWarned2[dn]=!0,console.warn(dn))}var USE_OPTIMISTIC="useOptimistic",useOptimisticImpl=React4[USE_OPTIMISTIC],stableUseOptimisticSetter=()=>{};function useOptimisticSafe(ds){return useOptimisticImpl?useOptimisticImpl(ds):[ds,stableUseOptimisticSetter]}function mapRouteProperties(ds){let dn={hasErrorBoundary:ds.hasErrorBoundary||ds.ErrorBoundary!=null||ds.errorElement!=null};return ds.Component&&(ds.element&&warning(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(dn,{element:reactExports.createElement(ds.Component),Component:void 0})),ds.HydrateFallback&&(ds.hydrateFallbackElement&&warning(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(dn,{hydrateFallbackElement:reactExports.createElement(ds.HydrateFallback),HydrateFallback:void 0})),ds.ErrorBoundary&&(ds.errorElement&&warning(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(dn,{errorElement:reactExports.createElement(ds.ErrorBoundary),ErrorBoundary:void 0})),dn}var hydrationRouteProperties=["HydrateFallback","hydrateFallbackElement"],Deferred=class{constructor(){this.status="pending",this.promise=new Promise((ds,dn)=>{this.resolve=ms=>{this.status==="pending"&&(this.status="resolved",ds(ms))},this.reject=ms=>{this.status==="pending"&&(this.status="rejected",dn(ms))}})}};function RouterProvider({router:ds,flushSync:dn,onError:ms,useTransitions:xs}){xs=useIsRSCRouterContext()||xs;let[Es,ws]=reactExports.useState(ds.state),[Rs,js]=useOptimisticSafe(Es),[Cs,As]=reactExports.useState(),[ks,Os]=reactExports.useState({isTransitioning:!1}),[Ms,Ds]=reactExports.useState(),[Ps,Ls]=reactExports.useState(),[Bs,Fs]=reactExports.useState(),Us=reactExports.useRef(new Map),Gs=reactExports.useCallback((Ys,{deletedFetchers:Qs,newErrors:ai,flushSync:ia,viewTransitionOpts:ca})=>{ai&&ms&&Object.values(ai).forEach(ea=>ms(ea,{location:Ys.location,params:Ys.matches[0]?.params??{},pattern:getRoutePattern(Ys.matches)})),Ys.fetchers.forEach((ea,ta)=>{ea.data!==void 0&&Us.current.set(ta,ea.data)}),Qs.forEach(ea=>Us.current.delete(ea)),warnOnce(ia===!1||dn!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ha=ds.window!=null&&ds.window.document!=null&&typeof ds.window.document.startViewTransition=="function";if(warnOnce(ca==null||ha,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ca||!ha){dn&&ia?dn(()=>ws(Ys)):xs===!1?ws(Ys):reactExports.startTransition(()=>{xs===!0&&js(ea=>getOptimisticRouterState(ea,Ys)),ws(Ys)});return}if(dn&&ia){dn(()=>{Ps&&(Ms?.resolve(),Ps.skipTransition()),Os({isTransitioning:!0,flushSync:!0,currentLocation:ca.currentLocation,nextLocation:ca.nextLocation})});let ea=ds.window.document.startViewTransition(()=>{dn(()=>ws(Ys))});ea.finished.finally(()=>{dn(()=>{Ds(void 0),Ls(void 0),As(void 0),Os({isTransitioning:!1})})}),dn(()=>Ls(ea));return}Ps?(Ms?.resolve(),Ps.skipTransition(),Fs({state:Ys,currentLocation:ca.currentLocation,nextLocation:ca.nextLocation})):(As(Ys),Os({isTransitioning:!0,flushSync:!1,currentLocation:ca.currentLocation,nextLocation:ca.nextLocation}))},[ds.window,dn,Ps,Ms,xs,js,ms]);reactExports.useLayoutEffect(()=>ds.subscribe(Gs),[ds,Gs]),reactExports.useEffect(()=>{ks.isTransitioning&&!ks.flushSync&&Ds(new Deferred)},[ks]),reactExports.useEffect(()=>{if(Ms&&Cs&&ds.window){let Ys=Cs,Qs=Ms.promise,ai=ds.window.document.startViewTransition(async()=>{xs===!1?ws(Ys):reactExports.startTransition(()=>{xs===!0&&js(ia=>getOptimisticRouterState(ia,Ys)),ws(Ys)}),await Qs});ai.finished.finally(()=>{Ds(void 0),Ls(void 0),As(void 0),Os({isTransitioning:!1})}),Ls(ai)}},[Cs,Ms,ds.window,xs,js]),reactExports.useEffect(()=>{Ms&&Cs&&Rs.location.key===Cs.location.key&&Ms.resolve()},[Ms,Ps,Rs.location,Cs]),reactExports.useEffect(()=>{!ks.isTransitioning&&Bs&&(As(Bs.state),Os({isTransitioning:!0,flushSync:!1,currentLocation:Bs.currentLocation,nextLocation:Bs.nextLocation}),Fs(void 0))},[ks.isTransitioning,Bs]);let Js=reactExports.useMemo(()=>({createHref:ds.createHref,createURL:ds.createURL,encodeLocation:ds.encodeLocation,go:Ys=>ds.navigate(Ys),push:(Ys,Qs,ai)=>ds.navigate(Ys,{state:Qs,preventScrollReset:ai?.preventScrollReset}),replace:(Ys,Qs,ai)=>ds.navigate(Ys,{replace:!0,state:Qs,preventScrollReset:ai?.preventScrollReset})}
5),[ds]),Ws=ds.basename||"/",Zs=reactExports.useMemo(()=>({router:ds,navigator:Js,static:!1,basename:Ws,onError:ms}),[ds,Js,Ws,ms]);return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(DataRouterContext.Provider,{value:Zs},reactExports.createElement(DataRouterStateContext.Provider,{value:Rs},reactExports.createElement(FetchersContext.Provider,{value:Us.current},reactExports.createElement(ViewTransitionContext.Provider,{value:ks},reactExports.createElement(Router,{basename:Ws,location:Rs.location,navigationType:Rs.historyAction,navigator:Js,useTransitions:xs},reactExports.createElement(MemoizedDataRoutes,{routes:ds.routes,manifest:ds.manifest,future:ds.future,state:Rs,isStatic:!1,onError:ms})))))),null)}function getOptimisticRouterState(ds,dn){return{...ds,navigation:dn.navigation.state!=="idle"?dn.navigation:ds.navigation,revalidation:dn.revalidation!=="idle"?dn.revalidation:ds.revalidation,actionData:dn.navigation.state!=="submitting"?dn.actionData:ds.actionData,fetchers:dn.fetchers}}var MemoizedDataRoutes=reactExports.memo(DataRoutes2);function DataRoutes2({routes:ds,manifest:dn,future:ms,state:xs,isStatic:bs,onError:Es}){return useRoutesImpl(ds,void 0,{manifest:dn,state:xs,isStatic:bs,onError:Es})}function Navigate({to:ds,replace:dn,state:ms,relative:xs}){invariant(useInRouterContext(),"<Navigate> may be used only in the context of a <Router> component.");let{static:bs,navigator:Es}=reactExports.useContext(NavigationContext);warning(!bs,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:ws}=reactExports.useContext(RouteContext),{pathname:Rs}=useLocation(),js=useNavigate(),Cs=resolveTo(ds,getResolveToMatches(ws),Rs,xs==="path");validateNavigationTarget(typeof ds=="string"?ds:createPath(ds),Es.createHref(Cs),getNavigatorCurrentUrl(Es),"reject");let As=JSON.stringify(Cs);return reactExports.useEffect(()=>{js(JSON.parse(As),{replace:dn,state:ms,relative:xs})},[js,As,xs,dn,ms]),null}function Outlet(ds){return useOutlet(ds.context)}function Route(ds){invariant(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Router({basename:ds="/",children:dn=null,location:ms,navigationType:xs="POP",navigator:bs,static:Es=!1,useTransitions:ws}){invariant(!useInRouterContext(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let Rs=ds.replace(/^\/*/,"/"),js=reactExports.useMemo(()=>({basename:Rs,navigator:bs,static:Es,useTransitions:ws,future:{}}),[Rs,bs,Es,ws]);typeof ms=="string"&&(ms=parsePath(ms));let{pathname:Cs="/",search:As="",hash:ks="",state:Os=null,key:Ms="default",mask:Ds}=ms,Ps=reactExports.useMemo(()=>{let Ls=stripBasename(Cs,Rs);return Ls==null?null:{location:{pathname:Ls,search:As,hash:ks,state:Os,key:Ms,mask:Ds},navigationType:xs}},[Rs,Cs,As,ks,Os,Ms,xs,Ds]);return warning(Ps!=null,`<Router basename="${Rs}"> is not able to match the URL "${Cs}${As}${ks}" because it does not start with the basename, so the <Router> won't render anything.`),Ps==null?null:reactExports.createElement(NavigationContext.Provider,{value:js},reactExports.createElement(LocationContext.Provider,{children:dn,value:Ps}))}function Routes({children:ds,location:dn}){return useRoutes(createRoutesFromChildren(ds),dn)}function createRoutesFromChildren(ds,dn=[]){let ms=[];return reactExports.Children.forEach(ds,(xs,bs)=>{if(!reactExports.isValidElement(xs))return;let Es=[...dn,bs];if(xs.type===reactExports.Fragment){ms.push.apply(ms,createRoutesFromChildren(xs.props.children,Es));return}invariant(xs.type===Route,`[${typeof xs.type=="string"?xs.type:xs.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),invariant(!xs.props.index||!xs.props.children,"An index route cannot have child routes.");let ws={id:xs.props.id||Es.join("-"),caseSensitive:xs.props.caseSensitive,element:xs.props.element,Component:xs.props.Component,index:xs.props.index,path:xs.props.path,middleware:xs.props.middleware,loader:xs.props.loader,action:xs.props.action,hydrateFallbackElement:xs.props.hydrateFallbackElement,HydrateFallback:xs.props.HydrateFallback,errorElement:xs.props.errorElement,ErrorBoundary:xs.props.ErrorBoundary,hasErrorBoundary:xs.props.hasErrorBoundary===!0||xs.props.ErrorBoundary!=null||xs.props.errorElement!=null,
5shouldRevalidate:xs.props.shouldRevalidate,handle:xs.props.handle,lazy:xs.props.lazy};xs.props.children&&(ws.children=createRoutesFromChildren(xs.props.children,Es)),ms.push(ws)}),ms}var defaultMethod="get",defaultEncType="application/x-www-form-urlencoded";function isHtmlElement(ds){return typeof HTMLElement<"u"&&ds instanceof HTMLElement}function isButtonElement(ds){return isHtmlElement(ds)&&ds.tagName.toLowerCase()==="button"}function isFormElement(ds){return isHtmlElement(ds)&&ds.tagName.toLowerCase()==="form"}function isInputElement(ds){return isHtmlElement(ds)&&ds.tagName.toLowerCase()==="input"}function isModifiedEvent(ds){return!!(ds.metaKey||ds.altKey||ds.ctrlKey||ds.shiftKey)}function shouldProcessLinkClick(ds,dn){return ds.button===0&&(!dn||dn==="_self")&&!isModifiedEvent(ds)}function createSearchParams(ds=""){return new URLSearchParams(typeof ds=="string"||Array.isArray(ds)||ds instanceof URLSearchParams?ds:Object.keys(ds).reduce((dn,ms)=>{let xs=ds[ms];return dn.concat(Array.isArray(xs)?xs.map(bs=>[ms,bs]):[[ms,xs]])},[]))}function getSearchParamsForLocation(ds,dn){let ms=createSearchParams(ds);
5return dn&&dn.forEach((xs,bs)=>{ms.has(bs)||dn.getAll(bs).forEach(Es=>{ms.append(bs,Es)})}),ms}var _formDataSupportsSubmitter=null;function isFormDataSubmitterSupported(){if(_formDataSupportsSubmitter===null)try{new FormData(document.createElement("form"),0),_formDataSupportsSubmitter=!1}catch{_formDataSupportsSubmitter=!0}return _formDataSupportsSubmitter}var supportedFormEncTypes=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(ds){return ds!=null&&!supportedFormEncTypes.has(ds)?(warning(!1,`"${ds}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`),null):ds}function getFormSubmissionInfo(ds,dn){let ms,xs,bs,Es,ws;if(isFormElement(ds)){let Rs=ds.getAttribute("action");xs=Rs?stripBasename(Rs,dn):null,ms=ds.getAttribute("method")||defaultMethod,bs=getFormEncType(ds.getAttribute("enctype"))||defaultEncType,Es=new FormData(ds)}else if(isButtonElement(ds)||isInputElement(ds)&&(ds.type==="submit"||ds.type==="image")){let Rs=ds.form;if(Rs==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let js=ds.getAttribute("formaction")||Rs.getAttribute("action");if(xs=js?stripBasename(js,dn):null,ms=ds.getAttribute("formmethod")||Rs.getAttribute("method")||defaultMethod,bs=getFormEncType(ds.getAttribute("formenctype"))||getFormEncType(Rs.getAttribute("enctype"))||defaultEncType,Es=new FormData(Rs,ds),!isFormDataSubmitterSupported()){let{name:Cs,type:As,value:ks}=ds;if(As==="image"){let Os=Cs?`${Cs}.`:"";Es.append(`${Os}x`,"0"),Es.append(`${Os}y`,"0")}else Cs&&Es.append(Cs,ks)}}else{if(isHtmlElement(ds))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');ms=defaultMethod,xs=null,bs=defaultEncType,ws=ds}return Es&&bs==="text/plain"&&(ws=Es,Es=void 0),{action:xs,method:ms.toLowerCase(),encType:bs,formData:Es,body:ws}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ESCAPE_LOOKUP={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ESCAPE_REGEX=/[&><\u2028\u2029]/g;function escapeHtml(ds){return ds.replace(ESCAPE_REGEX,dn=>ESCAPE_LOOKUP[dn])}function invariant2(ds,dn){if(ds===!1||ds===null||typeof ds>"u")throw new Error(dn)}function singleFetchUrl(ds,dn,ms,xs){let bs=typeof ds=="string"?new URL(ds,typeof window>"u"?"server://singlefetch/":window.location.origin):ds;return ms?bs.pathname.endsWith("/")?bs.pathname=`${bs.pathname}_.${xs}`:bs.pathname=`${bs.pathname}.${xs}`:bs.pathname==="/"?bs.pathname=`_root.${xs}`:dn&&stripBasename(bs.pathname,dn)==="/"?bs.pathname=`${removeTrailingSlash(dn)}/_root.${xs}`:bs.pathname=`${removeTrailingSlash(bs.pathname)}.${xs}`,bs}async function loadRouteModule(ds,dn){if(ds.id in dn)return dn[ds.id];try{let ms=await import(ds.module);return dn[ds.id]=ms,ms}catch(ms){return console.error(`Error loading route module \`${ds.module}\`, reloading page...`),console.error(ms),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function isHtmlLinkDescriptor(ds){return ds==null?!1:ds.href==null?ds.rel==="preload"&&typeof ds.imageSrcSet=="string"&&typeof ds.imageSizes=="string":typeof ds.rel=="string"&&typeof ds.href=="string"}async function getKeyedPrefetchLinks(ds,dn,ms){let xs=await Promise.all(ds.map(async bs=>{let Es=dn.routes[bs.route.id];if(Es){let ws=await loadRouteModule(Es,ms);return ws.links?ws.links():[]}return[]}));return dedupeLinkDescriptors(xs.flat(1).filter(isHtmlLinkDescriptor).filter(bs=>bs.rel==="stylesheet"||bs.rel==="preload").map(bs=>bs.rel==="stylesheet"?{...bs,rel:"prefetch",as:"style"}:{...bs,rel:"prefetch"}))}function getNewMatchesForLinks(ds,dn,ms,xs,bs,Es){let ws=(js,Cs)=>ms[Cs]?js.route.id!==ms[Cs].route.id:!0,Rs=(js,Cs)=>ms[Cs].pathname!==js.pathname||ms[Cs].route.path?.endsWith("*")&&ms[Cs].params["*"]!==js.params["*"];return Es==="assets"?dn.filter((js,Cs)=>ws(js,Cs)||Rs(js,Cs)):Es==="data"?dn.filter((js,Cs)=>{let As=xs.routes[js.route.id];if(!As||!As.hasLoader)return!1;if(ws(js,Cs)||Rs(js,Cs))return!0;
5if(js.route.shouldRevalidate){let ks=js.route.shouldRevalidate({currentUrl:new URL(bs.pathname+bs.search+bs.hash,window.origin),currentParams:ms[0]?.params||{},nextUrl:new URL(ds,window.origin),nextParams:js.params,defaultShouldRevalidate:!0});if(typeof ks=="boolean")return ks}return!0}):[]}function getModuleLinkHrefs(ds,dn,{includeHydrateFallback:ms}={}){return dedupeHrefs(ds.map(xs=>{let bs=dn.routes[xs.route.id];if(!bs)return[];let Es=[bs.module];return bs.clientActionModule&&(Es=Es.concat(bs.clientActionModule)),bs.clientLoaderModule&&(Es=Es.concat(bs.clientLoaderModule)),ms&&bs.hydrateFallbackModule&&(Es=Es.concat(bs.hydrateFallbackModule)),bs.imports&&(Es=Es.concat(bs.imports)),Es}).flat(1))}function dedupeHrefs(ds){return[...new Set(ds)]}function sortKeys(ds){let dn={},ms=Object.keys(ds).sort();for(let xs of ms)dn[xs]=ds[xs];return dn}function dedupeLinkDescriptors(ds,dn){let ms=new Set;return new Set(dn),ds.reduce((xs,bs)=>{let Es=JSON.stringify(sortKeys(bs));return ms.has(Es)||(ms.add(Es),xs.push({key:Es,link:bs})),xs},[])}function useDataRouterContext2(){let ds=reactExports.useContext(DataRouterContext);return invariant2(ds,"You must render this element inside a <DataRouterContext.Provider> element"),ds}function useDataRouterStateContext(){let ds=reactExports.useContext(DataRouterStateContext);return invariant2(ds,"You must render this element inside a <DataRouterStateContext.Provider> element"),ds}var FrameworkContext=reactExports.createContext(void 0);FrameworkContext.displayName="FrameworkContext";function useFrameworkContext(){let ds=reactExports.useContext(FrameworkContext);return invariant2(ds,"You must render this element inside a <HydratedRouter> element"),ds}function usePrefetchBehavior(ds,dn){let ms=reactExports.useContext(FrameworkContext),[xs,bs]=reactExports.useState(!1),[Es,ws]=reactExports.useState(!1),{onFocus:Rs,onBlur:js,onMouseEnter:Cs,onMouseLeave:As,onTouchStart:ks}=dn,Os=reactExports.useRef(null);reactExports.useEffect(()=>{if(ds==="render"&&ws(!0),ds==="viewport"){let Ps=Bs=>{Bs.forEach(Fs=>{ws(Fs.isIntersecting)})},Ls=new IntersectionObserver(Ps,{threshold:.5});return Os.current&&Ls.observe(Os.current),()=>{Ls.disconnect()}}},[ds]),reactExports.useEffect(()=>{if(xs){let Ps=setTimeout(()=>{ws(!0)},100);return()=>{clearTimeout(Ps)}}},[xs]);let Ms=()=>{bs(!0)},Ds=()=>{bs(!1),ws(!1)};return ms?ds!=="intent"?[Es,Os,{}]:[Es,Os,{onFocus:composeEventHandlers(Rs,Ms),onBlur:composeEventHandlers(js,Ds),onMouseEnter:composeEventHandlers(Cs,Ms),onMouseLeave:composeEventHandlers(As,Ds),onTouchStart:composeEventHandlers(ks,Ms)}]:[!1,Os,{}]}function composeEventHandlers(ds,dn){return ms=>{ds&&ds(ms),ms.defaultPrevented||dn(ms)}}function PrefetchPageLinks({page:ds,...dn}){let ms=useIsRSCRouterContext(),{nonce:xs}=useFrameworkContext(),{router:bs}=useDataRouterContext2(),Es=reactExports.useMemo(()=>matchRoutes(bs.routes,ds,bs.basename),[bs.routes,ds,bs.basename]);return Es?(dn.nonce==null&&xs&&(dn={...dn,nonce:xs}),ms?reactExports.createElement(RSCPrefetchPageLinksImpl,{page:ds,matches:Es,...dn}):reactExports.createElement(PrefetchPageLinksImpl,{page:ds,matches:Es,...dn})):null}function useKeyedPrefetchLinks(ds){let{manifest:dn,routeModules:ms}=useFrameworkContext(),[xs,bs]=reactExports.useState([]);return reactExports.useEffect(()=>{let Es=!1;return getKeyedPrefetchLinks(ds,dn,ms).then(ws=>{Es||bs(ws)}),()=>{Es=!0}},[ds,dn,ms]),xs}function RSCPrefetchPageLinksImpl({page:ds,matches:dn,...ms}){let xs=useLocation(),{future:bs}=useFrameworkContext(),{basename:Es}=useDataRouterContext2(),ws=reactExports.useMemo(()=>{if(ds===xs.pathname+xs.search+xs.hash)return[];let Rs=singleFetchUrl(ds,Es,bs.v8_trailingSlashAwareDataRequests,"rsc"),js=!1,Cs=[];for(let As of dn)typeof As.route.shouldRevalidate=="function"?js=!0:Cs.push(As.route.id);return js&&Cs.length>0&&Rs.searchParams.set("_routes",Cs.join(",")),[Rs.pathname+Rs.search]},[Es,bs.v8_trailingSlashAwareDataRequests,ds,xs,dn]);return reactExports.createElement(reactExports.Fragment,null,ws.map(Rs=>reactExports.createElement("link",{key:Rs,rel:"prefetch",as:"fetch",href:Rs,...ms})))}function PrefetchPageLinksImpl({page:ds,matches:dn,...ms}){let xs=useLocation(),{future:bs,manifest:Es,routeModules:ws}=useFrameworkContext(),{basename:Rs}=useDataRouterContext2(),{loaderData:js,matches:Cs}=useDataRouterStateContext(),As=reactExports.useMemo(()=>getNewMatchesForLinks(ds,dn,Cs,Es,xs,"data"),[ds,dn,Cs,Es,xs]),ks=reactExports.useMemo(()=>getNewMatchesForLinks(ds,dn,Cs,Es,xs,"assets"),[ds,dn,Cs,Es,xs]),Os=reactExports.useMemo(()=>
5{if(ds===xs.pathname+xs.search+xs.hash)return[];let Ps=new Set,Ls=!1;if(dn.forEach(Fs=>{let Us=Es.routes[Fs.route.id];!Us||!Us.hasLoader||(!As.some(Gs=>Gs.route.id===Fs.route.id)&&Fs.route.id in js&&ws[Fs.route.id]?.shouldRevalidate||Us.hasClientLoader?Ls=!0:Ps.add(Fs.route.id))}),Ps.size===0)return[];let Bs=singleFetchUrl(ds,Rs,bs.v8_trailingSlashAwareDataRequests,"data");return Ls&&Ps.size>0&&Bs.searchParams.set("_routes",dn.filter(Fs=>Ps.has(Fs.route.id)).map(Fs=>Fs.route.id).join(",")),[Bs.pathname+Bs.search]},[Rs,bs.v8_trailingSlashAwareDataRequests,js,xs,Es,As,dn,ds,ws]),Ms=reactExports.useMemo(()=>getModuleLinkHrefs(ks,Es),[ks,Es]),Ds=useKeyedPrefetchLinks(ks);return reactExports.createElement(reactExports.Fragment,null,Os.map(Ps=>reactExports.createElement("link",{key:Ps,rel:"prefetch",as:"fetch",href:Ps,...ms})),Ms.map(Ps=>reactExports.createElement("link",{key:Ps,rel:"modulepreload",href:Ps,...ms})),Ds.map(({key:Ps,link:Ls})=>reactExports.createElement("link",{key:Ps,nonce:ms.nonce,...Ls,crossOrigin:Ls.crossOrigin??ms.crossOrigin})))}function mergeRefs(...ds){return dn=>{ds.forEach(ms=>{typeof ms=="function"?ms(dn):ms!=null&&(ms.current=dn)})}}var isBrowser2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{isBrowser2&&(window.__reactRouterVersion="7.18.4")}catch{}function createBrowserRouter(ds,dn){return createRouter({basename:dn?.basename,getContext:dn?.getContext,future:dn?.future,history:createBrowserHistory({window:dn?.window}),hydrationData:parseHydrationData(),routes:ds,mapRouteProperties,hydrationRouteProperties,dataStrategy:dn?.dataStrategy,patchRoutesOnNavigation:dn?.patchRoutesOnNavigation,window:dn?.window,instrumentations:dn?.instrumentations}).initialize()}function parseHydrationData(){let ds=window?.__staticRouterHydrationData;return ds&&ds.errors&&(ds={...ds,errors:deserializeErrors(ds.errors)}),ds}function deserializeErrors(ds){if(!ds)return null;let dn=Object.entries(ds),ms={};for(let[xs,bs]of dn)if(bs&&bs.__type==="RouteErrorResponse")ms[xs]=new ErrorResponseImpl(bs.status,bs.statusText,bs.data,bs.internal===!0);else if(bs&&bs.__type==="Error"){if(typeof bs.__subType=="string"&&SUPPORTED_ERROR_TYPES.includes(bs.__subType)){let Es=window[bs.__subType];if(typeof Es=="function")try{let ws=new Es(bs.message);ws.stack="",ms[xs]=ws}catch{}}if(ms[xs]==null){let Es=new Error(bs.message);Es.stack="",ms[xs]=Es}}else ms[xs]=bs;return ms}var Link$1=reactExports.forwardRef(function({onClick:dn,discover:ms="render",prefetch:xs="none",relative:bs,reloadDocument:Es,replace:ws,mask:Rs,state:js,target:Cs,to:As,preventScrollReset:ks,viewTransition:Os,defaultShouldRevalidate:Ms,...Ds},Ps){let{basename:Ls,navigator:Bs,useTransitions:Fs}=reactExports.useContext(NavigationContext),Us=typeof As=="string"&&ABSOLUTE_URL_REGEX.test(As),Gs=parseToInfo(As,Ls);As=Gs.to;let Js=useHref(As,{relative:bs}),Ws=useLocation(),Zs=null;if(Rs){let ta=resolveTo(Rs,[],Ws.mask?Ws.mask.pathname:"/",!0);Ls!=="/"&&(ta.pathname=ta.pathname==="/"?Ls:joinPaths([Ls,ta.pathname])),Zs=Bs.createHref(ta)}let[Ys,Qs,ai]=usePrefetchBehavior(xs,Ds),ia=useLinkClickHandler(As,{replace:ws,mask:Rs,state:js,target:Cs,preventScrollReset:ks,relative:bs,viewTransition:Os,defaultShouldRevalidate:Ms,useTransitions:Fs});function ca(ta){dn&&dn(ta),ta.defaultPrevented||ia(ta)}let ha=!(Gs.isExternal||Es),ea=reactExports.createElement("a",{...Ds,...ai,href:(ha?Zs:void 0)||Gs.absoluteURL||Js,onClick:ha?ca:dn,ref:mergeRefs(Ps,Qs),target:Cs,"data-discover":!Us&&ms==="render"?"true":void 0});return Ys&&!Us?reactExports.createElement(reactExports.Fragment,null,ea,reactExports.createElement(PrefetchPageLinks,{page:Js})):ea});Link$1.displayName="Link";var NavLink=reactExports.forwardRef(function({"aria-current":dn="page",caseSensitive:ms=!1,className:xs="",end:bs=!1,style:Es,to:ws,viewTransition:Rs,children:js,...Cs},As){let ks=useResolvedPath(ws,{relative:Cs.relative}),Os=useLocation(),Ms=reactExports.useContext(DataRouterStateContext),{navigator:Ds,basename:Ps}=reactExports.useContext(NavigationContext),Ls=Ms!=null&&useViewTransitionState(ks)&&Rs===!0,Bs=Ds.encodeLocation?Ds.encodeLocation(ks).pathname:ks.pathname,Fs=Os.pathname,Us=Ms&&Ms.navigation&&Ms.navigation.location?Ms.navigation.location.pathname:null;ms||(Fs=Fs.toLowerCase(),Us=Us?Us.toLowerCase():null,Bs=Bs.toLowerCase()),Us&&Ps&&(Us=stripBasename(Us,Ps)||Us);const Gs=Bs!=="/"&&Bs.endsWith("/")?Bs.length-1:Bs.length;let Js=Fs===Bs||!bs&&Fs.startsWith(Bs)&&Fs.charAt(Gs)==="/",Ws=Us!=null&&(Us===Bs||!bs&&Us.startsWith(Bs)&&Us.charAt(Bs.length)==="/"),Zs={isActive:Js,isPending:Ws,isTransitioning:Ls},Ys=Js?dn:void 0,Qs;typeof xs=="function"?Qs=xs(Zs):Qs=[xs,Js?"active":null,Ws?"pending":null,Ls?"transitioning":null].filter(
5Boolean).join(" ");let ai=typeof Es=="function"?Es(Zs):Es;return reactExports.createElement(Link$1,{...Cs,"aria-current":Ys,className:Qs,ref:As,style:ai,to:ws,viewTransition:Rs},typeof js=="function"?js(Zs):js)});NavLink.displayName="NavLink";var Form=reactExports.forwardRef(({discover:ds="render",fetcherKey:dn,navigate:ms,reloadDocument:xs,replace:bs,state:Es,method:ws=defaultMethod,action:Rs,onSubmit:js,relative:Cs,preventScrollReset:As,viewTransition:ks,defaultShouldRevalidate:Os,...Ms},Ds)=>{let{useTransitions:Ps}=reactExports.useContext(NavigationContext),Ls=useSubmit(),Bs=useFormAction(Rs,{relative:Cs}),Fs=ws.toLowerCase()==="get"?"get":"post",Us=typeof Rs=="string"&&ABSOLUTE_URL_REGEX.test(Rs),Gs=Js=>{if(js&&js(Js),Js.defaultPrevented)return;Js.preventDefault();let Ws=Js.nativeEvent.submitter,Zs=Ws?.getAttribute("formmethod")||ws,Ys=()=>Ls(Ws||Js.currentTarget,{fetcherKey:dn,method:Zs,navigate:ms,replace:bs,state:Es,relative:Cs,preventScrollReset:As,viewTransition:ks,defaultShouldRevalidate:Os});Ps&&ms!==!1?reactExports.startTransition(()=>Ys()):Ys()};return reactExports.createElement("form",{ref:Ds,method:Fs,action:Bs,onSubmit:xs?js:Gs,...Ms,"data-discover":!Us&&ds==="render"?"true":void 0})});Form.displayName="Form";function ScrollRestoration({getKey:ds,storageKey:dn,...ms}){let xs=reactExports.useContext(FrameworkContext),{basename:bs}=reactExports.useContext(NavigationContext),Es=useLocation(),ws=useMatches();useScrollRestoration({getKey:ds,storageKey:dn});let Rs=reactExports.useMemo(()=>{if(!xs||!ds)return null;let Cs=getScrollRestorationKey(Es,ws,bs,ds);return Cs!==Es.key?Cs:null},[]);if(!xs||xs.isSpaMode)return null;let js=((Cs,As)=>{if(!window.history.state||!window.history.state.key){let ks=Math.random().toString(32).slice(2);window.history.replaceState({key:ks},"")}try{let Os=JSON.parse(sessionStorage.getItem(Cs)||"{}")[As||window.history.state.key];typeof Os=="number"&&window.scrollTo(0,Os)}catch(ks){console.error(ks),sessionStorage.removeItem(Cs)}}).toString();return ms.nonce==null&&xs?.nonce&&(ms.nonce=xs.nonce),reactExports.createElement("script",{...ms,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${js})(${escapeHtml(JSON.stringify(dn||SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(Rs))})`}})}ScrollRestoration.displayName="ScrollRestoration";function getDataRouterConsoleError2(ds){return`${ds} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext3(ds){let dn=reactExports.useContext(DataRouterContext);return invariant(dn,getDataRouterConsoleError2(ds)),dn}function useDataRouterState2(ds){let dn=reactExports.useContext(DataRouterStateContext);return invariant(dn,getDataRouterConsoleError2(ds)),dn}function useLinkClickHandler(ds,{target:dn,replace:ms,mask:xs,state:bs,preventScrollReset:Es,relative:ws,viewTransition:Rs,defaultShouldRevalidate:js,useTransitions:Cs}={}){let As=useNavigate(),ks=useLocation(),Os=useResolvedPath(ds,{relative:ws});return reactExports.useCallback(Ms=>{if(shouldProcessLinkClick(Ms,dn)){Ms.preventDefault();let Ds=ms!==void 0?ms:createPath(ks)===createPath(Os),Ps=()=>As(ds,{replace:Ds,mask:xs,state:bs,preventScrollReset:Es,relative:ws,viewTransition:Rs,defaultShouldRevalidate:js});Cs?reactExports.startTransition(()=>Ps()):Ps()}},[ks,As,Os,ms,xs,bs,dn,ds,Es,ws,Rs,js,Cs])}function useSearchParams(ds){warning(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let dn=reactExports.useRef(createSearchParams(ds)),ms=reactExports.useRef(!1),xs=useLocation(),bs=reactExports.useMemo(()=>getSearchParamsForLocation(xs.search,ms.current?null:dn.current),[xs.search]),Es=useNavigate(),ws=reactExports.useCallback((Rs,js)=>{const Cs=createSearchParams(typeof Rs=="function"?Rs(new URLSearchParams(bs)):Rs);ms.current=!0,Es("?"+Cs,js)},[Es,bs]);return[bs,ws]}var fetcherId=0,getUniqueFetcherId=()=>`__${String(++fetcherId)}__`;function useSubmit(){let{router:ds}=useDataRouterContext3("useSubmit"),{basename:dn}=reactExports.useContext(NavigationContext),ms=useRouteId(),xs=ds.fetch,bs=ds.navigate;return reactExports.useCallback(async(Es,ws={})=>{let{action:Rs,method:js,encType:Cs,formData:As,body:ks}=getFormSubmissionInfo(Es,dn);if(ws.navigate===!1){let Os=ws.fetcherKey||getUniqueFetcherId();await xs(Os,ms,ws.action||Rs,{defaultShouldRevalidate:ws.defaultShouldRevalidate,preventScrollReset:ws.preventScrollReset,formData:As,body:ks,formMethod:ws.method||js,formEncType:ws.encType||Cs,flushSync:ws.flushSync})}else await bs(ws.action||Rs,{defaultShouldRevalidate:ws.defaultShouldRevalidate,preventScrollReset:ws.preventScrollReset,formData:As,body:ks,formMethod:ws.method||js,formEncType:ws.encType||Cs,replace:ws.replace,state:ws.state,fromRouteId:ms,flushSync:ws.flushSync,viewTransition:ws.viewTransition})},[xs,bs,dn,ms])}function useFormAction(ds,{relative:dn}={}){let{basename:ms}=reactExports.useContext(NavigationContext),xs=reactExports.useContext(RouteContext);invariant(xs,"useFormAction must be used inside a RouteContext");let[bs]=xs.matches.slice(-1),Es={...useResolvedPath(ds||".",{relative:dn})},ws=useLocation();if(ds==null){Es.search=ws.search;let Rs=new URLSearchParams(Es.search),js=Rs.getAll("index");if(js.some(As=>As==="")){Rs.delete("index"),js.filter(ks=>
5ks).forEach(ks=>Rs.append("index",ks));let As=Rs.toString();Es.search=As?`?${As}`:""}}return(!ds||ds===".")&&bs.route.index&&(Es.search=Es.search?Es.search.replace(/^\?/,"?index&"):"?index"),ms!=="/"&&(Es.pathname=Es.pathname==="/"?ms:joinPaths([ms,Es.pathname])),createPath(Es)}var SCROLL_RESTORATION_STORAGE_KEY="react-router-scroll-positions",savedScrollPositions={};function getScrollRestorationKey(ds,dn,ms,xs){let bs=null;return xs&&(ms!=="/"?bs=xs({...ds,pathname:stripBasename(ds.pathname,ms)||ds.pathname},dn):bs=xs(ds,dn)),bs==null&&(bs=ds.key),bs}function useScrollRestoration({getKey:ds,storageKey:dn}={}){let{router:ms}=useDataRouterContext3("useScrollRestoration"),{restoreScrollPosition:xs,preventScrollReset:bs}=useDataRouterState2("useScrollRestoration"),{basename:Es}=reactExports.useContext(NavigationContext),ws=useLocation(),Rs=useMatches(),js=useNavigation();reactExports.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),usePageHide(reactExports.useCallback(()=>{if(js.state==="idle"){let Cs=getScrollRestorationKey(ws,Rs,Es,ds);savedScrollPositions[Cs]=window.scrollY}try{sessionStorage.setItem(dn||SCROLL_RESTORATION_STORAGE_KEY,JSON.stringify(savedScrollPositions))}catch(Cs){warning(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${Cs}).`)}window.history.scrollRestoration="auto"},[js.state,ds,Es,ws,Rs,dn])),typeof document<"u"&&(reactExports.useLayoutEffect(()=>{try{let Cs=sessionStorage.getItem(dn||SCROLL_RESTORATION_STORAGE_KEY);Cs&&(savedScrollPositions=JSON.parse(Cs))}catch{}},[dn]),reactExports.useLayoutEffect(()=>{let Cs=ms?.enableScrollRestoration(savedScrollPositions,()=>window.scrollY,ds?(As,ks)=>getScrollRestorationKey(As,ks,Es,ds):void 0);return()=>Cs&&Cs()},[ms,Es,ds]),reactExports.useLayoutEffect(()=>{if(xs!==!1){if(typeof xs=="number"){window.scrollTo(0,xs);return}try{if(ws.hash){let Cs=document.getElementById(decodeURIComponent(ws.hash.slice(1)));if(Cs){Cs.scrollIntoView();return}}}catch{warning(!1,`"${ws.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}bs!==!0&&window.scrollTo(0,0)}},[ws,xs,bs]))}function usePageHide(ds,dn){let{capture:ms}={};reactExports.useEffect(()=>{let xs=ms!=null?{capture:ms}:void 0;return window.addEventListener("pagehide",ds,xs),()=>{window.removeEventListener("pagehide",ds,xs)}},[ds,ms])}function useViewTransitionState(ds,{relative:dn}={}){let ms=reactExports.useContext(ViewTransitionContext);invariant(ms!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:xs}=useDataRouterContext3("useViewTransitionState"),bs=useResolvedPath(ds,{relative:dn});if(!ms.isTransitioning)return!1;let Es=stripBasename(ms.currentLocation.pathname,xs)||ms.currentLocation.pathname,ws=stripBasename(ms.nextLocation.pathname,xs)||ms.nextLocation.pathname;return matchPath(bs.pathname,ws)!=null||matchPath(bs.pathname,Es)!=null}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var ds=requireReact();function dn(As){var ks="https://react.dev/errors/"+As;if(1<arguments.length){ks+="?args[]="+encodeURIComponent(arguments[1]);for(var Os=2;Os<arguments.length;Os++)ks+="&args[]="+encodeURIComponent(arguments[Os])}return"Minified React error #"+As+"; visit "+ks+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ms(){}var xs={d:{f:ms,r:function(){throw Error(dn(522))},D:ms,C:ms,L:ms,m:ms,X:ms,S:ms,M:ms},p:0,findDOMNode:null},bs=Symbol.for("react.portal"),Es=Symbol.for("react.recoverable"),ws=Symbol.for("react.optimistic_key");function Rs(As,ks,Os){var Ms=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bs,key:Ms==null?null:Ms===ws?ws:""+Ms,children:As,containerInfo:ks,implementation:Os}}var js=ds.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Cs(As,ks){if(As==="font")return"";
vendor: 4,811 bytes, line 5
5if(typeof ks=="string")return ks==="use-credentials"?ks:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xs,reactDom_production.browser=function(As){return{$$typeof:Es,_reason:As}},reactDom_production.createPortal=function(As,ks){var Os=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ks||ks.nodeType!==1&&ks.nodeType!==9&&ks.nodeType!==11)throw Error(dn(299));return Rs(As,ks,null,Os)},reactDom_production.flushSync=function(As){var ks=js.T,Os=xs.p;try{if(js.T=null,xs.p=2,As)return As()}finally{js.T=ks,xs.p=Os,xs.d.f()}},reactDom_production.preconnect=function(As,ks){typeof As=="string"&&(ks?(ks=ks.crossOrigin,ks=typeof ks=="string"?ks==="use-credentials"?ks:"":void 0):ks=null,xs.d.C(As,ks))},reactDom_production.prefetchDNS=function(As){typeof As=="string"&&xs.d.D(As)},reactDom_production.preinit=function(As,ks){if(typeof As=="string"&&ks&&typeof ks.as=="string"){var Os=ks.as,Ms=Cs(Os,ks.crossOrigin),Ds=typeof ks.integrity=="string"?ks.integrity:void 0,Ps=typeof ks.fetchPriority=="string"?ks.fetchPriority:void 0;Os==="style"?xs.d.S(As,typeof ks.precedence=="string"?ks.precedence:void 0,{crossOrigin:Ms,integrity:Ds,fetchPriority:Ps}):Os==="script"&&xs.d.X(As,{crossOrigin:Ms,integrity:Ds,fetchPriority:Ps,nonce:typeof ks.nonce=="string"?ks.nonce:void 0})}},reactDom_production.preinitModule=function(As,ks){if(typeof As=="string")if(typeof ks=="object"&&ks!==null){if(ks.as==null||ks.as==="script"){var Os=Cs(ks.as,ks.crossOrigin);xs.d.M(As,{crossOrigin:Os,integrity:typeof ks.integrity=="string"?ks.integrity:void 0,nonce:typeof ks.nonce=="string"?ks.nonce:void 0,fetchPriority:typeof ks.fetchPriority=="string"?ks.fetchPriority:void 0})}}else ks==null&&xs.d.M(As)},reactDom_production.preload=function(As,ks){if(typeof As=="string"&&typeof ks=="object"&&ks!==null&&typeof ks.as=="string"){var Os=ks.as,Ms=Cs(Os,ks.crossOrigin);xs.d.L(As,Os,{crossOrigin:Ms,integrity:typeof ks.integrity=="string"?ks.integrity:void 0,nonce:typeof ks.nonce=="string"?ks.nonce:void 0,type:typeof ks.type=="string"?ks.type:void 0,fetchPriority:typeof ks.fetchPriority=="string"?ks.fetchPriority:void 0,referrerPolicy:typeof ks.referrerPolicy=="string"?ks.referrerPolicy:void 0,imageSrcSet:typeof ks.imageSrcSet=="string"?ks.imageSrcSet:void 0,imageSizes:typeof ks.imageSizes=="string"?ks.imageSizes:void 0,media:typeof ks.media=="string"?ks.media:void 0})}},reactDom_production.preloadModule=function(As,ks){if(typeof As=="string")if(ks){var Os=Cs(ks.as,ks.crossOrigin);xs.d.m(As,{as:typeof ks.as=="string"&&ks.as!=="script"?ks.as:void 0,crossOrigin:Os,integrity:typeof ks.integrity=="string"?ks.integrity:void 0,nonce:typeof ks.nonce=="string"?ks.nonce:void 0,fetchPriority:typeof ks.fetchPriority=="string"?ks.fetchPriority:void 0})}else xs.d.m(As)},reactDom_production.requestFormReset=function(As){xs.d.r(As)},reactDom_production.unstable_batchedUpdates=function(As,ks){return As(ks)},reactDom_production.useFormState=function(As,ks,Os){return js.H.useFormState(As,ks,Os)},reactDom_production.useFormStatus=function(){return js.H.useHostTransitionStatus()},reactDom_production.version="19.3.0",reactDom_production}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom.exports;hasRequiredReactDom=1;function ds(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ds)}catch(dn){console.error(dn)}}return ds(),reactDom.exports=requireReactDom_production(),reactDom.exports}var reactDomExports=requireReactDom();function RouterProvider2(ds){return reactExports.createElement(RouterProvider,{flushSync:reactDomExports.flushSync,...ds})}function Tick({colour:ds="#C4C4C4",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"77.943",height:"77.943",viewBox:"0 0 77.943 77.943",...dn,children:jsxRuntimeExports.jsx("path",{d:"M113.223,232.7,140.8,205.131l-4.482-4.384-23.091,23.091-11.691-11.692-4.384,4.384Zm5.748,21.24a37.709,37.709,0,0,1-15.1-3.069,39.264,39.264,0,0,1-20.8-20.8,38.929,38.929,0,0,1,0-30.3A38.948,38.948,0,0,1,91.448,187.4a39.95,39.95,0,0,1,12.422-8.33,38.929,38.929,0,0,1,30.3,0,38.911,38.911,0,0,1,20.7,20.7,38.929,38.929,0,0,1,0,30.3,39.95,39.95,0,0,1-8.33,12.422,38.947,38.947,0,0,1-12.374,8.379A37.949,37.949,0,0,1,118.972,253.943Zm0-5.846a33.207,33.207,0,0,0,23.48-56.606,33.343,33.343,0,0,0-46.912,0A33.15,33.15,0,0,0,118.972,248.1ZM118.972,214.972Z",transform:"translate(-80 -176)",fill:ds})})}function Close({colour:ds="#000000",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:19.702,height:19.702,viewBox:"0 0 19.702 21",...dn,children:jsxRuntimeExports.jsx("path",{id:"close",d:"M10.157,18.579l3.694-3.694,3.694,3.694,1.034
5-1.034-3.694-3.694,3.694-3.694L17.545,9.122l-3.694,3.694L10.157,9.122,9.122,10.157l3.694,3.694L9.122,17.545ZM13.851,23.7a9.532,9.532,0,0,1-3.817-.776,9.925,9.925,0,0,1-5.258-5.258,9.84,9.84,0,0,1,0-7.659A9.845,9.845,0,0,1,6.894,6.881a10.1,10.1,0,0,1,3.14-2.106,9.84,9.84,0,0,1,7.659,0,9.835,9.835,0,0,1,5.233,5.233,9.84,9.84,0,0,1,0,7.659,10.1,10.1,0,0,1-2.106,3.14,9.845,9.845,0,0,1-3.128,2.118A9.592,9.592,0,0,1,13.851,23.7Zm0-1.478a8.057,8.057,0,0,0,5.935-2.45,8.09,8.09,0,0,0,2.438-5.923,8.078,8.078,0,0,0-2.438-5.935,8.078,8.078,0,0,0-5.935-2.438A8.09,8.09,0,0,0,7.928,7.916a8.057,8.057,0,0,0-2.45,5.935,8.069,8.069,0,0,0,2.45,5.923A8.069,8.069,0,0,0,13.851,22.224ZM13.851,13.851Z",transform:"translate(-4 -4)",fill:ds})})}function Saving({colour:ds="#C4C4C4",margin:dn="auto",...ms}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{margin:dn,display:"block",shapeRendering:"auto"},width:"50px",height:"50px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",...ms,children:jsxRuntimeExports.jsx("circle",{cx:"50",cy:"50",r:"32",strokeWidth:"3",stroke:ds,strokeDasharray:"50.26548245743669 50.26548245743669",fill:"none",strokeLinecap:"round",children:jsxRuntimeExports.jsx("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",keyTimes:"0;1",values:"0 50 50;360 50 50"})})})}var SavableInputStatus=(ds=>(ds.Ready="Ready",ds.Processing="Processing",ds.Done="Done",ds.Failure="Failure",ds))(SavableInputStatus||{}),ButtonType=(ds=>(ds.Primary="Primary",ds.Secondary="Secondary",ds.Tertiary="Tertiary",ds.Quaternary="Quaternary",ds.Cancel="Cancel",ds))(ButtonType||{});function classFor(ds){switch(ds){case ButtonType.Primary:return"bg-primary text-white";case ButtonType.Secondary:return"bg-secondary text-white";case ButtonType.Tertiary:return"bg-tertiary text-white";case ButtonType.Cancel:return"bg-white text-secondary border border-secondary"}return""}const ERROR$1="Oops! Somethings not right. Please try again later.";function AsyncButton({buttonType:ds=ButtonType.Primary,className:dn,buttonWidth:ms="fit-content",text:xs,jsx:bs,validate:Es,save:ws,onSuccess:Rs,onFailure:js,showSuccessMillis:Cs=200,...As}){const[ks,Os]=reactExports.useState(SavableInputStatus.Ready),Ms=reactExports.useCallback(()=>{if(Es){const Ds=Es();if(Ds&&Object.entries(Ds).length>0){js?.(Ds);return}}Os(SavableInputStatus.Processing),ws?ws().then(Ds=>{Os(SavableInputStatus.Done);const Ps=`${Ds.status}`;Ps.startsWith("2")?setTimeout(()=>{Os(SavableInputStatus.Ready),Rs?.(Ds)},Cs):(Os(SavableInputStatus.Failure),setTimeout(()=>{Os(SavableInputStatus.Ready),Ps.startsWith("4")?js?.({response:Ds.data??ERROR$1}):js?.({response:ERROR$1})},Cs))}).catch(Ds=>{Os(SavableInputStatus.Failure),setTimeout(()=>{Os(SavableInputStatus.Ready),js?.({response:Ds.message??ERROR$1})},1e3)}):(Os(SavableInputStatus.Ready),Rs?.())},[Es,ws,js,Cs,Rs]);return jsxRuntimeExports.jsxs("button",{type:"button",disabled:[SavableInputStatus.Processing,SavableInputStatus.Done,SavableInputStatus.Failure].includes(ks),className:`rounded-xs px-4 py-2 font-bold hover:brightness-95 expand-btn cursor-pointer ${classFor(ds)} ${dn||""} text-sm md:text-lg`,onClick:()=>Ms(),style:{width:ms},...As,children:[ks===SavableInputStatus.Ready&&jsxRuntimeExports.jsxs("div",{style:{display:"flex"},children:[xs,bs]}),ks===SavableInputStatus.Processing&&jsxRuntimeExports.jsx(Saving,{colour:"#ffffff",width:20,height:20}),ks===SavableInputStatus.Done&&jsxRuntimeExports.jsx(Tick,{colour:"#ffffff",width:20,height:20}),ks===SavableInputStatus.Failure&&jsxRuntimeExports.jsx(Close,{colour:"#ffffff",width:20,height:20})]})}const Wrapper="_Wrapper_13ajs_1",Label$2="_Label_13ajs_9",Input="_Input_13ajs_18",styles$4={Wrapper,Label:Label$2,Input};function FormInput({className:ds,label:dn,name:ms,icon:xs,...bs}){return jsxRuntimeExports.jsxs("div",{className:`${ds||""}`,children:[dn&&jsxRuntimeExports.jsx("label",{className:`${styles$4.Label}`,htmlFor:ms,children:dn}),jsxRuntimeExports.jsx("div",{className:`${styles$4.Wrapper}`,children:jsxRuntimeExports.jsx("input",{className:`${styles$4.Input}`,name:ms,...bs,type:"text"})}),xs&&jsxRuntimeExports.jsx("div",{style:{position:"relative"},children:xs})]})}function validate$2(ds,dn){const ms={};return!ds||ds===""?ms.email="Email is required":/\S+@\S+\.\S+/.test(ds)||(ms.email="Email address is invali
5d"),(!dn||dn==="")&&(ms.password="Password is required"),ms}function validateEmail(ds){const dn={};return!ds||ds===""?dn.email="Email is required":/\S+@\S+\.\S+/.test(ds)||(dn.email="Email address is invalid"),dn}class SdkConfig{apiUrl;stripePk;prod;staging;static prod(){return console.info("PROD"),Builder.of().build()}static staging(){return console.info("STAGING"),Builder.of().stagingApi().build()}static local(){return console.info("LOCAL"),Builder.of().localApi().build()}constructor(dn,ms,xs,bs){this.apiUrl=dn,this.stripePk=ms,this.prod=xs,this.staging=bs}}class Builder{_apiUrl;_stripePk;_prod;_staging;static of(){return new Builder}constructor(){this._apiUrl="https://api.manualmagic.ai",this._stripePk="pk_live_51SVE94RvS4juRLRQFoqNL2HCVtWf7xLqN3FbYD0ulkeO7xAu4MkQ1a00H15bEZqxsA071g5pYtAGtSL9oiSww7DG005wdWQMWp",this._prod=!0,this._staging=!1}stagingApi(){return this._apiUrl="https://staging-api.manualmagic.ai",this._stripePk="pk_test_51SVE9DRugfjRNV4fYego10jhIeoEECVu4N5P9cQSLJk25xROyMlWrQ8g1r4yKidOk7ZxLdS6tPcsxLbmTvKM4JsC00mCRkMBbV",this._prod=!1,this._staging=!0,this}localApi(){return this._apiUrl="http://localhost:8090",this._stripePk="pk_test_51SVE9DRugfjRNV4fYego10jhIeoEECVu4N5P9cQSLJk25xROyMlWrQ8g1r4yKidOk7ZxLdS6tPcsxLbmTvKM4JsC00mCRkMBbV",this._prod=!1,this._staging=!1,this}apiUrl(dn){return this._apiUrl=dn,this}build(){return new SdkConfig(this._apiUrl,this._stripePk,this._prod,this._staging)}}function bind(ds,dn){return function(){return ds.apply(dn,arguments)}}const{toString:toString$2}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,hasOwnProperty$2=(({hasOwnProperty:ds})=>(dn,ms)=>ds.call(dn,ms))(Object.prototype),isUnsafeObjectKey=ds=>typeof ds=="string"&&(ds==="__proto__"||ds==="constructor"||ds==="prototype"),isPrototypeBoundary=(ds,dn,ms)=>ds===Object.prototype||!ms&&dn===null,isSafeAndFullyMutable=ds=>{if(!Object.isExtensible(ds))return!1;const dn=Object.getOwnPropertyNames(ds);return Object.getOwnPropertySymbols&&dn.push(...Object.getOwnPropertySymbols(ds)),dn.every(ms=>{if(isUnsafeObjectKey(ms))return!1;const xs=Object.getOwnPropertyDescriptor(ds,ms);return!!xs&&xs.configurable&&xs.writable===!0})},hasOwnInPrototypeChain=(ds,dn)=>{let ms=ds;const xs=[];for(;ms!=null;){if(xs.indexOf(ms)!==-1)return!1;xs.push(ms);const bs=getPrototypeOf(ms);if(isPrototypeBoundary(ms,bs,ms===ds))return!1;if(hasOwnProperty$2(ms,dn))return!0;ms=bs}return!1},getSafeProp=(ds,dn)=>ds!=null&&hasOwnInPrototypeChain(ds,dn)?ds[dn]:void 0,toSafeFlatObject=ds=>{if(ds==null||typeof ds!="object"&&typeof ds!="function")return ds;const dn=getPrototypeOf(ds);if(dn===null&&isSafeAndFullyMutable(ds))return ds;const ms=Object.create(null),xs=Object.create(null),bs=[];let Es=ds;for(;Es!=null&&bs.indexOf(Es)===-1;){bs.push(Es);const ws=Es===ds?dn:getPrototypeOf(Es);if(isPrototypeBoundary(Es,ws,Es===ds))break;const Rs=Object.getOwnPropertyNames(Es);Object.getOwnPropertySymbols&&Rs.push(...Object.getOwnPropertySymbols(Es));for(const js of Rs)isUnsafeObjectKey(js)||hasOwnProperty$2(xs,js)||(ms[js]=ds[js],xs[js]=!0);Es=ws}return ms},kindOf$1=(ds=>dn=>{const ms=toString$2.call(dn);return ds[ms]||(ds[ms]=ms.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=ds=>(ds=ds.toLowerCase(),dn=>kindOf$1(dn)===ds),typeOfTest=ds=>dn=>typeof dn===ds,{isArray}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer(ds){return ds!==null&&!isUndefined$1(ds)&&ds.constructor!==null&&!isUndefined$1(ds.constructor)&&isFunction$1(ds.constructor.isBuffer)&&ds.constructor.isBuffer(ds)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView(ds){let dn;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?dn=ArrayBuffer.isView(ds):dn=ds&&ds.buffer&&isArrayBuffer$1(ds.buffer),dn}const isString$1=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject=ds=>ds!==null&&typeof ds=="object",isBoolean=ds=>ds===!0||ds===!1,isPlainObject$1=ds=>{if(!isObject(ds))return!1;const dn=getPrototypeOf(ds);return(dn===null||dn===Object.prototype||getPrototypeOf(dn)===null)&&!hasOwnInPrototypeChain(ds,toStringTag)&&!hasOwnInPrototypeChain(ds,iterator)},isEmptyObject=ds=>{if(!isObject(ds)||isBuffer(ds))return!1;try{return Object.keys(ds).length===0&&Object.getPrototypeOf(ds)===Object.prototype}catch{return!1}},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isReactNativeBlob=ds=>!!(ds&&typeof ds.uri<"u"),isReactNative=ds=>ds&&typeof ds.getParts<"u",isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isSet$1=kindOfTest("Set"),isStream=ds=>isObject(ds)&&isFunction$1(ds.pipe);function getGlobal(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const G$4=getGlobal(),FormDataCtor=typeof G$4.FormData<"u"?G$4.FormData:void 0,isFormData=ds=>{if(!ds)return!1;if(FormDataCtor&&ds instanceof FormDataCtor)return!0;const dn=getPrototypeOf(ds);if(!dn||dn===Object.prototype||!isFunction$1(ds.append))return!1;const ms=kindOf$1(ds);return ms==="formdata"||ms==="object"&&isFunction$1(ds.toString)&&ds.toString()==="[object FormData]"},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream$3,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=ds=>ds.trim?ds.trim():ds.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(ds,dn,{allOwnKeys:ms=!1}={}){if(ds===null||typeof ds>"u")return;let xs,bs;if(typeof ds!="object"&&(ds=[ds]),isArray(ds))for(xs=0,bs=ds.length;xs<bs;xs++)dn.call(null,ds[xs],xs,ds);else{if(isBuffer(ds))return;const Es=ms?Object.getOwnPropertyNames(ds):Object.keys(ds),ws=Es.length;let Rs;for(xs=0;xs<ws;xs++)Rs=Es[xs],dn.call(null,ds[Rs],Rs,ds)}}function findKey$1(ds,dn){if(isBuffer(ds))return null;dn=dn.toLowerCase();const ms=Object.keys(ds);let xs=ms.length,bs;for(;xs-- >0;)if(bs=ms[xs],dn===bs.toLowerCase())return bs;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=ds=>!isUndefined$1(ds)&&ds!==_global;function merge$2(...ds){const{caseless:dn,skipUndefined:ms}=isContextDefined(this)&&this||{},xs={},bs=(Es,ws)=>
vendor: 4,964 bytes, line 5
5{if(ws==="__proto__"||ws==="constructor"||ws==="prototype")return;const Rs=dn&&typeof ws=="string"&&findKey$1(xs,ws)||ws,js=hasOwnProperty$2(xs,Rs)?xs[Rs]:void 0;isPlainObject$1(js)&&isPlainObject$1(Es)?xs[Rs]=merge$2(js,Es):isPlainObject$1(Es)?xs[Rs]=merge$2({},Es):isArray(Es)?xs[Rs]=Es.slice():(!ms||!isUndefined$1(Es))&&(xs[Rs]=Es)};for(let Es=0,ws=ds.length;Es<ws;Es++){const Rs=ds[Es];if(!Rs||isBuffer(Rs)||(forEach(Rs,bs),typeof Rs!="object"||isArray(Rs)))continue;const js=Object.getOwnPropertySymbols(Rs);for(let Cs=0;Cs<js.length;Cs++){const As=js[Cs];propertyIsEnumerable.call(Rs,As)&&bs(Rs[As],As)}}return xs}const extend$2=(ds,dn,ms,{allOwnKeys:xs}={})=>(forEach(dn,(bs,Es)=>{ms&&isFunction$1(bs)?Object.defineProperty(ds,Es,{__proto__:null,value:bind(bs,ms),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(ds,Es,{__proto__:null,value:bs,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:xs}),ds),stripBOM=ds=>(ds.charCodeAt(0)===65279&&(ds=ds.slice(1)),ds),inherits=(ds,dn,ms,xs)=>{ds.prototype=Object.create(dn.prototype,xs),Object.defineProperty(ds.prototype,"constructor",{__proto__:null,value:ds,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(ds,"super",{__proto__:null,value:dn.prototype}),ms&&Object.assign(ds.prototype,ms)},toFlatObject=(ds,dn,ms,xs)=>{let bs,Es,ws;const Rs={};if(dn=dn||{},ds==null)return dn;do{for(bs=Object.getOwnPropertyNames(ds),Es=bs.length;Es-- >0;)ws=bs[Es],(!xs||xs(ws,ds,dn))&&!Rs[ws]&&(dn[ws]=ds[ws],Rs[ws]=!0);ds=ms!==!1&&getPrototypeOf(ds)}while(ds&&(!ms||ms(ds,dn))&&ds!==Object.prototype);return dn},endsWith=(ds,dn,ms)=>{ds=String(ds),(ms===void 0||ms>ds.length)&&(ms=ds.length),ms-=dn.length;const xs=ds.indexOf(dn,ms);return xs!==-1&&xs===ms},toArray=ds=>{if(!ds)return null;if(isArray(ds))return ds;let dn=ds.length;if(!isNumber$1(dn))return null;const ms=new Array(dn);for(;dn-- >0;)ms[dn]=ds[dn];return ms},isTypedArray=(ds=>dn=>ds&&dn instanceof ds)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(ds,dn)=>{const xs=(ds&&ds[iterator]).call(ds);let bs;for(;(bs=xs.next())&&!bs.done;){const Es=bs.value;dn.call(ds,Es[0],Es[1])}},matchAll=(ds,dn)=>{let ms;const xs=[];for(;(ms=ds.exec(dn))!==null;)xs.push(ms);return xs},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase$1=ds=>ds.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(ms,xs,bs){return xs.toUpperCase()+bs}),{propertyIsEnumerable}=Object.prototype,isRegExp=kindOfTest("RegExp"),reduceDescriptors=(ds,dn)=>{const ms=Object.getOwnPropertyDescriptors(ds),xs={};forEach(ms,(bs,Es)=>{let ws;(ws=dn(bs,Es,ds))!==!1&&(xs[Es]=ws||bs)}),Object.defineProperties(ds,xs)},freezeMethods=ds=>{reduceDescriptors(ds,(dn,ms)=>{if(isFunction$1(ds)&&["arguments","caller","callee"].includes(ms))return!1;const xs=ds[ms];if(isFunction$1(xs)){if(dn.enumerable=!1,"writable"in dn){dn.writable=!1;return}dn.set||(dn.set=()=>{throw Error("Can not rewrite read-only method '"+ms+"'")})}})},toObjectSet=(ds,dn)=>{const ms={},xs=bs=>{bs.forEach(Es=>{ms[Es]=!0})};return isArray(ds)?xs(ds):xs(String(ds).split(dn)),ms},noop$1=()=>{},toFiniteNumber=(ds,dn)=>ds!=null&&Number.isFinite(ds=+ds)?ds:dn;function isSpecCompliantForm(ds){return!!(ds&&isFunction$1(ds.append)&&ds[toStringTag]==="FormData"&&ds[iterator])}const toJSONObject=ds=>{const dn=new WeakSet,ms=xs=>{if(isObject(xs)){if(dn.has(xs))return;if(isBuffer(xs))return xs;if(!("toJSON"in xs)){dn.add(xs);let bs;if(isSet$1(xs)){bs=[];for(const Es of xs){const ws=ms(Es);!isUndefined$1(ws)&&bs.push(ws)}}else bs=isArray(xs)?[]:{},forEach(xs,(Es,ws)=>{const Rs=ms(Es);!isUndefined$1(Rs)&&(bs[ws]=Rs)});return dn.delete(xs),bs}}return xs};return ms(ds)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=ds=>ds&&(isObject(ds)||isFunction$1(ds))&&isFunction$1(ds.then)&&isFunction$1(ds.catch),_setImmediate=((ds,dn)=>ds?setImmediate:dn?((ms,xs)=>(_global.addEventListener("message",({source:bs,data:Es})=>{bs===_global&&Es===ms&&xs.length&&xs.shift()()},!1),bs=>{xs.push(bs),_global.postMessage(ms,"*")}))(`axios@${Math.random()}`,[]):ms=>setTimeout(ms))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process$1<"u"&&process$1.nextTick||_setImmediate,isIterable=ds=>ds!=null&&isFunction$1(ds[iterator]),isSafeIterable=ds=>ds!=null&&hasOwnInPrototypeChain(ds,iterator)&&isIterable(ds),utils$2={isArray,isArrayBuffer:isArrayBuffer$1,isBuffer,isFormData,isArrayBufferView,isString:isString$1,isNumber:isNumber$1,isBoolean,isObject,isPlainObject:isPlainObject$1,isEmptyObject,isReadableStream:isReadableStream$3,isRequest,isResponse,isHeaders,isUndefined:isUndefined$1,isDate:isDate$1,isFile,isReactNativeBlob,isReactNative,isBlob:isBlob$1,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge:merge$2,extend:extend$2,trim,stripBOM,inherits,toFlatObject,kindOf:kindOf$1,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLF
5orm,hasOwnProperty:hasOwnProperty$2,hasOwnProp:hasOwnProperty$2,hasOwnInPrototypeChain,getSafeProp,toSafeFlatObject,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase:toCamelCase$1,noop:noop$1,toFiniteNumber,findKey:findKey$1,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable,isSafeIterable},ignoreDuplicateOf=utils$2.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=ds=>{const dn={};let ms,xs,bs;return ds&&ds.split(`
6`).forEach(function(ws){bs=ws.indexOf(":"),ms=ws.substring(0,bs).trim().toLowerCase(),xs=ws.substring(bs+1).trim();const Rs=utils$2.hasOwnProp(dn,ms);!ms||Rs&&utils$2.hasOwnProp(ignoreDuplicateOf,ms)||(ms==="set-cookie"?Rs?dn[ms].push(xs):dn[ms]=[xs]:dn[ms]=Rs?dn[ms]+", "+xs:xs)}),dn};function trimSPorHTAB(ds){let dn=0,ms=ds.length;for(;dn<ms;){const xs=ds.charCodeAt(dn);if(xs!==9&&xs!==32)break;dn+=1}for(;ms>dn;){const xs=ds.charCodeAt(ms-1);if(xs!==9&&xs!==32)break;ms-=1}return dn===0&&ms===ds.length?ds:ds.slice(dn,ms)}const INVALID_UNICODE_HEADER_VALUE_CHARS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),INVALID_BYTE_STRING_HEADER_VALUE_CHARS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sanitizeValue(ds,dn){return utils$2.isArray(ds)?ds.map(ms=>sanitizeValue(ms,dn)):trimSPorHTAB(String(ds).replace(dn,""))}const sanitizeHeaderValue=ds=>sanitizeValue(ds,INVALID_UNICODE_HEADER_VALUE_CHARS),sanitizeByteStringHeaderValue=ds=>sanitizeValue(ds,INVALID_BYTE_STRING_HEADER_VALUE_CHARS);function toByteStringHeaderObject(ds){const dn=Object.create(null);return utils$2.forEach(ds.toJSON(),(ms,xs)=>{dn[xs]=sanitizeByteStringHeaderValue(ms)}),dn}const $internals$1=Symbol("internals");function normalizeHeader(ds){return ds&&String(ds).trim().toLowerCase()}function normalizeValue(ds){return ds===!1||ds==null?ds:utils$2.isArray(ds)?ds.map(normalizeValue):sanitizeHeaderValue(String(ds))}function parseTokens(ds){const dn=Object.create(null),ms=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let xs;for(;xs=ms.exec(ds);)dn[xs[1]]=xs[2];return dn}const parameterNameRE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function trimOWS(ds){let dn=0,ms=ds.length;for(;dn<ms;){const xs=ds.charCodeAt(dn);if(xs!==9&&xs!==32)break;dn+=1}for(;ms>dn;){const xs=ds.charCodeAt(ms-1);if(xs!==9&&xs!==32)break;ms-=1}return dn===0&&ms===ds.length?ds:ds.slice(dn,ms)}function decodeQuotedString(ds){const dn=ds.length-1;if(dn<1||ds.charCodeAt(0)!==34||ds.charCodeAt(dn)!==34)return ds;let ms="";for(let xs=1;xs<dn;xs++){const bs=ds.charCodeAt(xs);if(bs===34||bs===92&&(xs+=1,xs>=dn))return ds;ms+=ds[xs]}return ms}function parseParameters(ds){const dn=Object.create(null),ms=String(ds);let xs=0,bs=!1,Es=!1;function ws(Rs){const js=trimOWS(ms.slice(xs,Rs)),Cs=js.indexOf("=");if(Cs<1)return;const As=trimOWS(js.slice(0,Cs));if(!parameterNameRE.test(As))return;const ks=As.toLowerCase();if(ks==="__proto__"||ks==="constructor"||ks==="prototype")return;const Os=trimOWS(js.slice(Cs+1));dn[ks]=decodeQuotedString(Os)}for(let Rs=0;Rs<ms.length;
vendor: 4,616 bytes, lines 6-7
6Rs++){const js=ms.charCodeAt(Rs);bs?Es?Es=!1:js===92?Es=!0:js===34&&(bs=!1):js===34?bs=!0:(js===44||js===59)&&(ws(Rs),xs=Rs+1)}return ws(ms.length),dn}const isValidHeaderName=ds=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(ds.trim());function matchHeaderValue(ds,dn,ms,xs,bs){if(utils$2.isFunction(xs))return xs.call(this,dn,ms);if(bs&&(dn=ms),!!utils$2.isString(dn)){if(utils$2.isString(xs))return dn.indexOf(xs)!==-1;if(utils$2.isRegExp(xs))return xs.test(dn)}}function formatHeader(ds){return ds.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(dn,ms,xs)=>ms.toUpperCase()+xs)}function buildAccessors(ds,dn){const ms=utils$2.toCamelCase(" "+dn);["get","set","has"].forEach(xs=>{Object.defineProperty(ds,xs+ms,{__proto__:null,value:function(bs,Es,ws){return this[xs].call(this,dn,bs,Es,ws)},configurable:!0})})}let AxiosHeaders$1=class{constructor(dn){dn&&this.set(dn)}set(dn,ms,xs){const bs=this;function Es(Rs,js,Cs){const As=normalizeHeader(js);if(!As)return;const ks=utils$2.findKey(bs,As);(!ks||bs[ks]===void 0||Cs===!0||Cs===void 0&&bs[ks]!==!1)&&(bs[ks||js]=normalizeValue(Rs))}const ws=(Rs,js)=>utils$2.forEach(Rs,(Cs,As)=>Es(Cs,As,js));if(utils$2.isPlainObject(dn)||dn instanceof this.constructor)ws(dn,ms);else if(utils$2.isString(dn)&&(dn=dn.trim())&&!isValidHeaderName(dn))ws(parseHeaders(dn),ms);else if(utils$2.isObject(dn)&&utils$2.isSafeIterable(dn)){let Rs=Object.create(null),js,Cs;for(const As of dn){if(!utils$2.isArray(As))throw new TypeError("Object iterator must return a key-value pair");Cs=As[0],utils$2.hasOwnProp(Rs,Cs)?(js=Rs[Cs],Rs[Cs]=utils$2.isArray(js)?[...js,As[1]]:[js,As[1]]):Rs[Cs]=As[1]}ws(Rs,ms)}else dn!=null&&Es(ms,dn,xs);return this}get(dn,ms){if(dn=normalizeHeader(dn),dn){const xs=utils$2.findKey(this,dn);if(xs){const bs=this[xs];if(!ms)return bs;if(ms===!0)return parseTokens(bs);if(utils$2.isFunction(ms))return ms.call(this,bs,xs);if(utils$2.isRegExp(ms))return ms.exec(bs);throw new TypeError("parser must be boolean|regexp|function")}}}has(dn,ms){if(dn=normalizeHeader(dn),dn){const xs=utils$2.findKey(this,dn);return!!(xs&&this[xs]!==void 0&&(!ms||matchHeaderValue(this,this[xs],xs,ms)))}return!1}delete(dn,ms){const xs=this;let bs=!1;function Es(ws){if(ws=normalizeHeader(ws),ws){const Rs=utils$2.findKey(xs,ws);Rs&&(!ms||matchHeaderValue(xs,xs[Rs],Rs,ms))&&(delete xs[Rs],bs=!0)}}return utils$2.isArray(dn)?dn.forEach(Es):Es(dn),bs}clear(dn){const ms=Object.keys(this);let xs=ms.length,bs=!1;for(;xs--;){const Es=ms[xs];(!dn||matchHeaderValue(this,this[Es],Es,dn,!0))&&(delete this[Es],bs=!0)}return bs}normalize(dn){const ms=this,xs={};return utils$2.forEach(this,(bs,Es)=>{const ws=utils$2.findKey(xs,Es);if(ws){ms[ws]=normalizeValue(bs),delete ms[Es];return}const Rs=dn?formatHeader(Es):String(Es).trim();Rs!==Es&&delete ms[Es],ms[Rs]=normalizeValue(bs),xs[Rs]=!0}),this}concat(...dn){return this.constructor.concat(this,...dn)}toJSON(dn){const ms=Object.create(null);return utils$2.forEach(this,(xs,bs)=>{xs!=null&&xs!==!1&&(ms[bs]=dn&&utils$2.isArray(xs)?xs.join(", "):xs)}),ms}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([dn,ms])=>dn+": "+ms).join(`
7`)}getSetCookie(){const dn=this.get("set-cookie");return utils$2.isArray(dn)?dn:dn==null||dn===!1?[]:[dn]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(dn){return dn instanceof this?dn:new this(dn)}static parseParameters(dn){return parseParameters(dn)}static concat(dn,...ms){const xs=new this(dn);return ms.forEach(bs=>xs.set(bs)),xs}static accessor(dn){const xs=(this[$internals$1]=this[$internals$1]={accessors:{}}).accessors,bs=this.prototype;function Es(ws){const Rs=normalizeHeader(ws);xs[Rs]||(buildAccessors(bs,ws),xs[Rs]=!0)}return utils$2.isArray(dn)?dn.forEach(Es):Es(dn),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$2.reduceDescriptors(AxiosHeaders$1.prototype,({value:ds},dn)=>{let ms=dn[0].toUpperCase()+dn.slice(1);return{get:()=>ds,set(xs){this[ms]=xs}}});utils$2.freezeMethods(AxiosHeaders$1);const REDACTED="[REDACTED ****]";function hasOwnOrPrototypeToJSON(ds){if(utils$2.hasOwnProp(ds,"toJSON"))return!0;let dn=Object.getPrototypeOf(ds);for(;dn&&dn!==Object.prototype;){if(utils$2.hasOwnProp(dn,"toJSON"))return!0;dn=Object.getPrototypeOf(dn)}return!1}function redactConfig(ds,dn){const ms=new Set(dn.map(Es=>String(Es).toLowerCase())),xs=[],bs=Es=>{if(Es===null||typeof Es!="object"||utils$2.isBuffer(Es))return Es;if(xs.indexOf(Es)!==-1)return;Es instanceof AxiosHeaders$1&&(Es=Es.toJSON()),xs.push(Es);let ws;
7if(utils$2.isArray(Es))ws=[],Es.forEach((Rs,js)=>{const Cs=bs(Rs);utils$2.isUndefined(Cs)||(ws[js]=Cs)});else{if(!utils$2.isPlainObject(Es)&&hasOwnOrPrototypeToJSON(Es))return xs.pop(),Es;ws=Object.create(null);for(const[Rs,js]of Object.entries(Es)){const Cs=ms.has(Rs.toLowerCase())?REDACTED:bs(js);utils$2.isUndefined(Cs)||(ws[Rs]=Cs)}}return xs.pop(),ws};return bs(ds)}function stringifySafely$1(ds){try{return String(ds)}catch{return""}}function aggregateErrorMessage(ds){return ds.errors.map(ms=>{try{return ms&&ms.message?stringifySafely$1(ms.message):stringifySafely$1(ms)}catch{return""}}).filter(Boolean).join("; ")||ds.name||"AggregateError"}let AxiosError$1=class g0 extends Error{static from(dn,ms,xs,bs,Es,ws){let Rs=dn.message;!Rs&&utils$2.isArray(dn.errors)&&dn.errors.length&&(Rs=aggregateErrorMessage(dn));const js=new g0(Rs,ms||dn.code,xs,bs,Es);return Object.defineProperty(js,"cause",{__proto__:null,value:dn,writable:!0,enumerable:!1,configurable:!0}),js.name=dn.name,dn.status!=null&&js.status==null&&(js.status=dn.status),ws&&Object.assign(js,ws),js}constructor(dn,ms,xs,bs,Es){super(dn),Object.defineProperty(this,"message",{__proto__:null,value:dn,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,ms&&(this.code=ms),xs&&(this.config=xs),bs&&(this.request=bs),Es&&(this.response=Es,this.status=Es.status)}toJSON(){const dn=this.config,ms=dn&&utils$2.hasOwnProp(dn,"redact")?dn.redact:void 0,xs=utils$2.isArray(ms)&&ms.length>0?redactConfig(dn,ms):utils$2.toJSONObject(dn);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xs,code:this.code,status:this.status}}};AxiosError$1.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";AxiosError$1.ERR_BAD_OPTION="ERR_BAD_OPTION";AxiosError$1.ECONNABORTED="ECONNABORTED";AxiosError$1.ETIMEDOUT="ETIMEDOUT";AxiosError$1.ECONNREFUSED="ECONNREFUSED";AxiosError$1.ERR_NETWORK="ERR_NETWORK";AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";AxiosError$1.ERR_DEPRECATED="ERR_DEPRECATED";AxiosError$1.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";AxiosError$1.ERR_BAD_REQUEST="ERR_BAD_REQUEST";AxiosError$1.ERR_CANCELED="ERR_CANCELED";AxiosError$1.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";AxiosError$1.ERR_INVALID_URL="ERR_INVALID_URL";AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const httpAdapter=null,DEFAULT_FORM_DATA_MAX_DEPTH=100;function isVisitable(ds){return utils$2.isPlainObject(ds)||utils$2.isArray(ds)}function removeBrackets(ds){return utils$2.endsWith(ds,"[]")?ds.slice(0,-2):ds}function renderKey(ds,dn,ms){return ds?ds.concat(dn).map(function(bs,Es){return bs=removeBrackets(bs),!ms&&Es?"["+bs+"]":bs}).join(ms?".":""):dn}function isFlatArray(ds){return utils$2.isArray(ds)&&!ds.some(isVisitable)}const predicates=utils$2.toFlatObject(utils$2,{},null,function(dn){return/^is[A-Z]/.test(dn)});function toFormData$1(ds,dn,ms){if(!utils$2.isObject(ds))throw new TypeError("target must be an object");dn=dn||new FormData;const xs=(Fs,Us)=>{const Gs=utils$2.getSafeProp(ms,Fs);return utils$2.isUndefined(Gs)?Us:Gs},bs=xs("metaTokens",!0),Es=xs("visitor")||Ps,ws=xs("dots",!1),Rs=xs("indexes",!1),js=xs("Blob")||typeof Blob<"u"&&Blob,Cs=xs("maxDepth",DEFAULT_FORM_DATA_MAX_DEPTH),As=js&&utils$2.isSpecCompliantForm(dn),ks=[];if(!utils$2.isFunction(Es))throw new TypeError("visitor must be a function");function Os(Fs){if(Fs===null)return"";if(utils$2.isDate(Fs))return Fs.toISOString();if(utils$2.isBoolean(Fs))return Fs.toString();if(!As&&utils$2.isBlob(Fs))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");if(utils$2.isArrayBuffer(Fs)||utils$2.isTypedArray(Fs)){if(As&&typeof js=="function")return new js([Fs]);throw new AxiosError$1("Blob is not supported. Use a Buffer instead.",AxiosError$1.ERR_NOT_SUPPORT)}return Fs}function Ms(Fs){if(Fs>Cs)throw new AxiosError$1("Object is too deeply nested ("+Fs+" levels). Max depth: "+Cs,AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ds(Fs,Us){if(Cs===1/0)return JSON.stringify(Fs);const Gs=[];return JSON.stringify(Fs,function(Ws,Zs){if(!utils$2.isObject(Zs))return Zs;for(;Gs.length&&Gs[Gs.length-1]!==this;)Gs.pop();return Gs.push(Zs),Ms(Us+Gs.length-1),Zs})}function Ps(Fs,Us,Gs){let Js=Fs;if(utils$2.isReactNative(dn)&&utils$2.isReactNativeBlob(Fs))return dn.append(renderKey(Gs,Us,ws),Os(Fs)),!1;if(Fs&&!Gs&&typeof Fs=="object"){if(utils$2.endsWith(Us,"{}"))Us=bs?Us:Us.slice(0,-2),Fs=Ds(Fs,1);else if(utils$2.isArray(Fs)&&isFlatArray(Fs)||(utils$2.isFileList(Fs)||utils$2.endsWith(Us,"[]"))&&(Js=utils$2.toArray(Fs)))return Us=removeBrackets(Us),Js.forEac
7h(function(Zs,Ys){!(utils$2.isUndefined(Zs)||Zs===null)&&dn.append(Rs===!0?renderKey([Us],Ys,ws):Rs===null?Us:Us+"[]",Os(Zs))}),!1}return isVisitable(Fs)?!0:(dn.append(renderKey(Gs,Us,ws),Os(Fs)),!1)}const Ls=Object.assign(predicates,{defaultVisitor:Ps,convertValue:Os,isVisitable});function Bs(Fs,Us,Gs=0){if(!utils$2.isUndefined(Fs)){if(Ms(Gs),ks.indexOf(Fs)!==-1)throw new Error("Circular reference detected in "+Us.join("."));ks.push(Fs),utils$2.forEach(Fs,function(Ws,Zs){(!(utils$2.isUndefined(Ws)||Ws===null)&&Es.call(dn,Ws,utils$2.isString(Zs)?Zs.trim():Zs,Us,Ls))===!0&&Bs(Ws,Us?Us.concat(Zs):[Zs],Gs+1)}),ks.pop()}}if(!utils$2.isObject(ds))throw new TypeError("data must be an object");return Bs(ds),dn}function encode$1(ds){const dn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(ds).replace(/[!'()~]|%20/g,function(xs){return dn[xs]})}function AxiosURLSearchParams(ds,dn){this._pairs=[],ds&&toFormData$1(ds,this,dn)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(dn,ms){this._pairs.push([dn,ms])};prototype.toString=function(dn){const ms=dn?xs=>dn.call(this,xs,encode$1):encode$1;return this._pairs.map(function(bs){return ms(bs[0])+"="+ms(bs[1])},"").join("&")};function encode(ds){return encodeURIComponent(ds).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(ds,dn,ms){if(!dn)return ds;ds=ds||"";const xs=utils$2.isFunction(ms)?{serialize:ms}:ms,bs=utils$2.getSafeProp(xs,"encode")||encode,Es=utils$2.getSafeProp(xs,"serialize");let ws;if(Es?ws=Es(dn,xs):ws=utils$2.isURLSearchParams(dn)?dn.toString():new AxiosURLSearchParams(dn,xs).toString(bs),ws){const Rs=ds.indexOf("#");Rs!==-1&&(ds=ds.slice(0,Rs)),ds+=(ds.indexOf("?")===-1?"?":"&")+ws}return ds}const $internals=Symbol("internals");function countHandlers(ds){return ds?ds.length:0}function trimHandlers(ds){if(ds)for(;ds.length&&ds[ds.length-1]===null;)ds.pop()}function syncHandlerEntries(ds,dn){const ms=ds.handlers,xs=countHandlers(ms);ms!==dn.handlersRef?(dn.handlersRef=ms,dn.handlerEntries.clear()):xs!==dn.handlersLength&&(xs?dn.handlerEntries.forEach(function(Es,ws){ms[Es.index]!==Es.handler&&dn.handlerEntries.delete(ws)}):dn.handlerEntries.clear()),dn.handlersLength=xs}class InterceptorManager{constructor(){this.handlers=[],this[$internals]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(dn,ms,xs){const bs={fulfilled:dn,rejected:ms,synchronous:xs?xs.synchronous:!1,runWhen:xs?xs.runWhen:null},Es=this[$internals];this.handlers==null&&(this.handlers=[]),syncHandlerEntries(this,Es);const ws=Es.nextId++;return this.handlers.push(bs),Es.handlerEntries.set(ws,{handler:bs,index:this.handlers.length-1}),Es.handlersLength=this.handlers.length,ws}eject(dn){const ms=this[$internals];syncHandlerEntries(this,ms);const xs=ms.handlerEntries.get(dn);if(xs){if(ms.handlerEntries.delete(dn),this.handlers[xs.index]!==xs.handler)return;this.handlers[xs.index]=null,ms.iterationDepth||(trimHandlers(this.handlers),ms.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],syncHandlerEntries(this,this[$internals]))}forEach(dn){const ms=this[$internals];syncHandlerEntries(this,ms),ms.iterationDepth++;try{utils$2.forEach(this.handlers,function(bs){bs!==null&&dn(bs)})}finally{--ms.iterationDepth||(syncHandlerEntries(this,ms),trimHandlers(this.handlers),ms.handlersLength=countHandlers(this.handlers))}}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils$1,...platform$1};function toURLEncodedForm(ds,dn){return toFormData$1(ds,new platform.classes.URLSearchParams,{visitor:function(ms,xs,bs,Es){return platform.isNode&&utils$2.isBuffer(ms)?(this.append(xs,ms.toString("base64")),!1):Es.defaultVisitor.apply(this,arguments)},...dn})}const MAX_DEPTH=DEFAULT_FORM_DATA_MAX_DEPTH;function throwIfDepthExceeded(ds){if(ds>MAX_DEPTH)throw new AxiosError$1("FormData field is too deeply nested ("+ds+" levels). Max depth: "+MAX_DEPTH,AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED)}function parsePropPath(ds){const dn=[],ms=/[^.[\]]+|\[([^.[\]]*)]/g;let xs;for(;(xs=ms.exec(ds))!==null;)throwIfDepthExceeded(dn.length),dn.push(xs[0]==="[]"?"":xs[1]||xs[0]);return dn}function arrayToObject(ds){const dn={},ms=Object.keys(ds);let xs;const bs=ms.length;let Es;for(xs=0;xs<bs;xs++)Es=ms[xs],dn[Es]=ds[Es];return dn}function formDataToJSON(ds){function dn(ms,xs,bs,Es){throwIfDepthExceeded(Es);let ws=ms[Es++];if(ws==="__proto__")return!0;const Rs=Number.isFinite(+ws),js=Es>=ms.length;return ws=!ws&&utils$2.isArray(bs)?bs.length:ws,js?(utils$2.hasOwnProp(bs,ws)?bs[ws]=utils$2.isArray(bs[ws])?bs[ws].concat(xs):[bs[ws],xs]:bs[ws]=xs,!Rs):((!utils$2.hasOwnProp(bs,ws)||!utils$2.isObject(bs[ws]
vendor: 14,673 bytes, line 7
7))&&(bs[ws]=[]),dn(ms,xs,bs[ws],Es)&&utils$2.isArray(bs[ws])&&(bs[ws]=arrayToObject(bs[ws])),!Rs)}if(utils$2.isFormData(ds)&&utils$2.isFunction(ds.entries)){const ms={};return utils$2.forEachEntry(ds,(xs,bs)=>{dn(parsePropPath(xs),bs,ms,0)}),ms}return null}const methodList=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),own$4=(ds,dn)=>ds!=null&&utils$2.hasOwnProp(ds,dn)?ds[dn]:void 0;function stringifySafely(ds,dn,ms){if(utils$2.isString(ds))try{return(dn||JSON.parse)(ds),utils$2.trim(ds)}catch(xs){if(xs.name!=="SyntaxError")throw xs}return(ms||JSON.stringify)(ds)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(dn,ms){const xs=ms.getContentType()||"",bs=xs.indexOf("application/json")>-1,Es=utils$2.isObject(dn);if(Es&&utils$2.isHTMLForm(dn)&&(dn=new FormData(dn)),utils$2.isFormData(dn))return bs?JSON.stringify(formDataToJSON(dn)):dn;if(utils$2.isArrayBuffer(dn)||utils$2.isBuffer(dn)||utils$2.isStream(dn)||utils$2.isFile(dn)||utils$2.isBlob(dn)||utils$2.isReadableStream(dn))return dn;if(utils$2.isArrayBufferView(dn))return dn.buffer;if(utils$2.isURLSearchParams(dn))return ms.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),dn.toString();let Rs;if(Es){const js=own$4(this,"formSerializer");if(xs.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(dn,js).toString();if((Rs=utils$2.isFileList(dn))||xs.indexOf("multipart/form-data")>-1){const Cs=own$4(this,"env"),As=Cs&&Cs.FormData;return toFormData$1(Rs?{"files[]":dn}:dn,As&&new As,js)}}return Es||bs?(ms.setContentType("application/json",!1),stringifySafely(dn)):dn}],transformResponse:[function(dn){const ms=own$4(this,"transitional")||defaults$1.transitional,xs=ms&&ms.forcedJSONParsing,bs=own$4(this,"responseType"),Es=bs==="json";if(utils$2.isResponse(dn)||utils$2.isReadableStream(dn))return dn;if(dn&&utils$2.isString(dn)&&(xs&&!bs||Es)){const Rs=!(ms&&ms.silentJSONParsing)&&Es;try{return JSON.parse(dn,own$4(this,"parseReviver"))}catch(js){if(Rs)throw js.name==="SyntaxError"?AxiosError$1.from(js,AxiosError$1.ERR_BAD_RESPONSE,this,null,own$4(this,"response")):js}}return dn}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(dn){return dn>=200&&dn<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$2.forEach(methodList,ds=>{defaults$1.headers[ds]={}});function transformData(ds,dn){const ms=this||defaults$1,xs=dn||ms,bs=AxiosHeaders$1.from(xs.headers);let Es=xs.data;return utils$2.forEach(ds,function(Rs){Es=Rs.call(ms,Es,bs.normalize(),dn?dn.status:void 0)}),bs.normalize(),Es}function isCancel$1(ds){return!!(ds&&ds.__CANCEL__)}let CanceledError$1=class extends AxiosError$1{constructor(dn,ms,xs){super(dn??"canceled",AxiosError$1.ERR_CANCELED,ms,xs),this.name="CanceledError",this.__CANCEL__=!0}};function settle(ds,dn,ms){const xs=ms.config.validateStatus;!ms.status||!xs||xs(ms.status)?ds(ms):dn(new AxiosError$1("Request failed with status code "+ms.status,ms.status>=400&&ms.status<500?AxiosError$1.ERR_BAD_REQUEST:AxiosError$1.ERR_BAD_RESPONSE,ms.config,ms.request,ms))}const urlParserControlCharacters=/[\t\n\r]/g;function normalizeURLForProtocolCheck(ds){if(typeof ds!="string")return ds;let dn=0;for(;dn<ds.length&&ds.charCodeAt(dn)<=32;)dn++;return ds.slice(dn).replace(urlParserControlCharacters,"")}function parseProtocol(ds){const dn=/^([-+\w]{1,25}):(?:\/\/)?/.exec(ds);return dn&&dn[1]||""}function speedometer(ds,dn){ds=ds||10;const ms=new Array(ds),xs=new Array(ds);let bs=0,Es=0,ws;return dn=dn!==void 0?dn:1e3,function(js){const Cs=Date.now(),As=xs[Es];ws||(ws=Cs),ms[bs]=js,xs[bs]=Cs;let ks=Es,Os=0;for(;ks!==bs;)Os+=ms[ks++],ks=ks%ds;if(bs=(bs+1)%ds,bs===Es&&(Es=(Es+1)%ds),Cs-ws<dn)return;const Ms=As&&Cs-As;return Ms?Math.round(Os*1e3/Ms):void 0}}function throttle(ds,dn){let ms=0,xs=1e3/dn,bs,Es;const ws=(As,ks=Date.now())=>{ms=ks,bs=null,Es&&(clearTimeout(Es),Es=null),ds(...As)};return[(...As)=>{const ks=Date.now(),Os=ks-ms;Os>=xs?ws(As,ks):(bs=As,Es||(Es=setTimeout(()=>{Es=null,ws(bs)},xs-Os)))},()=>bs&&ws(bs),(...As)=>ws(As)]}const progressEventReducer=(ds,dn,ms=3)=>{let xs=0;const bs=speedometer(50,250);return throttle(Es=>{if(!Es||!utils$2.isNumber(Es.loaded))return;const ws=Es.loaded,Rs=Es.lengthComputable?Es.total:void 0,js=Math.max(0,Rs!=null?Math.min(ws,Rs):ws),Cs=Math.max(0,js-xs),As=bs(Cs);xs=Math.max(xs,js);const ks={loaded:js,total:Rs,progress:Rs?js/Rs:void 0,bytes:Cs,rate:As||void 0,estimated:As&&Rs?(Rs-js)/As:void 0,event:Es,lengthComputable:Rs!=null,[dn?"download":"upload"]:!0};ds(ks)},ms)},progressEventDecorator=(ds,dn)=>{const ms=ds!=null;return[xs=>dn[0]({lengthComputable:ms,total:ds,loaded:xs}),dn[1]]},asyncDecorator=(ds,dn=utils$2.asap)=>(...ms)=>dn(()=>ds(...ms)),isURLSameOrigin=platform.hasStandardBrowserEnv?((ds,dn)=>ms=>(ms=new URL(ms,platform.origin),ds.protocol===ms.protocol&&ds.host===ms.host&&(dn||ds.port===ms.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(ds,dn,ms,xs,bs,Es,ws){if(typeof document>"u")return;const Rs=[`${ds}=${encodeURIComponent(dn)}`];utils$2.isNumber(ms)&&Rs.push(`expires=${new Date(ms).toUTCString()}`),utils$2.isString(xs)&&Rs.push(`path=${xs}`),utils$2.isString(bs)&&Rs.push(`domain=${bs}`),Es===!0&&Rs.push("secure"),utils$2.isString(ws)&&Rs.push(`SameSite=${ws}`),document.cookie=Rs.join("; ")},read(ds){if(typeof document>"u")return null;const dn=document.cookie.split(";");for(let ms=0;ms<dn.length;ms++){const xs=dn[ms].replace(/^\s+/,""),bs=xs.indexOf("=");if(bs!==-1&&xs.slice(0,bs)===ds)try{return decodeURIComponent(xs.slice(bs+1))}catch{return xs.slice(bs+1)}}return null},remove(ds){this.write(ds,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(ds){return typeof ds!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(ds)}function combineURLs(ds,dn){if(!dn)return ds;let ms=ds.length;for(;ms>0&&ds.charCodeAt(ms-1)===47;)ms--;return ds.slice(0,ms)+"/"+dn.replace(/^\/+/,"")}const malformedHttpProtocol=/^https?:(?!\/\/)/i;function redactFragment(ds){return ds&&ds.replace(/(^|&)([^=&]*=)?[^&]+/g,(dn,ms,xs="")=>`${ms}${xs}${REDACTED}`)}function redactSensitiveURLParts(ds){const dn=ds.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${REDACTED}@`),ms=dn.indexOf("#"),bs=(ms===-1?dn:dn.slice(0,ms)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${REDACTED}`);return ms===-1?bs:`${bs}#${redactFragment(dn.slice(ms+1))}`}function assertValidHttpProtocolURL(ds,dn){if(typeof ds=="string"){const ms=normalizeURLForProtocolCheck(ds);if(malformedHttpProtocol.test(ms))throw new AxiosError$1(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(ms))}: missing "//" after protocol`,AxiosError$1.ERR_INVALID_URL,dn)}}function buildFullPath(ds,dn,ms,xs){assertValidHttpProtocolURL(dn,xs);let bs=!isAbsoluteURL(dn);return ds&&(bs||ms===!1)?(assertValidHttpProtocolURL(ds,xs),combineURLs(ds,dn)):dn}const headersToObject=ds=>ds instanceof AxiosHeaders$1?{...ds}:ds,ownEnumerableKeys=ds=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(ds).concat(Object.getOwnPropertySymbols(ds).filter(dn=>Object.getOwnPropertyDescriptor(ds,dn).enumerable)):Object.keys(ds);function mergeConfig$1(ds,dn){ds=ds||{},dn=dn||{};const ms=Object.create(null);Object.defineProperty(ms,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function xs(As,ks,Os,Ms){return utils$2.isPlainObject(As)&&utils$2.isPlainObject(ks)?utils$2.merge.call({caseless:Ms},As,ks):utils$2.isPlainObject(ks)?utils$2.merge({},ks):utils$2.isArray(ks)?ks.slice():ks}function bs(As,ks,Os,Ms){if(utils$2.isUndefined(ks)){if(!utils$2.isUndefined(As))return xs(void 0,As,Os,Ms)}else return xs(As,ks,Os,Ms)}function Es(As,ks){if(!utils$2.isUndefined(ks))return xs(void 0,ks)}function ws(As,ks){if(utils$2.isUndefined(ks)){if(!utils$2.isUndefined(As))return xs(void 0,As)}else return xs(void 0,ks)}function Rs(As){const ks=utils$2.hasOwnProp(dn,"transitional")?dn.transitional:void 0;if(!utils$2.isUndefined(ks))if(utils$2.isPlainObject(ks)){if(utils$2.hasOwnProp(ks,As))return ks[As]}else return;const Os=utils$2.hasOwnProp(ds,"transitional")?ds.transitional:void 0;if(utils$2.isPlainObject(Os)&&utils$2.hasOwnProp(Os,As))return Os[As]}function js(As,ks,Os){if(utils$2.hasOwnProp(dn,Os))return xs(As,ks);if(utils$2.hasOwnProp(ds,Os))return xs(void 0,As)}const Cs={url:Es,method:Es,data:Es,baseURL:ws,transformRequest:ws,transformResponse:ws,paramsSerializer:ws,timeout:ws,timeoutErrorMessage:ws,withCredentials:ws,withXSRFToken:ws,adapter:ws,responseType:ws,xsrfCookieName:ws,xsrfHeaderName:ws,onUploadProgress:ws,onDownloadProgress:ws,decompress:ws,maxContentLength:ws,maxBodyLength:ws,beforeRedirect:ws,transport:ws,httpAgent:ws,httpsAgent:ws,cancelToken:ws,socketPath:ws,allowedSocketPaths:ws,responseEncoding:ws,validateStatus:js,headers:(As,ks,Os)=>bs(headersToObject(As),headersToObject(ks),Os,!0)};return utils$2.forEach(ownEnumerableKeys({...ds,...dn}),function(ks){if(ks==="__proto__"||ks==="constructor"||ks==="prototype")return;const Os=utils$2.hasOwnProp(Cs,ks)?Cs[ks]:bs,Ms=utils$2.hasOwnProp(ds,ks)?ds[ks]:void 0,Ds=utils$2.hasOwnProp(dn,ks)?dn[ks]:void 0,Ps=Os(Ms,Ds,ks);utils$2.isUndefined(Ps)&&Os!==js||(ms[ks]=Ps)}),utils$2.hasOwnProp(dn,"validateStatus")&&utils$2.isUndefined(dn.validateStatus)&&Rs("validateStatusUndefinedResolves")===!1&&(utils$2.hasOwnProp(ds,"validateStatus")?ms.validateStatus=xs(void 0,ds.validateStatus):delete ms.validateStatus),ms}const FORM_DATA_CONTENT_HEADERS=["content-type","content-length"];function setFormDataHeaders(ds,dn,ms){if(ms!=="content-only"){ds.set(dn);return}Object.entries(dn||{}).forEach(([xs,bs])=>{FORM_DATA_CONTENT_HEADERS.includes(xs.toLowerCase())&&ds.set(xs,bs)})}const encodeUTF8$1=ds=>encodeURIComponent(ds).replace(/%([0-9A-F]{2})/gi,(dn,ms)=>String.fromCharCode(parseInt(ms,16)));function resolveConfig(ds){const dn=mergeConfig$1({},ds),ms=Os=>utils$2.hasOwnProp(dn,Os)?dn[Os]:void 0,xs=ms("data");let bs=ms("withXSRFToken");const Es=ms("xsrfHeaderName"),ws=ms("xsrfCookieName");let Rs=ms("headers");const js=ms("auth"),Cs=ms("baseURL"),As=ms("allowAbsoluteUrls"),ks=ms("url");if(dn.headers=Rs=AxiosHeaders$1.from(Rs),dn.url=buildURL(buildFullPath(Cs,ks,As,dn),ms("params"),ms("paramsSerializer")),js){const Os=utils$2.getSafeProp(js,"username")||"",Ms=utils$2.getSafeProp(js,"password")||"";try{Rs.set("Authorization","Basic "+btoa(Os+":"+(Ms?encodeUTF8$1(Ms):"")))}catch(Ds){throw AxiosError$1.from(Ds,AxiosError$1.ERR_BAD_OPTION_VALUE,ds)}}if(utils$2.isFormData(xs)){const Os=utils$2.getSafeProp(xs,"getHeaders");platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv||utils$2.isReactNative(xs)?Rs.setContentType(void 0):utils$2.isFunction(Os)&&setFormDataHeaders(Rs,Os.call(xs),ms("formDataHeaderPolicy"))}if(platform.hasStandardBrowserEnv&&(utils$2.isFunction(bs)&&(bs=bs(dn)),bs===!0||bs==null&&isURLSameOrigin(dn.url))){const Ms=Es&&ws&&cookies.read(ws);Ms&&Rs.set(Es,Ms)}return dn}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(ds){return new Promise(function(ms,xs){const bs=resolveConfig(ds);let Es=bs.data;const ws=AxiosHeaders$1.from(bs.headers).normalize();let{responseType:Rs,onUploadProgress:js,onDownloadProgress:Cs}=bs,As,ks,Os,Ms,Ds,Ps;function Ls(){Ms&&Ms(),Ds&&Ds(),bs.cancelToken&&bs.cancelToken.unsubscribe(As),bs.signal&&bs.signal.removeEventListener("abort",As)}let Bs=new XMLHttpRequest;Bs.open(bs.method.toUpperCase(),bs.url,!0),Bs.timeout=bs.timeout;function Fs(Gs){if(!Bs)return;if(Bs.status===0&&(parseProtocol(normalizeURLForProtocolCheck(bs.url))||parseProtocol(platform.origin))!=="file"&&!(Bs.responseURL&&Bs.responseURL.startsWith("file:"))){xs(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,ds,Bs)),Ls(),Bs=null;return}try{Gs?Ps&&Ps(Gs):Ds&&Ds()}catch(Ys){setTimeout(()=>{throw Ys})}if(!Bs)return;const Js=AxiosHeaders$1.from("getAllResponseHeaders"in Bs&&Bs.getAllResponseHeaders()),Zs={data:!Rs||Rs==="text"||Rs==="json"?Bs.responseText:Bs.response,status:Bs.status,statusText:Bs.statusText,headers:Js,config:ds,request:Bs};settle(function(Qs){ms(Qs),Ls()},function(Qs){xs(Qs),Ls()},Zs),Bs=null}"onloadend"in Bs?Bs.onloadend=Fs:Bs.onreadystatechange=function(){!Bs||Bs.readyState!==4||Bs.status===0&&!(Bs.responseURL&&Bs.responseURL.startsWith("file:"))||setTimeout(Fs)},Bs.onabort=function(){Bs&&(xs(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,ds,Bs)),Ls(),Bs=null)},Bs.onerror=function(Js){const Ws=Js&&Js.message?Js.message:"Network Error",Zs=new AxiosError$1(Ws,AxiosError$1.ERR_NETWORK,ds,Bs);Zs.event=Js||null,xs(Zs),Ls(),Bs=null},Bs.ontimeout=function(){let Js=bs.timeout?"timeout of "+bs.timeout+"ms exceeded":"timeout exceeded";const Ws=bs.transitional||transitionalDefaults;bs.timeoutErrorMessage&&(Js=bs.timeoutErrorMessage),xs(new AxiosError$1(Js,Ws.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,ds,Bs)),Ls(),Bs=null},Es===void 0&&ws.setContentType(null),"setRequestHeader"in Bs&&utils$2.forEach(toByteStringHeaderObject(ws),function(Js,Ws){Bs.setRequestHeader(Ws,Js)}),utils$2.isUndefined(bs.withCredentials)||(Bs.withCredentials=!!bs.withCredentials),Rs&&Rs!=="json"&&(Bs.responseType=bs.responseType),Cs&&([Os,Ds,Ps]=progressEventReducer(Cs,!0),Bs.addEventListener("progress",Os)),js&&Bs.upload&&([ks,Ms]=progressEventReducer(js),Bs.upload.addEventListener("progress",ks),Bs.upload.addEventListener("loadend",Ms)),(bs.cancelToken||bs.signal)&&(As=Gs=>{Bs&&(xs(!Gs||Gs.type?new CanceledError$1(null,ds,Bs):Gs),Bs.abort(),Ls(),Bs=null)},bs.cancelToken&&bs.cancelToken.subscribe(As),bs.signal&&(bs.signal.aborted?As():bs.signal.addEventListener("abort",As)));const Us=parseProtocol(bs.url);if(Us&&!platform.protocols.includes(Us)){xs(new AxiosError$1("Unsupported protocol "+Us+":",AxiosError$1.ERR_BAD_REQUEST,ds)),Ls();return}Bs.send(Es||null)})},composeSignals=(ds,dn)=>{if(ds=ds?ds.filter(Boolean):[],!dn&&!ds.length)return;const ms=new AbortController;let xs=!1;const bs=function(js){if(!xs){xs=!0,ws();const Cs=js instanceof Error?js:this.reason;ms.abort(Cs instanceof AxiosError$1?Cs:new CanceledError$1(Cs instanceof Error?Cs.message:Cs))}};let Es=dn&&setTimeout(()=>{Es=null,bs(new AxiosError$1(`timeout of ${dn}ms exceeded`,AxiosError$1.ETIMEDOUT))},dn);const ws=()=>{ds&&(Es&&clearTimeout(Es),Es=null,ds.forEach(js=>
7{js.unsubscribe?js.unsubscribe(bs):js.removeEventListener("abort",bs)}),ds=null)};ds.forEach(js=>{if(!xs){if(js.aborted){bs.call(js);return}js.addEventListener("abort",bs,{once:!0})}});const{signal:Rs}=ms;return Rs.unsubscribe=()=>utils$2.asap(ws),Rs},streamChunk=function*(ds,dn){let ms=ds.byteLength;if(ms<dn){yield ds;return}let xs=0,bs;for(;xs<ms;)bs=xs+dn,yield ds.slice(xs,bs),xs=bs},readBytes=async function*(ds,dn){for await(const ms of readStream(ds))yield*streamChunk(ms,dn)},readStream=async function*(ds){if(ds[Symbol.asyncIterator]){yield*ds;return}const dn=ds.getReader();try{for(;;){const{done:ms,value:xs}=await dn.read();if(ms)break;yield xs}}finally{await dn.cancel()}},trackStream=(ds,dn,ms,xs)=>{const bs=readBytes(ds,dn);let Es=0,ws,Rs=js=>{ws||(ws=!0,xs&&xs(js))};return new ReadableStream({async pull(js){try{const{done:Cs,value:As}=await bs.next();if(Cs){Rs(),js.close();return}let ks=As.byteLength;if(ms){let Os=Es+=ks;ms(Os)}js.enqueue(new Uint8Array(As))}catch(Cs){throw Rs(Cs),Cs}},cancel(js){return Rs(js),bs.return()}},{highWaterMark:2})},isHexDigit=ds=>ds>=48&&ds<=57||ds>=65&&ds<=70||ds>=97&&ds<=102,isPercentEncodedByte=(ds,dn,ms)=>dn+2<ms&&isHexDigit(ds.charCodeAt(dn+1))&&isHexDigit(ds.charCodeAt(dn+2)),hexValue=ds=>ds<=57?ds-48:(ds&223)-55,isBase64Char=ds=>ds>=65&&ds<=90||ds>=97&&ds<=122||ds>=48&&ds<=57||ds===43||ds===47||ds===45||ds===95,isBase64Whitespace=ds=>ds===9||ds===10||ds===12||ds===13||ds===32,base64Bytes=ds=>{const dn=Math.floor(ds/4),ms=ds%4;return dn*3+(ms===2?1:ms===3?2:0)},estimateBase64BufferAllocation=ds=>{const dn=ds.length;let ms=0;return dn>0&&ds.charCodeAt(dn-1)===61&&(ms++,dn>1&&ds.charCodeAt(dn-2)===61&&ms++),Math.floor((dn-ms)*3/4)},estimatePercentDecodedBase64Bytes=ds=>{const dn=ds.length;let ms=0,xs=0,bs=!1;for(let Es=0;Es<dn;Es++){let ws=ds.charCodeAt(Es);if(ws===37&&isPercentEncodedByte(ds,Es,dn)&&(ws=hexValue(ds.charCodeAt(Es+1))*16+hexValue(ds.charCodeAt(Es+2)),Es+=2),!isBase64Whitespace(ws)){if(ws===61){xs++;continue}if(!isBase64Char(ws)||xs>0){bs=!0;continue}ms++}}return bs||xs>2||xs>0&&(ms+xs)%4!==0||ms%4===1?estimateBase64BufferAllocation(ds):base64Bytes(ms)},estimateDataURLBytes=(ds,dn)=>{if(!ds||typeof ds!="string"||!ds.startsWith("data:"))return 0;const ms=ds.indexOf(",");if(ms<0)return 0;const xs=ds.slice(5,ms),bs=ds.slice(ms+1);if(/;base64/i.test(xs))return dn(bs);let ws=0;for(let Rs=0,js=bs.length;Rs<js;Rs++){const Cs=bs.charCodeAt(Rs);if(Cs===37&&isPercentEncodedByte(bs,Rs,js))ws+=1,Rs+=2;else if(Cs<128)ws+=1;else if(Cs<2048)ws+=2;else if(Cs>=55296&&Cs<=56319&&Rs+1<js){const As=bs.charCodeAt(Rs+1);As>=56320&&As<=57343?(ws+=4,Rs++):ws+=3}else ws+=3}return ws};function estimateDataURLDecodedBytes(ds){const dn=typeof ds=="string"?ds.indexOf("#"):-1;return estimateDataURLBytes(dn===-1?ds:ds.slice(0,dn),estimatePercentDecodedBase64Bytes)}const VERSION$1="1.20.0",DEFAULT_CHUNK_SIZE=64*1024,DEFAULT_REQUEST_OPTIONS={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction}=utils$2,encodeUTF8=ds=>encodeURIComponent(ds).replace(/%([0-9A-F]{2})/gi,(dn,ms)=>String.fromCharCode(parseInt(ms,16))),decodeURIComponentSafe=ds=>{if(!utils$2.isString(ds))return ds;try{return decodeURIComponent(ds)}catch{return ds}},test=(ds,...dn)=>{try{return!!ds(...dn)}catch{return!1}},maybeWithAuthCredentials=ds=>{const dn=ds.indexOf("://");let ms=ds;return dn!==-1&&(ms=ms.slice(dn+3)),ms.includes("@")||ms.includes(":")},factory=ds=>{const dn=utils$2.global!==void 0&&utils$2.global!==null?utils$2.global:globalThis,{ReadableStream:ms,TextEncoder:xs}=dn;ds=utils$2.merge.call({skipUndefined:!0},{Request:dn.Request,Response:dn.Response},ds);const{fetch:bs,Request:Es,Response:ws}=ds,Rs=bs?isFunction(bs):typeof fetch=="function",js=isFunction(Es),Cs=isFunction(ws);if(!Rs)return!1;const As=Rs&&isFunction(ms),ks=Rs&&(typeof xs=="function"?(Bs=>Fs=>Bs.encode(Fs))(new xs):async Bs=>new Uint8Array(await new Es(Bs).arrayBuffer())),Os=js&&As&&test(()=>{let Bs=!1;const Fs=new Es(platform.origin,{body:new ms,method:"POST",get duplex(){return Bs=!0,"half"}}),Us=Fs.headers.has("Content-Type");return Fs.body!=null&&Fs.body.cancel(),Bs&&!Us}),Ms=Cs&&As&&test(()=>utils$2.isReadableStream(new ws("").body)),Ds={stream:Ms&&(Bs=>Bs.body)};Rs&&["text","arrayBuffer","blob","formData","stream"].forEach(Bs=>{!Ds[Bs]&&(Ds[Bs]=(Fs,Us)=>{let Gs=Fs&&Fs[Bs];if(Gs)return Gs.call(Fs);throw new AxiosError$1(`Response type '${Bs}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,Us)})});const Ps=async Bs=>{if(Bs==null)return 0;if(utils$2.isBlob(Bs))return Bs.size;if(utils$2.isSpecCompliantForm(Bs))return(await new Es(platform.origin,{method:"POST",body:Bs}).arrayBuffer()).byteLength;
vendor: 9,761 bytes, lines 7-9
7if(utils$2.isArrayBufferView(Bs)||utils$2.isArrayBuffer(Bs))return Bs.byteLength;if(utils$2.isURLSearchParams(Bs)&&(Bs=Bs+""),utils$2.isString(Bs))return(await ks(Bs)).byteLength},Ls=async(Bs,Fs)=>{const Us=utils$2.toFiniteNumber(Bs.getContentLength());return Us??Ps(Fs)};return async Bs=>{let{url:Fs,method:Us,data:Gs,signal:Js,cancelToken:Ws,timeout:Zs,onDownloadProgress:Ys,onUploadProgress:Qs,responseType:ai,headers:ia,withCredentials:ca="same-origin",fetchOptions:ha,maxContentLength:ea,maxBodyLength:ta,maxRedirects:aa}=resolveConfig(Bs);const fa=utils$2.isNumber(ea)&&ea>-1,ua=utils$2.isNumber(ta)&&ta>-1,Ea=Oa=>utils$2.hasOwnProp(Bs,Oa)?Bs[Oa]:void 0;let ra=bs||fetch;ai=ai?(ai+"").toLowerCase():"text";let Ia=composeSignals([Js,Ws&&Ws.toAbortSignal()],Zs),$a=null;const oa=Ia&&Ia.unsubscribe&&(()=>{Ia.unsubscribe()});let sa,Ra=null;const _a=()=>new AxiosError$1("Request body larger than maxBodyLength limit",AxiosError$1.ERR_BAD_REQUEST,Bs,$a);try{let Oa;const za=Ea("auth");if(za){const Va=utils$2.getSafeProp(za,"username")||"",uo=utils$2.getSafeProp(za,"password")||"";Oa={username:Va,password:uo}}if(maybeWithAuthCredentials(Fs)){const Va=new URL(Fs,platform.origin);if(!Oa&&(Va.username||Va.password)){const uo=decodeURIComponentSafe(Va.username),Eo=decodeURIComponentSafe(Va.password);Oa={username:uo,password:Eo}}(Va.username||Va.password)&&(Va.username="",Va.password="",Fs=Va.href)}if(Oa&&(ia.delete("authorization"),ia.set("Authorization","Basic "+btoa(encodeUTF8((Oa.username||"")+":"+(Oa.password||""))))),fa&&typeof Fs=="string"&&Fs.startsWith("data:")&&estimateDataURLDecodedBytes(Fs)>ea)throw new AxiosError$1("maxContentLength size of "+ea+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,Bs,$a);if(ua&&Us!=="get"&&Us!=="head"){const Va=await Ps(Gs);if(typeof Va=="number"&&isFinite(Va)&&(sa=Va,Va>ta))throw _a()}const Ga=ua&&(utils$2.isReadableStream(Gs)||utils$2.isStream(Gs)),qa=(Va,uo,Eo)=>trackStream(Va,DEFAULT_CHUNK_SIZE,Ao=>{if(ua&&Ao>ta)throw Ra=_a();uo&&uo(Ao)},Eo);if(Os&&Us!=="get"&&Us!=="head"&&(Qs||Ga)){if(sa=sa??await Ls(ia,Gs),sa!==0||Ga){let Va=new Es(Fs,{method:"POST",body:Gs,duplex:"half"}),uo;if(utils$2.isFormData(Gs)&&(uo=Va.headers.get("content-type"))&&ia.setContentType(uo),Va.body){const[Eo,Ao]=Qs&&progressEventDecorator(sa,progressEventReducer(asyncDecorator(Qs)))||[];Gs=qa(Va.body,Eo,Ao)}}}else if(Ga&&!js&&As&&Us!=="get"&&Us!=="head")Gs=qa(Gs);else if(Ga&&js&&!Os&&Us!=="get"&&Us!=="head")throw new AxiosError$1("Stream request bodies are not supported by the current fetch implementation",AxiosError$1.ERR_NOT_SUPPORT,Bs,$a);utils$2.isString(ca)||(ca=ca?"include":"omit");const Ma=js&&"credentials"in Es.prototype;if(utils$2.isFormData(Gs)){const Va=ia.getContentType();Va&&/^multipart\/form-data/i.test(Va)&&!/boundary=/i.test(Va)&&ia.delete("content-type")}ia.set("User-Agent","axios/"+VERSION$1,!1);const Fa=ha==null?ha:Object.assign(Object.create(null),ha);Fa&&(delete Fa.body,delete Fa.headers,delete Fa.method,delete Fa.signal,delete Fa.duplex,delete Fa.credentials);const Ka=Object.assign(Object.create(null),Fa,{signal:Ia,method:Us.toUpperCase(),headers:toByteStringHeaderObject(ia.normalize()),body:Gs,duplex:"half",credentials:Ma?ca:void 0});js&&(utils$2.forEach(DEFAULT_REQUEST_OPTIONS,(Va,uo)=>{Ka[uo]===void 0&&(Ka[uo]=Va)}),Ka.signal===void 0&&(Ka.signal=null),Ka.body===void 0&&(Ka.body=null)),aa===0&&(Ka.redirect="manual",Fa&&(Fa.redirect="manual")),$a=js&&new Es(Fs,Ka);let mo=await(js?ra($a,Fa):ra(Fs,Ka));const ko=AxiosHeaders$1.from(mo.headers);if(fa){const Va=utils$2.toFiniteNumber(ko.getContentLength());if(Va!=null&&Va>ea)throw new AxiosError$1("maxContentLength size of "+ea+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,Bs,$a)}const bo=Ms&&(ai==="stream"||ai==="response");if(Ms&&mo.body&&(Ys||fa||bo&&oa)){const Va={};["status","statusText","headers"].forEach(Po=>{Va[Po]=mo[Po]});const uo=utils$2.toFiniteNumber(ko.getContentLength()),[Eo,Ao]=Ys&&progressEventDecorator(uo,progressEventReducer(asyncDecorator(Ys),!0))||[];let Zo=0;const sl=Po=>{if(fa&&(Zo=Po,Zo>ea))throw new AxiosError$1("maxContentLength size of "+ea+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,Bs,$a);Eo&&Eo(Po)};mo=new ws(trackStream(mo.body,DEFAULT_CHUNK_SIZE,sl,()=>{Ao&&Ao(),oa&&oa()}),Va)}ai=ai||"text";let oo=await Ds[utils$2.findKey(Ds,ai)||"text"](mo,Bs);if(fa&&!Ms&&!bo){let Va;if(oo!=null&&(typeof oo.byteLength=="number"?Va=oo.byteLength:typeof oo.size=="number"?Va=oo.size:typeof oo=="string"&&(Va=typeof xs=="function"?new xs().encode(oo).byteLength:oo.length)),typeof Va=="number"&&Va>ea)throw new AxiosError$1("maxContentLength size of "+ea+" exceeded",AxiosError$1.ERR_BAD_RESPONSE,Bs,$a)}return!bo&&oa&&oa(),await new Promise((Va,uo)=>{settle(Va,uo,{data:oo,headers:AxiosHeaders$1.from(mo.headers),status:mo.status,statusText:mo.statusText,config:Bs,request:$a})})}catch(Oa){if(oa&&oa(),Ia&&Ia.aborted&&Ia.reason instanceof AxiosError$1){const za=Ia.reason;throw za.config=Bs,$a&&(za.request=$a),Oa!==za&&Object.defineProperty(za,"cause",{__proto__:null,value:Oa,writable:!0,enumerable:!1,configurable:!0}),za}if(Ra)throw $a&&!Ra.request&&(Ra.request=$a),Ra;if(Oa instanceof AxiosError$1)throw $a&&!Oa.request&&(Oa.request=$a),Oa;if(Oa&&Oa.name==="TypeError"&&/Load failed|fetch/i.test(Oa.message)){const za=new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,Bs,$a,Oa&&Oa.response);throw Object.defineProperty(za,"cause",{__proto__:null,value:Oa.cause||Oa,writable:!0,enumerable:!1,configurable:!0}),za}throw AxiosError$1.from(Oa,Oa&&Oa.code,Bs,$a,Oa&&Oa.response)}}},seedCache=new Map,getFetch=ds=>{let dn=ds&&ds.env||{};const{fetch:ms,Request:xs,Response:bs}=dn,Es=[xs,bs,ms];let ws=Es.length,Rs=ws,js,Cs,As=seedCache;for(;Rs--;)js=Es[Rs],Cs=As.get(js),Cs===void 0&&As.set(js,Cs=Rs?new Map:factory(dn)),As=Cs;return Cs};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$2.forEach(knownAdapters,(ds,dn)=>{if(ds){try{Object.defineProperty(ds,"name",{__proto__:null,value:dn})}catch{}Object.defineProperty(ds,"adapterName",{__proto__:null,value:dn})}});const renderReason=ds=>`- ${ds}`,isResolvedHandle=ds=>utils$2.isFunction(ds)||ds===null||ds===!1;function getAdapter$1(ds,dn){ds=utils$2.isArray(ds)?ds:[ds];const{length:ms}=ds;let xs,bs;const Es={};for(let ws=0;ws<ms;ws++){xs=ds[ws];let Rs;if(bs=xs,!isResolvedHandle(xs)&&(bs=knownAdapters[(Rs=String(xs)).toLowerCase()],bs===void 0))throw new AxiosError$1(`Unknown adapter '${Rs}'`);if(bs&&(utils$2.isFunction(bs)||(bs=bs.get(dn))))break;Es[Rs||"#"+ws]=bs}if(!bs){const ws=Object.entries(Es).map(([js,Cs])=>`adapter ${js} `+(Cs===!1?"is not supported by the environment":"is not available in the build"));let Rs=ms?ws.length>1?`since :
8`+ws.map(renderReason).join(`
9`):" "+renderReason(ws[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+Rs,AxiosError$1.ERR_NOT_SUPPORT)}return bs}const adapters={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(ds){if(ds.cancelToken&&ds.cancelToken.throwIfRequested(),ds.signal&&ds.signal.aborted)throw new CanceledError$1(null,ds)}function dispatchRequest(ds){const dn=utils$2.toSafeFlatObject(ds);return throwIfCancellationRequested(dn),dn.headers=AxiosHeaders$1.from(utils$2.getSafeProp(dn,"headers")),dn.data=transformData.call(dn,dn.transformRequest),["post","put","patch"].indexOf(dn.method)!==-1&&dn.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(dn.adapter||defaults$1.adapter,dn)(dn).then(function(bs){throwIfCancellationRequested(dn),dn.response=bs;try{bs.data=transformData.call(dn,dn.transformResponse,bs)}finally{delete dn.response}return bs.headers=AxiosHeaders$1.from(bs.headers),bs},function(bs){if(!isCancel$1(bs)&&(throwIfCancellationRequested(dn),bs&&bs.response)){dn.response=bs.response;try{bs.response.data=transformData.call(dn,dn.transformResponse,bs.response)}finally{delete dn.response}bs.response.headers=AxiosHeaders$1.from(bs.response.headers)}return Promise.reject(bs)})}const validators$1={};["object","boolean","number","function","string","symbol"].forEach((ds,dn)=>{validators$1[ds]=function(xs){return typeof xs===ds||"a"+(dn<1?"n ":" ")+ds}});const deprecatedWarnings={};validators$1.transitional=function(dn,ms,xs){function bs(Es,ws){return"[Axios v"+VERSION$1+"] Transitional option '"+Es+"'"+ws+(xs?". "+xs:"")}return(Es,ws,Rs)=>{if(dn===!1)throw new AxiosError$1(bs(ws," has been removed"+(ms?" in "+ms:"")),AxiosError$1.ERR_DEPRECATED);return ms&&!deprecatedWarnings[ws]&&(deprecatedWarnings[ws]=!0,console.warn(bs(ws," has been deprecated since v"+ms+" and will be removed in the near future"))),dn?dn(Es,ws,Rs):!0}};validators$1.spelling=function(dn){return(ms,xs)=>(console.warn(`${xs} is likely a misspelling of ${dn}`),!0)};function assertOptions(ds,dn,ms){if(typeof ds!="object"||ds===null)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const xs=Object.keys(ds);let bs=xs.length;for(;bs-- >0;){const Es=xs[bs],ws=Object.prototype.hasOwnProperty.call(dn,Es)?dn[Es]:void 0;if(ws){const Rs=ds[Es],js=Rs===void 0||ws(Rs,Es,ds);if(js!==!0)throw new AxiosError$1("option "+Es+" must be "+js,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(ms!==!0)throw new AxiosError$1("Unknown option "+Es,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(dn){this.defaults=dn||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(dn,ms){try{return await this._request(dn,ms)}catch(xs){if(xs instanceof Error)try{let bs={};Error.captureStackTrace?Error.captureStackTrace(bs):bs=new Error;const Es=bs.stack;let ws="";
vendor: 4,696 bytes, lines 9-13
9if(typeof Es=="string"){const Rs=Es.indexOf(`
10`);ws=Rs===-1?"":Es.slice(Rs+1)}if(!xs.stack)xs.stack=ws;else if(ws){const Rs=ws.indexOf(`
11`),js=Rs===-1?-1:ws.indexOf(`
12`,Rs+1),Cs=js===-1?"":ws.slice(js+1);String(xs.stack).endsWith(Cs)||(xs.stack+=`
13`+ws)}}catch{}throw xs}}_request(dn,ms){typeof dn=="string"?(ms=ms||{},ms.url=dn):ms=dn||{},ms=mergeConfig$1(this.defaults,ms);const{transitional:xs,paramsSerializer:bs,headers:Es}=ms;xs!==void 0&&validator.assertOptions(xs,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean),legacyInterceptorReqResOrdering:validators.transitional(validators.boolean),advertiseZstdAcceptEncoding:validators.transitional(validators.boolean),validateStatusUndefinedResolves:validators.transitional(validators.boolean)},!1),bs!=null&&(utils$2.isFunction(bs)?ms.paramsSerializer={serialize:bs}:validator.assertOptions(bs,{encode:validators.function,serialize:validators.function},!0)),ms.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?ms.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:ms.allowAbsoluteUrls=!0),validator.assertOptions(ms,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),ms.method=(utils$2.getSafeProp(ms,"method")||utils$2.getSafeProp(this.defaults,"method")||"get").toLowerCase();let ws=Es&&utils$2.merge(Es.common,Es[ms.method]);Es&&utils$2.forEach(methodList.concat("common"),Ds=>{delete Es[Ds]}),ms.headers=AxiosHeaders$1.concat(ws,Es);const Rs=[];let js=!0;this.interceptors.request.forEach(function(Ps){if(typeof Ps.runWhen=="function"&&Ps.runWhen(ms)===!1)return;js=js&&Ps.synchronous;const Ls=ms.transitional||transitionalDefaults;Ls&&Ls.legacyInterceptorReqResOrdering?Rs.unshift(Ps.fulfilled,Ps.rejected):Rs.push(Ps.fulfilled,Ps.rejected)});const Cs=[];this.interceptors.response.forEach(function(Ps){Cs.push(Ps.fulfilled,Ps.rejected)});let As,ks=0,Os;if(!js){const Ds=[dispatchRequest.bind(this),void 0];for(Ds.unshift(...Rs),Ds.push(...Cs),Os=Ds.length,As=Promise.resolve(ms);ks<Os;)As=As.then(Ds[ks++],Ds[ks++]);return As}Os=Rs.length;let Ms=ms;for(;ks<Os;){const Ds=Rs[ks++],Ps=Rs[ks++];try{Ms=Ds?Ds(Ms):Ms}catch(Ls){if(!Ps){As=Promise.reject(Ls);break}try{const Bs=Ps.call(this,Ls);utils$2.isThenable(Bs)&&(As=Promise.resolve(Bs).then(()=>dispatchRequest.call(this,Ms)))}catch(Bs){As=Promise.reject(Bs)}break}}if(!As)try{As=dispatchRequest.call(this,Ms)}catch(Ds){As=Promise.reject(Ds)}for(ks=0,Os=Cs.length;ks<Os;)As=As.then(Cs[ks++],Cs[ks++]);return As}getUri(dn){dn=mergeConfig$1(this.defaults,dn);const ms=buildFullPath(dn.baseURL,dn.url,dn.allowAbsoluteUrls,dn);return buildURL(ms,dn.params,dn.paramsSerializer)}};utils$2.forEach(["delete","get","head","options"],function(dn){Axios$1.prototype[dn]=function(ms,xs){return this.request(mergeConfig$1(xs||{},{method:dn,url:ms,data:xs&&utils$2.hasOwnProp(xs,"data")?xs.data:void 0}))}});utils$2.forEach(["post","put","patch","query"],function(dn){function ms(xs){return function(Es,ws,Rs){return this.request(mergeConfig$1(Rs||{},{method:dn,headers:xs?{"Content-Type":"multipart/form-data"}:{},url:Es,data:ws}))}}Axios$1.prototype[dn]=ms(),dn!=="query"&&(Axios$1.prototype[dn+"Form"]=ms(!0))});let CancelToken$1=class x0{constructor(dn){if(typeof dn!="function")throw new TypeError("executor must be a function.");let ms;this.promise=new Promise(function(Es){ms=Es});const xs=this;this.promise.then(bs=>{if(!xs._listeners)return;let Es=xs._listeners.length;for(;Es-- >0;)xs._listeners[Es](bs);xs._listeners=null}),this.promise.then=bs=>{let Es;const ws=new Promise(Rs=>{xs.subscribe(Rs),Es=Rs}).then(bs);return ws.cancel=function(){xs.unsubscribe(Es)},ws},dn(function(Es,ws,Rs){xs.reason||(xs.reason=new CanceledError$1(Es,ws,Rs),ms(xs.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(dn){if(this.reason){dn(this.reason);return}this._listeners?this._listeners.push(dn):this._listeners=[dn]}unsubscribe(dn){if(!this._listeners)return;const ms=this._listeners.indexOf(dn);ms!==-1&&this._listeners.splice(ms,1)}toAbortSignal(){const dn=new AbortController,ms=xs=>{dn.abort(xs)};return this.subscribe(ms),dn.signal.unsubscribe=()=>this.unsubscribe(ms),dn.signal}static source(){let dn;return{token:new x0(function(bs){dn=bs}),cancel:dn}}};function spread$1(ds){return function(ms){return ds.apply(null,ms)}}function isAxiosError$1(ds){return utils$2.isObject(ds)&&ds.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
13setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([ds,dn])=>{HttpStatusCode$1[dn]===void 0&&(HttpStatusCode$1[dn]=ds)});function createInstance(ds){const dn=new Axios$1(ds),ms=bind(Axios$1.prototype.request,dn);return utils$2.extend(ms,Axios$1.prototype,dn,{allOwnKeys:!0}),utils$2.extend(ms,dn,null,{allOwnKeys:!0}),ms.create=function(bs){return createInstance(mergeConfig$1(ds,bs))},ms}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(dn){return Promise.all(dn)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=ds=>formDataToJSON(utils$2.isHTMLForm(ds)?new FormData(ds):ds);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all:all$1,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig,create:create$1}=axios;class InvalidTokenError extends Error{}InvalidTokenError.prototype.name="InvalidTokenError";function b64DecodeUnicode(ds){return decodeURIComponent(atob(ds).replace(/(.)/g,(dn,ms)=>{let xs=ms.charCodeAt(0).toString(16).toUpperCase();return xs.length<2&&(xs="0"+xs),"%"+xs}))}function base64UrlDecode(ds){let dn=ds.replace(/-/g,"+").replace(/_/g,"/");switch(dn.length%4){case 0:break;case 2:dn+="==";break;case 3:dn+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b64DecodeUnicode(dn)}catch{return atob(dn)}}function jwtDecode(ds,dn){if(typeof ds!="string")throw new InvalidTokenError("Invalid token specified: must be a string");dn||(dn={});const ms=dn.header===!0?0:1,xs=ds.split(".")[ms];if(typeof xs!="string")throw new InvalidTokenError(`Invalid token specified: missing part #${ms+1}`);let bs;try{bs=base64UrlDecode(xs)}catch(Es){throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${ms+1} (${Es.message})`)}try{return JSON.parse(bs)}catch(Es){throw new InvalidTokenError(`Invalid token specified: invalid json for part #${ms+1} (${Es.message})`)}}const WEB_AUTH_TOKEN="mmac";class Auth{static isAuthenticated(){const dn=localStorage.getItem(WEB_AUTH_TOKEN);if(dn){const ms=jwtDecode(dn);if(ms.exp)return new Date().getTime()<ms.exp*1e3}return!1}static hasOrganisation(){const dn=localStorage.getItem(WEB_AUTH_TOKEN);return dn?!!jwtDecode(dn).organisationId:!1}static hasRole=dn=>{const ms=localStorage.getItem(WEB_AUTH_TOKEN);if(ms){const xs=jwtDecode(ms);if(xs.roles)return xs.roles.includes(dn)}return!1};static hasAnyRole=dn=>{const ms=localStorage.getItem(WEB_AUTH_TOKEN);if(ms){const xs=jwtDecode(ms);if(xs.roles)return xs.roles.split(",").filter(Es=>dn.includes(Es)).length>0}return!1};static logout=()=>{localStorage.removeItem(WEB_AUTH_TOKEN)}}async function httpGet(ds){const dn=defaultConfig();return dn.headers&&(dn.headers["Content-Type"]="application/json"),await axios.get(ds,dn)}async function httpPut(ds,dn){return await axios.put(ds,dn,defaultConfig())}async function httpPost(ds,dn){return await axios.post(ds,dn,defaultConfig())}async function httpPostForm(ds,dn,ms){const xs=defaultConfig();return xs.headers&&(xs.headers["Content-Type"]="multipart/form-data"),ms&&(xs.onUploadProgress=ms),await axios.post(ds,dn,xs)}async function httpDelete(ds,dn){const ms=defaultConfig(dn);return ms.headers&&(ms.headers["Content-Type"]="application/json"),await axios.delete(
13ds,ms)}async function httpPostFile(ds,dn){const ms=new FormData;ms.append("file",dn);const xs=defaultConfig();return xs.headers&&(xs.headers["Content-Type"]="multipart/form-data"),await axios.post(ds,ms,xs)}function defaultConfig(ds){const dn={};dn.Pragma="no-cache";const ms={headers:dn,data:ds},xs=localStorage.getItem(WEB_AUTH_TOKEN);return xs&&ms.headers&&(ms.headers.Authorization=`Bearer ${xs}`),ms}function anonymousConfig(){return{headers:{Pragma:"no-cache"}}}async function httpGetAnonymous(ds){const dn=anonymousConfig();return dn.headers&&(dn.headers["Content-Type"]="application/json"),await axios.get(ds,dn)}async function httpPostAnonymous(ds,dn){return await axios.post(ds,dn,anonymousConfig())}async function httpPostFormAnonymous(ds,dn,ms){const xs=anonymousConfig();return xs.headers&&(xs.headers["Content-Type"]="multipart/form-data"),ms&&(xs.onUploadProgress=ms),await axios.post(ds,dn,xs)}axios.interceptors.response.use(ds=>ds,async function(ds){return[401,403].indexOf(ds?.response?.status)>=0&&(Auth.logout(),ds?.response?.status===403&&ds?.response?.config?.url?.endsWith("/login")||window.location.replace("/")),Promise.resolve(ds?.response??{})});class LuxonError extends Error{}class InvalidDateTimeError extends LuxonError{constructor(dn){super(`Invalid DateTime: ${dn.toMessage()}`)}}class InvalidIntervalError extends LuxonError{constructor(dn){super(`Invalid Interval: ${dn.toMessage()}`)}}class InvalidDurationError extends LuxonError{constructor(dn){super(`Invalid Duration: ${dn.toMessage()}`)}}class ConflictingSpecificationError extends LuxonError{}class InvalidUnitError extends LuxonError{constructor(dn){super(`Invalid unit ${dn}`)}}class InvalidArgumentError extends LuxonError{}class ZoneIsAbstractError extends LuxonError{constructor(){super("Zone is an abstract class")}}const n$3="numeric",s$3="short",l$4="long",DATE_SHORT={year:n$3,month:n$3,day:n$3},DATE_MED={year:n$3,month:s$3,day:n$3},DATE_MED_WITH_WEEKDAY={year:n$3,month:s$3,day:n$3,weekday:s$3},DATE_FULL={year:n$3,month:l$4,day:n$3},DATE_HUGE={year:n$3,month:l$4,day:n$3,weekday:l$4},TIME_SIMPLE={hour:n$3,minute:n$3},TIME_WITH_SECONDS={hour:n$3,minute:n$3,second:n$3},TIME_WITH_SHORT_OFFSET={hour:n$3,minute:n$3,second:n$3,timeZoneName:s$3},TIME_WITH_LONG_OFFSET={hour:n$3,minute:n$3,second:n$3,timeZoneName:l$4},TIME_24_SIMPLE={hour:n$3,minute:n$3,hourCycle:"h23"},TIME_24_WITH_SECONDS={hour:n$3,minute:n$3,second:n$3,hourCycle:"h23"},TIME_24_WITH_SHORT_OFFSET={hour:n$3,minute:n$3,second:n$3,hourCycle:"h23",timeZoneName:s$3},TIME_24_WITH_LONG_OFFSET={hour:n$3,minute:n$3,second:n$3,hourCycle:"h23",timeZoneName:l$4},DATETIME_SHORT={year:n$3,month:n$3,day:n$3,hour:n$3,minute:n$3},DATETIME_SHORT_WITH_SECONDS={year:n$3,month:n$3,day:n$3,hour:n$3,minute:n$3,second:n$3},DATETIME_MED={year:n$3,month:s$3,day:n$3,hour:n$3,minute:n$3},DATETIME_MED_WITH_SECONDS={year:n$3,month:s$3,day:n$3,hour:n$3,minute:n$3,second:n$3},DATETIME_MED_WITH_WEEKDAY={year:n$3,month:s$3,day:n$3,weekday:s$3,hour:n$3,minute:n$3},DATETIME_FULL={year:n$3,month:l$4,day:n$3,hour:n$3,minute:n$3,timeZoneName:s$3},DATETIME_FULL_WITH_SECONDS={year:n$3,month:l$4,day:n$3,hour:n$3,minute:n$3,second:n$3,timeZoneName:s$3},DATETIME_HUGE={year:n$3,month:l$4,day:n$3,weekday:l$4,hour:n$3,minute:n$3,timeZoneName:l$4},DATETIME_HUGE_WITH_SECONDS={year:n$3,month:l$4,day:n$3,weekday:l$4,hour:n$3,minute:n$3,second:n$3,timeZoneName:l$4};class Zone{get type(){throw new ZoneIsAbstractError}get name(){throw new ZoneIsAbstractError}get ianaName(){return this.name}get isUniversal(){throw new ZoneIsAbstractError}offsetName(dn,ms){throw new ZoneIsAbstractError}formatOffset(dn,ms){throw new ZoneIsAbstractError}offset(dn){throw new ZoneIsAbstractError}equals(dn){throw new ZoneIsAbstractError}get isValid(){throw new ZoneIsAbstractError}}let singleton$1=null;class SystemZone extends Zone{static get instance(){return singleton$1===null&&(singleton$1=new SystemZone),singleton$1}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(dn,{format:ms,locale:xs}){return parseZoneInfo(dn,ms,xs)}formatOffset(dn,ms){return formatOffset(this.offset(dn),ms)}offset(dn){return-new Date(dn).getTimezoneOffset()}equals(dn){return dn.type==="system"}get isValid(){return!0}}const dtfCache=new Map;function makeDTF(ds){let dn=dtfCache.get(ds);return dn===void 0&&(dn=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:ds,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),dtfCache.set(ds,dn)),dn}const typeToPos={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hackyOffset(ds,dn){const ms=ds.format(dn).replace(/\u200E/g,""),xs=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(ms),[,bs,Es,ws,Rs,js,Cs,As]=xs;return[ws,bs,Es,Rs,js,Cs,As]}function partsOffset(ds,dn){const ms=ds.formatToParts(dn),xs=[];for(let bs=0;bs<ms.length;bs++){const{type:Es,value:ws}=ms[bs],Rs=typeToPos[Es];Es==="era"?xs[Rs]=ws:isUndefined(Rs)||(xs[Rs]=parseInt(ws,10))}return xs}const ianaZoneCache=new Map;class IANAZone extends Zone{static create(dn){let ms=ianaZoneCache.get(dn);return ms===void 0&&ianaZoneCache.set(dn,ms=new IANAZone(dn)),ms}static resetCache(){ianaZoneCache.clear(),dtfCache.clear()}static isValidSpecifier(dn){return this.isValidZone(dn)}static isValidZone(dn){if(!dn)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:dn}).format(),!0}catch{return!1}}constructor(dn){super(),this.zoneName=dn,this.valid=IANAZone.isValidZone(dn)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(dn,{format:ms,locale:xs}){return parseZoneInfo(dn,ms,xs,this.name)}formatOffset(dn,ms){return formatOffset(this.offset(dn),ms)}offset(dn){if(!this.valid)return NaN;const ms=new Date(dn);if(isNaN(ms))return NaN;const xs=makeDTF(this.name);let[bs,Es,ws,Rs,js,Cs,As]=xs.formatToParts?partsOffset(xs,ms):hackyOffset(xs,ms);Rs==="BC"&&(bs=-Math.abs(bs)+1);const Os=objToLocalTS({year:bs,month:Es,day:ws,hour:js===24?0:js,minute:Cs,second:As,millisecond:0});let Ms=+ms;const Ds=Ms%1e3;return Ms-=Ds>=0?Ds:1e3+Ds,(Os-Ms)/(60*1e3)}equals(dn){return dn.type==="iana"&&dn.name===this.name}get isValid(){return this.valid}}let intlLFCache={};function getCachedLF(ds,dn={}){const ms=JSON.stringify([ds,dn]);let xs=intlLFCache[ms];return xs||(xs=new Intl.ListFormat(ds,dn),intlLFCache[ms]=xs),xs}
vendor: 54,607 bytes, line 13
13const intlDTCache=new Map;function getCachedDTF(ds,dn={}){const ms=JSON.stringify([ds,dn]);let xs=intlDTCache.get(ms);return xs===void 0&&(xs=new Intl.DateTimeFormat(ds,dn),intlDTCache.set(ms,xs)),xs}const intlNumCache=new Map;function getCachedINF(ds,dn={}){const ms=JSON.stringify([ds,dn]);let xs=intlNumCache.get(ms);return xs===void 0&&(xs=new Intl.NumberFormat(ds,dn),intlNumCache.set(ms,xs)),xs}const intlRelCache=new Map;function getCachedRTF(ds,dn={}){const{base:ms,...xs}=dn,bs=JSON.stringify([ds,xs]);let Es=intlRelCache.get(bs);return Es===void 0&&(Es=new Intl.RelativeTimeFormat(ds,dn),intlRelCache.set(bs,Es)),Es}let sysLocaleCache=null;function systemLocale(){return sysLocaleCache||(sysLocaleCache=new Intl.DateTimeFormat().resolvedOptions().locale,sysLocaleCache)}const intlResolvedOptionsCache=new Map;function getCachedIntResolvedOptions(ds){let dn=intlResolvedOptionsCache.get(ds);return dn===void 0&&(dn=new Intl.DateTimeFormat(ds).resolvedOptions(),intlResolvedOptionsCache.set(ds,dn)),dn}const weekInfoCache=new Map;function getCachedWeekInfo(ds){let dn=weekInfoCache.get(ds);if(!dn){const ms=new Intl.Locale(ds);dn="getWeekInfo"in ms?ms.getWeekInfo():ms.weekInfo,"minimalDays"in dn||(dn={...fallbackWeekSettings,...dn}),weekInfoCache.set(ds,dn)}return dn}function parseLocaleString(ds){const dn=ds.indexOf("-x-");dn!==-1&&(ds=ds.substring(0,dn));const ms=ds.indexOf("-u-");if(ms===-1)return[ds];{let xs,bs;try{xs=getCachedDTF(ds).resolvedOptions(),bs=ds}catch{const js=ds.substring(0,ms);xs=getCachedDTF(js).resolvedOptions(),bs=js}const{numberingSystem:Es,calendar:ws}=xs;return[bs,Es,ws]}}function intlConfigString(ds,dn,ms){return(ms||dn)&&(ds.includes("-u-")||(ds+="-u"),ms&&(ds+=`-ca-${ms}`),dn&&(ds+=`-nu-${dn}`)),ds}function mapMonths(ds){const dn=[];for(let ms=1;ms<=12;ms++){const xs=DateTime.utc(2009,ms,1);dn.push(ds(xs))}return dn}function mapWeekdays(ds){const dn=[];for(let ms=1;ms<=7;ms++){const xs=DateTime.utc(2016,11,13+ms);dn.push(ds(xs))}return dn}function listStuff(ds,dn,ms,xs){const bs=ds.listingMode();return bs==="error"?null:bs==="en"?ms(dn):xs(dn)}function supportsFastNumbers(ds){return ds.numberingSystem&&ds.numberingSystem!=="latn"?!1:ds.numberingSystem==="latn"||!ds.locale||ds.locale.startsWith("en")||getCachedIntResolvedOptions(ds.locale).numberingSystem==="latn"}class PolyNumberFormatter{constructor(dn,ms,xs){this.padTo=xs.padTo||0,this.floor=xs.floor||!1;const{padTo:bs,floor:Es,...ws}=xs;if(!ms||Object.keys(ws).length>0){const Rs={useGrouping:!1,...xs};xs.padTo>0&&(Rs.minimumIntegerDigits=xs.padTo),this.inf=getCachedINF(dn,Rs)}}format(dn){if(this.inf){const ms=this.floor?Math.floor(dn):dn;return this.inf.format(ms)}else{const ms=this.floor?Math.floor(dn):roundTo(dn,3);return padStart(ms,this.padTo)}}}class PolyDateFormatter{constructor(dn,ms,xs){this.opts=xs,this.originalZone=void 0;let bs;if(this.opts.timeZone)this.dt=dn;else if(dn.zone.type==="fixed"){const ws=-1*(dn.offset/60),Rs=ws>=0?`Etc/GMT+${ws}`:`Etc/GMT${ws}`;dn.offset!==0&&IANAZone.create(Rs).valid?(bs=Rs,this.dt=dn):(bs="UTC",this.dt=dn.offset===0?dn:dn.setZone("UTC").plus({minutes:dn.offset}),this.originalZone=dn.zone)}else dn.zone.type==="system"?this.dt=dn:dn.zone.type==="iana"?(this.dt=dn,bs=dn.zone.name):(bs="UTC",this.dt=dn.setZone("UTC").plus({minutes:dn.offset}),this.originalZone=dn.zone);const Es={...this.opts};Es.timeZone=Es.timeZone||bs,this.dtf=getCachedDTF(ms,Es)}format(){return this.originalZone?this.formatToParts().map(({value:dn})=>dn).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const dn=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?dn.map(ms=>{if(ms.type==="timeZoneName"){const xs=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...ms,value:xs}}else return ms}):dn}resolvedOptions(){return this.dtf.resolvedOptions()}}class PolyRelFormatter{constructor(dn,ms,xs){this.opts={style:"long",...xs},!ms&&hasRelative()&&(this.rtf=getCachedRTF(dn,xs))}format(dn,ms){return this.rtf?this.rtf.format(dn,ms):formatRelativeTime(ms,dn,this.opts.numeric,this.opts.style!=="long")}formatToParts(dn,ms){return this.rtf?this.rtf.formatToParts(dn,ms):[]}}const fallbackWeekSettings={firstDay:1,minimalDays:4,weekend:[6,7]};class Locale{static fromOpts(dn){return Locale.create(dn.locale,dn.numberingSystem,dn.outputCalendar,dn.weekSettings,dn.defaultToEN)}static create(dn,ms,xs,bs,Es=!1){const ws=dn||Settings$1.defaultLocale,Rs=ws||(Es?"en-US":systemLocale()),js=ms||Settings$1.defaultNumberingSystem,Cs=xs||Settings$1.defaultOutputCalendar,As=validateWeekSettings(bs)||Settings$1.defaultWeekSettings;return new Locale(Rs,js,Cs,As,ws)}static resetCache(){sysLocaleCache=null,intlDTCache.clear(),intlNumCache.clear(),intlRelCache.clear(),intlResolvedOptionsCache.clear(),weekInfoCache.clear()}static fromObject({locale:dn,numberingSystem:ms,outputCalendar:xs,weekSettings:bs}={}){return Locale.create(dn,ms,xs,bs)}constructor(dn,ms,xs,bs,Es){const[ws,Rs,js]=parseLocaleString(dn);this.locale=ws,this.numberingSystem=ms||Rs||null,this.outputCalendar=xs||js||null,this.weekSettings=bs,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=Es,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}listingMode(){const dn=this.isEnglish(),ms=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return dn&&ms?"en":"intl"}clone(dn){return!dn||Object.getOwnPropertyNames(dn).length===0?this:Locale.create(dn.locale||this.specifiedLocale,dn.numberingSystem||this.numberingSystem,dn.outputCalendar||this.outputCalendar,validateWeekSettings(dn.weekSettings)||this.weekSettings,dn.defaultToEN||!1)}redefaultToEN(dn={}){return this.clone({...dn,defaultToEN:!0})}redefaultToSystem(dn={}){return this.clone({...dn,defaultToEN:!1})}months(dn,ms=!1){return listStuff(this,dn,months$1,()=>{const xs=this.intl==="ja"||this.intl.startsWith("ja-");ms&=!xs;const bs=ms?{month:dn,day:"numeric"}:{month:dn},Es=ms?"format":"standalone";if(!this.monthsCache[Es][dn]){const ws=xs?Rs=>this.dtFormatter(Rs,bs).format():Rs=>this.extract(Rs,bs,"month");this.monthsCache[Es][dn]=mapMonths(ws)}return this.monthsCache[Es][dn]})}weekdays(dn,ms=!1){return listStuff(this,dn,weekdays,()=>{const xs=ms?{weekday:dn,year:"numeric",month:"long",day:"numeric"}:{weekday:dn},bs=ms?"format":"standalone";return this.weekdaysCache[bs][dn]||(this.weekdaysCache[bs][dn]=mapWeekdays(Es=>this.extract(Es,xs,"weekday"))),this.weekdaysCache[bs][dn]})}meridiems(){return listStuff(this,void 0,()=>meridiems,()=>{if(!this.meridiemCache){const dn={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(ms=>this.extract(ms,dn,"dayperiod"))}return this.meridiemCache})}eras(dn){return listStuff(this,dn,eras,()=>{const ms={era:dn};return this.eraCache[dn]||(this.eraCache[dn]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(xs=>this.extract(xs,ms,"era"))),this.eraCache[dn]})}extract(dn,ms,xs){const bs=this.dtFormatter(dn,ms),Es=bs.formatToParts(),ws=Es.find(Rs=>Rs.type.toLowerCase()===xs);return ws?ws.value:null}numberFormatter(dn={}){return new PolyNumberFormatter(this.intl,dn.forceSimple||this.fastNumbers,dn)}dtFormatter(dn,ms={}){return new PolyDateFormatter(dn,this.intl,ms)}relFormatter(dn={}){return new PolyRelFormatter(this.intl,this.isEnglish(),dn)}listFormatter(dn={}){return getCachedLF(this.intl,dn)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||getCachedIntResolvedOptions(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:hasLocaleWeekInfo()?getCachedWeekInfo(this.locale):fallbackWeekSettings}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(dn){return this.locale===dn.locale&&this.numberingSystem===dn.numberingSystem&&this.outputCalendar===dn.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let singleton=null;class FixedOffsetZone extends Zone{static get utcInstance(){return singleton===null&&(singleton=new FixedOffsetZone(0)),singleton}static instance(dn){return dn===0?FixedOffsetZone.utcInstance:new FixedOffsetZone(dn)}static parseSpecifier(dn){if(dn){const ms=dn.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(ms)return new FixedOffsetZone(signedOffset(ms[1],ms[2]))}return null}constructor(dn){super(),this.fixed=dn}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${formatOffset(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${formatOffset(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(dn,ms){return formatOffset(this.fixed,ms)}get isUniversal(){return!0}offset(){return this.fixed}equals(dn){return dn.type==="fixed"&&dn.fixed===this.fixed}get isValid(){return!0}}class InvalidZone extends Zone{constructor(dn){super(),this.zoneName=dn}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function normalizeZone(ds,dn){if(isUndefined(ds)||ds===null)return dn;if(ds instanceof Zone)return ds;if(isString(ds)){const ms=ds.toLowerCase();return ms==="default"?dn:ms==="local"||ms==="system"?SystemZone.instance:ms==="utc"||ms==="gmt"?FixedOffsetZone.utcInstance:FixedOffsetZone.parseSpecifier(ms)||IANAZone.create(ds)}else return isNumber(ds)?FixedOffsetZone.instance(ds):typeof ds=="object"&&"offset"in ds&&typeof ds.offset=="function"?ds:new InvalidZone(ds)}const numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(ds){let dn=parseInt(ds,10);if(isNaN(dn)){dn="";for(let ms=0;ms<ds.length;ms++){const xs=ds.charCodeAt(ms);if(ds[ms].search(numberingSystems.hanidec)!==-1)dn+=hanidecChars.indexOf(ds[ms]);else for(const bs in numberingSystemsUTF16){const[Es,ws]=numberingSystemsUTF16[bs];xs>=Es&&xs<=ws&&(dn+=xs-Es)}}return parseInt(dn,10)}else return dn}const digitRegexCache=new Map;function resetDigitRegexCache(){digitRegexCache.clear()}function digitRegex({numberingSystem:ds},dn=""){const ms=ds||"latn";let xs=digitRegexCache.get(ms);xs===void 0&&(xs=new Map,digitRegexCache.set(ms,xs));let bs=xs.get(dn);return bs===void 0&&(bs=new RegExp(`${numberingSystems[ms]}${dn}`),xs.set(dn,bs)),bs}let now=()=>Date.now(),defaultZone="system",defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,twoDigitCutoffYear=60,throwOnInvalid,defaultWeekSettings=null,Settings$1=class{static get now(){return now}static set now(dn){now=dn}static set defaultZone(dn){defaultZone=dn}static get defaultZone(){return normalizeZone(defaultZone,SystemZone.instance)}static get defaultLocale(){return defaultLocale}static set defaultLocale(dn){defaultLocale=dn}static get defaultNumberingSystem(){return defaultNumberingSystem}static set defaultNumberingSystem(dn){defaultNumberingSystem=dn}static get defaultOutputCalendar(){return defaultOutputCalendar}static set defaultOutputCalendar(dn){defaultOutputCalendar=dn}static get defaultWeekSettings(){return defaultWeekSettings}static set defaultWeekSettings(dn){defaultWeekSettings=validateWeekSettings(dn)}static get twoDigitCutoffYear(){return twoDigitCutoffYear}static set twoDigitCutoffYear(dn){twoDigitCutoffYear=dn%100}static get throwOnInvalid(){return throwOnInvalid}static set throwOnInvalid(dn){throwOnInvalid=dn}static resetCaches(){Locale.resetCache(),IANAZone.resetCache(),DateTime.resetCache(),resetDigitRegexCache()}};class Invalid{constructor(dn,ms){this.reason=dn,this.explanation=ms}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(ds,dn){return new Invalid("unit out of range",`you specified ${dn} (of type ${typeof dn}) as a ${ds}, which is invalid`)}function dayOfWeek(ds,dn,ms){const xs=new Date(Date.UTC(ds,dn-1,ms));ds<100&&ds>=0&&xs.setUTCFullYear(xs.getUTCFullYear()-1900);const bs=xs.getUTCDay();return bs===0?7:bs}function computeOrdinal(ds,dn,ms){return ms+(isLeapYear$1(ds)?leapLadder:nonLeapLadder)[dn-1]}function uncomputeOrdinal(ds,dn){const ms=isLeapYear$1(ds)?leapLadder:nonLeapLadder,xs=ms.findIndex(Es=>Es<dn),bs=dn-ms[xs];return{month:xs+1,day:bs}}function isoWeekdayToLocal(ds,dn){return(ds-dn+7)%7+1}function gregorianToWeek(ds,dn=4,ms=1){const{year:xs,month:bs,day:Es}=ds,ws=computeOrdinal(xs,bs,Es),Rs=isoWeekdayToLocal(dayOfWeek(xs,bs,Es),ms);let js=Math.floor((ws-Rs+14-dn)/7),Cs;return js<1?(Cs=xs-1,js=weeksInWeekYear(Cs,dn,ms)):js>weeksInWeekYear(xs,dn,ms)?(Cs=xs+1,js=1):Cs=xs,{weekYear:Cs,weekNumber:js,weekday:Rs,...timeObject(ds)}}function weekToGregorian(ds,dn=4,ms=1){const{weekYear:xs,weekNumber:bs,weekday:Es}=ds,ws=isoWeekdayToLocal(dayOfWeek(xs,1,dn),ms),Rs=daysInYear(xs);let js=bs*7+Es-ws-7+dn,Cs;js<1?(Cs=xs-1,js+=daysInYear(Cs)):js>Rs?(Cs=xs+1,js-=daysInYear(xs)):Cs=xs;const{month:As,day:ks}=uncomputeOrdinal(Cs,js);return{year:Cs,month:As,day:ks,...timeObject(ds)}}function gregorianToOrdinal(ds){const{year:dn,month:ms,day:xs}=ds,bs=computeOrdinal(dn,ms,xs);return{year:dn,ordinal:bs,...timeObject(ds)}}function ordinalToGregorian(ds){const{year:dn,ordinal:ms}=ds,{month:xs,day:bs}=uncomputeOrdinal(dn,ms);return{year:dn,month:xs,day:bs,...timeObject(ds)}}function usesLocalWeekValues(ds,dn){if(!isUndefined(ds.localWeekday)||!isUndefined(ds.localWeekNumber)||!isUndefined(ds.localWeekYear)){if(!isUndefined(ds.weekday)||!isUndefined(ds.weekNumber)||!isUndefined(ds.weekYear))throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields");return isUndefined(ds.localWeekday)||(ds.weekday=ds.localWeekday),isUndefined(ds.localWeekNumber)||(ds.weekNumber=ds.localWeekNumber),isUndefined(ds.localWeekYear)||(ds.weekYear=ds.localWeekYear),delete ds.localWeekday,delete ds.localWeekNumber,delete ds.localWeekYear,{minDaysInFirstWeek:dn.getMinDaysInFirstWeek(),startOfWeek:dn.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function hasInvalidWeekData(ds,dn=4,ms=1){const xs=isInteger(ds.weekYear),bs=integerBetween(ds.weekNumber,1,weeksInWeekYear(ds.weekYear,dn,ms)),Es=integerBetween(ds.weekday,1,7);return xs?bs?Es?!1:unitOutOfRange("weekday",ds.weekday):unitOutOfRange("week",ds.weekNumber):unitOutOfRange("weekYear",ds.weekYear)}function hasInvalidOrdinalData(ds){const dn=isInteger(ds.year),ms=integerBetween(ds.ordinal,1,daysInYear(ds.year));return dn?ms?!1:unitOutOfRange("ordinal",ds.ordinal):unitOutOfRange("year",ds.year)}function hasInvalidGregorianData(ds){const dn=isInteger(ds.year),ms=integerBetween(ds.month,1,12),xs=integerBetween(ds.day,1,daysInMonth(ds.year,ds.month));return dn?ms?xs?!1:unitOutOfRange("day",ds.day):unitOutOfRange("month",ds.month):unitOutOfRange("year",ds.year)}function hasInvalidTimeData(ds){const{hour:dn,minute:ms,second:xs,millisecond:bs}=ds,Es=integerBetween(dn,0,23)||dn===24&&ms===0&&xs===0&&bs===0,ws=integerBetween(ms,0,59),Rs=integerBetween(xs,0,59),js=integerBetween(bs,0,999);return Es?ws?Rs?js?!1:unitOutOfRange("millisecond",bs):unitOutOfRange("second",xs):unitOutOfRange("minute",ms):unitOutOfRange("hour",dn)}function isUndefined(ds){return typeof ds>"u"}function isNumber(ds){return typeof ds=="number"}function isInteger(ds){return typeof ds=="number"&&ds%1===0}function isString(ds){return typeof ds=="string"}function isDate(ds){return Object.prototype.toString.call(ds)==="[object Date]"}function hasRelative(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function hasLocaleWeekInfo(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function maybeArray(ds){return Array.isArray(ds)?ds:[ds]}function bestBy(ds,dn,ms){if(ds.length!==0)return ds.reduce((xs,bs)=>{const Es=[dn(bs),bs];return xs&&ms(xs[0],Es[0])===xs[0]?xs:Es},null)[1]}function pick(ds,dn){return dn.reduce((ms,xs)=>(ms[xs]=ds[xs],ms),{})}function hasOwnProperty$1(ds,dn){return Object.prototype.hasOwnProperty.call(ds,dn)}function validateWeekSettings(ds){if(ds==null)return null;if(typeof ds!="object")throw new InvalidArgumentError("Week settings must be an object");if(!integerBetween(ds.firstDay,1,7)||!integerBetween(ds.minimalDays,1,7)||!Array.isArray(ds.weekend)||ds.weekend.some(dn=>!integerBetween(dn,1,7)))throw new InvalidArgumentError("Invalid week settings");return{firstDay:ds.firstDay,minimalDays:ds.minimalDays,weekend:Array.from(ds.weekend)}}function integerBetween(ds,dn,ms){return isInteger(ds)&&ds>=dn&&ds<=ms}function floorMod(ds,dn){return ds-dn*Math.floor(ds/dn)}function padStart(ds,dn=2){const ms=ds<0;let xs;return ms?xs="-"+(""+-ds).padStart(dn,"0"):xs=(""+ds).padStart(dn,"0"),xs}function parseInteger(ds){if(!(isUndefined(ds)||ds===null||ds===""))return parseInt(ds,10)}function parseFloating(ds){if(!(isUndefined(ds)||ds===null||ds===""))return parseFloat(ds)}function parseMillis(ds){if(!(isUndefined(ds)||ds===null||ds==="")){const dn=parseFloat("0."+ds)*1e3;return Math.floor(dn)}}function roundTo(ds,dn,ms="round"){const xs=10**dn;switch(ms){case"expand":return ds>0?Math.ceil(ds*xs)/xs:Math.floor(ds*xs)/xs;case"trunc":return Math.trunc(ds*xs)/xs;case"round":return Math.round(ds*xs)/xs;case"floor":return Math.floor(ds*xs)/xs;case"ceil":return Math.ceil(ds*xs)/xs;default:throw new RangeError(`Value rounding ${ms} is out of range`)}}function isLeapYear$1(ds){return ds%4===0&&(ds%100!==0||ds%400===0)}function daysInYear(ds){return isLeapYear$1(ds)?366:365}function daysInMonth(ds,dn){const ms=floorMod(dn-1,12)+1,xs=ds+(dn-ms)/12;return ms===2?isLeapYear$1(xs)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][ms-1]}function objToLocalTS(ds){let dn=Date.UTC(ds.year,ds.month-1,ds.day,ds.hour,ds.minute,ds.second,ds.millisecond);return ds.year<100&&ds.year>=0&&(dn=new Date(dn),dn.setUTCFullYear(ds.year,ds.month-1,ds.day)),+dn}function firstWeekOffset(ds,dn,ms){return-isoWeekdayToLocal(dayOfWeek(ds,1,dn),ms)+dn-1}function weeksInWeekYear(ds,dn=4,ms=1){const xs=firstWeekOffset(ds,dn,ms),bs=firstWeekOffset(ds+1,dn,ms);return(daysInYear(ds)-xs+bs)/7}function untruncateYear(ds){return ds>99?ds:ds>Settings$1.twoDigitCutoffYear?1900+ds:2e3+ds}function parseZoneInfo(ds,dn,ms,xs=null){const bs=new Date(ds),Es={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};xs&&(Es.timeZone=xs);const ws={timeZoneName:dn,...Es},Rs=new Intl.DateTimeFormat(ms,ws).formatToParts(bs).find(js=>js.type.toLowerCase()==="timezonename");return Rs?Rs.value:null}function signedOffset(ds,dn){let ms=parseInt(ds,10);Number.isNaN(ms)&&(ms=0);const xs=parseInt(dn,10)||0,bs=ms<0||Object.is(ms,-0)?-xs:xs;return ms*60+bs}function asNumber(ds){const dn=Number(ds);if(typeof ds=="boolean"||ds===""||!Number.isFinite(dn))throw new InvalidArgumentError(`Invalid unit value ${ds}`);return dn}function normalizeObject(ds,dn){const ms={};for(const xs in ds)if(hasOwnProperty$1(ds,xs)){const bs=ds[xs];if(bs==null)continue;ms[dn(xs)]=asNumber(bs)}return ms}function formatOffset(ds,dn){const ms=Math.trunc(Math.abs(ds/60)),xs=Math.trunc(Math.abs(ds%60)),bs=ds>=0?"+":"-";switch(dn){case"short":return`${bs}${padStart(ms,2)}:${padStart(xs,2)}`;case"narrow":return`${bs}${ms}${xs>0?`:${xs}`:""}`;case"techie":return`${bs}${padStart(ms,2)}${padStart(xs,2)}`;default:throw new RangeError(`Value format ${dn} is out of range for property format`)}}function timeObject(ds){return pick(ds,["hour","minute","second","millisecond"])}const monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months$1(ds){switch(ds){case"narrow":return[...monthsNarrow];case"short":return[...monthsShort];case"long":return[...monthsLong];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(ds){switch(ds){case"narrow":return[...weekdaysNarrow];case"short":return[...weekdaysShort];case"long":return[...weekdaysLong];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(ds){switch(ds){case"narrow":return[...erasNarrow];case"short":return[...erasShort];case"long":return[...erasLong];default:return null}}function meridiemForDateTime(ds){return meridiems[ds.hour<12?0:1]}function weekdayForDateTime(ds,dn){return weekdays(dn)[ds.weekday-1]}function monthForDateTime(ds,dn){return months$1(dn)[ds.month-1]}function eraForDateTime(ds,dn){return eras(dn)[ds.year<0?0:1]}function formatRelativeTime(ds,dn,ms="always",xs=!1){const bs={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},Es=["hours","minutes","seconds"].indexOf(ds)===-1;if(ms==="auto"&&Es){const ks=ds==="days";switch(dn){case 1:return ks?"tomorrow":`next ${bs[ds][0]}`;case-1:return ks?"yesterday":`last ${bs[ds][0]}`;case 0:return ks?"today":`this ${bs[ds][0]}`}}const ws=Object.is(dn,-0)||dn<0,Rs=Math.abs(dn),js=Rs===1,Cs=bs[ds],As=xs?js?Cs[1]:Cs[2]||Cs[1]:js?bs[ds][0]:ds;return ws?`${Rs} ${As} ago`:`in ${Rs} ${As}`}function stringifyTokens(ds,dn){let ms="";for(const xs of ds)xs.literal?ms+=xs.val:ms+=dn(xs.val);return ms}const macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS};class Formatter{static create(dn,ms={}){return new Formatter(dn,ms)}static parseFormat(dn){let ms=null,xs="",bs=!1;const Es=[];for(let ws=0;ws<dn.length;ws++){const Rs=dn.charAt(ws);Rs==="'"?((xs.length>0||bs)&&Es.push({literal:bs||/^\s+$/.test(xs),val:xs===""?"'":xs}),ms=null,xs="",bs=!bs):bs||Rs===ms?xs+=Rs:(xs.length>0&&Es.push({literal:/^\s+$/.test(xs),val:xs}),xs=Rs,ms=Rs)}return xs.length>0&&Es.push({literal:bs||/^\s+$/.test(xs),val:xs}),Es}static macroTokenToFormatOpts(dn){return macroTokenToFormatOpts[dn]}constructor(dn,ms){this.opts=ms,this.loc=dn,this.systemLoc=null}formatWithSystemDefault(dn,ms){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(dn,{...this.opts,...ms}).format()}dtFormatter(dn,ms={}){return this.loc.dtFormatter(dn,{...this.opts,...ms})}formatDateTime(dn,ms){return this.dtFormatter(dn,ms).format()}formatDateTimeParts(dn,ms){return this.dtFormatter(dn,ms).formatToParts()}formatInterval(dn,ms){return this.dtFormatter(dn.start,ms).dtf.formatRange(dn.start.toJSDate(),dn.end.toJSDate())}resolvedOptions(dn,ms){return this.dtFormatter(dn,ms).resolvedOptions()}num(dn,ms=0,xs=void 0){if(this.opts.forceSimple)return padStart(dn,ms);const bs={...this.opts};return ms>0&&(bs.padTo=ms),xs&&(bs.signDisplay=xs),this.loc.numberFormatter(bs).format(dn)}formatDateTimeFromString(dn,ms){const xs=this.loc.listingMode()==="en",bs=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",Es=(Ms,Ds)=>this.loc.extract(dn,Ms,Ds),ws=Ms=>dn.isOffsetFixed&&dn.offset===0&&Ms.allowZ?"Z":dn.isValid?dn.zone.formatOffset(dn.ts,Ms.format):"",Rs=()=>xs?meridiemForDateTime(dn):Es({hour:"numeric",hourCycle:"h12"},"dayperiod"),js=(Ms,Ds)=>xs?monthForDateTime(dn,Ms):Es(Ds?{month:Ms}:{month:Ms,day:"numeric"},"month"),Cs=(Ms,Ds)=>xs?weekdayForDateTime(dn,Ms):Es(Ds?{weekday:Ms}:{weekday:Ms,month:"long",day:"numeric"},"weekday"),As=Ms=>{const Ds=Formatter.macroTokenToFormatOpts(Ms);return Ds?this.formatWithSystemDefault(dn,Ds):Ms},ks=Ms=>xs?eraForDateTime(dn,Ms):Es({era:Ms},"era"),Os=Ms=>{switch(Ms){case"S":return this.num(dn.millisecond);case"u":case"SSS":return this.num(dn.millisecond,3);case"s":return this.num(dn.second);case"ss":return this.num(dn.second,2);case"uu":return this.num(Math.floor(dn.millisecond/10),2);case"uuu":return this.num(Math.floor(dn.millisecond/100));case"m":return this.num(dn.minute);case"mm":return this.num(dn.minute,2);case"h":return this.num(dn.hour%12===0?12:dn.hour%12);case"hh":return this.num(dn.hour%12===0?12:dn.hour%12,2);case"H":return this.num(dn.hour);case"HH":return this.num(dn.hour,2);case"Z":return ws({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return ws({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return ws({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return dn.zone.offsetName(dn.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return dn.zone.offsetName(dn.ts,{format:"long",locale:this.loc.locale});case"z":return dn.zoneName;case"a":return Rs();case"d":return bs?Es({day:"numeric"},"day"):this.num(dn.day);case"dd":return bs?Es({day:"2-digit"},"day"):this.num(dn.day,2);case"c":return this.num(dn.weekday);case"ccc":return Cs("short",!0);case"cccc":return Cs("long",!0);case"ccccc":return Cs("narrow",!0);case"E":return this.num(dn.weekday);case"EEE":return Cs("short",!1);case"EEEE":return Cs("long",!1);case"EEEEE":return Cs("narrow",!1);case"L":return bs?Es({month:"numeric",day:"numeric"},"month"):this.num(dn.month);case"LL":return bs?Es({month:"2-digit",day:"numeric"},"month"):this.num(dn.month,2);case"LLL":return js("short",!0);case"LLLL":return js("long",!0);case"LLLLL":return js("narrow",!0);case"M":return bs?Es({month:"numeric"},"month"):this.num(dn.month);case"MM":return bs?Es({month:"2-digit"},"month"):this.num(dn.month,2);case"MMM":return js("short",!1);case"MMMM":return js("long",!1);case"MMMMM":return js("narrow",!1);case"y":return bs?Es({year:"numeric"},"year"):this.num(dn.year);case"yy":return bs?Es({year:"2-digit"},"year"):this.num(dn.year.toString().slice(-2),2);case"yyyy":return bs?Es({year:"numeric"},"year"):this.num(dn.year,4);case"yyyyyy":return bs?Es({year:"numeric"},"year"):this.num(dn.year,6);case"G":return ks("short");case"GG":return ks("long");case"GGGGG":return ks("narrow");case"kk":return this.num(dn.weekYear.toString().slice(-2),2);case"kkkk":return this.num(dn.weekYear,4);case"W":return this.num(dn.weekNumber);case"WW":return this.num(dn.weekNumber,2);case"n":return this.num(dn.localWeekNumber);case"nn":return this.num(dn.localWeekNumber,2);case"ii":return this.num(dn.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(dn.localWeekYear,4);case"o":return this.num(dn.ordinal);case"ooo":return this.num(dn.ordinal,3);case"q":return this.num(dn.quarter);case"qq":return this.num(dn.quarter,2);case"X":return this.num(Math.floor(dn.ts/1e3));case"x":return this.num(dn.ts);default:return As(Ms)}};return stringifyTokens(Formatter.parseFormat(ms),Os)}formatDurationFromString(dn,ms){const xs=this.opts.signMode==="negativeLargestOnly"?-1:1,bs=As=>{switch(As[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},Es=(As,ks)=>Os=>{const Ms=bs(Os);if(Ms){const Ds=ks.isNegativeDuration&&Ms!==ks.largestUnit?xs:1;let Ps;return this.opts.signMode==="negativeLargestOnly"&&Ms!==ks.largestUnit?Ps="never":this.opts.signMode==="all"?Ps="always":Ps="auto",this.num(As.get(Ms)*Ds,Os.length,Ps)}else return Os},ws=Formatter.parseFormat(ms),Rs=ws.reduce((As,{literal:ks,val:Os})=>ks?As:As.concat(Os),[]),js=dn.shiftTo(...Rs.map(bs).filter(As=>As)),Cs={isNegativeDuration:js<0,largestUnit:Object.keys(js.values)[0]};return stringifyTokens(ws,Es(js,Cs))}}const ianaRegex=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function combineRegexes(...ds){const dn=ds.reduce((ms,xs)=>ms+xs.source,"");return RegExp(`^${dn}$`)}function combineExtractors(...ds){return dn=>ds.reduce(([ms,xs,bs],Es)=>{const[ws,Rs,js]=Es(dn,bs);return[{...ms,...ws},Rs||xs,js]},[{},null,1]).slice(0,2)}function parse$2(ds,...dn){if(ds==null)return[null,null];for(const[ms,xs]of dn){const bs=ms.exec(ds);if(bs)return xs(bs)}return[null,null]}function simpleParse(...ds){return(dn,ms)=>{const xs={};let bs;for(bs=0;bs<ds.length;bs++)xs[ds[bs]]=parseInteger(dn[ms+bs]);return[xs,null,ms+bs]}}const offsetRegex=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,isoExtendedZone=`(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`),isoTimeExtensionRegex=RegExp(`(?:[Tt]${isoTimeRegex.source})?`),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`),sqlTimeExtensionRegex=RegExp(`(?: ${sqlTimeRegex.source})?`);function int$1(ds,dn,ms){const xs=ds[dn];return isUndefined(xs)?ms:parseInteger(xs)}function extractISOYmd(ds,dn){return[{year:int$1(ds,dn),month:int$1(ds,dn+1,1),day:int$1(ds,dn+2,1)},null,dn+3]}function extractISOTime(ds,dn){return[{hours:int$1(ds,dn,0),minutes:int$1(ds,dn+1,0),seconds:int$1(ds,dn+2,0),milliseconds:parseMillis(ds[dn+3])},null,dn+4]}function extractISOOffset(ds,dn){const ms=!ds[dn]&&!ds[dn+1],xs=signedOffset(ds[dn+1],ds[dn+2]),bs=ms?null:FixedOffsetZone.instance(xs);return[{},bs,dn+3]}function extractIANAZone(ds,dn){const ms=ds[dn]?IANAZone.create(ds[dn]):null;return[{},ms,dn+1]}const isoTimeOnly=RegExp(`^T?${isoTimeBaseRegex.source}$`),isoDuration=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function extractISODuration(ds){const[dn,ms,xs,bs,Es,ws,Rs,js,Cs]=ds,As=dn[0]==="-",ks=js&&js[0]==="-",Os=(Ms,Ds=!1)=>Ms!==void 0&&(Ds||Ms&&As)?-Ms:Ms;return[{years:Os(parseFloating(ms)),months:Os(parseFloating(xs)),weeks:Os(parseFloating(bs)),days:Os(parseFloating(Es)),hours:Os(parseFloating(ws)),minutes:Os(parseFloating(Rs)),seconds:Os(parseFloating(js),js==="-0"),milliseconds:Os(parseMillis(Cs),ks)}]}const obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(ds,dn,ms,xs,bs,Es,ws){const Rs={year:dn.length===2?untruncateYear(parseInteger(dn)):parseInteger(dn),month:monthsShort.indexOf(ms)+1,day:parseInteger(xs),hour:parseInteger(bs),minute:parseInteger(Es)};return ws&&(Rs.second=parseInteger(ws)),ds&&(Rs.weekday=ds.length>3?weekdaysLong.indexOf(ds)+1:weekdaysShort.indexOf(ds)+1),Rs}const rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(ds){const[,dn,ms,xs,bs,Es,ws,Rs,js,Cs,As,ks]=ds,Os=fromStrings(dn,bs,xs,ms,Es,ws,Rs);let Ms;return js?Ms=obsOffsets[js]:Cs?Ms=0:Ms=signedOffset(As,ks),[Os,new FixedOffsetZone(Ms)]}function preprocessRFC2822(ds){return ds.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(ds){const[,dn,ms,xs,bs,Es,ws,Rs]=ds;return[fromStrings(dn,bs,xs,ms,Es,ws,Rs),FixedOffsetZone.utcInstance]}function extractASCII(ds){const[,dn,ms,xs,bs,Es,ws,Rs]=ds;return[fromStrings(dn,Rs,ms,xs,bs,Es,ws),FixedOffsetZone.utcInstance]}const isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset,extractIANAZone),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseISODate(ds){return parse$2(ds,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(ds){return parse$2(preprocessRFC2822(ds),[rfc2822,extractRFC2822])}function parseHTTPDate(ds){return parse$2(ds,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(ds){return parse$2(ds,[isoDuration,extractISODuration])}const extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(ds){return parse$2(ds,[isoTimeOnly,extractISOTimeOnly])}const sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(ds){return parse$2(ds,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}const INVALID$2="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},casualMatrix={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...lowOrderMatrix},daysInYearAccurate=146097/400,daysInMonthAccurate=146097/4800,accurateMatrix={years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:daysInYearAccurate*24,minutes:daysInYearAccurate*24*60,seconds:daysInYearAccurate*24*60*60,milliseconds:daysInYearAccurate*24*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:daysInYearAccurate*24/4,minutes:daysInYearAccurate*24*60/4,seconds:daysInYearAccurate*24*60*60/4,milliseconds:daysInYearAccurate*24*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:daysInMonthAccurate*24,minutes:daysInMonthAccurate*24*60,seconds:daysInMonthAccurate*24*60*60,milliseconds:daysInMonthAccurate*24*60*60*1e3},...lowOrderMatrix},orderedUnits$1=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits$1.slice(0).reverse();function clone$1(ds,dn,ms=!1){const xs={values:ms?dn.values:{...ds.values,...dn.values||{}},loc:ds.loc.clone(dn.loc),conversionAccuracy:dn.conversionAccuracy||ds.conversionAccuracy,matrix:dn.matrix||ds.matrix};return new Duration(xs)}function durationToMillis(ds,dn){let ms=dn.milliseconds??0;for(const xs of reverseUnits.slice(1))dn[xs]&&(ms+=dn[xs]*ds[xs].milliseconds);return ms}function normalizeValues(ds,dn){const ms=durationToMillis(ds,dn)<0?-1:1;orderedUnits$1.reduceRight((xs,bs)=>{if(isUndefined(dn[bs]))return xs;if(xs){const Es=dn[xs]*ms,ws=ds[bs][xs],Rs=Math.floor(Es/ws);dn[bs]+=Rs*ms,dn[xs]-=Rs*ws*ms}return bs},null),orderedUnits$1.reduce((xs,bs)=>{if(isUndefined(dn[bs]))return xs;if(xs){const Es=dn[xs]%1;dn[xs]-=Es,dn[bs]+=Es*ds[xs][bs]}return bs},null)}function removeZeroes(ds){const dn={};for(const[ms,xs]of Object.entries(ds))xs!==0&&(dn[ms]=xs);return dn}class Duration{constructor(dn){const ms=dn.conversionAccuracy==="longterm"||!1;let xs=ms?accurateMatrix:casualMatrix;dn.matrix&&(xs=dn.matrix),this.values=dn.values,this.loc=dn.loc||Locale.create(),this.conversionAccuracy=ms?"longterm":"casual",this.invalid=dn.invalid||null,this.matrix=xs,this.isLuxonDuration=!0}static fromMillis(dn,ms){return Duration.fromObject({milliseconds:dn},ms)}static fromObject(dn,ms={}){if(dn==null||typeof dn!="object")throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${dn===null?"null":typeof dn}`);return new Duration({values:normalizeObject(dn,Duration.normalizeUnit),loc:Locale.fromObject(ms),conversionAccuracy:ms.conversionAccuracy,matrix:ms.matrix})}static fromDurationLike(dn){if(isNumber(dn))return Duration.fromMillis(dn);if(Duration.isDuration(dn))return dn;if(typeof dn=="object")return Duration.fromObject(dn);throw new InvalidArgumentError(`Unknown duration argument ${dn} of type ${typeof dn}`)}static fromISO(dn,ms){const[xs]=parseISODuration(dn);return xs?Duration.fromObject(xs,ms):Duration.invalid("unparsable",`the input "${dn}" can't be parsed as ISO 8601`)}static fromISOTime(dn,ms){const[xs]=parseISOTimeOnly(dn);return xs?Duration.fromObject(xs,ms):Duration.invalid("unparsable",`the input "${dn}" can't be parsed as ISO 8601`)}static invalid(dn,ms=null){if(!dn)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");const xs=dn instanceof Invalid?dn:new Invalid(dn,ms);if(Settings$1.throwOnInvalid)throw new InvalidDurationError(xs);return new Duration({invalid:xs})}static normalizeUnit(dn){const ms={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[dn&&dn.toLowerCase()];if(!ms)throw new InvalidUnitError(dn);return ms}static isDuration(dn){return dn&&dn.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(dn,ms={}){const xs={...ms,floor:ms.round!==!1&&ms.floor!==!1};return this.isValid?Formatter.create(this.loc,xs).formatDurationFromString(this,dn):INVALID$2}toHuman(dn={}){if(!this.isValid)return INVALID$2;const ms=dn.showZeros!==!1,xs=orderedUnits$1.map(bs=>{const Es=this.values[bs];return isUndefined(Es)||Es===0&&!ms?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...dn,unit:bs.slice(0,-1)}).format(Es)}).filter(bs=>bs);return this.loc.listFormatter({type:"conjunction",style:dn.listStyle||"narrow",...dn}).format(xs)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let dn="P";return this.years!==0&&(dn+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(dn+=this.months+this.quarters*3+"M"),this.weeks!==0&&(dn+=this.weeks+"W"),this.days!==0&&(dn+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(dn+="T"),this.hours!==0&&(dn+=this.hours+"H"),this.minutes!==0&&(dn+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(dn+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),dn==="P"&&(dn+="T0S"),dn}toISOTime(dn={}){if(!this.isValid)return null;const ms=this.toMillis();return ms<0||ms>=864e5?null:(dn={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...dn,includeOffset:!1},DateTime.fromMillis(ms,{zone:"UTC"}).toISOTime(dn))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?durationToMillis(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(dn){if(!this.isValid)return this;const ms=Duration.fromDurationLike(dn),xs={};for(const bs of orderedUnits$1)(hasOwnProperty$1(ms.values,bs)||hasOwnProperty$1(this.values,bs))&&(xs[bs]=ms.get(bs)+this.get(bs));return clone$1(this,{values:xs},!0)}minus(dn){if(!this.isValid)return this;const ms=Duration.fromDurationLike(dn);return this.plus(ms.negate())}mapUnits(dn){if(!this.isValid)return this;const ms={};for(const xs of Object.keys(this.values))ms[xs]=asNumber(dn(this.values[xs],xs));return clone$1(this,{values:ms},!0)}get(dn){return this[Duration.normalizeUnit(dn)]}set(dn){if(!this.isValid)return this;const ms={...this.values,...normalizeObject(dn,Duration.normalizeUnit)};return clone$1(this,{values:ms})}reconfigure({locale:dn,numberingSystem:ms,conversionAccuracy:xs,matrix:bs}={}){const ws={loc:this.loc.clone({locale:dn,numberingSystem:ms}),matrix:bs,conversionAccuracy:xs};return clone$1(this,ws)}as(dn){return this.isValid?this.shiftTo(dn).get(dn):NaN}normalize(){if(!this.isValid)return this;const dn=this.toObject();return normalizeValues(this.matrix,dn),clone$1(this,{values:dn},!0)}rescale(){if(!this.isValid)return this;const dn=removeZeroes(this.normalize().shiftToAll().toObject());return clone$1(this,{values:dn},!0)}shiftTo(...dn){if(!this.isValid)return this;if(dn.length===0)return this;dn=dn.map(ws=>Duration.normalizeUnit(ws));const ms={},xs={},bs=this.toObject();let Es;for(const ws of orderedUnits$1)if(dn.indexOf(ws)>=0){Es=ws;let Rs=0;for(const Cs in xs)Rs+=this.matrix[Cs][ws]*xs[Cs],xs[Cs]=0;isNumber(bs[ws])&&(Rs+=bs[ws]);const js=Math.trunc(Rs);ms[ws]=js,xs[ws]=(Rs*1e3-js*1e3)/1e3}else isNumber(bs[ws])&&(xs[ws]=bs[ws]);for(const ws in xs)xs[ws]!==0&&(ms[Es]+=ws===Es?xs[ws]:xs[ws]/this.matrix[Es][ws]);return normalizeValues(this.matrix,ms),clone$1(this,{values:ms},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const dn={};for(const ms of Object.keys(this.values))dn[ms]=this.values[ms]===0?0:-this.values[ms];return clone$1(this,{values:dn},!0)}removeZeros(){if(!this.isValid)return this;const dn=removeZeroes(this.values);return clone$1(this,{values:dn},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(dn){if(!this.isValid||!dn.isValid||!this.loc.equals(dn.loc))return!1;function ms(xs,bs){return xs===void 0||xs===0?bs===void 0||bs===0:xs===bs}for(const xs of orderedUnits$1)if(!ms(this.values[xs],dn.values[xs]))return!1;return!0}}const INVALID$1="Invalid Interval";function validateStartEnd(ds,dn){return!ds||!ds.isValid?Interval.invalid("missing or invalid start"):!dn||!dn.isValid?Interval.invalid("missing or invalid end"):dn<ds?Interval.invalid("end before start",`The end of an interval must be after its start, but you had start=${ds.toISO()} and end=${dn.toISO()}`):null}class Interval{constructor(dn){this.s=dn.start,this.e=dn.end,this.invalid=dn.invalid||null,this.isLuxonInterval=!0}static invalid(dn,ms=null){if(!dn)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");const xs=dn instanceof Invalid?dn:new Invalid(dn,ms);if(Settings$1.throwOnInvalid)throw new InvalidIntervalError(xs);return new Interval({invalid:xs})}static fromDateTimes(dn,ms){const xs=friendlyDateTime(dn),bs=friendlyDateTime(ms),Es=validateStartEnd(xs,bs);return Es??new Interval({start:xs,end:bs})}static after(dn,ms){const xs=Duration.fromDurationLike(ms),bs=friendlyDateTime(dn);return Interval.fromDateTimes(bs,bs.plus(xs))}static before(dn,ms){const xs=Duration.fromDurationLike(ms),bs=friendlyDateTime(dn);return Interval.fromDateTimes(bs.minus(xs),bs)}static fromISO(dn,ms){const[xs,bs]=(dn||"").split("/",2);if(xs&&bs){let Es,ws;try{Es=DateTime.fromISO(xs,ms),ws=Es.isValid}catch{ws=!1}let Rs,js;try{Rs=DateTime.fromISO(bs,ms),js=Rs.isValid}catch{js=!1}if(ws&&js)return Interval.fromDateTimes(Es,Rs);if(ws){const Cs=Duration.fromISO(bs,ms);if(Cs.isValid)return Interval.after(Es,Cs)}else if(js){const Cs=Duration.fromISO(xs,ms);if(Cs.isValid)return Interval.before(Rs,Cs)}}return Interval.invalid("unparsable",`the input "${dn}" can't be parsed as ISO 8601`)}static isInterval(dn){return dn&&dn.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(dn="milliseconds"){return this.isValid?this.toDuration(dn).get(dn):NaN}count(dn="milliseconds",ms){if(!this.isValid)return NaN;const xs=this.start.startOf(dn,ms);let bs;return ms?.useLocaleWeeks?bs=this.end.reconfigure({locale:xs.locale}):bs=this.end,bs=bs.startOf(dn,ms),Math.floor(bs.diff(xs,dn).get(dn))+(bs.valueOf()!==this.end.valueOf())}hasSame(dn){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,dn):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(dn){return this.isValid?this.s>dn:!1}isBefore(dn){return this.isValid?this.e<=dn:!1}contains(dn){return this.isValid?this.s<=dn&&this.e>dn:!1}set({start:dn,end:ms}={}){return this.isValid?Interval.fromDateTimes(dn||this.s,ms||this.e):this}splitAt(...dn){if(!this.isValid)return[];const ms=dn.map(friendlyDateTime).filter(ws=>this.contains(ws)).sort((ws,Rs)=>ws.toMillis()-Rs.toMillis()),xs=[];let{s:bs}=this,Es=0;for(;bs<this.e;){const ws=ms[Es]||this.e,Rs=+ws>+this.e?this.e:ws;xs.push(Interval.fromDateTimes(bs,Rs)),bs=Rs,Es+=1}return xs}splitBy(dn){const ms=Duration.fromDurationLike(dn);if(!this.isValid||!ms.isValid||ms.as("milliseconds")===0)return[];let{s:xs}=this,bs=1,Es;const ws=[];for(;xs<this.e;){const Rs=this.start.plus(ms.mapUnits(js=>js*bs));Es=+Rs>+this.e?this.e:Rs,ws.push(Interval.fromDateTimes(xs,Es)),xs=Es,bs+=1}return ws}divideEqually(dn){return this.isValid?this.splitBy(this.length()/dn).slice(0,dn):[]}overlaps(dn){return this.e>dn.s&&this.s<dn.e}abutsStart(dn){return this.isValid?+this.e==+dn.s:!1}abutsEnd(dn){return this.isValid?+dn.e==+this.s:!1}engulfs(dn){return this.isValid?this.s<=dn.s&&this.e>=dn.e:!1}equals(dn){return!this.isValid||!dn.isValid?!1:this.s.equals(dn.s)&&this.e.equals(dn.e)}intersection(dn){if(!this.isValid)return this;const ms=this.s>dn.s?this.s:dn.s,xs=this.e<dn.e?this.e:dn.e;return ms>=xs?null:Interval.fromDateTimes(ms,xs)}union(dn){if(!this.isValid)return this;const ms=this.s<dn.s?this.s:dn.s,xs=this.e>dn.e?this.e:dn.e;return Interval.fromDateTimes(ms,xs)}static merge(dn){const[ms,xs]=dn.sort((bs,Es)=>bs.s-Es.s).reduce(([bs,Es],ws)=>Es?Es.overlaps(ws)||Es.abutsStart(ws)?[bs,Es.union(ws)]:[bs.concat([Es]),ws]:[bs,ws],[[],null]);return xs&&ms.push(xs),ms}static xor(dn){let ms=null,xs=0;const bs=[],Es=dn.map(js=>[{time:js.s,type:"s"},{time:js.e,type:"e"}]),ws=Array.prototype.concat(...Es),Rs=ws.sort((js,Cs)=>js.time-Cs.time);for(const js of Rs)xs+=js.type==="s"?1:-1,xs===1?ms=js.time:(ms&&+ms!=+js.time&&bs.push(Interval.fromDateTimes(ms,js.time)),ms=null);return Interval.merge(bs)}difference(...dn){return Interval.xor([this].concat(dn)).map(ms=>this.intersection(ms)).filter(ms=>ms&&!ms.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:INVALID$1}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(dn=DATE_SHORT,ms={}){return this.isValid?Formatter.create(this.s.loc.clone(ms),dn).formatInterval(this):INVALID$1}toISO(dn){return this.isValid?`${this.s.toISO(dn)}/${this.e.toISO(dn)}`:INVALID$1}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:INVALID$1}toISOTime(dn){return this.isValid?`${this.s.toISOTime(dn)}/${this.e.toISOTime(dn)}`:INVALID$1}toFormat(dn,{separator:ms=" – "}={}){return this.isValid?`${this.s.toFormat(dn)}${ms}${this.e.toFormat(dn)}`:INVALID$1}toDuration(dn,ms){return this.isValid?this.e.diff(this.s,dn,ms):Duration.invalid(this.invalidReason)}mapEndpoints(dn){return Interval.fromDateTimes(dn(this.s),dn(this.e))}}let Info$3=class{static hasDST(dn=Settings$1.defaultZone){const ms=DateTime.now().setZone(dn).set({month:12});return!dn.isUniversal&&ms.offset!==ms.set({month:6}).offset}static isValidIANAZone(dn){return IANAZone.isValidZone(dn)}static normalizeZone(dn){return normalizeZone(dn,Settings$1.defaultZone)}static getStartOfWeek({locale:dn=null,locObj:ms=null}={}){return(ms||Locale.create(dn)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:dn=null,locObj:ms=null}={}){return(ms||Locale.create(dn)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:dn=null,locObj:ms=null}={}){return(ms||Locale.create(dn)).getWeekendDays().slice()}static months(dn="long",{locale:ms=null,numberingSystem:xs=null,locObj:bs=null,outputCalendar:Es="gregory"}={}){return(bs||Locale.create(ms,xs,Es)).months(dn)}static monthsFormat(dn="long",{locale:ms=null,numberingSystem:xs=null,locObj:bs=null,outputCalendar:Es="gregory"}={}){return(bs||Locale.create(ms,xs,Es)).months(dn,!0)}static weekdays(dn="long",{locale:ms=null,numberingSystem:xs=null,locObj:bs=null}={}){return(bs||Locale.create(ms,xs,null)).weekdays(dn)}static weekdaysFormat(dn="long",{locale:ms=null,numberingSystem:xs=null,locObj:bs=null}={}){return(bs||Locale.create(ms,xs,null)).weekdays(dn,!0)}static meridiems({locale:dn=null}={}){return Locale.create(dn).meridiems()}static eras(dn="short",{locale:ms=null}={}){return Locale.create(ms,null,"gregory").eras(dn)}static features(){return{relative:hasRelative(),localeWeek:hasLocaleWeekInfo()}}};function dayDiff(ds,dn){const ms=bs=>bs.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),xs=ms(dn)-ms(ds);return Math.floor(Duration.fromMillis(xs).as("days"))}function highOrderDiffs(ds,dn,ms){const xs=[["years",(js,Cs)=>Cs.year-js.year],["quarters",(js,Cs)=>Cs.quarter-js.quarter+(Cs.year-js.year)*4],["months",(js,Cs)=>Cs.month-js.month+(Cs.year-js.year)*12],["weeks",(js,Cs)=>{const As=dayDiff(js,Cs);return(As-As%7)/7}],["days",dayDiff]],bs={},Es=ds;let ws,Rs;for(const[js,Cs]of xs)ms.indexOf(js)>=0&&(ws=js,bs[js]=Cs(ds,dn),Rs=Es.plus(bs),Rs>dn?(bs[js]--,ds=Es.plus(bs),ds>dn&&(Rs=ds,bs[js]--,ds=Es.plus(bs))):ds=Rs);return[ds,bs,Rs,ws]}function diff(ds,dn,ms,xs){let[bs,Es,ws,Rs]=highOrderDiffs(ds,dn,ms);const js=dn-bs,Cs=ms.filter(ks=>["hours","minutes","seconds","milliseconds"].indexOf(ks)>=0);Cs.length===0&&(ws<dn&&(ws=bs.plus({[Rs]:1})),ws!==bs&&(Es[Rs]=(Es[Rs]||0)+js/(ws-bs)));const As=Duration.fromObject(Es,xs);return Cs.length>0?Duration.fromMillis(js,xs).shiftTo(...Cs).plus(As):As}const MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(ds,dn=ms=>ms){return{regex:ds,deser:([ms])=>dn(parseDigits(ms))}}const NBSP=" ",spaceOrNBSP=`[ ${NBSP}]`,spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(ds){return ds.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(ds){return ds.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(ds,dn){return ds===null?null:{regex:RegExp(ds.map(fixListRegex).join("|")),deser:([ms])=>ds.findIndex(xs=>stripInsensitivities(ms)===stripInsensitivities(xs))+dn}}function offset(ds,dn){return{regex:ds,deser:([,ms,xs])=>signedOffset(ms,xs),groups:dn}}function simple(ds){return{regex:ds,deser:([dn])=>dn}}function escapeToken(ds){return ds.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(ds,dn){const ms=digitRegex(dn),xs=digitRegex(dn,"{2}"),bs=digitRegex(dn,"{3}"),Es=digitRegex(dn,"{4}"),ws=digitRegex(dn,"{6}"),Rs=digitRegex(dn,"{1,2}"),js=digitRegex(dn,"{1,3}"),Cs=digitRegex(dn,"{1,6}"),As=digitRegex(dn,"{1,9}"),ks=digitRegex(dn,"{2,4}"),Os=digitRegex(dn,"{4,6}"),Ms=Ls=>({regex:RegExp(escapeToken(Ls.val)),deser:([Bs])=>Bs,literal:!0}),Ps=(Ls=>
13{if(ds.literal)return Ms(Ls);switch(Ls.val){case"G":return oneOf(dn.eras("short"),0);case"GG":return oneOf(dn.eras("long"),0);case"y":return intUnit(Cs);case"yy":return intUnit(ks,untruncateYear);case"yyyy":return intUnit(Es);case"yyyyy":return intUnit(Os);case"yyyyyy":return intUnit(ws);case"M":return intUnit(Rs);case"MM":return intUnit(xs);case"MMM":return oneOf(dn.months("short",!0),1);case"MMMM":return oneOf(dn.months("long",!0),1);case"L":return intUnit(Rs);case"LL":return intUnit(xs);case"LLL":return oneOf(dn.months("short",!1),1);case"LLLL":return oneOf(dn.months("long",!1),1);case"d":return intUnit(Rs);case"dd":return intUnit(xs);case"o":return intUnit(js);case"ooo":return intUnit(bs);case"HH":return intUnit(xs);case"H":return intUnit(Rs);case"hh":return intUnit(xs);case"h":return intUnit(Rs);case"mm":return intUnit(xs);case"m":return intUnit(Rs);case"q":return intUnit(Rs);case"qq":return intUnit(xs);case"s":return intUnit(Rs);case"ss":return intUnit(xs);case"S":return intUnit(js);case"SSS":return intUnit(bs);case"u":return simple(As);case"uu":return simple(Rs);case"uuu":return intUnit(ms);case"a":return oneOf(dn.meridiems(),0);case"kkkk":return intUnit(Es);case"kk":return intUnit(ks,untruncateYear);case"W":return intUnit(Rs);
vendor: 26,806 bytes, line 13
13case"WW":return intUnit(xs);case"E":case"c":return intUnit(ms);case"EEE":return oneOf(dn.weekdays("short",!1),1);case"EEEE":return oneOf(dn.weekdays("long",!1),1);case"ccc":return oneOf(dn.weekdays("short",!0),1);case"cccc":return oneOf(dn.weekdays("long",!0),1);case"Z":case"ZZ":return offset(new RegExp(`([+-]${Rs.source})(?::(${xs.source}))?`),2);case"ZZZ":return offset(new RegExp(`([+-]${Rs.source})(${xs.source})?`),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);case" ":return simple(/[^\S\n\r]/);default:return Ms(Ls)}})(ds)||{invalidReason:MISSING_FTP};return Ps.token=ds,Ps}const partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function tokenForPart(ds,dn,ms){const{type:xs,value:bs}=ds;if(xs==="literal"){const js=/^\s+$/.test(bs);return{literal:!js,val:js?" ":bs}}const Es=dn[xs];let ws=xs;xs==="hour"&&(dn.hour12!=null?ws=dn.hour12?"hour12":"hour24":dn.hourCycle!=null?dn.hourCycle==="h11"||dn.hourCycle==="h12"?ws="hour12":ws="hour24":ws=ms.hour12?"hour12":"hour24");let Rs=partTypeStyleToTokenVal[ws];if(typeof Rs=="object"&&(Rs=Rs[Es]),Rs)return{literal:!1,val:Rs}}function buildRegex(ds){return[`^${ds.map(ms=>ms.regex).reduce((ms,xs)=>`${ms}(${xs.source})`,"")}$`,ds]}function match(ds,dn,ms){const xs=ds.match(dn);if(xs){const bs={};let Es=1;for(const ws in ms)if(hasOwnProperty$1(ms,ws)){const Rs=ms[ws],js=Rs.groups?Rs.groups+1:1;!Rs.literal&&Rs.token&&(bs[Rs.token.val[0]]=Rs.deser(xs.slice(Es,Es+js))),Es+=js}return[xs,bs]}else return[xs,{}]}function dateTimeFromMatches(ds){const dn=Es=>{switch(Es){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let ms=null,xs;return isUndefined(ds.z)||(ms=IANAZone.create(ds.z)),isUndefined(ds.Z)||(ms||(ms=new FixedOffsetZone(ds.Z)),xs=ds.Z),isUndefined(ds.q)||(ds.M=(ds.q-1)*3+1),isUndefined(ds.h)||(ds.h<12&&ds.a===1?ds.h+=12:ds.h===12&&ds.a===0&&(ds.h=0)),ds.G===0&&ds.y&&(ds.y=-ds.y),isUndefined(ds.u)||(ds.S=parseMillis(ds.u)),[Object.keys(ds).reduce((Es,ws)=>{const Rs=dn(ws);return Rs&&(Es[Rs]=ds[ws]),Es},{}),ms,xs]}let dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache||(dummyDateTimeCache=DateTime.fromMillis(1555555555555)),dummyDateTimeCache}function maybeExpandMacroToken(ds,dn){if(ds.literal)return ds;const ms=Formatter.macroTokenToFormatOpts(ds.val),xs=formatOptsToTokens(ms,dn);return xs==null||xs.includes(void 0)?ds:xs}function expandMacroTokens(ds,dn){return Array.prototype.concat(...ds.map(ms=>maybeExpandMacroToken(ms,dn)))}class TokenParser{constructor(dn,ms){if(this.locale=dn,this.format=ms,this.tokens=expandMacroTokens(Formatter.parseFormat(ms),dn),this.units=this.tokens.map(xs=>unitForToken(xs,dn)),this.disqualifyingUnit=this.units.find(xs=>xs.invalidReason),!this.disqualifyingUnit){const[xs,bs]=buildRegex(this.units);this.regex=RegExp(xs,"i"),this.handlers=bs}}explainFromTokens(dn){if(this.isValid){const[ms,xs]=match(dn,this.regex,this.handlers),[bs,Es,ws]=xs?dateTimeFromMatches(xs):[null,null,void 0];if(hasOwnProperty$1(xs,"a")&&hasOwnProperty$1(xs,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:dn,tokens:this.tokens,regex:this.regex,rawMatches:ms,matches:xs,result:bs,zone:Es,specificOffset:ws}}else return{input:dn,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function explainFromTokens(ds,dn,ms){return new TokenParser(ds,ms).explainFromTokens(dn)}function parseFromTokens(ds,dn,ms){const{result:xs,zone:bs,specificOffset:Es,invalidReason:ws}=explainFromTokens(ds,dn,ms);return[xs,bs,Es,ws]}function formatOptsToTokens(ds,dn){if(!ds)return null;const xs=Formatter.create(dn,ds).dtFormatter(getDummyDateTime()),bs=xs.formatToParts(),Es=xs.resolvedOptions();return bs.map(ws=>tokenForPart(ws,ds,Es))}const INVALID="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(ds){return new Invalid("unsupported zone",`the zone "${ds.name}" is not supported`)}function possiblyCachedWeekData(ds){return ds.weekData===null&&(ds.weekData=gregorianToWeek(ds.c)),ds.weekData}function possiblyCachedLocalWeekData(ds){return ds.localWeekData===null&&(ds.localWeekData=gregorianToWeek(ds.c,ds.loc.getMinDaysInFirstWeek(),ds.loc.getStartOfWeek())),ds.localWeekData}function clone(ds,dn){const ms={ts:ds.ts,zone:ds.zone,c:ds.c,o:ds.o,loc:ds.loc,invalid:ds.invalid};return new DateTime({...ms,...dn,old:ms})}function fixOffset(ds,dn,ms){let xs=ds-dn*60*1e3;const bs=ms.offset(xs);if(dn===bs)return[xs,dn];xs-=(bs-dn)*60*1e3;const Es=ms.offset(xs);return bs===Es?[xs,bs]:[ds-Math.min(bs,Es)*60*1e3,Math.max(bs,Es)]}function tsToObj(ds,dn){ds+=dn*60*1e3;const ms=new Date(ds);return{year:ms.getUTCFullYear(),month:ms.getUTCMonth()+1,day:ms.getUTCDate(),hour:ms.getUTCHours(),minute:ms.getUTCMinutes(),second:ms.getUTCSeconds(),millisecond:ms.getUTCMilliseconds()}}function objToTS(ds,dn,ms){return fixOffset(objToLocalTS(ds),dn,ms)}function adjustTime(ds,dn){const ms=ds.o,xs=ds.c.year+Math.trunc(dn.years),bs=ds.c.month+Math.trunc(dn.months)+Math.trunc(dn.quarters)*3,Es={...ds.c,year:xs,month:bs,day:Math.min(ds.c.day,daysInMonth(xs,bs))+Math.trunc(dn.days)+Math.trunc(dn.weeks)*7},ws=Duration.fromObject({years:dn.years-Math.trunc(dn.years),quarters:dn.quarters-Math.trunc(dn.quarters),months:dn.months-Math.trunc(dn.months),weeks:dn.weeks-Math.trunc(dn.weeks),days:dn.days-Math.trunc(dn.days),hours:dn.hours,minutes:dn.minutes,seconds:dn.seconds,milliseconds:dn.milliseconds}).as("milliseconds"),Rs=objToLocalTS(Es);let[js,Cs]=fixOffset(Rs,ms,ds.zone);return ws!==0&&(js+=ws,Cs=ds.zone.offset(js)),{ts:js,o:Cs}}function parseDataToDateTime(ds,dn,ms,xs,bs,Es){const{setZone:ws,zone:Rs}=ms;if(ds&&Object.keys(ds).length!==0||dn){const js=dn||Rs,Cs=DateTime.fromObject(ds,{...ms,zone:js,specificOffset:Es});return ws?Cs:Cs.setZone(Rs)}else return DateTime.invalid(new Invalid("unparsable",`the input "${bs}" can't be parsed as ${xs}`))}function toTechFormat(ds,dn,ms=!0){return ds.isValid?Formatter.create(Locale.create("en-US"),{allowZ:ms,forceSimple:!0}).formatDateTimeFromString(ds,dn):null}function toISODate(ds,dn,ms){const xs=ds.c.year>9999||ds.c.year<0;let bs="";if(xs&&ds.c.year>=0&&(bs+="+"),bs+=padStart(ds.c.year,xs?6:4),ms==="year")return bs;if(dn){if(bs+="-",bs+=padStart(ds.c.month),ms==="month")return bs;bs+="-"}else if(bs+=padStart(ds.c.month),ms==="month")return bs;return bs+=padStart(ds.c.day),bs}function toISOTime(ds,dn,ms,xs,bs,Es,ws){let Rs=!ms||ds.c.millisecond!==0||ds.c.second!==0,js="";switch(ws){case"day":case"month":case"year":break;default:if(js+=padStart(ds.c.hour),ws==="hour")break;if(dn){if(js+=":",js+=padStart(ds.c.minute),ws==="minute")break;Rs&&(js+=":",js+=padStart(ds.c.second))}else{if(js+=padStart(ds.c.minute),ws==="minute")break;Rs&&(js+=padStart(ds.c.second))}if(ws==="second")break;Rs&&(!xs||ds.c.millisecond!==0)&&(js+=".",js+=padStart(ds.c.millisecond,3))}return bs&&(ds.isOffsetFixed&&ds.offset===0&&!Es?js+="Z":ds.o<0?(js+="-",js+=padStart(Math.trunc(-ds.o/60)),js+=":",js+=padStart(Math.trunc(-ds.o%60))):(js+="+",js+=padStart(Math.trunc(ds.o/60)),js+=":",js+=padStart(Math.trunc(ds.o%60)))),Es&&(js+="["+ds.zone.ianaName+"]"),js}const defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(ds){const dn={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[ds.toLowerCase()];if(!dn)throw new InvalidUnitError(ds);return dn}function normalizeUnitWithLocalWeeks(ds){switch(ds.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return normalizeUnit(ds)}}function guessOffsetForZone(ds){if(zoneOffsetTs===void 0&&(zoneOffsetTs=Settings$1.now()),ds.type!=="iana")return ds.offset(zoneOffsetTs);const dn=ds.name;let ms=zoneOffsetGuessCache.get(dn);return ms===void 0&&(ms=ds.offset(zoneOffsetTs),zoneOffsetGuessCache.set(dn,ms)),ms}function quickDT(ds,dn){const ms=normalizeZone(dn.zone,Settings$1.defaultZone);if(!ms.isValid)return DateTime.invalid(unsupportedZone(ms));const xs=Locale.fromObject(dn);let bs,Es;if(isUndefined(ds.year))bs=Settings$1.now();else{for(const js of orderedUnits)isUndefined(ds[js])&&(ds[js]=defaultUnitValues[js]);const ws=hasInvalidGregorianData(ds)||hasInvalidTimeData(ds);if(ws)return DateTime.invalid(ws);const Rs=guessOffsetForZone(ms);[bs,Es]=objToTS(ds,Rs,ms)}return new DateTime({ts:bs,zone:ms,loc:xs,o:Es})}function diffRelative(ds,dn,ms){const xs=isUndefined(ms.round)?!0:ms.round,bs=isUndefined(ms.rounding)?"trunc":ms.rounding,Es=(Rs,js)=>(Rs=roundTo(Rs,xs||ms.calendary?0:2,ms.calendary?"round":bs),dn.loc.clone(ms).relFormatter(ms).format(Rs,js)),ws=Rs=>ms.calendary?dn.hasSame(ds,Rs)?0:dn.startOf(Rs).diff(ds.startOf(Rs),Rs).get(Rs):dn.diff(ds,Rs).get(Rs);if(ms.unit)return Es(ws(ms.unit),ms.unit);for(const Rs of ms.units){const js=ws(Rs);if(Math.abs(js)>=1)return Es(js,Rs)}return Es(ds>dn?-0:0,ms.units[ms.units.length-1])}function lastOpts(ds){let dn={},ms;return ds.length>0&&typeof ds[ds.length-1]=="object"?(dn=ds[ds.length-1],ms=Array.from(ds).slice(0,ds.length-1)):ms=Array.from(ds),[dn,ms]}let zoneOffsetTs;const zoneOffsetGuessCache=new Map;class DateTime{constructor(dn){const ms=dn.zone||Settings$1.defaultZone;let xs=dn.invalid||(Number.isNaN(dn.ts)?new Invalid("invalid input"):null)||(ms.isValid?null:unsupportedZone(ms));this.ts=isUndefined(dn.ts)?Settings$1.now():dn.ts;let bs=null,Es=null;if(!xs)if(dn.old&&dn.old.ts===this.ts&&dn.old.zone.equals(ms))[bs,Es]=[dn.old.c,dn.old.o];else{const Rs=isNumber(dn.o)&&!dn.old?dn.o:ms.offset(this.ts);bs=tsToObj(this.ts,Rs),xs=Number.isNaN(bs.year)?new Invalid("invalid input"):null,bs=xs?null:bs,Es=xs?null:Rs}this._zone=ms,this.loc=dn.loc||Locale.create(),this.invalid=xs,this.weekData=null,this.localWeekData=null,this.c=bs,this.o=Es,this.isLuxonDateTime=!0}static now(){return new DateTime({})}static local(){const[dn,ms]=lastOpts(arguments),[xs,bs,Es,ws,Rs,js,Cs]=ms;return quickDT({year:xs,month:bs,day:Es,hour:ws,minute:Rs,second:js,millisecond:Cs},dn)}static utc(){const[dn,ms]=lastOpts(arguments),[xs,bs,Es,ws,Rs,js,Cs]=ms;return dn.zone=FixedOffsetZone.utcInstance,quickDT({year:xs,month:bs,day:Es,hour:ws,minute:Rs,second:js,millisecond:Cs},dn)}static fromJSDate(dn,ms={}){const xs=isDate(dn)?dn.valueOf():NaN;if(Number.isNaN(xs))return DateTime.invalid("invalid input");const bs=normalizeZone(ms.zone,Settings$1.defaultZone);return bs.isValid?new DateTime({ts:xs,zone:bs,loc:Locale.fromObject(ms)}):DateTime.invalid(unsupportedZone(bs))}static fromMillis(dn,ms={}){if(isNumber(dn))return dn<-MAX_DATE||dn>MAX_DATE?DateTime.invalid("Timestamp out of range"):new DateTime({ts:dn,zone:normalizeZone(ms.zone,Settings$1.defaultZone),loc:Locale.fromObject(ms)});throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof dn} with value ${dn}`)}static fromSeconds(dn,ms={}){if(isNumber(dn))return new DateTime({ts:dn*1e3,zone:normalizeZone(ms.zone,Settings$1.defaultZone),loc:Locale.fromObject(ms)});throw new InvalidArgumentError("fromSeconds requires a numerical input")}static fromObject(dn,ms={}){dn=dn||{};const xs=normalizeZone(ms.zone,Settings$1.defaultZone);if(!xs.isValid)return DateTime.invalid(unsupportedZone(xs));const bs=Locale.fromObject(ms),Es=normalizeObject(dn,normalizeUnitWithLocalWeeks),{minDaysInFirstWeek:ws,startOfWeek:Rs}=usesLocalWeekValues(Es,bs),js=Settings$1.now(),Cs=isUndefined(ms.specificOffset)?xs.offset(js):ms.specificOffset,As=!isUndefined(Es.ordinal),ks=!isUndefined(Es.year),Os=!isUndefined(Es.month)||!isUndefined(Es.day),Ms=ks||Os,Ds=Es.weekYear||Es.weekNumber;if((Ms||As)&&Ds)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Os&&As)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");const Ps=Ds||Es.weekday&&!Ms;let Ls,Bs,Fs=tsToObj(js,Cs);Ps?(Ls=orderedWeekUnits,Bs=defaultWeekUnitValues,Fs=gregorianToWeek(Fs,ws,Rs)):As?(Ls=orderedOrdinalUnits,Bs=defaultOrdinalUnitValues,Fs=gregorianToOrdinal(Fs)):(Ls=orderedUnits,Bs=defaultUnitValues);let Us=!1;for(const ai of Ls){const ia=Es[ai];isUndefined(ia)?Us?Es[ai]=Bs[ai]:Es[ai]=Fs[ai]:Us=!0}const Gs=Ps?hasInvalidWeekData(Es,ws,Rs):As?hasInvalidOrdinalData(Es):hasInvalidGregorianData(Es),Js=Gs||hasInvalidTimeData(Es);if(Js)return DateTime.invalid(Js);const Ws=Ps?weekToGregorian(Es,ws,Rs):As?ordinalToGregorian(Es):Es,[Zs,Ys]=objToTS(Ws,Cs,xs),Qs=new DateTime({ts:Zs,zone:xs,o:Ys,loc:bs});return Es.weekday&&Ms&&dn.weekday!==Qs.weekday?DateTime.invalid("mismatched weekday",`you can't specify both a weekday of ${Es.weekday} and a date of ${Qs.toISO()}`):Qs.isValid?Qs:DateTime.invalid(Qs.invalid)}static fromISO(dn,ms={}){const[xs,bs]=parseISODate(dn);return parseDataToDateTime(xs,bs,ms,"ISO 8601",dn)}static fromRFC2822(dn,ms={}){const[xs,bs]=parseRFC2822Date(dn);return parseDataToDateTime(xs,bs,ms,"RFC 2822",dn)}static fromHTTP(dn,ms={}){const[xs,bs]=parseHTTPDate(dn);return parseDataToDateTime(xs,bs,ms,"HTTP",ms)}static fromFormat(dn,ms,xs={}){if(isUndefined(dn)||isUndefined(ms))throw new InvalidArgumentError("fromFormat requires an input string and a format");const{locale:bs=null,numberingSystem:Es=null}=xs,ws=Locale.fromOpts({locale:bs,numberingSystem:Es,defaultToEN:!0}),[Rs,js,Cs,As]=parseFromTokens(ws,dn,ms);return As?DateTime.invalid(As):parseDataToDateTime(Rs,js,xs,`format ${ms}`,dn,Cs)}static fromString(dn,ms,xs={}){return DateTime.fromFormat(dn,ms,xs)}static fromSQL(dn,ms={}){const[xs,bs]=parseSQL(dn);return parseDataToDateTime(xs,bs,ms,"SQL",dn)}static invalid(dn,ms=null){if(!dn)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");const xs=dn instanceof Invalid?dn:new Invalid(dn,ms);if(Settings$1.throwOnInvalid)throw new InvalidDateTimeError(xs);return new DateTime({invalid:xs})}static isDateTime(dn){return dn&&dn.isLuxonDateTime||!1}static parseFormatForOpts(dn,ms={}){const xs=formatOptsToTokens(dn,Locale.fromObject(ms));return xs?xs.map(bs=>bs?bs.val:null).join(""):null}static expandFormat(dn,ms={}){return expandMacroTokens(Formatter.parseFormat(dn),Locale.fromObject(ms)).map(bs=>bs.val).join("")}static resetCache(){zoneOffsetTs=void 0,zoneOffsetGuessCache.clear()}get(dn){return this[dn]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?possiblyCachedLocalWeekData(this).weekday:NaN}get localWeekNumber(){return this.isValid?possiblyCachedLocalWeekData(this).weekNumber:NaN}get localWeekYear(){return this.isValid?possiblyCachedLocalWeekData(this).weekYear:NaN}get ordinal(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}get monthShort(){return this.isValid?Info$3.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Info$3.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Info$3.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Info$3.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const dn=864e5,ms=6e4,xs=objToLocalTS(this.c),bs=this.zone.offset(xs-dn),Es=this.zone.offset(xs+dn),ws=this.zone.offset(xs-bs*ms),Rs=this.zone.offset(xs-Es*ms);if(ws===Rs)return[this];const js=xs-ws*ms,Cs=xs-Rs*ms,As=tsToObj(js,ws),ks=tsToObj(Cs,Rs);return As.hour===ks.hour&&As.minute===ks.minute&&As.second===ks.second&&As.millisecond===ks.millisecond?[clone(this,{ts:js}),clone(this,{ts:Cs})]:[this]}get isInLeapYear(){return isLeapYear$1(this.year)}get daysInMonth(){return daysInMonth(this.year,this.month)}get daysInYear(){return this.isValid?daysInYear(this.year):NaN}get weeksInWeekYear(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?weeksInWeekYear(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(dn={}){const{locale:ms,numberingSystem:xs,calendar:bs}=Formatter.create(this.loc.clone(dn),dn).resolvedOptions(this);return{locale:ms,numberingSystem:xs,outputCalendar:bs}}toUTC(dn=0,ms={}){return this.setZone(FixedOffsetZone.instance(dn),ms)}toLocal(){return this.setZone(Settings$1.defaultZone)}setZone(dn,{keepLocalTime:ms=!1,keepCalendarTime:xs=!1}={}){if(dn=normalizeZone(dn,Settings$1.defaultZone),dn.equals(this.zone))return this;if(dn.isValid){let bs=this.ts;if(ms||xs){const Es=dn.offset(this.ts),ws=this.toObject();[bs]=objToTS(ws,Es,dn)}return clone(this,{ts:bs,zone:dn})}else return DateTime.invalid(unsupportedZone(dn))}reconfigure({locale:dn,numberingSystem:ms,outputCalendar:xs}={}){const bs=this.loc.clone({locale:dn,numberingSystem:ms,outputCalendar:xs});return clone(this,{loc:bs})}setLocale(dn){return this.reconfigure({locale:dn})}set(dn){if(!this.isValid)return this;const ms=normalizeObject(dn,normalizeUnitWithLocalWeeks),{minDaysInFirstWeek:xs,startOfWeek:bs}=usesLocalWeekValues(ms,this.loc),Es=!isUndefined(ms.weekYear)||!isUndefined(ms.weekNumber)||!isUndefined(ms.weekday),ws=!isUndefined(ms.ordinal),Rs=!isUndefined(ms.year),js=!isUndefined(ms.month)||!isUndefined(ms.day),Cs=Rs||js,As=ms.weekYear||ms.weekNumber;if((Cs||ws)&&As)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(js&&ws)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");let ks;Es?ks=weekToGregorian({...gregorianToWeek(this.c,xs,bs),...ms},xs,bs):isUndefined(ms.ordinal)?(ks={...this.toObject(),...ms},isUndefined(ms.day)&&(ks.day=Math.min(daysInMonth(ks.year,ks.month),ks.day))):ks=ordinalToGregorian({...gregorianToOrdinal(this.c),...ms});const[Os,Ms]=objToTS(ks,this.o,this.zone);return clone(this,{ts:Os,o:Ms})}plus(dn){if(!this.isValid)return this;const ms=Duration.fromDurationLike(dn);return clone(this,adjustTime(this,ms))}minus(dn){if(!this.isValid)return this;const ms=Duration.fromDurationLike(dn).negate();return clone(this,adjustTime(this,ms))}startOf(dn,{useLocaleWeeks:ms=!1}={}){if(!this.isValid)return this;const xs={},bs=Duration.normalizeUnit(dn);switch(bs){case"years":xs.month=1;case"quarters":case"months":xs.day=1;case"weeks":case"days":xs.hour=0;case"hours":xs.minute=0;case"minutes":xs.second=0;case"seconds":xs.millisecond=0;break}if(bs==="weeks")if(ms){const Es=this.loc.getStartOfWeek(),{weekday:ws}=this;ws<Es&&(xs.weekNumber=this.weekNumber-1),xs.weekday=Es}else xs.weekday=1;if(bs==="quarters"){const Es=Math.ceil(this.month/3);xs.month=(Es-1)*3+1}return this.set(xs)}endOf(dn,ms){return this.isValid?this.plus({[dn]:1}).startOf(dn,ms).minus(1):this}toFormat(dn,ms={}){return this.isValid?Formatter.create(this.loc.redefaultToEN(ms)).formatDateTimeFromString(this,dn):INVALID}toLocaleString(dn=DATE_SHORT,ms={}){return this.isValid?Formatter.create(this.loc.clone(ms),dn).formatDateTime(this):INVALID}toLocaleParts(dn={}){return this.isValid?Formatter.create(this.loc.clone(dn),dn).formatDateTimeParts(this):[]}toISO({format:dn="extended",suppressSeconds:ms=!1,suppressMilliseconds:xs=!1,includeOffset:bs=!0,extendedZone:Es=!1,precision:ws="milliseconds"}={}){if(!this.isValid)return null;ws=normalizeUnit(ws);const Rs=dn==="extended";let js=toISODate(this,Rs,ws);return orderedUnits.indexOf(ws)>=3&&(js+="T"),js+=toISOTime(this,Rs,ms,xs,bs,Es,ws),js}toISODate({format:dn="extended",precision:ms="day"}={}){return this.isValid?toISODate(this,dn==="extended",normalizeUnit(ms)):null}toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:dn=!1,suppressSeconds:ms=!1,includeOffset:xs=!0,includePrefix:bs=!1,extendedZone:Es=!1,format:ws="extended",precision:Rs="milliseconds"}={}){return this.isValid?(Rs=normalizeUnit(Rs),(bs&&orderedUnits.indexOf(Rs)>=3?"T":"")+toISOTime(this,ws==="extended",ms,dn,xs,Es,Rs)):null}toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?toISODate(this,!0):null}toSQLTime({includeOffset:dn=!0,includeZone:ms=!1,includeOffsetSpace:xs=!0}={}){let bs="HH:mm:ss.SSS";return(ms||dn)&&(xs&&(bs+=" "),ms?bs+="z":dn&&(bs+="ZZ")),toTechFormat(this,bs,!0)}toSQL(dn={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(dn)}`:null}toString(){return this.isValid?this.toISO():INVALID}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(dn={}){if(!this.isValid)return{};const ms={...this.c};return dn.includeConfig&&(ms.outputCalendar=this.outputCalendar,ms.numberingSystem=this.loc.numberingSystem,ms.locale=this.loc.locale),ms}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(dn,ms="milliseconds",xs={}){if(!this.isValid||!dn.isValid)return Duration.invalid("created by diffing an invalid DateTime");const bs={locale:this.locale,numberingSystem:this.numberingSystem,...xs},Es=maybeArray(ms).map(Duration.normalizeUnit),ws=dn.valueOf()>this.valueOf(),Rs=ws?this:dn,js=ws?dn:this,Cs=diff(Rs,js,Es,bs);return ws?Cs.negate():Cs}diffNow(dn="milliseconds",ms={}){return this.diff(DateTime.now(),dn,ms)}until(dn){return this.isValid?Interval.fromDateTimes(this,dn):this}hasSame(dn,ms,xs){if(!this.isValid)return!1;const bs=dn.valueOf(),Es=this.setZone(dn.zone,{keepLocalTime:!0});return Es.startOf(ms,xs)<=bs&&bs<=Es.endOf(ms,xs)}equals(dn){return this.isValid&&dn.isValid&&this.valueOf()===dn.valueOf()&&this.zone.equals(dn.zone)&&this.loc.equals(dn.loc)}toRelative(dn={}){if(!this.isValid)return null;const ms=dn.base||DateTime.fromObject({},{zone:this.zone}),xs=dn.padding?this<ms?-dn.padding:dn.padding:0;let bs=["years","months","days","hours","minutes","seconds"],Es=dn.unit;return Array.isArray(dn.unit)&&(bs=dn.unit,Es=void 0),diffRelative(ms,this.plus(xs),{...dn,numeric:"always",units:bs,unit:Es})}toRelativeCalendar(dn={}){return this.isValid?diffRelative(dn.base||DateTime.fromObject({},{zone:this.zone}),this,{...dn,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...dn){if(!dn.every(DateTime.isDateTime))throw new InvalidArgumentError("min requires all arguments be DateTimes");return bestBy(dn,ms=>ms.valueOf(),Math.min)}static max(...dn){if(!dn.every(DateTime.isDateTime))throw new InvalidArgumentError("max requires all arguments be DateTimes");return bestBy(dn,ms=>ms.valueOf(),Math.max)}static fromFormatExplain(dn,ms,xs={}){const{locale:bs=null,numberingSystem:Es=null}=xs,ws=Locale.fromOpts({locale:bs,numberingSystem:Es,defaultToEN:!0});return explainFromTokens(ws,dn,ms)}static fromStringExplain(dn,ms,xs={}){return DateTime.fromFormatExplain(dn,ms,xs)}static buildFormatParser(dn,ms={}){const{locale:xs=null,numberingSystem:bs=null}=ms,Es=Locale.fromOpts({locale:xs,numberingSystem:bs,defaultToEN:!0});return new TokenParser(Es,dn)}static fromFormatParser(dn,ms,xs={}){if(isUndefined(dn)||isUndefined(ms))throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser");const{locale:bs=null,numberingSystem:Es=null}=xs,ws=Locale.fromOpts({locale:bs,numberingSystem:Es,defaultToEN:!0});if(!ws.equals(ms.locale))throw new InvalidArgumentError(`fromFormatParser called with a locale of ${ws}, but the format parser was created for ${ms.locale}`);const{result:Rs,zone:js,specificOffset:Cs,invalidReason:As}=ms.explainFromTokens(dn);
13return As?DateTime.invalid(As):parseDataToDateTime(Rs,js,xs,`format ${ms.format}`,dn,Cs)}static get DATE_SHORT(){return DATE_SHORT}static get DATE_MED(){return DATE_MED}static get DATE_MED_WITH_WEEKDAY(){return DATE_MED_WITH_WEEKDAY}static get DATE_FULL(){return DATE_FULL}static get DATE_HUGE(){return DATE_HUGE}static get TIME_SIMPLE(){return TIME_SIMPLE}static get TIME_WITH_SECONDS(){return TIME_WITH_SECONDS}static get TIME_WITH_SHORT_OFFSET(){return TIME_WITH_SHORT_OFFSET}static get TIME_WITH_LONG_OFFSET(){return TIME_WITH_LONG_OFFSET}static get TIME_24_SIMPLE(){return TIME_24_SIMPLE}static get TIME_24_WITH_SECONDS(){return TIME_24_WITH_SECONDS}static get TIME_24_WITH_SHORT_OFFSET(){return TIME_24_WITH_SHORT_OFFSET}static get TIME_24_WITH_LONG_OFFSET(){return TIME_24_WITH_LONG_OFFSET}static get DATETIME_SHORT(){return DATETIME_SHORT}static get DATETIME_SHORT_WITH_SECONDS(){return DATETIME_SHORT_WITH_SECONDS}static get DATETIME_MED(){return DATETIME_MED}static get DATETIME_MED_WITH_SECONDS(){return DATETIME_MED_WITH_SECONDS}static get DATETIME_MED_WITH_WEEKDAY(){return DATETIME_MED_WITH_WEEKDAY}static get DATETIME_FULL(){return DATETIME_FULL}static get DATETIME_FULL_WITH_SECONDS(){return DATETIME_FULL_WITH_SECONDS}static get DATETIME_HUGE(){return DATETIME_HUGE}static get DATETIME_HUGE_WITH_SECONDS(){return DATETIME_HUGE_WITH_SECONDS}}function friendlyDateTime(ds){if(DateTime.isDateTime(ds))return ds;if(ds&&ds.valueOf&&isNumber(ds.valueOf()))return DateTime.fromJSDate(ds);if(ds&&typeof ds=="object")return DateTime.fromObject(ds);throw new InvalidArgumentError(`Unknown datetime argument: ${ds}, of type ${typeof ds}`)}async function fetchIP(){try{return(await(await fetch("https://checkip.amazonaws.com/")).text()).trim()}catch{}}class UserClient{usersUrl;constructor(dn){this.usersUrl=`${dn.apiUrl}/v1/users`}async myUser(){return(await httpGet(`${this.usersUrl}/my-user`))?.data}async login(dn,ms){const xs=await httpPost(`${this.usersUrl}/login`,{username:dn,password:ms});if(xs&&xs.status===200&&xs.headers.authorization){const bs=xs.headers.authorization.replace("Bearer","").trim();localStorage.setItem(WEB_AUTH_TOKEN,bs)}return xs}logout(){localStorage.removeItem(WEB_AUTH_TOKEN)}async forgottenPassword(dn){return await httpPost(`${this.usersUrl}/forgot-password`,{email:dn})}async setPassword(dn){return await httpPost(`${this.usersUrl}/set-my-password`,{password:dn})}async resetPassword(dn,ms){const xs=await httpPost(`${this.usersUrl}/reset-password`,{password:dn,code:ms});if(xs.status===200&&xs.headers.authorization){const bs=xs.headers.authorization.replace("Bearer","").trim();localStorage.setItem(WEB_AUTH_TOKEN,bs)}return xs}async register(dn,ms,xs,bs,Es,ws){const Rs=await fetchIP(),js=DateTime.now().zoneName,Cs=await httpPost(`${this.usersUrl}/register`,{organisation:dn,firstName:ms,lastName:xs,email:bs,password:Es,timezone:js,ip:Rs,demoSessionId:ws});if(Cs&&Cs.status===200&&Cs.headers.authorization){const As=Cs.headers.authorization.replace("Bearer","").trim();localStorage.setItem(WEB_AUTH_TOKEN,As)}return Cs}}class AccountClient{url;myAccountUrl;constructor(dn){this.url=`${dn.apiUrl}/v1`,this.myAccountUrl=`${dn.apiUrl}/v1/users/my-account`}async myAccount(){return(await httpGet(this.myAccountUrl)).data}async updateProfile(dn){return await httpPut(`${this.myAccountUrl}/profile`,dn)}async updateTimezone(dn){return await httpPut(`${this.myAccountUrl}/profile`,{timezone:dn})}async accountOverview(){return await httpGet(`${this.url}/my-account-overview`)}async updateVersion(dn){return await httpPut(`${this.myAccountUrl}/profile`,{version:dn})}}class CustomerClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1/customers`}async customer(){const dn=await httpGet(`${this.url}/me`);if(dn.status===200)return dn.data}async mySubscription(){return await httpGet(`${this.url}/my-subscription`)}async createSubscription(dn){return await httpPost(`${this.url}/subscriptions`,dn)}async createPaymentIntent(dn){return await httpPost(`${this.url}/payment-intent`,dn)}async updatePaymentIntent(dn){return await httpPut(`${this.url}/payment-intent/${dn.paymentIntentId}`,dn)}async updateIP(dn){return await httpPut(`${this.url}/me`,{ip:dn})}async fetchLicences(){return await httpGet(`${this.url}/licences`)}
13async fetchSubscriptionQuote(dn){const{adminSeats:ms,readerSeats:xs}=dn;return await httpGet(`${this.url}/subscription-quotes?adminSeats=${ms}&readerSeats=${xs}`)}async updateLicences(dn){return await httpPut(`${this.url}/licences`,dn)}async cancelPendingDowngrade(){return await httpPost(`${this.url}/licences/cancel-pending-downgrade`,{})}}var UserActionRequired=(ds=>(ds.SET_PASSWORD="SET_PASSWORD",ds.CHECKOUT="CHECKOUT",ds.WELCOME="WELCOME",ds.SHOW_DEMO="SHOW_DEMO",ds))(UserActionRequired||{});class ActionsClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1/user-actions`}async myActions(){return(await httpGet(`${this.url}/my-actions`)).data??[]}async markComplete(dn){return await httpPost(`${this.url}/mark-complete`,{action:dn})}}class ManualsClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchAll(){return await httpGet(`${this.url}/manuals`)}async create(dn){return await httpPost(`${this.url}/manuals`,{name:dn})}async overview(dn){return await httpGet(`${this.url}/manuals/${dn}/overview`)}}class ProductClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async getProducts(){const dn=[{plan:"SOLOPRENEUR",currencyPrices:[{currency:"gbp",price:3900,annualPrice:39e3},{currency:"usd",price:3900,annualPrice:39e3},{currency:"eur",price:3900,annualPrice:39e3},{currency:"aud",price:5900,annualPrice:59e3}]},{plan:"SME",currencyPrices:[{currency:"gbp",price:9900,annualPrice:99e3},{currency:"usd",price:9900,annualPrice:99e3},{currency:"eur",price:9900,annualPrice:99e3},{currency:"aud",price:14900,annualPrice:149e3}]},{plan:"MULTI-SITE",currencyPrices:[{currency:"gbp",price:59900,annualPrice:599e3},{currency:"usd",price:19900,annualPrice:199e3},{currency:"eur",price:19900,annualPrice:199e3},{currency:"aud",price:29900,annualPrice:299e3}]}];return Promise.resolve({data:dn,status:200,statusText:"OK",headers:{},config:{}})}}class BrandClient{url;brandVoiceUrl;constructor(dn){this.url=`${dn.apiUrl}/v1`,this.brandVoiceUrl=`${this.url}/brand-voices`}async brandVoice(){return await httpGet(this.brandVoiceUrl)}async upsertBrandVoice(dn){return dn.statements=dn.statements?.filter(ms=>ms!==""),await httpPut(`${this.brandVoiceUrl}`,dn)}async deleteBrandVoice(dn){return await httpDelete(`${this.brandVoiceUrl}/${dn}`)}async analyzeBrandVoiceExample(dn){return await httpPost(`${this.brandVoiceUrl}/analyze`,{text:dn})}}class OrganisationClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async myOrganisation(){try{return(await httpGet(`${this.url}/organisations/me`)).data}catch(dn){return console.error("Failed to fetch organisation",dn),null}}async updateTheme(dn){return(await httpPut(`${this.url}/organisation-themes`,{primaryColor:dn.primaryColor,secondaryColor:dn.secondaryColor,tertiaryColor:dn.tertiaryColor,backgroundColor:dn.backgroundColor,bodyColor:dn.bodyColor})).data}async uploadLogo(dn){return(await httpPostFile(`${this.url}/organisation-logos`,dn)).data}async removeLogo(){await httpDelete(`${this.url}/organisation-logos`)}}class BusinessDetailsClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1/business-details`}async fetchBusinessDetails(){return await httpGet(this.url)}async updateBusinessDetails(dn){return await httpPut(this.url,dn)}}class UploadClient{base;constructor(dn){this.base=`${dn.apiUrl}/v1`}async uploadFile(dn,ms,xs,bs){const Es=new FormData;return Es.append("file",ms),xs&&xs.toLowerCase()!=="auto"&&Es.append("category",xs),await httpPostForm(`${this.base}/${dn}/business-ip`,Es,ws=>{if(!ws.total)return;const Rs=Math.round(ws.loaded/ws.total*100);bs?.(Rs)})}}class SopClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchAll(dn){return await httpGet(`${this.url}/${dn}/sops`)}}class BusinessProcessClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchAll(dn){return await httpGet(`${this.url}/${dn}/business-processes`)}async fetch(dn){return await httpGet(`${this.url}/business-processes/${dn}`)}async fetchContent(dn){return await httpGet(`${this.url}/business-processes/${dn}/content`)}async modifyContent(dn,ms){return await httpPut(`${this.url}/business-processes/${dn}/content`,ms)}async fetchContentVersions(dn){return await httpGet(`${this.url}/business-processes/${dn}/content/versions`)}async fetchContentVersion(dn,ms){return await httpGet(`${this.url}/business-processes/${dn}
13/content/version?versionId=${encodeURIComponent(ms)}`)}async restoreContentVersion(dn,ms){return await httpPost(`${this.url}/business-processes/${dn}/content/restore?versionId=${encodeURIComponent(ms)}`)}async generateContent(dn,ms,xs){return await httpPost(`${this.url}/business-processes/${dn}/generate-content`,{template:ms,feedback:xs})}async addBusinessProcess(dn,ms){return await httpPost(`${this.url}/${dn}/business-processes`,ms)}async modifyBusinessProcess(dn,ms){return await httpPut(`${this.url}/business-processes/${dn}`,ms)}async reorderBusinessProcesses(dn,ms){return await httpPut(`${this.url}/${dn}/business-processes/reorder`,{processIds:ms})}async deleteSOP(dn){return await httpDelete(`${this.url}/business-processes/${dn}`)}}class ChecklistClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchChecklists(dn){return await httpGet(`${this.url}/business-processes/${dn}/checklists`)}async addChecklist(dn,ms,xs){return await httpPost(`${this.url}/business-processes/${dn}/checklists`,{name:ms,items:xs})}async modifyChecklist(dn,ms,xs){return await httpPut(`${this.url}/checklists/${dn}`,{name:ms,items:xs})}async removeChecklist(dn){return await httpDelete(`${this.url}/checklists/${dn}`)}async generateChecklist(dn,ms){return await httpPost(`${this.url}/business-processes/${dn}/suggested-checklists`,{feedback:ms})}}class FAQClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchFaqs(dn){return await httpGet(`${this.url}/business-processes/${dn}/faqs`)}async addFaq(dn,ms,xs){return await httpPost(`${this.url}/business-processes/${dn}/faqs`,{name:ms,items:xs})}async modifyFaq(dn,ms,xs){return await httpPut(`${this.url}/faqs/${dn}`,{name:ms,items:xs})}async removeFaq(dn){return await httpDelete(`${this.url}/faqs/${dn}`)}async generateFaq(dn,ms){return await httpPost(`${this.url}/business-processes/${dn}/suggested-faqs`,{feedback:ms})}}class StoryboardClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchStoryboard(dn){return await httpGet(`${this.url}/business-processes/${dn}/storyboards`)}async upsertStoryboard(dn,ms){return await httpPut(`${this.url}/business-processes/${dn}/storyboards`,{steps:ms})}async generateStoryboard(dn,ms){return await httpPost(`${this.url}/business-processes/${dn}/suggested-storyboards`,{feedback:ms})}}class AskMyWizardClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async askMyWizard(dn,ms){return await httpPost(`${this.url}/manuals/${dn}/ask-my-wizard`,{question:ms})}}class ProcessAssetsClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1`}async fetchAssets(dn){return await httpGet(`${this.url}/business-processes/${dn}/assets`)}async uploadAsset(dn,ms,xs,bs){const Es=new FormData;return Es.append("name",ms),Es.append("file",xs),await httpPostForm(`${this.url}/business-processes/${dn}/assets`,Es,bs?ws=>{ws.total&&bs(Math.round(ws.loaded/ws.total*100))}:void 0)}async generateIllustration(dn,ms){return await httpPost(`${this.url}/business-processes/${dn}/generate-illustrations`,{feedback:ms})}async generateProcessPdf(dn,ms,xs){return await httpPost(`${this.url}/business-processes/${dn}/generate-pdf`,{includeChecklist:ms,includeFAQ:xs})}async downloadAsset(dn){return await httpPut(`${this.url}/assets/${dn}`)}async viewAsset(dn){return await httpPut(`${this.url}/assets/${dn}/view`)}async deleteAsset(dn){return await httpDelete(`${this.url}/assets/${dn}`)}}class OrganisationMembersClient{baseUrl;constructor(dn){this.baseUrl=`${dn.apiUrl}/v1/organisation-members`}async listOrganisationMembers(){try{const dn=await httpGet(this.baseUrl);return dn.status===200?dn.data:[]}catch(dn){return console.error("Failed to fetch organisation members",dn),[]}}async getMyPermissions(){try{const dn=await httpGet(`${this.baseUrl}/me/permissions`);return dn.status===200?dn.data.permissions:[]}catch(dn){return console.error("Failed to fetch my permissions",dn),[]}}async updateMemberPermissions(dn,ms){return(await httpPut(`${this.baseUrl}/${dn}/permissions`,ms)).data}async updateMemberCanInvite(dn,ms){const xs=ms?["InviteMembers"]:[];return this.updateMemberPermissions(dn,{permissions:xs})}async removeOrganisationMember(dn){return await httpDelete(`${this.baseUrl}/${dn}`)}async createMemberInvite(dn){return await httpPost(`${this.baseUrl}/invite`,dn)}async resendMemberInvite(dn){return await httpPost(`${this.baseUrl}/invites/${dn}/resend`,{})}async getInvites(dn){try{let ms=`${this.baseUrl}/invites`;const xs=[];dn?.role&&xs.push(`role=${encodeURIComponent(dn.role)}`),dn?.teamId&&xs.push(`teamId=${encodeURIComponent(dn.teamId)}`),xs.length>0&&(ms+=`?${xs.join("&")}`);const bs=await httpGet(ms);return bs.status===200?bs.data:[]}catch(ms){return console.error("Failed to get invites",ms),[]}}}class TeamsClient{baseUrl;constructor(dn){this.baseUrl=`${dn.apiUrl}/v1/teams`}async createTeam(dn){return await httpPost(this.baseUrl,dn)}async listTeams(){try{const dn=await httpGet(this.baseUrl);return dn.status===200?dn.data:[]}catch(dn){return console.error("Failed to list teams",dn),[]}}async getMyTeams(){try{const dn=await httpGet(`${this.baseUrl}/me`);return dn.status===200?dn.data:[]}catch(dn){return console.error("Failed to get my teams",dn),[]}}async deleteTeam(dn){return await httpDelete(`${this.baseUrl}/${dn}`)}async getTeamMembers(dn){try{const ms=await httpGet(`${this.baseUrl}/${dn}/members`);return ms.status===200?ms.data:[]}catch(ms){return console.error("Failed to get team members",ms),[]}}async addTeamMember(dn,ms){return await httpPost(`${this.baseUrl}/${dn}/members`,ms)}async removeTeamMember(dn,ms){return await httpDelete(`${this.baseUrl}/${dn}/members/${ms}`)}}function uuid(ds=36){let dn=new Date().getTime(),ms=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,xs=>{let bs=Math.random()*16;return dn>
130?(bs=(dn+bs)%16|0,dn=Math.floor(dn/16)):(bs=(ms+bs)%16|0,ms=Math.floor(ms/16)),(xs==="x"?bs:bs&15).toString(16)}).substring(0,ds||uuid.length)}function notBlank(ds){return ds!=null&&ds.trim()!==""}function isBlank(ds){return ds==null||ds.trim()===""}class PricingClient{baseUrl;constructor(dn){this.baseUrl=`${dn.apiUrl}/v1/pricing`}async calculatePricing(dn){const{billingPeriod:ms,readerSeats:xs,adminSeats:bs,currency:Es,ip:ws}=dn;let Rs=`${this.baseUrl}/calculate`;return Rs+=`?adminSeats=${bs}&readerSeats=${xs}`,Rs+=`&currency=${Es}`,Rs+=`&billingPeriod=${encodeURIComponent(ms)}`,notBlank(ws)&&(Rs+=`&ip=${ws}`),await httpGet(Rs)}async fetchProducts(){return await httpGet(`${this.baseUrl}/seat-pricing`)}}function setCredentialFeature(ds,dn,ms){return ds.$source||(ds.$source={}),ds.$source[dn]=ms,ds}const isStreamingPayload=ds=>ds?.body instanceof ReadableStream,getAllAliases=(ds,dn)=>{const ms=[];if(ds&&ms.push(ds),dn)for(const xs of dn)ms.push(xs);return ms},getMiddlewareNameWithAliases=(ds,dn)=>`${ds||"anonymous"}${dn&&dn.length>0?` (a.k.a. ${dn.join(",")})`:""}`,constructStack=()=>{let ds=[],dn=[],ms=!1;const xs=new Set,bs=ks=>ks.sort((Os,Ms)=>stepWeights[Ms.step]-stepWeights[Os.step]||priorityWeights[Ms.priority||"normal"]-priorityWeights[Os.priority||"normal"]),Es=ks=>{let Os=!1;const Ms=Ds=>{const Ps=getAllAliases(Ds.name,Ds.aliases);if(Ps.includes(ks)){Os=!0;for(const Ls of Ps)xs.delete(Ls);return!1}return!0};return ds=ds.filter(Ms),dn=dn.filter(Ms),Os},ws=ks=>{let Os=!1;const Ms=Ds=>{if(Ds.middleware===ks){Os=!0;for(const Ps of getAllAliases(Ds.name,Ds.aliases))xs.delete(Ps);return!1}return!0};return ds=ds.filter(Ms),dn=dn.filter(Ms),Os},Rs=ks=>(ds.forEach(Os=>{ks.add(Os.middleware,{...Os})}),dn.forEach(Os=>{ks.addRelativeTo(Os.middleware,{...Os})}),ks.identifyOnResolve?.(As.identifyOnResolve()),ks),js=ks=>{const Os=[];return ks.before.forEach(Ms=>{Ms.before.length===0&&Ms.after.length===0?Os.push(Ms):Os.push(...js(Ms))}),Os.push(ks),ks.after.reverse().forEach(Ms=>{Ms.before.length===0&&Ms.after.length===0?Os.push(Ms):Os.push(...js(Ms))}),Os},Cs=(ks=!1)=>{const Os=[],Ms=[],Ds={};return ds.forEach(Ls=>{const Bs={...Ls,before:[],after:[]};for(const Fs of getAllAliases(Bs.name,Bs.aliases))Ds[Fs]=Bs;Os.push(Bs)}),dn.forEach(Ls=>{const Bs={...Ls,before:[],after:[]};for(const Fs of getAllAliases(Bs.name,Bs.aliases))Ds[Fs]=Bs;Ms.push(Bs)}),Ms.forEach(Ls=>{if(Ls.toMiddleware){const Bs=Ds[Ls.toMiddleware];if(Bs===void 0){if(ks)return;throw new Error(`${Ls.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(Ls.name,Ls.aliases)} middleware ${Ls.relation} ${Ls.toMiddleware}`)}Ls.relation==="after"&&Bs.after.push(Ls),Ls.relation==="before"&&Bs.before.push(Ls)}}),bs(Os).map(js).reduce((Ls,Bs)=>(Ls.push(...Bs),Ls),[])},As={add:(ks,Os={})=>{const{name:Ms,override:Ds,aliases:Ps}=Os,Ls={step:"initialize",priority:"normal",middleware:ks,...Os},Bs=getAllAliases(Ms,Ps);if(Bs.length>0){if(Bs.some(Fs=>xs.has(Fs))){if(!Ds)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ms,Ps)}'`);for(const Fs of Bs){const Us=ds.findIndex(Js=>Js.name===Fs||Js.aliases?.some(Ws=>Ws===Fs));if(Us===-1)continue;const Gs=ds[Us];if(Gs.step!==Ls.step||Ls.priority!==Gs.priority)throw new Error(`"${getMiddlewareNameWithAliases(Gs.name,Gs.aliases)}" middleware with ${Gs.priority} priority in ${Gs.step} step cannot be overridden by "${getMiddlewareNameWithAliases(Ms,Ps)}" middleware with ${Ls.priority} priority in ${Ls.step} step.`);ds.splice(Us,1)}}for(const Fs of Bs)xs.add(Fs)}ds.push(Ls)},addRelativeTo:(ks,Os)=>{const{name:Ms,override:Ds,aliases:Ps}=Os,Ls={middleware:ks,...Os},Bs=getAllAliases(Ms,Ps);if(Bs.length>0){if(Bs.some(Fs=>xs.has(Fs))){if(!Ds)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ms,Ps)}'`);for(const Fs of Bs){const Us=dn.findIndex(Js=>Js.name===Fs||Js.aliases?.some(Ws=>Ws===Fs));if(Us===-1)continue;const Gs=dn[Us];if(Gs.toMiddleware!==Ls.toMiddleware||Gs.relation!==Ls.relation)throw new Error(`"${getMiddlewareNameWithAliases(Gs.name,Gs.aliases)}" middleware ${Gs.relation} "${Gs.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(Ms,Ps)}" middleware ${Ls.relation} "${Ls.toMiddleware}" middleware.`);dn.splice(Us,1)}}for(const Fs of Bs)xs.add(Fs)}dn.push(Ls)},clone:()=>Rs(constructStack()),use:ks=>{ks.applyToStack(As)},remove:ks=>
13typeof ks=="string"?Es(ks):ws(ks),removeByTag:ks=>{let Os=!1;const Ms=Ds=>{const{tags:Ps,name:Ls,aliases:Bs}=Ds;if(Ps&&Ps.includes(ks)){const Fs=getAllAliases(Ls,Bs);for(const Us of Fs)xs.delete(Us);return Os=!0,!1}return!0};return ds=ds.filter(Ms),dn=dn.filter(Ms),Os},concat:ks=>{const Os=Rs(constructStack());return Os.use(ks),Os.identifyOnResolve(ms||Os.identifyOnResolve()||(ks.identifyOnResolve?.()??!1)),Os},applyToStack:Rs,identify:()=>Cs(!0).map(ks=>{const Os=ks.step??ks.relation+" "+ks.toMiddleware;return getMiddlewareNameWithAliases(ks.name,ks.aliases)+" - "+Os}),identifyOnResolve(ks){return typeof ks=="boolean"&&(ms=ks),ms},resolve:(ks,Os)=>{for(const Ms of Cs().map(Ds=>Ds.middleware).reverse())ks=Ms(ks,Os);return ms&&console.log(As.identify()),ks}};return As},stepWeights={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},priorityWeights={high:3,normal:2,low:1};var EndpointURLScheme;(function(ds){ds.HTTP="http",ds.HTTPS="https"})(EndpointURLScheme||(EndpointURLScheme={}));var AlgorithmId;(function(ds){ds.MD5="md5",ds.CRC32="crc32",ds.CRC32C="crc32c",ds.SHA1="sha1",ds.SHA256="sha256"})(AlgorithmId||(AlgorithmId={}));const SMITHY_CONTEXT_KEY="__smithy_context",getSmithyContext=ds=>ds[SMITHY_CONTEXT_KEY]||(ds[SMITHY_CONTEXT_KEY]={});function hasOwn(ds,dn){return Object.prototype.hasOwnProperty.call(ds,dn)}class HttpRequest{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(dn){this.method=dn.method||"GET",this.hostname=dn.hostname||"localhost",this.port=dn.port,this.query=dn.query||{},this.headers=dn.headers||{},this.body=dn.body,this.protocol=dn.protocol?dn.protocol.slice(-1)!==":"?`${dn.protocol}:`:dn.protocol:"https:",this.path=dn.path?dn.path.charAt(0)!=="/"?`/${dn.path}`:dn.path:"/",this.username=dn.username,this.password=dn.password,this.fragment=dn.fragment}static clone(dn){const ms=new HttpRequest({...dn,headers:{...dn.headers}});return ms.query&&(ms.query=cloneQuery(ms.query)),ms}static isInstance(dn){if(!dn)return!1;const ms=dn;return"method"in ms&&"protocol"in ms&&"hostname"in ms&&"path"in ms&&typeof ms.query=="object"&&typeof ms.headers=="object"}clone(){return HttpRequest.clone(this)}}function cloneQuery(ds){return Object.keys(ds).reduce((dn,ms)=>{const xs=ds[ms];return{...dn,[ms]:Array.isArray(xs)?[...xs]:xs}},{})}class HttpResponse{statusCode;reason;headers;body;constructor(dn){this.statusCode=dn.statusCode,this.reason=dn.reason,this.headers=dn.headers||{},this.body=dn.body}static isInstance(dn){if(!dn)return!1;const ms=dn;return typeof ms.statusCode=="number"&&typeof ms.headers=="object"}}const VALID_HOST_LABEL_REGEX=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),isValidHostLabel=(ds,dn=!1)=>{if(!dn)return VALID_HOST_LABEL_REGEX.test(ds);const ms=ds.split(".");for(const xs of ms)if(!isValidHostLabel(xs))return!1;return!0};function isValidHostname(ds){return/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(ds)}const normalizeProvider$1=ds=>{if(typeof ds=="function")return ds;const dn=Promise.resolve(ds);return()=>dn};function parseQueryString(ds){const dn={};if(ds=ds.replace(/^\?/,""),ds)for(const ms of ds.split("&")){let[xs,bs=null]=ms.split("=");xs=decodeURIComponent(xs),bs&&(bs=decodeURIComponent(bs)),xs in dn?Array.isArray(dn[xs])?dn[xs].push(bs):dn[xs]=[dn[xs],bs]:dn[xs]=bs}return dn}const parseUrl=ds=>{if(typeof ds=="string")return parseUrl(new URL(ds));const{hostname:dn,pathname:ms,port:xs,protocol:bs,search:Es}=ds;let ws;return Es&&(ws=parseQueryString(Es)),{hostname:dn,port:xs?parseInt(xs):void 0,protocol:bs,path:ms,query:ws}},toEndpointV1=ds=>{if(typeof ds=="object"){if("url"in ds){const dn=parseUrl(ds.url);if(ds.headers){dn.headers={};for(const ms in ds.headers)hasOwn(ds.headers,ms)&&(dn.headers[ms.toLowerCase()]=ds.headers[ms].join(", "))}return dn}return ds}return parseUrl(ds)},invalidProvider=ds=>()=>Promise.reject(ds);class Client{config;middlewareStack=constructStack();initConfig;handlers;constructor(dn){this.config=dn;const{protocol:ms,protocolSettings:xs}=dn;xs&&typeof ms=="function"&&(dn.protocol=new ms(xs))}send(dn,ms,xs){const bs=typeof ms!="function"?ms:void 0,Es=typeof ms=="function"?ms:xs,ws=bs===void 0&&this.config.cacheMiddleware===!0;let Rs;if(ws){this.handlers||(this.handlers=new WeakMap);const js=this.handlers;js.has(dn.constructor)?Rs=js.get(dn.constructor):(Rs=dn.resolveMiddleware(this.middlewareStack,this.config,bs),js.set(dn.constructor,Rs))}else delete this.handlers,Rs=dn.resolveMiddleware(this.middlewareStack,this.config,bs);if(Es)Rs(dn).then(js=>Es(null,js.output),js=>Es(js)).catch(()=>{});else return Rs(dn).then(js=>js.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const deref=ds=>typeof ds=="function"?ds():ds,operation=(ds,dn,ms,xs,bs)=>
13({name:dn,namespace:ds,traits:ms,input:xs,output:bs}),schemaDeserializationMiddleware=ds=>(dn,ms)=>async xs=>{const{response:bs}=await dn(xs),{operationSchema:Es}=getSmithyContext(ms),[,ws,Rs,js,Cs,As]=Es??[];try{const ks=await ds.protocol.deserializeResponse(operation(ws,Rs,js,Cs,As),{...ds,...ms},bs);return{response:bs,output:ks}}catch(ks){if(Object.defineProperty(ks,"$response",{value:bs,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in ks)){const Os="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{ks.message+=`
14  `+Os}catch{!ms.logger||ms.logger?.constructor?.name==="NoOpLogger"?console.warn(Os):ms.logger?.warn?.(Os)}typeof ks.$responseBodyText<"u"&&ks.$response&&(ks.$response.body=ks.$responseBodyText);try{if(HttpResponse.isInstance(bs)){const{headers:Ms={},statusCode:Ds}=bs,Ps=Object.entries(Ms);ks.$metadata={httpStatusCode:Ds,requestId:findHeader(/^x-[\w-]+-request-?id$/,Ps),extendedRequestId:findHeader(/^x-[\w-]+-id-2$/,Ps),cfId:findHeader(/^x-[\w-]+-cf-id$/,Ps)}}}catch{}}throw ks}},findHeader=(ds,dn)=>(dn.find(([ms])=>ms.match(ds))||[void 0,void 0])[1],schemaSerializationMiddleware=ds=>(dn,ms)=>async xs=>{const{operationSchema:bs}=getSmithyContext(ms),[,Es,ws,Rs,js,Cs]=bs??[],As=ms.endpointV2?async()=>toEndpointV1(ms.endpointV2):ds.endpoint,ks=await ds.protocol.serializeRequest(operation(Es,ws,Rs,js,Cs),xs.input,{...ds,...ms,endpoint:As});return dn({...xs,request:ks})},deserializerMiddlewareOption={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},serializerMiddlewareOption$1={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function getSchemaSerdePlugin(ds){return{applyToStack:dn=>{dn.add(schemaSerializationMiddleware(ds),serializerMiddlewareOption$1),dn.add(schemaDeserializationMiddleware(ds),deserializerMiddlewareOption),ds.protocol.setSerdeContext(ds)}}}const traitsCache=[];function translateTraits(ds){if(typeof ds=="object")return ds;if(ds=ds|0,traitsCache[ds])return traitsCache[ds];const dn={};let ms=0;for(const xs of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(ds>>ms++&1)===1&&(dn[xs]=1);return traitsCache[ds]=dn}const anno={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},simpleSchemaCacheN=[],simpleSchemaCacheS={};class NormalizedSchema{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=NormalizedSchema.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(dn,ms){this.ref=dn,this.memberName=ms;const xs=[];let bs=dn,Es=dn;for(this._isMemberSchema=!1;isMemberSchema(bs);)xs.push(bs[1]),bs=bs[0],Es=deref(bs),this._isMemberSchema=!0;if(xs.length>0){this.memberTraits={};for(let ws=xs.length-1;ws>=0;--ws){const Rs=xs[ws];Object.assign(this.memberTraits,translateTraits(Rs))}}else this.memberTraits=0;if(Es instanceof NormalizedSchema){const ws=this.memberTraits;Object.assign(this,Es),this.memberTraits=Object.assign({},ws,Es.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=ms??Es.memberName;return}if(this.schema=deref(Es),isStaticSchema(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(Es),this.traits=0),this._isMemberSchema&&!ms)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](dn){const ms=this.prototype.isPrototypeOf(dn);return!ms&&typeof dn=="object"&&dn!==null?dn.symbol===this.symbol:ms}static of(dn){const ms=typeof dn=="function"||typeof dn=="object"&&dn!==null;if(typeof dn=="number"){if(simpleSchemaCacheN[dn])return simpleSchemaCacheN[dn]}else if(typeof dn=="string"){if(simpleSchemaCacheS[dn])return simpleSchemaCacheS[dn]}else if(ms&&dn[anno.ns])return dn[anno.ns];const xs=deref(dn);if(xs instanceof NormalizedSchema)return xs;if(isMemberSchema(xs)){const[Es,ws]=xs;if(Es instanceof NormalizedSchema)return Object.assign(Es.getMergedTraits(),translateTraits(ws)),Es;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(dn,null,2)}.`)}const bs=new NormalizedSchema(xs);return ms?dn[anno.ns]=bs:typeof xs=="string"?simpleSchemaCacheS[xs]=bs:typeof xs=="number"?simpleSchemaCacheN[xs]=bs:bs}getSchema(){const dn=this.schema;return Array.isArray(dn)&&dn[0]===0?dn[4]:dn}getName(dn=!1){const{name:ms}=this;return!dn&&ms&&ms.includes("#")?ms.split("#")[1]:ms||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const dn=this.getSchema();return typeof dn=="number"?dn>=64&&dn<128:dn[0]===1}isMapSchema(){const dn=this.getSchema();return typeof dn=="number"?dn>=128&&dn<=255:dn[0]===2}isStructSchema(){const dn=this.getSchema();if(typeof dn!="object")return!1;const ms=dn[0];return ms===3||ms===-3||ms===4}isUnionSchema(){const dn=this.getSchema();return typeof dn!="object"?!1:dn[0]===4}isBlobSchema(){const dn=this.getSchema();return dn===21||dn===42}isTimestampSchema(){const dn=this.getSchema();return typeof dn=="number"&&dn>=4&&dn<=7}
14isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:dn}=this.getMergedTraits();return!!dn||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return translateTraits(this.memberTraits)}getOwnTraits(){return translateTraits(this.traits)}getKeySchema(){const[dn,ms]=[this.isDocumentSchema(),this.isMapSchema()];if(!dn&&!ms)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const xs=this.getSchema(),bs=dn?15:xs[4]??0;return member([bs,0],"key")}getValueSchema(){const dn=this.getSchema(),[ms,xs,bs]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],Es=typeof dn=="number"?63&dn:dn&&typeof dn=="object"&&(xs||bs)?dn[3+dn[0]]:ms?15:void 0;if(Es!=null)return member([Es,0],xs?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(dn){const ms=this.getSchema();if(this.isStructSchema()&&ms[4].includes(dn)){const xs=ms[4].indexOf(dn),bs=ms[5][xs];return member(isMemberSchema(bs)?bs:[bs,0],dn)}if(this.isDocumentSchema())return member([15,0],dn);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${dn}.`)}getMemberSchemas(){const dn={};try{for(const[ms,xs]of this.structIterator())dn[ms]=xs}catch{}return dn}getEventStreamMember(){if(this.isStructSchema()){for(const[dn,ms]of this.structIterator())if(ms.isStreaming()&&ms.isStructSchema())return dn}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const dn=this.getSchema(),ms=dn[4].length;let xs=dn[anno.it];if(xs&&ms===xs.length){yield*xs;return}xs=Array(ms);for(let bs=0;bs<ms;++bs){const Es=dn[4][bs],ws=member([dn[5][bs],0],Es);yield xs[bs]=[Es,ws]}dn[anno.it]=xs}}function member(ds,dn){if(ds instanceof NormalizedSchema)return Object.assign(ds,{memberName:dn,_isMemberSchema:!0});const ms=NormalizedSchema;return new ms(ds,dn)}const isMemberSchema=ds=>Array.isArray(ds)&&ds.length===2,isStaticSchema=ds=>Array.isArray(ds)&&ds.length>=5;class TypeRegistry{namespace;schemas;exceptions;static registries=new Map;constructor(dn,ms=new Map,xs=new Map){this.namespace=dn,this.schemas=ms,this.exceptions=xs,TypeRegistry.registries.has(dn)||TypeRegistry.registries.set(dn,this)}static for(dn){return TypeRegistry.registries.get(dn)??new TypeRegistry(dn)}copyFrom(dn){const{schemas:ms,exceptions:xs}=this;for(const[bs,Es]of dn.schemas)ms.has(bs)||ms.set(bs,Es);for(const[bs,Es]of dn.exceptions)xs.has(bs)||xs.set(bs,Es)}register(dn,ms){const xs=this.normalizeShapeId(dn);for(const bs of[this,TypeRegistry.for(xs.split("#")[0])])bs.schemas.has(xs)||bs.schemas.set(xs,ms)}getSchema(dn){const ms=this.normalizeShapeId(dn);if(!this.schemas.has(ms)){if(!dn.includes("#")){const xs="#"+dn,bs=[];for(const[Es,ws]of this.schemas.entries())Es.endsWith(xs)&&bs.push(ws);if(bs.length===1)return bs[0]}throw new Error(`@smithy/core/schema - schema not found for ${ms}`)}return this.schemas.get(ms)}registerError(dn,ms){const xs=dn,bs=xs[1],Es=bs+"#"+xs[2];ms.hasOwnProperty?.("shapeId")||(ms.shapeId=Es);for(const ws of[this,TypeRegistry.for(bs)])!ws.schemas.has(Es)&&!ws.exceptions.has(xs)&&(ws.schemas.set(Es,xs),ws.exceptions.set(xs,ms))}getErrorCtor(dn){const ms=dn;return this.exceptions.has(ms)?this.exceptions.get(ms):TypeRegistry.for(ms[1]).exceptions.get(ms)}getBaseException(){for(const dn of this.exceptions.keys())if(Array.isArray(dn)){const[,ms,xs]=dn,bs=ms+"#"+xs;if(bs.startsWith("smithy.ts.sdk.synthetic.")&&bs.endsWith("ServiceException"))return dn}}find(dn){for(const ms of this.schemas.values())if(dn(ms))return ms}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(dn){return dn.includes("#")?dn:this.namespace+"#"+dn}}const SENSITIVE_STRING="***SensitiveInformation***";function schemaLogFilter(ds,dn){if(dn==null)return dn;const ms=NormalizedSchema.of(ds);if(ms.getMergedTraits().sensitive)return SENSITIVE_STRING;
14if(ms.isListSchema()){if(!!ms.getValueSchema().getMergedTraits().sensitive)return SENSITIVE_STRING}else if(ms.isMapSchema()){if(!!ms.getKeySchema().getMergedTraits().sensitive||!!ms.getValueSchema().getMergedTraits().sensitive)return SENSITIVE_STRING}else if(ms.isStructSchema()&&typeof dn=="object"){const xs=dn,bs={};for(const[Es,ws]of ms.structIterator())xs[Es]!=null&&(bs[Es]=schemaLogFilter(ws,xs[Es]));return bs}return dn}class Command{middlewareStack=constructStack();schema;static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(dn,ms,xs,{middlewareFn:bs,clientName:Es,commandName:ws,inputFilterSensitiveLog:Rs,outputFilterSensitiveLog:js,smithyContext:Cs,additionalContext:As,CommandCtor:ks}){for(const Fs of bs.bind(this)(ks,dn,ms,xs))this.middlewareStack.use(Fs);const Os=dn.concat(this.middlewareStack),{logger:Ms}=ms,Ds=As[SMITHY_CONTEXT_KEY],Ps={logger:Ms,clientName:Es,commandName:ws,inputFilterSensitiveLog:Rs,outputFilterSensitiveLog:js,...As,[SMITHY_CONTEXT_KEY]:{...Ds,commandInstance:this,...Cs,...xs?.metricsRecorder===void 0?{}:{metricsRecorder:xs.metricsRecorder}}},{requestHandler:Ls}=ms;let Bs=xs??{};return Bs.metricsRecorder&&(Bs={...Bs},delete Bs.metricsRecorder),Cs.eventStream&&(Bs={isEventStream:!0,...Bs}),Os.resolve(Fs=>Ls.handle(Fs.request,Bs),Ps)}}class ClassBuilder{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(dn){this._init=dn}ep(dn){return this._ep=dn,this}m(dn){return this._middlewareFn=dn,this}s(dn,ms,xs={}){return this._smithyContext={service:dn,operation:ms,...xs},this}c(dn={}){return this._additionalContext=dn,this}n(dn,ms){return this._clientName=dn,this._commandName=ms,this}f(dn=xs=>xs,ms=xs=>xs){return this._inputFilterSensitiveLog=dn,this._outputFilterSensitiveLog=ms,this}ser(dn){return this._serializer=dn,this}de(dn){return this._deserializer=dn,this}sc(dn){return this._operationSchema=dn,this._smithyContext.operationSchema=dn,this}build(){const dn=this;let ms;return ms=class extends Command{input;static getEndpointParameterInstructions(){return dn._ep}constructor(...[xs]){super(),this.input=xs??{},dn._init(this),this.schema=dn._operationSchema}resolveMiddleware(xs,bs,Es){const ws=dn._operationSchema,Rs=ws?.[4]??ws?.input,js=ws?.[5]??ws?.output;return this.resolveMiddlewareWithContext(xs,bs,Es,{CommandCtor:ms,middlewareFn:dn._middlewareFn,clientName:dn._clientName,commandName:dn._c
14ommandName,inputFilterSensitiveLog:dn._inputFilterSensitiveLog??(ws?schemaLogFilter.bind(null,Rs):Cs=>Cs),outputFilterSensitiveLog:dn._outputFilterSensitiveLog??(ws?schemaLogFilter.bind(null,js):Cs=>Cs),smithyContext:dn._smithyContext,additionalContext:dn._additionalContext})}serialize=dn._serializer;deserialize=dn._deserializer}}}class ServiceException extends Error{static shapeId="smithy.ts.sdk.synthetic.nonamespace.client#ServiceException";$fault;$response;$retryable;$metadata;constructor(dn){super(dn.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=dn.name,this.$fault=dn.$fault,this.$metadata=dn.$metadata}static isInstance(dn){if(!dn)return!1;const ms=dn;return ServiceException.prototype.isPrototypeOf(ms)||!!ms.$fault&&!!ms.$metadata&&(ms.$fault==="client"||ms.$fault==="server")}static[Symbol.hasInstance](dn){if(!dn)return!1;const ms=dn;if(this===ServiceException)return ServiceException.isInstance(dn);if(ServiceException.isInstance(dn)){if(this.prototype.isPrototypeOf(dn))return!0;const xs=Object.prototype.hasOwnProperty.call(this,"shapeId")?this.shapeId:void 0;let bs=!1;if(xs){let ws=Object.getPrototypeOf(ms);for(;ws&&ws!==Object.prototype;){const Rs=ws.constructor,js=Rs!==ServiceException&&Object.prototype.hasOwnProperty.call(Rs,"shapeId")?Rs?.shapeId:void 0;if(js&&(bs=!0,js===xs))return!0;ws=Object.getPrototypeOf(ws)}}if(xs&&bs)return!1;const Es=this.name;if(Es&&Es.length>=6){if(ms.name===Es)return!0;let ws=Object.getPrototypeOf(ms);for(;ws&&ws!==Object.prototype;){const Rs=ws.constructor?.name;if(Rs&&Rs!=="Error"&&Rs===Es)return!0;ws=Object.getPrototypeOf(ws)}}}return!1}}const decorateServiceException=(ds,dn={})=>{Object.entries(dn).filter(([,xs])=>xs!==void 0).forEach(([xs,bs])=>{(ds[xs]==null||ds[xs]==="")&&(ds[xs]=bs)});const ms=ds.message||ds.Message||"UnknownError";return ds.message=ms,delete ds.Message,ds},loadConfigsForDefaultMode=ds=>{switch(ds){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},knownAlgorithms=Object.values(AlgorithmId),getChecksumConfiguration=ds=>{const dn=[];for(const ms in AlgorithmId){if(!hasOwn(AlgorithmId,ms))continue;const xs=AlgorithmId[ms];ds[xs]!==void 0&&dn.push({algorithmId:()=>xs,checksumConstructor:()=>ds[xs]})}for(const[ms,xs]of Object.entries(ds.checksumAlgorithms??{}))dn.push({algorithmId:()=>ms,checksumConstructor:()=>xs});return{addChecksumAlgorithm(ms){ds.checksumAlgorithms=ds.checksumAlgorithms??{};const xs=ms.algorithmId(),bs=ms.checksumConstructor();knownAlgorithms.includes(xs)?ds.checksumAlgorithms[xs.toUpperCase()]=bs:ds.checksumAlgorithms[xs]=bs,dn.push(ms)},checksumAlgorithms(){return dn}}},resolveChecksumRuntimeConfig=ds=>{const dn={};return ds.checksumAlgorithms().forEach(ms=>{const xs=ms.algorithmId();knownAlgorithms.includes(xs)&&(dn[xs]=ms.checksumConstructor())}),dn},getRetryConfiguration=ds=>({setRetryStrategy(dn){ds.retryStrategy=dn},retryStrategy(){return ds.retryStrategy}}),resolveRetryRuntimeConfig=ds=>{const dn={};return dn.retryStrategy=ds.retryStrategy(),dn},getDefaultExtensionConfiguration=ds=>Object.assign(getChecksumConfiguration(ds),getRetryConfiguration(ds)),resolveDefaultRuntimeConfig=ds=>Object.assign(resolveChecksumRuntimeConfig(ds),resolveRetryRuntimeConfig(ds));class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function makeBuilder(ds,dn,ms,xs){return function(Es,ws,Rs,js,Cs={}){const As=Object.assign({},ds,Es);return Command.classBuilder().ep(As).m(function(ks,Os,Ms,Ds){const Ps=ws.call(this,ks,Os,Ms,Ds);return Ps.unshift(xs(Ms,ks.getEndpointParameterInstructions())),Ps}).s(dn,Rs,Cs).n(ms,Rs.charAt(0).toUpperCase()+Rs.slice(1)+"Command").sc(js).build()}}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",alphabetByEncoding=Object.entries(chars).reduce((ds,[dn,ms])=>(ds[ms]=Number(dn),ds),{}),alphabetByValue=chars.split(""),bitsPerLetter=6,bitsPerByte=8,maxLetterValue=63,fromBase64=ds=>{let dn=ds.length/4*3;ds.slice(-2)==="=="?dn-=2:ds.slice(-1)==="="&&dn--;const ms=new ArrayBuffer(dn),xs=new DataView(ms);for(let bs=0;bs<ds.length;bs+=4){let Es=0,ws=0;for(let Cs=bs,As=bs+3;Cs<=As;Cs++)if(ds[Cs]!=="="){if(!(ds[Cs]in alphabetByEncoding))throw new TypeError(`Invalid character ${ds[Cs]} in base64 string.`);Es|=alphabetByEncoding[ds[Cs]]<<(As-Cs)*bitsPerLetter,ws+=bitsPerLetter}else Es>>=bitsPerLetter;const Rs=bs/4*3;Es>>=ws%bitsPerByte;const js=Math.floor(ws/bitsPerByte);for(let Cs=0;Cs<js;Cs++){const As=(js-Cs-1)*bitsPerByte;xs.setUint8(Rs+Cs,(Es&255<<As)>>As)}}return new Uint8Array(ms)},fromUtf8=ds=>new TextEncoder().encode(ds);function toBase64(ds){let dn;typeof ds=="string"?dn=fromUtf8(ds):dn=ds;const ms=typeof dn=="object"&&typeof dn.length=="number",xs=typeof dn=="object"&&typeof dn.byteOffset=="number"&&typeof dn.byteLength=="number";if(!ms&&!xs)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let bs="";for(let Es=0;Es<dn.length;Es+=3){let ws=0,Rs=0;for(let Cs=Es,As=Math.min(Es+3,dn.length);Cs<As;Cs++)ws|=dn[Cs]<<(As-Cs-1)*bitsPerByte,Rs+=bitsPerByte;const js=Math.ceil(Rs/bitsPerLetter);ws<<=js*bitsPerLetter-Rs;for(let Cs=1;Cs<=js;Cs++){const As=(js-Cs)*bitsPerLetter;bs+=alphabetByValue[(ws&maxLetterValue<<As)>>As]}bs+="==".slice(0,4-js)}return bs}function bindUint8ArrayBlobAdapter(ds,dn,ms,xs){return class $m extends Uint8Array{static fromString(Es,ws="utf-8"){if(typeof Es=="str
14ing")return ws==="base64"?$m.mutate(xs(Es)):$m.mutate(dn(Es));throw new Error(`Unsupported conversion from ${typeof Es} to Uint8ArrayBlobAdapter.`)}static mutate(Es){return Object.setPrototypeOf(Es,$m.prototype),Es}transformToString(Es="utf-8"){return Es==="base64"?ms(this):ds(this)}}}const toUtf8=ds=>{if(typeof ds=="string")return ds;if(typeof ds!="object"||typeof ds.byteOffset!="number"||typeof ds.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(ds)},decimalToHex=Array.from({length:256},(ds,dn)=>dn.toString(16).padStart(2,"0"));function bindV4(ds){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?()=>crypto.randomUUID():()=>{const dn=new Uint8Array(16);return ds(dn),dn[6]=dn[6]&15|64,dn[8]=dn[8]&63|128,decimalToHex[dn[0]]+decimalToHex[dn[1]]+decimalToHex[dn[2]]+decimalToHex[dn[3]]+"-"+decimalToHex[dn[4]]+decimalToHex[dn[5]]+"-"+decimalToHex[dn[6]]+decimalToHex[dn[7]]+"-"+decimalToHex[dn[8]]+decimalToHex[dn[9]]+"-"+decimalToHex[dn[10]]+decimalToHex[dn[11]]+decimalToHex[dn[12]]+decimalToHex[dn[13]]+decimalToHex[dn[14]]+decimalToHex[dn[15]]}}const expectNumber=ds=>{if(ds!=null){if(typeof ds=="string"){const dn=parseFloat(ds);if(!Number.isNaN(dn))return String(dn)!==String(ds)&&logger.warn(stackTraceWarning(`Expected number but observed string: ${ds}`)),dn}if(typeof ds=="number")return ds;throw new TypeError(`Expected number, got ${typeof ds}: ${ds}`)}},MAX_FLOAT=Math.ceil(2**127*(2-2**-23)),expectFloat32=ds=>{const dn=expectNumber(ds);if(dn!==void 0&&!Number.isNaN(dn)&&dn!==1/0&&dn!==-1/0&&Math.abs(dn)>MAX_FLOAT)throw new TypeError(`Expected 32-bit float, got ${ds}`);return dn},expectLong=ds=>{if(ds!=null){if(Number.isInteger(ds)&&!Number.isNaN(ds))return ds;throw new TypeError(`Expected integer, got ${typeof ds}: ${ds}`)}},expectShort=ds=>expectSizedInt(ds,16),expectByte=ds=>expectSizedInt(ds,8),expectSizedInt=(ds,dn)=>{const ms=expectLong(ds);if(ms!==void 0&&castInt(ms,dn)!==ms)throw new TypeError(`Expected ${dn}-bit integer, got ${ds}`);return ms},castInt=(ds,dn)=>{switch(dn){case 32:return Int32Array.of(ds)[0];case 16:return Int16Array.of(ds)[0];case 8:return Int8Array.of(ds)[0]}},strictParseDouble=ds=>expectNumber(typeof ds=="string"?parseNumber(ds):ds),strictParseFloat32=ds=>expectFloat32(typeof ds=="string"?parseNumber(ds):ds),NUMBER_REGEX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,parseNumber=ds=>{const dn=ds.match(NUMBER_REGEX);if(dn===null||dn[0].length!==ds.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(ds)},strictParseShort=ds=>expectShort(typeof ds=="string"?parseNumber(ds):ds),strictParseByte=ds=>expectByte(typeof ds=="string"?parseNumber(ds):ds),stackTraceWarning=ds=>String(new TypeError(ds).stack||ds).split(`
15`).slice(0,5).filter(dn=>!dn.includes("stackTraceWarning")).join(`
16`),logger={warn:console.warn},DAYS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dateToUtcString(ds){const dn=ds.getUTCFullYear(),ms=ds.getUTCMonth(),xs=ds.getUTCDay(),bs=ds.getUTCDate(),Es=ds.getUTCHours(),ws=ds.getUTCMinutes(),Rs=ds.getUTCSeconds(),js=bs<10?`0${bs}`:`${bs}`,Cs=Es<10?`0${Es}`:`${Es}`,As=ws<10?`0${ws}`:`${ws}`,ks=Rs<10?`0${Rs}`:`${Rs}`;return`${DAYS[xs]}, ${js} ${MONTHS[ms]} ${dn} ${Cs}:${As}:${ks} GMT`}const RFC3339_WITH_OFFSET$1=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/),parseRfc3339DateTimeWithOffset=ds=>{if(ds==null)return;if(typeof ds!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const dn=RFC3339_WITH_OFFSET$1.exec(ds);if(!dn)throw new TypeError("Invalid RFC-3339 date-time value");const[ms,xs,bs,Es,ws,Rs,js,Cs,As]=dn,ks=strictParseShort(stripLeadingZeroes(xs)),Os=parseDateValue(bs,"month",1,12),Ms=parseDateValue(Es,"day",1,31),Ds=buildDate(ks,Os,Ms,{hours:ws,minutes:Rs,seconds:js,fractionalMilliseconds:Cs});return As.toUpperCase()!="Z"&&Ds.setTime(Ds.getTime()-parseOffsetToMilliseconds(As)),Ds},IMF_FIXDATE$1=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),RFC_850_DATE$1=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Frid
16ay|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),ASC_TIME$1=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),parseRfc7231DateTime=ds=>{if(ds==null)return;if(typeof ds!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let dn=IMF_FIXDATE$1.exec(ds);if(dn){const[ms,xs,bs,Es,ws,Rs,js,Cs]=dn;return buildDate(strictParseShort(stripLeadingZeroes(Es)),parseMonthByShortName(bs),parseDateValue(xs,"day",1,31),{hours:ws,minutes:Rs,seconds:js,fractionalMilliseconds:Cs})}if(dn=RFC_850_DATE$1.exec(ds),dn){const[ms,xs,bs,Es,ws,Rs,js,Cs]=dn;return adjustRfc850Year(buildDate(parseTwoDigitYear(Es),parseMonthByShortName(bs),parseDateValue(xs,"day",1,31),{hours:ws,minutes:Rs,seconds:js,fractionalMilliseconds:Cs}))}if(dn=ASC_TIME$1.exec(ds),dn){const[ms,xs,bs,Es,ws,Rs,js,Cs]=dn;return buildDate(strictParseShort(stripLeadingZeroes(Cs)),parseMonthByShortName(xs),parseDateValue(bs.trimLeft(),"day",1,31),{hours:Es,minutes:ws,seconds:Rs,fractionalMilliseconds:js})}throw new TypeError("Invalid RFC-7231 date-time value")},parseEpochTimestamp=ds=>{if(ds==null)return;let dn;if(typeof ds=="number")dn=ds;else if(typeof ds=="string")dn=strictParseDouble(ds);else if(typeof ds=="object"&&ds.tag===1)dn=ds.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(dn)||dn===1/0||dn===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(dn*1e3))},buildDate=(ds,dn,ms,xs)=>{const bs=dn-1;return validateDayOfMonth(ds,bs,ms),new Date(Date.UTC(ds,bs,ms,parseDateValue(xs.hours,"hour",0,23),parseDateValue(xs.minutes,"minute",0,59),parseDateValue(xs.seconds,"seconds",0,60),parseMilliseconds(xs.fractionalMilliseconds)))},parseTwoDigitYear=ds=>{const dn=new Date().getUTCFullYear(),ms=Math.floor(dn/100)*100+strictParseShort(stripLeadingZeroes(ds));return ms<dn?ms+100:ms},FIFTY_YEARS_IN_MILLIS=50*365*24*60*60*1e3,adjustRfc850Year=ds=>ds.getTime()-new Date().getTime()>FIFTY_YEARS_IN_MILLIS?new Date(Date.UTC(ds.getUTCFullYear()-100,ds.getUTCMonth(),ds.getUTCDate(),ds.getUTCHours(),ds.getUTCMinutes(),ds.getUTCSeconds(),ds.getUTCMilliseconds())):ds,parseMonthByShortName=ds=>{const dn=MONTHS.indexOf(ds);if(dn<0)throw new TypeError(`Invalid month: ${ds}`);return dn+1},DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],validateDayOfMonth=(ds,dn,ms)=>{let xs=DAYS_IN_MONTH[dn];if(dn===1&&isLeapYear(ds)&&(xs=29),ms>xs)throw new TypeError(`Invalid day for ${MONTHS[dn]} in ${ds}: ${ms}`)},isLeapYear=ds=>ds%4===0&&(ds%100!==0||ds%400===0),parseDateValue=(ds,dn,ms,xs)=>{const bs=strictParseByte(stripLeadingZeroes(ds));if(bs<ms||bs>xs)throw new TypeError(`${dn} must be between ${ms} and ${xs}, inclusive`);return bs},parseMilliseconds=ds=>ds==null?0:strictParseFloat32("0."+ds)*1e3,parseOffsetToMilliseconds=ds=>{const dn=ds[0];let ms=1;if(dn=="+")ms=1;else if(dn=="-")ms=-1;else throw new TypeError(`Offset direction, ${dn}, must be "+" or "-"`);const xs=Number(ds.substring(1,3)),bs=Number(ds.substring(4,6));return ms*(xs*60+bs)*60*1e3},stripLeadingZeroes=ds=>{let dn=0;for(;dn<ds.length-1&&ds.charAt(dn)==="0";)dn++;return dn===0?ds:ds.slice(dn)},LazyJsonString=function(dn){return Object.assign(new String(dn),{deserializeJSON(){return JSON.parse(String(dn))},toString(){return String(dn)},toJSON(){return String(dn)}})};LazyJsonString.from=ds=>ds&&typeof ds=="object"&&(ds instanceof LazyJsonString||"deserializeJSON"in ds)?ds:typeof ds=="string"||Object.getPrototypeOf(ds)===String.prototype?LazyJsonString(String(ds)):LazyJsonString(JSON.stringify(ds));LazyJsonString.fromObject=LazyJsonString.from;function quoteHeader(ds){return(ds.includes(",")||ds.includes('"'))&&(ds=`"${ds.replace(/"/g,'\\"')}"`),ds}const ddd="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",mmm="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",time="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",date="(\\d?\\d)",year="(\\d{4})",RFC3339_WITH_OFFSET=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),IMF_FIXDATE=new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`),RFC_850_DATE=new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`),ASC_TIME=new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`),months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_parseEpochTimestamp=ds=>{if(ds==null)return;let dn=NaN;if(typeof ds=="number")dn=ds;else if(typeof ds=="string"){if(!/^-?\d*\.?\d+$/.test(ds))throw new TypeError("parseEpochTimestamp - numeric string invalid.");dn=Number.parseFloat(ds)}else typeof ds=="object"&&ds.tag===1&&(dn=ds.value);if(isNaN(dn)||Math.abs(dn)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(dn*1e3))},_parseRfc3339DateTimeWithOffset=ds=>{if(ds==null)return;if(typeof ds!="string")throw new TypeError("RFC3339 timestamps must be strings");const dn=RFC3339_WITH_OFFSET.exec(ds);if(!dn)throw new TypeError(`Invalid RFC3339 timestamp format ${ds}`);const[,ms,xs,bs,Es,ws,Rs,,js,Cs]=dn;range(xs,1,12),range(bs,1,31),range(Es,0,23),range(ws,0,59),range(Rs,0,60);const As=new Date(Date.UTC(Number(ms),Number(xs)-1,Number(bs),Number(Es),Number(ws),Number(Rs),Number(js)?Math.round(parseFloat(`0.${js}`)*1e3):0));if(As.setUTCFullYear(Number(ms)),Cs.toUpperCase()!="Z"){const[,ks,Os,Ms]=/([+-])(\d\d):(\d\d)/.exec(Cs)||[void 0,"+",0,0],Ds=ks==="-"?1:-1;As.setTime(As.getTime()+Ds*(Number(Os)*60*60*1e3+Number(Ms)*60*1e3))}return As},_parseRfc7231DateTime=ds=>{if(ds==null)return;if(typeof ds!="string")throw new TypeError("RFC7231 timestamps must be strings.");let dn,ms,xs,bs,Es,ws,Rs,js;if((js=IMF_FIXDATE.exec(ds))?[,dn,ms,xs,bs,Es,ws,Rs]=js:(js=RFC_850_DATE.exec(ds))?([,dn,ms,xs,bs,Es,ws,Rs]=js,xs=(Number(xs)+1900).toString()):(js=ASC_TIME.exec(ds))&&([,ms,dn,bs,Es,ws,Rs,xs]=js),xs&&ws){const Cs=Date.UTC(Number(xs),months.indexOf(ms),Number(dn),Number(bs),Number(Es),Number(ws),Rs?Math.round(parseFloat(`0.${Rs}`)*1e3):0);range(dn,1,31),range(bs,0,23),range(Es,0,59),range(ws,0,60);const As=new Date(Cs);return As.setUTCFullYear(Number(xs)),As}throw new TypeError(`Invalid RFC7231 date-time value ${ds}.`)};function range(ds,dn,ms){const xs=Number(ds);if(xs<dn||xs>ms)throw new Error(`Value ${xs} out of range [${dn}, ${ms}]`)}function splitEvery(ds,dn,ms){if(!Number.isInteger(ms))throw new Error("Invalid number of delimiters ("+ms+") for splitEvery.");const xs=ds.split(dn),bs=[];let Es="";for(let ws=0;ws<xs.length;ws++)Es===""?Es=xs[ws]:Es+=dn+xs[ws],(ws+1)%ms===0&&(bs.push(Es),Es="");return Es!==""&&bs.push(Es),bs}const splitHeader=ds=>{const dn=ds.length,ms=[];let xs=!1,bs,Es=0;for(let ws=0;ws<dn;++ws){const Rs=ds[ws];switch(Rs){case'"':bs!=="\\"&&(xs=!xs);break;case",":xs||(ms.push(ds.slice(Es,ws)),Es=ws+1);break}bs=Rs}return ms.push(ds.slice(Es)),ms.map(ws=>{ws=ws.trim();const Rs=ws.length;return Rs<2?ws:(ws[0]==='"'&&ws[Rs-1]==='"'&&(ws=ws.slice(1,Rs-1)),ws.replace(/\\"/g,'"'))})},format$1=/^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;class NumericValue{string;type;constructor(dn,ms){if(this.string=dn,this.type=ms,!format$1.test(dn))throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${dn}"`)}toString(){return this.string}static[Symbol.hasInstance](dn){if(!dn||typeof dn!="object")return!1;const ms=dn;return NumericValue.prototype.isPrototypeOf(dn)||ms.type==="bigDecimal"&&format$1.test(ms.string)}}const SHORT_TO_HEX={},HEX_TO_SHORT={};for(let ds=0;ds<256;ds++){let dn=ds.toString(16).toLowerCase();dn.length===1&&(dn=`0${dn}`),SHORT_TO_HEX[ds]=dn,HEX_TO_SHORT[dn]=ds}function fromHex(ds){if(ds.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const dn=new Uint8Array(ds.length/2);for(let ms=0;ms<ds.length;ms+=2){const xs=ds.slice(ms,ms+2).toLowerCase();if(xs in HEX_TO_SHORT)dn[ms/2]=HEX_TO_SHORT[xs];else throw new Error(`Cannot decode unrecognized sequence ${xs} as hexadecimal`)}return dn}function toHex(ds){let dn="";for(let ms=0;ms<ds.byteLength;ms++)dn+=SHORT_TO_HEX[ds[ms]];return dn}const TEXT_ENCODER=typeof TextEncoder=="function"?new TextEncoder:null,calculateBodyLength=ds=>{if(typeof ds=="string"){if(TEXT_ENCODER)return TEXT_ENCODER.encode(ds).byteLength;let dn=ds.length;for(let ms=dn-1;ms>=0;ms--){const xs=ds.charCodeAt(ms);xs>127&&xs<=2047?dn++:xs>2047&&xs<=65535&&(dn+=2),xs>=56320&&xs<=57343&&ms--}return dn}else{if(typeof ds.byteLength=="number")return ds.byteLength;if(typeof ds.size=="number")return ds.size}throw new Error(`Body Length computation failed for ${ds}`)},toUint8Array=ds=>ds instanceof Uint8Array?ds:typeof ds=="string"?fromUtf8(ds):ArrayBuffer.isView(ds)?new Uint8Array(ds.buffer,ds.byteOffset,ds.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(ds);function concatBytes(ds,dn){if(dn===void 0){dn=0;for(const bs of ds)dn+=bs.byteLength}const ms=new Uint8Array(dn);let xs=0;for(const bs of ds)ms.set(bs,xs),xs+=bs.byteLength;return ms}const isArrayBuffer=ds=>typeof ArrayBuffer=="function"&&ds instanceof ArrayBuffer||Object.prototype.toString.call(ds)==="[object ArrayBuffer]",getEndpointFromConfig=async ds=>{},resolveParamsForS3=async ds=>{const dn=ds?.Bucket||"";if(typeof ds.Bucket=="string"&&(ds.Bucket=dn.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),isArnBucketName(dn)){if
16(ds.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!isDnsCompatibleBucketName(dn)||dn.indexOf(".")!==-1&&!String(ds.Endpoint).startsWith("http:")||dn.toLowerCase()!==dn||dn.length<3)&&(ds.ForcePathStyle=!0);return ds.DisableMultiRegionAccessPoints&&(ds.disableMultiRegionAccessPoints=!0,ds.DisableMRAP=!0),ds},DOMAIN_PATTERN=/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/,IP_ADDRESS_PATTERN=/(\d+\.){3}\d+/,DOTS_PATTERN=/\.\./,isDnsCompatibleBucketName=ds=>DOMAIN_PATTERN.test(ds)&&!IP_ADDRESS_PATTERN.test(ds)&&!DOTS_PATTERN.test(ds),isArnBucketName=ds=>{const[dn,ms,xs,,,bs]=ds.split(":"),Es=dn==="arn"&&ds.split(":").length>=6,ws=!!(Es&&ms&&xs&&bs);if(Es&&!ws)throw new Error(`Invalid ARN: ${ds} was an invalid ARN.`);return ws},createConfigValueProvider=(ds,dn,ms,xs=!1)=>{const bs=async()=>{let Es;return xs?Es=ms.clientContextParams?.[ds]??ms[ds]??ms[dn]:Es=ms[ds]??ms[dn],typeof Es=="function"?Es():Es};return ds==="credentialScope"||dn==="CredentialScope"?async()=>{const Es=typeof ms.credentials=="function"?await ms.credentials():ms.credentials;return Es?.credentialScope??Es?.CredentialScope}:ds==="accountId"||dn==="AccountId"?async()=>{const Es=typeof ms.credentials=="function"?await ms.credentials():ms.credentials;return Es?.accountId??Es?.AccountId}:ds==="endpoint"||dn==="endpoint"?async()=>{if(ms.isCustomEndpoint===!1)return;const Es=await bs();if(Es&&typeof Es=="object"){if("url"in Es)return Es.url.href;if("hostname"in Es){const{protocol:ws,hostname:Rs,port:js,path:Cs}=Es;return`${ws}//${Rs}${js?":"+js:""}${Cs}`}}return Es}:bs};function bindGetEndpointFromInstructions(ds){return async(dn,ms,xs,bs)=>{if(!xs.isCustomEndpoint&&!xs.ignoreConfiguredEndpointUrls){let Rs;xs.serviceConfiguredEndpoint?Rs=await xs.serviceConfiguredEndpoint():Rs=await ds(xs.serviceId),Rs&&(xs.endpoint=()=>Promise.resolve(toEndpointV1(Rs)),xs.isCustomEndpoint=!0,bs?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${Rs}`))}const Es=await resolveParams(dn,ms,xs);if(typeof xs.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const ws=xs.endpointProvider(Es,bs);if(xs.isCustomEndpoint&&xs.endpoint){const Rs=await xs.endpoint();if(Rs?.headers){ws.headers??={};for(const[js,Cs]of Object.entries(Rs.headers))ws.headers[js]=Array.isArray(Cs)?Cs:[Cs]}}return ws}}const resolveParams=async(ds,dn,ms)=>{const xs={},bs=dn?.getEndpointParameterInstructions?.()||{};for(const[Es,ws]of Object.entries(bs))switch(ws.type){case"staticContextParams":xs[Es]=ws.value;break;case"contextParams":xs[Es]=ds[ws.name];break;case"clientContextParams":case"builtInParams":xs[Es]=await createConfigValueProvider(ws.name,Es,ms,ws.type!=="builtInParams")();break;case"operationContextParams":xs[Es]=ws.get(ds);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(ws))}return Object.keys(bs).length===0&&Object.assign(xs,ms),String(ms.serviceId).toLowerCase()==="s3"&&await resolveParamsForS3(xs),xs};function setFeature$1(ds,dn,ms){ds.__smithy_context?ds.__smithy_context.features||(ds.__smithy_context.features={}):ds.__smithy_context={features:{}},ds.__smithy_context.features[dn]=ms}function bindEndpointMiddleware(ds){const dn=bindGetEndpointFromInstructions(ds);return({config:ms,instructions:xs})=>(bs,Es)=>async ws=>{ms.isCustomEndpoint&&setFeature$1(Es,"ENDPOINT_OVERRIDE","N");const Rs=await dn(ws.input,{getEndpointParameterInstructions(){return xs}},{...ms},Es);Es.endpointV2=Rs,Es.authSchemes=Rs.properties?.authSchemes;const js=Es.authSchemes?.[0];if(js){Es.signing_region=js.signingRegion,Es.signing_service=js.signingName;const As=getSmithyContext(Es)?.selectedHttpAuthScheme?.httpAuthOption;As&&(As.signingProperties=Object.assign(As.signingProperties||{},{signing_region:js.signingRegion,signingRegion:js.signingRegion,signing_service:js.signingName,signingName:js.signingName,signingRegionSet:js.signingRegionSet},js.properties))}return bs({...ws})}}const serializerMiddlewareOption={name:"serializerMiddleware"},endpointMiddlewareOptions={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:serializerMiddlewareOption.name};function bindGetEndpointPlugin(ds){const dn=bindEndpointMiddleware(ds);return(ms,xs)=>({applyToStack:bs=>{bs.addRelativeTo(dn({config:ms,instructions:xs}),endpointMiddlewareOptions)}})}function bindResolveEndpointConfig(ds){return dn=>{const ms=dn.tls??!0,{endpoint:xs,useDualstackEndpoint:bs,useFipsEndpoint:Es}=dn,ws=xs!=null?async()=>toEndpointV1(await normalizeProvider$1(xs)()):void 0,js=Object.assign(dn,{endpoint:ws,tls:ms,isCustomEndpoint:!!xs,useDualstackEndpoint:normalizeProvider$1(bs??!1),useFipsEndpoint:normalizeProvider$1(Es??!1),ignoreConfiguredEndpointUrls:!!dn.ignoreConfiguredEndpointUrls});let Cs;return js.serviceConfiguredEndpoint=async()=>(dn.serviceId&&!Cs&&(Cs=ds(dn.serviceId)),Cs),js}}class BinaryDecisionDiagram{nodes;root;conditions;results;constructor(dn,ms,xs,bs){this.nodes=dn,this.root=ms,this.conditions=xs,this.results=bs}static from(dn,ms,xs,bs){return new BinaryDecisionDiagram(dn,ms,xs,bs)}}class EndpointCache{capacity;data=new Map;parameters=[];constructor({size:dn,params:ms}){this.capacity=dn??50,ms&&(this.parameters=ms)}get(dn,ms){const xs=this.hash(dn);if(xs===!1)return ms();if(!this.data.has(xs)){if(this.data.size>this.capacity+10){const bs=this.data.keys();let Es=0;for(;;){const{value:ws,done:Rs}=bs.next();if(this.data.delete(ws),Rs||++Es>10)break}}this.data.set(xs,ms())}return this.data.get(xs)}size(){return this.data.size}hash(dn){let ms="";const{parameters:xs}=this;if(xs.length===0)return!1;for(const bs of xs){const Es=String(dn[bs]??"");if(Es.includes("|;"))return!1;ms+=Es+"|;"}return ms}}
16class EndpointError extends Error{constructor(dn){super(dn),this.name="EndpointError"}}const debugId="endpoints";function toDebugString(ds){return typeof ds!="object"||ds==null?ds:"ref"in ds?`$${toDebugString(ds.ref)}`:"fn"in ds?`${ds.fn}(${(ds.argv||[]).map(toDebugString).join(", ")})`:JSON.stringify(ds,null,2)}const customEndpointFunctions={},booleanEquals=(ds,dn)=>ds===dn;function coalesce(...ds){for(const dn of ds)if(dn!=null)return dn}const getAttrPathList=ds=>{const dn=ds.split("."),ms=[];for(const xs of dn){const bs=xs.indexOf("[");if(bs!==-1){if(xs.indexOf("]")!==xs.length-1)throw new EndpointError(`Path: '${ds}' does not end with ']'`);const Es=xs.slice(bs+1,-1);if(Number.isNaN(parseInt(Es)))throw new EndpointError(`Invalid array index: '${Es}' in path: '${ds}'`);bs!==0&&ms.push(xs.slice(0,bs)),ms.push(Es)}else ms.push(xs)}return ms},getAttr=(ds,dn)=>getAttrPathList(dn).reduce((ms,xs)=>{if(typeof ms!="object")throw new EndpointError(`Index '${xs}' in '${dn}' not found in '${JSON.stringify(ds)}'`);if(Array.isArray(ms)){const bs=parseInt(xs);return ms[bs<0?ms.length+bs:bs]}return ms[xs]},ds),isSet=ds=>ds!=null;function ite(ds,dn,ms){return ds?dn:ms}const not=ds=>!ds,IP_V4_REGEX=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),isIpAddress=ds=>IP_V4_REGEX.test(ds)||ds.startsWith("[")&&ds.endsWith("]"),DEFAULT_PORTS={[EndpointURLScheme.HTTP]:80,[EndpointURLScheme.HTTPS]:443},parseURL=ds=>{const dn=(()=>{try{if(ds instanceof URL)return ds;if(typeof ds=="object"&&"hostname"in ds){const{hostname:Os,port:Ms,protocol:Ds="",path:Ps="",query:Ls={}}=ds,Bs=new URL(`${Ds}//${Os}${Ms?`:${Ms}`:""}${Ps}`);return Bs.search=Object.entries(Ls).map(([Fs,Us])=>`${Fs}=${Us}`).join("&"),Bs}return new URL(ds)}catch{return null}})();if(!dn)return console.error(`Unable to parse ${JSON.stringify(ds)} as a whatwg URL.`),null;const ms=dn.href,{host:xs,hostname:bs,pathname:Es,protocol:ws,search:Rs}=dn;if(Rs)return null;const js=ws.slice(0,-1);if(!Object.values(EndpointURLScheme).includes(js))return null;const Cs=isIpAddress(bs),As=ms.includes(`${xs}:${DEFAULT_PORTS[js]}`)||typeof ds=="string"&&ds.includes(`${xs}:${DEFAULT_PORTS[js]}`),ks=`${xs}${As?`:${DEFAULT_PORTS[js]}`:""}`;return{scheme:js,authority:ks,path:Es,normalizedPath:Es.endsWith("/")?Es:`${Es}/`,isIp:Cs}};function split(ds,dn,ms){if(ms===1)return[ds];if(ds==="")return[""];const xs=ds.split(dn);return ms===0?xs:xs.slice(0,ms-1).concat(xs.slice(1).join(dn))}const stringEquals=(ds,dn)=>ds===dn,substring=(ds,dn,ms,xs)=>ds==null||dn>=ms||ds.length<ms||/[^\u0000-\u007f]/.test(ds)?null:xs?ds.substring(ds.length-ms,ds.length-dn):ds.substring(dn,ms),uriEncode=ds=>encodeURIComponent(ds).replace(/[!*'()]/g,dn=>`%${dn.charCodeAt(0).toString(16).toUpperCase()}`),endpointFunctions={booleanEquals,coalesce,getAttr,isSet,isValidHostLabel,ite,not,parseURL,split,stringEquals,substring,uriEncode},evaluateTemplate=(ds,dn)=>{const ms=[],{referenceRecord:xs,endpointParams:bs}=dn;let Es=0;for(;Es<ds.length;){const ws=ds.indexOf("{",Es);if(ws===-1){ms.push(ds.slice(Es));break}ms.push(ds.slice(Es,ws));const Rs=ds.indexOf("}",ws);if(Rs===-1){ms.push(ds.slice(ws));break}ds[ws+1]==="{"&&ds[Rs+1]==="}"&&(ms.push(ds.slice(ws+1,Rs)),Es=Rs+2);const js=ds.substring(ws+1,Rs);if(js.includes("#")){const[Cs,As]=js.split("#");ms.push(getAttr(xs[Cs]??bs[Cs],As))}
16else ms.push(xs[js]??bs[js]);Es=Rs+1}return ms.join("")},getReferenceValue=({ref:ds},dn)=>dn.referenceRecord[ds]??dn.endpointParams[ds],evaluateExpression=(ds,dn,ms)=>{if(typeof ds=="string")return evaluateTemplate(ds,ms);if(ds.fn)return group$1.callFunction(ds,ms);if(ds.ref)return getReferenceValue(ds,ms);throw new EndpointError(`'${dn}': ${String(ds)} is not a string, function or reference.`)},callFunction=({fn:ds,argv:dn},ms)=>{const xs=Array(dn.length);for(let ws=0;ws<xs.length;++ws){const Rs=dn[ws];typeof Rs=="boolean"||typeof Rs=="number"?xs[ws]=Rs:xs[ws]=group$1.evaluateExpression(Rs,"arg",ms)}const bs=ds.indexOf(".");if(bs!==-1){const Rs=customEndpointFunctions[ds.slice(0,bs)]?.[ds.slice(bs+1)];if(typeof Rs=="function")return Rs(...xs)}const Es=endpointFunctions[ds];if(typeof Es=="function")return Es(...xs);throw new Error(`function ${ds} not loaded in endpointFunctions.`)},group$1={evaluateExpression,callFunction},evaluateCondition=(ds,dn)=>{const{assign:ms}=ds;if(ms&&ms in dn.referenceRecord)throw new EndpointError(`'${ms}' is already defined in Reference Record.`);const xs=callFunction(ds,dn);dn.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(ds)} = ${toDebugString(xs)}`);const bs=xs===""?!0:!!xs;return ms!=null?{result:bs,toAssign:{name:ms,value:xs}}:{result:bs}},getEndpointHeaders=(ds,dn)=>Object.entries(ds??{}).reduce((ms,[xs,bs])=>(ms[xs]=bs.map(Es=>{const ws=evaluateExpression(Es,"Header value entry",dn);if(typeof ws!="string")throw new EndpointError(`Header '${xs}' value '${ws}' is not a string`);return ws}),ms),{}),getEndpointProperties=(ds,dn)=>Object.entries(ds).reduce((ms,[xs,bs])=>(ms[xs]=group.getEndpointProperty(bs,dn),ms),{}),getEndpointProperty=(ds,dn)=>{if(Array.isArray(ds))return ds.map(ms=>getEndpointProperty(ms,dn));switch(typeof ds){case"string":return evaluateTemplate(ds,dn);case"object":if(ds===null)throw new EndpointError(`Unexpected endpoint property: ${ds}`);return group.getEndpointProperties(ds,dn);case"boolean":return ds;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof ds}`)}},group={getEndpointProperty,getEndpointProperties},getEndpointUrl=(ds,dn)=>{const ms=evaluateExpression(ds,"Endpoint URL",dn);if(typeof ms=="string")try{return new URL(ms)}catch(xs){throw console.error(`Failed to construct URL with ${ms}`,xs),xs}throw new EndpointError(`Endpoint URL must be a string, got ${typeof ms}`)},RESULT=1e8,decideEndpoint=(ds,dn)=>{const{nodes:ms,root:xs,results:bs,conditions:Es}=ds;let ws=xs;const Rs={},js={referenceRecord:Rs,endpointParams:dn.endpointParams,logger:dn.logger};for(;ws!==1&&ws!==-1&&ws<RESULT;){const Cs=3*(Math.abs(ws)-1),[As,ks,Os]=[ms[Cs],ms[Cs+1],ms[Cs+2]],[Ms,Ds,Ps]=Es[As],Ls=evaluateCondition({fn:Ms,assign:Ps,argv:Ds},js);if(Ls.toAssign){const{name:Bs,value:Fs}=Ls.toAssign;Rs[Bs]=Fs}ws=ws>=0===Ls.result?ks:Os}if(ws>=RESULT){const Cs=bs[ws-RESULT];if(Cs[0]===-1){const[,Ms]=Cs;throw new EndpointError(evaluateExpression(Ms,"Error",js))}const[As,ks,Os]=Cs;return{url:getEndpointUrl(As,js),properties:getEndpointProperties(ks,js),headers:getEndpointHeaders(Os??{},js)}}throw new EndpointError("No matching endpoint.")},resolveEndpointConfig=bindResolveEndpointConfig(getEndpointFromConfig),getEndpointPlugin=bindGetEndpointPlugin(getEndpointFromConfig),isReadableStream$2=ds=>typeof ReadableStream=="function"&&(ds?.constructor?.name===ReadableStream.name||ds instanceof ReadableStream),isBlob=ds=>typeof Blob=="function"&&(ds?.constructor?.name===Blob.name||ds instanceof Blob);var buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code$3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$4=0,len=code$3.length;i$4<len;++i$4)lookup[i$4]=code$3[i$4],revLookup[code$3.charCodeAt(i$4)]=i$4;revLookup[45]=62;revLookup[95]=63;function getLens(ds){var dn=ds.length;if(dn%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ms=ds.indexOf("=");ms===-1&&(ms=dn);var xs=ms===dn?0:4-ms%4;return[ms,xs]}function byteLength(ds){var dn=getLens(ds),ms=dn[0],xs=dn[1];return(ms+xs)*3/4-xs}function _byteLength(ds,dn,ms){return(dn+ms)*3/4-ms}function toByteArray(ds){var dn,ms=getLens(ds),xs=ms[0],bs=ms[1],Es=new Arr(_byteLength(ds,xs,bs)),ws=0,Rs=bs>0?xs-4:xs,js;for(js=0;js<Rs;js+=4)dn=revLookup[ds.charCodeAt(js)]<<18|revLookup[ds.charCodeAt(js+1)]<<12|revLookup[ds.charCodeAt(js+2)]<<6|revLookup[ds.charCodeAt(js+3)],Es[ws++]=dn>>16&255,Es[ws++]=dn>>8&255,Es[ws++]=dn&255;return bs===2&&(dn=revLookup[ds.charCodeAt(js)]<<2|revLookup[ds.charCodeAt(js+1)]>>
vendor: 24,912 bytes, line 16
164,Es[ws++]=dn&255),bs===1&&(dn=revLookup[ds.charCodeAt(js)]<<10|revLookup[ds.charCodeAt(js+1)]<<4|revLookup[ds.charCodeAt(js+2)]>>2,Es[ws++]=dn>>8&255,Es[ws++]=dn&255),Es}function tripletToBase64(ds){return lookup[ds>>18&63]+lookup[ds>>12&63]+lookup[ds>>6&63]+lookup[ds&63]}function encodeChunk(ds,dn,ms){for(var xs,bs=[],Es=dn;Es<ms;Es+=3)xs=(ds[Es]<<16&16711680)+(ds[Es+1]<<8&65280)+(ds[Es+2]&255),bs.push(tripletToBase64(xs));return bs.join("")}function fromByteArray(ds){for(var dn,ms=ds.length,xs=ms%3,bs=[],Es=16383,ws=0,Rs=ms-xs;ws<Rs;ws+=Es)bs.push(encodeChunk(ds,ws,ws+Es>Rs?Rs:ws+Es));return xs===1?(dn=ds[ms-1],bs.push(lookup[dn>>2]+lookup[dn<<4&63]+"==")):xs===2&&(dn=(ds[ms-2]<<8)+ds[ms-1],bs.push(lookup[dn>>10]+lookup[dn>>4&63]+lookup[dn<<2&63]+"=")),bs.join("")}var ieee754={};ieee754.read=function(ds,dn,ms,xs,bs){var Es,ws,Rs=bs*8-xs-1,js=(1<<Rs)-1,Cs=js>>1,As=-7,ks=ms?bs-1:0,Os=ms?-1:1,Ms=ds[dn+ks];for(ks+=Os,Es=Ms&(1<<-As)-1,Ms>>=-As,As+=Rs;As>0;Es=Es*256+ds[dn+ks],ks+=Os,As-=8);for(ws=Es&(1<<-As)-1,Es>>=-As,As+=xs;As>0;ws=ws*256+ds[dn+ks],ks+=Os,As-=8);if(Es===0)Es=1-Cs;else{if(Es===js)return ws?NaN:(Ms?-1:1)*(1/0);ws=ws+Math.pow(2,xs),Es=Es-Cs}return(Ms?-1:1)*ws*Math.pow(2,Es-xs)};ieee754.write=function(ds,dn,ms,xs,bs,Es){var ws,Rs,js,Cs=Es*8-bs-1,As=(1<<Cs)-1,ks=As>>1,Os=bs===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ms=xs?0:Es-1,Ds=xs?1:-1,Ps=dn<0||dn===0&&1/dn<0?1:0;for(dn=Math.abs(dn),isNaN(dn)||dn===1/0?(Rs=isNaN(dn)?1:0,ws=As):(ws=Math.floor(Math.log(dn)/Math.LN2),dn*(js=Math.pow(2,-ws))<1&&(ws--,js*=2),ws+ks>=1?dn+=Os/js:dn+=Os*Math.pow(2,1-ks),dn*js>=2&&(ws++,js/=2),ws+ks>=As?(Rs=0,ws=As):ws+ks>=1?(Rs=(dn*js-1)*Math.pow(2,bs),ws=ws+ks):(Rs=dn*Math.pow(2,ks-1)*Math.pow(2,bs),ws=0));bs>=8;ds[ms+Ms]=Rs&255,Ms+=Ds,Rs/=256,bs-=8);for(ws=ws<<bs|Rs,Cs+=bs;Cs>0;ds[ms+Ms]=ws&255,Ms+=Ds,ws/=256,Cs-=8);ds[ms+Ms-Ds]|=Ps*128};(function(ds){const dn=base64Js,ms=ieee754,xs=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ds.Buffer=As,ds.SlowBuffer=Js,ds.INSPECT_MAX_BYTES=50;const bs=2147483647;ds.kMaxLength=bs;const{Uint8Array:Es,ArrayBuffer:ws,SharedArrayBuffer:Rs}=globalThis;As.TYPED_ARRAY_SUPPORT=js(),!As.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function js(){try{const Hs=new Es(1),zs={foo:function(){return 42}};return Object.setPrototypeOf(zs,Es.prototype),Object.setPrototypeOf(Hs,zs),Hs.foo()===42}catch{return!1}}Object.defineProperty(As.prototype,"parent",{enumerable:!0,get:function(){if(As.isBuffer(this))return this.buffer}}),Object.defineProperty(As.prototype,"offset",{enumerable:!0,get:function(){if(As.isBuffer(this))return this.byteOffset}});function Cs(Hs){if(Hs>bs)throw new RangeError('The value "'+Hs+'" is invalid for option "size"');const zs=new Es(Hs);return Object.setPrototypeOf(zs,As.prototype),zs}function As(Hs,zs,qs){if(typeof Hs=="number"){if(typeof zs=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ds(Hs)}return ks(Hs,zs,qs)}As.poolSize=8192;function ks(Hs,zs,qs){if(typeof Hs=="string")return Ps(Hs,zs);if(ws.isView(Hs))return Bs(Hs);if(Hs==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Hs);if(Ro(Hs,ws)||Hs&&Ro(Hs.buffer,ws)||typeof Rs<"u"&&(Ro(Hs,Rs)||Hs&&Ro(Hs.buffer,Rs)))return Fs(Hs,zs,qs);if(typeof Hs=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Xs=Hs.valueOf&&Hs.valueOf();if(Xs!=null&&Xs!==Hs)return As.from(Xs,zs,qs);const na=Us(Hs);if(na)return na;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Hs[Symbol.toPrimitive]=="function")return As.from(Hs[Symbol.toPrimitive]("string"),zs,qs);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Hs)}As.from=function(Hs,zs,qs){return ks(Hs,zs,qs)},Object.setPrototypeOf(As.prototype,Es.prototype),Object.setPrototypeOf(As,Es);function Os(Hs){if(typeof Hs!="number")throw new TypeError('"size" argument must be of type number');if(Hs<0)throw new RangeError('The value "'+Hs+'" is invalid for option "size"')}function Ms(Hs,zs,qs){return Os(Hs),Hs<=0?Cs(Hs):zs!==void 0?typeof qs=="string"?Cs(Hs).fill(zs,qs):Cs(Hs).fill(zs):Cs(Hs)}As.alloc=function(Hs,zs,qs){return Ms(Hs,zs,qs)};function Ds(Hs){return Os(Hs),Cs(Hs<0?0:Gs(Hs)|0)}As.allocUnsafe=function(Hs){return Ds(Hs)},As.allocUnsafeSlow=function(Hs){return Ds(Hs)};function Ps(Hs,zs){if((typeof zs!="string"||zs==="")&&(zs="utf8"),!As.isEncoding(zs))throw new TypeError("Unknown encoding: "+zs);const qs=Ws(Hs,zs)|0;let Xs=Cs(qs);const na=Xs.write(Hs,zs);return na!==qs&&(Xs=Xs.slice(0,na)),Xs}function Ls(Hs){const zs=Hs.length<0?0:Gs(Hs.length)|0,qs=Cs(zs);for(let Xs=0;Xs<zs;Xs+=1)qs[Xs]=Hs[Xs]&255;return qs}function Bs(Hs){if(Ro(Hs,Es)){const zs=new Es(Hs);return Fs(zs.buffer,zs.byteOffset,zs.byteLength)}return Ls(Hs)}function Fs(Hs,zs,qs){if(zs<0||Hs.byteLength<zs)throw new RangeError('"offset" is outside of buffer bounds');if(Hs.byteLength<zs+(qs||0))throw new RangeError('"length" is outside of buffer bounds');let Xs;return zs===void 0&&qs===void 0?Xs=new Es(Hs):qs===void 0?Xs=new Es(Hs,zs):Xs=new Es(Hs,zs,qs),Object.setPrototypeOf(Xs,As.prototype),Xs}function Us(Hs){if(As.isBuffer(Hs)){const zs=Gs(Hs.length)|0,qs=Cs(zs);return qs.length===0||Hs.copy(qs,0,0,zs),qs}if(Hs.length!==void 0)return typeof Hs.length!="number"||Vs(Hs.length)?Cs(0):Ls(Hs);if(Hs.type==="Buffer"&&Array.isArray(Hs.data))return Ls(Hs.data)}function Gs(Hs){if(Hs>=bs)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bs.toString(16)+" bytes");return Hs|0}function Js(Hs){return+Hs!=Hs&&(Hs=0),As.alloc(+Hs)}As.isBuffer=function(zs){return zs!=null&&zs._isBuffer===!0&&zs!==As.prototype},As.compare=function(zs,qs){if(Ro(zs,Es)&&(zs=As.from(zs,zs.offset,zs.byteLength)),Ro(qs,Es)&&(qs=As.from(qs,qs.offset,qs.byteLength)),!As.isBuffer(zs)||!As.isBuffer(qs))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(zs===qs)return 0;let Xs=zs.length,na=qs.length;for(let da=0,xa=Math.min(Xs,na);da<xa;++da)if(zs[da]!==qs[da]){Xs=zs[da],na=qs[da];break}return Xs<na?-1:na<Xs?1:0},As.isEncoding=function(zs){switch(String(zs).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},As.concat=function(zs,qs){if(!Array.isArray(zs))throw new TypeError('"list" argument must be an Array of Buffers');if(zs.length===0)return As.alloc(0);let Xs;if(qs===void 0)for(qs=0,Xs=0;Xs<zs.length;++Xs)qs+=zs[Xs].length;const na=As.allocUnsafe(qs);let da=0;for(Xs=0;Xs<zs.length;++Xs){let xa=zs[Xs];if(Ro(xa,Es))da+xa.length>na.length?(As.isBuffer(xa)||(xa=As.from(xa)),xa.copy(na,da)):Es.prototype.set.call(na,xa,da);else if(As.isBuffer(xa))xa.copy(na,da);else throw new TypeError('"list" argument must be an Array of Buffers');da+=xa.length}return na};function Ws(Hs,zs){if(As.isBuffer(Hs))return Hs.length;if(ws.isView(Hs)||Ro(Hs,ws))return Hs.byteLength;if(typeof Hs!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Hs);const qs=Hs.length,Xs=arguments.length>2&&arguments[2]===!0;if(!Xs&&qs===0)return 0;let na=!1;for(;;)switch(zs){case"ascii":case"latin1":case"binary":return qs;case"utf8":case"utf-8":return Eo(Hs).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qs*2;case"hex":return qs>>>1;case"base64":return sl(Hs).length;default:if(na)return Xs?-1:Eo(Hs).length;zs=(""+zs).toLowerCase(),na=!0}}As.byteLength=Ws;function Zs(Hs,zs,qs){let Xs=!1;if((zs===void 0||zs<0)&&(zs=0),zs>this.length||((qs===void 0||qs>this.length)&&(qs=this.length),qs<=0)||(qs>>>=0,zs>>>=0,qs<=zs))return"";for(Hs||(Hs="utf8");;)switch(Hs){case"hex":return $a(this,zs,qs);case"utf8":case"utf-8":return fa(this,zs,qs);case"ascii":return ra(this,zs,qs);case"latin1":case"binary":return Ia(this,zs,qs);case"base64":return aa(this,zs,qs);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oa(this,zs,qs);default:if(Xs)throw new TypeError("Unknown encoding: "+Hs);Hs=(Hs+"").toLowerCase(),Xs=!0}}As.prototype._isBuffer=!0;function Ys(Hs,zs,qs){const Xs=Hs[zs];Hs[zs]=Hs[qs],Hs[qs]=Xs}As.prototype.swap16=function(){const zs=this.length;if(zs%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let qs=0;qs<zs;qs+=2)Ys(this,qs,qs+1);return this},As.prototype.swap32=function(){const zs=this.length;if(zs%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let qs=0;qs<zs;qs+=4)Ys(this,qs,qs+3),Ys(this,qs+1,qs+2);return this},As.prototype.swap64=function(){const zs=this.length;if(zs%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let qs=0;qs<zs;qs+=8)Ys(this,qs,qs+7),Ys(this,qs+1,qs+6),Ys(this,qs+2,qs+5),Ys(this,qs+3,qs+4);return this},As.prototype.toString=function(){const zs=this.length;return zs===0?"":arguments.length===0?fa(this,0,zs):Zs.apply(this,arguments)},As.prototype.toLocaleString=As.prototype.toString,As.prototype.equals=function(zs){if(!As.isBuffer(zs))throw new TypeError("Argument must be a Buffer");return this===zs?!0:As.compare(this,zs)===0},As.prototype.inspect=function(){let zs="";const qs=ds.INSPECT_MAX_BYTES;return zs=this.toString("hex",0,qs).replace(/(.{2})/g,"$1 ").trim(),this.length>qs&&(zs+=" ... "),"<Buffer "+zs+">"},xs&&(As.prototype[xs]=As.prototype.inspect),As.prototype.compare=function(zs,qs,Xs,na,da){if(Ro(zs,Es)&&(zs=As.from(zs,zs.offset,zs.byteLength)),!As.isBuffer(zs))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof zs);if(qs===void 0&&(qs=0),Xs===void 0&&(Xs=zs?zs.length:0),na===void 0&&(na=0),da===void 0&&(da=this.length),qs<0||Xs>zs.length||na<0||da>this.length)throw new RangeError("out of range index");if(na>=da&&qs>=Xs)return 0;if(na>=da)return-1;if(qs>=Xs)return 1;if(qs>>>=0,Xs>>>=0,na>>>=0,da>>>=0,this===zs)return 0;let xa=da-na,ka=Xs-qs;const Ha=Math.min(xa,ka),La=this.slice(na,da),Wa=zs.slice(qs,Xs);for(let Ja=0;Ja<Ha;++Ja)if(La[Ja]!==Wa[Ja]){xa=La[Ja],ka=Wa[Ja];break}return xa<ka?-1:ka<xa?1:0};function Qs(Hs,zs,qs,Xs,na){if(Hs.length===0)return-1;if(typeof qs=="string"?(Xs=qs,qs=0):qs>2147483647?qs=2147483647:qs<-2147483648&&(qs=-2147483648),qs=+qs,Vs(qs)&&(qs=na?0:Hs.length-1),qs<0&&(qs=Hs.length+qs),qs>=Hs.length){if(na)return-1;qs=Hs.length-1}else if(qs<0)if(na)qs=0;else return-1;if(typeof zs=="string"&&(zs=As.from(zs,Xs)),As.isBuffer(zs))return zs.length===0?-1:ai(Hs,zs,qs,Xs,na);if(typeof zs=="number")return zs=zs&255,typeof Es.prototype.indexOf=="function"?na?Es.prototype.indexOf.call(Hs,zs,qs):Es.prototype.lastIndexOf.call(Hs,zs,qs):ai(Hs,[zs],qs,Xs,na);throw new TypeError("val must be string, number or Buffer")}function ai(Hs,zs,qs,Xs,na){let da=1,xa=Hs.length,ka=zs.length;if(Xs!==void 0&&(Xs=String(Xs).toLowerCase(),Xs==="ucs2"||Xs==="ucs-2"||Xs==="utf16le"||Xs==="utf-16le")){if(Hs.length<2||zs.length<2)return-1;da=2,xa/=2,ka/=2,qs/=2}function Ha(Wa,Ja){return da===1?Wa[Ja]:Wa.readUInt16BE(Ja*da)}let La;if(na){let Wa=-1;for(La=qs;La<xa;La++)if(Ha(Hs,La)===Ha(zs,Wa===-1?0:La-Wa)){if(Wa===-1&&(Wa=La),La-Wa+1===ka)return Wa*da}else Wa!==-1&&(La-=La-Wa),Wa=-1}else for(qs+ka>xa&&(qs=xa-ka),La=qs;La>=0;La--){let Wa=!0;for(let Ja=0;Ja<ka;Ja++)if(Ha(Hs,La+Ja)!==Ha(zs,Ja)){Wa=!1;break}if(Wa)return La}return-1}As.prototype.includes=function(zs,qs,Xs){return this.indexOf(zs,qs,Xs)!==-1},As.prototype.indexOf=function(zs,qs,Xs){return Qs(this,zs,qs,Xs,!0)},As.prototype.lastIndexOf=function(zs,qs,Xs){return Qs(this,zs,qs,Xs,!1)};function ia(Hs,zs,qs,Xs){qs=Number(qs)||0;const na=Hs.length-qs;Xs?(Xs=Number(Xs),Xs>na&&(Xs=na)):Xs=na;const da=zs.length;Xs>da/2&&(Xs=da/2);let xa;for(xa=0;xa<Xs;++xa){const ka=parseInt(zs.substr(xa*2,2),16);if(Vs(ka))return xa;Hs[qs+xa]=ka}return xa}function ca(Hs,zs,qs,Xs){return Po(Eo(zs,Hs.length-qs),Hs,qs,Xs)}function ha(Hs,zs,qs,Xs){return Po(Ao(zs),Hs,qs,Xs)}function ea(Hs,zs,qs,Xs){return Po(sl(zs),Hs,qs,Xs)}function ta(Hs,zs,qs,Xs){return Po(Zo(zs,Hs.length-qs),Hs,qs,Xs)}As.prototype.write=function(zs,qs,Xs,na){if(qs===void 0)na="utf8",Xs=this.length,qs=0;else if(Xs===void 0&&typeof qs=="string")na=qs,Xs=this.length,qs=0;else if(isFinite(qs))qs=qs>>>0,isFinite(Xs)?(Xs=Xs>>>0,na===void 0&&(na="utf8")):(na=Xs,Xs=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const da=this.length-qs;if((Xs===void 0||Xs>da)&&(Xs=da),zs.length>0&&(Xs<0||qs<0)||qs>this.length)throw new RangeError("Attempt to write outside buffer bounds");na||(na="utf8");let xa=!1;for(;;)switch(na){case"hex":return ia(this,zs,qs,Xs);case"utf8":case"utf-8":return ca(this,zs,qs,Xs);case"ascii":case"latin1":case"binary":return ha(this,zs,qs,Xs);case"base64":return ea(this,zs,qs,Xs);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ta(this,zs,qs,Xs);default:if(xa)throw new TypeError("Unknown encoding: "+na);na=(""+na).toLowerCase(),xa=!0}},As.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function aa(Hs,zs,qs){return zs===0&&qs===Hs.length?dn.fromByteArray(Hs):dn.fromByteArray(Hs.slice(zs,qs))}function fa(Hs,zs,qs){qs=Math.min(Hs.length,qs);const Xs=[];let na=zs;for(;na<qs;){const da=Hs[na];let xa=null,ka=da>239?4:da>223?3:da>191?2:1;if(na+ka<=qs){let Ha,La,Wa,Ja;switch(ka){case 1:da<128&&(xa=da);break;case 2:Ha=Hs[na+1],(Ha&192)===128&&(Ja=(da&31)<<6|Ha&63,Ja>127&&(xa=Ja));break;case 3:Ha=Hs[na+1],La=Hs[na+2],(Ha&192)===128&&(La&192)===128&&(Ja=(da&15)<<12|(Ha&63)<<6|La&63,Ja>2047&&(Ja<55296||Ja>57343)&&(xa=Ja));break;case 4:Ha=Hs[na+1],La=Hs[na+2],Wa=Hs[na+3],(Ha&192)===128&&(La&192)===128&&(Wa&192)===128&&(Ja=(da&15)<<18|(Ha&63)<<12|(La&63)<<6|Wa&63,Ja>65535&&Ja<1114112&&(xa=Ja))}}xa===null?(xa=65533,ka=1):xa>65535&&(xa-=65536,Xs.push(xa>>>10&1023|55296),xa=56320|xa&1023),Xs.push(xa),na+=ka}return Ea(Xs)}const ua=4096;function Ea(Hs){const zs=Hs.length;if(zs<=ua)return String.fromCharCode.apply(String,Hs);let qs="",Xs=0;for(;Xs<zs;)qs+=String.fromCharCode.apply(String,Hs.slice(Xs,Xs+=ua));return qs}function ra(Hs,zs,qs){let Xs="";qs=Math.min(Hs.length,qs);for(let na=zs;na<qs;++na)Xs+=String.fromCharCode(Hs[na]&127);return Xs}function Ia(Hs,zs,qs){let Xs="";qs=Math.min(Hs.length,qs);for(let na=zs;na<qs;++na)Xs+=String.fromCharCode(Hs[na]);return Xs}function $a(Hs,zs,qs){const Xs=Hs.length;(!zs||zs<0)&&(zs=0),(!qs||qs<0||qs>Xs)&&(qs=Xs);let na="";for(let da=zs;da<qs;++da)na+=la[Hs[da]];return na}function oa(Hs,zs,qs){const Xs=Hs.slice(zs,qs);let na="";for(let da=0;da<Xs.length-1;da+=2)na+=String.fromCharCode(Xs[da]+Xs[da+1]*256);return na}As.prototype.slice=function(zs,qs){const Xs=this.length;zs=~~zs,qs=qs===void 0?Xs:~~qs,zs<0?(zs+=Xs,zs<0&&(zs=0)):zs>Xs&&(zs=Xs),qs<0?(qs+=Xs,qs<0&&(qs=0)):qs>Xs&&(qs=Xs),qs<zs&&(qs=zs);const na=this.subarray(zs,qs);return Object.setPrototypeOf(na,As.prototype),na};function sa(Hs,zs,qs){if(Hs%1!==0||Hs<0)throw new RangeError("offset is not uint");if(Hs+zs>qs)throw new RangeError("Trying to access beyond buffer length")}As.prototype.readUintLE=As.prototype.readUIntLE=function(zs,qs,Xs){zs=zs>>>0,qs=qs>>>0,Xs||sa(zs,qs,this.length);let na=this[zs],da=1,xa=0;for(;++xa<qs&&(da*=256);)na+=this[zs+xa]*da;return na},As.prototype.readUintBE=As.prototype.readUIntBE=function(zs,qs,Xs){zs=zs>>>0,qs=qs>>>0,Xs||sa(zs,qs,this.length);let na=this[zs+--qs],da=1;for(;qs>0&&(da*=256);)na+=this[zs+--qs]*da;return na},As.prototype.readUint8=As.prototype.readUInt8=function(zs,qs){return zs=zs>>>0,qs||sa(zs,1,this.length),this[zs]},As.prototype.readUint16LE=As.prototype.readUInt16LE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,2,this.length),this[zs]|this[zs+1]<<8},As.prototype.readUint16BE=As.prototype.readUInt16BE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,2,this.length),this[zs]<<8|this[zs+1]},As.prototype.readUint32LE=As.prototype.readUInt32LE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),(this[zs]|this[zs+1]<<8|this[zs+2]<<16)+this[zs+3]*16777216},As.prototype.readUint32BE=As.prototype.readUInt32BE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),this[zs]*16777216+(this[zs+1]<<16|this[zs+2]<<8|this[zs+3])},As.prototype.readBigUInt64LE=ga(function(zs){zs=zs>>>0,bo(zs,"offset");const qs=this[zs],Xs=this[zs+7];(qs===void 0||Xs===void 0)&&oo(zs,this.length-8);const na=qs+this[++zs]*2**8+this[++zs]*2**16+this[++zs]*2**24,da=this[++zs]+this[++zs]*2**8+this[++zs]*2**16+Xs*2**24;return BigInt(na)+(BigInt(da)<<BigInt(32))}),As.prototype.readBigUInt64BE=ga(function(zs){zs=zs>>>0,bo(zs,"offset");const qs=this[zs],Xs=this[zs+7];(qs===void 0||Xs===void 0)&&oo(zs,this.length-8);const na=qs*2**24+this[++zs]*2**16+this[++zs]*2**8+this[++zs],da=this[++zs]*2**24+this[++zs]*2**16+this[++zs]*2**8+Xs;return(BigInt(na)<<BigInt(32))+BigInt(da)}),As.prototype.readIntLE=function(zs,qs,Xs){zs=zs>>>0,qs=qs>>>0,Xs||sa(zs,qs,this.length);let na=this[zs],da=1,xa=0;for(;++xa<qs&&(da*=256);)na+=this[zs+xa]*da;return da*=128,na>=da&&(na-=Math.pow(2,8*qs)),na},As.prototype.readIntBE=function(zs,qs,Xs){zs=zs>>>0,qs=qs>>>0,Xs||sa(zs,qs,this.length);let na=qs,da=1,xa=this[zs+--na];for(;na>0&&(da*=256);)xa+=this[zs+--na]*da;return da*=128,xa>=da&&(xa-=Math.pow(2,8*qs)),xa},As.prototype.readInt8=function(zs,qs){return zs=zs>>>0,qs||sa(zs,1,this.length),this[zs]&128?(255-this[zs]+1)*-1:this[zs]},As.prototype.readInt16LE=function(zs,qs){zs=zs>>>0,qs||sa(zs,2,this.length);const Xs=this[zs]|this[zs+1]<<8;return Xs&32768?Xs|4294901760:Xs},As.prototype.readInt16BE=function(zs,qs){zs=zs>>>0,qs||sa(zs,2,this.length);const Xs=this[zs+1]|this[zs]<<8;return Xs&32768?Xs|4294901760:Xs},As.prototype.readInt32LE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),this[zs]|this[zs+1]<<8|this[zs+2]<<16|this[zs+3]<<24},As.prototype.readInt32BE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),this[zs]<<24|this[zs+1]<<16|this[zs+2]<<8|this[zs+3]},As.prototype.readBigInt64LE=ga(function(zs){zs=zs>>>0,bo(zs,"offset");const qs=this[zs],Xs=this[zs+7];(qs===void 0||Xs===void 0)&&oo(zs,this.length-8);const na=this[zs+4]+this[zs+5]*2**8+this[zs+6]*2**16+(Xs<<24);return(BigInt(na)<<BigInt(32))+BigInt(qs+this[++zs]*2**8+this[++zs]*2**16+this[++zs]*2**24)}),As.prototype.readBigInt64BE=ga(function(zs){zs=zs>>>0,bo(zs,"offset");const qs=this[zs],Xs=this[zs+7];(qs===void 0||Xs===void 0)&&oo(zs,this.length-8);const na=(qs<<24)+this[++zs]*2**16+this[++zs]*2**8+this[++zs];return(BigInt(na)<<BigInt(32))+BigInt(this[++zs]*2**24+this[++zs]*2**16+this[++zs]*2**8+Xs)}),As.prototype.readFloatLE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),ms.read(this,zs,!0,23,4)},As.prototype.readFloatBE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,4,this.length),ms.read(this,zs,!1,23,4)},As.prototype.readDoubleLE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,8,this.length),ms.read(this,zs,!0,52,8)},As.prototype.readDoubleBE=function(zs,qs){return zs=zs>>>0,qs||sa(zs,8,this.length),ms.read(this,zs,!1,52,8)};function Ra(Hs,zs,qs,Xs,na,da){if(!As.isBuffer(Hs))throw new TypeError('"buffer" argument must be a Buffer instance');if(zs>na||zs<da)throw new RangeError('"value" argument is out of bounds');if(qs+Xs>Hs.length)throw new RangeError("Index out of range")}As.prototype.writeUintLE=As.prototype.writeUIntLE=function(zs,qs,Xs,na){if(zs=+zs,qs=qs>>>0,Xs=Xs>>>0,!na){const ka=Math.pow(2,8*Xs)-1;Ra(this,zs,qs,Xs,ka,0)}let da=1,xa=0;for(this[qs]=zs&255;++xa<Xs&&(da*=256);)this[qs+xa]=zs/da&255;return qs+Xs},As.prototype.writeUintBE=As.prototype.writeUIntBE=function(zs,qs,Xs,na){if(zs=+zs,qs=qs>>>0,Xs=Xs>>>0,!na){const ka=Math.pow(2,8*Xs)-1;Ra(this,zs,qs,Xs,ka,0)}let da=Xs-1,xa=1;for(this[qs+da]=zs&255;--da>=0&&(xa*=256);)this[qs+da]=zs/xa&255;return qs+Xs},As.prototype.writeUint8=As.prototype.writeUInt8=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,1,255,0),this[qs]=zs&255,qs+1},As.prototype.writeUint16LE=As.prototype.writeUInt16LE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,2,65535,0),this[qs]=zs&255,this[qs+1]=zs>>>8,qs+2},As.prototype.writeUint16BE=As.prototype.writeUInt16BE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,2,65535,0),this[qs]=zs>>>8,this[qs+1]=zs&255,qs+2},As.prototype.writeUint32LE=As.prototype.writeUInt32LE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,4,4294967295,0),this[qs+3]=zs>>>24,this[qs+2]=zs>>>16,this[qs+1]=zs>>>8,this[qs]=zs&255,qs+4},As.prototype.writeUint32BE=As.prototype.writeUInt32BE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,4,4294967295,0),this[qs]=zs>>>24,this[qs+1]=zs>>>16,this[qs+2]=zs>>>8,this[qs+3]=zs&255,qs+4};function _a(Hs,zs,qs,Xs,na){ko(zs,Xs,na,Hs,qs,7);let da=Number(zs&BigInt(4294967295));Hs[qs++]=da,da=da>>8,Hs[qs++]=da,da=da>>8,Hs[qs++]=da,da=da>>8,Hs[qs++]=da;let xa=Number(zs>>BigInt(32)&BigInt(4294967295));return Hs[qs++]=xa,xa=xa>>8,Hs[qs++]=xa,xa=xa>>8,Hs[qs++]=xa,xa=xa>>8,Hs[qs++]=xa,qs}function Oa(Hs,zs,qs,Xs,na){ko(zs,Xs,na,Hs,qs,7);let da=Number(zs&BigInt(4294967295));Hs[qs+7]=da,da=da>>8,Hs[qs+6]=da,da=da>>8,Hs[qs+5]=da,da=da>>8,Hs[qs+4]=da;let xa=Number(zs>>BigInt(32)&BigInt(4294967295));return Hs[qs+3]=xa,xa=xa>>8,Hs[qs+2]=xa,xa=xa>>8,Hs[qs+1]=xa,xa=xa>>8,Hs[qs]=xa,qs+8}As.prototype.writeBigUInt64LE=ga(function(zs,qs=0){return _a(this,zs,qs,BigInt(0),BigInt("0xffffffffffffffff"))}),As.prototype.writeBigUInt64BE=ga(function(zs,qs=0){return Oa(this,zs,qs,BigInt(0),BigInt("0xffffffffffffffff"))}),As.prototype.writeIntLE=function(zs,qs,Xs,na){if(zs=+zs,qs=qs>>>0,!na){const Ha=Math.pow(2,8*Xs-1);Ra(this,zs,qs,Xs,Ha-1,-Ha)}let da=0,xa=1,ka=0;for(this[qs]=zs&255;++da<Xs&&(xa*=256);)zs<0&&ka===0&&this[qs+da-1]!==0&&(ka=1),this[qs+da]=(zs/xa>>0)-ka&255;return qs+Xs},As.prototype.writeIntBE=function(zs,qs,Xs,na){if(zs=+zs,qs=qs>>>0,!na){const Ha=Math.pow(2,8*Xs-1);Ra(this,zs,qs,Xs,Ha-1,-Ha)}let da=Xs-1,xa=1,ka=0;for(this[qs+da]=zs&255;--da>=0&&(xa*=256);)zs<0&&ka===0&&this[qs+da+1]!==0&&(ka=1),this[qs+da]=(zs/xa>>0)-ka&255;return qs+Xs},As.prototype.writeInt8=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,1,127,-128),zs<0&&(zs=255+zs+1),this[qs]=zs&255,qs+1},As.prototype.writeInt16LE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,2,32767,-32768),this[qs]=zs&255,this[qs+1]=zs>>>8,qs+2},As.prototype.writeInt16BE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,2,32767,-32768),this[qs]=zs>>>8,this[qs+1]=zs&255,qs+2},As.prototype.writeInt32LE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,4,2147483647,-2147483648),this[qs]=zs&255,this[qs+1]=zs>>>8,this[qs+2]=zs>>>16,this[qs+3]=zs>>>24,qs+4},As.prototype.writeInt32BE=function(zs,qs,Xs){return zs=+zs,qs=qs>>>0,Xs||Ra(this,zs,qs,4,2147483647,-2147483648),zs<0&&(zs=4294967295+zs+1),this[qs]=zs>>>24,this[qs+1]=zs>>>16,this[qs+2]=zs>>>8,this[qs+3]=zs&255,qs+4},As.prototype.writeBigInt64LE=ga(function(zs,qs=0){return _a(this,zs,qs,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),As.prototype.writeBigInt64BE=ga(function(zs,qs=0){return Oa(this,zs,qs,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function za(Hs,zs,qs,Xs,na,da){if(qs+Xs>Hs.length)throw new RangeError("Index out of range");if(qs<0)throw new RangeError("Index out of range")}function Ga(Hs,zs,qs,Xs,na){return zs=+zs,qs=qs>>>0,na||za(Hs,zs,qs,4),ms.write(Hs,zs,qs,Xs,23,4),qs+4}As.prototype.writeFloatLE=function(zs,qs,Xs){return Ga(this,zs,qs,!0,Xs)},As.prototype.writeFloatBE=function(zs,qs,Xs){return Ga(this,zs,qs,!1,Xs)};function qa(Hs,zs,qs,Xs,na){return zs=+zs,qs=qs>>>0,na||za(Hs,zs,qs,8),ms.write(Hs,zs,qs,Xs,52,8),qs+8}As.prototype.writeDoubleLE=function(zs,qs,Xs){return qa(this,zs,qs,!0,Xs)},As.prototype.writeDoubleBE=function(zs,qs,Xs){return qa(this,zs,qs,!1,Xs)},As.prototype.copy=function(zs,qs,Xs,na){if(!As.isBuffer(zs))throw new TypeError("argument should be a Buffer");if(Xs||(Xs=0),!na&&na!==0&&(na=this.length),qs>=zs.length&&(qs=zs.length),qs||(qs=0),na>0&&na<Xs&&(na=Xs),na===Xs||zs.length===0||this.length===0)return 0;if(qs<0)throw new RangeError("targetStart out of bounds");if(Xs<0||Xs>=this.length)throw new RangeError("Index out of range");if(na<0)throw new RangeError("sourceEnd out of bounds");na>this.length&&(na=this.length),zs.length-qs<na-Xs&&(na=zs.length-qs+Xs);const da=na-Xs;return this===zs&&typeof Es.prototype.copyWithin=="function"?this.copyWithin(qs,Xs,na):Es.prototype.set.call(zs,this.subarray(Xs,na),qs),da},As.prototype.fill=function(zs,qs,Xs,na){if(typeof zs=="string"){if(typeof qs=="string"?(na=qs,qs=0,Xs=this.length):typeof Xs=="str
16ing"&&(na=Xs,Xs=this.length),na!==void 0&&typeof na!="string")throw new TypeError("encoding must be a string");if(typeof na=="string"&&!As.isEncoding(na))throw new TypeError("Unknown encoding: "+na);if(zs.length===1){const xa=zs.charCodeAt(0);(na==="utf8"&&xa<128||na==="latin1")&&(zs=xa)}}else typeof zs=="number"?zs=zs&255:typeof zs=="boolean"&&(zs=Number(zs));if(qs<0||this.length<qs||this.length<Xs)throw new RangeError("Out of range index");if(Xs<=qs)return this;qs=qs>>>0,Xs=Xs===void 0?this.length:Xs>>>0,zs||(zs=0);let da;if(typeof zs=="number")for(da=qs;da<Xs;++da)this[da]=zs;else{const xa=As.isBuffer(zs)?zs:As.from(zs,na),ka=xa.length;if(ka===0)throw new TypeError('The value "'+zs+'" is invalid for argument "value"');for(da=0;da<Xs-qs;++da)this[da+qs]=xa[da%ka]}return this};const Ma={};function Fa(Hs,zs,qs){Ma[Hs]=class extends qs{constructor(){super(),Object.defineProperty(this,"message",{value:zs.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Hs}]`,this.stack,delete this.name}get code(){return Hs}set code(na){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:na,writable:!0})}toString(){return`${this.name} [${Hs}]: ${this.message}`}}}Fa("ERR_BUFFER_OUT_OF_BOUNDS",function(Hs){return Hs?`${Hs} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Fa("ERR_INVALID_ARG_TYPE",function(Hs,zs){return`The "${Hs}" argument must be of type number. Received type ${typeof zs}`},TypeError),Fa("ERR_OUT_OF_RANGE",function(Hs,zs,qs){let Xs=`The value of "${Hs}" is out of range.`,na=qs;return Number.isInteger(qs)&&Math.abs(qs)>2**32?na=Ka(String(qs)):typeof qs=="bigint"&&(na=String(qs),(qs>BigInt(2)**BigInt(32)||qs<-(BigInt(2)**BigInt(32)))&&(na=Ka(na)),na+="n"),Xs+=` It must be ${zs}. Received ${na}`,Xs},RangeError);function Ka(Hs){let zs="",qs=Hs.length;const Xs=Hs[0]==="-"?1:0;for(;qs>=Xs+4;qs-=3)zs=`_${Hs.slice(qs-3,qs)}${zs}`;return`${Hs.slice(0,qs)}${zs}`}function mo(Hs,zs,qs){bo(zs,"offset"),(Hs[zs]===void 0||Hs[zs+qs]===void 0)&&oo(zs,Hs.length-(qs+1))}function ko(Hs,zs,qs,Xs,na,da){if(Hs>qs||Hs<zs){const xa=typeof zs=="bigint"?"n":"";let ka;throw zs===0||zs===BigInt(0)?ka=`>= 0${xa} and < 2${xa} ** ${(da+1)*8}${xa}`:ka=`>= -(2${xa} ** ${(da+1)*8-1}${xa}) and < 2 ** ${(da+1)*8-1}${xa}`,new Ma.ERR_OUT_OF_RANGE("value",ka,Hs)}mo(Xs,na,da)}function bo(Hs,zs){if(typeof Hs!="number")throw new Ma.ERR_INVALID_ARG_TYPE(zs,"number",Hs)}function oo(Hs,zs,qs){throw Math.floor(Hs)!==Hs?(bo(Hs,qs),new Ma.ERR_OUT_OF_RANGE("offset","an integer",Hs)):zs<0?new Ma.ERR_BUFFER_OUT_OF_BOUNDS:new Ma.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${zs}`,Hs)}const Va=/[^+/0-9A-Za-z-_]/g;function uo(Hs){if(Hs=Hs.split("=")[0],Hs=Hs.trim().replace(Va,""),Hs.length<2)return"";for(;Hs.length%4!==0;)Hs=Hs+"=";return Hs}function Eo(Hs,zs){zs=zs||1/0;let qs;const Xs=Hs.length;let na=null;const da=[];for(let xa=0;xa<Xs;++xa){if(qs=Hs.charCodeAt(xa),qs>55295&&qs<57344){if(!na){if(qs>56319){(zs-=3)>-1&&da.push(239,191,189);continue}else if(xa+1===Xs){(zs-=3)>-1&&da.push(239,191,189);continue}na=qs;continue}if(qs<56320){(zs-=3)>-1&&da.push(239,191,189),na=qs;continue}qs=(na-55296<<10|qs-56320)+65536}else na&&(zs-=3)>-1&&da.push(239,191,189);if(na=null,qs<128){if((zs-=1)<0)break;da.push(qs)}else if(qs<2048){if((zs-=2)<0)break;da.push(qs>>6|192,qs&63|128)}else if(qs<65536){if((zs-=3)<0)break;da.push(qs>>12|224,qs>>6&63|128,qs&63|128)}else if(qs<1114112){if((zs-=4)<0)break;da.push(qs>>18|240,qs>>12&63|128,qs>>6&63|128,qs&63|128)}else throw new Error("Invalid code point")}return da}function Ao(Hs){const zs=[];for(let qs=0;qs<Hs.length;++qs)zs.push(Hs.charCodeAt(qs)&255);return zs}function Zo(Hs,zs){let qs,Xs,na;const da=[];for(let xa=0;xa<Hs.length&&!((zs-=2)<0);++xa)qs=Hs.charCodeAt(xa),Xs=qs>>8,na=qs%256,da.push(na),da.push(Xs);return da}function sl(Hs){return dn.toByteArray(uo(Hs))}function Po(Hs,zs,qs,Xs){let na;for(na=0;na<Xs&&!(na+qs>=zs.length||na>=Hs.length);++na)zs[na+qs]=Hs[na];return na}function Ro(Hs,zs){return Hs instanceof zs||Hs!=null&&Hs.constructor!=null&&Hs.constructor.name!=null&&Hs.constructor.name===zs.name}function Vs(Hs){return Hs!==Hs}const la=(function(){const Hs="0123456789abcdef",zs=new Array(256);for(let qs=0;qs<16;++qs){const Xs=qs*16;for(let na=0;na<16;++na)zs[Xs+na]=Hs[qs]+Hs[na]}return zs})();function ga(Hs){return typeof BigInt>"u"?Na:Hs}function Na(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer,Buffer$1=buffer$1.Buffer,streamCollector=async ds=>isBlob(ds)?collectBlob(ds):collectReadableStream(ds);async function collectBlob(ds){return ds.arrayBuffer().then(dn=>new Uint8Array(dn))}async function collectReadableStream(ds){const dn=[],ms=ds.getReader();let xs=0;for(;;){const{done:bs,value:Es}=await ms.read();if(Es&&(dn.push(Es),xs+=Es.length),bs)break}return concatBytes(dn,xs)}const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED="The stream has already been transformed.",sdkStreamMixin=ds=>{if(!isBlobInstance(ds)&&!isReadableStream$2(ds)){const bs=ds?.__proto__?.constructor?.name||ds;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${bs}`)}let dn=!1;const ms=async()=>
16{if(dn)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);return dn=!0,await streamCollector(ds)},xs=bs=>{if(typeof bs.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
17If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return bs.stream()};return Object.assign(ds,{transformToByteArray:ms,transformToString:async bs=>{const Es=await ms();if(bs==="base64")return toBase64(Es);if(bs==="hex")return toHex(Es);if(bs===void 0||bs==="utf8"||bs==="utf-8")return toUtf8(Es);if(typeof TextDecoder=="function")return new TextDecoder(bs).decode(Es);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(dn)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);if(dn=!0,isBlobInstance(ds))return xs(ds);if(isReadableStream$2(ds))return ds;throw new Error(`Cannot transform payload to web stream, got ${ds}`)}})},isBlobInstance=ds=>typeof Blob=="function"&&ds instanceof Blob;class Uint8ArrayBlobAdapter extends bindUint8ArrayBlobAdapter(toUtf8,fromUtf8,toBase64,fromBase64){}const _getRandomValues=ds=>crypto.getRandomValues(ds),v4=bindV4(_getRandomValues),generateIdempotencyToken=v4,collectBody=async(ds=new Uint8Array,dn)=>{if(ds instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(ds);if(!ds)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);const ms=dn.streamCollector(ds);return Uint8ArrayBlobAdapter.mutate(await ms)};function extendedEncodeURIComponent(ds){return encodeURIComponent(ds).replace(/[!'()*]/g,function(dn){return"%"+dn.charCodeAt(0).toString(16).toUpperCase()})}const scriptRel="modulepreload",assetsURL=function(ds){return"/"+ds},seen$1={},__vitePreload=function(dn,ms,xs){let bs=Promise.resolve();if(ms&&ms.length>0){let js=function(Cs){return Promise.all(Cs.map(As=>Promise.resolve(As).then(ks=>({status:"fulfilled",value:ks}),ks=>({status:"rejected",reason:ks}))))};document.getElementsByTagName("link");const ws=document.querySelector("meta[property=csp-nonce]"),Rs=ws?.nonce||ws?.getAttribute("nonce");bs=js(ms.map(Cs=>{if(Cs=assetsURL(Cs),Cs in seen$1)return;seen$1[Cs]=!0;const As=Cs.endsWith(".css"),ks=As?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${Cs}"]${ks}`))return;const Os=document.createElement("link");if(Os.rel=As?"stylesheet":scriptRel,As||(Os.as="script"),Os.crossOrigin="",Os.href=Cs,Rs&&Os.setAttribute("nonce",Rs),document.head.appendChild(Os),As)return new Promise((Ms,Ds)=>{Os.addEventListener("load",Ms),Os.addEventListener("error",()=>Ds(new Error(`Unable to preload CSS for ${Cs}`)))})}))}function Es(ws){const Rs=new Event("vite:preloadError",{cancelable:!0});if(Rs.payload=ws,window.dispatchEvent(Rs),!Rs.defaultPrevented)throw ws}return bs.then(ws=>{for(const Rs of ws||[])Rs.status==="rejected"&&Es(Rs.reason);return dn().catch(Es)})};class SerdeContext{serdeContext;setSerdeContext(dn){this.serdeContext=dn}}class HttpProtocol extends SerdeContext{options;compositeErrorRegistry;constructor(dn){super(),this.options=dn,this.compositeErrorRegistry=new TypeRegistry(dn.defaultNamespace);for(const ms of dn.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(ms)}getRequestType(){return HttpRequest}getResponseType(){return HttpResponse}setSerdeContext(dn){this.serdeContext=dn,this.serializer.setSerdeContext(dn),this.deserializer.setSerdeContext(dn),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(dn)}updateServiceEndpoint(dn,ms){if("url"in ms){dn.protocol=ms.url.protocol,dn.hostname=ms.url.hostname,dn.port=ms.url.port?Number(ms.url.port):void 0,dn.path=ms.url.pathname,dn.fragment=ms.url.hash||void 0,dn.username=ms.url.username||void 0,dn.password=ms.url.password||void 0,dn.query||(dn.query={});for(const[xs,bs]of ms.url.searchParams.entries())dn.query[xs]=bs;if(ms.headers)for(const xs in ms.headers)hasOwn(ms.headers,xs)&&(dn.headers[xs]=ms.headers[xs].join(", "));return dn}else{if(dn.protocol=ms.protocol,dn.hostname=ms.hostname,dn.port=ms.port?Number(ms.port):void 0,dn.path=ms.path,dn.query={...ms.query},ms.headers)for(const xs in ms.headers)hasOwn(ms.headers,xs)&&(dn.headers[xs
17]=ms.headers[xs]);return dn}}setHostPrefix(dn,ms,xs){if(this.serdeContext?.disableHostPrefix)return;const bs=NormalizedSchema.of(ms.input),Es=translateTraits(ms.traits??{});if(Es.endpoint){let ws=Es.endpoint?.[0];if(typeof ws=="string"){for(const[Rs,js]of bs.structIterator()){if(!js.getMergedTraits().hostLabel)continue;const Cs=xs[Rs];if(typeof Cs!="string")throw new Error(`@smithy/core/schema - ${Rs} in input must be a string as hostLabel.`);ws=ws.replace(`{${Rs}}`,Cs)}if(dn.hostname=ws+dn.hostname,!isValidHostname(dn.hostname))throw new Error(`[${dn.hostname}] is not a valid hostname.`)}}}deserializeMetadata(dn){return{httpStatusCode:dn.statusCode,requestId:dn.headers["x-amzn-requestid"]??dn.headers["x-amzn-request-id"]??dn.headers["x-amz-request-id"],extendedRequestId:dn.headers["x-amz-id-2"],cfId:dn.headers["x-amz-cf-id"]}}resolveError(dn,ms,xs){const bs=[-3,"","Error",0,[],[],0];let Es;for(const ws of xs)for(const Rs of ms)try{Rs==="*"?Es=ws.getSchema(dn):Es=ws.getSchema(Rs+"#"+dn);const js=ws.getErrorCtor(Es);if(js)return[Es,js,"modeled"];{const Cs=ws.getBaseException();if(Cs){const As=ws.getErrorCtor(Cs);if(As)return[Es,As,"synthetic"]}}}catch{}for(const ws of xs){const Rs=ws.getBaseException();if(Rs){const js=ws.getErrorCtor(Rs);if(js)return[Rs,js,"synthetic"]}}return[bs,Error,"native"]}async serializeEventStream({eventStream:dn,requestSchema:ms,initialRequest:xs}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:dn,requestSchema:ms,initialRequest:xs})}async deserializeEventStream({response:dn,responseSchema:ms,initialResponseContainer:xs}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:dn,responseSchema:ms,initialResponseContainer:xs})}async loadEventStreamCapability(){const{EventStreamSerde:dn,eventStreamSerdeProvider:ms}=await __vitePreload(async()=>{const{EventStreamSerde:bs,eventStreamSerdeProvider:Es}=await import("./index.browser-DLUY02oA.js");return{EventStreamSerde:bs,eventStreamSerdeProvider:Es}},__vite__mapDeps([0,1,2,3])),xs=this.resolveEventStreamMarshaller(ms);return new dn({marshaller:xs,serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType(),compositeErrorRegistry:this.compositeErrorRegistry})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(dn,ms,xs,bs,Es){return[]}getEventStreamMarshaller(){const dn=this.serdeContext;if(!dn.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return dn.eventStreamMarshaller}resolveEventStreamMarshaller(dn){const ms=this.serdeContext;return ms.eventStreamMarshaller?ms.eventStreamMarshaller:dn(this.serdeContext)}}class HttpBindingProtocol extends HttpProtocol{async serializeRequest(dn,ms,xs){const bs=ms&&typeof ms=="object"?ms:{},Es=this.serializer,ws={},Rs={},js=await xs.endpoint(),Cs=NormalizedSchema.of(dn?.input),As=[],ks=[];let Os=!1,Ms;const Ds=new HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:ws,headers:Rs,body:void 0});if(js){this.updateServiceEndpoint(Ds,js),this.setHostPrefix(Ds,dn,bs);const Ps=translateTraits(dn.traits);if(Ps.http){Ds.method=Ps.http[0];const[Ls,Bs]=Ps.http[1].split("?");Ds.path=="/"?Ds.path=Ls:Ds.path+=Ls;const Fs=new URLSearchParams(Bs??"");for(const[Us,Gs]of Fs)ws[Us]=Gs}}for(const[Ps,Ls]of Cs.structIterator()){const Bs=Ls.getMergedTraits()??{},Fs=bs[Ps];if(Fs==null&&!Ls.isIdempotencyToken()){if(Bs.httpLabel&&(Ds.path.includes(`{${Ps}+}`)||Ds.path.includes(`{${Ps}}`)))throw new Error(`No value provided for input HTTP label: ${Ps}.`);continue}if(Bs.httpPayload)Ls.isStreaming()?Ls.isStructSchema()?bs[Ps]&&(Ms=await this.serializeEventStream({eventStream:bs[Ps],requestSchema:Cs})):Ms=Fs:(Es.write(Ls,Fs),Ms=Es.flush());else if(Bs.httpLabel){Es.write(Ls,Fs);const Us=Es.flush();Ds.path.includes(`{${Ps}+}`)?Ds.path=Ds.path.replace(`{${Ps}+}`,Us.split("/").map(extendedEncodeURIComponent).join("/")):Ds.path.includes(`{${Ps}}`)&&(Ds.path=Ds.path.replace(`{${Ps}}`,extendedEncodeURIComponent(Us)))}else if(Bs.httpHeader)Es.write(Ls,Fs),Rs[Bs.httpHeader.toLowerCase()]=String(Es.flush());else if(typeof Bs.httpPrefixHeaders=="string")for(const Us in Fs){if(!
17hasOwn(Fs,Us))continue;const Gs=Fs[Us],Js=Bs.httpPrefixHeaders+Us;Es.write([Ls.getValueSchema(),{httpHeader:Js}],Gs),Rs[Js.toLowerCase()]=Es.flush()}else Bs.httpQuery||Bs.httpQueryParams?this.serializeQuery(Ls,Fs,ws):(Os=!0,As.push(Ps),ks.push(Ls))}if(Os&&bs){const[Ps,Ls]=(Cs.getName(!0)??"#Unknown").split("#"),Bs=Cs.getSchema()[6],Fs=[3,Ps,Ls,Cs.getMergedTraits(),As,ks,void 0];Bs?Fs[6]=Bs:Fs.pop(),Es.write(Fs,bs),Ms=Es.flush()}return Ds.headers=Rs,Ds.query=ws,Ds.body=Ms,Ds}serializeQuery(dn,ms,xs){const bs=this.serializer,Es=dn.getMergedTraits();if(Es.httpQueryParams){for(const ws in ms)if(hasOwn(ms,ws)&&!(ws in xs)){const Rs=ms[ws],js=dn.getValueSchema();Object.assign(js.getMergedTraits(),{...Es,httpQuery:ws,httpQueryParams:void 0}),this.serializeQuery(js,Rs,xs)}return}if(dn.isListSchema()){const ws=!!dn.getMergedTraits().sparse,Rs=[];for(const js of ms){bs.write([dn.getValueSchema(),Es],js);const Cs=bs.flush();(ws||Cs!==void 0)&&Rs.push(Cs)}xs[Es.httpQuery]=Rs}else bs.write([dn,Es],ms),xs[Es.httpQuery]=bs.flush()}async deserializeResponse(dn,ms,xs){const bs=this.deserializer,Es=NormalizedSchema.of(dn.output),ws={};if(xs.statusCode>=300){const js=await collectBody(xs.body,ms);throw js.byteLength>0&&Object.assign(ws,await bs.read(15,js)),await this.handleError(dn,ms,xs,ws,this.deserializeMetadata(xs)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const js in xs.headers){if(!hasOwn(xs.headers,js))continue;const Cs=xs.headers[js];delete xs.headers[js],xs.headers[js.toLowerCase()]=Cs}const Rs=await this.deserializeHttpMessage(Es,ms,xs,ws);if(Rs.length){const js=await collectBody(xs.body,ms);if(js.byteLength>0){const Cs=await bs.read(Es,js);for(const As of Rs)Cs[As]!=null&&(ws[As]=Cs[As])}}else Rs.discardResponseBody&&await collectBody(xs.body,ms);return ws.$metadata=this.deserializeMetadata(xs),ws}async deserializeHttpMessage(dn,ms,xs,bs,Es){let ws;bs instanceof Set?ws=Es:ws=bs;let Rs=!0;const js=this.deserializer,Cs=NormalizedSchema.of(dn),As=[];for(const[ks,Os]of Cs.structIterator()){const Ms=Os.getMemberTraits();if(Ms.httpPayload){if(Rs=!1,Os.isStreaming())Os.isStructSchema()?ws[ks]=await this.deserializeEventStream({response:xs,responseSchema:Cs}):ws[ks]=sdkStreamMixin(xs.body);else if(xs.body){const Ps=await collectBody(xs.body,ms);Ps.byteLength>0&&(ws[ks]=await js.read(Os,Ps))}}else if(Ms.httpHeader){const Ds=String(Ms.httpHeader).toLowerCase(),Ps=xs.headers[Ds];if(Ps!=null)if(Os.isListSchema()){const Ls=Os.getValueSchema();Ls.getMergedTraits().httpHeader=Ds;let Bs;Ls.isTimestampSchema()&&Ls.getSchema()===4?Bs=splitEvery(Ps,",",2):Bs=splitHeader(Ps);const Fs=[];for(const Us of Bs)Fs.push(await js.read(Ls,Us.trim()));ws[ks]=Fs}else ws[ks]=await js.read(Os,Ps)}else if(Ms.httpPrefixHeaders!==void 0){ws[ks]={};for(const Ds in xs.headers)if(hasOwn(xs.headers,Ds)&&Ds.startsWith(Ms.httpPrefixHeaders)){const Ps=xs.headers[Ds],Ls=Os.getValueSchema();Ls.getMergedTraits().httpHeader=Ds,ws[ks][Ds.slice(Ms.httpPrefixHeaders.length)]=await js.read(Ls,Ps)}}else Ms.httpResponseCode?ws[ks]=xs.statusCode:As.push(ks)}return As.discardResponseBody=Rs,As}}function determineTimestampFormat(ds,dn){if(dn.timestampFormat.useTrait&&ds.isTimestampSchema()&&(ds.getSchema()===5||ds.getSchema()===6||ds.getSchema()===7))return ds.getSchema();const{httpLabel:ms,httpPrefixHeaders:xs,httpHeader:bs,httpQuery:Es}=ds.getMergedTraits();return(dn.httpBindings?typeof xs=="string"||bs?6:Es||ms?5:void 0:void 0)??dn.timestampFormat.default}class FromStringShapeDeserializer extends SerdeContext{settings;constructor(dn){super(),this.settings=dn}read(dn,ms){const xs=NormalizedSchema.of(dn);if(xs.isListSchema())return splitHeader(ms).map(bs=>this.read(xs.getValueSchema(),bs));if(xs.isBlobSchema())return(this.serdeContext?.base64Decoder??fromBase64)(ms);if(xs.isTimestampSchema())switch(determineTimestampFormat(xs,this.settings)){case 5:return _parseRfc3339DateTimeWithOffset(ms);case 6:return _parseRfc7231DateTime(ms);case 7:return _parseEpochTimestamp(ms);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",ms),new Date(ms)}if(xs.isStringSchema()){const bs=xs.getMergedTraits().mediaType;let Es=ms;if(bs)return xs.getMergedTraits().httpHeader&&(Es=this.base64ToUtf8(Es)),(bs==="application/json"||bs.endsWith("+json"))&&(Es=LazyJsonString.from(Es)),Es}
17return xs.isNumericSchema()?Number(ms):xs.isBigIntegerSchema()?BigInt(ms):xs.isBigDecimalSchema()?new NumericValue(ms,"bigDecimal"):xs.isBooleanSchema()?String(ms).toLowerCase()==="true":ms}base64ToUtf8(dn){return(this.serdeContext?.utf8Encoder??toUtf8)((this.serdeContext?.base64Decoder??fromBase64)(dn))}}class HttpInterceptingShapeDeserializer extends SerdeContext{codecDeserializer;stringDeserializer;constructor(dn,ms){super(),this.codecDeserializer=dn,this.stringDeserializer=new FromStringShapeDeserializer(ms)}setSerdeContext(dn){this.stringDeserializer.setSerdeContext(dn),this.codecDeserializer.setSerdeContext(dn),this.serdeContext=dn}read(dn,ms){const xs=NormalizedSchema.of(dn),bs=xs.getMergedTraits(),Es=this.serdeContext?.utf8Encoder??toUtf8;if(bs.httpHeader||bs.httpResponseCode)return this.stringDeserializer.read(xs,Es(ms));if(bs.httpPayload){if(xs.isBlobSchema()){const ws=this.serdeContext?.utf8Decoder??fromUtf8;return typeof ms=="string"?ws(ms):ms}else if(xs.isStringSchema())return"byteLength"in ms?Es(ms):ms}return this.codecDeserializer.read(xs,ms)}}class ToStringShapeSerializer extends SerdeContext{settings;stringBuffer="";constructor(dn){super(),this.settings=dn}write(dn,ms){const xs=NormalizedSchema.of(dn);switch(typeof ms){case"object":if(ms===null){this.stringBuffer="null";return}if(xs.isTimestampSchema()){if(!(ms instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${ms} when schema expected Date in ${xs.getName(!0)}`);switch(determineTimestampFormat(xs,this.settings)){case 5:this.stringBuffer=ms.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=dateToUtcString(ms);break;case 7:this.stringBuffer=String(ms.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",ms),this.stringBuffer=String(ms.getTime()/1e3)}return}if(xs.isBlobSchema()&&"byteLength"in ms){this.stringBuffer=(this.serdeContext?.base64Encoder??toBase64)(ms);return}if(xs.isListSchema()&&Array.isArray(ms)){let ws="";for(const Rs of ms){this.write([xs.getValueSchema(),xs.getMergedTraits()],Rs);const js=this.flush(),Cs=xs.getValueSchema().isTimestampSchema()?js:quoteHeader(js);ws!==""&&(ws+=", "),ws+=Cs}this.stringBuffer=ws;return}this.stringBuffer=JSON.stringify(ms,null,2);break;case"string":const bs=xs.getMergedTraits().mediaType;let Es=ms;if(bs&&((bs==="application/json"||bs.endsWith("+json"))&&(Es=LazyJsonString.from(Es)),xs.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??toBase64)(Es.toString());return}this.stringBuffer=ms;break;default:xs.isIdempotencyToken()?this.stringBuffer=generateIdempotencyToken():this.stringBuffer=String(ms)}}flush(){const dn=this.stringBuffer;return this.stringBuffer="",dn}}class HttpInterceptingShapeSerializer{codecSerializer;stringSerializer;buffer;
17constructor(dn,ms,xs=new ToStringShapeSerializer(ms)){this.codecSerializer=dn,this.stringSerializer=xs}setSerdeContext(dn){this.codecSerializer.setSerdeContext(dn),this.stringSerializer.setSerdeContext(dn)}write(dn,ms){const xs=NormalizedSchema.of(dn),bs=xs.getMergedTraits();if(bs.httpHeader||bs.httpLabel||bs.httpQuery){this.stringSerializer.write(xs,ms),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(xs,ms)}flush(){if(this.buffer!==void 0){const dn=this.buffer;return this.buffer=void 0,dn}return this.codecSerializer.flush()}}const getHttpHandlerExtensionConfiguration=ds=>(ds.logger&&ds.logger.constructor?.name!=="NoOpLogger"&&ds.requestHandler?.updateHttpClientConfig?.(Symbol.for("logger"),ds.logger),{setHttpHandler(dn){ds.requestHandler=dn},httpHandler(){return ds.requestHandler},updateHttpClientConfig(dn,ms){ds.requestHandler?.updateHttpClientConfig(dn,ms)},httpHandlerConfigs(){return ds.requestHandler.httpHandlerConfigs()}}),resolveHttpHandlerRuntimeConfig=ds=>({requestHandler:ds.httpHandler()}),CONTENT_LENGTH_HEADER="content-length";function contentLengthMiddleware(ds){return dn=>async ms=>{const xs=ms.request;if(HttpRequest.isInstance(xs)){const{body:bs,headers:Es}=xs;if(bs&&Object.keys(Es).map(ws=>ws.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER)===-1)try{const ws=ds(bs);ws!=null&&(xs.headers={...xs.headers,[CONTENT_LENGTH_HEADER]:String(ws)})}catch{}}return dn({...ms,request:xs})}}const contentLengthMiddlewareOptions={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},getContentLengthPlugin=ds=>({applyToStack:dn=>{dn.add(contentLengthMiddleware(ds.bodyLengthChecker),contentLengthMiddlewareOptions)}}),escapeUri=ds=>encodeURIComponent(ds).replace(/[!'()*]/g,hexEncode),hexEncode=ds=>`%${ds.charCodeAt(0).toString(16).toUpperCase()}`;function buildQueryString(ds){const dn=[];for(let ms of Object.keys(ds).sort()){const xs=ds[ms];if(ms=escapeUri(ms),Array.isArray(xs))for(let bs=0,Es=xs.length;bs<Es;bs++)dn.push(`${ms}=${escapeUri(xs[bs])}`);else{let bs=ms;(xs||typeof xs=="string")&&(bs+=`=${escapeUri(xs)}`),dn.push(bs)}}return dn.join("&")}const THROTTLING_ERROR_CODES=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],TRANSIENT_ERROR_CODES=["TimeoutError","RequestTimeout","RequestTimeoutException"],TRANSIENT_ERROR_STATUS_CODES=[500,502,503,504],NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],NODEJS_NETWORK_ERROR_CODES=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND","EAI_AGAIN"],isRetryableByTrait=ds=>ds?.$retryable!==void 0,isClockSkewCorrectedError=ds=>ds.$metadata?.clockSkewCorrected,isBrowserNetworkError=ds=>{const dn=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return ds&&ds instanceof TypeError?dn.has(ds.message):!1},isThrottlingError=ds=>ds.$metadata?.httpStatusCode===429||THROTTLING_ERROR_CODES.includes(ds.name)||ds.$retryable?.throttling==!0,isTransientError=(ds,dn=0)=>ds?.name!=="AbortError"&&(isRetryableByTrait(ds)||isClockSkewCorrectedError(ds)||ds.name==="InvalidSignatureException"&&ds.message?.includes("Signature expired")||TRANSIENT_ERROR_CODES.includes(ds.name)||NODEJS_TIMEOUT_ERROR_CODES.includes(ds?.code||"")||NODEJS_NETWORK_ERROR_CODES.includes(ds?.code||"")||TRANSIENT_ERROR_STATUS_CODES.includes(ds.$metadata?.httpStatusCode||0)||isBrowserNetworkError(ds)||isNodeJsHttp2TransientError(ds)||ds.cause!==void 0&&dn<=10&&isTransientError(ds.cause,dn+1)),isServerError=ds=>{if(ds.$metadata?.httpStatusCode!==void 0){const dn=ds.$metadata.httpStatusCode;return 500<=dn&&dn<=599&&!isTransientError(ds)}return!1};function isNodeJsHttp2TransientError(ds){return ds.code==="ERR_HTTP2_STREAM_ERROR"&&ds.message.includes("NGHTTP2_REFUSED_STREAM")}const MAXIMUM_RETRY_DELAY=20*1e3,INITIAL_RETRY_TOKENS=500,NO_RETRY_INCREMENT=1,INVOCATION_ID_HEADER="amz-sdk-invocation-id",REQUEST_HEADER="amz-sdk-request";function parseRetryAfterHeader(ds,dn){if(HttpResponse.isInstance(ds))for(const ms in ds.headers){if(!hasOwn(ds.headers,ms))continue;const xs=ms.toLowerCase();if(xs==="retry-after"){const bs=ds.headers[ms];let Es=NaN;if(bs.endsWith("GMT"))try{Es=(parseRfc7231DateTime(bs).getTime()-Date.now())/1e3}catch(ws){dn?.trace?.("Failed to parse retry-after header"),dn?.trace?.(ws)}else bs.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?Es=Number(bs.match(/ GMT, ([\d.]+)$/)?.[1]):bs.match(/^((\d+)|(\d+\.\d+))$/)?Es=Number(bs):Date.parse(bs)>=Date.now()&&(Es=(Date.parse(bs)-Date.now())/1e3);return isNaN(Es)?void 0:new Date(Date.now()+Es*1e3)}else if(xs==="x-amz-retry-after"){const bs=ds.headers[ms],Es=Number(bs);if(isNaN(Es)){dn?.trace?.(`Failed to parse x-amz-retry-after=${bs}`);return}return new Date(Date.now()+Es)}}}const asSdkError=ds=>ds instanceof Error?ds:ds instanceof Object?Object.assign(new Error,ds):typeof ds=="string"?new Error(ds):new Error(`AWS SDK error wrapper for ${ds}`);function bindRetryMiddleware(ds){return dn=>(ms,xs)=>async bs=>{let Es=await dn.retryStrategy();const ws=await dn.maxAttempts();if(isRetryStrategyV2(Es)){Es=Es;let Rs=await Es.acquireInitialRetryToken((xs.partition_id??"")+(xs.__retryLongPoll?":longpoll":"")),js=new Error,Cs=0,As=0;const{request:ks}=bs,Os=HttpRequest.isInstance(ks);for(Os&&(ks.headers[INVOCATION_ID_HEADER]=v4());;)try{Os&&(ks.headers[REQUEST_HEADER]=`attempt=${Cs+1}; max=${ws}`);const{response:Ms,output:Ds}=await ms(bs);return Es.recordSuccess(Rs),Ds.$metadata.attempts=Cs+1,Ds.$metadata.totalRetryDelay=As,{response:Ms,output:Ds}}catch(Ms){const Ds=getRetryErrorInfo(Ms,dn.logger);
17if(js=asSdkError(Ms),Os&&ds(ks))throw(xs.logger instanceof NoOpLogger?console:xs.logger)?.warn("An error was encountered in a non-retryable streaming request."),js;try{Rs=await Es.refreshRetryTokenForRetry(Rs,Ds)}catch{throw js.$metadata||(js.$metadata={}),js.$metadata.attempts=Cs+1,js.$metadata.totalRetryDelay=As,js}Cs=Rs.getRetryCount();const Ps=Rs.getRetryDelay();As+=(Rs?.$retryLog?.acquisitionDelay??0)+Ps,Ps>0&&await cooldown(Ps)}}else return Es=Es,Es?.mode&&(xs.userAgent=[...xs.userAgent||[],["cfg/retry-mode",Es.mode]]),Es.retry(ms,bs)}}const cooldown=ds=>new Promise(dn=>setTimeout(dn,ds)),isRetryStrategyV2=ds=>typeof ds.acquireInitialRetryToken<"u"&&typeof ds.refreshRetryTokenForRetry<"u"&&typeof ds.recordSuccess<"u",getRetryErrorInfo=(ds,dn)=>{const ms={error:ds,errorType:getRetryErrorType(ds)},xs=parseRetryAfterHeader(ds.$response,dn);return xs&&(ms.retryAfterHint=xs),ms},getRetryErrorType=ds=>isThrottlingError(ds)?"THROTTLING":isTransientError(ds)?"TRANSIENT":isServerError(ds)?"SERVER_ERROR":"CLIENT_ERROR",retryMiddlewareOptions={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function bindGetRetryPlugin(ds){const dn=bindRetryMiddleware(ds);return ms=>({applyToStack:xs=>{xs.add(dn(ms),retryMiddlewareOptions)}})}class DefaultRateLimiter{static setTimeoutFn=(dn,ms)=>setTimeout(dn,ms);beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(dn){this.beta=dn?.beta??.7,this.minCapacity=dn?.minCapacity??1,this.minFillRate=dn?.minFillRate??.5,this.scaleConstant=dn?.scaleConstant??.4,this.smooth=dn?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(dn){let ms;this.updateMeasuredRate();const xs=dn;if(xs?.errorType==="THROTTLING"||isThrottlingError(xs?.error??dn)){const ws=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=ws,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),ms=this.cubicThrottle(ws),this.enableTokenBucket()}else this.calculateTimeWindow(),ms=this.cubicSuccess(this.getCurrentTimeInSeconds());const Es=Math.min(ms,2*this.measuredTxRate);this.updateTokenBucketRate(Es)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(dn){if(this.enabled){for(this.refillTokenBucket();dn>this.availableTokens;){const ms=(dn-this.availableTokens)/this.fillRate*1e3;await new Promise(xs=>DefaultRateLimiter.setTimeoutFn(xs,ms)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-dn}}refillTokenBucket(){const dn=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=dn;return}const ms=(dn-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+ms),this.lastTimestamp=dn}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}
17cubicThrottle(dn){return this.getPrecise(dn*this.beta)}cubicSuccess(dn){return this.getPrecise(this.scaleConstant*Math.pow(dn-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(dn){this.refillTokenBucket(),this.fillRate=Math.max(dn,this.minFillRate),this.maxCapacity=Math.max(dn,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const dn=this.getCurrentTimeInSeconds(),ms=Math.floor(dn*2)/2;if(this.requestCount++,ms>this.lastTxRateBucket){const xs=this.requestCount/(ms-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(xs*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=ms}}getPrecise(dn){return parseFloat(dn.toFixed(8))}}var define_process_env_default$1={};class Retry{static v2026=typeof process$1<"u"&&define_process_env_default$1?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Retry.v2026?50:100}static throttlingDelay(){return Retry.v2026?1e3:500}static cost(){return Retry.v2026?14:5}static throttlingCost(){return Retry.v2026?5:10}static modifiedCostType(){return Retry.v2026?"THROTTLING":"TRANSIENT"}}class DefaultRetryBackoffStrategy{x=Retry.delay();computeNextBackoffDelay(dn){const bs=Math.random()*Math.min(this.x*2**dn,MAXIMUM_RETRY_DELAY);return Math.floor(bs)}setDelayBase(dn){this.x=dn}}class DefaultRetryToken{delay;count;cost;longPoll;$retryLog={acquisitionDelay:0};constructor(dn,ms,xs,bs){this.delay=dn,this.count=ms,this.cost=xs,this.longPoll=bs}getRetryCount(){return this.count}getRetryDelay(){return Math.min(MAXIMUM_RETRY_DELAY,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var RETRY_MODES;(function(ds){ds.STANDARD="standard",ds.ADAPTIVE="adaptive"})(RETRY_MODES||(RETRY_MODES={}));const DEFAULT_MAX_ATTEMPTS=3,DEFAULT_RETRY_MODE=RETRY_MODES.STANDARD,refusal={incompatible:1,attempts:2,capacity:3};class StandardRetryStrategy{mode=RETRY_MODES.STANDARD;retryBackoffStrategy;capacity=INITIAL_RETRY_TOKENS;maxAttemptsProvider;baseDelay;constructor(dn){typeof dn=="number"?this.maxAttemptsProvider=async()=>dn:typeof dn=="function"?this.maxAttemptsProvider=dn:dn&&typeof dn=="object"&&(this.maxAttemptsProvider=async()=>dn.maxAttempts,this.baseDelay=dn.baseDelay,this.retryBackoffStrategy=dn.backoff),this.maxAttemptsProvider??=async()=>DEFAULT_MAX_ATTEMPTS,this.baseDelay??=Retry.delay(),this.retryBackoffStrategy??=new DefaultRetryBackoffStrategy}async acquireInitialRetryToken(dn){return new DefaultRetryToken(Retry.delay(),0,void 0,Retry.v2026&&dn.includes(":longpoll"))}async refreshRetryTokenForRetry(dn,ms){const xs=await this.getMaxAttempts(),bs=this.retryCode(dn,ms,xs),Es=bs===0,ws=dn.isLongPoll?.();if(Es||ws){const Rs=ms.errorType;this.retryBackoffStrategy.setDelayBase(Rs==="THROTTLING"?Retry.throttlingDelay():this.baseDelay);const js=this.retryBackoffStrategy.computeNextBackoffDelay(dn.getRetryCount());let Cs=js;if(ms.retryAfterHint instanceof Date&&(Cs=Math.max(js,Math.min(ms.retryAfterHint.getTime()-Date.now(),js+5e3))),Es){const As=this.getCapacityCost(Rs);this.capacity-=As;const ks=new DefaultRetryToken(0,dn.getRetryCount()+1,As,dn.isLongPoll?.()??!1);return await new Promise(Os=>setTimeout(Os,Cs)),ks.$retryLog.acquisitionDelay=Cs,ks}else{const As=Retry.v2026&&bs===refusal.capacity&&ws?Cs:0;As>0&&await new Promise(ks=>setTimeout(ks,As))}}throw new Error("No retry token available")}recordSuccess(dn){this.capacity=Math.min(INITIAL_RETRY_TOKENS,this.capacity+(dn.getRetryCost()??NO_RETRY_INCREMENT))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`),DEFAULT_MAX_ATTEMPTS}}retryCode(dn,ms,xs){const bs=dn.getRetryCount()+1,Es=this.isRetryableError(ms.errorType)?0:refusal.incompatible,ws=bs<xs?0:refusal.attempts,Rs=this.capacity>=this.getCapacityCost(ms.errorType)?0:refusal.capacity;return Es||ws||Rs}getCapacityCost(dn){return dn===Retry.modifiedCostType()?Retry.throttlingCost():Retry.cost()}
17isRetryableError(dn){return dn==="THROTTLING"||dn==="TRANSIENT"}}class AdaptiveRetryStrategy{mode=RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(dn,ms){const{rateLimiter:xs}=ms??{};this.rateLimiter=xs??new DefaultRateLimiter,this.standardRetryStrategy=ms?new StandardRetryStrategy({maxAttempts:typeof dn=="number"?dn:3,...ms}):new StandardRetryStrategy(dn)}async acquireInitialRetryToken(dn){const ms=await this.standardRetryStrategy.acquireInitialRetryToken(dn);return await this.rateLimiter.getSendToken(),ms}async refreshRetryTokenForRetry(dn,ms){this.rateLimiter.updateClientSendingRate(ms);const xs=await this.standardRetryStrategy.refreshRetryTokenForRetry(dn,ms);return await this.rateLimiter.getSendToken(),xs}recordSuccess(dn){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(dn)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}const resolveRetryConfig=(ds,dn)=>{const{retryStrategy:ms,retryMode:xs}=ds,{defaultMaxAttempts:bs=DEFAULT_MAX_ATTEMPTS,defaultBaseDelay:Es=Retry.delay()}={},ws=normalizeProvider$1(ds.maxAttempts??bs);let Rs=ms?Promise.resolve(ms):void 0;const js=async()=>{const Cs=await ws();return await normalizeProvider$1(xs)()===RETRY_MODES.ADAPTIVE?new AdaptiveRetryStrategy(ws,{maxAttempts:Cs,baseDelay:Es}):new StandardRetryStrategy({maxAttempts:Cs,baseDelay:Es})};return Object.assign(ds,{maxAttempts:ws,retryStrategy:()=>Rs??=js()})},getRetryPlugin=bindGetRetryPlugin(isStreamingPayload);var define_process_env_default={};Retry.v2026||=typeof process$1=="object"&&define_process_env_default?.AWS_NEW_RETRIES_2026==="true";function setFeature(ds,dn,ms){ds.__aws_sdk_context?ds.__aws_sdk_context.features||(ds.__aws_sdk_context.features={}):ds.__aws_sdk_context={features:{}},ds.__aws_sdk_context.features[dn]=ms}function resolveHostHeaderConfig(ds){return ds}const hostHeaderMiddleware=ds=>dn=>async ms=>
vendor: 4,457 bytes, lines 17-18
17{if(!HttpRequest.isInstance(ms.request))return dn(ms);const{request:xs}=ms,{handlerProtocol:bs=""}=ds.requestHandler.metadata||{};if(bs.indexOf("h2")>=0&&!xs.headers[":authority"])delete xs.headers.host,xs.headers[":authority"]=xs.hostname+(xs.port?":"+xs.port:"");else if(!xs.headers.host){let Es=xs.hostname;xs.port!=null&&(Es+=`:${xs.port}`),xs.headers.host=Es}return dn(ms)},hostHeaderMiddlewareOptions={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=ds=>({applyToStack:dn=>{dn.add(hostHeaderMiddleware(ds),hostHeaderMiddlewareOptions)}}),loggerMiddleware=()=>(ds,dn)=>async ms=>{try{const xs=await ds(ms),{clientName:bs,commandName:Es,logger:ws,dynamoDbDocumentClientOptions:Rs={}}=dn,{overrideInputFilterSensitiveLog:js,overrideOutputFilterSensitiveLog:Cs}=Rs,As=js??dn.inputFilterSensitiveLog,ks=Cs??dn.outputFilterSensitiveLog,{$metadata:Os,...Ms}=xs.output;return ws?.info?.({clientName:bs,commandName:Es,input:As(ms.input),output:ks(Ms),metadata:Os}),xs}catch(xs){const{clientName:bs,commandName:Es,logger:ws,dynamoDbDocumentClientOptions:Rs={}}=dn,{overrideInputFilterSensitiveLog:js}=Rs,Cs=js??dn.inputFilterSensitiveLog;throw ws?.error?.({clientName:bs,commandName:Es,input:Cs(ms.input),error:xs,metadata:xs.$metadata}),xs}},loggerMiddlewareOptions={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=ds=>({applyToStack:dn=>{dn.add(loggerMiddleware(),loggerMiddlewareOptions)}}),getRecursionDetectionPlugin=ds=>({applyToStack:dn=>{}}),resolveAuthOptions=(ds,dn)=>{if(!dn||dn.length===0)return ds;const ms=[];for(const xs of dn)for(const bs of ds)bs.schemeId.split("#")[1]===xs&&ms.push(bs);for(const xs of ds)ms.find(({schemeId:bs})=>bs===xs.schemeId)||ms.push(xs);return ms};function convertHttpAuthSchemesToMap(ds){const dn=new Map;for(const ms of ds)dn.set(ms.schemeId,ms);return dn}const httpAuthSchemeMiddleware=(ds,dn)=>(ms,xs)=>async bs=>{const Es=ds.httpAuthSchemeProvider(await dn.httpAuthSchemeParametersProvider(ds,xs,bs.input)),ws=ds.authSchemePreference?await ds.authSchemePreference():[],Rs=resolveAuthOptions(Es,ws),js=convertHttpAuthSchemesToMap(ds.httpAuthSchemes),Cs=getSmithyContext(xs),As=[];for(const ks of Rs){const Os=js.get(ks.schemeId);if(!Os){As.push(`HttpAuthScheme \`${ks.schemeId}\` was not enabled for this service.`);continue}const Ms=Os.identityProvider(await dn.identityProviderConfigProvider(ds));if(!Ms){As.push(`HttpAuthScheme \`${ks.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:Ds={},signingProperties:Ps={}}=ks.propertiesExtractor?.(ds,xs)||{};ks.identityProperties=Object.assign(ks.identityProperties||{},Ds),ks.signingProperties=Object.assign(ks.signingProperties||{},Ps),Cs.selectedHttpAuthScheme={httpAuthOption:ks,identity:await Ms(ks.identityProperties),signer:Os.signer};break}if(!Cs.selectedHttpAuthScheme)throw new Error(As.join(`
18`));return ms(bs)},httpAuthSchemeEndpointRuleSetMiddlewareOptions={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},getHttpAuthSchemeEndpointRuleSetPlugin=(ds,{httpAuthSchemeParametersProvider:dn,identityProviderConfigProvider:ms})=>({applyToStack:xs=>{xs.addRelativeTo(httpAuthSchemeMiddleware(ds,{httpAuthSchemeParametersProvider:dn,identityProviderConfigProvider:ms}),httpAuthSchemeEndpointRuleSetMiddlewareOptions)}}),defaultErrorHandler=ds=>dn=>{throw dn},defaultSuccessHandler=(ds,dn)=>{},httpSigningMiddleware=ds=>(dn,ms)=>async xs=>{if(!HttpRequest.isInstance(xs.request))return dn(xs);const Es=getSmithyContext(ms).selectedHttpAuthScheme;if(!Es)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:ws={}},identity:Rs,signer:js}=Es,Cs=await dn({...xs,request:await js.sign(xs.request,Rs,ws)}).catch((js.errorHandler||defaultErrorHandler)(ws));return(js.successHandler||defaultSuccessHandler)(Cs.response,ws),Cs},httpSigningMiddlewareOptions={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},getHttpSigningPlugin=ds=>({applyToStack:dn=>{dn.addRelativeTo(httpSigningMiddleware(),httpSigningMiddlewareOptions)}}),normalizeProvider=ds=>{if(typeof ds=="function")return ds;const dn=Promise.resolve(ds);return()=>dn};
18class DefaultIdentityProviderConfig{authSchemes=new Map;constructor(dn){for(const ms in dn){if(!hasOwn(dn,ms))continue;const xs=dn[ms];xs!==void 0&&this.authSchemes.set(ms,xs)}}getIdentityProvider(dn){return this.authSchemes.get(dn)}}const createIsIdentityExpiredFunction=ds=>function(ms){return doesIdentityRequireRefresh(ms)&&ms.expiration.getTime()-Date.now()<ds},EXPIRATION_MS=3e5,isIdentityExpired=createIsIdentityExpiredFunction(EXPIRATION_MS),doesIdentityRequireRefresh=ds=>ds.expiration!==void 0,memoizeIdentityProvider=(ds,dn,ms)=>{if(ds===void 0)return;const xs=typeof ds!="function"?async()=>Promise.resolve(ds):ds;let bs,Es,ws,Rs=!1;const js=async Cs=>{Es||(Es=xs(Cs));try{bs=await Es,ws=!0,Rs=!1}finally{Es=void 0}return bs};return dn===void 0?async Cs=>((!ws||Cs?.forceRefresh)&&(bs=await js(Cs)),bs):async Cs=>((!ws||Cs?.forceRefresh)&&(bs=await js(Cs)),Rs?bs:ms(bs)?(dn(bs)&&await js(Cs),bs):(Rs=!0,bs))},DEFAULT_UA_APP_ID=void 0;function isValidUserAgentAppId(ds){return ds===void 0?!0:typeof ds=="string"&&ds.length<=50}function resolveUserAgentConfig(ds){const dn=normalizeProvider(ds.userAgentAppId??DEFAULT_UA_APP_ID),{customUserAgent:ms}=ds;return Object.assign(ds,{customUserAgent:typeof ms=="string"?[[ms]]:ms,userAgentAppId:async()=>{const xs=await dn();if(!isValidUserAgentAppId(xs)){const bs=ds.logger?.constructor?.name==="NoOpLogger"||!ds.logger?console:ds.logger;typeof xs!="string"?bs?.warn("userAgentAppId must be a string or undefined."):xs.length>50&&bs?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return xs}})}const partitionsInfo={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supp
18ortsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};let selectedPartitionsInfo=partitionsInfo;const partition=ds=>{const{partitions:dn}=selectedPartitionsInfo;for(const xs of dn){const{regions:bs,outputs:Es}=xs;for(const[ws,Rs]of Object.entries(bs))if(ws===ds)return{...Es,...Rs}}for(const xs of dn){const{regionRegex:bs,outputs:Es}=xs;if(new RegExp(bs).test(ds))return{...Es}}const ms=dn.find(xs=>xs.id==="aws");if(!ms)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...ms.outputs}},ACCOUNT_ID_ENDPOINT_REGEX=/\d{12}\.ddb/;async function checkFeatures(ds,dn,ms){if(ms.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&setFeature(ds,"PROTOCOL_RPC_V2_CBOR","M"),typeof dn.retryStrategy=="function"){const Es=await dn.retryStrategy();if(typeof Es.mode=="string")switch(Es.mode){case RETRY_MODES.ADAPTIVE:setFeature(ds,"RETRY_MODE_ADAPTIVE","F");break;case RETRY_MODES.STANDARD:setFeature(ds,"RETRY_MODE_STANDARD","E");break}}if(typeof dn.accountIdEndpointMode=="function"){const Es=ds.endpointV2;switch(String(Es?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)&&setFeature(ds,"ACCOUNT_ID_ENDPOINT","O"),await dn.accountIdEndpointMode?.()){case"disabled":setFeature(ds,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":setFeature(ds,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":setFeature(ds,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const bs=ds.__smithy_context?.selectedHttpAuthScheme?.identity;if(bs?.$source){const Es=bs;Es.accountId&&setFeature(ds,"RESOLVED_ACCOUNT_ID","T");for(const[ws,Rs]of Object.entries(Es.$source??{}))setFeature(ds,ws,Rs)}}const USER_AGENT="user-agent",X_AMZ_USER_AGENT="x-amz-user-agent",SPACE=" ",UA_NAME_SEPARATOR="/",UA_NAME_ESCAPE_REGEX=/[^!$%&'*+\-.^_`|~\w]/g,UA_VALUE_ESCAPE_REGEX=/[^!$%&'*+\-.^_`|~\w#]/g,UA_ESCAPE_CHAR="-",BYTE_LIMIT=1024;function encodeFeatures(ds){let dn="";for(const ms in ds){const xs=ds[ms];if(dn.length+xs.length+1<=BYTE_LIMIT){dn.length?dn+=","+xs:dn+=xs;continue}break}return dn}const userAgentMiddleware=ds=>(dn,ms)=>async xs=>{const{request:bs}=xs;if(!HttpRequest.isInstance(bs))return dn(xs);const{headers:Es}=bs,ws=ms?.userAgent?.map(escapeUserAgent)||[],Rs=(await ds.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(ms,ds,xs);const js=ms;Rs.push(`m/${encodeFeatures(Object.assign({},ms.__smithy_context?.features,js.__aws_sdk_context?.features))}`);const Cs=ds?.customUserAgent?.map(escapeUserAgent)||[],As=await ds.userAgentAppId();As&&Rs.push(escapeUserAgent(["app",`${As}`]));const ks=[].concat([...Rs,...ws,...Cs]).join(SPACE),Os=[...Rs.filter(Ms=>Ms.startsWith("aws-sdk-")),...Cs].join(SPACE);return ds.runtime!=="browser"?(Os&&(Es[X_AMZ_USER_AGENT]=Es[X_AMZ_USER_AGENT]?`${Es[USER_AGENT]} ${Os}`:Os),Es[USER_AGENT]=ks):Es[X_AMZ_USER_AGENT]=ks,dn({...xs,request:bs})},escapeUserAgent=ds=>{const dn=ds[0].split(UA_NAME_SEPARATOR).map(ws=>ws.replace(UA_NAME_ESCAPE_REGEX,UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR),ms=ds[1]?.replace(UA_VALUE_ESCAPE_REGEX,UA_ESCAPE_CHAR),xs=dn.indexOf(UA_NAME_SEPARATOR),bs=dn.substring(0,xs);let Es=dn.substring(xs+1);return bs==="api"&&(Es=Es.toLowerCase()),[bs,Es,ms].filter(ws=>ws&&ws.length>0).reduce((ws,Rs,js)=>{switch(js){case 0:return Rs;case 1:return`${ws}/${Rs}`;default:return`${ws}#${Rs}`}},"")},getUserAgentMiddlewareOptions={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=ds=>({applyToStack:dn=>{dn.add(userAgentMiddleware(ds),getUserAgentMiddlewareOptions)}}),createDefaultUserAgentProvider=({serviceId:ds,clientVersion:dn})=>async ms=>{const xs=typeof window<"u"?window.navigator:void 0,bs=xs?.userAgent??"",Es=xs?.userAgentData?.platform??fallback.os(bs)??"other",ws=void 0,Rs=xs?.userAgentData?.brands??[],js=Rs[Rs.length-1],Cs=js?.brand??fallback.browser(bs)??"unknown",As=js?.version??"unknown",ks=[["aws-sdk-js",dn],["ua","2.1"],[`os/${Es}`,ws],["lang/js"],["md/browser",`${Cs}_${As}`]];ds&&ks.push([`api/${ds}`,dn]);const Os=await ms?.userAgentAppId?.();return Os&&ks.push([`app/${Os}`]),ks}
18,fallback={os(ds){if(/iPhone|iPad|iPod/.test(ds))return"iOS";if(/Macintosh|Mac OS X/.test(ds))return"macOS";if(/Windows NT/.test(ds))return"Windows";if(/Android/.test(ds))return"Android";if(/Linux/.test(ds))return"Linux"},browser(ds){if(/EdgiOS|EdgA|Edg\//.test(ds))return"Microsoft Edge";if(/Firefox\//.test(ds))return"Firefox";if(/Chrome\//.test(ds))return"Chrome";if(/Safari\//.test(ds))return"Safari"}},isVirtualHostableS3Bucket=(ds,dn=!1)=>{if(dn){for(const ms of ds.split("."))if(!isVirtualHostableS3Bucket(ms))return!1;return!0}return!(!isValidHostLabel(ds)||ds.length<3||ds.length>63||ds!==ds.toLowerCase()||isIpAddress(ds))},ARN_DELIMITER=":",RESOURCE_DELIMITER="/",parseArn=ds=>{const dn=ds.split(ARN_DELIMITER);if(dn.length<6)return null;const[ms,xs,bs,Es,ws,...Rs]=dn;if(ms!=="arn"||xs===""||bs===""||Rs.join(ARN_DELIMITER)==="")return null;const js=Rs.map(Cs=>Cs.split(RESOURCE_DELIMITER)).flat();return{partition:xs,service:bs,region:Es,accountId:ws,resourceId:js}},awsEndpointFunctions={isVirtualHostableS3Bucket,parseArn,partition};customEndpointFunctions.aws=awsEndpointFunctions;const memoize=(ds,dn,ms)=>{let xs,bs,Es,ws=!1;const Rs=async()=>{bs||(bs=ds());try{xs=await bs,Es=!0,ws=!1}finally{bs=void 0}return xs};return async js=>((!Es||js?.forceRefresh)&&(xs=await Rs()),xs)},validRegions=new Set,checkRegion=(ds,dn=isValidHostLabel)=>{if(!validRegions.has(ds)&&!dn(ds))if(ds==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${ds}" is not a valid hostname component.`);else validRegions.add(ds)},isFipsRegion=ds=>typeof ds=="string"&&(ds.startsWith("fips-")||ds.endsWith("-fips")),getRealRegion=ds=>isFipsRegion(ds)?["fips-aws-global","aws-fips"].includes(ds)?"us-east-1":ds.replace(/fips-(dkr-|prod-)?|-fips/,""):ds,resolveRegionConfig=ds=>{const{region:dn,useFipsEndpoint:ms}=ds;if(!dn)throw new Error("Region is missing");return Object.assign(ds,{region:async()=>{const xs=typeof dn=="function"?await dn():dn,bs=getRealRegion(xs);return checkRegion(bs),bs},useFipsEndpoint:async()=>{const xs=typeof dn=="string"?dn:await dn();return isFipsRegion(xs)?!0:typeof ms!="function"?Promise.resolve(!!ms):ms()}})},DEFAULTS_MODE_OPTIONS=["in-region","cross-region","mobile","standard","legacy"],resolveDefaultsModeConfig=({defaultsMode:ds}={})=>memoize(async()=>{const dn=typeof ds=="function"?await ds():ds;switch(dn?.toLowerCase()){case"auto":return Promise.resolve(useMobileConfiguration()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(dn?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${dn}`)}}),useMobileConfiguration=()=>{const ds=window?.navigator;if(ds?.connection){const{effectiveType:dn,rtt:ms,downlink:xs}=ds.connection;if(typeof dn=="string"&&dn!=="4g"||Number(ms)>100||Number(xs)<10)return!0}return ds?.userAgentData?.mobile||typeof ds?.maxTouchPoints=="number"&&ds?.maxTouchPoints>1},DEFAULT_USE_DUALSTACK_ENDPOINT=!1,DEFAULT_USE_FIPS_ENDPOINT=!1,getAwsRegionExtensionConfiguration=ds=>({setRegion(dn){ds.region=dn},region(){return ds.region}}),resolveAwsRegionExtensionConfiguration=ds=>({region:ds.region()});function resolveEventStreamConfig(ds){const dn=ds.signer,ms=ds.signer,xs=Object.assign(ds,{eventSigner:dn,messageSigner:ms}),bs=xs.eventStreamPayloadHandlerProvider(xs);return Object.assign(xs,{eventStreamPayloadHandler:bs})}const eventStreamHandlingMiddleware=ds=>(dn,ms)=>async xs=>{const{request:bs}=xs;return HttpRequest.isInstance(bs)?ds.eventStreamPayloadHandler.handle(dn,xs,ms):dn(xs)},eventStreamHandlingMiddlewareOptions={tags:["EVENT_STREAM","SIGNATURE","HANDLE"],name:"eventStreamHandlingMiddleware",relation:"after",toMiddleware:"awsAuthMiddleware",override:!0},eventStreamHeaderMiddleware=ds=>async dn=>{const{request:ms}=dn;return HttpRequest.isInstance(ms)?(ms.headers={...ms.headers,"content-type":"application/vnd.amazon.eventstream","x-amz-content-sha256":"STREAMING-AWS4-HMAC-SHA256-EVENTS"},ds({...dn,request:ms})):ds(dn)},eventStreamHeaderMiddlewareOptions={step:"build",tags:["EVENT_STREAM","HEADER","CONTENT_TYPE","CONTENT_SHA256"],name:"eventStreamHeaderMiddleware",override:!0},getEventStreamPlugin=ds=>({applyToStack:dn=>{dn.addRelativeTo(eventStreamHandlingMiddleware(ds),eventStreamHandlingMiddlewareOptions),dn.add(eventStreamHeaderMiddleware,eventStreamHeaderMiddlewareOptions)}});function formatUrl(ds){const{port:dn,query:ms}=ds;let{protocol:xs,path:bs,hostname:Es}=ds;xs&&xs.slice(-1)!==":"&&(xs+=":"),dn&&(Es+=`:${dn}`),bs&&bs.charAt(0)!=="/"&&(bs=`/${bs}`);let ws=ms?buildQueryString(ms):"";ws&&ws[0]!=="?"&&(ws=`?${ws}`);let Rs="";if(ds.username!=null||ds.password!=null){const Cs=ds.username??"",As=ds.password??"";Rs=`${Cs}:${As}@`}let js="";return ds.fragment&&(js=`#${ds.fragment}`),`${xs}//${Rs}${Es}${bs}${ws}${js}`}const CRC32_TABLE=new Uint32Array(256);for(let ds=0;ds<256;++ds){let dn=ds;for(let ms=0;ms<8;++ms)dn=dn&1?3988292384^dn>>>1:dn>>>1;CRC32_TABLE[ds]=dn>>>0}const ONES=4294967295;class Crc32Js{digestLength=4;checksum=ONES;update(dn){for(let ms=0;ms<dn.length;++ms)this.checksum=this.checksum>>>8^CRC32_TABLE[(this.checksum^dn[ms])&255]}digestSync(){return(this.checksum^ONES)>>>0}async digest(){const dn=this.digestSync(),ms=new Uint8Array(4);return new DataView(ms.buffer).setUint32(0,dn,!1),ms}reset(){this.checksum=ONES}}const BLOCK=64,DIGEST_LENGTH=32,MAX_HASHABLE_LENGTH=2**53-1;class Sha256Js{digestLength=DIGEST_LENGTH;state=Int32Array.from(INIT);w;buffer=new Uint8Array(64);bufferLength=0;bytesHashed=0;finished=!1;inner;outer;constructor(dn){if(dn){const ms=Sha256Js.normalizeKey(dn);this.inner=new Sha256Js,this.outer=new Sha256Js;const{inner:xs,outer:bs}=this,Es=new Uint8Array(BLOCK*2);for(let ws=0;ws<BLOCK;++ws)Es[ws]=54^ms[ws],Es[ws+BLOCK]=92^ms[ws];xs.update(Es.subarray(0,BLOCK)),bs.update(Es.subarray(BLOCK))}}update(dn){if(this.finished)throw new Error("Attempted to update an already finished HMAC.");if(this.inner){this.inner.update(dn);return}const ms=toUint8Array(dn);let xs=0,{byteLength:bs}=ms;if(this.bytesHashed+=bs,this.bytesHashed*8>MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;bs>0;)this.buffer[this.bufferLength++]=ms[xs++],bs--,this.bufferLength===BLOCK&&(this.hashBuffer(),this.bufferLength=0)}async digest(){const{inner:dn,outer:ms}=this;if(dn&&ms){if(this.finished)throw new Error("Attempted to digest an already finished HMAC.");this.finished=!0;const xs=dn.digestSync();return ms.update(xs),ms.digestSync()}return this.digestSync()}reset(){this.state=Int32Array.from(INIT),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0}digestSync(){const dn=this.state.slice(),ms=this.buffer.slice();let xs=this.bufferLength;const bs=this.bytesHashed*8,Es=new DataView(ms.buffer,ms.byteOffset,ms.byteLength);if(Es.setUint8(xs++,128),(xs-1)%BLOCK>=BLOCK-8){for(let Rs=xs;Rs<BLOCK;++Rs)Es.setUint8(Rs,0);this.hashBufferWith(dn,ms),xs=0}for(let Rs=xs;Rs<BLOCK-8;++Rs)Es.setUint8(Rs,0);Es.setUint32(BLOCK-8,Math.floor(bs/4294967296),!1),Es.setUint32(BLOCK-4,bs,!1),this.hashBufferWith(dn,ms);const ws=new Uint8Array(DIGEST_LENGTH);for(let Rs=0;Rs<8;++Rs)ws[Rs*4]=dn[Rs]>>>24&255,ws[Rs*4+1]=dn[Rs]>>>16&255,ws[Rs*4+2]=dn[Rs]>>>8&255,ws[Rs*4+3]=dn[Rs]>>>0&255;return ws}static normalizeKey(dn){const ms=toUint8Array(dn);if(ms.byteLength>BLOCK){const xs=new Sha256Js;xs.update(ms);const bs=xs.digestSync(),Es=new Uint8Array(BLOCK);return Es.set(bs),Es}if(ms.byteLength<BLOCK){const xs=new Uint8Array(BLOCK);return xs.set(ms),xs}return ms}hashBuffer(){this.hashBufferWith(this.state,this.buffer)}hashBufferWith(dn,ms){const xs=this.w??=new Int32Array(64);let bs=dn[0],Es=dn[1],ws=dn[2],Rs=dn[3],js=dn[4],Cs=dn[5],As=dn[6],ks=dn[7];for(let Os=0;Os<BLOCK;++Os){if(Os<16)xs[Os]=(ms[Os*4]&255)<<24|(ms[Os*4+1]&255)<<16|(ms[Os*4+2]&255)<<8|ms[Os*4+3]&255;else{let Ps=xs[Os-2];const Ls=(Ps>>>17|Ps<<15)^(Ps>>>19|Ps<<13)^Ps>>>10;Ps=xs[Os-15];const Bs=(Ps>>>7|Ps<<25)^(Ps>>>18|Ps<<14)^Ps>>>3;xs[Os]=(Ls+xs[Os-7]|0)+(Bs+xs[Os-16]|0)}const Ms=(((js>>>6|js<<26)^(js>>>11|js<<21)^(js>>>25|js<<7))+(js&Cs^~js&As)|0)+(ks+(K$3[Os]+xs[Os]|0)|0)|0,Ds=((bs>>>2|bs<<30)^(bs>>>13|bs<<19)^(bs>>>22|bs<<10))+(bs&Es^bs&ws^Es&ws)|0;ks=As,As=Cs,Cs=js,js=Rs+Ms|0,Rs=ws,ws=Es,Es=bs,bs=Ms+Ds|0}dn[0]+=bs,dn[1]+=Es,dn[2]+=ws,dn[3]+=Rs,dn[4]+=js,dn[5]+=Cs,dn[6]+=As,dn[7]+=ks}}const INIT=new Int32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),K$3=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
18734187,3204031479,3329325298]),{digest,sign,importKey}=globalThis?.crypto?.subtle??{},subtle=typeof digest=="function"&&typeof sign=="function"&&typeof importKey=="function"?globalThis.crypto.subtle:void 0,MAX_PENDING_BYTES=8*1024*1024;class Sha256WebCrypto{digestLength=32;secret;pending=[];pendingBytes=0;fallback;finished=!1;constructor(dn){dn&&(this.secret=toUint8Array(dn))}update(dn){if(this.finished)throw new Error("Attempted to update an already finished HMAC.");if(this.fallback){this.fallback.update(dn);return}this.pending.push(dn.slice()),this.pendingBytes+=dn.byteLength,this.pendingBytes>=MAX_PENDING_BYTES&&this.switchToFallback()}async digest(){if(this.fallback)return this.fallback.digest();if(this.secret&&this.finished)throw new Error("Attempted to digest an already finished HMAC.");const dn=concatBytes(this.pending);if(subtle){if(this.secret){this.finished=!0;const bs=await subtle.importKey("raw",this.secret,{name:"HMAC",hash:"SHA-256"},!1,["sign"]),Es=await subtle.sign("HMAC",bs,dn);return new Uint8Array(Es)}const xs=await subtle.digest("SHA-256",dn);return new Uint8Array(xs)}const ms=new Sha256Js(this.secret);return ms.update(dn),ms.digest()}reset(){this.pending=[],this.pendingBytes=0,this.fallback=void 0,this.finished=!1}switchToFallback(){const dn=new Sha256Js(this.secret);for(const ms of this.pending)dn.update(ms);this.fallback=dn,this.pending=[],this.pendingBytes=0}}let Int64$1=class y0{bytes;constructor(dn){if(this.bytes=dn,dn.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(dn){if(dn>9223372036854776e3||dn<-9223372036854776e3)throw new Error(`${dn} is too large (or, if negative, too small) to represent as an Int64`);const ms=new Uint8Array(8);for(let xs=7,bs=Math.abs(Math.round(dn));xs>-1&&bs>0;xs--,bs/=256)ms[xs]=bs;return dn<0&&negate$1(ms),new y0(ms)}valueOf(){const dn=this.bytes.slice(0),ms=dn[0]&128;return ms&&negate$1(dn),parseInt(toHex(dn),16)*(ms?-1:1)}toString(){return String(this.valueOf())}};function negate$1(ds){for(let dn=0;dn<8;dn++)ds[dn]^=255;for(let dn=7;dn>-1&&(ds[dn]++,ds[dn]===0);dn--);}class HeaderMarshaller{toUtf8;fromUtf8;constructor(dn,ms){this.toUtf8=dn,this.fromUtf8=ms}format(dn){const ms=[];for(const Es in dn){if(!hasOwn(dn,Es))continue;const ws=this.fromUtf8(Es);ms.push(Uint8Array.from([ws.byteLength]),ws,this.formatHeaderValue(dn[Es]))}const xs=new Uint8Array(ms.reduce((Es,ws)=>Es+ws.byteLength,0));let bs=0;for(const Es of ms)xs.set(Es,bs),bs+=Es.byteLength;return xs}formatHeaderValue(dn){switch(dn.type){case"boolean":return Uint8Array.from([dn.value?0:1]);case"byte":return Uint8Array.from([2,dn.value]);case"short":const ms=new DataView(new ArrayBuffer(3));return ms.setUint8(0,3),ms.setInt16(1,dn.value,!1),new Uint8Array(ms.buffer);case"integer":const xs=new DataView(new ArrayBuffer(5));return xs.setUint8(0,4),xs.setInt32(1,dn.value,!1),new Uint8Array(xs.buffer);case"long":const bs=new Uint8Array(9);return bs[0]=5,bs.set(dn.value.bytes,1),bs;case"binary":const Es=new DataView(new ArrayBuffer(3+dn.value.byteLength));Es.setUint8(0,6),Es.setUint16(1,dn.value.byteLength,!1);const ws=new Uint8Array(Es.buffer);return ws.set(dn.value,3),ws;case"string":const Rs=this.fromUtf8(dn.value),js=new DataView(new ArrayBuffer(3+Rs.byteLength));js.setUint8(0,7),js.setUint16(1,Rs.byteLength,!1);const Cs=new Uint8Array(js.buffer);return Cs.set(Rs,3),Cs;case"timestamp":const As=new Uint8Array(9);return As[0]=8,As.set(Int64$1.fromNumber(dn.value.valueOf()).bytes,1),As;case"uuid":if(!UUID_PATTERN$1.test(dn.value))throw new Error(`Invalid UUID received: ${dn.value}`);const ks=new Uint8Array(17);return ks[0]=9,ks.set(fromHex(dn.value.replace(/-/g,"")),1),ks}}parse(dn){const ms={};let xs=0;for(;xs<dn.byteLength;){const bs=dn.getUint8(xs++),Es=this.toUtf8(new Uint8Array(dn.buffer,dn.byteOffset+xs,bs));switch(xs+=bs,dn.getUint8(xs++)){case 0:ms[Es]={type:BOOLEAN_TAG,value:!0};break;case 1:ms[Es]={type:BOOLEAN_TAG,value:!1};break;case 2:ms[Es]={type:BYTE_TAG,value:dn.getInt8(xs++)};break;case 3:ms[Es]={type:SHORT_TAG,value:dn.getInt16(xs,!1)},xs+=2;break;case 4:ms[Es]={type:INT_TAG,value:dn.getInt32(xs,!1)},xs+=4;break;case 5:ms[Es]={type:LONG_TAG,value:new Int64$1(new Uint8Array(dn.buffer,dn.byteOffset+xs,8))},xs+=8;break;case 6:const ws=dn.getUint16(xs,!1);xs+=2,ms[Es]={type:BINARY_TAG,value:new Uint8Array(dn.buffer,dn.byteOffset+xs,ws)},xs+=ws;break;case 7:const Rs=dn.getUint16(xs,!1);
18xs+=2,ms[Es]={type:STRING_TAG,value:this.toUtf8(new Uint8Array(dn.buffer,dn.byteOffset+xs,Rs))},xs+=Rs;break;case 8:ms[Es]={type:TIMESTAMP_TAG,value:new Date(new Int64$1(new Uint8Array(dn.buffer,dn.byteOffset+xs,8)).valueOf())},xs+=8;break;case 9:const js=new Uint8Array(dn.buffer,dn.byteOffset+xs,16);xs+=16,ms[Es]={type:UUID_TAG,value:`${toHex(js.subarray(0,4))}-${toHex(js.subarray(4,6))}-${toHex(js.subarray(6,8))}-${toHex(js.subarray(8,10))}-${toHex(js.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return ms}}var HEADER_VALUE_TYPE$1;(function(ds){ds[ds.boolTrue=0]="boolTrue",ds[ds.boolFalse=1]="boolFalse",ds[ds.byte=2]="byte",ds[ds.short=3]="short",ds[ds.integer=4]="integer",ds[ds.long=5]="long",ds[ds.byteArray=6]="byteArray",ds[ds.string=7]="string",ds[ds.timestamp=8]="timestamp",ds[ds.uuid=9]="uuid"})(HEADER_VALUE_TYPE$1||(HEADER_VALUE_TYPE$1={}));const BOOLEAN_TAG="boolean",BYTE_TAG="byte",SHORT_TAG="short",INT_TAG="integer",LONG_TAG="long",BINARY_TAG="binary",STRING_TAG="string",TIMESTAMP_TAG="timestamp",UUID_TAG="uuid",UUID_PATTERN$1=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,PRELUDE_MEMBER_LENGTH=4,PRELUDE_LENGTH=PRELUDE_MEMBER_LENGTH*2,CHECKSUM_LENGTH=4,MINIMUM_MESSAGE_LENGTH=PRELUDE_LENGTH+CHECKSUM_LENGTH*2;function splitMessage({byteLength:ds,byteOffset:dn,buffer:ms}){if(ds<MINIMUM_MESSAGE_LENGTH)throw new Error("Provided message too short to accommodate event stream message overhead");const xs=new DataView(ms,dn,ds),bs=xs.getUint32(0,!1);if(ds!==bs)throw new Error("Reported message length does not match received message length");const Es=xs.getUint32(PRELUDE_MEMBER_LENGTH,!1),ws=xs.getUint32(PRELUDE_LENGTH,!1),Rs=xs.getUint32(ds-CHECKSUM_LENGTH,!1),js=new Crc32Js;if(js.update(new Uint8Array(ms,dn,PRELUDE_LENGTH)),ws!==js.digestSync())throw new Error(`The prelude checksum specified in the message (${ws}) does not match the calculated CRC32 checksum (${js.digestSync()})`);if(js.update(new Uint8Array(ms,dn+PRELUDE_LENGTH,ds-(PRELUDE_LENGTH+CHECKSUM_LENGTH))),Rs!==js.digestSync())throw new Error(`The message checksum (${js.digestSync()}) did not match the expected value of ${Rs}`);return{headers:new DataView(ms,dn+PRELUDE_LENGTH+CHECKSUM_LENGTH,Es),body:new Uint8Array(ms,dn+PRELUDE_LENGTH+CHECKSUM_LENGTH+Es,bs-Es-(PRELUDE_LENGTH+CHECKSUM_LENGTH+CHECKSUM_LENGTH))}}class EventStreamCodec{headerMarshaller;messageBuffer;isEndOfStream;constructor(dn,ms){this.headerMarshaller=new HeaderMarshaller(dn,ms),this.messageBuffer=[],this.isEndOfStream=!1}feed(dn){this.messageBuffer.push(this.decode(dn))}endOfStream(){this.isEndOfStream=!0}getMessage(){const dn=this.messageBuffer.pop(),ms=this.isEndOfStream;return{getMessage(){return dn},isEndOfStream(){return ms}}}getAvailableMessages(){const dn=this.messageBuffer;this.messageBuffer=[];const ms=this.isEndOfStream;return{getMessages(){return dn},isEndOfStream(){return ms}}}encode({headers:dn,body:ms}){const xs=this.headerMarshaller.format(dn),bs=xs.byteLength+ms.byteLength+16,Es=new Uint8Array(bs),ws=new DataView(Es.buffer,Es.byteOffset,Es.byteLength),Rs=new Crc32Js;return ws.setUint32(0,bs,!1),ws.setUint32(4,xs.byteLength,!1),Rs.update(Es.subarray(0,8)),ws.setUint32(8,Rs.digestSync(),!1),Es.set(xs,12),Es.set(ms,xs.byteLength+12),Rs.update(Es.subarray(8,bs-4)),ws.setUint32(bs-4,Rs.digestSync(),!1),Es}decode(dn){const{headers:ms,body:xs}=splitMessage(dn);return{headers:this.headerMarshaller.parse(ms),body:xs}}formatHeaders(dn){return this.headerMarshaller.format(dn)}}class MessageDecoderStream{options;constructor(dn){this.options=dn}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const dn of this.options.inputStream)yield this.options.decoder.decode(dn)}}class MessageEncoderStream{options;constructor(dn){this.options=dn}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const dn of this.options.messageStream)yield this.options.encoder.encode(dn);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class SmithyMessageDecoderStream{options;constructor(dn){this.options=dn}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const dn of this.options.messageStream){const ms=await this.options.deserializer(dn);ms!==void 0&&(yield ms)}}}
18class SmithyMessageEncoderStream{options;constructor(dn){this.options=dn}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const dn of this.options.inputStream)yield this.options.serializer(dn)}}function getChunkedStream(ds){let dn=0,ms=0,xs=null,bs=null;const Es=Rs=>{if(typeof Rs!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+Rs);dn=Rs,ms=4,xs=new Uint8Array(Rs),new DataView(xs.buffer).setUint32(0,Rs,!1)},ws=async function*(){const Rs=ds[Symbol.asyncIterator]();for(;;){const{value:js,done:Cs}=await Rs.next();if(Cs){if(dn)if(dn===ms)yield xs;else throw new Error("Truncated event message received.");else return;return}const As=js.length;let ks=0;for(;ks<As;){if(!xs){const Ms=As-ks;bs||(bs=new Uint8Array(4));const Ds=Math.min(4-ms,Ms);if(bs.set(js.slice(ks,ks+Ds),ms),ms+=Ds,ks+=Ds,ms<4)break;Es(new DataView(bs.buffer).getUint32(0,!1)),bs=null}const Os=Math.min(dn-ms,As-ks);xs.set(js.slice(ks,ks+Os),ms),ms+=Os,ks+=Os,dn&&dn===ms&&(yield xs,xs=null,dn=0,ms=0)}}};return{[Symbol.asyncIterator]:ws}}function getMessageUnmarshaller(ds,dn){return async function(ms){const{value:xs}=ms.headers[":message-type"];if(xs==="error"){const bs=new Error(ms.headers[":error-message"].value||"UnknownError");throw bs.name=ms.headers[":error-code"].value,bs}else if(xs==="exception"){const bs=ms.headers[":exception-type"].value,Es={[bs]:ms},ws=await ds(Es);if(ws.$unknown){const Rs=new Error(dn(ms.body));throw Rs.name=bs,Rs}throw ws[bs]}else if(xs==="event"){const bs={[ms.headers[":event-type"].value]:ms},Es=await ds(bs);return Es.$unknown?void 0:Es}else throw Error(`Unrecognizable event type: ${ms.headers[":event-type"].value}`)}}let EventStreamMarshaller$1=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:dn,utf8Decoder:ms}){this.eventStreamCodec=new EventStreamCodec(dn,ms),this.utfEncoder=dn}deserialize(dn,ms){const xs=getChunkedStream(dn);return new SmithyMessageDecoderStream({messageStream:new MessageDecoderStream({inputStream:xs,decoder:this.eventStreamCodec}),deserializer:getMessageUnmarshaller(ms,this.utfEncoder)})}serialize(dn,ms){return new MessageEncoderStream({messageStream:new SmithyMessageEncoderStream({inputStream:dn,serializer:ms}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const readableStreamToIterable=ds=>({[Symbol.asyncIterator]:async function*(){const dn=ds.getReader();try{for(;;){const{done:ms,value:xs}=await dn.read();if(ms)return;yield xs}}finally{dn.releaseLock()}}}),iterableToReadableStream=ds=>{const dn=ds[Symbol.asyncIterator]();return new ReadableStream({async pull(ms){const{done:xs,value:bs}=await dn.next();if(xs)return ms.close();ms.enqueue(bs)}})};class EventStreamMarshaller{universalMarshaller;constructor({utf8Encoder:dn,utf8Decoder:ms}){this.universalMarshaller=new EventStreamMarshaller$1({utf8Decoder:ms,utf8Encoder:dn})}deserialize(dn,ms){const xs=isReadableStream$1(dn)?readableStreamToIterable(dn):dn;return this.universalMarshaller.deserialize(xs,ms)}serialize(dn,ms){const xs=this.universalMarshaller.serialize(dn,ms);return typeof ReadableStream=="function"?iterableToReadableStream(xs):xs}}const isReadableStream$1=ds=>typeof ReadableStream=="function"&&ds instanceof ReadableStream,eventStreamSerdeProvider=ds=>new EventStreamMarshaller(ds),resolveEventStreamSerdeConfig=ds=>Object.assign(ds,{eventStreamMarshaller:ds.eventStreamSerdeProvider(ds)});function createRequest(ds,dn){return new Request(ds,dn)}function requestTimeout(ds=0){return new Promise((dn,ms)=>{ds&&setTimeout(()=>{const xs=new Error(`Request did not complete within ${ds} ms`);xs.name="TimeoutError",ms(xs)},ds)})}const keepAliveSupport={supported:void 0};class FetchHttpHandler{config;configProvider;static create(dn){return typeof dn?.handle=="function"?dn:new FetchHttpHandler(dn)}constructor(dn){typeof dn=="function"?this.configProvider=dn().then(ms=>ms||{}):(this.config=dn??{},this.configProvider=Promise.resolve(this.config)),keepAliveSupport.supported===void 0&&(keepAliveSupport.supported=typeof Request<"u"&&"keepalive"in createRequest("https://[::1]"))}destroy(){}async handle(dn,{abortSignal:ms,requestTimeout:xs}={}){this.config||(this.config=await this.configProvider);const bs=xs??this.config.requestTimeout,Es=this.config.keepAlive===!0,ws=this.config.credentials,Rs=this.config.customFetch??fetch;if(ms?.aborted){const Us=buildAbortError(ms);return Promise.reject(Us)}let js=dn.path;const Cs=buildQueryString(dn.query||{});Cs&&(js+=`?${Cs}`),dn.fragment&&(js+=`#${dn.fragment}`);let As="";if(dn.username!=null||dn.password!=null){const Us=dn.username??"",Gs=dn.password??"";As=`${Us}:${Gs}@`}const{port:ks,method:Os}=dn,Ms=`${dn.protocol}//${As}${dn.hostname}${ks?`:${ks}`:""}${js}`,Ds=Os==="GET"||Os==="HEAD"?void 0:dn.body,Ps={body:Ds,headers:new Headers(dn.headers),method:Os,credentials:ws};this.config?.cache&&(Ps.cache=this.config.cache),Ds&&(Ps.duplex="half"),typeof AbortController<"u"&&(Ps.signal=ms),keepAliveSupport.supported&&(Ps.keepalive=Es),typeof this.config.requestInit=="function"&&Object.assign(Ps,this.config.requestInit(dn));let Ls=()=>{};const Bs=createRequest(Ms,Ps),Fs=[Rs(Bs).then(Us=>{const Gs=Us.headers,Js={};for(const Zs of Gs.entries())Js[Zs[0]]=Zs[1];return Us.body!=null?{response:new HttpResponse({headers:Js,reason:Us.statusText,statusCode:Us.status,body:Us.body})}
18:Us.blob().then(Zs=>({response:new HttpResponse({headers:Js,reason:Us.statusText,statusCode:Us.status,body:Zs})}))}),requestTimeout(bs)];return ms&&Fs.push(new Promise((Us,Gs)=>{const Js=()=>{const Ws=buildAbortError(ms);Gs(Ws)};if(typeof ms.addEventListener=="function"){const Ws=ms;Ws.addEventListener("abort",Js,{once:!0}),Ls=()=>Ws.removeEventListener("abort",Js)}else ms.onabort=Js})),Promise.race(Fs).finally(Ls)}updateHttpClientConfig(dn,ms){this.config=void 0,this.configProvider=this.configProvider.then(xs=>(xs[dn]=ms,xs))}httpHandlerConfigs(){return this.config??{}}}function buildAbortError(ds){const dn=ds&&typeof ds=="object"&&"reason"in ds?ds.reason:void 0;if(dn){if(dn instanceof Error){const bs=new Error("Request aborted");return bs.name="AbortError",bs.cause=dn,bs}const xs=new Error(String(dn));return xs.name="AbortError",xs}const ms=new Error("Request aborted");return ms.name="AbortError",ms}const isWebSocketRequest=ds=>ds.protocol==="ws:"||ds.protocol==="wss:",DEFAULT_WS_CONNECTION_TIMEOUT_MS=3e3;class WebSocketFetchHandler{metadata={handlerProtocol:"websocket/h1.1"};config={};configPromise;httpHandler;sockets={};static create(dn,ms=new FetchHttpHandler){return typeof dn?.handle=="function"?dn:new WebSocketFetchHandler(dn,ms)}constructor(dn,ms=new FetchHttpHandler){this.httpHandler=ms;const xs=bs=>(this.config={...bs??{}},this.config);typeof dn=="function"?(this.config={},this.configPromise=dn().then(bs=>xs(bs))):this.configPromise=Promise.resolve(xs(dn))}destroy(){for(const[dn,ms]of Object.entries(this.sockets)){for(const xs of ms)xs.close(1e3,"Socket closed through destroy() call");delete this.sockets[dn]}}async handle(dn){this.config=await this.configPromise;const{logger:ms}=this.config;if(!isWebSocketRequest(dn))return ms?.debug?.(`@aws-sdk - ws fetching ${dn.protocol}${dn.hostname}${dn.path}`),this.httpHandler.handle(dn);const xs=formatUrl(dn);ms?.debug?.(`@aws-sdk - ws connecting ${xs.split("?")[0]}`);const bs=new WebSocket(xs);this.sockets[xs]||(this.sockets[xs]=[]),this.sockets[xs].push(bs),bs.binaryType="arraybuffer";const{connectionTimeout:Es=DEFAULT_WS_CONNECTION_TIMEOUT_MS}=this.config;await this.waitForReady(bs,Es);const{body:ws}=dn,Rs=getIterator(ws),js=this.connect(bs,Rs),Cs=toReadableStream(js);return{response:new HttpResponse({statusCode:200,body:Cs})}}updateHttpClientConfig(dn,ms){this.configPromise=this.configPromise.then(xs=>(xs[dn]=ms,xs))}httpHandlerConfigs(){return this.config??{}}removeNotUsableSockets(dn){this.sockets[dn]=(this.sockets[dn]??[]).filter(ms=>![WebSocket.CLOSING,WebSocket.CLOSED].includes(ms.readyState))}waitForReady(dn,ms){return new Promise((xs,bs)=>{const Es=setTimeout(()=>{this.removeNotUsableSockets(dn.url),bs({$metadata:{httpStatusCode:500,websocketSynthetic500Error:!0}})},ms);dn.onopen=()=>{clearTimeout(Es),xs()}})}connect(dn,ms){const xs=[];let bs=null,Es=null;const ws=Cs=>{bs?(Cs.error?Es(Cs.error):bs({done:Cs.done,value:Cs.value}),bs=null,Es=null):xs.push(Cs)};dn.onmessage=Cs=>{const{data:As}=Cs;ws(typeof As=="string"?{done:!1,value:fromBase64(As)}:{done:!1,value:new Uint8Array(As)})},dn.onerror=Cs=>{dn.close(),ws({done:!0,error:Cs})},dn.onclose=()=>{this.removeNotUsableSockets(dn.url),ws({done:!0})};const Rs={[Symbol.asyncIterator]:()=>({async next(){if(xs.length>0){const Cs=xs.shift();if(Cs.error)throw Cs.error;return{done:Cs.done,value:Cs.value}}return new Promise((Cs,As)=>{bs=Cs,Es=As})}})};return(async()=>{try{for await(const Cs of ms){if(dn.readyState>=WebSocket.CLOSING)break;dn.send(Cs)}}catch(Cs){ws({done:!0,error:Cs})}finally{dn.close(1e3)}})(),Rs}}const getIterator=ds=>ds[Symbol.asyncIterator]?ds:isReadableStream(ds)?readableStreamToIterable(ds):{[Symbol.asyncIterator]:async function*(){yield ds}},toReadableStream=ds=>typeof ReadableStream=="function"?iterableToReadableStream(ds):ds,isReadableStream=ds=>typeof ReadableStream=="function"&&ds instanceof ReadableStream,websocketEndpointMiddleware=(ds,dn)=>ms=>xs=>{const{request:bs}=xs;if(HttpRequest.isInstance(bs)&&ds.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")){bs.protocol="wss:",bs.method="GET",bs.path=`${bs.path}-websocket`;const{headers:Es}=bs;delete Es["content-type"],delete Es["x-amz-content-sha256"];for(const ws of Object.keys(Es))if(ws.indexOf(dn.headerPrefix)===0){const Rs=ws.replace(dn.headerPrefix,"");bs.query[Rs]=Es[ws]}Es["x-amz-user-agent"]&&(bs.query["user-agent"]=Es["x-amz-user-agent"]),bs.headers={host:Es.host??bs.hostname}}return ms(xs)},websocketEndpointMiddlewareOptions={name:"websocketEndpointMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],relation:"after",toMiddleware:"eventStreamHeaderMiddleware",override:!0},injectSessionIdMiddleware=()=>ds=>async dn=>{const ms={...dn.input},xs=await ds(dn),bs=xs.output;return ms.SessionId&&bs.SessionId==null&&(bs.SessionId=ms.SessionId),xs},injectSessionIdMiddlewareOptions={step:"initialize",name:"injectSessionIdMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],override:!0},getWebSocketPlugin=(ds,dn)=>({applyToStack:ms=>
18{ms.addRelativeTo(websocketEndpointMiddleware(ds,dn),websocketEndpointMiddlewareOptions),ms.add(injectSessionIdMiddleware(),injectSessionIdMiddlewareOptions)}});class WebsocketSignatureV4{signer;constructor(dn){this.signer=dn.signer}presign(dn,ms={}){return this.signer.presign(dn,ms)}async sign(dn,ms){return HttpRequest.isInstance(dn)&&isWebSocketRequest(dn)?{...await this.signer.presign({...dn,body:""},{...ms,expiresIn:60,unsignableHeaders:new Set(Object.keys(dn.headers).filter(bs=>bs!=="host"))}),body:dn.body}:this.signer.sign(dn,ms)}signMessage(dn,ms){return this.signer.signMessage(dn,ms)}}const resolveWebSocketConfig=ds=>{const{signer:dn}=ds;return Object.assign(ds,{signer:async ms=>{const xs=await dn(ms);if(validateSigner(xs))return new WebsocketSignatureV4({signer:xs});throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor.")}})},validateSigner=ds=>!!ds,getDateHeader=ds=>HttpResponse.isInstance(ds)?ds.headers?.date??ds.headers?.Date:void 0,getAgeHeader=ds=>HttpResponse.isInstance(ds)?ds.headers?.age??ds.headers?.Age:void 0,getSkewCorrectedDate=ds=>new Date(Date.now()+ds),getUpdatedSystemClockOffset=(ds,dn,ms,xs)=>{if(xs!==void 0)return dn;const bs=Date.parse(ds),Es=Date.now();return ms!==void 0&&Es-ms>9e5?dn:ms!==void 0?bs-(ms+Es)/2:bs-Es},throwSigningPropertyError=(ds,dn)=>{if(!dn)throw new Error(`Property \`${ds}\` is not resolved for AWS SDK SigV4Auth`);return dn},validateSigningProperties=async ds=>{const dn=throwSigningPropertyError("context",ds.context),ms=throwSigningPropertyError("config",ds.config),xs=dn.endpointV2?.properties?.authSchemes?.[0],Es=await throwSigningPropertyError("signer",ms.signer)(xs),ws=ds?.signingRegion,Rs=ds?.signingRegionSet,js=ds?.signingName;return{config:ms,signer:Es,signingRegion:ws,signingRegionSet:Rs,signingName:js}};class AwsSdkSigV4Signer{async sign(dn,ms,xs){if(!HttpRequest.isInstance(dn))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const bs=await validateSigningProperties(xs),{config:Es,signer:ws}=bs;let{signingRegion:Rs,signingName:js}=bs;const Cs=xs.context;if(Cs?.authSchemes?.length??!1){const[Os,Ms]=Cs.authSchemes;Os?.name==="sigv4a"&&Ms?.name==="sigv4"&&(Rs=Ms?.signingRegion??Rs,js=Ms?.signingName??js)}const As=await Es.disableClockSkewCorrection?.()===!0;return xs._disableClockSkewCorrection=As,As||(xs._preRequestSystemClockOffset=Es.systemClockOffset,xs._requestSentAt=Date.now()),await ws.sign(dn,{signingDate:As?new Date:getSkewCorrectedDate(Es.systemClockOffset),signingRegion:Rs,signingService:js})}errorHandler(dn){return ms=>{const xs=ms;if(!dn._disableClockSkewCorrection){const bs=xs.ServerTime??getDateHeader(xs.$response);if(bs){const Es=throwSigningPropertyError("config",dn.config),ws=dn._preRequestSystemClockOffset,Rs=dn._requestSentAt,js=getAgeHeader(xs.$response),Cs=getUpdatedSystemClockOffset(bs,Es.systemClockOffset,Rs,js);Es.systemClockOffset=Cs,Math.abs(Cs)>=24e4&&(Cs!==ws||ws!==void 0&&ws!==Cs)&&xs.$metadata&&(xs.$metadata.clockSkewCorrected=!0)}}throw ms}}successHandler(dn,ms){if(ms._disableClockSkewCorrection)return;const xs=getDateHeader(dn);if(xs){const bs=throwSigningPropertyError("config",ms.config),Es=ms._requestSentAt,ws=getAgeHeader(dn);bs.systemClockOffset=getUpdatedSystemClockOffset(xs,bs.systemClockOffset,Es,ws)}}}class HeaderFormatter{format(dn){const ms=[];for(const Es in dn){if(!hasOwn(dn,Es))continue;const ws=fromUtf8(Es);ms.push(Uint8Array.from([ws.byteLength]),ws,this.formatHeaderValue(dn[Es]))}const xs=new Uint8Array(ms.reduce((Es,ws)=>Es+ws.byteLength,0));let bs=0;for(const Es of ms)xs.set(Es,bs),bs+=Es.byteLength;return xs}formatHeaderValue(dn){switch(dn.type){case"boolean":return Uint8Array.from([dn.value?0:1]);case"byte":return Uint8Array.from([2,dn.value]);case"short":const ms=new DataView(new ArrayBuffer(3));return ms.setUint8(0,3),ms.setInt16(1,dn.value,!1),new Uint8Array(ms.buffer);case"integer":const xs=new DataView(new ArrayBuffer(5));return xs.setUint8(0,4),xs.setInt32(1,dn.value,!1),new Uint8Array(xs.buffer);case"long":const bs=new Uint8Array(9);return bs[0]=5,bs.set(dn.value.bytes,1),bs;case"binary":const Es=new DataView(new ArrayBuffer(3+dn.value.byteLength));Es.setUint8(0,6),Es.setUint16(1,dn.value.byteLength,!1);const ws=new Uint8Array(Es.buffer);return ws.set(dn.value,3),ws;case"string":const Rs=fromUtf8(dn.value),js=new DataView(new ArrayBuffer(3+Rs.byteLength));js.setUint8(0,7),js.setUint16(1,Rs.byteLength,!1);const Cs=new Uint8Array(js.buffer);return Cs.set(Rs,3),Cs;case"timestamp":const As=new Uint8Array(9);return As[0]=8,As.set(Int64.fromNumber(dn.value.valueOf()).bytes,1),As;case"uuid":if(!UUID_PATTERN.test(dn.value))throw new Error(`Invalid UUID received: ${dn.value}`);const ks=new Uint8Array(17);return ks[0]=9,ks.set(fromHex(dn.value.replace(/-/g,"")),1),ks}
18}}var HEADER_VALUE_TYPE;(function(ds){ds[ds.boolTrue=0]="boolTrue",ds[ds.boolFalse=1]="boolFalse",ds[ds.byte=2]="byte",ds[ds.short=3]="short",ds[ds.integer=4]="integer",ds[ds.long=5]="long",ds[ds.byteArray=6]="byteArray",ds[ds.string=7]="string",ds[ds.timestamp=8]="timestamp",ds[ds.uuid=9]="uuid"})(HEADER_VALUE_TYPE||(HEADER_VALUE_TYPE={}));const UUID_PATTERN=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Int64{bytes;constructor(dn){if(this.bytes=dn,dn.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(dn){if(dn>9223372036854776e3||dn<-9223372036854776e3)throw new Error(`${dn} is too large (or, if negative, too small) to represent as an Int64`);const ms=new Uint8Array(8);for(let xs=7,bs=Math.abs(Math.round(dn));xs>-1&&bs>0;xs--,bs/=256)ms[xs]=bs;return dn<0&&negate(ms),new Int64(ms)}valueOf(){const dn=this.bytes.slice(0),ms=dn[0]&128;return ms&&negate(dn),parseInt(toHex(dn),16)*(ms?-1:1)}toString(){return String(this.valueOf())}}function negate(ds){for(let dn=0;dn<8;dn++)ds[dn]^=255;for(let dn=7;dn>-1&&(ds[dn]++,ds[dn]===0);dn--);}const ALGORITHM_QUERY_PARAM="X-Amz-Algorithm",CREDENTIAL_QUERY_PARAM="X-Amz-Credential",AMZ_DATE_QUERY_PARAM="X-Amz-Date",SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders",EXPIRES_QUERY_PARAM="X-Amz-Expires",SIGNATURE_QUERY_PARAM="X-Amz-Signature",TOKEN_QUERY_PARAM="X-Amz-Security-Token",AUTH_HEADER="authorization",AMZ_DATE_HEADER=AMZ_DATE_QUERY_PARAM.toLowerCase(),DATE_HEADER="date",GENERATED_HEADERS=[AUTH_HEADER,AMZ_DATE_HEADER,DATE_HEADER],SIGNATURE_HEADER=SIGNATURE_QUERY_PARAM.toLowerCase(),SHA256_HEADER="x-amz-content-sha256",TOKEN_HEADER=TOKEN_QUERY_PARAM.toLowerCase(),ALWAYS_UNSIGNABLE_HEADERS={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},PROXY_HEADER_PATTERN=/^proxy-/,SEC_HEADER_PATTERN=/^sec-/,ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256",EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD",UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD",MAX_CACHE_SIZE=50,KEY_TYPE_IDENTIFIER="aws4_request",MAX_PRESIGNED_TTL=3600*24*7,getCanonicalQuery=({query:ds={}})=>{const dn=[],ms={};for(const xs in ds){if(!hasOwn(ds,xs)||xs.toLowerCase()===SIGNATURE_HEADER)continue;const bs=escapeUri(xs);dn.push(bs);const Es=ds[xs];typeof Es=="string"?ms[bs]=`${bs}=${escapeUri(Es)}`:Array.isArray(Es)&&(ms[bs]=Es.slice(0).reduce((ws,Rs)=>ws.concat([`${bs}=${escapeUri(Rs)}`]),[]).sort().join("&"))}return dn.sort().map(xs=>ms[xs]).filter(xs=>xs).join("&")},iso8601=ds=>toDate(ds).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=ds=>typeof ds=="number"?new Date(ds*1e3):typeof ds=="string"?Number(ds)?new Date(Number(ds)*1e3):new Date(ds):ds;class SignatureV4Base{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:dn,credentials:ms,region:xs,service:bs,sha256:Es,uriEscapePath:ws=!0}){this.service=bs,this.sha256=Es,this.uriEscapePath=ws,this.applyChecksum=typeof dn=="boolean"?dn:!0,this.regionProvider=normalizeProvider$1(xs),this.credentialProvider=normalizeProvider$1(ms)}createCanonicalRequest(dn,ms,xs){const bs=Object.keys(ms).sort();return`${dn.method}
19${this.getCanonicalPath(dn)}
20${getCanonicalQuery(dn)}
21${bs.map(Es=>`${Es}:${ms[Es]}`).join(`
22`)}
23
24${bs.join(";")}
25${xs}`}async createStringToSign(dn,ms,xs,bs){const Es=new this.sha256;Es.update(toUint8Array(xs));const ws=await Es.digest();return`${bs}
26${dn}
27${ms}
28${toHex(ws)}`}getCanonicalPath({path:dn}){if(this.uriEscapePath){const ms=[];for(const Es of dn.split("/"))Es?.length!==0&&Es!=="."&&(Es===".."?ms.pop():ms.push(Es));const xs=`${dn?.startsWith("/")?"/":""}${ms.join("/")}${ms.length>0&&dn?.endsWith("/")?"/":""}`;return escapeUri(xs).replace(/%2F/g,"/")}return dn}validateResolvedCredentials(dn){if(typeof dn!="object"||typeof dn.accessKeyId!="string"||typeof dn.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(dn){const ms=iso8601(dn).replace(/[-:]/g,"");return{longDate:ms,shortDate:ms.slice(0,8)}}getCanonicalHeaderList(dn){return Object.keys(dn).sort().join(";")}}const signingKeyCache={}
28,cacheQueue=[],createScope=(ds,dn,ms)=>`${ds}/${dn}/${ms}/${KEY_TYPE_IDENTIFIER}`,getSigningKey=async(ds,dn,ms,xs,bs)=>{const Es=await hmac(ds,dn.secretAccessKey,dn.accessKeyId),ws=`${ms}:${xs}:${bs}:${toHex(Es)}:${dn.sessionToken}`;if(ws in signingKeyCache)return signingKeyCache[ws];for(cacheQueue.push(ws);cacheQueue.length>MAX_CACHE_SIZE;)delete signingKeyCache[cacheQueue.shift()];let Rs=`AWS4${dn.secretAccessKey}`;for(const js of[ms,xs,bs,KEY_TYPE_IDENTIFIER])Rs=await hmac(ds,Rs,js);return signingKeyCache[ws]=Rs},hmac=(ds,dn,ms)=>{const xs=new ds(dn);return xs.update(toUint8Array(ms)),xs.digest()},getCanonicalHeaders=({headers:ds},dn,ms)=>{const xs={};for(const bs of Object.keys(ds).sort()){if(ds[bs]==null)continue;const Es=bs.toLowerCase();(Es in ALWAYS_UNSIGNABLE_HEADERS||dn?.has(Es)||PROXY_HEADER_PATTERN.test(Es)||SEC_HEADER_PATTERN.test(Es))&&(!ms||ms&&!ms.has(Es))||(xs[Es]=ds[bs].replace(/[\r\n]/g," ").replace(/[ \t]+/g," ").replace(/^ | $/g,""))}return xs},getPayloadHash=async({headers:ds,body:dn},ms)=>{for(const xs in ds)if(hasOwn(ds,xs)&&xs.toLowerCase()===SHA256_HEADER)return ds[xs];if(dn==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof dn=="string"||ArrayBuffer.isView(dn)||isArrayBuffer(dn)){const xs=new ms;return xs.update(toUint8Array(dn)),toHex(await xs.digest())}return UNSIGNED_PAYLOAD},hasHeader=(ds,dn)=>{ds=ds.toLowerCase();for(const ms in dn)if(hasOwn(dn,ms)&&ds===ms.toLowerCase())return!0;return!1},moveHeadersToQuery=(ds,dn={})=>{const{headers:ms,query:xs={}}=HttpRequest.clone(ds);for(const bs in ms){if(!hasOwn(ms,bs))continue;const Es=bs.toLowerCase();(Es.slice(0,6)==="x-amz-"&&!dn.unhoistableHeaders?.has(Es)||dn.hoistableHeaders?.has(Es))&&(xs[bs]=ms[bs],delete ms[bs])}return{...ds,headers:ms,query:xs}},prepareRequest=ds=>{ds=HttpRequest.clone(ds);for(const dn in ds.headers)hasOwn(ds.headers,dn)&&GENERATED_HEADERS.indexOf(dn.toLowerCase())>-1&&delete ds.headers[dn];return ds};class SignatureV4 extends SignatureV4Base{headerFormatter=new HeaderFormatter;constructor({applyChecksum:dn,credentials:ms,region:xs,service:bs,sha256:Es,uriEscapePath:ws=!0}){super({applyChecksum:dn,credentials:ms,region:xs,service:bs,sha256:Es,uriEscapePath:ws})}async presign(dn,ms={}
vendor: 2,499 bytes, lines 28-29
28){const{signingDate:xs=new Date,expiresIn:bs=3600,unsignableHeaders:Es,unhoistableHeaders:ws,signableHeaders:Rs,hoistableHeaders:js,signingRegion:Cs,signingService:As}=ms,ks=await this.credentialProvider();this.validateResolvedCredentials(ks);const Os=Cs??await this.regionProvider(),{longDate:Ms,shortDate:Ds}=this.formatDate(xs);if(bs>MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Ps=createScope(Ds,Os,As??this.service),Ls=moveHeadersToQuery(prepareRequest(dn),{unhoistableHeaders:ws,hoistableHeaders:js});ks.sessionToken&&(Ls.query[TOKEN_QUERY_PARAM]=ks.sessionToken),Ls.query[ALGORITHM_QUERY_PARAM]=ALGORITHM_IDENTIFIER,Ls.query[CREDENTIAL_QUERY_PARAM]=`${ks.accessKeyId}/${Ps}`,Ls.query[AMZ_DATE_QUERY_PARAM]=Ms,Ls.query[EXPIRES_QUERY_PARAM]=bs.toString(10);const Bs=getCanonicalHeaders(Ls,Es,Rs);return Ls.query[SIGNED_HEADERS_QUERY_PARAM]=this.getCanonicalHeaderList(Bs),Ls.query[SIGNATURE_QUERY_PARAM]=await this.getSignature(Ms,Ps,this.getSigningKey(ks,Os,Ds,As),this.createCanonicalRequest(Ls,Bs,await getPayloadHash(dn,this.sha256))),Ls}async sign(dn,ms){return typeof dn=="string"?this.signString(dn,ms):dn.headers&&dn.payload?this.signEvent(dn,ms):dn.message?this.signMessage(dn,ms):this.signRequest(dn,ms)}async signEvent({headers:dn,payload:ms},{signingDate:xs=new Date,priorSignature:bs,signingRegion:Es,signingService:ws,eventStreamCredentials:Rs}){const js=Es??await this.regionProvider(),{shortDate:Cs,longDate:As}=this.formatDate(xs),ks=createScope(Cs,js,ws??this.service),Os=await getPayloadHash({headers:{},body:ms},this.sha256),Ms=new this.sha256;Ms.update(dn);const Ds=toHex(await Ms.digest()),Ps=[EVENT_ALGORITHM_IDENTIFIER,As,ks,bs,Ds,Os].join(`
29`);return this.signString(Ps,{signingDate:xs,signingRegion:js,signingService:ws,eventStreamCredentials:Rs})}async signMessage(dn,{signingDate:ms=new Date,signingRegion:xs,signingService:bs,eventStreamCredentials:Es}){return this.signEvent({headers:this.headerFormatter.format(dn.message.headers),payload:dn.message.body},{signingDate:ms,signingRegion:xs,signingService:bs,priorSignature:dn.priorSignature,eventStreamCredentials:Es}).then(Rs=>({message:dn.message,signature:Rs}))}async signString(dn,{signingDate:ms=new Date,signingRegion:xs,signingService:bs,eventStreamCredentials:Es}={}){const ws=Es??await this.credentialProvider();this.validateResolvedCredentials(ws);const Rs=xs??await this.regionProvider(),{shortDate:js}
29=this.formatDate(ms),Cs=new this.sha256(await this.getSigningKey(ws,Rs,js,bs));return Cs.update(toUint8Array(dn)),toHex(await Cs.digest())}async signRequest(dn,{signingDate:ms=new Date,signableHeaders:xs,unsignableHeaders:bs,signingRegion:Es,signingService:ws}={}){const Rs=await this.credentialProvider();this.validateResolvedCredentials(Rs);const js=Es??await this.regionProvider(),Cs=prepareRequest(dn),{longDate:As,shortDate:ks}=this.formatDate(ms),Os=createScope(ks,js,ws??this.service);Cs.headers[AMZ_DATE_HEADER]=As,Rs.sessionToken&&(Cs.headers[TOKEN_HEADER]=Rs.sessionToken);const Ms=await getPayloadHash(Cs,this.sha256);!hasHeader(SHA256_HEADER,Cs.headers)&&this.applyChecksum&&(Cs.headers[SHA256_HEADER]=Ms);const Ds=getCanonicalHeaders(Cs,bs,xs),Ps=await this.getSignature(As,Os,this.getSigningKey(Rs,js,ks,ws),this.createCanonicalRequest(Cs,Ds,Ms));return Cs.headers[AUTH_HEADER]=`${ALGORITHM_IDENTIFIER} Credential=${Rs.accessKeyId}/${Os}, SignedHeaders=${this.getCanonicalHeaderList(Ds)}, Signature=${Ps}`,Cs}async getSignature(dn,ms,xs,bs){const Es=await this.createStringToSign(dn,ms,bs,ALGORITHM_IDENTIFIER),ws=new this.sha256(await xs);return ws.update(toUint8Array(Es)),toHex(await ws.digest())}getSigningKey(dn,ms,xs,bs){return getSigningKey(this.sha256,dn,xs,ms,bs||this.service)}}const bindResolveAwsSdkSigV4Config=ds=>dn=>{let ms=dn.credentials,xs=!!dn.credentials,bs;Object.defineProperty(dn,"credentials",{set(As){As&&As!==ms&&As!==bs&&(xs=!0),ms=As;const ks=normalizeCredentialProvider(dn,{credentials:ms,credentialDefaultProvider:dn.credentialDefaultProvider}),Os=bindCallerConfig(dn,ks);if(xs&&!Os.attributed){const Ms=typeof ms=="object"&&ms!==null;bs=async Ds=>{const Ls=await Os(Ds);return Ms&&(!Ls.$source||Object.keys(Ls.$source).length===0)?setCredentialFeature(Ls,"CREDENTIALS_CODE","e"):Ls},bs.memoized=Os.memoized,bs.configBound=Os.configBound,bs.attributed=!0}else bs=Os},get(){return bs},enumerable:!0,configurable:!0}),dn.credentials=ms;const{signingEscapePath:Es=!0,systemClockOffset:ws=dn.systemClockOffset||0,sha256:Rs}=dn;let js;return dn.signer?js=normalizeProvider(dn.signer):dn.regionInfoProvider?js=()=>normalizeProvider(dn.region)().then(async As=>[await dn.regionInfoProvider(As,{useFipsEndpoint:await dn.useFipsEndpoint(),useDualstackEndpoint:await dn.useDualstackEndpoint()})||{},As]).then(([As,ks])=>{const{signingRegion:Os,signingService:Ms}=As;dn.signingRegion=dn.signingRegion||Os||ks,dn.signingName=dn.signingName||Ms||dn.serviceId;const Ds={...dn,credentials:dn.credentials,region:dn.signingRegion,service:dn.signingName,sha256:Rs,uriEscapePath:Es},Ps=dn.signerConstructor||SignatureV4;return new Ps(Ds)}):js=async As=>{As=Object.assign({},{name:"sigv4",signingName:dn.signingName||dn.defaultSigningName,signingRegion:await normalizeProvider(dn.region)(),properties:{}},As);const ks=As.signingRegion,Os=As.signingName;dn.signingRegion=dn.signingRegion||ks,dn.signingName=dn.signingName||Os||dn.serviceId;const Ms={...dn,credentials:dn.credentials,region:dn.signingRegion,service:dn.signingName,sha256:Rs,uriEscapePath:Es},Ds=dn.signerConstructor||SignatureV4;return new Ds(Ms)},Object.assign(dn,{systemClockOffset:ws,signingEscapePath:Es,signer:js,disableClockSkewCorrection:normalizeProvider(dn.disableClockSkewCorrection??ds)})};function normalizeCredentialProvider(ds,{credentials:dn,credentialDefaultProvider:ms}){let xs;return dn?dn?.memoized?xs=dn:xs=memoizeIdentityProvider(dn,isIdentityExpired,doesIdentityRequireRefresh):ms?xs=normalizeProvider(ms(Object.assign({},ds,{parentClientConfig:ds}))):xs=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},xs.memoized=!0,xs}function bindCallerConfig(ds,dn){if(dn.configBound)return dn;const ms=async xs=>dn({...xs,callerClientConfig:ds});return ms.memoized=dn.memoized,ms.configBound=!0,ms}const DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION=!1,resolveAwsSdkSigV4Config=bindResolveAwsSdkSigV4Config(DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION),defaultTranscribeStreamingHttpAuthSchemeParametersProvider=async(ds,dn,ms)=>({operation:getSmithyContext(dn).operation,region:await normalizeProvider$1(ds.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption(ds){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"transcribe",region:ds.region},propertiesExtractor:(dn,ms)=>({signingProperties:{config:dn,context:ms}})}}const defaultTranscribeStreamingHttpAuthSchemeProvider=ds=>{const dn=[];switch(ds.operation){default:dn.push(createAwsAuthSigv4HttpAuthOption(ds))}return dn},resolveHttpAuthSchemeConfig=ds=>{const dn=resolveAwsSdkSigV4Config(ds);return Object.assign(dn,{authSchemePreference:normalizeProvider$1(ds.authSchemePreference??[])})},resolveClientEndpointParameters=ds=>Object.assign(ds,{useDualstackEndpoint:ds.useDualstackEndpoint??!1,useFipsEndpoint:ds.useFipsEndpoint??!1,defaultSigningName:"transcribe"}
29),commonParams={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},version="3.1146.0",packageInfo={version},eventStreamPayloadHandler={handle:(ds,dn)=>ds(dn)},injectResponseValuesMiddleware=ds=>dn=>async ms=>{ms.input.SessionId===void 0&&isWebSocket(ds)&&(ms.input.SessionId=v4());const xs={...ms.input},bs=await dn(ms),Es=bs.output;for(const ws of Object.keys(Es))Es[ws]===void 0&&xs[ws]&&(Es[ws]=xs[ws]);return bs},isWebSocket=ds=>ds.requestHandler.metadata?.handlerProtocol?.includes("websocket"),injectResponseValuesMiddlewareOptions={step:"initialize",name:"injectResponseValuesMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],override:!0},websocketPortMiddleware=ds=>dn=>ms=>{const{request:xs}=ms;return HttpRequest.isInstance(xs)&&ds.requestHandler.metadata?.handlerProtocol?.includes("websocket")&&(xs.hostname=`${xs.hostname}:8443`,xs.headers.host=xs.hostname),dn(ms)},websocketPortMiddlewareOptions={name:"websocketPortMiddleware",tags:["WEBSOCKET","EVENT_STREAM","PORT"],relation:"after",toMiddleware:"eventStreamHeaderMiddleware",override:!0},getTranscribeStreamingPlugin=ds=>({applyToStack:dn=>{dn.addRelativeTo(websocketPortMiddleware(ds),websocketPortMiddlewareOptions),dn.add(injectResponseValuesMiddleware(ds),injectResponseValuesMiddlewareOptions)}});class ProtocolLib{queryCompat;errorRegistry;constructor(dn=!1){this.queryCompat=dn}resolveRestContentType(dn,ms){const xs=ms.getMemberSchemas(),bs=Object.values(xs).find(Es=>!!Es.getMergedTraits().httpPayload);if(bs){const Es=bs.getMergedTraits().mediaType;return Es||(bs.isStringSchema()?"text/plain":bs.isBlobSchema()?"application/octet-stream":dn)}else if(!ms.isUnitSchema()&&Object.values(xs).find(ws=>{const{httpQuery:Rs,httpQueryParams:js,httpHeader:Cs,httpLabel:As,httpPrefixHeaders:ks}=ws.getMergedTraits();return!Rs&&!js&&!Cs&&!As&&ks===void 0}))return dn}async getErrorSchemaOrThrowBaseException(dn,ms,xs,bs,Es,ws){let Rs=dn;dn.includes("#")&&([,Rs]=dn.split("#"));const js={$metadata:Es,$fault:xs.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:ws?.(this.errorRegistry,Rs)??this.errorRegistry.getSchema(dn),errorMetadata:js}}catch{bs.message=bs.message??bs.Message??"UnknownError";const As=this.errorRegistry,ks=As.getBaseException();if(ks){const Ds=As.getErrorCtor(ks)??Error;throw this.decorateServiceException(Object.assign(new Ds({name:Rs}),js),bs)}const Os=bs,Ms=Os?.message??Os?.Message??Os?.Error?.Message??Os?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(Ms),{name:Rs},js),bs)}}compose(dn,ms,xs){let bs=xs;ms.includes("#")&&([bs]=ms.split("#"));const Es=TypeRegistry.for(bs),ws=TypeRegistry.for("smithy.ts.sdk.synthetic."+xs);dn.copyFrom(Es),dn.copyFrom(ws),this.errorRegistry=dn}decorateServiceException(dn,ms={}){if(this.queryCompat){const xs=dn.Message??ms.Message,bs=decorateServiceException(dn,ms);xs&&(bs.message=xs);const Es=bs.Error??{};Es.Type=bs.Error?.Type,Es.Code=bs.Error?.Code,Es.Message=bs.Error?.message??bs.Error?.Message??xs,bs.Error=Es;const ws=bs.$metadata.requestId;return ws&&(bs.RequestId=ws),bs}return decorateServiceException(dn,ms)}setQueryCompatError(dn,ms){const xs=ms.headers?.["x-amzn-query-error"];if(dn!==void 0&&xs!=null){const[bs,Es]=xs.split(";"),ws=Object.keys(dn),Rs={Code:bs,Type:Es};dn.Code=bs,dn.Type=Es;for(let js=0;js<ws.length;js++){const Cs=ws[js];Rs[Cs==="message"?"Message":Cs]=dn[Cs]}delete Rs.__type,dn.Error=Rs}}queryCompatOutput(dn,ms){dn.Error&&(ms.Error=dn.Error),dn.Type&&(ms.Type=dn.Type),dn.Code&&(ms.Code=dn.Code)}findQueryCompatibleError(dn,ms){try{return dn.getSchema(ms)}catch{return dn.find(bs=>NormalizedSchema.of(bs).getMergedTraits().awsQueryError?.[0]===ms)}}}class SerdeContextConfig{serdeContext;setSerdeContext(dn){this.serdeContext=dn}}class UnionSerde{from;to;keys;constructor(dn,ms){this.from=dn,this.to=ms;const xs=Object.keys(this.from),bs=new Set(xs);bs.delete("__type"),this.keys=bs}
29mark(dn){this.keys.delete(dn)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const dn=this.keys.values().next().value,ms=this.from[dn];this.to.$unknown=[dn,ms]}}}let canParseBuffer;function detectBufferParsing(){if(canParseBuffer===void 0)try{if(typeof Buffer!="function")canParseBuffer=!1;else{const ds=JSON.parse(Buffer.from([123,125]));canParseBuffer=ds!==null&&typeof ds=="object"}}catch{canParseBuffer=!1}return canParseBuffer}function jsonReviver(ds,dn,ms){if(ms?.source){const xs=ms.source;if(typeof dn=="number")return dn<=Number.MAX_SAFE_INTEGER&&dn>=Number.MIN_SAFE_INTEGER?isRepresentable(xs,dn)?dn:new NumericValue(xs,"bigDecimal"):isFractionalBigNumeric(xs)?new NumericValue(xs,"bigDecimal"):/[eE]/.test(xs)?expandExponentToBigInt(xs):BigInt(xs)}return dn}function isFractionalBigNumeric(ds){const dn=ds.indexOf(".");if(dn===-1)return!1;const ms=ds.search(/[eE]/);if(ms===-1)return!0;const xs=ms-dn-1;return parseInt(ds.slice(ms+1),10)<xs}function isRepresentable(ds,dn){if(ds===String(dn)||Object.is(dn,-0))return!0;if(/[eE]/.test(ds))return expandToDecimal(ds)===expandToDecimal(String(dn));const ms=ds.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,""),xs=String(dn);return ms===xs?!0:/[eE]/.test(xs)?ms===expandToDecimal(xs):!1}function expandToDecimal(ds){const dn=ds.startsWith("-"),ms=dn?ds.slice(1):ds,xs=ms.search(/[eE]/);let bs;if(xs===-1)bs=ms;else{const Es=parseInt(ms.slice(xs+1),10),ws=ms.slice(0,xs),Rs=ws.indexOf(".");let js,Cs;Rs===-1?(js=ws,Cs=ws.length):(js=ws.slice(0,Rs)+ws.slice(Rs+1),Cs=Rs),js=js.replace(/0+$/,"")||"0";const As=Cs+Es;js==="0"?bs="0":As<=0?bs="0."+"0".repeat(-As)+js:As>=js.length?bs=js+"0".repeat(As-js.length):bs=js.slice(0,As)+"."+js.slice(As)}return bs.includes(".")&&(bs=bs.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),(dn?"-":"")+bs}function expandExponentToBigInt(ds){const dn=ds.search(/[eE]/),ms=parseInt(ds.slice(dn+1),10),xs=ds.startsWith("-"),bs=ds.slice(xs?1:0,dn),Es=bs.indexOf(".");let ws,Rs;if(Es===-1)ws=bs,Rs=ms;else{ws=bs.slice(0,Es)+bs.slice(Es+1);const Cs=bs.length-Es-1;Rs=ms-Cs}ws=ws.replace(/0+$/,"")||"0";const js=BigInt(ws)*10n**BigInt(Rs+(bs.replace(".","").length-ws.length));return xs?-js:js}const REVIVER_SYMBOL=Symbol.for("@aws-sdk/reviver");function needsReviver(ds){const dn=NormalizedSchema.of(ds),ms=dn.getSchema();
29if(Array.isArray(ms)&&dn.isStructSchema()){if(REVIVER_SYMBOL in ms)return ms[REVIVER_SYMBOL];const xs=_check(dn,new Set);return ms[REVIVER_SYMBOL]=xs,xs}return _check(dn,new Set)}function _check(ds,dn){const ms=ds.getSchema();if(dn.has(ms))return!1;if(dn.add(ms),ds.isBigIntegerSchema()||ds.isBigDecimalSchema())return!0;if(ds.isStructSchema()){for(const[,xs]of ds.structIterator())if(_check(xs,dn))return!0}else if(ds.isListSchema()||ds.isMapSchema()){if(_check(ds.getValueSchema(),dn))return!0}else if(ds.isDocumentSchema())return!0;return!1}const collectBodyString=(ds,dn)=>collectBody(ds,dn).then(ms=>(dn?.utf8Encoder??toUtf8)(ms));async function parseJsonBody(ds,dn,ms){let xs;if(detectBufferParsing()&&typeof ds?.[Symbol.asyncIterator]=="function"){const Es=await collectBody(ds,dn);typeof Buffer=="function"&&(Buffer.isBuffer(Es)?xs=Es:xs=Buffer.from(Es.buffer,Es.byteOffset,Es.byteLength))}if(xs||(xs=await collectBodyString(ds,dn)),xs.length===0)return{};const bs=ms&&needsReviver(ms)?jsonReviver:void 0;try{return JSON.parse(xs,bs)}catch(Es){throw Es?.name==="SyntaxError"&&Object.defineProperty(Es,"$responseBodyText",{value:typeof xs=="string"?xs:xs.toString("utf8")}),Es}}const findKey=(ds,dn)=>Object.keys(ds).find(ms=>ms.toLowerCase()===dn.toLowerCase()),sanitizeErrorCode=ds=>{let dn=ds;return typeof dn=="number"&&(dn=dn.toString()),dn.indexOf(",")>=0&&(dn=dn.split(",")[0]),dn.indexOf(":")>=0&&(dn=dn.split(":")[0]),dn.indexOf("#")>=0&&(dn=dn.split("#")[1]),dn},loadRestJsonErrorCode=(ds,dn)=>loadErrorCode(ds,dn,["header","code","type"]),loadErrorCode=({headers:ds},dn,ms)=>{for(;ms.length>0;)switch(ms.shift()){case"header":const bs=findKey(ds??{},"x-amzn-errortype");if(bs!==void 0)return sanitizeErrorCode(ds[bs]);break;case"code":const Es=findKey(dn??{},"code");if(Es&&dn[Es]!==void 0)return sanitizeErrorCode(dn[Es]);break;case"type":if(dn?.__type!==void 0)return sanitizeErrorCode(dn.__type);break}};function writeKey(ds){Object.defineProperty(ds,"__proto__",{value:void 0,writable:!0,enumerable:!0,configurable:!0})}class JsonShapeDeserializer2 extends SerdeContextConfig{settings;constructor(dn){super(),this.settings=dn}async read(dn,ms){const xs=needsReviver(dn)?jsonReviver:void 0;let bs;if(typeof ms=="string"){if(ms.length===0)return{};bs=JSON.parse(ms,xs)}else if(ms instanceof Uint8Array&&detectBufferParsing()){if(ms.byteLength===0)return{};const Es=Buffer.isBuffer(ms)?ms:Buffer.from(ms.buffer,ms.byteOffset,ms.byteLength);bs=JSON.parse(Es,xs)}else bs=await parseJsonBody(ms,this.serdeContext,dn);return this._read(dn,bs)}readObject(dn,ms){return this._read(dn,ms)}_read(dn,ms){const xs=ms!==null&&typeof ms=="object",bs=NormalizedSchema.of(dn);if(xs){if(bs.isStructSchema())return this._readStruct(bs,ms);if(Array.isArray(ms)&&bs.isListSchema()){const ws=bs.getValueSchema();if(this.needsTransform(ws))for(let Rs=0;Rs<ms.length;++Rs)ms[Rs]=this._read(ws,ms[Rs]);return ms}if(bs.isMapSchema()){const ws=bs.getValueSchema(),Rs=ms;if(this.needsTransform(ws))for(const js in Rs)js==="__proto__"&&writeKey(Rs),Rs[js]=this._read(ws,Rs[js]);return Rs}}if(bs.isBlobSchema()&&typeof ms=="string")return fromBase64(ms);const Es=bs.getMergedTraits().mediaType;if(bs.isStringSchema()&&typeof ms=="string"&&Es)return Es==="application/json"||Es.endsWith("+json")?LazyJsonString.from(ms):ms;if(bs.isTimestampSchema()&&ms!=null)switch(determineTimestampFormat(bs,this.settings)){case 5:return parseRfc3339DateTimeWithOffset(ms);case 6:return parseRfc7231DateTime(ms);case 7:return parseEpochTimestamp(ms);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",ms),new Date(ms)}if(bs.isBigIntegerSchema()&&(typeof ms=="number"||typeof ms=="string"))return BigInt(ms);if(bs.isBigDecimalSchema()&&ms!=null){if(ms instanceof NumericValue)return ms;const ws=ms;return ws.type==="bigDecimal"&&"string"in ws?new NumericValue(ws.string,ws.type):new NumericValue(String(ms),"bigDecimal")}if(bs.isNumericSchema()&&typeof ms=="string"){switch(ms){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return ms}if(bs.isDocumentSchema()&&xs)if(Array.isArray(ms))for(let ws=0;ws<ms.length;++ws){const Rs=ms[ws];Rs instanceof NumericValue||(ms[ws]=this._read(bs,Rs))}else{const ws=ms;for(const Rs in ws){Rs==="__proto__"&&writeKey(ws);const js=ws[Rs];js instanceof NumericValue||(ws[Rs]=this._read(bs,js))}}return ms}_readStruct(dn,ms){const xs=dn.isUnionSchema(),bs={};let Es;const ws=typeof ms.__type=="string",{jsonName:Rs}=this.settings;Rs&&ws&&(Es={});let js;xs&&(js=new UnionSerde(ms,bs));for(const[Cs,As]of dn.structIterator()){let ks=Cs;Rs&&(ks=As.getMergedTraits().jsonName??ks,ws&&(Es[ks]=Cs)),xs&&js.mark(ks),ms[ks]!=null&&(bs[Cs]=this._read(As,ms[ks]))}if(xs)js.writeUnknown();else if(ws)for(const Cs in ms){const As=ms[Cs],ks=Rs?Es[Cs]??Cs:Cs;
29ks in bs||(bs[ks]=As)}return bs}needsTransform(dn){return!!(dn.isBlobSchema()||dn.isTimestampSchema()||dn.isBigIntegerSchema()||dn.isBigDecimalSchema()||dn.isDocumentSchema()||dn.isStructSchema()||dn.isListSchema()||dn.isMapSchema()||dn.isStringSchema()&&dn.getMergedTraits().mediaType)}}class JsonBytesStringAdapter extends Uint8Array{string=null;static allocUnsafe(dn){if(typeof Buffer=="function"){const ms=Buffer.allocUnsafe(dn);return new JsonBytesStringAdapter(ms.buffer,ms.byteOffset,ms.byteLength)}return new JsonBytesStringAdapter(dn)}toString(){return this.s()}valueOf(){return this.s()}includes(dn,ms){return typeof dn=="string"?this.s().includes(dn,ms):Uint8Array.prototype.includes.call(this,dn,ms)}indexOf(dn,ms){return typeof dn=="string"?this.s().indexOf(dn,ms):Uint8Array.prototype.indexOf.call(this,dn,ms)}lastIndexOf(dn,ms){if(typeof dn=="string")return this.s().lastIndexOf(dn,ms);const xs=Uint8Array.prototype.lastIndexOf;return ms!==void 0?xs.call(this,dn,ms):xs.call(this,dn)}startsWith(dn,ms){return this.s().startsWith(dn,ms)}endsWith(dn,ms){return this.s().endsWith(dn,ms)}match(dn){return this.s().match(dn)}replace(dn,ms){return this.s().replace(dn,ms)}search(dn){return this.s().search(dn)}split(dn,ms){return this.s().split(dn,ms)}substring(dn,ms){return this.s().substring(dn,ms)}trim(){return this.s().trim()}trimStart(){return this.s().trimStart()}trimEnd(){return this.s().trimEnd()}charAt(dn){return this.s().charAt(dn)}charCodeAt(dn){return this.s().charCodeAt(dn)}padStart(dn,ms){return this.s().padStart(dn,ms)}padEnd(dn,ms){return this.s().padEnd(dn,ms)}repeat(dn){return this.s().repeat(dn)}toUpperCase(){return this.s().toUpperCase()}toLowerCase(){return this.s().toLowerCase()}s(){if(this.string==null){const dn=Date.now();dn>warned+6e4&&(console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. It has been automatically converted to string. In a future version this will throw an error."),warned=dn),this.string=toUtf8(this)}return this.string}}var warned=0;const encoder=new TextEncoder,OPEN_BRACE=123,CLOSE_BRACE=125,OPEN_BRACKET=91,CLOSE_BRACKET=93,QUOTE=34,COLON=58,COMMA=44,BACKSLASH=92,TRUE=new Uint8Array([116,114,117,101]),FALSE=new Uint8Array([102,97,108,115,101]),NULL=new Uint8Array([110,117,108,108]),ESCAPE_TABLE=new Array(128).fill(null);ESCAPE_TABLE[8]="b";ESCAPE_TABLE[9]="t";ESCAPE_TABLE[10]="n";ESCAPE_TABLE[12]="f";ESCAPE_TABLE[13]="r";ESCAPE_TABLE[34]='"';ESCAPE_TABLE[92]="\\";for(let ds=0;ds<32;ds++)ESCAPE_TABLE[ds]===null&&(ESCAPE_TABLE[ds]="u00"+ds.toString(16).padStart(2,"0"));const INITIAL_BUFFER_SIZE=2048;function alloc(ds){return JsonBytesStringAdapter.allocUnsafe(ds)}class JsonShapeSerializer2 extends SerdeContextConfig{settings;json;i=0;rootSchema;rawValue;passthrough=!1;constructor(dn){super(),this.settings=dn,this.json=alloc(INITIAL_BUFFER_SIZE)}write(dn,ms){this.i=0,this.rawValue=ms,this.rootSchema=NormalizedSchema.of(dn),this.passthrough=this.rootSchema.isBlobSchema()||this.rootSchema.isStringSchema(),this.passthrough||this.writeValue(this.rootSchema,ms,void 0)}writeDiscriminatedDocument(dn,ms){this.i=0,this.rootSchema=NormalizedSchema.of(dn);const xs=this.rootSchema;if(xs.isStructSchema()&&ms!=null&&typeof ms=="object"){this.writeValue(xs,ms,void 0);const bs=`"__type":"${xs.getName(!0)??"Unknown"}",`,Es=bs.length;this.ensure(Es),this.json.copyWithin(1+Es,1,this.i),encoder.encodeInto(bs,this.json.subarray(1)),this.i+=Es}else this.writeValue(xs,ms,void 0)}flush(){this.rootSchema=void 0;const dn=this.i;this.i=0;const ms=this.rawValue;if(this.rawValue=void 0,dn===0)return ms;const xs=this.json.subarray(0,dn);return this.json=alloc(INITIAL_BUFFER_SIZE),xs}ensure(dn){const{i:ms,json:xs}=this;if(ms+dn>xs.length){let bs=xs.length*2;for(;bs<ms+dn;)bs*=2;const Es=alloc(bs);Es.set(this.json),this.json=Es}}writeAscii(dn){const ms=dn.length;this.ensure(ms);let{i:xs,json:bs}=this;for(let Es=0;Es<ms;++Es)bs[xs]=dn.charCodeAt(Es),xs+=1;this.i=xs}writeAsciiQuoted(dn){const ms=dn.length;this.ensure(ms+4);let{json:xs,i:bs}=this;xs[bs++]=QUOTE;for(let Es=0;
29Es<ms;++Es)xs[bs++]=dn.charCodeAt(Es);xs[bs++]=QUOTE,this.i=bs}writeJsonString(dn){this.ensure(dn.length*3+2),this.json[this.i++]=QUOTE;const ms=dn.length;for(let xs=0;xs<ms;++xs){const bs=dn.charCodeAt(xs);if(bs>34&&bs<92)this.json[this.i++]=bs;else if(bs<128){const Es=ESCAPE_TABLE[bs];if(Es!==null){this.ensure(Es.length+1),this.json[this.i++]=BACKSLASH;for(let ws=0;ws<Es.length;ws++)this.json[this.i++]=Es.charCodeAt(ws)}else this.json[this.i++]=bs}else if(bs>=55296&&bs<=56319){const Es=xs+1<ms?dn.charCodeAt(xs+1):0;if(Es>=56320&&Es<=57343){this.ensure(4);const{written:ws}=encoder.encodeInto(dn.substring(xs,xs+2),this.json.subarray(this.i));this.i+=ws,++xs}else this.ensure(6),this.writeUnicodeEscape(bs)}else if(bs>=56320&&bs<=57343)this.ensure(6),this.writeUnicodeEscape(bs);else{let{i:Es,json:ws}=this;bs<2048?(ws[Es++]=192|bs>>6,ws[Es++]=128|bs&63):(ws[Es++]=224|bs>>12,ws[Es++]=128|bs>>6&63,ws[Es++]=128|bs&63),this.i=Es}}this.json[this.i++]=QUOTE}writeUnicodeEscape(dn){let{json:ms,i:xs}=this;ms[xs++]=BACKSLASH,ms[xs++]=117;const bs=dn.toString(16).padStart(4,"0");for(let Es=0;Es<4;++Es)ms[xs++]=bs.charCodeAt(Es);this.i=xs}static B64=(()=>{const dn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ms=new Uint8Array(64);for(let xs=0;xs<64;++xs)ms[xs]=dn.charCodeAt(xs);return ms})();writeBase64(dn){const ms=Math.ceil(dn.length/3)*4;this.ensure(ms+2);const xs=this.json,bs=JsonShapeSerializer2.B64;let Es=this.i;xs[Es++]=QUOTE;const ws=dn.length,Rs=ws%3,js=ws-Rs;for(let Cs=0;Cs<js;Cs+=3){const As=dn[Cs],ks=dn[Cs+1],Os=dn[Cs+2];xs[Es++]=bs[As>>2],xs[Es++]=bs[(As&3)<<4|ks>>4],xs[Es++]=bs[(ks&15)<<2|Os>>6],xs[Es++]=bs[Os&63]}if(Rs===2){const Cs=dn[js],As=dn[js+1];xs[Es++]=bs[Cs>>2],xs[Es++]=bs[(Cs&3)<<4|As>>4],xs[Es++]=bs[(As&15)<<2],xs[Es++]=61}else if(Rs===1){const Cs=dn[js];xs[Es++]=bs[Cs>>2],xs[Es++]=bs[(Cs&3)<<4],xs[Es++]=61,xs[Es++]=61}xs[Es++]=QUOTE,this.i=Es}
29writeValue(dn,ms,xs){if(ms==null){if(xs?.isStructSchema()){if(ms===void 0&&NormalizedSchema.of(dn).isIdempotencyToken()){this.writeAsciiQuoted(generateIdempotencyToken());return}return}this.ensure(4),this.json.set(NULL,this.i),this.i+=4;return}const bs=NormalizedSchema.of(dn),Es=typeof ms=="object";if(bs.isStringSchema()){const ws=bs.getMergedTraits().mediaType;if(ws&&(ws==="application/json"||ws.endsWith("+json"))){this.writeJsonString(LazyJsonString.from(ms).toString());return}}if(Es){if(bs.isStructSchema()){this.writeStruct(bs,ms);return}if(Array.isArray(ms)&&(bs.isListSchema()||bs.isDocumentSchema())){this.writeList(bs,ms,bs.isDocumentSchema());return}if(bs.isMapSchema()){this.writeMap(bs,ms,!1);return}if(ms instanceof Uint8Array&&(bs.isBlobSchema()||bs.isDocumentSchema())){this.writeBase64(ms);return}if(ms instanceof Date&&(bs.isTimestampSchema()||bs.isDocumentSchema())){this.writeTimestamp(bs,ms);return}if(ms instanceof NumericValue){this.writeAscii(ms.string);return}if(bs.isDocumentSchema()){Array.isArray(ms)?this.writeList(bs,ms,!0):this.writeMap(bs,ms,!0);return}const ws=JSON.stringify(ms);this.writeAscii(ws);return}if(typeof ms=="string"){if(bs.isBlobSchema()){const ws=(this.serdeContext?.base64Encoder??toBase64)(ms);this.writeAsciiQuoted(ws);return}this.writeJsonString(ms);return}if(typeof ms=="number"){if(Math.abs(ms)===1/0||Number.isNaN(ms)){this.writeAsciiQuoted(String(ms));return}const ws=String(ms);this.writeAscii(ws);return}if(typeof ms=="boolean"){this.ensure(5);let{i:ws,json:Rs}=this;ms?(Rs.set(TRUE,ws),ws+=4):(Rs.set(FALSE,ws),ws+=5),this.i=ws;return}if(typeof ms=="bigint"){this.writeAscii(ms.toString());return}this.writeAscii(String(ms))}writeStruct(dn,ms){this.ensure(2),this.json[this.i++]=OPEN_BRACE;let xs=!1;const bs=typeof ms.__type=="string";let Es;bs&&(Es=new Set);for(const[ws,Rs]of dn.structIterator()){const js=ms[ws];if(js==null&&!Rs.isIdempotencyToken())continue;xs&&(this.ensure(1),this.json[this.i++]=COMMA),xs=!0;const Cs=this.settings.jsonName?Rs.getMergedTraits().jsonName??ws:ws;Es&&(Es.add(ws),Es.add(Cs)),this.writeAsciiQuoted(Cs),this.json[this.i++]=COLON,this.writeValue(Rs,js,dn)}if(!xs&&dn.isUnionSchema()){const{$unknown:ws}=ms;if(Array.isArray(ws)){const[Rs,js]=ws;this.writeAsciiQuoted(Rs),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(15,js,dn)}}else if(bs)for(const ws in ms){if(Es.has(ws))continue;Es.add(ws);const Rs=ms[ws];xs&&(this.ensure(1),this.json[this.i++]=COMMA),xs=!0,this.writeAsciiQuoted(ws),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(15,Rs,void 0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACE}writeList(dn,ms,xs){const bs=!!dn.getMergedTraits().sparse,Es=dn.getValueSchema();if(!xs&&(Es.isStringSchema()||Es.isNumericSchema()||Es.isBooleanSchema())){let Rs=!1;for(let Cs=0;Cs<ms.length;++Cs){const As=ms[Cs];if(Number.isNaN(As)||As===1/0||As===-1/0||As==null&&!bs){Rs=!0;break}}let js;if(!Rs)js=JSON.stringify(ms);else{const Cs=[];for(let As=0;As<ms.length;++As){const ks=ms[As];ks==null&&!bs||(Number.isNaN(ks)||ks===1/0||ks===-1/0?Cs.push(String(ks)):Cs.push(ks))}js=JSON.stringify(Cs)}this.ensure(js.length*3),this.i+=encoder.encodeInto(js,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=OPEN_BRACKET;let ws=!1;for(let Rs=0;Rs<ms.length;++Rs){const js=ms[Rs];(xs?js===void 0:js==null&&!bs)||(ws&&(this.ensure(1),this.json[this.i++]=COMMA),this.writeValue(Es,js,void 0),ws=!0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACKET}writeMap(dn,ms,xs){const bs=!!dn.getMergedTraits().sparse,Es=dn.getValueSchema();if(!xs&&(Es.isStringSchema()||Es.isNumericSchema()||Es.isBooleanSchema())){let Rs;for(const Cs in ms){const As=ms[Cs];Number.isNaN(As)||As===1/0||As===-1/0?((Rs??={})[Cs]=As,ms[Cs]=String(As)):As===null&&!bs&&((Rs??={})[Cs]=null,ms[Cs]=void 0)}const js=JSON.stringify(ms);Rs&&Object.assign(ms,Rs),this.ensure(js.length*3),this.i+=encoder.encodeInto(js,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=OPEN_BRACE;let ws=!0;for(const Rs in ms){const js=ms[Rs];(xs?js===void 0:js==null&&!bs)||(ws||(this.ensure(1),this.json[this.i++]=COMMA),ws=!1,this.writeJsonString(Rs),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(Es,js,void 0))}this.ensure(1),this.json[this.i++]=CLOSE_BRACE}writeTimestamp(dn,ms){switch(determineTimestampFormat(dn,this.settings)){case 5:{const bs=ms.toISOString().replace(".000Z","Z");this.writeAsciiQuoted(bs);return}case 6:{this.writeAsciiQuoted(dateToUtcString(ms));return}case 7:{const bs=String(ms.getTime()/1e3);this.writeAscii(bs);return}default:{const bs=String(ms.getTime()/1e3);this.writeAscii(bs);return}}}}class JsonCodec2 extends SerdeContextConfig{settings;constructor(dn){super(),this.settings=dn}
29createSerializer(){const dn=new JsonShapeSerializer2(this.settings);return dn.setSerdeContext(this.serdeContext),dn}createDeserializer(){const dn=new JsonShapeDeserializer2(this.settings);return dn.setSerdeContext(this.serdeContext),dn}}class AwsRestJsonProtocol extends HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace:dn,errorTypeRegistries:ms,jsonCodec:xs}){super({defaultNamespace:dn,errorTypeRegistries:ms});const bs={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=xs??new JsonCodec2(bs),this.serializer=new HttpInterceptingShapeSerializer(this.codec.createSerializer(),bs),this.deserializer=new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),bs)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(dn){this.codec.setSerdeContext(dn),super.setSerdeContext(dn)}async serializeRequest(dn,ms,xs){const bs=await super.serializeRequest(dn,ms,xs),Es=NormalizedSchema.of(dn.input);if(!bs.headers["content-type"]){const ws=this.mixin.resolveRestContentType(this.getDefaultContentType(),Es);ws&&(bs.headers["content-type"]=ws)}return bs.body==null&&bs.headers["content-type"]===this.getDefaultContentType()&&(bs.body="{}"),bs}async deserializeResponse(dn,ms,xs){const bs=await super.deserializeResponse(dn,ms,xs),Es=NormalizedSchema.of(dn.output);for(const[ws,Rs]of Es.structIterator())Rs.getMemberTraits().httpPayload&&!(ws in bs)&&(bs[ws]=null);return bs}async handleError(dn,ms,xs,bs,Es){const ws=loadRestJsonErrorCode(xs,bs)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,ws,this.options.defaultNamespace);const{errorSchema:Rs,errorMetadata:js}=await this.mixin.getErrorSchemaOrThrowBaseException(ws,this.options.defaultNamespace,xs,bs,Es),Cs=NormalizedSchema.of(Rs),As=bs.message??bs.Message??"UnknownError",ks=this.compositeErrorRegistry.getErrorCtor(Rs)??Error,Os=new ks({});await this.deserializeHttpMessage(Rs,ms,xs,bs);const Ms={},Ds=this.codec.createDeserializer();for(const[Ps,Ls]of Cs.structIterator()){const Bs=Ls.getMergedTraits().jsonName??Ps;Ms[Ps]=Ds.readObject(Ls,bs[Bs])}throw this.mixin.decorateServiceException(Object.assign(Os,js,{$fault:Cs.getMergedTraits().error,message:As},Ms),bs)}getDefaultContentType(){return"application/json"}}const k$5="ref",a$4=-1,b$5=!0,c$6="isSet",d$4="PartitionResult",e$2="booleanEquals",f$3="getAttr",g$7={[k$5]:"Endpoint"},h$3={[k$5]:d$4},i$3={},j$4=[{[k$5]:"Region"}],_data={conditions:[[c$6,[g$7]],[c$6,j$4],["aws.partition",j$4,d$4],[e$2,[{[k$5]:"UseFIPS"},b$5]],[e$2,[{[k$5]:"UseDualStack"},b$5]],[e$2,[{fn:f$3,argv:[h$3,"supportsDualStack"]},b$5]],[e$2,[{fn:f$3,argv:[h$3,"supportsFIPS"]},b$5]]],results:[[a$4],[a$4,"Invalid Configuration: FIPS and custom endpoint are not supported"],[a$4,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[g$7,i$3],["https://transcribestreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",i$3],[a$4,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://transcribestreaming-fips.{Region}.{PartitionResult#dnsSuffix}",i$3],[a$4,"FIPS is enabled but this partition does not support FIPS"],["https://transcribestreaming.{Region}.{PartitionResult#dualStackDnsSuffix}",i$3],[a$4,"DualStack is enabled but this partition does not support DualStack"],["https://transcribestreaming.{Region}.{PartitionResult#dnsSuffix}",i$3],[a$4,"Invalid Configuration: Missing Region"]]},root$4=2,r$2=1e8,nodes=new Int32Array([-1,1,-1,0,12,3,1,4,r$2+11,2,5,r$2+11,3,8,6,4,7,r$2+10,5,r$2+8,r$2+9,4,10,9,6,r$2+6,r$2+7,5,11,r$2+5,6,r$2+4,r$2+5,3,r$2+1,13,4,r$2+2,r$2+3]),bdd=BinaryDecisionDiagram.from(nodes,root$4,_data.conditions,_data.results),cache=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver=(ds,dn={})=>cache.get(ds,()=>decideEndpoint(bdd,{endpointParams:ds,logger:dn.logger}));customEndpointFunctions.aws=awsEndpointFunctions;class TranscribeStreamingServiceException extends ServiceException{constructor(dn){super(dn),Object.setPrototypeOf(this,TranscribeStreamingServiceException.prototype)}}class BadRequestException extends TranscribeStreamingServiceException{name="BadRequestException";$fault="client";Message;constructor(dn){super({name:"BadRequestException",$fault:"client",...dn}),Object.setPrototypeOf(this,BadRequestException.prototype),this.Message=dn.Message}}class ConflictException extends TranscribeStreamingServiceException{name="ConflictException";$fault="client";Message;constructor(dn){super({name:"ConflictException",$fault:"client",...dn}),Object.setPrototypeOf(this,ConflictException.prototype),this.Message=dn.Message}}class InternalFailureException extends TranscribeStreamingServiceException{name="InternalFailureException";$fault="server";Message;constructor(dn){super({name:"InternalFailureException",$fault:"server",...dn}),Object.setPrototypeOf(this,InternalFailureException.prototype),this.Message=dn.Message}}class LimitExceededException extends TranscribeStreamingServiceException{name="LimitExceededException";$fault="client";Message;constructor(dn){super({name:"LimitExceededException",$fault:"client",...dn}),Object.setPrototypeOf(this,LimitExceededException.prototype),this.Message=dn.Message}}class ServiceUnavailableException extends TranscribeStreamingServiceException{name="ServiceUnavailableException";$fault="server";Message;constructor(dn){super({name:"ServiceUnavailableException",$fault:"server",...dn}),Object.setPrototypeOf(this,ServiceUnavailableException.prototype),this.Message=dn.Message}}class ResourceNotFoundException extends TranscribeStreamingServiceException{name="ResourceNotFoundException";$fault="client";Message;constructor(dn){super({name:"ResourceNotFoundException",$fault:"client",...dn}),Object.setPrototypeOf(this,ResourceNotFoundException.prototype),this.Message=dn.Message}}const _A="Alternative",_AC="AudioChunk",_AE="AudioEvent",_AL="AlternativeList",_AS="AudioStream",_Al="Alternatives",_BRE="BadRequestException",_C="Category",_CD="ChannelDefinition",_CDh="ChannelDefinitions",_CE="ConflictException",_CEo="ConfigurationEvent",_CI="ChannelId",_CIT="ContentIdentificationType",_CRO="ContentRedactionOutput",_CRT="C
29ontentRedactionType",_Co="Content",_Con="Confidence",_DARA="DataAccessRoleArn",_E="Entities",_ECI="EnableChannelIdentification",_EL="EntityList",_EPRS="EnablePartialResultsStabilization",_ET="EndTime",_Ent="Entity",_I="Items",_IFE="InternalFailureException",_IL="IdentifyLanguage",_ILt="ItemList",_IML="IdentifyMultipleLanguages",_IP="IsPartial",_It="Item",_LC="LanguageCode",_LEE="LimitExceededException",_LI="LanguageIdentification",_LMN="LanguageModelName",_LO="LanguageOptions",_LWS="LanguageWithScore",_M="Message",_MEe="MediaEncoding",_MSRH="MediaSampleRateHertz",_NOC="NumberOfChannels",_OEKMSKI="OutputEncryptionKMSKeyId",_OL="OutputLocation",_PCAS="PostCallAnalyticsSettings",_PET="PiiEntityTypes",_PL="PreferredLanguage",_PR="ParticipantRole",_PRS="PartialResultsStability",_R="Results",_RI="ResultId",_RIe="RequestId",_RL="ResultList",_RNFE="ResourceNotFoundException",_Re="Result",_S="Stable",_SI="SessionId",_SRW="SessionResumeWindow",_SSL="ShowSpeakerLabel",_SST="StartStreamTranscription",_SSTR="StartStreamTranscriptionRequest",_SSTRt="StartStreamTranscriptionResponse",_ST="StartTime",_SUE="ServiceUnavailableException",_Sc="Score",_Sp="Speaker",_T="Transcript",_TE="TranscriptEvent",_TF="TranscriptFormat",_TRS="TranscriptResultStream",_Ty="Type",_VFM="VocabularyFilterMatch",_VFMo="VocabularyFilterMethod",_VFN="VocabularyFilterName",_VFNo="VocabularyFilterNames",_VN="VocabularyName",_VNo="VocabularyNames",_c="client",_e$1="error",_eP="eventPayload",_h="http",_hE="httpError",_hH="httpHeader",_s$1="smithy.ts.sdk.synthetic.com.amazonaws.transcribestreaming",_se="server",_st="streaming",_xari="x-amzn-request-id",_xatcit="x-amzn-transcribe-content-identification-type",_xatcrt="x-amzn-transcribe-content-redaction-type",_xateci="x-amzn-transcribe-enable-channel-identification",_xateprs="x-amzn-transcribe-enable-partial-results-stabilization",_xatil="x-amzn-transcribe-identify-language",_xatiml="x-amzn-transcribe-identify-multiple-languages",_xatlc="x-amzn-transcribe-language-code",_xatlmn="x-amzn-transcribe-language-model-name",_xatlo="x-amzn-transcribe-language-options",_xatme="x-amzn-transcribe-media-encoding",_xatnoc="x-amzn-transcribe-number-of-channels",_xatpet="x-amzn-transcribe-pii-entity-types",_xatpl="x-amzn-transcribe-preferred-language",_xatprs="x-amzn-transcribe-partial-results-stability",_xatsi="x-amzn-transcribe-session-id",_xatsr="x-amzn-transcribe-sample-rate",_xatsrw="x-amzn-transcribe-session-resume-window",_xatssl="x-amzn-transcribe-show-speaker-label",_xattf="x-amzn-transcribe-transcript-format",_xatvfm="x-amzn-transcribe-vocabulary-filter-method",_xatvfn="x-amzn-transcribe-vocabulary-filter-name",_xatvfn_="x-amzn-transcribe-vocabulary-filter-names",_xatvn="x-amzn-transcribe-vocabulary-name",_xatvn_="x-amzn-transcribe-vocabulary-names",n0="com.amazonaws.transcribestreaming",_s_registry=new TypeRegistry(_s$1);var TranscribeStreamingServiceException$=[-3,_s$1,"TranscribeStreamingServiceException",0,[],[]];_s_registry.registerError(TranscribeStreamingServiceException$,TranscribeStreamingServiceException);const n0_registry=new TypeRegistry(n0);var BadRequestException$=[-3,n0,_BRE,{[_e$1]:_c,[_hE]:400},[_M],[0]];n0_registry.registerError(BadRequestException$,BadRequestException);var ConflictException$=[-3,n0,_CE,{[_e$1]:_c,[_hE]:409},[_M],[0]];n0_registry.registerError(ConflictException$,ConflictException);var InternalFailureException$=[-3,n0,_IFE,{[_e$1]:_se,[_hE]:500},[_M],[0]];n0_registry.registerError(InternalFailureException$,InternalFailureException);var LimitExceededException$=[-3,n0,_LEE,{[_e$1]:_c,[_hE]:429},[_M],[0]];n0_registry.registerError(LimitExceededException$,LimitExceededException);var ResourceNotFoundException$=[-3,n0,_RNFE,{[_e$1]:_c,[_hE]:404},[_M],[0]];n0_registry.registerError(ResourceNotFoundException$,ResourceNotFoundException);var ServiceUnavailableException$=[-3,n0,_SUE,{[_e$1]:_se,[_hE]:503},[_M],[0]];n0_registry.registerError(ServiceUnavailableException$,ServiceUnavailableException);const errorTypeRegistries=[_s_registry,n0_registry];var Alternative$=[3,n0,_A,0,[_T,_I,_E],[0,()=>ItemList,()=>EntityList]],AudioEvent$=[3,n0,_AE,0,[_AC],[[21,{[_eP]:1}]]],ChannelDefinition$=[3,n0,_CD,0,[_CI,_PR],[1,0],2],ConfigurationEvent$=[3,n0,_CEo,0,[_CDh,_PCAS],[()=>ChannelDefinitions,()=>
29PostCallAnalyticsSettings$]],Entity$=[3,n0,_Ent,0,[_ST,_ET,_C,_Ty,_Co,_Con],[1,1,0,0,0,1]],Item$=[3,n0,_It,0,[_ST,_ET,_Ty,_Co,_VFM,_Sp,_Con,_S],[1,1,0,0,2,0,1,2]],LanguageWithScore$=[3,n0,_LWS,0,[_LC,_Sc],[0,1]],PostCallAnalyticsSettings$=[3,n0,_PCAS,0,[_OL,_DARA,_CRO,_OEKMSKI],[0,0,0,0],2],Result$=[3,n0,_Re,0,[_RI,_ST,_ET,_IP,_Al,_CI,_LC,_LI],[0,1,1,2,()=>AlternativeList,0,0,()=>LanguageIdentification]],StartStreamTranscriptionRequest$=[3,n0,_SSTR,0,[_MSRH,_MEe,_AS,_LC,_VN,_SI,_VFN,_VFMo,_SSL,_ECI,_NOC,_EPRS,_PRS,_CIT,_CRT,_PET,_LMN,_IL,_LO,_PL,_IML,_VNo,_VFNo,_SRW,_TF],[[1,{[_hH]:_xatsr}],[0,{[_hH]:_xatme}],[()=>AudioStream$,16],[0,{[_hH]:_xatlc}],[0,{[_hH]:_xatvn}],[0,{[_hH]:_xatsi}],[0,{[_hH]:_xatvfn}],[0,{[_hH]:_xatvfm}],[2,{[_hH]:_xatssl}],[2,{[_hH]:_xateci}],[1,{[_hH]:_xatnoc}],[2,{[_hH]:_xateprs}],[0,{[_hH]:_xatprs}],[0,{[_hH]:_xatcit}],[0,{[_hH]:_xatcrt}],[0,{[_hH]:_xatpet}],[0,{[_hH]:_xatlmn}],[2,{[_hH]:_xatil}],[0,{[_hH]:_xatlo}],[0,{[_hH]:_xatpl}],[2,{[_hH]:_xatiml}],[0,{[_hH]:_xatvn_}],[0,{[_hH]:_xatvfn_}],[1,{[_hH]:_xatsrw}],[0,{[_hH]:_xattf}]],3],StartStreamTranscriptionResponse$=[3,n0,_SSTRt,0,[_RIe,_LC,_MSRH,_MEe,_VN,_SI,_TRS,_VFN,_VFMo,_SSL,_ECI,_NOC,_EPRS,_PRS,_CIT,_CRT,_PET,_LMN,_IL,_LO,_PL,_IML,_VNo,_VFNo,_SRW,_TF],[[0,{[_hH]:_xari}],[0,{[_hH]:_xatlc}],[1,{[_hH]:_xatsr}],[0,{[_hH]:_xatme}],[0,{[_hH]:_xatvn}],[0,{[_hH]:_xatsi}],[()=>TranscriptResultStream$,16],[0,{[_hH]:_xatvfn}],[0,{[_hH]:_xatvfm}],[2,{[_hH]:_xatssl}],[2,{[_hH]:_xateci}],[1,{[_hH]:_xatnoc}],[2,{[_hH]:_xateprs}],[0,{[_hH]:_xatprs}],[0,{[_hH]:_xatcit}],[0,{[_hH]:_xatcrt}],[0,{[_hH]:_xatpet}],[0,{[_hH]:_xatlmn}],[2,{[_hH]:_xatil}],[0,{[_hH]:_xatlo}],[0,{[_hH]:_xatpl}],[2,{[_hH]:_xatiml}],[0,{[_hH]:_xatvn_}],[0,{[_hH]:_xatvfn_}],[1,{[_hH]:_xatsrw}],[0,{[_hH]:_xattf}]]],Transcript$=[3,n0,_T,0,[_R],[()=>ResultList]],TranscriptEvent$=[3,n0,_TE,0,[_T],[()=>Transcript$]],AlternativeList=[1,n0,_AL,0,()=>Alternative$],ChannelDefinitions=[1,n0,_CDh,0,()=>ChannelDefinition$],EntityList=[1,n0,_EL,0,()=>Entity$],ItemList=[1,n0,_ILt,0,()=>Item$],LanguageIdentification=[1,n0,_LI,0,()=>LanguageWithScore$],ResultList=[1,n0,_RL,0,()=>Result$],AudioStream$=[4,n0,_AS,{[_st]:1},[_AE,_CEo],[[()=>AudioEvent$,0],()=>ConfigurationEvent$]],TranscriptResultStream$=[4,n0,_TRS,{[_st]:1},[_TE,_BRE,_LEE,_IFE,_CE,_SUE],[()=>TranscriptEvent$,[()=>BadRequestException$,0],[()=>LimitExceededException$,0],[()=>InternalFailureException$,0],[()=>ConflictException$,0],[()=>ServiceUnavailableException$,0]]],StartStreamTranscription$=[9,n0,_SST,{[_h]:["POST","/stream-transcription",200]},()=>StartStreamTranscriptionRequest$,()=>StartStreamTranscriptionResponse$];const getRuntimeConfig$1=ds=>({apiVersion:"2017-10-26",base64Decoder:ds?.base64Decoder??fromBase64,base64Encoder:ds?.base64Encoder??toBase64,disableHostPrefix:ds?.disableHostPrefix??!1,endpointProvider:ds?.endpointProvider??defaultEndpointResolver,extensions:ds?.extensions??[],httpAuthSchemeProvider:ds?.httpAuthSchemeProvider??defaultTranscribeStreamingHttpAuthSchemeProvider,httpAuthSchemes:ds?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:dn=>dn.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer}],logger:ds?.logger??new NoOpLogger,protocol:ds?.protocol??AwsRestJsonProtocol,protocolSettings:ds?.protocolSettings??{defaultNamespace:"com.amazonaws.transcribestreaming",errorTypeRegistries,version:"2017-10-26",serviceTarget:"Transcribe"},serviceId:ds?.serviceId??"Transcribe Streaming",sha256:ds?.sha256??Sha256WebCrypto,urlParser:ds?.urlParser??parseUrl,utf8Decoder:ds?.utf8Decoder??fromUtf8,utf8Encoder:ds?.utf8Encoder??toUtf8}),getRuntimeConfig=ds=>{const dn=resolveDefaultsModeConfig(ds),ms=()=>dn().then(loadConfigsForDefaultMode),xs=getRuntimeConfig$1(ds);return{...xs,...ds,runtime:"browser",defaultsMode:dn,bodyLengthChecker:ds?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:ds?.credentialDefaultProvider??(bs=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:ds?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:xs.serviceId,clientVersion:packageInfo.version}),eventStreamPayloadHandlerProvider:ds?.eventStreamPayloadHandlerProvider??(()=>eventStreamPayloadHandler),eventStreamSerdeProvider:ds?.eventStreamSerdeProvider??eventStreamSerdeProvider,maxAttempts:ds?.maxAttempts??DEFAULT_MAX_ATTEMPTS,region:ds?.region??invalidProvider("Region is missing"),requestHandler:WebSocketFetchHandler.create(ds?.requestHandler??ms,FetchHttpHandler.create(ms)),retryMode:ds?.retryMode??(async()=>(await ms()).retryMode||DEFAULT_RETRY_MODE),streamCollector:ds?.streamCollector??streamCollector,useDualstackEndpoint:ds?.useDualstackEndpoint??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:ds?.useFipsEndpoint??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getHttpAuthExtensionConfiguration=ds=>{const dn=ds.httpAuthSchemes;let ms=ds.httpAuthSchemeProvider,xs=ds.credentials;return{setHttpAuthScheme(bs){const Es=dn.findIndex(ws=>
29ws.schemeId===bs.schemeId);Es===-1?dn.push(bs):dn.splice(Es,1,bs)},httpAuthSchemes(){return dn},setHttpAuthSchemeProvider(bs){ms=bs},httpAuthSchemeProvider(){return ms},setCredentials(bs){xs=bs},credentials(){return xs}}},resolveHttpAuthRuntimeConfig=ds=>({httpAuthSchemes:ds.httpAuthSchemes(),httpAuthSchemeProvider:ds.httpAuthSchemeProvider(),credentials:ds.credentials()}),resolveRuntimeExtensions=(ds,dn)=>{const ms=Object.assign(getAwsRegionExtensionConfiguration(ds),getDefaultExtensionConfiguration(ds),getHttpHandlerExtensionConfiguration(ds),getHttpAuthExtensionConfiguration(ds));return dn.forEach(xs=>xs.configure(ms)),Object.assign(ds,resolveAwsRegionExtensionConfiguration(ms),resolveDefaultRuntimeConfig(ms),resolveHttpHandlerRuntimeConfig(ms),resolveHttpAuthRuntimeConfig(ms))};class TranscribeStreamingClient extends Client{config;constructor(...[dn]){const ms=getRuntimeConfig(dn||{});super(ms),this.initConfig=ms;const xs=resolveClientEndpointParameters(ms),bs=resolveUserAgentConfig(xs),Es=resolveRetryConfig(bs),ws=resolveRegionConfig(Es),Rs=ws,js=resolveEndpointConfig(Rs),Cs=resolveEventStreamSerdeConfig(js),As=resolveHttpAuthSchemeConfig(Cs),ks=resolveEventStreamConfig(As),Os=resolveWebSocketConfig(ks),Ms=resolveRuntimeExtensions(Os,dn?.extensions||[]);this.config=Ms,this.middlewareStack.use(getSchemaSerdePlugin(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultTranscribeStreamingHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async Ds=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":Ds.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}const command=makeBuilder(commonParams,"Transcribe","TranscribeStreamingClient",getEndpointPlugin),_ep0={},_mw1=(ds,dn,ms,xs)=>[getEventStreamPlugin(ms),getWebSocketPlugin(ms,{headerPrefix:"x-amzn-transcribe-"}),getTranscribeStreamingPlugin(ms)];class StartStreamTranscriptionCommand extends command(_ep0,_mw1,"StartStreamTranscription",StartStreamTranscription$){}const LanguageCode={AF_ZA:"af-ZA",AM_ET:"am-ET",AR_AE:"ar-AE",AR_SA:"ar-SA",BE_BY:"be-BY",BG_BG:"bg-BG",BN_IN:"bn-IN",BS_BA:"bs-BA",CA_ES:"ca-ES",CKB_IQ:"ckb-IQ",CKB_IR:"ckb-IR",CS_CZ:"cs-CZ",CY_WL:"cy-WL",DA_DK:"da-DK",DE_CH:"de-CH",DE_DE:"de-DE",EL_GR:"el-GR",EN_AB:"en-AB",EN_AU:"en-AU",EN_GB:"en-GB",EN_IE:"en-IE",EN_IN:"en-IN",EN_NZ:"en-NZ",EN_US:"en-US",EN_WL:"en-WL",EN_ZA:"en-ZA",ES_ES:"es-ES",ES_MX:"es-MX",ES_US:"es-US",ET_ET:"et-ET",EU_ES:"eu-ES",FA_AF:"fa-AF",FA_IR:"fa-IR",FI_FI:"fi-FI",FR_CA:"fr-CA",FR_FR:"fr-FR",GL_ES:"gl-ES",GU_IN:"gu-IN",HE_IL:"he-IL",HI_IN:"hi-IN",HR_HR:"hr-HR",HT_HT:"ht-HT",HU_HU:"hu-HU",HY_AM:"hy-AM",ID_ID:"id-ID",IS_IS:"is-IS",IT_IT:"it-IT",JA_JP:"ja-JP",JV_ID:"jv-ID",KAB_DZ:"kab-DZ",KA_GE:"ka-GE",KK_KZ:"kk-KZ",KM_KH:"km-KH",KN_IN:"kn-IN",KO_KR:"ko-KR",LG_IN:"lg-IN",LT_LT:"lt-LT",LV_LV:"lv-LV",MK_MK:"mk-MK",ML_IN:"ml-IN",MR_IN:"mr-IN",MS_MY:"ms-MY",MY_MM:"my-MM",NE_NP:"ne-NP",NL_NL:"nl-NL",NO_NO:"no-NO",OR_IN:"or-IN",PA_IN:"pa-IN",PL_PL:"pl-PL",PS_AF:"ps-AF",PT_BR:"pt-BR",PT_PT:"pt-PT",RO_RO:"ro-RO",RU_RU:"ru-RU",SI_LK:"si-LK",SK_SK:"sk-SK",SL_SI:"sl-SI",SO_SO:"so-SO",SQ_AL:"sq-AL",SR_RS:"sr-RS",SU_ID:"su-ID",SV_SE:"sv-SE",SW_BI:"sw-BI",SW_KE:"sw-KE",SW_RW:"sw-RW",SW_TZ:"sw-TZ",SW_UG:"sw-UG",TA_IN:"ta-IN",TE_IN:"te-IN",TH_TH:"th-TH",TL_PH:"tl-PH",TR_TR:"tr-TR",UK_UA:"uk-UA",UZ_UZ:"uz-UZ",VI_VN:"vi-VN",ZH_CN:"zh-CN",ZH_HK:"zh-HK",ZH_TW:"zh-TW",ZU_ZA:"zu-ZA"},PartialResultsStability={HIGH:"high",LOW:"low",MEDIUM:"medium"};class MicrophoneStream{context;audioInput=null;stream;objectMode;recorder;recording=!0;queue=[];resolveNext;ended=!1;constructor(dn={objectMode:!1}){const{stream:ms,objectMode:xs,bufferSize:bs,context:Es}=dn;this.objectMode=xs;const ws=window.AudioContext||window.webkitAudioContext;this.context=Es||new ws,this.recorder=this.context.createScriptProcessor(bs,1,1),this.recorder.connect(this.context.destination),ms&&this.setStream(ms)}setStream(dn){this.stream=dn,this.audioInput=this.context.createMediaStreamSource(dn),this.audioInput.connect(this.recorder),this.recorder.onaudioprocess=ms=>{if(this.recording){if(this.objectMode)return;const xs=Buffer$1.from(ms.inputBuffer.getChannelData(0).buffer);this.enqueue(xs)}}}async stop(){if(this.context.state!=="closed"){try{this.stream?.getTracks()[0].stop()}catch{}this.recorder.disconnect(),this.audioInput&&this.audioInput.disconnect();try{await this.context.close()}catch{}this.recording=!1,this.endStream()}}destroy(){this.stop().then()}[Symbol.asyncIterator](){return{next:()=>this.next()}}next(){if(this.queue.length>0){const dn=this.queue.shift();return Promise.resolve({value:dn,done:!1})}return this.ended?Promise.resolve({value:void 0,done:!0}):new Promise(dn=>{this.resolveNext=dn})}enqueue(dn){if(this.resolveNext){const ms=this.resolveNext;this.resolveNext=void 0,ms({value:dn,done:!1});return}this.queue.push(dn)}endStream(){if(this.ended=!0,this.resolveNext){const dn=this.resolveNext;this.resolveNext=void 0,dn({value:void 0,done:!0})}}}window.Buffer=Buffer$1;class TranscriptionClient{config;transcribeClient;constructor(dn){this.config=dn}async startRecording(dn,ms){try{this.transcribeClient&&this.transcribeClient.de
29stroy();const xs=await this.fetchCredentials();this.transcribeClient=new TranscribeStreamingClient({credentials:xs,region:"eu-west-2"});const{sampleRate:bs}=dn.context,Es=await this.transcribeClient.send(new StartStreamTranscriptionCommand({LanguageCode:LanguageCode.EN_GB,MediaEncoding:"pcm",MediaSampleRateHertz:bs,AudioStream:getAudioStream(dn),EnablePartialResultsStabilization:!0,PartialResultsStability:PartialResultsStability.HIGH}));if(Es.TranscriptResultStream){for await(const ws of Es.TranscriptResultStream)if(ws.TranscriptEvent&&ws.TranscriptEvent.Transcript)for(const Rs of ws.TranscriptEvent.Transcript.Results||[]){if(!Rs||!Rs.Alternatives?.length)continue;const js=Rs.Alternatives[0].Transcript??"",Cs=normalizeTranscript(js);if(!Cs)continue;const As=Rs.IsPartial===!1;ms({text:Cs,isFinal:As,resultId:Rs.ResultId})}}}catch(xs){throw console.error("Transcription stream failed",xs),xs}}async fetchCredentials(){try{const ms=(await httpPost(`${this.config.apiUrl}/v1/transcription/credentials`)).data,xs=new Date(0);return xs.setUTCSeconds(ms.expirationUnixTime),{accessKeyId:ms.accessKeyId,secretAccessKey:ms.secretAccessKey,sessionToken:ms.sessionToken,expiration:xs}}catch(dn){throw console.error("Failed to fetch transcription credentials",dn),dn}}}const getAudioStream=async function*(ds){const{sampleRate:dn}=ds.context;for await(const ms of ds)ms.length<=dn&&(yield{AudioEvent:{AudioChunk:encodePCMChunk(ms)}})},encodePCMChunk=ds=>{const dn=new Float32Array(ds.buffer);let ms=0;const xs=new ArrayBuffer(dn.length*2),bs=new DataView(xs);for(let Es=0;Es<dn.length;Es++,ms+=2){const ws=Math.max(-1,Math.min(1,dn[Es]));bs.setInt16(ms,ws<0?ws*32768:ws*32767,!0)}return Buffer$1.from(xs)},normalizeTranscript=ds=>ds.replaceAll("Comma"," ,").replaceAll("comma"," ,").replaceAll("Um","").replaceAll("  "," ").replaceAll(".","").replaceAll("Full stop",".").replaceAll("full stop",".").replaceAll(" .",".").trim();class DemoClient{base;constructor(dn){this.base=`${dn.apiUrl}/v1/demo`}async createSession(dn,ms){return await httpPostAnonymous(`${this.base}/sessions`,{companyName:dn||null,email:ms||null})}async upload(dn,ms,xs){const bs=new FormData;return bs.append("file",ms),await httpPostFormAnonymous(`${this.base}/sessions/${dn}/business-ip`,bs,Es=>{Es.total&&xs?.(Math.round(Es.loaded/Es.total*100))})}async fetchAll(dn){return await httpGetAnonymous(`${this.base}/sessions/${dn}/business-processes`)}async fetch(dn,ms){return await httpGetAnonymous(`${this.base}/sessions/${dn}/business-processes/${ms}`)}async fetchContent(dn,ms){return await httpGetAnonymous(`${this.base}/sessions/${dn}/business-processes/${ms}/content`)}}class OwnershipTransferClient{url;constructor(dn){this.url=`${dn.apiUrl}/v1/ownership-transfers`}async initiate(dn){return await httpPost(this.url,dn)}async current(){return await httpGet(`${this.url}/current`)}async cancel(){return await httpDelete(`${this.url}/current`)}async display(dn){return await httpGetAnonymous(this.tokenUrl(dn))}async setupIntent(dn){return await httpPostAnonymous(`${this.tokenUrl(dn)}/setup-intent`,{})}async accept(dn,ms){const xs=await httpPostAnonymous(`${this.tokenUrl(dn)}/accept`,ms);if(xs&&xs.status===200&&xs.headers.authorization){const bs=xs.headers.authorization.replace("Bearer","").trim();localStorage.setItem(WEB_AUTH_TOKEN,bs)}return xs}async decline(dn){return await httpPostAnonymous(`${this.tokenUrl(dn)}/decline`,{})}tokenUrl(dn){return`${this.url}/token/${encodeURIComponent(dn)}`}}class ManualMagicSdk{config;userClient;accountClient;customerClient;actionsClient;manualsClient;productClient;brandClient;businessDetailsClient;organisationClient;organisationMembersClient;teamsClient;pricingClient;uploadClient;businessProcessClient;checklistClient;faqClient;storyboardClient;processAssetsClient;sopClient;askMyWizard;transcriptionClient;demoClient;ownershipTransferClient;version;constructor(dn){this.version="1.0.19",this.config=dn,this.userClient=new UserClient(dn),this.accountClient=new AccountClient(dn),this.customerClient=new CustomerClient(dn),this.actionsClient=new ActionsClient(dn),this.manualsClient=new ManualsClient(dn),this.productClient=new ProductClient(dn),this.brandClient=new BrandClient(dn),this.businessDetail
29sClient=new BusinessDetailsClient(dn),this.organisationClient=new OrganisationClient(dn),this.organisationMembersClient=new OrganisationMembersClient(dn),this.teamsClient=new TeamsClient(dn),this.pricingClient=new PricingClient(dn),this.uploadClient=new UploadClient(dn),this.businessProcessClient=new BusinessProcessClient(dn),this.checklistClient=new ChecklistClient(dn),this.faqClient=new FAQClient(dn),this.storyboardClient=new StoryboardClient(dn),this.processAssetsClient=new ProcessAssetsClient(dn),this.sopClient=new SopClient(dn),this.askMyWizard=new AskMyWizardClient(dn),this.transcriptionClient=new TranscriptionClient(dn),this.demoClient=new DemoClient(dn),this.ownershipTransferClient=new OwnershipTransferClient(dn)}}const Sdk=new ManualMagicSdk((()=>{let ds=SdkConfig.local();return ds=SdkConfig.prod(),ds})());function Logo({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"541.973",height:"321.532",viewBox:"0 0 541.973 321.532",...dn,children:jsxRuntimeExports.jsxs("g",{id:"Group_38","data-name":"Group 38",children:[jsxRuntimeExports.jsx("path",{id:"Path_78","data-name":"Path 78",d:"M0,86.328V0H541.973V321.532H0V93.169c4.171.37,9.148-.491,13.215-.015.481.056.826.048,1.122.509l-1.93,3.53c-1.7.4-.622.415-.778,1.291-.142.8-1.152,1.653-1.181,1.767-.115.448.057,1.022-.083,1.481-.316,1.04-1.144,1.355-.591,2.838l-.645-.648V117.6l.645-.648.006,2.933.651-.159c-.092.251-.258.563-.146.818.13.295,2.434,4.03,2.6,4.209a18.67,18.67,0,0,0,3.3,1.941c1.452.534,1.981-.4,3.312-.006,0-.891,1.848-2.121,1.955-2.452.336-1.042-.075-3.227.06-4.511,1.254-11.933,10-28.23,17.282-37.129.406-.5.136-1.23,1.128-1.473l3.61,11.043c.676,1.187.686,1.329,1.929,1.329h8.8c.328.242.359.285.358.668a53.049,53.049,0,0,1-1.507,5.972c-1.155,4.024-2.731,8.27-3.993,12-3.779,11.166-7.417,21.9-11.328,32.642-1.125,3.089-2.361,6.146-3.258,9.313l-.639-.326c-.1.14.235.738.2,1.085-.288,3.129-4.61,15.38-6.077,18.556-.483,1.046-.173.79-.441,1.539-1.326,3.7-2.829,7.354-4.139,11.061l-.626-.316-.009,2.282-.643-.328a3.2,3.2,0,0,1-.334,2.709c-2.343,5.686-4.571,12.674-6.255,18.219-.308,1.012-.54,2.063-.854,3.062-.209.666-1.019.156-.375,1.58l-.655-.161.353,1.436-.658.337.308.994-.655-.161.321,1.635-.647-.332c.972,2.174-.972,3.369-.332,5.539l-.645-.648c.582,2.036-.41,3.7-.006,5.86l-.646-.648a31.476,31.476,0,0,1,0,9.77l.646-.649-.291,1.489.638.321-.344,1.445c1.267-.28,1.177,1.023,1.822,1.928,1.386,1.944,3.277,3.726,5.676,3.942l-.33.645c1.848-.648,4.913.279,6.542-.125.585-.146.567-.67.724-.757.335-.184.824.006,1.126-.168.127-.073,1.761-1.819,1.988-2.093,1.729-2.076,5.259-16.507,6.443-20.311.894-2.87,2.174-6.476,3.235-9.773,1.542-4.793,4.156-9.663,6.366-14.745,1.147-2.638,3.089-4.89,4.523-7.328,2.806-4.77,5.23-9.728,7.808-14.358,3.015-5.416,6.967-11.636,9.686-17.088,1.138-2.281.9-3.1,2.967-4.875.265-.228,1.582-3.06,2-3.771,1.951-3.3,3.958-7.043,6.109-10.452.126-.2,1.425-1.423,1.427-1.527.006-.311-.459-.924-.33-1.1.042-.058.959-.1,1.236-.4s.21-.935.421-1.3c4.009-6.936,9.18-13.543,13.872-20.235,1.347-1.922,2.788-4.766,4.127-6.639.269-.375,1.393-.748,1.745-1.185a102.927,102.927,0,0,1,6.946-8.531c2.21-2.225,4.64-3.922,6.755-6.024l7.92.008,0,2.928-.645-.648-.006,2.608-.647-.331.293.947-.932.554c.737,1.977-.223,1.138-.815,2.1-.625,1.013-1.042,3.183-1.514,4.289-1.949,4.566-4,9.9-6.2,14.391-.916,1.874-2.437,3.758-2.836,5.707l.6.2-.589.2c.354.923-.13,1.485-.592,2.228a88.625,88.625,0,0,0-6.29,12.223l-1.339,3.107-.643-.332.292.835-.52.2c-.026,1.839-1.72,3.865-2.635,5.538-.1.189.7,1.1-.692,1.283l.3.774-.655-.16c.611,1.341-.4,2.005-.676,3.25l-.627-.317a3.031,3.031,0,0,1-.334,2.384c-.148.371-.285.719-.477,1.192a30.157,30.157,0,0,0-1.171,2.93l-.625-.316c.41,1.808-.86,4-1.537,5.787-1.047,2.761-2.336,5.861-3.092,8.63-.577,2.113-1.51,3.751-2.129,5.519a4.328,4.328,0,0,1-.113,1.973c-.161.375-.963.034-.3,1.053l-.655-.16.354,1.437-.646.336a24.2,24.2,0,0,1-.632,4.956c-.227.65-.977.319-.385,2.073l-.646-.331c.515,1.308.132,2.271,0,3.589l-.647-.331c.726,3.286-1.09,6.685-.658,10.1l-.654-.482a11.253,11.253,0,0,1,.008,5.7l.647-.332c.034.8-.077,1.616.037,2.412a20.516,20.516,0,0,0,4.212,9.472c1.2,1.476,2.955,2.935,4.305,4.294l5.413.705c1.233-1.553,2.462-2.443,3.313-4.333,1.5-3.341,2.315-6.88,4.054-10.281,4.733-9.255,9.864-17.589,14.125-27.255.872-1.978,2.257-2.723,2.738-5.153.048-.244.916.1.264-1.
29131l.623.311c.581-.532.355-2.119.421-2.215,3.261-4.729,7.313-9.816,10.786-15.11,7.307-11.14,13.947-22.483,22.52-32.533,3.678-4.313,8.828-11.141,13.815-14.293,1.275-.806,3.8-1.624,5.125-.667,1.562,1.131.888,1.977.786,3.423-.027.389.287.755.31,1,.013.15-1.753.991-.6,2.568l-.587.236.242,1.244-.646-.648c.4,1.993.017,3.993-.005,5.865l-.648-.331c-.076.091.047,2.1-.006,2.381-.068.366-2.24,1.942-2.527,2.249-.071.076-.164,1.5-.279,1.8-.2.507-.9.495-1.025.935-.09.324.272,1.23-.079,1.764l-.646-.329.291,1.124c-1.376.674-.529.822-.818,1.734-.193.6-1.215,3.2-1.5,3.766-2.378,4.71-4.459,9.419-6.684,14.289-.072.158.214.68.026,1.157-.249.628-1.1.039-.445,1.388l-.647-.331c.151,1.91-.735,4.408-1.381,6.281-.239.692-1.2.838-.571,2.024l-.655-.16.345,1.127-.6.229.261.758-.655-.16c.293,2.035-.821,4.759-1.531,6.772-1.1,3.122-2.886,7.037-3.758,10.241-.131.48-.7.924-.59,1.559l-.639-.328.339,1.124c-2.287,4.264-3.537,10.182-5.835,14.986l.276,2.134-.646-.975c.732,2.58-.248,4.739-.578,7.083-.118.834.019,2.464-.137,3.411-.184,1.113-1.172,1.763-.6,3.185l-.645-.648.34,2.075-.637.343c.579,3.011-1.324,6.087-.665,9.106l-.637.342.289,4.745-.655-.482a19.946,19.946,0,0,1,.009,6.671l.646-.648c.089,1.442-.116,2.956.008,4.391,1,11.515,8.238,26.713,19,32.8,1.47.831,3.855,2.173,5.432,1.9l-.648.646c2.288-.546,4.7.683,7.029.356.627-.088.437-.679.652-.686.432-.014,1.165.528,1.766.33l-.648-.645c2.113.578,4.89-.554,6.928-1.384,7.485-3.046,11.6-8.62,16.09-14.865.376-.523,1.106-.114.44-1.177l.655.16c-.356-.984-.064-2.48-.391-3.368-.807-2.19-3.74-.3-5.158.278-4.012,1.625-9.415,5.518-14.515,5.076-.169-.014,0,.636-.619.659-.636.024-1.181-.363-1.805-.365l.332.646c-1.7.168-3.2-.478-4.737.365l-.62-.655-3.118.29,1.952-.645-3.062.345-.338-.65-1.164.3.161-.655-.954.348c-.432-.724-2.819-1.5-3.615-2.274-.564-.545-.452-1.491-1.47-1.844l.346-.943-.654.161.329-1.137-.655.16.32-1.635-.653.162a134.562,134.562,0,0,1,1.722-14.568c.366-2.044,1.778-5.915,1.839-7.6,0-.065-1.035-.246-.62-1.114l.644.648c1.749-6.354,3.57-12.7,5.641-18.958,3.541-10.7,7.866-21.161,11.525-31.807.71-2.063,3.839-10.608,3.952-12,.043-.538-.517-.874-.429-1.428.442-2.774,5.088-10.046,6.341-12.935l1.33-4.638.647.329c.271-2.37,1.648-4.592,2.433-6.856,2.881-8.309,5.229-18.695,3.416-27.44-.035-.169-.952-.4-.31-1.864l-.645.648.338-1.442-.679-.368c-.147-3.776-3.959-9.476-7.266-12.072a15.319,15.319,0,0,0-6.189-2.4c-.252-.037-.2-.589-.443-.651-1.691-.424-4.439.42-6.295,0l.975.645c-.539.093-1.178-.259-1.67-.154-5.081,1.082-11.086,6.152-15.247,9.8a106.459,106.459,0,0,0-8.634,8.478,6.972,6.972,0,0,1-2.146,1.758l.742.316c.9.582-.324.694-.58.968-.755.806-1.256,1.841-1.779,2.472a200.548,200.548,0,0,0-14.975,20.941c-2.352,3.759-4.967,7.507-6.435,11.376-.164.433-1.218.479-.77,1.711l-.645-.648c.641,1.64-.193,1.163-.842,2.1a21.033,21.033,0,0,0-1.274,2.772c-2.089,3.278-4.279,6.419-6.253,9.718-1.593,2.661-2.829,5.511-4.835,7.882-.254.047-.186-.29-.167-.491.2-2.081,2.373-6.659,3.153-8.9,4.984-14.343,10.72-29.341,16.859-43.415,4.83-11.07,15.346-24.109,10.8-37.124-.328-.94-1.143-.267-.5-1.608l-.647.331,0-2.287-.648.331c-.182-.274.8-1.029-.228-1.033a7.861,7.861,0,0,0-.883-2.453c-.423-.638-3.749-4.345-3.451-4.66l3.249,2.606,3.155-7.181,37.375-.326,7.059,18.583h17.924L165.67,1.94,148.657,2c-5.706,14.66-11.249,29.4-17.074,44.015-2.418,6.066-5.129,11.877-7.476,17.937-1.245,3.213-2.247,6.711-3.655,9.7-.554,1.178-.213,2.123-2.152,1.926l.33.646a3.977,3.977,0,0,0-2.2.56c-3.23,1.713-8.487,6.485-11.06,9.321-.23.253-.153.978-.6,1.2-1.419-1.191-.859-2.182-1.146-3.717-1.788-9.553-3.516-19.2-5.173-28.731C95.4,37.25,92.64,19.581,89.607,1.972l-17.1.3L54.589,57.009c-.4,1.653-3.731,2.217-4.756,1.155L31.58,1.988,14.356,1.972ZM230.249,1.955H213.791V93.169h17.273V33.554c13.336,19.593,26.05,39.625,38.782,59.615h16.947V1.955H269.52V61.57Zm94.349,0H307.325l-.014,60.117c.643,10.7,1.795,20.12,10.795,27,12.679,9.691,32.61,8.652,43.159-3.716,5.745-6.735,6.188-11.846,6.681-20.361.038-.653.361-1.276.336-1.945l-.014-61.094H351l.013,61.42c-.014,8.351-3.417,15.007-12.545,15.475-9.381.481-13.844-5.625-13.88-14.5ZM381.63,93.169h17.925l6.888-18.524,37.61-.066,7.32,18.59H469.3L434.056,2,417.3,1.932ZM499.28,1.955H482.008V93.169h42.367V76.555h-25.1ZM435.964,83.826c-1.424-.509-7.227-.052-8.47.535-.179.084-.213.519-.495.655-.863.417-1.713-.532-1.878,1.619-.034.442.5.672.362.995-.441,1.006-2.374,1.039-1.814,2.61l-.647-.331c-.326,2.386.656,1.782,1.758,2.968a4.989,4.989,0,0,1,1.054,3.775c-.082,1.456-1.181,2.641-.861,4.013l-.648-.332,0,2.287-.647-.332-.005,2.286-.647-.33.345,1.126-.6.229.252.929-.647-.331c.679,1.37-.537,1.835-.716,2.419a17.952,17.952,0,0,1-1.347,4.1c-.363.753.293,1.645-1.848,1.632l.649.483c-.336.847-2,.924-1.359,1.736l-1.856.753c.078,1.445-.127,2.9-.025,4.367a5.073,5.073,0,0,0,1.647,3.879c.485.581.01,2.584,1.914,3.223a7,7,0,0,0,2.477-.062c.692-.3.742-.9.842-.952.139-.074.518.237.725.18.94-.26,4.388-3.7,5.229-4.5.57-.538.637-1.551,1.069-1.963.45-.43,3.227-1.631,3.817-2.272.1-.1,1.461-2.149,1.58-2.362.787-1.413.925-3.267,2.186-3.983-1.492-1.782-1.452-.312-2.037.07-.294.193-1.7.459-2.193.742-.081-2.023,2-2.548,2.941-4.061s1.04-3.93,1.936-5.145c.428-.58,1.879-1.3,2.459-1.878,1.381-1.367,3.263-3.373,3.9-5.2,1.546-4.42-1.711-9.217-4.9-11.389a5.242,5.242,0,0,0-2.077-1.182,6.751,6.751,0,0,1-1.425-1.006m8.891,110.331v-8.144l-.327.164
29c.021,2.392-.017,4.786-.014,7.178,0,.693.337,1.316.341,1.942.01,1.441-.67,3.419-.323,5.048l.646-3.906c.263,1.691-.215,3.528-.286,5.07-.007.153.551.094.611.357a13.871,13.871,0,0,1,.041,4.205c-.015.179.514.131.617.36a34.612,34.612,0,0,1,1.984,6.093c.727,2.691,2.672,4.87,4.2,6.892,2.859,3.793,2.694,3.416,6.958,5.361.21.1.228.579.27.6.17.068,1.4-.512,1.9-.265l-.974.645a31.275,31.275,0,0,1,7.818,0l-1.3-.645,2.41.345c.28-.044-.012-1.089,1-.343l-.16-.654a4.861,4.861,0,0,0,1.636.2c1.794-.291,3.108-1.712,4.286-2.413.129-.077.543.3.914.094.192-.108.953-1.331,1.07-1.373,3.308-1.182,3.746-2.477,6.266-4.667,11.126-9.671,22.865-22.452,30.269-35.042,3.549-6.033,8.272-12.134,12.264-18.288.266-.41.193-1.056.4-1.316.244-.3,1.067-.246,1.19-.44.183-.286-.084-.962.055-1.342.387-1.062,3.043-3.634,3.455-4.559.252-.565.485-2.4.7-3.049.165-.491.672-.465.672-.6a19.719,19.719,0,0,0-.527-3.354,2.362,2.362,0,0,0-2.823-1.371c-3.245.448-8.13,7.447-10.04,10.171-2.327,3.319-3.886,6.456-6.173,9.792-5.228,7.625-11.537,14.8-16.837,22.263-1.275,1.8-2.133,4.282-3.122,5.645-1.973,2.719-14.409,13.02-17.452,14.51-1.526.747-1.574.411-2.794.532-.2.019-.12.54-.361.6-.164.042-3.081-.46-3.286-.536a22.136,22.136,0,0,1-1.649-1.491c-.2-.334-.183-2.133-.626-3.111-.2-.43-.755-.386-.754-.591.005-.847.473-1.944,0-3.07l-.645.974.319-3.906L466.042,201c.5-3.621.123-7.278.326-10.908.227-4.062,1.293-8.186.652-12.218l.645.974c-.058-1.744.7-3.165.006-4.887l.646.331.641-3.121-.635-.793.647.162c.43-2.086.712-4.219,1.2-6.29.79-3.339,2.991-9.11,3.309-12.041a6.143,6.143,0,0,0-.27-1.7l.822.034a170.557,170.557,0,0,1,6.94-20.125c.428-1.007,1.18-2.045,1.537-3.027.111-.306.429-1.06-.172-.986l-.652,1.3a1.784,1.784,0,0,1-.087-1.2c.263-.863,3.444-6.861,3.978-7.113,2.451.891,1.493-.09,2.458-1.138.836-.908,3.177.55,2.775,1.963l.647-.33a13.991,13.991,0,0,0-.215,2.506c.15,3.459.574,4.64-.349,8.17-.951,3.635-1.811,7.964-2.382,10.959-.544,2.852-1.631,2.69,1.412,4.435.229.131.246.572.282.586.333.131,4.083-.634,4.842-.269l-.16-.655.762.256c.361-.425,1.659-.976,2.521-1.668,1.21-.972,4.172-3.3,3.415-4.632l.545-.193-.239-1.248.645.648-.335-1.441.685-.386-.343-2.4.645,1.3V123.137l-.647.331-.005-2.938-.647.331.253-.935-.511-.088.253-.935-.654.159c.666-.975-.146-.753-.2-.885a40.84,40.84,0,0,0-3.8-7.328c-.135-.217-.871-.42-1.232-.895-.235-.308-.036-.824-.446-1.165-.1-.088-2.059-.77-2.532-1.005-.329-.163-1.982-1.19-2.11-1.228-2.385-.71-9.154.335-11.115,1.385a19.7,19.7,0,0,0-2.663,2.022c-3.355,2.694-7.016,5.039-9.2,8.885l-.585-.269c-.633,2.07-2.253,3.981-3.448,5.854-1.116,1.749-3.646,5.682-3.954,6.916-.756,3.028-2.37,6.162-3.511,9.059-.812,2.065-1.654,3.117-2.064,5.12-.292,1.425-.148,3.257-.905,4.63-.373.677-1.085.757-1.456,1.239-.5.653-1.466,3.863-1.644,3.983l-.626-.315.345,1.124-.6.23.261.758-.655-.16c.789,1.619-.618,2.15-1.178,3.06-1.841,3-5.159,7.163-5.007,10.44-1.28.3-.123,1.085-.37,1.435-1.936,2.736-7.341,6.336-9.959,8.631-2.242,1.9
2965-6.5,6.886-8.994,7.825-.486.183-.811-.07-1.159-.007-.061.011-.045.517-.2.512-.9-.027-2.174-.759-3.3-.022a7.22,7.22,0,0,1-1.761-3.4c-.925-8.317,4.731-18.64,7.413-26.427.263-.582-.585-1.638-.548-1.894.044-.292.7-.346.85-.535.212-.266,1.267-3.838,1.84-4.707.945-1.434,2.716-1.882,3.307-4.026.151-.545-.02-2.209.279-2.8.249-.49,1.311-.409.548-1.942a5.182,5.182,0,0,0-3.932-2.758l.329-.645c-.981.385-2.354.166-2.651-.929l-.766.281.161-.655-2.609-.005.648-.646h-8.8l.16.654c-1.047-.663-.672.073-1.338.6-2.828,2.216-3.589,2.756-5.141,6.273-.379.859-.022,2.158-1.127,2.29l.284.767-.655-.16c.048,1.156.293,3.569-.948,4.058l.292,1.161-.647-.332a17.749,17.749,0,0,1-.058,3.335c-.2,1.122-1.168,1.748-.6,3.186l-.647-.332c-.05.529.334.974.358,1.486.025.553-.481.432-.549.556-.087.158.1.482.005.574-.325.316-.825.245-1.013.425-4.72,4.527-10.17,8.221-15.076,12.448-5.813,5.009-10.9,10.475-16.838,15.266-.876.707-1.31,1.64-2.582,2.146-.648.059-.452.04-.425-.436a21.928,21.928,0,0,1,.828-3.074c3.066-9.966,8.254-18.838,12.408-27.978,1.31-2.885,1.326-4.557,1.369-7.6l-.645.648c.613-2.344,0-1.537-.512-2.276-.211-.3.166-.729.074-.9a37.026,37.026,0,0,0-3.865-3.89c-.2-.059-.537.224-.717.165-.468-.155-.408-.73-.574-.843-.235-.16-4.648-.943-5.36-1.04-.772-.1-1.6.3-2.414,0l.331.647-3.263,0,.33.646c-2.528.038-3.57,2.642-4.885,4.421-.606.819-.871,1.414-1.28,1.968-.228.308-.863.373-.946.5a14.8,14.8,0,0,1-1.092,2.682c-5.83,9.443-11.923,19.833-17.473,29.423-2.94,5.081-5.306,10.386-8.963,14.991a82.176,82.176,0,0,1-8.634,9.54c-.289.244-3.144,2.361-3.342,2.42a5.232,5.232,0,0,1-2.258.168c-2.164-9.972,1.924-20.454,5.748-29.567,1.043-2.486,2.217-5.482,3.471-7.778,1.47-2.692,3.786-5.406,5.124-8.32l4.866-6.935-.97.493c-.279-1.41.661-2.274,1.36-3.359,2.053-3.186,7.66-10.646,10.359-13.1.322-.294.459-.6.987-.476l.323.974c.138-.582.016-1.145.456-1.635a22.062,22.062,0,0,1,18.623-7.17c1.452.179,1.963.98,3.829.588.725-.153,1.381-.877,2.193-.913l-.3-.818.59-.292-.3-.835.933-.2-.286-5.993-.646.329-.005-1.959-.648.332c-.1-.12.35-.862.023-1.39-.1-.158-2.476-2.542-2.626-2.654s-2.628-1.189-2.868-1.282c-.126-.049.111-.886-.88-.21l.16-.654-1.127.346-.23-.6-.758.261.16-.655c-.163-.114-.765.26-1.1.221-4.782-.565-9.843-.56-13.1,2.074l-1.125-.34.332.647c-.264.191-2.936-.157-3.687.008-.254.056-3.862,2.112-4.365,2.429-7.7,4.844-23.476,24.707-29,32.52-1.116,1.578-1.415,4.041-2.034,5.361-.346.737-.011,1.592-1,1.212l-.041.779c-1.779.131-3.314,3.41-4.247,5.036a43.185,43.185,0,0,0-5.183,13c-.075.3-.93.085-.3,1.551l-.654-.161c.952,1.556-1.1,2.462-1.527,3.184-5.327,9.057-10.045,17.849-17.705,25.469-.491.489-.783,1.291-1.309,1.624-.578.368-3.271,1.252-3.812.74-2.1-4.476-1.274-9.64-.733-14.4.484-4.257,1.971-8.662,1.3-12.87l.646.648c.713-2.141-.189-4.372.026-6.322.789-7.146,5.438-15.367,7.956-22.023,1.3-3.436.748-4.188.8-7.665.008-.509.4-1.553.3-1.722-.055-.092-.652-.191-.926-.581s-.023-.872-.124-1.027c-1.2-1.845-3.576-3.2-5.181-4.849l-3.18-.443.649-.645a8.911,8.911,0,0,1-4.233,0l.974.645-1.812-.281a1.737,1.737,0,0,1-1.223,1.023c-2.883,1.019-6.17,3.845-8.376,6.35-1,1.133-1.225,3.234-3.25,3.009l.32-1.3-.654.159.3-.776-.933-.554.324-1.244c-1.391-.5-.619-1.146-.765-1.438-.077-.156-.844.254-.228-1.033l-.655.159c.287-.614.528-.788-.22-.863a25.49,25.49,0,0,0-4.324-7.275c-.8-.894-2.459-1.73-3.177-2.535-.325-.364-.375-1.172-.431-1.213-.1-.069-.8.292-1.3.186-.9-.19-1.733-1.209-2.037-1.352-.61-.288-6.138-.327-7.256-.293-.351.011-.97.715-1.784.16l.316.625c-2.851.5-4.593,3.087-6.677,4.592-6.479,4.679-8.752,5.614-12.8,12.582-2.642,4.549-4.445,10.041-6.894,14.22-.189.322-.847.349-.937.74-.065.282.263.842.148,1.453-.158.838-.839,1.205-.986,1.612-.586,1.622-.848,3.481-1.244,4.971a23.07,23.07,0,0,0-1.237,4.812l-.647-.331.353,1.437-.657.336.307.994-.655-.161a12.417,12.417,0,0,1,.309,1.74c-.148,2.432-1.5,5.491-1.763,7.989-.372,3.552-.059,7.357-.158,10.98a7.32,7.32,0,0,1-.351,1.605l.655-.162a15.355,15.355,0,0,0,.624,4.771,33.606,33.606,0,0,0,1.2,3.709c.384,1.3-.343.33.581,1.643a16.741,16.741,0,0,1,1.217,2.644,45.837,45.837,0,0,0,5.232,5.4c.48.128,1.935-.391,2.724.732.269-1.167,1.62-.259,2.912-.324,1.253-.064,3.385-.92,4.314-.9.672.01.792.812,2.064.438,1.519-.446,7.032-5.75,8.142-7.189,3.283-4.253,6.334-8.361,9.631-12.851a103.74,103.74,0,0,0,7.4-12.159c.623-1.132.337-1.985.652-2.761.064-.157,1.452-1.044,1.5-1.127.
29133-.253-.292-.61-.205-.849.206-.563,3.705-4.952,4.385-6.028.223-.354.231-2.028,1.4-1.853.458.588-1.38,6.486-1.618,7.7-.109.56.27,1,.27,1.273,0,.2-1.8,1.92-.585,3.53l-.691.4.341,2.4-.645-1.3c.481,2.4-.3,4.4-.007,6.838l-.645-2.6c-.323,1.235.336,2.682.323,3.744-.008.631-.34,1.249-.341,1.942a75.721,75.721,0,0,1,.018,7.667l.645-1.626c-.348,2.674,1.339,5.2.658,7.815l.646-.648-.242,1.244.593.236-.345,1.125.622-.31a6.579,6.579,0,0,0,.524,1.295,42.155,42.155,0,0,0,1.86,3.989c.287.623.112,1.332.343,1.781.165.321,4.791,4.939,5.115,5.1.512.252,2.952-.015,2.288,1.5l2.279.006-.648.645c1.446-.529,2.7.236,4.078.323,9.122.576,16.082-10.488,20.474-16.809,2.057-2.96,4.044-5.875,6.1-8.827.387-.556.015-1.43,1.125-1.721a50.222,50.222,0,0,0,1.342,4.857c.548,1.22,1.594,1.645,2.1,2.19.691.748.433,2.326.807,3.05.085.165,2.079,2.353,2.457,2.734.765.773,5.63,4.978,6.273,5.3a19.442,19.442,0,0,0,6.55,1.422c.2-.01.153-.6.4-.658.616-.148,1.391.114,2.152-.079,3.464-.878,10.745-9.663,12.893-12.847.278-.412.271-1.113.459-1.333.242-.284.916-.2,1.151-.476.284-.333.248-1.507.52-2.1.077-.167,2.3-2.45,2.4-2.778.946-3.109,5.067-8.1,7.117-11.159,1.794-2.674,3.164-5.232,4.436-7.589.586-1.085,2.822-2.978,3.508-4.9a4.277,4.277,0,0,0,.017-1.046l.963.009.3,1.148c-1.42,1.083-1.207,3.708-.937,5.36l-.645-.974.32,1.955-.647-.33c-.174,1.111-.575,1.993.012,3.078l-.681.367.337,1.442-.645-.648c.577,2.362-1.161,4.7-.659,7.163l-.645-1.3-.006,4.558-.645-.974c-.153.633.446,2.251.308,2.724-.084.291-.959-.01-.315,1.507l-.645-.647.346,1.758-.651.336.307.994-.655-.161.352,1.435c-1.2,1.878-1.415,4.27-2.816,6.368-3.739,5.6-10.5,10.56-15.266,15.363a193.005,193.005,0,0,0-20.435,24.49c-1.124,1.589-3.569,5.727-4.711,6.766-.342.312-.772-.049-.795-.017a2.6,2.6,0,0,1-.043,1.4c-.309.778-1.957,2.48-2.447,3.276-2.672,4.344-4.723,8.147-6.967,12.692a10.941,10.941,0,0,0-1.038,2.91c-.161.614-.683,1.156-.591,1.879l-.646-.332L292,285.37l-.645-.648c.622,1.222-.149,2.179-.17,3.082a44.493,44.493,0,0,0,.692,9.305c.241.9,1.554,1.843.781,3.249l.646-.329,0,1.955.941.027c-.259,1.3.478,1.161.806,1.653,3.7,5.563,6.613,9.479,12.578,11.514.459.157.587,1.074,1.648.492l-.331.647,3.912.006-1.627.645h6.515l-1.3-.645c3.389.835,7.421-1.37,10.074-3.451,5.215-4.093,10.519-15.677,13.294-21.894,8.067-18.073,12.89-37.5,17.614-56.668,1.69-6.858,2.787-14.482,4.81-21.254,1.605-5.375,5.694-9.347,9.6-13.219,3.874-3.845,8.372-7.686,12.411-11.359,4.957-4.508,9.859-9.081,15.137-13.221.743-.128.457.328.493.814.148,1.995.163,4.035.329,6.031l.645-2.277-.32,3.258.644-.33c.442.5.024,1.822.071,1.907a16.
29669,16.669,0,0,1,1.671,1.759c.14.429-.173.987-.06,1.154.993,1.462,5.71,6.345,7.328,8.157,1.121,1.254,3.322,2.84,5.01,2.991l-.328.645,2.938.66-.33.644,1.307-.321-.161.655.953-.351.366.685,1.77-.337-.974.645c.676.19,1.533-.408,2.075-.338.216.028.172.6.425.663.979.243,2.609-.16,3.694,0l-.332-.647c1.981.876,1.911-.363,2.814-.923,7.348-4.556,9.794-10.541,14.18-17.441.557-.876,1.161-1.531,1.26-.05a93.425,93.425,0,0,1,.325,10.108c-.017.4.248,1.209-.326,1.137",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_79","data-name":"Path 79",d:"M0,86.328,14.355,1.972l17.225.016L49.832,58.164c1.026,1.061,4.356.5,4.756-1.155L72.508,2.275l17.1-.3c3.033,17.609,5.789,35.277,8.85,52.885,1.656,9.531,3.384,19.178,5.172,28.731.287,1.535-.272,2.526,1.146,3.716.442-.218.366-.943.6-1.2,2.573-2.837,7.83-7.609,11.061-9.321a3.975,3.975,0,0,1,2.2-.56l-.33-.647c1.938.2,1.6-.747,2.152-1.925,1.407-2.992,2.41-6.49,3.654-9.7,2.347-6.059,5.058-11.87,7.476-17.937C137.408,31.4,142.951,16.659,148.656,2l17.013-.06,35.412,91.229H183.156L176.1,74.586l-37.376.325-3.155,7.182-3.248-2.606c-.3.315,3.027,4.022,3.45,4.66a7.861,7.861,0,0,1,.883,2.453c1.031,0,.047.759.228,1.033l.648-.331,0,2.287.647-.331c-.638,1.341.176.667.5,1.608,4.542,13.015-5.974,26.054-10.8,37.124C121.74,142.064,116,157.062,111.021,171.4c-.78,2.244-2.952,6.822-3.153,8.9-.02.2-.088.538.166.491,2.007-2.371,3.242-5.221,4.835-7.883,1.974-3.3,4.165-6.439,6.254-9.717a20.767,20.767,0,0,1,1.274-2.772c.649-.939,1.482-.462.841-2.1l.646.649c-.448-1.232.6-1.278.769-1.712,1.469-3.868,4.084-7.616,6.436-11.375a200.251,200.251,0,0,1,14.975-20.941c.523-.631,1.023-1.666,1.778-2.472.257-.275,1.482-.387.581-.968l-.743-.316a6.976,6.976,0,0,0,2.147-1.758,106.133,106.133,0,0,1,8.634-8.478c4.16-3.645,10.165-8.715,15.247-9.8.491-.1,1.13.247,1.669.154l-.974-.645c1.855.422,4.6-.423,6.294,0,.248.063.191.615.443.652a15.308,15.308,0,0,1,6.189,2.4c3.307,2.6,7.12,8.3,7.266,12.072l.679.368-.338,1.442.646-.648c-.642,1.464.274,1.695.309,1.864,1.813,8.744-.535,19.131-3.416,27.44-.784,2.264-2.162,4.486-2.433,6.856l-.647-.329-1.329,4.638c-1.254,2.889-5.9,10.161-6.341,12.935-.088.554.471.89.428,1.428-.113,1.393-3.242,9.938-3.951,12-3.659,10.646-7.985,21.106-11.525,31.807-2.072,6.26-3.893,12.6-5.642,18.957l-.644-.647c-.415.868.623,1.048.62,1.114-.061,1.69-1.472,5.561-1.839,7.6a134.818,134.818,0,0,0-1.722,14.568l.654-.162-.321,1.635.655-.161-.329,1.137.655-.16-.346.943c1.018.353.906,1.3,1.469,1.844.8.771,3.183,1.55,3.615,2.274l.955-.348-.162.655,1.165-.3.337.649,3.062-.344-1.952.644,3.118-.289.621.655c1.533-.843,3.032-.2,4.736-.365l-.331-.646c.623,0,1.169.389,1.8.365s.451-.673.62-.659c5.1.441,10.5-3.451,14.515-5.076,1.417-.574,4.35-2.468,5.157-.278.327.888.035,2.384.391,3.368l-.655-.16c.666,1.063-.063.654-.439,1.177-4.494,6.245-8.606,11.819-16.091,14.865-2.038.83-4.814,1.962-6.928,1.384l.649.645c-.6.2-1.335-.344-1.767-.33-.214.007-.025.6-.652.686-2.332.327-4.741-.9-7.029-.356l.648-.646c-1.577.271-3.962-1.07-5.431-1.9-10.767-6.088-18-21.286-19-32.8-.125-1.435.08-2.949-.009-4.391l-.645.648a19.973,19.973,0,0,0-.009-6.671l.654.482-.288-4.745.637-.342c-.66-3.019,1.243-6.1.665-9.106l.637-.343-.341-2.075.646.648c-.577-1.422.411-2.072.594-3.185.157-.947.019-2.577.137-3.411.33-2.344,1.31-4.5.579-7.083l.645.974-.276-2.133c2.3-4.8,3.548-10.722,5.836-14.986l-.34-1.124.639.328c-.107-.635.46-1.079.59-1.559.873-3.2,2.658-7.119,3.759-10.241.71-2.014,1.824-4.738,1.53-6.772l.655.16-.261-.758.6-.229-.346-1.127.655.16c-.624-1.186.332-1.332.571-2.024.647-1.873,1.532-4.371,1.381-6.281l.647.331c-.655-1.349.2-.76.445-1.388.189-.478-.1-1-.026-1.157,2.225-4.87,4.306-9.58,6.684-14.289.285-.565,1.308-3.161,1.5-3.766.289-.912-.558-1.06.819-1.734l-.292-1.124.646.329c.351-.534-.01-1.44.079-1.765.121-.439.827-.427,1.025-.934.115-.294.208-1.721.279-1.8.288-.307,2.459-1.883,2.527-2.249.053-.285-.07-2.29.006-2.382l.648.332c.023-1.872.4-3.872,0-5.865l.646.648-.242-1.244.588-.237c-1.156-1.577.61-2.417.6-2.567-.022-.247-.336-.613-.309-1,.1-1.446.775-2.293-.787-3.423-1.321-.957-3.849-.139-5.125.667-4.987,3.152-10.136,9.98-13.815,14.293-8.573,10.05-15.213,21.393-22.52,32.533-3.472,5.294-7.525,10.381-10.786,15.11-.066.1.161,1.683-.421,2.215l-.622-.311c.652,1.228-.216.887-.265,1.131-.481,2.43-1.866,3.175-2.737,5.153-4.261,9.666-9.392,18-14.126,27.255-1.739,3.4-2.551,
296.94-4.054,10.281-.85,1.89-2.079,2.78-3.313,4.333l-5.413-.705c-1.35-1.359-3.1-2.818-4.305-4.294a20.531,20.531,0,0,1-4.212-9.472c-.114-.8,0-1.615-.037-2.412l-.646.331a11.261,11.261,0,0,0-.008-5.7l.654.482c-.433-3.414,1.384-6.813.657-10.1l.647.33c.137-1.317.52-2.28,0-3.588l.647.331c-.592-1.754.157-1.423.384-2.074a24.124,24.124,0,0,0,.632-4.955l.646-.336-.353-1.437.654.16c-.667-1.019.135-.678.3-1.053a4.327,4.327,0,0,0,.112-1.974c.62-1.767,1.553-3.4,2.13-5.518.755-2.77,2.045-5.869,3.092-8.631.676-1.783,1.946-3.978,1.536-5.786l.626.316a29.905,29.905,0,0,1,1.171-2.93c.191-.473.328-.821.476-1.192a3.032,3.032,0,0,0,.334-2.384l.628.317c.276-1.245,1.287-1.909.676-3.25l.655.16-.3-.774c1.4-.18.589-1.1.693-1.283.914-1.673,2.609-3.7,2.635-5.538l.519-.2-.292-.835.643.332,1.34-3.107a88.45,88.45,0,0,1,6.289-12.223c.463-.743.946-1.305.592-2.228l.59-.2-.6-.2c.4-1.949,1.92-3.833,2.837-5.707,2.2-4.493,4.251-9.825,6.2-14.391.472-1.106.889-3.276,1.514-4.289.592-.959,1.552-.121.815-2.1l.932-.554-.293-.947.648.331,0-2.608.646.648,0-2.928-7.921-.008c-2.115,2.1-4.544,3.8-6.754,6.024a102.522,102.522,0,0,0-6.946,8.531c-.352.437-1.477.81-1.745,1.185-1.34,1.873-2.781,4.717-4.128,6.639-4.691,6.692-9.863,13.3-13.872,20.235-.211.365-.134.99-.421,1.3s-1.193.342-1.235.4c-.13.18.335.793.329,1.1,0,.1-1.3,1.326-1.427,1.527-2.15,3.409-4.158,7.147-6.109,10.451-.42.712-1.736,3.544-2,3.771-2.063,1.772-1.83,2.6-2.967,4.876-2.72,5.452-6.672,11.672-9.687,17.088-2.577,4.63-5,9.588-7.808,14.358-1.434,2.438-3.375,4.69-4.523,7.328-2.21,5.082-4.823,9.952-6.366,14.745-1.06,3.3-2.341,6.9-3.235,9.773-1.184,3.8-4.714,18.235-6.442,20.311-.228.274-1.861,2.02-1.988,2.093-.3.174-.791-.017-1.126.168-.158.086-.14.611-.725.757-1.628.4-4.693-.523-6.541.124l.33-.644c-2.4-.216-4.291-2-5.676-3.942-.645-.9-.556-2.208-1.822-1.928l.344-1.445-.639-.321.291-1.489-.645.648a31.531,31.531,0,0,0,0-9.769l.645.648c-.4-2.16.588-3.824.006-5.86l.646.648c-.641-2.17,1.3-3.365.331-5.539l.647.332-.321-1.635.655.161-.307-.994.658-.337-.354-1.437.655.162c-.643-1.424.166-.914.376-1.58.313-1,.545-2.05.853-3.062,1.685-5.545,3.912-12.533,6.255-18.219a3.192,3.192,0,0,0,.334-2.709l.643.328.009-2.282.626.315c1.31-3.706,2.814-7.357,4.139-11.06.269-.749-.042-.493.441-1.539,1.467-3.176,5.789-15.427,6.077-18.556.033-.348-.3-.945-.2-1.086l.638.327c.9-3.167,2.133-6.224,3.258-9.314C41.7,134.029,45.341,123.3,49.12,112.132c1.262-3.727,2.839-7.973,3.994-12a53.484,53.484,0,0,0,1.507-5.972c0-.383-.031-.426-.359-.668h-8.8c-1.243,0-1.253-.142-1.929-1.329l-3.61-11.043c-.992.243-.721.977-1.128,1.473-7.284,8.9-16.027,25.2-17.282,37.128-.135,1.285.276,3.469-.06,4.512-.107.331-1.958,1.561-1.955,2.452-1.331-.393-1.859.54-3.312.006a18.722,18.722,0,0,1-3.3-1.941c-.171-.18-2.474-3.914-2.6-4.209-.113-.255.053-.567.146-.819l-.652.16-.006-2.933-.645.648V103.921l.646.648c-.554-1.482.275-1.8.591-2.837.139-.459-.033-1.034.082-1.481.029-.114,1.039-.967,1.182-1.767.156-.876-.927-.9.777-1.291l1.93-3.53c-.3-.461-.64-.453-1.121-.509-4.068-.476-9.045.385-13.215.015ZM169.794,57.661,157.247,26.384,144.7,57.661ZM31.666,55.969c-.114-.257.293-.891.146-1.57A149.548,149.548,0,0,0,25.987,36.73c-.136-.345-.095-.97-.564-.894l-7.5,46.256c.908.095,1.2-.951,1.306-1.631l.971.328c-.8-1.577,1.176-2.245,2.292-3.411,2.812-2.936,6.011-6.977,8.879-9.531.373-.333,1.923-.812,2.633-1.439,1.849-1.636.631-1.425.388-2.521-.444-2.006-.237-1.859-1.4-3.353-.135-.174-.36-3.433-.62-4.1-.154-.392-.686-.409-.713-.47M99.074,93.824l-11.241-.638L78.22,35.837c-2.66,7.875-4.842,15.873-7.33,23.785-.314,1-1.746,3.594-1.791,3.8-.1.488-.26,2.285-.29,2.885-.007.146.488.107.58.392.586,1.809,1.539,3.772,2.1,5.216.051.13.872-.1.2.883l.655-.159c-.6,1.246.13.885.209,1.054.105.225-.414.437.437.777l-.245.726.6.231L73,76.557l.647-.331c.457,2.646,1.469,4.915,1.648,7.643.486,7.437-1.642,15.52-3.37,22.725-3.107,12.955-7.264,25.6-10.989,38.375l-.646-.331c.735,2.562-.966,5.179-.977,7.821,1.249-.183.883-1.121,1.336-1.762.562-.8,2.038-2.157,2.536-2.858.153-.215-.336-.725-.241-.873.714-1.113,1.96-2.456,2.694-3.654,1.583-2.584,3.136-6.05,4.554-8.346.99-1.6,3.062-2.954,2.809-4.988,1.559.569.963-.958,1.088-1.223.478-1.01,2.531-3.85,3.136-4.876.913-1.55,2.011-4.128,3.254-5.407a22.69,22.69,0,0,0,4.035-6.335.883.883,0,0,1,1.131-.464c.34-.291.519-1.391.825-1.78,3.168-4.023,6.829-8.044,10.01-11.98.479-.594,3-3.609,2.59-4.089",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_80","data-name":"Path 80",d:"M444.855,194.157c.574.073.309-.737.326-1.136a93.443,93.443,0,0,0-.325-10.109c-.1-1.48-.7-.825-1.26.051-4.386,6.9-6.831,12.884-14.18,17.441-.9.559-.833,1.8-2.814.923l.332.646c-1.085-.162-2.715.242-3.694,0-.253-.063-.209-.636-.425-.664-.542-.069-1.4.528-2.075.339l.975-.645-1.771.336-.366-.685-.953.351.161-.654-1.306.32.329-.644-2.938-.659.329-.646c-1.
2969-.151-3.89-1.736-5.011-2.991-1.618-1.811-6.334-6.694-7.328-8.157-.113-.166.2-.724.06-1.154a16.55,16.55,0,0,0-1.671-1.758c-.047-.086.371-1.4-.071-1.907l-.644.329.32-3.258-.645,2.277c-.166-2-.18-4.036-.329-6.031-.036-.486.25-.941-.493-.813-5.278,4.139-10.18,8.713-15.137,13.22-4.039,3.674-8.537,7.514-12.411,11.359-3.9,3.873-7.991,7.845-9.6,13.219-2.023,6.773-3.12,14.4-4.81,21.254-4.724,19.171-9.547,38.6-17.614,56.668-2.775,6.217-8.079,17.8-13.294,21.894-2.653,2.081-6.684,4.287-10.074,3.451l1.3.645h-6.515l1.627-.645-3.912-.005.331-.648c-1.061.583-1.189-.335-1.648-.492-5.965-2.034-8.875-5.95-12.578-11.514-.327-.492-1.065-.357-.806-1.652l-.941-.027,0-1.956-.647.33c.774-1.406-.538-2.345-.78-3.25a44.556,44.556,0,0,1-.692-9.305c.021-.9.792-1.86.17-3.082l.645.648.006-3.258.646.332c-.092-.723.43-1.264.591-1.878a10.947,10.947,0,0,1,1.038-2.911c2.244-4.544,4.295-8.348,6.967-12.692.49-.8,2.138-2.5,2.447-3.276a2.59,2.59,0,0,0,.043-1.4c.023-.033.453.328.8.016,1.141-1.039,3.586-5.177,4.71-6.765a192.932,192.932,0,0,1,20.435-24.491c4.765-4.8,11.527-9.766,15.266-15.363,1.4-2.1,1.617-4.489,2.816-6.368l-.352-1.435.655.162-.307-.994.651-.337-.346-1.758.645.648c-.644-1.518.231-1.216.316-1.508.137-.473-.461-2.09-.309-2.724l.645.974.007-4.557.645,1.3c-.5-2.463,1.235-4.8.658-7.164l.646.648-.338-1.442.682-.367c-.588-1.084-.187-1.967-.013-3.078l.647.33-.32-1.955.645.974c-.27-1.652-.483-4.277.937-5.359l-.295-1.148-.965-.009a4.224,4.224,0,0,1-.016,1.045c-.685,1.924-2.922,3.817-3.508,4.9-1.272,2.357-2.642,4.915-4.436,7.589-2.05,3.056-6.171,8.049-7.116,11.158-.1.328-2.327,2.612-2.4,2.779-.272.593-.235,1.768-.519,2.1-.236.275-.91.191-1.152.475-.188.221-.181.921-.459,1.333-2.148,3.184-9.429,11.97-12.893,12.847-.761.193-1.536-.069-2.152.079-.249.06-.206.648-.4.658a19.446,19.446,0,0,1-6.55-1.421c-.643-.321-5.508-4.527-6.273-5.3-.378-.381-2.372-2.57-2.457-2.734-.374-.725-.116-2.3-.807-3.05-.506-.546-1.551-.971-2.1-2.191a50.282,50.282,0,0,1-1.342-4.856c-1.11.29-.738,1.165-1.125,1.721-2.055,2.951-4.042,5.866-6.1,8.827-4.392,6.321-11.351,17.384-20.474,16.808-1.378-.087-2.632-.852-4.078-.323l.649-.645-2.28-.006c.664-1.515-1.775-1.247-2.288-1.5-.323-.16-4.95-4.777-5.115-5.1-.23-.449-.057-1.158-.343-1.78a42.282,42.282,0,0,1-1.86-3.99,6.616,6.616,0,0,1-.524-1.295l-.622.311.345-1.125-.593-.236.242-1.244-.645.648c.68-2.617-1.007-5.141-.659-7.815l-.645,1.625a75.7,75.7,0,0,0-.018-7.666c0-.693.333-1.312.341-1.942.013-1.062-.646-2.51-.323-3.745l.645,2.6c-.291-2.435.488-4.442.007-6.838l.645,1.3-.341-2.4.691-.4c-1.212-1.609.585-3.334.585-3.53,0-.275-.379-.712-.27-1.272.238-1.216,2.076-7.114,1.618-7.7-1.168-.174-1.176,1.5-1.4,1.853-.68,1.076-4.179,5.466-4.384,6.028-.088.24.337.6.2.85-.043.083-1.432.969-1.5,1.126-.315.776-.028,1.629-.652,2.761a103.535,103.535,0,0,1-7.4,12.16c-3.3,4.489-6.348,8.6-9.631,12.851-1.11,1.439-6.623,6.743-8.142,7.189-1.272.374-1.392-.428-2.064-.439-.929-.014-3.061.842-4.314.9-1.292.066-2.643-.843-2.912.324-.789-1.123-2.244-.6-2.724-.732a45.76,45.76,0,0,1-5.232-5.4,16.675,16.675,0,0,0-1.216-2.643c-.925-1.313-.2-.344-.582-1.643a33.744,33.744,0,0,1-1.2-3.709,15.365,15.365,0,0,1-.624-4.772l-.654.162a7.379,7.379,0,0,0,.351-1.605c.1-3.622-.214-7.428.158-10.98.261-2.5,1.614-5.557,1.762-7.989a12.3,12.3,0,0,0-.309-1.74l.655.162-.307-.994.657-.337-.353-1.436.647.331a23.07,23.07,0,0,1,1.237-4.812c.4-1.49.659-3.349,1.245-4.971.146-.407.827-.775.985-1.613.115-.611-.213-1.171-.148-1.453.09-.39.748-.417.937-.739,2.449-4.179,4.252-9.671,6.894-14.22,4.048-6.969,6.32-7.9,12.8-12.583,2.084-1.505,3.826-4.089,6.677-4.591l-.316-.626c.815.555,1.433-.149,1.784-.159,1.118-.035,6.646,0,7.256.292.3.144,1.135,1.162,2.038,1.353.5.1,1.2-.256,1.3-.187.056.041.106.85.431,1.214.718.8,2.374,1.641,3.177,2.535a25.44,25.44,0,0,1,4.324,7.275c.748.074.508.249.221.862l.654-.158c-.616,1.287.151.877.229,1.033.145.292-.626.939.764,1.438l-.324,1.244.933.554-.3.776.653-.16-.319,1.305c2.025.224,2.251-1.876,3.25-3.01,2.206-2.5,5.493-5.331,8.376-6.35a1.737,1.737,0,0,0,1.223-1.023l1.811.282-.973-.645a8.911,8.911,0,0,0,4.233,0l-.648.645,3.179.443c1.605,1.649,3.985,3,5.181,4.848.1.155-.141.649.124,1.027s.871.489.926.582c.1.168-.3,1.212-.3,1.721-.055,3.478.5,4.23-.8,7.665-2.518,6.656-7.167,14.877-7.956,22.024-.215,1.949.687,4.18-.026,6.322l-.646-.649c.668,4.209-.819,8.613-1.3,12.87-.54,4.764-1.363,9.929.733,14.4.541.512,3.234-.371,3.812-.739.526-.334.818-1.136,1.309-1.624,7.66-7.62
291,12.378-16.412,17.705-25.47.424-.721,2.479-1.627,1.527-3.184l.654.161c-.626-1.466.229-1.249.3-1.55a43.18,43.18,0,0,1,5.183-13.006c.933-1.625,2.468-4.9,4.247-5.036l.042-.779c.993.38.657-.475,1-1.212.619-1.319.918-3.783,2.034-5.36,5.528-7.814,21.308-27.677,29-32.52.5-.317,4.111-2.374,4.365-2.429.751-.166,3.423.183,3.687-.009l-.332-.647,1.125.34c3.254-2.633,8.315-2.639,13.1-2.074.336.04.938-.335,1.1-.22l-.16.654.758-.26.23.6,1.127-.345-.16.654c.991-.676.754.16.88.209.24.094,2.734,1.183,2.868,1.283.15.111,2.528,2.495,2.627,2.654.326.527-.126,1.27-.023,1.389l.647-.331.005,1.959.646-.329.286,5.992-.932.2.295.836-.59.292.3.817c-.812.036-1.468.761-2.193.913-1.865.392-2.377-.408-3.829-.588a22.065,22.065,0,0,0-18.623,7.17c-.44.49-.318,1.054-.456,1.635l-.322-.973c-.529-.125-.666.182-.988.475-2.7,2.456-8.306,9.916-10.358,13.1-.7,1.086-1.64,1.949-1.361,3.359l.97-.493-4.866,6.935c-1.338,2.914-3.654,5.629-5.124,8.321-1.254,2.3-2.428,5.291-3.471,7.777-3.824,9.113-7.912,19.6-5.747,29.568a5.244,5.244,0,0,0,2.257-.168c.2-.06,3.053-2.177,3.342-2.42a82.268,82.268,0,0,0,8.634-9.541c3.657-4.6,6.023-9.91,8.963-14.99,5.55-9.59,11.643-19.98,17.474-29.423a14.906,14.906,0,0,0,1.091-2.682c.083-.132.718-.2.946-.505.409-.553.674-1.148,1.28-1.967,1.316-1.779,2.357-4.384,4.885-4.421l-.33-.647,3.263,0-.331-.647c.814.3,1.642-.1,2.414,0,.712.1,5.125.879,5.36,1.039.166.113.106.689.575.843.179.06.516-.224.716-.164a37.024,37.024,0,0,1,3.865,3.89c.092.176-.285.6-.074.9.513.739,1.125-.068.512,2.277l.645-.648c-.043,3.04-.059,4.713-1.369,7.6-4.154,9.141-9.342,18.013-12.408,27.978a22.038,22.038,0,0,0-.828,3.075c-.027.476-.222.494.425.435,1.273-.505,1.706-1.438,2.582-2.146,5.935-4.79,11.025-10.256,16.838-15.265,4.906-4.227,10.356-7.922,15.076-12.449.188-.18.688-.108,1.013-.424.1-.092-.092-.417-.005-.575.068-.124.574,0,.549-.556-.024-.512-.408-.956-.358-1.485l.647.331c-.569-1.437.4-2.063.6-3.185a17.76,17.76,0,0,0,.058-3.336l.647.332-.292-1.161c1.241-.488,1-2.9.948-4.058l.655.16-.284-.767c1.1-.132.748-1.43,1.127-2.289,1.552-3.518,2.313-4.057,5.141-6.273.666-.522.291-1.259,1.338-.6l-.16-.655h8.8l-.648.645,2.609.006-.161.654.767-.281c.3,1.1,1.669,1.315,2.651.93l-.33.644a5.181,5.181,0,0,1,3.931,2.759c.763,1.533-.3,1.452-.547,1.942-.3.589-.128,2.253-.279,2.8-.591,2.145-2.362,2.593-3.307,4.027-.573.869-1.628,4.44-1.841,4.707-.149.188-.805.242-.849.535-.037.256.81,1.311.549,1.893-2.683,7.788-8.338,18.111-7.414,26.428a7.217,7.217,0,0,0,1.761,3.4c1.124-.737,2.393,0,3.3.023.152,0,.137-.5.2-.512.348-.063.673.189,1.16.006,2.491-.939,6.751-5.859,8.993-7.824,2.619-2.295,8.023-5.9,9.959-8.632.247-.349-.91-1.138.37-1.434-.152-3.278,3.166-7.443,5.007-10.44.56-.911,1.967-1.442,1.178-3.061l.655.16-.26-.758.6-.229-.345-1.125.626.315c.179-.12,1.141-3.329,1.644-3.983.371-.482,1.083-.561,1.455-1.238.758-1.374.614-3.205.906-4.63.409-2,1.252-3.056,2.065-5.12,1.14-2.9,2.754-6.032,3.51-9.06.308-1.234,2.838-5.167,3.954-6.916,1.2-1.873,2.815-3.783,3.448-5.854l.585.269c2.185-3.845,5.845-6.191,9.2-8.885a19.726,19.726,0,0,1,2.664-2.022c1.96-1.049,8.728-2.094,11.114-1.385.127.038,1.781,1.066,2.11,1.229.473.234,2.428.917,2.532,1,.41.342.211.857.446,1.165.361.475,1.1.678,1.232.9a40.8,40.8,0,0,1,3.8,7.327c.051.132.863-.09.2.885l.654-.158-.253.935.511.088-.253.935.646-.331.006,2.938.647-.331v12.706l-.645-1.3.342,2.4-.684.386.335,1.441-.645-.648.239,1.249-.544.193c.756,1.332-2.206,3.659-3.417,4.631-.862.692-2.159,1.243-2.521,1.669l-.761-.256.16.654c-.759-.364-4.509.4-4.842.27-.036-.014-.053-.455-.282-.587-3.043-1.745-1.956-1.582-1.413-4.435.572-2.995,1.432-7.324,2.383-10.959.923-3.53.5-4.711.349-8.17a13.972,13.972,0,0,1,.215-2.505l-.647.33c.4-1.414-1.939-2.872-2.775-1.963-.965,1.047-.007,2.028-2.458,1.137-.534.253-3.715,6.25-3.978,7.114a1.785,1.785,0,0,0,.087,1.2l.652-1.3c.6-.073.283.68.172.987-.357.981-1.109,2.02-1.536,3.027a170.364,170.364,0,0,0-6.941,20.124l-.822-.034a6.15,6.15,0,0,1,.27,1.7c-.318,2.931-2.519,8.7-3.309,12.04-.49,2.072-.772,4.2-1.2,6.29l-.647-.162.635.794-.64,3.121-.647-.332c.7,1.723-.064,3.144-.006,4.888l-.645-.974c.641,4.031-.425,8.155-.652,12.218-.2,3.63.172,7.286-.326,10.908l.645-2.277-.319,3.906.645-.974c.47,1.126,0,2.222,0,3.069,0,.205.559.162.754.591a28.249,28.249,0,0,1,.626,3.112,21.9,21.9,0,0,0,1.649,1.49c.2.076,3.122.578,3.286.537.241-.061.163-.581.361-.6,1.22-.121,1.268.215,2.794-.532,3.043-1.489,15.478-11.79,17.452-14.51.989-1.363,1.847-3.848,3.122-5.645,5.3-7.467,11.609-14.638,16.837-22.262,2.286-3.336,3.846-6.474,6.173-9.792,1.91-2.724,6.795-9.723,10.04-10.172a2.363,2.363,0,0,1,2.823,1.372,19.494,19.494,0,0,1,.526,3.354c0,.137-.506.11-.672.6-.215.644-.448,2.483-.7,3.048-.412.926-3.068,3.5-3.456,4.56-.138.379.129,1.055-.053,1.342-.124.193-.947.139-1.19.439-.213.261-.14.907-.405,1.317-3.993,6.153-8.715,12.255-12.263,18.288-7.4,12.589-19.144,25.37-30.27,35.041-2.52,2.19-2.958,3.486-6.265,4.667-.118.042-.88,1.265-1.071,1.374-.371.21-.785-.172-.914-.1-1.178.7-2.492,2.122-4.286,2.413a4.812,4.812,0,0,1-1.636-.2l.16.655c-1.016-.747-.724.3-1,.343l-2.41-.345,1.3.644a31.322,31.322,0,0,0-7.818,0l.975-.644c-.508-.248-1.736.333-1.9
2906.264-.041-.016-.06-.5-.27-.6-4.264-1.945-4.1-1.568-6.958-5.361-1.524-2.022-3.469-4.2-4.2-6.892a34.558,34.558,0,0,0-1.984-6.093c-.1-.23-.632-.182-.617-.361a13.839,13.839,0,0,0-.041-4.205c-.06-.262-.618-.2-.611-.357.071-1.542.549-3.379.286-5.07l-.645,3.906c-.348-1.628.332-3.606.322-5.047,0-.627-.34-1.249-.341-1.942,0-2.393.035-4.786.014-7.179l.327-.164Zm-197.578-47.5c-1.2-.777-2.012-3.088-3.939-2.919-1.553.137-4.7,2.77-5.764,3.992-1.761,2.013-1.477,2.665-2.44,4.728a100.1,100.1,0,0,0-6.355,16.29c-.924-.362.744-2.542.328-2.928h-.969L221.3,189.8c1.35,3.035-.432,6.378-.648,9.423-.126,1.762-.588,7.255,2.435,6.042.169-.067,2.243-1.332,2.34-1.429.2-.2.162-.78.408-1.043,4.806-5.113,9.825-12.667,13.527-18.412,2-3.1,3.6-6.7,5.474-9.683.408-.647,2.149-1.089,1.545-3.022,1.691.675,1.885-2.743,2.366-3.493.346-.539,1.417-1.043,2-2.4.763-1.782.019-2.848.193-4.529l-.647.332-.006-2.286-.646.33.345-1.126-.6-.229.253-.929-.654.16a2.835,2.835,0,0,0-.324-2.541,5.5,5.5,0,0,1-.516-1.8c-.229-.931-1.125-.5-.454-1.507l-.654.16a37.163,37.163,0,0,1,.241-5.157m93.939,84.97-.316-1.151-.945-.111a2.656,2.656,0,0,1-.51.938,215.845,215.845,0,0,0-15.159,17.513c-1.068,1.369-2.21,3.983-3.385,5.17a8.8,8.8,0,0,1-1.5.81c-.138.211.438.808.163,1.254-.166.267-1.444,1.035-1.716,1.41-3.392,4.684-6.593,10.284-9.643,15.287-.863,1.415-3.006,3.827-3.463,5.06a19.021,19.021,0,0,1-.357,2.032l-.645-.329c.415,1.054.119,1.461-.342,2.367-.2.4-1.027,1.6-1.2,1.931-.051.1.256,1.742-.093,2.221l-.647-.33-.005,3.588-.647-.331c.416,2.93.3,5.43.892,8.407.074.37-.234.842-.171.991a1.016,1.016,0,0,1,.84.938c.245,1.733.45,1.416,1.177,2.708a21.5,21.5,0,0,0,1.271,2.494c1.112,1.093,3.028.478,4.466.751l-.331-.648c1.268.6.77-.1,1.237-.306,3.134-1.353,5.928-5.537,7.679-8.173,1.122-1.69,2.55-4.051,3.426-5.726,1.118-2.135,2.43-4.674,3.236-6.539.869-2.007,2.309-4.879,2.025-6.951l.654.16c-.669-1.092.093-.648.331-1.033.373-.6,0-1.152.08-1.342,1.165-2.586,2.044-5.2,3.142-7.8,1.03-2.44,1.3-6.064,2.634-8.444a1.91,1.91,0,0,0,.275-.668c.374-2.609,1.525-4.92,1.73-7.76l.631-.344-.352-1.435.651.159c-.57-.875.493-1.309.6-2.016.075-.491-.276-.887-.277-1.208,0-.221.6-.187.767-.591.312-.752-.087-1.09-.057-1.4.012-.127.442-1.553.6-2.216.045-.193,1.151-.332.343-1.974,1.62-.759.278-1.494.987-3.2a5.963,5.963,0,0,1,1.244-2.348l-.291-1.159.646.648-.328-1.46Z",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_81","data-name":"Path 81",d:"M230.249,1.955,269.52,61.57V1.955h17.273V93.17H269.846C257.114,73.179,244.4,53.147,231.064,33.554V93.17H213.791V1.955Z",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_82","data-name":"Path 82",d:"M381.63,93.17,417.3,1.932,434.056,2,469.3,93.17H451.373l-7.32-18.591-37.61.066L399.555,93.17Zm56.381-35.509L425.464,26.384,412.917,57.661Z",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_83","data-name":"Path 83",d:"M324.6,1.955l-.014,62.4c.036,8.872,4.5,14.978,13.88,14.5,9.128-.468,12.532-7.124,12.545-15.475l-.013-61.42h17.273l.013,61.095c.026.668-.3,1.291-.336,1.944-.492,8.515-.936,13.626-6.68,20.361-10.549,12.368-30.48,13.407-43.16,3.716-9-6.879-10.152-16.3-10.794-27l.013-60.117Z",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_84","data-name":"Path 84",d:"M499.28,1.955v74.6h25.094V93.17H482.007V1.955Z",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_85","data-name":"Path 85",d:"M435.964,83.827a6.773,6.773,0,0,0,1.424,1.006,5.255,5.255,0,0,1,2.078,1.182c3.186,2.172,6.444,6.968,4.9,11.389-.64,1.831-2.522,3.837-3.9,5.2-.58.574-2.032,1.3-2.46,1.878-.9,1.214-1,3.646-1.935,5.145s-3.022,2.038-2.941,4.061c.5-.283,1.9-.55,2.192-.742.585-.383.546-1.852,2.038-.07-1.262.715-1.4,2.569-2.186,3.982-.12.214-1.484,2.258-1.581,2.362-.59.642-3.366,1.843-3.816,2.273-.432.412-.5,1.425-1.069,1.963-.841.793-4.289,4.236-5.229,4.5-.207.057-.586-.254-.726-.181-.1.054-.149.654-.842.952a6.946,6.946,0,0,1-2.475.062c-1.9-.638-1.43-2.641-1.916-3.222a5.077,5.077,0,0,1-1.646-3.879c-.1-1.464.1-2.922.025-4.367l1.856-.753c-.641-.812,1.023-.889,1.359-1.736l-.65-.483c2.141.013,1.486-.879,1.848-1.632a17.91,17.91,0,0,0,1.348-4.1c.178-.585,1.394-1.049.716-2.42l.647.331-.253-.928.6-.229-.345-1.128.646.332.005-2.286.647.331,0-2.286.649.332c-.321-1.372.778-2.557.86-4.013a4.984,4.984,0,0,0-1.053-3.775c-1.1-1.186-2.085-.582-1.758-2.968l.646.331c-.56-1.571,1.374-1.6,1.815-2.611.141-.322-.4-.553-.362-.994.164-2.151,1.014-1.2,1.878-1.619.281-.137.316-.571.494-.656,1.244-.586,7.
29046-1.044,8.471-.534",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_86","data-name":"Path 86",d:"M99.074,93.824c.407.48-2.111,3.5-2.59,4.089-3.181,3.936-6.842,7.957-10.01,11.98-.306.389-.485,1.489-.825,1.78a.883.883,0,0,0-1.131.464,22.69,22.69,0,0,1-4.035,6.335c-1.243,1.279-2.341,3.857-3.254,5.407-.6,1.026-2.658,3.866-3.136,4.876-.125.265.471,1.792-1.088,1.223.253,2.034-1.819,3.385-2.809,4.988-1.418,2.3-2.971,5.762-4.554,8.346-.734,1.2-1.98,2.541-2.694,3.654-.1.148.394.658.241.873-.5.7-1.974,2.061-2.536,2.858-.453.641-.087,1.579-1.336,1.762.011-2.642,1.712-5.259.977-7.821l.646.331c3.725-12.774,7.882-25.42,10.989-38.375,1.728-7.205,3.856-15.288,3.37-22.725-.179-2.728-1.191-5-1.648-7.643L73,76.557l.343-1.125-.6-.231.245-.726c-.851-.34-.332-.552-.437-.777-.079-.169-.812.192-.209-1.054l-.655.159c.67-.982-.151-.753-.2-.883-.563-1.444-1.516-3.407-2.1-5.216-.092-.285-.587-.246-.58-.392.03-.6.186-2.4.29-2.885.045-.211,1.477-2.8,1.791-3.8,2.488-7.912,4.67-15.91,7.33-23.785l9.613,57.349Z",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_87","data-name":"Path 87",d:"M169.794,57.661H144.7l12.547-31.277Z",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_88","data-name":"Path 88",d:"M31.666,55.97c.027.06.559.078.713.469.26.662.485,3.921.62,4.1,1.159,1.494.952,1.347,1.4,3.354.243,1.1,1.461.885-.388,2.521-.71.627-2.26,1.105-2.634,1.438-2.867,2.554-6.066,6.6-8.878,9.531-1.117,1.166-3.089,1.835-2.292,3.412l-.971-.329c-.107.68-.4,1.726-1.306,1.631l7.5-46.256c.469-.076.427.55.564.9A149.548,149.548,0,0,1,31.812,54.4c.147.679-.26,1.312-.146,1.57",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_89","data-name":"Path 89",d:"M341.216,231.624l-.654-.162.328,1.46-.646-.648.291,1.159a5.963,5.963,0,0,0-1.244,2.348c-.709,1.709.633,2.444-.987,3.2.808,1.642-.3,1.781-.343,1.974-.154.663-.584,2.089-.6,2.216-.03.312.369.65.057,1.4-.168.4-.767.37-.767.591,0,.321.352.717.277,1.208-.107.707-1.17,1.141-.6,2.016l-.651-.159.352,1.435-.631.344c-.205,2.84-1.356,5.151-1.73,7.76a1.91,1.91,0,0,1-.275.668c-1.336,2.38-1.6,6-2.634,8.444-1.1,2.6-1.977,5.215-3.142,7.8-.085.19.293.739-.08,1.342-.238.385-1-.059-.331,1.033l-.654-.16c.284,2.072-1.156,4.944-2.025,6.951-.806,1.865-2.118,4.4-3.236,6.539-.876,1.675-2.3,4.036-3.426,5.726-1.751,2.636-4.545,6.82-7.679,8.173-.467.2.031.906-1.237.306l.331.648c-1.438-.273-3.354.342-4.466-.751A21.5,21.5,0,0,1,303.547,302c-.727-1.292-.932-.975-1.177-2.708a1.016,1.016,0,0,0-.84-.938c-.063-.149.245-.621.171-.991-.591-2.977-.476-5.477-.892-8.407l.647.331.005-3.588.647.33c.349-.479.042-2.122.093-2.221.172-.336,1-1.529,1.2-1.931.461-.906.757-1.313.342-2.367l.645.329a19.021,19.021,0,0,0,.357-2.032c.457-1.233,2.6-3.645,3.463-5.06,3.05-5,6.251-10.6,9.643-15.287.272-.375,1.55-1.143,1.716-1.41.275-.446-.3-1.043-.163-1.254a8.8,8.8,0,0,0,1.5-.81c1.175-1.187,2.317-3.8,3.385-5.17A215.845,215.845,0,0,1,339.445,231.3a2.656,2.656,0,0,0,.51-.938l.945.111Z",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_90","data-name":"Path 90",d:"M247.276,146.654a37.315,37.315,0,0,0-.241,5.157l.655-.16c-.672,1,.225.576.453,1.508a5.546,5.546,0,0,0,.516,1.8,2.835,2.835,0,0,1,.325,2.541l.654-.16-.253.929.6.229-.345,1.126.647-.33.005,2.286.647-.332c-.174,1.681.57,2.748-.193,4.529-.582,1.36-1.653,1.863-2,2.4-.481.75-.676,4.168-2.366,3.494.6,1.932-1.138,2.374-1.546,3.021-1.878,2.98-3.475,6.581-5.474,9.683-3.7,5.745-8.72,13.3-13.526,18.413-.247.262-.206.838-.409,1.043-.1.1-2.171,1.361-2.34,1.428-3.023,1.213-2.56-4.28-2.435-6.042.217-3.045,2-6.387.648-9.423l6.836-23.983h.968c.416.385-1.252,2.565-.328,2.927a100.057,100.057,0,0,1,6.355-16.289c.963-2.064.68-2.716,2.44-4.729,1.068-1.221,4.212-3.855,5.764-3.992,1.927-.169,2.739,2.142,3.939,2.919",fill:"none"}),jsxRuntimeExports.jsx("path",{id:"Path_91","data-name":"Path 91",d:"M438.011,57.661H412.917l12.547-31.277Z",fill:"none"}),jsxRuntimeExports.jsx("g",{id:"Group_36","data-name":"Group 36",children:jsxRuntimeExports.jsx("g",{id:"Group_35","data-name":"Group 35",clipPath:"url(#clip-path-2)",children:jsxRuntimeExports.jsx("g",{id:"Group_33","data-name":"Group 33",children:jsxRuntimeExports.jsx("text",{id:"AI",transform:"translate(376.487 264.973)",fontSize:"61",fontFamily:"Roboto-Bold, Roboto",fontWeight:"700",fill:ds,children:jsxRuntimeExports.jsx("tspan",{x:"0",y:"0",children:"AI"})})})})})]})})}function AuthPageTemplate(ds){const{title:dn,subtitle:ms,children:xs,logoSize:bs={width:200,height:200},logoClassName:Es="",titleMarginTop:ws=""}=ds;return jsxRuntimeExports.jsx("div",{className:"bg-secondary relative min-h-screen",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-12 relative z-10",children:[jsxRuntimeExports.jsx("div",{className:"col-span-12 text-center mx-auto pt-4 pb-2",children:jsxRuntimeExports.jsx(Link$1,{to:"/",children:jsxRuntimeExports.jsx(Logo,{width:bs.width,height:bs.height,className:`${Es}`})})}),jsxRuntimeExports.jsx("div",{className:"col-span-12 text-center",children:jsxRuntimeExports.jsx("div",{className:`title text-4xl ${ws}`,children:dn})}),jsxRuntimeExports.jsx("div",{className:"col-span-12 md:col-span-10 md:col-start-2 lg:col-span-8 lg:col-start-3 xl:col-span-6 xl:col-start-4 flex pb-10",children:jsxRuntimeExports.jsxs("div",{className:"pad mt-4 ml-auto mr-auto min-w-[100%] md:min-w-[500px] shadow-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-2xl text-center mb-2 hidden md:block",children:ms}),jsxRuntimeExports.jsx("div",{children:xs})]})})]})})}function Button({buttonType:ds=ButtonType.Primary,buttonWidth:dn,className:ms,text:xs,jsx:bs,status:Es=SavableInputStatus.Ready,...ws}){return jsxRuntimeExports.jsx("button",{type:"button",disabled:[SavableInputStatus.Processing,SavableInputStatus.Done,SavableInputStatus.Failure].includes(Es),className:`rounded-xs px-4 py-2 font-bold hover:brightness-95 expand-btn cursor-pointer outline-none ${classFor(ds)} ${ms||""} text-sm md:text-lg`,style:{width:dn},...ws,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center justify-center",children:[Es===SavableInputStatus.Ready&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[xs,bs]}),Es===SavableInputStatus.Processing&&jsxRuntimeExports.jsx(Saving,{colour:"#ffffff",width:20,height:20}),Es===SavableInputStatus.Done&&jsxRuntimeExports.jsx(Tick,{colour:"#ffffff",width:20,height:20}),Es===SavableInputStatus.Failure&&jsxRuntimeExports.jsx(Close,{c
29olour:"#ffffff",width:20,height:20})]})})}function ForgotPassword(){const ds=useNavigate(),[dn,ms]=reactExports.useState(""),[xs,bs]=reactExports.useState({});return jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Forgot password? ",subtitle:"No problem.",children:jsxRuntimeExports.jsx("form",{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"mt-5 text-md",children:jsxRuntimeExports.jsx("span",{children:"Enter your account email to reset your password"})}),jsxRuntimeExports.jsx(FormInput,{className:"mt-5",name:"email",placeholder:"[email protected]",onChange:Es=>ms(Es.currentTarget.value),value:dn,autoComplete:"username"}),xs.email&&jsxRuntimeExports.jsx("p",{children:xs.email}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,className:"ml-auto mr-2",text:"Cancel",onClick:()=>ds("/login")}),jsxRuntimeExports.jsx(AsyncButton,{text:"Reset password",validate:()=>validateEmail(dn),save:()=>Sdk.userClient.forgottenPassword(dn),onSuccess:()=>ds("/submitted",{state:{email:dn}}),onFailure:Es=>bs(Es)})]})]})})})}function Eye({visible:ds,colour:dn="#000000",...ms}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"26.558",viewBox:"0 0 30 26.558",...ms,children:jsxRuntimeExports.jsxs("g",{id:"eye","data-name":"Group 3035",transform:"translate(-50.282 10.988)",children:[ds&&jsxRuntimeExports.jsx("path",{id:"visible",d:"M98.084-744.651a5.311,5.311,0,0,0,3.91-1.613,5.345,5.345,0,0,0,1.606-3.917,5.311,5.311,0,0,0-1.613-3.91A5.344,5.344,0,0,0,98.07-755.7a5.31,5.31,0,0,0-3.91,1.613,5.344,5.344,0,0,0-1.606,3.917,5.31,5.31,0,0,0,1.613,3.91A5.344,5.344,0,0,0,98.084-744.651Zm-.007-1.442a3.936,3.936,0,0,1-2.891-1.19A3.936,3.936,0,0,1,94-750.174a3.936,3.936,0,0,1,1.19-2.891,3.936,3.936,0,0,1,2.891-1.19,3.936,3.936,0,0,1,2.891,1.19,3.936,3.936,0,0,1,1.19,2.891,3.936,3.936,0,0,1-1.19,2.891A3.936,3.936,0,0,1,98.077-746.093Zm0,5.744a15.88,15.88,0,0,1-8.952-2.673,16.5,16.5,0,0,1-6.052-7.153,16.51,16.51,0,0,1,6.048-7.153A15.86,15.86,0,0,1,98.073-760a15.88,15.88,0,0,1,8.952,2.673,16.5,16.5,0,0,1,6.052,7.153,16.51,16.51,0,0,1-6.048,7.153A15.86,15.86,0,0,1,98.081-740.349ZM98.077-750.174Zm0,8.314a14.428,14.428,0,0,0,7.842-2.249,14.773,14.773,0,0,0,5.461-6.065,14.773,14.773,0,0,0-5.461-6.065,14.428,14.428,0,0,0-7.842-2.249,14.428,14.428,0,0,0-7.842,2.249,14.773,14.773,0,0,0-5.461,6.065,14.773,14.773,0,0,0,5.461,6.065A14.428,14.428,0,0,0,98.077-741.86Z",transform:"translate(-32.795 753.908)",fill:dn}),!ds&&jsxRuntimeExports.jsx("path",{id:"hidden",d:"M20.209,12.837l-1.2,1.2a3.7,3.7,0,0,1-1.122,3.427,3.708,3.708,0,0,1-3.413,1.108l-1.2,1.2a4.066,4.066,0,0,0,.8.235,5.064,5.064,0,0,0,.938.078,5.484,5.484,0,0,0,5.523-5.523,5.555,5.555,0,0,0-.078-.967,2.911,2.911,0,0,0-.235-.766Zm4.779-4.645L23.843,9.2a16.55,16.55,0,0,1,2.551,2.4A13.45,13.45,0,0,1,28.3,14.57a14.859,14.859,0,0,1-5.423,6.065A14.371,14.371,0,0,1,15,22.884a15.212,15.212,0,0,1-2.154-.151,14.548,14.548,0,0,1-2.078-.454l-1.18,1.18a13.771,13.771,0,0,0,2.68.717A17.168,17.168,0,0,0,15,24.4a15.954,15.954,0,0,0,9-2.7,16.054,16.054,0,0,0,6-7.121,16.571,16.571,0,0,0-2.054-3.426A17.053,17.053,0,0,0,24.988,8.192ZM26.674,0,20.791,5.866a13.763,13.763,0,0,0-2.49-.783A14.888,14.888,0,0,0,15,4.744a15.865,15.865,0,0,0-9,2.7A16.306,16.306,0,0,0,0,14.57a16.009,16.009,0,0,0,2.323,3.751A16.756,16.756,0,0,0,5.4,21.256L1.186,25.488l1.07,1.07L27.744,1.07ZM6.471,20.186a16.624,16.624,0,0,1-2.657-2.43A12.355,12.355,0,0,1,1.7,14.57,14.859,14.859,0,0,1,7.121,8.5,14.371,14.371,0,0,1,15,6.256a13.993,13.993,0,0,1,2.637.254,12.339,12.339,0,0,1,2,.513L17.169,9.506a3.5,3.5,0,0,0-1-.33A5.947,5.947,0,0,0,15,9.047,5.484,5.484,0,0,0,9.477,14.57,5.617,5.617,0,0,0,9.606,15.7a4.531,4.531,0,0,0,.33,1.041ZM17.305,15.741ZM13.052,13.6Z",transform:"translate(50.282 -10.988)",fill:dn})]})})}function FormPassword({className:ds,label:dn,onChangeText:ms,name:xs,...bs}){const[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(!1);return jsxRuntimeExports.jsxs("div",{className:`${ds||""}`,children:[dn&&jsxRuntimeExports.jsx("label",{className:`${styles$4.Label}`,htmlFor:xs,children:dn}),jsxRuntimeExports.jsxs("div",{className:`${styles$4.Wrapper}`,children:[jsxRuntimeExports.jsx("input",{value:Es,className:`${styles$4.Input} !pr-12 !font-copy`,type:Rs?"text":"password",name:xs,onChange:Cs=>{ws(Cs.target.value),ms&&ms(Cs.target.value)},...bs}),jsxRuntimeExports.jsx("div",{style:{position:"relative"},children:jsxRuntimeExports.jsx("div",{style:{position:"absolute",right:11,top:-33},onClick:()=>js(!Rs),children:jsxRuntimeExports.jsx(Eye,{width:20,visible:Rs})})})]})]})}function sanitizeRedirectPath(ds){if(!ds)return"/";const dn=ds.trim();return!dn.startsWith("/")||dn.startsWith("//")?"/":dn}const OAUTH_ERROR_MESSAGES={claromentis_oauth_unavailable:"Claromentis sign-in is not available right now.",claromentis_oauth_failed:"Claromentis sign-in did not complete. Please try again.",claromentis_oauth_invali
29d_callback:"Claromentis sign-in returned an invalid response. Please try again.",claromentis_oauth_state_invalid:"Your Claromentis sign-in session expired. Please try again.",claromentis_oauth_email_missing:"Your Claromentis account did not provide an email address.",claromentis_oauth_account_not_found:"We could not find a matching Manual Magic account for this Claromentis user."};function Login(){const ds=useNavigate(),[dn]=useSearchParams(),ms=!1,xs=sanitizeRedirectPath(dn.get("redirect")),bs=dn.get("oauthError"),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState({});return jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Welcome back!",subtitle:"Sign in to continue",children:jsxRuntimeExports.jsx("form",{children:jsxRuntimeExports.jsxs("div",{children:[bs&&jsxRuntimeExports.jsx("p",{className:"mt-2 mb-4 text-center text-sm text-white",children:OAUTH_ERROR_MESSAGES[bs]??"Claromentis sign-in was unsuccessful. Please try again."}),jsxRuntimeExports.jsx(FormInput,{className:"mt-5",name:"email",placeholder:"[email protected]",onChange:ks=>ws(ks.currentTarget.value),value:Es,autoComplete:"username"}),Cs.email&&jsxRuntimeExports.jsx("p",{children:Cs.email}),jsxRuntimeExports.jsx(FormPassword,{className:"mt-5",placeholder:"Password",onChange:ks=>js(ks.currentTarget.value),value:Rs,autoComplete:"current-password"}),Cs.password&&jsxRuntimeExports.jsx("p",{children:Cs.password}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex flex-col",children:[jsxRuntimeExports.jsxs("div",{className:"flex",children:[jsxRuntimeExports.jsx(Link$1,{to:"/forgotten-password",className:"mb-auto underline",children:"Forgot password?"}),jsxRuntimeExports.jsx(AsyncButton,{className:"ml-auto",text:"Login",validate:()=>validate$2(Es,Rs),save:()=>Sdk.userClient.login(Es,Rs),onSuccess:()=>ds(xs),onFailure:ks=>As(ks)})]}),jsxRuntimeExports.jsxs("div",{className:"mt-5 text-md",children:[jsxRuntimeExports.jsx("span",{children:"No account? "}),jsxRuntimeExports.jsx(Link$1,{to:"/pricing",className:"underline",children:"Choose a plan and sign up"})]}),ms]})]})})})}var BillingPeriod=(ds=>(ds.MONTHLY="Monthly",ds.ANNUAL="Annual",ds))(BillingPeriod||{});const STORAGE_KEY$1="mm_demo_contact";function saveDemoContact(ds){sessionStorage.setItem(STORAGE_KEY$1,JSON.stringify(ds))}function readDemoContact(){try{return JSON.parse(sessionStorage.getItem(STORAGE_KEY$1)??"{}")??{}}catch{return{}}}function clearDemoContact(){sessionStorage.removeItem(STORAGE_KEY$1)}function SignUp(){const{state:ds}=useLocation(),dn=useNavigate(),[ms]=useSearchParams(),xs=ds?.demoSessionId||ms.get("demo")||sessionStorage.getItem("mm_demo_session")||void 0,[bs]=reactExports.useState(()=>xs?readDemoContact():{}),[Es,ws]=reactExports.useState(bs.companyName??""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState(""),[ks,Os]=reactExports.useState(bs.email??""),[Ms,Ds]=reactExports.useState(""),[Ps,Ls]=reactExports.useState(""),[Bs,Fs]=reactExports.useState({});return reactExports.useEffect(()=>{(ds?.adminSeats||ds?.readerSeats)&&sessionStorage.setItem("pendingCheckout",JSON.stringify({adminSeats:ds.adminSeats??1,readerSeats:ds.readerSeats??0,billingPeriod:ds.billingPeriod??BillingPeriod.MONTHLY,currency:ds.currency??"gbp"}))},[ms,ds]),jsxRuntimeExports.jsxs(AuthPageTemplate,{title:"Create Your Account",subtitle:"Sign up to get started",children:[jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"Organisation",name:"organisation",placeholder:"Company name",onChange:Us=>ws(Us.currentTarget.value),value:Es}),Bs.organisation&&jsxRuntimeExports.jsx("p",{children:Bs.organisation}),jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"First Name",name:"firstName",placeholder:"John",onChange:Us=>js(Us.currentTarget.value),value:Rs}),Bs.firstName&&jsxRuntimeExports.jsx("p",{children:Bs.firstName}),jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"Last Name",name:"lastName",placeholder:"Smith",onChange:Us=>As(Us.currentTarget.value),value:Cs}),Bs.lastName&&jsxRuntimeExports.jsx("p",{children:Bs.lastName}),jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"Email",n
29ame:"email",placeholder:"[email protected]",onChange:Us=>Os(Us.currentTarget.value),value:ks,autoComplete:"username"}),Bs.email&&jsxRuntimeExports.jsx("p",{children:Bs.email}),jsxRuntimeExports.jsx(FormPassword,{label:"Password",name:"password",placeholder:"Password",onChange:Us=>Ds(Us.currentTarget.value),value:Ms,autoComplete:"new-password"}),Bs.password&&jsxRuntimeExports.jsx("p",{children:Bs.password}),jsxRuntimeExports.jsx(FormPassword,{className:"mt-4",label:"Confirm Password",name:"confirm",placeholder:"Confirm Password",onChange:Us=>Ls(Us.currentTarget.value),value:Ps,autoComplete:"new-password"}),Bs.confirm&&jsxRuntimeExports.jsx("p",{children:Bs.confirm}),jsxRuntimeExports.jsxs("div",{className:"sm:col-span-2 flex items-center",children:[jsxRuntimeExports.jsx(Link$1,{to:"/login",className:"text-sm text-secondary hover:text-primary underline",children:"Already have an account?"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,className:"ml-auto mt-4 inline-flex items-center justify-center rounded-lg bg-primary text-white px-4 py-2 font-semibold hover:brightness-95 disabled:opacity-60 disabled:cursor-not-allowed",validate:()=>{const Us={};return isBlank(Rs)&&(Us.firstName="First name required"),isBlank(Cs)&&(Us.lastName="Last name required"),isBlank(ks)?Us.email="Email required":/\S+@\S+\.\S+/.test(ks)||(Us.email="Invalid email"),isBlank(Es)&&(Us.organisation="Please enter your company name."),isBlank(Ms)&&(Us.password="Password required"),(Ms&&Ms.length<8||!/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/.test(Ms))&&(Us.password="8 characters, 1 number & 1 uppercase"),Ms!==Ps&&(Us.confirm="Passwords must match"),Us},save:()=>Sdk.userClient.register(Es,Rs,Cs,ks,Ms,xs),onSuccess:()=>{sessionStorage.removeItem("mm_demo_session"),clearDemoContact(),dn("/checkout")},onFailure:Us=>Fs(Us),text:"Create account"})]})]})}const toKebabCase=ds=>ds.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),toCamelCase=ds=>ds.replace(/^([A-Z])|[\s-_]+(\w)/g,(dn,ms,xs)=>xs?xs.toUpperCase():ms.toLowerCase()),toPascalCase=ds=>{const dn=toCamelCase(ds);return dn.charAt(0).toUpperCase()+dn.slice(1)},mergeClasses=(...ds)=>ds.filter((dn,ms,xs)=>!!dn&&dn.trim()!==""&&xs.indexOf(dn)===ms).join(" ").trim(),hasA11yProp=ds=>{for(const dn in ds)if(dn.startsWith("aria-")||dn==="role"||dn==="title")return!0};var defaultAttributes$1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Icon$1=reactExports.forwardRef(({color:ds="currentColor",size:dn=24,strokeWidth:ms=2,absoluteStrokeWidth:xs,className:bs="",children:Es,iconNode:ws,...Rs},js)=>reactExports.createElement("svg",{ref:js,...defaultAttributes$1,width:dn,height:dn,stroke:ds,strokeWidth:xs?Number(ms)*24/Number(dn):ms,className:mergeClasses("lucide",bs),...!Es&&!hasA11yProp(Rs)&&{"aria-hidden":"true"},...Rs},[...ws.map(([Cs,As])=>reactExports.createElement(Cs,As)),...Array.isArray(Es)?Es:[Es]]));const createLucideIcon=(ds,dn)=>{const ms=reactExports.forwardRef(({className:xs,...bs},Es)=>reactExports.createElement(Icon$1,{ref:Es,iconNode:dn,className:mergeClasses(`lucide-${toKebabCase(toPascalCase(ds))}`,`lucide-${ds}`,xs),...bs}));return ms.displayName=toPascalCase(ds),ms};const __iconNode$$=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ArrowLeft=createLucideIcon("arrow-left",__iconNode$$);const __iconNode$_=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],BadgeCheck=createLucideIcon("badge-check",__iconNode$_);const __iconNode$Z=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Bold=createLucideIcon("bold",__iconNode$Z);const __iconNode$Y=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],Book=createLucideIcon("book",__iconNode$Y);const __iconNode$X=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]],ChartColumnBig=createLucideIcon("chart-column-big",__iconNode$X);const __iconNode$W=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ChevronDown=createLucideIcon("chevron-down",__iconNode$W);const __iconNode$V=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ChevronRight=createLucideIcon("chevron-right",__iconNode$V);const __iconNode$U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],CircleCheck=createLucideIcon("circle-check",__iconNode$U);const __iconNode$T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],CircleX=createLucideIcon("circle-x",__iconNode$T);const __iconNode$S=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Circle=createLucideIcon("circle",__iconNode$S);
29const __iconNode$R=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],ClipboardList=createLucideIcon("clipboard-list",__iconNode$R);const __iconNode$Q=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],CloudUpload=createLucideIcon("cloud-upload",__iconNode$Q);const __iconNode$P=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],CodeXml=createLucideIcon("code-xml",__iconNode$P);const __iconNode$O=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Columns3=createLucideIcon("columns-3",__iconNode$O);const __iconNode$N=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Download=createLucideIcon("download",__iconNode$N);const __iconNode$M=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],Eraser=createLucideIcon("eraser",__iconNode$M);const __iconNode$L=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ExternalLink=createLucideIcon("external-link",__iconNode$L);const __iconNode$K=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],FilePlus=createLucideIcon("file-plus",__iconNode$K);const __iconNode$J=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],FileText=createLucideIcon("file-text",__iconNode$J);const __iconNode$I=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],GraduationCap=createLucideIcon("graduation-cap",__iconNode$I);const __iconNode$H=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],GripVertical=createLucideIcon("grip-vertical",__iconNode$H);const __iconNode$G=[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]],Hand=createLucideIcon("hand",__iconNode$G);const __iconNode$F=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],Handshake=createLucideIcon("handshake",__iconNode$F);const __iconNode$E=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],Heading1=createLucideIcon("heading-1",__iconNode$E);const __iconNode$D=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
29]],Heading2=createLucideIcon("heading-2",__iconNode$D);const __iconNode$C=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],Heading3=createLucideIcon("heading-3",__iconNode$C);const __iconNode$B=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],History=createLucideIcon("history",__iconNode$B);const __iconNode$A=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Info$2=createLucideIcon("info",__iconNode$A);const __iconNode$z=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Italic=createLucideIcon("italic",__iconNode$z);const __iconNode$y=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Link=createLucideIcon("link",__iconNode$y);const __iconNode$x=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],ListFilter=createLucideIcon("list-filter",__iconNode$x);const __iconNode$w=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],ListOrdered=createLucideIcon("list-ordered",__iconNode$w);const __iconNode$v=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],LoaderCircle=createLucideIcon("loader-circle",__iconNode$v);const __iconNode$u=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],List=createLucideIcon("list",__iconNode$u);const __iconNode$t=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Loader=createLucideIcon("loader",__iconNode$t);const __iconNode$s=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],LogIn=createLucideIcon("log-in",__iconNode$s);const __iconNode$r=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],LogOut=createLucideIcon("log-out",__iconNode$r);const __iconNode$q=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Menu$1=createLucideIcon("menu",__iconNode$q);const __iconNode$p=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Mic=createLucideIcon("mic",__iconNode$p);const __iconNode$o=[["path",{d:"M5 12h14",key:"1ays0h"}]],Minus=createLucideIcon("minus",__iconNode$o);const __iconNode$n=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Monitor=createLucideIcon("monitor",__iconNode$n);const __iconNode$m=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],PanelLeftOpen=createLucideIcon("panel-left-open",__iconNode$m);const __iconNode$l=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],PenLine=createLucideIcon("pen-line",__iconNode$l);const __iconNode$k=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Pencil=createLucideIcon("pencil",__iconNode$k);const __iconNode$j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Plus=createLucideIcon("plus",__iconNode$j);const __iconNode$i=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Quote=createLucideIcon("quote",__iconNode$i);const __iconNode$h=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],Redo2=createLucideIcon("redo-2",__iconNode$h);const __iconNode$g=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],RefreshCw=createLucideIcon("refresh-cw",__iconNode$g);const __iconNode$f=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3
29kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Rocket=createLucideIcon("rocket",__iconNode$f);const __iconNode$e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],RotateCcw=createLucideIcon("rotate-ccw",__iconNode$e);const __iconNode$d=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Search=createLucideIcon("search",__iconNode$d);const __iconNode$c=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Settings2=createLucideIcon("settings-2",__iconNode$c);const __iconNode$b=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Shield=createLucideIcon("shield",__iconNode$b);const __iconNode$a=[["path",{d:"M14 14v2",key:"w2a1xv"}],["path",{d:"M14 20v2",key:"1lq872"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M14 8v2",key:"i67w9a"}],["path",{d:"M2 15h8",key:"82wtch"}],["path",{d:"M2 3h6a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2",key:"up0l64"}],["path",{d:"M2 9h8",key:"yelfik"}],["path",{d:"M22 15h-4",key:"1es58f"}],["path",{d:"M22 3h-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h2",key:"pdjoqf"}],["path",{d:"M22 9h-4",key:"1luja7"}],["path",{d:"M5 3v18",key:"14hmio"}]],TableColumnsSplit=createLucideIcon("table-columns-split",__iconNode$a);const __iconNode$9=[["path",{d:"M14 10h2",key:"1lstlu"}],["path",{d:"M15 22v-8",key:"1fwwgm"}],["path",{d:"M15 2v4",key:"1044rn"}],["path",{d:"M2 10h2",key:"1r8dkt"}],["path",{d:"M20 10h2",key:"1ug425"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"M3 22v-6a2 2 135 0 1 2-2h14a2 2 45 0 1 2 2v6",key:"ibqhof"}],["path",{d:"M3 2v2a2 2 45 0 0 2 2h14a2 2 135 0 0 2-2V2",key:"1uenja"}],["path",{d:"M8 10h2",key:"66od0"}],["path",{d:"M9 22v-8",key:"fmnu31"}],["path",{d:"M9 2v4",key:"j1yeou"}]],TableRowsSplit=createLucideIcon("table-rows-split",__iconNode$9);const __iconNode$8=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Table=createLucideIcon("table",__iconNode$8);const __iconNode$7=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Trash2=createLucideIcon("trash-2",__iconNode$7);const __iconNode$6=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Underline=createLucideIcon("underline",__iconNode$6);const __iconNode$5=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Undo2=createLucideIcon("undo-2",__iconNode$5);const __iconNode$4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Upload$1=createLucideIcon("upload",__iconNode$4);const __iconNode$3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Users=createLucideIcon("users",__iconNode$3);const __iconNode$2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],WandSparkles=createLucideIcon("wand-sparkles",__iconNode$2);
29const __iconNode$1=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Workflow=createLucideIcon("workflow",__iconNode$1);const __iconNode=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],X$4=createLucideIcon("x",__iconNode),NAV=[{to:"/",label:"Home"},{to:"/about",label:"About"},{to:"/pricing",label:"Pricing"},{to:"/features",label:"Features"},{to:"/blog",label:"Blog"},{to:"/faq",label:"FAQ"},{to:"/contact",label:"Contact"}],Header=()=>{const[ds,dn]=reactExports.useState(!1),[ms,xs]=reactExports.useState(!1);return reactExports.useEffect(()=>{const bs=()=>dn(window.scrollY>8);return bs(),window.addEventListener("scroll",bs,{passive:!0}),()=>window.removeEventListener("scroll",bs)},[]),reactExports.useEffect(()=>{if(!ms)return;const bs=Es=>{Es.key==="Escape"&&xs(!1)};return window.addEventListener("keydown",bs),()=>window.removeEventListener("keydown",bs)},[ms]),jsxRuntimeExports.jsx("header",{className:["sticky top-0 z-50 transition-all duration-300",ds?"shadow-[0_8px_24px_rgba(0,0,0,.15)]":""].join(" "),role:"navigation","aria-label":"Main",children:jsxRuntimeExports.jsxs("div",{className:`
30          relative
31          text-white
32          bg-[linear-gradient(120deg,var(--color-primary),#ff9c4d_45%,#ffbf80)]
33        `,children:[jsxRuntimeExports.jsx("div",{className:"mm-noise absolute inset-0"}),jsxRuntimeExports.jsx("div",{className:"mx-auto max-w-7xl px-4",children:jsxRuntimeExports.jsxs("div",{className:["flex items-center justify-between transition-[height] duration-300",ds?"h-14":"h-16"].join(" "),children:[jsxRuntimeExports.jsx(Link$1,{to:"/",className:"group flex items-center gap-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70 rounded-md",children:jsxRuntimeExports.jsx(Logo,{width:95,height:45,colour:"#fff",className:"mt-auto mb-auto"})}),jsxRuntimeExports.jsx("button",{type:"button",className:"ml-auto md:hidden inline-flex rounded-md p-2 text-white/90 hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70","aria-label":ms?"Close menu":"Open menu","aria-expanded":ms,"aria-controls":"mobile-menu",onClick:()=>xs(bs=>!bs),children:ms?jsxRuntimeExports.jsx(X$4,{size:22}):jsxRuntimeExports.jsx(Menu$1,{size:22})}),jsxRuntimeExports.jsx("nav",{className:"hidden md:flex items-center gap-2",children:NAV.map(bs=>jsxRuntimeExports.jsx(NavLink,{to:bs.to,className:({isActive:Es})=>["relative px-3 py-2 rounded-full text-sm font-medium transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",Es?"bg-white/20":"hover:bg-white/10"].join(" "),children:jsxRuntimeExports.jsx("span",{className:`
34                                      relative
35                                      after:absolute after:left-3 after:right-3 after:-bottom-0.5
36                                      after:h-[2px] after:rounded-full after:bg-white after:opacity-80
37                                      after:scale-x-0 after:origin-left after:transition-transform
38                                      hover:after:scale-x-100
39                                    `,children:bs.label})},bs.to))}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsxs(Link$1,{to:"/login",className:"hidden md:inline-flex items-center gap-2 rounded-full font-bold border border-white bg-white/15 px-4 py-2 text-sm hover:bg-white/25 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",children:[jsxRuntimeExports.jsx(LogIn,{size:16})," ",Auth.isAuthenticated()?"Continue":"Login"]}),jsxRuntimeExports.jsx(Link$1,{to:"/try",className:`
40                                  hidden md:inline-flex items-center gap-2 rounded-full
41                                  bg-white text-[var(--color-primary)]
42                                  px-4 py-2 text-sm font-semibold transition
43                                  hover:shadow-[0_6px_18px_rgba(0,0,0,.15)]
44                                  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70
45                                  mm-cta-once
46                                `,children:"Sign Up"})]})]})}),ms&&jsxRuntimeExports.jsx("div",{id:"mobile-menu",className:"md:hidden border-t border-white/20",children:jsxRuntimeExports.jsx("div",{className:"mx-auto max-w-7xl px-4 py-3",children:jsxRuntimeExports.jsxs("nav",{className:"flex flex-col gap-1",role:"menu","aria-label":"Mobile",children:[NAV.map(bs=>jsxRuntimeExports.jsx(NavLink,{to:bs.to,onClick:()=>xs(!1),className:({isActive:Es})=>["px-3 py-2 rounded-lg text-base transition","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",Es?"bg-white/20":"hover:bg-white/10"].join(" "),children:bs.label},bs.to)),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[jsxRuntimeExports.jsxs(Link$1,{to:"/login",onClick:()=>xs(!1),className:"inline-flex items-center gap-2 rounded-full border  font-bold border-white bg-white/15 px-4 py-2 text-sm hover:bg-white/25 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",children:[jsxRuntimeExports.jsx(LogIn,{size:16})," ",Auth.isAuthenticated()?"Continue":"Login"]}),jsxRuntimeExports.jsx(Link$1,{to:"/try",onClick:()=>xs(!1),className:"inline-flex items-center gap-2 rounded-full bg-white text-[var(--color-primary)] px-4 py-2 text-sm font-semibold transition hover:shadow-[0_6px_18px_rgba(0,0,0,.15)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70",children:"Sign Up"})]})]})})}),jsxRuntimeExports.jsx("div",{className:"mm-underline"})]})})},Footer=()=>jsxRuntimeExports.jsx("footer",{className:"bg-secondary py-8 text-white",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col lg:flex-row",children:[jsxRuntimeExports.jsxs("div",{className:"lg:w-1/2 mb-6 lg:mb-0 mr-16",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold !text-white mb-4",children:"Ready to turn all those scattered files and half-finished Standard Operating Procedures (SOPs) into the Operations Manual you've been looking for?"}),jsxRuntimeExports.jsx("p",{className:"text-white mb-4",children:"Join Manual Magic today."}),jsxRuntimeExports.jsx(Link$1,{to:"/try",className:"bg-primary text-white hover:bg-tertiary text-light py-2 px-6 rounded-lg inline-block transition-colors",children:"Get Started"})]}),jsxRuntimeExports.jsxs("div",{className:"lg:w-1/2 flex flex-col md:flex-row",children:[jsxRuntimeExports.jsxs("div",{className:"md:w-1/2 mb-6 md:mb-0",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-bold !text-white mb-3",children:"Product"}),jsxRuntimeExports.jsxs("ol",{className:"space-y-2 !list-none !ml-0",children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/about",className:"text-white hover:text-primary transition-colors",children:"About"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/consultancy",className:"text-white hover:text-primary transition-colors",children:"Consultancy"})})]})]}),jsxRuntimeExports.jsxs("div",{className:"md:w-1/2",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-bold !text-white mb-3",children:"Privacy"}),jsxRuntimeExports.jsxs("ol",{className:"space-y-2 !list-none !ml-0",children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/privacy-policy",className:"text-white hover:text-primary transition-colors",children:"Privacy Policy"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/service-providers",className:"text-white hover:text-primary transition-colors",children:"Service Providers"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/terms-and-conditions",className:"text-white hover:text-primary transition-colors",children:"Terms and Conditions"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/ai-policy",className:"text-white hover:text-primary transition-colors",children:"AI Policy"})})]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"border-t border-gray-200 mt-8 pt-6 text-center text-base",children:jsxRuntimeExports.jsxs("p",{children:["© ",new Date().getFullYear()," Manual Magic. All rights reserved."]})})]})});
46function Layout({showHeader:ds=!0,showFooter:dn=!0}){const{pathname:ms}=useLocation(),xs=useNavigationType();return reactExports.useEffect(()=>{xs!=="POP"&&document.getElementById("root")?.scrollTo(0,0)},[ms,xs]),jsxRuntimeExports.jsxs("section",{className:"flex flex-col min-h-screen",children:[ds&&jsxRuntimeExports.jsx(Header,{}),jsxRuntimeExports.jsxs("main",{className:"flex-grow",children:[jsxRuntimeExports.jsx(Outlet,{}),jsxRuntimeExports.jsx(ScrollRestoration,{})]}),dn&&jsxRuntimeExports.jsx(Footer,{})]})}const Headline=ds=>{const{title:dn,subtitle:ms,alignment:xs="left",content:bs,imageUrl:Es,imageAlt:ws,imageClasses:Rs,imageShape:js="circle",imagePosition:Cs="right",ctaText:As,ctaUrl:ks,backgroundClass:Os="",titleClass:Ms,subTitleClass:Ds}=ds,Ps=xs==="center"?"text-center":xs==="right"?"text-right":"text-left";if(!!(bs||Es||As)){const Bs=!!Es,Fs=["w-full","mx-auto",js==="circle"?"rounded-full":"",Rs].join(" ");return jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${Os}`,children:jsxRuntimeExports.jsx("div",{className:"container mx-auto px-4 max-w-6xl",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-10 items-center max-w-6xl mx-auto",children:[jsxRuntimeExports.jsxs("div",{className:`${Bs?"md:col-span-6":"md:col-span-12"} ${Ps} ${Cs==="left"?"md:order-2":"md:order-1"}`,children:[jsxRuntimeExports.jsx("h1",{className:`text-4xl md:text-5xl !font-normal !capitalize ${Ms??"text-gray-900"} mb-4`,children:dn}),ms&&jsxRuntimeExports.jsx("p",{className:`text-xl ${Ds??"text-gray-700"} mb-4`,children:ms}),bs&&jsxRuntimeExports.jsx("div",{className:"prose max-w-none mb-6 text-lg text-pretty",dangerouslySetInnerHTML:{__html:bs}}),As&&ks&&jsxRuntimeExports.jsx("a",{href:ks,className:"inline-block bg-primary text-white font-semibold py-3 px-6 rounded-lg transition-colors duration-300",children:As})]}),Bs&&jsxRuntimeExports.jsx("div",{className:`md:col-span-6 flex justify-center ${Cs==="left"?"md:order-1":"md:order-3"}`,children:jsxRuntimeExports.jsx("img",{src:Es,alt:ws||"",className:Fs})})]})})})}return jsxRuntimeExports.jsx("section",{className:`py-10 ${Ps} ${Os}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntimeExports.jsx("h1",{className:`text-4xl md:text-5xl font-bold ${Ms??"text-gray-900"}`,children:dn}),ms&&jsxRuntimeExports.jsx("p",{className:`text-xl mt-2 ${Ds??"text-gray-700"}`,children:ms})]})})},ContentSection=ds=>{const{title:dn,content:ms,backgroundClass:xs="",titleClass:bs=""}=ds;return jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[dn&&jsxRuntimeExports.jsx("h2",{className:`text-4xl md:text-5xl font-bold text-center mb-12 ${bs}`,children:dn}),jsxRuntimeExports.jsx("div",{className:"prose max-w-3xl mx-auto",dangerouslySetInnerHTML:{__html:ms}})]})})},HeroSection=({title:ds,subtitle:dn,description:ms,backgroundClass:xs="",ctaText:bs,ctaUrl:Es})=>jsxRuntimeExports.jsx("section",{className:`pt-20 pb-18 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4 text-center max-w-3xl",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl md:text-[48px] font-bold !text-white mb-8 leading-tight",children:ds}),dn&&jsxRuntimeExports.jsx("p",{className:"text-xl md:text-4xl text-white mb-6",children:dn}),ms&&jsxRuntimeExports.jsx("p",{className:"text-xl md:text-3xl text-white max-w-4xl mx-auto leading-relaxed",children:ms}),bs&&Es&&jsxRuntimeExports.jsx("a",{href:Es,className:"mt-16 inline-block bg-primary text-white font-semibold py-4 px-10 rounded-lg transition-colors duration-300 text-xl",children:bs})]})}),CTAComponent=({title:ds,titleClass:dn,subTitleClass:ms,subtitle:xs,description:bs,descriptionClass:Es,backgroundClass:ws,ctaText:Rs,ctaUrl:js})=>jsxRuntimeExports.jsx("section",{className:ws,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4 py-10 md:py-32 text-center",children:[ds&&jsxRuntimeExports.jsx("h2",{className:`text-5xl ${dn||"!text-white"}`,children:ds}),xs&&jsxRuntimeExports.jsx("h3",{className:`text-2xl ${ms||"!text-tertiary"} mt-4`,children:xs}),jsxRuntimeExports.jsxs("div",{className:"max-w-3xl mx-auto mt-8",children:[bs&&jsxRuntimeExports.jsx("div",{className:`text-xl whitespace-pre-line text-center ${Es||"!text-tertiary"}`,dangerouslySetInnerHTML:{__html:bs}}),Rs&&js&&jsxRuntimeExports.jsx("a",{href:js,className:"mt-8 inl
46ine-block bg-primary text-white font-semibold py-4 px-10 rounded-lg transition-colors duration-300 text-xl",children:Rs})]})]})}),Testimonial=({quote:ds,authorName:dn,authorTitle:ms,authorCompany:xs,backgroundClass:bs="bg-blue-50",authorImageUrl:Es})=>jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${bs}`,children:jsxRuntimeExports.jsx("div",{className:"container px-4 max-w-[600px] mx-auto",children:jsxRuntimeExports.jsx("div",{className:"max-w-3xl mx-auto",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-full",children:[Es&&jsxRuntimeExports.jsx("img",{src:Es,alt:dn,className:"size-32 rounded-full mx-auto mb-4 object-cover"}),jsxRuntimeExports.jsxs("blockquote",{className:"text-xl md:text-2xl text-gray-800 italic mb-6 mt-2 whitespace-pre-line flex-grow text-center",children:['"',ds,'"']}),jsxRuntimeExports.jsxs("div",{className:"text-center mt-auto",children:[jsxRuntimeExports.jsx("p",{className:"font-semibold !text-gray-700 text-2xl",children:dn}),jsxRuntimeExports.jsxs("p",{className:"!text-gray-700 text-2xl",children:[ms,xs&&`, ${xs}`]})]})]})})})}),TestimonialGallery=({title:ds,titleClass:dn="",testimonials:ms,backgroundClass:xs="bg-blue-50"})=>jsxRuntimeExports.jsx("section",{className:`py-38 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[ds&&jsxRuntimeExports.jsx("h2",{className:`text-4xl md:text-5xl font-bold text-center mb-12 ${dn||"text-gray-800"}`,children:ds}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-6xl mx-auto",children:ms.map((bs,Es)=>jsxRuntimeExports.jsx("div",{className:"p-8",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-full",children:[bs.authorImageUrl&&jsxRuntimeExports.jsx("img",{src:bs.authorImageUrl,alt:bs.authorName,className:"size-32 rounded-full mx-auto mb-4 object-cover"}),jsxRuntimeExports.jsx("blockquote",{className:"text-gray-800 italic mb-6 mt-2 whitespace-pre-line flex-grow",children:bs.quote}),jsxRuntimeExports.jsxs("div",{className:"text-center mt-auto",children:[jsxRuntimeExports.jsx("p",{className:"font-semibold !text-gray-700 text-xl",children:bs.authorName}),jsxRuntimeExports.jsxs("p",{className:"!text-gray-700 text-xl",children:[bs.authorTitle,bs.authorCompany&&`, ${bs.authorCompany}`]})]})]})},Es))})]})}),VideoTestimonial=({title:ds,titleClass:dn="",videoUrl:ms,posterUrl:xs,captionsUrl:bs,quote:Es,authorName:ws,authorTitle:Rs,authorCompany:js,backgroundClass:Cs="bg-secondary"})=>jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${Cs}`,children:jsxRuntimeExports.jsx("div",{className:"container mx-auto px-4",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-16 gap-y-8 max-w-5xl mx-auto",children:[ds&&jsxRuntimeExports.jsx("h2",{className:`text-4xl md:text-5xl font-bold text-center md:text-left md:col-start-2 md:self-end ${dn||"!text-white"}`,children:ds}),jsxRuntimeExports.jsxs("video",{className:"w-full max-w-[280px] md:max-w-[340px] aspect-[9/16] mx-auto md:mr-0 md:col-start-1 md:row-start-1 md:row-span-2 rounded-2xl shadow-2xl bg-black object-cover",controls:!0,playsInline:!0,preload:"metadata",poster:xs,"aria-label":`Video testimonial from ${ws}`,children:[jsxRuntimeExports.jsx("source",{src:ms,type:"video/mp4"}),bs&&jsxRuntimeExports.jsx("track",{kind:"captions",src:bs,srcLang:"en",label:"English"})]}),jsxRuntimeExports.jsxs("div",{className:"text-center md:text-left md:col-start-2 md:self-start",children:[Es&&jsxRuntimeExports.jsxs("blockquote",{className:"text-xl md:text-2xl italic !text-white mb-6 whitespace-pre-line",children:['"',Es,'"']}),jsxRuntimeExports.jsx("p",{className:"font-semibold !text-white text-2xl",children:ws}),(Rs||js)&&jsxRuntimeExports.jsx("p",{className:"!text-white text-2xl",children:[Rs,js].filter(Boolean).join(", ")})]})]})})}),WaitlistForm=({title:ds,subtitle:dn,buttonText:ms="Join Waitlist",placeholderText:xs="Enter your email address",successMessage:bs="Thank you! You've been added to the waitlist."})=>{const[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(!1),[ks,Os]=reactExports.useState(""),Ms=async Ds=>
46{if(Ds.preventDefault(),!Es.trim()){Os("Please enter a valid email address");return}js(!0),Os("");try{await new Promise(Ps=>setTimeout(Ps,1e3)),As(!0),ws("")}catch{Os("Something went wrong. Please try again.")}finally{js(!1)}};return Cs?jsxRuntimeExports.jsx("section",{className:"py-16 bg-green-50",children:jsxRuntimeExports.jsx("div",{className:"container mx-auto px-4 text-center",children:jsxRuntimeExports.jsxs("div",{className:"max-w-md mx-auto",children:[jsxRuntimeExports.jsx("div",{className:"text-green-600 mb-4",children:jsxRuntimeExports.jsx("svg",{className:"w-16 h-16 mx-auto",fill:"currentColor",viewBox:"0 0 20 20",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Success!"}),jsxRuntimeExports.jsx("p",{className:"text-gray-700",children:bs}),jsxRuntimeExports.jsx("button",{onClick:()=>As(!1),className:"mt-4 text-blue-600 hover:text-blue-700 underline",children:"Add another email"})]})})}):jsxRuntimeExports.jsx("section",{className:"py-16 bg-gray-900 text-white",children:jsxRuntimeExports.jsx("div",{className:"container mx-auto px-4 text-center",children:jsxRuntimeExports.jsxs("div",{className:"max-w-md mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold mb-4",children:ds}),dn&&jsxRuntimeExports.jsx("p",{className:"text-gray-300 mb-8",children:dn}),jsxRuntimeExports.jsxs("form",{onSubmit:Ms,className:"space-y-4",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("input",{type:"email",value:Es,onChange:Ds=>ws(Ds.target.value),placeholder:xs,className:"w-full px-4 py-3 rounded-lg text-gray-900 border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,disabled:Rs})}),ks&&jsxRuntimeExports.jsx("p",{className:"text-red-400 text-sm",children:ks}),jsxRuntimeExports.jsx("button",{type:"submit",disabled:Rs,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white font-semibold py-3 px-6 rounded-lg transition-colors duration-300",children:Rs?"Joining...":ms})]})]})})})},BenefitsGrid=({heading:ds,headingClass:dn="",benefits:ms,backgroundClass:xs="",ctaText:bs,ctaUrl:Es})=>jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntimeExports.jsx("h2",{className:`text-4xl md:text-[48px] !font-bold text-center uppercase mb-16 !${dn}`,children:ds}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-6xl mx-auto",children:ms.map((ws,Rs)=>jsxRuntimeExports.jsxs("div",{className:" p-8",children:[jsxRuntimeExports.jsx("h3",{className:"text-4xl !text-white mb-4 text-center !font-bold leading-normal text-balance capitalize",children:ws.title}),jsxRuntimeExports.jsx("p",{className:"!text-tertiary text-2xl text-center text-pretty",children:ws.description})]},Rs))}),bs&&Es&&jsxRuntimeExports.jsx("div",{className:"text-center mt-12",children:jsxRuntimeExports.jsx("a",{href:Es,className:"inline-block bg-primary text-white font-semibold py-4 px-10 rounded-lg transition-colors duration-300 text-xl",children:bs})})]})}),ImageWithOptionalLink=({imageUrl:ds,alt:dn,linkUrl:ms})=>{const xs=jsxRuntimeExports.jsx("img",{src:ds,alt:dn||"",className:"w-34 object-cover"});return ms?jsxRuntimeExports.jsx(Link$1,{to:ms,children:xs}):xs},ImageGridGallery=({title:ds,titleClass:dn="",images:ms,backgroundClass:xs=""})=>{const Es=Math.ceil(ms.length/4),ws=[];for(let Rs=0;Rs<Es;Rs++){const js=Rs*4,Cs=Math.min(js+4,ms.length);ws.push(ms.slice(js,Cs))}return jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[ds&&jsxRuntimeExports.jsx("h2",{className:`text-3xl text-center mb-12 ${dn}`,children:ds}),jsxRuntimeExports.jsx("div",{className:"space-y-12",children:ws.map((Rs,js)=>jsxRuntimeExports.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:Rs.map((Cs,As)=>jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center w-full md:w-auto md:flex-1 md:max-w-[calc(50%-0.5rem)] lg:max-w-[calc(25%-0.75rem)]",children:[jsxRuntimeExports.jsx(ImageWithOptionalLink,{...Cs}),Cs.caption&&jsxRuntimeExports.jsx("p",{className:"mt-2 text-center text-gray-600",children:Cs.caption})]},As))},js))})]})})},Grid=({title:ds,titleClass:dn="",gridItems:ms,backgroundClass:xs="",ctaText:bs,ctaUrl:Es})=>{const ws=reactExports.useMemo(()=>ms.length%2==0,[ms]),Rs=ms.length===1?"max-w-xl":`${ws?"md:grid-cols-2":"md:grid-cols-3"} max-w-6xl`;return jsxRuntimeExports.jsx("section",{className:`py-10 md:py-32 ${xs}`,children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4 !max-w-6xl",children:[ds&&jsxRuntimeExports.jsx("h2",{className:`text-4xl md:text-5xl font-bold text-center ${dn||"text-gray-800"}`,children:ds}),jsxRuntimeExports.jsx("div",{className:`grid grid-cols-1 ${Rs} gap-8 mx-auto mt-20`,children:ms?.map((js,Cs)=>jsxRuntimeExports.jsxs("div",{className:`${js.backgroundClass}`,children:[js.imageUrl?jsxRuntimeExports.jsx("img",{src:js.imageUrl,className:js.imageClassName??"w-full rounded-t-2xl"}):null,jsxRuntimeExports.jsxs("div",{className:"p-12 pb-12",children:[jsxRuntimeExports.jsx("h3",{className:`text-2xl font-bold mb-4 !${js.titleClass}`,children:js.title}),jsxRuntimeExports.jsx("div",{className:`max-w-none mx-auto mt-8 !${js.contentClass}`,dangerouslySetInnerHTML:{__html:js.content}})]})]},Cs))}),bs&&Es&&jsxRuntimeExports.jsx("div",{className:"text-center mt-12",children:jsxRuntimeExports.jsx("a",{href:Es,className:"inline-block bg-primary text-white font-semibold py-4 px-10 rounded-lg transition-colors duration-300 text-xl",children:bs})})]})})},DEFAULT_CURRENCY="gbp";function defaultCurrencyCode(){const ds=DateTime.now().zoneName;return ds==="Europe/London"?"gbp":ds.startsWith("Europe")||ds.startsWith("Australia")?"eur":"usd"}function useNetworkDebounce(ds,dn){const{skipDoneState:ms=!1,doneStateDelay:xs=1e3}=dn||{},[bs,Es]=reactExports.useState(SavableInputStatus.Ready),[ws,Rs]=reactExports.useState(),js=reactExports.useCallback(ks=>{ds(ks).then(Os=>{ms?`${Os.status}`.startsWith("2")?Es(SavableInputStatus.Ready):Es(SavableInputStatus.Failure):(Es(SavableInputStatus.Done),`${Os.status}`.startsWith("2")?setTimeout(()=>Es(SavableInputStatus.Ready),xs):Es(SavableInputStatus.Failure))}).catch(()=>{Es(SavableInputStatus.Failure)})},[ds,ms,xs]),Cs=()=>{ws&&clearTimeout(ws),Es(SavableInputStatus.Ready)},As=reactExports.useCallback((ks,Os)=>{ws&&clearTimeout(ws),Es(SavableInputStatus.Processing),Rs(setTimeout(()=>{js(ks),Os?.()},1e3))},[ws,js]);return reactExports.useEffect(()=>()=>{ws&&clearTimeout(ws)},[ws]),{status:bs,save:As,cancelPendingSave:Cs}}var PageState=(ds=>(ds[ds.NotReady=0]="NotReady",ds[ds.Loading=1]="Loading",ds[ds.Ready=2]="Ready",ds[ds.Error=3]="Error",ds))(PageState||{});function Loading(ds){return jsxRuntimeExports.jsx(Loader,{size:30,className:"animate-spin",...ds})}const PricingSummary=ds=>{const{billingPeriod:dn,pricing:ms,currency:xs,status:bs,formatPrice:Es,onGetStarted:ws}=ds;return jsxRuntimeExports.jsx("div",{className:"w-full",children:jsxRuntimeExports.jsxs("div",{className:"mt-6 flex flex-col sm:flex-row",children:[jsxRuntimeExports.jsx("div",{className:"mt-auto text-sm",children:jsxRuntimeExports.jsx("p",{className:"text-lg text-secondary mt-1",children:"No long-term contracts. Change seats any time."})}),jsxRuntimeExports.jsx("div",{className:"md:ml-auto flex flex-col mt-4 md:mt-0",children:jsxRuntimeExports.jsx(Button,{jsx:jsxRuntimeExports.jsx("div",{className:"w-full md:min-w-56 flex flex-row items-center justify-center",children:bs===SavableInputStatus.Processing?jsxRuntimeExports.jsx(Loading,{size:28}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Es(m
46s.subtotal)," ",jsxRuntimeExports.jsx("span",{className:"font-semibold",children:dn===BillingPeriod.MONTHLY?"pm":"y"}),xs==="gbp"&&jsxRuntimeExports.jsx("span",{className:"ml-1",children:"+ VAT"})]})}),onClick:ws,className:"!p-3 !text-xl"})})]})})};function usePriceFormatter(ds,dn=2){return reactExports.useCallback(ms=>new Intl.NumberFormat("en-US",{style:"currency",currency:ds.toUpperCase(),minimumFractionDigits:dn}).format(ms/100),[ds])}const SeatControl=ds=>{const{label:dn,description:ms,status:xs,pricePerSeat:bs,billingPeriodLabel:Es,currency:ws,value:Rs,min:js,max:Cs,onChange:As,onIncrement:ks,onDecrement:Os}=ds,Ms=usePriceFormatter(ws,0);return jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between border rounded-md border-gray-200 p-3 bg-gray-50 gap-1",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-lg font-semibold text-gray-800 mb-3",children:dn}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 mb-3",children:ms}),jsxRuntimeExports.jsxs("div",{className:"mt-2 text-xs text-gray-600",children:[xs!==SavableInputStatus.Processing&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Ms(bs)," per seat / ",Es]}),"  "]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx("button",{"aria-label":"Decrease team",disabled:Rs<=js,onClick:Os,className:"h-9 w-9 rounded-lg border border-slate-300 bg-white text-secondary hover:bg-slate-50 cursor-pointer",children:"−"}),jsxRuntimeExports.jsx("input",{"aria-label":"Team seats",inputMode:"numeric",pattern:"[0-9]*",className:"w-14 text-center rounded-lg border border-slate-300 bg-white !pt-[5px] !pb-[6px] text-[15px]",value:Rs,onChange:Ds=>As(Ds)}),jsxRuntimeExports.jsx("button",{"aria-label":"Decrease team",disabled:Rs>=Cs,onClick:ks,className:"h-9 w-9 rounded-lg border border-slate-300 bg-white text-secondary hover:bg-slate-50 cursor-pointer",children:"+"})]})]})},PENDING_CHECKOUT_KEY="pendingCheckout";function setCheckoutData(ds){sessionStorage.setItem(PENDING_CHECKOUT_KEY,JSON.stringify(ds))}function getCheckoutData(){const ds=sessionStorage.getItem(PENDING_CHECKOUT_KEY);return ds?JSON.parse(ds):null}function clearCheckoutData(){sessionStorage.removeItem(PENDING_CHECKOUT_KEY)}function transferNamesKey(ds){return`pendingTransfer:${ds}`}function setTransferNames(ds,dn){sessionStorage.setItem(transferNamesKey(ds),JSON.stringify({firstName:dn.firstName,lastName:dn.lastName}))}function getTransferNames(ds){const dn=sessionStorage.getItem(transferNamesKey(ds));return dn?JSON.parse(dn):null}function clearTransferNames(ds){sessionStorage.removeItem(transferNamesKey(ds))}const HomeContext=reactExports.createContext({}),useHomeContext=()=>reactExports.useContext(HomeContext),CURRENCY_LABEL={gbp:"GBP £",usd:"USD $",eur:"EUR €",aud:"AUD $"},CurrencySelector=({value:ds,onValue:dn,...ms})=>jsxRuntimeExports.jsx("div",{className:"inline-flex items-center",...ms,children:jsxRuntimeExports.jsx("select",{id:"currency",value:ds,onChange:xs=>dn(xs.target.value),className:"w-full rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-[var(--color-gold)] focus:border-[var(--color-gold)]","aria-label":"Select currency",children:Object.keys(CURRENCY_LABEL).map(xs=>jsxRuntimeExports.jsx("option",{value:xs,children:CURRENCY_LABEL[xs]},xs))})}),SeatPricing=()=>{const ds=useNavigate(),{ip:dn}=useHomeContext(),[ms,xs]=reactExports.useState(1),[bs,Es]=reactExports.useState(0),[ws,Rs]=reactExports.useState(BillingPeriod.MONTHLY),[js,Cs]=reactExports.useState(defaultCurrencyCode()),[As,ks]=reactExports.useState(null),[Os,Ms]=reactExports.useState(null),[Ds,Ps]=reactExports.useState(!1),[Ls,Bs]=reactExports.useState(PageState.Loading),{status:Fs,save:Us}=useNetworkDebounce(async Ys=>{try{const Qs=await Sdk.pricingClient.calculatePricing({adminSeats:Ys.adminSeats,readerSeats:Ys.readerSeats,currency:Ys.currency,billingPeriod:Ys.billingPeriod,ip:dn});return Qs.status===200&&(ks(Qs.data),Ps(!1)),Qs}catch(Qs){throw Ps(!0),Qs}},{skipDoneState:!0}),Gs=usePriceFormatter(js,0);reactExports.useEffect(()=>{(async()=>{try{const Qs=await Sdk.pricingClient.fetchProducts();Qs.status===200&&(Ms(Qs.data),Bs(PageState.Ready))}catch{Ps(!0),Bs(PageState.Error)}})()},[]),reactExports.useEffect(()=>{Us({adminSeats:ms,readerSeats:bs,currency:js,billingPeriod:ws})},[ms,bs,js,ws]);const Js=()=>{setCheckoutData({adminSeats:ms,readerSeats:bs,billingPeriod:ws,currency:js}),Auth.isAuthenticated()?ds("/checkout",{state:{adminSeats:ms,readerSeats:bs,billingPeriod:ws,currency:js}}):ds("/sign-up",{state:{adminSeats:ms,readerSeats:bs,billingPeriod:ws,currency:js}})},Ws=Ys=>{const Qs=parseInt(Ys.target.value,10);isNaN(Qs)||xs(Math.max(Os?.minSeats.admin??1,Math.min(Qs,Os?.maxSeats.admin??50)))},Zs=Ys=>{const Qs=parseInt(Ys.target.value,10);isNaN(Qs)||Es(Math.max(Os?.minSeats.reader??0,Math.min(Qs,Os?.maxSeats.reader??200)))};return Ds||Ls===PageState.Error?jsxRuntimeExports.jsx("p",{children:Ds}):jsxRuntimeExports.jsx("div",{className:"py-12 bg-white",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[Fs===SavableInputStatus.Failure&&jsxRuntimeExports.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center text-red-600",children:"Unable to load pricing. Please refresh the page or try again later."}),jsxRuntimeExports.jsx("div",{className:"max-w-5xl mx-auto",children:jsxRuntimeExports.jsxs("div",{className:"bg-light rounded-lg md:shadow-xl md:p-8 mb-8",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row mb-6",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-heading",children:"Select how many seats you need"})}),jsxRuntimeExports.jsx("div",{className:"ml-auto flex items-center gap-3",children:jsxRuntimeExports.jsx(CurrencySelector,{value:js,onValue:Cs})})]}),(Ls===PageState.Loading||As===void 0)&&jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center py-8",children:jsxRuntimeExports.jsx(Loading,{})}),As&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-8",children:[jsxRuntimeExports.jsx(SeatControl,{label:"Administrator Seats",description:"Create, edit and manage operational manuals, assign roles & permissions",status:Fs,pricePerSeat:As.adminPricePerSeat,billingPeriodLabel:ws===BillingPeriod.MONTHLY?"month":"year",currency:js,value:ms,min:Os?.minSeats.admin??1,max:Os?.maxSeats.admin??50,onChange:Ws,onIncrement:()=>xs(Math.min(Os?.maxSeats.admin??50,ms+1)),onDecrement:()=>xs(Math.max(Os?.minSeats.admin??1,ms-1))}),jsxRuntimeExports.jsx(SeatControl,{label:"Reader Seats",description:"View-only access to operational manuals",status:Fs,pricePerSeat:As.readerPricePerSeat,billingPeriodLabel:ws===BillingPeriod.MONTHLY?"month":"year",currency:js,value:bs,min:Os?.minSeats.reader??0,max:Os?.maxSeats.reader??200,onChange:Zs,onIncrement:()=>Es(Math.min(Os?.maxSeats.reader??200,bs+1)),onDecrement:()=>Es(Math.max(Os?.minSeats.reader??0,bs-1))})]}),jsxRuntimeExports.jsx(PricingSummary,{billingPeriod:ws,pricing:As,currency:js,status:Fs,formatPrice:Gs,onGetStarted:Js})]})]})})]})})},FeatureComparisonTable=({title:ds,subtitle:dn,planNames:ms,categories:xs})=>jsxRuntimeExports.jsx("div",{className:"py-12 bg-gray-50",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[ds&&jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold mb-6 text-center text-primary",children:ds}),dn&&jsxRuntimeExports.jsx("p",{className:"text-xl text-dark mb-8 text-center",children:dn}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full border-collapse",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{className:"bg-white",children:[jsxRuntimeExports.jsx("th",{className:"p-4 text-left border-b-2 border-gray-200 w-1/4"}),ms.map((bs,Es)=>jsxRuntimeExports.jsx("th",{className:"p-4 text-center border-b-2 border-gray-200",children:jsxRuntimeExports.jsx("span",{className:"text-xl font-bold",children:bs})},Es))]})}),jsxRuntimeExports.jsx("tbody",{children:xs.map((bs,Es)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("tr",{className:"bg-gray-100",children:jsxRuntimeExports.jsx("td",{colSpan:ms.length+1,className:"p-4 font-bold text-lg border-t border-gray-200",children:bs.name})},`category-${Es}`),bs.features.map((ws,Rs)=>jsxRuntimeExports.jsxs("tr",{className:"bg-white hover:bg-gray-50",children:[jsxRuntimeExports.jsxs("td",{className:"p-4 border-t border-gray-200",children:[jsxRuntimeExports.jsx("div",{className:"font-medium",children:ws.name}),ws.description&&jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500 mt-1",children:ws.description})]}),ms.map((js,Cs)=>{const As=ws.plans[js];return jsxRuntimeExports.jsx("td",{className:"p-4 text-center border-t border-gray-200",children:typeof As=="boolean"?As?jsxRuntimeExports.jsx("svg",{className:"h-6 w-6 text-green-500 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:jsxRuntimeExports.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):jsxRuntimeExports.jsx("svg",{className:"h-6 w-6 text-gray-300 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:jsxRuntimeExports.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}):jsxRuntimeExports.jsx("span",{children:As})},`value-${Es}-${Rs}-${Cs}`)}
46)]},`feature-${Es}-${Rs}`))]}))})]})})]})}),blogSection="_blogSection_rjftd_1",blogTitle="_blogTitle_rjftd_7",blogSubtitle="_blogSubtitle_rjftd_15",loading="_loading_rjftd_25",noArticles="_noArticles_rjftd_25",blogGrid="_blogGrid_rjftd_32",blogCard="_blogCard_rjftd_38",articleTitle="_articleTitle_rjftd_44",articleImage$1="_articleImage_rjftd_60",image$3="_image_rjftd_68",styles$3={blogSection,blogTitle,blogSubtitle,loading,noArticles,blogGrid,blogCard,articleTitle,articleImage:articleImage$1,image:image$3},__vite_glob_0_0=`---
47title: Your Article Title
48slug: your-article-slug
49keywords: []
50image:
51  url: ''
52  alt: ''
53sources: []
54draft: true
55publishedDate: 2025-09-11
56---
57
58Write your content here in Markdown.
59
60- Use headings (##, ###)
61- Lists, links, images
62- Fenced code blocks \`\`\`
63
64Images:
65- Prefer placing images in /public/images/blog and reference as /images/blog/your-image.png
66`,__vite_glob_0_1=`---
67title: SOPs for the Modern Workplace
68slug: sops-for-the-modern-workplace
69keywords:
70  - writing
71image:
72  url: /graphics/article2.jpg
73  alt: Barista making coffee
74draft: false
75publishedDate: 2025-09-12
76---
77
78Imagine walking into a patisserie. The wafting aromas of fresh pastries and warm bread lure you in, making you feel welcome and intrigued. That's exactly what your franchise Operations Manual should be like – inviting, engaging and filled with easily digestible information.
79
80We've all been in bakeries where the bread is hard as stone and impenetrable and the pastries unappealingly dense. That's a metaphor for the labyrinthine, overly formal writing style that has dominated operations manuals for far too long. You bite into it and you're immediately lost in a maze of jargon, struggling to make sense of the information.
81
82It's time to replace the hard loaves and heavy pastries with light, flaky croissants and melt-in-your-mouth pastries – to break free from the corporate jargon and embrace clarity and human connection.
83
84Over the past 35 years, I've been through countless bakeries and seen all kinds of bread and pastries – or in this case, Operations Manuals. It's clear that the best ones are those with the human touch, where you can taste the care and attention that went into baking each piece.
85
86Your Operations should be the same. It should be a 'good read' that utilises clear, concise language, just like a perfectly baked baguette is simple, yet immensely satisfying. Avoiding the pitfalls of overly formal and impersonal writing is like avoiding over-baked and flavourless bread – it makes for a much more enjoyable experience.
87
88A relatable and engaging writing style is the icing on the cakes, making them more appealing and memorable. This accessible writing style, much like an easy-to-eat pastry, will empower your franchisees to quickly grasp and apply the information in the manual and its library of tools and resources, savouring the taste and coming back for more. This will ultimately lead to their success and satisfaction – and a thriving, bustling patisserie that everyone loves to visit.
89
90Make sure your draft is readable, using simple language and avoiding jargon. You want your franchisees to understand the information in your manual, so it needs to be written for them – not for you or someone else who works at head office.
91
92Ensure that all the information is organised logically and clearly so that readers can easily find what they need, when needed. This will help readers find information quickly, which is essential since they will likely read your manual when confused or stressed.
93
94Ensure that every bit of content has a goal and a reason for being there. If there's no reason for it to be included – if it doesn't serve any purpose – remove it!
95
96Your structure should be logical and clear. It should also allow your reader to follow your argument or argumentation easily.
97
98Use headings, subheadings and bullets to help organise your thoughts into a coherent whole.`,__vite_glob_0_2=`---
99title: Mastering Deadlines for Your Operations Manual - Lessons from the AA/BSM Driving School Project
100slug: mastering-deadlines-ops-manual
101keywords:
102  - operations manual
103  - deadlines
104  - project management
105  - case study
106  - franchising
107image:
108  url: /graphics/article3.jpg
109  alt: Clocks representing time
110draft: false
111publishedDate: 2025-12-03
112---
113
114## Introduction: Why Most Operations Manual Projects Fail
115
11670% of operations manual projects miss their deadlines. The culprit? Not poor writing or lack of content-it’s ineffective deadline architecture.
117
118Whether you’re creating Standard Operating Procedures from scratch or reworking an outdated manual, mastering deadline management determines whether your project succeeds or stalls indefinitely.
119
120Here, we share proven strategies from our work on the AA/BSM Driving School project, where we successfully documented complex, multi-site operations under tight time constraints.
121
122## The Hidden Truth About Deadline Architecture
123
124Deadlines are not just dates. Most project managers treat deadlines as arbitrary calendar markers. This fundamental misunderstanding causes project failure before the first word is written.
125
126Deadlines are structural elements that:
127
128- Guide project flow and resource allocation
129- Create psychological momentum
130- Force scope decisions
131- Prevent perfectionism paralysis
132
133Think of deadlines as the scaffolding that holds your project together while construction proceeds. Remove them, and everything collapses into an indefinite “someday” project.
134
135## The AA/BSM Case Study: Turning Complexity into Clarity
136
137### The Challenge
138
139The AA/BSM project required documenting procedures for driving instructors across multiple territories, each following standardised teaching methods with regional requirements. The complexity? Each procedure had to be:
140
141- Legally compliant across jurisdictions
142- Practically executable by instructors with varying experience
143- Detailed enough for consistency, simple enough for daily use
144
145## Our Three-Week Sprint Strategy
146
147### Week 1: Information Gathering
148
149- Timeline: 5 business days
150- Focus: Review current IP and undertake gap analysis
151- Output: Raw procedure inventory (127 identified procedures)
152- Key Learning: This deadline forced us to capture breadth, not depth
153
154### Week 2: Synthesise and Structure
155
156- Timeline: 5 business days
157- Focus: Create a standardised format and review with stakeholders-e.g., the Training Academy, Marketing, Operations, HR
158- Output: Complete manual framework with 50 finished procedures
159- Key Learning: Synthesis deadlines forced decision-making
160
161Result: Our manual addressed real-world teaching situations that instructors faced daily. The tight timeline paradoxically improved quality by focu
161sing on what mattered most.
162
163## The Six Critical Functions of Strategic Deadlines
164
165### 1. Force thorough development
166
167- Without deadlines: Teams endlessly polish Section 1 while ignoring Sections 2–10
168- With deadlines: Each section gets proportional attention and development
169
170### 2. Create information synthesis points
171
172- The problem: Information gathering can continue indefinitely
173- The solution: Hard stops force teams to work with available data (e.g., “All SME interviews must be complete by Day 10”)
174
175### 3. Enable staged review cycles
176
177- Traditional approach: Single massive review at project end
178- Better approach: Multiple mini-reviews at section completions
179- Benefit: Catch issues early when fixes are simple
180
181### 4. Prevent scope creep
182
183- Common trap: “While we’re documenting X, let’s also add Y and Z”
184- Deadline defence: “That’s Phase 2. We deliver Phase 1 first.”
185
186### 5. Build team momentum
187
188- Psychology factor: Visible progress motivates continued effort
189- Milestone celebrations: Each deadline met builds confidence for the next
190
191### 6. Manage stakeholder expectations
192
193- Clear communication: “You’ll see the inventory management section by 15th March”
194- Trust building: Met deadlines create credibility for future projects
195
196## Practical Application: Your Deadline Framework
197
198### Phase-based deadline structure
199
200#### Phase 1: Discovery (15% of total timeline)
201
202- Stakeholder reviews
203- Current state documentation audit
204- Procedure inventory creation
205- Deadline type: Hard stop (no extensions)
206
207#### Phase 2: Development (40% of timeline)
208
209- Procedure writing based on template
210- Initial graphics/screenshots
211- Deadline type: Flexible by ±10%
212
213#### Phase 3: Review (25% of timeline)
214
215- SME review cycles
216- Legal/compliance check
217- Revision incorporation
218- Deadline type: Milestone-based
219
220#### Phase 4: Finalisation (20% of timeline)
221
222- Final formatting
223- Distribution prep
224- Deadline type: Fixed external deadline
225
226## The Power of Time Blocks
227
228Instead of one massive deadline, create time blocks.
229
230### Example: 90-Day Operations Manual Project
231
232- Days 1–14: Complete procedure inventory (HARD DEADLINE)
233- Days 15–28: Draft first 25% of procedures
234- Days 29–42: Draft second 25% of procedures
235- Days 43–56: Draft third 25% of procedures
236- Days 57–70: Draft final 25% of procedures
237- Days 71–80: Review and revision cycles
238- Days 81–90: Final production and delivery
239
240#### Why this works
241
242Each block is manageable, measurable, and motivating.
243
244## Advanced Deadline Strategies
245
246### The 80/20 documentation rule
247
248- 80% complete drafts are better than 0% perfect procedures
249- Implementation: Set deadlines for “good enough” versions
250- Refinement: Schedule separate deadlines for optimisation
251
252### Buffer science
253
254- Internal deadlines: Set 15% earlier than external commitments
255- Review buffers: Add 2 days per 10 procedures for stakeholder review
256- Complexity multiplier: High-compliance procedures need 1.5× standard time
257
258### The “dead week” technique
259
260- Concept: Block one week mid-project with no deadlines
261- Purpose: Catch-up time for delayed sections
262- Result: Prevents cascade failures from minor delays
263
264## Warning Signs Your Deadlines Are Failing
265
266### Red flags to watch
267
268- Consistent 2–3 day delays becoming “normal”
269- Team requesting extensions before starting work
270- Stakeholders surprised by timeline updates
271- Quality dropping to meet arbitrary dates
272- No celebration of met milestones
273
274## Tools for Deadline Success
275
276### Essential software
277
2781. Project management: Asana, Monday.com, or Trello for visualisation
2792. Time tracking: Toggl or Harvest to validate estimates
2803. Communication: Slack or Teams for quick deadline decisions
2814. Documentation: SharePoint or Google Workspace for version control
282
283### The weekly stand-up formula
284
285Every Monday, 15-minute team check:
286
287- What’s due this week?
288- What obstacles exist?
289- What support is needed?
290- Are next week’s deadlines realistic?
291
292## Real-World Deadline Adjustments
293
294### When to extend deadlines
295✅ External factors beyond control (system changes, regulatory updates)
296
297✅ Quality would be critically compromised
298
299✅ Key stakeholder availability issues
300
301
302### When to hold firm
303❌ Perfectionism creeping in
304
305❌ Nice-to-have additions
306
307❌ Procrastination patterns emerging
308
309## The ROI of Proper Deadline Management
310
311### Without structured deadlines
312
313- Projects take, on average, 3–6 months longer
314- 40% never complete
315- Budget overruns of 50–100%
316- Team burnout common
317
318### With strategic deadlines
319
320- Projects complete in less time
321- 90% completion rate
322- Budget variance under 10%
323- Team maintains momentum
324
325## Your Next Steps: Implementing Deadline Mastery
326
3271. Map your current project into 4–6 major phases
3282. Assign percentage of time to each phase
3293. Create weekly milestones within each phase
3304. Identify your “drop dead” dates (non-negotiable deadlines)
3315. Build in buffer weeks at 25% and 75% completion points
3326. Communicate timeline to all stakeholders with visual roadmap
3337. Schedule weekly progress reviews starting Day 1
334
335## Conclusion: Deadlines as Your Secret Weapon
336
337Deadlines aren’t constraints-they’re catalysts. The AA/BSM project succeeded not despite its tight timeline, but because of it. The compressed schedule forced focus, prevented overthinking, and delivered a manual that actually gets used.
338
339Your operations manual doesn’t need more time. It needs better deadlines.
340
341Start by setting one deadline today: When will you complete your procedure inventory? Mark it on your calendar, tell your team, and watch how this simple act transforms intention into action.
342
343Ready to build a realistic timeline for your operations manual project? Join today to gain exclusive access to tools and resources designed to help you create an effective operations manual with our simple Project Management dashboard. Create your manual up to 75% faster. Don’t miss out-sign up now.`,__vite_glob_0_3=`---
344title: How Long Does it Really Take to Develop Your Operations Manual? A Project Manager's Guide
345slug: ops-manual-timeline
346keywords:
347  - operations manual
348  - project management
349  - timeline
350  - scope
351  - documentation
352  - franchising
353image:
354  url: /graphics/article4.jpg
355  alt: Project management on a whiteboard
356draft: false
357publishedDate: 2025-12-03
358---
359
360## Introduction: Setting Realistic Expectations
361
362When developing an operations manual, one of the first questions potential clients ask is: “How long will this take?” It’s a valid concern that impacts budgeting, resource allocation, and timeline expectations.
363
364The truth is the timeline varies dramatically depending on your project’s scope, complexity, and organisational readiness. Understanding the factors that influence development time helps you set realistic expectations and plan resources effectively.
365
366## Phase 1: Understanding Your Project Scope (1–2 Weeks)
367
368### Why Scope Definition Matters
369
370A thorough understanding of your project scope is the foundation for accurate timeline estimation. Scope clarity prevents timeline creep and ensures you build what your business actually needs.
371
372### Key Questions to Answer
373
374- Will your manual cover single-site operations or multi-site franchising?
375- Are you documenting existing processes or designing new systems from scratch?
376- What’s your current documentation maturity level?
377- How many functional areas need coverage?
378
379Pro Tip: The difference between documenting existing procedures versus creating entirely new processes can add weeks to your timeline. A single-location manual for a mature business typically takes 4–6 weeks, while a comprehensive franchisee operations manual may require 3–4 months.
380
381## Phase 2: Defining Clear Boundaries (1 Week)
382
383### Setting the Perimeter
384
385Clear boundaries prevent scope creep and keep your project on track. Without defined limits, your manual can expand indefinitely, turning a 2-month project into a 6-month marathon.
386
387### Critical Boundary Decisions
388
389- Franchise vs. Corporate Operations: Will you document franchisee procedures, corporate oversight processes, or both?
390- System Integration: Are you including third-party software procedures?
391- Training Materials: Will the manual double as a training resource?
392- Compliance Documentation: How deep will you go into regulatory requirements?
393
394Example: A franchisee manual focusing on 30 daily operations procedures will develop much faster than one covering 30 procedures plus extensive brand guidelines, marketing protocols, and financial reporting systems.
395
396## Phase 3: Establishing Detail Requirements (3–5 Days)
397
398### Finding Your Goldilocks Zone
399
400The level of detail significantly impacts development time. Too little detail leaves users confused; too much creates an unwieldy document that no one reads.
401
402### Consider Your Audience
403
404- High-compliance industries (food service, healthcare): Require exhaustive detail and cross-references, adding 25–40% to development time
405- Professional services: Can use moderate detail with assumed baseline knowledge
406- Retail operations: Need clear, visual instructions for high-turnover positions
407
408### Time Impact
409
410Moving from bullet-point procedures to step-by-step instructions with screenshots can double your per-procedure development time.
411
412## Phase 4: Mapping Content Coverage (1–2 Weeks)
413
414### Creating Your Content Blueprint
415
416List all operational areas your manual must address. A comprehensive operations manual typically covers six Categories, each containing multiple procedures. These Categories loosely mirror The Balanced Scorecard approach:
417
4181. INTRODUCTION (5–10 procedures)
4192. NEW BUSINESS SET UP & SUPPORT (15–20 procedures)
4203. PEOPLE (YOUR TEAM) (15–20 procedures)
4214. MARKETING & PROMOTION (10–15 procedures)
4225. DAY-TO-DAY OPERATING REQUIREMENTS (25–30 procedures)
4236. DEVELOPMENT, GROWTH & PROFIT (15–20 procedures)
424
425### Timeline Reality Check
426
427Each Category typically requires 2–4 weeks for initial development, review, and revision cycles.
428
429## Realistic Timeline Estimates
430
431Based on our experience developing hundreds of operations manuals, here are typical timelines:
432
433### Small Business Manual (Single Location)
434
435- Scope: 30–50 procedures
436- Timeline: 4–6 weeks
437- Team: 1–2 writers, 2–3 SME reviewers
438
439### Multi-Unit Operations Manual
440
441- Scope: 75–100 procedures
442- Timeline: 8–12 weeks
443- Team: 2–3 writers, 4–5 SME reviewers
444
445### Comprehensive Franchise Manual
446
447- Scope: 150+ procedures across all domains
448- Timeline: 3–6 months
449- Team: 3–4 writers, 6–8 SME reviewers, legal review
450
451### Enterprise Operations Transformation
452
453- Scope: Complete operational documentation overhaul
454- Timeline: 6–12 months (phased approach)
455- Team: Full documentation team with project management
456
457## Factors That Accelerate Development
458
4591. Existing Documentation: Having even rough drafts cuts development time by 30–40%
4602. Dedicated SME Availability: Quick access to subject matter experts prevents bottlenecks
4613. Clear Decision Authority: Single approval source vs. committee approval
4624. Phased Approach: Launching with core procedures, adding complexity later
4635. Professional Documentation Team: Experienced writers develop 3× faster than internal staff learning as they go
464
465## Common Timeline Killers
466
467- Scope Creep: “While we’re at it, let’s also add...”
468- Analysis Paralysis: Endless revision cycles seeking perfection
469- Resource Competition: SMEs pulled into other priorities
470- Stakeholder Conflicts: Disagreement on standard procedures
471- Technology Changes: Mid-project system implementations
472
473## Your Next Steps
474
4751. Define your must-have vs. nice-to-have procedures
4762. Assess your existing documentation
4773. Identify your subject matter experts and their availability
4784. Determine if you need external support
4795. Set realistic milestones with buffer time
480
481## Conclusion: Plan for Success
482
483Developing an operations manual is an investment in your business’s scalability and consistency. While timelines vary, understanding these phases helps you plan effectively and set realistic expectations with stakeholders.
484
485Remember: A well-planned three-month project beats a rushed one-month effort that requires constant updates. Take the time to build it right the first time.
486
487Ready to start your operations manual project? It used to take 9–12 months to develop a comprehensive Operations Manual for a global brand. Today, by subscribing to Manual Magic AI ®, you can reduce the time by up to 75%.
488
489Get started now and see how quickly you can transform your operations documentation!`,__vite_glob_0_4=`---
490title: Who’s Your Reader? The One Decision that Makes or Breaks Your Operations Manual
491slug: whos-your-reader
492keywords:
493  - operations manual
494  - reader profiles
495  - franchising
496  - training
497  - microlearning
498  - compliance
499image:
500  url: /graphics/article5.jpg
501  alt: Reading a book
502draft: false
503publishedDate: 2025-12-03
504---
505
506## Introduction
507
508Understanding your target reader is the foundation of effective operations manual development. Without this clarity, your manual risks missing its mark-creating content that’s too technical for frontline staff or too simplistic for experienced managers. Penny Hopkinson, CEO of Manual Magic AI ®, explains that understanding your reader profile is the critical first step before creating any content. This approach ensures every element aligns with operational needs and supports your business system’s requirements.
509
510## Why Reader Profiles Matter
511
512If you don’t identify your target reader, you cannot create content in language they understand or formats they’ll actually use. The consequences are costly: training that doesn’t stick, compliance gaps, operational inconsistencies across sites, and managers reverting to tribal knowledge rather than documented procedures.
513
514Your reader profile determines:
515
516- Language complexity and technical terminology
517- Content format (text-heavy documents vs. visual guides)
518- Delivery method (desktop manuals vs. mobile-first micro-videos)
519- Communication tone (directive vs. coaching)
520- Learning assessment approach (formal testing vs. watch-and-do verification)
521
522Different roles require different approaches. An owner-operator managing profit and loss needs KPI-tagged procedures with audit trails. A shift supervisor coaching a new barista needs 60-second video clips with visual checklists. Attempting one-size-fits-all content satisfies no one.
523
524## Creating Detailed Reader Profiles
525
526Build comprehensive profiles for each primary manual user. In franchising, this typically means distinguishing between the franchisee (who owns and manages a single franchise with the right to operate under the franchisor’s business system) and their management team. This differs from master franchisees or brand partners, who have different skill requirements and operational responsibilities.
527
528### Profile Example 1: Coffee Shop Owner/Manager
529
530#### Background and Experience
531
532These readers typically come from multi-site quick service restaurant or retail backgrounds-convenience stores, forecourt operations, or corporate management roles. Many are former corporate managers transitioning to business ownership; some are existing franchisees expanding their portfolio. They bring mid- to high-level management experience, are comfortable with profit and loss statements, staff scheduling, stock control, audits, and brand standards.
533
534#### Demographics
535
536- Age: Late 30s to mid-50s for owner-operators; portfolio investors skew older
537- Education: Minimum secondary education; many hold vocational business qualifications or degrees; financial literacy expected
538- Gender: Mixed, though women remain under-represented in hospitality management
539- Team composition: Heavy 16–24 age presence in coffee shops; growing 50+ demographic returning to hospitality, creating genuinely multi-generational teams
540
541#### Training Expectations
542
543They expect comprehensive brand onboarding covering store operations, barista standards, customer service, food safety, allergens, and business management. Training includes formal programs (Barista certification, Train-the-Trainer) and management development pathways. They require ongoing support for field operations, marketing activation, and supply chain systems through structured franchisor support.
544
545Owner-operators prioritise KPI dashboards and exception-based learning. They favour short, role-specific modules they can delegate to managers.
546
547#### Content Preferences
548
549Use clear, straightforward English with short sentences. Lead with action verbs: “Complete daily temperature logs by 10 am” rather than “Temperature logs should be completed.” Replace lengthy text with screenshots and 30–90-second clips. Embed QR codes linking to micro-videos for equipment calibration, cleaning protocols, and service recovery.
550
551They respond to “from confusion to clarity” messaging: single source of truth, version-controlled standard operating procedures, and audit-ready evidence. Flag cost, risk, and compliance implications at the top of each procedure-impact on labour percentage, waste, service speed, allergen protocols, and brand standards.
552
553#### Operational Focus Areas
554
555Recruitment model effectiveness, payroll leakage, voids and waste tracking, mystery shopper scores and Net Promoter Score (NPS), allergen compliance, maintenance service level agreements, loyalty app redemptions, day-part sales mix (breakfast, lunch, afternoon, evening performance), and promotional execution.
556
557### Profile Example 2: Assistant Manager
558
559#### Background and Experience
560
561Assistant managers typically progress internally-from Barista to Master Barista to Supervisor-or transfer from other quick service restaurant or retail brands. They have clear progression pathways and bring 2–7 years of team leadership experience: rota planning, coaching, cash reconciliation, opening and closing procedures, and audit preparation.
562
563#### Demographics
564
565- Age: Typically mid-20s to late 30s, with some variation
566- Education: Secondary education is common; some hold foundation degrees, hospitality diplomas, or on-the-job National Vocational Qualifications
567- Gender: Mixed
568- Team leadership: Primarily managing 16–24-year-olds with a noticeable 50+ cohort
569
570#### Training Requirements
571
572- Technical skills: Beverage craft to brand specifications, machine calibration and cleaning, food safety (Levels 2–3), allergen management, Hazard Analysis and Critical Control Points logs, stock and margin management, cash-loss prevention, incident reporting, and service recovery.
573- People skills: Attitude coaching, two-way feedback, team huddles, recognition practices, conflict resolution, and shift leadership under pressure.
574- Systems proficiency: Point of sale systems, loyalty programs, rota and payroll software, delivery aggregator tablets, waste logging, and temperature monitoring.
575- Learning format: Three to seven-minute micro-lessons, visual checklists, “watch-and-do” clips, and end-of-shift audits that they can complete on smartphones.
576
577#### Content Preferences
578
579Mobile-first design is essential. Limit each standard operating procedure to one page or screen. Structure content around: purpose, preparation required, time needed, risk factors, tools required, and a success picture (what “done correctly” / “done incorrectly” looks like).
580
581A GIF, infographic, or 30–60-second video outperforms 500 words of text. Include “quick wins” callouts:
582
583- “Save 5 minutes per opening by pre-staging supplies.”
584- “Cut milk waste 15% with these pouring techniques.”
585- “Hit 3-minute ticket times at peak with this workflow.”
586
587Consider Generation Z attention patterns in the team. According to Ofcom data from May 2024, 18–24-year-olds spend approximately 64 minutes daily on TikTok, 55 minutes on Snapchat, and 15 minutes on Facebook. This media consumption shapes their attention spans and learning preferences. Effe
587ctive training mimics these patterns: peer-to-peer tone in clips, on-screen captions, visual progress bars, and no corporate jargon.
588
589## Content Format Comparison
590
591### Owner/Manager Requirements
592
593- Values: Audit-ready evidence, KPI impact per procedure, labour and waste reduction metrics, delegation-ready content
594- Effective format: Dashboard-style index organised by job to be done, printable one-pagers for back-of-house reference, embedded micro-videos for key tasks
595
596### Assistant Manager Requirements
597
598- Values: Step-by-step sequences with photos, “common faults and fixes”, troubleshooting, allergen warnings, shift checklists linked to opening and closing duties
599- Effective format: 20% text, 80% visual; mobile-searchable; timestamps and version numbers visible; “show me, then test me” structure
600
601## Key Insight
602
603The hospitality workforce spans generations. Those over 50 typically prefer text-based procedures they can print and reference-those under 40 favour visual guides. People under 30 rarely read text-heavy content-they expect snack-sized “how-to” videos with show-don’t-tell demonstrations.
604
605## Matching Communication Style to Reader
606
607Voice determines understanding, trust, and efficiency. Before writing a single procedure, decide how to communicate with each reader. Identify the intended audience and their learning style, then select a tone that suits both the task and the risk level.
608
609One size does not fit all. An assistant manager on a busy shift needs direct commands, not chatty prose. Auditors expect formal language, not casual humour. Match your style to the situation:
610
611- Directive/Command-and-Control: Use for time-critical steps requiring brevity and action verbs. Example: “Stop service immediately. Alert the duty manager. Quarantine affected products.”
612- Coaching and Supportive: Apply to skills development, feedback sessions, and encouragement. Example: “You’ve mastered the basic pour. Let’s refine your foam consistency. Watch how tilting the pitcher changes texture.”
613- Professional/Regulatory: Required for compliance documentation, audits, and traceability. Example: “Record equipment calibration results in Section 4.2 of the daily log. Retain completed logs for 12 months per food safety regulations.”
614- Conversational: Suitable for internal updates and peer-to-peer knowledge sharing. Example: “Quick tip from the Manchester team: they’ve cut morning setup time by staging condiments the night before.”
615- Technical Precision: Essential when tolerances and specifications must be exact. Example: “Espresso extraction time: 25–30 seconds. Yield: 30ml ± 2ml. Temperature at group head: 90–96°C.”
616- Safety-Critical/Closed-Loop: Required for incidents demanding confirmations and read-backs. Example: “Confirm you have isolated the electrical supply. Read back the equipment tag number.”
617- Visual-First and Microlearning: Optimised for smartphones and “watch–do–check” moments. Example: Sixty-second video showing proper handwashing technique, followed by a three-photo checklist of correct hand positions.
618- Scenario-Led: Best for judgment calls requiring context and decision-making. Example: “Customer reports feeling unwell after eating a muffin. They mention nut allergy. What’s your next step?”
619- Playbook/Tactical: Delivers clear outcomes for campaigns or service recovery. Example: “Valentine’s promotion execution: purple signage installed by Feb 12, specialty drinks trained by Feb 13, launch day Feb 14.”
620
621## Benefits of Matched Communication Styles
622
623- Prevents mixed messages. When the owner/manager content uses professional playbook style and the assistant manager content uses visual-first microlearning, each reader receives information in their optimal format without confusion.
624- Matches media to attention. Short, captioned clips for quick tasks; specification-led text for audits and compliance records.
625- Accelerates onboarding. Consistent tone and format across roles and sites means new team members recognise content patterns immediately.
626- Safeguards the brand. High-risk actions employ closed-loop language with confirmations;
626 low-risk learning relies on supportive, visual guides.
627
628## Reader Profile Summary Checklist
629
630Use this checklist before creating any manual content.
631
632### Reader Identity 
633
634- [ ] Primary reader role identified
635- [ ] Secondary reader roles noted
636- [ ] Reader demographics documented (age, education, experience)
637- [ ] Team composition they manage understood
638
639### Content Preferences
640
641- [ ] Preferred learning format identified (text, visual, video, mixed)
642- [ ] Device/platform requirements noted (desktop, mobile, print)
643- [ ] Attention span considerations documented
644- [ ] Language complexity level determined
645
646### Communication Style
647
648- [ ] Appropriate tone selected (directive, coaching, professional, conversational, technical, safety-critical, visual-first, scenario-led, playbook)
649- [ ] Risk level assessed
650- [ ] Usage context understood (pre-shift, during service, emergency)
651
652### Operational Requirements
653
654- [ ] Relevant KPIs identified
655- [ ] Compliance requirements noted
656- [ ] Training expectations documented
657- [ ] Success measures defined
658
659### Format Decisions
660
661- [ ] Content length determined
662- [ ] Media type selected
663- [ ] Template chosen
664- [ ] Testing plan established
665
666## Resources
667
668Businesses-e.g., franchisors-looking to implement reader-profiled operations manuals can utilise platforms designed for this purpose. Manual Magic AI ® offers tools to create version-controlled, searchable content with micro-videos, infographics, FAQs, and storyboards that are auto-linked to procedures. The platform also includes communication and tone-sett
668ing options (Professional vs. Playful, Formal vs. Casual, and Approachable vs. Authoritative) to ensure consistency across all your brand’s content.
669`,__vite_glob_0_5=`---
670title: The £1,340 Mistake Every SME Makes-Why Operations Manuals Aren't Just for Global Brands
671slug: why-operations-manuals-are-essential-for-smes
672keywords:
673  - operations manual
674  - SMEs
675  - SOPs
676  - franchising
677  - compliance
678  - onboarding
679  - knowledge retention
680  - productivity
681image:
682  url: /graphics/article6.jpg
683  alt: Team reviewing SOPs on mobile devices
684draft: false
685publishedDate: 2026-01-12
686---
687
688## The Dangerous Myth That Could Destroy Your Business
689
690Right now, across your business, teams are wasting hours hunting for procedures, calling head office for answers, and fixing preventable mistakes.
691
692Multiply that chaos by every location. Every shift. Every day.
693
694Three uncomfortable truths:
695
696- Compliance failures rarely stem from rebellion - they’re born from confusion
697- Your top performers’ methods remain locked in their heads
698- Critical knowledge disappears with every resignation
699
700Here, we destroy a dangerous myth: that operations manuals are “only for large organisations.”
701
702❌ Wrong.
703
704Whether you’re a solopreneur guarding against illness or a franchisor managing 50 locations, undocumented processes aren’t just inefficient – they’re a luxury you can’t afford in today’s market.
705
706If you believe this, you’re not alone – but that belief is costing businesses everything. A staggering 82% of small businesses fail due to operational inefficiencies, not lack of customers.
707
708Here’s the truth: whether you’re a solopreneur working from your kitchen table or managing a 50-location franchise, the difference between successful scaling and burnout lies in one often-overlooked asset – your Operations Manual.
709
710This isn’t about bureaucracy. It’s about survival, growth, and building a business that works without you.
711
712Welcome to 2026 – the year your Operations Manual stops being a “someday” project.
713
714Consider how much time your teams waste hunting for procedures, calling head office for clarification, or fixing mistakes caused by outdated processes. For multi-site businesses, multiply that waste by the number of locations – every single day.
715
716But here’s what should really concern you: most franchise compliance failures aren’t due to rebellion - they’re due to confusion. Your best performers can’t share their excellence without documented systems. And every undocumented procedure walks out the door with staff turnover.
717
718Whether you’re a solopreneur protecting against illness or a franchisor scaling to 50 locations, your undocumented procedures aren’t just inefficient. They’re expensive, risky, and - in 2026 - completely unnecessary.
719
720## When Life Happens to Your Business
721
722Imagine this: you’re a successful consultant, booked solid for months. Then illness strikes - not a two-day ‘flu, but something that sidelines you for weeks.
723
724Without SOPs, your business stalls. Clients leave. Recovery starts from scratch.
725
726With SOPs, your Virtual Assistant integrates seamlessly. Clients hardly notice. Your business continues smoothly.
727
728This isn’t hypothetical. We’ve observed solopreneurs safeguard their businesses by documenting their processes before a crisis arises. Your Operations Manual isn’t an overhead - it’s insurance.
729
730## The Hidden Cost of “Figuring It Out”
731
732### The £1,340 Per Location Reality Check
733
734Research shows that businesses without centralised operations manuals waste an average of £1,340 per site each year solely on staff time spent:
735
736- Researching outdated procedures
737- Asking colleagues, “How do we do this?”
738- Fixing errors caused by inconsistent procedures
739- Recreating existing documents
740
741For a business with 10 locations, that’s £13,400 a year lost due to confusion.
742
743But the financial waste is only the beginning.
744
745## The Eleven Essential Reasons Why Every Business Needs an Operations Manual
746
7471. Business Continuity Protection
748
749   - The Risk: The absence of a key person disrupts operations.
750   - The Solution: Documented procedures allow anyone to step in.
751   - Real Impact: A Manchester bakery stayed open during the owner’s six-week medical leave because their VA could follow detailed opening, ordering, and customer service procedures.
752
7532. Brand Consistency at Scale
754
755   - The Challenge: Location A consistently delivers excellence, while Location B falls short with mediocrity.
756   - The Fix: A comprehensive Operations Manual ensures that every site, on every shift, maintains the same brand standards via a “single source of truth”.
757   - Proven Result: Franchises with detailed manuals experience 23% less variation in customer satisfaction scores across locations.
758
7593. Compliance Without Confusion
760
761   - The Stakes: A single food safety breach can tarnish a reputation built over years.
762   - The Safety Net: Regularly updating procedures removes guesswork from regulated tasks.
763   - Consider This: 73% of compliance failures stem from inconsistent adherence to procedures, not deliberate violations.
764
7654. Accelerated Onboarding
766
767   - Traditional Timeline: 3–6 months to reach full productivity. With proper SOPs, it takes 4–8 weeks to become competent.
768   - The Maths: If you hire 10 people annually at £30,000 each, faster onboarding saves £37,500 in productivity losses.
769
7705. Knowledge Retention
771
772   - The Problem: Your top employee resigns - their decade of expertise departs with them.
773   - The Solution: Documented procedures safeguard institutional knowledge.
774   - Did You Know? The average business loses 15% of its operational knowledge each year due to staff turnover.
775
7766. Performance Enhancement
777
778   The data shows that outlets following gold-standard procedures demonstrate:
779
780   - 7% increase in like-for-like sales
781   - 20% fewer support calls
782   - 31% reduction in error rates
783   - 18% improvement in customer satisfaction scores
784
785   Process discipline isn’t bureaucracy - it’s a competitive edge.
786
7877. Audit-Ready Documentation
788
789   Modern Requirements:
790
791   - Version control shows who updated what and when.
792   - Read receipts confirm training completion.
793   - Role-based access establishes accountability trails.
794   - Change logs demonstrate ongoing improvement.
795
796   The benefit: transform audits from disorganised efforts into assured presentations.
797
7988. Real-Time Business Agility
799
800   - Outdated approach: Email PDF updates, hoping everyone prints the latest version.
801   - New Method: Push instant updates to all locations simultaneously.
802   - Example: A coffee chain updated its allergen procedures across 47 locations in under 10 minutes when regulations changed.
803
8049. Next-Generation Engagement
805
806   - The Reality: By 2025, over 30% of the global workforce will be under 30.
807   - Their Expectation: Visual learning, mobile access, video instructions.
808   - The Solution: Modern operations manuals featuring embedded videos, interactive checklists, and a mobile-first design.
809
81010. Investor Confidence
811
812   What investors recognise in a documented business:
813
814   - Repeatable unit economics
815   - Lower operational risk
816   - Scalability beyond founder dependency
817   - Professional management systems
818   - Clear valuation metrics
819
820   The Premium: Businesses with comprehensive operations manuals command a 15–20% higher valuation.
821
82211. Intellectual Property Protection (IP)
823
824   - Often Overlooked: Your unique processes are valuable intellectual property.
825   - The Protection: Documented systems can be trademarked and legally safeguarded.
826   - The Asset: Your Operations Manual becomes a sellable business asset rather than merely an internal tool.
827
828## From Confusion to Clarity: The Journey of Transformation
829
830### Week 1–2: The Current State Audit
831
832Begin by accepting reality. Most businesses recognise:
833
834- 40% of procedures are stored in someone’s mind
835- 30% are in random Word documents
836- 20% are in outdated PDFs
837- 10% are nowhere at all
838
839### The Organisation Phase
840
841Create your procedure categories and key sections:
842
843- Introduction (e.g., Welcome, Mission, Vision, Core Values, Purpose of Manual, Confidentiality, Core Policies, Contacts, Glossary)
844- New Business Setup & Support (e.g., Business Formation, Property, Fit-Out and Equipment, IT Systems, Supply Chain, Calendar to Launch, First 12 Months)
845- Your Team (e.g., People) (Structure, Team Member Recruitment, Onboarding, Training, Management)
846- Marketing & Promotion (e.g., Brand Guidelines & Assets (IP protection), Advertising & Sales, Website/pages, PR, Social Media)
847- Day-to-Day Operating Requirements (e.g., Bespoke Systems – e.g., Customer Journey, Customer Satisfaction, Health & Safety, Hygiene, Data Protection, Financial Systems, Agreement Breach & Cure, Mediation)
848- Development, Growth & Profit (e.g., Continuous Improvement, KPIs, Benchmarking, Development Training, Exit Strategy, Sale of Business)
849
850### Week 5–8: The Documentation Sprint
851
852#### The technology that makes it possible
853
854##### Manual Magic AI®: From Months to Days
855
856Gone are the days of six to 12-month documentation projects. Here’s how modern AI transforms the process. Using the AI-assisted tool, Manual Magic AI®:
857
858The Project Manager:
859
860- Uploads existing Intellectual Property (IP) - PDFs, Docx, txt, handwritten notes.
861- The App automatically generates a draft Standard Operating Procedure.
862- Ask Your Wizard responds to natural-language questions and gives concise, context-aware guidance based on your uploaded documentation and IP.
863
864The Content Expert:
865
866- Ensures context
867- Performs an AI-assisted gap analysis
868- Reviews and refines from expert knowledge, embedding your brand’s DNA that sets your business apart from your competitors
869- Confirms accuracy
870- Adds infographics
871
872The Project Manager approves publication:
873
874- Applies a design (optional)
875- Generates a Checklist, FAQs, or a Storyboard
876- Generates a QR code for placement where needed, for instant capture on smartphones or tablets
877- Enables you to create a video from the storyboard using your smartphone or tablet
878
879#### Multi-Format Publishing
880
881- Text procedures for detail
882- Infographics and images for clarity
883- Storyboards for videos to explain how to replicate complex tasks
884- Mobile-optimised for workplace use
885
886#### Living Documentation
887
888- Real-time updates
889- Version control
890- Read receipts
891- Performance analytics
892
893#### Seamless Integration
894
895- Export to PDF as required
896- Link to SharePoint
897- LMS integration
898- Portal embedding
899
900### Week 9–10: The Implementation
901
902- Train team leaders
903- Roll out access
904- Gather feedback
905- Refine procedures
906- Celebrate the win
907
908## The ROI Calculator
909
910Let’s make this concrete for a typical 5-location business:
911
912### Annual Costs Without Adequate SOPs
913
914- Wasted time: £6,700 (5 × £1,340)
915- Onboarding delays: £18,750
916- Compliance risks: £10,000 (potential)
917- Lost sales from inconsistency: £25,000
918- Total: £60,450
919
920### Investment in Proper Documentation
921
922- Manual Magic AI® platform: £7,188/year (Growth tier)
923- Initial setup time: £5,000 (estimated value)
924- Ongoing maintenance: £2,000/year
925- Total: £14,188
926
927First Year ROI: 326%
928
929## Start Small, Think Big: Your Action Plan
930
931### For Solopreneurs
932
9331. Document your top 5 daily procedures this week.
9342. Create an “emergency operations kit” for your VA.
9353. Build procedures as you work – 10 minutes daily.
936
937### For Growing SMEs
938
9391. Identify your 20 mission-critical procedures.
9402. Complete documentation for one department before proceeding to the next.
9413. Assign procedure owners for maintenance tasks.
942
943### For Multi-Site Operations
944
9451. Standardise your procedures by prioritising those with the most significant variance first.
9462. Create site-specific appendices to meet local requirements.
9473. Establish measurement systems to ensure compliance.
948
949## The Almost Enjoyable Part
950
951Yes, we said “almost enjoyable” because with the right tools, documentation becomes:
952
953- Faster: AI drafts in minutes, not days.
954- Collaborative: Teams contribute expertise easily.
955- Visual: Screenshots and videos replace walls of text.
956- Impactful: You see immediate operational improvements.
957- Empowering: Teams stop guessing, start executing.
958
959## Conclusion: Your Business Deserves Better Than Confusion
960
961Every business - from solopreneur to enterprise - relies on processes. The key question is whether those processes exist only in people’s minds or in an accessible, updatable, and protectable system.
962
963Your Operations Manual isn’t about creating bureaucracy. It’s about creating freedom:
964
965- Freedom from daily firefighting
966- Freedom to scale confidently
967- Freedom to sell your business someday
968- Freedom to take a holiday
969
970The businesses that survive and thrive in the next decade won’t necessarily be the largest or best-funded. They’ll be the ones with the most precise, most accessible documentation of what makes them successful.
971
972Stop believing the myth that operations manuals are only for large organisations. Start building the foundation for your business’s next chapter.
973
974Ready to transform your scattered knowledge into organised SOPs? Manual Magic AI® launches in February 2026.
975
976Get access now for early VIP access and Founder Benefits. You’ll receive nearly 50% off the monthly Contributor subscriptions and a complimentary digital copy of “Manual Magic: Create the Operations Manual Your Franchisees Need to Succeed” if you subscribe by the end of February.
977`,__vite_glob_0_6=`---
978title: Ensure Transparency and Accountability-How Version Control, Read Receipts, and Role-Based Access Create the Ideal Audit Trail
979slug: audit-trail
980keywords:
981  - operations manual
982  - audit trail
983  - version control
984  - read receipts
985  - role-based access
986  - RBAC
987  - compliance
988  - transparency
989image:
990  url: /graphics/article7.jpg
991  alt: Audit trail with version control, read receipts, and role-based access control
992draft: false
993publishedDate: 2026-01-12
994---
995
996The hidden cost of poor documentation isn't just inefficiency – it's the gradual erosion of trust, accountability, and control within your business.
997
998In any business, the ability to monitor actions and decisions isn’t a luxury – it’s essential for success. If you’re leading a team, managing a complex project, or handling sensitive data, maintaining clarity and accountability sets thriving organisations apart from those constantly f
998irefighting.
999
1000The challenge? As teams expand and operations become more collaborative, managing changes, approvals, and updates grows increasingly complicated. Without the proper systems, it’s easy to lose track of who has done what, when, and whether critical information has been seen or acted upon. The result is mistakes, delays, misunderstandings, and-most importantly-a breakdown in accountability.
1001
1002The solution rests on three powerful tools: version control, read receipts, and role-based access. Collectively, they establish a clear audit trail that reveals exactly who viewed what, when, and why-turning opacity into transparency and confusion into clarity.
1003
1004## Why Auditing Is More Important Than Ever
1005
1006Auditing isn’t the most thrilling subject. It appears bureaucratic, labour‑intensive, and like something that only counts when issues arise.
1007
1008But auditing isn’t just about ticking compliance boxes or preparing for regulatory inspections. It’s about building a transparent and trustworthy system where everyone knows the rules, understands their responsibilities, and can demonstrate they’ve fulfilled their duties.
1009
1010A solid audit trail not only helps you track actions but also provides clear visibility of how decisions were made. Whether you’re resolving a dispute between team members, demonstrating compliance to regulators, or simply understanding why a particular decision was taken six months ago, this kind of transparency is invaluable.
1011
1012Reflect on the last time you had to trace a project’s history to understand what occurred. How long did it take? How many emails did you sift through? How many people did you need to ask? And even then, did you receive a definitive answer?
1013
1014Without proper audit trails, you’re constantly piecing together the past from fragments of memory, scattered communications, and incomplete records. With them, you gain instant clarity.
1015
1016## Version Control: Precisely Track Changes
1017
1018Version control systems have been a standard practice in software development for decades. Why? Because they solve a fundamental problem: how to manage files that multiple people need to update, while ensuring nothing gets lost and everyone can see exactly what has changed.
1019
1020Version control records every change made to a document-who made it, when it was made, and why it was necessary. This creates a detailed, chronological history of how a document or project has developed over time.
1021
1022### How It Works in Practice
1023
1024Imagine you’re managing an Operations Manual for a multi‑site franchise. The training manager updates the customer service section. The compliance officer adds new regulatory requirements. The operations director revises the opening procedures. The quality standards manager corrects some technical details.
1025
1026Without version control, everything becomes chaotic. Who made which amendments? Are you working with the most recent version? If something goes wrong, which change caused it?
1027
1028With version control, every change is logged. You can see:
1029
1030- The specific modifications made line‑by‑line
1031- Who made each change
1032- When it was made
1033- Why it was made-if notes have been added
1034- The entire document at any point in its history
1035
1036### The Actual Benefits
1037
1038- No more accidental overwrites. If someone saves over essential changes, you can restore them instantly.
1039- No more confusion about versions. Everyone knows they are using the current version and can access earlier ones if necessary.
1040- Full transparency. When questions arise about why something was altered, you can provide the answer quickly.
1041- Simple rollback. If a change causes issues, you can revert to the previous version with a single click.
1042
1043For example, if one team member updates a health and safety procedure and another later notices that the change conflicts with local regulations, you can instantly see who made the change, when, why-and revert it if necessary. No accusations. No confusion. Just facts.
1044
1045## Read Receipts: Verifying When Information Is Actually Seen
1046
1047Read receipts may seem like a minor feature, but they solve a surprisingly common and costly problem: you can’t manage what you can’t measure, and you can’t tell whether someone has genuinely read something.
1048
1049In traditional email or document sharing, you send information into the void and hope it reaches the right people. You assume they’ve read it. You trust they’ve understood it. But you don’t actually know.
1050
1051### Why This Matters
1052
1053Consider these scenarios:
1054
1055- Scenario 1: Your franchisees need to adopt a new procedure by Friday. You send out the update on Monday. Come Friday, half haven’t implemented it. When you ask why, they s
1055ay they never received the information. Maybe they did, perhaps they didn’t-but you can’t verify it either way.
1056- Scenario 2: You are deploying a crucial compliance update. If team members do not implement it properly, you risk regulatory penalties. You must be certain that each person has seen and acknowledged the information.
1057- Scenario 3: Head Office sends a critical policy update to the network. Two weeks later, a team member breaches that policy. They claim they never saw the update. Without read receipts, it’s their word against Head Office’s.
1058
1059### How Read Receipts Promote Accountability
1060
1061With read receipts enabled, you can accurately see:
1062
1063- Who has opened and viewed each document
1064- When they viewed it
1065- Whether they have revisited it multiple times
1066- Who still needs to view it
1067
1068This shifts your communication from hopeful to evidence‑based.
1069
1070If critical information hasn’t been treated as a deadline, you can follow up proactively rather than reactively. If someone claims they never received something, you have proof they viewed it at 2:47 pm on Tuesday.
1071
1072This isn’t about surveillance-it’s about accountability. Everyone understands the rules: when you receive important information, you are expected to review it. Read receipts simply make that expectation measurable and enforceable.
1073
1074## Role‑Based Access: Secure and Efficient Management
1075
1076Not everyone in your organisation needs access to everything. In fact, giving everyone unrestricted access can create security risks and operational confusion.
1077
1078Role‑Based Access Control (RBAC) ensures that individuals can access only information relevant to their roles. This reduces the risk of unauthorised modifications, accidental exposure of sensitive data, and confusion regarding responsibilities.
1079
1080### How It Operates
1081
1082View your Operations Manual as a knowledge‑sharing ecosystem-a dynamic multimedia environment with multiple layers.
1083
1084- Level 1 – View Only: Frontline staff can read Standard Operating Procedures (SOPs) relevant to their role but cannot edit them.
1085- Level 2 – Edit Suggestions: Team leaders may suggest edits or improvements but cannot directly modify the master document.
1086- Level 3 – Edit Sections: Functional Heads or Department Managers are authorised to edit their specific sections-e.g., the HR Director can edit HR procedures.
1087- Level 4 – Full Access: The Operations Director has complete access to view, edit, and publish changes across all sections.
1088- Level 5 – Administration: The designated administrator controls permissions, archives old versions, and manages the entire system.
1089
1090### The Security and Compliance Benefits
1091
1092RBAC is not merely about organisation; it is vital for security and compliance.
1093
1094- Data Protection: Confidential information (financial data, personnel files, strategic plans) remains accessible only to authorised personnel.
1095- Regulatory Compliance: Many industries require strict controls over who can access and modify specific types of information. RBAC simplifies compliance and makes it easier to verify.
1096- Audit Evidence: You can demonstrate to regulators exactly who accessed what information and when.
1097- Reduced Risk: If a team member’s account is compromised, the damage is limited to their access level.
1098- Clear Responsibility: When someone has edit access, they accept accountability for ensuring accuracy in their area.
1099
1100### A Practical Example
1101
1102Suppose you are managing a healthcare franchise. Your Operations Manual includes:
1103
1104- Standard Operating Procedures (all staff)
1105- Medication Protocols (clinical staff only)
1106- Financial Procedures (management only)
1107- Strategic Plans (senior leadership only)
1108- HR Policies (HR team and management)
1109
1110Without RBAC, everyone either has access to everything (a security risk) or needs multiple separate systems (an operational nightmare).
1111
1112With RBAC, each individual has exactly what they need. The receptionist can view customer service procedures but not financial data. The clinical lead can edit medical protocols but cannot access strategic plans. The finance manager can update financial procedures but cannot modify clinical protocols.
1113
1114Clear. Secure. Efficient.
1115
1116## Creating Your Complete Audit Trail
1117
1118Here’s where it becomes powerful: when you combine version control, read receipts, and role‑based access, you establish a comprehensive audit trail that provides complete visibility over your operations.
1119
1120This audit trail automatically records:
1121
1122- Who accessed which documents and when
1123- Who made what changes and why
1124- Who has read critical updates
1125- Who has permission to access sensitive information
1126- The complete history of every document
1127
1128### Why This Matters
1129
1130- Compliance: When regulators require proof that all team members were informed of a policy change, you can provide timestamped evidence indicating exactly who read it and when.
1131- Quality Management: When a process isn’t being followed correctly, you can trace back to see if the procedure was updated, who reviewed the update, and whether training needs reinforcement.
1132- Dispute Resolution: When disagreements arise regarding what was agreed, who knew what, or who was responsible, the audit trail provides objective evidence.
1133- Operational Efficiency: When an issue occurs, you can quickly identify where it occurred without lengthy investigations.
1134- Continuous Improvement: By reviewing the audit trail, you can recognise patterns-such as which sections are being updated most frequently, where confusion occurs, and which team members need additional support.
1135
1136## The Efficiency Factor
1137
1138This isn’t just about safeguarding yourself-it’s about enhancing your business operations.
1139
1140Without audit trails, answering simple questions takes time:
1141
1142- “Who updated this procedure?” - 20 minutes searching.
1143- “Did the team see the new policy?” - multiple follow‑up emails.
1144- “When did we change this requirement?” - trawling through old versions.
1145- “Who has access to this information?” - manual checking across systems.
1146
1147With proper audit trails:
1148
1149- “Who updated this procedure?” - 10 seconds
1150- “Did the team see the new policy?” - instant visibility
1151- “When did we change this requirement?” - full change history
1152- “Who has access to this information?” - one click
1153
1154That saved time adds up. More importantly, the confidence gained from having answers instantly changes how your team operates.
1155
1156## Practical Applications Across Industries
1157
1158- Franchise Operations: Ensure all franchisees have received and acknowledged brand updates, policy changes, and operational procedures. Demonstrate adherence to the franchise agreement.
1159- Healthcare: Maintain comprehensive audit trails for clinical protocols, verify staff training compliance, and protect patient data with role‑based access controls.
1160- Retail Chains: Implement new procedures across multiple locations, ensuring each site manager has received and reviewed the information.
1161- Hospitality: Update health and safety procedures, manage recipe changes, and control access to supplier contracts and financial data.
1162- Manufacturing: Monitor updates to quality procedures, control access to proprietary processes, and demonstrate compliance with safety regulations.
1163- Professional Services: Control access to confidential client information, oversee modifications to service delivery procedures, and guarantee compliance with professional standards.
1164
1165## Implementation: Easier Than You Imagine
1166
1167The good news? You don’t need to be a technology expert to implement these systems. Modern operations management platforms include these features automatically.
1168
1169What to look for:
1170
1171- Automatic version tracking (no manual saving of numbered versions)
1172- Built‑in read receipt functionality
1173- Intuitive permission settings
1174- Clear audit reports you can generate instantly
1175- User‑friendly interface that doesn’t require technical training
1176
1177The key is choosing a system made explicitly for operations management, rather than adapting generic tools not designed for this purpose.
1178
1179## Conclusion: Transparency Builds Trust
1180
1181Ultimately, accountability is vital for smooth operations. However, it functions effectively only when supported by transparency-which depends on systems that monitor, record, and verify actions.
1182
1183With version control, read receipts, and role‑based access, you’re not just tracking information-you’re creating a system where:
1184
1185- Everyone knows their role and responsibilities
1186- Every action is documented automatically
1187- Trust is built on evidence, not assumptions
1188- Questions are answered immediately, not after lengthy investigations
1189- Compliance is provable, not presumed
1190- Risk is minimised through clear accountability
1191
1192This isn’t about fostering a surveillance culture or doubting your team. It’s about creating a professional environment where everyone can act confidently, knowing their work is part of a transparent and responsible process.
1193
1194Using these tools not only streamlines audits but also creates a dependable, transparent workflow that keeps your business functioning smoothly. When you need to show who viewed what and when, the tools are already available, making the process effortless.
1195
1196By creating a system that automatically monitors actions, communications, and access, you ensure that no one is overlooked and that everything is precisely recorded. This is how you foster trust and reduce risk, making sure everyone is accountable for their work.
1197
1198Your Operations Manual should be more than just a document-it should act as a flexible system that encourages accountability in every interaction.
1199
1200## Ready to Embed Transparency into Your Operations?
1201
1202Manual Magic AI® is the AI‑powered Operations Manual management system for creation and version control, featuring read receipts, role‑based access, and integrated audit trails from day one.
1203`,__vite_glob_0_7=`---
1204title: "From Tribal Knowledge to Documented Systems: The Operations Manual as Business Insurance"
1205slug: operations-manual-business-insurance
1206description: "Your premises are insured. Your stock is insured. But is the operational knowledge that runs your business protected? Discover why an operations manual is the most valuable insurance policy you'll ever build."
1207keywords:
1208  - operations manual
1209  - operational insurance
1210  - franchise operations manual
1211  - SOPs
1212  - standard operating procedures
1213  - knowledge management
1214  - business continuity
1215  - knowledge sharing
1216  - franchise compliance
1217  - documented systems
1218image:
1219  url: /graphics/article8.jpg
1220  alt: Team collaborating with charts and process notes in front of a strategy wall
1221draft: false
1222publishedDate: 2026-04-13
1223---
1224
1225You insure your premises against fire. You insure your stock against theft. You insure against public liability, employer liability, professional indemnity, and probably half a dozen other risks your broker reminds you of every year.
1226
1227But here is a question that should keep you awake at night: who is insuring the operational knowledge that actually runs your business?
1228
1229Not the bricks. Not the stock. The knowledge. The way your best location opens every morning. The way your top manager handles a complaint so skilfully that the customer returns. The way your training programme turns a nervous new starter into a confident team member within a fortnight. That knowledge, the living, breathing intelligence that makes your business work, almost certainly resides in the heads of a handful of people. And it is completely uninsured.
1230
1231This is the concept I call operational insurance: the documented, structured, continuously maintained system that captures what your business knows and makes it available to everyone who needs it. In practical terms, it is your operations manual. But not the dusty ring binder on a shelf or the PDF that nobody opens. It is a knowledge-sharing ecosystem, a living system that protects your business from the inside out.
1232
1233## The Cost of Running Uninsured
1234
1235Consider what actually happens when critical operational knowledge is undocumented.
1236
1237Your best manager resigns. She gave four weeks' notice, generous by most standards, but she has run your flagship site for three years. In those three years, she developed her own approach to scheduling staff, managing supplier relationships, handling the weekly cash reconciliation, and resolving the dozen small crises that arise in every busy operation. She did all of this brilliantly. She also did it all from memory. When she walks out on her final Friday, that knowledge walks out with her.
1238
1239This is the "bus test" in its most common, least dramatic form. You do not need a catastrophe. You just need one resignation letter, one long-term absence, or one retirement to reveal the fragility of a business that runs on unwritten rules.
1240
1241Now multiply that risk across every site, every department, every shift. Every location reinvents how things are done because there is no documented standard to follow. New starters take twice as long to become productive because induction is informal and inconsistent. Compliance requirements are met, or not, depending on which manager is on duty. The customer experience varies not only between sites but also between shifts at the same site.
1242
1243None of this happens because people are careless. It happens because the system is absent. Good people fail in bad systems every day.
1244
1245## Reframing the Operations Manual
1246
1247Operational insurance is not a product you buy from a broker. It is a system you build. The vehicle for building it is the operations manual, reframed not as a regulatory obligation or a box-ticking exercise, but as the single most strategically valuable asset in your business after your people.
1248
1249Think of it as a knowledge-sharing ecosystem. Not a static document, but a connected, living structure in which operational knowledge is captured at source, organised into a logical architecture, made accessible to every team member who needs it, and continuously updated as the business evolves. When this ecosystem is in place, the business is insured. Not against fire or theft, but against something far more common and far more damaging: the loss, fragmentation, and inconsistency of the knowledge that keeps it running.
1250
1251For franchise networks, this ecosystem is what you are actually selling when you grant a franchise. The franchisee is not paying for your logo. They are paying for a proven, documented, replicable system. If that system is incomplete, outdated, or buried in a document nobody reads, the franchise's value is diminished. For independent multi-site operators, the principle is identical. The operations manual is what enables you to open a second, third, or tenth location and know that each will deliver the same standard as your best.
1252
1253## Building the Knowledge-Sharing Ecosystem
1254
1255Every operations manual, regardless of industry or business size, covers six core categories of operational knowledge. Together, these categories form the ecosystem's architecture.
1256
1257**Introduction** establishes who you are: your vision, your values, and how your business operates at a structural level. This is the context that gives every procedure meaning.
1258
1259**Set-Up and Support** defines how new sites, franchisees, or major functions are established and maintained. Every set-up should be repeatable because it is documented.
1260
1261**People** covers how you recruit, train, manage performance, and develop your team. Documenting these processes is not HR bureaucracy, it is operational insurance against the chaos that follows every unplanned departure.
1262
1263**Marketing and Promotion** protect brand consistency. If one franchisee runs discount campaigns while another positions itself as premium, the brand promise is broken before the customer even complains.
1264
1265**Day-to-Day Operating Requirements** is the heart of the manual: the standard operating procedures that govern how work is performed, to what standard, and within which compliance framework. If your business has a "weakest link", a critical process that would fail if the wrong person were absent, this is where you fix it.
1266
1267**Development, Growth, and Profit** connects operations to outcomes. Documented operations reduce waste, shorten training cycles, prevent errors, and strengthen compliance, all of which improve the bottom line.
1268
1269These six categories are not six separate documents. They are six chapters of a single operational story. Together, they form the ecosystem that insures your business against the loss of knowledge at any level.
1270
1271## From Filing Cabinet to Living System
1272
1273The biggest barrier to building this ecosystem has never been a lack of willingness. It has been time. Business owners know they should document their operations. They intend to. They start the project, get halfway through, and then a hundred daily priorities pull them away. The ring binder stays half-written. The PDF stays half-finished. The knowledge stays in people's heads.
1274
1275This is precisely the problem that technology now solves. AI-powered platforms such as [Manual Magic AI](https://www.manualmagic.ai) have fundamentally changed the economics of creating operations manuals. What once took weeks or months to convert operational knowledge into structured, usable documentation now takes hours. Raw, unstructured process knowledge, however messy or informal, can be transformed into consistent, implementation-ready standard operating procedures in real time. The "blank page" problem has been eliminated.
1276
1277More importantly, the manual itself becomes a living system rather than a static artefact. A dashboard tracks which areas of the business are documented and which are not. A workflow manages the lifecycle of every procedure, from draft through review to publication and updates. An AI search function allows any team member to query the entire knowledge base in natural language. The ecosystem is not just built, it is maintained, searchable, and continuously improved.
1278
1279## The Return on Operational Insurance
1280
1281The return on this investment is not abstract. Consistent operations deliver a consistent customer experience, driving retention and reputation. Scalable documentation ensures new sites open performing like your best, not your worst. Shorter onboarding lowers recruitment costs and accelerates productivity. Compliance readiness means fewer surprises from auditors and regulators. And a fully documented operational system directly increases your business's valuation because a buyer is purchasing a system that works, not a dependency on the people who happen to be there today.
1282
1283## The Question You Cannot Avoid
1284
1285Every business owner faces a choice. You can continue to run uninsured, trusting that the knowledge in your team members' heads will remain available, accurate, and consistent for as long as you need it. Or you can build a system that captures that knowledge, structures it, and makes it a permanent, transferable asset of the business.
1286
1287The question is not whether you can afford to build a knowledge-sharing ecosystem. It is whether you can afford not to.
1288
1289If you want a practical starting point, explore [Manual Magic AI](https://www.manualmagic.ai) or download Penny's [Manual Magic book](https://cdn.manualmagic.ai/Book.pdf).
1290
1291Penny Hopkinson is the creator of Manual Magic AI and founder of Manual Writers International. A British Franchise Association Companion and recognised authority on operations manual development, she helps franchise networks and multi-site businesses turn operational knowledge into documented, scalable systems.
1292`,require$$0=getAugmentedNamespace(empty$2);var kindOf,hasRequiredKindOf;
1292function requireKindOf(){if(hasRequiredKindOf)return kindOf;hasRequiredKindOf=1;var ds=Object.prototype.toString;kindOf=function(ks){if(ks===void 0)return"undefined";if(ks===null)return"null";var Os=typeof ks;if(Os==="boolean")return"boolean";if(Os==="string")return"string";if(Os==="number")return"number";if(Os==="symbol")return"symbol";if(Os==="function")return ws(ks)?"generatorfunction":"function";if(ms(ks))return"array";if(Cs(ks))return"buffer";if(js(ks))return"arguments";if(bs(ks))return"date";if(xs(ks))return"error";if(Es(ks))return"regexp";switch(dn(ks)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(Rs(ks))return"generator";switch(Os=ds.call(ks),Os){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return Os.slice(8,-1).toLowerCase().replace(/\s/g,"")};function dn(As){return typeof As.constructor=="function"?As.constructor.name:null}function ms(As){return Array.isArray?Array.isArray(As):As instanceof Array}function xs(As){return As instanceof Error||typeof As.message=="string"&&As.constructor&&typeof As.constructor.stackTraceLimit=="number"}function bs(As){return As instanceof Date?!0:typeof As.toDateString=="function"&&typeof As.getDate=="function"&&typeof As.setDate=="function"}function Es(As){return As instanceof RegExp?!0:typeof As.flags=="string"&&typeof As.ignoreCase=="boolean"&&typeof As.multiline=="boolean"&&typeof As.global=="boolean"}function ws(As,ks){return dn(As)==="GeneratorFunction"}function Rs(As){return typeof As.throw=="function"&&typeof As.return=="function"&&typeof As.next=="function"}function js(As){try{if(typeof As.length=="number"&&typeof As.callee=="function")return!0}catch(ks){if(ks.message.indexOf("callee")!==-1)return!0}return!1}function Cs(As){return As.constructor&&typeof As.constructor.isBuffer=="function"?As.constructor.isBuffer(As):!1}return kindOf}var isExtendable,hasRequiredIsExtendable;function requireIsExtendable(){return hasRequiredIsExtendable||(hasRequiredIsExtendable=1,isExtendable=function(dn){return typeof dn<"u"&&dn!==null&&(typeof dn=="object"||typeof dn=="function")}),isExtendable}var extendShallow,hasRequiredExtendShallow;function requireExtendShallow(){if(hasRequiredExtendShallow)return extendShallow;hasRequiredExtendShallow=1;var ds=requireIsExtendable();extendShallow=function(bs){ds(bs)||(bs={});for(var Es=arguments.length,ws=1;ws<Es;ws++){var Rs=arguments[ws];ds(Rs)&&dn(bs,Rs)}return bs};function dn(xs,bs){for(var Es in bs)ms(bs,Es)&&(xs[Es]=bs[Es])}function ms(xs,bs){return Object.prototype.hasOwnProperty.call(xs,bs)}return extendShallow}var sectionMatter,hasRequiredSectionMatter;function requireSectionMatter(){if(hasRequiredSectionMatter)return sectionMatter;hasRequiredSectionMatter=1;var ds=requireKindOf(),dn=requireExtendShallow();sectionMatter=function(js,Cs){typeof Cs=="function"&&(Cs={parse:Cs});var As=xs(js),ks={section_delimiter:"---",parse:ws},Os=dn({},ks,Cs),Ms=Os.section_delimiter,Ds=As.content.split(/\r?\n/),Ps=null,Ls=Es(),Bs=[],Fs=[];function Us(Qs){As.content=Qs,Ps=[],Bs=[]}function Gs(Qs){Fs.length&&(Ls.key=bs(Fs[0],Ms),Ls.content=Qs,Os.parse(Ls,Ps),Ps.push(Ls),Ls=Es(),Bs=[],Fs=[])}for(var Js=0;Js<Ds.length;Js++){var Ws=Ds[Js],Zs=Fs.length,Ys=Ws.trim();if(ms(Ys,Ms)){if(Ys.length===3&&Js!==0){if(Zs===0||Zs===2){Bs.push(Ws);continue}Fs.push(Ys),Ls.data=Bs.join(`
1293`),Bs=[];continue}Ps===null&&Us(Bs.join(`
1294`)),Zs===2&&Gs(Bs.join(`
1295`)),Fs.push(Ys);continue}Bs.push(Ws)}return Ps===null?Us(Bs.join(`
1296`)):Gs(Bs.join(`
1297`)),As.sections=Ps,As};function ms(js,Cs){return!(js.slice(0,Cs.length)!==Cs||js.charAt(Cs.length+1)===Cs.slice(-1))}function xs(js){if(ds(js)!=="object"&&(js={content:js}
1297),typeof js.content!="string"&&!Rs(js.content))throw new TypeError("expected a buffer or string");return js.content=js.content.toString(),js.sections=[],js}function bs(js,Cs){return js?js.slice(Cs.length).trim():""}function Es(){return{key:"",data:"",content:""}}function ws(js){return js}function Rs(js){return js&&js.constructor&&typeof js.constructor.isBuffer=="function"?js.constructor.isBuffer(js):!1}return sectionMatter}var engines={exports:{}},jsYaml$1={},loader={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;function ds(ws){return typeof ws>"u"||ws===null}function dn(ws){return typeof ws=="object"&&ws!==null}function ms(ws){return Array.isArray(ws)?ws:ds(ws)?[]:[ws]}function xs(ws,Rs){var js,Cs,As,ks;if(Rs)for(ks=Object.keys(Rs),js=0,Cs=ks.length;js<Cs;js+=1)As=ks[js],ws[As]=Rs[As];return ws}function bs(ws,Rs){var js="",Cs;for(Cs=0;Cs<Rs;Cs+=1)js+=ws;return js}function Es(ws){return ws===0&&Number.NEGATIVE_INFINITY===1/ws}return common.isNothing=ds,common.isObject=dn,common.toArray=ms,common.repeat=bs,common.isNegativeZero=Es,common.extend=xs,common}var exception,hasRequiredException;function requireException(){if(hasRequiredException)return exception;hasRequiredException=1;function ds(dn,ms){Error.call(this),this.name="YAMLException",this.reason=dn,this.mark=ms,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return ds.prototype=Object.create(Error.prototype),ds.prototype.constructor=ds,ds.prototype.toString=function(ms){var xs=this.name+": ";return xs+=this.reason||"(unknown reason)",!ms&&this.mark&&(xs+=" "+this.mark.toString()),xs},exception=ds,exception}var mark$1,hasRequiredMark;function requireMark(){if(hasRequiredMark)return mark$1;hasRequiredMark=1;var ds=requireCommon();function dn(ms,xs,bs,Es,ws){this.name=ms,this.buffer=xs,this.position=bs,this.line=Es,this.column=ws}return dn.prototype.getSnippet=function(xs,bs){var Es,ws,Rs,js,Cs;if(!this.buffer)return null;for(xs=xs||4,bs=bs||75,Es="",ws=this.position;ws>0&&`\0\r
1298…\u2028\u2029`.indexOf(this.buffer.charAt(ws-1))===-1;)if(ws-=1,this.position-ws>bs/2-1){Es=" ... ",ws+=5;break}for(Rs="",js=this.position;js<this.buffer.length&&`\0\r
1299…\u2028\u2029`.indexOf(this.buffer.charAt(js))===-1;)if(js+=1,js-this.position>bs/2-1){Rs=" ... ",js-=5;break}return Cs=this.buffer.slice(ws,js),ds.repeat(" ",xs)+Es+Cs+Rs+`
1300`+ds.repeat(" ",xs+this.position-ws+Es.length)+"^"},dn.prototype.toString=function(xs){var bs,Es="";return this.name&&(Es+='in "'+this.name+'" '),Es+="at line "+(this.line+1)+", column "+(this.column+1),xs||(bs=this.getSnippet(),bs&&(Es+=`:
1301`+bs)),Es},mark$1=dn,mark$1}var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1;var ds=requireException(),dn=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ms=["scalar","sequence","mapping"];function xs(Es){var ws={};return Es!==null&&Object.keys(Es).forEach(function(Rs){Es[Rs].forEach(function(js){ws[String(js)]=Rs})}),ws}function bs(Es,ws){if(ws=ws||{},Object.keys(ws).forEach(function(Rs){if(dn.indexOf(Rs)===-1)throw new ds('Unknown option "'+Rs+'" is met in definition of "'+Es+'" YAML type.')}),this.tag=Es,this.kind=ws.kind||null,this.resolve=ws.resolve||function(){return!0},this.construct=ws.construct||function(Rs){return Rs},this.instanceOf=ws.instanceOf||null,this.predicate=ws.predicate||null,this.represent=ws.represent||null,this.defaultStyle=ws.defaultStyle||null,this.styleAliases=xs(ws.styleAliases||null),ms.indexOf(this.kind)===-1)throw new ds('Unknown kind "'+this.kind+'" is specified for "'+Es+'" YAML type.')}return type=bs,type}var schema,hasRequiredSchema;function requireSchema(){if(hasRequiredSchema)return schema;hasRequiredSchema=1;var ds=requireCommon(),dn=requireException(),ms=requireType();function xs(ws,Rs,js){var Cs=[];return ws.include.forEach(function(As){js=xs(As,Rs,js)}),ws[Rs].forEach(function(As){js.forEach(function(ks,Os){ks.tag===As.tag&&ks.kind===As.kind&&Cs.push(Os)}),js.push(As)}),js.filter(function(As,ks){return Cs.indexOf(ks)===-1})}function bs(){var ws={scalar:{},sequence:{},mapping:{},fallback:{}},Rs,js;function Cs(As){ws[As.kind][As.tag]=ws.fallback[As.tag]=As}for(Rs=0,js=arguments.length;Rs<js;
vendor: 8,115 bytes, line 1301
1301Rs+=1)arguments[Rs].forEach(Cs);return ws}function Es(ws){this.include=ws.include||[],this.implicit=ws.implicit||[],this.explicit=ws.explicit||[],this.implicit.forEach(function(Rs){if(Rs.loadKind&&Rs.loadKind!=="scalar")throw new dn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=xs(this,"implicit",[]),this.compiledExplicit=xs(this,"explicit",[]),this.compiledTypeMap=bs(this.compiledImplicit,this.compiledExplicit)}return Es.DEFAULT=null,Es.create=function(){var Rs,js;switch(arguments.length){case 1:Rs=Es.DEFAULT,js=arguments[0];break;case 2:Rs=arguments[0],js=arguments[1];break;default:throw new dn("Wrong number of arguments for Schema.create function")}if(Rs=ds.toArray(Rs),js=ds.toArray(js),!Rs.every(function(Cs){return Cs instanceof Es}))throw new dn("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!js.every(function(Cs){return Cs instanceof ms}))throw new dn("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Es({include:Rs,explicit:js})},schema=Es,schema}var str,hasRequiredStr;function requireStr(){if(hasRequiredStr)return str;hasRequiredStr=1;var ds=requireType();return str=new ds("tag:yaml.org,2002:str",{kind:"scalar",construct:function(dn){return dn!==null?dn:""}}),str}var seq,hasRequiredSeq;function requireSeq(){if(hasRequiredSeq)return seq;hasRequiredSeq=1;var ds=requireType();return seq=new ds("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(dn){return dn!==null?dn:[]}}),seq}var map$2,hasRequiredMap;function requireMap(){if(hasRequiredMap)return map$2;hasRequiredMap=1;var ds=requireType();return map$2=new ds("tag:yaml.org,2002:map",{kind:"mapping",construct:function(dn){return dn!==null?dn:{}}}),map$2}var failsafe,hasRequiredFailsafe;function requireFailsafe(){if(hasRequiredFailsafe)return failsafe;hasRequiredFailsafe=1;var ds=requireSchema();return failsafe=new ds({explicit:[requireStr(),requireSeq(),requireMap()]}),failsafe}var _null,hasRequired_null;function require_null(){if(hasRequired_null)return _null;hasRequired_null=1;var ds=requireType();function dn(bs){if(bs===null)return!0;var Es=bs.length;return Es===1&&bs==="~"||Es===4&&(bs==="null"||bs==="Null"||bs==="NULL")}function ms(){return null}function xs(bs){return bs===null}return _null=new ds("tag:yaml.org,2002:null",{kind:"scalar",resolve:dn,construct:ms,predicate:xs,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),_null}var bool,hasRequiredBool;function requireBool(){if(hasRequiredBool)return bool;hasRequiredBool=1;var ds=requireType();function dn(bs){if(bs===null)return!1;var Es=bs.length;return Es===4&&(bs==="true"||bs==="True"||bs==="TRUE")||Es===5&&(bs==="false"||bs==="False"||bs==="FALSE")}function ms(bs){return bs==="true"||bs==="True"||bs==="TRUE"}function xs(bs){return Object.prototype.toString.call(bs)==="[object Boolean]"}return bool=new ds("tag:yaml.org,2002:bool",{kind:"scalar",resolve:dn,construct:ms,predicate:xs,represent:{lowercase:function(bs){return bs?"true":"false"},uppercase:function(bs){return bs?"TRUE":"FALSE"},camelcase:function(bs){return bs?"True":"False"}},defaultStyle:"lowercase"}),bool}var int,hasRequiredInt;function requireInt(){if(hasRequiredInt)return int;hasRequiredInt=1;var ds=requireCommon(),dn=requireType();function ms(js){return 48<=js&&js<=57||65<=js&&js<=70||97<=js&&js<=102}function xs(js){return 48<=js&&js<=55}function bs(js){return 48<=js&&js<=57}function Es(js){if(js===null)return!1;var Cs=js.length,As=0,ks=!1,Os;if(!Cs)return!1;if(Os=js[As],(Os==="-"||Os==="+")&&(Os=js[++As]),Os==="0"){if(As+1===Cs)return!0;if(Os=js[++As],Os==="b"){for(As++;As<Cs;As++)if(Os=js[As],Os!=="_"){if(Os!=="0"&&Os!=="1")return!1;ks=!0}return ks&&Os!=="_"}if(Os==="x"){for(As++;As<Cs;As++)if(Os=js[As],Os!=="_"){if(!ms(js.charCodeAt(As)))return!1;ks=!0}return ks&&Os!=="_"}for(;As<Cs;As++)if(Os=js[As],Os!=="_"){if(!xs(js.charCodeAt(As)))return!1;ks=!0}return ks&&Os!=="_"}if(Os==="_")return!1;for(;As<Cs;As++)if(Os=js[As],Os!=="_"){if(Os===":")break;if(!bs(js.charCodeAt(As)))return!1;ks=!0}return!ks||Os==="_"?!1:Os!==":"?!0:/^(:[0-5]?[0-9])+$/.test(js.slice(As))}function ws(js){var Cs=js,As=1,ks,Os,Ms=[];return Cs.indexOf("_")!==-1&&(Cs=Cs.replace(/_/g,"")),ks=Cs[0],(ks==="-"||ks==="+")&&(ks==="-"&&(As=-1),Cs=Cs.slice(1),ks=Cs[0]),Cs==="0"?0:ks==="0"?Cs[1]==="b"?As*parseInt(Cs.slice(2),2):Cs[1]==="x"?As*parseInt(Cs,16):As*parseInt(Cs,8):Cs.indexOf(":")!==-1?(Cs.split(":").forEach(function(Ds){Ms.unshift(parseInt(Ds,10))}),Cs=0,Os=1,Ms.forEach(function(Ds){Cs+=Ds*Os,Os*=60}),As*Cs):As*parseInt(Cs,10)}function Rs(js){return Object.prototype.toString.call(js)==="[object Number]"&&js%1===0&&!ds.isNegativeZero(js)}return int=new dn("tag:yaml.org,2002:int",{kind:"scalar",resolve:Es,construct:ws,predicate:Rs,represent:{binary:function(js){return js>=0?"0b"+js.toString(2):"-0b"+js.toString(2).slice(1)},octal:function(js){return js>=0?"0"+js.toString(8):"-0"+js.toString(8).slice(1)},decimal:function(js){return js.toString(10)},hexadecimal:function(js){return js>=0?"0x"+js.toString(16).toUpperCase():"-0x"+js.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),int}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1;var ds=requireCommon(),dn=requireType(),ms=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xs(js){return!(js===null||!ms.test(js)||js[js.length-1]==="_")}function bs(js){var Cs,As,ks,Os;return Cs=js.replace(/_/g,"").toLowerCase(),As=Cs[0]==="-"?-1:1,Os=[],"+-".indexOf(Cs[0])>=0&&(Cs=Cs.slice(1)),Cs===".inf"?As===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:Cs===".nan"?NaN:Cs.indexOf(":")>=0?(Cs.split(":").forEach(function(Ms){Os.unshift(parseFloat(Ms,10))}),Cs=0,ks=1,Os.forEach(function(Ms){Cs+=Ms*ks,ks*=60}),As*Cs):As*parseFloat(Cs,10)}var Es=/^[-+]?[0-9]+e/;function ws(js,Cs){var As;if(isNaN(js))switch(Cs){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===js)switch(Cs){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===js)switch(Cs){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ds.isNegativeZero(js))return"-0.0";return As=js.toString(10),Es.test(As)?As.replace("e",".e"):As}function Rs(js){return Object.prototype.toString.call(js)==="[object Number]"&&(js%1!==0||ds.isNegativeZero(js))}return float=new dn("tag:yaml.org,2002:float",{kind:"scalar",resolve:xs,construct:bs,predicate:Rs,represent:ws,defaultStyle:"lowercase"}),float}var json,hasRequiredJson;function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;var ds=requireSchema();return json=new ds({include:[requireFailsafe()],implicit:[require_null(),requireBool(),requireInt(),requireFloat()]}),json}var core,hasRequiredCore;function requireCore(){if(hasRequiredCore)return core;hasRequiredCore=1;var ds=requireSchema();return core=new ds({include:[requireJson()]}),core}var timestamp,hasRequiredTimestamp;function requireTimestamp(){if(hasRequiredTimestamp)return timestamp;hasRequiredTimestamp=1;var ds=requireType(),dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ms=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function xs(ws){return ws===null?!1:dn.exec(ws)!==null||ms.exec(ws)!==null}function bs(ws){var Rs,js,Cs,As,ks,Os,Ms,Ds=0,Ps=null,Ls,Bs,Fs;if(Rs=dn.exec(ws),Rs===null&&(Rs=ms.exec(ws)),Rs===null)throw new Error("Date resolve error");
1301if(js=+Rs[1],Cs=+Rs[2]-1,As=+Rs[3],!Rs[4])return new Date(Date.UTC(js,Cs,As));if(ks=+Rs[4],Os=+Rs[5],Ms=+Rs[6],Rs[7]){for(Ds=Rs[7].slice(0,3);Ds.length<3;)Ds+="0";Ds=+Ds}return Rs[9]&&(Ls=+Rs[10],Bs=+(Rs[11]||0),Ps=(Ls*60+Bs)*6e4,Rs[9]==="-"&&(Ps=-Ps)),Fs=new Date(Date.UTC(js,Cs,As,ks,Os,Ms,Ds)),Ps&&Fs.setTime(Fs.getTime()-Ps),Fs}function Es(ws){return ws.toISOString()}return timestamp=new ds("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xs,construct:bs,instanceOf:Date,represent:Es}),timestamp}var merge$1,hasRequiredMerge;function requireMerge(){if(hasRequiredMerge)return merge$1;hasRequiredMerge=1;var ds=requireType();function dn(ms){return ms==="<<"||ms===null}return merge$1=new ds("tag:yaml.org,2002:merge",{kind:"scalar",resolve:dn}),merge$1}function commonjsRequire(ds){throw new Error('Could not dynamically require "'+ds+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var binary,hasRequiredBinary;function requireBinary(){if(hasRequiredBinary)return binary;hasRequiredBinary=1;var ds;try{var dn=commonjsRequire;ds=dn("buffer").Buffer}catch{}var ms=requireType(),xs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
1302\r`;function bs(js){if(js===null)return!1;var Cs,As,ks=0,Os=js.length,Ms=xs;for(As=0;As<Os;As++)if(Cs=Ms.indexOf(js.charAt(As)),!(Cs>64)){if(Cs<0)return!1;ks+=6}return ks%8===0}function Es(js){var Cs,As,ks=js.replace(/[\r\n=]/g,""),Os=ks.length,Ms=xs,Ds=0,Ps=[];for(Cs=0;Cs<Os;Cs++)Cs%4===0&&Cs&&(Ps.push(Ds>>16&255),Ps.push(Ds>>8&255),Ps.push(Ds&255)),Ds=Ds<<6|Ms.indexOf(ks.charAt(Cs));return As=Os%4*6,As===0?(Ps.push(Ds>>16&255),Ps.push(Ds>>8&255),Ps.push(Ds&255)):As===18?(Ps.push(Ds>>10&255),Ps.push(Ds>>2&255)):As===12&&Ps.push(Ds>>4&255),ds?ds.from?ds.from(Ps):new ds(Ps):Ps}function ws(js){var Cs="",As=0,ks,Os,Ms=js.length,Ds=xs;for(ks=0;ks<Ms;ks++)ks%3===0&&ks&&(Cs+=Ds[As>>18&63],Cs+=Ds[As>>12&63],Cs+=Ds[As>>6&63],Cs+=Ds[As&63]),As=(As<<8)+js[ks];return Os=Ms%3,Os===0?(Cs+=Ds[As>>18&63],Cs+=Ds[As>>12&63],Cs+=Ds[As>>6&63],Cs+=Ds[As&63]):Os===2?(Cs+=Ds[As>>10&63],Cs+=Ds[As>>4&63],Cs+=Ds[As<<2&63],Cs+=Ds[64]):Os===1&&(Cs+=Ds[As>>2&63],Cs+=Ds[As<<4&63],Cs+=Ds[64],Cs+=Ds[64]),Cs}function Rs(js){return ds&&ds.isBuffer(js)}return binary=new ms("tag:yaml.org,2002:binary",{kind:"scalar",resolve:bs,construct:Es,predicate:Rs,represent:ws}),binary}var omap,hasRequiredOmap;function requireOmap(){if(hasRequiredOmap)return omap;hasRequiredOmap=1;var ds=requireType(),dn=Object.prototype.hasOwnProperty,ms=Object.prototype.toString;function xs(Es){if(Es===null)return!0;var ws={},Rs,js,Cs,As,ks,Os=Es;for(Rs=0,js=Os.length;Rs<js;Rs+=1){if(Cs=Os[Rs],ks=!1,ms.call(Cs)!=="[object Object]")return!1;for(As in Cs)if(dn.call(Cs,As))if(!ks)ks=!0;else return!1;if(!ks||dn.call(ws,As))return!1;Object.defineProperty(ws,As,{value:!0})}return!0}function bs(Es){return Es!==null?Es:[]}return omap=new ds("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xs,construct:bs}),omap}var pairs,hasRequiredPairs;function requirePairs(){if(hasRequiredPairs)return pairs;hasRequiredPairs=1;var ds=requireType(),dn=Object.prototype.toString;function ms(bs){if(bs===null)return!0;var Es,ws,Rs,js,Cs,As=bs;for(Cs=new Array(As.length),Es=0,ws=As.length;Es<ws;Es+=1){if(Rs=As[Es],dn.call(Rs)!=="[object Object]"||(js=Object.keys(Rs),js.length!==1))return!1;Cs[Es]=[js[0],Rs[js[0]]]}return!0}function xs(bs){if(bs===null)return[];var Es,ws,Rs,js,Cs,As=bs;for(Cs=new Array(As.length),Es=0,ws=As.length;Es<ws;Es+=1)Rs=As[Es],js=Object.keys(Rs),Cs[Es]=[js[0],Rs[js[0]]];return Cs}return pairs=new ds("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:ms,construct:xs}),pairs}var set,hasRequiredSet;function requireSet(){if(hasRequiredSet)return set;hasRequiredSet=1;var ds=requireType(),dn=Object.prototype.hasOwnProperty;function ms(bs){if(bs===null)return!0;var Es,ws=bs;for(Es in ws)if(dn.call(ws,Es)&&ws[Es]!==null)return!1;return!0}function xs(bs){return bs!==null?bs:{}}return set=new ds("tag:yaml.org,2002:set",{kind:"mapping",resolve:ms,construct:xs}),set}var default_safe,hasRequiredDefault_safe;function requireDefault_safe(){if(hasRequiredDefault_safe)return default_safe;hasRequiredDefault_safe=1;var ds=requireSchema();return default_safe=new ds({include:[requireCore()],implicit:[requireTimestamp(),requireMerge()],explicit:[requireBinary(),requireOmap(),requirePairs(),requireSet()]}),default_safe}var _undefined,hasRequired_undefined;function require_undefined(){if(hasRequired_undefined)return _undefined;hasRequired_undefined=1;var ds=requireType();function dn(){return!0}function ms(){}function xs(){return""}function bs(Es){return typeof Es>"u"}return _undefined=new ds("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:dn,construct:ms,predicate:bs,represent:xs}),_undefined}var regexp,hasRequiredRegexp;function requireRegexp(){if(hasRequiredRegexp)return regexp;hasRequiredRegexp=1;var ds=requireType();function dn(Es){if(Es===null||Es.length===0)return!1;var ws=Es,Rs=/\/([gim]*)$/.exec(Es),js="";return!(ws[0]==="/"&&(Rs&&(js=Rs[1]),js.length>3||ws[ws.length-js.length-1]!=="/"))}function ms(Es){var ws=Es,Rs=/\/([gim]*)$/.exec(Es),js="";return ws[0]==="/"&&(Rs&&(js=Rs[1]),ws=ws.slice(1,ws.length-js.length-1)),new RegExp(ws,js)}function xs(Es){var ws="/"+Es.source+"/";return Es.global&&(ws+="g"),Es.multiline&&(ws+="m"),Es.ignoreCase&&(ws+="i"),ws}function bs(Es){return Object.prototype.toString.call(Es)==="[object RegExp]"}return regexp=new ds("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:dn,construct:ms,predicate:bs,represent:xs}),regexp}var _function,hasRequired_function;function require_function(){if(hasRequired_function)return _function;hasRequired_function=1;var ds;try{var dn=commonjsRequire;ds=dn("esprima")}catch{typeof window<"u"&&(ds=window.esprima)}var ms=requireType();function xs(Rs){if(Rs===null)return!1;try{var js="("+Rs+")",Cs=ds.parse(js,{range:!0});return!(Cs.type!=="Program"||Cs.body.length!==1||Cs.body[0].type!=="ExpressionStatement"||Cs.body[0].expression.type!=="ArrowFunctionExpression"&&Cs.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function bs(Rs){var js="("+Rs+")",Cs=ds.parse(js,{range:!0}),As=[],ks;if(Cs.type!=="Program"||Cs.body.length!==1||Cs.body[0].type!=="ExpressionStatement"||Cs.body[0].expression.type!=="ArrowFunctionExpression"&&Cs.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");
vendor: 4,274 bytes, lines 1302-1303
1302return Cs.body[0].expression.params.forEach(function(Os){As.push(Os.name)}),ks=Cs.body[0].expression.body.range,Cs.body[0].expression.body.type==="BlockStatement"?new Function(As,js.slice(ks[0]+1,ks[1]-1)):new Function(As,"return "+js.slice(ks[0],ks[1]))}function Es(Rs){return Rs.toString()}function ws(Rs){return Object.prototype.toString.call(Rs)==="[object Function]"}return _function=new ms("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:xs,construct:bs,predicate:ws,represent:Es}),_function}var default_full,hasRequiredDefault_full;function requireDefault_full(){if(hasRequiredDefault_full)return default_full;hasRequiredDefault_full=1;var ds=requireSchema();return default_full=ds.DEFAULT=new ds({include:[requireDefault_safe()],explicit:[require_undefined(),requireRegexp(),require_function()]}),default_full}var hasRequiredLoader;function requireLoader(){if(hasRequiredLoader)return loader;hasRequiredLoader=1;var ds=requireCommon(),dn=requireException(),ms=requireMark(),xs=requireDefault_safe(),bs=requireDefault_full(),Es=Object.prototype.hasOwnProperty,ws=1,Rs=2,js=3,Cs=4,As=1,ks=2,Os=3,Ms=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ds=/[\x85\u2028\u2029]/,Ps=/[,\[\]\{\}]/,Ls=/^(?:!|!!|![a-z\-]+!)$/i,Bs=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fs(Vs){return Object.prototype.toString.call(Vs)}function Us(Vs){return Vs===10||Vs===13}function Gs(Vs){return Vs===9||Vs===32}function Js(Vs){return Vs===9||Vs===32||Vs===10||Vs===13}function Ws(Vs){return Vs===44||Vs===91||Vs===93||Vs===123||Vs===125}function Zs(Vs){var la;return 48<=Vs&&Vs<=57?Vs-48:(la=Vs|32,97<=la&&la<=102?la-97+10:-1)}function Ys(Vs){return Vs===120?2:Vs===117?4:Vs===85?8:0}function Qs(Vs){return 48<=Vs&&Vs<=57?Vs-48:-1}function ai(Vs){return Vs===48?"\0":Vs===97?"\x07":Vs===98?"\b":Vs===116||Vs===9?"	":Vs===110?`
1303`:Vs===118?"\v":Vs===102?"\f":Vs===114?"\r":Vs===101?"\x1B":Vs===32?" ":Vs===34?'"':Vs===47?"/":Vs===92?"\\":Vs===78?"…":Vs===95?" ":Vs===76?"\u2028":Vs===80?"\u2029":""}function ia(Vs){return Vs<=65535?String.fromCharCode(Vs):String.fromCharCode((Vs-65536>>10)+55296,(Vs-65536&1023)+56320)}function ca(Vs,la,ga){la==="__proto__"?Object.defineProperty(Vs,la,{configurable:!0,enumerable:!0,writable:!0,value:ga}):Vs[la]=ga}for(var ha=new Array(256),ea=new Array(256),ta=0;ta<256;ta++)ha[ta]=ai(ta)?1:0,ea[ta]=ai(ta);function aa(Vs,la){this.input=Vs,this.filename=la.filename||null,this.schema=la.schema||bs,this.onWarning=la.onWarning||null,this.legacy=la.legacy||!1,this.json=la.json||!1,this.listener=la.listener||null,this.maxTotalMergeKeys=typeof la.maxTotalMergeKeys=="number"?la.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Vs.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.totalMergeKeys=0,this.documents=[]}function fa(Vs,la){return new dn(la,new ms(Vs.filename,Vs.input,Vs.position,Vs.line,Vs.position-Vs.lineStart))}function ua(Vs,la){throw fa(Vs,la)}function Ea(Vs,la){Vs.onWarning&&Vs.onWarning.call(null,fa(Vs,la))}var ra={YAML:function(la,ga,Na){var Hs,zs,qs;la.version!==null&&ua(la,"duplication of %YAML directive"),Na.length!==1&&ua(la,"YAML directive accepts exactly one argument"),Hs=/^([0-9]+)\.([0-9]+)$/.exec(Na[0]),Hs===null&&ua(la,"ill-formed argument of the YAML directive"),zs=parseInt(Hs[1],10),qs=parseInt(Hs[2],10),zs!==1&&ua(la,"unacceptable YAML version of the document"),la.version=Na[0],la.checkLineBreaks=qs<2,qs!==1&&qs!==2&&Ea(la,"unsupported YAML version of the document")},TAG:function(la,ga,Na){var Hs,zs;Na.length!==2&&ua(la,"TAG directive accepts exactly two arguments"),Hs=Na[0],zs=Na[1],Ls.test(Hs)||ua(la,"ill-formed tag handle (first argument) of the TAG directive"),Es.call(la.tagMap,Hs)&&ua(la,'there is a previously declared suffix for "'+Hs+'" tag handle'),Bs.test(zs)||ua(la,"ill-formed tag prefix (second argument) of the TAG directive"),la.tagMap[Hs]=zs}};function Ia(Vs,la,ga,Na){var Hs,zs,qs,Xs;if(la<ga){if(Xs=Vs.input.slice(la,ga),Na)for(Hs=0,zs=Xs.length;Hs<zs;Hs+=1)qs=Xs.charCodeAt(Hs),qs===9||32<=qs&&qs<=1114111||ua(Vs,"expected valid JSON character");
vendor: 6,563 bytes, lines 1303-1304
1303else Ms.test(Xs)&&ua(Vs,"the stream contains non-printable characters");Vs.result+=Xs}}function $a(Vs){Vs.totalMergeKeys+=1,Vs.maxTotalMergeKeys!==-1&&Vs.totalMergeKeys>Vs.maxTotalMergeKeys&&ua(Vs,"merge keys exceeded maxTotalMergeKeys ("+Vs.maxTotalMergeKeys+")")}function oa(Vs,la,ga,Na){var Hs,zs,qs,Xs;for(ds.isObject(ga)||ua(Vs,"cannot merge mappings; the provided source object is unacceptable"),$a(Vs),Hs=Object.keys(ga),qs=0,Xs=Hs.length;qs<Xs;qs+=1)zs=Hs[qs],$a(Vs),Es.call(la,zs)||(ca(la,zs,ga[zs]),Na[zs]=!0)}function sa(Vs,la,ga,Na,Hs,zs,qs,Xs){var na,da;if(Array.isArray(Hs))for(Hs=Array.prototype.slice.call(Hs),na=0,da=Hs.length;na<da;na+=1)Array.isArray(Hs[na])&&ua(Vs,"nested arrays are not supported inside keys"),typeof Hs=="object"&&Fs(Hs[na])==="[object Object]"&&(Hs[na]="[object Object]");if(typeof Hs=="object"&&Fs(Hs)==="[object Object]"&&(Hs="[object Object]"),Hs=String(Hs),la===null&&(la={}),Na==="tag:yaml.org,2002:merge")if(Array.isArray(zs))for(zs.length>100&&ua(Vs,"abnormal merge sequence size"),na=0,da=zs.length;na<da;na+=1)oa(Vs,la,zs[na],ga);else oa(Vs,la,zs,ga);else!Vs.json&&!Es.call(ga,Hs)&&Es.call(la,Hs)&&(Vs.line=qs||Vs.line,Vs.position=Xs||Vs.position,ua(Vs,"duplicated mapping key")),ca(la,Hs,zs),delete ga[Hs];return la}function Ra(Vs){var la;la=Vs.input.charCodeAt(Vs.position),la===10?Vs.position++:la===13?(Vs.position++,Vs.input.charCodeAt(Vs.position)===10&&Vs.position++):ua(Vs,"a line break is expected"),Vs.line+=1,Vs.lineStart=Vs.position}function _a(Vs,la,ga){for(var Na=0,Hs=Vs.input.charCodeAt(Vs.position);Hs!==0;){for(;Gs(Hs);)Hs=Vs.input.charCodeAt(++Vs.position);if(la&&Hs===35)do Hs=Vs.input.charCodeAt(++Vs.position);while(Hs!==10&&Hs!==13&&Hs!==0);if(Us(Hs))for(Ra(Vs),Hs=Vs.input.charCodeAt(Vs.position),Na++,Vs.lineIndent=0;Hs===32;)Vs.lineIndent++,Hs=Vs.input.charCodeAt(++Vs.position);else break}return ga!==-1&&Na!==0&&Vs.lineIndent<ga&&Ea(Vs,"deficient indentation"),Na}function Oa(Vs){var la=Vs.position,ga;return ga=Vs.input.charCodeAt(la),!!((ga===45||ga===46)&&ga===Vs.input.charCodeAt(la+1)&&ga===Vs.input.charCodeAt(la+2)&&(la+=3,ga=Vs.input.charCodeAt(la),ga===0||Js(ga)))}function za(Vs,la){la===1?Vs.result+=" ":la>1&&(Vs.result+=ds.repeat(`
1304`,la-1))}function Ga(Vs,la,ga){var Na,Hs,zs,qs,Xs,na,da,xa,ka=Vs.kind,Ha=Vs.result,La;if(La=Vs.input.charCodeAt(Vs.position),Js(La)||Ws(La)||La===35||La===38||La===42||La===33||La===124||La===62||La===39||La===34||La===37||La===64||La===96||(La===63||La===45)&&(Hs=Vs.input.charCodeAt(Vs.position+1),Js(Hs)||ga&&Ws(Hs)))return!1;for(Vs.kind="scalar",Vs.result="",zs=qs=Vs.position,Xs=!1;La!==0;){if(La===58){if(Hs=Vs.input.charCodeAt(Vs.position+1),Js(Hs)||ga&&Ws(Hs))break}else if(La===35){if(Na=Vs.input.charCodeAt(Vs.position-1),Js(Na))break}else{if(Vs.position===Vs.lineStart&&Oa(Vs)||ga&&Ws(La))break;if(Us(La))if(na=Vs.line,da=Vs.lineStart,xa=Vs.lineIndent,_a(Vs,!1,-1),Vs.lineIndent>=la){Xs=!0,La=Vs.input.charCodeAt(Vs.position);continue}else{Vs.position=qs,Vs.line=na,Vs.lineStart=da,Vs.lineIndent=xa;break}}Xs&&(Ia(Vs,zs,qs,!1),za(Vs,Vs.line-na),zs=qs=Vs.position,Xs=!1),Gs(La)||(qs=Vs.position+1),La=Vs.input.charCodeAt(++Vs.position)}return Ia(Vs,zs,qs,!1),Vs.result?!0:(Vs.kind=ka,Vs.result=Ha,!1)}function qa(Vs,la){var ga,Na,Hs;if(ga=Vs.input.charCodeAt(Vs.position),ga!==39)return!1;for(Vs.kind="scalar",Vs.result="",Vs.position++,Na=Hs=Vs.position;(ga=Vs.input.charCodeAt(Vs.position))!==0;)if(ga===39)if(Ia(Vs,Na,Vs.position,!0),ga=Vs.input.charCodeAt(++Vs.position),ga===39)Na=Vs.position,Vs.position++,Hs=Vs.position;else return!0;else Us(ga)?(Ia(Vs,Na,Hs,!0),za(Vs,_a(Vs,!1,la)),Na=Hs=Vs.position):Vs.position===Vs.lineStart&&Oa(Vs)?ua(Vs,"unexpected end of the document within a single quoted scalar"):(Vs.position++,Hs=Vs.position);ua(Vs,"unexpected end of the stream within a single quoted scalar")}function Ma(Vs,la){var ga,Na,Hs,zs,qs,Xs;if(Xs=Vs.input.charCodeAt(Vs.position),Xs!==34)return!1;for(Vs.kind="scalar",Vs.result="",Vs.position++,ga=Na=Vs.position;(Xs=Vs.input.charCodeAt(Vs.position))!==0;){if(Xs===34)return Ia(Vs,ga,Vs.position,!0),Vs.position++,!0;if(Xs===92){if(Ia(Vs,ga,Vs.position,!0),Xs=Vs.input.charCodeAt(++Vs.position),Us(Xs))_a(Vs,!1,la);else if(Xs<256&&ha[Xs])Vs.result+=ea[Xs],Vs.position++;else if((qs=Ys(Xs))>0){for(Hs=qs,zs=0;Hs>0;Hs--)Xs=Vs.input.charCodeAt(++Vs.position),(qs=Zs(Xs))>=0?zs=(zs<<4)+qs:ua(Vs,"expected hexadecimal character");Vs.result+=ia(zs),Vs.position++}else ua(Vs,"unknown escape sequence");ga=Na=Vs.position}else Us(Xs)?(Ia(Vs,ga,Na,!0),za(Vs,_a(Vs,!1,la)),ga=Na=Vs.position):Vs.position===Vs.lineStart&&Oa(Vs)?ua(Vs,"unexpected end of the document within a double quoted scalar"):(Vs.position++,Na=Vs.position)}ua(Vs,"unexpected end of the stream within a double quoted scalar")}function Fa(Vs,la){var ga=!0,Na,Hs=Vs.tag,zs,qs=Vs.anchor,Xs,na,da,xa,ka,Ha={},La,Wa,Ja,Za;if(Za=Vs.input.charCodeAt(Vs.position),Za===91)na=93,ka=!1,zs=[];else if(Za===123)na=125,ka=!0,zs={};else return!1;for(Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=zs),Za=Vs.input.charCodeAt(++Vs.position);Za!==0;){if(_a(Vs,!0,la),Za=Vs.input.charCodeAt(Vs.position),Za===na)return Vs.position++,Vs.tag=Hs,Vs.anchor=qs,Vs.kind=ka?"mapping":"sequence",Vs.result=zs,!0;ga||ua(Vs,"missed comma between flow collection entries"),Wa=La=Ja=null,da=xa=!1,Za===63&&(Xs=Vs.input.charCodeAt(Vs.position+1),Js(Xs)&&(da=xa=!0,Vs.position++,_a(Vs,!0,la))),Na=Vs.line,uo(Vs,la,ws,!1,!0),Wa=Vs.tag,La=Vs.result,_a(Vs,!0,la),Za=Vs.input.charCodeAt(Vs.position),(xa||Vs.line===Na)&&Za===58&&(da=!0,Za=Vs.input.charCodeAt(++Vs.position),_a(Vs,!0,la),uo(Vs,la,ws,!1,!0),Ja=Vs.result),ka?sa(Vs,zs,Ha,Wa,La,Ja):da?zs.push(sa(Vs,null,Ha,Wa,La,Ja)):zs.push(La),_a(Vs,!0,la),Za=Vs.input.charCodeAt(Vs.position),Za===44?(ga=!0,Za=Vs.input.charCodeAt(++Vs.position)):ga=!1}ua(Vs,"unexpected end of the stream within a flow collection")}function Ka(Vs,la){var ga,Na,Hs=As,zs=!1,qs=!1,Xs=la,na=0,da=!1,xa,ka;if(ka=Vs.input.charCodeAt(Vs.position),ka===124)Na=!1;else if(ka===62)Na=!0;else return!1;for(Vs.kind="scalar",Vs.result="";ka!==0;)if(ka=Vs.input.charCodeAt(++Vs.position),ka===43||ka===45)As===Hs?Hs=ka===43?Os:ks:ua(Vs,"repeat of a chomping mode identifier");else if((xa=Qs(ka))>=0)xa===0?ua(Vs,"bad explicit indentation width of a block scalar; it cannot be less than one"):qs?ua(Vs,"repeat of an indentation width identifier"):(Xs=la+xa-1,qs=!0);else break;if(Gs(ka)){do ka=Vs.input.charCodeAt(++Vs.position);while(Gs(ka));if(ka===35)do ka=Vs.input.charCodeAt(++Vs.position);while(!Us(ka)&&ka!==0)}for(;ka!==0;
vendor: 18,622 bytes, lines 1304-1326
1304){for(Ra(Vs),Vs.lineIndent=0,ka=Vs.input.charCodeAt(Vs.position);(!qs||Vs.lineIndent<Xs)&&ka===32;)Vs.lineIndent++,ka=Vs.input.charCodeAt(++Vs.position);if(!qs&&Vs.lineIndent>Xs&&(Xs=Vs.lineIndent),Us(ka)){na++;continue}if(Vs.lineIndent<Xs){Hs===Os?Vs.result+=ds.repeat(`
1305`,zs?1+na:na):Hs===As&&zs&&(Vs.result+=`
1306`);break}for(Na?Gs(ka)?(da=!0,Vs.result+=ds.repeat(`
1307`,zs?1+na:na)):da?(da=!1,Vs.result+=ds.repeat(`
1308`,na+1)):na===0?zs&&(Vs.result+=" "):Vs.result+=ds.repeat(`
1309`,na):Vs.result+=ds.repeat(`
1310`,zs?1+na:na),zs=!0,qs=!0,na=0,ga=Vs.position;!Us(ka)&&ka!==0;)ka=Vs.input.charCodeAt(++Vs.position);Ia(Vs,ga,Vs.position,!1)}return!0}function mo(Vs,la){var ga,Na=Vs.tag,Hs=Vs.anchor,zs=[],qs,Xs=!1,na;for(Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=zs),na=Vs.input.charCodeAt(Vs.position);na!==0&&!(na!==45||(qs=Vs.input.charCodeAt(Vs.position+1),!Js(qs)));){if(Xs=!0,Vs.position++,_a(Vs,!0,-1)&&Vs.lineIndent<=la){zs.push(null),na=Vs.input.charCodeAt(Vs.position);continue}if(ga=Vs.line,uo(Vs,la,js,!1,!0),zs.push(Vs.result),_a(Vs,!0,-1),na=Vs.input.charCodeAt(Vs.position),(Vs.line===ga||Vs.lineIndent>la)&&na!==0)ua(Vs,"bad indentation of a sequence entry");else if(Vs.lineIndent<la)break}return Xs?(Vs.tag=Na,Vs.anchor=Hs,Vs.kind="sequence",Vs.result=zs,!0):!1}function ko(Vs,la,ga){var Na,Hs,zs,qs,Xs=Vs.tag,na=Vs.anchor,da={},xa={},ka=null,Ha=null,La=null,Wa=!1,Ja=!1,Za;for(Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=da),Za=Vs.input.charCodeAt(Vs.position);Za!==0;){if(Na=Vs.input.charCodeAt(Vs.position+1),zs=Vs.line,qs=Vs.position,(Za===63||Za===58)&&Js(Na))Za===63?(Wa&&(sa(Vs,da,xa,ka,Ha,null),ka=Ha=La=null),Ja=!0,Wa=!0,Hs=!0):Wa?(Wa=!1,Hs=!0):ua(Vs,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),Vs.position+=1,Za=Na;else if(uo(Vs,ga,Rs,!1,!0))if(Vs.line===zs){for(Za=Vs.input.charCodeAt(Vs.position);Gs(Za);)Za=Vs.input.charCodeAt(++Vs.position);if(Za===58)Za=Vs.input.charCodeAt(++Vs.position),Js(Za)||ua(Vs,"a whitespace character is expected after the key-value separator within a block mapping"),Wa&&(sa(Vs,da,xa,ka,Ha,null),ka=Ha=La=null),Ja=!0,Wa=!1,Hs=!1,ka=Vs.tag,Ha=Vs.result;else if(Ja)ua(Vs,"can not read an implicit mapping pair; a colon is missed");else return Vs.tag=Xs,Vs.anchor=na,!0}else if(Ja)ua(Vs,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Vs.tag=Xs,Vs.anchor=na,!0;else break;if((Vs.line===zs||Vs.lineIndent>la)&&(uo(Vs,la,Cs,!0,Hs)&&(Wa?Ha=Vs.result:La=Vs.result),Wa||(sa(Vs,da,xa,ka,Ha,La,zs,qs),ka=Ha=La=null),_a(Vs,!0,-1),Za=Vs.input.charCodeAt(Vs.position)),Vs.lineIndent>la&&Za!==0)ua(Vs,"bad indentation of a mapping entry");else if(Vs.lineIndent<la)break}return Wa&&sa(Vs,da,xa,ka,Ha,null),Ja&&(Vs.tag=Xs,Vs.anchor=na,Vs.kind="mapping",Vs.result=da),Ja}function bo(Vs){var la,ga=!1,Na=!1,Hs,zs,qs;if(qs=Vs.input.charCodeAt(Vs.position),qs!==33)return!1;if(Vs.tag!==null&&ua(Vs,"duplication of a tag property"),qs=Vs.input.charCodeAt(++Vs.position),qs===60?(ga=!0,qs=Vs.input.charCodeAt(++Vs.position)):qs===33?(Na=!0,Hs="!!",qs=Vs.input.charCodeAt(++Vs.position)):Hs="!",la=Vs.position,ga){do qs=Vs.input.charCodeAt(++Vs.position);while(qs!==0&&qs!==62);Vs.position<Vs.length?(zs=Vs.input.slice(la,Vs.position),qs=Vs.input.charCodeAt(++Vs.position)):ua(Vs,"unexpected end of the stream within a verbatim tag")}else{for(;qs!==0&&!Js(qs);)qs===33&&(Na?ua(Vs,"tag suffix cannot contain exclamation marks"):(Hs=Vs.input.slice(la-1,Vs.position+1),Ls.test(Hs)||ua(Vs,"named tag handle cannot contain such characters"),Na=!0,la=Vs.position+1)),qs=Vs.input.charCodeAt(++Vs.position);zs=Vs.input.slice(la,Vs.position),Ps.test(zs)&&ua(Vs,"tag suffix cannot contain flow indicator characters")}return zs&&!Bs.test(zs)&&ua(Vs,"tag name cannot contain such characters: "+zs),ga?Vs.tag=zs:Es.call(Vs.tagMap,Hs)?Vs.tag=Vs.tagMap[Hs]+zs:Hs==="!"?Vs.tag="!"+zs:Hs==="!!"?Vs.tag="tag:yaml.org,2002:"+zs:ua(Vs,'undeclared tag handle "'+Hs+'"'),!0}function oo(Vs){var la,ga;if(ga=Vs.input.charCodeAt(Vs.position),ga!==38)return!1;for(Vs.anchor!==null&&ua(Vs,"duplication of an anchor property"),ga=Vs.input.charCodeAt(++Vs.position),la=Vs.position;ga!==0&&!Js(ga)&&!Ws(ga);)ga=Vs.input.charCodeAt(++Vs.position);return Vs.position===la&&ua(Vs,"name of an anchor node must contain at least one character"),Vs.anchor=Vs.input.slice(la,Vs.position),!0}function Va(Vs){var la,ga,Na;if(Na=Vs.input.charCodeAt(Vs.position),Na!==42)return!1;for(Na=Vs.input.charCodeAt(++Vs.position),la=Vs.position;Na!==0&&!Js(Na)&&!Ws(Na);)Na=Vs.input.charCodeAt(++Vs.position);return Vs.position===la&&ua(Vs,"name of an alias node must contain at least one character"),ga=Vs.input.slice(la,Vs.position),Es.call(Vs.anchorMap,ga)||ua(Vs,'unidentified alias "'+ga+'"'),Vs.result=Vs.anchorMap[ga],_a(Vs,!0,-1),!0}function uo(Vs,la,ga,Na,Hs){var zs,qs,Xs,na=1,da=!1,xa=!1,ka,Ha,La,Wa,Ja;if(Vs.listener!==null&&Vs.listener("open",Vs),Vs.tag=null,Vs.anchor=null,Vs.kind=null,Vs.result=null,zs=qs=Xs=Cs===ga||js===ga,Na&&_a(Vs,!0,-1)&&(da=!0,Vs.lineIndent>la?na=1:Vs.lineIndent===la?na=0:Vs.lineIndent<la&&(na=-1)),na===1)for(;bo(Vs)||oo(Vs);)_a(Vs,!0,-1)?(da=!0,Xs=zs,Vs.lineIndent>la?na=1:Vs.lineIndent===la?na=0:Vs.lineIndent<la&&(na=-1)):Xs=!1;if(Xs&&(Xs=da||Hs),(na===1||Cs===ga)&&(ws===ga||Rs===ga?Wa=la:Wa=la+1,Ja=Vs.position-Vs.lineStart,na===1?Xs&&(mo(Vs,Ja)||ko(Vs,Ja,Wa))||Fa(Vs,Wa)?xa=!0:(qs&&Ka(Vs,Wa)||qa(Vs,Wa)||Ma(Vs,Wa)?xa=!0:Va(Vs)?(xa=!0,(Vs.tag!==null||Vs.anchor!==null)&&ua(Vs,"alias node should not have any properties")):Ga(Vs,Wa,ws===ga)&&(xa=!0,Vs.tag===null&&(Vs.tag="?")),Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=Vs.result)):na===0&&(xa=Xs&&mo(Vs,Ja))),Vs.tag!==null&&Vs.tag!=="!")if(Vs.tag==="?"){for(Vs.result!==null&&Vs.kind!=="scalar"&&ua(Vs,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+Vs.kind+'"'),ka=0,Ha=Vs.implicitTypes.length;ka<Ha;ka+=1)if(La=Vs.implicitTypes[ka],La.resolve(Vs.result)){Vs.result=La.construct(Vs.result),Vs.tag=La.tag,Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=Vs.result);break}}else Es.call(Vs.typeMap[Vs.kind||"fallback"],Vs.tag)?(La=Vs.typeMap[Vs.kind||"fallback"][Vs.tag],Vs.result!==null&&La.kind!==Vs.kind&&ua(Vs,"unacceptable node kind for !<"+Vs.tag+'> tag; it should be "'+La.kind+'", not "'+Vs.kind+'"'),La.resolve(Vs.result)?(Vs.result=La.construct(Vs.result),Vs.anchor!==null&&(Vs.anchorMap[Vs.anchor]=Vs.result)):ua(Vs,"cannot resolve a node with !<"+Vs.tag+"> explicit tag")):ua(Vs,"unknown tag !<"+Vs.tag+">");return Vs.listener!==null&&Vs.listener("close",Vs),Vs.tag!==null||Vs.anchor!==null||xa}function Eo(Vs){var la=Vs.position,ga,Na,Hs,zs=!1,qs;for(Vs.version=null,Vs.checkLineBreaks=Vs.legacy,Vs.tagMap={},Vs.anchorMap={};(qs=Vs.input.charCodeAt(Vs.position))!==0&&(_a(Vs,!0,-1),qs=Vs.input.charCodeAt(Vs.position),!(Vs.lineIndent>0||qs!==37));){for(zs=!0,qs=Vs.input.charCodeAt(++Vs.position),ga=Vs.position;qs!==0&&!Js(qs);)qs=Vs.input.charCodeAt(++Vs.position);for(Na=Vs.input.slice(ga,Vs.position),Hs=[],Na.length<1&&ua(Vs,"directive name must not be less than one character in length");qs!==0;){for(;Gs(qs);)qs=Vs.input.charCodeAt(++Vs.position);if(qs===35){do qs=Vs.input.charCodeAt(++Vs.position);while(qs!==0&&!Us(qs));break}if(Us(qs))break;for(ga=Vs.position;qs!==0&&!Js(qs);)qs=Vs.input.charCodeAt(++Vs.position);Hs.push(Vs.input.slice(ga,Vs.position))}qs!==0&&Ra(Vs),Es.call(ra,Na)?ra[Na](Vs,Na,Hs):Ea(Vs,'unknown document directive "'+Na+'"')}if(_a(Vs,!0,-1),Vs.lineIndent===0&&Vs.input.charCodeAt(Vs.position)===45&&Vs.input.charCodeAt(Vs.position+1)===45&&Vs.input.charCodeAt(Vs.position+2)===45?(Vs.position+=3,_a(Vs,!0,-1)):zs&&ua(Vs,"directives end mark is expected"),uo(Vs,Vs.lineIndent-1,Cs,!1,!0),_a(Vs,!0,-1),Vs.checkLineBreaks&&Ds.test(Vs.input.slice(la,Vs.position))&&Ea(Vs,"non-ASCII line breaks are interpreted as content"),Vs.documents.push(Vs.result),Vs.position===Vs.lineStart&&Oa(Vs)){Vs.input.charCodeAt(Vs.position)===46&&(Vs.position+=3,_a(Vs,!0,-1));return}if(Vs.position<Vs.length-1)ua(Vs,"end of the stream or a document separator is expected");else return}function Ao(Vs,la){Vs=String(Vs),la=la||{},Vs.length!==0&&(Vs.charCodeAt(Vs.length-1)!==10&&Vs.charCodeAt(Vs.length-1)!==13&&(Vs+=`
1311`),Vs.charCodeAt(0)===65279&&(Vs=Vs.slice(1)));var ga=new aa(Vs,la),Na=Vs.indexOf("\0");for(Na!==-1&&(ga.position=Na,ua(ga,"null byte is not allowed in input")),ga.input+="\0";ga.input.charCodeAt(ga.position)===32;)ga.lineIndent+=1,ga.position+=1;for(;ga.position<ga.length-1;)Eo(ga);return ga.documents}function Zo(Vs,la,ga){la!==null&&typeof la=="object"&&typeof ga>"u"&&(ga=la,la=null);var Na=Ao(Vs,ga);if(typeof la!="function")return Na;for(var Hs=0,zs=Na.length;Hs<zs;Hs+=1)la(Na[Hs])}function sl(Vs,la){var ga=Ao(Vs,la);if(ga.length!==0){if(ga.length===1)return ga[0];throw new dn("expected a single document in the stream, but found more")}}function Po(Vs,la,ga){return typeof la=="object"&&la!==null&&typeof ga>"u"&&(ga=la,la=null),Zo(Vs,la,ds.extend({schema:xs},ga))}function Ro(Vs,la){return sl(Vs,ds.extend({schema:xs},la))}return loader.loadAll=Zo,loader.load=sl,loader.safeLoadAll=Po,loader.safeLoad=Ro,loader}var dumper={},hasRequiredDumper;function requireDumper(){if(hasRequiredDumper)return dumper;hasRequiredDumper=1;var ds=requireCommon(),dn=requireException(),ms=requireDefault_full(),xs=requireDefault_safe(),bs=Object.prototype.toString,Es=Object.prototype.hasOwnProperty,ws=9,Rs=10,js=13,Cs=32,As=33,ks=34,Os=35,Ms=37,Ds=38,Ps=39,Ls=42,Bs=44,Fs=45,Us=58,Gs=61,Js=62,Ws=63,Zs=64,Ys=91,Qs=93,ai=96,ia=123,ca=124,ha=125,ea={};ea[0]="\\0",ea[7]="\\a",ea[8]="\\b",ea[9]="\\t",ea[10]="\\n",ea[11]="\\v",ea[12]="\\f",ea[13]="\\r",ea[27]="\\e",ea[34]='\\"',ea[92]="\\\\",ea[133]="\\N",ea[160]="\\_",ea[8232]="\\L",ea[8233]="\\P";var ta=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function aa(Hs,zs){var qs,Xs,na,da,xa,ka,Ha;if(zs===null)return{};for(qs={},Xs=Object.keys(zs),na=0,da=Xs.length;na<da;na+=1)xa=Xs[na],ka=String(zs[xa]),xa.slice(0,2)==="!!"&&(xa="tag:yaml.org,2002:"+xa.slice(2)),Ha=Hs.compiledTypeMap.fallback[xa],Ha&&Es.call(Ha.styleAliases,ka)&&(ka=Ha.styleAliases[ka]),qs[xa]=ka;return qs}function fa(Hs){var zs,qs,Xs;if(zs=Hs.toString(16).toUpperCase(),Hs<=255)qs="x",Xs=2;else if(Hs<=65535)qs="u",Xs=4;else if(Hs<=4294967295)qs="U",Xs=8;else throw new dn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+qs+ds.repeat("0",Xs-zs.length)+zs}function ua(Hs){this.schema=Hs.schema||ms,this.indent=Math.max(1,Hs.indent||2),this.noArrayIndent=Hs.noArrayIndent||!1,this.skipInvalid=Hs.skipInvalid||!1,this.flowLevel=ds.isNothing(Hs.flowLevel)?-1:Hs.flowLevel,this.styleMap=aa(this.schema,Hs.styles||null),this.sortKeys=Hs.sortKeys||!1,this.lineWidth=Hs.lineWidth||80,this.noRefs=Hs.noRefs||!1,this.noCompatMode=Hs.noCompatMode||!1,this.condenseFlow=Hs.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ea(Hs,zs){for(var qs=ds.repeat(" ",zs),Xs=0,na=-1,da="",xa,ka=Hs.length;Xs<ka;)na=Hs.indexOf(`
1312`,Xs),na===-1?(xa=Hs.slice(Xs),Xs=ka):(xa=Hs.slice(Xs,na+1),Xs=na+1),xa.length&&xa!==`
1313`&&(da+=qs),da+=xa;return da}function ra(Hs,zs){return`
1314`+ds.repeat(" ",Hs.indent*zs)}function Ia(Hs,zs){var qs,Xs,na;for(qs=0,Xs=Hs.implicitTypes.length;qs<Xs;qs+=1)if(na=Hs.implicitTypes[qs],na.resolve(zs))return!0;return!1}function $a(Hs){return Hs===Cs||Hs===ws}function oa(Hs){return 32<=Hs&&Hs<=126||161<=Hs&&Hs<=55295&&Hs!==8232&&Hs!==8233||57344<=Hs&&Hs<=65533&&Hs!==65279||65536<=Hs&&Hs<=1114111}function sa(Hs){return oa(Hs)&&!$a(Hs)&&Hs!==65279&&Hs!==js&&Hs!==Rs}function Ra(Hs,zs){return oa(Hs)&&Hs!==65279&&Hs!==Bs&&Hs!==Ys&&Hs!==Qs&&Hs!==ia&&Hs!==ha&&Hs!==Us&&(Hs!==Os||zs&&sa(zs))}function _a(Hs){return oa(Hs)&&Hs!==65279&&!$a(Hs)&&Hs!==Fs&&Hs!==Ws&&Hs!==Us&&Hs!==Bs&&Hs!==Ys&&Hs!==Qs&&Hs!==ia&&Hs!==ha&&Hs!==Os&&Hs!==Ds&&Hs!==Ls&&Hs!==As&&Hs!==ca&&Hs!==Gs&&Hs!==Js&&Hs!==Ps&&Hs!==ks&&Hs!==Ms&&Hs!==Zs&&Hs!==ai}function Oa(Hs){var zs=/^\n* /;return zs.test(Hs)}var za=1,Ga=2,qa=3,Ma=4,Fa=5;function Ka(Hs,zs,qs,Xs,na){var da,xa,ka,Ha=!1,La=!1,Wa=Xs!==-1,Ja=-1,Za=_a(Hs.charCodeAt(0))&&!$a(Hs.charCodeAt(Hs.length-1));if(zs)for(da=0;da<Hs.length;da++){if(xa=Hs.charCodeAt(da),!oa(xa))return Fa;ka=da>0?Hs.charCodeAt(da-1):null,Za=Za&&Ra(xa,ka)}else{for(da=0;da<Hs.length;da++){if(xa=Hs.charCodeAt(da),xa===Rs)Ha=!0,Wa&&(La=La||da-Ja-1>Xs&&Hs[Ja+1]!==" ",Ja=da);else if(!oa(xa))return Fa;ka=da>0?Hs.charCodeAt(da-1):null,Za=Za&&Ra(xa,ka)}La=La||Wa&&da-Ja-1>Xs&&Hs[Ja+1]!==" "}return!Ha&&!La?Za&&!na(Hs)?za:Ga:qs>9&&Oa(Hs)?Fa:La?Ma:qa}function mo(Hs,zs,qs,Xs){Hs.dump=(function(){if(zs.length===0)return"''";if(!Hs.noCompatMode&&ta.indexOf(zs)!==-1)return"'"+zs+"'";var na=Hs.indent*Math.max(1,qs),da=Hs.lineWidth===-1?-1:Math.max(Math.min(Hs.lineWidth,40),Hs.lineWidth-na),xa=Xs||Hs.flowLevel>-1&&qs>=Hs.flowLevel;function ka(Ha){return Ia(Hs,Ha)}switch(Ka(zs,xa,Hs.indent,da,ka)){case za:return zs;case Ga:return"'"+zs.replace(/'/g,"''")+"'";case qa:return"|"+ko(zs,Hs.indent)+bo(Ea(zs,na));case Ma:return">"+ko(zs,Hs.indent)+bo(Ea(oo(zs,da),na));case Fa:return'"'+uo(zs)+'"';default:throw new dn("impossible error: invalid scalar style")}})()}function ko(Hs,zs){var qs=Oa(Hs)?String(zs):"",Xs=Hs[Hs.length-1]===`
1315`,na=Xs&&(Hs[Hs.length-2]===`
1316`||Hs===`
1317`),da=na?"+":Xs?"":"-";return qs+da+`
1318`}function bo(Hs){return Hs[Hs.length-1]===`
1319`?Hs.slice(0,-1):Hs}function oo(Hs,zs){for(var qs=/(\n+)([^\n]*)/g,Xs=(function(){var La=Hs.indexOf(`
1320`);return La=La!==-1?La:Hs.length,qs.lastIndex=La,Va(Hs.slice(0,La),zs)})(),na=Hs[0]===`
1321`||Hs[0]===" ",da,xa;xa=qs.exec(Hs);){var ka=xa[1],Ha=xa[2];da=Ha[0]===" ",Xs+=ka+(!na&&!da&&Ha!==""?`
1322`:"")+Va(Ha,zs),na=da}return Xs}function Va(Hs,zs){if(Hs===""||Hs[0]===" ")return Hs;for(var qs=/ [^ ]/g,Xs,na=0,da,xa=0,ka=0,Ha="";Xs=qs.exec(Hs);)ka=Xs.index,ka-na>zs&&(da=xa>na?xa:ka,Ha+=`
1323`+Hs.slice(na,da),na=da+1),xa=ka;return Ha+=`
1324`,Hs.length-na>zs&&xa>na?Ha+=Hs.slice(na,xa)+`
1325`+Hs.slice(xa+1):Ha+=Hs.slice(na),Ha.slice(1)}function uo(Hs){for(var zs="",qs,Xs,na,da=0;da<Hs.length;da++){if(qs=Hs.charCodeAt(da),qs>=55296&&qs<=56319&&(Xs=Hs.charCodeAt(da+1),Xs>=56320&&Xs<=57343)){zs+=fa((qs-55296)*1024+Xs-56320+65536),da++;continue}na=ea[qs],zs+=!na&&oa(qs)?Hs[da]:na||fa(qs)}return zs}function Eo(Hs,zs,qs){var Xs="",na=Hs.tag,da,xa;for(da=0,xa=qs.length;da<xa;da+=1)Ro(Hs,zs,qs[da],!1,!1)&&(da!==0&&(Xs+=","+(Hs.condenseFlow?"":" ")),Xs+=Hs.dump);Hs.tag=na,Hs.dump="["+Xs+"]"}function Ao(Hs,zs,qs,Xs){var na="",da=Hs.tag,xa,ka;for(xa=0,ka=qs.length;xa<ka;xa+=1)Ro(Hs,zs+1,qs[xa],!0,!0)&&((!Xs||xa!==0)&&(na+=ra(Hs,zs)),Hs.dump&&Rs===Hs.dump.charCodeAt(0)?na+="-":na+="- ",na+=Hs.dump);Hs.tag=da,Hs.dump=na||"[]"}function Zo(Hs,zs,qs){var Xs="",na=Hs.tag,da=Object.keys(qs),xa,ka,Ha,La,Wa;for(xa=0,ka=da.length;xa<ka;xa+=1)Wa="",xa!==0&&(Wa+=", "),Hs.condenseFlow&&(Wa+='"'),Ha=da[xa],La=qs[Ha],Ro(Hs,zs,Ha,!1,!1)&&(Hs.dump.length>1024&&(Wa+="? "),Wa+=Hs.dump+(Hs.condenseFlow?'"':"")+":"+(Hs.condenseFlow?"":" "),Ro(Hs,zs,La,!1,!1)&&(Wa+=Hs.dump,Xs+=Wa));Hs.tag=na,Hs.dump="{"+Xs+"}"}function sl(Hs,zs,qs,Xs){var na="",da=Hs.tag,xa=Object.keys(qs),ka,Ha,La,Wa,Ja,Za;if(Hs.sortKeys===!0)xa.sort();else if(typeof Hs.sortKeys=="function")xa.sort(Hs.sortKeys);else if(Hs.sortKeys)throw new dn("sortKeys must be a boolean or a function");for(ka=0,Ha=xa.length;ka<Ha;ka+=1)Za="",(!Xs||ka!==0)&&(Za+=ra(Hs,zs)),La=xa[ka],Wa=qs[La],Ro(Hs,zs+1,La,!0,!0,!0)&&(Ja=Hs.tag!==null&&Hs.tag!=="?"||Hs.dump&&Hs.dump.length>1024,Ja&&(Hs.dump&&Rs===Hs.dump.charCodeAt(0)?Za+="?":Za+="? "),Za+=Hs.dump,Ja&&(Za+=ra(Hs,zs)),Ro(Hs,zs+1,Wa,!0,Ja)&&(Hs.dump&&Rs===Hs.dump.charCodeAt(0)?Za+=":":Za+=": ",Za+=Hs.dump,na+=Za));Hs.tag=da,Hs.dump=na||"{}"}function Po(Hs,zs,qs){var Xs,na,da,xa,ka,Ha;for(na=qs?Hs.explicitTypes:Hs.implicitTypes,da=0,xa=na.length;da<xa;da+=1)if(ka=na[da],(ka.instanceOf||ka.predicate)&&(!ka.instanceOf||typeof zs=="object"&&zs instanceof ka.instanceOf)&&(!ka.predicate||ka.predicate(zs))){if(Hs.tag=qs?ka.tag:"?",ka.represent){if(Ha=Hs.styleMap[ka.tag]||ka.defaultStyle,bs.call(ka.represent)==="[object Function]")Xs=ka.represent(zs,Ha);else if(Es.call(ka.represent,Ha))Xs=ka.represent[Ha](zs,Ha);else throw new dn("!<"+ka.tag+'> tag resolver accepts not "'+Ha+'" style');Hs.dump=Xs}return!0}return!1}function Ro(Hs,zs,qs,Xs,na,da){Hs.tag=null,Hs.dump=qs,Po(Hs,qs,!1)||Po(Hs,qs,!0);var xa=bs.call(Hs.dump);Xs&&(Xs=Hs.flowLevel<0||Hs.flowLevel>zs);var ka=xa==="[object Object]"||xa==="[object Array]",Ha,La;if(ka&&(Ha=Hs.duplicates.indexOf(qs),La=Ha!==-1),(Hs.tag!==null&&Hs.tag!=="?"||La||Hs.indent!==2&&zs>0)&&(na=!1),La&&Hs.usedDuplicates[Ha])Hs.dump="*ref_"+Ha;else{if(ka&&La&&!Hs.usedDuplicates[Ha]&&(Hs.usedDuplicates[Ha]=!0),xa==="[object Object]")Xs&&Object.keys(Hs.dump).length!==0?(sl(Hs,zs,Hs.dump,na),La&&(Hs.dump="&ref_"+Ha+Hs.dump)):(Zo(Hs,zs,Hs.dump),La&&(Hs.dump="&ref_"+Ha+" "+Hs.dump));else if(xa==="[object Array]"){var Wa=Hs.noArrayIndent&&zs>0?zs-1:zs;Xs&&Hs.dump.length!==0?(Ao(Hs,Wa,Hs.dump,na),La&&(Hs.dump="&ref_"+Ha+Hs.dump)):(Eo(Hs,Wa,Hs.dump),La&&(Hs.dump="&ref_"+Ha+" "+Hs.dump))}else if(xa==="[object String]")Hs.tag!=="?"&&mo(Hs,Hs.dump,zs,da);else{if(Hs.skipInvalid)return!1;throw new dn("unacceptable kind of an object to dump "+xa)}Hs.tag!==null&&Hs.tag!=="?"&&(Hs.dump="!<"+Hs.tag+"> "+Hs.dump)}return!0}function Vs(Hs,zs){var qs=[],Xs=[],na,da;for(la(Hs,qs,Xs),na=0,da=Xs.length;na<da;na+=1)zs.duplicates.push(qs[Xs[na]]);zs.usedDuplicates=new Array(da)}function la(Hs,zs,qs){var Xs,na,da;if(Hs!==null&&typeof Hs=="object")if(na=zs.indexOf(Hs),na!==-1)qs.indexOf(na)===-1&&qs.push(na);else if(zs.push(Hs),Array.isArray(Hs))for(na=0,da=Hs.length;na<da;na+=1)la(Hs[na],zs,qs);else for(Xs=Object.keys(Hs),na=0,da=Xs.length;na<da;na+=1)la(Hs[Xs[na]],zs,qs)}function ga(Hs,zs){zs=zs||{};var qs=new ua(zs);return qs.noRefs||Vs(Hs,qs),Ro(qs,0,Hs,!0,!0)?qs.dump+`
1326`:""}function Na(Hs,zs){return ga(Hs,ds.extend({schema:xs},zs))}return dumper.dump=ga,dumper.safeDump=Na,dumper}var hasRequiredJsYaml$1;function requireJsYaml$1(){if(hasRequiredJsYaml$1)return jsYaml$1;hasRequiredJsYaml$1=1;var ds=requireLoader(),dn=requireDumper();function ms(xs){return function(){throw new Error("Function "+xs+" is deprecated and cannot be used.")}}return jsYaml$1.Type=requireType(),jsYaml$1.Schema=requireSchema(),jsYaml$1.FAILSAFE_SCHEMA=requireFailsafe(),jsYaml$1.JSON_SCHEMA=requireJson(),jsYaml$1.CORE_SCHEMA=requireCore(),jsYaml$1.DEFAULT_SAFE_SCHEMA=requireDefault_safe(),jsYaml$1.DEFAULT_FULL_SC
1326HEMA=requireDefault_full(),jsYaml$1.load=ds.load,jsYaml$1.loadAll=ds.loadAll,jsYaml$1.safeLoad=ds.safeLoad,jsYaml$1.safeLoadAll=ds.safeLoadAll,jsYaml$1.dump=dn.dump,jsYaml$1.safeDump=dn.safeDump,jsYaml$1.YAMLException=requireException(),jsYaml$1.MINIMAL_SCHEMA=requireFailsafe(),jsYaml$1.SAFE_SCHEMA=requireDefault_safe(),jsYaml$1.DEFAULT_SCHEMA=requireDefault_full(),jsYaml$1.scan=ms("scan"),jsYaml$1.parse=ms("parse"),jsYaml$1.compose=ms("compose"),jsYaml$1.addConstructor=ms("addConstructor"),jsYaml$1}var jsYaml,hasRequiredJsYaml;function requireJsYaml(){if(hasRequiredJsYaml)return jsYaml;hasRequiredJsYaml=1;var ds=requireJsYaml$1();return jsYaml=ds,jsYaml}var hasRequiredEngines;function requireEngines(){return hasRequiredEngines||(hasRequiredEngines=1,(function(module,exports){const yaml=requireJsYaml(),engines=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)},engines.json={parse:JSON.parse.bind(JSON),stringify:function(ds,dn){const ms=Object.assign({replacer:null,space:2},dn);return JSON.stringify(ds,ms.replacer,ms.space)}},engines.javascript={parse:function parse(str,options,wrap){try{return wrap!==!1&&(str=`(function() {
1327return `+str.trim()+`;
1328}());`),eval(str)||{}}catch(ds){if(wrap!==!1&&/(unexpected|identifier)/i.test(ds.message))return parse(str,options,!1);throw new SyntaxError(ds)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}})(engines)),engines.exports}var utils={};var stripBomString,hasRequiredStripBomString;function requireStripBomString(){return hasRequiredStripBomString||(hasRequiredStripBomString=1,stripBomString=function(ds){return typeof ds=="string"&&ds.charAt(0)==="\uFEFF"?ds.slice(1):ds}),stripBomString}var hasRequiredUtils;function requireUtils(){return hasRequiredUtils||(hasRequiredUtils=1,(function(ds){const dn=requireStripBomString(),ms=requireKindOf();ds.define=function(xs,bs,Es){Reflect.defineProperty(xs,bs,{enumerable:!1,configurable:!0,writable:!0,value:Es})},ds.isBuffer=function(xs){return ms(xs)==="buffer"},ds.isObject=function(xs){return ms(xs)==="object"},ds.toBuffer=function(xs){return typeof xs=="string"?Buffer.from(xs):xs},ds.toString=function(xs){if(ds.isBuffer(xs))return dn(String(xs));if(typeof xs!="string")throw new TypeError("expected input to be a string or buffer");return dn(xs)},ds.arrayify=function(xs){return xs?Array.isArray(xs)?xs:[xs]:[]},ds.startsWith=function(xs,bs,Es){return typeof Es!="number"&&(Es=bs.length),xs.slice(0,Es)===bs}})(utils)),utils}var defaults,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1;const ds=requireEngines(),dn=requireUtils();return defaults=function(ms){const xs=Object.assign({},ms);return xs.delimiters=dn.arrayify(xs.delims||xs.delimiters||"---"),xs.delimiters.length===1&&xs.delimiters.push(xs.delimiters[0]),xs.language=(xs.language||xs.lang||"yaml").toLowerCase(),xs.engines=Object.assign({},ds,xs.parsers,xs.engines),xs},defaults}var engine,hasRequiredEngine;function requireEngine(){if(hasRequiredEngine)return engine;hasRequiredEngine=1,engine=function(dn,ms){let xs=ms.engines[dn]||ms.engines[ds(dn)];if(typeof xs>"u")throw new Error('gray-matter engine "'+dn+'" is not registered');return typeof xs=="function"&&(xs={parse:xs}),xs};function ds(dn){switch(dn.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return dn}}return engine}var stringify$2,hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify$2;hasRequiredStringify=1;const ds=requireKindOf(),dn=requireEngine(),ms=requireDefaults();stringify$2=function(bs,Es,ws){if(Es==null&&ws==null)switch(ds(bs)){case"object":Es=bs.data,ws={};break;case"string":return bs;default:throw new TypeError("expected file to be a string or object")}const Rs=bs.content,js=ms(ws);if(Es==null){if(!js.data)return bs;Es=js.data}const Cs=bs.language||js.language,As=dn(Cs,js);if(typeof As.stringify!="function")throw new TypeError('expected "'+Cs+'.stringify" to be a function');Es=Object.assign({},bs.data,Es);const ks=js.delimiters[0],Os=js.delimiters[1],Ms=As.stringify(Es,ws).trim();let Ds="";return Ms!=="{}"&&(Ds=xs(ks)+xs(Ms)+xs(Os)),typeof bs.excerpt=="string"&&bs.excerpt!==""&&Rs.indexOf(bs.excerpt.trim())===-1&&(Ds+=xs(bs.excerpt)+xs(Os)),Ds+xs(Rs)};function xs(bs){return bs.slice(-1)!==`
1329`?bs+`
1330`:bs}return stringify$2}var excerpt,hasRequiredExcerpt;function requireExcerpt(){if(hasRequiredExcerpt)return excerpt;hasRequiredExcerpt=1;const ds=requireDefaults();return excerpt=function(dn,ms){const xs=ds(ms);if(dn.data==null&&(dn.data={}),typeof xs.excerpt=="function")return xs.excerpt(dn,xs);const bs=dn.data.excerpt_separator||xs.excerpt_separator;if(bs==null&&(xs.excerpt===!1||xs.excerpt==null))return dn;const Es=typeof xs.excerpt=="string"?xs.excerpt:bs||xs.delimiters[0],ws=dn.content.indexOf(Es);return ws!==-1&&(dn.excerpt=dn.content.slice(0,ws)),dn},excerpt}var toFile,hasRequiredToFile;function requireToFile(){if(hasRequiredToFile)return toFile;hasRequiredToFile=1;const ds=requireKindOf(),dn=requireStringify(),ms=requireUtils();return toFile=function(xs){return ds(xs)!=="object"&&(xs={content:xs}),ds(xs.data)!=="object"&&(xs.data={}),xs.contents&&xs.content==null&&(xs.content=xs.contents),ms.define(xs,"orig",ms.toBuffer(xs.content)),ms.define(xs,"language",xs.language||""),ms.define(xs,"matter",xs.matter||""),ms.define(xs,"stringify",function(bs,Es){return Es&&Es.language&&(xs.language=Es.language),dn(xs,bs,Es)}),xs.content=ms.toString(xs.content),xs.isEmpty=!1,xs.excerpt="",xs},toFile}var parse$1,hasRequiredParse;
1330function requireParse(){if(hasRequiredParse)return parse$1;hasRequiredParse=1;const ds=requireEngine(),dn=requireDefaults();return parse$1=function(ms,xs,bs){const Es=dn(bs),ws=ds(ms,Es);if(typeof ws.parse!="function")throw new TypeError('expected "'+ms+'.parse" to be a function');return ws.parse(xs,Es)},parse$1}var grayMatter,hasRequiredGrayMatter;function requireGrayMatter(){if(hasRequiredGrayMatter)return grayMatter;hasRequiredGrayMatter=1;const ds=require$$0,dn=requireSectionMatter(),ms=requireDefaults(),xs=requireStringify(),bs=requireExcerpt(),Es=requireEngines(),ws=requireToFile(),Rs=requireParse(),js=requireUtils();function Cs(ks,Os){if(ks==="")return{data:{},content:ks,excerpt:"",orig:ks};let Ms=ws(ks);const Ds=Cs.cache[Ms.content];if(!Os){if(Ds)return Ms=Object.assign({},Ds),Ms.orig=Ds.orig,Ms;Cs.cache[Ms.content]=Ms}return As(Ms,Os)}function As(ks,Os){const Ms=ms(Os),Ds=Ms.delimiters[0],Ps=`
1331`+Ms.delimiters[1];let Ls=ks.content;Ms.language&&(ks.language=Ms.language);const Bs=Ds.length;if(!js.startsWith(Ls,Ds,Bs))return bs(ks,Ms),ks;if(Ls.charAt(Bs)===Ds.slice(-1))return ks;Ls=Ls.slice(Bs);const Fs=Ls.length,Us=Cs.language(Ls,Ms);Us.name&&(ks.language=Us.name,Ls=Ls.slice(Us.raw.length));let Gs=Ls.indexOf(Ps);return Gs===-1&&(Gs=Fs),ks.matter=Ls.slice(0,Gs),ks.matter.replace(/^\s*#[^\n]+/gm,"").trim()===""?(ks.isEmpty=!0,ks.empty=ks.content,ks.data={}):ks.data=Rs(ks.language,ks.matter,Ms),Gs===Fs?ks.content="":(ks.content=Ls.slice(Gs+Ps.length),ks.content[0]==="\r"&&(ks.content=ks.content.slice(1)),ks.content[0]===`
1332`&&(ks.content=ks.content.slice(1))),bs(ks,Ms),(Ms.sections===!0||typeof Ms.section=="function")&&dn(ks,Ms.section),ks}return Cs.engines=Es,Cs.stringify=function(ks,Os,Ms){return typeof ks=="string"&&(ks=Cs(ks,Ms)),xs(ks,Os,Ms)},Cs.read=function(ks,Os){const Ms=ds.readFileSync(ks,"utf8"),Ds=Cs(Ms,Os);return Ds.path=ks,Ds},Cs.test=function(ks,Os){return js.startsWith(ks,ms(Os).delimiters[0])},Cs.language=function(ks,Os){const Ds=ms(Os).delimiters[0];Cs.test(ks)&&(ks=ks.slice(Ds.length));const Ps=ks.slice(0,ks.search(/\r?\n/));return{raw:Ps,name:Ps?Ps.trim():""}},Cs.cache={},Cs.clearCache=function(){Cs.cache={}},grayMatter=Cs,grayMatter}var grayMatterExports=requireGrayMatter();const matter=getDefaultExportFromCjs(grayMatterExports);function deriveSlugFromPath(ds){const dn=ds.split("\\").pop()?.split("/").pop()||ds;return dn.toLowerCase().endsWith(".md")?dn.slice(0,-3):dn}const isNode$1=typeof process$1<"u"&&!!process$1.versions?.node;let rawModules={};if(isNode$1){const{readdirSync:ds,readFileSync:dn}=await __vitePreload(async()=>{const{readdirSync:Cs,readFileSync:As}=await import("./empty-Cl2ND4lu.js").then(ks=>ks.e);return{readdirSync:Cs,readFileSync:As}},[]),{fileURLToPath:ms}=await __vitePreload(async()=>{const{fileURLToPath:Cs}=await import("./url-Bc-kkpLm.js");return{fileURLToPath:Cs}},__vite__mapDeps([4,1])),{dirname:xs,join:bs}=await __vitePreload(async()=>{const{dirname:Cs,join:As}=await import("./index-CEPsZ2kp.js").then(ks=>ks.i);return{dirname:Cs,join:As}},__vite__mapDeps([5,2])),Es=ms(import.meta.url),ws=xs(Es),Rs=ds(ws).filter(Cs=>Cs.endsWith(".md")),js={};for(const Cs of Rs)js[`./${Cs}`]=dn(bs(ws,Cs),"utf8");rawModules=js}else rawModules=Object.assign({"./TEMPLATE.md":__vite_glob_0_0,"./article1.md":__vite_glob_0_1,"./article2.md":__vite_glob_0_2,"./article3.md":__vite_glob_0_3,"./article4.md":__vite_glob_0_4,"./article5.md":__vite_glob_0_5,"./article6.md":__vite_glob_0_6,"./article7.md":__vite_glob_0_7});const mdArticles=Object.entries(rawModules).filter(([,ds])=>typeof ds=="string"&&ds.trim().length>0).map(([ds,dn])=>{const{data:ms,content:xs}=matter(dn),bs=ms,Es=bs?.slug??deriveSlugFromPath(ds);let ws=[];Array.isArray(bs?.keywords)?ws=bs.keywords:typeof bs?.keywords=="string"&&(ws=[bs.keywords]);const Rs=bs?.image?.url?{url:String(bs.image.url),alt:bs.image.alt?String(bs.image.alt):void 0}:void 0;return{title:String(bs?.title||Es),slug:Es,content:xs,description:bs?.description?String(bs.description):void 0,keywords:ws,image:Rs,draft:bs.draft,format:"markdown",publishedDate:bs.publishedDate?new Date(bs.publishedDate):new Date}}),combined=[...mdArticles.filter(ds=>!ds.draft)],seen=new Set,articles=[];for(const ds of combined){if(seen.has(ds.slug)){console.warn(`[blog] Duplicate slug '${ds.slug}' detected; keeping first occurrence.`);continue}seen.add(ds.slug),articles.push(ds)}function getBlogArticleBySlug(ds){return articles.find(dn=>dn.slug===ds)}function getAllBlogArticles(){return articles}function variantClasses(ds){switch(ds){case ButtonType.Primary:return"text-[var(--color-text-light)] bg-primary hover:bg-primary-hover";case ButtonType.Secondary:return"text-[var(--color-text-light)] bg-secondary";case ButtonType.Tertiary:return"text-[var(--color-text-light)] bg-secondary";case ButtonType.Quaternary:return"text-[var(--color-text-light)] bg-primary";case ButtonType.Cancel:return"text-[var(--color-text-dark)] bg-[var(--color-background-light)]"}return""}function LinkButton(ds){const{buttonType:dn=ButtonType.Primary,className:ms,text:xs,jsx:bs,children:Es,to:ws,replace:Rs,state:js,preventScrollReset:Cs,relative:As,...ks}=ds,Os=`text-center text-sm md:text-base px-[20px] py-[10px] rounded-sm 
1333    w-fit !min-h-10 cursor-pointer transition-[all] duration-200 ease-in-out shadow-sm border-0 rounded-md expand-btn
1334    items-center font-semibold ${variantClasses(dn)} ${ms||""}`;if(ws!==void 0)return jsxRuntimeExports.jsx(Link$1,{to:ws,replace:Rs,state:js,preventScrollReset:Cs,relative:As,className:Os,...ks,
1334children:Es||jsxRuntimeExports.jsxs("div",{className:"flex",children:[xs,bs]})});const{href:Ms,...Ds}=ks;return jsxRuntimeExports.jsx("a",{href:Ms,className:Os,...Ds,children:Es||jsxRuntimeExports.jsxs("div",{className:"flex",children:[xs,bs]})})}const Blog=({title:ds,subtitle:dn,maxArticles:ms})=>{const[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(!0);return reactExports.useEffect(()=>{const js=[...getAllBlogArticles()].sort((As,ks)=>ks.publishedDate.getTime()-As.publishedDate.getTime()),Cs=ms?js.slice(0,ms):js;bs(Cs),ws(!1)},[ms]),Es?jsxRuntimeExports.jsxs("section",{className:styles$3.blogSection,children:[jsxRuntimeExports.jsx("h2",{className:styles$3.blogTitle,children:ds}),dn&&jsxRuntimeExports.jsx("p",{className:styles$3.blogSubtitle,children:dn}),jsxRuntimeExports.jsx("div",{className:styles$3.loading,children:"Loading blog articles..."})]}):jsxRuntimeExports.jsxs("section",{className:styles$3.blogSection,children:[jsxRuntimeExports.jsx("h2",{className:styles$3.blogTitle,children:ds}),dn&&jsxRuntimeExports.jsx("p",{className:styles$3.blogSubtitle,children:dn}),xs.length===0?jsxRuntimeExports.jsx("p",{className:styles$3.noArticles,children:"No blog articles available."}):jsxRuntimeExports.jsx("div",{className:styles$3.blogGrid,children:xs.map(Rs=>jsxRuntimeExports.jsxs("article",{className:`${styles$3.blogCard} border-b-tertiary border-solid border-b-2 pb-6`,children:[Rs.image&&jsxRuntimeExports.jsx("div",{className:styles$3.articleImage,children:jsxRuntimeExports.jsx("img",{src:Rs.image.url,alt:Rs.image.alt||Rs.title,className:styles$3.image})}),jsxRuntimeExports.jsx("h3",{className:styles$3.articleTitle,children:Rs.title}),jsxRuntimeExports.jsx("div",{className:"mt-auto",children:jsxRuntimeExports.jsx(LinkButton,{to:`/blog/${Rs.slug}`,className:"min-w-48",children:"Go to article"})})]},Rs.slug))})]})};function LogoLarge({width:ds,height:dn,linkUrl:ms,...xs}){const bs=jsxRuntimeExports.jsx("img",{src:"https://manualmagic.ai/graphics/logo.png",alt:"Manual Magic AI Logo",className:"w-auto object-cover max-w-3/4 md:max-w-4/5"});return jsxRuntimeExports.jsx("div",{className:"flex justify-center py-6",...xs,children:ms?jsxRuntimeExports.jsx("a",{href:ms,className:"inline-block",children:bs}):bs})}const FAQItem=({question:ds,answer:dn,isOpen:ms,onToggle:xs})=>jsxRuntimeExports.jsxs("div",{className:"border-b border-gray-200",children:[jsxRuntimeExports.jsxs("button",{className:"w-full py-5 px-4 flex justify-between items-center text-left hover:bg-gray-50 transition-colors",onClick:xs,"aria-expanded":ms,children:[jsxRuntimeExports.jsx("span",{className:"text-lg font-medium text-gray-900 pr-4",children:ds}),jsxRuntimeExports.jsx("span",{className:`flex-shrink-0 text-2xl text-primary transition-transform duration-200 ${ms?"rotate-45":""}`,children:"+"})]}),jsxRuntimeExports.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${ms?"max-h-96 opacity-100":"max-h-0 opacity-0"}`,children:jsxRuntimeExports.jsx("p",{className:"px-4 pb-5 text-gray-600 leading-relaxed text-lg",children:dn})})]}),FAQCategory=({section:ds,openItems:dn,onToggleItem:ms})=>jsxRuntimeExports.jsxs("div",{className:"mb-12",children:[jsxRuntimeExports.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-6 pb-2 border-b-2 border-primary",children:ds.title}),jsxRuntimeExports.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-gray-100",children:ds.items.map((xs,bs)=>{const Es=`${ds.title}-${bs}`;return jsxRuntimeExports.jsx(FAQItem,{question:xs.question,answer:xs.answer,isOpen:dn.has(Es),onToggle:()=>ms(Es)},Es)})})]}),FAQSection=({sections:ds,backgroundClass:dn=""})=>{const[ms,xs]=reactExports.useState(new Set),bs=Es=>{xs(ws=>{const Rs=new Set(ws);return Rs.has(Es)?Rs.delete(Es):Rs.add(Es),Rs})};return jsxRuntimeExports.jsx("section",{className:`py-16 md:py-24 ${dn}`,children:jsxRuntimeExports.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:ds.map((Es,ws)=>jsxRuntimeExports.jsx(FAQCategory,{section:Es,openItems:ms,onToggleItem:bs},ws))})})},WHATSAPP_NUMBER="447956315750";function waLink(ds){return`https://wa.me/${WHATSAPP_NUMBER}?text=${encodeURIComponent(ds)}`}const messages={generic:`Hi Manual Writers International  -  I'd like to request a Zoom call to discu
1334ss Manual Magic AI® consultancy.
1335
1336Service: [Onboarding / Manual Review / SOP Review]
1337Company:
1338Team size:
1339Preferred times for Zoom:
1340Anything else we should know: `,onboarding:`Hi Manual Writers International  -  I'd like to book Project Team Member Onboarding for Manual Magic AI®.
1341
1342Company:
1343Team size:
1344Whether Manual Magic AI® is already set up: [Yes/No]
1345What you're trying to achieve in week 1:
1346Preferred times for a Zoom call: `,manualReview:`Hi Manual Writers International  -  I'd like a Current Operations Manual Review to support our use of Manual Magic AI®.
1347
1348Company:
1349What format your manual is in today: [Google Docs/Word/PDF/Notion/Other]
1350Approx. size: [pages or number of SOPs]
1351Biggest problem to fix:
1352Preferred times for a Zoom call: `,sopReview:`Hi Manual Writers International  -  I'd like a Completed SOPs Review before we publish them inside Manual Magic AI®.
1353
1354Company:
1355How many SOPs need review:
1356What type of operations:
1357Deadline (if any):
1358Preferred times for a Zoom call: `};function CTAButton({href:ds,children:dn,variant:ms="primary",openTab:xs=!1}){const bs=ms==="primary"?"px-6 py-3 bg-primary text-white font-semibold rounded-lg hover:opacity-90 transition-opacity":"inline-block px-6 py-3 border border-primary text-primary font-semibold rounded-lg hover:bg-primary hover:text-white transition-colors";return jsxRuntimeExports.jsx("a",{className:`${bs} text-center`,href:ds,target:xs?"_blank":void 0,rel:"noopener noreferrer",children:dn})}function Hero(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-gray-700 text-white",children:jsxRuntimeExports.jsxs("div",{className:"max-w-5xl mx-auto text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl md:text-5xl font-bold mb-10 !text-white",children:"Practical, hands-on consultancy"}),jsxRuntimeExports.jsx("p",{className:"text-2xl mb-20",children:"Help you to onboard teams, review your current operations manual, or quality-check completed SOPs."}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[jsxRuntimeExports.jsx(CTAButton,{href:"#included",variant:"secondary",children:"See what's included"}),jsxRuntimeExports.jsx(CTAButton,{openTab:!0,href:waLink(messages.generic),children:"Request a Zoom call"})]})]})})}function WhoFor(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-white",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold mb-6",children:"Who this is for"}),jsxRuntimeExports.jsxs("ul",{className:"list-disc list-inside space-y-2 text-gray-700",children:[jsxRuntimeExports.jsx("li",{children:"Building (or rebuilding) an operations manual from existing documents and tribal knowledge"}),jsxRuntimeExports.jsxs("li",{children:["Rolling Manual Magic AI",jsxRuntimeExports.jsx("sup",{children:"®"})," out to a team and need adoption, not just access"]}),jsxRuntimeExports.jsx("li",{children:"Preparing SOPs for real-world use (training, compliance, franchising, scaling, handover)"}),jsxRuntimeExports.jsx("li",{children:'Sitting on "finished" SOPs and want a quality review before they become company doctrine'})]})]})})}function Outcomes(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-gray-50",id:"included",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold mb-6",children:"What you'll get"}),jsxRuntimeExports.jsxs("ul",{className:"list-disc list-inside space-y-2 text-gray-700",children:[jsxRuntimeExports.jsx("li",{children:'Faster onboarding and fewer "how do I use this?" questions'}),jsxRuntimeExports.jsx("li",{children:"Clear next steps for structuring and standardising your manual"}),jsxRuntimeExports.jsx("li",{children:"A tighter, more usable set of SOPs (clarity, completeness, consistency)"}),jsxRuntimeExports.jsx("li",{children:"A practical punch list you can execute immediately"})]})]})})}function ServiceCard({title:ds,subtitle:dn,bestFor:ms,includes:xs,deliverable:bs,ctaHref:Es}){return jsxRuntimeExports.jsxs("article",{className:"bg-white rounded-lg shadow-md p-6 flex flex-col",children:[jsxRuntimeExports.jsx("h3",{className:"text-2xl !font-bold mb-2 !text-primary min-h-14",children:ds}),jsxRuntimeExports.jsx("p",{className:"font-semibold mb-4",children:dn}),jsxRuntimeExports.jsxs("p",{className:"text-gray-600 mb-4 min-h-24",children:[jsxRuntimeExports.jsx("strong",{children:"Best for:"})," ",ms]}),jsxRuntimeExports.jsx("h4",{className:"font-semibold",children:"What's included in a day"}),jsxRuntimeExports.jsx("ul",{className:"list-disc list-inside space-y-1 text-gray-700  mb-4 !pl-0 !ml-0",children:xs.map((ws,Rs)=>jsxRuntimeExports.jsx("li",{children:ws},Rs))}),jsxRuntimeExports.jsxs("p",{className:"mb-4 mt-auto",children:[jsxRuntimeExports.jsx("strong",{children:"Deliverable:"})," ",bs]}),jsxRuntimeExports.jsx(CTAButton,{openTab:!0,href:Es,children:"Request"})]})}function Services(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-white",children:jsxRuntimeExports.jsxs("div",{className:"max-w-6xl mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-3xl font-bold mb-8 mt-8 text-center",children:"Consultancy Services"}),jsxRuntimeExports.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[jsxRuntimeExports.jsx(ServiceCard,{title:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Manual Magic AI",jsxRuntimeExports.jsx("sup",{children:"®"})," Team Onboarding"]}),subtitle:"Set up your team, structure the workspace, and walk everyone through how you'll use the app in practice.",bestFor:"new implementations, relaunches, teams who've logged in but haven't adopted the workflow.",includes:["Pre-call review of your current state (what exists, where it is, who needs access)","Recommended team setup: roles, responsibilities, contribution workflow","Live Zoom onboarding session (recordable if you wish)","A clear 'week one' plan: what to build first, what to ignore for now","Q&A with your team so adoption friction gets removed early"],deliverable:"onboarding notes + agreed workflow + immediate next steps.",ctaHref:waLink(messages.onboarding),ctaLabel:"Request onboarding via WhatsApp"}),jsxRuntimeExports.jsx(ServiceCard,{title:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Current Operations Manual Review"}),subtitle:"A structured review of what you already have  -  to identify gaps, duplication, outdated content, and usability issues.",bestFor:"businesses with a manual that exists, but isn't trusted, isn't used, or hasn't kept pace with operations.",includes:["Rapid assessment of your current manual (format, structure, usability, maintenance)","Gap and risk spotting: missing SOPs, unclear ownership, inconsistent standards","Recommendations for re-structure (so content is findable and repeatable)","Prioritised action list: what to fix now vs later","Practical guidance on how to migrate/refresh content inside Manual Magic AI®"],deliverable:"a prioritised review summary + recommendations you can implement.",ctaHref:waLink(messages.manualReview),ctaLabel:"Request a manual review via WhatsApp"}),jsxRuntimeExports.jsx(ServiceCard,{title:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Completed SOPs Review"}),subtitle:`Quality-check "finished" SOPs before they go live  -  so they're clear, consistent, and actually trainable.`,bestFor:"teams producing SOPs quickly who want an expert to validate quality and usability.",includes:["Review of your completed SOPs against clarity and usability criteria","Consistency checks: format, language, decision points, roles, terminology","Step logic checks: missing steps, implied knowledge, unclear handoffs","Practical edits and improvement notes (what to rewrite vs what to keep)","A 'definition of done' checklist your team can reuse"],deliverable:"annotated improvement notes + a repeatable SOP quality standard.",ctaHref:waLink(messages.sopReview),ctaLabel:"Request an SOP review via WhatsApp"})]})]})})}function DayRate(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-gray-50",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-6",children:"How the day rate works"}),jsxRuntimeExports.jsx("p",{className:"font-semibold mb-4",children:"£999.00 per day (ex VAT) for any of the services above."}),jsxRuntimeExports.jsxs("ul",{className:"list-disc list-inside space-y-2 text-gray-700 mb-4",children:[jsxRuntimeExports.jsx("li",{children:"Delivered remotely via Zoom by Manual Writers International"}),jsxRuntimeExports.jsx("li",{children:"Work is scoped in advance on a short Zoom call"}),jsxRuntimeExports.jsx("li",{children:"You'll get a clear plan for what will be completed within the day"}),jsxRuntimeExports.jsx("li",{children:"Additional days can be booked if required (same day rate)"})]}),jsxRuntimeExports.jsxs("p",{className:"text-gray-700",children:[jsxRuntimeExports.jsx("strong",{children:"Important:"})," This is consultancy support. You keep ownership and control of your Manual Magic AI",jsxRuntimeExports.jsx("sup",{children:"®"})," workspace and content."]})]})})}function Booking(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-white",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Book a Zoom scoping call (via WhatsApp)"}),jsxRuntimeExports.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 mb-6",children:[jsxRuntimeExports.jsx("li",{children:"Click the WhatsApp button and send your details"}),jsxRuntimeExports.jsx("li",{children:"We schedule a short Zoom call to confirm scope and fit"}),jsxRuntimeExports.jsx("li",{children:"You receive a simple plan and proposed day(s)"})]}),jsxRuntimeExports.jsx(CTAButton,{openTab:!0,href:waLink(messages.generic),children:"Request a Call"})]})})}const consultancyFaqSections=[{title:"FAQs",items:[{question:"Is this for existing Manual Magic AI® customers only?",answer:"It's designed for Manual Magic AI® users, but we can also advise you on readiness and structure if you're earlier in the process."},{question:"How many people can attend onboarding?",answer:"As many as you want on Zoom. For best results, include the owner of operations plus the people who will actually create/maintain SOPs."},{question:"What do you need from us before the session?",answer:"Access to the relevant materials (manual/SOPs/workspace) and a named point of contact."},{question:"Do you write the SOPs for us?",answer:"These offerings are strictly the three consultancy services listed: onboarding, current manual review, or completed SOP review."},{question:"Is VAT included?",answer:"No. The rate is £999.00 per day, excluding VAT."}]}];function FAQs(){return jsxRuntimeExports.jsx(FAQSection,{__typename:"FAQSection",sections:consultancyFaqSections,backgroundClass:"bg-gray-50"})}function About(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 bg-gray-700",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-6 !text-white",children:"About Manual Writers International"}),jsxRuntimeExports.jsx("p",{className:"text-white text-lg",children:"Manual Writers International provides practical operational documentation support  -  focused on clarity, adoption, and maintainability. The aim is simple: reduce confusion, standardise delivery, and help teams run consistently."})]})})}function FinalCTA(){return jsxRuntimeExports.jsx("section",{className:"py-12 px-6 text-white",children:jsxRuntimeExports.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Ready to get your manuals and SOPs into a usable, scalable standard?"}),jsxRuntimeExports.jsx("p",{className:"mb-6",children:"Book a short Zoom call and we'll confirm the best service and scope."}),jsxRuntimeExports.jsx(CTAButton,{openTab:!0,href:waLink(messages.generic),children:"Request a Zoom call"}),jsxRuntimeExports.jsx("p",{className:"text-sm mt-4 mb-10",children:"Delivered by Manual Writers International • £999/day ex VAT"})]})})}function ConsultancySalesPage(){return jsxRuntimeExports.jsxs("main",{className:"min-h-screen bg-white overflow-y-auto",children:[jsxRuntimeExports.jsx(Hero,{}),jsxRuntimeExports.jsx(WhoFor,{}),jsxRuntimeExports.jsx(Outcomes,{}),jsxRuntimeExports.jsx(Services,{}),jsxRuntimeExports.jsx(DayRate,{}),jsxRuntimeExports.jsx(Booking,{}),jsxRuntimeExports.jsx(FAQs,{}),jsxRuntimeExports.jsx(About,{}),jsxRuntimeExports.jsx(FinalCTA,{})]})}const LandingPage=({page:ds})=>(reactExports.useEffect(()=>{ds?.title&&(document.title=ds.title)},[ds?.title]),jsxRuntimeExports.jsx("main",{className:ds.backgroundClass,children:ds.components.map((dn,ms)=>{switch(dn.__typename){case"Headline":return jsxRuntimeExports.jsx(Headline,{...dn},ms);case"ContentSection":return jsxRuntimeExports.jsx(ContentSection,{...dn},ms);case"Logo":return jsxRuntimeExports.jsx(LogoLarge,{...dn,width:600,height:600},ms);case"HeroSection":return jsxRuntimeExports.jsx(HeroSection,{...dn},ms);case"CTA":return jsxRuntimeExports.jsx(CTAComponent,{...dn},ms);case"Testimonial":return jsxRuntimeExports.jsx(Testimonial,{...dn},ms);case"WaitlistForm":return jsxRuntimeExports.jsx(WaitlistForm,{...dn},ms);case"BenefitsGrid":return jsxRuntimeExports.jsx(BenefitsGrid,{...dn},ms);case"ImageGridGallery":return jsxRuntimeExports.jsx(ImageGridGallery,{...dn},ms);case"TestimonialGallery":return jsxRuntimeExports.jsx(TestimonialGallery,{...dn},ms);case"VideoTestimonial":return jsxRuntimeExports.jsx(VideoTestimonial,{...dn},ms);case"Grid":return jsxRuntimeExports.jsx(Grid,{...dn},ms);case"SeatPricingCalculator":return jsxRuntimeExports.jsx(SeatPricing,{...dn},ms);case"FeatureComparisonTable":return jsxRuntimeExports.jsx(FeatureComparisonTable,{...dn},ms);case"Blog":return jsxRuntimeExports.jsx(Blog,{...dn},ms);case"FAQSection":return jsxRuntimeExports.jsx(FAQSection,{...dn},ms);case"ConsultancySalesPage":return jsxRuntimeExports.jsx(ConsultancySalesPage,{...dn},ms);default:return console.warn("Unknown block type",dn.__typename),null}})})),pages=[{id:"home",slug:"",title:"Manual Magic AI - Get Started",meta:{description:"Manual Magic AI - Turn scattered files and SOPs into detailed, user-friendly Operations Manual
1358s.",keywords:"Manual Magic AI, Operations Manual, SOP, Standard Operating Procedures, Franchise, Business Process"},backgroundClass:"bg-secondary",components:[{__typename:"Logo"},{__typename:"HeroSection",title:"The Operations Manual Methodology Franchising Trusts",subtitle:"Now Built for You in Weeks, Not Months",description:"",backgroundClass:"bg-secondary",ctaText:"Get Started",ctaUrl:"/try"},{__typename:"Headline",content:"Built on Penny Hopkinson's proven three-step system, endorsed by the British Franchise Association, Manual Magic AI turns your know-how into a professional Operations Manual. <br /><br /> Penny is the author of the best-selling book <span class='italic'>Manual Magic: Create the Operations Manual Your Franchisees Need to Succeed</span>, and has distilled over 40 years of deep franchising and operational expertise into the platform - designed for solopreneurs, SMEs and global brands that want to create or update an Operations Manual using their IP. <br /><br /> AI accelerates the draft; your experts and ours make sure it's right.",backgroundClass:"bg-white",ctaText:"Learn More",ctaUrl:"/features",imageUrl:"/graphics/penny.png"},{__typename:"Testimonial",quote:"Manual Magic AI is a real innovation for franchising! This 'done with you, done by you' platform takes the overwhelm out of building an Operations Manual by using Penny's proven three-step system.",authorName:"Pip Wilkins",authorTitle:"CEO",authorCompany:"the British Franchise Association",backgroundClass:"bg-tertiary",authorImageUrl:"/graphics/pip_wilkins.jpg"},{__typename:"BenefitsGrid",heading:"CORE BENEFITS",headingClass:"text-white",benefits:[{title:"Consistent Standards",description:"Locks brand standards across every outlet globally"},{title:"Continuous Improvement",description:"Empowers incentivised teams for engagement"},{title:"Reduced Training Time",description:"Cuts onboarding time, boosting speed-to-competency KPIs"},{title:"Customisation",description:"Reflects unique practices and culture within the organisation"},{title:"Faster Service",description:"AI-assisted service captures brand values quickly"},{title:"Quick Updates",description:"Publishes amendments instantly across all sites"}],backgroundClass:"bg-secondary",ctaText:"Learn More",ctaUrl:"/features"},{__typename:"ImageGridGallery",title:"We've been working with iconic brands since 1989",backgroundClass:"bg-light-gray",images:[{imageUrl:"/graphics/partner1.png",alt:"Partner Brand 1"},{imageUrl:"/graphics/partner2.png",alt:"Partner Brand 2"},{imageUrl:"/graphics/partner3.png",alt:"Partner Brand 3"},{imageUrl:"/graphics/partner4.png",alt:"Partner Brand 4"},{imageUrl:"/graphics/partner5.jpg",alt:"Partner Brand 5"},{imageUrl:"/graphics/partner6.png",alt:"Partner Brand 6"},{imageUrl:"/graphics/partner7.png",alt:"Partner Brand 7"},{imageUrl:"/graphics/partner8.png",alt:"Partner Brand 8"},{imageUrl:"/graphics/partner9.png",alt:"Partner Brand 9"},{imageUrl:"/graphics/partner10.png",alt:"Partner Brand 10"},{imageUrl:"/graphics/partner11.png",alt:"Partner Brand 11"}]},{__typename:"Grid",title:"Get your team on the same page - literally",titleClass:"!text-white",gridItems:[{title:"The Problem",content:"Your SOPs are scattered...<ul><li>Buried in a bloated drive</li><li>Stuck to monitors on fading Post-It Notes</li><li>Trapped inside a seasoned manager's head</li></ul>",backgroundClass:"bg-white bg-opacity-10",titleClass:"text-4xl text-center",contentClass:"text-lg"},{title:"The Reality",content:'<ul><li>No visuals, no quick search, no snack-size steps</li><li>Teams nod, promise to read, then do it their way</li><li>Under-40s stream video shorts; they skip columns</li></ul><span class="font-semibold"> Your dull, text heavy Operations Manual needs a refresh</p>',backgroundClass:"bg-white bg-opacity-10",titleClass:"text-4xl text-center",contentClass:"text-lg"}]},{__typename:"CTA",title:"Let's build the version teams crave.",subtitle:"Manual Magic AI is here to change all that.",description:`It's the app version of Amazon international bestseller, Manual Magic: Create the Operations Manual Your Franchisees Need to Succeed by Penny Hopkinson, Founder, Manual Writers International.
1359
1360<strong>Now reimagined with AI for solopreneurs, SMEs, and global teams alike.</strong>`,ctaText:"Join Today",ctaUrl:"/try"},{__typename:"Testimonial",quote:`I’ve beta tested the core functionality of Manual Magic AI. The softw
1360are analysed and solved three tricky problems. Then, it analysed our brand voice and tone - and applied it.
1361
1362The content is great, the language is simple, the visuals work and flow nicely. The SOP content is so bloody good. For the prototype stage simply put - this is awesome!`,authorName:"Wesley Williams",authorTitle:"Global Franchise Manager",authorCompany:"Heavenly Desserts",backgroundClass:"bg-tertiary",authorImageUrl:"/graphics/wesley_williams.jpg"},{__typename:"Headline",backgroundClass:"bg-white",imageUrl:"/graphics/illustration.svg",imageShape:"square",imagePosition:"right",content:`<div><h2 class='mt-4 text-3xl mb-2'>Upload Your Intellectual Property</h2>
1363Docs, PDFs, spreadsheets, PPTs, videos, screenshots, or scribbles
1364
1365<h2 class='mt-4 text-3xl mb-2'>Auto-Sort Into Categories</h2>
1366The app organises content into five key 'Scorecard' categories
1367
1368<h2 class='mt-4 text-3xl mb-2'>Visual Task Boards</h2>
1369Keep your tasks on track and your team of content experts aligned
1370
1371<h2 class='mt-4 text-3xl mb-2'>AI-Powered Drafting</h2>
1372Generative-AI assisted drafting for SOPs, checklists, FAQs, infographics, and short video storyboards
1373
1374<h2 class='mt-4 text-3xl mb-2'>Review, Refine, and Share</h2>
1375User personalisation perfects brand voice and 'how we do things around here'</div>`},{__typename:"CTA",title:"The Manual Magic AI Difference",description:`We're not just turning confusion into clarity. We're turning your know-how into a living, searchable Operations Manual - reimagined as an engaging, dynamic knowledge-sharing ecosystem, where teams can participate, learn and grow.
1376
1377<strong>A tool your team can search, update, and apply in real time.</strong>`,ctaText:"Get Started",ctaUrl:"/try"},{__typename:"CTA",title:"From solopreneurs to global brands, Manual Magic Al transforms the way you organise your IP, systematise - and scale.",titleClass:"text-gray-800 mx-auto max-w-3xl !text-4xl leading-normal",backgroundClass:"bg-white",ctaText:"Join Now",ctaUrl:"/try"},{__typename:"Grid",title:"Who Benefits Most?",titleClass:"!text-white",gridItems:[{title:"Solopreneurs",content:"Ready to delegate without dropping the ball",backgroundClass:"bg-white rounded-2xl",titleClass:"text-4xl !font-semibold",contentClass:"text-xl",imageUrl:"/graphics/solopreneur.jpg"},{title:"SMEs",content:"Scaling fast and needing structure that grows with them",backgroundClass:"bg-white rounded-2xl",titleClass:"text-4xl !font-semibold",contentClass:"text-xl",imageUrl:"/graphics/sme.png"},{title:"Multi-Site Users",content:"That rely on uniformity and conformity",backgroundClass:"bg-white rounded-2xl",titleClass:"text-4xl !font-semibold",contentClass:"text-xl",imageUrl:"/graphics/multi_site.jpg"},{title:"Team Leaders",content:"Who want smoother onboarding and clearer processes",backgroundClass:"bg-white rounded-2xl",titleClass:"text-4xl !font-semibold",contentClass:"text-xl",imageUrl:"/graphics/team_leaders.jpg"}]},{__typename:"CTA",title:`If you've ever said, "There has to be a better, more economical way", you've just found it.`,titleClass:"!text-3xl !text-white max-w-3xl mx-auto",ctaText:"Get Started",ctaUrl:"/try"},{__typename:"Grid",title:"Early Adopter Benefits",backgroundClass:"bg-white",gridItems:[{title:"Free Digital PDF",content:'Get the Amazon International Bestseller "Manual Magic: Create the Operations Manual Your Franchisees Need to Succeed" by Penny Hopkinson.',backgroundClass:"bg-secondary",titleClass:"text-white text-3xl",contentClass:"text-tertiary text-xl",imageUrl:"/graphics/stars.svg",imageClassName:"mx-auto -mt-12 size-30"}]},{__typename:"VideoTestimonial",title:"In their own words",quote:"So we jumped on a call, had a Zoom with Penny and she went through the whole shebang. It was amazing.",authorName:"Paul Needham",authorCompany:"Sky High Window Cleaning",videoUrl:"/videos/sky-high-testimonial.mp4",posterUrl:"/videos/sky-high-testimonial.jpg",captionsUrl:"/videos/sky-high-testimonial.vtt",backgroundClass:"bg-secondary"},{__typename:"TestimonialGallery",title:"Why we love Manual Magic AI",testimonials:[{quote:`I have found the 3-step principles of Manual Magic AI to be incredibly valuable. These principles have been successfully applied with multiple clients at Whitbread and in Java Group, East Africa.
1378
1379The process ensures relevant and engaging content, as well as cross-functional collaboration. I highly recommend Manual Magic AI as a great tool.`,authorName:"Joanna Dawson",authorTitle:"Organisational Specialist",authorImageUrl:"/graphics/joanna_dawson.jpg"},{quote:`Manual Magic AI represents a significant shift in operations manual development. It helps any business - and especially franchisors - organise the
1379ir intellectual property.
1380
1381Integrated project tracking keeps every contributor aligned, and the finished manual can be downloaded or linked straight to your preferred platform.`,authorName:"Steve Ennis",authorTitle:"BFA Franchise Champion",authorImageUrl:"/graphics/steve_ennis.jpg"}]},{__typename:"ContentSection",title:"Why the Status Quo Fails",content:`<div><ul class="font-semibold"><li>SharePoint folders, static PDFs, and 'read & sign' LMS modules were built for desk jobs.</li><li>Frontline staff tap a phone at 04:00, misspell 'steemerwand', and get zero search hits.</li><li>Updates take weeks, engagement plummets, and compliance evidence is missing when regulators demand it.</li></ul><h3 class="text-2xl font-bold mt-10 mb-4 text-center">Today's operators face a clear, quantifiable problem</h3><p class="text-xl !text-gray-900">Scattered IP, slow-moving manuals cost over £1,000 per outlet annually, extend training by almost half, suppress sales growth, and expose brands to headline-making safety breaches.</p><p class="text-xl mt-4 !text-gray-900">Manual Magic AI exists to plug that hole - turning scattered IP into a living, searchable hub that team members actually use and love - before another pound, hour, or customer is lost.</p></div>`,backgroundClass:"bg-white"},{__typename:"ImageGridGallery",title:"Partnerships",backgroundClass:"bg-light-gray",images:[{imageUrl:"/graphics/manualto.png",alt:"Manual.to",linkUrl:"/sponsor/manual-to"},{imageUrl:"/graphics/claromentis.svg",alt:"Claromentis",linkUrl:"/sponsor/claromentis"}]}]},{id:"contact",slug:"contact",title:"Contact",meta:{description:"Contact Manual Magic AI - We're here if you have questions about the product or need technical help.",keywords:"Contact, Support, Help, Manual Magic AI"},backgroundClass:"bg-secondary",components:[{__typename:"HeroSection",title:"Need more info?",description:"We're here if you have questions about the product or need technical help",backgroundClass:"bg-secondary"},{__typename:"CTA",subtitle:"Send us a message, we'd love to hear from you.",backgroundClass:"bg-white",subTitleClass:"text-primary",ctaText:"Email [email protected]",ctaUrl:"mailto:[email protected]"}]},{id:"pricing",slug:"pricing",title:"Pricing",meta:{description:"Choose a Manual Magic AI plan that fits your team. Clear pricing, no surprises.",keywords:"Pricing, Plans, Subscription, Manual Magic AI"},backgroundClass:"bg-secondary",components:[{__typename:"HeroSection",title:"Simple, seat-based pricing",description:"Choose a plan sized for your team. Switch or cancel anytime.",backgroundClass:"bg-secondary"},{__typename:"SeatPricingCalculator",title:"Flexible Per-Seat Pricing",subtitle:"Pay only for what you need. Add or remove seats anytime."},{__typename:"FeatureComparisonTable",title:"Compare seats",planNames:["Administrator","Reader"],categories:[{name:"Upload & organise IP",features:[{name:"Upload IP (PDF, DOCX, TXT, MD)",plans:{Administrator:!0,Reader:!1}},{name:"Duplicate detection & batching",plans:{Administrator:!0,Reader:!1}},{name:"Auto-categorise into 6 categories",plans:{Administrator:!0,Reader:!1}}]},{name:"Organisation & Search",features:[{name:"SOP Board (Draft → Review → Approved → Published)",plans:{Administrator:!0,Reader:"View only"}},{name:"Category & Tag filters",plans:{Administrator:!0,Reader:!0}},{name:"Full‑text search (objective, description, tags)",plans:{Administrator:!0,Reader:!0}},{name:"Ask Your Wizard",plans:{Administrator:!0,Reader:!1}}]},{name:"Authoring & AI",features:[{name:"Generate SOP draft",plans:{Administrator:!0,Reader:"View only"}},{name:"Generate Checklist",plans:{Administrator:!0,Reader:"View only"}},{name:"Generate FAQs",plans:{Administrator:!0,Reader:"View only"}},{name:"Video Storyboard Builder",plans:{Administrator:!0,Reader:"View only"}},{name:"Generate images/illustrations",plans:{Administrator:!0,Reader:"View only"}},{name:"Generate QR Codes",plans:{Administrator:!0,Reader:"View only"}}]},{name:"Custom Branding",features:[{name:"Formatting & Design",plans:{Administrator:!0,Reader:"View only"}},{name:"Logo & Brand Colours",plans:{Administrator:!0,Reader:"View only"}}]},{name:"Workflow & permissions",features:[{name:"Assign owner & tags",plans:{Administrator:!0,Reader:!1}},{name:"Drag & drop status changes",plans:{Administrator:!0,Reader:!1}},{name:"Reviews & approvals",plans:{Administrator:!0,Reader:!1}}]}
1381,{name:"Outputs & publishing",features:[{name:"Export SOP (Markdown)",plans:{Administrator:!0,Reader:!1}},{name:"Copy storyboard to Markdown",plans:{Administrator:!0,Reader:!1}}]},{name:"Integrations",features:[{name:"Manual.to hand‑off links",plans:{Administrator:"Coming soon",Reader:"Coming soon"}}]},{name:"Admin & support",features:[{name:"Uptime SLA",plans:{Administrator:"99.9%",Reader:"99.9%"}}]}]},{__typename:"Testimonial",quote:`I’ve beta tested the core functionality of Manual Magic AI. The software analysed and solved three tricky problems. Then, it analysed our brand voice and tone - and applied it.
1382
1383The content is great, the language is simple, the visuals work and flow nicely. The SOP content is so bloody good. For the prototype stage simply put - this is awesome!`,authorName:"Wesley Williams",authorTitle:"Global Franchise Manager",authorCompany:"Heavenly Desserts",backgroundClass:"bg-tertiary",authorImageUrl:"/graphics/wesley_williams.jpg"},{__typename:"CTA",title:"Ready to standardise and scale?",ctaText:"Get Started",ctaUrl:"/try"}]},{id:"blog",slug:"blog",title:"Manual Magic",meta:{description:"Read the latest insights and tips from the Manual Magic Team.",keywords:"sops, operations",ogImage:{url:"https://images.unsplash.com/photo-1499750310107-5fef28a66643?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&h=630&q=80"}},components:[{__typename:"Blog",title:"Latest Articles",subtitle:"Stay up to date with the latest trends and tips in Operation Manual
1383s and SOPs.",maxArticles:10}]},{id:"features",slug:"features",title:"Features",meta:{description:"Explore the core features of Manual Magic AI.",keywords:"Features, Upload documents, Manage SOPs, AI Wizard"},backgroundClass:"bg-secondary",components:[{__typename:"HeroSection",title:"How Manual Magic Works",subtitle:"Standardise and scale with confidence"},{__typename:"Headline",title:"Upload your documents",backgroundClass:"bg-white",imageUrl:"/graphics/upload.gif",imageAlt:"Upload",imageClasses:"shadow-xl",imageShape:"square",imagePosition:"left",content:"Drag and drop docs, PDFs, spreadsheets, slides, images, and more. Manual Magic AI ingests your IP ready for structured drafting."},{__typename:"Headline",title:"Manage your SOPs",backgroundClass:"bg-light-gray",imageUrl:"/graphics/board.gif",imageAlt:"SOP Board",imageClasses:"shadow-xl",imageShape:"square",imagePosition:"right",content:"Create, review, and refine Standard Operating Procedures with clear ownership, categories, and instant updates across your organisation."},{__typename:"Headline",title:"AI - Ask Your Wizard",backgroundClass:"bg-white",imageUrl:"/graphics/wizard.gif",imageAlt:"AI Wizard",imageClasses:"shadow-xl",imageShape:"square",imagePosition:"left",content:"Ask natural-language questions and get concise, context-aware guidance drawn from your own manuals and IP."}]},{id:"about",slug:"about",title:"About Manual Magic AI",meta:{description:"Turn scattered know-how into a living operations manual your whole network can trust.",keywords:"About Manual Magic AI, Operations Manual, Franchise, SOP, Penny Hopkinson"},backgroundClass:"bg-secondary",components:[{__typename:"HeroSection",title:"About Manual Magic AI",description:"Turn scattered know-how into a living operations manual your whole network can trust. Manual Magic AI is a purpose-built tool for franchisors, franchisees, and ambitious SMEs who want to standardise how they work-without six months of spreadsheets and rewrites.",backgroundClass:"bg-secondary",ctaText:"Join Today",ctaUrl:"/try"},{__typename:"Headline",title:"Our Story",backgroundClass:"bg-white",imageUrl:"/graphics/penny.png",imageAlt:"Penny Hopkinson",imageShape:"square",imagePosition:"left",content:"Manual Magic AI was created by Penny Hopkinson-widely regarded as one of the UK's leading authorities on franchise operations. <br /></br > For 30+ years Penny has helped brands codify their business systems, align franchise networks, and protect IP. <br /><br /> After watching teams struggle with binders no one reads and folders no one can find, she distilled everything she knows into a modern product that does the heavy lifting for you."},{__typename:"Testimonial",quote:"Every thriving network runs on clarity. Manual Magic AI exists to give you that clarity - fast.",authorName:"Penny Hopkinson",authorTitle:"Founder",backgroundClass:"bg-[color:var(--color-tertiary)]"},{__typename:"BenefitsGrid",heading:"What We Believe",headingClass:"text-white",benefits:[{title:"Quality scales brands",description:"Consistency across locations isn’t luck; it’s process"},{title:"Your IP should work harder",description:"You already have the knowledge - our job is to shape it"},{title:"Clear beats clever",description:"Simple, visual SOPs beat walls of text every day of the week"},{title:"Your data is yours",description:"We treat customer content and privacy with utmost care"},{title:"Bottom-up wins",description:"Manuals stick when teams help create and improve them"}],backgroundClass:"bg-secondary"},{__typename:"Headline",title:"Why Teams Choose Us",content:"<p><strong>Speed to clarity</strong> - turn legacy files into a coherent, navigable manual in days, not months. </p> <p><strong>Engagement</strong> - checklists, FAQs and short video scripts make SOPs easy to learn and use. </p> <p> <strong>Confidence</strong> - a single source of truth reduces errors, accidents and brand drift. </p><p> <strong>Control</strong> - role-based access, review workflows and full history keep quality high.</p>",backgroundClass:"bg-light-gray",imageShape:"square",imageUrl:"/graphics/team_leaders.jpg"},{__typename:"ContentSection",title:"Built on Hard-Won Expertise",content:"Manual Magic AI captures the methodology Penny has honed across decades of hands-on work with UK and international brands. <br /><br /> The result is a framework that is practical, audit-friendly and designed for real-world teams-not just policy docs.",backgroundClass:"bg-light-gray -mt-16"},{__typename:"CTA",title:"Ready to bring order to the chaos?",description:"Let’s make your best way of working the everyday way of working.",ctaText:"Get Started",ctaUrl:"/try"},{__typename:"ContentSection",title:"Security & Privacy",backgroundClass:"bg-light-gray",content:"<ul><li>Your content remains your intellectual property.</li><li>Data is encrypted in transit and at rest.</li><li>Role-based permissions ensure the right people see the right things.</li><li>Easy export if you ever need to move.</li></ul>"}]},{id:"faq",slug:"faq",title:"Frequently Asked Questions - Manual Magic AI",meta:{description:"Find answers to common questions about Manual Magic AI - from getting started to security and sector-specific use cases.",keywords:"FAQ, Manual Magic AI, Operations Manual, SOP, Franchise, Questions"},backgroundClass:"bg-secondary",components:[{__typename:"HeroSection",title:"Frequently Asked Questions",description:"Most ops teams don't need more content. They need the correct content, in the appropriate format, and kept up to date. Here are the questions we are asked before someone stops suffering and properly fixes the manual.",backgroundClass:"bg-secondary"},{__typename:"FAQSection",backgroundClass:"bg-white",sections:[{title:"Getting started",items:[{question:"What is Manual Magic AI®?",answer:"Manual Magic AI® helps you quickly transform existing documents and know-how into structured SOPs and a practical operations manual."},{question:"Who is it for?",answer:"Multi-site operators and franchisors who require consistency, quickness to competence, and audit-ready standards without relying on Word and PDFs."},{question:"Do we need to start from scratch?",answer:`No. Bring your existing manuals, policies, checklists, training notes, templates, and "somebody's got it on a desktop somewhere" files.`},{question:"How quickly can we see value?",answer:"Most teams start with one function or one site, publish a usable SOP set, then scale once the workflow is proven."},{question:"Can we pilot first?",answer:"Yes. A pilot can be run by a single Admin (Contributor) or by a Project Team of Contributors with a clear scope and a deadline."},{question:"What does success look like after 30 days?",answer:"A defined SOP library is live for the pilot area, teams are using it, and there is a simple rhythm for updates."}]},{title:"What the AI does",items:[{question:"What is the actual function of the AI?",answer:"It handles the heavy lifting and helps draft and structure SOPs, checklists, FAQs, storyboards, and training-friendly content from your source material."},{question:"Will it invent things?",answer:"It drafts. You always review. If something is safety-critical or regulated, treat approval the same way you already do for policies."},{question:"Do we still require human expertise?",answer:"Yes. The AI accelerates the heavy lifting. You or your expert Contributor(s) decide what's true and what's acceptable."},{question:"Can we maintain our tone and brand language?",answer:"Yes. Standard wording is part of safeguarding the brand across one or multiple sites."}]},{title:"Using it day to day",items:[{question:"Can we customise content based on role and location?",answer:`Yes. Role-based tagging helps people see what's relevant to them, rather than a 200-page "everything manual".`},{question:"Can we create checklists as well as SOPs?",answer:"Yes. Checklists are often what teams actually rely on when it's busy."},{question:"Can frontline teams access content quickly?",answer:'Yes. The main point is real-time access, not "read later at home".'},{question:"Can we prevent people from using outdated versions?",answer:'Yes. Publish a single source of truth and update it, instead of emailing "latest version" attachments.'},{question:"Can we monitor what has been completed and what is still outstanding?",answer:'Yes. Progress visibility through the Dashboard prevents the manual from turning into a permanent "work in progress".'},{question:"Can we export to PDF or DOCX?",answer:"Yes, exports are possible for the documents."},{question:"Can we utilise QR codes at the point of use?",answer:"Yes. QR codes provide a simple way to guide someone to the correct procedure where the work occurs."}]},{title:'Systems, storage, and "we already have…"',items:[{question:"How does this differ from SharePoint or Google Drive?",answer:"Folders contain files. Manual Magic AI® helps you convert them into organised SOPs that people can follow and keep current."},{question:"We already have an LMS. Is this going to replace it?",answer:"No. Your LMS provides learning. This keeps procedures current, practical, and easy to find within the workflow."},{question:"Can we collaborate with existing tools?",answer:"Yes. Keep your stack intact. Make sure the content inside it stays usable."}]},{title:"Governance and control",items:[{question:"Who owns the content?",answer:"You do. You decide who can draft, edit, approve, and publish."},{question:"Can we run approvals before publishing?",answer:"Yes. Keep it simple - Draft, Review, Approve, Publish. If five people can veto, nothing ships."},{question:"What if our procedures frequently change?",answer:"That's exactly why a living knowledge-sharing centre (Operations Manual) exists. Static documents cannot keep pace."}]},{title:"Security and Intellectual Property",items:[{question:"Is our content still our intellectual property?",answer:"Yes. Your operational content remains yours."},{question:"Can we control who can see what?",answer:"Yes. Permissions and role-based access control ensure that the right people see the correct content."},{question:"How is data safeguarded?",answer:"Your security page should clearly outline your protections, including encryption and access controls, and keep this information current."}]},{title:"Franchisors",items:[{question:"How does Manual Magic AI® support franchise consistency?",answer:"It makes core procedures easy to find, simple to update, and less likely to be overlooked across the network."},{question:"Can we differentiate brand standards from local variations?",answer:"Yes. Lock brand-critical SOPs and permit controlled local notes where suitable."},{question:"How should we handle country or regional differences?",answer:"Create approved variants and assign them to regions so the correct version displays by default."},{question:"Can franchisees contribute content?",answer:`Yes, if you give permission. The key is governance; otherwise, you'll end up with "helpful suggestions" becoming unofficial standards.`},{question:"How do we roll out updates across the entire network?",answer:"Publish once, distribute from the source of truth, and cease chasing confirmations in email threads."},{question:"Does this replace our existing operations manual?",answer:"It modernises it. If you still need a PDF manual, export it."}]}
1383,{title:"Food and Beverage, Hospitality",items:[{question:"Can we establish SOPs for opening, closing, and shift handover?",answer:"Yes. These are perfect for checklists and brief, role-specific guides."},{question:"Can we discuss food safety and hygiene routines?",answer:"Yes. Keep them updated and consistent across sites, especially when rules or menus change."},{question:"Can we standardise service standards?",answer:"Yes. Short, clear standards are applied. Novels are not."},{question:"How does this help reduce staff turnover?",answer:'It reduces reliance on "the one person who knows everything" and speeds up the ramp-up.'},{question:"Is it possible to link QR codes to station procedures?",answer:"Yes. QR codes are useful for prep stations, cleaning routines, and close-down tasks."}]},{title:"Health, Wellness and Fitness",items:[{question:"Can we supervise SOPs across multiple clinics or studios?",answer:"Yes. Standardise core practices while permitting approved site-level variants."},{question:"Does this help with safeguarding and duty of care?",answer:"Yes. These procedures should be up-to-date, visible, and consistent."},{question:"Can we organise cleaning and equipment maintenance routines?",answer:'Yes. Checklists and schedules help reduce the issue of "we thought someone else did it".'},{question:"Can we document incident procedures?",answer:"Yes. Clear steps are especially important when people are under pressure."}]},{title:"Education and Training",items:[{question:"Can we standardise delivery across trainers or sites?",answer:"Yes. Develop delivery SOPs, assessment procedures, and learner support processes that stay consistent."},{question:"Can we create trainer playbooks?",answer:"Yes. Structured guides decrease dependence on a single star facilitator."},{question:"Does this act as a substitute for our LMS?",answer:"No, this ensures operational consistency and maintains delivery standards. Your LMS still oversees the learning journey."}]},{title:"Home and Personal Care Services",items:[{question:"Can we establish SOPs for on-site visits and job standards?",answer:"Yes. Role-based checklists and quick guides are effective in the field."},{question:"Can we standardise the customer experience across technicians or carers?",answer:"Yes. Clear procedures and quality checks protect the brand and reduce complaints."},{question:"Can we support lone worker procedures?",answer:"Yes. Safety and escalation procedures should be simple and easily accessible."}]},{title:"Retail and other SMEs",items:[{question:"Can we standardise store opening and closing times?",answer:"Yes. Checklists reduce errors and facilitate smoother handovers."},{question:"Can we record refunds, complaints, and escalations?",answer:"Yes. Clear steps reduce risk and improve customer outcomes."},{question:"Is this too much for smaller businesses?",answer:"Not if you're expanding, recruiting, franchising, or tired of repeating yourself every week."}]}]},{__typename:"CTA",title:"Ready to standardise and scale?",description:"Stop suffering with scattered documents and outdated procedures.",ctaText:"Get Started",ctaUrl:"/try"}]},{id:"consultancy",slug:"consultancy",title:"Manual Magic AI® Consultancy - Manual Writers International",meta:{description:"Practical, hands-on consultancy from Manual Writers International to help you onboard teams, review your current operations manual, or quality-check completed SOPs.",keywords:"Manual Magic AI, Consultancy, Onboarding, SOP Review, Operations Manual Review, Manual Writers International"},backgroundClass:"bg-white",components:[{__typename:"ConsultancySalesPage"}]},{id:"terms-and-conditions",slug:"terms-and-conditions",title:"Terms and Conditions - Manual Magic AI",meta:{description:"Read the terms and conditions governing the use of Manual Magic AI services and platform.",keywords:"terms and conditions, legal terms, user agreement, Manual Magic AI terms"},components:[{__typename:"HeroSection",title:"Terms and Conditions",description:"Please read these terms carefully before using our services",backgroundClass:"bg-secondary"},{__typename:"ContentSection",title:"Introduction",content:"<p>Welcome to Manual Magic AI. These Terms and Conditions govern your use of our website, platform, and services. By accessing or using Manual Magic AI, you agree to be bound by these Terms. If you disagree with any part of these terms, you may 
1383not access our services.</p><p>These Terms constitute a legally binding agreement between you and Manual Writers International regarding your use of the platform and services.</p>"},{__typename:"ContentSection",title:"Definitions",content:'<p>For the purpose of these Terms and Conditions:</p><ul className={`list-disc pl-4`}><li><strong>"Account"</strong> means a unique account created for you to access our Service or parts of our Service.</li><li><strong>"Company"</strong> (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to Manual Writers International.</li><li><strong>"Content"</strong> refers to any material, information, or data that is uploaded, posted, or otherwise made available through the Service.</li><li><strong>"Service"</strong> refers to the website, platform, and all services provided by Manual Magic AI.</li><li><strong>"Terms and Conditions"</strong> (also referred as "Terms") mean these Terms and Conditions that form the entire agreement between You and the Company regarding the use of the Service.</li><li><strong>"User"</strong> (referred to as either "You" or "Your") refers to the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable.</li></ul>'},{__typename:"ContentSection",title:"Account Registration",content:"<p>To use certain features of the Service, you must register for an account. When you register, you agree to:</p><ul className={`list-disc pl-4`}><li>Provide accurate, current, and complete information</li><li>Maintain and promptly update your account information</li><li>Maintain the security of your account and password</li><li>Accept responsibility for all activities that occur under your account</li><li>Notify us immediately of any unauthorised use of your account</li></ul><p>We reserve the right to suspend or terminate your account if any information provided proves to be inaccurate, not current, or incomplete.</p>"},{__typename:"ContentSection",title:"Subscription and Billing",content:"<p>Some aspects of the Service are provided on a subscription basis. By selecting a subscription plan, you agree to pay the subscription fees as described at the time of purchase.</p><p>Subscription fees are billed in advance on a recurring basis, depending on the type of subscription plan you select. Billing cycles are set on a monthly or annual basis.</p><p>You may cancel your subscription at any time. Upon cancellation, your subscription will remain active until the end of your current billing period. We do not provide refunds for the unused portion of your subscription period.</p>"},{__typename:"ContentSection",title:"Acceptable Use",content:"<p>You agree not to use the Service to:</p><ul className={`list-disc pl-4`}><li>Violate any applicable laws or regulations</li><li>Infringe upon the rights of others</li><li>Upload or transmit viruses, malware, or other malicious code</li><li>Interfere with or disrupt the integrity or performance of the Service</li><li>Attempt to gain unauthorised access to the Service or related systems</li><li>Collect or harvest data from other users without their consent</li><li>Send unsolicited communications or spam</li><li>Engage in any activity that could harm minors</li></ul><p>We reserve the right to terminate or suspend your access to the Service immediately, without prior notice or liability, for any breach of these Terms.</p>"},{__typename:"ContentSection",title:"Content and Intellectual Property",content:"<p><strong>Your Content:</strong> By uploading content to the Service, <strong>you retain all rights to your content</strong>. You grant us a non-exclusive, worldwide, royalty-free licence to use, reproduce, modify, adapt, publish, translate, and distribute your content in connection with providing the Service to you.</p><p><strong>Our Content:</strong> The Service and its original content, features, and functionality are owned by Manual Writers International and are protected or pending international copyright, trademark, patent, trade secret, and other intellectual property laws. You may not copy, modify, distribute, sell, or lease any part of our Service without our express written permission.</p>"},{__typename:"ContentSection",title:"AI-Generated Content",content:"<p>Our Service uses artificial intelligence to help generate and structure Standard Operating Procedures (SOPs), checklists, FAQs, and other operational content based on your inputs. With respect to AI-generated content:</p><ul className={`list-disc pl-4`}><li>You retain ownership of the AI-generated content created specifically for you through our Service</li><li>You are responsible for reviewing all AI-generated content before publishing or distribution</li><li>We make no guarantees regarding the accuracy, originality, or appropriateness of AI-generated content</li><li>You agree to use AI-generated content in compliance with applicable laws and regulations</li><li>AI-generated content should be reviewed by appropriate subject matter experts before implementation, especially for safety-critical or regulated procedures</li></ul>"},{__typename:"ContentSection",title:"Limitation of Liability",content:"<p>To the maximum extent permitted by applicable law, in no event shall Manual Writers International be liable for any indirect, punitive, incidental, special, consequential damages, or any damages whatsoever including, without limitation, damages for loss of use, data, or profits, arising out of or in any way connected with:</p><ul className={`list-disc pl-4`}><li>The use or inability to use the Service</li><li>The performance of the Service</li><li>Any actions we take or fail to take as a result of communications you send</li><li>Any content obtained from the Service</li><li>Unauthorised access, use, or alteration of your transmissions or content</li></ul><p>Our liability is limited whether or not we have been informed of the possibility of such damages.</p>"},{__typename:"ContentSection",title:"Disclaimer of Warranties",content:'<p>The Service is provided on an "AS IS" and "AS AVAILABLE" basis. Manual Writers International expressly disclaims all warranties of any kind, whether express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and n
1383on-infringement.</p><p>We do not warrant that:</p><ul className={`list-disc pl-4`}><li>The Service will function uninterrupted, secure, or available at any particular time or location</li><li>Any errors or defects will be corrected</li><li>The Service is free of viruses or other harmful components</li><li>The results of using the Service will meet your requirements</li></ul>'},{__typename:"ContentSection",title:"Indemnification",content:"<p>You agree to defend, indemnify, and hold harmless Manual Writers International, its affiliates, licensors, and service providers, and its and their respective officers, directors, employees, contractors, agents, licensors, suppliers, successors, and assigns from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys' fees) arising out of or relating to:</p><ul className={`list-disc pl-4`}><li>Your violation of these Terms</li><li>Your use of the Service</li><li>Your content</li><li>Your violation of any third party rights</li></ul>"},{__typename:"ContentSection",title:"Termination",content:"<p>We may terminate or suspend your account and access to the Service immediately, without prior notice or liability, for any reason, including without limitation if you breach these Terms.</p><p>Upon termination, your right to use the Service will immediately cease. If you wish to terminate your account, you may discontinue using the Service or contact us to request account deletion.</p><p>All provisions of the Terms which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity, and limitations of liability.</p>"},{__typename:"ContentSection",title:"Changes to Terms",content:'<p>We reserve the right, at our sole discretion, to modify or replace these Terms at any time. We will provide notice of any changes by posting the new Terms on this page and updating the "Last Updated" date.</p><p>Your continued use of the Service after any such changes constitutes your acceptance of the new Terms. If you do not agree to the new terms, you are no longer authorised to use the Service.</p>'},{__typename:"ContentSection",title:"Governing Law",content:"<p>These Terms shall be governed and construed in accordance with the laws of the United Kingdom, without regard to its conflict of law provisions.</p><p>Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect.</p>"},{__typename:"ContentSection",title:"Contact Us",content:'<p>If you have any questions about these Terms and Conditions, please contact us at:</p><p><a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a></p><p>Manual Writers International<br>United Kingdom</p><p>Last Updated: January 2026</p>'}]},{id:"service-providers",slug:"service-providers",title:"Service Providers - Manual Magic AI",meta:{description:"Information about the third-party service providers used by Manual Magic AI to deliver our services.",keywords:"service providers, third-party services, data processors, Manual Magic AI partners"},components:[{__typename:"HeroSection",title:"Service Providers",description:"Third-party services we use to deliver our platform",backgroundClass:"bg-secondary"},{__typename:"ContentSection",title:"Introduction",content:"<p>At Manual Magic AI, we partner with trusted third-party service providers to help us deliver our platform and services to you. This page provides information about these service providers, how we work with them, and how they process your data.</p><p>We carefully select our service providers and require them to maintain appropriate security and confidentiality measures to protect your information. We only share the information necessary for them to perform their designated functions.</p>"},{__typename:"ContentSection",title:"Categories of Service Providers",content:"<p>We work with the following categories of service providers:</p><ul className={`list-disc pl-4`}><li><strong>
1383Hosting and Infrastructure:</strong> Services that host our website, application, and databases</li><li><strong>Payment Processing:</strong> Services that process subscription payments</li><li><strong>Analytics:</strong> Services that help us understand how users interact with our platform</li><li><strong>Customer Support:</strong> Services that help us provide customer support</li><li><strong>Email Delivery:</strong> Services that help us send emails to our users</li><li><strong>AI and Machine Learning:</strong> Services that power our AI-assisted content generation</li></ul>"},{__typename:"ContentSection",title:"Hosting and Infrastructure Providers",content:"<p>We use the following hosting and infrastructure providers:</p><ul className={`list-disc pl-4`}><li><strong>Amazon Web Services (AWS):</strong> Cloud hosting services for our application, content delivery and databases</li></ul><p>These providers store and process data in secure, certified data centres. They implement industry-standard security measures and comply with major security frameworks and regulations.</p>"},{__typename:"ContentSection",title:"Payment Processing Providers",content:"<p>We use the following payment processing providers:</p><ul className={`list-disc pl-4`}><li><strong>Stripe:</strong> Processes subscription payments and manages billing information</li><li><strong>PayPal:</strong> Alternative payment processing option</li></ul><p>These providers process and store payment information according to the Payment Card Industry Data Security Standard (PCI DSS). We do not store your complete payment information on our servers.</p>"},{__typename:"ContentSection",title:"Analytics and Monitoring Providers",content:"<p>We use the following analytics and monitoring providers:</p><ul className={`list-disc pl-4`}><li><strong>Google Analytics:</strong> Website and application usage analytics</li><li><strong>Sentry:</strong> Error tracking and performance monitoring</li></ul><p>These providers help us understand how users interact with our platform, identify issues, and improve our services. They collect anonymised or pseudonymized data about your interactions with our platform.</p>"},{__typename:"ContentSection",title:"Email Delivery Providers",content:"<p>We use the following email delivery providers:</p><ul className={`list-disc pl-4`}><li><strong>Amazon Web Services:</strong> Transactional email delivery service</li><li><strong>GoHighLevel:</strong> Email marketing platform</li></ul><p>These providers help us send newsletters, and other communications to you. They have access to your email address and name.</p>"},{__typename:"ContentSection",title:"AI and Machine Learning Providers",content:"<p>We use the following AI and machine learning providers to power our SOP and operational content generation:</p><ul className={`list-disc pl-4`}><li><strong>OpenAI:</strong> Powers natural language processing for generating and structuring SOPs, checklists, and operational content</li><li><strong>Gamma:</strong> Export SOPs as formatted documents</li></ul><p>These providers help us analyse your inputs and generate structured operational documentation. They process the content you provide to our platform according to strict data protection agreements.</p>"},{__typename:"ContentSection",title:"Data Processing Agreements",content:"<p>We enter into data processing agreements with our service providers that require them to:</p><ul className={`list-disc pl-4`}><li>Process your data only according to our instructions</li><li>Implement appropriate security measures</li><li>Assist us in fulfilling our obligations under applicable data protection laws</li><li>Delete or return your data when their services to us end</li><li>Submit to audits and inspections</li></ul><p>These agreements ensure that our service providers handle your data responsibly and in compliance with applicable laws.</p>"},{__typename:"ContentSection",title:"International Data Transfers",content:'<p>Some of our service providers may process your data outside your country of residence. When we transfer your data to service providers in countries that may not provide the same level of data protection as your country, we implement appropriate safeguards, such as:</p><ul className={`list-disc pl-4`}><li>European Commission-approved Standard Contractual Clauses</li><li>Ensuring service providers are certified under frameworks like the EU-US Data Privacy Framework</li><li>Implementing additional technical and organisational measures</li></ul><p>For more information on international data transfers, please refer to our <a href="/privacy-policy" class="text-primary hover:underline">Privacy Policy</a>.</p>'},{__typename:"ContentSection",title:"Updates to This List",content:"<p>We may update this list of service providers from time to time as our business needs evolve. We encourage you to review this page periodically for any changes. Significant changes to our service providers or how we use them will be communicated to you through updates to this page or other appropriate means.</p>"},{__typename:"ContentSection",title:"Contact Us",content:'<p>If you have any questions or concerns about our service providers or how they process your data, please contact us at:</p><p><a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a></p><p>Manual Writers International<br>United Kingdom</p>'}]},{id:"privacy-policy",slug:"privacy-policy",title:"Privacy Policy - Manual Magic AI",meta:{description:"Learn about how Manual Magic AI collects, uses, and protects your personal information.",keywords:"privacy policy, data protection, personal information, GDPR, Manual Magic AI privacy"},components:[{__typename:"HeroSection",title:"Privacy Policy",description:"How we collect, use, and protect your information",backgroundClass:"bg-secondary"},{__typename:"ContentSection",title:"Introduction",content:"<p>At Manual Magic AI, we take your privacy seriously. This Privacy Policy explains how we 
1383collect, use, disclose, and safeguard your information when you visit our website and use our services.</p><p>Please read this privacy policy carefully. If you do not agree with the terms of this privacy policy, please do not access the site or use our services.</p>"},{__typename:"ContentSection",title:"Information We Collect",content:"<p>We collect information that you provide directly to us when you:</p><ul className={`list-disc pl-4`}><li>Register for an account</li><li>Upload content (documents, text, procedures)</li><li>Use our services</li><li>Contact our support team</li><li>Subscribe to our newsletter</li><li>Respond to surveys or promotions</li></ul><p>The types of information we may collect include:</p><ul className={`list-disc pl-4`}><li>Personal identifiers (name, email address, phone number)</li><li>Account credentials</li><li>Payment information</li><li>Content you upload to our platform</li><li>Communications with our team</li><li>Any other information you choose to provide</li></ul>"},{__typename:"ContentSection",title:"Automatically Collected Information",content:"<p>When you visit our website or use our services, we may automatically collect certain information about your device and usage patterns, including:</p><ul className={`list-disc pl-4`}><li>IP address and device identifiers</li><li>Browser type and version</li><li>Operating system</li><li>Pages visited and time spent</li><li>Referring websites</li><li>Click patterns and interactions</li></ul><p>We use cookies and similar tracking technologies to collect this information. You can control cookies through your browser settings and other tools.</p>"},{__typename:"ContentSection",title:"How We Use Your Information",content:"<p>We use the information we collect for various purposes, including to:</p><ul className={`list-disc pl-4`}><li>Provide, maintain, and improve our services</li><li>Process transactions and send related information</li><li>Send administrative messages and updates</li><li>Respond to your comments, questions, and requests</li><li>Provide customer support</li><li>Send marketing communications</li><li>Personalise your experience</li><li>Monitor and analyse usage trends</li><li>Detect, prevent, and address technical issues</li><li>Comply with legal obligations</li></ul><p>We process your content using our AI systems to generate and structure SOPs, checklists, and operational documentation as part of our core services.</p>"},{__typename:"ContentSection",title:"Sharing Your Information",content:'<p>We may share your information in the following circumstances:</p><ul className={`list-disc pl-4`}><li><strong>Service Providers:</strong> We work with third-party service providers who perform services on our behalf, such as hosting, analytics, customer service, email delivery, and payment processing. For more details, see our <a href="/service-providers" class="text-primary hover:underline">Service Providers</a> page.</li><li><strong>Business Transfers:</strong> If we are involved in a merger, acquisition, or sale of assets, your information may be transferred as part of that transaction.</li><li><strong>Legal Requirements:</strong> We may disclose your information if required by law, such as to comply with a subpoena or other legal process.</li><li><strong>Protection of Rights:</strong> We may disclose information to protect the rights, property, or safety of Manual Magic AI, our users, or others.</li></ul><p>We do not sell your personal information to third parties for their marketing purposes.</p>'},{__typename:"ContentSection",title:"Data Security",content:"<p>We implement appropriate technical and organisational measures to protect the security of your personal information. However, please be aware that no method of transmission over the Internet or electronic storage is 100% secure.</p><p>We use industry-standard encryption, access controls, and security practices to protect your data. We regularly review and update our security practices to enhance protection.</p>"},{__typename:"ContentSection",title:"Your Rights and Choices",content:'<p>Depending on your location, you may have certain rights regarding your personal information, including:</p><ul className={`list-disc pl-4`}><li>Accessing your personal information</li><li>Correcting inaccurate information</li><li>Deleting your information</li><li>Restricting or objecting to processing</li><li>Data portability</li><li>
1383Withdrawing consent</li></ul><p>To exercise these rights, please contact us at <a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a>.</p>'},{__typename:"ContentSection",title:"International Data Transfers",content:"<p>Your information may be transferred to, and processed in, countries other than the country in which you reside. These countries may have data protection laws that are different from the laws of your country.</p><p>We take steps to ensure that your information receives an adequate level of protection in the countries in which we process it, including implementing appropriate safeguards such as EU Standard Contractual Clauses where applicable.</p>"},{__typename:"ContentSection",title:"Children's Privacy",content:'<p>Our services are not intended for individuals under the age of 16. We do not knowingly collect personal information from children under 16. If we learn that we have collected personal information from a child under 16, we will take steps to delete that information as quickly as possible.</p><p>If you believe we might have any information from or about a child under 16, please contact us at <a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a>.</p>'},{__typename:"ContentSection",title:"Changes to This Privacy Policy",content:'<p>We may update this privacy policy from time to time to reflect changes in our practices or for other operational, legal, or regulatory reasons. We will notify you of any material changes by posting the new privacy policy on this page and updating the "Last Updated" date.</p><p>We encourage you to review this privacy policy periodically for any changes. Your continued use of our services after any changes to this privacy policy constitutes your acceptance of the changes.</p>'},{__typename:"ContentSection",title:"Contact Us",content:'<p>If you have any questions or concerns about this privacy policy or our privacy practices, please contact us at:</p><p><a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a></p><p>Manual Writers International<br>United Kingdom</p><p>Last Updated: January 2026</p>'}]},{id:"ai-policy",slug:"ai-policy",title:"AI Policy - Manual Magic AI",meta:{description:"Learn about how Manual Magic AI uses AI technology and our commitment to ethical AI practices.",keywords:"AI policy, artificial intelligence, ethical AI, responsible AI, Manual Magic AI"},components:[{__typename:"HeroSection",title:"AI Policy",description:"Our commitment to responsible and ethical AI practices",backgroundClass:"bg-secondary"},{__typename:"ContentSection",title:"Our AI Approach",content:"<p>At Manual Magic AI, we leverage artificial intelligence to help you transform your operational knowledge into clear, structured Standard Operating Procedures (SOPs), checklists, and documentation. We believe in using AI as a tool to enhance human expertise, not replace it.</p><p>This policy outlines how we use AI in our platform and our commitment to ethical AI practices.</p>"},{__typename:"ContentSection",title:"How We Use AI",content:"<p>Manual Magic AI uses AI technology in the following ways:</p><ul className={`list-disc pl-4`}><li><strong>Content Generation:</strong> Our AI helps generate and structure SOPs, checklists, FAQs, and operational documentation based on your inputs.</li><li><strong>Content Structuring:</strong> AI assists in organising your operational knowledge into clear, consistent formats.</li></ul>"},{__typename:"ContentSection",title:"Our AI Principles",content:"<p>We are committed to the following principles in our AI development and usage:</p><ul className={`list-disc pl-4`}><li><strong>Human-Centered:</strong> AI serves as a tool to enhance human expertise and productivity, not replace it. You always maintain final control over your content.</li><li><strong>Transparency:</strong> We clearly communicate when and how AI is used in our platform.</li><li><strong>Privacy:</strong> We respect your data privacy and only use your content to provide and improve our services.</li><li><strong>Quality:</strong> We continuously work to improve our AI systems to ensure high-quality, relevant content generation.</li><li><strong>Fairness:</strong> We strive to prevent bias in our AI systems and ensure fair treatment for all users.</li><li><strong>Safety:</strong> We recommend that AI-generated content, especially for safety-critical procedures, be reviewed by appropriate subject matter experts before implementation.</li></ul>"},{__typename:"ContentSection",title:"Your Control Over AI Content",content:"<p>While our AI generates content based on your input, you always maintain control over the final output. You can:</p><ul className={`list-disc pl-4`}><li>Review all AI-generated SOPs, checklists, and documentation</li><li>Edit and refine AI-generated content to match your specific requirements</li><li>Reject content that doesn't meet your standards</li><li>Provide feedback to help improve our AI systems</li><li>
1383Choose which content to publish or distribute</li></ul><p>We believe in a collaborative approach where AI assists in the content creation process, but you make the final decisions about your operational documentation.</p>"},{__typename:"ContentSection",title:"Data Usage and Training",content:'<p>To provide our services, we need to process your content using our AI systems. Here\'s how we handle your data:</p><ul className={`list-disc pl-4`}><li>We may use anonymised patterns from content generation to improve our AI systems.</li><li>We do not share your specific content with other users or third parties without your permission.</li><li>We implement strong security measures to protect your data.</li><li>Your operational content remains your intellectual property.</li></ul><p>For more details on how we handle your data, please refer to our <a href="/privacy-policy" class="text-primary hover:underline">Privacy Policy</a>.</p>'},{__typename:"ContentSection",title:"Continuous Improvement",content:"<p>AI technology is rapidly evolving, and we are committed to staying at the forefront of responsible AI development. We regularly review and update our AI systems and policies to:</p><ul className={`list-disc pl-4`}><li>Incorporate the latest advancements in AI technology</li><li>Address any emerging ethical considerations</li><li>Improve the quality and relevance of generated SOPs and documentation</li><li>Enhance the user experience</li></ul><p>We welcome your feedback on our AI features and how we can better serve your operational documentation needs.</p>"},{__typename:"ContentSection",title:"Contact Us",content:'<p>If you have any questions or concerns about our AI policy or how we use AI in our platform, please contact us at <a href="mailto:[email protected]" class="text-primary hover:underline">[email protected]</a>.</p><p>Manual Writers International<br>United Kingdom</p><p>Last Updated: January 2026</p>'}]}];function getPageBySlug(ds){return pages.find(dn=>dn.slug===ds)}const container="_container_v899w_1",article="_article_v899w_20",title="_title_v899w_25",content$2="_content_v899w_32",articleImage="_articleImage_v899w_71",image$2="_image_v899w_78",styles$2={container,article,title,content:content$2,articleImage,image:image$2};function ok$1(){}function unreachable(){}function stringify$1(ds,dn){const ms={};return(ds[ds.length-1]===""?[...ds,""]:ds).join((ms.padRight?" ":"")+","+(ms.padLeft===!1?"":" ")).trim()}const nameRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nameReJsx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,emptyOptions$3={};function name(ds,dn){return(emptyOptions$3.jsx?nameReJsx:nameRe).test(ds)}const re$2=/[ \t\n\f\r]/g;function whitespace(ds){return typeof ds=="object"?ds.type==="text"?empty$1(ds.value):!1:empty$1(ds)}function empty$1(ds){return ds.replace(re$2,"")===""}class Schema{constructor(dn,ms,xs){this.normal=ms,this.property=dn,xs&&(this.space=xs)}}Schema.prototype.normal={};Schema.prototype.property={};Schema.prototype.space=void 0;function merge(ds,dn){const ms={},xs={};for(const bs of ds)Object.assign(ms,bs.property),Object.assign(xs,bs.normal);return new Schema(ms,xs,dn)}function normalize$1(ds){return ds.toLowerCase()}let Info$1=class{constructor(dn,ms){this.attribute=ms,this.property=dn}};Info$1.prototype.attribute="";Info$1.prototype.booleanish=!1;Info$1.prototype.boolean=!1;Info$1.prototype.commaOrSpaceSeparated=!1;Info$1.prototype.commaSeparated=!1;Info$1.prototype.defined=!1;Info$1.prototype.mustUseProperty=!1;Info$1.prototype.number=!1;Info$1.prototype.overloadedBoolean=!1;Info$1.prototype.property="";Info$1.prototype.spaceSeparated=!1;Info$1.prototype.space=void 0;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types);class DefinedInfo extends Info$1{constructor(dn,ms,xs,bs){let Es=-1;if(super(dn,ms),mark(this,"space",bs),typeof xs=="number")for(;++Es<checks.length;){const ws=checks[Es];mark(this,checks[Es],(xs&types[ws])===types[ws])}}}DefinedInfo.prototype.defined=!0;function mark(ds,dn,ms){ms&&(ds[dn]=ms)}function create(ds){const dn={},ms={};for(const[xs,bs]of Object.entries(ds.properties)){const Es=new DefinedInfo(xs,ds.transform(ds.attributes||{},xs),bs,ds.space);ds.mustUseProperty&&ds.mustUseProperty.includes(xs)&&(Es.mustUseProperty=!0),dn[xs]=Es,ms[normalize$1(xs)]=xs,ms[normalize$1(Es.attribute)]=xs}return new Schema(dn,ms,ds.space)}const aria=create({properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControl
vendor: 4,369 bytes, line 1383
1383s:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null},transform(ds,dn){return dn==="role"?dn:"aria-"+dn.slice(4).toLowerCase()}});function caseSensitiveTransform(ds,dn){return dn in ds?ds[dn]:dn}function caseInsensitiveTransform(ds,dn){return caseSensitiveTransform(ds,dn.toLowerCase())}const html$3=create({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alpha:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,closedBy:null,colorSpace:null,cols:number,colSpan:number,command:null,commandFor:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:overloadedBoolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,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:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInl
1383ine:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootCustomElementRegistry:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shadowRootSerializable:boolean,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:boolean,disablePictureInPicture:boolean,disableRemotePlayback:boolean,exportParts:commaSeparated,part:spaceSeparated,prefix:null,property:null,results:number,security:null,unselectable:null},space:"html",transform:caseInsensitiveTransform}),svg$1=create({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",maskType:"mask-type",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
1383-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"},properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,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:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,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:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,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,on
vendor: 8,556 bytes, lines 1383-1384
1383Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,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:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:caseSensitiveTransform}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(ds,dn){return"xlink:"+dn.slice(5).toLowerCase()}}),xmlns=create({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(ds,dn){return"xml:"+dn.slice(3).toLowerCase()}}),hastToReact={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"},cap$1=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(ds,dn){const ms=normalize$1(dn);let xs=dn,bs=Info$1;if(ms in ds.normal)return ds.property[ds.normal[ms]];if(ms.length>4&&ms.slice(0,4)==="data"&&valid.test(dn)){if(dn.charAt(4)==="-"){const Es=dn.slice(5).replace(dash,camelcase);xs="data"+Es.charAt(0).toUpperCase()+Es.slice(1)}else{const Es=dn.slice(4);if(!dash.test(Es)){let ws=Es.replace(cap$1,kebab);ws.charAt(0)!=="-"&&(ws="-"+ws),dn="data"+ws}}bs=DefinedInfo}return new bs(xs,dn)}function kebab(ds){return"-"+ds.toLowerCase()}function camelcase(ds){return ds.charAt(1).toUpperCase()}const html$2=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");function stringify(ds){return ds.join(" ").trim()}var cjs$2={},cjs$1,hasRequiredCjs$2;function requireCjs$2(){if(hasRequiredCjs$2)return cjs$1;hasRequiredCjs$2=1;var ds=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,dn=/\n/g,ms=/^\s*/,xs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bs=/^:\s*/,Es=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ws=/^[;\s]*/,Rs=/^\s+|\s+$/g,js=`
1384`,Cs="/",As="*",ks="",Os="comment",Ms="declaration";function Ds(Ls,Bs){if(typeof Ls!="string")throw new TypeError("First argument must be a string");if(!Ls)return[];Bs=Bs||{};var Fs=1,Us=1;function Gs(ea){var ta=ea.match(dn);ta&&(Fs+=ta.length);var aa=ea.lastIndexOf(js);Us=~aa?ea.length-aa:Us+ea.length}function Js(){var ea={line:Fs,column:Us};return function(ta){return ta.position=new Ws(ea),Qs(),ta}}function Ws(ea){this.start=ea,this.end={line:Fs,column:Us},this.source=Bs.source}Ws.prototype.content=Ls;function Zs(ea){var ta=new Error(Bs.source+":"+Fs+":"+Us+": "+ea);if(ta.reason=ea,ta.filename=Bs.source,ta.line=Fs,ta.column=Us,ta.source=Ls,!Bs.silent)throw ta}function Ys(ea){var ta=ea.exec(Ls);if(ta){var aa=ta[0];return Gs(aa),Ls=Ls.slice(aa.length),ta}}function Qs(){Ys(ms)}function ai(ea){var ta;for(ea=ea||[];ta=ia();)ta!==!1&&ea.push(ta);return ea}function ia(){var ea=Js();if(!(Cs!=Ls.charAt(0)||As!=Ls.charAt(1))){for(var ta=2;ks!=Ls.charAt(ta)&&(As!=Ls.charAt(ta)||Cs!=Ls.charAt(ta+1));)++ta;if(ta+=2,ks===Ls.charAt(ta-1))return Zs("End of comment missing");var aa=Ls.slice(2,ta-2);return Us+=2,Gs(aa),Ls=Ls.slice(ta),Us+=2,ea({type:Os,comment:aa})}}function ca(){var ea=Js(),ta=Ys(xs);if(ta){if(ia(),!Ys(bs))return Zs("property missing ':'");var aa=Ys(Es),fa=ea({type:Ms,property:Ps(ta[0].replace(ds,ks)),value:aa?Ps(aa[0].replace(ds,ks)):ks});return Ys(ws),fa}}function ha(){var ea=[];ai(ea);for(var ta;ta=ca();)ta!==!1&&(ea.push(ta),ai(ea));return ea}return Qs(),ha()}function Ps(Ls){return Ls?Ls.replace(Rs,ks):ks}return cjs$1=Ds,cjs$1}var hasRequiredCjs$1;function requireCjs$1(){if(hasRequiredCjs$1)return cjs$2;hasRequiredCjs$1=1;var ds=cjs$2&&cjs$2.__importDefault||function(xs){return xs&&xs.__esModule?xs:{default:xs}};Object.defineProperty(cjs$2,"__esModule",{value:!0}),cjs$2.default=ms;const dn=ds(requireCjs$2());function ms(xs,bs){let Es=null;if(!xs||typeof xs!="string")return Es;const ws=(0,dn.default)(xs),Rs=typeof bs=="function";return ws.forEach(js=>{if(js.type!=="declaration")return;const{property:Cs,value:As}=js;Rs?bs(Cs,As,js):As&&(Es=Es||{},Es[Cs]=As)}),Es}return cjs$2}var utilities={},hasRequiredUtilities;function requireUtilities(){if(hasRequiredUtilities)return utilities;hasRequiredUtilities=1,Object.defineProperty(utilities,"__esModule",{value:!0}),utilities.camelCase=void 0;var ds=/^--[a-zA-Z0-9_-]+$/,dn=/-([a-z])/g,ms=/^[^-]+$/,xs=/^-(webkit|moz|ms|o|khtml)-/,bs=/^-(ms)-/,Es=function(Cs){return!Cs||ms.test(Cs)||ds.test(Cs)},ws=function(Cs,As){return As.toUpperCase()},Rs=function(Cs,As){return"".concat(As,"-")},js=function(Cs,As){return As===void 0&&(As={}),Es(Cs)?Cs:(Cs=Cs.toLowerCase(),As.reactCompat?Cs=Cs.replace(bs,Rs):Cs=Cs.replace(xs,Rs),Cs.replace(dn,ws))};return utilities.camelCase=js,utilities}var cjs,hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var ds=cjs&&cjs.__importDefault||function(bs){return bs&&bs.__esModule?bs:{default:bs}},dn=ds(requireCjs$1()),ms=requireUtilities();function xs(bs,Es){var ws={};return!bs||typeof bs!="string"||(0,dn.default)(bs,function(Rs,js){Rs&&js&&(ws[(0,ms.camelCase)(Rs,Es)]=js)}),ws}return xs.default=xs,cjs=xs,cjs}var cjsExports=requireCjs();const styleToJs=getDefaultExportFromCjs(cjsExports),pointEnd=point$2("end"),pointStart=point$2("start");function point$2(ds){return dn;function dn(ms){const xs=ms&&ms.position&&ms.position[ds]||{};if(typeof xs.line=="number"&&xs.line>0&&typeof xs.column=="number"&&xs.column>0)return{line:xs.line,column:xs.column,offset:typeof xs.offset=="number"&&xs.offset>-1?xs.offset:void 0}}}function position$1(ds){const dn=pointStart(ds),ms=pointEnd(ds);if(dn&&ms)return{start:dn,end:ms}}function stringifyPosition(ds){return!ds||typeof ds!="object"?"":"position"in ds||"type"in ds?position(ds.position):"start"in ds||"end"in ds?position(ds):"line"in ds||"column"in ds?point$1(ds):""}function point$1(ds){return index(ds&&ds.line)+":"+index(ds&&ds.column)}function position(ds){return point$1(ds&&ds.start)+"-"+point$1(ds&&ds.end)}function index(ds){return ds&&typeof ds=="number"?ds:1}
vendor: 2,229 bytes, line 1384
1384class VFileMessage extends Error{constructor(dn,ms,xs){super(),typeof ms=="string"&&(xs=ms,ms=void 0);let bs="",Es={},ws=!1;if(ms&&("line"in ms&&"column"in ms?Es={place:ms}:"start"in ms&&"end"in ms?Es={place:ms}:"type"in ms?Es={ancestors:[ms],place:ms.position}:Es={...ms}),typeof dn=="string"?bs=dn:!Es.cause&&dn&&(ws=!0,bs=dn.message,Es.cause=dn),!Es.ruleId&&!Es.source&&typeof xs=="string"){const js=xs.indexOf(":");js===-1?Es.ruleId=xs:(Es.source=xs.slice(0,js),Es.ruleId=xs.slice(js+1))}if(!Es.place&&Es.ancestors&&Es.ancestors){const js=Es.ancestors[Es.ancestors.length-1];js&&(Es.place=js.position)}const Rs=Es.place&&"start"in Es.place?Es.place.start:Es.place;this.ancestors=Es.ancestors||void 0,this.cause=Es.cause||void 0,this.column=Rs?Rs.column:void 0,this.fatal=void 0,this.file="",this.message=bs,this.line=Rs?Rs.line:void 0,this.name=stringifyPosition(Es.place)||"1:1",this.place=Es.place||void 0,this.reason=this.message,this.ruleId=Es.ruleId||void 0,this.source=Es.source||void 0,this.stack=ws&&Es.cause&&typeof Es.cause.stack=="string"?Es.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const own$3={}.hasOwnProperty,emptyMap=new Map,cap=/[A-Z]/g,tableElements=new Set(["table","tbody","thead","tfoot","tr"]),tableCellElement=new Set(["td","th"]),docs="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function toJsxRuntime(ds,dn){if(!dn||dn.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const ms=dn.filePath||void 0;let xs;if(dn.development){if(typeof dn.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");xs=developmentCreate(ms,dn.jsxDEV)}else{if(typeof dn.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 4,247 bytes, line 1384
1384if(typeof dn.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");xs=productionCreate(ms,dn.jsx,dn.jsxs)}const bs={Fragment:dn.Fragment,ancestors:[],components:dn.components||{},create:xs,elementAttributeNameCase:dn.elementAttributeNameCase||"react",evaluater:dn.createEvaluater?dn.createEvaluater():void 0,filePath:ms,ignoreInvalidStyle:dn.ignoreInvalidStyle||!1,passKeys:dn.passKeys!==!1,passNode:dn.passNode||!1,schema:dn.space==="svg"?svg:html$2,stylePropertyNameCase:dn.stylePropertyNameCase||"dom",tableCellAlignToStyle:dn.tableCellAlignToStyle!==!1},Es=one$1(bs,ds,void 0);return Es&&typeof Es!="string"?Es:bs.create(ds,bs.Fragment,{children:Es||void 0},void 0)}function one$1(ds,dn,ms){if(dn.type==="element")return element$1(ds,dn,ms);if(dn.type==="mdxFlowExpression"||dn.type==="mdxTextExpression")return mdxExpression(ds,dn);if(dn.type==="mdxJsxFlowElement"||dn.type==="mdxJsxTextElement")return mdxJsxElement(ds,dn,ms);if(dn.type==="mdxjsEsm")return mdxEsm(ds,dn);if(dn.type==="root")return root$3(ds,dn,ms);if(dn.type==="text")return text$5(ds,dn)}function element$1(ds,dn,ms){const xs=ds.schema;let bs=xs;dn.tagName.toLowerCase()==="svg"&&xs.space==="html"&&(bs=svg,ds.schema=bs),ds.ancestors.push(dn);const Es=findComponentFromName(ds,dn.tagName,!1),ws=createElementProps(ds,dn);let Rs=createChildren(ds,dn);return tableElements.has(dn.tagName)&&(Rs=Rs.filter(function(js){return typeof js=="string"?!whitespace(js):!0})),addNode(ds,ws,Es,dn),addChildren(ws,Rs),ds.ancestors.pop(),ds.schema=xs,ds.create(dn,Es,ws,ms)}function mdxExpression(ds,dn){if(dn.data&&dn.data.estree&&ds.evaluater){const xs=dn.data.estree.body[0];return xs.type,ds.evaluater.evaluateExpression(xs.expression)}crashEstree(ds,dn.position)}function mdxEsm(ds,dn){if(dn.data&&dn.data.estree&&ds.evaluater)return ds.evaluater.evaluateProgram(dn.data.estree);crashEstree(ds,dn.position)}function mdxJsxElement(ds,dn,ms){const xs=ds.schema;let bs=xs;dn.name==="svg"&&xs.space==="html"&&(bs=svg,ds.schema=bs),ds.ancestors.push(dn);const Es=dn.name===null?ds.Fragment:findComponentFromName(ds,dn.name,!0),ws=createJsxElementProps(ds,dn),Rs=createChildren(ds,dn);return addNode(ds,ws,Es,dn),addChildren(ws,Rs),ds.ancestors.pop(),ds.schema=xs,ds.create(dn,Es,ws,ms)}function root$3(ds,dn,ms){const xs={};return addChildren(xs,createChildren(ds,dn)),ds.create(dn,ds.Fragment,xs,ms)}function text$5(ds,dn){return dn.value}function addNode(ds,dn,ms,xs){typeof ms!="string"&&ms!==ds.Fragment&&ds.passNode&&(dn.node=xs)}function addChildren(ds,dn){if(dn.length>0){const ms=dn.length>1?dn:dn[0];ms&&(ds.children=ms)}}function productionCreate(ds,dn,ms){return xs;function xs(bs,Es,ws,Rs){const Cs=Array.isArray(ws.children)?ms:dn;return Rs?Cs(Es,ws,Rs):Cs(Es,ws)}}function developmentCreate(ds,dn){return ms;function ms(xs,bs,Es,ws){const Rs=Array.isArray(Es.children),js=pointStart(xs);return dn(bs,Es,ws,Rs,{columnNumber:js?js.column-1:void 0,fileName:ds,lineNumber:js?js.line:void 0},void 0)}}function createElementProps(ds,dn){const ms={};let xs,bs;for(bs in dn.properties)if(bs!=="children"&&own$3.call(dn.properties,bs)){const Es=createProperty(ds,bs,dn.properties[bs]);if(Es){const[ws,Rs]=Es;ds.tableCellAlignToStyle&&ws==="align"&&typeof Rs=="string"&&tableCellElement.has(dn.tagName)?xs=Rs:ms[ws]=Rs}}if(xs){const Es=ms.style||(ms.style={});Es[ds.stylePropertyNameCase==="css"?"text-align":"textAlign"]=xs}return ms}function createJsxElementProps(ds,dn){const ms={};for(const xs of dn.attributes)if(xs.type==="mdxJsxExpressionAttribute")if(xs.data&&xs.data.estree&&ds.evaluater){const Es=xs.data.estree.body[0];Es.type;const ws=Es.expression;ws.type;const Rs=ws.properties[0];Rs.type,Object.assign(ms,ds.evaluater.evaluateExpression(Rs.argument))}else crashEstree(ds,dn.position);else{const bs=xs.name;let Es;if(xs.value&&typeof xs.value=="object")if(xs.value.data&&xs.value.data.estree&&ds.evaluater){const Rs=xs.value.data.estree.body[0];Rs.type,Es=ds.evaluater.evaluateExpression(Rs.expression)}else crashEstree(ds,dn.position);else Es=xs.value===null?!0:xs.value;ms[bs]=Es}return ms}function createChildren(ds,dn){const ms=[];let xs=-1;const bs=ds.passKeys?new Map:emptyMap;for(;++xs<dn.children.length;){const Es=dn.children[xs];let ws;
vendor: 4,327 bytes, line 1384
1384if(ds.passKeys){const js=Es.type==="element"?Es.tagName:Es.type==="mdxJsxFlowElement"||Es.type==="mdxJsxTextElement"?Es.name:void 0;if(js){const Cs=bs.get(js)||0;ws=js+"-"+Cs,bs.set(js,Cs+1)}}const Rs=one$1(ds,Es,ws);Rs!==void 0&&ms.push(Rs)}return ms}function createProperty(ds,dn,ms){const xs=find(ds.schema,dn);if(!(ms==null||typeof ms=="number"&&Number.isNaN(ms))){if(Array.isArray(ms)&&(ms=xs.commaSeparated?stringify$1(ms):stringify(ms)),xs.property==="style"){let bs=typeof ms=="object"?ms:parseStyle(ds,String(ms));return ds.stylePropertyNameCase==="css"&&(bs=transformStylesToCssCasing(bs)),["style",bs]}return[ds.elementAttributeNameCase==="react"&&xs.space?hastToReact[xs.property]||xs.property:xs.attribute,ms]}}function parseStyle(ds,dn){try{return styleToJs(dn,{reactCompat:!0})}catch(ms){if(ds.ignoreInvalidStyle)return{};const xs=ms,bs=new VFileMessage("Cannot parse `style` attribute",{ancestors:ds.ancestors,cause:xs,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw bs.file=ds.filePath||void 0,bs.url=docs+"#cannot-parse-style-attribute",bs}}function findComponentFromName(ds,dn,ms){let xs;if(!ms)xs={type:"Literal",value:dn};else if(dn.includes(".")){const bs=dn.split(".");let Es=-1,ws;for(;++Es<bs.length;){const Rs=name(bs[Es])?{type:"Identifier",name:bs[Es]}:{type:"Literal",value:bs[Es]};ws=ws?{type:"MemberExpression",object:ws,property:Rs,computed:!!(Es&&Rs.type==="Literal"),optional:!1}:Rs}xs=ws}else xs=name(dn)&&!/^[a-z]/.test(dn)?{type:"Identifier",name:dn}:{type:"Literal",value:dn};if(xs.type==="Literal"){const bs=xs.value;return own$3.call(ds.components,bs)?ds.components[bs]:bs}if(ds.evaluater)return ds.evaluater.evaluateExpression(xs);crashEstree(ds)}function crashEstree(ds,dn){const ms=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:ds.ancestors,place:dn,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw ms.file=ds.filePath||void 0,ms.url=docs+"#cannot-handle-mdx-estrees-without-createevaluater",ms}function transformStylesToCssCasing(ds){const dn={};let ms;for(ms in ds)own$3.call(ds,ms)&&(dn[transformStyleToCssCasing(ms)]=ds[ms]);return dn}function transformStyleToCssCasing(ds){let dn=ds.replace(cap,toDash);return dn.slice(0,3)==="ms-"&&(dn="-"+dn),dn}function toDash(ds){return"-"+ds.toLowerCase()}const urlAttributes={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},emptyOptions$2={};function toString$1(ds,dn){const ms=emptyOptions$2,xs=typeof ms.includeImageAlt=="boolean"?ms.includeImageAlt:!0,bs=typeof ms.includeHtml=="boolean"?ms.includeHtml:!0;return one(ds,xs,bs)}function one(ds,dn,ms){if(node(ds)){if("value"in ds)return ds.type==="html"&&!ms?"":ds.value;if(dn&&"alt"in ds&&ds.alt)return ds.alt;if("children"in ds)return all(ds.children,dn,ms)}return Array.isArray(ds)?all(ds,dn,ms):""}function all(ds,dn,ms){const xs=[];let bs=-1;for(;++bs<ds.length;)xs[bs]=one(ds[bs],dn,ms);return xs.join("")}function node(ds){return!!(ds&&typeof ds=="object")}const element=document.createElement("i");function decodeNamedCharacterReference(ds){const dn="&"+ds+";";element.innerHTML=dn;const ms=element.textContent;return ms.charCodeAt(ms.length-1)===59&&ds!=="semi"||ms===dn?!1:ms}function splice(ds,dn,ms,xs){const bs=ds.length;let Es=0,ws;if(dn<0?dn=-dn>bs?0:bs+dn:dn=dn>bs?bs:dn,ms=ms>0?ms:0,xs.length<1e4)ws=Array.from(xs),ws.unshift(dn,ms),ds.splice(...ws);else for(ms&&ds.splice(dn,ms);Es<xs.length;)ws=xs.slice(Es,Es+1e4),ws.unshift(dn,0),ds.splice(...ws),Es+=1e4,dn+=1e4}function push(ds,dn){return ds.length>0?(splice(ds,ds.length,0,dn),ds):dn}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(ds){const dn={};let ms=-1;for(;++ms<ds.length;)syntaxExtension(dn,ds[ms]);return dn}function syntaxExtension(ds,dn){let ms;for(ms in dn){const bs=(hasOwnProperty.call(ds,ms)?ds[ms]:void 0)||(ds[ms]={}),Es=dn[ms];let ws;if(Es)for(ws in Es){hasOwnProperty.call(bs,ws)||(bs[ws]=[]);const Rs=Es[ws];constructs(bs[ws],Array.isArray(Rs)?Rs:Rs?[Rs]:[])}}}function constructs(ds,dn){let ms=-1;const xs=[];for(;++ms<dn.length;)(dn[ms].add==="after"?ds:xs).push(dn[ms]);
vendor: 11,245 bytes, line 1384
1384splice(ds,0,0,xs)}function decodeNumericCharacterReference(ds,dn){const ms=Number.parseInt(ds,dn);return ms<9||ms===11||ms>13&&ms<32||ms>126&&ms<160||ms>55295&&ms<57344||ms>64975&&ms<65008||(ms&65535)===65535||(ms&65535)===65534||ms>1114111?"�":String.fromCodePoint(ms)}function normalizeIdentifier(ds){return ds.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(ds){return ds!==null&&(ds<32||ds===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(ds){return ds!==null&&ds<-2}function markdownLineEndingOrSpace(ds){return ds!==null&&(ds<0||ds===32)}function markdownSpace(ds){return ds===-2||ds===-1||ds===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(ds){return dn;function dn(ms){return ms!==null&&ms>-1&&ds.test(String.fromCharCode(ms))}}function normalizeUri(ds){const dn=[];let ms=-1,xs=0,bs=0;for(;++ms<ds.length;){const Es=ds.charCodeAt(ms);let ws="";if(Es===37&&asciiAlphanumeric(ds.charCodeAt(ms+1))&&asciiAlphanumeric(ds.charCodeAt(ms+2)))bs=2;else if(Es<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(Es))||(ws=String.fromCharCode(Es));else if(Es>55295&&Es<57344){const Rs=ds.charCodeAt(ms+1);Es<56320&&Rs>56319&&Rs<57344?(ws=String.fromCharCode(Es,Rs),bs=1):ws="�"}else ws=String.fromCharCode(Es);ws&&(dn.push(ds.slice(xs,ms),encodeURIComponent(ws)),xs=ms+bs+1,ws=""),bs&&(ms+=bs,bs=0)}return dn.join("")+ds.slice(xs)}function factorySpace(ds,dn,ms,xs){const bs=xs?xs-1:1/0;let Es=0;return ws;function ws(js){return markdownSpace(js)?(ds.enter(ms),Rs(js)):dn(js)}function Rs(js){return markdownSpace(js)&&Es++<bs?(ds.consume(js),Rs):(ds.exit(ms),dn(js))}}function factorySpaceMinMax(ds,dn,ms,xs,bs,Es){let ws=0;return Rs;function Rs(As){return markdownSpace(As)?(ds.enter(xs),js(As)):Cs(As)}function js(As){return markdownSpace(As)&&ws<Es?(ds.consume(As),ws++,js):(ds.exit(xs),Cs(As))}function Cs(As){return ws>=bs?dn(As):ms(As)}}const content$1={tokenize:initializeContent};function initializeContent(ds){const dn=ds.attempt(this.parser.constructs.contentInitial,xs,bs);let ms;return dn;function xs(Rs){if(Rs===null){ds.consume(Rs);return}return ds.enter("lineEnding"),ds.consume(Rs),ds.exit("lineEnding"),factorySpace(ds,dn,"linePrefix")}function bs(Rs){return ds.enter("paragraph"),Es(Rs)}function Es(Rs){const js=ds.enter("chunkText",{contentType:"text",previous:ms});return ms&&(ms.next=js),ms=js,ws(Rs)}function ws(Rs){if(Rs===null){ds.exit("chunkText"),ds.exit("paragraph"),ds.consume(Rs);return}return markdownLineEnding(Rs)?(ds.consume(Rs),ds.exit("chunkText"),Es):(ds.consume(Rs),ws)}}let EditMap$1=class{constructor(){this.index=new Map,this.map=[]}add(dn,ms,xs){addImplementation$1(this,dn,ms,xs,!1)}addBefore(dn,ms,xs){addImplementation$1(this,dn,ms,xs,!0)}consume(dn){if(this.map.sort(function(Es,ws){return Es[0]-ws[0]}),this.map.length===0)return;let ms=this.map.length;const xs=[];for(;ms>0;)ms-=1,xs.push(dn.slice(this.map[ms][0]+this.map[ms][1]),this.map[ms][2]),dn.length=this.map[ms][0];xs.push(dn.slice()),dn.length=0;let bs=xs.pop();for(;bs;){for(const Es of bs)dn.push(Es);bs=xs.pop()}this.map.length=0,this.index.clear()}};function addImplementation$1(ds,dn,ms,xs,bs){if(ms===0&&xs.length===0)return;const Es=ds.index.get(dn);if(Es){Es[1]+=ms,bs?(xs.push(...Es[2]),Es[2]=xs):Es[2].push(...xs);return}const ws=[dn,ms,xs];ds.map.push(ws),ds.index.set(dn,ws)}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(ds){const dn=this,ms=[];let xs=0,bs,Es,ws;return Rs;function Rs(Us){if(xs<ms.length){const Gs=ms[xs];return dn.containerState=Gs[1],ds.attempt(Gs[0].continuation,js,Cs)(Us)}return Cs(Us)}function js(Us){if(xs++,dn.containerState._closeFlow){dn.containerState._closeFlow=void 0,bs&&Fs();const Gs=dn.events.length;let Js=Gs,Ws;for(;Js--;)if(dn.events[Js][0]==="exit"&&dn.events[Js][1].type==="chunkFlow"){Ws=dn.events[Js][1].end;break}Bs(xs);let Zs=Gs;for(;Zs<dn.events.length;)dn.events[Zs][1].end={...Ws},Zs++;const Ys=new EditMap$1;return Ys.add(Js+1,0,dn.events.slice(Gs)),Ys.add(Gs,Zs-Gs,[]),Ys.consume(dn.events),Cs(Us)}return Rs(Us)}function Cs(Us){if(xs===ms.length){if(!bs)return Os(Us);if(bs.currentConstruct&&bs.currentConstruct.concrete)return Ds(Us);dn.interrupt=!!(bs.currentConstruct&&!bs._gfmTableDynamicInterruptHack)}return dn.containerState={},ds.check(containerConstruct,As,ks)(Us)}function As(Us){return bs&&Fs(),Bs(xs),Os(Us)}function ks(Us){return dn.parser.lazy[dn.now().line]=xs!==ms.length,ws=dn.now().offset,Ds(Us)}function Os(Us){return dn.containerState={},ds.attempt(containerConstruct,Ms,Ds)(Us)}function Ms(Us){return xs++,ms.push([dn.currentConstruct,dn.containerState]),Os(Us)}function Ds(Us){if(Us===null){bs&&Fs(),Bs(0),ds.consume(Us);return}return bs=bs||dn.parser.flow(dn.now()),ds.enter("chunkFlow",{_tokenizer:bs,contentType:"flow",previous:Es}),Ps(Us)}function Ps(Us){if(Us===null){Ls(ds.exit("chunkFlow"),!0),Bs(0),ds.consume(Us);return}return markdownLineEnding(Us)?(ds.consume(Us),Ls(ds.exit("chunkFlow")),xs=0,dn.interrupt=void 0,Rs):(ds.consume(Us),Ps)}function Ls(Us,Gs){const Js=dn.sliceStream(Us);if(Gs&&Js.push(null),Us.previous=Es,Es&&(Es.next=Us),Es=Us,bs.defineSkip(Us.start),bs.write(Js),dn.parser.lazy[Us.start.line]){let Ws=bs.events.length;for(;Ws--;)if(bs.events[Ws][1].start.offset<ws&&(!bs.events[Ws][1].end||bs.events[Ws][1].end.offset>ws))return;const Zs=dn.events.length;let Ys=Zs,Qs,ai;for(;Ys--;)if(dn.events[Ys][0]==="exit"&&dn.events[Ys][1].type==="chunkFlow"){if(Qs){ai=dn.events[Ys][1].end;break}Qs=!0}for(Bs(xs),Ws=Zs;Ws<dn.events.length;)dn.events[Ws][1].end={...ai},Ws++;const ia=new EditMap$1;ia.add(Ys+1,0,dn.events.slice(Zs)),ia.add(Zs,Ws-Zs,[]),ia.consume(dn.events)}}function Bs(Us){let Gs=ms.length;for(;Gs-- >Us;){const Js=ms[Gs];dn.containerState=Js[1],Js[0].exit.call(dn,ds)}ms.length=Us}function Fs(){bs.write([null]),Es=void 0,bs=void 0,dn.containerState._closeFlow=void 0}}function tokenizeContainer(ds,dn,ms){return factorySpace(ds,ds.attempt(this.parser.constructs.document,dn,ms),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(ds){if(ds===null||markdownLineEndingOrSpace(ds)||unicodeWhitespace(ds))return 1;if(unicodePunctuation(ds))return 2}function resolveAll(ds,dn,ms){const xs=[];let bs=-1;for(;++bs<ds.length;){const Es=ds[bs].resolveAll;Es&&!xs.includes(Es)&&(dn=Es(dn,ms),xs.push(Es))}return dn}const attention$2={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(ds,dn){let ms=-1,xs;for(;++ms<ds.length;)if(ds[ms][0]==="enter"&&ds[ms][1].type==="attentionSequence"&&ds[ms][1]._close){let bs=ms;for(;bs--;)if(ds[bs][0]==="exit"&&ds[bs][1].type==="attentionSequence"&&ds[bs][1]._open&&dn.sliceSerialize(ds[bs][1]).charCodeAt(0)===dn.sliceSerialize(ds[ms][1]).charCodeAt(0)){if((ds[bs][1]._close||ds[ms][1]._open)&&(ds[ms][1].end.offset-ds[ms][1].start.offset)%3&&!((ds[bs][1].end.offset-ds[bs][1].start.offset+ds[ms][1].end.offset-ds[ms][1].start.offset)%3))continue;const Es=ds[bs][1].end.offset-ds[bs][1].start.offset>1&&ds[ms][1].end.offset-ds[ms][1].start.offset>1?2:1,ws={...ds[bs][1].end},Rs={...ds[ms][1].start};movePoint(ws,-Es),movePoint(Rs,Es);const js={type:Es>1?"strongSequence":"emphasisSequence",start:ws,end:{...ds[bs][1].end}},Cs={type:Es>1?"strongSequence":"emphasisSequence",start:{...ds[ms][1].start},end:Rs},As={type:Es>1?"strongText":"emphasisText",start:{...ds[bs][1].end},end:{...ds[ms][1].start}},ks={type:Es>1?"strong":"emphasis",start:{...js.start},end:{...Cs.end}};ds[bs][1].end={...js.start},ds[ms][1].start={...Cs.end},xs=[],ds[bs][1].end.offset-ds[bs][1].start.offset&&(xs=push(xs,[["enter",ds[bs][1],dn],["exit",ds[bs][1],dn]])),xs=push(xs,[["enter",ks,dn],["enter",js,dn],["exit",js,dn],["enter",As,dn]]),xs=push(xs,resolveAll(dn.parser.constructs.insideSpan.null,ds.slice(bs+1,ms),dn)),xs=push(xs,[["exit",As,dn],["enter",Cs,dn],["exit",Cs,dn],["exit",ks,dn]]);let Os=0;ds[ms][1].end.offset-ds[ms][1].start.offset&&(Os=2,xs=push(xs,[["enter",ds[ms][1],dn],["exit",ds[ms][1],dn]])),splice(ds,bs-1,ms-bs+3,xs),ms=bs+xs.length-Os-2;break}}for(ms=-1;++ms<ds.length;)ds[ms][1].type==="attentionSequence"&&(ds[ms][1].type="data");return ds}function tokenizeAttention(ds,dn){const ms=this.parser.constructs.attentionMarkers.null,xs=this.previous,bs=classifyCharacter(xs);let Es;return ws;function ws(js){return Es=js,ds.enter("attentionSequence"),Rs(js)}function Rs(js){if(js===Es)return ds.consume(js),Rs;const Cs=ds.exit("attentionSequence"),As=classifyCharacter(js),ks=!As||As===2&&bs||ms.includes(js)&&js!==42&&js!==95,Os=!bs||bs===2&&As||ms.includes(xs)&&xs!==42&&xs!==95;return Cs._open=!!(Es===42?ks:ks&&(bs||!Os)),Cs._close=!!(Es===42?Os:Os&&(As||!ks)),dn(js)}}function movePoint(ds,dn){ds.column+=dn,ds.offset+=dn,ds._bufferIndex+=dn}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(ds,dn,ms){let xs=0;return bs;function bs(Ms){return ds.enter("autolink"),ds.enter("autolinkMarker"),ds.consume(Ms),ds.exit("autolinkMarker"),ds.enter("autolinkProtocol"),Es}function Es(Ms){return asciiAlpha(Ms)?(ds.consume(Ms),ws):Ms===64?ms(Ms):Cs(Ms)}function ws(Ms){return Ms===43||Ms===45||Ms===46||asciiAlphanumeric(Ms)?(xs=1,Rs(Ms)):Cs(Ms)}function Rs(Ms){return Ms===58?(ds.consume(Ms),xs=0,js):(Ms===43||Ms===45||Ms===46||asciiAlphanumeric(Ms))&&xs++<32?(ds.consume(Ms),Rs):(xs=0,Cs(Ms))}function js(Ms){return Ms===62?(ds.exit("autolinkProtocol"),ds.enter("autolinkMarker"),ds.consume(Ms),ds.exit("autolinkMarker"),ds.exit("autolink"),dn):Ms===null||Ms===32||Ms===60||asciiControl(Ms)?ms(Ms):(ds.consume(Ms),js)}function Cs(Ms){return Ms===64?(ds.consume(Ms),As):asciiAtext(Ms)?(ds.consume(Ms),Cs):ms(Ms)}function As(Ms){return asciiAlphanumeric(Ms)?ks(Ms):ms(Ms)}function ks(Ms){return Ms===46?(ds.consume(Ms),xs=0,As):Ms===62?(ds.exit("autolinkProtocol").type="autolinkEmail",ds.enter("autolinkMarker"),ds.consume(Ms),ds.exit("autolinkMarker"),ds.exit("autolink"),dn):Os(Ms)}function Os(Ms){if((Ms===45||asciiAlphanumeric(Ms))&&xs++<63){const Ds=Ms===45?Os:ks;return ds.consume(Ms),Ds}return ms(Ms)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(ds,dn,ms){return xs;function xs(Es){return markdownSpace(Es)?factorySpace(ds,bs,"linePrefix")(Es):bs(Es)}function bs(Es){return Es===null||markdownLineEnding(Es)?dn(Es):ms(Es)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit$1,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(ds,dn,ms){const xs=this;return bs;function bs(ws){if(ws===62){const Rs=xs.containerState;return Rs.open||(ds.enter("blockQuote",{_container:!0}),Rs.open=!0),ds.enter("blockQuotePrefix"),ds.enter("blockQuoteMarker"),ds.consume(ws),ds.exit("blockQuoteMarker"),Es}return ms(ws)}function Es(ws){return markdownSpace(ws)?(ds.enter("blockQuotePrefixWhitespace"),ds.
vendor: 4,111 bytes, line 1384
1384consume(ws),ds.exit("blockQuotePrefixWhitespace"),ds.exit("blockQuotePrefix"),dn):(ds.exit("blockQuotePrefix"),dn(ws))}}function tokenizeBlockQuoteContinuation(ds,dn,ms){const xs=this;return bs;function bs(ws){return markdownSpace(ws)?factorySpace(ds,Es,"linePrefix",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ws):Es(ws)}function Es(ws){return ds.attempt(blockQuote,dn,ms)(ws)}}function exit$1(ds){ds.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(ds,dn,ms){return xs;function xs(Es){return ds.enter("characterEscape"),ds.enter("escapeMarker"),ds.consume(Es),ds.exit("escapeMarker"),bs}function bs(Es){return asciiPunctuation(Es)?(ds.enter("characterEscapeValue"),ds.consume(Es),ds.exit("characterEscapeValue"),ds.exit("characterEscape"),dn):ms(Es)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(ds,dn,ms){const xs=this;let bs=0,Es,ws;return Rs;function Rs(ks){return ds.enter("characterReference"),ds.enter("characterReferenceMarker"),ds.consume(ks),ds.exit("characterReferenceMarker"),js}function js(ks){return ks===35?(ds.enter("characterReferenceMarkerNumeric"),ds.consume(ks),ds.exit("characterReferenceMarkerNumeric"),Cs):(ds.enter("characterReferenceValue"),Es=31,ws=asciiAlphanumeric,As(ks))}function Cs(ks){return ks===88||ks===120?(ds.enter("characterReferenceMarkerHexadecimal"),ds.consume(ks),ds.exit("characterReferenceMarkerHexadecimal"),ds.enter("characterReferenceValue"),Es=6,ws=asciiHexDigit,As):(ds.enter("characterReferenceValue"),Es=7,ws=asciiDigit,As(ks))}function As(ks){if(ks===59&&bs){const Os=ds.exit("characterReferenceValue");return ws===asciiAlphanumeric&&!decodeNamedCharacterReference(xs.sliceSerialize(Os))?ms(ks):(ds.enter("characterReferenceMarker"),ds.consume(ks),ds.exit("characterReferenceMarker"),ds.exit("characterReference"),dn)}return ws(ks)&&bs++<Es?(ds.consume(ks),As):ms(ks)}}const nonLazyContinuation={partial:!0,tokenize:tokenizeNonLazyContinuation};function tokenizeNonLazyContinuation(ds,dn,ms){const xs=this;return bs;function bs(ws){return ws===null?ms(ws):(ds.enter("lineEnding"),ds.consume(ws),ds.exit("lineEnding"),Es)}function Es(ws){return xs.parser.lazy[xs.now().line]?ms(ws):dn(ws)}}const codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(ds,dn,ms){const xs=this,bs={partial:!0,tokenize:Js};let Es=0,ws=0,Rs;return js;function js(Ws){return Cs(Ws)}function Cs(Ws){const Zs=xs.events[xs.events.length-1];return Es=Zs&&Zs[1].type==="linePrefix"?Zs[2].sliceSerialize(Zs[1],!0).length:0,Rs=Ws,ds.enter("codeFenced"),ds.enter("codeFencedFence"),ds.enter("codeFencedFenceSequence"),As(Ws)}function As(Ws){return Ws===Rs?(ws++,ds.consume(Ws),As):ws<3?ms(Ws):(ds.exit("codeFencedFenceSequence"),markdownSpace(Ws)?factorySpace(ds,ks,"whitespace")(Ws):ks(Ws))}function ks(Ws){return Ws===null||markdownLineEnding(Ws)?(ds.exit("codeFencedFence"),xs.interrupt?dn(Ws):ds.check(nonLazyContinuation,Ps,Gs)(Ws)):(ds.enter("codeFencedFenceInfo"),ds.enter("chunkString",{contentType:"string"}),Os(Ws))}function Os(Ws){return Ws===null||markdownLineEnding(Ws)?(ds.exit("chunkString"),ds.exit("codeFencedFenceInfo"),ks(Ws)):markdownSpace(Ws)?(ds.exit("chunkString"),ds.exit("codeFencedFenceInfo"),factorySpace(ds,Ms,"whitespace")(Ws)):Ws===96&&Ws===Rs?ms(Ws):(ds.consume(Ws),Os)}function Ms(Ws){return Ws===null||markdownLineEnding(Ws)?ks(Ws):(ds.enter("codeFencedFenceMeta"),ds.enter("chunkString",{contentType:"string"}),Ds(Ws))}function Ds(Ws){return Ws===null||markdownLineEnding(Ws)?(ds.exit("chunkString"),ds.exit("codeFencedFenceMeta"),ks(Ws)):Ws===96&&Ws===Rs?ms(Ws):(ds.consume(Ws),Ds)}function Ps(Ws){return ds.attempt(bs,Gs,Ls)(Ws)}function Ls(Ws){return ds.enter("lineEnding"),ds.consume(Ws),ds.exit("lineEnding"),Bs}function Bs(Ws){return Es>0&&markdownSpace(Ws)?factorySpace(ds,Fs,"linePrefix",Es+1)(Ws):Fs(Ws)}function Fs(Ws){return Ws===null||markdownLineEnding(Ws)?ds.check(nonLazyContinuation,Ps,Gs)(Ws):(ds.enter("co
1384deFlowValue"),Us(Ws))}function Us(Ws){return Ws===null||markdownLineEnding(Ws)?(ds.exit("codeFlowValue"),Fs(Ws)):(ds.consume(Ws),Us)}function Gs(Ws){return ds.exit("codeFenced"),dn(Ws)}function Js(Ws,Zs,Ys){let Qs=0;return ai;function ai(ta){return Ws.enter("lineEnding"),Ws.consume(ta),Ws.exit("lineEnding"),ia}function ia(ta){return Ws.enter("codeFencedFence"),markdownSpace(ta)?factorySpace(Ws,ca,"linePrefix",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ta):ca(ta)}function ca(ta){return ta===Rs?(Ws.enter("codeFencedFenceSequence"),ha(ta)):Ys(ta)}function ha(ta){return ta===Rs?(Qs++,Ws.consume(ta),ha):Qs>=ws?(Ws.exit("codeFencedFenceSequence"),markdownSpace(ta)?factorySpace(Ws,ea,"whitespace")(ta):ea(ta)):Ys(ta)}function ea(ta){return ta===null||markdownLineEnding(ta)?(Ws.exit("codeFencedFence"),Zs(ta)):Ys(ta)}}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(ds,dn,ms){return xs;function xs(Rs){return ds.enter("codeIndented"),factorySpaceMinMax(ds,bs,ms,"linePrefix",4,4)(Rs)}function bs(Rs){return Rs===null?ws(Rs):markdownLineEnding(Rs)?ds.attempt(furtherStart,bs,ws)(Rs):(ds.enter("codeFlowValue"),Es(Rs))}function Es(Rs){return Rs===null||markdownLineEnding(Rs)?(ds.exit("codeFlowValue"),bs(Rs)):(ds.consume(Rs),Es)}function ws(Rs){return ds.exit("codeIndented"),dn(Rs)}}function tokenizeFurtherStart(ds,dn,ms){const xs=this;return bs;function bs(ws){return xs.parser.lazy[xs.now().line]?ms(ws):markdownLineEnding(ws)?(ds.enter("lineEnding"),ds.consume(ws),ds.exit("lineEnding"),bs):factorySpaceMinMax(ds,dn,Es,"linePrefix",4,4)(ws)}function Es(ws){return markdownLineEnding(ws)?bs(ws):ms(ws)}}const codeText={name:"codeText",previous:previous$1,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(ds){let dn=ds.length-4,ms=3,xs,bs;if((ds[ms][1].type==="lineEnding"||ds[ms][1].type==="space")&&(ds[dn][1].type==="lineEnding"||ds[dn][1].type==="space")){for(xs=ms;++xs<dn;)if(ds[xs][1].type==="codeTextData"){ds[ms][1].type="codeTextPadding",ds[dn][1].type="codeTextPadding",ms+=2,dn-=2;break}}for(xs=ms-1,dn++;++xs<=dn;)bs===void 0?xs!==dn&&ds[xs][1].type!=="lineEnding"&&(bs=xs):(xs===dn||ds[xs][1].type==="lineEnding")&&(ds[bs][1].type="codeTextData",xs!==bs+2&&(ds[bs][1].end=ds[xs-1][1].end,ds.splice(bs+2,xs-bs-2),dn-=xs-bs-2,xs=bs+2),bs=void 0);return ds}function previous$1(ds){return ds!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tokenizeCodeText(ds,dn,ms){let xs=0,bs,Es;return ws;function ws(ks){return ds.enter("codeText"),ds.enter("codeTextSequence"),Rs(ks)}function Rs(ks){return ks===96?(ds.consume(ks),xs++,Rs):(ds.exit("codeTextSequence"),js(ks))}function js(ks){return ks===null?ms(ks):ks===32?(ds.enter("space"),ds.consume(ks),ds.exit("space"),js):ks===96?(Es=ds.enter("codeTextSequence"),bs=0,As(ks)):markdownLineEnding(ks)?(ds.enter("lineEnding"),ds.consume(ks),ds.exit("lineEnding"),js):(ds.enter("codeTextData"),Cs(ks))}function Cs(ks){return ks===null||ks===32||ks===96||markdownLineEnding(ks)?(ds.exit("codeTextData"),js(ks)):(ds.consume(ks),Cs)}function As(ks){return ks===96?(ds.consume(ks),bs++,As):bs===xs?(ds.exit("codeTextSequence"),ds.exit("codeText"),dn(ks)):(Es.type="codeTextData",Cs(ks))}}class SpliceBuffer{constructor(dn){this.left=dn?[...dn]:[],this.right=[]}get(dn){if(dn<0||dn>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+dn+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return dn<this.left.length?this.left[dn]:this.right[this.right.length-dn+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(dn,ms){const xs=ms??Number.POSITIVE_INFINITY;return xs<this.left.length?this.left.slice(dn,xs):dn>this.left.length?this.right.slice(this.right.length-xs+this.left.length,this.right.length-dn+this.left.length).reverse():this.left.slice(dn).concat(this.right.slice(this.right.length-xs+this.left.length).reverse())}splice(dn,ms,xs){const bs=ms||0;this.setCursor(Math.trunc(dn));const Es=this.right.splice(this.right.length-bs,Number.POSITIVE_INFINITY);return xs&&chunkedPush(this.left,xs),Es.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(dn){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(dn)}pushMany(dn){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,dn)}unshift(dn){this.setCursor(0),this.right.push(dn)}unshiftMany(dn){this.setCursor(0),chunkedPush(this.right,dn.reverse())}setCursor(dn){if(!(dn===this.left.length||dn>this.left.length&&this.right.length===0||dn<0&&this.left.length===0))if(dn<this.left.length){const ms=this.left.splice(dn,Number.POSITIVE_INFINITY);chunkedPush(this.right,ms.reverse())}else{const ms=this.right.splice(this.left.length+this.right.length-dn,Number.POSITIVE_INFINITY);chunkedPush(this.left,ms.reverse())}}}function chunkedPush(ds,dn){let ms=0;if(dn.length<1e4)ds.push(...dn);else for(;ms<dn.length;)ds.push(...dn.slice(ms,ms+1e4)),ms+=1e4}function subtokenize(ds){const dn={};let ms=-1,xs,bs,Es,ws,Rs,js,Cs;const As=new SpliceBuffer(ds);for(;++ms<As.length;){for(;ms in dn;)ms=dn[ms];if(xs=As.get(ms),ms&&xs[1].type==="chunkFlow"&&As.get(ms-1)[1].type==="listItemPrefix"&&(js=xs[1]._tokenizer.events,Es=0,Es<js.length&&js[Es][1].type==="lineEndingBlank"&&(Es+=2),Es<js.length&&js[Es][1].type==="content"))for(;++Es<js.length&&js[Es][1].type!=="content";)js[Es][1].type==="chunkText"&&(js[Es][1]._isInFirstContentOfListItem=!0,Es++);if(xs[0]==="enter")xs[1].contentType&&(Object.assign(dn,subcontent(As,ms)),ms=dn[ms],Cs=!0);else if(xs[1]._container){for(Es=ms,bs=void 0;Es--;)if(ws=As.get(Es),ws[1].type==="lineEnding"||ws[1].type==="lineEndingBlank")ws[0]==="enter"&&(bs&&(As.get(bs)[1].type="lineEndingBlank"),ws[1].type="lineEnding",bs=Es);else if(!(ws[1].type==="linePrefix"||ws[1].type==="listItemIndent"))break;bs&&(xs[1].end={...As.get(bs)[1].start},Rs=As.slice(bs,ms),Rs.unshift(xs),As.splice(bs,ms-bs+1,Rs))}}
vendor: 7,478 bytes, line 1384
1384return splice(ds,0,Number.POSITIVE_INFINITY,As.slice(0)),!Cs}function subcontent(ds,dn){const ms=ds.get(dn)[1],xs=ds.get(dn)[2];let bs=dn-1;const Es=[];let ws=ms._tokenizer;ws||(ws=xs.parser[ms.contentType](ms.start),ms._contentTypeTextTrailing&&(ws._contentTypeTextTrailing=!0));const Rs=ws.events,js=[],Cs={};let As,ks,Os=-1,Ms=ms,Ds=0,Ps=0;const Ls=[Ps];for(;Ms;){for(;ds.get(++bs)[1]!==Ms;);Es.push(bs),Ms._tokenizer||(As=xs.sliceStream(Ms),Ms.next||As.push(null),ks&&ws.defineSkip(Ms.start),Ms._isInFirstContentOfListItem&&(ws._gfmTasklistFirstContentOfListItem=!0),ws.write(As),Ms._isInFirstContentOfListItem&&(ws._gfmTasklistFirstContentOfListItem=void 0)),ks=Ms,Ms=Ms.next}for(Ms=ms;++Os<Rs.length;)Rs[Os][0]==="exit"&&Rs[Os-1][0]==="enter"&&Rs[Os][1].type===Rs[Os-1][1].type&&Rs[Os][1].start.line!==Rs[Os][1].end.line&&(Ps=Os+1,Ls.push(Ps),Ms._tokenizer=void 0,Ms.previous=void 0,Ms=Ms.next);for(ws.events=[],Ms?(Ms._tokenizer=void 0,Ms.previous=void 0):Ls.pop(),Os=Ls.length;Os--;){const Bs=Rs.slice(Ls[Os],Ls[Os+1]),Fs=Es.pop();js.push([Fs,Fs+Bs.length-1]),ds.splice(Fs,2,Bs)}for(js.reverse(),Os=-1;++Os<js.length;)Cs[Ds+js[Os][0]]=Ds+js[Os][1],Ds+=js[Os][1]-js[Os][0]-1;return Cs}const content={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(ds){return subtokenize(ds),ds}function tokenizeContent(ds,dn){let ms;return xs;function xs(Rs){return ds.enter("content"),ms=ds.enter("chunkContent",{contentType:"content"}),bs(Rs)}function bs(Rs){return Rs===null?Es(Rs):markdownLineEnding(Rs)?ds.check(continuationConstruct,ws,Es)(Rs):(ds.consume(Rs),bs)}function Es(Rs){return ds.exit("chunkContent"),ds.exit("content"),dn(Rs)}function ws(Rs){return ds.consume(Rs),ds.exit("chunkContent"),ms.next=ds.enter("chunkContent",{contentType:"content",previous:ms}),ms=ms.next,bs}}function tokenizeContinuation(ds,dn,ms){const xs=this;return bs;function bs(ws){return ds.exit("chunkContent"),ds.enter("lineEnding"),ds.consume(ws),ds.exit("lineEnding"),factorySpace(ds,Es,"linePrefix")}function Es(ws){if(ws===null||markdownLineEnding(ws))return ms(ws);const Rs=xs.events[xs.events.length-1];return!xs.parser.constructs.disable.null.includes("codeIndented")&&Rs&&Rs[1].type==="linePrefix"&&Rs[2].sliceSerialize(Rs[1],!0).length>=4?dn(ws):ds.interrupt(xs.parser.constructs.flow,ms,dn)(ws)}}function factoryDestination(ds,dn,ms,xs,bs,Es,ws,Rs,js){const Cs=js||Number.POSITIVE_INFINITY;let As=0;return ks;function ks(Bs){return Bs===60?(ds.enter(xs),ds.enter(bs),ds.enter(Es),ds.consume(Bs),ds.exit(Es),Os):Bs===null||Bs===32||Bs===41||asciiControl(Bs)?ms(Bs):(ds.enter(xs),ds.enter(ws),ds.enter(Rs),ds.enter("chunkString",{contentType:"string"}),Ps(Bs))}function Os(Bs){return Bs===62?(ds.enter(Es),ds.consume(Bs),ds.exit(Es),ds.exit(bs),ds.exit(xs),dn):(ds.enter(Rs),ds.enter("chunkString",{contentType:"string"}),Ms(Bs))}function Ms(Bs){return Bs===62?(ds.exit("chunkString"),ds.exit(Rs),Os(Bs)):Bs===null||Bs===60||markdownLineEnding(Bs)?ms(Bs):(ds.consume(Bs),Bs===92?Ds:Ms)}function Ds(Bs){return Bs===60||Bs===62||Bs===92?(ds.consume(Bs),Ms):Ms(Bs)}function Ps(Bs){return!As&&(Bs===null||Bs===41||markdownLineEndingOrSpace(Bs))?(ds.exit("chunkString"),ds.exit(Rs),ds.exit(ws),ds.exit(xs),dn(Bs)):As<Cs&&Bs===40?(ds.consume(Bs),As++,Ps):Bs===41?(ds.consume(Bs),As--,Ps):Bs===null||Bs===32||Bs===40||asciiControl(Bs)?ms(Bs):(ds.consume(Bs),Bs===92?Ls:Ps)}function Ls(Bs){return Bs===40||Bs===41||Bs===92?(ds.consume(Bs),Ps):Ps(Bs)}}function factoryLabel(ds,dn,ms,xs,bs,Es){const ws=this;let Rs=0,js;return Cs;function Cs(Ms){return ds.enter(xs),ds.enter(bs),ds.consume(Ms),ds.exit(bs),ds.enter(Es),As}function As(Ms){return Rs>999||Ms===null||Ms===91||Ms===93&&!js||Ms===94&&!Rs&&"_hiddenFootnoteSupport"in ws.parser.constructs?ms(Ms):Ms===93?(ds.exit(Es),ds.enter(bs),ds.consume(Ms),ds.exit(bs),ds.exit(xs),dn):markdownLineEnding(Ms)?(ds.enter("lineEnding"),ds.consume(Ms),ds.exit("lineEnding"),As):(ds.enter("chunkString",{contentType:"string"}),ks(Ms))}function ks(Ms){return Ms===null||Ms===91||Ms===93||markdownLineEnding(Ms)||Rs++>999?(ds.exit("chunkString"),As(Ms)):(ds.consume(Ms),js||(js=!markdownSpace(Ms)),Ms===92?Os:ks)}function Os(Ms){return Ms===91||Ms===92||Ms===93?(ds.consume(Ms),Rs++,ks):ks(Ms)}}function factoryTitle(ds,dn,ms,xs,bs,Es){let ws;return Rs;function Rs(Os){return Os===34||Os===39||Os===40?(ds.enter(xs),ds.enter(bs),ds.consume(Os),ds.exit(bs),ws=Os===40?41:Os,js):ms(Os)}function js(Os){return Os===ws?(ds.enter(bs),ds.consume(Os),ds.exit(bs),ds.exit(xs),dn):(ds.enter(Es),Cs(Os))}function Cs(Os){return Os===ws?(ds.exit(Es),js(ws)):Os===null?ms(Os):markdownLineEnding(Os)?(ds.enter("lineEnding"),ds.consume(Os),ds.exit("lineEnding"),factorySpace(ds,Cs,"linePrefix")):(ds.enter("chunkString",{contentType:"string"}),As(Os))}function As(Os){return Os===ws||Os===null||markdownLineEnding(Os)?(ds.exit("chunkString"),Cs(Os)):(ds.consume(Os),Os===92?ks:As)}function ks(Os){return Os===ws||Os===92?(ds.consume(Os),As):As(Os)}}function factoryWhitespace(ds,dn){let ms;return xs;function xs(bs){return markdownLineEnding(bs)?(ds.enter("lineEnding"),ds.consume(bs),ds.exit("lineEnding"),ms=!0,xs):markdownSpace(bs)?factorySpace(ds,xs,ms?"linePrefix":"lineSuffix")(bs):dn(bs)}}const definition$1={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(ds,dn,ms){const xs=this;let bs;return Es;function Es(Ms){return ds.enter("definition"),ws(Ms)}function ws(Ms){return factoryLabel.call(xs,ds,Rs,ms,"definitionLabel","definitionLabelMarker","definitionLabelString")(Ms)}function Rs(Ms){return bs=normalizeIdentifier(xs.sliceSerialize(xs.events[xs.events.length-1][1]).slice(1,-1)),Ms===58?(ds.enter("definitionMarker"),ds.consume(Ms),ds.exit("definitionMarker"),js):ms(Ms)}function js(Ms){return markdownLineEndingOrSpace(Ms)?factoryWhitespace(ds,Cs)(Ms):Cs(Ms)}function Cs(Ms){return factoryDestination(ds,As,ms,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(Ms)}function As(Ms){return ds.attempt(titleBefore,ks,ks)(Ms)}function ks(Ms){return markdownSpace(Ms)?factorySpace(ds,Os,"whitespace")(Ms):Os(Ms)}function Os(Ms){return Ms===null||markdownLineEnding(Ms)?(ds.exit("definition"),xs.parser.defined.push(bs),dn(Ms)):ms(Ms)}}function tokenizeTitleBefore(ds,dn,ms){return xs;function xs(Rs){return markdownLineEndingOrSpace(Rs)?factoryWhitespace(ds,bs)(Rs):ms(Rs)}function bs(Rs){return factoryTitle(ds,Es,ms,"definitionTitle","definitionTitleMarker","definitionTitleString")(Rs)}function Es(Rs){return markdownSpace(Rs)?factorySpace(ds,ws,"whitespace")(Rs):ws(Rs)}function ws(Rs){return Rs===null||markdownLineEnding(Rs)?dn(Rs):ms(Rs)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(ds,dn,ms){return xs;function xs(Es){return ds.enter("hardBreakEscape"),ds.consume(Es),bs}function bs(Es){return markdownLineEnding(Es)?(ds.exit("hardBreakEscape"),dn(Es)):ms(Es)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(ds,dn){let ms=ds.length-2,xs=3;if(ds[xs][1].type==="whitespace"&&(xs+=2),ms-2>xs&&ds[ms][1].type==="whitespace"&&(ms-=2),ds[ms][1].type==="atxHeadingSequence"&&(xs===ms-1||ms-4>xs&&ds[ms-2][1].type==="whitespace")&&(ms-=xs+1===ms?2:4),ms>
vendor: 4,659 bytes, line 1384
1384xs){const bs={type:"atxHeadingText",start:ds[xs][1].start,end:ds[ms][1].end},Es={type:"chunkText",start:ds[xs][1].start,end:ds[ms][1].end,contentType:"text"};splice(ds,xs,ms-xs+1,[["enter",bs,dn],["enter",Es,dn],["exit",Es,dn],["exit",bs,dn]])}return ds}function tokenizeHeadingAtx(ds,dn,ms){let xs=0;return bs;function bs(As){return ds.enter("atxHeading"),Es(As)}function Es(As){return ds.enter("atxHeadingSequence"),ws(As)}function ws(As){return As===35&&xs++<6?(ds.consume(As),ws):As===null||markdownLineEndingOrSpace(As)?(ds.exit("atxHeadingSequence"),Rs(As)):ms(As)}function Rs(As){return As===35?(ds.enter("atxHeadingSequence"),js(As)):As===null||markdownLineEnding(As)?(ds.exit("atxHeading"),dn(As)):markdownSpace(As)?factorySpace(ds,Rs,"whitespace")(As):(ds.enter("atxHeadingText"),Cs(As))}function js(As){return As===35?(ds.consume(As),js):(ds.exit("atxHeadingSequence"),Rs(As))}function Cs(As){return As===null||As===35||markdownLineEndingOrSpace(As)?(ds.exit("atxHeadingText"),Rs(As)):(ds.consume(As),Cs)}}const htmlBlockNames=["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"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore};function resolveToHtmlFlow(ds){let dn=ds.length;for(;dn--&&!(ds[dn][0]==="enter"&&ds[dn][1].type==="htmlFlow"););return dn>1&&ds[dn-2][1].type==="linePrefix"&&(ds[dn][1].start=ds[dn-2][1].start,ds[dn+1][1].start=ds[dn-2][1].start,ds.splice(dn-2,2)),ds}function tokenizeHtmlFlow(ds,dn,ms){const xs=this;let bs,Es,ws,Rs,js;return Cs;function Cs(oa){return As(oa)}function As(oa){return ds.enter("htmlFlow"),ds.enter("htmlFlowData"),ds.consume(oa),ks}function ks(oa){return oa===33?(ds.consume(oa),Os):oa===47?(ds.consume(oa),Es=!0,Ps):oa===63?(ds.consume(oa),bs=3,xs.interrupt?dn:ra):asciiAlpha(oa)?(ds.consume(oa),ws=String.fromCharCode(oa),Ls):ms(oa)}function Os(oa){return oa===45?(ds.consume(oa),bs=2,Ms):oa===91?(ds.consume(oa),bs=5,Rs=0,Ds):asciiAlpha(oa)?(ds.consume(oa),bs=4,xs.interrupt?dn:ra):ms(oa)}function Ms(oa){return oa===45?(ds.consume(oa),xs.interrupt?dn:ra):ms(oa)}function Ds(oa){const sa="CDATA[";return oa===sa.charCodeAt(Rs++)?(ds.consume(oa),Rs===sa.length?xs.interrupt?dn:ca:Ds):ms(oa)}function Ps(oa){return asciiAlpha(oa)?(ds.consume(oa),ws=String.fromCharCode(oa),Ls):ms(oa)}function Ls(oa){if(oa===null||oa===47||oa===62||markdownLineEndingOrSpace(oa)){const sa=oa===47,Ra=ws.toLowerCase();return!sa&&!Es&&htmlRawNames.includes(Ra)?(bs=1,xs.interrupt?dn(oa):ca(oa)):htmlBlockNames.includes(ws.toLowerCase())?(bs=6,sa?(ds.consume(oa),Bs):xs.interrupt?dn(oa):ca(oa)):(bs=7,xs.interrupt&&!xs.parser.lazy[xs.now().line]?ms(oa):Es?Fs(oa):Us(oa))}return oa===45||asciiAlphanumeric(oa)?(ds.consume(oa),ws+=String.fromCharCode(oa),Ls):ms(oa)}function Bs(oa){return oa===62?(ds.consume(oa),xs.interrupt?dn:ca):ms(oa)}function Fs(oa){return markdownSpace(oa)?(ds.consume(oa),Fs):ai(oa)}function Us(oa){return oa===47?(ds.consume(oa),ai):oa===58||oa===95||asciiAlpha(oa)?(ds.consume(oa),Gs):markdownSpace(oa)?(ds.consume(oa),Us):ai(oa)}function Gs(oa){return oa===45||oa===46||oa===58||oa===95||asciiAlphanumeric(oa)?(ds.consume(oa),Gs):Js(oa)}function Js(oa){return oa===61?(ds.consume(oa),Ws):markdownSpace(oa)?(ds.consume(oa),Js):Us(oa)}function Ws(oa){return oa===null||oa===60||oa===61||oa===62||oa===96?ms(oa):oa===34||oa===39?(ds.consume(oa),js=oa,Zs):markdownSpace(oa)?(ds.consume(oa),Ws):Ys(oa)}function Zs(oa){return oa===js?(ds.consume(oa),js=null,Qs):oa===null||markdownLineEnding(oa)?ms(oa):(ds.consume(oa),Zs)}function Ys(oa){return oa===null||oa===34||oa===39||oa===47||oa===60||oa===61||oa===62||oa===96||markdownLineEndingOrSpace(oa)?Js(oa):(ds.consume(oa),Ys)}function Qs(oa){return oa===47||oa===62||markdownSpace(oa)?Us(oa):ms(oa)}function ai(oa){return oa===62?(ds.consume(oa),ia):ms(oa)}function ia(oa){return oa===null||markdownLineEnding(oa)?ca(oa):markdownSpace(oa)?(ds.consume(oa),ia):ms(oa)}function ca(oa){return oa===45&&bs===2?(ds.consume(oa),aa):oa===60&&bs===1?(ds.consume(oa),fa):oa===62&&bs===4?(ds.consume(oa),Ia):oa===63&&bs===3?(ds.consume(oa),ra):oa===93&&bs===5?(ds.consume(oa),Ea
vendor: 4,878 bytes, line 1384
1384):markdownLineEnding(oa)&&(bs===6||bs===7)?(ds.exit("htmlFlowData"),ds.check(blankLineBefore,$a,ha)(oa)):oa===null||markdownLineEnding(oa)?(ds.exit("htmlFlowData"),ha(oa)):(ds.consume(oa),ca)}function ha(oa){return ds.check(nonLazyContinuation,ea,$a)(oa)}function ea(oa){return ds.enter("lineEnding"),ds.consume(oa),ds.exit("lineEnding"),ta}function ta(oa){return oa===null||markdownLineEnding(oa)?ha(oa):(ds.enter("htmlFlowData"),ca(oa))}function aa(oa){return oa===45?(ds.consume(oa),ra):ca(oa)}function fa(oa){return oa===47?(ds.consume(oa),ws="",ua):ca(oa)}function ua(oa){if(oa===62){const sa=ws.toLowerCase();return htmlRawNames.includes(sa)?(ds.consume(oa),Ia):ca(oa)}return asciiAlpha(oa)&&ws.length<8?(ds.consume(oa),ws+=String.fromCharCode(oa),ua):ca(oa)}function Ea(oa){return oa===93?(ds.consume(oa),ra):ca(oa)}function ra(oa){return oa===62?(ds.consume(oa),Ia):oa===45&&bs===2?(ds.consume(oa),ra):ca(oa)}function Ia(oa){return oa===null||markdownLineEnding(oa)?(ds.exit("htmlFlowData"),$a(oa)):(ds.consume(oa),Ia)}function $a(oa){return ds.exit("htmlFlow"),dn(oa)}}function tokenizeBlankLineBefore(ds,dn,ms){return xs;function xs(bs){return ds.enter("lineEnding"),ds.consume(bs),ds.exit("lineEnding"),ds.attempt(blankLine,dn,ms)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(ds,dn,ms){const xs=this;let bs,Es,ws;return Rs;function Rs(ra){return ds.enter("htmlText"),ds.enter("htmlTextData"),ds.consume(ra),js}function js(ra){return ra===33?(ds.consume(ra),Cs):ra===47?(ds.consume(ra),Js):ra===63?(ds.consume(ra),Us):asciiAlpha(ra)?(ds.consume(ra),Ys):ms(ra)}function Cs(ra){return ra===45?(ds.consume(ra),As):ra===91?(ds.consume(ra),Es=0,Ds):asciiAlpha(ra)?(ds.consume(ra),Fs):ms(ra)}function As(ra){return ra===45?(ds.consume(ra),Ms):ms(ra)}function ks(ra){return ra===null?ms(ra):ra===45?(ds.consume(ra),Os):markdownLineEnding(ra)?(ws=ks,fa(ra)):(ds.consume(ra),ks)}function Os(ra){return ra===45?(ds.consume(ra),Ms):ks(ra)}function Ms(ra){return ra===62?aa(ra):ra===45?Os(ra):ks(ra)}function Ds(ra){const Ia="CDATA[";return ra===Ia.charCodeAt(Es++)?(ds.consume(ra),Es===Ia.length?Ps:Ds):ms(ra)}function Ps(ra){return ra===null?ms(ra):ra===93?(ds.consume(ra),Ls):markdownLineEnding(ra)?(ws=Ps,fa(ra)):(ds.consume(ra),Ps)}function Ls(ra){return ra===93?(ds.consume(ra),Bs):Ps(ra)}function Bs(ra){return ra===62?aa(ra):ra===93?(ds.consume(ra),Bs):Ps(ra)}function Fs(ra){return ra===null||ra===62?aa(ra):markdownLineEnding(ra)?(ws=Fs,fa(ra)):(ds.consume(ra),Fs)}function Us(ra){return ra===null?ms(ra):ra===63?(ds.consume(ra),Gs):markdownLineEnding(ra)?(ws=Us,fa(ra)):(ds.consume(ra),Us)}function Gs(ra){return ra===62?aa(ra):Us(ra)}function Js(ra){return asciiAlpha(ra)?(ds.consume(ra),Ws):ms(ra)}function Ws(ra){return ra===45||asciiAlphanumeric(ra)?(ds.consume(ra),Ws):Zs(ra)}function Zs(ra){return markdownLineEnding(ra)?(ws=Zs,fa(ra)):markdownSpace(ra)?(ds.consume(ra),Zs):aa(ra)}function Ys(ra){return ra===45||asciiAlphanumeric(ra)?(ds.consume(ra),Ys):ra===47||ra===62||markdownLineEndingOrSpace(ra)?Qs(ra):ms(ra)}function Qs(ra){return ra===47?(ds.consume(ra),aa):ra===58||ra===95||asciiAlpha(ra)?(ds.consume(ra),ai):markdownLineEnding(ra)?(ws=Qs,fa(ra)):markdownSpace(ra)?(ds.consume(ra),Qs):aa(ra)}function ai(ra){return ra===45||ra===46||ra===58||ra===95||asciiAlphanumeric(ra)?(ds.consume(ra),ai):ia(ra)}function ia(ra){return ra===61?(ds.consume(ra),ca):markdownLineEnding(ra)?(ws=ia,fa(ra)):markdownSpace(ra)?(ds.consume(ra),ia):Qs(ra)}function ca(ra){return ra===null||ra===60||ra===61||ra===62||ra===96?ms(ra):ra===34||ra===39?(ds.consume(ra),bs=ra,ha):markdownLineEnding(ra)?(ws=ca,fa(ra)):markdownSpace(ra)?(ds.consume(ra),ca):(ds.consume(ra),ea)}function ha(ra){return ra===bs?(ds.consume(ra),bs=void 0,ta):ra===null?ms(ra):markdownLineEnding(ra)?(ws=ha,fa(ra)):(ds.consume(ra),ha)}function ea(ra){return ra===null||ra===34||ra===39||ra===60||ra===61||ra===96?ms(ra):ra===47||ra===62||markdownLineEndingOrSpace(ra)?Qs(ra):(ds.consume(ra),ea)}function ta(ra){return ra===47||ra===62||markdownLineEndingOrSpace(ra)?Qs(ra):ms(ra)}function aa(ra){return ra===62?(ds.consume(ra),ds.exit("htmlTextData"),ds.exit("htmlText"),dn):ms(ra)}function fa(ra){return ds.exit("htmlTextData"),ds.enter("lineEnding"),ds.consume(ra),ds.exit("lineEnding"),ua}function ua(ra){return markdownSpace(ra)?factorySpace(ds,Ea,"linePrefix",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ra):Ea(ra)}function Ea(ra){return ds.enter("htmlTextData"),ws(ra)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(ds){let dn=-1;const ms=[];for(;++dn<ds.length;
vendor: 6,078 bytes, line 1384
1384){const xs=ds[dn][1];if(ms.push(ds[dn]),xs.type==="labelImage"||xs.type==="labelLink"||xs.type==="labelEnd"){const bs=xs.type==="labelImage"?4:2;xs.type="data",dn+=bs}}return ds.length!==ms.length&&splice(ds,0,ds.length,ms),ds}function resolveToLabelEnd(ds,dn){let ms=ds.length,xs=0,bs,Es,ws;for(;ms--;){const As=ds[ms][1];if(bs){if(As.type==="link"||As.type==="labelLink"&&As._inactive)break;ds[ms][0]==="enter"&&As.type==="labelLink"&&(As._inactive=!0)}else if(Es){if(ds[ms][0]==="enter"&&(As.type==="labelImage"||As.type==="labelLink")&&!As._balanced&&(bs=ms,As.type!=="labelLink")){xs=2;break}}else As.type==="labelEnd"&&(Es=ms)}const Rs={type:ds[bs][1].type==="labelLink"?"link":"image",start:{...ds[bs][1].start},end:{...ds[ds.length-1][1].end}},js={type:"label",start:{...ds[bs][1].start},end:{...ds[Es][1].end}},Cs={type:"labelText",start:{...ds[bs+xs+2][1].end},end:{...ds[Es-2][1].start}};return ws=[["enter",Rs,dn],["enter",js,dn]],ws=push(ws,ds.slice(bs+1,bs+xs+3)),ws=push(ws,[["enter",Cs,dn]]),ws=push(ws,resolveAll(dn.parser.constructs.insideSpan.null,ds.slice(bs+xs+4,Es-3),dn)),ws=push(ws,[["exit",Cs,dn],ds[Es-2],ds[Es-1],["exit",js,dn]]),ws=push(ws,ds.slice(Es+1)),ws=push(ws,[["exit",Rs,dn]]),splice(ds,bs,ds.length,ws),ds}function tokenizeLabelEnd(ds,dn,ms){const xs=this,bs=xs._labelStarts;let Es,ws;if(bs){for(;bs.length>0&&bs[bs.length-1]._balanced;)bs.pop();Es=bs[bs.length-1]}return Rs;function Rs(Os){return Es?Es._inactive?ks(Os):(ws=xs.parser.defined.includes(normalizeIdentifier(xs.sliceSerialize({start:Es.end,end:xs.now()}))),ds.enter("labelEnd"),ds.enter("labelMarker"),ds.consume(Os),ds.exit("labelMarker"),ds.exit("labelEnd"),js):ms(Os)}function js(Os){return Os===40?ds.attempt(resourceConstruct,As,ws?As:ks)(Os):Os===91?ds.attempt(referenceFullConstruct,As,ws?Cs:ks)(Os):ws?As(Os):ks(Os)}function Cs(Os){return ds.attempt(referenceCollapsedConstruct,As,ks)(Os)}function As(Os){return bs.pop(),dn(Os)}function ks(Os){return Es._balanced=!0,ms(Os)}}function tokenizeResource(ds,dn,ms){return xs;function xs(ks){return ds.enter("resource"),ds.enter("resourceMarker"),ds.consume(ks),ds.exit("resourceMarker"),bs}function bs(ks){return markdownLineEndingOrSpace(ks)?factoryWhitespace(ds,Es)(ks):Es(ks)}function Es(ks){return ks===41?As(ks):factoryDestination(ds,ws,Rs,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(ks)}function ws(ks){return markdownLineEndingOrSpace(ks)?factoryWhitespace(ds,js)(ks):As(ks)}function Rs(ks){return ms(ks)}function js(ks){return ks===34||ks===39||ks===40?factoryTitle(ds,Cs,ms,"resourceTitle","resourceTitleMarker","resourceTitleString")(ks):As(ks)}function Cs(ks){return markdownLineEndingOrSpace(ks)?factoryWhitespace(ds,As)(ks):As(ks)}function As(ks){return ks===41?(ds.enter("resourceMarker"),ds.consume(ks),ds.exit("resourceMarker"),ds.exit("resource"),dn):ms(ks)}}function tokenizeReferenceFull(ds,dn,ms){const xs=this;return bs;function bs(Rs){return factoryLabel.call(xs,ds,Es,ws,"reference","referenceMarker","referenceString")(Rs)}function Es(Rs){return xs.parser.defined.includes(normalizeIdentifier(xs.sliceSerialize(xs.events[xs.events.length-1][1]).slice(1,-1)))?dn(Rs):ms(Rs)}function ws(Rs){return ms(Rs)}}function tokenizeReferenceCollapsed(ds,dn,ms){return xs;function xs(Es){return ds.enter("reference"),ds.enter("referenceMarker"),ds.consume(Es),ds.exit("referenceMarker"),bs}function bs(Es){return Es===93?(ds.enter("referenceMarker"),ds.consume(Es),ds.exit("referenceMarker"),ds.exit("reference"),dn):ms(Es)}}const labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(ds,dn,ms){const xs=this;let bs;return Es;function Es(js){return ds.enter("labelImage"),ds.enter("labelImageMarker"),ds.consume(js),ds.exit("labelImageMarker"),ws}function ws(js){return js===91?(ds.enter("labelMarker"),ds.consume(js),ds.exit("labelMarker"),bs=ds.exit("labelImage"),Rs):ms(js)}function Rs(js){return js===94&&"_hiddenFootnoteSupport"in xs.parser.constructs?ms(js):(xs._labelStarts=xs._labelStarts||[],xs._labelStarts.push(bs),dn(js))}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(ds,dn,ms){const xs=this;let bs;return Es;function Es(Rs){return ds.enter("labelLink"),ds.enter("labelMarker"),ds.consume(Rs),ds.exit("labelMarker"),bs=ds.exit("labelLink"),ws}function ws(Rs){return Rs===94&&"_hiddenFootnoteSupport"in xs.parser.constructs?ms(Rs):(xs._labelStarts=xs._labelStarts||[],xs._labelStarts.push(bs),dn(Rs))}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(ds,dn){return ms;function ms(xs){return ds.enter("lineEnding"),ds.consume(xs),ds.exit("lineEnding"),factorySpace(ds,dn,"linePrefix")}}const thematicBreak$2={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(ds,dn,ms){let xs=0,bs;return Es;function Es(Cs){return ds.enter("thematicBreak"),ws(Cs)}function ws(Cs){return bs=Cs,Rs(Cs)}function Rs(Cs){return Cs===bs?(ds.enter("thematicBreakSequence"),js(Cs)):xs>=3&&(Cs===null||markdownLineEnding(Cs))?(ds.exit("thematicBreak"),dn(Cs)):ms(Cs)}function js(Cs){return Cs===bs?(ds.consume(Cs),xs++,js):(ds.exit("thematicBreakSequence"),markdownSpace(Cs)?factorySpace(ds,Rs,"whitespace")(Cs):Rs(Cs))}}const list$2={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(ds,dn,ms){const xs=this,bs=xs.events[xs.events.length-1];let Es=bs&&bs[1].type==="linePrefix"?bs[2].sliceSerialize(bs[1],!0).length:0,ws=0;return Rs;function Rs(Ms){const Ds=xs.containerState.type||(Ms===42||Ms===43||Ms===45?"listUnordered":"listOrdered");if(Ds==="listUnordered"?!xs.containerState.marker||Ms===xs.containerState.marker:asciiDigit(Ms)){if
vendor: 5,929 bytes, line 1384
1384(xs.containerState.type||(xs.containerState.type=Ds,ds.enter(Ds,{_container:!0})),Ds==="listUnordered")return ds.enter("listItemPrefix"),Ms===42||Ms===45?ds.check(thematicBreak$2,ms,Cs)(Ms):Cs(Ms);if(!xs.interrupt||Ms===49)return ds.enter("listItemPrefix"),ds.enter("listItemValue"),js(Ms)}return ms(Ms)}function js(Ms){return asciiDigit(Ms)&&++ws<10?(ds.consume(Ms),js):(!xs.interrupt||ws<2)&&(xs.containerState.marker?Ms===xs.containerState.marker:Ms===41||Ms===46)?(ds.exit("listItemValue"),Cs(Ms)):ms(Ms)}function Cs(Ms){return ds.enter("listItemMarker"),ds.consume(Ms),ds.exit("listItemMarker"),xs.containerState.marker=xs.containerState.marker||Ms,ds.check(blankLine,xs.interrupt?ms:As,ds.attempt(listItemPrefixWhitespaceConstruct,Os,ks))}function As(Ms){return xs.containerState.initialBlankLine=!0,Es++,Os(Ms)}function ks(Ms){return markdownSpace(Ms)?(ds.enter("listItemPrefixWhitespace"),ds.consume(Ms),ds.exit("listItemPrefixWhitespace"),Os):ms(Ms)}function Os(Ms){return xs.containerState.size=Es+xs.sliceSerialize(ds.exit("listItemPrefix"),!0).length,dn(Ms)}}function tokenizeListContinuation(ds,dn,ms){const xs=this;return xs.containerState._closeFlow=void 0,ds.check(blankLine,bs,Es);function bs(Rs){return xs.containerState.furtherBlankLines=xs.containerState.furtherBlankLines||xs.containerState.initialBlankLine,factorySpace(ds,dn,"listItemIndent",xs.containerState.size+1)(Rs)}function Es(Rs){return xs.containerState.furtherBlankLines||!markdownSpace(Rs)?(xs.containerState.furtherBlankLines=void 0,xs.containerState.initialBlankLine=void 0,ws(Rs)):(xs.containerState.furtherBlankLines=void 0,xs.containerState.initialBlankLine=void 0,ds.attempt(indentConstruct,dn,ws)(Rs))}function ws(Rs){return xs.containerState._closeFlow=!0,xs.interrupt=void 0,factorySpace(ds,ds.attempt(list$2,dn,ms),"linePrefix",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Rs)}}function tokenizeIndent$1(ds,dn,ms){const xs=this;return factorySpace(ds,bs,"listItemIndent",xs.containerState.size+1);function bs(Es){const ws=xs.events[xs.events.length-1];return ws&&ws[1].type==="listItemIndent"&&ws[2].sliceSerialize(ws[1],!0).length===xs.containerState.size?dn(Es):ms(Es)}}function tokenizeListEnd(ds){ds.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(ds,dn,ms){const xs=this;return factorySpace(ds,bs,"listItemPrefixWhitespace",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function bs(Es){const ws=xs.events[xs.events.length-1];return!markdownSpace(Es)&&ws&&ws[1].type==="listItemPrefixWhitespace"?dn(Es):ms(Es)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(ds,dn){const ms=new EditMap$1;let xs=ds.length,bs,Es,ws;for(;xs--;)if(ds[xs][0]==="enter"){if(ds[xs][1].type==="content"){bs=xs;break}ds[xs][1].type==="paragraph"&&(Es=xs)}else ds[xs][1].type==="content"&&ms.add(xs,1,[]),!ws&&ds[xs][1].type==="definition"&&(ws=xs);const Rs={type:"setextHeading",start:{...ds[bs][1].start},end:{...ds[ds.length-1][1].end}};return ds[Es][1].type="setextHeadingText",ws?(ms.add(Es,0,[["enter",Rs,dn]]),ms.add(ws+1,0,[["exit",ds[bs][1],dn]]),ds[bs][1].end={...ds[ws][1].end}):ds[bs][1]=Rs,ms.add(ds.length,0,[["exit",Rs,dn]]),ms.consume(ds),ds}function tokenizeSetextUnderline(ds,dn,ms){const xs=this;let bs;return Es;function Es(Cs){let As=xs.events.length,ks;for(;As--;)if(xs.events[As][1].type!=="lineEnding"&&xs.events[As][1].type!=="linePrefix"&&xs.events[As][1].type!=="content"){ks=xs.events[As][1].type==="paragraph";break}return!xs.parser.lazy[xs.now().line]&&(xs.interrupt||ks)?(ds.enter("setextHeadingLine"),bs=Cs,ws(Cs)):ms(Cs)}function ws(Cs){return ds.enter("setextHeadingLineSequence"),Rs(Cs)}function Rs(Cs){return Cs===bs?(ds.consume(Cs),Rs):(ds.exit("setextHeadingLineSequence"),markdownSpace(Cs)?factorySpace(ds,js,"lineSuffix")(Cs):js(Cs))}function js(Cs){return Cs===null||markdownLineEnding(Cs)?(ds.exit("setextHeadingLine"),dn(Cs)):ms(Cs)}}const flow$1={tokenize:initializeFlow};function initializeFlow(ds){const dn=this,ms=ds.attempt(blankLine,xs,ds.attempt(this.parser.constructs.flowInitial,bs,factorySpace(ds,ds.attempt(this.parser.constructs.flow,bs,ds.attempt(content,bs)),"linePrefix")));return ms;function xs(Es){if(Es===null){ds.consume(Es);return}return ds.enter("lineEndingBlank"),ds.consume(Es),ds.exit("lineEndingBlank"),dn.currentConstruct=void 0,ms}function bs(Es){if(Es===null){ds.consume(Es);return}return ds.enter("lineEnding"),ds.consume(Es),ds.exit("lineEnding"),dn.currentConstruct=void 0,ms}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$4=initializeFactory("text");function initializeFactory(ds){return{resolveAll:createResolver(ds==="text"?resolveAllLineSuffixes:void 0),tokenize:dn};function dn(ms){const xs=this,bs=this.parser.constructs[ds],Es=ms.attempt(bs,ws,Rs);return ws;function ws(As){return Cs(As)?Es(As):Rs(As)}function Rs(As){if(As===null){ms.consume(As);return}return ms.enter("data"),ms.consume(As),js}function js(As){return Cs(As)?(ms.exit("data"),Es(As)):(ms.consume(As),js)}function Cs(As){if(As===null)return!0;const ks=bs[As];let Os=-1;if(ks)for(;++Os<ks.length;){const Ms=ks[Os];if(!Ms.previous||Ms.previous.call(xs,xs.previous))return!0}return!1}}}function createResolver(ds){return dn;function dn(ms,xs){let bs=-1,Es;for(;++bs<=ms.length;)Es===void 0?ms[bs]&&ms[bs][1].type==="data"&&(Es=bs,bs++):(!ms[bs]||ms[bs][1].type!=="data")&&(bs!==Es+2&&(ms[Es][1].end=ms[bs-1][1].end,ms.splice(Es+2,bs-Es-2),bs=Es+2),Es=void 0);return ds?ds(ms,xs):ms}}function resolveAllLineSuffixes(ds,dn){const ms=new EditMap$1;let xs=0;for(;++xs<=ds.length;)if((xs===ds.length||ds[xs][1].type==="lineEnding")&&ds[xs-1][1].type==="data"){const bs=ds[xs-1][1],Es=dn.sliceStream(bs);let ws=Es.length,Rs=-1,js=0,Cs;for(;ws--;){const As=Es[ws];if(typeof As=="string"){for(Rs=As.length;
vendor: 3,883 bytes, line 1384
1384As.charCodeAt(Rs-1)===32;)js++,Rs--;if(Rs)break;Rs=-1}else if(As===-2)Cs=!0,js++;else if(As!==-1){ws++;break}}if(dn._contentTypeTextTrailing&&xs===ds.length&&(js=0),js){const As={type:xs===ds.length||Cs||js<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:ws?Rs:bs.start._bufferIndex+Rs,_index:bs.start._index+ws,line:bs.end.line,column:bs.end.column-js,offset:bs.end.offset-js},end:{...bs.end}};bs.end={...As.start},bs.start.offset===bs.end.offset?Object.assign(bs,As):ms.add(xs,0,[["enter",As,dn],["exit",As,dn]])}xs++}return ms.consume(ds),ds}const document$1={42:list$2,43:list$2,45:list$2,48:list$2,49:list$2,50:list$2,51:list$2,52:list$2,53:list$2,54:list$2,55:list$2,56:list$2,57:list$2,62:blockQuote},contentInitial={91:definition$1},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak$2,45:[setextUnderline,thematicBreak$2],60:htmlFlow,61:setextUnderline,95:thematicBreak$2,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$3={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention$2,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention$2,96:codeText},insideSpan={null:[attention$2,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers,contentInitial,disable,document:document$1,flow,flowInitial,insideSpan,string,text:text$3},Symbol.toStringTag,{value:"Module"}));function createTokenizer(ds,dn,ms){let xs={_bufferIndex:-1,_index:0,line:ms&&ms.line||1,column:ms&&ms.column||1,offset:ms&&ms.offset||0};const bs={},Es=[];let ws=[],Rs=[];const js={attempt:Zs(Js),check:Zs(Ws),consume:Fs,enter:Us,exit:Gs,interrupt:Zs(Ws,{interrupt:!0})},Cs={code:null,containerState:{},defineSkip:Ps,events:[],now:Ds,parser:ds,previous:null,sliceSerialize:Os,sliceStream:Ms,write:ks};let As=dn.tokenize.call(Cs,js);return dn.resolveAll&&Es.push(dn),Cs;function ks(ia){return ws=push(ws,ia),Ls(),ws[ws.length-1]!==null?[]:(Ys(dn,0),Cs.events=resolveAll(Es,Cs.events,Cs),Cs.events)}function Os(ia,ca){return serializeChunks(Ms(ia),ca)}function Ms(ia){return sliceChunks(ws,ia)}function Ds(){const{_bufferIndex:ia,_index:ca,line:ha,column:ea,offset:ta}=xs;return{_bufferIndex:ia,_index:ca,line:ha,column:ea,offset:ta}}function Ps(ia){bs[ia.line]=ia.column,ai()}function Ls(){for(;xs._index<ws.length;){const ia=ws[xs._index];if(typeof ia=="string"){const ca=xs._index;for(xs._bufferIndex<0&&(xs._bufferIndex=0);xs._index===ca&&xs._bufferIndex<ia.length;)Bs(ia.charCodeAt(xs._bufferIndex))}else Bs(ia)}}function Bs(ia){As=As(ia)}function Fs(ia){markdownLineEnding(ia)?(xs.line++,xs.column=1,xs.offset+=ia===-3?2:1,ai()):ia!==-1&&(xs.column++,xs.offset++),xs._bufferIndex<0?xs._index++:(xs._bufferIndex++,xs._bufferIndex===ws[xs._index].length&&(xs._bufferIndex=-1,xs._index++)),Cs.previous=ia}function Us(ia,ca){const ha=ca||{};return ha.type=ia,ha.start=Ds(),Cs.events.push(["enter",ha,Cs]),Rs.push(ha),ha}function Gs(ia){const ca=Rs.pop();return ca.end=Ds(),Cs.events.push(["exit",ca,Cs]),ca}function Js(ia,ca){Ys(ia,ca.from)}function Ws(ia,ca){ca.restore()}function Zs(ia,ca){return ha;function ha(ea,ta,aa){let fa,ua,Ea,ra;return Array.isArray(ea)?$a(ea):"tokenize"in ea?$a([ea]):Ia(ea);function Ia(_a){return Oa;function Oa(za){const Ga=za!==null&&_a[za],qa=za!==null&&_a.null,Ma=[...Array.isArray(Ga)?Ga:Ga?[Ga]:[],...Array.isArray(qa)?qa:qa?[qa]:[]];return $a(Ma)(za)}}function $a(_a){return fa=_a,ua=0,_a.length===0?aa:oa(_a[ua])}function oa(_a){return Oa;function Oa(za){return ra=Qs(),Ea=_a,_a.partial||(Cs.currentConstruct=_a),_a.name&&Cs.parser.constructs.disable.null.includes(_a.name)?Ra():_a.tokenize.call(ca?Object.assign(Object.create(Cs),ca):Cs,js,sa,Ra)(za)}}function sa(_a){return ia(Ea,ra),ta}
vendor: 14,735 bytes, lines 1384-1386
1384function Ra(_a){return ra.restore(),++ua<fa.length?oa(fa[ua]):aa}}}function Ys(ia,ca){ia.resolveAll&&!Es.includes(ia)&&Es.push(ia),ia.resolve&&splice(Cs.events,ca,Cs.events.length-ca,ia.resolve(Cs.events.slice(ca),Cs)),ia.resolveTo&&(Cs.events=ia.resolveTo(Cs.events,Cs))}function Qs(){const ia=Ds(),ca=Cs.previous,ha=Cs.currentConstruct,ea=Cs.events.length,ta=Array.from(Rs);return{from:ea,restore:aa};function aa(){xs=ia,Cs.previous=ca,Cs.currentConstruct=ha,Cs.events.length=ea,Rs=ta,ai()}}function ai(){xs.line in bs&&xs.column<2&&(xs.column=bs[xs.line],xs.offset+=bs[xs.line]-1)}}function sliceChunks(ds,dn){const ms=dn.start._index,xs=dn.start._bufferIndex,bs=dn.end._index,Es=dn.end._bufferIndex;let ws;if(ms===bs)ws=[ds[ms].slice(xs,Es)];else{if(ws=ds.slice(ms,bs),xs>-1){const Rs=ws[0];typeof Rs=="string"?ws[0]=Rs.slice(xs):ws.shift()}Es>0&&ws.push(ds[bs].slice(0,Es))}return ws}function serializeChunks(ds,dn){let ms=-1;const xs=[];let bs;for(;++ms<ds.length;){const Es=ds[ms];let ws;if(typeof Es=="string")ws=Es;else switch(Es){case-5:{ws="\r";break}case-4:{ws=`
1385`;break}case-3:{ws=`\r
1386`;break}case-2:{ws=dn?" ":"	";break}case-1:{if(!dn&&bs)continue;ws=" ";break}default:ws=String.fromCharCode(Es)}bs=Es===-2,xs.push(ws)}return xs.join("")}function parse(ds){const xs={constructs:combineExtensions([defaultConstructs,...(ds||{}).extensions||[]]),content:bs(content$1),defined:[],document:bs(document$2),flow:bs(flow$1),lazy:{},string:bs(string$1),text:bs(text$4)};return xs;function bs(Es){return ws;function ws(Rs){return createTokenizer(xs,Es,Rs)}}}function postprocess(ds){for(;!subtokenize(ds););return ds}const search=/[\0\t\n\r]/g;function preprocess(){let ds=1,dn="",ms=!0,xs;return bs;function bs(Es,ws,Rs){Es=dn+(typeof Es=="string"?Es.toString():new TextDecoder(ws||void 0).decode(Es));const js=[];let Cs=0;for(dn="",ms&&(Es.charCodeAt(0)===65279&&Cs++,ms=void 0);Cs<Es.length;){search.lastIndex=Cs;const As=search.exec(Es),ks=As&&As.index!==void 0?As.index:Es.length,Os=Es.charCodeAt(ks);if(!As){dn=Es.slice(Cs);break}if(Os===10&&Cs===ks&&xs)js.push(-3),xs=void 0;else switch(xs&&(js.push(-5),xs=void 0),Cs<ks&&(js.push(Es.slice(Cs,ks)),ds+=ks-Cs),Os){case 0:{js.push(65533),ds++;break}case 9:{const Ms=Math.ceil(ds/4)*4;for(js.push(-2);ds++<Ms;)js.push(-1);break}case 10:{js.push(-4),ds=1;break}default:xs=!0,ds=1}Cs=ks+1}return Rs&&(xs&&js.push(-5),dn&&js.push(dn),js.push(null)),js}}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(ds){return ds.replace(characterEscapeOrReference,decode)}function decode(ds,dn,ms){if(dn)return dn;if(ms.charCodeAt(0)===35){const bs=ms.charCodeAt(1),Es=bs===120||bs===88;return decodeNumericCharacterReference(ms.slice(Es?2:1),Es?16:10)}return decodeNamedCharacterReference(ms)||ds}const own$2={}.hasOwnProperty;function fromMarkdown(ds,dn,ms){return dn&&typeof dn=="object"&&(ms=dn,dn=void 0),compiler(ms)(postprocess(parse(ms).document().write(preprocess()(ds,dn,!0))))}function compiler(ds){const dn={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:ws(Eo),autolinkProtocol:ai,autolinkEmail:ai,atxHeading:ws(bo),blockQuote:ws(Ma),characterEscape:ai,characterReference:ai,codeFenced:ws(Fa),codeFencedFenceInfo:Rs,codeFencedFenceMeta:Rs,codeIndented:ws(Fa,Rs),codeText:ws(Ka,Rs),codeTextData:ai,data:ai,codeFlowValue:ai,definition:ws(mo),definitionDestinationString:Rs,definitionLabelString:Rs,definitionTitleString:Rs,emphasis:ws(ko),hardBreakEscape:ws(oo),hardBreakTrailing:ws(oo),htmlFlow:ws(Va,Rs),htmlFlowData:ai,htmlText:ws(Va,Rs),htmlTextData:ai,image:ws(uo),label:Rs,link:ws(Eo),listItem:ws(Zo),listItemValue:Ms,listOrdered:ws(Ao,Os),listUnordered:ws(Ao),paragraph:ws(sl),reference:sa,referenceString:Rs,resourceDestinationString:Rs,resourceTitleString:Rs,setextHeading:ws(bo),strong:ws(Po),thematicBreak:ws(Vs)},exit:{atxHeading:Cs(),atxHeadingSequence:Ws,autolink:Cs(),autolinkEmail:qa,autolinkProtocol:Ga,blockQuote:Cs(),characterEscapeValue:ia,characterReferenceMarkerHexadecimal:_a,characterReferenceMarkerNumeric:_a,characterReferenceValue:Oa,characterReference:za,codeFenced:Cs(Bs),codeFencedFence:Ls,codeFencedFenceInfo:Ds,codeFencedFenceMeta:Ps,codeFlowValue:ia,codeIndented:Cs(Fs),codeText:Cs(aa),codeTextData:ia,data:ia,definition:Cs(),definitionDestinationString:Js,definitionLabelString:Us,definitionTitleString:Gs,emphasis:Cs(),hardBreakEscape:Cs(ha),hardBreakTrailing:Cs(ha),htmlFlow:Cs(ea),htmlFlowData:ia,htmlText:Cs(ta),htmlTextData:ia,image:Cs(ua),label:ra,labelText:Ea,lineEnding:ca,link:Cs(fa),listItem:Cs(),listOrdered:Cs(),listUnordered:Cs(),paragraph:Cs(),referenceString:Ra,resourceDestinationString:Ia,resourceTitleString:$a,resource:oa,setextHeading:Cs(Qs),setextHeadingLineSequence:Ys,setextHeadingText:Zs,strong:Cs(),thematicBreak:Cs()}};configure(dn,(ds||{}).mdastExtensions||[]);const ms={};return xs;function xs(la){let ga={type:"root",children:[],position:void 0};const Na={stack:[ga],tokenStack:[],config:dn,enter:js,exit:As,buffer:Rs,resume:ks,data:ms},Hs=[],zs=[];let qs=-1;for(;++qs<la.length;)if(zs.push(la[qs]),la[qs][1].type==="listOrdered"||la[qs][1].type==="listUnordered")if(la[qs][0]==="enter")Hs.push(zs.length-1);else{const Xs=Hs.pop();Es(zs,Xs)}for(la=zs,qs=-1;++qs<la.length;){const Xs=dn[la[qs][0]];la[qs][0]==="enter"&&dn.beforeEnter.length>0&&bs(dn.beforeEnter,{...Na,sliceSerialize:la[qs][2].sliceSerialize},la[qs][1]),own$2.call(Xs,la[qs][1].type)&&Xs[la[qs][1].type].call({...Na,sliceSerialize:la[qs][2].sliceSerialize},la[qs][1]),la[qs][0]==="exit"&&dn.afterExit.length>0&&bs(dn.afterExit,{...Na,sliceSerialize:la[qs][2].sliceSerialize},la[qs][1])}if(Na.tokenStack.length>0){const Xs=Na.tokenStack[Na.tokenStack.length-1];(Xs[1]||defaultOnError).call(Na,void 0,Xs[0])}for(ga.position={start:point(la.length>0?la[0][1].start:{line:1,column:1,offset:0}),end:point(la.length>0?la[la.length-2][1].end:{line:1,column:1,offset:0})},qs=-1;++qs<dn.transforms.length;)ga=dn.transforms[qs](ga)||ga;return ga}function bs(la,ga,Na){let Hs=-1;for(;++Hs<la.length;)la[Hs].call(ga,Na)}function Es(la,ga){const Na=la.length-1;let Hs=ga-1,zs=-1,qs=!1,Xs,na,da,xa;const ka=[];for(;++Hs<=Na;){const Wa=la[Hs];switch(Wa[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Wa[0]==="enter"?zs++:zs--,xa=void 0;break}case"lineEndingBlank":{Wa[0]==="enter"&&(Xs&&!xa&&!zs&&!da&&(da=Hs),xa=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xa=void 0}if(!zs&&Wa[0]==="enter"&&Wa[1].type==="listItemPrefix"||zs===-1&&Wa[0]==="exit"&&(Wa[1].type==="listUnordered"||Wa[1].type==="listOrdered")){if(Xs){let Ja=Hs;for(na=void 0;Ja--;){const Za=la[Ja];if(Za[1].type==="lineEnding"||Za[1].type==="lineEndingBlank"){if(Za[0]==="exit")continue;na&&(la[na][1].type="lineEndingBlank",qs=!0),Za[1].type="lineEnding",na=Ja}else if(!(Za[1].type==="linePrefix"||Za[1].type==="blockQuotePrefix"||Za[1].type==="blockQuotePrefixWhitespace"||Za[1].type==="blockQuoteMarker"||Za[1].type==="listItemIndent"))break}da&&(!na||da<na)&&(Xs._spread=!0),Xs.end=Object.assign({},na?la[na][1].start:Wa[1].end),ka.push({at:na||Hs,event:["exit",Xs,Wa[2]]})}if(Wa[1].type==="listItemPrefix"){const Ja={type:"listItem",_spread:!1,start:Object.assign({},Wa[1].start),end:void 0};Xs=Ja,ka.push({at:Hs,event:["enter",Ja,Wa[2]]}),da=void 0,xa=!0}}}const Ha=la.splice(ga);let La=0;for(Hs=-1;++Hs<Ha.length;){for(;La<ka.length&&ka[La].at===ga+Hs;)la.push(ka[La++].event);la.push(Ha[Hs])}la[ga][1]._spread=qs}function ws(la,ga){return Na;function Na(Hs){js.call(this,la(Hs),Hs),ga&&ga.call(this,Hs)}}function Rs(){this.stack.push({type:"fragment",children:[]})}function js(la,ga,Na){this.stack[this.stack.length-1].children.push(la),this.stack.push(la),this.tokenStack.push([ga,Na||void 0]),la.position={start:point(ga.start),end:void 0}}function Cs(la){return ga;function ga(Na){la&&la.call(this,Na),As.call(this,Na)}}function As(la,ga){const Na=this.stack.pop(),Hs=this.tokenStack.pop();if(!Hs)throw new Error("Cannot close `"+la.type+"` ("+stringifyPosition({start:la.start,end:la.end})+"): it’s not open");Hs[0].type!==la.type&&(ga?ga.call(this,la,Hs[0]):(Hs[1]||defaultOnError).call(this,la,Hs[0])),Na.position.end=point(la.end)}function ks(){return toString$1(this.stack.pop())}function Os(){this.data.expectingFirstListItemValue=!0}function Ms(la){if(this.data.expectingFirstListItemValue){const ga=this.stack[this.stack.length-2];ga.start=Number.parseInt(this.sliceSerialize(la),10),this.data.expectingFirstListItemValue=void 0}}function Ds(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.lang=la}function Ps(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.meta=la}function Ls(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function Bs(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.value=la.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function Fs(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.value=la.replace(/(\r?\n|\r)$/g,"")}function Us(la){const ga=this.resume(),Na=this.stack[this.stack.length-1];Na.label=ga,Na.identifier=normalizeIdentifier(this.sliceSerialize(la)).toLowerCase()}function Gs(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.title=la}function Js(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.url=la}function Ws(la){const ga=this.stack[this.stack.length-1];if(!ga.depth){const Na=this.sliceSerialize(la).length;ga.depth=Na}}function Zs(){this.data.setextHeadingSlurpLineEnding=!0}function Ys(la){const ga=this.stack[this.stack.length-1];ga.depth=this.sliceSerialize(la).codePointAt(0)===61?1:2}function Qs(){this.data.setextHeadingSlurpLineEnding=void 0}function ai(la){const Na=this.stack[this.stack.length-1].children;let Hs=Na[Na.length-1];(!Hs||Hs.type!=="text")&&(Hs=Ro(),Hs.position={start:point(la.start),end:void 0},Na.push(Hs)),this.stack.push(Hs)}function ia(la){const ga=this.stack.pop();ga.value+=this.sliceSerialize(la),ga.position.end=point(la.end)}function ca(la){const ga=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Na=ga.children[ga.children.length-1];Na.position.end=point(la.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&dn.canContainEols.includes(ga.type)&&(ai.call(this,la),ia.call(this,la))}function ha(){this.data.atHardBreak=!0}function ea(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.value=la}function ta(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.value=la}function aa(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.value=la}function fa(){const la=this.stack[this.stack.length-1];if(this.data.inReference){const ga=this.data.referenceType||"shortcut";la.type+="Reference",la.referenceType=ga,delete la.url,delete la.title}else delete la.identifier,delete la.label;this.data.referenceType=void 0}function ua(){const la=this.stack[this.stack.length-1];if(this.data.inReference){const ga=this.data.referenceType||"shortcut";la.type+="Reference",la.referenceType=ga,delete la.url,delete la.title}else delete la.identifier,delete la.label;this.data.referenceType=void 0}function Ea(la){const ga=this.sliceSerialize(la),Na=this.stack[this.stack.length-2];Na.label=decodeString(ga),Na.identifier=normalizeIdentifier(ga).toLowerCase()}function ra(){const la=this.stack[this.stack.length-1],ga=this.resume(),Na=this.stack[this.stack.length-1];if(this.data.inReference=!0,Na.type==="link"){const Hs=la.children;Na.children=Hs}else Na.alt=ga}function Ia(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.url=la}function $a(){const la=this.resume(),ga=this.stack[this.stack.length-1];ga.title=la}function oa(){this.data.inReference=void 0}function sa(){this.data.referenceType="collapsed"}function Ra(la){const ga=this.resume(),Na=this.stack[this.stack.length-1];Na.label=ga,Na.identifier=normalizeIdentifier(this.sliceSerialize(la)).toLowerCase(),this.data.referenceType="full"}function _a(la){this.data.characterReferenceType=la.type}function Oa(la){const ga=this.sliceSerialize(la),Na=this.data.characterReferenceType;let Hs;Na?(Hs=decodeNumericCharacterReference(ga,Na==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Hs=decodeNamedCharacterReference(ga);const zs=this.stack[this.stack.length-1];zs.value+=Hs}function za(la){const ga=this.stack.pop();ga.position.end=point(la.end)}function Ga(la){ia.call(this,la);const ga=this.stack[this.stack.length-1];ga.url=this.sliceSerialize(la)}function qa(la){ia.call(this,la);const ga=this.stack[this.stack.length-1];ga.url="mailto:"+this.sliceSerialize(la)}function Ma(){return{type:"blockquote",children:[],position:void 0}}function Fa(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Ka(){return{type:"inlineCode",value:"",position:void 0}}function mo(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function ko(){return{type:"emphasis",children:[],position:void 0}}function bo(){return{type:"heading",depth:0,children:[],position:void 0}}function oo(){return{type:"break",position:void 0}}function Va(){return{type:"html",value:"",position:void 0}}function uo(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Eo(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Ao(la){return{type:"list",ordered:la.type==="listOrdered",start:null,spread:la._spread,children:[],position:void 0}}function Zo(la){return{type:"listItem",spread:la._spread,checked:null,children:[],position:void 0}}function sl(){return{type:"paragraph",children:[],position:void 0}}function Po(){return{type:"strong",children:[],position:void 0}}function Ro(){return{type:"text",value:"",position:void 0}}function Vs(){return{type:"thematicBreak",position:void 0}}}function point(ds){return{line:ds.line,column:ds.column,offset:ds.offset}}function configure(ds,dn){let ms=-1;for(;++ms<dn.length;){const xs=dn[ms];Array.isArray(xs)?configure(ds,xs):extension(ds,xs)}}function extension(ds,dn){let ms;for(ms in dn)if(own$2.call(dn,ms))switch(ms){case"canContainEols":{const xs=dn[ms];xs&&ds[ms].push(...xs);break}case"transforms":{const xs=dn[ms];xs&&ds[ms].push(...xs);break}case"afterExit":case"beforeEnter":{const xs=dn[ms];xs&&ds[ms].push(xs);break}case"enter":case"exit":{const xs=dn[ms];xs&&Object.assign(ds[ms],xs);break}}}function defaultOnError(ds,dn){throw ds?new Error("Cannot close `"+ds.type+"` ("+stringifyPosition({start:ds.start,end:ds.end})+"): a different token (`"+dn.type+"`, "+stringifyPosition({start:dn.start,end:dn.end}
vendor: 8,307 bytes, lines 1386-1390
1386)+") is open"):new Error("Cannot close document, a token (`"+dn.type+"`, "+stringifyPosition({start:dn.start,end:dn.end})+") is still open")}function remarkParse(ds){const dn=this;dn.parser=ms;function ms(xs){return fromMarkdown(xs,{...dn.data("settings"),...ds,extensions:dn.data("micromarkExtensions")||[],mdastExtensions:dn.data("fromMarkdownExtensions")||[]})}}function blockquote$1(ds,dn){const ms={type:"element",tagName:"blockquote",properties:{},children:ds.wrap(ds.all(dn),!0)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function hardBreak$1(ds,dn){const ms={type:"element",tagName:"br",properties:{},children:[]};return ds.patch(dn,ms),[ds.applyData(dn,ms),{type:"text",value:`
1387`}]}function code$2(ds,dn){const ms=dn.value?dn.value+`
1388`:"",xs={},bs=dn.lang?dn.lang.split(/\s+/):[];bs.length>0&&(xs.className=["language-"+bs[0]]);let Es={type:"element",tagName:"code",properties:xs,children:[{type:"text",value:ms}]};return dn.meta&&(Es.data={meta:dn.meta}),ds.patch(dn,Es),Es=ds.applyData(dn,Es),Es={type:"element",tagName:"pre",properties:{},children:[Es]},ds.patch(dn,Es),Es}function strikethrough(ds,dn){const ms={type:"element",tagName:"del",properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function emphasis$1(ds,dn){const ms={type:"element",tagName:"em",properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function footnoteReference$1(ds,dn){const ms=typeof ds.options.clobberPrefix=="string"?ds.options.clobberPrefix:"user-content-",xs=String(dn.identifier).toUpperCase(),bs=normalizeUri(xs.toLowerCase()),Es=ds.footnoteOrder.indexOf(xs);let ws,Rs=ds.footnoteCounts.get(xs);Rs===void 0?(Rs=0,ds.footnoteOrder.push(xs),ws=ds.footnoteOrder.length):ws=Es+1,Rs+=1,ds.footnoteCounts.set(xs,Rs);const js={type:"element",tagName:"a",properties:{href:"#"+ms+"fn-"+bs,id:ms+"fnref-"+bs+(Rs>1?"-"+Rs:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(ws)}]};ds.patch(dn,js);const Cs={type:"element",tagName:"sup",properties:{},children:[js]};return ds.patch(dn,Cs),ds.applyData(dn,Cs)}function heading$1(ds,dn){const ms={type:"element",tagName:"h"+dn.depth,properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function html$1(ds,dn){if(ds.options.allowDangerousHtml){const ms={type:"raw",value:dn.value};return ds.patch(dn,ms),ds.applyData(dn,ms)}}function revert(ds,dn){const ms=dn.referenceType;let xs="]";if(ms==="collapsed"?xs+="[]":ms==="full"&&(xs+="["+(dn.label||dn.identifier)+"]"),dn.type==="imageReference")return[{type:"text",value:"!["+dn.alt+xs}];const bs=ds.all(dn),Es=bs[0];Es&&Es.type==="text"?Es.value="["+Es.value:bs.unshift({type:"text",value:"["});const ws=bs[bs.length-1];return ws&&ws.type==="text"?ws.value+=xs:bs.push({type:"text",value:xs}),bs}function imageReference$1(ds,dn){const ms=String(dn.identifier).toUpperCase(),xs=ds.definitionById.get(ms);if(!xs)return revert(ds,dn);const bs={src:normalizeUri(xs.url||""),alt:dn.alt};xs.title!==null&&xs.title!==void 0&&(bs.title=xs.title);const Es={type:"element",tagName:"img",properties:bs,children:[]};return ds.patch(dn,Es),ds.applyData(dn,Es)}function image$1(ds,dn){const ms={src:normalizeUri(dn.url)};dn.alt!==null&&dn.alt!==void 0&&(ms.alt=dn.alt),dn.title!==null&&dn.title!==void 0&&(ms.title=dn.title);const xs={type:"element",tagName:"img",properties:ms,children:[]};return ds.patch(dn,xs),ds.applyData(dn,xs)}function inlineCode$1(ds,dn){const ms={type:"text",value:dn.value.replace(/\r?\n|\r/g," ")};ds.patch(dn,ms);const xs={type:"element",tagName:"code",properties:{},children:[ms]};return ds.patch(dn,xs),ds.applyData(dn,xs)}function linkReference$1(ds,dn){const ms=String(dn.identifier).toUpperCase(),xs=ds.definitionById.get(ms);if(!xs)return revert(ds,dn);const bs={href:normalizeUri(xs.url||"")};xs.title!==null&&xs.title!==void 0&&(bs.title=xs.title);const Es={type:"element",tagName:"a",properties:bs,children:ds.all(dn)};return ds.patch(dn,Es),ds.applyData(dn,Es)}function link$1(ds,dn){const ms={href:normalizeUri(dn.url)};dn.title!==null&&dn.title!==void 0&&(ms.title=dn.title);const xs={type:"element",tagName:"a",properties:ms,children:ds.all(dn)};return ds.patch(dn,xs),ds.applyData(dn,xs)}function listItem$1(ds,dn,ms){const xs=ds.all(dn),bs=ms?listLoose(ms):listItemLoose(dn),Es={},ws=[];if(typeof dn.checked=="boolean"){const As=xs[0];let ks;As&&As.type==="element"&&As.tagName==="p"?ks=As:(ks={type:"element",tagName:"p",properties:{},children:[]},xs.unshift(ks)),ks.children.length>0&&ks.children.unshift({type:"text",value:" "}),ks.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:dn.checked,disabled:!0},children:[]}),Es.className=["task-list-item"]}let Rs=-1;for(;++Rs<xs.length;){const As=xs[Rs];(bs||Rs!==0||As.type!=="element"||As.tagName!=="p")&&ws.push({type:"text",value:`
1389`}),As.type==="element"&&As.tagName==="p"&&!bs?ws.push(...As.children):ws.push(As)}const js=xs[xs.length-1];js&&(bs||js.type!=="element"||js.tagName!=="p")&&ws.push({type:"text",value:`
1390`});const Cs={type:"element",tagName:"li",properties:Es,children:ws};return ds.patch(dn,Cs),ds.applyData(dn,Cs)}function listLoose(ds){let dn=!1;if(ds.type==="list"){dn=ds.spread||!1;const ms=ds.children;let xs=-1;for(;!dn&&++xs<ms.length;)dn=listItemLoose(ms[xs])}return dn}function listItemLoose(ds){const dn=ds.spread;return dn??ds.children.length>1}function list$1(ds,dn){const ms={},xs=ds.all(dn);let bs=-1;for(typeof dn.start=="number"&&dn.start!==1&&(ms.start=dn.start);++bs<xs.length;){const ws=xs[bs];if(ws.type==="element"&&ws.tagName==="li"&&ws.properties&&Array.isArray(ws.properties.className)&&ws.properties.className.includes("task-list-item")){ms.className=["contains-task-list"];break}}const Es={type:"element",tagName:dn.ordered?"ol":"ul",properties:ms,children:ds.wrap(xs,!0)};return ds.patch(dn,Es),ds.applyData(dn,Es)}function paragraph$1(ds,dn){const ms={type:"element",tagName:"p",properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function root$2(ds,dn){const ms={type:"root",children:ds.wrap(ds.all(dn))};return ds.patch(dn,ms),ds.applyData(dn,ms)}function strong$1(ds,dn){const ms={type:"element",tagName:"strong",properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}function table(ds,dn){const ms=ds.all(dn),xs=ms.shift(),bs=[];if(xs){const ws={type:"element",tagName:"thead",properties:{},children:ds.wrap([xs],!0)};ds.patch(dn.children[0],ws),bs.push(ws)}if(ms.length>0){const ws={type:"element",tagName:"tbody",properties:{},children:ds.wrap(ms,!0)},Rs=pointStart(dn.children[1]),js=pointEnd(dn.children[dn.children.length-1]);Rs&&js&&(ws.position={start:Rs,end:js}),bs.push(ws)}const Es={type:"element",tagName:"table",properties:{},children:ds.wrap(bs,!0)};return ds.patch(dn,Es),ds.applyData(dn,Es)}function tableRow(ds,dn,ms){const xs=ms?ms.children:void 0,Es=(xs?xs.indexOf(dn):1)===0?"th":"td",ws=ms&&ms.type==="table"?ms.align:void 0,Rs=ws?ws.length:dn.children.length;let js=-1;const Cs=[];for(;++js<Rs;){const ks=dn.children[js],Os={},Ms=ws?ws[js]:void 0;Ms&&(Os.align=Ms);let Ds={type:"element",tagName:Es,properties:Os,children:[]};ks&&(Ds.children=ds.all(ks),ds.patch(ks,Ds),Ds=ds.applyData(ks,Ds)),Cs.push(Ds)}const As={type:"element",tagName:"tr",properties:{},children:ds.wrap(Cs,!0)};return ds.patch(dn,As),ds.applyData(dn,As)}function tableCell(ds,dn){const ms={type:"element",tagName:"td",properties:{},children:ds.all(dn)};return ds.patch(dn,ms),ds.applyData(dn,ms)}const tab=9,space=32;function trimLines(ds){const dn=String(ds),ms=/\r?\n|\r/g;let xs=ms.exec(dn),bs=0;const Es=[];for(;xs;)Es.push(trimLine(dn.slice(bs,xs.index),bs>0,!0),xs[0]),bs=xs.index+xs[0].length,xs=ms.exec(dn);return Es.push(trimLine(dn.slice(bs),bs>0,!1)),Es.join("")}function trimLine(ds,dn,ms){let xs=0,bs=ds.length;if(dn){let Es=ds.codePointAt(xs);for(;Es===tab||Es===space;)xs++,Es=ds.codePointAt(xs)}if(ms){let Es=ds.codePointAt(bs-1);for(;Es===tab||Es===space;)bs--,Es=ds.codePointAt(bs-1)}return bs>xs?ds.slice(xs,bs):""}function text$2(ds,dn){const ms={type:"text",value:trimLines(String(dn.value))};return ds.patch(dn,ms),ds.applyData(dn,ms)}function thematicBreak$1(ds,dn){const ms={type:"element",tagName:"hr",properties:{},children:[]};return ds.patch(dn,ms),ds.applyData(dn,ms)}
vendor: 6,385 bytes, lines 1390-1391
1390const handlers={blockquote:blockquote$1,break:hardBreak$1,code:code$2,delete:strikethrough,emphasis:emphasis$1,footnoteReference:footnoteReference$1,heading:heading$1,html:html$1,imageReference:imageReference$1,image:image$1,inlineCode:inlineCode$1,linkReference:linkReference$1,link:link$1,listItem:listItem$1,list:list$1,paragraph:paragraph$1,root:root$2,strong:strong$1,table,tableCell,tableRow,text:text$2,thematicBreak:thematicBreak$1,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}const VOID=-1,PRIMITIVE=0,ARRAY=1,OBJECT=2,DATE=3,REGEXP=4,MAP=5,SET=6,ERROR=7,BIGINT=8,{defineProperty}=Object,env=typeof self=="object"?self:globalThis,guard=(ds,dn)=>{switch(ds){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+ds)}return new env[ds](dn)},deserializer=(ds,dn)=>{const ms=(bs,Es)=>(ds.set(Es,bs),bs),xs=bs=>{if(ds.has(bs))return ds.get(bs);const[Es,ws]=dn[bs];switch(Es){case PRIMITIVE:case VOID:return ms(ws,bs);case ARRAY:{const Rs=ms([],bs);for(const js of ws)Rs.push(xs(js));return Rs}case OBJECT:{const Rs=ms({},bs);for(const[js,Cs]of ws){const As=xs(js),ks=xs(Cs);As==="__proto__"?defineProperty(Rs,As,{value:ks,configurable:!0,enumerable:!0,writable:!0}):Rs[As]=ks}return Rs}case DATE:return ms(new Date(ws),bs);case REGEXP:{const{source:Rs,flags:js}=ws;return ms(new RegExp(Rs,js),bs)}case MAP:{const Rs=ms(new Map,bs);for(const[js,Cs]of ws)Rs.set(xs(js),xs(Cs));return Rs}case SET:{const Rs=ms(new Set,bs);for(const js of ws)Rs.add(xs(js));return Rs}case ERROR:{const{name:Rs,message:js}=ws;return ms(typeof env[Rs]=="function"?guard(Rs,js):new Error(js),bs)}case BIGINT:return ms(BigInt(ws),bs);case"BigInt":return ms(Object(BigInt(ws)),bs);case"ArrayBuffer":return ms(new Uint8Array(ws).buffer,ws);case"DataView":{const{buffer:Rs}=new Uint8Array(ws);return ms(new DataView(Rs),ws)}case"-0":return-0}return ms(guard(Es,ws),bs)};return xs},deserialize=ds=>deserializer(new Map,ds)(0),EMPTY="",{toString}={},{keys,is:is$1}=Object,typeOf=ds=>{const dn=typeof ds;if(dn!=="object"||!ds)return[PRIMITIVE,dn];const ms=toString.call(ds).slice(8,-1);switch(ms){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY];case"DataView":return[ARRAY,ms]}return ms.includes("Array")?[ARRAY,ms]:ds instanceof Error?[ERROR,ds.name||"Error"]:[OBJECT,ms]},shouldSkip=([ds,dn])=>ds===PRIMITIVE&&(dn==="function"||dn==="symbol"),serializer=(ds,dn,ms,xs)=>{const bs=(ws,Rs)=>{const js=xs.push(ws)-1;return ms.set(Rs,js),js},Es=ws=>{if(ms.has(ws))return ms.get(ws);let[Rs,js]=typeOf(ws);switch(Rs){case PRIMITIVE:{let As=ws;switch(js){case"bigint":Rs=BIGINT,As=ws.toString();break;case"number":if(!ws&&is$1(ws,-0))return xs.push(["-0"])-1;break;case"function":case"symbol":if(ds)throw new TypeError("unable to serialize "+js);As=null;break;case"undefined":return bs([VOID],ws)}return bs([Rs,As],ws)}case ARRAY:{if(js){let Os=ws;return js==="DataView"?Os=new Uint8Array(ws.buffer):js==="ArrayBuffer"&&(Os=new Uint8Array(ws)),bs([js,[...Os]],ws)}const As=[],ks=bs([Rs,As],ws);for(const Os of ws)As.push(Es(Os));return ks}case OBJECT:{if(js)switch(js){case"BigInt":return bs([js,ws.toString()],ws);case"Boolean":case"Number":case"String":return bs([js,ws.valueOf()],ws)}if(dn&&"toJSON"in ws)return Es(ws.toJSON());const As=[],ks=bs([Rs,As],ws);for(const Os of keys(ws))(ds||!shouldSkip(typeOf(ws[Os])))&&As.push([Es(Os),Es(ws[Os])]);return ks}case DATE:return bs([Rs,isNaN(ws.getTime())?EMPTY:ws.toISOString()],ws);case REGEXP:{const{source:As,flags:ks}=ws;return bs([Rs,{source:As,flags:ks}],ws)}case MAP:{const As=[],ks=bs([Rs,As],ws);for(const[Os,Ms]of ws)(ds||!(shouldSkip(typeOf(Os))||shouldSkip(typeOf(Ms))))&&As.push([Es(Os),Es(Ms)]);return ks}case SET:{const As=[],ks=bs([Rs,As],ws);for(const Os of ws)(ds||!shouldSkip(typeOf(Os)))&&As.push(Es(Os));return ks}}const{message:Cs}=ws;return bs([Rs,{name:js,message:Cs}],ws)};return Es},serialize$1=(ds,{json:dn,lossy:ms}={})=>{const xs=[];return serializer(!(dn||ms),!!dn,new Map,xs)(ds),xs},structuredClone$1=typeof structuredClone=="function"?(ds,dn)=>dn&&("json"in dn||"lossy"in dn)?deserialize(serialize$1(ds,dn)):structuredClone(ds):(ds,dn)=>deserialize(serialize$1(ds,dn));function defaultFootnoteBackContent(ds,dn){const ms=[{type:"text",value:"↩"}];return dn>1&&ms.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(dn)}]}),ms}function defaultFootnoteBackLabel(ds,dn){return"Back to reference "+(ds+1)+(dn>1?"-"+dn:"")}function footer(ds){const dn=typeof ds.options.clobberPrefix=="string"?ds.options.clobberPrefix:"user-content-",ms=ds.options.footnoteBackContent||defaultFootnoteBackContent,xs=ds.options.footnoteBackLabel||defaultFootnoteBackLabel,bs=ds.options.footnoteLabel||"Footnotes",Es=ds.options.footnoteLabelTagName||"h2",ws=ds.options.footnoteLabelProperties||{className:["sr-only"]},Rs=[];let js=-1;for(;++js<ds.footnoteOrder.length;){const Cs=ds.footnoteById.get(ds.footnoteOrder[js]);if(!Cs)continue;const As=ds.all(Cs),ks=String(Cs.identifier).toUpperCase(),Os=normalizeUri(ks.toLowerCase());let Ms=0;const Ds=[],Ps=ds.footnoteCounts.get(ks);for(;Ps!==void 0&&++Ms<=Ps;){Ds.length>0&&Ds.push({type:"text",value:" "});let Fs=typeof ms=="string"?ms:ms(js,Ms);typeof Fs=="string"&&(Fs={type:"text",value:Fs}),Ds.push({type:"element",tagName:"a",properties:{href:"#"+dn+"fnref-"+Os+(Ms>1?"-"+Ms:""),dataFootnoteBackref:"",ariaLabel:typeof xs=="string"?xs:xs(js,Ms),className:["data-footnote-backref"]},children:Array.isArray(Fs)?Fs:[Fs]})}const Ls=As[As.length-1];if(Ls&&Ls.type==="element"&&Ls.tagName==="p"){const Fs=Ls.children[Ls.children.length-1];Fs&&Fs.type==="text"?Fs.value+=" ":Ls.children.push({type:"text",value:" "}),Ls.children.push(...Ds)}else As.push(...Ds);const Bs={type:"element",tagName:"li",properties:{id:dn+"fn-"+Os},children:ds.wrap(As,!0)};ds.patch(Cs,Bs),Rs.push(Bs)}if(Rs.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:Es,properties:{...structuredClone$1(ws),id:"footnote-label"},children:[{type:"text",value:bs}]},{type:"text",value:`
1391`},{type:"element",tagName:"ol",properties:{},children:ds.wrap(Rs,!0)}
vendor: 18,271 bytes, lines 1391-1396
1391,{type:"text",value:`
1392`}]}}const convert=(function(ds){if(ds==null)return ok;if(typeof ds=="function")return castFactory(ds);if(typeof ds=="object")return Array.isArray(ds)?anyFactory(ds):propertiesFactory(ds);if(typeof ds=="string")return typeFactory(ds);throw new Error("Expected function, string, or object as test")});function anyFactory(ds){const dn=[];let ms=-1;for(;++ms<ds.length;)dn[ms]=convert(ds[ms]);return castFactory(xs);function xs(...bs){let Es=-1;for(;++Es<dn.length;)if(dn[Es].apply(this,bs))return!0;return!1}}function propertiesFactory(ds){const dn=ds;return castFactory(ms);function ms(xs){const bs=xs;let Es;for(Es in ds)if(bs[Es]!==dn[Es])return!1;return!0}}function typeFactory(ds){return castFactory(dn);function dn(ms){return ms&&ms.type===ds}}function castFactory(ds){return dn;function dn(ms,xs,bs){return!!(looksLikeANode(ms)&&ds.call(this,ms,typeof xs=="number"?xs:void 0,bs||void 0))}}function ok(){return!0}function looksLikeANode(ds){return ds!==null&&typeof ds=="object"&&"type"in ds}function color(ds){return ds}const empty=[],CONTINUE=!0,EXIT=!1,SKIP="skip";function visitParents(ds,dn,ms,xs){let bs;typeof dn=="function"&&typeof ms!="function"?(xs=ms,ms=dn):bs=dn;const Es=convert(bs),ws=xs?-1:1;Rs(ds,void 0,[])();function Rs(js,Cs,As){const ks=js&&typeof js=="object"?js:{};if(typeof ks.type=="string"){const Ms=typeof ks.tagName=="string"?ks.tagName:typeof ks.name=="string"?ks.name:void 0;Object.defineProperty(Os,"name",{value:"node ("+(js.type+(Ms?"<"+Ms+">":""))+")"})}return Os;function Os(){let Ms=empty,Ds,Ps,Ls;if((!dn||Es(js,Cs,As[As.length-1]||void 0))&&(Ms=toResult(ms(js,As)),Ms[0]===EXIT))return Ms;if("children"in js&&js.children){const Bs=js;if(Bs.children&&Ms[0]!==SKIP)for(Ps=(xs?Bs.children.length:-1)+ws,Ls=As.concat(Bs);Ps>-1&&Ps<Bs.children.length;){const Fs=Bs.children[Ps];if(Ds=Rs(Fs,Ps,Ls)(),Ds[0]===EXIT)return Ds;Ps=typeof Ds[1]=="number"?Ds[1]:Ps+ws}}return Ms}}}function toResult(ds){return Array.isArray(ds)?ds:typeof ds=="number"?[CONTINUE,ds]:ds==null?empty:[ds]}function visit(ds,dn,ms,xs){let bs,Es,ws;typeof dn=="function"&&typeof ms!="function"?(Es=void 0,ws=dn,bs=ms):(Es=dn,ws=ms,bs=xs),visitParents(ds,Es,Rs,bs);function Rs(js,Cs){const As=Cs[Cs.length-1],ks=As?As.children.indexOf(js):void 0;return ws(js,ks,As)}}const own$1={}.hasOwnProperty,emptyOptions$1={};function createState(ds,dn){const ms=dn||emptyOptions$1,xs=new Map,bs=new Map,Es=new Map,ws={...handlers,...ms.handlers},Rs={all:Cs,applyData,definitionById:xs,footnoteById:bs,footnoteCounts:Es,footnoteOrder:[],handlers:ws,one:js,options:ms,patch,wrap:wrap$1};return visit(ds,function(As){if(As.type==="definition"||As.type==="footnoteDefinition"){const ks=As.type==="definition"?xs:bs,Os=String(As.identifier).toUpperCase();ks.has(Os)||ks.set(Os,As)}}),Rs;function js(As,ks){const Os=As.type,Ms=Rs.handlers[Os];if(own$1.call(Rs.handlers,Os)&&Ms)return Ms(Rs,As,ks);if(Rs.options.passThrough&&Rs.options.passThrough.includes(Os)){if("children"in As){const{children:Ps,...Ls}=As,Bs=structuredClone$1(Ls);return Bs.children=Rs.all(As),Bs}return structuredClone$1(As)}return(Rs.options.unknownHandler||defaultUnknownHandler)(Rs,As,ks)}function Cs(As){const ks=[];if("children"in As){const Os=As.children;let Ms=-1;for(;++Ms<Os.length;){const Ds=Rs.one(Os[Ms],As);if(Ds){if(Ms&&Os[Ms-1].type==="break"&&(!Array.isArray(Ds)&&Ds.type==="text"&&(Ds.value=trimMarkdownSpaceStart(Ds.value)),!Array.isArray(Ds)&&Ds.type==="element")){const Ps=Ds.children[0];Ps&&Ps.type==="text"&&(Ps.value=trimMarkdownSpaceStart(Ps.value))}Array.isArray(Ds)?ks.push(...Ds):ks.push(Ds)}}}return ks}}function patch(ds,dn){ds.position&&(dn.position=position$1(ds))}function applyData(ds,dn){let ms=dn;if(ds&&ds.data){const xs=ds.data.hName,bs=ds.data.hChildren,Es=ds.data.hProperties;if(typeof xs=="string")if(ms.type==="element")ms.tagName=xs;else{const ws="children"in ms?ms.children:[ms];ms={type:"element",tagName:xs,properties:{},children:ws}}ms.type==="element"&&Es&&Object.assign(ms.properties,structuredClone$1(Es)),"children"in ms&&ms.children&&bs!==null&&bs!==void 0&&(ms.children=bs)}return ms}function defaultUnknownHandler(ds,dn){const ms=dn.data||{},xs="value"in dn&&!(own$1.call(ms,"hProperties")||own$1.call(ms,"hChildren"))?{type:"text",value:dn.value}:{type:"element",tagName:"div",properties:{},children:ds.all(dn)};return ds.patch(dn,xs),ds.applyData(dn,xs)}function wrap$1(ds,dn){const ms=[];let xs=-1;for(dn&&ms.push({type:"text",value:`
1393`});++xs<ds.length;)xs&&ms.push({type:"text",value:`
1394`}),ms.push(ds[xs]);return dn&&ds.length>0&&ms.push({type:"text",value:`
1395`}),ms}function trimMarkdownSpaceStart(ds){let dn=0,ms=ds.charCodeAt(dn);for(;ms===9||ms===32;)dn++,ms=ds.charCodeAt(dn);return ds.slice(dn)}function toHast(ds,dn){const ms=createState(ds,dn),xs=ms.one(ds,void 0),bs=footer(ms),Es=Array.isArray(xs)?{type:"root",children:xs}:xs||{type:"root",children:[]};return bs&&Es.children.push({type:"text",value:`
1396`},bs),Es}function remarkRehype(ds,dn){return ds&&"run"in ds?async function(ms,xs){const bs=toHast(ms,{file:xs,...dn});await ds.run(bs,xs)}:function(ms,xs){return toHast(ms,{file:xs,...ds||dn})}}function bail(ds){if(ds)throw ds}var extend$1,hasRequiredExtend;function requireExtend(){if(hasRequiredExtend)return extend$1;hasRequiredExtend=1;var ds=Object.prototype.hasOwnProperty,dn=Object.prototype.toString,ms=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,bs=function(Cs){return typeof Array.isArray=="function"?Array.isArray(Cs):dn.call(Cs)==="[object Array]"},Es=function(Cs){if(!Cs||dn.call(Cs)!=="[object Object]")return!1;var As=ds.call(Cs,"constructor"),ks=Cs.constructor&&Cs.constructor.prototype&&ds.call(Cs.constructor.prototype,"isPrototypeOf");if(Cs.constructor&&!As&&!ks)return!1;var Os;for(Os in Cs);return typeof Os>"u"||ds.call(Cs,Os)},ws=function(Cs,As){ms&&As.name==="__proto__"?ms(Cs,As.name,{enumerable:!0,configurable:!0,value:As.newValue,writable:!0}):Cs[As.name]=As.newValue},Rs=function(Cs,As){if(As==="__proto__")if(ds.call(Cs,As)){if(xs)return xs(Cs,As).value}else return;return Cs[As]};return extend$1=function js(){var Cs,As,ks,Os,Ms,Ds,Ps=arguments[0],Ls=1,Bs=arguments.length,Fs=!1;for(typeof Ps=="boolean"&&(Fs=Ps,Ps=arguments[1]||{},Ls=2),(Ps==null||typeof Ps!="object"&&typeof Ps!="function")&&(Ps={});Ls<Bs;++Ls)if(Cs=arguments[Ls],Cs!=null)for(As in Cs)ks=Rs(Ps,As),Os=Rs(Cs,As),Ps!==Os&&(Fs&&Os&&(Es(Os)||(Ms=bs(Os)))?(Ms?(Ms=!1,Ds=ks&&bs(ks)?ks:[]):Ds=ks&&Es(ks)?ks:{},ws(Ps,{name:As,newValue:js(Fs,Ds,Os)})):typeof Os<"u"&&ws(Ps,{name:As,newValue:Os}));return Ps},extend$1}var extendExports=requireExtend();const extend=getDefaultExportFromCjs(extendExports);function isPlainObject(ds){if(typeof ds!="object"||ds===null)return!1;const dn=Object.getPrototypeOf(ds);return(dn===null||dn===Object.prototype||Object.getPrototypeOf(dn)===null)&&!(Symbol.toStringTag in ds)&&!(Symbol.iterator in ds)}function trough(){const ds=[],dn={run:ms,use:xs};return dn;function ms(...bs){let Es=-1;const ws=bs.pop();if(typeof ws!="function")throw new TypeError("Expected function as last argument, not "+ws);Rs(null,...bs);function Rs(js,...Cs){const As=ds[++Es];let ks=-1;if(js){ws(js);return}for(;++ks<bs.length;)(Cs[ks]===null||Cs[ks]===void 0)&&(Cs[ks]=bs[ks]);bs=Cs,As?wrap(As,Rs)(...Cs):ws(null,...Cs)}}function xs(bs){if(typeof bs!="function")throw new TypeError("Expected `middelware` to be a function, not "+bs);return ds.push(bs),dn}}function wrap(ds,dn){let ms;return xs;function xs(...ws){const Rs=ds.length>ws.length;let js;Rs&&ws.push(bs);try{js=ds.apply(this,ws)}catch(Cs){const As=Cs;if(Rs&&ms)throw As;return bs(As)}Rs||(js&&js.then&&typeof js.then=="function"?js.then(Es,bs):js instanceof Error?bs(js):Es(js))}function bs(ws,...Rs){ms||(ms=!0,dn(ws,...Rs))}function Es(ws){bs(null,ws)}}const minpath={basename,dirname,extname,join,sep:"/"};function basename(ds,dn){if(dn!==void 0&&typeof dn!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(ds);let ms=0,xs=-1,bs=ds.length,Es;if(dn===void 0||dn.length===0||dn.length>ds.length){for(;bs--;)if(ds.codePointAt(bs)===47){if(Es){ms=bs+1;break}}else xs<0&&(Es=!0,xs=bs+1);return xs<0?"":ds.slice(ms,xs)}if(dn===ds)return"";let ws=-1,Rs=dn.length-1;for(;bs--;)if(ds.codePointAt(bs)===47){if(Es){ms=bs+1;break}}else ws<0&&(Es=!0,ws=bs+1),Rs>-1&&(ds.codePointAt(bs)===dn.codePointAt(Rs--)?Rs<0&&(xs=bs):(Rs=-1,xs=ws));return ms===xs?xs=ws:xs<0&&(xs=ds.length),ds.slice(ms,xs)}function dirname(ds){if(assertPath$1(ds),ds.length===0)return".";let dn=-1,ms=ds.length,xs;for(;--ms;)if(ds.codePointAt(ms)===47){if(xs){dn=ms;break}}else xs||(xs=!0);return dn<0?ds.codePointAt(0)===47?"/":".":dn===1&&ds.codePointAt(0)===47?"//":ds.slice(0,dn)}function extname(ds){assertPath$1(ds);let dn=ds.length,ms=-1,xs=0,bs=-1,Es=0,ws;for(;dn--;){const Rs=ds.codePointAt(dn);if(Rs===47){if(ws){xs=dn+1;break}continue}ms<0&&(ws=!0,ms=dn+1),Rs===46?bs<0?bs=dn:Es!==1&&(Es=1):bs>-1&&(Es=-1)}return bs<0||ms<0||Es===0||Es===1&&bs===ms-1&&bs===xs+1?"":ds.slice(bs,ms)}function join(...ds){let dn=-1,ms;for(;++dn<ds.length;)assertPath$1(ds[dn]),ds[dn]&&(ms=ms===void 0?ds[dn]:ms+"/"+ds[dn]);return ms===void 0?".":normalize(ms)}function normalize(ds){assertPath$1(ds);const dn=ds.codePointAt(0)===47;let ms=normalizeString(ds,!dn);return ms.length===0&&!dn&&(ms="."),ms.length>0&&ds.codePointAt(ds.length-1)===47&&(ms+="/"),dn?"/"+ms:ms}function normalizeString(ds,dn){let ms="",xs=0,bs=-1,Es=0,ws=-1,Rs,js;for(;++ws<=ds.length;){if(ws<ds.length)Rs=ds.codePointAt(ws);else{if(Rs===47)break;Rs=47}if(Rs===47){if(!(bs===ws-1||Es===1))if(bs!==ws-1&&Es===2){if(ms.length<2||xs!==2||ms.codePointAt(ms.length-1)!==46||ms.codePointAt(ms.length-2)!==46){if(ms.length>2){if(js=ms.lastIndexOf("/"),js!==ms.length-1){js<0?(ms="",xs=0):(ms=ms.slice(0,js),xs=ms.length-1-ms.lastIndexOf("/")),bs=ws,Es=0;continue}}else if(ms.length>0){ms="",xs=0,bs=ws,Es=0;continue}}dn&&(ms=ms.length>0?ms+"/..":"..",xs=2)}else ms.length>0?ms+="/"+ds.slice(bs+1,ws):ms=ds.slice(bs+1,ws),xs=ws-bs-1;bs=ws,Es=0}else Rs===46&&Es>-1?Es++:Es=-1}return ms}function assertPath$1(ds){if(typeof ds!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(ds))}const minproc={cwd};function cwd(){return"/"}function isUrl(ds){return!!(ds!==null&&typeof ds=="object"&&"href"in ds&&ds.href&&"protocol"in ds&&ds.protocol&&ds.auth===void 0)}function urlToPath(ds){if(typeof ds=="string")ds=new URL(ds);else if(!isUrl(ds)){const dn=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+ds+"`");throw dn.code="ERR_INVALID_ARG_TYPE",dn}if(ds.protocol!=="file:"){const dn=new TypeError("The URL must be of scheme file");throw dn.code="ERR_INVALID_URL_SCHEME",dn}return getPathFromURLPosix(ds)}function getPathFromURLPosix(ds){if(ds.hostname!==""){const xs=new TypeError('File URL host must be "localhost" or empty on darwin');throw xs.code="ERR_INVALID_FILE_URL_HOST",xs}const dn=ds.pathname;let ms=-1;for(;++ms<dn.length;)if(dn.codePointAt(ms)===37&&dn.codePointAt(ms+1)===50){const xs=dn.codePointAt(ms+2);if(xs===70||xs===102){const bs=new TypeError("File URL path must not include encoded / characters");throw bs.code="ERR_INVALID_FILE_URL_PATH",bs}}return decodeURIComponent(dn)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(dn){let ms;dn?isUrl(dn)?ms={path:dn}:typeof dn=="string"||isUint8Array$1(dn)?ms={value:dn}:ms=dn:ms={},this.cwd="cwd"in ms?"":minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let xs=-1;for(;++xs<order.length;){const Es=order[xs];Es in ms&&ms[Es]!==void 0&&ms[Es]!==null&&(this[Es]=Es==="history"?[...ms[Es]]:ms[Es])}let bs;for(bs in ms)order.includes(bs)||(this[bs]=ms[bs])}get basename(){return typeof this.path=="string"?minpath.basename(this.path):void 0}set basename(dn){assertNonEmpty(dn,"basename"),assertPart(dn,"basename"),this.path=minpath.join(this.dirname||"",dn)}get dirname(){return typeof this.path=="string"?minpath.dirname(this.path):void 0}set dirname(dn){assertPath(this.basename,"dirname"),this.path=minpath.join(dn||"",this.basename)}get extname(){return typeof this.path=="string"?minpath.extname(this.path):void 0}set extname(dn){if(assertPart(dn,"extname"),assertPath(this.dirname,"extname"),dn){if(dn.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(dn.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(dn||""))}get path(){return this.history[this.history.length-1]}set path(dn){isUrl(dn)&&(dn=urlToPath(dn)),assertNonEmpty(dn,"path"),this.path!==dn&&this.history.push(dn)}get stem(){return typeof this.path=="string"?minpath.basename(this.path,this.extname):void 0}set stem(dn){assertNonEmpty(dn,"stem"),assertPart(dn,"stem"),this.path=minpath.join(this.dirname||"",dn+(this.extname||""))}fail(dn,ms,xs){const bs=this.message(dn,ms,xs);throw bs.fatal=!0,bs}info(dn,ms,xs){const bs=this.message(dn,ms,xs);return bs.fatal=void 0,bs}message(dn,ms,xs){const bs=new VFileMessage(dn,ms,xs);return this.path&&(bs.name=this.path+":"+bs.name,bs.file=this.path),bs.fatal=!1,this.messages.push(bs),bs}toString(dn){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(dn||void 0).decode(this.value)}}function assertPart(ds,dn){if(ds&&ds.includes(minpath.sep))throw new Error("`"+dn+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(ds,dn){if(!ds)throw new Error("`"+dn+"` cannot be empty")}function assertPath(ds,dn){if(!ds)throw new Error("Setting `"+dn+"` requires `path` to be set too")}function isUint8Array$1(ds){return!!(ds&&typeof ds=="object"&&"byteLength"in ds&&"byteOffset"in ds)}const CallableInstance=(function(ds){const xs=this.constructor.prototype,bs=xs[ds],Es=function(){return bs.apply(Es,arguments)};return Object.setPrototypeOf(Es,xs),Es}),own={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const dn=new Processor;let ms=-1;for(;++ms<this.attachers.length;){const xs=this.attachers[ms];dn.use(...xs)}return dn.data(extend(!0,{},this.namespace)),dn}data(dn,ms){return typeof dn=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[dn]=ms,this):own.call(this.namespace,dn)&&this.namespace[dn]||void 0:dn?(assertUnfrozen("data",this.frozen),this.namespace=dn,this):this.namespace}freeze(){if(this.frozen)return this;const dn=this;for(;++this.freezeIndex<this.attachers.length;){const[ms,...xs]=this.attachers[this.freezeIndex];if(xs[0]===!1)continue;xs[0]===!0&&(xs[0]=void 0);const bs=ms.call(dn,...xs);typeof bs=="function"&&this.transformers.use(bs)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(dn){this.freeze();const ms=vfile(dn),xs=this.parser||this.Parser;return assertParser("parse",xs),xs(String(ms),ms)}process(dn,ms){const xs=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),ms?bs(void 0,ms):new Promise(bs);function bs(Es,ws){const Rs=vfile(dn),js=xs.parse(Rs);xs.run(js,Rs,function(As,ks,Os){if(As||!ks||!Os)return Cs(As);const Ms=ks,Ds=xs.stringify(Ms,Os);looksLikeAValue(Ds)?Os.value=Ds:Os.result=Ds,Cs(As,Os)});function Cs(As,ks){As||!ks?ws(As):Es?Es(ks):ms(void 0,ks)}}}processSync(dn){let ms=!1,xs;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(dn,bs),assertDone("processSync","process",ms),xs;function bs(Es,ws){ms=!0,bail(Es),xs=ws}}run(dn,ms,xs){assertNode(dn),this.freeze();const bs=this.transformers;return!xs&&typeof ms=="function"&&(xs=ms,ms=void 0),xs?Es(void 0,xs):new Promise(Es);function Es(ws,Rs){const js=vfile(ms);bs.run(dn,js,Cs);function Cs(As,ks,Os){const Ms=ks||dn;As?Rs(As):ws?ws(Ms):xs(void 0,Ms,Os)}}}runSync(dn,ms){let xs=!1,bs;return this.run(dn,ms,Es),assertDone("runSync","run",xs),bs;function Es(ws,Rs){bail(ws),bs=Rs,xs=!0}}stringify(dn,ms){this.freeze();const xs=vfile(ms),bs=this.compiler||this.Compiler;return assertCompiler("stringify",bs),assertNode(dn),bs(dn,xs)}use(dn,...ms){const xs=this.attachers,bs=this.namespace;if(assertUnfrozen("use",this.frozen),dn!=null)if(typeof dn=="function")js(dn,ms);else if(typeof dn=="object")Array.isArray(dn)?Rs(dn):ws(dn);else throw new TypeError("Expected usable value, not `"+dn+"`");return this;function Es(Cs){if(typeof Cs=="function")js(Cs,[]);else if(typeof Cs=="object")if(Array.isArray(Cs)){const[As,...ks]=Cs;js(As,ks)}else ws(Cs);else throw new TypeError("Expected usable value, not `"+Cs+"`")}function ws(Cs){if(!("plugins"in Cs)&&!("settings"in Cs))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");Rs(Cs.plugins),Cs.settings&&(bs.settings=extend(!0,bs.settings,Cs.settings))}function Rs(Cs){let As=-1;if(Cs!=null)if(Array.isArray(Cs))for(;++As<Cs.length;){const ks=Cs[As];Es(ks)}else throw new TypeError("Expected a list of plugins, not `"+Cs+"`")}function js(Cs,As){let ks=-1,Os=-1;for(;++ks<xs.length;)if(xs[ks][0]===Cs){Os=ks;break}if(Os===-1)xs.push([Cs,...As]);else if(As.length>0){let[Ms,...Ds]=As;const Ps=xs[Os][1];isPlainObject(Ps)&&isPlainObject(Ms)&&(Ms=extend(!0,Ps,Ms)),xs[Os]=[Cs,Ms,...Ds]}}}}const unified=new Processor().freeze();function assertParser(ds,dn){if(typeof dn!="function")throw new TypeError("Cannot `"+ds+"` without `parser`")}function assertCompiler(ds,dn){if(typeof dn!="function")throw new TypeError("Cannot `"+ds+"` without `compiler`")}function assertUnfrozen(ds,dn){if(dn)throw new Error("Cannot call `"+ds+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(ds){if(!isPlainObject(ds)||typeof ds.type!="string")throw new TypeError("Expected node, got `"+ds+"`")}function assertDone(ds,dn,ms){if(!ms)throw new Error("`"+ds+"` finished async. Use `"+dn+"` instead")}
vendor: 7,119 bytes, line 1396
1396function vfile(ds){return looksLikeAVFile(ds)?ds:new VFile(ds)}function looksLikeAVFile(ds){return!!(ds&&typeof ds=="object"&&"message"in ds&&"messages"in ds)}function looksLikeAValue(ds){return typeof ds=="string"||isUint8Array(ds)}function isUint8Array(ds){return!!(ds&&typeof ds=="object"&&"byteLength"in ds&&"byteOffset"in ds)}const changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",emptyPlugins=[],emptyRemarkRehypeOptions={allowDangerousHtml:!0},safeProtocol=/^(https?|ircs?|mailto|xmpp)$/i,deprecations=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Markdown(ds){const dn=createProcessor(ds),ms=createFile(ds);return post(dn.runSync(dn.parse(ms),ms),ds)}function createProcessor(ds){const dn=ds.rehypePlugins||emptyPlugins,ms=ds.remarkPlugins||emptyPlugins,xs=ds.remarkRehypeOptions?{...ds.remarkRehypeOptions,...emptyRemarkRehypeOptions}:emptyRemarkRehypeOptions;return unified().use(remarkParse).use(ms).use(remarkRehype,xs).use(dn)}function createFile(ds){const dn=ds.children||"",ms=new VFile;return typeof dn=="string"&&(ms.value=dn),ms}function post(ds,dn){const ms=dn.allowedElements,xs=dn.allowElement,bs=dn.components,Es=dn.disallowedElements,ws=dn.skipHtml,Rs=dn.unwrapDisallowed,js=dn.urlTransform||defaultUrlTransform;for(const As of deprecations)Object.hasOwn(dn,As.from)&&(""+As.from+(As.to?"use `"+As.to+"` instead":"remove it")+changelog+As.id,void 0);return dn.className&&(ds={type:"element",tagName:"div",properties:{className:dn.className},children:ds.type==="root"?ds.children:[ds]}),visit(ds,Cs),toJsxRuntime(ds,{Fragment:jsxRuntimeExports.Fragment,components:bs,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0});function Cs(As,ks,Os){if(As.type==="raw"&&Os&&typeof ks=="number")return ws?Os.children.splice(ks,1):Os.children[ks]={type:"text",value:As.value},ks;if(As.type==="element"){let Ms;for(Ms in urlAttributes)if(Object.hasOwn(urlAttributes,Ms)&&Object.hasOwn(As.properties,Ms)){const Ds=As.properties[Ms],Ps=urlAttributes[Ms];(Ps===null||Ps.includes(As.tagName))&&(As.properties[Ms]=js(String(Ds||""),Ms,As))}}if(As.type==="element"){let Ms=ms?!ms.includes(As.tagName):Es?Es.includes(As.tagName):!1;if(!Ms&&xs&&typeof ks=="number"&&(Ms=!xs(As,ks,Os)),Ms&&Os&&typeof ks=="number")return Rs&&As.children?Os.children.splice(ks,1,...As.children):Os.children.splice(ks,1),ks}}}function defaultUrlTransform(ds){const dn=ds.indexOf(":"),ms=ds.indexOf("?"),xs=ds.indexOf("#"),bs=ds.indexOf("/");return dn===-1||bs!==-1&&dn>bs||ms!==-1&&dn>ms||xs!==-1&&dn>xs||safeProtocol.test(ds.slice(0,dn))?ds:""}function ccount(ds,dn){const ms=String(ds);if(typeof dn!="string")throw new TypeError("Expected character");let xs=0,bs=ms.indexOf(dn);for(;bs!==-1;)xs++,bs=ms.indexOf(dn,bs+dn.length);return xs}function escapeStringRegexp(ds){if(typeof ds!="string")throw new TypeError("Expected a string");return ds.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function findAndReplace(ds,dn,ms){const bs=convert((ms||{}).ignore||[]),Es=toPairs(dn);let ws=-1;for(;++ws<Es.length;)visitParents(ds,"text",Rs);function Rs(Cs,As){let ks=-1,Os;for(;++ks<As.length;){const Ms=As[ks],Ds=Os?Os.children:void 0;if(bs(Ms,Ds?Ds.indexOf(Ms):void 0,Os))return;Os=Ms}if(Os)return js(Cs,As)}function js(Cs,As){const ks=As[As.length-1],Os=Es[ws][0],Ms=Es[ws][1];let Ds=0;const Ls=ks.children.indexOf(Cs);let Bs=!1,Fs=[];Os.lastIndex=0;let Us=Os.exec(Cs.value);for(;Us;){const Js=Us.index,Ws={index:Us.index,input:Us.input,stack:[...As,Cs]};let Zs=Ms(...Us,Ws);if(typeof Zs=="string"&&(Zs=Zs.length>0?{type:"text",value:Zs}:void 0),Zs===!1)Os.lastIndex=Js+1;else{if(Ds!==Js&&Gs({type:"text",value:Cs.value.slice(Ds,Js)}),Array.isArray(Zs))for(const Ys of Zs)Gs(Ys);else Zs&&Gs(Zs);Ds=Js+Us[0].length,Bs=!0}if(!Os.global)break;Us=Os.exec(Cs.value)}return Bs?(Ds<Cs.value.length&&Gs({type:"text",value:Cs.value.slice(Ds)}),ks.children.splice(Ls,1,...Fs)):Fs=[Cs],Ls+Fs.length;function Gs(Js){const Ws=Fs[Fs.length-1];Ws&&Ws.type==="text"&&Js.type==="text"?Ws.value+=Js.value:Fs.push(Js)}}}function toPairs(ds){if(!Array.isArray(ds))throw new TypeError("Expected find and replace tuple or list of tuples");const dn=[],ms=!ds[0]||Array.isArray(ds[0])?ds:[ds];let xs=-1;for(;++xs<ms.length;){const bs=ms[xs];dn.push([toExpression(bs[0]),toFunction(bs[1])])}return dn}function toExpression(ds){return typeof ds=="string"?new RegExp(escapeStringRegexp(ds),"g"):ds}function toFunction(ds){return typeof ds=="function"?ds:function(){return ds}}const inConstruct="phrasing",notInConstruct=["autolink","link","image","label"];function gfmAutolinkLiteralFromMarkdown(){return{transforms:[transformGfmAutolinkLiterals],enter:{literalAutolink:enterLiteralAutolink,literalAutolinkEmail:enterLiteralAutolinkValue,literalAutolinkHttp:enterLiteralAutolinkValue,literalAutolinkWww:enterLiteralAutolinkValue},exit:{literalAutolink:exitLiteralAutolink,literalAutolinkEmail:exitLiteralAutolinkEmail,literalAutolinkHttp:exitLiteralAutolinkHttp,literalAutolinkWww:exitLiteralAutolinkWww}}}function gfmAutolinkLiteralToMarkdown(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct,notInConstruct},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct,notInConstruct},{character:":",before:"[ps]",after:"\\/",inConstruct,notInConstruct}]}}function enterLiteralAutolink(ds){this.enter({type:"link",title:null,url:"",children:[]},ds)}function enterLiteralAutolinkValue(ds){this.config.enter.autolinkProtocol.call(this,ds)}function exitLiteralAutolinkHttp(ds){this.config.exit.autolinkProtocol.call(this,ds)}function exitLiteralAutolinkWww(ds){this.config.exit.data.call(this,ds);const dn=this.stack[this.stack.length-1];dn.type,dn.url="http://"+this.sliceSerialize(ds)}function exitLiteralAutolinkEmail(ds){this.config.exit.autolinkEmail.call(this,ds)}function exitLiteralAutolink(ds){this.exit(ds)}function transformGfmAutolinkLiterals(ds){findAndReplace(ds,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,findUrl],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S}
1396)([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),findEmail]],{ignore:["link","linkReference"]})}function findUrl(ds,dn,ms,xs,bs){let Es="";if(!previous(bs)||(/^w/i.test(dn)&&(ms=dn+ms,dn="",Es="http://"),!isCorrectDomain(ms)))return!1;const ws=splitUrl(ms+xs);if(!ws[0])return!1;const Rs={type:"link",title:null,url:Es+dn+ws[0],children:[{type:"text",value:dn+ws[0]}]};return ws[1]?[Rs,{type:"text",value:ws[1]}]:Rs}function findEmail(ds,dn,ms,xs){return!previous(xs,!0)||/[-\d_]$/.test(ms)?!1:{type:"link",title:null,url:"mailto:"+dn+"@"+ms,children:[{type:"text",value:dn+"@"+ms}]}}function isCorrectDomain(ds){const dn=ds.split(".");return!(dn.length<2||dn[dn.length-1]&&(/_/.test(dn[dn.length-1])||!/[a-zA-Z\d]/.test(dn[dn.length-1]))||dn[dn.length-2]&&(/_/.test(dn[dn.length-2])||!/[a-zA-Z\d]/.test(dn[dn.length-2])))}function splitUrl(ds){const dn=/[!"&'),.:;<>?\]}]+$/.exec(ds);if(!dn)return[ds,void 0];ds=ds.slice(0,dn.index);let ms=dn[0],xs=ms.indexOf(")");const bs=ccount(ds,"(");let Es=ccount(ds,")");for(;xs!==-1&&bs>Es;)ds+=ms.slice(0,xs+1),ms=ms.slice(xs+1),xs=ms.indexOf(")"),Es++;return[ds,ms]}function previous(ds,dn){const ms=ds.input.charCodeAt(ds.index-1);return(ds.index===0||unicodeWhitespace(ms)||unicodePunctuation(ms))&&(!dn||ms!==47)}footnoteReference.peek=footnoteReferencePeek;function enterFootnoteCallString(){this.buffer()}function enterFootnoteCall(ds){this.enter({type:"footnoteReference",identifier:"",label:""},ds)}function enterFootnoteDefinitionLabelString(){this.buffer()}function enterFootnoteDefinition(ds){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},ds)}function exitFootnoteCallString(ds){const dn=this.resume(),ms=this.stack[this.stack.length-1];ms.type,ms.identifier=normalizeIdentifier(this.sliceSerialize(ds)).toLowerCase(),ms.label=dn}function exitFootnoteCall(ds){this.exit(ds)}function exitFootnoteDefinitionLabelString(ds){const dn=this.resume(),ms=this.stack[this.stack.length-1];ms.type,ms.identifier=normalizeIdentifier(this.sliceSerialize(ds)).toLowerCase(),ms.label=dn}function exitFootnoteDefinition(ds){this.exit(ds)}function footnoteReferencePeek(){return"["}function footnoteReference(ds,dn,ms,xs){const bs=ms.createTracker(xs);let Es=bs.move("[^");const ws=ms.enter("footnoteReference"),Rs=ms.enter("reference");return Es+=bs.move(ms.safe(ms.associationId(ds),{after:"]",before:Es})),Rs(),ws(),Es+=bs.move("]"),Es}function gfmFootnoteFromMarkdown(){return{enter:{gfmFootnoteCallString:enterFootnoteCallString,gfmFootnoteCall:enterFootnoteCall,gfmFootnoteDefinitionLabelString:enterFootnoteDefinitionLabelString,gfmFootnoteDefinition:enterFootnoteDefinition},exit:{gfmFootnoteCallString:exitFootnoteCallString,gfmFootnoteCall:exitFootnoteCall,gfmFootnoteDefinitionLabelString:exitFootnoteDefinitionLabelString,gfmFootnoteDefinition:exitFootnoteDefinition}}}function gfmFootnoteToMarkdown(ds){let dn=!1;return ds&&ds.firstLineBlank&&(dn=!0),{handlers:{footnoteDefinition:ms,footnoteReference},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function ms(xs,bs,Es,ws){const Rs=Es.createTracker(ws);let js=Rs.move("[^");const Cs=Es.enter("footnoteDefinition"),As=Es.enter("label");return js+=Rs.move(Es.safe(Es.associationId(xs),{before:js,after:"]"})),As(),js+=Rs.move("]:"),xs.children&&xs.children.length>0&&(Rs.shift(4),js+=Rs.move((dn?`
1397`:" ")+Es.indentLines(Es.containerFlow(xs,Rs.current()),dn?mapAll:mapExceptFirst))),Cs(),js}}function mapExceptFirst(ds,dn,ms){return dn===0?ds:mapAll(ds,dn,ms)}function mapAll(ds,dn,ms){return(ms?"":"    ")+ds}const constructsWithoutStrikethrough=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];handleDelete.attention=attentionDelete;handleDelete.peek=peekDelete;function gfmStrikethroughFromMarkdown(){return{canContainEols:["delete"],enter:{strikethrough:enterStrikethrough},exit:{strikethrough:exitStrikethrough}}}function gfmStrikethroughToMarkdown(){return{handlers:{delete:handleDelete},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:constructsWithoutStrikethrough}]}}function enterStrikethrough(ds){this.enter({type:"delete",children:[],position:void 0},ds)}function exitStrikethrough(ds){this.exit(ds)}
vendor: 4,134 bytes, lines 1397-1400
1397function handleDelete(ds,dn,ms,xs){const bs=ms.createTracker(xs),Es=ms.stack.includes("strikethrough")?"~":"~~",ws=ms.enter("strikethrough");let Rs=bs.move(Es);return Rs+=ms.containerPhrasing(ds,{...bs.current(),before:Rs,after:"~"}),Rs+=bs.move(Es),ws(),Rs}function attentionDelete(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function peekDelete(){return"~"}function defaultStringLength(ds){return ds.length}function markdownTable(ds,dn){const ms=dn||{},xs=(ms.align||[]).concat(),bs=ms.stringLength||defaultStringLength,Es=[],ws=[],Rs=[],js=[];let Cs=0,As=-1;for(;++As<ds.length;){const Ps=[],Ls=[];let Bs=-1;for(ds[As].length>Cs&&(Cs=ds[As].length);++Bs<ds[As].length;){const Fs=serialize(ds[As][Bs]);if(ms.alignDelimiters!==!1){const Us=bs(Fs);Ls[Bs]=Us,(js[Bs]===void 0||Us>js[Bs])&&(js[Bs]=Us)}Ps.push(Fs)}ws[As]=Ps,Rs[As]=Ls}let ks=-1;if(typeof xs=="object"&&"length"in xs)for(;++ks<Cs;)Es[ks]=toAlignment(xs[ks]);else{const Ps=toAlignment(xs);for(;++ks<Cs;)Es[ks]=Ps}ks=-1;const Os=[],Ms=[];for(;++ks<Cs;){const Ps=Es[ks];let Ls="",Bs="";Ps===99?(Ls=":",Bs=":"):Ps===108?Ls=":":Ps===114&&(Bs=":");let Fs=ms.alignDelimiters===!1?1:Math.max(1,js[ks]-Ls.length-Bs.length);const Us=Ls+"-".repeat(Fs)+Bs;ms.alignDelimiters!==!1&&(Fs=Ls.length+Fs+Bs.length,Fs>js[ks]&&(js[ks]=Fs),Ms[ks]=Fs),Os[ks]=Us}ws.splice(1,0,Os),Rs.splice(1,0,Ms),As=-1;const Ds=[];for(;++As<ws.length;){const Ps=ws[As],Ls=Rs[As];ks=-1;const Bs=[];for(;++ks<Cs;){const Fs=Ps[ks]||"";let Us="",Gs="";if(ms.alignDelimiters!==!1){const Js=js[ks]-(Ls[ks]||0),Ws=Es[ks];Ws===114?Us=" ".repeat(Js):Ws===99?Js%2?(Us=" ".repeat(Js/2+.5),Gs=" ".repeat(Js/2-.5)):(Us=" ".repeat(Js/2),Gs=Us):Gs=" ".repeat(Js)}ms.delimiterStart!==!1&&!ks&&Bs.push("|"),ms.padding!==!1&&!(ms.alignDelimiters===!1&&Fs==="")&&(ms.delimiterStart!==!1||ks)&&Bs.push(" "),ms.alignDelimiters!==!1&&Bs.push(Us),Bs.push(Fs),ms.alignDelimiters!==!1&&Bs.push(Gs),ms.padding!==!1&&Bs.push(" "),(ms.delimiterEnd!==!1||ks!==Cs-1)&&Bs.push("|")}Ds.push(ms.delimiterEnd===!1?Bs.join("").replace(/ +$/,""):Bs.join(""))}return Ds.join(`
1398`)}function serialize(ds){return ds==null?"":String(ds)}function toAlignment(ds){const dn=typeof ds=="string"?ds.codePointAt(0):0;return dn===67||dn===99?99:dn===76||dn===108?108:dn===82||dn===114?114:0}const phrasing=convert(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function blockquote(ds,dn,ms,xs){const bs=ms.enter("blockquote"),Es=ms.createTracker(xs);Es.move("> "),Es.shift(2);const ws=ms.indentLines(ms.containerFlow(ds,Es.current()),map$1);return bs(),ws}function map$1(ds,dn,ms){return">"+(ms?"":" ")+ds}function patternInScope(ds,dn){return listInScope(ds,dn.inConstruct,!0)&&!listInScope(ds,dn.notInConstruct,!1)}function listInScope(ds,dn,ms){if(typeof dn=="string"&&(dn=[dn]),!dn||dn.length===0)return ms;let xs=-1;for(;++xs<dn.length;)if(ds.includes(dn[xs]))return!0;return!1}function hardBreak(ds,dn,ms,xs){let bs=-1;for(;++bs<ms.unsafe.length;){const Es=ms.unsafe[bs];if(Es.character===`
1399`&&!Es.before&&!Es.after&&patternInScope(ms.stack,Es))return/[\t ]/.test(xs.before)?"":" "}return`\\
1400`}function longestStreak(ds,dn){const ms=String(ds);let xs=ms.indexOf(dn),bs=xs,Es=0,ws=0;if(typeof dn!="string")throw new TypeError("Expected substring");for(;xs!==-1;)xs===bs?++Es>ws&&(ws=Es):Es=1,bs=xs+dn.length,xs=ms.indexOf(dn,bs);return ws}function formatCodeAsIndented(ds,dn){return!!(dn.options.fences===!1&&ds.value&&!ds.lang&&/[^\n\r ]/.test(ds.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(ds.value))}function checkFence(ds){const dn=ds.options.fence||"`";if(dn!=="`"&&dn!=="~")throw new Error("Cannot serialize code with `"+dn+"` for `options.fence`, expected `` ` `` or `~`");return dn}function code$1(ds,dn,ms,xs){const bs=checkFence(ms),Es=ds.value||"";if(formatCodeAsIndented(ds,ms)){const ks=ms.enter("codeIndented"),Os=ms.indentLines(Es,map);return ks(),Os}const ws=ms.createTracker(xs),Rs=bs.repeat(Math.max(longestStreak(Es,bs)+1,3)),js=ms.enter("co
vendor: 14,071 bytes, lines 1400-1411
1400deFenced"),Cs=bs==="`"?"GraveAccent":"Tilde";let As=ws.move(Rs);if(ds.lang){const ks=ms.enter(`codeFencedLang${Cs}`);As+=ws.move(ms.safe(ds.lang,{before:As,after:" ",encode:["`"],...ws.current()})),ks()}if(ds.lang&&ds.meta){const ks=ms.enter(`codeFencedMeta${Cs}`);As+=ws.move(" "),As+=ws.move(ms.safe(ds.meta,{before:As,after:`
1401`,encode:["`"],...ws.current()})),ks()}return As+=ws.move(`
1402`),Es&&(As+=ws.move(Es+`
1403`)),As+=ws.move(Rs),js(),As}function map(ds,dn,ms){return(ms?"":"    ")+ds}function checkQuote(ds){const dn=ds.options.quote||'"';if(dn!=='"'&&dn!=="'")throw new Error("Cannot serialize title with `"+dn+"` for `options.quote`, expected `\"`, or `'`");return dn}function definition(ds,dn,ms,xs){const bs=checkQuote(ms),Es=bs==='"'?"Quote":"Apostrophe",ws=ms.enter("definition");let Rs=ms.enter("label");const js=ms.createTracker(xs);let Cs=js.move("[");return Cs+=js.move(ms.safe(ms.associationId(ds),{before:Cs,after:"]",...js.current()})),Cs+=js.move("]: "),Rs(),!ds.url||/[\0- \u007F]/.test(ds.url)?(Rs=ms.enter("destinationLiteral"),Cs+=js.move("<"),Cs+=js.move(ms.safe(ds.url,{before:Cs,after:">",...js.current()})),Cs+=js.move(">")):(Rs=ms.enter("destinationRaw"),Cs+=js.move(ms.safe(ds.url,{before:Cs,after:ds.title?" ":`
1404`,...js.current()}))),Rs(),ds.title&&(Rs=ms.enter(`title${Es}`),Cs+=js.move(" "+bs),Cs+=js.move(ms.safe(ds.title,{before:Cs,after:bs,...js.current()})),Cs+=js.move(bs),Rs()),ws(),Cs}function checkEmphasis(ds){const dn=ds.options.emphasis||"*";if(dn!=="*"&&dn!=="_")throw new Error("Cannot serialize emphasis with `"+dn+"` for `options.emphasis`, expected `*`, or `_`");return dn}emphasis.attention=attention$1;emphasis.peek=peek$1;function emphasis(ds,dn,ms,xs){const bs=ms.enter("phrasing"),Es=ms.containerPhrasing({type:"root",children:[ds]},xs);return bs(),Es}function attention$1(ds,dn){return{construct:"emphasis",markers:checkEmphasis(dn)==="*"?["*","_"]:["_","*"],sizes:[1]}}function peek$1(ds,dn,ms){return ms.options.emphasis||"*"}function encodeCharacterReference(ds){return"&#x"+ds.toString(16).toUpperCase()+";"}function formatHeadingAsSetext(ds,dn){let ms=!1;return visit(ds,function(xs){if("value"in xs&&/\r?\n|\r/.test(xs.value)||xs.type==="break")return ms=!0,EXIT}),!!((!ds.depth||ds.depth<3)&&toString$1(ds)&&(dn.options.setext||ms))}function heading(ds,dn,ms,xs){const bs=Math.max(Math.min(6,ds.depth||1),1),Es=ms.createTracker(xs);if(formatHeadingAsSetext(ds,ms)){const ks=ms.enter("headingSetext"),Os=ms.enter("phrasing"),Ms=ms.containerPhrasing(ds,{...Es.current(),before:`
1405`,after:`
1406`});return Os(),ks(),Ms+`
1407`+(bs===1?"=":"-").repeat(Ms.length-(Math.max(Ms.lastIndexOf("\r"),Ms.lastIndexOf(`
1408`))+1))}const ws="#".repeat(bs),Rs=ms.enter("headingAtx"),js=ms.enter("phrasing");Es.move(ws+" ");let Cs=ms.containerPhrasing(ds,{before:"# ",after:`
1409`,...Es.current()});const As=Cs.charCodeAt(0);return(As===9||As===32)&&(Cs=encodeCharacterReference(As)+Cs.slice(1)),Cs=Cs?ws+" "+Cs:ws,ms.options.closeAtx&&(Cs+=" "+ws),js(),Rs(),Cs}html.peek=htmlPeek;function html(ds){return ds.value||""}function htmlPeek(){return"<"}image.peek=imagePeek;function image(ds,dn,ms,xs){const bs=checkQuote(ms),Es=bs==='"'?"Quote":"Apostrophe",ws=ms.enter("image");let Rs=ms.enter("label");const js=ms.createTracker(xs);let Cs=js.move("![");return Cs+=js.move(ms.safe(ds.alt,{before:Cs,after:"]",...js.current()})),Cs+=js.move("]("),Rs(),!ds.url&&ds.title||/[\0- \u007F]/.test(ds.url)?(Rs=ms.enter("destinationLiteral"),Cs+=js.move("<"),Cs+=js.move(ms.safe(ds.url,{before:Cs,after:">",...js.current()})),Cs+=js.move(">")):(Rs=ms.enter("destinationRaw"),Cs+=js.move(ms.safe(ds.url,{before:Cs,after:ds.title?" ":")",...js.current()}))),Rs(),ds.title&&(Rs=ms.enter(`title${Es}`),Cs+=js.move(" "+bs),Cs+=js.move(ms.safe(ds.title,{before:Cs,after:bs,...js.current()})),Cs+=js.move(bs),Rs()),Cs+=js.move(")"),ws(),Cs}function imagePeek(){return"!"}imageReference.peek=imageReferencePeek;function imageReference(ds,dn,ms,xs){const bs=ds.referenceType,Es=ms.enter("imageReference");let ws=ms.enter("label");const Rs=ms.createTracker(xs);let js=Rs.move("![");const Cs=ms.safe(ds.alt,{before:js,after:"]",...Rs.current()});js+=Rs.move(Cs+"]["),ws();const As=ms.stack;ms.stack=As.filter(function(Os){return Os!=="phrasing"}),ws=ms.enter("reference");const ks=ms.safe(ms.associationId(ds),{before:js,after:"]",...Rs.current()});return ws(),ms.stack=As,Es(),bs==="full"||!Cs||Cs!==ks?js+=Rs.move(ks+"]"):bs==="shortcut"?js=js.slice(0,-1):js+=Rs.move("]"),js}function imageReferencePeek(){return"!"}inlineCode.peek=inlineCodePeek;function inlineCode(ds,dn,ms){let xs=ds.value||"",bs="`",Es=-1;for(;new RegExp("(^|[^`])"+bs+"([^`]|$)").test(xs);)bs+="`";for(/[^\n\r ]/.test(xs)&&(/^[\n\r ]/.test(xs)&&/[\n\r ]$/.test(xs)||/^`|`$/.test(xs))&&(xs=" "+xs+" ");++Es<ms.unsafe.length;){const ws=ms.unsafe[Es],Rs=ms.compilePattern(ws);if(!ws.atBreak)continue;let js;for(;js=Rs.exec(xs);){let Cs=js.index;xs.charCodeAt(Cs)===10&&xs.charCodeAt(Cs-1)===13&&Cs--,xs=xs.slice(0,Cs)+" "+xs.slice(js.index+1)}}return bs+xs+bs}function inlineCodePeek(){return"`"}function formatLinkAsAutolink(ds,dn){const ms=toString$1(ds);return!!(!dn.options.resourceLink&&ds.url&&!ds.title&&ds.children&&ds.children.length===1&&ds.children[0].type==="text"&&(ms===ds.url||"mailto:"+ms===ds.url)&&/^[a-z][+\-.a-z]+:/i.test(ds.url)&&!/[\0- <>\u007F]/.test(ds.url))}link.peek=linkPeek;function link(ds,dn,ms,xs){const bs=checkQuote(ms),Es=bs==='"'?"Quote":"Apostrophe",ws=ms.createTracker(xs);if(formatLinkAsAutolink(ds,ms)){const As=ms.stack;ms.stack=As.filter(function(Ms){return Ms!=="phrasing"});const ks=ms.enter("autolink");let Os=ws.move("<");return Os+=ws.move(ms.containerPhrasing(ds,{before:Os,after:">",...ws.current()})),Os+=ws.move(">"),ks(),ms.stack=As,Os}const Rs=ms.enter("link");let js=ms.enter("label"),Cs=ws.move("[");return Cs+=ws.move(ms.containerPhrasing(ds,{before:Cs,after:"](",...ws.current()})),Cs+=ws.move("]("),js(),!ds.url&&ds.title||/[\0- \u007F]/.test(ds.url)?(js=ms.enter("destinationLiteral"),Cs+=ws.move("<"),Cs+=ws.move(ms.safe(ds.url,{before:Cs,after:">",...ws.current()})),Cs+=ws.move(">")):(js=ms.enter("destinationRaw"),Cs+=ws.move(ms.safe(ds.url,{before:Cs,after:ds.title?" ":")",...ws.current()}))),js(),ds.title&&(js=ms.enter(`title${Es}`),Cs+=ws.move(" "+bs),Cs+=ws.move(ms.safe(ds.title,{before:Cs,after:bs,...ws.current()})),Cs+=ws.move(bs),js()),Cs+=ws.move(")"),Rs(),Cs}function linkPeek(ds,dn,ms){return formatLinkAsAutolink(ds,ms)?"<":"["}linkReference.peek=linkReferencePeek;function linkReference(ds,dn,ms,xs){const bs=ds.referenceType,Es=ms.enter("linkReference");let ws=ms.enter("label");const Rs=ms.createTracker(xs);let js=Rs.move("[");const Cs=ms.containerPhrasing(ds,{before:js,after:"]",...Rs.current()});js+=Rs.move(Cs+"]["),ws();const As=ms.stack;ms.stack=As.filter(function(Os){return Os!=="phrasing"}),ws=ms.enter("reference");const ks=ms.safe(ms.associationId(ds),{before:js,after:"]",...Rs.current()});return ws(),ms.stack=As,Es(),bs==="full"||!Cs||Cs!==ks?js+=Rs.move(ks+"]"):bs==="shortcut"?js=js.slice(0,-1):js+=Rs.move("]"),js}function linkReferencePeek(){return"["}function checkBullet(ds){const dn=ds.options.bullet||"*";if(dn!=="*"&&dn!=="+"&&dn!=="-")throw new Error("Cannot serialize items with `"+dn+"` for `options.bullet`, expected `*`, `+`, or `-`");return dn}function checkBulletOther(ds){const dn=checkBullet(ds),ms=ds.options.bulletOther;if(!ms)return dn==="*"?"-":"*";if(ms!=="*"&&ms!=="+"&&ms!=="-")throw new Error("Cannot serialize items with `"+ms+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(ms===dn)throw new Error("Expected `bullet` (`"+dn+"`) and `bulletOther` (`"+ms+"`) to be different");return ms}function checkBulletOrdered(ds){const dn=ds.options.bulletOrdered||".";if(dn!=="."&&dn!==")")throw new Error("Cannot serialize items with `"+dn+"` for `options.bulletOrdered`, expected `.` or `)`");return dn}function checkRule(ds){const dn=ds.options.rule||"*";if(dn!=="*"&&dn!=="-"&&dn!=="_")throw new Error("Cannot serialize rules with `"+dn+"` for `options.rule`, expected `*`, `-`, or `_`");return dn}function list(ds,dn,ms,xs){const bs=ms.enter("list"),Es=ms.bulletCurrent;let ws=ds.ordered?checkBulletOrdered(ms):checkBullet(ms);const Rs=ds.ordered?ws==="."?")":".":checkBulletOther(ms);let js=dn&&ms.bulletLastUsed?ws===ms.bulletLastUsed:!1;if(!ds.ordered){const As=ds.children?ds.children[0]:void 0;if((ws==="*"||ws==="-")&&As&&(!As.children||!As.children[0])&&ms.stack[ms.stack.length-1]==="list"&&ms.stack[ms.stack.length-2]==="listItem"&&ms.stack[ms.stack.length-3]==="list"&&ms.stack[ms.stack.length-4]==="listItem"&&ms.indexStack[ms.indexStack.length-1]===0&&ms.indexStack[ms.indexStack.length-2]===0&&ms.indexStack[ms.indexStack.length-3]===0&&(js=!0),checkRule(ms)===ws&&As){let ks=-1;for(;++ks<ds.children.length;){const Os=ds.children[ks];if(Os&&Os.type==="listItem"&&Os.children&&Os.children[0]&&Os.children[0].type==="thematicBreak"){js=!0;break}}}}js&&(ws=Rs),ms.bulletCurrent=ws;const Cs=ms.containerFlow(ds,xs);return ms.bulletLastUsed=ws,ms.bulletCurrent=Es,bs(),Cs}function checkListItemIndent(ds){const dn=ds.options.listItemIndent||"one";if(dn!=="tab"&&dn!=="one"&&dn!=="mixed")throw new Error("Cannot serialize items with `"+dn+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return dn}function listItem(ds,dn,ms,xs){const bs=checkListItemIndent(ms);let Es=ms.bulletCurrent||checkBullet(ms);dn&&dn.type==="list"&&dn.ordered&&(Es=(typeof dn.start=="number"&&dn.start>-1?dn.start:1)+(ms.options.incrementListMarker===!1?0:dn.children.indexOf(ds))+Es);let ws=Es.length+1;(bs==="tab"||bs==="mixed"&&(dn&&dn.type==="list"&&dn.spread||ds.spread))&&(ws=Math.ceil(ws/4)*4);const Rs=ms.createTracker(xs);Rs.move(Es+" ".repeat(ws-Es.length)),Rs.shift(ws);const js=ms.enter("listItem"),Cs=ms.indentLines(ms.containerFlow(ds,Rs.current()),As);return js(),Cs;function As(ks,Os,Ms){return Os?(Ms?"":" ".repeat(ws))+ks:(Ms?Es:Es+" ".repeat(ws-Es.length))+ks}}function paragraph(ds,dn,ms,xs){const bs=ms.enter("paragraph"),Es=ms.enter("phrasing"),ws=ms.containerPhrasing(ds,xs);return Es(),bs(),ws}function root$1(ds,dn,ms,xs){if(!ds.children.some(function(Rs){return phrasing(Rs)}))return ms.containerFlow(ds,xs);const Es=ms.enter("phrasing"),ws=ms.containerPhrasing(ds,xs);return Es(),ws}function checkStrong(ds){const dn=ds.options.strong||"*";if(dn!=="*"&&dn!=="_")throw new Error("Cannot serialize strong with `"+dn+"` for `options.strong`, expected `*`, or `_`");return dn}strong.attention=attention;strong.peek=peek;function strong(ds,dn,ms,xs){const bs=ms.enter("phrasing"),Es=ms.containerPhrasing({type:"root",children:[ds]},xs);return bs(),Es}function attention(ds,dn){return{construct:"strong",markers:checkStrong(dn)==="*"?["*","_"]:["_","*"],sizes:[2]}}function peek(ds,dn,ms){return ms.options.strong||"*"}function text$1(ds,dn,ms,xs){const bs=dn?dn.children:[],Es=bs.indexOf(ds);return ms.safe(ds.value,{...xs,afterNode:bs[Es+1],beforeNode:bs[Es-1]})}function checkRuleRepetition(ds){const dn=ds.options.ruleRepetition||3;if(dn<3)throw new Error("Cannot serialize rules with repetition `"+dn+"` for `options.ruleRepetition`, expected `3` or more");return dn}function thematicBreak(ds,dn,ms){const xs=(checkRule(ms)+(ms.options.ruleSpaces?" ":"")).repeat(checkRuleRepetition(ms));return ms.options.ruleSpaces?xs.slice(0,-1):xs}const handle={blockquote,break:hardBreak,code:code$1,definition,emphasis,hardBreak,heading,html,image,imageReference,inlineCode,link,linkReference,list,listItem,paragraph,root:root$1,strong,text:text$1,thematicBreak};function gfmTableFromMarkdown(){return{enter:{table:enterTable,tableData:enterCell,tableHeader:enterCell,tableRow:enterRow},exit:{codeText:exitCodeText,table:exitTable,tableData:exit,tableHeader:exit,tableRow:exit}}}function enterTable(ds){const dn=ds._align;this.enter({type:"table",align:dn.map(function(ms){return ms==="none"?null:ms}),children:[]},ds),this.data.inTable=!0}function exitTable(ds){this.exit(ds),this.data.inTable=void 0}function enterRow(ds){this.enter({type:"tableRow",children:[]},ds)}function exit(ds){this.exit(ds)}function enterCell(ds){this.enter({type:"tableCell",children:[]},ds)}function exitCodeText(ds){let dn=this.resume();this.data.inTable&&(dn=dn.replace(/\\([\\|])/g,replace));const ms=this.stack[this.stack.length-1];ms.type,ms.value=dn,this.exit(ds)}function replace(ds,dn){return dn==="|"?dn:ds}function gfmTableToMarkdown(ds){const dn=ds||{},ms=dn.tableCellPadding,xs=dn.tablePipeAlign,bs=dn.stringLength,Es=ms?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
1410`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:Os,table:ws,tableCell:js,tableRow:Rs}};function ws(Ms,Ds,Ps,Ls){return Cs(As(Ms,Ps,Ls),Ms.align)}function Rs(Ms,Ds,Ps,Ls){const Bs=ks(Ms,Ps,Ls),Fs=Cs([Bs]);return Fs.slice(0,Fs.indexOf(`
1411`))}function js(Ms,Ds,Ps,Ls){const Bs=Ps.enter("tableCell"),Fs=Ps.enter("phrasing"),Us=Ps.containerPhrasing(Ms,{...Ls,before:Es,after:Es});return Fs(),Bs(),Us}function Cs(Ms,Ds){return markdownTable(Ms,{align:Ds,alignDelimiters:xs,padding:ms,stringLength:bs})}function As(Ms,Ds,Ps){const Ls=Ms.children;let Bs=-1;const Fs=[],Us=Ds.enter("table");for(;++Bs<Ls.length;)Fs[Bs]=ks(Ls[Bs],Ds,Ps);return Us(),Fs}function ks(Ms,Ds,Ps){const Ls=Ms.children;let Bs=-1;const Fs=[],Us=Ds.enter("tableRow");for(;++Bs<Ls.length;)Fs[Bs]=js(Ls[Bs],Ms,Ds,Ps);return Us(),Fs}function Os(Ms,Ds,Ps){let Ls=handle.inlineCode(Ms,Ds,Ps);return Ps.stack.includes("tableCell")&&(Ls=Ls.replace(/\|/g,"\\$&")),Ls}}function gfmTaskListItemFromMarkdown(){return{exit:{taskListCheckValueChecked:exitCheck,taskListCheckValueUnchecked:exitCheck,paragraph:exitParagraphWithTaskListItem}}}function gfmTaskListItemToMarkdown(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:listItemWithTaskListItem}}}function exitCheck(ds){const dn=this.stack[this.stack.length-2];
vendor: 6,444 bytes, line 1411
1411dn.type,dn.checked=ds.type==="taskListCheckValueChecked"}function exitParagraphWithTaskListItem(ds){const dn=this.stack[this.stack.length-2];if(dn&&dn.type==="listItem"&&typeof dn.checked=="boolean"){const ms=this.stack[this.stack.length-1];ms.type;const xs=ms.children[0];if(xs&&xs.type==="text"){const bs=dn.children;let Es=-1,ws;for(;++Es<bs.length;){const Rs=bs[Es];if(Rs.type==="paragraph"){ws=Rs;break}}ws===ms&&(xs.value=xs.value.slice(1),xs.value.length===0?ms.children.shift():ms.position&&xs.position&&typeof xs.position.start.offset=="number"&&(xs.position.start.column++,xs.position.start.offset++,ms.position.start=Object.assign({},xs.position.start)))}}this.exit(ds)}function listItemWithTaskListItem(ds,dn,ms,xs){const bs=ds.children[0],Es=typeof ds.checked=="boolean"&&bs&&bs.type==="paragraph",ws="["+(ds.checked?"x":" ")+"] ",Rs=ms.createTracker(xs);Es&&Rs.move(ws);let js=handle.listItem(ds,dn,ms,{...xs,...Rs.current()});return Es&&(js=js.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,Cs)),js;function Cs(As){return As+ws}}function gfmFromMarkdown(){return[gfmAutolinkLiteralFromMarkdown(),gfmFootnoteFromMarkdown(),gfmStrikethroughFromMarkdown(),gfmTableFromMarkdown(),gfmTaskListItemFromMarkdown()]}function gfmToMarkdown(ds){return{extensions:[gfmAutolinkLiteralToMarkdown(),gfmFootnoteToMarkdown(ds),gfmStrikethroughToMarkdown(),gfmTableToMarkdown(ds),gfmTaskListItemToMarkdown()]}}const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:"wwwAutolink",tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:"protocolAutolink",tokenize:tokenizeProtocolAutolink,previous:previousProtocol},emailAutolink={name:"emailAutolink",tokenize:tokenizeEmailAutolink,previous:previousEmail},text={};function gfmAutolinkLiteral(){return{text}}let code=48;for(;code<123;)text[code]=emailAutolink,code++,code===58?code=65:code===91&&(code=97);text[43]=emailAutolink;text[45]=emailAutolink;text[46]=emailAutolink;text[95]=emailAutolink;text[72]=[emailAutolink,protocolAutolink];text[104]=[emailAutolink,protocolAutolink];text[87]=[emailAutolink,wwwAutolink];text[119]=[emailAutolink,wwwAutolink];function tokenizeEmailAutolink(ds,dn,ms){const xs=this;let bs,Es;return ws;function ws(ks){return!gfmAtext(ks)||!previousEmail.call(xs,xs.previous)||previousUnbalanced(xs.events)?ms(ks):(ds.enter("literalAutolink"),ds.enter("literalAutolinkEmail"),Rs(ks))}function Rs(ks){return gfmAtext(ks)?(ds.consume(ks),Rs):ks===64?(ds.consume(ks),js):ms(ks)}function js(ks){return ks===46?ds.check(emailDomainDotTrail,As,Cs)(ks):ks===45||ks===95||asciiAlphanumeric(ks)?(Es=!0,ds.consume(ks),js):As(ks)}function Cs(ks){return ds.consume(ks),bs=!0,js}function As(ks){return Es&&bs&&asciiAlpha(xs.previous)?(ds.exit("literalAutolinkEmail"),ds.exit("literalAutolink"),dn(ks)):ms(ks)}}function tokenizeWwwAutolink(ds,dn,ms){const xs=this;return bs;function bs(ws){return ws!==87&&ws!==119||!previousWww.call(xs,xs.previous)||previousUnbalanced(xs.events)?ms(ws):(ds.enter("literalAutolink"),ds.enter("literalAutolinkWww"),ds.check(wwwPrefix,ds.attempt(domain,ds.attempt(path,Es),ms),ms)(ws))}function Es(ws){return ds.exit("literalAutolinkWww"),ds.exit("literalAutolink"),dn(ws)}}function tokenizeProtocolAutolink(ds,dn,ms){const xs=this;let bs="",Es=!1;return ws;function ws(ks){return(ks===72||ks===104)&&previousProtocol.call(xs,xs.previous)&&!previousUnbalanced(xs.events)?(ds.enter("literalAutolink"),ds.enter("literalAutolinkHttp"),bs+=String.fromCodePoint(ks),ds.consume(ks),Rs):ms(ks)}function Rs(ks){if(asciiAlpha(ks)&&bs.length<5)return bs+=String.fromCodePoint(ks),ds.consume(ks),Rs;if(ks===58){const Os=bs.toLowerCase();if(Os==="http"||Os==="https")return ds.consume(ks),js}return ms(ks)}function js(ks){return ks===47?(ds.consume(ks),Es?Cs:(Es=!0,js)):ms(ks)}function Cs(ks){return ks===null||asciiControl(ks)||markdownLineEndingOrSpace(ks)||unicodeWhitespace(ks)||unicodePunctuation(ks)?ms(ks):ds.attempt(domain,ds.attempt(path,As),ms)(ks)}function As(ks){return ds.exit("literalAutolinkHttp"),ds.exit("literalAutolink"),dn(ks)}}function tokenizeWwwPrefix(ds,dn,ms){let xs=0;return bs;function bs(ws){return(ws===87||ws===119)&&xs<3?(xs++,ds.consume(ws),bs):ws===46&&xs===3?(ds.consume(ws),Es):ms(ws)}function Es(ws){return ws===null?ms(ws):dn(ws)}}function tokenizeDomain(ds,dn,ms){let xs,bs,Es;return ws;function ws(Cs){return Cs===46||Cs===95?ds.check(trail,js,Rs)(Cs):Cs===null||markdownLineEndingOrSpace(Cs)||unicodeWhitespace(Cs)||Cs!==45&&unicodePunctuation(Cs)?js(Cs):(Es=!0,ds.consume(Cs),ws)}function Rs(Cs){return Cs===95?xs=!0:(bs=xs,xs=void 0),ds.consume(Cs),ws}function js(Cs){return bs||xs||!Es?ms(Cs):dn(Cs)}}function tokenizePath(ds,dn){let ms=0,xs=0;return bs;function bs(ws){return ws===40?(ms++,ds.consume(ws),bs):ws===41&&xs<ms?Es(ws):ws===33||ws===34||ws===38||ws===39||ws===41||ws===42||ws===44||ws===46||ws===58||ws===59||ws===60||ws===63||ws===93||ws===95||ws===126?ds.check(trail,dn,Es)(ws):ws===null||markdownLineEndingOrSpace(ws)||unicodeWhitespace(ws)?dn(ws):(ds.consume(ws),bs)}function Es(ws){return ws===41&&xs++,ds.consume(ws),bs}}function tokenizeTrail(ds,dn,ms){return xs;function xs(Rs){return Rs===33||Rs===34||Rs===39||Rs===41||Rs===42||Rs===44||Rs===46||Rs===58||Rs===59||Rs===63||Rs===95||Rs===126?(ds.consume(Rs),xs):Rs===38?(ds.consume(Rs),Es):Rs===93?(ds.consume(Rs),bs):Rs===60||Rs===null||markdownLineEndingOrSpace(Rs)||unicodeWhitespace(Rs)?dn(Rs):ms(Rs)}function bs(Rs){return Rs===null||Rs===40||Rs===91||markdownLineEndingOrSpace(Rs)||unicodeWhitespace(Rs)?dn(Rs):xs(Rs)}function Es(Rs){return asciiAlpha(Rs)?ws(Rs):ms(Rs)}function ws(Rs){return Rs===59?(ds.consume(Rs),xs):asciiAlpha(Rs)?(ds.consume(Rs),ws):ms(Rs)}}function tokenizeEmailDomainDotTrail(ds,dn,ms){return xs;function xs(Es){return ds.consume(Es),bs}function bs(Es){return asciiAlphanumeric(Es)?ms(Es):dn(Es)}}function previousWww(ds){return ds===null||ds===40||ds===42||ds===95||ds===91||ds===93||ds===126||markdownLineEndingOrSpace(ds)}function previousProtocol(ds){return!asciiAlpha(ds)}function previousEmail(ds){return!(ds===47||gfmAtext(ds))}function gfmAtext(ds){return ds===43||ds===45||ds===46||ds===95||asciiAlphanumeric(ds)}function previousUnbalanced(ds){let dn=ds.length,ms=!1;for(;dn--;
vendor: 6,268 bytes, line 1411
1411){const xs=ds[dn][1];if((xs.type==="labelLink"||xs.type==="labelImage")&&!xs._balanced){ms=!0;break}if(xs._gfmAutolinkLiteralWalkedInto){ms=!1;break}}return ds.length>0&&!ms&&(ds[ds.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),ms}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:"gfmFootnoteCall",tokenize:tokenizeGfmFootnoteCall},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(ds,dn,ms){const xs=this;let bs=xs.events.length;const Es=xs.parser.gfmFootnotes||(xs.parser.gfmFootnotes=[]);let ws;for(;bs--;){const js=xs.events[bs][1];if(js.type==="labelImage"){ws=js;break}if(js.type==="gfmFootnoteCall"||js.type==="labelLink"||js.type==="label"||js.type==="image"||js.type==="link")break}return Rs;function Rs(js){if(!ws||!ws._balanced)return ms(js);const Cs=normalizeIdentifier(xs.sliceSerialize({start:ws.end,end:xs.now()}));return Cs.codePointAt(0)!==94||!Es.includes(Cs.slice(1))?ms(js):(ds.enter("gfmFootnoteCallLabelMarker"),ds.consume(js),ds.exit("gfmFootnoteCallLabelMarker"),dn(js))}}function resolveToPotentialGfmFootnoteCall(ds,dn){let ms=ds.length;for(;ms--;)if(ds[ms][1].type==="labelImage"&&ds[ms][0]==="enter"){ds[ms][1];break}ds[ms+1][1].type="data",ds[ms+3][1].type="gfmFootnoteCallLabelMarker";const xs={type:"gfmFootnoteCall",start:Object.assign({},ds[ms+3][1].start),end:Object.assign({},ds[ds.length-1][1].end)},bs={type:"gfmFootnoteCallMarker",start:Object.assign({},ds[ms+3][1].end),end:Object.assign({},ds[ms+3][1].end)};bs.end.column++,bs.end.offset++,bs.end._bufferIndex++;const Es={type:"gfmFootnoteCallString",start:Object.assign({},bs.end),end:Object.assign({},ds[ds.length-1][1].start)},ws={type:"chunkString",contentType:"string",start:Object.assign({},Es.start),end:Object.assign({},Es.end)},Rs=[ds[ms+1],ds[ms+2],["enter",xs,dn],ds[ms+3],ds[ms+4],["enter",bs,dn],["exit",bs,dn],["enter",Es,dn],["enter",ws,dn],["exit",ws,dn],["exit",Es,dn],ds[ds.length-2],ds[ds.length-1],["exit",xs,dn]];return ds.splice(ms,ds.length-ms+1,...Rs),ds}function tokenizeGfmFootnoteCall(ds,dn,ms){const xs=this,bs=xs.parser.gfmFootnotes||(xs.parser.gfmFootnotes=[]);let Es=0,ws;return Rs;function Rs(ks){return ds.enter("gfmFootnoteCall"),ds.enter("gfmFootnoteCallLabelMarker"),ds.consume(ks),ds.exit("gfmFootnoteCallLabelMarker"),js}function js(ks){return ks!==94?ms(ks):(ds.enter("gfmFootnoteCallMarker"),ds.consume(ks),ds.exit("gfmFootnoteCallMarker"),ds.enter("gfmFootnoteCallString"),ds.enter("chunkString").contentType="string",Cs)}function Cs(ks){if(Es>999||ks===93&&!ws||ks===null||ks===91||markdownLineEndingOrSpace(ks))return ms(ks);if(ks===93){ds.exit("chunkString");const Os=ds.exit("gfmFootnoteCallString");return bs.includes(normalizeIdentifier(xs.sliceSerialize(Os)))?(ds.enter("gfmFootnoteCallLabelMarker"),ds.consume(ks),ds.exit("gfmFootnoteCallLabelMarker"),ds.exit("gfmFootnoteCall"),dn):ms(ks)}return markdownLineEndingOrSpace(ks)||(ws=!0),Es++,ds.consume(ks),ks===92?As:Cs}function As(ks){return ks===91||ks===92||ks===93?(ds.consume(ks),Es++,Cs):Cs(ks)}}function tokenizeDefinitionStart(ds,dn,ms){const xs=this,bs=xs.parser.gfmFootnotes||(xs.parser.gfmFootnotes=[]);let Es,ws=0,Rs;return js;function js(Ds){return ds.enter("gfmFootnoteDefinition")._container=!0,ds.enter("gfmFootnoteDefinitionLabel"),ds.enter("gfmFootnoteDefinitionLabelMarker"),ds.consume(Ds),ds.exit("gfmFootnoteDefinitionLabelMarker"),Cs}function Cs(Ds){return Ds===94?(ds.enter("gfmFootnoteDefinitionMarker"),ds.consume(Ds),ds.exit("gfmFootnoteDefinitionMarker"),ds.enter("gfmFootnoteDefinitionLabelString"),ds.enter("chunkString").contentType="string",As):ms(Ds)}function As(Ds){if(ws>999||Ds===93&&!Rs||Ds===null||Ds===91||markdownLineEndingOrSpace(Ds))return ms(Ds);if(Ds===93){ds.exit("chunkString");const Ps=ds.exit("gfmFootnoteDefinitionLabelString");return Es=normalizeIdentifier(xs.sliceSerialize(Ps)),ds.enter("gfmFootnoteDefinitionLabelMarker"),ds.consume(Ds),ds.exit("gfmFootnoteDefinitionLabelMarker"),ds.exit("gfmFootnoteDefinitionLabel"),Os}return markdownLineEndingOrSpace(Ds)||(Rs=!0),ws++,ds.consume(Ds),Ds===92?ks:As}function ks(Ds){return Ds===91||Ds===92||Ds===93?(ds.consume(Ds),ws++,As):As(Ds)}function Os(Ds){return Ds===58?(ds.enter("definitionMarker"),ds.consume(Ds),ds.exit("definitionMarker"),bs.includes(Es)||bs.push(Es),factorySpace(ds,Ms,"gfmFootnoteDefinitionWhitespace")):ms(Ds)}function Ms(Ds){return dn(Ds)}}function tokenizeDefinitionContinuation(ds,dn,ms){return ds.check(blankLine,dn,ds.attempt(indent,dn,ms))}function gfmFootnoteDefinitionEnd(ds){ds.exit("gfmFootnoteDefinition")}function tokenizeIndent(ds,dn,ms){const xs=this;return factorySpace(ds,bs,"gfmFootnoteDefinitionIndent",5);function bs(Es){const ws=xs.events[xs.events.length-1];return ws&&ws[1].type==="gfmFootnoteDefinitionIndent"&&ws[2].sliceSerialize(ws[1],!0).length===4?dn(Es):ms(Es)}}function gfmStrikethrough(ds){let ms=(ds||{}).singleTilde;const xs={name:"strikethrough",tokenize:Es,resolveAll:bs};return ms==null&&(ms=!0),{text:{126:xs},insideSpan:{null:[xs]},attentionMarkers:{null:[126]}};function bs(ws,Rs){let js=-1;for(;++js<ws.length;)if(ws[js][0]==="enter"&&ws[js][1].type==="strikethroughSequenceTemporary"&&ws[js][1]._close){let Cs=js;for(;Cs--;)if(ws[Cs][0]==="exit"&&ws[Cs][1].type==="strikethroughSequenceTemporary"&&ws[Cs][1]._open&&ws[js][1].end.offset-ws[js][1].start.offset===ws[Cs][1].end.offset-ws[Cs][1].start.offset){ws[js][1].type="strikethroughSequence",ws[Cs][1].type="strikethroughSequence";const As={type:"strikethrough",start:Object.assign({},ws[Cs][1].start),end:Object.assign({},ws[js][1].end)},ks={type:"strikethroughText",start:Object.assign({},ws[Cs][1].end),end:Object.assign({},ws[js][1].start)},Os=[["enter",As,Rs],["enter",ws[Cs][1],Rs],["exit",ws[Cs][1],Rs],["enter",ks,Rs]],Ms=Rs.parser.constructs.insideSpan.null;Ms&&splice(Os,Os.length,0,resolveAll(Ms,ws.slice(Cs+1,js),Rs)),splice(Os,Os.length,0,[["exit",ks,Rs],["enter",ws[js][1],Rs],["exit",ws[js][1],Rs],["exit",As,Rs
vendor: 6,130 bytes, line 1411
1411]]),splice(ws,Cs-1,js-Cs+3,Os),js=Cs+Os.length-2;break}}for(js=-1;++js<ws.length;)ws[js][1].type==="strikethroughSequenceTemporary"&&(ws[js][1].type="data");return ws}function Es(ws,Rs,js){const Cs=this.previous,As=this.events;let ks=0;return Os;function Os(Ds){return Cs===126&&As[As.length-1][1].type!=="characterEscape"?js(Ds):(ws.enter("strikethroughSequenceTemporary"),Ms(Ds))}function Ms(Ds){const Ps=classifyCharacter(Cs);if(Ds===126)return ks>1?js(Ds):(ws.consume(Ds),ks++,Ms);if(ks<2&&!ms)return js(Ds);const Ls=ws.exit("strikethroughSequenceTemporary"),Bs=classifyCharacter(Ds);return Ls._open=!Bs||Bs===2&&!!Ps,Ls._close=!Ps||Ps===2&&!!Bs,Rs(Ds)}}}class EditMap{constructor(){this.map=[],this.index=new Map}add(dn,ms,xs){addImplementation(this,dn,ms,xs)}consume(dn){if(this.map.sort(function(Es,ws){return Es[0]-ws[0]}),this.map.length===0)return;let ms=this.map.length;const xs=[];for(;ms>0;)ms-=1,xs.push(dn.slice(this.map[ms][0]+this.map[ms][1]),this.map[ms][2]),dn.length=this.map[ms][0];xs.push(dn.slice()),dn.length=0;let bs=xs.pop();for(;bs;){for(const Es of bs)dn.push(Es);bs=xs.pop()}this.map.length=0,this.index.clear()}}function addImplementation(ds,dn,ms,xs){if(ms===0&&xs.length===0)return;const bs=ds.index.get(dn);if(bs){bs[1]+=ms,bs[2].push(...xs);return}const Es=[dn,ms,xs];ds.map.push(Es),ds.index.set(dn,Es)}function gfmTableAlign(ds,dn){let ms=!1;const xs=[];for(;dn<ds.length;){const bs=ds[dn];if(ms){if(bs[0]==="enter")bs[1].type==="tableContent"&&xs.push(ds[dn+1][1].type==="tableDelimiterMarker"?"left":"none");else if(bs[1].type==="tableContent"){if(ds[dn-1][1].type==="tableDelimiterMarker"){const Es=xs.length-1;xs[Es]=xs[Es]==="left"?"center":"right"}}else if(bs[1].type==="tableDelimiterRow")break}else bs[0]==="enter"&&bs[1].type==="tableDelimiterRow"&&(ms=!0);dn+=1}return xs}function gfmTable(){return{flow:{null:{name:"table",tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(ds,dn,ms){const xs=this;let bs=0,Es=0,ws;return Rs;function Rs(ai){let ia=xs.events.length-1;for(;ia>-1;){const{type:ea}=xs.events[ia][1];if(ea==="lineEnding"||ea==="linePrefix")ia--;else break}const ca=ia>-1?xs.events[ia][1].type:null,ha=ca==="tableHead"||ca==="tableRow"?Ws:js;return ha===Ws&&xs.parser.lazy[xs.now().line]?ms(ai):ha(ai)}function js(ai){return ds.enter("tableHead"),ds.enter("tableRow"),Cs(ai)}function Cs(ai){return ai===124||(ws=!0,Es+=1),As(ai)}function As(ai){return ai===null?ms(ai):markdownLineEnding(ai)?Es>1?(Es=0,xs.interrupt=!0,ds.exit("tableRow"),ds.enter("lineEnding"),ds.consume(ai),ds.exit("lineEnding"),Ms):ms(ai):markdownSpace(ai)?factorySpace(ds,As,"whitespace")(ai):(Es+=1,ws&&(ws=!1,bs+=1),ai===124?(ds.enter("tableCellDivider"),ds.consume(ai),ds.exit("tableCellDivider"),ws=!0,As):(ds.enter("data"),ks(ai)))}function ks(ai){return ai===null||ai===124||markdownLineEndingOrSpace(ai)?(ds.exit("data"),As(ai)):(ds.consume(ai),ai===92?Os:ks)}function Os(ai){return ai===92||ai===124?(ds.consume(ai),ks):ks(ai)}function Ms(ai){return xs.interrupt=!1,xs.parser.lazy[xs.now().line]?ms(ai):(ds.enter("tableDelimiterRow"),ws=!1,markdownSpace(ai)?factorySpace(ds,Ds,"linePrefix",xs.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ai):Ds(ai))}function Ds(ai){return ai===45||ai===58?Ls(ai):ai===124?(ws=!0,ds.enter("tableCellDivider"),ds.consume(ai),ds.exit("tableCellDivider"),Ps):Js(ai)}function Ps(ai){return markdownSpace(ai)?factorySpace(ds,Ls,"whitespace")(ai):Ls(ai)}function Ls(ai){return ai===58?(Es+=1,ws=!0,ds.enter("tableDelimiterMarker"),ds.consume(ai),ds.exit("tableDelimiterMarker"),Bs):ai===45?(Es+=1,Bs(ai)):ai===null||markdownLineEnding(ai)?Gs(ai):Js(ai)}function Bs(ai){return ai===45?(ds.enter("tableDelimiterFiller"),Fs(ai)):Js(ai)}function Fs(ai){return ai===45?(ds.consume(ai),Fs):ai===58?(ws=!0,ds.exit("tableDelimiterFiller"),ds.enter("tableDelimiterMarker"),ds.consume(ai),ds.exit("tableDelimiterMarker"),Us):(ds.exit("tableDelimiterFiller"),Us(ai))}function Us(ai){return markdownSpace(ai)?factorySpace(ds,Gs,"whitespace")(ai):Gs(ai)}function Gs(ai){return ai===124?Ds(ai):ai===null||markdownLineEnding(ai)?!ws||bs!==Es?Js(ai):(ds.exit("tableDelimiterRow"),ds.exit("tableHead"),dn(ai)):Js(ai)}function Js(ai){return ms(ai)}function Ws(ai){return ds.enter("tableRow"),Zs(ai)}function Zs(ai){return ai===124?(ds.enter("tableCellDivider"),ds.consume(ai),ds.exit("tableCellDivider"),Zs):ai===null||markdownLineEnding(ai)?(ds.exit("tableRow"),dn(ai)):markdownSpace(ai)?factorySpace(ds,Zs,"whitespace")(ai):(ds.enter("data"),Ys(ai))}function Ys(ai){return ai===null||ai===124||markdownLineEndingOrSpace(ai)?(ds.exit("data"),Zs(ai)):(ds.consume(ai),ai===92?Qs:Ys)}function Qs(ai){return ai===92||ai===124?(ds.consume(ai),Ys):Ys(ai)}}function resolveTable(ds,dn){let ms=-1,xs=!0,bs=0,Es=[0,0,0,0],ws=[0,0,0,0],Rs=!1,js=0,Cs,As,ks;const Os=new EditMap;for(;++ms<ds.length;){const Ms=ds[ms],Ds=Ms[1];Ms[0]==="enter"?Ds.type==="tableHead"?(Rs=!1,js!==0&&(flushTableEnd(Os,dn,js,Cs,As),As=void 0,js=0),Cs={type:"table",start:Object.assign({},Ds.start),end:Object.assign({},Ds.end)},Os.add(ms,0,[["enter",Cs,dn]])):Ds.type==="tableRow"||Ds.type==="tableDelimiterRow"?(xs=!0,ks=void 0,Es=[0,0,0,0],ws=[0,ms+1,0,0],Rs&&(Rs=!1,As={type:"tableBody",start:Object.assign({},Ds.start),end:Object.assign({},Ds.end)},Os.add(ms,0,[["enter",As,dn]])),bs=Ds.type==="tableDelimiterRow"?2:As?3:1):bs&&(Ds.type==="data"||Ds.type==="tableDelimiterMarker"||Ds.type==="tableDelimiterFiller")?(xs=!1,ws[2]===0&&(Es[1]!==0&&(ws[0]=ws[1],ks=flushCell(Os,dn,Es,bs,void 0,ks),Es=[0,0,0,0]),ws[2]=ms)):Ds.type==="tableCellDivider"&&(xs?xs=!1:(Es[1]!==0&&(ws[0]=ws[1],ks=flushCell(Os,dn,Es,bs,void 0,ks)),Es=ws,ws=[Es[1],ms,0,0])):Ds.type==="tableHead"?(Rs=!0,js=ms):Ds.type==="tableRow"||Ds.type==="tableDelimiterRow"?(js=ms,Es[1]!==0?(ws[0]=ws[1],ks=flushCell(Os,dn,Es,bs,ms,ks)):ws[1]!==0&&(ks=flushCell(Os,dn,ws,bs,ms,ks)),bs=0):bs&&(Ds.type==="data"||Ds.type==="tableDelimiterMarker"||Ds.type==="tableDelimiterFiller")&&(ws[3]=ms)}for(js!==0&&flushTableEnd(Os,dn,js,Cs,As),Os.consume(dn.events),ms=-1;++ms<dn.events.length;){const Ms=dn.events[ms];
1411Ms[0]==="enter"&&Ms[1].type==="table"&&(Ms[1]._align=gfmTableAlign(dn.events,ms))}return ds}function flushCell(ds,dn,ms,xs,bs,Es){const ws=xs===1?"tableHeader":xs===2?"tableDelimiter":"tableData",Rs="tableContent";ms[0]!==0&&(Es.end=Object.assign({},getPoint(dn.events,ms[0])),ds.add(ms[0],0,[["exit",Es,dn]]));const js=getPoint(dn.events,ms[1]);if(Es={type:ws,start:Object.assign({},js),end:Object.assign({},js)},ds.add(ms[1],0,[["enter",Es,dn]]),ms[2]!==0){const Cs=getPoint(dn.events,ms[2]),As=getPoint(dn.events,ms[3]),ks={type:Rs,start:Object.assign({},Cs),end:Object.assign({},As)};if(ds.add(ms[2],0,[["enter",ks,dn]]),xs!==2){const Os=dn.events[ms[2]],Ms=dn.events[ms[3]];if(Os[1].end=Object.assign({},Ms[1].end),Os[1].type="chunkText",Os[1].contentType="text",ms[3]>ms[2]+1){const Ds=ms[2]+1,Ps=ms[3]-ms[2]-1;ds.add(Ds,Ps,[])}}ds.add(ms[3]+1,0,[["exit",ks,dn]])}return bs!==void 0&&(Es.end=Object.assign({},getPoint(dn.events,bs)),ds.add(bs,0,[["exit",Es,dn]]),Es=void 0),Es}function flushTableEnd(ds,dn,ms,xs,bs){const Es=[],ws=getPoint(dn.events,ms);bs&&(bs.end=Object.assign({},ws),Es.push(["exit",bs,dn])),xs.end=Object.assign({},ws),Es.push(["exit",xs,dn]),ds.add(ms+1,0,Es)}function getPoint(ds,dn){const ms=ds[dn],xs=ms[0]==="enter"?"start":"end";return ms[1][xs]}const tasklistCheck={name:"tasklistCheck",tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:tasklistCheck}}}function tokenizeTasklistCheck(ds,dn,ms){const xs=this;return bs;function bs(js){return xs.previous!==null||!xs._gfmTasklistFirstContentOfListItem?ms(js):(ds.enter("taskListCheck"),ds.enter("taskListCheckMarker"),ds.consume(js),ds.exit("taskListCheckMarker"),Es)}function Es(js){return markdownLineEndingOrSpace(js)?(ds.enter("taskListCheckValueUnchecked"),ds.consume(js),ds.exit("taskListCheckValueUnchecked"),ws):js===88||js===120?(ds.enter("taskListCheckValueChecked"),ds.consume(js),ds.exit("taskListCheckValueChecked"),ws):ms(js)}function ws(js){return js===93?(ds.enter("taskListCheckMarker"),ds.consume(js),ds.exit("taskListCheckMarker"),ds.exit("taskListCheck"),Rs):ms(js)}function Rs(js){return markdownLineEnding(js)?dn(js):markdownSpace(js)?ds.check({tokenize:spaceThenNonSpace},dn,ms)(js):ms(js)}}function spaceThenNonSpace(ds,dn,ms){return factorySpace(ds,xs,"whitespace");function xs(bs){return bs===null?ms(bs):dn(bs)}}function gfm(ds){return combineExtensions([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(ds),gfmTable(),gfmTaskListItem()])}const emptyOptions={};function remarkGfm(ds){const dn=this,ms=ds||emptyOptions,xs=dn.data(),bs=xs.micromarkExtensions||(xs.micromarkExtensions=[]),Es=xs.fromMarkdownExtensions||(xs.fromMarkdownExtensions=[]),ws=xs.toMarkdownExtensions||(xs.toMarkdownExtensions=[]);bs.push(gfm(ms)),Es.push(gfmFromMarkdown()),ws.push(gfmToMarkdown(ms))}const BlogArticle=({article:ds})=>{const dn=ds.format==="markdown";return reactExports.useEffect(()=>{const ms=document.title,xs=`${ds.title} | Manual Magic AI`;document.title=xs;const bs=document.querySelector('meta[name="description"]'),Es=bs?.getAttribute("content");if(ds.description)if(bs)bs.setAttribute("content",ds.description);else{const ws=document.createElement("meta");ws.setAttribute("name","description"),ws.setAttribute("content",ds.description),document.head.appendChild(ws)}return()=>{document.title=ms;const ws=document.querySelector('meta[name="description"]');if(ws){if(Es){ws.setAttribute("content",Es);return}ws.parentNode&&ws.parentNode.removeChild(ws)}}},[ds.description,ds.title]),jsxRuntimeExports.jsx("div",{className:styles$2.container,children:jsxRuntimeExports.jsxs("article",{className:styles$2.article,children:[jsxRuntimeExports.jsx("header",{children:jsxRuntimeExports.jsx("h1",{className:styles$2.title,children:ds.title})}),ds.image&&jsxRuntimeExports.jsx("div",{className:styles$2.articleImage,children:jsxRuntimeExports.jsx("img",{src:ds.image.url,alt:ds.image.alt||ds.title,className:styles$2.image})}),jsxRuntimeExports.jsx("div",{className:styles$2.content,children:dn?jsxRuntimeExports.jsx(Markdown,{remarkPlugins:[remarkGfm],children:ds.content}):jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:ds.content}})}),jsxRuntimeExports.jsx("footer",{children:jsxRuntimeExports.jsx(LinkButton,{to:"/blog",buttonType:ButtonType.Primary,children:"Back to Blog"})})]})})},SponsorPage=({sponsor:ds})=>(reactExports.useEffect(()=>{document.title=`${ds.name} | Manual Magic AI Partner`},[ds.name]),jsxRuntimeExports.jsxs("main",{className:"bg-secondary",children:[jsxRuntimeExports.jsx(Headline,{__typename:"Headline",title:ds.name,subtitle:`${ds.name} partners with Manual Magic to help brands launch, standardize, and scale SOPs across markets.`,imageUrl:ds.logoUrl,imageAlt:`${ds.name}
1411 Logo`,imagePosition:"left",imageClasses:"!max-w-[300px]",content:"",subTitleClass:"!text-2xl text-white",ctaText:`Visit ${ds.name}`,ctaUrl:ds.websiteUrl,imageShape:"square"}),jsxRuntimeExports.jsx(ContentSection,{__typename:"ContentSection",title:`About ${ds.name}`,backgroundClass:"bg-gray-50 !text-lg",content:ds.description}),jsxRuntimeExports.jsx(BenefitsGrid,{__typename:"BenefitsGrid",heading:"How They Support Global Brands",headingClass:"text-white",backgroundClass:"bg-secondary",benefits:ds.benefits}),jsxRuntimeExports.jsx(Grid,{__typename:"Grid",title:"Featured Initiatives",backgroundClass:"bg-gray-50",gridItems:ds.initiatives.map(dn=>({title:dn.title,content:dn.description,backgroundClass:"bg-primary text-white bg-opacity-10",titleClass:"text-2xl !text-white"}))}),jsxRuntimeExports.jsx(ContentSection,{__typename:"ContentSection",title:"Links",backgroundClass:"bg-tertiary",content:`<ul class="space-y-2 text-lg">
1412                    <li><strong>Learn more:</strong> <a href="${ds.websiteUrl}" target="_blank" rel="noopener noreferrer">Visit Website →</a></li>
1413                    ${ds.franchiseSolutionsUrl?`<li><strong>Franchise solutions:</strong> <a href="${ds.franchiseSolutionsUrl}" target="_blank" rel="noopener noreferrer">View Solutions →</a></li>`:""}
1414                    ${ds.caseStudiesUrl?`<li><strong>Case studies:</strong> <a href="${ds.caseStudiesUrl}" target="_blank" rel="noopener noreferrer">Read Case Studies →</a></li>`:""}
1415                    ${ds.contactEmail?`<li><strong>Contact:</strong> <a href="mailto:${ds.contactEmail}">${ds.contactEmail}</a></li>`:""}
1416                </ul>`}),jsxRuntimeExports.jsx(CTAComponent,{__typename:"CTA",title:"Interested in Sponsoring?",titleClass:"!text-secondary",backgroundClass:"bg-gray-50",ctaText:"Email [email protected]",ctaUrl:"mailto:[email protected]"})]})),sponsors=[{name:"Manual.to",slug:"manual-to",logoUrl:"/graphics/manualto.png",websiteUrl:"https://manual.to",description:"Make step by step instructions with videos, images and text in minutes.",franchiseSolutionsUrl:"https://manual.to/product",caseStudiesUrl:"https://manual.to/case-studies",contactEmail:"[email protected]",benefits:[{title:"Make",description:"Make step by step instructions with videos, images and text in minutes."},{title:"Share",description:"Share content quickly and easily using a custom branded URL or QR code."},{title:"Learn",description:"Users read and understand crucial processes on any device in over 100 languages."}],initiatives:[{title:"Blueprint Accelerator",description:"From manual to role-ready SOPs in 4 weeks"},{title:"Compliance Templates",description:"Sector kits (e.g., food safety, financial services)"},{title:"Field Enablement Pack",description:"Checklists, micro-learning, and certifications"}]},{name:"Claromentis",slug:"claromentis",logoUrl:"/graphics/claromentis.svg",websiteUrl:"https://www.claromentis.com",description:"Claromentis is a Brighton-based digital workplace company with 25 years in enterprise software. Its Franchise Hub brings a whole franchise network into one secure, AI-powered platform for communications, knowledge, training and compliance.<br/><br/>Manual Magic AI is integrated with Franchise Hub. Franchisors upload their existing documents, Manual Magic AI drafts the SOPs and Operations Manual from them, and Claromentis puts the approved versions in front of every franchisee.",franchiseSolutionsUrl:"https://www.claromentis.com/franchise/manual-magic-ai",caseStudiesUrl:"https://www.claromentis.com/claromentis-customer-success-stories",benefits:[{title:"Unify",description:"One franchise hub for news, operations manuals, SOPs and brand resources, so every location works from the same playbook."},{title:"Train",description:"Standard onboarding paths and SCORM e-learning, with completion tracked for every franchisee."},{title:"Comply",description:"AI Policy Manager distributes policies and tracks acceptance, with audit trails and location dashboards."}],initiatives:[{title:"Manual Magic AI Integration",description:"Turn scattered documents into SOPs and Operations Manual
1416s inside Franchise Hub, cutting SOP development time by up to 75%."},{title:"Franchise Hub",description:"Expansion Manager, location dashboards, e-forms and workflows, and a knowledge base in one platform."},{title:"AI Search and Assistants",description:"Help franchisees find the right SOP, policy or resource fast."}]}];function getSponsorBySlug(ds){return sponsors.find(dn=>dn.slug===ds)}const home={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/"},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":"SoftwareApplication","@id":"https://manualmagic.ai/#software",name:"Manual Magic AI",applicationCategory:"BusinessApplication",operatingSystem:"Web",publisher:{"@id":"https://manualmagic.ai/#org"},featureList:["Upload IP (documents, PDFs, spreadsheets, slides, images)","Auto-sort content into categories","Visual task boards for drafting and review","AI-assisted drafting for SOPs, checklists, FAQs, infographics, and video storyboards","Review, refine, and share content"]},{"@type":"WebPage","@id":"https://manualmagic.ai/#webpage",url:"https://manualmagic.ai/",name:"Manual Magic AI - Get Started",description:"Manual Magic AI - Turn scattered files and SOPs into detailed, user-friendly Operations Manuals.",isPartOf:{"@id":"https://manualmagic.ai/#website"},about:{"@id":"https://manualmagic.ai/#software"},inLanguage:"en-GB"}]},about={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/"},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":"Person","@id":"https://manualmagic.ai/#penny-hopkinson",name:"Penny Hopkinson",jobTitle:"Founder",affiliation:{"@id":"https://manualmagic.ai/#org"}},{"@type":["WebPage","AboutPage"],"@id":"https://manualmagic.ai/about#webpage",url:"https://manualmagic.ai/about",name:"About Manual Magic AI",description:"Turn scattered know-how into a living operations manual your whole network can trust.",isPartOf:{"@id":"https://manualmagic.ai/#website"},about:[{"@id":"https://manualmagic.ai/#org"},{"@id":"https://manualmagic.ai/#penny-hopkinson"}],inLanguage:"en-GB"}]},pricing={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/"},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":"OfferCatalog","@id":"https://manualmagic.ai/pricing#catalog",name:"Seat-based pricing",offeredBy:{"@id":"https://manualmagic.ai/#org"},itemListElement:[{"@type":"Offer",name:"Administrator seat",url:"https://manualmagic.ai/pricing#administrator"},{"@type":"Offer",name:"Reader seat",url:"https://manualmagic.ai/pricing#reader"}]},{"@type":"WebPage","@id":"https://manualmagic.ai/pricing#webpage",url:"https://manualmagic.ai/pricing",name:"Pricing",description:"Choose a Manual Magic AI plan that fits your team. Clear pricing, no surprises.",isPartOf:{"@id":"https://manualmagic.ai/#website"},mainEntity:{"@id":"https://manualmagic.ai/pricing#catalog"},inLanguage:"en-GB"}]},faq={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What is Manual Magic AI®?",acceptedAnswer:{"@type":"Answer",text:"Manual Magic AI® helps you quickly transform existing documents and know-how into structured SOPs and a practical operations manual."}},{"@type":"Question",name:"Do we need to start from scratch?",acceptedAnswer:{"@type":"Answer",text:`No. Bring your existing manuals, policies, checklists, training notes, templates, and "somebody's got it on a desktop somewhere" files.`}},{"@type":"Question",name:"What is the actual function of the AI?",acceptedA
1416nswer:{"@type":"Answer",text:"It handles the heavy lifting and helps draft and structure SOPs, checklists, FAQs, storyboards, and training-friendly content from your source material."}},{"@type":"Question",name:"How does this differ from SharePoint or Google Drive?",acceptedAnswer:{"@type":"Answer",text:"Folders contain files. Manual Magic AI® helps you convert them into organised SOPs that people can follow and keep current."}},{"@type":"Question",name:"We already have an LMS. Is this going to replace it?",acceptedAnswer:{"@type":"Answer",text:"No. Your LMS provides learning. This keeps procedures current, practical, and easy to find within the workflow."}},{"@type":"Question",name:"Can we customise content based on role and location?",acceptedAnswer:{"@type":"Answer",text:`Yes. Role-based tagging helps people see what's relevant to them, rather than a 200-page "everything manual".`}},{"@type":"Question",name:"Can we export to PDF or DOCX?",acceptedAnswer:{"@type":"Answer",text:"Yes, exports are possible for the documents."}},{"@type":"Question",name:"Is our content still our intellectual property?",acceptedAnswer:{"@type":"Answer",text:"Yes. Your operational content remains yours."}},{"@type":"Question",name:"Can we pilot first?",acceptedAnswer:{"@type":"Answer",text:"Yes. A pilot can be run by a single Admin (Contributor) or by a Project Team of Contributors with a clear scope and a deadline."}}]},features={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/"},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":"SoftwareApplication","@id":"https://manualmagic.ai/#software",name:"Manual Magic AI",applicationCategory:"BusinessApplication",operatingSystem:"Web",publisher:{"@id":"https://manualmagic.ai/#org"},featureList:["Upload documents and other operational assets for drafting","Manage SOPs with ownership, categories, and updates across the organisation","Ask natural-language questions and get guidance drawn from your own manuals and IP"]},{"@type":"WebPage","@id":"https://manualmagic.ai/features#webpage",url:"https://manualmagic.ai/features",name:"Features",description:"Explore the core features of Manual Magic AI.",isPartOf:{"@id":"https://manualmagic.ai/#website"},about:{"@id":"https://manualmagic.ai/#software"},inLanguage:"en-GB"}]},blog={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/"},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":"Blog","@id":"https://manualmagic.ai/blog#blog",name:"Manual Magic",description:"Read the latest insights and tips from the Manual Magic Team.",publisher:{"@id":"https://manualmagic.ai/#org"}},{"@type":"WebPage","@id":"https://manualmagic.ai/blog#webpage",url:"https://manualmagic.ai/blog",name:"Manual Magic",description:"Read the latest insights and tips from the Manual Magic Team.",isPartOf:{"@id":"https://manualmagic.ai/#website"},mainEntity:{"@id":"https://manualmagic.ai/blog#blog"},inLanguage:"en-GB"}]},contact={"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://manualmagic.ai/#org",name:"Manual Magic AI",alternateName:["Manual Magic AI®","Manual Magic"],url:"https://manualmagic.ai/",contactPoint:[{"@type":"ContactPoint",contactType:"customer support",email:"[email protected]"}]},{"@type":"WebSite","@id":"https://manualmagic.ai/#website",url:"https://manualmagic.ai/",name:"Manual Magic AI",publisher:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"},{"@type":["WebPage","ContactPage"],"@id":"https://manualmagic.ai/contact#webpage",url:"https://manualmagic.ai/contact",name:"Contact",description:"Contact Manual Magic AI - We're here if you have questions about the product or need technical help.",isPartOf:{"@id":"https://manualmagic.ai/#website"},about:{"@id":"https://manualmagic.ai/#org"},inLanguage:"en-GB"}]};function linkingDataFor(ds){if(ds==="")return home;if(ds==="about")return about;if(ds==="faq")return faq;if(ds==="pricing")return pricing;if(ds==="features")return features;if(ds==="blog")return blog;if(ds==="contact")return contact}function JsonLinkingData({slug:ds,children:dn}){const ms=linkingDataFor(ds);return ms?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("script",{type:"application/ld+json",children:JSON.stringify(ms)}),dn]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:dn})}
1416const PageOrArticle=()=>{const dn=useLocation().pathname.substring(1).split("/").filter(Boolean).join("/");if(dn.startsWith("blog/")){const Es=dn.substring(5);if(Es){const ws=getBlogArticleBySlug(Es);if(ws)return jsxRuntimeExports.jsx(BlogArticle,{article:ws})}}if(dn.startsWith("sponsor/")){const Es=dn.substring(8);if(Es){const ws=getSponsorBySlug(Es);if(ws)return jsxRuntimeExports.jsx(SponsorPage,{sponsor:ws})}}if(dn.startsWith("consultancy"))return jsxRuntimeExports.jsx(ConsultancySalesPage,{});const ms=getPageBySlug(dn),xs=dn==="faq"&&Auth.isAuthenticated(),bs=ms&&xs?{...ms,components:ms.components.filter(Es=>!(Es.__typename==="CTA"&&Es.title==="Ready to standardise and scale?"))}:ms;return!bs&&dn!==""?jsxRuntimeExports.jsx("div",{className:"py-16 text-center",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold mb-4 text-primary",children:"Page Not Found"}),jsxRuntimeExports.jsx("p",{className:"text-xl text-dark",children:"The page you're looking for doesn't exist or has been moved."}),jsxRuntimeExports.jsx("div",{className:"mt-8",children:jsxRuntimeExports.jsx(LinkButton,{buttonType:ButtonType.Primary,to:"/",className:"inline-block bg-primary hover:bg-secondary text-light font-medium py-3 px-6 rounded-lg transition-colors duration-300",children:"Go to Homepage"})})]})}):bs?jsxRuntimeExports.jsx(JsonLinkingData,{slug:dn,children:jsxRuntimeExports.jsx(LandingPage,{page:bs})}):null};var AppRouting=(ds=>(ds.Welcome="Welcome",ds.Website="Website",ds.PaymentRequired="PaymentRequired",ds.PasswordRequired="PasswordRequired",ds.App="App",ds))(AppRouting||{});function removeItem(ds,dn){if(dn){const ms=[...ds];let xs=ms.indexOf(dn);for(;xs>=0;
1416)ms.splice(xs,1),xs=ms.indexOf(dn);return ms}return ds}function removeAtIndexItem(ds,dn){const ms=[...ds];return dn>=0&&ms.splice(dn,1),ms}function updateItemWhere(ds,dn,ms){return ds.map(xs=>dn(xs)?ms(xs):xs)}const AccountContext=reactExports.createContext(null);function AccountProvider({children:ds}){const dn=useNavigate(),{setCurrency:ms}=useHomeContext(),[xs,bs]=reactExports.useState(AppRouting.Website),[Es,ws]=reactExports.useState(),[Rs,js]=reactExports.useState(),[Cs,As]=reactExports.useState(),[ks,Os]=reactExports.useState([]),[Ms,Ds]=reactExports.useState(),[Ps,Ls]=reactExports.useState([]),[Bs,Fs]=reactExports.useState([]),[Us,Gs]=reactExports.useState([]),[Js,Ws]=reactExports.useState(!1),Zs=Us.includes("Admin"),Ys=async()=>{try{const ai=await Sdk.accountClient.myAccount();ai.currency&&ms(ai.currency),js(ai)}catch(ai){console.error("Failed to refresh account:",ai)}},Qs=async()=>{try{const[ai,ia]=await Promise.all([Sdk.organisationClient.myOrganisation(),Sdk.organisationMembersClient.getMyPermissions()]);ai&&Gs(ai.roles??[]),Fs(ia)}catch{}};return reactExports.useMemo(()=>{Js||(async()=>{try{const ai=await Sdk.userClient.myUser();ws(ai);const ia=await Sdk.accountClient.myAccount();ia.currency&&ms(ia.currency),js(ia);const ca=await Sdk.organisationClient.myOrganisation();ca&&(As(ca.id),Gs(ca?.roles??[]));const ha=await Sdk.organisationMembersClient.getMyPermissions();Fs(ha);const ea=DateTime.now().zoneName;if(console.log("Current timezone detection:",{detectedZone:ea,accountZone:ia?.timezone,shouldUpdate:ea&&(ia?.timezone===void 0||ia?.timezone===""||ia?.timezone!==ea)}),ea&&(ia?.timezone===void 0||ia?.timezone===""||ia?.timezone!==ea))try{await Sdk.accountClient.updateTimezone(ea);const ua=await Sdk.accountClient.myAccount();js(ua)}catch(ua){console.error("Failed to update timezone:",ua)}(isBlank(ia?.version)||ia?.version!==Sdk.version)&&await Sdk.accountClient.updateVersion(Sdk.version);const ta=await Sdk.customerClient.customer();if(isBlank(ta?.ip)){const Ea=await(await fetch("https://checkip.amazonaws.com/")).text();await Sdk.customerClient.updateIP(Ea.trim())}const aa=await Sdk.actionsClient.myActions();Os(aa),aa.includes(UserActionRequired.SET_PASSWORD)&&dn("/set-password");const fa=await Sdk.manualsClient.fetchAll();Ls(fa.data),fa.data.length>0&&Ds(fa.data.sort((ua,Ea)=>Ea.createdEpoch-ua.createdEpoch)[0].id),Ws(!0)}catch(ai){console.error("Initialisation failed",ai)}})()},[ms,dn,Js]),reactExports.useEffect(()=>{Js&&(ks.includes(UserActionRequired.SET_PASSWORD)?bs(AppRouting.PasswordRequired):ks.includes(UserActionRequired.CHECKOUT)?bs(AppRouting.PaymentRequired):ks.includes(UserActionRequired.WELCOME)?bs(AppRouting.Welcome):bs(AppRouting.App))},[Js,ks]),jsxRuntimeExports.jsx(AccountContext,{value:{routing:xs,setRouting:bs,user:Es,setUser:ws,account:Rs,setAccount:js,actionsRequired:ks,setActionsRequired:Os,refreshAccount:Ys,refreshPermissions:Qs,organisationId:Cs,selectedManualId:Ms,setSelectedManualId:Ds,manuals:Ps,setManuals:Ls,permissions:Bs,roles:Us,isAdmin:Zs},children:ds})}const useAccountContext=()=>{const ds=reactExports.useContext(AccountContext);if(ds===void 0)throw new Error("useAccountContext must be used within a AccountContext");return ds};function Welcome(){const ds=useNavigate(),{actionsRequired:dn,setActionsRequired:ms}=useAccountContext();return jsxRuntimeExports.jsx("div",{className:"relative min-h-screen",children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-12 relative z-10",children:[jsxRuntimeExports.jsx("div",{className:"col-span-12 text-center ml-5 mt-5"}),jsxRuntimeExports.jsxs("div",{className:"col-span-12 text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl mt-5",children:"Welcome to Manual Magic!"}),jsxRuntimeExports.jsx("div",{className:"mb-8 text-center text-lg",children:jsxRuntimeExports.jsx("p",{className:"mb-4",children:"A quick hello from our CEO."})})]}),jsxRuntimeExports.jsx("div",{className:"col-span-12 md:col-span-10 md:col-start-2 lg:col-span-8 lg:col-start-3 xl:col-span-6 xl:col-start-4 flex",children:jsxRuntimeExports.jsxs("div",{className:"pad mt-5 ml-auto mr-auto min-w-[100%] md:min-w-[500px]",children:[jsxRuntimeExports.jsx("div",{className:"video-container mb-8",children:jsxRuntimeExports.jsxs("video",{autoPlay:!0,muted:!1,playsInl
1416ine:!0,controls:!0,className:"w-full",children:[jsxRuntimeExports.jsx("source",{src:"https://cdn.manualmagic.ai/welcome.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]})}),jsxRuntimeExports.jsx("div",{className:"text-center",children:jsxRuntimeExports.jsx(AsyncButton,{className:"font-headline text-2xl",buttonType:ButtonType.Secondary,text:"Get started",save:()=>Sdk.actionsClient.markComplete(UserActionRequired.WELCOME),onSuccess:()=>{ms(removeItem(dn,UserActionRequired.WELCOME)),ds("/")}})})]})})]})})}const MenuContext=reactExports.createContext({}),useMenuContext=()=>reactExports.useContext(MenuContext);function MenuProvider({children:ds}){const[dn,ms]=reactExports.useState(!1);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(MenuContext.Provider,{value:{showMenu:dn,setShowMenu:ms},children:ds})})}function validate$1(ds){const dn={};return(!ds.password||ds.password==="")&&(dn.password="Password is required"),(ds.password&&ds.password.length<8||!/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/.test(ds.password))&&(dn.password="8 characters, 1 number & 1 uppercase"),ds.password!==ds.confirm&&(dn.confirm="Passwords must match"),dn}function SetPassword(){const{setRouting:ds,actionsRequired:dn,setActionsRequired:ms}=useAccountContext(),xs=useNavigate(),[bs,Es]=reactExports.useState(""),[ws,Rs]=reactExports.useState(""),[js,Cs]=reactExports.useState({});return jsxRuntimeExports.jsx("div",{className:"grid grid-cols-12",children:jsxRuntimeExports.jsx("div",{className:"col-span-12 md:col-span-10 md:col-start-2 lg:col-span-8 lg:col-start-3 xl:col-span-6 xl:col-start-4",children:jsxRuntimeExports.jsxs("div",{className:"shadow-xl rounded-xl p-6 mt-10 mb-10",children:[jsxRuntimeExports.jsx("div",{className:"mb-10",children:"Choose a Password"}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx(FormPassword,{label:"Password",name:"password",placeholder:"Password",className:"mb-4",onChange:As=>Es(As.currentTarget.value),value:bs,autoComplete:"new-password"}),js.password&&jsxRuntimeExports.jsx("p",{className:"text-primary mb-2",children:js.password}),jsxRuntimeExports.jsx(FormPassword,{label:"Confirm",name:"confirm",placeholder:"Confirm",className:"mb-4",onChange:As=>Rs(As.currentTarget.value),value:ws,autoComplete:"new-password"}),js.confirm&&jsxRuntimeExports.jsx("p",{className:"text-primary mb-2",children:js.confirm}),jsxRuntimeExports.jsx(AsyncButton,{text:"Set password",className:"ml-auto",validate:()=>validate$1({password:bs,confirm:ws}),save:()=>Sdk.userClient.setPassword(bs),onSuccess:async()=>{await Sdk.actionsClient.markComplete(UserActionRequired.SET_PASSWORD),ms(removeItem(dn,UserActionRequired.SET_PASSWORD)),ds(AppRouting.App),xs("/")},onFailure:As=>Cs(As)})]})]})})})}function SignUpRedirect({path:ds}){const dn=useLocation();return jsxRuntimeExports.jsx(Navigate,{to:`${ds}${dn.search}`,replace:!0})}var propTypes={exports:{}},ReactPropTypesSecret_1,hasRequiredReactPropTypesSecret;function requireReactPropTypesSecret(){if(hasRequiredReactPropTypesSecret)return ReactPropTypesSecret_1;hasRequiredReactPropTypesSecret=1;var ds="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ReactPropTypesSecret_1=ds,ReactPropTypesSecret_1}var factoryWithThrowingShims,hasRequiredFactoryWithThrowingShims;function requireFactoryWithThrowingShims(){if(hasRequiredFactoryWithThrowingShims)return factoryWithThrowingShims;hasRequiredFactoryWithThrowingShims=1;var ds=requireReactPropTypesSecret();function dn(){}function ms(){}return ms.resetWarningCache=dn,factoryWithThrowingShims=function(){function xs(ws,Rs,js,Cs,As,ks){if(ks!==ds){var Os=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 Os.name="Invariant Violation",Os}}xs.isRequired=xs;function bs(){return xs}var Es={array:xs,bigint:xs,bool:xs,func:xs,number:xs,object:xs,string:xs,symbol:xs,any:xs,arrayOf:bs,element:xs,elementType:xs,instanceOf:bs,node:xs,objectOf:bs,oneOf:bs,oneOfType:bs,shape:bs,exact:bs,checkPropTypes:m
1416s,resetWarningCache:dn};return Es.PropTypes=Es,Es},factoryWithThrowingShims}var hasRequiredPropTypes;function requirePropTypes(){return hasRequiredPropTypes||(hasRequiredPropTypes=1,propTypes.exports=requireFactoryWithThrowingShims()()),propTypes.exports}var propTypesExports=requirePropTypes();const PropTypes=getDefaultExportFromCjs(propTypesExports);function ownKeys(ds,dn){var ms=Object.keys(ds);if(Object.getOwnPropertySymbols){var xs=Object.getOwnPropertySymbols(ds);dn&&(xs=xs.filter(function(bs){return Object.getOwnPropertyDescriptor(ds,bs).enumerable})),ms.push.apply(ms,xs)}return ms}function _objectSpread2(ds){for(var dn=1;dn<arguments.length;dn++){var ms=arguments[dn]!=null?arguments[dn]:{};dn%2?ownKeys(Object(ms),!0).forEach(function(xs){_defineProperty(ds,xs,ms[xs])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ds,Object.getOwnPropertyDescriptors(ms)):ownKeys(Object(ms)).forEach(function(xs){Object.defineProperty(ds,xs,Object.getOwnPropertyDescriptor(ms,xs))})}return ds}function _typeof$1(ds){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(dn){return typeof dn}:_typeof$1=function(dn){return dn&&typeof Symbol=="function"&&dn.constructor===Symbol&&dn!==Symbol.prototype?"symbol":typeof dn},_typeof$1(ds)}function _defineProperty(ds,dn,ms){return dn in ds?Object.defineProperty(ds,dn,{value:ms,enumerable:!0,configurable:!0,writable:!0}):ds[dn]=ms,ds}function _objectWithoutPropertiesLoose(ds,dn){if(ds==null)return{};var ms={},xs=Object.keys(ds),bs,Es;for(Es=0;Es<xs.length;Es++)bs=xs[Es],!(dn.indexOf(bs)>=0)&&(ms[bs]=ds[bs]);return ms}function _objectWithoutProperties(ds,dn){if(ds==null)return{};var ms=_objectWithoutPropertiesLoose(ds,dn),xs,bs;if(Object.getOwnPropertySymbols){var Es=Object.getOwnPropertySymbols(ds);for(bs=0;bs<Es.length;bs++)xs=Es[bs],!(dn.indexOf(xs)>=0)&&Object.prototype.propertyIsEnumerable.call(ds,xs)&&(ms[xs]=ds[xs])}return ms}function _slicedToArray(ds,dn){return _arrayWithHoles(ds)||_iterableToArrayLimit(ds,dn)||_unsupportedIterableToArray(ds,dn)||_nonIterableRest()}function _arrayWithHoles(ds){if(Array.isArray(ds))return ds}function _iterableToArrayLimit(ds,dn){var ms=ds&&(typeof Symbol<"u"&&ds[Symbol.iterator]||ds["@@iterator"]);if(ms!=null){var xs=[],bs=!0,Es=!1,ws,Rs;try{for(ms=ms.call(ds);!(bs=(ws=ms.next()).done)&&(xs.push(ws.value),!(dn&&xs.length===dn));bs=!0);}catch(js){Es=!0,Rs=js}finally{try{!bs&&ms.return!=null&&ms.return()}finally{if(Es)throw Rs}}return xs}}function _unsupportedIterableToArray(ds,dn){if(ds){if(typeof ds=="string")return _arrayLikeToArray(ds,dn);var ms=Object.prototype.toString.call(ds).slice(8,-1);if(ms==="Object"&&ds.constructor&&(ms=ds.constructor.name),ms==="Map"||ms==="Set")return Array.from(ds);if(ms==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ms))return _arrayLikeToArray(ds,dn)}}function _arrayLikeToArray(ds,dn){(dn==null||dn>ds.length)&&(dn=ds.length);for(var ms=0,xs=new Array(dn);ms<dn;ms++)xs[ms]=ds[ms];return xs}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1417In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var useAttachEvent=function ds(dn,ms,xs){var bs=!!xs,Es=React.useRef(xs);React.useEffect(function(){Es.current=xs},[xs]),React.useEffect(function(){if(!bs||!dn)return function(){};var ws=function(){Es.current&&Es.current.apply(Es,arguments)};return dn.on(ms,ws),function(){dn.off(ms,ws)}},[bs,ms,dn,Es])},usePrevious$1=function ds(dn){var ms=React.useRef(dn);return React.useEffect(function(){ms.current=dn},[dn]),ms.current},isUnknownObject=function ds(dn){return dn!==null&&_typeof$1(dn)==="object"},isPromise=function ds(dn){return isUnknownObject(dn)&&typeof dn.then=="function"},isStripe=function ds(dn){return isUnknownObject(dn)&&typeof dn.elements=="function"&&typeof dn.createToken=="function"&&typeof dn.createPaymentMethod=="function"&&typeof dn.confirmCardPayment=="function"},PLAIN_OBJECT_STR="[object Object]",isEqual=function ds(dn,ms){if(!isUnknownObject(dn)||!isUnknownObject(ms))return dn===ms;var xs=Array.isArray(dn),bs=Array.isArray(ms);if(xs!==bs)return!1;var Es=Object.prototype.toString.call(dn)===PLAIN_OBJECT_STR,ws=Object.prototype.toString.call(ms)===PLAIN_OBJECT_STR;if(Es!==ws)return!1;if(!Es&&!xs)return dn===ms;var Rs=Object.keys(dn),js=Object.keys(ms);if(Rs.length!==js.length)return!1;for(var Cs={},As=0;As<Rs.length;As+=1)Cs[Rs[As]]=!0;for(var ks=0;ks<js.length;ks+=1)Cs[js[ks]]=!0;var Os=Object.keys(Cs);if(Os.length!==Rs.length)return!1;var Ms=dn,Ds=ms,Ps=function(Bs){return ds(Ms[Bs],Ds[Bs])};return Os.every(Ps)},extractAllowedOptionsUpdates=function ds(dn,ms,xs){return isUnknownObject(dn)?Object.keys(dn).reduce(function(bs,Es){var ws=!isUnknownObject(ms)||!isEqual(dn[Es],ms[Es]);return xs.includes(Es)?(ws&&console.warn("Unsupported prop change: options.".concat(Es," is not a mutable property.")),bs):ws?_objectSpread2
1417(_objectSpread2({},bs||{}),{},_defineProperty({},Es,dn[Es])):bs},null):null},INVALID_STRIPE_ERROR$1="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",validateStripe=function ds(dn){var ms=arguments.length>1&&arguments[1]!==void 0?arguments[1]:INVALID_STRIPE_ERROR$1;if(dn===null||isStripe(dn))return dn;throw new Error(ms)},parseStripeProp=function ds(dn){var ms=arguments.length>1&&arguments[1]!==void 0?arguments[1]:INVALID_STRIPE_ERROR$1;if(isPromise(dn))return{tag:"async",stripePromise:Promise.resolve(dn).then(function(bs){return validateStripe(bs,ms)})};var xs=validateStripe(dn,ms);return xs===null?{tag:"empty"}:{tag:"sync",stripe:xs}},registerWithStripeJs=function ds(dn){!dn||!dn._registerWrapper||!dn.registerAppInfo||(dn._registerWrapper({name:"react-stripe-js",version:"5.6.1"}),dn.registerAppInfo({name:"react-stripe-js",version:"5.6.1",url:"https://stripe.com/docs/stripe-js/react"}))},ElementsContext=React.createContext(null);ElementsContext.displayName="ElementsContext";var parseElementsContext=function ds(dn,ms){if(!dn)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(ms," in an <Elements> provider."));return dn},Elements=function ds(dn){var ms=dn.stripe,xs=dn.options,bs=dn.children,Es=React.useMemo(function(){return parseStripeProp(ms)},[ms]),ws=React.useState(function(){return{stripe:Es.tag==="sync"?Es.stripe:null,elements:Es.tag==="sync"?Es.stripe.elements(xs):null}}),Rs=_slicedToArray(ws,2),js=Rs[0],Cs=Rs[1];React.useEffect(function(){var Os=!0,Ms=function(Ps){Cs(function(Ls){return Ls.stripe?Ls:{stripe:Ps,elements:Ps.elements(xs)}})};return Es.tag==="async"&&!js.stripe?Es.stripePromise.then(function(Ds){Ds&&Os&&Ms(Ds)}):Es.tag==="sync"&&!js.stripe&&Ms(Es.stripe),function(){Os=!1}},[Es,js,xs]);var As=usePrevious$1(ms);React.useEffect(function(){As!==null&&As!==ms&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[As,ms]);var ks=usePrevious$1(xs);return React.useEffect(function(){if(js.elements){var Os=extractAllowedOptionsUpdates(xs,ks,["clientSecret","fonts"]);Os&&js.elements.update(Os)}},[xs,ks,js.elements]),React.useEffect(function(){registerWithStripeJs(js.stripe)},[js.stripe]),React.createElement(ElementsContext.Provider,{value:js},bs)};Elements.propTypes={stripe:PropTypes.any,options:PropTypes.object};var useElementsContextWithUseCase=function ds(dn){var ms=React.useContext(ElementsContext);return parseElementsContext(ms,dn)},useElements=function ds(){var dn=useElementsContextWithUseCase("calls useElements()"),ms=dn.elements;return ms};PropTypes.func.isRequired;var CheckoutContext=React.createContext(null);CheckoutContext.displayName="CheckoutContext";PropTypes.any,PropTypes.shape({clientSecret:PropTypes.oneOfType([PropTypes.string,PropTypes.instanceOf(Promise)]).isRequired,elementsOptions:PropTypes.object}).isRequired;var useElementsOrCheckoutContextWithUseCase=function ds(dn){var ms=React.useContext(CheckoutContext),xs=React.useContext(ElementsContext);if(ms){if(xs)throw new Error("You cannot wrap the part of your app that ".concat(dn," in both <CheckoutProvider> and <Elements> providers."));return ms}else return parseElementsContext(xs,dn)},_excluded=["mode"],capitalized=function ds(dn){return dn.charAt(0).toUpperCase()+dn.slice(1)},createElementComponent=function ds(dn,ms){var xs="".concat(capitalized(dn),"Element"),bs=function(js){var Cs=js.id,As=js.className,ks=js.options,Os=ks===void 0?{}:ks,Ms=js.onBlur,Ds=js.onFocus,Ps=js.onReady,Ls=js.onChange,Bs=js.onEscape,Fs=js.onClick,Us=js.onLoadError,Gs=js.onLoaderStart,Js=js.onNetworksChange,Ws=js.onConfirm,Zs=js.onCancel,Ys=js.onShippingAddressChange,Qs=js.onShippingRateChange,ai=js.onSavedPaymentMethodRemove,ia=js.onSavedPaymentMethodUpdate,ca=useElementsOrCheckoutContextWithUseCase("mounts <".concat(xs,">")),ha="elements"in ca?ca.elements:null,ea="checkoutState"in ca?ca.checkoutState:null,ta=ea?.type==="success"||ea?.type==="loading"?ea.sdk:null,aa=React.useState(null),fa=_slicedToArray(aa,2),ua=fa[0],Ea=fa[1],ra=React.useRef(null),Ia=React.useRef(null);useAttachEvent(ua,"blur",Ms),useAttachEvent(ua,"focus",Ds),useAttachEvent(ua,"escape",Bs),useAttachEvent(ua,"click",Fs),useAttachEvent(ua,"loaderror",Us),useAttachEvent(ua,"loaderstart",Gs),useAttachEvent(ua,"networksch
1417ange",Js),useAttachEvent(ua,"confirm",Ws),useAttachEvent(ua,"cancel",Zs),useAttachEvent(ua,"shippingaddresschange",Ys),useAttachEvent(ua,"shippingratechange",Qs),useAttachEvent(ua,"savedpaymentmethodremove",ai),useAttachEvent(ua,"savedpaymentmethodupdate",ia),useAttachEvent(ua,"change",Ls);var $a;Ps&&(dn==="expressCheckout"?$a=Ps:$a=function(){Ps(ua)}),useAttachEvent(ua,"ready",$a),React.useLayoutEffect(function(){if(ra.current===null&&Ia.current!==null&&(ha||ta)){var sa=null;if(ta)switch(dn){case"paymentForm":sa=ta.createPaymentFormElement(Os);break;case"payment":sa=ta.createPaymentElement(Os);break;case"address":if("mode"in Os){var Ra=Os.mode,_a=_objectWithoutProperties(Os,_excluded);if(Ra==="shipping")sa=ta.createShippingAddressElement(_a);else if(Ra==="billing")sa=ta.createBillingAddressElement(_a);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":sa=ta.createExpressCheckoutElement(Os);break;case"currencySelector":sa=ta.createCurrencySelectorElement();break;case"taxId":sa=ta.createTaxIdElement(Os);break;default:throw new Error("Invalid Element type ".concat(xs,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else ha&&(sa=ha.create(dn,Os));ra.current=sa,Ea(sa),sa&&sa.mount(Ia.current)}},[ha,ta,Os]);var oa=usePrevious$1(Os);return React.useEffect(function(){if(ra.current){var sa=extractAllowedOptionsUpdates(Os,oa,["paymentRequest"]);sa&&"update"in ra.current&&ra.current.update(sa)}},[Os,oa]),React.useLayoutEffect(function(){return function(){if(ra.current&&typeof ra.current.destroy=="function")try{ra.current.destroy(),ra.current=null}catch{}}},[]),React.createElement("div",{id:Cs,className:As,ref:Ia})},Es=function(js){useElementsOrCheckoutContextWithUseCase("mounts <".concat(xs,">"));var Cs=js.id,As=js.className;return React.createElement("div",{id:Cs,className:As})},ws=ms?Es:bs;return ws.propTypes={id:PropTypes.string,className:PropTypes.string,onChange:PropTypes.func,onBlur:PropTypes.func,onFocus:PropTypes.func,onReady:PropTypes.func,onEscape:PropTypes.func,onClick:PropTypes.func,onLoadError:PropTypes.func,onLoaderStart:PropTypes.func,onNetworksChange:PropTypes.func,onConfirm:PropTypes.func,onCancel:PropTypes.func,onShippingAddressChange:PropTypes.func,onShippingRateChange:PropTypes.func,onSavedPaymentMethodRemove:PropTypes.func,onSavedPaymentMethodUpdate:PropTypes.func,options:PropTypes.object},ws.displayName=xs,ws.__elementType=dn,ws},isServer=typeof window>"u",EmbeddedCheckoutContext=React.createContext(null);EmbeddedCheckoutContext.displayName="EmbeddedCheckoutProviderContext";var useStripe=function ds(){var dn=useElementsOrCheckoutContextWithUseCase("calls useStripe()"),ms=dn.stripe;return ms};createElementComponent("auBankAccount",isServer);createElementComponent("card",isServer);createElementComponent("cardNumber",isServer);createElementComponent("cardExpiry",isServer);createElementComponent("cardCvc",isServer);createElementComponent("iban",isServer);var PaymentElement=createElementComponent("payment",isServer);createElementComponent("expressCheckout",isServer);createElementComponent("paymentRequestButton",isServer);createElementComponent("linkAuthentication",isServer);createElementComponent("address",isServer);createElementComponent("shippingAddress",isServer);createElementComponent("paymentMethodMessaging",isServer);createElementComponent("taxId",isServer);const SEAT_LIMITS$1={admin:{min:1,max:50},reader:{min:0,max:200}},OrderSummary=ds=>{const{adminSeats:dn,readerSeats:ms,currency:xs,code:bs,onSelectCurrency:Es,trialDays:ws,pricing:Rs,isLoading:js=!1,onAdminSeatsChange:Cs,onReaderSeatsChange:As,onCodeChange:ks}=ds,[Os,Ms]=reactExports.useState(bs),Ds=usePriceFormatter(xs),Ps=Bs=>{const Fs=parseInt(Bs.target.value,10);!isNaN(Fs)&&Fs>=SEAT_LIMITS$1.admin.min&&Fs<=SEAT_LIMITS$1.admin.max&&Cs(Fs)},Ls=Bs=>{const Fs=parseInt(Bs.target.value,10);!isNaN(Fs)&&Fs>
1417=SEAT_LIMITS$1.reader.min&&Fs<=SEAT_LIMITS$1.reader.max&&As(Fs)};return jsxRuntimeExports.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 flex flex-col h-full",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-row justify-between",children:jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Order Summary"})}),jsxRuntimeExports.jsxs("div",{className:"space-y-4 flex-1 flex flex-col",children:[jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-3",children:[jsxRuntimeExports.jsxs("div",{className:"col-span-1",children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Leader (Admin) Seats"}),jsxRuntimeExports.jsx("input",{type:"number",min:SEAT_LIMITS$1.admin.min,max:SEAT_LIMITS$1.admin.max,step:"1",value:dn,onChange:Ps,className:"w-24 px-4 py-1 border border-gray-300 rounded-md focus:ring-primary focus:border-primary"})]}),jsxRuntimeExports.jsxs("div",{className:"col-span-1",children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Team Member Seats"}),jsxRuntimeExports.jsx("input",{type:"number",min:SEAT_LIMITS$1.reader.min,max:SEAT_LIMITS$1.reader.max,step:"1",value:ms,onChange:Ls,className:"w-24 px-4 py-1 border border-gray-300 rounded-md focus:ring-primary focus:border-primary"})]}),jsxRuntimeExports.jsxs("div",{className:"col-span-1  ml-auto",children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Currency"}),jsxRuntimeExports.jsx(CurrencySelector,{value:xs,onValue:Bs=>Es(Bs),className:"mt-0 max-w-24"})]})]}),jsxRuntimeExports.jsxs("div",{className:"col-span-3 flex flex-row mt-4 mb-10",children:[jsxRuntimeExports.jsx("input",{className:"px-2 text-sm text-gray-600 font-bold border border-gray-300 rounded-md focus:ring-primary focus:border-primary",name:"code",placeholder:"Promo code",defaultValue:bs,onChange:Bs=>Ms(Bs.target.value)}),jsxRuntimeExports.jsx(Button,{id:"apply",buttonType:ButtonType.Secondary,className:"ml-auto",text:"Apply code",onClick:()=>ks(Os)})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col flex-1",children:[js&&jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center py-8",children:jsxRuntimeExports.jsx(Loading,{})}),Rs&&!js&&jsxRuntimeExports.jsxs("div",{className:"space-y-2 flex flex-col flex-1",children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm mt-auto",children:[jsxRuntimeExports.jsxs("span",{className:"text-gray-600",children:["Leader seats: ",dn," × ",Ds(Rs.adminPricePerSeat)]}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:Ds(Rs.adminPricePerSeat*dn)})]}),ms>0&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm mt-4 mb-8",children:[jsxRuntimeExports.jsxs("span",{className:"text-gray-600",children:["Team Member Seats: ",ms," × ",Ds(Rs.readerPricePerSeat)]}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:Ds(Rs.readerPricePerSeat*ms)})]}),ws===void 0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Rs.currency==="gbp"&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm pt-2 mt-auto border-t border-gray-200",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-600",children:"Subtotal"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:Ds(Rs.subtotal)})]}),Rs.discount!==void 0&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-600",children:"Discount"}),jsxRuntimeExports.jsxs("span",{className:"font-medium",children:["(",Ds(Rs.discount),")"]})]}),Rs.currency==="gbp"&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between text-sm",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-600",children:"VAT"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:Ds(Rs.tax)})]}),jsxRuntimeExports.jsxs("div",{className:"text-primary flex justify-between text-xl font-bold pt-2 border-t border-gray-200",children:[jsxRuntimeExports.jsx("span",{children:"Total"}),jsxRuntimeExports.jsx("span",{children:Ds(Rs.total)})]})]}),ws&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"text-gray-600 flex justify-between text-xl font-bold pt-2 border-t border-gray-200",children:[jsxRuntimeExports.jsx("span",{children:"Total after trial"}),jsxRuntimeExports.jsx("span",{children:Ds(Rs.total)})]}),jsxRuntimeExports.jsx("div",{className:"text-primary flex justify-center text-xl font-bold pt-2 border-t border-gray-200",children:jsxRuntimeExports.jsxs("span",{children:[ws," DAY FREE TRIAL"]})})]})]})]})]})]})};function _typeof(ds){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(dn){return typeof dn}:_typeof=function(dn){return dn&&typeof Symbol=="function"&&dn.constructor===Symbol&&dn!==Symbol.prototype?"symbol":typeof dn},_typeof(ds)}var RELEASE_TRAIN="clover",runtimeVersionToUrlVersion=function ds(dn){return dn===3?"v3":dn},ORIGIN="https://js.stripe.com",STRIPE_JS_URL="".concat(ORIGIN,"/").concat(RELEASE_TRAIN,"/stripe.js"),V3_URL_REGEX=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,STRIPE_JS_URL_REGEX=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,EXISTING_SCRIPT_MESSAGE="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",isStripeJSURL=function ds(dn){return V3_URL_REGEX.test(dn)||STRIPE_JS_URL_REGEX.test(dn)},findScript=function ds(){for(var dn=document.querySelectorAll('script[src^="'.concat(ORIGIN,'"]')),ms=0;ms<dn.length;ms++){var xs=dn[ms];if(isStripeJSURL(xs.src))return xs}return null},injectScript=function ds(dn){var ms="",xs=document.createElement("script");xs.src="".concat(STRIPE_JS_URL).concat(ms);var bs=document.head||document.body;if(!bs)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return bs.appendChild(xs),xs},registerWrapper=function ds(dn,ms){!dn||!dn._registerWrapper||dn._registerWrapper({name:"stripe-js",version:"8.11.0",startTime:ms})},stripePromise$1=null,onErrorListener=null,onLoadListener=null,onError=function ds(dn){return function(ms){dn(new Error("Failed to load Stripe.js",{cause:ms}))}},onLoad=function ds(dn,ms){return function(){window.Stripe?dn(window.Stripe):ms(new Error("Stripe.js not available"))}},loadScript=function ds(dn){return stripePromise$1!==null?stripePromise$1:(stripePromise$1=new Promise(function(ms,xs){if(typeof window>"u"||typeof document>"u"){ms(null);return}if(window.Stripe){ms(window.Stripe);return}try{var bs=findScript();if(!(bs&&dn)){if(!bs)bs=injectScript(dn);else if(bs&&onLoadListener!==null&&onErrorListener!==null){var Es;bs.removeEventListener("load",onLoadListener),bs.removeEventListener("error",onErrorListener),(Es=bs.parentNode)===null||Es===void 0||Es.removeChild(bs),bs=injectScript(dn)}}onLoadListener=onLoad(ms,xs),onErrorListener=onError(xs),bs.addEventListener("load",onLoadListener),bs.addEventListener("error",onErrorListener)}catch(ws){xs(ws);return}}),stripePromise$1.catch(function(ms){return stripePromise$1=null,Promise.reject(ms)}))},initStripe=function ds(dn,ms,xs){if(dn===null)return null;var bs=ms[0];if(typeof bs!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(_typeof(bs)," instead."));var Es=bs.match(/^pk_test/),ws=runtimeVersionToUrlVersion(dn.version),Rs=RELEASE_TRAIN;Es&&ws!==Rs&&console.warn("Stripe.js@".concat(ws," was loaded on the page, but @stripe/stripe-js@").concat("8.11.0"," expected Stripe.js@").concat(Rs,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var js=dn.apply(void 0,ms);return registerWrapper(js,xs),js}
1417,stripePromise$2,loadCalled=!1,getStripePromise=function ds(){return stripePromise$2||(stripePromise$2=loadScript(null).catch(function(dn){return stripePromise$2=null,Promise.reject(dn)}),stripePromise$2)};Promise.resolve().then(function(){return getStripePromise()}).catch(function(ds){loadCalled||console.warn(ds)});var loadStripe=function ds(){for(var dn=arguments.length,ms=new Array(dn),xs=0;xs<dn;xs++)ms[xs]=arguments[xs];loadCalled=!0;var bs=Date.now();return getStripePromise().then(function(Es){return initStripe(Es,ms,bs)})};const CheckoutForm=ds=>{const{adminSeats:dn,readerSeats:ms,billingPeriod:xs,currency:bs,couponCode:Es}=ds,ws=useStripe(),Rs=useElements(),js=async()=>{if(!ws||!Rs)throw new Error("Stripe not loaded. Please refresh the page and try again.");const{error:As}=await Rs.submit();if(As)throw new Error(As.message||"Payment validation failed");const{error:ks,paymentMethod:Os}=await ws.createPaymentMethod({elements:Rs});if(ks)throw new Error(ks.message||"Failed to create payment method");const Ms=await fetchIP(),Ds=await Sdk.customerClient.createSubscription({adminSeats:dn,readerSeats:ms,currency:bs,billingPeriod:xs,paymentMethodId:Os.id,ip:Ms,couponCode:Es}),Ps=Ds.data;if(Ps.clientSecret&&Ps.clientSecret!=="")if(Ps.clientSecret.startsWith("seti_")){const{error:Ls}=await ws.confirmSetup({clientSecret:Ps.clientSecret,confirmParams:{return_url:window.location.origin,payment_method:Os.id},redirect:"if_required"});if(Ls)throw new Error(Ls.message||"Payment confirmation failed")}else{const{error:Ls}=await ws.confirmPayment({clientSecret:Ps.clientSecret,confirmParams:{return_url:window.location.origin,payment_method:Os.id},redirect:"if_required"});if(Ls)throw new Error(Ls.message||"Payment confirmation failed")}return await Sdk.actionsClient.markComplete(UserActionRequired.CHECKOUT),clearCheckoutData(),window.location.href="/",Ds},Cs={layout:"tabs"};return jsxRuntimeExports.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 flex flex-col h-full",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold ",children:"Payment Details"}),jsxRuntimeExports.jsx(PaymentElement,{options:Cs}),jsxRuntimeExports.jsx("div",{className:"flex justify-end pt-6 mt-auto",children:jsxRuntimeExports.jsx(AsyncButton,{text:"Complete Purchase",save:js,onFailure:As=>{console.error(As)}})})]})},stripePromise=loadStripe(Sdk.config.stripePk),stripeAppearance={theme:"flat",variables:{colorPrimary:"#f5842c",colorBackground:"#ffffff",colorText:"#042549",borderRadius:"5px"},rules:{".Input":{padding:"12px 10px",border:"1px solid #d0d5dd",borderRadius:"4px",boxShadow:"none",backgroundColor:"#fff"}}};function matches(ds,dn){if(ds){for(const ms of ds)if(ms!==null&&ms.contains(dn))return!0}return!1}function useOutsideSelect(ds,dn,ms){reactExports.useEffect(()=>{const xs=[];function bs(Es){const ws=Es.target;ds.current&&!ds.current.contains(ws)&&!matches(xs,ws)&&dn()}return document.addEventListener("mousedown",bs),()=>{document.removeEventListener("mousedown",bs)}},[ds,dn,ms])}function animateCopy(ds){const dn=ds.currentTarget.style;dn&&(dn.height="20px",setTimeout(()=>{dn.height="23px"},100))}function useQuery(){const{search:ds}=useLocation();return reactExports.useMemo(()=>new URLSearchParams(ds),[ds])}function Checkout(){const ds=useLocation(),dn=useQuery(),xs=ds.state||getCheckoutData()||{},{account:bs}=useAccountContext(),[Es,ws]=reactExports.useState(dn.get("c")),[Rs,js]=reactExports.useState(bs?.selectedAdminSeats||xs.adminSeats||1),[Cs,As]=reactExports.useState(bs?.selectedReaderSeats||xs.readerSeats||0),[ks,Os]=reactExports.useState(bs?.selectedBillingPeriod||xs.billingPeriod||BillingPeriod.MONTHLY),[Ms,Ds]=reactExports.useState(xs.currency||bs?.currency||"gbp"),[Ps,Ls]=reactExports.useState(void 0),[Bs,Fs]=reactExports.useState(PageState.NotReady),[Us,Gs]=reactExports.useState(void 0),{save:Js}=useNetworkDebounce(async Ws=>{try{const Zs=await Sdk.customerClient.updatePaymentIntent(Ws);return Zs.status===200&&Zs.data?(Ls(Zs.data),Gs(Zs.data.paymentIntentId),Fs(PageState.Ready)):Fs(PageState.Error),Zs}catch(Zs){throw Fs(PageState.Error),Zs}},{skipDoneState:!0});return reactExports.useEffect(()=>{Us&&(Fs(PageState.Loading),Js({paymentIntentId:Us,adminSeats:Rs,readerSeats:Cs,billingPeriod:ks,currency:Ms,coupon:Es}))},[Rs,Cs,ks,Ms,Us,Es]),reactExports.useEffect(()=>{(async()=>{const Zs=await Sdk.customerClient.mySubscription();if(Zs.status===200&&Zs.data?.status==="active"){clearCheckoutData(),await Sdk.actionsClient.markComplete(UserActionRequired.CHECKOUT),window.location.href="/";return}try{const Ys=await fetchIP(),Qs=await Sdk.customerClient.createPaymentIntent({adminSeats:Rs,readerSeats:Cs,billingPeriod:ks,currency:Ms,ip:Ys,coupon:Es});Ls(Qs.data),Gs(Qs.data.paymentIntentId),Fs(PageState.Ready)}catch{Fs(PageState.Error)}})()},[]),Bs===PageState.NotReady?jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-gray-50 py-12 flex items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600",children:"Checking subscription status..."})]})}):Bs===PageState.Error?jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-gray-50 py-12 flex items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-gray-800 text-lg",children:"Error loading checkout. Please try again."}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,className:"mt-2",text:"Reload",onClick:()=>window.location.reload()})]})}):jsxRuntimeExports.jsx(Elements,{stripe:stripePromise,options:{appearance:stripeAppearance,clientSecret:Ps?.clientSecret,paymentMethodCreation:"manual"},children:jsxRuntimeExports.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl font-bold mb-8 text-center",children:"Complete Your Purchase"}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-6xl mx-auto",children:[jsxRuntimeExports.jsx(OrderSummary,{adminSeats:Rs,readerSeats:Cs,currency:Ms,code:Es,onSelectCurrency:Ds,trialDays:Ps?.trialDays,pricing:Ps?.pricing,isLoading:Bs!==PageState.Ready,onAdminSeatsChange:js,onReaderSeatsChange:As,onBillingPeriodChange:Os,onCodeChange:ws}),jsxRuntimeExports.jsx(CheckoutForm,{adminSeats:Rs,readerSeats:Cs,billingPeriod:ks,currency:Ms,couponCode:Es})]})]})})})}const Menu="_Menu_1w4kp_1",styles$1={Menu},ThemeContext=reactExports.createContext(void 0),useTheme=()=>{const ds=reactExports.useContext(ThemeContext);if(ds===void 0)throw new Error("useTheme must be used within a ThemeProvider");return ds};function useAuth(){const{permissions:ds=[],roles:dn=[],isAdmin:ms,refreshPermissions:xs}=useAccountContext(),bs=Cs=>dn.includes(Cs),Es=Cs=>ds.includes(Cs),ws=Cs=>Cs.some(As=>dn.includes(As)),Rs=Cs=>Cs.some(As=>ds.includes(As));return{permissions:ds,roles:dn,isAdmin:ms,hasRole:bs,hasPermission:Es,hasAnyRole:ws,hasAnyPermission:Rs,hasAccess:(Cs=[],As=[])=>{const ks=Cs.length>0&&ws(Cs),Os=As.length>0&&Rs(As);return ks||Os},refreshPermissions:xs}}function OpsManual({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"84.218",viewBox:"0 0 100 84.218",...dn,children:jsxRuntimeExports.jsxs("g",{id:"Mask_Group_15","data-name":"Mask Group 15",children:[jsxRuntimeExports.jsx("path",{id:"Path_7","data-name":"Path 7",d:"M39.186,34.3H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(0.214 5.012)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_8","data-name":"Path 8",d:"M39.186,39.311H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(0.214 5.745)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_56","data-name":"Path 56",d:"M39.186,39.311H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(0.214 11.489)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_57","data-name":"Path 57",d:"M39.186,39.311H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(0.168 17.234)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_9","data-name":"Path 9",d:"M15.107,24.619h24.83V6.346H15.107Zm23.432-1.362H16.506V7.709H38.539Z",transform:"translate(0.254 6.672)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_10","data-name":"Path 10",d:"M96.5,5.343H94.276V0H5.723V5.343H3.495A3.562,3.562,0,0,0,0,8.963v66.7a3.563,3.563,0,0,0,3.495,3.621H42.1a2.636,2.636,0,0,1,2.081,1.024,7.6,7.6,0,0,0,5.944,2.908h.109a6.982,6.982,0,0,0,5.566-2.87,2.625,2.625,0,0,1,2.108-1.06H96.5A3.563,3.563,0,0,0,100,75.666V8.963A3.562,3.562,0,0,0,96.5,5.343M92.877,1.362v68.85H78.439V60.338a12.684,12.684,0,0,0,5.009-10.068,12.841,12.841,0,0,0-8.378-11.95V49.259l-4.8,4.015-4.8-4.015V38.321a12.839,12.839,0,0,0-8.378,11.95A12.689,12.689,0,0,0,62.1,60.343v9.868H50.736V1.362Zm-85.756,0H49.262v68.85H7.122Zm91.012,74.3a1.726,1.726,0,0,1-1.63,1.8h-38.6a4.509,4.509,0,0,0-3.624,1.82A5.054,5.054,0,0,1,50.206,81.4a5.712,5.712,0,0,1-4.542-2.193A4.5,4.5,0,0,0,42.1,77.47H3.495a1.726,1.726,0,0,1-1.63-1.8V8.963a1.726,1.726,0,0,1,1.63-1.8H5.723V71.574H94.276V7.159H96.5a1.726,1.726,0,0,1,1.63,1.8Z",transform:"translate(0 0)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_53","data-name":"Path 53",d:"M39.186,34.3H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(44.214 -21.281)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_54","data-name":"Path 54",d:"M39.186,39.311H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(44.214 -20.549)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_55","data-name":"Path 55",d:"M39.186,39.311H15.846a.681.681,0,1,0,0,1.362h23.34a.681.681,0,1,0,0-1.362",transform:"translate(44.214 -14.804)",fill:ds})]})})}function Upload({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"67.795",viewBox:"0 0 100 67.795",...dn,children:jsxRuntimeExports.jsxs("g",{id:"Group_17","data-name":"Group 17",transform:"translate(0 0)",children:[jsxRuntimeExports.jsx("path",{id:"Path_11","data-name":"Path 11",d:"M83.991,25.718C86.085,9.365,76.465,1.811,67.454.312,56.606-1.49,43.721,4.548,40.193,17.738c-7.152-4.882-14.383-3.561-18.544.085a11.448,11.448,0,0,0-2.626,14.192C12.812,30.652,7.311,32,3.7,35.829A13.41,13.41,0,0,0,1.1,50.308c1.943,4.18,6.175,6.578,11.612,6.578H28.321V55.17H12.709c-4.765,0-8.308-1.975-9.974-5.559a11.7,11.7,0,0,1,2.3-12.631c2.072-2.2,6.853-5.484,15.591-2.759a.915.915,0,0,0,.994-.3.827.827,0,0,0,.027-1c-3.845-5.451-2.161-10.877,1.215-13.835,3.811-3.34,10.647-4.388,17.33.8a.928.928,0,0,0,.868.141.871.871,0,0,0,.576-.637A22.321,22.321,0,0,1,67.147,2c8.377,1.392,17.318,8.6,14.947,24.339a.837.837,0,0,0,.181.652.906.906,0,0,0,.617.325c10.417,1,15.655,8.872,15.3,15.776C97.9,48.666,93.743,55.17,82.981,55.17H70.5v1.716H82.981c12.019,0,16.669-7.382,17-13.7.39-7.487-5.082-16-15.989-17.465",transform:"translate(0 0)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_12","data-name":"Path 12",d:"M70.228,44.267a.626.626,0,0,0-.19-.711L48.148,25.437a.7.7,0,0,0-.88,0L25.378,43.555a.626.626,0,0,0-.19.711.673.673,0,0,0,.631.419h8.035V65.279H61.561V44.686H69.6a.671.671,0,0,0,.63-.419",transform:"translate(2.503 2.516)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_13","data-name":"Path 13",d:"M29.86,12.08c.129.136.354-.049.237-.192L25.022,5.352c-.581-.708-1.659.166-1.029.83l5.867,5.9",transform:"translate(2.369 0.506)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_14","data-name":"Path 14",d:"M38.3,9.4s.184-2.718.343-5.11c.125-1.879.237-3.557.237-3.557A.672.672,0,1,0,37.535.724L37.98,9.4a.16.16,0,0,0,.318,0",transform:"translate(3.736 0.005)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_15","data-name":"Path 15",d:"M34.386,11.62c.071.166.34.063.279-.1L30.922.7c-.311-.836-1.6-.358-1.257.457l4.72,10.464",transform:"translate(2.947 0.026)",fill:ds})]})})}function Board({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"81.037",viewBox:"0 0 100 81.037",...dn,children:jsxRuntimeExports.jsxs("g",{id:"Group_29","data-name":"Group 29",children:[jsxRuntimeExports.jsx("path",{id:"Path_69","data-name":"Path 69",d:"M17.425,43.751a1.494,1.494,0,0,1-1.059-.438l-2.959-2.96
1417a1.5,1.5,0,0,1,2.116-2.116L17.49,40.2l5.111-4.5a1.5,1.5,0,1,1,1.977,2.246l-6.165,5.425a1.489,1.489,0,0,1-.989.374",transform:"translate(1.452 3.957)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_70","data-name":"Path 70",d:"M90.9,81.038H9.1a9.106,9.106,0,0,1-9.1-9.1V9.1A9.106,9.106,0,0,1,9.1,0H90.9A9.107,9.107,0,0,1,100,9.1V71.942a9.107,9.107,0,0,1-9.1,9.1M9.1,1.94A7.165,7.165,0,0,0,1.939,9.1V71.942A7.164,7.164,0,0,0,9.1,79.1H90.9a7.164,7.164,0,0,0,7.157-7.156V9.1A7.165,7.165,0,0,0,90.9,1.94Z",transform:"translate(0 0)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_71","data-name":"Path 71",d:"M48.554,67.02H42.808a9.106,9.106,0,0,1-9.1-9.1V25.418a9.106,9.106,0,0,1,9.1-9.1h5.746a9.107,9.107,0,0,1,9.1,9.1V57.924a9.107,9.107,0,0,1-9.1,9.1M42.808,18.261a7.165,7.165,0,0,0-7.157,7.157V57.924a7.165,7.165,0,0,0,7.157,7.157h5.746a7.166,7.166,0,0,0,7.158-7.157V25.418a7.166,7.166,0,0,0-7.158-7.157Z",transform:"translate(3.776 1.828)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_72","data-name":"Path 72",d:"M22.5,67.02H16.749a9.107,9.107,0,0,1-9.1-9.1V25.418a9.106,9.106,0,0,1,9.1-9.1H22.5a9.106,9.106,0,0,1,9.1,9.1V57.924a9.106,9.106,0,0,1-9.1,9.1M16.749,18.261a7.164,7.164,0,0,0-7.156,7.157V57.924a7.165,7.165,0,0,0,7.156,7.157H22.5a7.167,7.167,0,0,0,7.158-7.157V25.418A7.166,7.166,0,0,0,22.5,18.261Z",transform:"translate(0.857 1.828)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_73","data-name":"Path 73",d:"M74.613,16.322H68.867a9.107,9.107,0,0,0-9.1,9.1V57.924a9.107,9.107,0,0,0,9.1,9.1h5.746a9.107,9.107,0,0,0,9.1-9.1V25.418a9.107,9.107,0,0,0-9.1-9.1m2.678,36.3-6.165,5.425a1.5,1.5,0,0,1-2.047-.066L66.12,55.026a1.5,1.5,0,0,1,2.116-2.117L70.2,54.875l5.112-4.5a1.5,1.5,0,0,1,1.977,2.247m0-12.543-6.165,5.425a1.5,1.5,0,0,1-2.047-.066L66.12,42.483a1.5,1.5,0,0,1,2.116-2.117L70.2,42.333l5.112-4.5a1.5,1.5,0,0,1,1.977,2.247m0-12.543-6.165,5.425a1.495,1.495,0,0,1-2.047-.066L66.12,29.94a1.5,1.5,0,1,1,2.116-2.117L70.2,29.789l5.112-4.5a1.5,1.5,0,0,1,1.977,2.247",transform:"translate(6.694 1.828)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_74","data-name":"Path 74",d:"M43.484,36.257a1.494,1.494,0,0,1-1.059-.438l-2.959-2.96a1.5,1.5,0,0,1,2.116-2.116l1.967,1.966,5.111-4.5a1.5,1.5,0,1,1,1.977,2.246l-6.165,5.425a1.489,1.489,0,0,1-.989.374",transform:"translate(4.371 3.118)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_75","data-name":"Path 75",d:"M43.484,51.245a1.494,1.494,0,0,1-1.059-.438l-2.959-2.96a1.5,1.5,0,0,1,2.116-2.116L43.549,47.7l5.111-4.5a1.5,1.5,0,1,1,1.977,2.246l-6.165,5.425a1.489,1.489,0,0,1-.989.374",transform:"translate(4.371 4.796)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_76","data-name":"Path 76",d:"M55.389,11.046H8.623a.97.97,0,1,1,0-1.939H55.389a.97.97,0,0,1,0,1.939",transform:"translate(0.857 1.02)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_77","data-name":"Path 77",d:"M78.57,13.017H64.54a3.117,3.117,0,1,1,0-6.235H78.57a3.117,3.117,0,1,1,0,6.235",transform:"translate(6.879 0.759)",fill:ds})]})})}function Team({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"79.078",viewBox:"0 0 100 79.078",...dn,children:jsxRuntimeExports.jsx("g",{id:"Group_24","data-name":"Group 24",transform:"translate(0 0)",children:jsxRuntimeExports.jsx("path",{id:"Path_33","data-name":"Path 33",d:"M93.526,40.485c-1.448,1.236-5.989,4.591-9.47,7.135-.5-9.206-3.351-17.949-7.616-23.2a10.837,10.837,0,0,0,4.569-8.735c0-6.043-5.17-10.96-11.524-10.96a11.82,11.82,0,0,0-7.651,2.784,13.07,13.07,0,0,0-23.66,0,11.823,11.823,0,0,0-7.651-2.783C24.169,4.729,19,9.646,19,15.689a10.7,10.7,0,0,0,4.34,8.564A29.978,29.978,0,0,0,18.492,33.5a16.881,16.881,0,0,0-3.159,1.842L1.9,45.7A4.9,4.9,0,0,0,0,49.58V77.308a1.758,1.758,0,0,0,3.23.973,63.387,63.387,0,0,1,4.436-5.924h0c5.2-5,13.012-6.775,26.064-2.056,14.847,4.721,28.936,5.034,44.464-6.683.006,0,15.6-14.483,19.931-18.506s.47-8.505-4.6-4.627M25.65,24.765l.883-.943-1.106-.665a8.719,8.719,0,0,1-4.357-7.468c0-4.894,4.24-8.876,9.452-8.876A9.716,9.716,0,0,1,37.393,9.6c-.02.074-.033.149-.053.222-.03.118-.058.237-.084.354-.045.2-.084.4-.12.6-.021.119-.042.237-.06.356-.031.216-.055.433-.076.651-.01.1-.024.205-.031.309-.024.321-.038.644-.038.969s.013.633.035.947c.008.105.023.209.033.314.02.208.039.416.069.622.018.125.043.247.065.372.032.184.065.367.1.548.029.132.063.262.1.392.043.172.087.343.136.511.04.134.084.266.128.4.054.163.11.326.171.486.05.133.1.264.157.4.066.157.134.313.205.468.06.129.121.257.186.386.076.154.158.3.241.455.068.124.137.248.21.369.031.052.058.105.089.156A9.127,9.127,0,0,1,35.4,23.289l-1.143.65.895.966a22.277,22.277,0,0,1,3.2,4.656c-.132.286-.252.591-.379.884-.154.352-.309.7-.456,1.063-.159.4-.309.808-.462,1.217-.134.362-.272.719-.4,1.09-.03.087-.057.177-.085.263-5.766-1.853-10.9-2.663-15.512-1.474a25.068,25.068,0,0,1,4.594-7.839m14.529-3.112a12.925,12.925,0,0,0,1.839,1.74,27.516,27.516,0,0,0-2.551,3.939,24.756,24.756,0,0,0-1.99-2.906,11.144,11.144,0,0,0,2.7-2.773m19.99,30.981a8.643,8.643,0,0,1-5.823-.276l-20.1-6.573a.694.694,0,0,1,.427-1.321l20.092,6.571c8.25,3,11.018-5.552,2.987-8.494L38.512,34.8c.045-.133.084-.272.13-.4.03-.088.062-.175.094-.263.242-.683.494-1.353.76-2,.024-.06.051-.118.075-.178.278-.674.567-1.332.87-1.966a26.107,26.10
14177,0,0,1,3.871-6.1l.81-.917-1.03-.656A10.981,10.981,0,0,1,39,13.057c0-.316.016-.629.043-.941a10.752,10.752,0,0,1,.5-2.469,11,11,0,0,1,21.462,3.41q0,.416-.031.827A10.845,10.845,0,0,1,59.1,19.229l0,.008a11.1,11.1,0,0,1-3.442,3.237l-1.075.643.829.943a27.244,27.244,0,0,1,3.752,5.765v0l.107.218q.521,1.06,1,2.191a58.767,58.767,0,0,1,4.167,18.081c.066.867.111,1.747.142,2.632-.567-.134-1.142-.279-1.735-.447a4.246,4.246,0,0,0-2.664.129M62.3,24.26a23.326,23.326,0,0,0-2.1,3.113A29.116,29.116,0,0,0,57.717,23.6a13.254,13.254,0,0,0,2.112-1.949A11.179,11.179,0,0,0,62.3,24.26m4.345,29.119c-.029-1.083-.075-2.161-.155-3.217q-.106-1.413-.271-2.812c-.035-.3-.084-.593-.124-.891-.083-.631-.164-1.263-.264-1.886-.057-.358-.13-.708-.193-1.063-.1-.556-.194-1.115-.306-1.665-.08-.383-.173-.757-.259-1.136-.114-.51-.224-1.025-.35-1.527-.1-.389-.211-.768-.316-1.152-.13-.479-.256-.963-.4-1.433-.115-.383-.245-.753-.367-1.129-.148-.456-.29-.917-.447-1.362-.132-.369-.276-.724-.413-1.086-.164-.433-.324-.873-.5-1.294-.145-.353-.3-.688-.456-1.033-.162-.367-.316-.745-.486-1.1a21.077,21.077,0,0,1,3.265-4.818l.888-.943-1.109-.666a9.123,9.123,0,0,1-3.237-3.288c.032-.052.06-.107.091-.159.07-.119.136-.238.2-.358.085-.154.169-.309.247-.466.063-.125.124-.25.182-.377.073-.157.142-.316.208-.476.054-.129.106-.259.156-.389.061-.163.118-.327.172-.492.044-.132.088-.262.126-.394.051-.171.1-.343.139-.516.033-.129.067-.259.1-.389.04-.182.073-.366.1-.551.022-.124.047-.246.065-.371.03-.205.05-.414.07-.622.009-.105.024-.208.032-.313.022-.314.035-.629.035-.947s-.014-.648-.037-.969c-.008-.1-.022-.208-.032-.312-.021-.217-.044-.432-.076-.646-.017-.121-.039-.241-.06-.361-.036-.2-.075-.395-.119-.591-.027-.121-.055-.241-.085-.36-.02-.073-.033-.148-.053-.22a9.718,9.718,0,0,1,6.871-2.784c5.212,0,9.452,3.981,9.452,8.876a8.818,8.818,0,0,1-4.575,7.6l-1.146.649.9.969c3.8,4.114,7.627,13.1,7.93,24.183-1.384,1.005-2.314,1.677-2.314,1.677-3.645,2.7-7.784,3.507-13.08,2.613",transform:"translate(0 -0.001)",fill:ds})})})}function WizardHat({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"93.649",viewBox:"0 0 100 93.649",...dn,children:jsxRuntimeExports.jsxs("g",{id:"Group_20","data-name":"Group 20",transform:"translate(0 0)",children:[jsxRuntimeExports.jsx("path",{id:"Path_16","data-name":"Path 16",d:"M77.787,75.683C59.354,44.957,59.757,15.673,81.413,0,52.571,1.6,29.539,32.893,18.963,73.621c11.232,4.407,22.32,6.828,33.239,6.828a70.35,70.35,0,0,0,25.585-4.766M52.036,37.155a.628.628,0,0,0,.384-.285l1.906-3.177,1.929,3.177a.631.631,0,0,0,.384.285l3.542.874L57.825,40.89a.649.649,0,0,0-.147.461l.282,3.718-3.385-1.41a.619.619,0,0,0-.475,0l-3.367,1.424L51,41.351a.654.654,0,0,0-.146-.461l-2.363-2.839ZM51,69.891a.961.961,0,0,1-.965.119L44.017,67.5a.619.619,0,0,0-.475,0L37.523,70.01a.956.956,0,0,1-.964-.119,1.012,1.012,0,0,1-.41-.9l.47-6.635a.655.655,0,0,0-.146-.461l-4.191-5.086a1.02,1.02,0,0,1-.186-.976.988.988,0,0,1,.71-.677l6.31-1.594a.627.627,0,0,0,.384-.284l3.429-5.651a.987.987,0,0,1,1.7,0l3.431,5.651a.624.624,0,0,0,.383.284l6.31,1.594a.99.99,0,0,1,.711.677,1.021,1.021,0,0,1-.187.976l-4.189,5.086a.656.656,0,0,0-.147.461l.47,6.635a1.014,1.014,0,0,1-.409.9",transform:"translate(2.015 0)",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_17","data-name":"Path 17",d:"M73.462,51.375a103.61,103.61,0,0,0,8.485,17.5,2.636,2.636,0,0,1,.237,2.182,2.55,2.55,0,0,1-1.495,1.576,73.169,73.169,0,0,1-26.472,4.932c-10.818,0-22.3-2.355-34.139-7A2.592,2.592,0,0,1,18.545,67.5q2.078-7.995,4.739-15.4C8.663,55.672,0,61.793,0,68.654c0,5.334,5.281,10.292,14.869,13.961,9.394,3.6,21.87,5.574,35.131,5.574s25.737-1.979,35.13-5.574C94.719,78.945,100,73.988,100,68.654c0-7.385-10.1-13.91-26.538-17.279",transform:"translate(0 5.46)",fill:ds})]})})}function Settings({colour:ds="#fff",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"100",viewBox:"0 0 100 100",...dn,children:jsxRuntimeExports.jsx("path",{id:"Path_68","data-name":"Path 68",d:"M111.628,151.678h-8.471a41.091,41.091,0,0,0-5.235-12.625l6-6a.992.992,0,0,0,0-1.4L92.035,119.771a.993.993,0,0,0-1.4,0l-5.986,5.995a41.073,41.073,0,0,0-12.635-5.244v-8.461a.993.993,0,0,0-.993-.994H54.225a.993.993,0,0,0-.993.994v8.461A41.209,41.209,0,0,0,40.6,125.766l-5.986-5.995a.992.992,0,0,0-.7-.291h0a.992.992,0,0,0-.7.291L21.324,131.654a.993.993,0,0,0,0,1.4l6,5.985a41.257,41.257,0,0,0-5.246,12.635H13.614a.992.992,0,0,0-.993.993v16.792a.993.993,0,0,0,.993.994h8.461a41.163,41.163,0,0,0,5.244,12.635l-5.995,5.985a.993.993,0,0,0,0,1.4l11.883,11.883a1.023,1.023,0,0,0,1.4,0l5.995-5.995A41.077,41.077,0,0,0,53.232,201.6v8.471a.992.992,0,0,0,.993.993H71.017a.992.992,0,0,0,.993-.993V201.6a41.071,41.071,0,0,0,12.625-5.244l6,6.005a.993.993,0,0,0,1.4,0l11.883-11.883a.992.992,0,0,0,0-1.4l-6.005-5.995a41.106,41.106,0,0,0,5.246-12.625h8.471a.994.994,0,0,0,.993-.994V152.671a.992.992,0,0,0-.993-.993M62.621,138.69a22.377,22.377,0,1,1-22.377,22.377A22.4,22.4,0,0,1,62.621,138.69M94.73,175.516a35.163,35.163,0,0,1-31.653,19.876q-.645,0-1.291-.023a35.145,35.145,0,0,1-28.572-53.646,1.49,1.49,0,1,1,2.53,1.573,32.163,32.163,0,1,0,56.3,30.925,1.49,1.49,0,0,1,2.685,1.3m2.551-6.67-.04.2a1.489,1.489,0,1,1-2.925-.561l.039-.2a1.49,1.49,0,0,1,2.927.561",transform:"translate(-12.621 -111.067)",fill:ds})})}function SideMenu({...ds}){const dn=useNavigate(),{showMenu:ms,setShowMenu:xs}=useMenuContext(),{userTheme:bs}=useTheme(),Es=reactExports.useRef(null),{isAdmin:ws,hasAccess:Rs}=useAuth();return useOutsideSelect(Es,()=>xs(!1)),jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-full",...ds,children:[ms&&jsxRuntimeExports.jsx("div",{className:"absolute top-0 left-0 bg-secondary opacity-60 h-full w-full z-[80]"}),jsxRuntimeExports.jsxs("div",{ref:Es,className:`${styles$1.Menu} ${ms?"!left-0":""} h-full flex-1 overflow-y-scroll bg-secondary text-white`,onMouseLeave:()=>xs(!1),children:[jsxRuntimeExports.jsx("div",{className:"flex flex-row absolute top-2 right-2 z-10",children:jsxRuntimeExports.jsx(X$4,{className:"!cursor-pointer text-white",size:40,onClick:()=>xs(!1)})}),jsxRuntimeExports.jsxs("div",{className:"md:absolute md:top-0 md:h-[250px] z-0 p-5 mt-5",children:[jsxRuntimeExports.jsx("div",{className:"hidden md:block",children:bs?.logoUrl?jsxRuntimeExports.jsx("img",{alt:"logo",className:"w-full p-2 z-0",src:bs.logoUrl}):jsxRuntimeExports.jsx(LogoLarge,{className:"-mt-10 -ml-5 md:mt-0 w-56 z-0 md:w-full md:p-2 mr-auto"})}),ws&&jsxRuntimeExports.jsxs("div",{className:"text-xl mt-10 mb-2",children:[jsxRuntimeExports.jsxs(Link$1,{to:"/",className:"flex flex-row items-center text-xl mb-2 md:hidden text-primary",onClick:()=>
1417xs(!1),children:[jsxRuntimeExports.jsx(OpsManual,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," Manual Dashboard"]}),jsxRuntimeExports.jsxs(Link$1,{to:"/upload",className:"flex flex-row items-center text-xl mb-2 md:hidden text-primary",onClick:()=>xs(!1),children:[jsxRuntimeExports.jsx(Upload,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," Upload Your IP"]}),jsxRuntimeExports.jsxs(Link$1,{to:"/board",className:"flex flex-row items-center text-xl mb-2 md:hidden text-primary",onClick:()=>xs(!1),children:[jsxRuntimeExports.jsx(Board,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," SOP Board"]}),jsxRuntimeExports.jsxs(Link$1,{to:"/wizard",className:"flex flex-row items-center text-xl mb-2 md:hidden text-primary",onClick:()=>xs(!1),children:[jsxRuntimeExports.jsx(WizardHat,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," Ask Your Wizard"]}),Rs(["Admin"],["InviteMembers"])&&jsxRuntimeExports.jsxs(Link$1,{to:"/team",className:"flex flex-row items-center text-xl mb-2 md:hidden text-primary",onClick:()=>xs(!1),children:[jsxRuntimeExports.jsx(Team,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," Team Management"]}),jsxRuntimeExports.jsxs(Link$1,{className:"flex flex-row items-center text-xl mb-2 text-primary",to:"/settings",onClick:()=>xs(!1),children:[jsxRuntimeExports.jsx(Settings,{colour:bs?.primaryColor??"#fff",width:24,height:24,className:"mr-2"})," Settings"]})]}),jsxRuntimeExports.jsx("div",{className:"text-xl mb-2 cursor-pointer",children:jsxRuntimeExports.jsxs("a",{className:"flex flex-row items-center text-primary",target:"_blank",href:"mailto:[email protected]",rel:"noreferrer",children:[jsxRuntimeExports.jsx(Info$2,{size:24,className:"mr-2"})," Contact support"]})}),jsxRuntimeExports.jsx("div",{className:"text-xl mb-2 cursor-pointer text-primary",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center",onClick:()=>{Sdk.userClient.logout(),dn("/",{replace:!0})},children:[jsxRuntimeExports.jsx(LogOut,{className:"mr-2 "})," Logout"]})}),jsxRuntimeExports.jsxs("div",{className:"mt-8 text-right text-xs text-primary",children:["Version ",Sdk.version]})]})]})]})}function HeaderLoggedIn({children:ds}){const dn=useNavigate(),{showMenu:ms,setShowMenu:xs}=useMenuContext(),{userTheme:bs}=useTheme(),{isAdmin:Es,hasAccess:ws}=useAuth();return jsxRuntimeExports.jsxs("div",{className:"flex flex-row min-h-[100svh] w-full overflow-x-hidden",children:[jsxRuntimeExports.jsx(SideMenu,{className:"cursor-pointer h-full flex flex-col"}),jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col min-h-[100svh] min-w-0",children:[jsxRuntimeExports.jsx("header",{className:"py-1 z-50 border-primary border-b-[3px] bg-secondary",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center w-full ",children:[jsxRuntimeExports.jsx("div",{className:"ml-2",children:jsxRuntimeExports.jsx(PanelLeftOpen,{strokeWidth:1,className:"ml-auto cursor-pointer text-primary ",size:50,onClick:()=>xs(!0)})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center text-white text-2xl ml-[20px] cursor-pointer","aria-label":"View Manual",onClick:()=>dn("/ops-manual"),children:["MANUAL",jsxRuntimeExports.jsx(Book,{size:23,className:"ml-1","aria-hidden":!0})]}),jsxRuntimeExports.jsx("div",{className:"cursor-pointer ml-auto",onClick:()=>dn("/"),children:bs?.logoUrl?jsxRuntimeExports.jsx("img",{alt:"logo",className:"h-12 object-cover mr-4",src:bs.logoUrl}):jsxRuntimeExports.jsx(Logo,{colour:"#fff",width:80,height:60,className:"mr-4"})})]})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-row flex-1 min-h-0 min-w-0 overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:`hidden md:flex h-full w-[70px] flex-col items-center ${ms?"":"bg-secondary"} pt-3 space-y-3`,children:[jsxRuntimeExports.jsx(OpsManual,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mt-1 mb-5 cursor-pointer expand-btn",onClick:()=>dn(Es?"/":"/ops-manual")}),Es&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Upload,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mb-5 curs
1417or-pointer expand-btn",onClick:()=>dn("/upload")}),jsxRuntimeExports.jsx(Board,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mb-6 cursor-pointer expand-btn",onClick:()=>dn("/board")})]}),Es&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(WizardHat,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mb-7 cursor-pointer expand-btn",onClick:()=>dn("/wizard")})}),ws(["Admin"],["InviteMembers"])&&jsxRuntimeExports.jsx(Team,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mb-8 cursor-pointer expand-btn",onClick:()=>dn("/team")}),Es&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Settings,{width:50,height:50,colour:bs?.primaryColor??"#fff",className:"mb-8 cursor-pointer expand-btn",onClick:()=>dn("/settings")})})]}),jsxRuntimeExports.jsx("div",{className:"flex-1 flex flex-col min-h-0 min-w-0 overflow-y-auto",children:ds})]})]})]})}const Ctx=reactExports.createContext(null);function ManualSelectorProvider({manualId:ds}){const{setSelectedManualId:dn}=useAccountContext();return jsxRuntimeExports.jsx(Ctx.Provider,{value:{manualId:ds,switchManual:ms=>dn(ms)},children:jsxRuntimeExports.jsx(HeaderLoggedIn,{children:jsxRuntimeExports.jsx(Outlet,{})})})}const useManualSelector=()=>{const ds=reactExports.useContext(Ctx);if(!ds)throw new Error("useManual must be used within ManualSelector");return ds};function ManualSwitcher({readOnly:ds=!1}){const{manuals:dn}=useAccountContext(),{manualId:ms,switchManual:xs}=useManualSelector();return jsxRuntimeExports.jsxs("div",{className:"inline-flex items-center",children:[ds&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{className:"underline px-3 py-2 text-[--text-dark]",children:dn.find(bs=>bs.id===ms)?.name||"Loading..."})}),!ds&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("select",{id:"manual-select",className:"border-none bg-transparent outline-none underline rounded px-3 py-2 text-[--text-dark]  select-arrow",value:ms,onChange:bs=>xs(bs.target.value),"aria-label":"Select operations manual",children:dn.map(bs=>jsxRuntimeExports.jsx("option",{value:bs.id,children:bs.name},bs.id))})})]})}function BrandRibbon(){return jsxRuntimeExports.jsx("div",{className:"h-[2px] w-full bg-primary"})}function DashboardHeader(){return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full h-14 flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"ml-3",children:jsxRuntimeExports.jsx(ManualSwitcher,{readOnly:!1})}),jsxRuntimeExports.jsxs("div",{className:"ml-auto flex items-center gap-2 mr-3",children:[jsxRuntimeExports.jsxs(Link$1,{className:"btn-ghost hidden md:inline-flex","aria-label":"Upload IP",to:"/upload",children:[jsxRuntimeExports.jsx(CloudUpload,{className:"w-4 h-4","aria-hidden":!0}),"Upload IP"]}),jsxRuntimeExports.jsxs(Link$1,{className:"btn-ghost hidden md:inline-flex","aria-label":"Add SOP",to:"/board",children:[jsxRuntimeExports.jsx(FilePlus,{className:"w-4 h-4","aria-hidden":!0}),"Add SOP"]}),jsxRuntimeExports.jsxs(Link$1,{className:"btn-ghost hidden md:inline-flex","aria-label":"Ask Wizard",to:"/wizard",children:[jsxRuntimeExports.jsx(WandSparkles,{className:"w-4 h-4 text-primary","aria-hidden":!0}),"Ask Wizard"]}),jsxRuntimeExports.jsxs(Link$1,{className:"btn-primary","aria-label":"Board",to:"/board",children:[jsxRuntimeExports.jsx(Columns3,{className:"w-4 h-4","aria-hidden":!0}),"BOARD"]})]})]}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}function HealthScore({health:ds}){const dn=useNavigate(),ms=ds?.score>=80?"text-green-600":ds?.score>=60?"text-amber-600":"text-red-600",xs=Math.floor(ds?.coveragePct??0);return jsxRuntimeExports.jsxs("div",{className:"card p-4",children:[xs>0&&jsxRuntimeExports.jsxs("div",{className:"flex flex-row",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("h3",{className:"card-title mb-8",children:"Manual Health"}),jsxRuntimeExports.jsxs("div",{className:"text-xl",children:["Coverage: ",xs,"%"]})]}),jsxRuntimeExports.jsx("div",{className:`ml-auto mr-3 mt-auto mb-auto text-8xl font-bold ${ms}`,children:Math.round(ds?.score)})]}),xs===0&&jsxRuntimeExports.jsx("div",{className:"flex flex-row",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx("h3",{className:"card-title underline cursor-pointer",onClick:()=>dn("/upload"),children:"Upload your IP to get started"})})})]})}const toneMap={brand:"bg-primary/12 text-primary",blue:"bg-secondary/10 text-secondary",green:"bg-emerald-50 text-emerald-700",amber:"bg-amber-50 text-amber-700",red:"bg-rose-50 text-rose-700",neutral:"bg-neutral-100 text-neutral-600"};function IconBadge({icon:ds,tone:dn="brand",className:ms=""}){const bs=["inline-flex items-center justify-center w-6 h-6 rounded-md",toneMap[dn],ms].filter(
1417Boolean).join(" ");return jsxRuntimeExports.jsx("span",{className:bs,"aria-hidden":!0,children:ds})}const pillarIcon={Policies:React.createElement(FileText,{className:"w-4 h-4","aria-hidden":!0}),Processes:React.createElement(Workflow,{className:"w-4 h-4","aria-hidden":!0}),"How-To":React.createElement(GraduationCap,{className:"w-4 h-4","aria-hidden":!0}),Security:React.createElement(Shield,{className:"w-4 h-4","aria-hidden":!0}),Compliance:React.createElement(BadgeCheck,{className:"w-4 h-4","aria-hidden":!0}),People:React.createElement(Users,{className:"w-4 h-4","aria-hidden":!0})};function PillarProgress({pillars:ds}){return jsxRuntimeExports.jsxs("div",{className:"card card--brand relative overflow-hidden p-4",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 mm-pattern pointer-events-none"}),jsxRuntimeExports.jsxs("div",{className:"relative z-[1]",children:[jsxRuntimeExports.jsx("h3",{className:"card-title mb-3",children:"Progress"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ds?.map(dn=>jsxRuntimeExports.jsxs(Link$1,{to:`/board?category=${encodeURIComponent(dn.name)}`,className:"block rounded border border-tertiary p-3 hover:shadow-md transition focus:outline-none focus:ring-2 focus:ring-[--color-primary]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[jsxRuntimeExports.jsx(IconBadge,{icon:pillarIcon[dn.name]??pillarIcon.Policies,tone:"brand"}),jsxRuntimeExports.jsx("span",{children:dn.name})]}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-[--text-medium]",children:[Math.round(dn.completionPct),"%"]})]}),jsxRuntimeExports.jsx("div",{className:"mt-2 mm-progress",children:jsxRuntimeExports.jsx("span",{style:{width:`${dn.completionPct}%`}})}),jsxRuntimeExports.jsxs("div",{className:"mt-2 text-xs text-[--text-medium]",children:["Draft ",dn.counts.draft," • Review ",dn.counts.review," • Approved ",dn.counts.approved," / ",dn.counts.total]})]},dn.key))})]})]})}function Card({title:ds,icon:dn,action:ms,children:xs,className:bs=""}){const Es=`card rounded-b-xl border border-[--border-medium] bg-white p-3 ${bs}`.trim();return jsxRuntimeExports.jsxs("section",{className:Es,children:[ds&&jsxRuntimeExports.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[jsxRuntimeExports.jsxs("h3",{className:"flex items-center gap-2 text-[--color-heading] text-xl font-semibold",children:[dn,ds]}),ms]}),xs]})}function AISuggestions(){return jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx("div",{className:"mb-2 flex items-center gap-2",children:jsxRuntimeExports.jsx("h3",{className:"card-title !text-primary",children:"Improve SOP generation"})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Link$1,{to:"/settings/business-details",className:"underline",children:"Provide details about your business"})}),jsxRuntimeExports.jsx("div",{className:"mt-3",children:jsxRuntimeExports.jsx(Link$1,{to:"/settings/target-reader",className:"underline",children:"Define your target reader"})}),jsxRuntimeExports.jsx("div",{className:"mt-3",children:jsxRuntimeExports.jsx(Link$1,{to:"/settings/brand-voice",className:"underline",children:"Configure your brand voice"})})]})}function Donut({size:ds=64,value:dn,total:ms,tone:xs="success"}){const bs=ms>0?dn/ms*100:dn>0?100:0,Es=Math.min(100,Math.max(0,bs)),ws=ds/2-6,Rs=2*Math.PI*ws,js=Es/100*Rs,Cs={success:"#6bc7ed",warning:"#f5842c",danger:"#dc2626"};return jsxRuntimeExports.jsxs("svg",{width:ds,height:ds,viewBox:`0 0 ${ds} ${ds}`,"aria-hidden":!0,children:[jsxRuntimeExports.jsx("circle",{cx:ds/2,cy:ds/2,r:ws,stroke:"#e5e7eb",strokeWidth:"10",fill:"none"}),jsxRuntimeExports.jsx("circle",{cx:ds/2,cy:ds/2,r:ws,stroke:Cs[xs],strokeWidth:"10",fill:"none",strokeDasharray:`${js} ${Rs-js}`,transform:`rotate(-90 ${ds/2} ${ds/2})`}),jsxRuntimeExports.jsxs("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"central",className:"text-xs fill-[--text-dark]",children:[Math.round(Es),"%"]})]})}function SeatsAndTeam({model:ds}){const ms=ds.total>0?ds.used/ds.total:ds.used>0?1:0,xs=Math.round(ms*100),bs=ms>.8?"warning":"success";return jsxRuntimeExports.jsxs("div",{className:"card p-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row",children:[jsxRuntimeExports.jsx("h3",{className:"card-title mb-2",children:"Team"}),jsxRuntimeExports.jsx("a",{href:"/team",className:"ml-auto mt-2 inline-block text-sm text-[--color-primary] underline",children:"Manage team"})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"text-sm",children:[jsxRuntimeExports.jsxs("div",{children:[ds.used," of ",ds.total," used (",xs,"%)"]}),jsxRuntimeExports.jsx("ul",{className:"mt-1 list-disc list-inside",children:Object.entries(ds.byRole).map(([Es,ws])=>jsxRuntimeExports.jsxs("li",{children:[Es,": ",ws]},Es))})]}),jsxRuntimeExports.jsx("div",{className:"ml-auto",children:jsxRuntimeExports.jsx(Donut,{value:ds.used,total:ds.total,tone:bs,size:110})})]})]})}function ConsultancyCard(){return jsxRuntimeExports.jsxs("div",{className:"card p-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-baseline",children:[jsxRuntimeExports.jsx("h3",{className:"card-title mb-2",children:"Consultancy Services"}),jsxRuntimeExports.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[jsxRuntimeExports.jsx(Link$1,{to:"/book",className:"mt-2 inline-block text-sm text-[--color-primary] underline",children:"Get the book"}),jsxRuntimeExports.jsx("span",{className:"text-gray-300 mt-2",children:"|"}),jsxRuntimeExports.jsx(Link$1,{to:"/consultancy",className:"mt-2 inline-block text-sm text-[--color-primary] underline",children:"Learn more"})]})]}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-700",children:[jsxRuntimeExports.jsxs("p",{className:"mb-2",children:["Get hands-on support from ",jsxRuntimeExports.jsx("strong",{children:"Manual Writers International"})," to help you:"]}),jsxRuntimeExports.jsxs("ul",{className:"list-disc list-inside space-y-1 mb-3",children:[jsxRuntimeExports.jsx("li",{children:"Onboard y
1417our team"}),jsxRuntimeExports.jsx("li",{children:"Review your operations manual"}),jsxRuntimeExports.jsx("li",{children:"Quality-check completed SOPs"})]})]})]})}function ResourcesCard(){return jsxRuntimeExports.jsxs("div",{className:"card p-4 h-full",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-row items-baseline",children:jsxRuntimeExports.jsx("h3",{className:"card-title mb-2",children:"Learning Resources"})}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-700",children:[jsxRuntimeExports.jsx("p",{className:"mb-3",children:"Browse helpful content while you build your manual."}),jsxRuntimeExports.jsxs("ul",{className:"list-disc list-inside space-y-2",children:[jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/faq",className:"text-[--color-primary] underline",children:"Frequently Asked Questions"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Link$1,{to:"/blog",className:"text-[--color-primary] underline",children:"Blog Articles"})})]})]})]})}function DashboardScreen(){const{manualId:ds}=useManualSelector(),[dn,ms]=reactExports.useState(),[xs,bs]=reactExports.useState(!0),[Es,ws]=reactExports.useState();return reactExports.useEffect(()=>{let Rs=!1;return bs(!0),Sdk.manualsClient.overview(ds).then(js=>{Rs||(ms(js.data),ws(void 0))}).catch(()=>{Rs||ws("Unable to load dashboard.")}).finally(()=>!Rs&&bs(!1)),()=>{Rs=!0}},[ds]),xs?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):Es||!dn?jsxRuntimeExports.jsx("div",{className:"p-6 text-[--text-dark]",children:jsxRuntimeExports.jsxs("div",{className:"mt-4 rounded-lg border border-[--border-medium] p-6 bg-[--background-neutral]",children:[jsxRuntimeExports.jsx("p",{className:"text-red-600",children:Es??"No data."}),jsxRuntimeExports.jsx("button",{className:"mt-4 px-4 py-2 bg-primary text-white rounded",onClick:()=>location.reload(),children:"Retry"})]})}):jsxRuntimeExports.jsxs("div",{className:"mm-app-bg bg-background overflow-y-scroll h-full",children:[jsxRuntimeExports.jsx(DashboardHeader,{}),jsxRuntimeExports.jsxs("main",{className:"mx-auto w-full px-6 lg:px-8 xl:px-10 py-6 space-y-6 bg-tertiary h-full",style:{background:"fixed linear-gradient(to bottom,    #6bc7ed6b 0,    #6bc7ed6b 10px,    #fff 800px  )"},children:[jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-12 gap-6",children:[jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-8",children:jsxRuntimeExports.jsx(HealthScore,{health:dn.health})}),jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-4",children:jsxRuntimeExports.jsx(AISuggestions,{})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-12 gap-6",children:[jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-8",children:jsxRuntimeExports.jsx(PillarProgress,{pillars:dn.pillars})}),dn.seats&&jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-4",children:jsxRuntimeExports.jsx(SeatsAndTeam,{model:dn.seats})})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-12 gap-6",children:[jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-6",children:jsxRuntimeExports.jsx(ConsultancyCard,{})}),jsxRuntimeExports.jsx("div",{className:"col-span-12 lg:col-span-6",children:jsxRuntimeExports.jsx(ResourcesCard,{})})]})]})]})}function useCombinedRefs(){for(var ds=arguments.length,dn=new Array(ds),ms=0;ms<ds;ms++)dn[ms]=arguments[ms];return reactExports.useMemo(()=>xs=>{dn.forEach(bs=>bs(xs))},dn)}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function isWindow(ds){const dn=Object.prototype.toString.call(ds);return dn==="[object Window]"||dn==="[object global]"}function isNode(ds){return"nodeType"in ds}function getWindow(ds){var dn,ms;return ds?isWindow(ds)?ds:isNode(ds)&&(dn=(ms=ds.ownerDocument)==null?void 0:ms.defaultView)!=null?dn:window:window}function isDocument(ds){const{Document:dn}=getWindow(ds);return ds instanceof dn}function isHTMLElement(ds){return isWindow(ds)?!1:ds instanceof getWindow(ds).HTMLElement}function isSVGElement(ds){return ds instanceof getWindow(ds).SVGElement}function getOwnerDocument(ds){return ds?isWindow(ds)?ds.document:isNode(ds)?isDocument(ds)?ds:isHTMLElement(ds)||isSVGElement(ds)?ds.ownerDocument:document:document:document}const useIsomorphicLayoutEffect=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function useEvent(ds){const dn=reactExports.useRef(ds);return useIsomorphicLayoutEffect(()=>{dn.current=ds}),reactExports.useCallback(function(){for(var ms=arguments.length,xs=new Array(ms),bs=0;bs<ms;bs++)xs[bs]=arguments[bs];return dn.current==null?void 0:dn.current(...xs)},[])}function useInterval(){const ds=reactExports.useRef(null),dn=reactExports.useCallback((xs,bs)=>{ds.current=setInterval(xs,bs)},[]),ms=reactExports.useCallback(()=>{ds.current!==null&&(clearInterval(ds.current),ds.current=null)},[]);return[dn,ms]}function useLatestValue(ds,dn){dn===void 0&&(dn=[ds]);const ms=reactExports.useRef(ds);return useIsomorphicLayoutEffect(()=>{ms.current!==ds&&(ms.current=ds)},dn),ms}function useLazyMemo(ds,dn){const ms=reactExports.useRef();return reactExports.useMemo(()=>{const xs=ds(ms.current);return ms.current=xs,xs},[...dn])}function useNodeRef(ds){const dn=useEvent(ds),ms=reactExports.useRef(null),xs=reactExports.useCallback(bs=>{bs!==ms.current&&dn?.(bs,ms.current),ms.current=bs},[]);return[ms,xs]}function usePrevious(ds){const dn=reactExports.useRef();return reactExports.useEffect(()=>{dn.current=ds},[ds]),dn.current}let ids={};function useUniqueId(ds,dn){return reactExports.useMemo(()=>
1417{if(dn)return dn;const ms=ids[ds]==null?0:ids[ds]+1;return ids[ds]=ms,ds+"-"+ms},[ds,dn])}function createAdjustmentFn(ds){return function(dn){for(var ms=arguments.length,xs=new Array(ms>1?ms-1:0),bs=1;bs<ms;bs++)xs[bs-1]=arguments[bs];return xs.reduce((Es,ws)=>{const Rs=Object.entries(ws);for(const[js,Cs]of Rs){const As=Es[js];As!=null&&(Es[js]=As+ds*Cs)}return Es},{...dn})}}const add=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function hasViewportRelativeCoordinates(ds){return"clientX"in ds&&"clientY"in ds}function isKeyboardEvent(ds){if(!ds)return!1;const{KeyboardEvent:dn}=getWindow(ds.target);return dn&&ds instanceof dn}function isTouchEvent(ds){if(!ds)return!1;const{TouchEvent:dn}=getWindow(ds.target);return dn&&ds instanceof dn}function getEventCoordinates(ds){if(isTouchEvent(ds)){if(ds.touches&&ds.touches.length){const{clientX:dn,clientY:ms}=ds.touches[0];return{x:dn,y:ms}}else if(ds.changedTouches&&ds.changedTouches.length){const{clientX:dn,clientY:ms}=ds.changedTouches[0];return{x:dn,y:ms}}}return hasViewportRelativeCoordinates(ds)?{x:ds.clientX,y:ds.clientY}:null}const CSS$1=Object.freeze({Translate:{toString(ds){if(!ds)return;const{x:dn,y:ms}=ds;return"translate3d("+(dn?Math.round(dn):0)+"px, "+(ms?Math.round(ms):0)+"px, 0)"}},Scale:{toString(ds){if(!ds)return;const{scaleX:dn,scaleY:ms}=ds;return"scaleX("+dn+") scaleY("+ms+")"}},Transform:{toString(ds){if(ds)return[CSS$1.Translate.toString(ds),CSS$1.Scale.toString(ds)].join(" ")}},Transition:{toString(ds){let{property:dn,duration:ms,easing:xs}=ds;return dn+" "+ms+"ms "+xs}}}),SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(ds){return ds.matches(SELECTOR)?ds:ds.querySelector(SELECTOR)}const hiddenStyles={display:"none"};function HiddenText(ds){let{id:dn,value:ms}=ds;return React.createElement("div",{id:dn,style:hiddenStyles},ms)}function LiveRegion(ds){let{id:dn,announcement:ms,ariaLiveType:xs="assertive"}=ds;const bs={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React.createElement("div",{id:dn,style:bs,role:"status","aria-live":xs,"aria-atomic":!0},ms)}function useAnnouncement(){const[ds,dn]=reactExports.useState("");return{announce:reactExports.useCallback(xs=>{xs!=null&&dn(xs)},[]),announcement:ds}}const DndMonitorContext=reactExports.createContext(null);function useDndMonitor(ds){const dn=reactExports.useContext(DndMonitorContext);reactExports.useEffect(()=>{if(!dn)throw new Error("useDndMonitor must be used within a children of <DndContext>");return dn(ds)},[ds,dn])}function useDndMonitorProvider(){const[ds]=reactExports.useState(()=>new Set),dn=reactExports.useCallback(xs=>(ds.add(xs),()=>ds.delete(xs)),[ds]);return[reactExports.useCallback(xs=>{let{type:bs,event:Es}=xs;ds.forEach(ws=>{var Rs;return(Rs=ws[bs])==null?void 0:Rs.call(ws,Es)})},[ds]),dn]}const defaultScreenReaderInstructions={draggable:`
1418    To pick up a draggable item, press the space bar.
1419    While dragging, use the arrow keys to move the item.
1420    Press space again to drop the item in its new position, or press escape to cancel.
1421  `},defaultAnnouncements={onDragStart(ds){let{active:dn}=ds;return"Picked up draggable item "+dn.id+"."},onDragOver(ds){let{active:dn,over:ms}=ds;return ms?"Draggable item "+dn.id+" was moved over droppable area "+ms.id+".":"Draggable item "+dn.id+" is no longer over a droppable area."},onDragEnd(ds){let{active:dn,over:ms}=ds;return ms?"Draggable item "+dn.id+" was dropped over droppable area "+ms.id:"Draggable item "+dn.id+" was dropped."},onDragCancel(ds){let{active:dn}=ds;return"Dragging was cancelled. Draggable item "+dn.id+" was dropped."}};function Accessibility(ds){let{announcements:dn=defaultAnnouncements,container:ms,hiddenTextDescribedById:xs,screenReaderInstructions:bs=defaultScreenReaderInstructions}=ds;const{announce:Es,announcement:ws}=useAnnouncement(),Rs=useUniqueId("DndLiveRegion"),[js,Cs]=reactExports.useState(!1);if(reactExports.useEffect(()=>{Cs(!0)},[]),useDndMonitor(reactExports.useMemo(()=>({onDragStart(ks){let{active:Os}=ks;Es(dn.onDragStart({active:Os}))},onDragMove(ks){let{active:Os,over:Ms}=ks;dn.onDragMove&&Es(dn.onDragMove({active:Os,over:Ms}))},onDragOver(ks){let{active:Os,over:Ms}=ks;Es(dn.onDragOver({active:Os,over:Ms}))},onDragEnd(ks){let{active:Os,over:Ms}=ks;Es(dn.onDragEnd({active:Os,over:Ms}))},onDragCancel(ks){let{active:Os,over:Ms}=ks;Es(dn.onDragCancel({active:Os,over:Ms}))}}),[Es,dn])),!js)return null;const As=React.createElement(React.Fragment,null,React.createElement(HiddenText,{id:xs,value:bs.draggable}),React.createElement(LiveRegion,{id:Rs,announcement:ws}));return ms?reactDomExports.createPortal(As,ms):As}var Action;(function(ds){ds.DragStart="dragStart",ds.DragMove="dragMove",ds.DragEnd="dragEnd",ds.DragCancel="dragCancel",ds.DragOver="dragOver",ds.RegisterDroppable="registerDroppable",ds.SetDroppableDisabled="setDroppableDisabled",ds.UnregisterDroppable="unregisterDroppable"})(Action||(Action={}));function noop(){}const defaultCoordinates=Object.freeze({x:0,y:0});function distanceBetween(ds,dn){return Math.sqrt(Math.pow(ds.x-dn.x,2)+Math.pow(ds.y-dn.y,2))}
1421function getRelativeTransformOrigin(ds,dn){const ms=getEventCoordinates(ds);if(!ms)return"0 0";const xs={x:(ms.x-dn.left)/dn.width*100,y:(ms.y-dn.top)/dn.height*100};return xs.x+"% "+xs.y+"%"}function sortCollisionsAsc(ds,dn){let{data:{value:ms}}=ds,{data:{value:xs}}=dn;return ms-xs}function sortCollisionsDesc(ds,dn){let{data:{value:ms}}=ds,{data:{value:xs}}=dn;return xs-ms}function getFirstCollision(ds,dn){if(!ds||ds.length===0)return null;const[ms]=ds;return ms[dn]}function centerOfRectangle(ds,dn,ms){return dn===void 0&&(dn=ds.left),ms===void 0&&(ms=ds.top),{x:dn+ds.width*.5,y:ms+ds.height*.5}}const closestCenter=ds=>{let{collisionRect:dn,droppableRects:ms,droppableContainers:xs}=ds;const bs=centerOfRectangle(dn,dn.left,dn.top),Es=[];for(const ws of xs){const{id:Rs}=ws,js=ms.get(Rs);if(js){const Cs=distanceBetween(centerOfRectangle(js),bs);Es.push({id:Rs,data:{droppableContainer:ws,value:Cs}})}}return Es.sort(sortCollisionsAsc)};function getIntersectionRatio(ds,dn){const ms=Math.max(dn.top,ds.top),xs=Math.max(dn.left,ds.left),bs=Math.min(dn.left+dn.width,ds.left+ds.width),Es=Math.min(dn.top+dn.height,ds.top+ds.height),ws=bs-xs,Rs=Es-ms;if(xs<bs&&ms<Es){const js=dn.width*dn.height,Cs=ds.width*ds.height,As=ws*Rs,ks=As/(js+Cs-As);return Number(ks.toFixed(4))}return 0}const rectIntersection=ds=>{let{collisionRect:dn,droppableRects:ms,droppableContainers:xs}=ds;const bs=[];for(const Es of xs){const{id:ws}=Es,Rs=ms.get(ws);if(Rs){const js=getIntersectionRatio(Rs,dn);js>0&&bs.push({id:ws,data:{droppableContainer:Es,value:js}})}}return bs.sort(sortCollisionsDesc)};function adjustScale(ds,dn,ms){return{...ds,scaleX:dn&&ms?dn.width/ms.width:1,scaleY:dn&&ms?dn.height/ms.height:1}}function getRectDelta(ds,dn){return ds&&dn?{x:ds.left-dn.left,y:ds.top-dn.top}:defaultCoordinates}function createRectAdjustmentFn(ds){return function(ms){for(var xs=arguments.length,bs=new Array(xs>1?xs-1:0),Es=1;Es<xs;Es++)bs[Es-1]=arguments[Es];return bs.reduce((ws,Rs)=>({...ws,top:ws.top+ds*Rs.y,bottom:ws.bottom+ds*Rs.y,left:ws.left+ds*Rs.x,right:ws.right+ds*Rs.x}),{...ms})}}const getAdjustedRect=createRectAdjustmentFn(1);function parseTransform(ds){if(ds.startsWith("matrix3d(")){const dn=ds.slice(9,-1).split(/, /);return{x:+dn[12],y:+dn[13],scaleX:+dn[0],scaleY:+dn[5]}}else if(ds.startsWith("matrix(")){const dn=ds.slice(7,-1).split(/, /);return{x:+dn[4],y:+dn[5],scaleX:+dn[0],scaleY:+dn[3]}}return null}function inverseTransform(ds,dn,ms){const xs=parseTransform(dn);if(!xs)return ds;const{scaleX:bs,scaleY:Es,x:ws,y:Rs}=xs,js=ds.left-ws-(1-bs)*parseFloat(ms),Cs=ds.top-Rs-(1-Es)*parseFloat(ms.slice(ms.indexOf(" ")+1)),As=bs?ds.width/bs:ds.width,ks=Es?ds.height/Es:ds.height;return{width:As,height:ks,top:Cs,right:js+As,bottom:Cs+ks,left:js}}const defaultOptions={ignoreTransform:!1};function getClientRect(ds,dn){dn===void 0&&(dn=defaultOptions);let ms=ds.getBoundingClientRect();if(dn.ignoreTransform){const{transform:Cs,transformOrigin:As}=getWindow(ds).getComputedStyle(ds);Cs&&(ms=inverseTransform(ms,Cs,As))}const{top:xs,left:bs,width:Es,height:ws,bottom:Rs,right:js}=ms;return{top:xs,left:bs,width:Es,height:ws,bottom:Rs,right:js}}function getTransformAgnosticClientRect(ds){return getClientRect(ds,{ignoreTransform:!0})}function getWindowClientRect(ds){const dn=ds.innerWidth,ms=ds.innerHeight;return{top:0,left:0,right:dn,bottom:ms,width:dn,height:ms}}function isFixed(ds,dn){return dn===void 0&&(dn=getWindow(ds).getComputedStyle(ds)),dn.position==="fixed"}function isScrollable(ds,dn){dn===void 0&&(dn=getWindow(ds).getComputedStyle(ds));const ms=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(bs=>{const Es=dn[bs];return typeof Es=="string"?ms.test(Es):!1})}function getScrollableAncestors(ds,dn){const ms=[];function xs(bs){if(dn!=null&&ms.length>=dn||!bs)return ms;if(isDocument(bs)&&bs.scrollingElement!=null&&!ms.includes(bs.scrollingElement))return ms.push(bs.scrollingElement),ms;if(!isHTMLElement(bs)||isSVGElement(bs)||ms.includes(bs))return ms;const Es=getWindow(ds).getComputedStyle(bs);return bs!==ds&&isScrollable(bs,Es)&&ms.push(bs),isFixed(bs,Es)?ms:xs(bs.parentNode)}return ds?xs(ds):ms}function getFirstScrollableAncestor(ds){const[dn]=getScrollableAncestors(ds,1);return dn??null}function getScrollableElement(ds){return!canUseDOM||!ds?null:isWindow(ds)?ds:isNode(ds)?isDocument(ds)||ds===getOwnerDocument(ds).scrollingElement?window:isHTMLElement(ds)?ds:null:null}function getScrollXCoordinate(ds){return isWindow(ds)?ds.scrollX:ds.scrollLeft}function getScrollYCoordinate(ds){return isWindow(ds)?ds.scrollY:ds.scrollTop}
1421function getScrollCoordinates(ds){return{x:getScrollXCoordinate(ds),y:getScrollYCoordinate(ds)}}var Direction;(function(ds){ds[ds.Forward=1]="Forward",ds[ds.Backward=-1]="Backward"})(Direction||(Direction={}));function isDocumentScrollingElement(ds){return!canUseDOM||!ds?!1:ds===document.scrollingElement}function getScrollPosition(ds){const dn={x:0,y:0},ms=isDocumentScrollingElement(ds)?{height:window.innerHeight,width:window.innerWidth}:{height:ds.clientHeight,width:ds.clientWidth},xs={x:ds.scrollWidth-ms.width,y:ds.scrollHeight-ms.height},bs=ds.scrollTop<=dn.y,Es=ds.scrollLeft<=dn.x,ws=ds.scrollTop>=xs.y,Rs=ds.scrollLeft>=xs.x;return{isTop:bs,isLeft:Es,isBottom:ws,isRight:Rs,maxScroll:xs,minScroll:dn}}const defaultThreshold={x:.2,y:.2};function getScrollDirectionAndSpeed(ds,dn,ms,xs,bs){let{top:Es,left:ws,right:Rs,bottom:js}=ms;xs===void 0&&(xs=10),bs===void 0&&(bs=defaultThreshold);const{isTop:Cs,isBottom:As,isLeft:ks,isRight:Os}=getScrollPosition(ds),Ms={x:0,y:0},Ds={x:0,y:0},Ps={height:dn.height*bs.y,width:dn.width*bs.x};return!Cs&&Es<=dn.top+Ps.height?(Ms.y=Direction.Backward,Ds.y=xs*Math.abs((dn.top+Ps.height-Es)/Ps.height)):!As&&js>=dn.bottom-Ps.height&&(Ms.y=Direction.Forward,Ds.y=xs*Math.abs((dn.bottom-Ps.height-js)/Ps.height)),!Os&&Rs>=dn.right-Ps.width?(Ms.x=Direction.Forward,Ds.x=xs*Math.abs((dn.right-Ps.width-Rs)/Ps.width)):!ks&&ws<=dn.left+Ps.width&&(Ms.x=Direction.Backward,Ds.x=xs*Math.abs((dn.left+Ps.width-ws)/Ps.width)),{direction:Ms,speed:Ds}}function getScrollElementRect(ds){if(ds===document.scrollingElement){const{innerWidth:Es,innerHeight:ws}=window;return{top:0,left:0,right:Es,bottom:ws,width:Es,height:ws}}const{top:dn,left:ms,right:xs,bottom:bs}=ds.getBoundingClientRect();return{top:dn,left:ms,right:xs,bottom:bs,width:ds.clientWidth,height:ds.clientHeight}}function getScrollOffsets(ds){return ds.reduce((dn,ms)=>add(dn,getScrollCoordinates(ms)),defaultCoordinates)}function getScrollXOffset(ds){return ds.reduce((dn,ms)=>dn+getScrollXCoordinate(ms),0)}function getScrollYOffset(ds){return ds.reduce((dn,ms)=>dn+getScrollYCoordinate(ms),0)}function scrollIntoViewIfNeeded(ds,dn){if(dn===void 0&&(dn=getClientRect),!ds)return;const{top:ms,left:xs,bottom:bs,right:Es}=dn(ds);getFirstScrollableAncestor(ds)&&(bs<=0||Es<=0||ms>=window.innerHeight||xs>=window.innerWidth)&&ds.scrollIntoView({block:"center",inline:"center"})}const properties=[["x",["left","right"],getScrollXOffset],["y",["top","bottom"],getScrollYOffset]];class Rect{constructor(dn,ms){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 xs=getScrollableAncestors(ms),bs=getScrollOffsets(xs);this.rect={...dn},this.width=dn.width,this.height=dn.height;for(const[Es,ws,Rs]of properties)for(const js of ws)Object.defineProperty(this,js,{get:()=>{const Cs=Rs(xs),As=bs[Es]-Cs;return this.rect[js]+As},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Listeners{constructor(dn){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(ms=>{var xs;return(xs=this.target)==null?void 0:xs.removeEventListener(...ms)})},this.target=dn}add(dn,ms,xs){var bs;(bs=this.target)==null||bs.addEventListener(dn,ms,xs),this.listeners.push([dn,ms,xs])}}function getEventListenerTarget(ds){const{EventTarget:dn}=getWindow(ds);return ds instanceof dn?ds:getOwnerDocument(ds)}function hasExceededDistance(ds,dn){const ms=Math.abs(ds.x),xs=Math.abs(ds.y);return typeof dn=="number"?Math.sqrt(ms**2+xs**2)>dn:"x"in dn&&"y"in dn?ms>dn.x&&xs>dn.y:"x"in dn?ms>dn.x:"y"in dn?xs>dn.y:!1}var EventName;(function(ds){ds.Click="click",ds.DragStart="dragstart",ds.Keydown="keydown",ds.ContextMenu="contextmenu",ds.Resize="resize",ds.SelectionChange="selectionchange",ds.VisibilityChange="visibilitychange"})(EventName||(EventName={}));function preventDefault(ds){ds.preventDefault()}function stopPropagation(ds){ds.stopPropagation()}var KeyboardCode;(function(ds){ds.Space="Space",ds.Down="ArrowDown",ds.Right="ArrowRight",ds.Left="ArrowLeft",ds.Up="ArrowUp",ds.Esc="Escape",ds.Enter="Enter",ds.Tab="Tab"})(KeyboardCode||(KeyboardCode={}));
1421const defaultKeyboardCodes={start:[KeyboardCode.Space,KeyboardCode.Enter],cancel:[KeyboardCode.Esc],end:[KeyboardCode.Space,KeyboardCode.Enter,KeyboardCode.Tab]},defaultKeyboardCoordinateGetter=(ds,dn)=>{let{currentCoordinates:ms}=dn;switch(ds.code){case KeyboardCode.Right:return{...ms,x:ms.x+25};case KeyboardCode.Left:return{...ms,x:ms.x-25};case KeyboardCode.Down:return{...ms,y:ms.y+25};case KeyboardCode.Up:return{...ms,y:ms.y-25}}};class KeyboardSensor{constructor(dn){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=dn;const{event:{target:ms}}=dn;this.props=dn,this.listeners=new Listeners(getOwnerDocument(ms)),this.windowListeners=new Listeners(getWindow(ms)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(EventName.Resize,this.handleCancel),this.windowListeners.add(EventName.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(EventName.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:dn,onStart:ms}=this.props,xs=dn.node.current;xs&&scrollIntoViewIfNeeded(xs),ms(defaultCoordinates)}handleKeyDown(dn){if(isKeyboardEvent(dn)){const{active:ms,context:xs,options:bs}=this.props,{keyboardCodes:Es=defaultKeyboardCodes,coordinateGetter:ws=defaultKeyboardCoordinateGetter,scrollBehavior:Rs="smooth"}=bs,{code:js}=dn;if(Es.end.includes(js)){this.handleEnd(dn);return}if(Es.cancel.includes(js)){this.handleCancel(dn);return}const{collisionRect:Cs}=xs.current,As=Cs?{x:Cs.left,y:Cs.top}:defaultCoordinates;this.referenceCoordinates||(this.referenceCoordinates=As);const ks=ws(dn,{active:ms,context:xs.current,currentCoordinates:As});if(ks){const Os=subtract(ks,As),Ms={x:0,y:0},{scrollableAncestors:Ds}=xs.current;for(const Ps of Ds){const Ls=dn.code,{isTop:Bs,isRight:Fs,isLeft:Us,isBottom:Gs,maxScroll:Js,minScroll:Ws}=getScrollPosition(Ps),Zs=getScrollElementRect(Ps),Ys={x:Math.min(Ls===KeyboardCode.Right?Zs.right-Zs.width/2:Zs.right,Math.max(Ls===KeyboardCode.Right?Zs.left:Zs.left+Zs.width/2,ks.x)),y:Math.min(Ls===KeyboardCode.Down?Zs.bottom-Zs.height/2:Zs.bottom,Math.max(Ls===KeyboardCode.Down?Zs.top:Zs.top+Zs.height/2,ks.y))},Qs=Ls===KeyboardCode.Right&&!Fs||Ls===KeyboardCode.Left&&!Us,ai=Ls===KeyboardCode.Down&&!Gs||Ls===KeyboardCode.Up&&!Bs;if(Qs&&Ys.x!==ks.x){const ia=Ps.scrollLeft+Os.x,ca=Ls===KeyboardCode.Right&&ia<=Js.x||Ls===KeyboardCode.Left&&ia>=Ws.x;if(ca&&!Os.y){Ps.scrollTo({left:ia,behavior:Rs});return}ca?Ms.x=Ps.scrollLeft-ia:Ms.x=Ls===KeyboardCode.Right?Ps.scrollLeft-Js.x:Ps.scrollLeft-Ws.x,Ms.x&&Ps.scrollBy({left:-Ms.x,behavior:Rs});break}else if(ai&&Ys.y!==ks.y){const ia=Ps.scrollTop+Os.y,ca=Ls===KeyboardCode.Down&&ia<=Js.y||Ls===KeyboardCode.Up&&ia>=Ws.y;if(ca&&!Os.x){Ps.scrollTo({top:ia,behavior:Rs});return}ca?Ms.y=Ps.scrollTop-ia:Ms.y=Ls===KeyboardCode.Down?Ps.scrollTop-Js.y:Ps.scrollTop-Ws.y,Ms.y&&Ps.scrollBy({top:-Ms.y,behavior:Rs});break}}this.handleMove(dn,add(subtract(ks,this.referenceCoordinates),Ms))}}}handleMove(dn,ms){const{onMove:xs}=this.props;dn.preventDefault(),xs(ms)}handleEnd(dn){const{onEnd:ms}=this.props;dn.preventDefault(),this.detach(),ms()}handleCancel(dn){const{onCancel:ms}=this.props;dn.preventDefault(),this.detach(),ms()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}KeyboardSensor.activators=[{eventName:"onKeyDown",handler:(ds,dn,ms)=>{let{keyboardCodes:xs=defaultKeyboardCodes,onActivation:bs}=dn,{active:Es}=ms;const{code:ws}=ds.nativeEvent;if(xs.start.includes(ws)){const Rs=Es.activatorNode.current;return Rs&&ds.target!==Rs?!1:(ds.preventDefault(),bs?.({event:ds.nativeEvent}),!0)}return!1}}];function isDistanceConstraint(ds){return!!(ds&&"distance"in ds)}function isDelayConstraint(ds){return!!(ds&&"delay"in ds)}class AbstractPointerSensor{constructor(dn,ms,xs){var bs;xs===void 0&&(xs=getEventListenerTarget(dn.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=dn,this.events=ms;const{event:Es}=dn,{target:ws}=Es;this.props=dn,this.events=ms,this.document=getOwnerDocument(ws),this.documentListeners=new Listeners(this.document),this.listeners=new Listeners(xs),this.windowListeners=new Listeners(getWindow(ws)),this.initialCoordinates=(bs=getEventC
1421oordinates(Es))!=null?bs:defaultCoordinates,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:dn,props:{options:{activationConstraint:ms,bypassActivationConstraint:xs}}}=this;if(this.listeners.add(dn.move.name,this.handleMove,{passive:!1}),this.listeners.add(dn.end.name,this.handleEnd),dn.cancel&&this.listeners.add(dn.cancel.name,this.handleCancel),this.windowListeners.add(EventName.Resize,this.handleCancel),this.windowListeners.add(EventName.DragStart,preventDefault),this.windowListeners.add(EventName.VisibilityChange,this.handleCancel),this.windowListeners.add(EventName.ContextMenu,preventDefault),this.documentListeners.add(EventName.Keydown,this.handleKeydown),ms){if(xs!=null&&xs({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(isDelayConstraint(ms)){this.timeoutId=setTimeout(this.handleStart,ms.delay),this.handlePending(ms);return}if(isDistanceConstraint(ms)){this.handlePending(ms);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(dn,ms){const{active:xs,onPending:bs}=this.props;bs(xs,dn,this.initialCoordinates,ms)}handleStart(){const{initialCoordinates:dn}=this,{onStart:ms}=this.props;dn&&(this.activated=!0,this.documentListeners.add(EventName.Click,stopPropagation,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(EventName.SelectionChange,this.removeTextSelection),ms(dn))}handleMove(dn){var ms;const{activated:xs,initialCoordinates:bs,props:Es}=this,{onMove:ws,options:{activationConstraint:Rs}}=Es;if(!bs)return;const js=(ms=getEventCoordinates(dn))!=null?ms:defaultCoordinates,Cs=subtract(bs,js);if(!xs&&Rs){if(isDistanceConstraint(Rs)){if(Rs.tolerance!=null&&hasExceededDistance(Cs,Rs.tolerance))return this.handleCancel();if(hasExceededDistance(Cs,Rs.distance))return this.handleStart()}if(isDelayConstraint(Rs)&&hasExceededDistance(Cs,Rs.tolerance))return this.handleCancel();this.handlePending(Rs,Cs);return}dn.cancelable&&dn.preventDefault(),ws(js)}handleEnd(){const{onAbort:dn,onEnd:ms}=this.props;this.detach(),this.activated||dn(this.props.active),ms()}handleCancel(){const{onAbort:dn,onCancel:ms}=this.props;this.detach(),this.activated||dn(this.props.active),ms()}handleKeydown(dn){dn.code===KeyboardCode.Esc&&this.handleCancel()}removeTextSelection(){var dn;(dn=this.document.getSelection())==null||dn.removeAllRanges()}}const events={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class PointerSensor extends AbstractPointerSensor{constructor(dn){const{event:ms}=dn,xs=getOwnerDocument(ms.target);super(dn,events,xs)}}PointerSensor.activators=[{eventName:"onPointerDown",handler:(ds,dn)=>{let{nativeEvent:ms}=ds,{onActivation:xs}=dn;return!ms.isPrimary||ms.button!==0?!1:(xs?.({event:ms}),!0)}}];const events$1={move:{name:"mousemove"},end:{name:"mouseup"}};var MouseButton;(function(ds){ds[ds.RightClick=2]="RightClick"})(MouseButton||(MouseButton={}));class MouseSensor extends AbstractPointerSensor{constructor(dn){super(dn,events$1,getOwnerDocument(dn.event.target))}}MouseSensor.activators=[{eventName:"onMouseDown",handler:(ds,dn)=>{let{nativeEvent:ms}=ds,{onActivation:xs}=dn;return ms.button===MouseButton.RightClick?!1:(xs?.({event:ms}),!0)}}];const events$2={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class TouchSensor extends AbstractPointerSensor{constructor(dn){super(dn,events$2)}static setup(){return window.addEventListener(events$2.move.name,dn,{capture:!1,passive:!1}),function(){window.removeEventListener(events$2.move.name,dn)};function dn(){}}}TouchSensor.activators=[{eventName:"onTouchStart",handler:(ds,dn)=>{let{nativeEvent:ms}=ds,{onActivation:xs}=dn;const{touches:bs}=ms;return bs.length>1?!1:(xs?.({event:ms}),!0)}}];var AutoScrollActivator;(function(ds){ds[ds.Pointer=0]="Pointer",ds[ds.DraggableRect=1]="DraggableRect"})(AutoScrollActivator||(AutoScrollActivator={}));var TraversalOrder;(function(ds){ds[ds.TreeOrder=0]="TreeOrder",ds[ds.ReversedTreeOrder=1]="Rever
1421sedTreeOrder"})(TraversalOrder||(TraversalOrder={}));function useAutoScroller(ds){let{acceleration:dn,activator:ms=AutoScrollActivator.Pointer,canScroll:xs,draggingRect:bs,enabled:Es,interval:ws=5,order:Rs=TraversalOrder.TreeOrder,pointerCoordinates:js,scrollableAncestors:Cs,scrollableAncestorRects:As,delta:ks,threshold:Os}=ds;const Ms=useScrollIntent({delta:ks,disabled:!Es}),[Ds,Ps]=useInterval(),Ls=reactExports.useRef({x:0,y:0}),Bs=reactExports.useRef({x:0,y:0}),Fs=reactExports.useMemo(()=>{switch(ms){case AutoScrollActivator.Pointer:return js?{top:js.y,bottom:js.y,left:js.x,right:js.x}:null;case AutoScrollActivator.DraggableRect:return bs}},[ms,bs,js]),Us=reactExports.useRef(null),Gs=reactExports.useCallback(()=>{const Ws=Us.current;if(!Ws)return;const Zs=Ls.current.x*Bs.current.x,Ys=Ls.current.y*Bs.current.y;Ws.scrollBy(Zs,Ys)},[]),Js=reactExports.useMemo(()=>Rs===TraversalOrder.TreeOrder?[...Cs].reverse():Cs,[Rs,Cs]);reactExports.useEffect(()=>{if(!Es||!Cs.length||!Fs){Ps();return}for(const Ws of Js){if(xs?.(Ws)===!1)continue;const Zs=Cs.indexOf(Ws),Ys=As[Zs];if(!Ys)continue;const{direction:Qs,speed:ai}=getScrollDirectionAndSpeed(Ws,Ys,Fs,dn,Os);for(const ia of["x","y"])Ms[ia][Qs[ia]]||(ai[ia]=0,Qs[ia]=0);if(ai.x>0||ai.y>0){Ps(),Us.current=Ws,Ds(Gs,ws),Ls.current=ai,Bs.current=Qs;return}}Ls.current={x:0,y:0},Bs.current={x:0,y:0},Ps()},[dn,Gs,xs,Ps,Es,ws,JSON.stringify(Fs),JSON.stringify(Ms),Ds,Cs,Js,As,JSON.stringify(Os)])}const defaultScrollIntent={x:{[Direction.Backward]:!1,[Direction.Forward]:!1},y:{[Direction.Backward]:!1,[Direction.Forward]:!1}};function useScrollIntent(ds){let{delta:dn,disabled:ms}=ds;const xs=usePrevious(dn);return useLazyMemo(bs=>{if(ms||!xs||!bs)return defaultScrollIntent;const Es={x:Math.sign(dn.x-xs.x),y:Math.sign(dn.y-xs.y)};return{x:{[Direction.Backward]:bs.x[Direction.Backward]||Es.x===-1,[Direction.Forward]:bs.x[Direction.Forward]||Es.x===1},y:{[Direction.Backward]:bs.y[Direction.Backward]||Es.y===-1,[Direction.Forward]:bs.y[Direction.Forward]||Es.y===1}}},[ms,dn,xs])}function useCachedNode(ds,dn){const ms=dn!=null?ds.get(dn):void 0,xs=ms?ms.node.current:null;return useLazyMemo(bs=>{var Es;return dn==null?null:(Es=xs??bs)!=null?Es:null},[xs,dn])}function useCombineActivators(ds,dn){return reactExports.useMemo(()=>ds.reduce((ms,xs)=>{const{sensor:bs}=xs,Es=bs.activators.map(ws=>({eventName:ws.eventName,handler:dn(ws.handler,xs)}));return[...ms,...Es]},[]),[ds,dn])}var MeasuringStrategy;(function(ds){ds[ds.Always=0]="Always",ds[ds.BeforeDragging=1]="BeforeDragging",ds[ds.WhileDragging=2]="WhileDragging"})(MeasuringStrategy||(MeasuringStrategy={}));var MeasuringFrequency;(function(ds){ds.Optimized="optimized"})(MeasuringFrequency||(MeasuringFrequency={}));const defaultValue=new Map;function useDroppableMeasuring(ds,dn){let{dragging:ms,dependencies:xs,config:bs}=dn;const[Es,ws]=reactExports.useState(null),{frequency:Rs,measure:js,strategy:Cs}=bs,As=reactExports.useRef(ds),ks=Ls(),Os=useLatestValue(ks),Ms=reactExports.useCallback(function(Bs){Bs===void 0&&(Bs=[]),!Os.current&&ws(Fs=>Fs===null?Bs:Fs.concat(Bs.filter(Us=>!Fs.includes(Us))))},[Os]),Ds=reactExports.useRef(null),Ps=useLazyMemo(Bs=>{if(ks&&!ms)return defaultValue;if(!Bs||Bs===defaultValue||As.current!==ds||Es!=null){const Fs=new Map;for(let Us of ds){if(!Us)continue;if(Es&&Es.length>0&&!Es.includes(Us.id)&&Us.rect.current){Fs.set(Us.id,Us.rect.current);continue}const Gs=Us.node.current,Js=Gs?new Rect(js(Gs),Gs):null;Us.rect.current=Js,Js&&Fs.set(Us.id,Js)}return Fs}return Bs},[ds,Es,ms,ks,js]);return reactExports.useEffect(()=>{As.current=ds},[ds]),reactExports.useEffect(()=>{ks||Ms()},[ms,ks]),reactExports.useEffect(()=>{Es&&Es.length>0&&ws(null)},[JSON.stringify(Es)]),reactExports.useEffect(()=>{ks||typeof Rs!="number"||Ds.current!==null||(Ds.current=setTimeout(()=>{Ms(),Ds.current=null},Rs))},[Rs,ks,Ms,...xs]),{droppableRects:Ps,measureDroppableContainers:Ms,measuringScheduled:Es!=null};function Ls(){switch(Cs){case MeasuringStrategy.Always:return!1;case MeasuringStrategy.BeforeDragging:return ms;default:return!ms}}}function useInitialValue(ds,dn){return useLazyMemo(ms=>ds?ms||(typeof dn=="function"?dn(ds):ds):null,[dn,ds])}function useInitialRect(ds,dn){return useInitialValue(ds,dn)}function useMutationObserver(ds){let{callback:dn,disabled:ms}=ds;const xs=useEvent(dn),bs=reactExports.useMemo(()=>
1421{if(ms||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:Es}=window;return new Es(xs)},[xs,ms]);return reactExports.useEffect(()=>()=>bs?.disconnect(),[bs]),bs}function useResizeObserver(ds){let{callback:dn,disabled:ms}=ds;const xs=useEvent(dn),bs=reactExports.useMemo(()=>{if(ms||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:Es}=window;return new Es(xs)},[ms]);return reactExports.useEffect(()=>()=>bs?.disconnect(),[bs]),bs}function defaultMeasure(ds){return new Rect(getClientRect(ds),ds)}function useRect(ds,dn,ms){dn===void 0&&(dn=defaultMeasure);const[xs,bs]=reactExports.useState(null);function Es(){bs(js=>{if(!ds)return null;if(ds.isConnected===!1){var Cs;return(Cs=js??ms)!=null?Cs:null}const As=dn(ds);return JSON.stringify(js)===JSON.stringify(As)?js:As})}const ws=useMutationObserver({callback(js){if(ds)for(const Cs of js){const{type:As,target:ks}=Cs;if(As==="childList"&&ks instanceof HTMLElement&&ks.contains(ds)){Es();break}}}}),Rs=useResizeObserver({callback:Es});return useIsomorphicLayoutEffect(()=>{Es(),ds?(Rs?.observe(ds),ws?.observe(document.body,{childList:!0,subtree:!0})):(Rs?.disconnect(),ws?.disconnect())},[ds]),xs}function useRectDelta(ds){const dn=useInitialValue(ds);return getRectDelta(ds,dn)}const defaultValue$1=[];function useScrollableAncestors(ds){const dn=reactExports.useRef(ds),ms=useLazyMemo(xs=>ds?xs&&xs!==defaultValue$1&&ds&&dn.current&&ds.parentNode===dn.current.parentNode?xs:getScrollableAncestors(ds):defaultValue$1,[ds]);return reactExports.useEffect(()=>{dn.current=ds},[ds]),ms}function useScrollOffsets(ds){const[dn,ms]=reactExports.useState(null),xs=reactExports.useRef(ds),bs=reactExports.useCallback(Es=>{const ws=getScrollableElement(Es.target);ws&&ms(Rs=>Rs?(Rs.set(ws,getScrollCoordinates(ws)),new Map(Rs)):null)},[]);return reactExports.useEffect(()=>{const Es=xs.current;if(ds!==Es){ws(Es);const Rs=ds.map(js=>{const Cs=getScrollableElement(js);return Cs?(Cs.addEventListener("scroll",bs,{passive:!0}),[Cs,getScrollCoordinates(Cs)]):null}).filter(js=>js!=null);ms(Rs.length?new Map(Rs):null),xs.current=ds}return()=>{ws(ds),ws(Es)};function ws(Rs){Rs.forEach(js=>{const Cs=getScrollableElement(js);Cs?.removeEventListener("scroll",bs)})}},[bs,ds]),reactExports.useMemo(()=>ds.length?dn?Array.from(dn.values()).reduce((Es,ws)=>add(Es,ws),defaultCoordinates):getScrollOffsets(ds):defaultCoordinates,[ds,dn])}function useScrollOffsetsDelta(ds,dn){dn===void 0&&(dn=[]);const ms=reactExports.useRef(null);return reactExports.useEffect(()=>{ms.current=null},dn),reactExports.useEffect(()=>{const xs=ds!==defaultCoordinates;xs&&!ms.current&&(ms.current=ds),!xs&&ms.current&&(ms.current=null)},[ds]),ms.current?subtract(ds,ms.current):defaultCoordinates}function useSensorSetup(ds){reactExports.useEffect(()=>{if(!canUseDOM)return;const dn=ds.map(ms=>{let{sensor:xs}=ms;return xs.setup==null?void 0:xs.setup()});return()=>{for(const ms of dn)ms?.()}},ds.map(dn=>{let{sensor:ms}=dn;return ms}))}function useSyntheticListeners(ds,dn){return reactExports.useMemo(()=>ds.reduce((ms,xs)=>{let{eventName:bs,handler:Es}=xs;return ms[bs]=ws=>{Es(ws,dn)},ms},{}),[ds,dn])}function useWindowRect(ds){return reactExports.useMemo(()=>ds?getWindowClientRect(ds):null,[ds])}const defaultValue$2=[];function useRects(ds,dn){dn===void 0&&(dn=getClientRect);const[ms]=ds,xs=useWindowRect(ms?getWindow(ms):null),[bs,Es]=reactExports.useState(defaultValue$2);function ws(){Es(()=>ds.length?ds.map(js=>isDocumentScrollingElement(js)?xs:new Rect(dn(js),js)):defaultValue$2)}const Rs=useResizeObserver({callback:ws});return useIsomorphicLayoutEffect(()=>{Rs?.disconnect(),ws(),ds.forEach(js=>Rs?.observe(js))},[ds]),bs}function getMeasurableNode(ds){if(!ds)return null;if(ds.children.length>1)return ds;const dn=ds.children[0];return isHTMLElement(dn)?dn:ds}function useDragOverlayMeasuring(ds){let{measure:dn}=ds;const[ms,xs]=reactExports.useState(null),bs=reactExports.useCallback(Cs=>{for(const{target:As}of Cs)if(isHTMLElement(As)){xs(ks=>{const Os=dn(As);return ks?{...ks,width:Os.width,height:Os.height}:Os});break}},[dn]),Es=useResizeObserver({callback:bs}),ws=reactExports.useCallback(Cs=>{const As=getMeasurableNode(Cs);Es?.disconnect(),As&&Es?.observe(As),xs(As?dn(As):null)},[dn,Es]),[Rs,js]=useNodeRef(ws);return reactExports.useMemo(()=>({nodeRef:Rs,rect:ms,setRef:js}),[ms,Rs,js])}const defaultSensors=[{sensor:PointerSensor,options:{}},{sensor:KeyboardSensor,options:{}}],defaultData={current:{}},defaultMeasuringConfiguration={draggable:{measure:getTransformAgnosticClientRect},droppable:{measure:getTransformAgnosticClientRect,strategy:MeasuringStrategy.WhileDragging,frequency:MeasuringFrequency.Optimized},dragOverlay:{measure:getClientRect}};class DroppableContainersMap extends Map{get(dn){var ms;return dn!=null&&(ms=super.get(dn))!=null?ms:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(dn=>{let{disabled:ms}=dn;return!ms})}getNodeFor(dn){var ms,xs;return(ms=(xs=this.get(dn))==null?void 0:xs.node.current)!=null?ms:void 0}}const defaultPublicContext={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new DroppableContainersMap,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:noop},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:defaultMeasuringConfiguration,measureDroppableContainers:noop,windowRect:null,measuringScheduled:!1},defaultInternalContext={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:noop,draggableNodes:new Map,over:null,measureDroppableContainers:noop},InternalContext=reactExports.createContext(defaultInternalContext),PublicContext=reactExports.createContext(defaultPublicContext);function getInitialState(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new DroppableContainersMap}}}function reducer(ds,dn){switch(dn.type){case Action.DragStart:return{...ds,draggable:{...ds.draggable,initialCoordinates:dn.initialCoordinates,active:dn.active}};case Action.DragMove:return ds.draggable.active==null?ds:{...ds,draggable:{...ds.draggable,translate:{x:dn.coordinates.x-ds.draggable.initialCoordinates.x,y:dn.coordinates.y-ds.draggable.initialCoordinates.y}}};case Action.DragEnd:case Action.DragCancel:return{...ds,draggable:{...ds.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Action.RegisterDroppable:{const{element:ms}=dn,{id:xs}
1421=ms,bs=new DroppableContainersMap(ds.droppable.containers);return bs.set(xs,ms),{...ds,droppable:{...ds.droppable,containers:bs}}}case Action.SetDroppableDisabled:{const{id:ms,key:xs,disabled:bs}=dn,Es=ds.droppable.containers.get(ms);if(!Es||xs!==Es.key)return ds;const ws=new DroppableContainersMap(ds.droppable.containers);return ws.set(ms,{...Es,disabled:bs}),{...ds,droppable:{...ds.droppable,containers:ws}}}case Action.UnregisterDroppable:{const{id:ms,key:xs}=dn,bs=ds.droppable.containers.get(ms);if(!bs||xs!==bs.key)return ds;const Es=new DroppableContainersMap(ds.droppable.containers);return Es.delete(ms),{...ds,droppable:{...ds.droppable,containers:Es}}}default:return ds}}function RestoreFocus(ds){let{disabled:dn}=ds;const{active:ms,activatorEvent:xs,draggableNodes:bs}=reactExports.useContext(InternalContext),Es=usePrevious(xs),ws=usePrevious(ms?.id);return reactExports.useEffect(()=>{if(!dn&&!xs&&Es&&ws!=null){if(!isKeyboardEvent(Es)||document.activeElement===Es.target)return;const Rs=bs.get(ws);if(!Rs)return;const{activatorNode:js,node:Cs}=Rs;if(!js.current&&!Cs.current)return;requestAnimationFrame(()=>{for(const As of[js.current,Cs.current]){if(!As)continue;const ks=findFirstFocusableNode(As);if(ks){ks.focus();break}}})}},[xs,dn,bs,ws,Es]),null}function applyModifiers(ds,dn){let{transform:ms,...xs}=dn;return ds!=null&&ds.length?ds.reduce((bs,Es)=>Es({transform:bs,...xs}),ms):ms}function useMeasuringConfiguration(ds){return reactExports.useMemo(()=>({draggable:{...defaultMeasuringConfiguration.draggable,...ds?.draggable},droppable:{...defaultMeasuringConfiguration.droppable,...ds?.droppable},dragOverlay:{...defaultMeasuringConfiguration.dragOverlay,...ds?.dragOverlay}}),[ds?.draggable,ds?.droppable,ds?.dragOverlay])}function useLayoutShiftScrollCompensation(ds){let{activeNode:dn,measure:ms,initialRect:xs,config:bs=!0}=ds;const Es=reactExports.useRef(!1),{x:ws,y:Rs}=typeof bs=="boolean"?{x:bs,y:bs}:bs;useIsomorphicLayoutEffect(()=>{if(!ws&&!Rs||!dn){Es.current=!1;return}if(Es.current||!xs)return;const Cs=dn?.node.current;if(!Cs||Cs.isConnected===!1)return;const As=ms(Cs),ks=getRectDelta(As,xs);if(ws||(ks.x=0),Rs||(ks.y=0),Es.current=!0,Math.abs(ks.x)>0||Math.abs(ks.y)>0){const Os=getFirstScrollableAncestor(Cs);Os&&Os.scrollBy({top:ks.y,left:ks.x})}},[dn,ws,Rs,xs,ms])}const ActiveDraggableContext=reactExports.createContext({...defaultCoordinates,scaleX:1,scaleY:1});var Status;(function(ds){ds[ds.Uninitialized=0]="Uninitialized",ds[ds.Initializing=1]="Initializing",ds[ds.Initialized=2]="Initialized"})(Status||(Status={}));const DndContext=reactExports.memo(function ds(dn){var ms,xs,bs,Es;let{id:ws,accessibility:Rs,autoScroll:js=!0,children:Cs,sensors:As=defaultSensors,collisionDetection:ks=rectIntersection,measuring:Os,modifiers:Ms,...Ds}=dn;const Ps=reactExports.useReducer(reducer,void 0,getInitialState),[Ls,Bs]=Ps,[Fs,Us]=useDndMonitorProvider(),[Gs,Js]=reactExports.useState(Status.Uninitialized),Ws=Gs===Status.Initialized,{draggable:{active:Zs,nodes:Ys,translate:Qs},droppable:{containers:ai}}=Ls,ia=Zs!=null?Ys.get(Zs):null,ca=reactExports.useRef({initial:null,translated:null}),ha=reactExports.useMemo(()=>{var Za;return Zs!=null?{id:Zs,data:(Za=ia?.data)!=null?Za:defaultData,rect:ca}:null},[Zs,ia]),ea=reactExports.useRef(null),[ta,aa]=reactExports.useState(null),[fa,ua]=reactExports.useState(null),Ea=useLatestValue(Ds,Object.values(Ds)),ra=useUniqueId("DndDescribedBy",ws),Ia=reactExports.useMemo(()=>ai.getEnabled(),[ai]),$a=useMeasuringConfiguration(Os),{droppableRects:oa,measureDroppableContainers:sa,measuringScheduled:Ra}=useDroppableMeasuring(Ia,{dragging:Ws,dependencies:[Qs.x,Qs.y],config:$a.droppable}),_a=useCachedNode(Ys,Zs),Oa=reactExports.useMemo(()=>fa?getEventCoordinates(fa):null,[fa]),za=Ja(),Ga=useInitialRect(_a,$a.draggable.measure);useLayoutShiftScrollCompensation({activeNode:Zs!=null?Ys.get(Zs):null,config:za.layoutShiftCompensation,initialRect:Ga,measure:$a.draggable.measure});const qa=useRect(_a,$a.draggable.measure,Ga),Ma=useRect(_a?_a.parentElement:null),Fa=reactExports.useRef({activatorEvent:null,active:null,activeNode:_a,collisionRect:null,collisions:null,droppableRects:oa,draggableNodes:Ys,draggingNode:null,draggingNodeRect:null,droppableContainers:ai,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ka=ai.getNodeFor((ms=Fa.current.over)==null?void 0:ms.id),mo=useDragOverlayMeasuring({measure:$a.dragOverlay.measure}),ko=(xs=mo.nodeRef.current)!=null?xs:_a,bo=Ws?(bs=mo.rect)!=null?bs:qa:null,oo=!!(mo.nodeRef.current&&mo.rect),Va=useRectDelta(oo?null:qa),uo=useWindowRect(ko?getWindow(ko):null),Eo=useScrollableAncestors(Ws?Ka??_a:null),Ao=useRects(Eo),Zo=applyModifiers(Ms,{transform:{x:Qs.x-Va.x,y:Qs.y-Va.y,scaleX:1,scaleY:1},activatorEvent:fa,active:ha,activeNodeRect:qa,containerNodeRect:Ma,draggingNodeRect:bo,over:Fa.current.over,overlayNodeRect:mo.rect,scrollableAncestors:Eo,scrollableAncestorRects:Ao,windowRect:uo}),sl=Oa?add(Oa,Qs):null,Po=useScrollOffsets(Eo),Ro=useScrollOffsetsDelta(Po),Vs=useScrollOffsetsDelta(Po,[qa]),la=add(Zo,Ro),ga=bo?getAdjustedRect(bo,Zo):null,Na=ha&&ga?ks({active:ha,collisionRect:ga,droppableRects:oa,droppableContainers:Ia,pointerCoordinates:sl}):null,Hs=getFirstCollision(Na,"id"),[zs,qs]=reactExports.useState(null),Xs=oo?Zo:add(Zo,Vs),na=adjustScale(Xs,(Es=zs?.rect)!=null?Es:null,qa),da=reactExports.useRef(null),xa=reactExports.useCallback((Za,Xo)=>{let{sensor:El,options:Dl}=Xo;if(ea.current==null)return;const _l=Ys.get(ea.current);if(!_l)return;const ml=Za.nativeEvent,il=new El({active:ea.current,activeNode:_l,event:ml,options:Dl,context:Fa,onAbort(Lo){if(!Ys.get(Lo))return;const{onDragAbort:$l}=Ea.current,pa={id:Lo};
1421$l?.(pa),Fs({type:"onDragAbort",event:pa})},onPending(Lo,Go,$l,pa){if(!Ys.get(Lo))return;const{onDragPending:Ca}=Ea.current,Ua={id:Lo,constraint:Go,initialCoordinates:$l,offset:pa};Ca?.(Ua),Fs({type:"onDragPending",event:Ua})},onStart(Lo){const Go=ea.current;if(Go==null)return;const $l=Ys.get(Go);if(!$l)return;const{onDragStart:pa}=Ea.current,ba={activatorEvent:ml,active:{id:Go,data:$l.data,rect:ca}};reactDomExports.unstable_batchedUpdates(()=>{pa?.(ba),Js(Status.Initializing),Bs({type:Action.DragStart,initialCoordinates:Lo,active:Go}),Fs({type:"onDragStart",event:ba}),aa(da.current),ua(ml)})},onMove(Lo){Bs({type:Action.DragMove,coordinates:Lo})},onEnd:Wo(Action.DragEnd),onCancel:Wo(Action.DragCancel)});da.current=il;function Wo(Lo){return async function(){const{active:$l,collisions:pa,over:ba,scrollAdjustedTranslate:Ca}=Fa.current;let Ua=null;if($l&&Ca){const{cancelDrop:Ba}=Ea.current;Ua={activatorEvent:ml,active:$l,collisions:pa,delta:Ca,over:ba},Lo===Action.DragEnd&&typeof Ba=="function"&&await Promise.resolve(Ba(Ua))&&(Lo=Action.DragCancel)}ea.current=null,reactDomExports.unstable_batchedUpdates(()=>{Bs({type:Lo}),Js(Status.Uninitialized),qs(null),aa(null),ua(null),da.current=null;const Ba=Lo===Action.DragEnd?"onDragEnd":"onDragCancel";if(Ua){const Qa=Ea.current[Ba];Qa?.(Ua),Fs({type:Ba,event:Ua})}})}}},[Ys]),ka=reactExports.useCallback((Za,Xo)=>(El,Dl)=>{const _l=El.nativeEvent,ml=Ys.get(Dl);if(ea.current!==null||!ml||_l.dndKit||_l.defaultPrevented)return;const il={active:ml};Za(El,Xo.options,il)===!0&&(_l.dndKit={capturedBy:Xo.sensor},ea.current=Dl,xa(El,Xo))},[Ys,xa]),Ha=useCombineActivators(As,ka);useSensorSetup(As),useIsomorphicLayoutEffect(()=>{qa&&Gs===Status.Initializing&&Js(Status.Initialized)},[qa,Gs]),reactExports.useEffect(()=>{const{onDragMove:Za}=Ea.current,{active:Xo,activatorEvent:El,collisions:Dl,over:_l}=Fa.current;if(!Xo||!El)return;const ml={active:Xo,activatorEvent:El,collisions:Dl,delta:{x:la.x,y:la.y},over:_l};reactDomExports.unstable_batchedUpdates(()=>{Za?.(ml),Fs({type:"onDragMove",event:ml})})},[la.x,la.y]),reactExports.useEffect(()=>{const{active:Za,activatorEvent:Xo,collisions:El,droppableContainers:Dl,scrollAdjustedTranslate:_l}=Fa.current;if(!Za||ea.current==null||!Xo||!_l)return;const{onDragOver:ml}=Ea.current,il=Dl.get(Hs),Wo=il&&il.rect.current?{id:il.id,rect:il.rect.current,data:il.data,disabled:il.disabled}:null,Lo={active:Za,activatorEvent:Xo,collisions:El,delta:{x:_l.x,y:_l.y},over:Wo};reactDomExports.unstable_batchedUpdates(()=>{qs(Wo),ml?.(Lo),Fs({type:"onDragOver",event:Lo})})},[Hs]),useIsomorphicLayoutEffect(()=>{Fa.current={activatorEvent:fa,active:ha,activeNode:_a,collisionRect:ga,collisions:Na,droppableRects:oa,draggableNodes:Ys,draggingNode:ko,draggingNodeRect:bo,droppableContainers:ai,over:zs,scrollableAncestors:Eo,scrollAdjustedTranslate:la},ca.current={initial:bo,translated:ga}},[ha,_a,Na,ga,Ys,ko,bo,oa,ai,zs,Eo,la]),useAutoScroller({...za,delta:Qs,draggingRect:ga,pointerCoordinates:sl,scrollableAncestors:Eo,scrollableAncestorRects:Ao});const La=reactExports.useMemo(()=>({active:ha,activeNode:_a,activeNodeRect:qa,activatorEvent:fa,collisions:Na,containerNodeRect:Ma,dragOverlay:mo,draggableNodes:Ys,droppableContainers:ai,droppableRects:oa,over:zs,measureDroppableContainers:sa,scrollableAncestors:Eo,scrollableAncestorRects:Ao,measuringConfiguration:$a,measuringScheduled:Ra,windowRect:uo}),[ha,_a,qa,fa,Na,Ma,mo,Ys,ai,oa,zs,sa,Eo,Ao,$a,Ra,uo]),Wa=reactExports.useMemo(()=>({activatorEvent:fa,activators:Ha,active:ha,activeNodeRect:qa,ariaDescribedById:{draggable:ra},dispatch:Bs,draggableNodes:Ys,over:zs,measureDroppableContainers:sa}),[fa,Ha,ha,qa,Bs,ra,Ys,zs,sa]);return React.createElement(DndMonitorContext.Provider,{value:Us},React.createElement(InternalContext.Provider,{value:Wa},React.createElement(PublicContext.Provider,{value:La},React.createElement(ActiveDraggableContext.Provider,{value:na},Cs)),React.createElement(RestoreFocus,{disabled:Rs?.restoreFocus===!1})),React.createElement(Accessibility,{...Rs,hiddenTextDescribedById:ra}));function Ja(){const Za=ta?.autoScrollEnabled===!1,Xo=typeof js=="object"?js.enabled===!1:js===!1,El=Ws&&!Za&&!Xo;return typeof js=="object"?{...js,enabled:El}:{enabled:El}}}),NullContext=reactExports.createContext(null),defaultRole="button",ID_PREFIX$1="Draggable";function useDraggable(ds){let{id:dn,data:ms,disabled:xs=!1,attributes:bs}=ds;
1421const Es=useUniqueId(ID_PREFIX$1),{activators:ws,activatorEvent:Rs,active:js,activeNodeRect:Cs,ariaDescribedById:As,draggableNodes:ks,over:Os}=reactExports.useContext(InternalContext),{role:Ms=defaultRole,roleDescription:Ds="draggable",tabIndex:Ps=0}=bs??{},Ls=js?.id===dn,Bs=reactExports.useContext(Ls?ActiveDraggableContext:NullContext),[Fs,Us]=useNodeRef(),[Gs,Js]=useNodeRef(),Ws=useSyntheticListeners(ws,dn),Zs=useLatestValue(ms);useIsomorphicLayoutEffect(()=>(ks.set(dn,{id:dn,key:Es,node:Fs,activatorNode:Gs,data:Zs}),()=>{const Qs=ks.get(dn);Qs&&Qs.key===Es&&ks.delete(dn)}),[ks,dn]);const Ys=reactExports.useMemo(()=>({role:Ms,tabIndex:Ps,"aria-disabled":xs,"aria-pressed":Ls&&Ms===defaultRole?!0:void 0,"aria-roledescription":Ds,"aria-describedby":As.draggable}),[xs,Ms,Ps,Ls,Ds,As.draggable]);return{active:js,activatorEvent:Rs,activeNodeRect:Cs,attributes:Ys,isDragging:Ls,listeners:xs?void 0:Ws,node:Fs,over:Os,setNodeRef:Us,setActivatorNodeRef:Js,transform:Bs}}function useDndContext(){return reactExports.useContext(PublicContext)}const ID_PREFIX$1$1="Droppable",defaultResizeObserverConfig={timeout:25};function useDroppable(ds){let{data:dn,disabled:ms=!1,id:xs,resizeObserverConfig:bs}=ds;const Es=useUniqueId(ID_PREFIX$1$1),{active:ws,dispatch:Rs,over:js,measureDroppableContainers:Cs}=reactExports.useContext(InternalContext),As=reactExports.useRef({disabled:ms}),ks=reactExports.useRef(!1),Os=reactExports.useRef(null),Ms=reactExports.useRef(null),{disabled:Ds,updateMeasurementsFor:Ps,timeout:Ls}={...defaultResizeObserverConfig,...bs},Bs=useLatestValue(Ps??xs),Fs=reactExports.useCallback(()=>{if(!ks.current){ks.current=!0;return}Ms.current!=null&&clearTimeout(Ms.current),Ms.current=setTimeout(()=>{Cs(Array.isArray(Bs.current)?Bs.current:[Bs.current]),Ms.current=null},Ls)},[Ls]),Us=useResizeObserver({callback:Fs,disabled:Ds||!ws}),Gs=reactExports.useCallback((Ys,Qs)=>{Us&&(Qs&&(Us.unobserve(Qs),ks.current=!1),Ys&&Us.observe(Ys))},[Us]),[Js,Ws]=useNodeRef(Gs),Zs=useLatestValue(dn);return reactExports.useEffect(()=>{!Us||!Js.current||(Us.disconnect(),ks.current=!1,Us.observe(Js.current))},[Js,Us]),reactExports.useEffect(()=>(Rs({type:Action.RegisterDroppable,element:{id:xs,key:Es,disabled:ms,node:Js,rect:Os,data:Zs}}),()=>Rs({type:Action.UnregisterDroppable,key:Es,id:xs})),[xs]),reactExports.useEffect(()=>{ms!==As.current.disabled&&(Rs({type:Action.SetDroppableDisabled,id:xs,key:Es,disabled:ms}),As.current.disabled=ms)},[xs,Es,ms,Rs]),{active:ws,rect:Os,isOver:js?.id===xs,node:Js,over:js,setNodeRef:Ws}}function AnimationManager(ds){let{animation:dn,children:ms}=ds;const[xs,bs]=reactExports.useState(null),[Es,ws]=reactExports.useState(null),Rs=usePrevious(ms);return!ms&&!xs&&Rs&&bs(Rs),useIsomorphicLayoutEffect(()=>{if(!Es)return;const js=xs?.key,Cs=xs?.props.id;if(js==null||Cs==null){bs(null);return}Promise.resolve(dn(Cs,Es)).then(()=>{bs(null)})},[dn,xs,Es]),React.createElement(React.Fragment,null,ms,xs?reactExports.cloneElement(xs,{ref:ws}):null)}const defaultTransform={x:0,y:0,scaleX:1,scaleY:1};function NullifiedContextProvider(ds){let{children:dn}=ds;return React.createElement(InternalContext.Provider,{value:defaultInternalContext},React.createElement(ActiveDraggableContext.Provider,{value:defaultTransform},dn))}const baseStyles={position:"fixed",touchAction:"none"},defaultTransition$1=ds=>isKeyboardEvent(ds)?"transform 250ms ease":void 0,PositionedOverlay=reactExports.forwardRef((ds,dn)=>{let{as:ms,activatorEvent:xs,adjustScale:bs,children:Es,className:ws,rect:Rs,style:js,transform:Cs,transition:As=defaultTransition$1}=ds;if(!Rs)return null;const ks=bs?Cs:{...Cs,scaleX:1,scaleY:1},Os={...baseStyles,width:Rs.width,height:Rs.height,top:Rs.top,left:Rs.left,transform:CSS$1.Transform.toString(ks),transformOrigin:bs&&xs?getRelativeTransformOrigin(xs,Rs):void 0,transition:typeof As=="function"?As(xs):As,...js};return React.createElement(ms,{className:ws,style:Os,ref:dn},Es)}),defaultDropAnimationSideEffects=ds=>dn=>{let{active:ms,dragOverlay:xs}=dn;const bs={},{styles:Es,className:ws}=ds;if(Es!=null&&Es.active)for(const[Rs,js]of Object.entries(Es.active))js!==void 0&&(bs[Rs]=ms.node.style.getPropertyValue(Rs),ms.node.style.setProperty(Rs,js));if(Es!=null&&Es.dragOverlay)for(const[Rs,js]of Object.entries(Es.dragOverlay))js!==void 0&&xs.node.style.setProperty(Rs,js);return ws!=null&&ws.active&&ms.node.classList.add(ws.active),ws!=null&&ws.dragOverlay&&xs.node.classList.add(ws.dragOverlay),function(){for(const[js,Cs]of Object.entries(bs))ms.node.style.setProperty(js,Cs);ws!=null&&ws.active&&ms.node.classList.remove(ws.active)}},defaultKeyframeResolver=ds=>{let{transform:{initial:dn,final:ms}}=ds;return[{transform:CSS$1.Transform.toString(dn)},{transform:CSS$1.Transform.toString(ms)}]},defaultDropAnimationConfiguration={duration:250,easing:"ease",keyframes:defaultKeyframeResolver,sideEffects:defaultDropAnimationSideEffects({styles:{active:{opacity:"0"}}})};function useDropAnimation(ds){let{config:dn,draggableNodes:ms,droppableContainers:xs,measuringConfiguration:bs}=ds;return useEvent((Es,ws)=>
1421{if(dn===null)return;const Rs=ms.get(Es);if(!Rs)return;const js=Rs.node.current;if(!js)return;const Cs=getMeasurableNode(ws);if(!Cs)return;const{transform:As}=getWindow(ws).getComputedStyle(ws),ks=parseTransform(As);if(!ks)return;const Os=typeof dn=="function"?dn:createDefaultDropAnimation(dn);return scrollIntoViewIfNeeded(js,bs.draggable.measure),Os({active:{id:Es,data:Rs.data,node:js,rect:bs.draggable.measure(js)},draggableNodes:ms,dragOverlay:{node:ws,rect:bs.dragOverlay.measure(Cs)},droppableContainers:xs,measuringConfiguration:bs,transform:ks})})}function createDefaultDropAnimation(ds){const{duration:dn,easing:ms,sideEffects:xs,keyframes:bs}={...defaultDropAnimationConfiguration,...ds};return Es=>{let{active:ws,dragOverlay:Rs,transform:js,...Cs}=Es;if(!dn)return;const As={x:Rs.rect.left-ws.rect.left,y:Rs.rect.top-ws.rect.top},ks={scaleX:js.scaleX!==1?ws.rect.width*js.scaleX/Rs.rect.width:1,scaleY:js.scaleY!==1?ws.rect.height*js.scaleY/Rs.rect.height:1},Os={x:js.x-As.x,y:js.y-As.y,...ks},Ms=bs({...Cs,active:ws,dragOverlay:Rs,transform:{initial:js,final:Os}}),[Ds]=Ms,Ps=Ms[Ms.length-1];if(JSON.stringify(Ds)===JSON.stringify(Ps))return;const Ls=xs?.({active:ws,dragOverlay:Rs,...Cs}),Bs=Rs.node.animate(Ms,{duration:dn,easing:ms,fill:"forwards"});return new Promise(Fs=>{Bs.onfinish=()=>{Ls?.(),Fs()}})}}let key=0;function useKey(ds){return reactExports.useMemo(()=>{if(ds!=null)return key++,key},[ds])}const DragOverlay=React.memo(ds=>{let{adjustScale:dn=!1,children:ms,dropAnimation:xs,style:bs,transition:Es,modifiers:ws,wrapperElement:Rs="div",className:js,zIndex:Cs=999}=ds;const{activatorEvent:As,active:ks,activeNodeRect:Os,containerNodeRect:Ms,draggableNodes:Ds,droppableContainers:Ps,dragOverlay:Ls,over:Bs,measuringConfiguration:Fs,scrollableAncestors:Us,scrollableAncestorRects:Gs,windowRect:Js}=useDndContext(),Ws=reactExports.useContext(ActiveDraggableContext),Zs=useKey(ks?.id),Ys=applyModifiers(ws,{activatorEvent:As,active:ks,activeNodeRect:Os,containerNodeRect:Ms,draggingNodeRect:Ls.rect,over:Bs,overlayNodeRect:Ls.rect,scrollableAncestors:Us,scrollableAncestorRects:Gs,transform:Ws,windowRect:Js}),Qs=useInitialValue(Os),ai=useDropAnimation({config:xs,draggableNodes:Ds,droppableContainers:Ps,measuringConfiguration:Fs}),ia=Qs?Ls.setRef:void 0;return React.createElement(NullifiedContextProvider,null,React.createElement(AnimationManager,{animation:ai},ks&&Zs?React.createElement(PositionedOverlay,{key:Zs,id:ks.id,ref:ia,as:Rs,activatorEvent:As,adjustScale:dn,className:js,transition:Es,rect:Qs,style:{zIndex:Cs,...bs},transform:Ys},ms):null))}),SOP_STATUSES=["Draft","Review","Approved","Published"];var SopCategory=(ds=>(ds.Introduction="Introduction",ds.SetupSupport="New business Set-Up & Support",ds.Team="Your Team",ds.MarketingAndPromotion="Marketing & Promotion",ds.Operations="Day-to-Day Operating Requirements",ds.GrowthAndProfit="Business Development, Growth & Profit",ds))(SopCategory||{});const PillarMap=Object.entries(SopCategory).map(([ds,dn])=>({key:ds,value:dn}));function arrayMove(ds,dn,ms){const xs=ds.slice();return xs.splice(ms<0?xs.length+ms:ms,0,xs.splice(dn,1)[0]),xs}function getSortedRects(ds,dn){return ds.reduce((ms,xs,bs)=>{const Es=dn.get(xs);return Es&&(ms[bs]=Es),ms},Array(ds.length))}function isValidIndex(ds){return ds!==null&&ds>=0}function itemsEqual(ds,dn){if(ds===dn)return!0;if(ds.length!==dn.length)return!1;for(let ms=0;ms<ds.length;ms++)if(ds[ms]!==dn[ms])return!1;return!0}function normalizeDisabled(ds){return typeof ds=="boolean"?{draggable:ds,droppable:ds}:ds}const rectSortingStrategy=ds=>{let{rects:dn,activeIndex:ms,overIndex:xs,index:bs}=ds;const Es=arrayMove(dn,xs,ms),ws=dn[bs],Rs=Es[bs];return!Rs||!ws?null:{x:Rs.left-ws.left,y:Rs.top-ws.top,scaleX:Rs.width/ws.width,scaleY:Rs.height/ws.height}},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=ds=>{var dn;let{activeIndex:ms,activeNodeRect:xs,index:bs,rects:Es,overIndex:ws}=ds;const Rs=(dn=Es[ms])!=null?dn:xs;if(!Rs)return null;if(bs===ms){const Cs=Es[ws];return Cs?{x:0,y:ms<ws?Cs.top+Cs.height-(Rs.top+Rs.height):Cs.top-Rs.top,...defaultScale$1}:null}const js=getItemGap$1(Es,bs,ms);return bs>ms&&bs<=ws?{x:0,y:-Rs.height-js,...defaultScale$1}:bs<ms&&bs>=ws?{x:0,y:Rs.height+js,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};
1421function getItemGap$1(ds,dn,ms){const xs=ds[dn],bs=ds[dn-1],Es=ds[dn+1];return xs?ms<dn?bs?xs.top-(bs.top+bs.height):Es?Es.top-(xs.top+xs.height):0:Es?Es.top-(xs.top+xs.height):bs?xs.top-(bs.top+bs.height):0:0}const ID_PREFIX="Sortable",Context=React.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(ds){let{children:dn,id:ms,items:xs,strategy:bs=rectSortingStrategy,disabled:Es=!1}=ds;const{active:ws,dragOverlay:Rs,droppableRects:js,over:Cs,measureDroppableContainers:As}=useDndContext(),ks=useUniqueId(ID_PREFIX,ms),Os=Rs.rect!==null,Ms=reactExports.useMemo(()=>xs.map(Ws=>typeof Ws=="object"&&"id"in Ws?Ws.id:Ws),[xs]),Ds=ws!=null,Ps=ws?Ms.indexOf(ws.id):-1,Ls=Cs?Ms.indexOf(Cs.id):-1,Bs=reactExports.useRef(Ms),Fs=!itemsEqual(Ms,Bs.current),Us=Ls!==-1&&Ps===-1||Fs,Gs=normalizeDisabled(Es);useIsomorphicLayoutEffect(()=>{Fs&&Ds&&As(Ms)},[Fs,Ms,Ds,As]),reactExports.useEffect(()=>{Bs.current=Ms},[Ms]);const Js=reactExports.useMemo(()=>({activeIndex:Ps,containerId:ks,disabled:Gs,disableTransforms:Us,items:Ms,overIndex:Ls,useDragOverlay:Os,sortedRects:getSortedRects(Ms,js),strategy:bs}),[Ps,ks,Gs.draggable,Gs.droppable,Us,Ms,Ls,js,Os,bs]);return React.createElement(Context.Provider,{value:Js},dn)}const defaultNewIndexGetter=ds=>{let{id:dn,items:ms,activeIndex:xs,overIndex:bs}=ds;return arrayMove(ms,xs,bs).indexOf(dn)},defaultAnimateLayoutChanges=ds=>{let{containerId:dn,isSorting:ms,wasDragging:xs,index:bs,items:Es,newIndex:ws,previousItems:Rs,previousContainerId:js,transition:Cs}=ds;return!Cs||!xs||Rs!==Es&&bs===ws?!1:ms?!0:ws!==bs&&dn===js},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=CSS$1.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useDerivedTransform(ds){let{disabled:dn,index:ms,node:xs,rect:bs}=ds;const[Es,ws]=reactExports.useState(null),Rs=reactExports.useRef(ms);return useIsomorphicLayoutEffect(()=>{if(!dn&&ms!==Rs.current&&xs.current){const js=bs.current;if(js){const Cs=getClientRect(xs.current,{ignoreTransform:!0}),As={x:js.left-Cs.left,y:js.top-Cs.top,scaleX:js.width/Cs.width,scaleY:js.height/Cs.height};(As.x||As.y)&&ws(As)}}ms!==Rs.current&&(Rs.current=ms)},[dn,ms,xs,bs]),reactExports.useEffect(()=>{Es&&ws(null)},[Es]),Es}function useSortable(ds){let{animateLayoutChanges:dn=defaultAnimateLayoutChanges,attributes:ms,disabled:xs,data:bs,getNewIndex:Es=defaultNewIndexGetter,id:ws,strategy:Rs,resizeObserverConfig:js,transition:Cs=defaultTransition}=ds;const{items:As,containerId:ks,activeIndex:Os,disabled:Ms,disableTransforms:Ds,sortedRects:Ps,overIndex:Ls,useDragOverlay:Bs,strategy:Fs}=reactExports.useContext(Context),Us=normalizeLocalDisabled(xs,Ms),Gs=As.indexOf(ws),Js=reactExports.useMemo(()=>({sortable:{containerId:ks,index:Gs,items:As},...bs}),[ks,bs,Gs,As]),Ws=reactExports.useMemo(()=>As.slice(As.indexOf(ws)),[As,ws]),{rect:Zs,node:Ys,isOver:Qs,setNodeRef:ai}=useDroppable({id:ws,data:Js,disabled:Us.droppable,resizeObserverConfig:{updateMeasurementsFor:Ws,...js}}),{active:ia,activatorEvent:ca,activeNodeRect:ha,attributes:ea,setNodeRef:ta,listeners:aa,isDragging:fa,over:ua,setActivatorNodeRef:Ea,transform:ra}=useDraggable({id:ws,data:Js,attributes:{...defaultAttributes,...ms},disabled:Us.draggable}),Ia=useCombinedRefs(ai,ta),$a=!!ia,oa=$a&&!Ds&&isValidIndex(Os)&&isValidIndex(Ls),sa=!Bs&&fa,Ra=sa&&oa?ra:null,Oa=oa?Ra??(Rs??Fs)({rects:Ps,activeNodeRect:ha,activeIndex:Os,overIndex:Ls,index:Gs}):null,za=isValidIndex(Os)&&isValidIndex(Ls)?Es({id:ws,items:As,activeIndex:Os,overIndex:Ls}):Gs,Ga=ia?.id,qa=reactExports.useRef({activeId:Ga,items:As,newIndex:za,containerId:ks}),Ma=As!==qa.current.items,Fa=dn({active:ia,containerId:ks,isDragging:fa,isSorting:$a,id:ws,index:Gs,items:As,newIndex:qa.current.newIndex,previousItems:qa.current.items,previousContainerId:qa.current.containerId,transition:Cs,wasDragging:qa.current.activeId!=null}),Ka=useDerivedTransform({disabled:!Fa,index:Gs,node:Ys,rect:Zs});return reactExports.useEffect(()=>{$a&&qa.current.newIndex!==za&&(qa.current.newIndex=za),ks!==qa.current.containerId&&(qa.current.containerId=ks),As!==qa.current.items&&(qa.current.items=As)},[$a,za,ks,As]),reactExports.useEffect(()=>{if(Ga===qa.current.activeId)return;if(Ga!=null&&qa.current.activeId==null){qa.current.activeId=Ga;return}const ko=setTimeout(()=>{qa.current.activeId=Ga},50);return()=>clearTimeout(ko)},[Ga]),{active:ia,activeIndex:Os,attributes:ea,data:Js,rect:Zs,index:Gs,newIndex:za,items:As,isOver:Qs,isSorting:$a,isDragging:fa,listeners:aa,node:Ys,overIndex:Ls,over:ua,setNodeRef:Ia,setActivatorNodeRef:Ea,setDroppableNodeRef:ai,setDraggableNodeRef:ta,transform:Ka??Oa,transition:mo()};function mo(){if(Ka||Ma&&qa.current.newIndex===Gs)return disabledTransition;if(!(sa&&!isKeyboardEvent(ca)||!Cs)&&($a||Fa))return CSS$1.Transition.toString({...Cs,property:transitionProperty})}}function normalizeLocalDisabled(ds,dn){var ms,xs;return typeof ds=="boolean"?{draggable:ds,droppable:!1}:{draggable:(ms=ds?.draggable)!=null?ms:dn.draggable,droppable:(xs=ds?.droppable)!=null?xs:dn.droppable}}KeyboardCode.Down,KeyboardCode.Right,KeyboardCode.Up,KeyboardCode.Left;function Modal({onClose:ds,title:dn,children:ms,className:xs}){return reactExports.useEffect(()=>{const bs=Es=>{Es.key==="Escape"&&ds()};return document.addEventListener("keydown",bs),()=>document.removeEventListener("keydown",bs)},[ds]),reactDomExports.createPortal(jsxRuntimeExports.jsxs("div",{className:"fixed inset-0 z-[70]",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:ds}),jsxRuntimeExports.jsxs("div",{className:`absolute left-1/2 top-1/2 w-[min(1100px,92vw)] max-h-[90vh] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl bg-white shadow-lg ${xs}`,children:[jsxRuntimeExports.jsxs("header",{className:"flex items-center justify-between border-b px-6 py-4",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[var(--secondary)]",children:dn}),jsxRuntimeExports.jsx("button",{onClick:ds,className:"rounded-md p-2 hover:bg-[var(--background-neutral)]","aria-label":"Close",children:"✕"})]}),jsxRuntimeExports.jsx("div",{className:"overflow-auto p-6",children:ms})]})]}),document.body)}const statusStyles={Draft:"border-sky-300 text-sky-700 bg-sky-50",Review:"border-amber-300 text-amber-700 bg-amber-50",Approved:"border-emerald-300 text-emerald-700 bg-emerald-50",Published:"border-[var(--secondary)] text-[var(--secondary)] bg-[var(--background-neutral)]"};function SopCardView({card:ds,onMove:dn}){const[ms,xs]=reactExports.useState(()=>typeof window>"u"?!1:window.matchMedia("(max-width: 767px)").matches),{attributes:bs,listeners:Es,setNodeRef:ws,transform:Rs,transition:js,isDragging:Cs}=useSortable({id:ds.id,disabled:ms}),As={transform:CSS$1.Transform.toString(Rs),transition:js,opacity:Cs?.7:1},[ks,Os]=reactExports.useState(!1),Ms=ms?{}:{...Es,...bs};reactExports.useEffect(()=>{if(typeof window>"u")return;const Ps=window.matchMedia("(max-width: 767px)"),Ls=()=>xs(Ps.matches);return Ls(),Ps.addEventListener?(Ps.addEventListener("change",Ls),()=>Ps.removeEventListener("change",Ls)):(Ps.addListener(Ls),()=>Ps.removeListener(Ls))},[]);const Ds=Ps=>{Ps.stopPropagation()};return jsxRuntimeExports.jsxs("article",{ref:ws,style:As,...Ms,"data-card-id":ds.id,className:`rounded-lg bg-white p-3 ${ms?"":"cursor-grab active:cursor-grabbing"}`,children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex-1",children:[jsxRuntimeExports.jsx("div",{className:"mb-1 text-sm font-semibold text-[var(--secondary)]",children:jsxRuntimeExports.jsx(Link$1,{to:`/sop/${ds.id}`,className:"underline",onClick:Ds,onPointerDown:Ds,onMouseDown:Ds,onTouchStart:Ds,children:ds.objective})}),jsxRuntimeExports.jsx("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-xs",children:jsxRuntimeExports.jsx("span",{className:"rounded-full bg-[var(--background-neutral)] py-0.5 italic",children:ds.category})}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-[var(--text-medium)]",children:ds.tags.map(Ps=>jsxRuntimeExports.jsx("span",{className:"rounded-md border bg-[var(--background-neutral)] px-2 py-0.5",children:Ps},Ps))})]}),dn&&ms&&jsxRuntimeExports.jsx("button",{type:"button",className:"whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold text-[var(--secondary)] hover:border-[var(--primary)]",onClick:Ps=>{Ds(Ps),Os(!0)},onPointerDown:Ds,onMouseDown:Ds,onTouchStart:Ds,children:"Move to..."})]}),ks&&jsxRuntimeExports.jsx(Modal,{title:"Move SOP to",onClose:()=>Os(!1),children:jsxRuntimeExports.jsx("div",{className:"space-y-2",children:SOP_STATUSES.map(Ps=>{const Ls=Ps===ds.status;return jsxRuntimeExports.jsxs("button",{type:"button",className:`flex w-full items-center justify-between rounded-lg border px-3 py-2 text-sm font-semibold transition
1422                                    ${statusStyles[Ps]} ${Ls?"opacity-70 cursor-default":"hover:brightness-95"}`,disabled:Ls,onClick:()=>{!dn||Ls||(dn(ds.id,Ps),Os(!1))},children:[jsxRuntimeExports.jsx("span",{children:Ps}),Ls&&jsxRuntimeExports.jsx("span",{className:"text-xs font-normal",children:"Current"})]},Ps)})})})]})}function SopCardPreview({card:ds}){return jsxRuntimeExports.jsxs("article",{className:"rounded-lg border border-[var(--border-medium)] bg-white p-3 shadow-md pointer-events-none",children:[jsxRuntimeExports.jsx("div",{className:"mb-1 text-sm font-semibold text-[var(--secondary)]",children:ds.objective}),jsxRuntimeExports.jsx("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-xs",children:jsxRuntimeExports.jsx("span",{className:"rounded-full bg-[var(--background-neutral)] py-0.5",children:ds.category})}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap items-center gap-1.5 text-[11px] text-[var(--text-medium)]",children:ds.tags.map(dn=>jsxRuntimeExports.jsx("span",{className:"rounded-md border bg-[var(--background-neutral)] px-2 py-0.5",children:dn},dn))})]})}function BoardColumn({status:ds,items:dn,filters:ms,onMove:xs}){const{setNodeRef:bs}=useDroppable({id:ds}),Es=ds==="Draft"?"bg-sky-300":ds==="Review"?"bg-amber-300":ds==="Approved"?"bg-emerald-300":"bg-[var(--secondary)]",ws=dn.filter(js=>ms.length===0||ms.includes(js.category)),Rs=ws.map(js=>js.id);return jsxRuntimeExports.jsxs("section",{ref:bs,className:`rounded-t-lg  h-full ${Es}`,children:[jsxRuntimeExports.jsxs("header",{className:"items-center justify-between px-4 py-3 hidden md:flex",children:[jsxRuntimeExports.jsx("h2",{className:"!text-white",children:ds}),jsxRuntimeExports.jsx("span",{className:"rounded-full bg-[var(--background-neutral)] px-2 py-0.5 text-xs text-[var(--secondary)]",children:dn.length})]}),jsxRuntimeExports.jsxs("div",{className:"flex min-h-20 max-h-[75vh] flex-col gap-3 overflow-auto p-3",children:[ws.length===0&&jsxRuntimeExports.jsx("div",{className:"m-auto text-white font-bold",children:"No SOPs"}),jsxRuntimeExports.jsx(SortableContext,{items:Rs,strategy:verticalListSortingStrategy,children:ws.map(js=>jsxRuntimeExports.jsx(SopCardView,{card:js,onMove:xs},js.id))})]})]})}function BoardHeader({query:ds,onQueryChange:dn}){const ms=useNavigate();return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full h-14 flex items-center gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"ml-3 gap-3 flex-row items-center hidden md:flex",children:[jsxRuntimeExports.jsx(ManualSwitcher,{readOnly:!0}),jsxRuntimeExports.jsx(ChevronRight,{className:"text-secondary",size:23}),jsxRuntimeExports.jsx("div",{children:"SOP Board"})]}),jsxRuntimeExports.jsx("input",{className:"flex-1 max-w-xl ml-2 md:ml-auto max-h-[36px] rounded-lg border border-[var(--border-medium)] bg-[var(--background-input)] px-3 py-2  outline-none focus:border-[var(--primary)]",placeholder:"Search…",value:ds,onChange:xs=>dn(xs.target.value)}),jsxRuntimeExports.jsx("div",{className:"flex items-center gap-2 mr-3 btn-primary curs
1422or-pointer",onClick:()=>ms("/board/create"),children:jsxRuntimeExports.jsx(Plus,{className:"w-5 h-5","aria-hidden":!0})})]}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}function Filter({category:ds,active:dn=!1,onToggle:ms}){return jsxRuntimeExports.jsx("button",{className:`inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm transition cursor-pointer
1423        ${dn?"bg-[var(--primary)] text-white border-[var(--primary)]":"bg-white text-[var(--secondary)] hover:border-[var(--primary)]"}`,onClick:()=>ms?.(ds),children:jsxRuntimeExports.jsx("span",{className:"whitespace-nowrap",children:ds})})}function BoardToolbar({filters:ds,initial:dn=[],onChange:ms}){const[xs,bs]=reactExports.useState(dn),[Es,ws]=reactExports.useState(!1),Rs=reactExports.useMemo(()=>ds.filter(Cs=>!Cs.includes("_")),[ds]);reactExports.useEffect(()=>{bs(Cs=>{const As=Cs.filter(ks=>ds.includes(ks));return As.length!==Cs.length&&ms(As),As})},[ds,ms]);const js=Cs=>{const As=xs.includes(Cs)?xs.filter(ks=>ks!==Cs):[...xs,Cs];bs(As),ms(As)};return jsxRuntimeExports.jsxs("div",{className:"ml-auto md:ml-0",children:[jsxRuntimeExports.jsx(ListFilter,{size:30,className:"ml-auto mr-2 md:hidden",onClick:()=>ws(!0)}),jsxRuntimeExports.jsx("div",{className:"hidden md:flex gap-2 mb-2",children:Rs.map(Cs=>jsxRuntimeExports.jsx(Filter,{category:Cs,active:xs.includes(Cs),onToggle:()=>js(Cs)},Cs))}),Es&&jsxRuntimeExports.jsxs("div",{className:"fixed inset-0 z-[80] md:hidden",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:()=>ws(!1)}),jsxRuntimeExports.jsxs("div",{className:"absolute bottom-0 left-0 right-0 max-h-[80vh] overflow-hidden rounded-t-2xl bg-white shadow-xl",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntimeExports.jsx("div",{className:"text-base font-semibold text-[var(--secondary)]",children:"Filters"}),jsxRuntimeExports.jsx("button",{className:"icon-btn",onClick:()=>ws(!1),"aria-label":"Close filters",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"max-h-[60vh] overflow-auto p-4",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2",children:Rs.map(Cs=>jsxRuntimeExports.jsx(Filter,{category:Cs,active:xs.includes(Cs),onToggle:()=>js(Cs)},Cs))})}),jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end border-t px-4 py-3",children:jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,text:"Done",onClick:()=>ws(!1)})})]})]})]})}const createGrouped=()=>({Draft:[],Review:[],Approved:[],Published:[]}),groupByStatus=ds=>{const dn=createGrouped();return ds.forEach(ms=>dn[ms.status].push(ms)),dn},filterByQuery=(ds,dn)=>{const ms=dn.trim().toLowerCase();return ms?ds.filter(xs=>xs.objective.toLowerCase().includes(ms)||xs.description.toLowerCase().includes(ms)||xs.tags.some(bs=>bs.toLowerCase().includes(ms))):ds},applyCategoryFilters=(ds,dn)=>dn.length===0?ds:ds.filter(ms=>dn.includes(ms.category)),flattenGrouped=ds=>SOP_STATUSES.flatMap(dn=>ds[dn]??[]),getVisibleItems=(ds,dn,ms)=>applyCategoryFilters(ds[dn],ms),getStatusOrder=(ds,dn)=>ds.filter(ms=>ms.status===dn).map(ms=>ms.id),getActiveCenter=ds=>ds?ds.top+ds.height/2:null,findClosestCardId=(ds,dn)=>{const ms=getActiveCenter(dn);if(ms===null||typeof document>"u")return null;let xs=null,bs=Number.POSITIVE_INFINITY;for(const Es of ds){const Rs=document.querySelector(`[data-card-id="${Es.id}"]`)?.getBoundingClientRect();if(!Rs)continue;const js=Rs.top+Rs.height/2,Cs=Math.abs(ms-js);Cs<bs&&(bs=Cs,xs=Es.id)}return xs},resolveOverId=ds=>{const{overId:dn,status:ms,items:xs,activeRect:bs}=ds;return dn!==ms?dn:xs.length===0?null:findClosestCardId(xs,bs)??xs[xs.length-1].id},reorderVisibleItems=ds=>{const{items:dn,activeId:ms,overId:xs}=ds,bs=dn.findIndex(ws=>ws.id===ms),Es=dn.findIndex(ws=>ws.id===xs);return bs<0||Es<0||bs===Es?null:arrayMove(dn,bs,Es)},mergeVisibleOrder=(ds,dn,ms)=>{const xs=new Set(dn.map(Es=>Es.id));let bs=0;return ds.map(Es=>{if(!xs.has(Es.id))return Es;const ws=ms[bs];return bs+=1,ws})},insertIntoVisibleOrder=ds=>{const{fullList:dn,visibleItems:ms,insertIndex:xs,card:bs}=ds,Es=new Set(ms.map(Cs=>Cs.id));let ws=0,Rs=!1;const js=[];for(const Cs of dn){if(Es.has(Cs.id)){!Rs&&ws===xs&&(js.push(bs),Rs=!0),js.push(Cs),ws+=1;continue}js.push(Cs)}return Rs||js.push(bs),js},moveCardToStatus=(ds,dn,ms)=>{const xs=ds.find(js=>js.id===dn);if(!xs||xs.status===ms)return ds;const bs=groupByStatus(ds),Es=bs[xs.status].filter(js=>js.id!==dn),ws=[...bs[ms],{...xs,status:ms}],Rs={...bs,[xs.status]:Es,[ms]:ws};return flattenGrouped(Rs)};function BoardScreen(){const{manualId:ds}=useManualSelector(),[dn]=useSearchParams(),ms=dn.get("category"),[xs,bs]=reactExports.useState(()=>ms?[ms]:[]),[Es,ws]=reactExports.useState([]),[Rs,js]=reactExports.useState(null),[Cs,As]=reactExports.useState(""),[ks,Os]=reactExports.useState("Draft");async function Ms(){const{data:Ws}=await Sdk.businessProcessClient.fetchAll(ds);return ws(Ws),Ws}reactExports.useEffect(()=>{Ms()},[ds]);const Ds=reactExports.useMemo(()=>groupByStatus(Es),[Es]),Ps=reactExports.useMemo(()=>groupByStatus(filterByQuery(Es,Cs)),[Es,Cs]),Ls=reactExports.useMemo(()=>Es.find(Ws=>
1423Ws.id===Rs)??null,[Rs,Es]),Bs=Ws=>{js(Ws.active.id)},Fs=async(Ws,Zs)=>{if(!ds)return;const Ys=getStatusOrder(Ws,Zs);Ys.length!==0&&await Sdk.businessProcessClient.reorderBusinessProcesses(ds,Ys)},Us=async(Ws,Zs)=>{const Ys=Es.find(ai=>ai.id===Ws);if(!Ys||Ys.status===Zs)return;const Qs=moveCardToStatus(Es,Ws,Zs);ws(Qs),await Sdk.businessProcessClient.modifyBusinessProcess(Ws,{status:Zs}),await Promise.all([Fs(Qs,Ys.status),Fs(Qs,Zs)])},Gs=async Ws=>{js(null);const Zs=String(Ws.active.id),Ys=Ws.over?.id?String(Ws.over.id):null;if(!Ys)return;const Qs=Es.find(oa=>oa.id===Zs);if(!Qs)return;const ai=SOP_STATUSES.includes(Ys)?Ys:Es.find(oa=>oa.id===Ys)?.status;if(!ai)return;const ia=Ws.active.rect.current.translated??Ws.active.rect.current.initial??null,ca=oa=>getVisibleItems(Ps,oa,xs);if(Qs.status===ai){const oa=ca(ai),sa=resolveOverId({overId:Ys,status:ai,items:oa,activeRect:ia});if(!sa)return;const Ra=reorderVisibleItems({items:oa,activeId:Zs,overId:sa});if(!Ra)return;const _a=mergeVisibleOrder(Ds[ai],oa,Ra),Oa={...Ds,[ai]:_a},za=flattenGrouped(Oa);ws(za),await Fs(za,ai);return}const ha=Qs.status,ea=Ds[ha].filter(oa=>oa.id!==Zs),ta=Ds[ai].slice(),aa=ca(ai),fa=resolveOverId({overId:Ys,status:ai,items:aa,activeRect:ia}),ua=fa?aa.findIndex(oa=>oa.id===fa):aa.length,Ea={...Qs,status:ai},ra=insertIntoVisibleOrder({fullList:ta,visibleItems:aa,insertIndex:ua<0?aa.length:ua,card:Ea}),Ia={...Ds,[ha]:ea,[ai]:ra},$a=flattenGrouped(Ia);ws($a),await Sdk.businessProcessClient.modifyBusinessProcess(Zs,{status:ai}),await Promise.all([Fs($a,ha),Fs($a,ai)])},Js=reactExports.useMemo(()=>Array.from(new Set([...Es.map(Ws=>Ws.category),...ms?[ms]:[]])).sort(),[Es,ms]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(BoardHeader,{query:Cs,onQueryChange:As}),jsxRuntimeExports.jsxs("div",{className:"px-2 pt-2 md:px-4 flex flex-col flex-1",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-1 overflow-x-auto",children:[SOP_STATUSES.map(Ws=>jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>Os(Ws),className:`md:hidden whitespace-nowrap rounded-full border px-2 py-1 text-sm font-semibold transition mb-2
1424                        ${ks===Ws?"bg-[var(--primary)] text-white border-[var(--primary)]":"bg-white text-[var(--secondary)] hover:border-[var(--primary)]"}`,children:Ws},Ws)),jsxRuntimeExports.jsx(BoardToolbar,{filters:Js,initial:xs,onChange:bs})]}),jsxRuntimeExports.jsxs(DndContext,{onDragStart:Bs,onDragEnd:Gs,collisionDetection:closestCenter,children:[jsxRuntimeExports.jsx("div",{className:"grid grid-cols-1 gap-3 md:hidden",children:jsxRuntimeExports.jsx(BoardColumn,{status:ks,items:Ps[ks],filters:xs,onMove:Us})}),jsxRuntimeExports.jsx("div",{className:"hidden md:grid md:grid-cols-4 gap-1 lg:gap-4 flex-1",children:SOP_STATUSES.map(Ws=>jsxRuntimeExports.jsx(BoardColumn,{status:Ws,items:Ps[Ws],filters:xs,onMove:Us},Ws))}),jsxRuntimeExports.jsx(DragOverlay,{zIndex:1e4,children:Ls?jsxRuntimeExports.jsx(SopCardPreview,{card:Ls}):null})]})]})]})}function Copy({colour:ds="#000",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"69.561",height:"82.646",viewBox:"0 0 69.561 82.646",...dn,children:jsxRuntimeExports.jsx("g",{id:"Copy","data-name":"Group 2951",transform:"translate(0 0)",children:jsxRuntimeExports.jsxs("g",{id:"Copy","data-name":"Group 2950",children:[jsxRuntimeExports.jsx("path",{id:"Path_12661","data-name":"Path 12661",d:"M69.229,21.536,49.733.4a1.253,1.253,0,0,0-.919-.4H22.193a9.951,9.951,0,0,0-9.939,9.94v1.347H9.939A9.951,9.951,0,0,0,0,21.226V72.707a9.951,9.951,0,0,0,9.939,9.939H47.367a9.951,9.951,0,0,0,9.94-9.939V71.36h2.314a9.951,9.951,0,0,0,9.939-9.94V22.383a1.249,1.249,0,0,0-.331-.847M49.991,4.37,66.28,22.026H57.431a7.448,7.448,0,0,1-7.44-7.44Zm4.816,68.337a7.447,7.447,0,0,1-7.44,7.439H9.939A7.447,7.447,0,0,1,2.5,72.707V21.226a7.447,7.447,0,0,1,7.439-7.439h2.315V61.42a9.951,9.951,0,0,0,9.939,9.94H54.807Zm4.814-3.847H22.193a7.448,7.448,0,0,1-7.439-7.44V9.94A7.448,7.448,0,0,1,22.193,2.5h25.3V14.586a9.951,9.951,0,0,0,9.94,9.94H67.06V61.42a7.447,7.447,0,0,1-7.439,7.44",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_12662","data-name":"Path 12662",d:"M55.74
14241,36.23H26a1.25,1.25,0,0,0,0,2.5H55.741a1.25,1.25,0,0,0,0-2.5",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_12663","data-name":"Path 12663",d:"M26,27.392H43.46a1.25,1.25,0,0,0,0-2.5H26a1.25,1.25,0,0,0,0,2.5",fill:ds}),jsxRuntimeExports.jsx("path",{id:"Path_12664","data-name":"Path 12664",d:"M47.858,47.569H26a1.25,1.25,0,1,0,0,2.5H47.858a1.25,1.25,0,0,0,0-2.5",fill:ds})]})})})}function Info({colour:ds="#C4C4C4",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 50 50",...dn,children:jsxRuntimeExports.jsx("path",{id:"info",d:"M103.312-842.5h3.75v-15h-3.75ZM105-862.125a2.031,2.031,0,0,0,1.47-.575,1.9,1.9,0,0,0,.594-1.425,2.089,2.089,0,0,0-.593-1.514A1.964,1.964,0,0,0,105-866.25a1.968,1.968,0,0,0-1.47.611,2.087,2.087,0,0,0-.594,1.514,1.906,1.906,0,0,0,.593,1.425A2.027,2.027,0,0,0,105-862.125ZM105.017-830a24.2,24.2,0,0,1-9.719-1.969,25.4,25.4,0,0,1-7.954-5.375,25.388,25.388,0,0,1-5.375-7.959A24.245,24.245,0,0,1,80-855.031a24.245,24.245,0,0,1,1.969-9.729,25.015,25.015,0,0,1,5.375-7.927,25.659,25.659,0,0,1,7.959-5.344A24.245,24.245,0,0,1,105.031-880a24.245,24.245,0,0,1,9.729,1.969,25.278,25.278,0,0,1,7.928,5.344,25.247,25.247,0,0,1,5.344,7.938A24.3,24.3,0,0,1,130-855.016a24.2,24.2,0,0,1-1.969,9.719,25.532,25.532,0,0,1-5.344,7.943,25.237,25.237,0,0,1-7.938,5.375A24.183,24.183,0,0,1,105.017-830Zm.015-3.75a20.412,20.412,0,0,0,15.031-6.219,20.567,20.567,0,0,0,6.188-15.062,20.483,20.483,0,0,0-6.176-15.031A20.489,20.489,0,0,0,105-876.25a20.55,20.55,0,0,0-15.031,6.176A20.437,20.437,0,0,0,83.75-855a20.478,20.478,0,0,0,6.219,15.031A20.515,20.515,0,0,0,105.031-833.75ZM105-855Z",transform:"translate(-80 880)",fill:ds})})}function AddCircle({colour:ds="#1D1D1D",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 50 50",...dn,children:jsxRuntimeExports.jsx("path",{id:"add_circle",d:"M123.027-822.5h3.947v-10.526H137.5v-3.947H126.975V-847.5h-3.947v10.526H112.5v3.947h10.526Zm1.978,12.5a24.353,24.353,0,0,1-9.75-1.968,25.253,25.253,0,0,1-7.94-5.343,25.241,25.241,0,0,1-5.345-7.936A24.33,24.33,0,0,1,100-834.995a24.353,24.353,0,0,1,1.968-9.75,25.253,25.253,0,0,1,5.343-7.94,25.242,25.242,0,0,1,7.936-5.345A24.33,24.33,0,0,1,125-860a24.353,24.353,0,0,1,9.75,1.968,25.253,25.253,0,0,1,7.94,5.343,25.241,25.241,0,0,1,5.345,7.936A24.329,24.329,0,0,1,150-835a24.354,24.354,0,0,1-1.968,9.75,25.255,25.255,0,0,1-5.343,7.94,25.242,25.242,0,0,1-7.936,5.345A24.331,24.331,0,0,1,125.005-810Zm0-3.947a20.318,20.318,0,0,0,14.934-6.118A20.319,20.319,0,0,0,146.054-835a20.319,20.319,0,0,0-6.118-14.934A20.319,20.319,0,0,0,125-856.052a20.319,20.319,0,0,0-14.934,6.118A20.319,20.319,0,0,0,103.948-835a20.319,20.319,0,0,0,6.118,14.934A20.318,20.318,0,0,0,125-813.946ZM125-835Z",transform:"translate(-100.001 859.999)",fill:dn.color||ds})})}function Bin({colour:ds="#1D1D1D",...dn}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"31.915",height:"35.949",viewBox:"0 0 31.915 35.949",...dn,children:jsxRuntimeExports.jsx("path",{id:"delete_FILL0_wght200_GRAD0_opsz24_2_","data-name":"delete_FILL0_wght200_GRAD0_opsz24 (2)",d:"M205.962-754.821a3.55,3.55,0,0,1-2.606-1.076,3.55,3.55,0,0,1-1.076-2.606v-28.233H200v-2.28h9.119v-1.754H222.8v1.754h9.119v2.28h-2.28V-758.5a3.567,3.567,0,0,1-1.054,2.628,3.567,3.567,0,0,1-2.628,1.054Zm21.394-31.915h-22.8V-758.5a1.365,1.365,0,0,0,.395,1.008,1.365,1.365,0,0,0,1.008.395h19.991a1.341,1.341,0,0,0,.964-.438,1.341,1.341,0,0,0,.438-.964Zm-16.4,25.076h2.28v-20.517h-2.28Zm7.716,0h2.28v-20.517h-2.28Zm-14.116-25.076v0Z",transform:"translate(-200 790.77)",fill:ds})})}function FormInputTextArea(ds){const dn=Ls=>{if(typeof Ls=="string")return Ls.length;if(typeof Ls=="number")return Ls.toString().length;if(Array.isArray(Ls))return Ls.join("").length},ms=reactExports.useRef(null),[xs,bs]=reactExports.useState(!1),{value:Es,name:ws,onInputChange:Rs,characterLimit:js,heightLimit:Cs=90,rows:As=1,placeholder:ks,autoSize:Os=!0,className:Ms,...Ds}=ds;reactExports.useEffect(()=>{if(Os&&ms.current){ms.current.style.height="auto";
1424const Bs=Math.min(ms.current.scrollHeight+5,Cs);ms.current.style.height=Bs+"px";const Us=ms.current.value.includes(`
1425`),Gs=ms.current.scrollHeight>ms.current.clientHeight;bs(Us||Gs)}},[Os,Es,Cs]);const Ps=reactExports.useMemo(()=>{if(Os)return xs?"resize-y":"resize-none"},[Os,xs]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",{ref:ms,value:Es,className:`${styles$4.Input} overflow-y-scroll w-full  ${Ps} mb-0 ${Ms}`,id:ws,rows:As,placeholder:ks,onChange:Ls=>Rs?.(Ls.currentTarget.value),onKeyDown:Ls=>{Ls.key==="Enter"&&Ls.stopPropagation()},...Ds}),js&&jsxRuntimeExports.jsx("div",{className:"absolute top-0 right-1 text-xs",children:`${dn(Es)}/${js}`})]})}function Label$1({mandatory:ds,children:dn,className:ms="",...xs}){return jsxRuntimeExports.jsxs("label",{className:`cursor-pointer text-[--color-text-dark] text-xl leading-5 pb-1 block ${ms}`,...xs,children:[dn,ds&&jsxRuntimeExports.jsx("span",{className:"text-red-600",children:"*"})]})}function buffer(ds,dn,ms=!1){const xs=[...ds];for(;xs.length<dn;)xs.push("");return ms&&xs.length>=dn&&xs.every(bs=>bs!=="")&&xs.push(""),xs}function FormList({className:ds,label:dn,defaultItems:ms,externalItems:xs,mandatory:bs,name:Es,onInputUpdated:ws,onEditSave:Rs,onSuccess:js,showSuccessAfterMs:Cs=5e3,characterLimit:As,showCopy:ks,showAdd:Os,showDelete:Ms,moreInfo:Ds,rows:Ps=3,children:Ls,autoAddBlankRow:Bs,examples:Fs}){const[Us,Gs]=reactExports.useState(SavableInputStatus.Ready),[Js,Ws]=reactExports.useState(!1),[Zs,Ys]=reactExports.useState(buffer(xs||ms,Ps)),[Qs,ai]=reactExports.useState();reactExports.useEffect(()=>{xs&&Ys(xs)},[xs,Ps]),reactExports.useEffect(()=>()=>clearTimeout(Qs),[Qs]);const ia=reactExports.useCallback(ca=>{if(ca.join(`
1426`)!==Zs.join(`
1427`)){Ys(ca);const ha=[...ca].filter(ea=>ea!=="");ws?.(ha),Rs&&(Qs&&clearTimeout(Qs),Gs(SavableInputStatus.Processing),ai(setTimeout(()=>{Rs(ha.filter(ea=>ea!=="")).then(ea=>{Gs(SavableInputStatus.Done),`${ea.status}`.startsWith("2")?(js?.(ea),setTimeout(()=>Gs(SavableInputStatus.Ready),Cs)):Gs(SavableInputStatus.Failure)}).catch(()=>{Gs(SavableInputStatus.Failure)})},1e3)))}},[Zs,ws,Rs,Qs,js,Cs]);return jsxRuntimeExports.jsxs("div",{className:`${ds||""} relative`,children:[Ds&&Js&&jsxRuntimeExports.jsxs("div",{className:"",children:[Ds,jsxRuntimeExports.jsx(Close,{className:"absolute right-1 top-1 cursor-pointer",colour:"#cc5067",width:20,height:20,onClick:()=>Ws(!1)})]}),(dn||ks)&&jsxRuntimeExports.jsxs("div",{className:"flex min-h-[20px]",children:[dn&&jsxRuntimeExports.jsx(Label$1,{htmlFor:Es,mandatory:bs,className:"flex-1",children:dn}),ks&&jsxRuntimeExports.jsx(Copy,{className:`${styles$4.CopyIcon}`,height:20,width:18,colour:"#707070",onClick:async ca=>{animateCopy(ca),await navigator.clipboard.writeText(Zs.join(`
1428`))}}),Os&&jsxRuntimeExports.jsx(AddCircle,{className:`${styles$4.AddIcon} ml-2`,height:20,width:18,colour:"#707070",onClick:async()=>{Ys([...Zs,""])}}),[SavableInputStatus.Processing,SavableInputStatus.Done,SavableInputStatus.Failure].includes(Us)&&jsxRuntimeExports.jsxs("div",{className:styles$4.InfoIcon,children:[Us===SavableInputStatus.Processing&&jsxRuntimeExports.jsx(Saving,{width:25,height:25}),Us===SavableInputStatus.Done&&jsxRuntimeExports.jsx(Tick,{width:25,height:25,colour:"var(--color-primary)"}),Us===SavableInputStatus.Failure&&jsxRuntimeExports.jsx(Close,{width:25,height:25})]}),Us===SavableInputStatus.Ready&&Ds&&jsxRuntimeExports.jsx(Info,{className:styles$4.InfoIcon,height:25,width:25,colour:"#707070",onClick:async()=>{Ws(!0)}})]}),Fs&&jsxRuntimeExports.jsxs("p",{className:"text-gray-600",children:["e.g. ",Fs]}),Ls&&Ls,buffer(Zs,Ps,Bs).map((ca,ha)=>jsxRuntimeExports.jsxs("div",{className:"flex mb-2.5 mt-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex-shrink-0 my-auto pr-1 text-md min-w-[20px]",children:[ha+1,"."]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-w-0 ",children:[jsxRuntimeExports.jsx(FormInputTextArea,{autoSize:!0,value:ca,className:"w-full border px-1 border-border-light rounded-sm shadow-input text-left leading-[30px] text-text-dark pl-3 pt-0.5 pb-px text-lg transition-all focus:border-2 focus:border-gray-400 focus:shadow-input-focus focus:outline-none placeholder:text-gray-400/50 focus:placeholder:text-gray-500/50 mb-0",id:Es,rows:1,onInputChange:ea=>{const ta=[...Zs];As?ea.length<=As&&(ta[ha]=ea):ta[ha]=ea,ia(ta)}}),As&&Zs.length>0&&jsxRuntimeExports.jsx("div",{className:"absolute top-0 right-1 text-xs",children:`${Zs[ha].length}/${As}`})]}),Ms&&jsxRuntimeExports.jsx("div",{className:"flex flex-shrink-0",onClick:()=>{const ea=removeAtIndexItem(Zs,ha);Ys(ea),ia(ea)},children:jsxRuntimeExports.jsx(Bin,{width:15,height:20,colour:"#cc5067",className:"my-auto ml-2.5 cursor-pointer"})})]},ha))]})}function AddToBoardHeader({save:ds,validate:dn,onFailure:ms}){const xs=useNavigate();return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full h-14 flex items-center gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"ml-6 gap-3 flex flex-row items-center",children:[jsxRuntimeExports.jsx(Link$1,{className:"underline",to:"/board",children:"SOP Board"}),jsxRuntimeExports.jsx(ChevronRight,{className:"text-secondary",size:23}),jsxRuntimeExports.jsx("div",{children:"New SOP"})]}),jsxRuntimeExports.jsx(Button,{className:"ml-auto",text:"Cancel",buttonType:ButtonType.Cancel,onClick:()=>{xs("/board")}}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:"Create",className:"mr-6",validate:dn,save:ds,onSuccess:()=>xs("/board"),onFailure:ms})]}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}function FormTextArea({className:ds,label:dn,defaultValue:ms,mandatory:xs,name:bs,rows:Es,onInputUpdated:ws,onEditSave:Rs,onSuccess:js,showSuccessAfterMs:Cs=5e3,characterLimit:As,showCopy:ks,autoSize:Os,examples:Ms,...Ds}){const[Ps,Ls]=reactExports.useState(SavableInputStatus.Ready),[Bs,Fs]=reactExports.useState(ms??""),[Us,Gs]=reactExports.useState();reactExports.useEffect(()=>()=>clearTimeout(Us));const Js=reactExports.useCallback(Ws=>{Ws!==Bs&&(Fs(Ws),ws?.(Ws),Rs&&(Us&&clearTimeout(Us),Ls(SavableInputStatus.Processing),Gs(setTimeout(()=>
1428{Rs(Ws).then(Zs=>{Ls(SavableInputStatus.Done),`${Zs.status}`.startsWith("2")?(js?.(Zs),setTimeout(()=>Ls(SavableInputStatus.Ready),Cs)):Ls(SavableInputStatus.Failure)}).catch(()=>{Ls(SavableInputStatus.Failure)})},1e3))))},[Rs,js,Bs,Us,ws,Cs,Fs,Gs]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:`${ds||""}`,style:{position:"relative"},children:[(dn||ks)&&jsxRuntimeExports.jsxs("div",{className:"flex",style:{minHeight:20},children:[dn&&jsxRuntimeExports.jsxs("label",{className:`${styles$4.Label}`,htmlFor:bs,style:{flex:1},children:[dn,xs&&jsxRuntimeExports.jsx("span",{style:{color:"red"},children:"*"})]}),ks&&jsxRuntimeExports.jsx(Copy,{className:"cursor-pointer",height:20,width:18,colour:"#707070",onClick:async Ws=>{animateCopy(Ws),await navigator.clipboard.writeText(Bs)}})]}),Ms&&jsxRuntimeExports.jsxs("p",{className:"text-gray-600",children:["e.g. ",Ms]}),jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx(FormInputTextArea,{className:"!pr-6",value:Bs,name:bs,rows:Es??4,autoSize:Os,onInputChange:Ws=>{As?Ws.length<=As&&Js(Ws):Js(Ws)},...Ds}),jsxRuntimeExports.jsxs("div",{className:"absolute right-2 top-2",children:[Ps===SavableInputStatus.Processing&&jsxRuntimeExports.jsx(Saving,{colour:"var(--color-text-medium)",width:25,height:25}),Ps===SavableInputStatus.Done&&jsxRuntimeExports.jsx(Tick,{colour:"var(--color-primary)",width:25,height:25}),Ps===SavableInputStatus.Failure&&jsxRuntimeExports.jsx(Close,{colour:"#cc5067",width:25,height:25})]})]}),As&&jsxRuntimeExports.jsxs("div",{className:"text-right text-primary",children:[`${Bs.length}/${As}`," ",jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-800",children:"characters"})]})]})})}function CreateSopPage(){const{manualId:ds}=useManualSelector(),[dn,ms]=reactExports.useState(""),[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(SopCategory.Operations),[Rs,js]=reactExports.useState([]),[Cs,As]=reactExports.useState([]),[ks,Os]=reactExports.useState({}),Ms=()=>{const Ps={};return isBlank(dn)&&(Ps.objective="Objective is required"),isBlank(Es)&&(Ps.category="Category is required"),Ps},Ds=async()=>await Sdk.businessProcessClient.addBusinessProcess(ds,{objective:dn.trim(),description:xs.trim(),category:Es,steps:Rs,tags:Cs});return jsxRuntimeExports.jsxs("div",{className:"overflow-y-scroll",children:[jsxRuntimeExports.jsx(AddToBoardHeader,{save:Ds,validate:Ms,onFailure:Ps=>Os(Ps)}),jsxRuntimeExports.jsxs("div",{className:"space-y-4 min-w-[320px] max-w-[800px] p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-xl",children:"Create SOP"}),jsxRuntimeExports.jsx(FormInput,{autoFocus:!0,value:dn,name:"objective",label:"Objective",onChange:Ps=>ms(Ps.target.value),placeholder:"e.g., How to onboard a new client"}),ks.objective&&jsxRuntimeExports.jsx("p",{className:"text-[var(--primary)]",children:ks.objective}),jsxRuntimeExports.jsx(FormTextArea,{rows:4,value:xs,name:"description",label:"Description",onChange:Ps=>bs(Ps.target.value),placeholder:"Describe the process at a high level",autoSize:!1}),ks.description&&jsxRuntimeExports.jsx("p",{className:"text-[var(--primary)]",children:ks.description}),jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsx("label",{className:"block text-lg text-[var(--text-medium)]",children:"Category"}),jsxRuntimeExports.jsx("select",{value:Es,onChange:Ps=>ws(Ps.target.value),className:"w-full rounded-lg border border-[var(--border-medium)] bg-[var(--background-input)] px-3 py-2 outline-none focus:border-[var(--primary)]",children:PillarMap.map(Ps=>jsxRuntimeExports.jsx("option",{value:Ps.value,children:Ps.value},Ps.value))})]}),jsxRuntimeExports.jsx(FormList,{className:"mt-10",showCopy:!1,label:"Steps",name:"steps",defaultItems:[],externalItems:Rs,onInputUpdated:Ps=>js(Ps),rows:3,showAdd:!1,showDelete:!0,autoAddBlankRow:!0}),jsxRuntimeExports.jsx(FormList,{className:"mt-10",label:"Tags",name:"tags",defaultItems:[],externalItems:Cs,onInputUpdated:Ps=>As(Ps),rows:1,showAdd:!1,showDelete:!0,autoAddBlankRow:!0,examples:"onboarding, finance, hr"})]})]})}function DocToolbar(ds){const{buttons:dn}=ds;return jsxRuntimeExports.jsx("div",{className:"top-0 z-20 flex flex-wrap justify-end items-center gap-3 py-1 md:p-0",children:jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2 md:w-auto md:ml-auto",children:dn})})}function GenerateStoryboardModal({id:ds,onClose:dn,onSubmit:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(!1);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-2xl bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Generate Storyboard"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"p-4 space-y-4",children:Es?
1428jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx("p",{className:"text-base text-[--text-medium]",children:"Writing storyboard…"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Feedback (Optional)"}),jsxRuntimeExports.jsx("textarea",{value:xs,onChange:Rs=>bs(Rs.target.value),rows:3,className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary",placeholder:"e.g. make it concise, focus on onboarding visuals…"})]}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-[--text-medium]",children:["Brand voice is applied automatically when generating. You can adjust voice in ",jsxRuntimeExports.jsx("strong",{children:"Settings → Brand Voice"}),"."]})]})}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn,children:"Cancel"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Generate Storyboard",save:()=>(ws(!0),Sdk.storyboardClient.generateStoryboard(ds,xs)),onSuccess:Rs=>{ws(!1),ms(Rs?.data??"")},onFailure:()=>{ws(!1),dn()}})]})]})})}function StepItem({step:ds,onChange:dn,onAdd:ms,onDelete:xs,onEdit:bs,readonly:Es=!1}){const{attributes:ws,listeners:Rs,setNodeRef:js,transform:Cs,transition:As}=useSortable({id:ds.id,disabled:Es}),ks={transform:CSS$1.Transform.toString(Cs),transition:As},Os=Ms=>Ms?.trim()?Ms.trim():"-";return jsxRuntimeExports.jsx("div",{ref:js,style:ks,className:"flex bg-white",children:Es?jsxRuntimeExports.jsxs("div",{className:"flex w-full flex-col gap-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex-1",children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"Title"}),jsxRuntimeExports.jsx("div",{className:"font-medium",children:ds.title||"Untitled step"})]}),bs&&jsxRuntimeExports.jsx("button",{className:"icon-btn ml-auto ",onClick:bs,title:"Edit step",children:jsxRuntimeExports.jsx(PenLine,{className:"text-primary",size:16})})]}),jsxRuntimeExports.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"Visual"}),jsxRuntimeExports.jsx("div",{className:`text-sm ${ds.visualDescription?"":"text-[--text-medium] italic"}`,children:Os(ds.visualDescription)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"On-screen text"}),jsxRuntimeExports.jsx("div",{className:`text-sm ${ds.onScreenText?"":"text-[--text-medium] italic"}`,children:Os(ds.onScreenText)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"User action"}),jsxRuntimeExports.jsx("div",{className:`text-sm ${ds.userAction?"":"text-[--text-medium] italic"}`,children:Os(ds.userAction)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"Voiceover"}),jsxRuntimeExports.jsx("div",{className:`text-sm ${ds.voiceoverScript?"":"text-[--text-medium] italic"}`,children:Os(ds.voiceoverScript)})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"text-xs uppercase text-[--text-medium]",children:"Duration"}),jsxRuntimeExports.jsx("div",{className:`text-sm ${ds.duration?"":"text-[--text-medium] italic"}`,children:Os(ds.duration)})]})]})]}):jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center gap-2",children:[jsxRuntimeExports.jsx("button",{...ws,...Rs,className:"cursor-grab rounded-md hover:bg-primary/10 px-1",children:jsxRuntimeExports.jsx(Hand,{size:22})}),jsxRuntimeExports.jsx("div",{className:"flex-1",children:jsxRuntimeExports.jsx(FormInput,{name:"title",placeholder:"Step title",value:ds.title,onChange:Ms=>
1428dn({...ds,title:Ms.target.value})})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,className:"!p-1",jsx:jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center",children:jsxRuntimeExports.jsx(Trash2,{color:"black",size:25})}),onClick:xs}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Tertiary,className:"!p-1",jsx:jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center",children:jsxRuntimeExports.jsx(Plus,{size:25})}),onClick:()=>ms()})]})]})})}function NamedListEditor({initialName:ds,initialItems:dn,onCancel:ms,onSave:xs,namePlaceholder:bs,itemPlaceholders:Es,hideAdd:ws,hideDelete:Rs,disableReorder:js}){const[Cs,As]=reactExports.useState(ds),[ks,Os]=reactExports.useState(()=>(dn&&dn.length?dn:[""]).map(Zs=>({id:uuid(),text:Zs})));reactExports.useEffect(()=>Os((dn&&dn.length?dn:[""]).map(Zs=>({id:uuid(),text:Zs}))),[dn]);const[Ms,Ds]=reactExports.useState(null),Ps=reactExports.useRef([]),Ls=Zs=>Ys=>{if(js)return;const Qs=ks[Zs]?.id;Qs&&(Ds(Qs),Ys.dataTransfer&&(Ys.dataTransfer.effectAllowed="move",Ys.dataTransfer.setData("text/plain",String(Qs))))};reactExports.useEffect(()=>{const Zs=Ys=>{Ys.key==="Enter"&&!ws&&Js()};return window.addEventListener("keydown",Zs),()=>window.removeEventListener("keydown",Zs)},[ws]);const Bs=Zs=>Ys=>{if(js)return;Ys.preventDefault(),Ys.stopPropagation();const Qs=Ms,ai=Ps.current[Zs];if(!Qs||!ai){Ys.dataTransfer&&(Ys.dataTransfer.dropEffect="none");return}const ia=ai.getBoundingClientRect(),ca=Ys.clientY>ia.top+ia.height/2;let ha=Zs+(ca?1:0);Os(ea=>{const ta=ea.findIndex(Ea=>Ea.id===Qs);if(ta<0||(ha<0&&(ha=0),ha>ea.length&&(ha=ea.length),ha===ta||ha===ta+1))return ea;const aa=ea.slice(),[fa]=aa.splice(ta,1);let ua=ha;return ta<ua&&(ua-=1),aa.splice(ua,0,fa),aa}),Ys.dataTransfer&&(Ys.dataTransfer.dropEffect="move")},Fs=Zs=>Ys=>{if(js)return;Ys.preventDefault(),Ys.stopPropagation();const Qs=Ms||Ys.dataTransfer.getData("text/plain");if(!Qs){Ds(null);return}Os(ai=>{const ia=ai.slice(),ca=ia.findIndex(ta=>ta.id===Qs);if(ca<0)return ia;let ha=Zs;if(ca<ha&&(ha-=1),ca===ha)return ia;const[ea]=ia.splice(ca,1);return ia.splice(ha,0,ea),ia}),Ds(null)},Us=()=>{js||Ds(null)},Gs=(Zs,Ys)=>{Os(Qs=>Qs.map((ai,ia)=>ia===Zs?{...ai,text:Ys}:ai))},Js=Zs=>{Os(Ys=>{const Qs=Ys.slice(),ai={id:uuid(),text:""};return typeof Zs=="number"?Qs.splice(Zs+1,0,ai):Qs.push(ai),Qs})},Ws=Zs=>{Os(Ys=>Ys.filter((Qs,ai)=>ai!==Zs))};return jsxRuntimeExports.jsxs("div",{className:"mt-4 rounded-lg bg-[var(--background-neutral)]",children:[jsxRuntimeExports.jsx("div",{className:"space-y-2 mb-2",children:jsxRuntimeExports.jsx(FormInput,{className:"flex-1",value:Cs,onChange:Zs=>As(Zs.target.value),name:"name",placeholder:bs??"Provide a name"})}),jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[ks.map((Zs,Ys)=>jsxRuntimeExports.jsxs("div",{ref:Qs=>{Ps.current[Ys]=Qs},className:`flex items-center gap-2 rounded-md transition-[transform,box-shadow,background-color] ${Ms===Zs.id?"opacity-50 bg-slate-200":""}`,onDragOver:Bs(Ys),onDrop:Fs(Ys),children:[!js&&jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Tertiary,className:"!p-1 cursor-grab active:cursor-grabbing",draggable:!0,onDragStart:Ls(Ys),onDragEnd:Us,title:"Drag to reorder",jsx:jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center",children:jsxRuntimeExports.jsx(Hand,{size:22})})}),jsxRuntimeExports.jsx(FormInput,{className:"flex-1",value:Zs.text,onChange:Qs=>Gs(Ys,Qs.target.value),name:"item-"+Ys,placeholder:Es?.[Ys],onDragOver:Qs=>Qs.preventDefault(),onDrop:Qs=>{Qs.preventDefault(),Qs.stopPropagation(),Fs(Ys)(Qs)}}),!Rs&&jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,className:"!p-1",jsx:jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center",children:jsxRuntimeExports.jsx(Trash2,{color:"black",size:25})}),onClick:()=>Ws(Ys)}),!ws&&jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Tertiary,className:"!p-1",jsx:jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center",children:jsxRuntimeExports.jsx(Plus,{size:25})}),onClick:()=>Js(Ys)})]}
1428,Zs.id)),jsxRuntimeExports.jsx("div",{className:"flex gap-2",children:jsxRuntimeExports.jsxs("div",{className:"ml-auto flex gap-2",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,onClick:ms,text:"Cancel"}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,onClick:()=>xs(Cs??"",ks.map(Zs=>Zs.text)),text:"Save"})]})})]})]})}function StoryboardStepEditorModal({step:ds,onClose:dn,onSave:ms}){const xs=["Visual description","On-screen text","User action","Voiceover script","Duration (e.g., 5-10s)"],bs=[ds.visualDescription??"",ds.onScreenText??"",ds.userAction??"",ds.voiceoverScript??"",ds.duration??""];return jsxRuntimeExports.jsx(Modal,{title:"Edit storyboard step",onClose:dn,children:jsxRuntimeExports.jsx(NamedListEditor,{initialName:ds.title,initialItems:bs,onCancel:dn,onSave:async(Es,ws)=>{const[Rs,js,Cs,As,ks]=ws;await ms({...ds,title:Es,visualDescription:Rs?.trim()||"",onScreenText:js?.trim()||"",userAction:Cs?.trim()||"",voiceoverScript:As?.trim()||"",duration:ks?.trim()||""})},namePlaceholder:"Step title",itemPlaceholders:xs,hideAdd:!0,hideDelete:!0,disableReorder:!0})})}function StoryboardTab({id:ds}){const[dn,ms]=reactExports.useState([]),[xs,bs]=reactExports.useState(PageState.NotReady),[Es,ws]=reactExports.useState(!1),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(null),ks=async()=>{const{data:Fs}=await Sdk.storyboardClient.fetchStoryboard(ds),Us=()=>Math.random().toString(36).slice(2,10);if(Fs){const Gs=(Fs.steps||[]).map(Js=>({id:Js.id||Us(),title:Js.title,visualDescription:Js.visualDescription,onScreenText:Js.onScreenText,userAction:Js.userAction,voiceoverScript:Js.voiceoverScript,duration:Js.duration}));ms(Gs)}else ms([]);bs(PageState.Ready)};reactExports.useEffect(()=>{xs===PageState.NotReady&&ks()},[ds,xs]);const Os=Fs=>{ms(Us=>{const Gs=Us.slice(),Js={id:Math.random().toString(36).slice(2,10),title:"",visualDescription:"",onScreenText:"",userAction:"",voiceoverScript:"",duration:""};return typeof Fs=="number"?Gs.splice(Fs+1,0,Js):Gs.push(Js),Gs})},Ms=Fs=>Fs.map(Us=>({...Us,title:Us.title?.trim()||"",visualDescription:Us.visualDescription?.trim()||void 0,onScreenText:Us.onScreenText?.trim()||void 0,userAction:Us.userAction?.trim()||void 0,voiceoverScript:Us.voiceoverScript?.trim()||void 0,duration:Us.duration?.trim()||void 0})).filter(Us=>Us.title||Us.visualDescription||Us.onScreenText||Us.userAction||Us.voiceoverScript||Us.duration),Ds=async Fs=>{await Sdk.storyboardClient.upsertStoryboard(ds,Ms(Fs)),js(!1),bs(PageState.NotReady)};async function Ps(){await Ds(dn)}function Ls(){const Fs=Gs=>(Gs??"").replace(/\|/g,"\\|").replace(/\n/g,"<br/>"),Us=["# Video Storyboard","","| Step | Title | Visual | On-screen Text | User Action | Voiceover | Duration |","| --- | --- | --- | --- | --- | --- | --- |",...dn.map((Gs,Js)=>[Js+1,Fs(Gs.title),Fs(Gs.visualDescription),Fs(Gs.onScreenText),Fs(Gs.userAction),Fs(Gs.voiceoverScript),Fs(Gs.duration)].join(" | ").replace(/^/,"| ").replace(/$/," |"))].join(`
1429`);navigator.clipboard.writeText(Us),alert("Storyboard copied to clipboard as Markdown.")}const Bs=Fs=>{const Us=dn.findIndex(Js=>Js.id===Fs.active.id),Gs=dn.findIndex(Js=>Js.id===Fs.over?.id);Us<0||Gs<0||Us===Gs||ms(Js=>arrayMove(Js,Us,Gs))};return reactExports.useEffect(()=>{Rs&&As(null)},[Rs]),jsxRuntimeExports.jsx("div",{className:"space-y-3",children:xs===PageState.Ready&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Rs?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Tertiary,onClick:()=>Os(-1),text:"Add Step"}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,text:"Save",onClick:Ps})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Tertiary,text:"Export",onClick:Ls}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,text:"Edit",onClick:()=>js(!0)}),jsxRuntimeExports.jsx(Button,{onClick:()=>ws(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(RotateCcw,{size:16}),"Generate"]})})]})})}),jsxRuntimeExports.jsx(DndContext,{onDragEnd:Rs?Bs:void 0,children:jsxRuntimeExports.jsx(SortableContext,{items:dn,strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:dn.map((Fs,Us)=>jsxRuntimeExports.jsx(StepItem,{step:Fs,readonly:!Rs,onEdit:Rs?void 0:()=>As(Fs),onChange:Gs=>ms(Js=>Js.map(Ws=>Ws.id===Gs.id?Gs:Ws)),onAdd:()=>Os(Us),onDelete:()=>ms(Gs=>Gs.filter(Js=>Js.id!==Fs.id))},Fs.id))})})}),Cs&&jsxRuntimeExports.jsx(StoryboardStepEditorModal,{step:Cs,onClose:()=>As(null),onSave:async Fs=>{const Us=dn.map(Gs=>Gs.id===Fs.id?Fs:Gs);ms(Us),await Ds(Us),As(null)}}),Es&&jsxRuntimeExports.jsx(GenerateStoryboardModal,{id:ds,onClose:()=>ws(!1),onSubmit:()=>{ws(!1),bs(PageState.NotReady)}})]})})}var SOPTemplate=(ds=>(ds.Standard="Standard",ds.HowToSteps="HowToSteps",ds.PolicyProcedure="PolicyProcedure",ds))(SOPTemplate||{});const templates=[{id:SOPTemplate.Standard,name:"Standard SOP Format",headings:["Introduction","Minimum Standards","Roles & Responsibilities","Measure, Analyse, Improve","Tools & Resources"]},{id:SOPTemplate.HowToSteps,name:"How-To Steps (Procedure-first)",headings:["Purpose","Prerequisites","Steps","Quality Checks","Handover & Records"]},{id:SOPTemplate.PolicyProcedure,name:"Policy + Procedure",headings:["Policy Statement","Scope","Definitions","Procedure","Controls & Records"]}];class TemplatesClient{async list(){return await new Promise(dn=>setTimeout(dn,200)),templates}async getById(dn){return await new Promise(ms=>setTimeout(ms,80)),templates.find(ms=>ms.id===dn)??templates[0]}}function RegenerateSOPModal({id:ds,onClose:dn,onSubmit:ms,templates:xs,existing:bs}){const[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(xs[0]?.id),[Cs,As]=reactExports.useState(!1);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-2xl bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Generate Draft"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"p-4 space-y-4",children:Cs?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx("p",{className:"text-base text-[--text-medium]",children:"Writing SOP…"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Select template"}),jsxRuntimeExports.jsx("select",{value:Rs,onChange:ks=>js(ks.target.value),className:"w-full rounded-lg border border-[--border-medium] p-2",children:xs.map(ks=>jsxRuntimeExports.jsx("option",{value:ks.id,children:ks.name},ks.id))})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Feedback (Optional)"}),jsxRuntimeExports.jsx("textarea",{value:Es,onChange:ks=>ws(ks.target.value),rows:3,className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary",placeholder:"e.g. tighten Minimum Standards, add handoff steps…"})]}),bs&&jsxRuntimeExports.jsx("p",{className:"text-xl",children:"This will generate a revision of the existing SOP based on your feedback."}),jsxRuntimeExports.jsxs("p",{className:"text-md text",children:["Brand voice is applied automatically. Adjust in ",jsxRuntimeExports.jsx("strong",{children:"Settings → Brand Voice"}),"."]})]})}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn,children:"Cancel"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:bs?"Generate Revision":"Generate Draft",save:()=>(As(!0),Sdk.businessProcessClient.generateContent(ds,Rs,Es)),onSuccess:ks=>{As(!1),ms(ks?.data??"")},onFailure:()=>{As(!1),dn()}})]})]})})}function SopMarkdown({content:ds}){return jsxRuntimeExports.jsx(Markdown,{remarkPlugins:[remarkGfm],components:{h1:({...dn})=>jsxRuntimeExports.jsx("h1",{className:"text-3xl font-bold mb-4",...dn}),h2:({...dn})=>jsxRuntimeExports.jsx("h2",{className:"text-2xl font-semibold mb-3",...dn}),h3:({...dn})=>jsxRuntimeExports.jsx("h3",{className:"text-xl font-semibold mb-2",...dn}),p:({...dn})=>jsxRuntimeExports.jsx("p",{className:"mb-3",...dn}),ul:({...dn})=>jsxRuntimeExports.jsx("ul",{className:"list-disc ml-5 mb-3",...dn}),ol:({...dn})=>jsxRuntimeExports.jsx("ol",{className:"list-decimal ml-5 mb-3",...dn}),blockquote:({...dn})=>jsxRuntimeExports.jsx("blockquote",{className:"border-l-4 pl-3 italic text-[--text-medium] mb-3",...dn}),table:({...dn})=>jsxRuntimeExports.jsx("div",{className:"overflow-x-auto mb-4",children:jsxRuntimeExports.jsx("table",{className:"w-full border-collapse text-sm",...dn})}),thead:({...dn})=>jsxRuntimeExports.jsx("thead",{className:"bg-gray-50",...dn}),th:({...dn})=>jsxRuntimeExports.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold",...dn}),td:({...dn})=>jsxRuntimeExports.jsx("td",{className:"border border-gray-200 px-3 py-2 align-top",...dn}),code:({className:dn,children:ms,...xs})=>dn?jsxRuntimeExports.jsx("code",{className:`${dn} font-mono bg-[--background-neutral] rounded px-1 block`,...xs,children:ms}):jsxRuntimeExports.jsx("code",{className:"font-mono bg-[--background-neutral] rounded px-1",...xs,children:ms}),a:({...dn})=>jsxRuntimeExports.jsx("a",{className:"text-[--color-primary] underline",...dn})},children:ds})}const formatVersionDate=ds=>DateTime.fromSeconds(ds).toFormat("d LLL yyyy, HH:mm:ss");function SopHistoryModal({id:ds,onClose:dn,onRestore:ms}){const[xs,bs]=reactExports.useState(),[Es,ws]=reactExports.useState(),[Rs,js]=reactExports.useState(),[Cs,As]=reactExports.useState(!1);return reactExports.useEffect(()=>{Sdk.businessProcessClient.fetchContentVersions(ds).then(({data:ks})=>
1429{bs(ks),ws(ks[0])}).catch(()=>As(!0))},[ds]),reactExports.useEffect(()=>{if(!Es)return;let ks=!0;return js(void 0),Sdk.businessProcessClient.fetchContentVersion(ds,Es.id).then(({data:Os})=>ks&&js(Os??"")).catch(()=>ks&&As(!0)),()=>{ks=!1}},[ds,Es]),jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-5xl h-[85vh] flex flex-col bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Version History"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row flex-1 min-h-0",children:[jsxRuntimeExports.jsxs("ul",{className:"md:w-72 max-h-48 md:max-h-none overflow-y-auto border-b md:border-b-0 md:border-r border-[--border-medium]",children:[xs===void 0&&!Cs&&jsxRuntimeExports.jsx("li",{className:"p-4 text-[--text-medium]",children:"Loading…"}),xs?.length===0&&jsxRuntimeExports.jsx("li",{className:"p-4 text-[--text-medium]",children:"No saved versions yet."}),xs?.map(ks=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsxs("button",{onClick:()=>ws(ks),className:`w-full text-left px-4 py-3 hover:bg-[--background-neutral] ${ks.id===Es?.id?"bg-[--background-neutral] font-semibold":""}`,children:[jsxRuntimeExports.jsx("span",{className:"block text-sm",children:formatVersionDate(ks.lastModifiedEpoch)}),ks.latest&&jsxRuntimeExports.jsx("span",{className:"block text-xs italic text-[--text-medium]",children:"Current"}),!ks.latest&&ks.size===0&&jsxRuntimeExports.jsx("span",{className:"block text-xs italic text-[--text-medium]",children:"Empty"})]})},ks.id))]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto p-4 md:p-6 leading-7",children:[Cs&&jsxRuntimeExports.jsx("p",{className:"text-red-800",children:"Version history could not be loaded. Please try again."}),!Cs&&Es&&Rs===void 0&&jsxRuntimeExports.jsx("p",{className:"text-[--text-medium]",children:"Loading…"}),!Cs&&Rs===""&&jsxRuntimeExports.jsx("p",{className:"text-[--text-medium] italic",children:"This version is empty."}),!Cs&&Rs&&jsxRuntimeExports.jsx(SopMarkdown,{content:Rs})]})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Close",buttonType:ButtonType.Cancel,onClick:dn}),Es&&!Es.latest&&jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Restore this version",save:()=>Sdk.businessProcessClient.restoreContentVersion(ds,Es.id),onSuccess:ks=>ms(ks?.data??"")})]})]})})}var r$1=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const l$3=reactExports.createContext(null);function t$2(ds,dn){return{getTheme:function(){return dn??null}}}function o$5(){const ds=reactExports.useContext(l$3);return ds==null&&r$1(8),ds}function t$1(ds){return{}}const e$1={},n$2={},r={},i$2={},s$2={},o$4={},l$2={},c$5={},u$6={},a$3={},f$2={},d$3={},h$2={},g$6={},_$4={},p$4={},y$3={},m$5={},x$3={},v$3={},T$2={},S$3={},k$4={},C$4={},b$4={},N$5={},w$3={},E$4={},P$3={},D$6={},F$3={},I$3={},O$3={},L$4={},A$6={},M$3={},W$2={},z$3={},B$4={},R$3={},K$2={},J$3={},U$2={},V$5={},$$3={};var H$4=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const j$3=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,q$2=j$3&&"documentMode"in document?document.documentMode:null,Q$3=j$3&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),X$3=j$3&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Y$3=!(!j$3||!("InputEvent"in window)||q$2)&&"getTargetRanges"in new window.InputEvent("input"),Z$2=j$3&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),G$3=j$3&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,tt$2=j$3&&/Android/.test(navigator.userAgent),et$1=j$3&&/^(?=.*Chrome).*/i.test(navigator.userAgent),nt$1=j$3&&tt$2&&et$1,rt$1=j$3&&/AppleWeb
1429Kit\/[\d.]+/.test(navigator.userAgent)&&!et$1,it$1=1,st$2=3,ot=0,lt$2=1,ct$2=2,ut$1=0,at$2=1,ft$2=2,dt$2=4,ht$2=8,gt$2=240|(3|dt$2|ht$2),_t=1,pt$2=2,yt$2=3,mt$2=4,xt$2=5,vt$2=6,Tt$1=Z$2||G$3||rt$1?" ":"​",St$1=`
1430
1431`,kt=X$3?" ":Tt$1,Ct$2="֑-߿יִ-﷽ﹰ-ﻼ",bt$1="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Nt$1=new RegExp("^[^"+bt$1+"]*["+Ct$2+"]"),wt$2=new RegExp("^[^"+Ct$2+"]*["+bt$1+"]"),Et$2={bold:1,code:16,highlight:128,italic:2,strikethrough:dt$2,subscript:32,superscript:64,underline:ht$2},Pt$2={directionless:1,unmergeable:2},Dt$1={center:pt$2,end:vt$2,justify:mt$2,left:_t,right:yt$2,start:xt$2},Ft$1={[pt$2]:"center",[vt$2]:"end",[mt$2]:"justify",[_t]:"left",[yt$2]:"right",[xt$2]:"start"},It={normal:0,segmented:2,token:1},Ot$1={[ut$1]:"normal",[ft$2]:"segmented",[at$2]:"token"};function Lt(...ds){const dn=[];for(const ms of ds)if(ms&&typeof ms=="string")for(const[xs]of ms.matchAll(/\S+/g))dn.push(xs);return dn}const At$1=100;let Mt=!1,Wt=0;function zt(ds){Wt=ds.timeStamp}function Bt(ds,dn,ms){return dn.__lexicalLineBreak===ds||ds[`__lexicalKey_${ms._key}`]!==void 0}function Rt(ds,dn,ms){const xs=on(ms._window);let bs=null,Es=null;
1431xs!==null&&xs.anchorNode===ds&&(bs=xs.anchorOffset,Es=xs.focusOffset);const ws=ds.nodeValue;ws!==null&&Ne$1(dn,ws,bs,Es,!1)}function Kt(ds,dn,ms){if(ti(ds)){const xs=ds.anchor.getNode();if(xs.is(ms)&&ds.format!==xs.getFormat())return!1}return dn.nodeType===st$2&&ms.isAttached()}function Jt(ds,dn,ms){Mt=!0;const xs=performance.now()-Wt>At$1;try{Qi(ds,(()=>{const bs=pi()||(function(Os){return Os.getEditorState().read((()=>{const Ms=pi();return Ms!==null?Ms.clone():null}))})(ds),Es=new Map,ws=ds.getRootElement(),Rs=ds._editorState,js=ds._blockCursorElement;let Cs=!1,As="";for(let Os=0;Os<dn.length;Os++){const Ms=dn[Os],Ds=Ms.type,Ps=Ms.target;let Ls=he$1(Ps,Rs);if(!(Ls===null&&Ps!==ws||Yi(Ls))){if(Ds==="characterData")xs&&Ur(Ls)&&Kt(bs,Ps,Ls)&&Rt(Ps,Ls,ds);else if(Ds==="childList"){Cs=!0;const Bs=Ms.addedNodes;for(let Gs=0;Gs<Bs.length;Gs++){const Js=Bs[Gs],Ws=de$1(Js),Zs=Js.parentNode;if(Zs!=null&&Js!==js&&Ws===null&&(Js.nodeName!=="BR"||!Bt(Js,Zs,ds))){if(X$3){const Ys=Js.innerText||Js.nodeValue;Ys&&(As+=Ys)}Zs.removeChild(Js)}}const Fs=Ms.removedNodes,Us=Fs.length;if(Us>0){let Gs=0;for(let Js=0;Js<Us;Js++){const Ws=Fs[Js];(Ws.nodeName==="BR"&&Bt(Ws,Ps,ds)||js===Ws)&&(Ps.appendChild(Ws),Gs++)}Us!==Gs&&(Ps===ws&&(Ls=ye$1(Rs)),Es.set(Ps,Ls))}}}}if(Es.size>0)for(const[Os,Ms]of Es)if(Gi(Ms)){const Ds=Ms.getChildrenKeys();let Ps=Os.firstChild;for(let Ls=0;Ls<Ds.length;Ls++){const Bs=Ds[Ls],Fs=ds.getElementByKey(Bs);Fs!==null&&(Ps==null?(Os.appendChild(Fs),Ps=Fs):Ps!==Fs&&Os.replaceChild(Fs,Ps),Ps=Ps.nextSibling)}}else Ur(Ms)&&Ms.markDirty();const ks=ms.takeRecords();if(ks.length>0){for(let Os=0;Os<ks.length;Os++){const Ms=ks[Os],Ds=Ms.addedNodes,Ps=Ms.target;for(let Ls=0;Ls<Ds.length;Ls++){const Bs=Ds[Ls],Fs=Bs.parentNode;Fs==null||Bs.nodeName!=="BR"||Bt(Bs,Ps,ds)||Fs.removeChild(Bs)}}ms.takeRecords()}bs!==null&&(Cs&&(bs.dirty=!0,me(bs)),X$3&&Ke$1(ds)&&bs.insertRawText(As))}))}finally{Mt=!1}}function Ut(ds){const dn=ds._observer;dn!==null&&Jt(ds,dn.takeRecords(),dn)}function Vt(ds){(function(dn){Wt===0&&Qe$1(dn).addEventListener("textInput",zt,!0)})(ds),ds._observer=new MutationObserver(((dn,ms)=>{Jt(ds,dn,ms)}))}function $t$1(ds,dn){const ms=ds.__mode,xs=ds.__format,bs=ds.__style,Es=dn.__mode,ws=dn.__format,Rs=dn.__style;return!(ms!==null&&ms!==Es||xs!==null&&xs!==ws||bs!==null&&bs!==Rs)}function Ht(ds,dn){const ms=ds.mergeWithSibling(dn),xs=Wi()._normalizedNodes;return xs.add(ds.__key),xs.add(dn.__key),ms}
1431function jt(ds){let dn,ms,xs=ds;if(xs.__text!==""||!xs.isSimpleText()||xs.isUnmergeable()){for(;(dn=xs.getPreviousSibling())!==null&&Ur(dn)&&dn.isSimpleText()&&!dn.isUnmergeable();){if(dn.__text!==""){if($t$1(dn,xs)){xs=Ht(dn,xs);break}break}dn.remove()}for(;(ms=xs.getNextSibling())!==null&&Ur(ms)&&ms.isSimpleText()&&!ms.isUnmergeable();){if(ms.__text!==""){if($t$1(xs,ms)){xs=Ht(xs,ms);break}break}ms.remove()}}else xs.remove()}function qt(ds){return Qt(ds.anchor),Qt(ds.focus),ds}function Qt(ds){for(;ds.type==="element";){const dn=ds.getNode(),ms=ds.offset;let xs,bs;if(ms===dn.getChildrenSize()?(xs=dn.getChildAtIndex(ms-1),bs=!0):(xs=dn.getChildAtIndex(ms),bs=!1),Ur(xs)){ds.set(xs.__key,bs?xs.getTextContentSize():0,"text");break}if(!Gi(xs))break;ds.set(xs.__key,bs?xs.getChildrenSize():0,"element")}}let Xt=1;const Yt=typeof queueMicrotask=="function"?queueMicrotask:ds=>{Promise.resolve().then(ds)};function Zt(ds){const dn=document.activeElement;if(dn===null)return!1;const ms=dn.nodeName;return Yi(he$1(ds))&&(ms==="INPUT"||ms==="TEXTAREA"||dn.contentEditable==="true"&&dn.__lexicalEditor==null)}function Gt(ds,dn,ms){const xs=ds.getRootElement();try{return xs!==null&&xs.contains(dn)&&xs.contains(ms)&&dn!==null&&!Zt(dn)&&te$1(dn)===ds}catch{return!1}}function te$1(ds){let dn=ds;for(;dn!=null;){const ms=dn.__lexicalEditor;if(ms!=null)return ms;dn=$e$1(dn)}return null}function ee$1(ds){return ds.isToken()||ds.isSegmented()}function ne$1(ds){return ds.nodeType===st$2}function re$1(ds){let dn=ds;for(;dn!=null;){if(ne$1(dn))return dn;dn=dn.firstChild}return null}function ie$1(ds,dn,ms){const xs=Et$2[dn];if(ms!==null&&(ds&xs)==(ms&xs))return ds;let bs=ds^xs;return dn==="subscript"?bs&=-65:dn==="superscript"&&(bs&=-33),bs}function se$1(ds){return Ur(ds)||Cr(ds)||Yi(ds)}function oe$1(ds,dn){if(dn!=null)return void(ds.__key=dn);Li(),Ai();const ms=Wi(),xs=Mi(),bs=""+Xt++;xs._nodeMap.set(bs,ds),Gi(ds)?ms._dirtyElements.set(bs,!0):ms._dirtyLeaves.add(bs),ms._cloneNotNeeded.add(bs),ms._dirtyType=lt$2,ds.__key=bs}function le$1(ds){const dn=ds.getParent();if(dn!==null){const ms=ds.getWritable(),xs=dn.getWritable(),bs=ds.getPreviousSibling(),Es=ds.getNextSibling();if(bs===null)if(Es!==null){const ws=Es.getWritable();xs.__first=Es.__key,ws.__prev=null}else xs.__first=null;else{const ws=bs.getWritable();if(Es!==null){const Rs=Es.getWritable();Rs.__prev=ws.__key,ws.__next=Rs.__key}else ws.__next=null;ms.__prev=null}if(Es===null)if(bs!==null){const ws=bs.getWritable();xs.__last=bs.__key,ws.__next=null}else xs.__last=null;else{const ws=Es.getWritable();if(bs!==null){const Rs=bs.getWritable();Rs.__next=ws.__key,ws.__prev=Rs.__key}else ws.__prev=null;ms.__next=null}xs.__size--,ms.__parent=null}}function ce$1(ds){Ai();const dn=ds.getLatest(),ms=dn.__parent,xs=Mi(),bs=Wi(),Es=xs._nodeMap,ws=bs._dirtyElements;ms!==null&&(function(js,Cs,As){let ks=js;for(;ks!==null;){if(As.has(ks))return;const Os=Cs.get(ks);if(Os===void 0)break;As.set(ks,!1),ks=Os.__parent}})(ms,Es,ws);const Rs=dn.__key;bs._dirtyType=lt$2,Gi(ds)?ws.set(Rs,!0):bs._dirtyLeaves.add(Rs)}function ue(ds){Li();const dn=Wi(),ms=dn._compositionKey;if(ds!==ms){if(dn._compositionKey=ds,ms!==null){const xs=fe$1(ms);xs!==null&&xs.getWritable()}if(ds!==null){const xs=fe$1(ds);xs!==null&&xs.getWritable()}}}function ae$1(){return Oi()?null:Wi()._compositionKey}function fe$1(ds,dn){const ms=(dn||Mi())._nodeMap.get(ds);return ms===void 0?null:ms}function de$1(ds,dn){const ms=ds[`__lexicalKey_${Wi()._key}`];return ms!==void 0?fe$1(ms,dn):null}function he$1(ds,dn){let ms=ds;for(;ms!=null;){const xs=de$1(ms,dn);if(xs!==null)return xs;ms=$e$1(ms)}return null}function ge(ds){const dn=ds._decorators,ms=Object.assign({},dn);return ds._pendingDecorators=ms,ms}function _e(ds){return ds.read((()=>pe$1().getTextContent()))}function pe$1(){return ye$1(Mi())}function ye$1(ds){return ds._nodeMap.get("root")}function me(ds){Li();const dn=Mi();ds!==null&&(ds.dirty=!0,ds.setCachedNodes(null)),dn._selection=ds}function xe$1(ds){const dn=Wi(),ms=(function(xs,bs){let Es=xs;for(;Es!=null;){const ws=Es[`__lexicalKey_${bs._key}`];if(ws!==void 0)return ws;Es=$e$1(Es)}return null})(ds,dn);return ms===null?ds===dn.getRootElement()?fe$1("root"):null:fe$1(ms)}function ve$1(ds,dn){return dn?ds.getTextContentSize():0}function Te$1(ds){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(ds)}function Se(ds){const dn=[];let ms=ds;for(;ms!==null;)dn.push(ms),ms=ms._parentEditor;return dn}function ke$1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ce(ds){return ds.nodeType===st$2?ds.nodeValue:null}function be(ds,dn,ms){const xs=on(dn._window);if(xs===null)return;
1431const bs=xs.anchorNode;let{anchorOffset:Es,focusOffset:ws}=xs;if(bs!==null){let Rs=Ce(bs);const js=he$1(bs);if(Rs!==null&&Ur(js)){if(Rs===Tt$1&&ms){const Cs=ms.length;Rs=ms,Es=Cs,ws=Cs}Rs!==null&&Ne$1(js,Rs,Es,ws,ds)}}}function Ne$1(ds,dn,ms,xs,bs){let Es=ds;if(Es.isAttached()&&(bs||!Es.isDirty())){const ws=Es.isComposing();let Rs=dn;(ws||bs)&&dn[dn.length-1]===Tt$1&&(Rs=dn.slice(0,-1));const js=Es.getTextContent();if(bs||Rs!==js){if(Rs===""){if(ue(null),Z$2||G$3||rt$1)Es.remove();else{const Ps=Wi();setTimeout((()=>{Ps.update((()=>{Es.isAttached()&&Es.remove()}))}),20)}return}const Cs=Es.getParent(),As=yi(),ks=Es.getTextContentSize(),Os=ae$1(),Ms=Es.getKey();if(Es.isToken()||Os!==null&&Ms===Os&&!ws||ti(As)&&(Cs!==null&&!Cs.canInsertTextBefore()&&As.anchor.offset===0||As.anchor.key===ds.__key&&As.anchor.offset===0&&!Es.canInsertTextBefore()&&!ws||As.focus.key===ds.__key&&As.focus.offset===ks&&!Es.canInsertTextAfter()&&!ws))return void Es.markDirty();const Ds=pi();if(!ti(Ds)||ms===null||xs===null)return void Es.setTextContent(Rs);if(Ds.setTextNodeRange(Es,ms,Es,xs),Es.isSegmented()){const Ps=Jr(Es.getTextContent());Es.replace(Ps),Es=Ps}Es.setTextContent(Rs)}}}function we(ds,dn){if(dn.isSegmented())return!0;if(!ds.isCollapsed())return!1;const ms=ds.anchor.offset,xs=dn.getParentOrThrow(),bs=dn.isToken();return ms===0?!dn.canInsertTextBefore()||!xs.canInsertTextBefore()&&!dn.isComposing()||bs||(function(Es){const ws=Es.getPreviousSibling();return(Ur(ws)||Gi(ws)&&ws.isInline())&&!ws.canInsertTextAfter()})(dn):ms===dn.getTextContentSize()&&(!dn.canInsertTextAfter()||!xs.canInsertTextAfter()&&!dn.isComposing()||bs)}function Ee$1(ds){return ds===37}function Pe$1(ds){return ds===39}function De$1(ds,dn){return Q$3?ds:dn}function Fe(ds){return ds===13}function Ie$1(ds){return ds===8}function Oe$1(ds){return ds===46}function Le$1(ds,dn,ms){return ds===65&&De$1(dn,ms)}function Ae$1(){const ds=pe$1();me(qt(ds.select(0,ds.getChildrenSize())))}function Me$1(ds,dn){ds.__lexicalClassNameCache===void 0&&(ds.__lexicalClassNameCache={});const ms=ds.__lexicalClassNameCache,xs=ms[dn];if(xs!==void 0)return xs;const bs=ds[dn];if(typeof bs=="string"){const Es=Lt(bs);return ms[dn]=Es,Es}return bs}function We$1(ds,dn,ms,xs,bs){if(ms.size===0)return;const Es=xs.__type,ws=xs.__key,Rs=dn.get(Es);Rs===void 0&&H$4(33,Es);const js=Rs.klass;let Cs=ds.get(js);Cs===void 0&&(Cs=new Map,ds.set(js,Cs));const As=Cs.get(ws),ks=As==="destroyed"&&bs==="created";(As===void 0||ks)&&Cs.set(ws,ks?"updated":bs)}function ze$1(ds){const dn=Mi(),ms=dn._readOnly,xs=ds.getType(),bs=dn._nodeMap,Es=[];for(const[,ws]of bs)ws instanceof ds&&ws.__type===xs&&(ms||ws.isAttached())&&Es.push(ws);return Es}function Be$1(ds,dn,ms){const xs=ds.getParent();let bs=ms,Es=ds;return xs!==null&&(dn&&ms===0?(bs=Es.getIndexWithinParent(),Es=xs):dn||ms!==Es.getChildrenSize()||(bs=Es.getIndexWithinParent()+1,Es=xs)),Es.getChildAtIndex(dn?bs-1:bs)}function Re$1(ds,dn){const ms=ds.offset;if(ds.type==="element")return Be$1(ds.getNode(),dn,ms);{const xs=ds.getNode();if(dn&&ms===0||!dn&&ms===xs.getTextContentSize()){const bs=dn?xs.getPreviousSibling():xs.getNextSibling();return bs===null?Be$1(xs.getParentOrThrow(),dn,xs.getIndexWithinParent()+(dn?0:1)):bs}}return null}function Ke$1(ds){const dn=Qe$1(ds).event,ms=dn&&dn.inputType;return ms==="insertFromPaste"||ms==="insertFromPasteAsQuotation"}function Je$1(ds,dn,ms){return Hi(ds,dn,ms)}function Ue$1(ds){return!ns(ds)&&!ds.isLastChild()&&!ds.isInline()}function Ve$1(ds,dn){const ms=ds._keyToDOMMap.get(dn);return ms===void 0&&H$4(75,dn),ms}function $e$1(ds){const dn=ds.assignedSlot||ds.parentElement;return dn!==null&&dn.nodeType===11?dn.host:dn}function qe$1(ds,dn){let ms=ds.getParent();for(;ms!==null;){if(ms.is(dn))return!0;ms=ms.getParent()}return!1}function Qe$1(ds){const dn=ds._window;return dn===null&&H$4(78),dn}function Ye$1(ds){let dn=ds.getParentOrThrow();for(;dn!==null;){if(Ze$1(dn))return dn;dn=dn.getParentOrThrow()}return dn}function Ze$1(ds){return ns(ds)||Gi(ds)&&ds.isShadowRoot()}function Ge$1(ds){const dn=ds.constructor.clone(ds);return oe$1(dn,null),dn}function tn(ds){const dn=Wi(),ms=ds.constructor.getType(),xs=dn._nodes.get(ms);xs===void 0&&H$4(97);const bs=xs.replace;if(bs!==null){const Es=bs(ds);return Es instanceof ds.constructor||H$4(98),Es}return ds}function en(ds,dn){!ns(ds.getParent())||Gi(dn)||Yi(dn)||H$4(99)}function nn(ds){return(Yi(ds)||Gi(ds)&&!ds.canBeEmpty())&&!ds.isInline()}function rn(ds,dn,ms){ms.style.removeProperty("caret-color"),dn._blockCursorElement=null;const xs=ds.parentElement;xs!==null&&xs.removeChild(ds)}function sn(ds,dn,ms){let xs=ds._blockCursorElement;if(ti(ms)&&ms.isCollapsed()&&ms.anchor.type==="element"&&dn.contains(document.activeElement)){const bs=ms.anchor,Es=bs.getNode(),ws=bs.offset;let Rs=!1,js=null;if(ws===Es.getChildrenSize())nn(Es.getChildAtIndex(ws-1))&&(Rs=!0);else{const Cs=Es.getChildAtIndex(ws);if(nn(Cs)){const As=Cs.getPreviousSibling();(As===null||nn(As))&&(Rs=!0,js=ds.getElementByKey(Cs.__key))}}if(Rs){const Cs=ds.getElementByKey(Es.__key);return xs===null&&(ds._blockCursorElement=xs=(function(As){const ks=As.theme,Os=document.createElement("div");Os.contentEditable="false",Os.setAttribute("data-lexical-cursor","true");let Ms=ks.blockCursor;if(Ms!==void 0){if(typeof Ms=="string"){const Ds=Lt(Ms);Ms=ks.blockCursor=Ds}Ms!==void 0&&Os.classList.add(...Ms)}return Os})(ds._config)),dn.style.caretColor="transparent",void(js===null?Cs.appendChild(xs):Cs.insertBefore(xs,js))}}xs!==null&&rn(xs,ds,dn)}function on(ds){return j$3?(ds||window).getSelection():null}function ln(ds,dn){let ms=ds.getChildAtIndex(dn);ms==null&&(ms=ds),Ze$1(ds)&&H$4(102);const xs=ws=>{const Rs=ws.getParentOrThrow(),js=Ze$1(Rs),Cs=ws!==ms||js?Ge$1(ws):ws;if(js)return Gi(ws)&&Gi(Cs)||H$4(133),ws.insertAfter(Cs),[ws,Cs,Cs];{const[As,ks,Os]=xs(Rs),Ms=ws.getNextSiblings();return Os.append(Cs,...Ms),[As,ks,Cs]}},[bs,Es]=xs(ms);return[bs,Es]}function cn$2(ds){return un(ds)&&ds.tagName==="A"}function un(ds){return ds.nodeType===1}function an(ds){if(Yi(ds)&&!ds.isInline())return!0;
1431if(!Gi(ds)||Ze$1(ds))return!1;const dn=ds.getFirstChild(),ms=dn===null||Cr(dn)||Ur(dn)||dn.isInline();return!ds.isInline()&&ds.canBeEmpty()!==!1&&ms}function fn(ds,dn){let ms=ds;for(;ms!==null&&ms.getParent()!==null&&!dn(ms);)ms=ms.getParentOrThrow();return dn(ms)?ms:null}function hn(ds,dn,ms,xs,bs,Es){let ws=ds.getFirstChild();for(;ws!==null;){const Rs=ws.__key;ws.__parent===dn&&(Gi(ws)&&hn(ws,Rs,ms,xs,bs,Es),ms.has(Rs)||Es.delete(Rs),bs.push(Rs)),ws=ws.getNextSibling()}}let gn,_n,pn,yn,mn,xn,vn,Tn,Sn,kn,Cn="",bn="",Nn=null,wn="",En=!1,Pn=!1,Dn=null;function Fn(ds,dn){const ms=vn.get(ds);if(dn!==null){const xs=qn(ds);xs.parentNode===dn&&dn.removeChild(xs)}if(Tn.has(ds)||_n._keyToDOMMap.delete(ds),Gi(ms)){const xs=Un(ms,vn);In(xs,0,xs.length-1,null)}ms!==void 0&&We$1(kn,pn,yn,ms,"destroyed")}function In(ds,dn,ms,xs){let bs=dn;for(;bs<=ms;++bs){const Es=ds[bs];Es!==void 0&&Fn(Es,xs)}}function On(ds,dn){ds.setProperty("text-align",dn)}const Ln="40px";function An(ds,dn){const ms=gn.theme.indent;if(typeof ms=="string"){const bs=ds.classList.contains(ms);dn>0&&!bs?ds.classList.add(ms):dn<1&&bs&&ds.classList.remove(ms)}const xs=getComputedStyle(ds).getPropertyValue("--lexical-indent-base-value")||Ln;ds.style.setProperty("padding-inline-start",dn===0?"":`calc(${dn} * ${xs})`)}function Mn(ds,dn){const ms=ds.style;dn===0?On(ms,""):dn===_t?On(ms,"left"):dn===pt$2?On(ms,"center"):dn===yt$2?On(ms,"right"):dn===mt$2?On(ms,"justify"):dn===xt$2?On(ms,"start"):dn===vt$2&&On(ms,"end")}function Wn(ds,dn,ms){const xs=Tn.get(ds);xs===void 0&&H$4(60);const bs=xs.createDOM(gn,_n);if((function(Es,ws,Rs){const js=Rs._keyToDOMMap;ws["__lexicalKey_"+Rs._key]=Es,js.set(Es,ws)})(ds,bs,_n),Ur(xs)?bs.setAttribute("data-lexical-text","true"):Yi(xs)&&bs.setAttribute("data-lexical-decorator","true"),Gi(xs)){const Es=xs.__indent,ws=xs.__size;if(Es!==0&&An(bs,Es),ws!==0){const js=ws-1;(function(Cs,As,ks,Os){const Ms=bn;bn="",zn(Cs,ks,0,As,Os,null),Kn(ks,Os),bn=Ms})(Un(xs,Tn),js,xs,bs)}const Rs=xs.__format;Rs!==0&&Mn(bs,Rs),xs.isInline()||Rn(null,xs,bs),Ue$1(xs)&&(Cn+=St$1,wn+=St$1)}else{const Es=xs.getTextContent();if(Yi(xs)){const ws=xs.decorate(_n,gn);ws!==null&&$n(ds,ws),bs.contentEditable="false"}else Ur(xs)&&(xs.isDirectionless()||(bn+=Es));Cn+=Es,wn+=Es}if(dn!==null)if(ms!=null)dn.insertBefore(bs,ms);else{const Es=dn.__lexicalLineBreak;Es!=null?dn.insertBefore(bs,Es):dn.appendChild(bs)}return We$1(kn,pn,yn,xs,"created"),bs}function zn(ds,dn,ms,xs,bs,Es){const ws=Cn;Cn="";let Rs=ms;for(;Rs<=xs;++Rs){Wn(ds[Rs],bs,Es);const js=Tn.get(ds[Rs]);js!==null&&Nn===null&&Ur(js)&&(Nn=js.getFormat())}Ue$1(dn)&&(Cn+=St$1),bs.__lexicalTextContent=Cn,Cn=ws+Cn}function Bn(ds,dn){const ms=dn.get(ds);return Cr(ms)||Yi(ms)&&ms.isInline()}function Rn(ds,dn,ms){const xs=ds!==null&&(ds.__size===0||Bn(ds.__last,vn)),bs=dn.__size===0||Bn(dn.__last,Tn);if(xs){if(!bs){const Es=ms.__lexicalLineBreak;Es!=null&&ms.removeChild(Es),ms.__lexicalLineBreak=null}}else if(bs){const Es=document.createElement("br");ms.__lexicalLineBreak=Es,ms.appendChild(Es)}}function Kn(ds,dn){const ms=dn.__lexicalDirTextContent,xs=dn.__lexicalDir;if(ms!==bn||xs!==Dn){const Es=bn==="",ws=Es?Dn:(bs=bn,Nt$1.test(bs)?"rtl":wt$2.test(bs)?"ltr":null);if(ws!==xs){const Rs=dn.classList,js=gn.theme;let Cs=xs!==null?js[xs]:void 0,As=ws!==null?js[ws]:void 0;if(Cs!==void 0){if(typeof Cs=="string"){const ks=Lt(Cs);Cs=js[xs]=ks}Rs.remove(...Cs)}if(ws===null||Es&&ws==="ltr")dn.removeAttribute("dir");else{if(As!==void 0){if(typeof As=="string"){const ks=Lt(As);As=js[ws]=ks}As!==void 0&&Rs.add(...As)}dn.dir=ws}Pn||(ds.getWritable().__dir=ws)}Dn=ws,dn.__lexicalDirTextContent=bn,dn.__lexicalDir=ws}var bs}function Jn(ds,dn,ms){const xs=bn;var bs;bn="",Nn=null,(function(Es,ws,Rs){const js=Cn,Cs=Es.__size,As=ws.__size;if(Cn="",Cs===1&&As===1){const ks=Es.__first,Os=ws.__first;if(ks===Os)Vn(ks,Rs);else{const Ds=qn(ks),Ps=Wn(Os,null,null);Rs.replaceChild(Ps,Ds),Fn(ks,null)}const Ms=Tn.get(Os);Nn===null&&Ur(Ms)&&(Nn=Ms.getFormat())}else{const ks=Un(Es,vn),Os=Un(ws,Tn);if(Cs===0)As!==0&&zn(Os,ws,0,As-1,Rs,null);else if(As===0){if(Cs!==0){const Ms=Rs.__lexicalLineBreak==null;
1431In(ks,0,Cs-1,Ms?null:Rs),Ms&&(Rs.textContent="")}}else(function(Ms,Ds,Ps,Ls,Bs,Fs){const Us=Ls-1,Gs=Bs-1;let Js,Ws,Zs=(ai=Fs,ai.firstChild),Ys=0,Qs=0;for(var ai;Ys<=Us&&Qs<=Gs;){const ha=Ds[Ys],ea=Ps[Qs];if(ha===ea)Zs=Hn(Vn(ea,Fs)),Ys++,Qs++;else{Js===void 0&&(Js=new Set(Ds)),Ws===void 0&&(Ws=new Set(Ps));const aa=Ws.has(ha),fa=Js.has(ea);if(aa)if(fa){const ua=Ve$1(_n,ea);ua===Zs?Zs=Hn(Vn(ea,Fs)):(Zs!=null?Fs.insertBefore(ua,Zs):Fs.appendChild(ua),Vn(ea,Fs)),Ys++,Qs++}else Wn(ea,Fs,Zs),Qs++;else Zs=Hn(qn(ha)),Fn(ha,Fs),Ys++}const ta=Tn.get(ea);ta!==null&&Nn===null&&Ur(ta)&&(Nn=ta.getFormat())}const ia=Ys>Us,ca=Qs>Gs;if(ia&&!ca){const ha=Ps[Gs+1];zn(Ps,Ms,Qs,Gs,Fs,ha===void 0?null:_n.getElementByKey(ha))}else ca&&!ia&&In(Ds,Ys,Us,Fs)})(ws,ks,Os,Cs,As,Rs)}Ue$1(ws)&&(Cn+=St$1),Rs.__lexicalTextContent=Cn,Cn=js+Cn})(ds,dn,ms),Kn(dn,ms),us(bs=dn)&&Nn!=null&&Nn!==bs.__textFormat&&bs.setTextFormat(Nn),bn=xs,Nn=null}function Un(ds,dn){const ms=[];let xs=ds.__first;for(;xs!==null;){const bs=dn.get(xs);bs===void 0&&H$4(101),ms.push(xs),xs=bs.__next}return ms}function Vn(ds,dn){const ms=vn.get(ds);let xs=Tn.get(ds);ms!==void 0&&xs!==void 0||H$4(61);const bs=En||xn.has(ds)||mn.has(ds),Es=Ve$1(_n,ds);if(ms===xs&&!bs){if(Gi(ms)){const ws=Es.__lexicalTextContent;ws!==void 0&&(Cn+=ws,wn+=ws);const Rs=Es.__lexicalDirTextContent;Rs!==void 0&&(bn+=Rs)}else{const ws=ms.getTextContent();Ur(ms)&&!ms.isDirectionless()&&(bn+=ws),wn+=ws,Cn+=ws}return Es}if(ms!==xs&&bs&&We$1(kn,pn,yn,xs,"updated"),xs.updateDOM(ms,Es,gn)){const ws=Wn(ds,null,null);return dn===null&&H$4(62),dn.replaceChild(ws,Es),Fn(ds,null),ws}if(Gi(ms)&&Gi(xs)){const ws=xs.__indent;ws!==ms.__indent&&An(Es,ws);const Rs=xs.__format;Rs!==ms.__format&&Mn(Es,Rs),bs&&(Jn(ms,xs,Es),ns(xs)||xs.isInline()||Rn(ms,xs,Es)),Ue$1(xs)&&(Cn+=St$1,wn+=St$1)}else{const ws=xs.getTextContent();if(Yi(xs)){const Rs=xs.decorate(_n,gn);Rs!==null&&$n(ds,Rs)}else Ur(xs)&&!xs.isDirectionless()&&(bn+=ws);Cn+=ws,wn+=ws}if(!Pn&&ns(xs)&&xs.__cachedText!==wn){const ws=xs.getWritable();ws.__cachedText=wn,xs=ws}return Es}function $n(ds,dn){let ms=_n._pendingDecorators;const xs=_n._decorators;if(ms===null){if(xs[ds]===dn)return;ms=ge(_n)}ms[ds]=dn}function Hn(ds){let dn=ds.nextSibling;return dn!==null&&dn===_n._blockCursorElement&&(dn=dn.nextSibling),dn}function jn(ds,dn,ms,xs,bs,Es){Cn="",wn="",bn="",En=xs===ct$2,Dn=null,_n=ms,gn=ms._config,pn=ms._nodes,yn=_n._listeners.mutation,mn=bs,xn=Es,vn=ds._nodeMap,Tn=dn._nodeMap,Pn=dn._readOnly,Sn=new Map(ms._keyToDOMMap);const ws=new Map;return kn=ws,Vn("root",null),_n=void 0,pn=void 0,mn=void 0,xn=void 0,vn=void 0,Tn=void 0,gn=void 0,Sn=void 0,kn=void 0,ws}function qn(ds){const dn=Sn.get(ds);return dn===void 0&&H$4(75,ds),dn}const Qn=Object.freeze({}),Xn=30,Yn=[["keydown",function(ds,dn){if(Zn=ds.timeStamp,Gn=ds.keyCode,dn.isComposing())return;const{keyCode:ms,shiftKey:xs,ctrlKey:bs,metaKey:Es,altKey:ws}=ds;Je$1(dn,_$4,ds)||((function(Rs,js,Cs,As){return Pe$1(Rs)&&!js&&!As&&!Cs})(ms,bs,ws,Es)?Je$1(dn,p$4,ds):(function(Rs,js,Cs,As,ks){return Pe$1(Rs)&&!As&&!Cs&&(js||ks)})(ms,bs,xs,ws,Es)?Je$1(dn,y$3,ds):(function(Rs,js,Cs,As){return Ee$1(Rs)&&!js&&!As&&!Cs})(ms,bs,ws,Es)?Je$1(dn,m$5,ds):(function(Rs,js,Cs,As,ks){return Ee$1(Rs)&&!As&&!Cs&&(js||ks)})(ms,bs,xs,ws,Es)?Je$1(dn,x$3,ds):(function(Rs,js,Cs){return(function(As){return As===38})(Rs)&&!js&&!Cs})(ms,bs,Es)?Je$1(dn,v$3,ds):(function(Rs,js,Cs){return(function(As){return As===40})(Rs)&&!js&&!Cs})(ms,bs,Es)?Je$1(dn,T$2,ds):(function(Rs,js){return Fe(Rs)&&js})(ms,xs)?(sr=!0,Je$1(dn,S$3,ds)):(function(Rs){return Rs===32})(ms)?Je$1(dn,k$4,ds):(function(Rs,js){return Q$3&&js&&Rs===79})(ms,bs)?(ds.preventDefault(),sr=!0,Je$1(dn,s$2,!0)):(function(Rs,js){return Fe(Rs)&&!js})(ms,xs)?(sr=!1,Je$1(dn,S$3,ds)):(function(Rs,js,Cs,As){return Q$3?!js&&!Cs&&(Ie$1(Rs)||Rs===72&&As):!(As||js||Cs)&&Ie$1(Rs)})(ms,ws,Es,bs)?Ie$1(ms)?Je$1(dn,C$4,ds):(ds.preventDefault(),Je$1(dn,i$2,!0)):(function(Rs){return Rs===27})(ms)?Je$1(dn,b$4,ds):(function(Rs,js,Cs,As,ks){return Q$3?!(Cs||As||ks)&&(Oe$1(Rs)||Rs===68&&js):!(js||As||ks)&&Oe$1(Rs)})(ms,bs,xs,ws,Es)?Oe$1(ms)?Je$1(dn,N$5,ds):(ds.preventDefault(),Je$1(dn,i$2,!1)):(function(Rs,js,Cs){return Ie$1(Rs)&&(Q$3?js:Cs)}
1431)(ms,ws,bs)?(ds.preventDefault(),Je$1(dn,a$3,!0)):(function(Rs,js,Cs){return Oe$1(Rs)&&(Q$3?js:Cs)})(ms,ws,bs)?(ds.preventDefault(),Je$1(dn,a$3,!1)):(function(Rs,js){return Q$3&&js&&Ie$1(Rs)})(ms,Es)?(ds.preventDefault(),Je$1(dn,f$2,!0)):(function(Rs,js){return Q$3&&js&&Oe$1(Rs)})(ms,Es)?(ds.preventDefault(),Je$1(dn,f$2,!1)):(function(Rs,js,Cs,As){return Rs===66&&!js&&De$1(Cs,As)})(ms,ws,Es,bs)?(ds.preventDefault(),Je$1(dn,d$3,"bold")):(function(Rs,js,Cs,As){return Rs===85&&!js&&De$1(Cs,As)})(ms,ws,Es,bs)?(ds.preventDefault(),Je$1(dn,d$3,"underline")):(function(Rs,js,Cs,As){return Rs===73&&!js&&De$1(Cs,As)})(ms,ws,Es,bs)?(ds.preventDefault(),Je$1(dn,d$3,"italic")):(function(Rs,js,Cs,As){return Rs===9&&!js&&!Cs&&!As})(ms,ws,bs,Es)?Je$1(dn,w$3,ds):(function(Rs,js,Cs,As){return Rs===90&&!js&&De$1(Cs,As)})(ms,xs,Es,bs)?(ds.preventDefault(),Je$1(dn,h$2,void 0)):(function(Rs,js,Cs,As){return Q$3?Rs===90&&Cs&&js:Rs===89&&As||Rs===90&&As&&js})(ms,xs,Es,bs)?(ds.preventDefault(),Je$1(dn,g$6,void 0)):ni(dn._editorState._selection)?(function(Rs,js,Cs,As){return!js&&Rs===67&&(Q$3?Cs:As)})(ms,xs,Es,bs)?(ds.preventDefault(),Je$1(dn,M$3,ds)):(function(Rs,js,Cs,As){return!js&&Rs===88&&(Q$3?Cs:As)})(ms,xs,Es,bs)?(ds.preventDefault(),Je$1(dn,W$2,ds)):Le$1(ms,Es,bs)&&(ds.preventDefault(),Je$1(dn,z$3,ds)):!X$3&&Le$1(ms,Es,bs)&&(ds.preventDefault(),Je$1(dn,z$3,ds)),(function(Rs,js,Cs,As){return Rs||js||Cs||As})(bs,xs,ws,Es)&&Je$1(dn,$$3,ds))}],["pointerdown",function(ds,dn){const ms=ds.target,xs=ds.pointerType;ms instanceof Node&&xs!=="touch"&&Qi(dn,(()=>{Yi(he$1(ms))||(ir=!0)}))}],["compositionstart",function(ds,dn){Qi(dn,(()=>{const ms=pi();if(ti(ms)&&!dn.isComposing()){const xs=ms.anchor,bs=ms.anchor.getNode();ue(xs.key),(ds.timeStamp<Zn+Xn||xs.type==="element"||!ms.isCollapsed()||bs.getFormat()!==ms.format||Ur(bs)&&bs.getStyle()!==ms.style)&&Je$1(dn,l$2,kt)}}))}],["compositionend",function(ds,dn){X$3?or=!0:Qi(dn,(()=>{dr(dn,ds.data)}))}],["input",function(ds,dn){ds.stopPropagation(),Qi(dn,(()=>{const ms=pi(),xs=ds.data,bs=fr(ds);if(xs!=null&&ti(ms)&&cr(ms,bs,xs,ds.timeStamp,!1)){or&&(dr(dn,xs),or=!1);const Es=ms.anchor,ws=Es.getNode(),Rs=on(dn._window);if(Rs===null)return;const js=Es.offset;Y$3&&!ms.isCollapsed()&&Ur(ws)&&Rs.anchorNode!==null&&ws.getTextContent().slice(0,js)+xs+ws.getTextContent().slice(js+ms.focus.offset)===Ce(Rs.anchorNode)||Je$1(dn,l$2,xs);const Cs=xs.length;X$3&&Cs>1&&ds.inputType==="insertCompositionText"&&!dn.isComposing()&&(ms.anchor.offset-=Cs),Z$2||G$3||rt$1||!dn.isComposing()||(Zn=0,ue(null))}else be(!1,dn,xs!==null?xs:void 0),or&&(dr(dn,xs||void 0),or=!1);Li(),Ut(Wi())})),er=null}],["click",function(ds,dn){Qi(dn,(()=>{const ms=pi(),xs=on(dn._window),bs=yi();if(xs){if(ti(ms)){const Es=ms.anchor,ws=Es.getNode();Es.type==="element"&&Es.offset===0&&ms.isCollapsed()&&!ns(ws)&&pe$1().getChildrenSize()===1&&ws.getTopLevelElementOrThrow().isEmpty()&&bs!==null&&ms.is(bs)?(xs.removeAllRanges(),ms.dirty=!0):ds.detail===3&&!ms.isCollapsed()&&ws!==ms.focus.getNode()&&(Gi(ws)?ws.select(0):ws.getParentOrThrow().select(0))}else if(ds.pointerType==="touch"){const Es=xs.anchorNode;if(Es!==null){const ws=Es.nodeType;(ws===it$1||ws===st$2)&&me(_i(bs,xs,dn,ds))}}}Je$1(dn,r,ds)}))}],["cut",Qn],["copy",Qn],["dragstart",Qn],["dragover",Qn],["dragend",Qn],["paste",Qn],["focus",Qn],["blur",Qn],["drop",Qn]];Y$3&&Yn.push(["beforeinput",(ds,dn)=>(function(ms,xs){const bs=ms.inputType,Es=fr(ms);bs==="deleteCompositionText"||X$3&&Ke$1(xs)||bs!=="insertCompositionText"&&Qi(xs,(()=>{const ws=pi();if(bs==="deleteContentBackward"){if(ws===null){const Ms=yi();if(!ti(Ms))return;me(Ms.clone())}if(ti(ws)){const Ms=ws.anchor.key===ws.focus.key;if(Rs=ms.timeStamp,Gn===229&&Rs<Zn+Xn&&xs.isComposing()&&Ms){if(ue(null),Zn=0,setTimeout((()=>{Qi(xs,(()=>{ue(null)}))}),Xn),ti(ws)){const Ds=ws.anchor.getNode();Ds.markDirty(),ws.format=Ds.getFormat(),Ur(Ds)||H$4(142),ws.style=Ds.getStyle()}}else{ue(null),ms.preventDefault();const Ds=ws.anchor.getNode().getTextContent(),Ps=ws.anchor.offset===0&&ws.focus.offset===Ds.length;nt$1&&Ms&&!Ps||Je$1(xs,i$2,!0)}return}}var Rs;if(!ti(ws))return;const js=ms.data;er!==null&&be(!1,xs,er),ws.dirty&&er===null||!ws.isCollapsed()||ns(ws.anchor.getNode())||Es===null||ws.applyDOMRange(Es),er=null;const Cs=ws.anchor,As=ws.focus,ks=Cs.getNode(),Os=As.getNode();if(bs!=="insertText"&&bs!=="insertTranspose")switch(ms.preventDefault(),bs){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Je$1(xs,l$2,ms);break;case"insertFromComposition":ue(null),Je$1(xs,l$2,ms);break;case"insertLineBreak":ue(null),Je$1(xs,s$2,!1);break;case"insertParagraph":ue(null),sr&&!G$3?(sr=!1,Je$1(xs,s$2,!1)):Je$1(xs,o$4,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Je$1(xs,c$5,ms);break;case"deleteByComposition":(function(Ms,Ds){return Ms!==Ds||Gi(Ms)||Gi(Ds)||!Ms.isToken()||!Ds.isToken()})(ks,Os)&&Je$1(xs,u$6,ms);break;case"deleteByDrag":case"deleteByCut":Je$1(xs,u$6,ms);break;case"deleteContent":Je$1(xs,i$2,!1);break;case"deleteWordBackward":Je$1(xs,a$3,!0);break;
1431case"deleteWordForward":Je$1(xs,a$3,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Je$1(xs,f$2,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Je$1(xs,f$2,!1);break;case"formatStrikeThrough":Je$1(xs,d$3,"strikethrough");break;case"formatBold":Je$1(xs,d$3,"bold");break;case"formatItalic":Je$1(xs,d$3,"italic");break;case"formatUnderline":Je$1(xs,d$3,"underline");break;case"historyUndo":Je$1(xs,h$2,void 0);break;case"historyRedo":Je$1(xs,g$6,void 0)}else{if(js===`
1432`)ms.preventDefault(),Je$1(xs,s$2,!1);else if(js===St$1)ms.preventDefault(),Je$1(xs,o$4,void 0);else if(js==null&&ms.dataTransfer){const Ms=ms.dataTransfer.getData("text/plain");ms.preventDefault(),ws.insertRawText(Ms)}else js!=null&&cr(ws,Es,js,ms.timeStamp,!0)?(ms.preventDefault(),Je$1(xs,l$2,js)):er=js;tr=ms.timeStamp}}))})(ds,dn)]);let Zn=0,Gn=0,tr=0,er=null;const nr=new WeakMap;let rr=!1,ir=!1,sr=!1,or=!1,lr=[0,"",0,"root",0];function cr(ds,dn,ms,xs,bs){const Es=ds.anchor,ws=ds.focus,Rs=Es.getNode(),js=Wi(),Cs=on(js._window),As=Cs!==null?Cs.anchorNode:null,ks=Es.key,Os=js.getElementByKey(ks),Ms=ms.length;return ks!==ws.key||!Ur(Rs)||(!bs&&(!Y$3||tr<xs+50)||Rs.isDirty()&&Ms<2||Te$1(ms))&&Es.offset!==ws.offset&&!Rs.isComposing()||ee$1(Rs)||Rs.isDirty()&&Ms>1||(bs||!Y$3)&&Os!==null&&!Rs.isComposing()&&As!==re$1(Os)||Cs!==null&&dn!==null&&(!dn.collapsed||dn.startContainer!==Cs.anchorNode||dn.startOffset!==Cs.anchorOffset)||Rs.getFormat()!==ds.format||Rs.getStyle()!==ds.style||we(ds,Rs)}function ur(ds,dn){return ds!==null&&ds.nodeValue!==null&&ds.nodeType===st$2&&dn!==0&&dn!==ds.nodeValue.length}function ar(ds,dn,ms){const{anchorNode:xs,anchorOffset:bs,focusNode:Es,focusOffset:ws}=ds;rr&&(rr=!1,ur(xs,bs)&&ur(Es,ws))||Qi(dn,(()=>{if(!ms)return void me(null);if(!Gt(dn,xs,Es))return;const Rs=pi();if(ti(Rs)){const js=Rs.anchor,Cs=js.getNode();if(Rs.isCollapsed()){ds.type==="Range"&&ds.anchorNode===ds.focusNode&&(Rs.dirty=!0);const As=Qe$1(dn).event,ks=As?As.timeStamp:performance.now(),[Os,Ms,Ds,Ps,Ls]=lr,Bs=pe$1(),Fs=dn.isComposing()===!1&&Bs.getTextContent()==="";if(ks<Ls+200&&js.offset===Ds&&js.key===Ps)Rs.format=Os,Rs.style=Ms;else if(js.type==="text")Ur(Cs)||H$4(141),Rs.format=Cs.getFormat(),Rs.style=Cs.getStyle();else if(js.type==="element"&&!Fs){const Us=js.getNode();Us instanceof os&&Us.getChildrenSize()===0?Rs.format=Us.getTextFormat():Rs.format=0,Rs.style=""}}else{const As=js.key,ks=Rs.focus.key,Os=Rs.getNodes(),Ms=Os.length,Ds=Rs.isBackward(),Ps=Ds?ws:bs,Ls=Ds?bs:ws,Bs=Ds?ks:As,Fs=Ds?As:ks;let Us=gt$2,Gs=!1;for(let Js=0;Js<Ms;Js++){const Ws=Os[Js],Zs=Ws.getTextContentSize();if(Ur(Ws)&&Zs!==0&&!(Js===0&&Ws.__key===Bs&&Ps===Zs||Js===Ms-1&&Ws.__key===Fs&&Ls===0)&&(Gs=!0,Us&=Ws.getFormat(),Us===0))break}Rs.format=Gs?Us:0}}Je$1(dn,e$1,void 0)}))}function fr(ds){if(!ds.getTargetRanges)return null;const dn=ds.getTargetRanges();return dn.length===0?null:dn[0]}function dr(ds,dn){const ms=ds._compositionKey;if(ue(null),ms!==null&&dn!=null){if(dn===""){const xs=fe$1(ms),bs=re$1(ds.getElementByKey(ms));return void(bs!==null&&bs.nodeValue!==null&&Ur(xs)&&Ne$1(xs,bs.nodeValue,null,null,!0))}if(dn[dn.length-1]===`
1433`){const xs=pi();if(ti(xs)){const bs=xs.focus;return xs.anchor.set(bs.key,bs.offset,bs.type),void Je$1(ds,S$3,null)}}}be(!0,ds,dn)}function hr(ds){let dn=ds.__lexicalEventHandles;return dn===void 0&&(dn=[],ds.__lexicalEventHandles=dn),dn}const gr=new Map;function _r(ds){const dn=ds.target,ms=on(dn==null?null:dn.nodeType===9?dn.defaultView:dn.ownerDocument.defaultView);if(ms===null)return;const xs=te$1(ms.anchorNode);if(xs===null)return;ir&&(ir=!1,Qi(xs,(()=>{const Cs=yi(),As=ms.anchorNode;if(As===null)return;const ks=As.nodeType;ks!==it$1&&ks!==st$2||me(_i(Cs,ms,xs,ds))})));const bs=Se(xs),Es=bs[bs.length-1],ws=Es._key,Rs=gr.get(ws),js=Rs||Es;js!==xs&&ar(ms,js,!1),ar(ms,xs,!0),xs!==Es?gr.set(ws,xs):Rs&&gr.delete(ws)}function pr(ds){ds._lexicalHandled=!0}function yr(ds){return ds._lexicalHandled===!0}function mr(ds){const dn=ds.ownerDocument,ms=nr.get(dn);if(ms===void 0)throw Error("Root element not registered");nr.set(dn,ms-1),nr.get(dn)===0&&dn.removeEventListener("selectionchange",_r);const xs=ds.__lexicalEditor;xs!=null&&((function(Es){if(Es._parentEditor!==null){const ws=Se(Es),Rs=ws[ws.length-1]._key;gr.get(Rs)===Es&&gr.delete(Rs)}else gr.delete(Es._key)})(xs),ds.__lexicalEditor=null);const bs=hr(ds);for(let Es=0;Es<bs.length;Es++)bs[Es]();ds.__lexicalEventHandles=[]}function xr(ds,dn,ms){Li();const xs=ds.__key,bs=ds.getParent();if(bs===null)return;const Es=(function(Rs){const js=pi();if(!ti(js)||!Gi(Rs))return js;const{anchor:Cs,focus:As}=js,ks=Cs.getNode(),Os=As.getNode();return qe$1(ks,Rs)&&Cs.set(Rs.__key,0,"element"),qe$1(Os,Rs)&&As.set(Rs.__key,0,"element"),js})(ds);let ws=!1;
1433if(ti(Es)&&dn){const Rs=Es.anchor,js=Es.focus;Rs.key===xs&&(vi(Rs,ds,bs,ds.getPreviousSibling(),ds.getNextSibling()),ws=!0),js.key===xs&&(vi(js,ds,bs,ds.getPreviousSibling(),ds.getNextSibling()),ws=!0)}else ni(Es)&&dn&&ds.isSelected()&&ds.selectPrevious();if(ti(Es)&&dn&&!ws){const Rs=ds.getIndexWithinParent();le$1(ds),mi(Es,bs,Rs,-1)}else le$1(ds);ms||Ze$1(bs)||bs.canBeEmpty()||!bs.isEmpty()||xr(bs,dn),dn&&ns(bs)&&bs.isEmpty()&&bs.selectEnd()}class vr{static getType(){H$4(64,this.name)}static clone(dn){H$4(65,this.name)}constructor(dn){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,oe$1(this,dn)}getType(){return this.__type}isInline(){H$4(137,this.constructor.name)}isAttached(){let dn=this.__key;for(;dn!==null;){if(dn==="root")return!0;const ms=fe$1(dn);if(ms===null)break;dn=ms.__parent}return!1}isSelected(dn){const ms=dn||pi();if(ms==null)return!1;const xs=ms.getNodes().some((bs=>bs.__key===this.__key));return(Ur(this)||!ti(ms)||ms.anchor.type!=="element"||ms.focus.type!=="element"||ms.anchor.key!==ms.focus.key||ms.anchor.offset!==ms.focus.offset)&&xs}getKey(){return this.__key}getIndexWithinParent(){const dn=this.getParent();if(dn===null)return-1;let ms=dn.getFirstChild(),xs=0;for(;ms!==null;){if(this.is(ms))return xs;xs++,ms=ms.getNextSibling()}return-1}getParent(){const dn=this.getLatest().__parent;return dn===null?null:fe$1(dn)}getParentOrThrow(){const dn=this.getParent();return dn===null&&H$4(66,this.__key),dn}getTopLevelElement(){let dn=this;for(;dn!==null;){const ms=dn.getParent();if(Ze$1(ms))return Gi(dn)||H$4(138),dn;dn=ms}return null}getTopLevelElementOrThrow(){const dn=this.getTopLevelElement();return dn===null&&H$4(67,this.__key),dn}getParents(){const dn=[];let ms=this.getParent();for(;ms!==null;)dn.push(ms),ms=ms.getParent();return dn}getParentKeys(){const dn=[];let ms=this.getParent();for(;ms!==null;)dn.push(ms.__key),ms=ms.getParent();return dn}getPreviousSibling(){const dn=this.getLatest().__prev;return dn===null?null:fe$1(dn)}getPreviousSiblings(){const dn=[],ms=this.getParent();if(ms===null)return dn;let xs=ms.getFirstChild();for(;xs!==null&&!xs.is(this);)dn.push(xs),xs=xs.getNextSibling();return dn}getNextSibling(){const dn=this.getLatest().__next;return dn===null?null:fe$1(dn)}getNextSiblings(){const dn=[];let ms=this.getNextSibling();for(;ms!==null;)dn.push(ms),ms=ms.getNextSibling();return dn}getCommonAncestor(dn){const ms=this.getParents(),xs=dn.getParents();Gi(this)&&ms.unshift(this),Gi(dn)&&xs.unshift(dn);const bs=ms.length,Es=xs.length;if(bs===0||Es===0||ms[bs-1]!==xs[Es-1])return null;const ws=new Set(xs);for(let Rs=0;Rs<bs;Rs++){const js=ms[Rs];if(ws.has(js))return js}return null}is(dn){return dn!=null&&this.__key===dn.__key}isBefore(dn){if(this===dn)return!1;if(dn.isParentOf(this))return!0;if(this.isParentOf(dn))return!1;const ms=this.getCommonAncestor(dn);let xs=0,bs=0,Es=this;for(;;){const ws=Es.getParentOrThrow();if(ws===ms){xs=Es.getIndexWithinParent();break}Es=ws}for(Es=dn;;){const ws=Es.getParentOrThrow();if(ws===ms){bs=Es.getIndexWithinParent();break}Es=ws}return xs<bs}isParentOf(dn){const ms=this.__key;if(ms===dn.__key)return!1;let xs=dn;for(;xs!==null;){if(xs.__key===ms)return!0;xs=xs.getParent()}return!1}getNodesBetween(dn){const ms=this.isBefore(dn),xs=[],bs=new Set;let Es=this;for(;Es!==null;){const ws=Es.__key;if(bs.has(ws)||(bs.add(ws),xs.push(Es)),Es===dn)break;const Rs=Gi(Es)?ms?Es.getFirstChild():Es.getLastChild():null;if(Rs!==null){Es=Rs;continue}const js=ms?Es.getNextSibling():Es.getPreviousSibling();if(js!==null){Es=js;continue}const Cs=Es.getParentOrThrow();if(bs.has(Cs.__key)||xs.push(Cs),Cs===dn)break;let As=null,ks=Cs;do{if(ks===null&&H$4(68),As=ms?ks.getNextSibling():ks.getPreviousSibling(),ks=ks.getParent(),ks===null)break;As!==null||bs.has(ks.__key)||xs.push(ks)}while(As===null);Es=As}return ms||xs.reverse(),xs}isDirty(){const dn=Wi()._dirtyLeaves;return dn!==null&&dn.has(this.__key)}getLatest(){const dn=fe$1(this.__key);return dn===null&&H$4(113),dn}getWritable(){Li();const dn=Mi(),ms=Wi(),xs=dn._nodeMap,bs=this.__key,Es=this.getLatest(),ws=Es.__parent,Rs=ms._cloneNotNeeded,js=pi();if(js!==null&&js.setCachedNodes(null),Rs.has(bs))return ce$1(Es),Es;const Cs=Es.constructor.clone(Es);return Cs.__parent=ws,Cs.__next=Es.__next,Cs.__prev=Es.__prev,Gi(Es)&&Gi(Cs)?(us(Es)&&us(Cs)&&(Cs.__textFormat=Es.__textFormat),Cs.__first=Es.__first,Cs.__last=Es.__last,Cs.__size=Es.__size,Cs.__indent=Es.__indent,Cs.__format=Es.__format,Cs.__dir=Es.__dir):Ur(Es)&&Ur(Cs)&&(Cs.__format=Es.__format,Cs.__style=Es.__style,Cs.__mode=Es.__mode,Cs.__detail=Es.__detail),Rs.add(bs),Cs.__
1433key=bs,ce$1(Cs),xs.set(bs,Cs),Cs}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(dn,ms){H$4(70)}updateDOM(dn,ms,xs){H$4(71)}exportDOM(dn){return{element:this.createDOM(dn._config,dn)}}exportJSON(){H$4(72)}static importJSON(dn){H$4(18,this.name)}static transform(){return null}remove(dn){xr(this,!0,dn)}replace(dn,ms){Li();let xs=pi();xs!==null&&(xs=xs.clone()),en(this,dn);const bs=this.getLatest(),Es=this.__key,ws=dn.__key,Rs=dn.getWritable(),js=this.getParentOrThrow().getWritable(),Cs=js.__size;le$1(Rs);const As=bs.getPreviousSibling(),ks=bs.getNextSibling(),Os=bs.__prev,Ms=bs.__next,Ds=bs.__parent;if(xr(bs,!1,!0),As===null?js.__first=ws:As.getWritable().__next=ws,Rs.__prev=Os,ks===null?js.__last=ws:ks.getWritable().__prev=ws,Rs.__next=Ms,Rs.__parent=Ds,js.__size=Cs,ms&&(Gi(this)&&Gi(Rs)||H$4(139),this.getChildren().forEach((Ps=>{Rs.append(Ps)}))),ti(xs)){me(xs);const Ps=xs.anchor,Ls=xs.focus;Ps.key===Es&&Xr(Ps,Rs),Ls.key===Es&&Xr(Ls,Rs)}return ae$1()===Es&&ue(ws),Rs}insertAfter(dn,ms=!0){Li(),en(this,dn);const xs=this.getWritable(),bs=dn.getWritable(),Es=bs.getParent(),ws=pi();let Rs=!1,js=!1;if(Es!==null){const Ms=dn.getIndexWithinParent();if(le$1(bs),ti(ws)){const Ds=Es.__key,Ps=ws.anchor,Ls=ws.focus;Rs=Ps.type==="element"&&Ps.key===Ds&&Ps.offset===Ms+1,js=Ls.type==="element"&&Ls.key===Ds&&Ls.offset===Ms+1}}const Cs=this.getNextSibling(),As=this.getParentOrThrow().getWritable(),ks=bs.__key,Os=xs.__next;if(Cs===null?As.__last=ks:Cs.getWritable().__prev=ks,As.__size++,xs.__next=ks,bs.__next=Os,bs.__prev=xs.__key,bs.__parent=xs.__parent,ms&&ti(ws)){const Ms=this.getIndexWithinParent();mi(ws,As,Ms+1);const Ds=As.__key;Rs&&ws.anchor.set(Ds,Ms+2,"element"),js&&ws.focus.set(Ds,Ms+2,"element")}return dn}insertBefore(dn,ms=!0){Li(),en(this,dn);const xs=this.getWritable(),bs=dn.getWritable(),Es=bs.__key;le$1(bs);const ws=this.getPreviousSibling(),Rs=this.getParentOrThrow().getWritable(),js=xs.__prev,Cs=this.getIndexWithinParent();ws===null?Rs.__first=Es:ws.getWritable().__next=Es,Rs.__size++,xs.__prev=Es,bs.__prev=js,bs.__next=xs.__
1433key,bs.__parent=xs.__parent;const As=pi();return ms&&ti(As)&&mi(As,this.getParentOrThrow(),Cs),dn}isParentRequired(){return!1}createParentElementNode(){return cs()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(dn,ms){Li();const xs=this.getPreviousSibling(),bs=this.getParentOrThrow();if(xs===null)return bs.select(0,0);if(Gi(xs))return xs.select();if(!Ur(xs)){const Es=xs.getIndexWithinParent()+1;return bs.select(Es,Es)}return xs.select(dn,ms)}selectNext(dn,ms){Li();const xs=this.getNextSibling(),bs=this.getParentOrThrow();if(xs===null)return bs.select();if(Gi(xs))return xs.select(0,0);if(!Ur(xs)){const Es=xs.getIndexWithinParent();return bs.select(Es,Es)}return xs.select(dn,ms)}markDirty(){this.getWritable()}}class Tr extends vr{static getType(){return"linebreak"}static clone(dn){return new Tr(dn.__key)}constructor(dn){super(dn)}getTextContent(){return`
1434`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:dn=>(function(ms){const xs=ms.parentElement;if(xs!==null){const bs=xs.firstChild;if(bs===ms||bs.nextSibling===ms&&br(bs)){const Es=xs.lastChild;if(Es===ms||Es.previousSibling===ms&&br(Es))return!0}}return!1})(dn)?null:{conversion:Sr,priority:0}}}static importJSON(dn){return kr()}exportJSON(){return{type:"linebreak",version:1}}}function Sr(ds){return{node:kr()}}function kr(){return tn(new Tr)}function Cr(ds){return ds instanceof Tr}function br(ds){return ds.nodeType===st$2&&/^( |\t|\r?\n)+$/.test(ds.textContent||"")}function Nr(ds,dn){return 16&dn?"code":128&dn?"mark":32&dn?"sub":64&dn?"sup":null}function wr(ds,dn){return 1&dn?"strong":2&dn?"em":"span"}function Er(ds,dn,ms,xs,bs){const Es=xs.classList;let ws=Me$1(bs,"base");ws!==void 0&&Es.add(...ws),ws=Me$1(bs,"underlineStrikethrough");let Rs=!1;const js=dn&ht$2&&dn&dt$2;ws!==void 0&&(ms&ht$2&&ms&dt$2?(Rs=!0,js||Es.add(...ws)):js&&Es.remove(...ws));for(const Cs in Et$2){const As=Et$2[Cs];if(ws=Me$1(bs,Cs),ws!==void 0)if(ms&As){if(Rs&&(Cs==="underline"||Cs==="strikethrough")){dn&As&&Es.remove(...ws);continue}dn&As&&(!js||Cs!=="underline")&&Cs!=="strikethrough"||Es.add(...ws)}else dn&As&&Es.remove(...ws)}}function Pr(ds,dn,ms){const xs=dn.firstChild,bs=ms.isComposing(),Es=ds+(bs?Tt$1:"");if(xs==null)dn.textContent=Es;else{const ws=xs.nodeValue;if(ws!==Es)if(bs||X$3){const[Rs,js,Cs]=(function(As,ks){const Os=As.length,Ms=ks.length;let Ds=0,Ps=0;for(;Ds<Os&&Ds<Ms&&As[Ds]===ks[Ds];)Ds++;for(;Ps+Ds<Os&&Ps+Ds<Ms&&As[Os-Ps-1]===ks[Ms-Ps-1];)Ps++;return[Ds,Os-Ds-Ps,ks.slice(Ds,Ms-Ps)]})(ws,Es);js!==0&&xs.deleteData(Rs,js),xs.insertData(Rs,Cs)}else xs.nodeValue=Es}}function Dr(ds,dn,ms,xs,bs,Es){Pr(bs,ds,dn);const ws=Es.theme.text;ws!==void 0&&Er(0,0,xs,ds,ws)}function Fr(ds,dn){const ms=document.createElement(dn);return ms.appendChild(ds),ms}class Ir extends vr{static getType(){return"text"}static clone(dn){return new Ir(dn.__text,dn.__key)}constructor(dn,ms){super(ms),this.__text=dn,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const dn=this.getLatest();return Ot$1[dn.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ae$1()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(dn){const ms=Et$2[dn];return!!(this.getFormat()&ms)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(dn,ms){return ie$1(this.getLatest().__format,dn,ms)}canHaveFormat(){return!0}createDOM(dn,ms){const xs=this.__format,bs=Nr(0,xs),Es=wr(0,xs),ws=bs===null?Es:bs,Rs=document.createElement(ws);let js=Rs;this.hasFormat("code")&&Rs.setAttribute("spellcheck","false"),bs!==null&&(js=document.createElement(Es),Rs.appendChild(js)),Dr(js,this,0,xs,this.__text,dn);const Cs=this.__style;return Cs!==""&&(Rs.style.cssText=Cs),Rs}updateDOM(dn,ms,xs){const bs=this.__text,Es=dn.__format,ws=this.__format,Rs=Nr(0,Es),js=Nr(0,ws),Cs=wr(0,Es),As=wr(0,ws);if((Rs===null?Cs:Rs)!==(js===null?As:js))return!0;
1434if(Rs===js&&Cs!==As){const Ps=ms.firstChild;Ps==null&&H$4(48);const Ls=document.createElement(As);return Dr(Ls,this,0,ws,bs,xs),ms.replaceChild(Ls,Ps),!1}let ks=ms;js!==null&&Rs!==null&&(ks=ms.firstChild,ks==null&&H$4(49)),Pr(bs,ks,this);const Os=xs.theme.text;Os!==void 0&&Es!==ws&&Er(0,Es,ws,ks,Os);const Ms=dn.__style,Ds=this.__style;return Ms!==Ds&&(ms.style.cssText=Ds),!1}static importDOM(){return{"#text":()=>({conversion:Wr,priority:0}),b:()=>({conversion:Lr,priority:0}),code:()=>({conversion:Kr,priority:0}),em:()=>({conversion:Kr,priority:0}),i:()=>({conversion:Kr,priority:0}),s:()=>({conversion:Kr,priority:0}),span:()=>({conversion:Or,priority:0}),strong:()=>({conversion:Kr,priority:0}),sub:()=>({conversion:Kr,priority:0}),sup:()=>({conversion:Kr,priority:0}),u:()=>({conversion:Kr,priority:0})}}static importJSON(dn){const ms=Jr(dn.text);return ms.setFormat(dn.format),ms.setDetail(dn.detail),ms.setMode(dn.mode),ms.setStyle(dn.style),ms}exportDOM(dn){let{element:ms}=super.exportDOM(dn);return ms!==null&&un(ms)||H$4(132),ms.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(ms=Fr(ms,"b")),this.hasFormat("italic")&&(ms=Fr(ms,"i")),this.hasFormat("strikethrough")&&(ms=Fr(ms,"s")),this.hasFormat("underline")&&(ms=Fr(ms,"u")),{element:ms}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(dn,ms){}setFormat(dn){const ms=this.getWritable();return ms.__format=typeof dn=="string"?Et$2[dn]:dn,ms}setDetail(dn){const ms=this.getWritable();return ms.__detail=typeof dn=="string"?Pt$2[dn]:dn,ms}setStyle(dn){const ms=this.getWritable();return ms.__style=dn,ms}toggleFormat(dn){const ms=ie$1(this.getFormat(),dn,null);return this.setFormat(ms)}toggleDirectionless(){const dn=this.getWritable();return dn.__detail^=1,dn}toggleUnmergeable(){const dn=this.getWritable();return dn.__detail^=2,dn}setMode(dn){const ms=It[dn];if(this.__mode===ms)return this;const xs=this.getWritable();return xs.__mode=ms,xs}setTextContent(dn){if(this.__text===dn)return this;const ms=this.getWritable();return ms.__text=dn,ms}select(dn,ms){Li();let xs=dn,bs=ms;const Es=pi(),ws=this.getTextContent(),Rs=this.__key;if(typeof ws=="string"){const js=ws.length;xs===void 0&&(xs=js),bs===void 0&&(bs=js)}else xs=0,bs=0;if(!ti(Es))return fi(Rs,xs,Rs,bs,"text","text");{const js=ae$1();js!==Es.anchor.key&&js!==Es.focus.key||ue(Rs),Es.setTextNodeRange(this,xs,this,bs)}return Es}selectStart(){return this.select(0,0)}selectEnd(){const dn=this.getTextContentSize();return this.select(dn,dn)}spliceText(dn,ms,xs,bs){const Es=this.getWritable(),ws=Es.__text,Rs=xs.length;let js=dn;js<0&&(js=Rs+js,js<0&&(js=0));const Cs=pi();if(bs&&ti(Cs)){const ks=dn+Rs;Cs.setTextNodeRange(Es,ks,Es,ks)}const As=ws.slice(0,js)+xs+ws.slice(js+ms);return Es.__text=As,Es}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...dn){Li();const ms=this.getLatest(),xs=ms.getTextContent(),bs=ms.__key,Es=ae$1(),ws=new Set(dn),Rs=[],js=xs.length;let Cs="";for(let Zs=0;Zs<js;Zs++)Cs!==""&&ws.has(Zs)&&(Rs.push(Cs),Cs=""),Cs+=xs[Zs];Cs!==""&&Rs.push(Cs);const As=Rs.length;if(As===0)return[];if(Rs[0]===xs)return[ms];const ks=Rs[0],Os=ms.getParentOrThrow();let Ms;const Ds=ms.getFormat(),Ps=ms.getStyle(),Ls=ms.__detail;let Bs=!1;ms.isSegmented()?(Ms=Jr(ks),Ms.__format=Ds,Ms.__style=Ps,Ms.__detail=Ls,Bs=!0):(Ms=ms.getWritable(),Ms.__text=ks);const Fs=pi(),Us=[Ms];let Gs=ks.length;for(let Zs=1;Zs<As;Zs++){const Ys=Rs[Zs],Qs=Ys.length,ai=Jr(Ys).getWritable();ai.__format=Ds,ai.__style=Ps,ai.__detail=Ls;const ia=ai.__key,ca=Gs+Qs;if(ti(Fs)){const ha=Fs.anchor,ea=Fs.focus;ha.key===bs&&ha.type==="text"&&ha.offset>Gs&&ha.offset<=ca&&(ha.key=ia,ha.offset-=Gs,Fs.dirty=!0),ea.key===bs&&ea.type==="text"&&ea.offset>Gs&&ea.offset<=ca&&(ea.key=ia,ea.offset-=Gs,Fs.dirty=!0)}Es===bs&&ue(ia),Gs=ca,Us.push(ai)}(function(Zs){const Ys=Zs.getPreviousSibling(),Qs=Zs.getNextSibling();Ys!==null&&ce$1(Ys),Qs!==null&&ce$1(Qs)})(this);const Js=Os.getWritable(),Ws=this.getIndexWithinParent();return Bs?(Js.splice(Ws,0,Us),this.remove()):Js.splice(Ws,1,Us),ti(Fs)&&mi(Fs,Os,Ws,As-1),Us}mergeWithSibling(dn){const ms=dn===this.getPreviousSibling();ms||dn===this.getNextSibling()||H$4(50);const xs=this.__key,bs=dn.__key,Es=this.__text,ws=Es.length;ae$1()===bs&&ue(xs);const Rs=pi();
1434if(ti(Rs)){const ks=Rs.anchor,Os=Rs.focus;ks!==null&&ks.key===bs&&(Ti(ks,ms,xs,dn,ws),Rs.dirty=!0),Os!==null&&Os.key===bs&&(Ti(Os,ms,xs,dn,ws),Rs.dirty=!0)}const js=dn.__text,Cs=ms?js+Es:Es+js;this.setTextContent(Cs);const As=this.getWritable();return dn.remove(),As}isTextEntity(){return!1}}function Or(ds){const dn=ds.style,ms=dn.fontWeight,xs=ms==="700"||ms==="bold",bs=dn.textDecoration==="line-through",Es=dn.fontStyle==="italic",ws=dn.textDecoration==="underline",Rs=dn.verticalAlign;return{forChild:js=>(Ur(js)&&(xs&&js.toggleFormat("bold"),bs&&js.toggleFormat("strikethrough"),Es&&js.toggleFormat("italic"),ws&&js.toggleFormat("underline"),Rs==="sub"&&js.toggleFormat("subscript"),Rs==="super"&&js.toggleFormat("superscript")),js),node:null}}function Lr(ds){const dn=ds.style.fontWeight==="normal";return{forChild:ms=>(Ur(ms)&&!dn&&ms.toggleFormat("bold"),ms),node:null}}const Ar=new WeakMap;function Mr(ds){return ds.nodeName==="PRE"||ds.nodeType===it$1&&ds.style!==void 0&&ds.style.whiteSpace!==void 0&&ds.style.whiteSpace.startsWith("pre")}function Wr(ds){const dn=ds;ds.parentElement===null&&H$4(129);let ms=dn.textContent||"";if((function(xs){let bs,Es=xs.parentNode;const ws=[xs];for(;Es!==null&&(bs=Ar.get(Es))===void 0&&!Mr(Es);)ws.push(Es),Es=Es.parentNode;const Rs=bs===void 0?Es:bs;for(let js=0;js<ws.length;js++)Ar.set(ws[js],Rs);return Rs})(dn)!==null){const xs=ms.split(/(\r?\n|\t)/),bs=[],Es=xs.length;for(let ws=0;ws<Es;ws++){const Rs=xs[ws];Rs===`
1435`||Rs===`\r
1436`?bs.push(kr()):Rs==="	"?bs.push($r()):Rs!==""&&bs.push(Jr(Rs))}return{node:bs}}if(ms=ms.replace(/\r/g,"").replace(/[ \t\n]+/g," "),ms==="")return{node:null};if(ms[0]===" "){let xs=dn,bs=!0;for(;xs!==null&&(xs=Br(xs,!1))!==null;){const Es=xs.textContent||"";if(Es.length>0){/[ \t\n]$/.test(Es)&&(ms=ms.slice(1)),bs=!1;break}}bs&&(ms=ms.slice(1))}if(ms[ms.length-1]===" "){let xs=dn,bs=!0;for(;xs!==null&&(xs=Br(xs,!0))!==null;)if((xs.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){bs=!1;break}bs&&(ms=ms.slice(0,ms.length-1))}return ms===""?{node:null}:{node:Jr(ms)}}const zr=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Br(ds,dn){let ms=ds;for(;;){let xs;for(;(xs=dn?ms.nextSibling:ms.previousSibling)===null;){const Es=ms.parentElement;if(Es===null)return null;ms=Es}if(ms=xs,ms.nodeType===it$1){const Es=ms.style.display;if(Es===""&&ms.nodeName.match(zr)===null||Es!==""&&!Es.startsWith("inline"))return null}let bs=ms;for(;(bs=dn?ms.firstChild:ms.lastChild)!==null;)ms=bs;if(ms.nodeType===st$2)return ms;if(ms.nodeName==="BR")return null}}const Rr={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Kr(ds){const dn=Rr[ds.nodeName.toLowerCase()];return dn===void 0?{node:null}:{forChild:ms=>(Ur(ms)&&!ms.hasFormat(dn)&&ms.toggleFormat(dn),ms),node:null}}function Jr(ds=""){return tn(new Ir(ds))}function Ur(ds){return ds instanceof Ir}class Vr extends Ir{static getType(){return"tab"}static clone(dn){const ms=new Vr(dn.__key);return ms.__text=dn.__text,ms.__format=dn.__format,ms.__style=dn.__style,ms}constructor(dn){super("	",dn),this.__detail=2}static importDOM(){return null}static importJSON(dn){const ms=$r();return ms.setFormat(dn.format),ms.setStyle(dn.style),ms}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(dn){H$4(126)}setDetail(dn){H$4(127)}setMode(dn){H$4(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function $r(){return tn(new Vr)}function Hr(ds){return ds instanceof Vr}class jr{constructor(dn,ms,xs){this._selection=null,this.key=dn,this.offset=ms,this.type=xs}is(dn){return this.key===dn.key&&this.offset===dn.offset&&this.type===dn.type}isBefore(dn){let ms=this.getNode(),xs=dn.getNode();const bs=this.offset,Es=dn.offset;if(Gi(ms)){const ws=ms.getDescendantByIndex(bs);ms=ws??ms}if(Gi(xs)){const ws=xs.getDescendantByIndex(Es);xs=ws??xs}return ms===xs?bs<Es:ms.isBefore(xs)}getNode(){const dn=fe$1(this.key);return dn===null&&H$4(20),dn}set(dn,ms,xs){const bs=this._selection,Es=this.key;this.key=dn,this.offset=ms,this.type=xs,Oi()||(ae$1()===Es&&ue(dn),bs!==null&&(bs.setCachedNodes(null),bs.dirty=!0))}}function qr(ds,dn,ms){return new jr(ds,dn,ms)}function Qr(ds,dn){let ms=dn.__key,xs=ds.offset,bs="element";if(Ur(dn)){bs="text";const Es=dn.getTextContentSize();xs>Es&&(xs=Es)}else if(!Gi(dn)){const Es=dn.getNextSibling();if(Ur(Es))ms=Es.__key,xs=0,bs="text";else{const ws=dn.getParent();ws&&(ms=ws.__key,xs=dn.getIndexWithinParent()+1)}}ds.set(ms,xs,bs)}function Xr(ds,dn){if(Gi(dn)){const ms=dn.getLastDescendant();Gi(ms)||Ur(ms)?Qr(ds,ms):Qr(ds,dn)}else Qr(ds,dn)}function Yr(ds,dn,ms,xs){const bs=ds.getNode(),Es=bs.getChildAtIndex(ds.offset),ws=Jr(),Rs=ns(bs)?cs().append(ws):ws;ws.setFormat(ms),ws.setStyle(xs),Es===null?bs.append(Rs):Es.insertBefore(Rs),ds.is(dn)&&dn.set(ws.__key,0,"text"),ds.set(ws.__key,0,"text")}function Zr(ds,dn,ms,xs){ds.key=dn,ds.offset=ms,ds.type=xs}class Gr{constructor(dn){this._cachedNodes=null,this._nodes=dn,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(dn){this._cachedNodes=dn}is(dn){if(!ni(dn))return!1;const ms=this._nodes,xs=dn._nodes;return ms.size===xs.size&&Array.from(ms).every((bs=>xs.has(bs)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(dn){this.dirty=!0,this._nodes.add(dn),this._cachedNodes=null}
1436delete(dn){this.dirty=!0,this._nodes.delete(dn),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(dn){return this._nodes.has(dn)}clone(){return new Gr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(dn){}insertText(){}insertNodes(dn){const ms=this.getNodes(),xs=ms.length,bs=ms[xs-1];let Es;if(Ur(bs))Es=bs.select();else{const ws=bs.getIndexWithinParent()+1;Es=bs.getParentOrThrow().select(ws,ws)}Es.insertNodes(dn);for(let ws=0;ws<xs;ws++)ms[ws].remove()}getNodes(){const dn=this._cachedNodes;if(dn!==null)return dn;const ms=this._nodes,xs=[];for(const bs of ms){const Es=fe$1(bs);Es!==null&&xs.push(Es)}return Oi()||(this._cachedNodes=xs),xs}getTextContent(){const dn=this.getNodes();let ms="";for(let xs=0;xs<dn.length;xs++)ms+=dn[xs].getTextContent();return ms}}function ti(ds){return ds instanceof ei}class ei{constructor(dn,ms,xs,bs){this.anchor=dn,this.focus=ms,dn._selection=this,ms._selection=this,this._cachedNodes=null,this.format=xs,this.style=bs,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(dn){this._cachedNodes=dn}is(dn){return!!ti(dn)&&this.anchor.is(dn.anchor)&&this.focus.is(dn.focus)&&this.format===dn.format&&this.style===dn.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const dn=this._cachedNodes;if(dn!==null)return dn;const ms=this.anchor,xs=this.focus,bs=ms.isBefore(xs),Es=bs?ms:xs,ws=bs?xs:ms;let Rs=Es.getNode(),js=ws.getNode();const Cs=Es.offset,As=ws.offset;if(Gi(Rs)){const Os=Rs.getDescendantByIndex(Cs);Rs=Os??Rs}if(Gi(js)){let Os=js.getDescendantByIndex(As);Os!==null&&Os!==Rs&&js.getChildAtIndex(As)===Os&&(Os=Os.getPreviousSibling()),js=Os??js}let ks;return ks=Rs.is(js)?Gi(Rs)&&Rs.getChildrenSize()>0?[]:[Rs]:Rs.getNodesBetween(js),Oi()||(this._cachedNodes=ks),ks}setTextNodeRange(dn,ms,xs,bs){Zr(this.anchor,dn.__key,ms,"text"),Zr(this.focus,xs.__key,bs,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const dn=this.getNodes();if(dn.length===0)return"";const ms=dn[0],xs=dn[dn.length-1],bs=this.anchor,Es=this.focus,ws=bs.isBefore(Es),[Rs,js]=ii(this);let Cs="",As=!0;for(let ks=0;ks<dn.length;ks++){const Os=dn[ks];if(Gi(Os)&&!Os.isInline())As||(Cs+=`
1437`),As=!Os.isEmpty();else if(As=!1,Ur(Os)){let Ms=Os.getTextContent();Os===ms?Os===xs?bs.type==="element"&&Es.type==="element"&&Es.offset!==bs.offset||(Ms=Rs<js?Ms.slice(Rs,js):Ms.slice(js,Rs)):Ms=ws?Ms.slice(Rs):Ms.slice(js):Os===xs&&(Ms=ws?Ms.slice(0,js):Ms.slice(0,Rs)),Cs+=Ms}else!Yi(Os)&&!Cr(Os)||Os===xs&&this.isCollapsed()||(Cs+=Os.getTextContent())}return Cs}applyDOMRange(dn){const ms=Wi(),xs=ms.getEditorState()._selection,bs=ui(dn.startContainer,dn.startOffset,dn.endContainer,dn.endOffset,ms,xs);if(bs===null)return;const[Es,ws]=bs;Zr(this.anchor,Es.key,Es.offset,Es.type),Zr(this.focus,ws.key,ws.offset,ws.type),this._cachedNodes=null}clone(){const dn=this.anchor,ms=this.focus;return new ei(qr(dn.key,dn.offset,dn.type),qr(ms.key,ms.offset,ms.type),this.format,this.style)}toggleFormat(dn){this.format=ie$1(this.format,dn,null),this.dirty=!0}setStyle(dn){this.style=dn,this.dirty=!0}hasFormat(dn){const ms=Et$2[dn];return!!(this.format&ms)}insertRawText(dn){const ms=dn.split(/(\r?\n|\t)/),xs=[],bs=ms.length;for(let Es=0;Es<bs;Es++){const ws=ms[Es];ws===`
1438`||ws===`\r
1439`?xs.push(kr()):ws==="	"?xs.push($r()):xs.push(Jr(ws))}this.insertNodes(xs)}insertText(dn){const ms=this.anchor,xs=this.focus,bs=this.isCollapsed()||ms.isBefore(xs),Es=this.format,ws=this.style;bs&&ms.type==="element"?Yr(ms,xs,Es,ws):bs||xs.type!=="element"||Yr(xs,ms,Es,ws);const Rs=this.getNodes(),js=Rs.length,Cs=bs?xs:ms,As=(bs?ms:xs).offset,ks=Cs.offset;let Os=Rs[0];Ur(Os)||H$4(26);const Ms=Os.getTextContent().length,Ds=Os.getParentOrThrow();let Ps=Rs[js-1];if(this.isCollapsed()&&As===Ms&&(Os.isSegmented()||Os.isToken()||!Os.canInsertTextAfter()||!Ds.canInsertTextAfter()&&Os.getNextSibling()===null)){let Ls=Os.getNextSibling();if(Ur(Ls)&&Ls.canInsertTextBefore()&&!ee$1(Ls)||(Ls=Jr(),Ls.setFormat(Es),Ds.canInsertTextAfter()?Os.insertAfter(Ls):Ds.insertAfter(Ls)),Ls.select(0,0),Os=Ls,dn!=="")return void this.insertText(dn)}else if(this.isCollapsed()&&As===0&&(Os.isSegmented()||Os.isToken()||!Os.canInsertTextBefore()||!Ds.canInsertTextBefore()&&Os.getPreviousSibling()===null)){let Ls=Os.getPreviousSibling();if(Ur(Ls)&&!ee$1(Ls)||(Ls=Jr(),Ls.setFormat(Es),Ds.canInsertTextBefore()?Os.insertBefore(Ls):Ds.insertBefore(Ls)),Ls.select(),Os=Ls,dn!=="")return void this.insertText(dn)}else if(Os.isSegmented()&&As!==Ms){const Ls=Jr(Os.getTextContent());Ls.setFormat(Es),Os.replace(Ls),Os=Ls}else if(!this.isCollapsed()&&dn!==""){const Ls=Ps.getParent();if(!Ds.canInsertTextBefore()||!Ds.canInsertTextAfter()||Gi(Ls)&&(!Ls.canInsertTextBefore()||!Ls.canInsertTextAfter()))return this.insertText(""),ci(this.anchor,this.focus,null),void this.insertText(dn)}if(js===1){if(Os.isToken()){const Us=Jr(dn);return Us.select(),void Os.replace(Us)}const Ls=Os.getFormat(),Bs=Os.getStyle();if(As!==ks||Ls===Es&&Bs===ws){if(Hr(Os)){const Us=Jr(dn);return Us.setFormat(Es),Us.setStyle(ws),Us.select(),void Os.replace(Us)}}else{if(Os.getTextContent()!==""){const Us=Jr(dn);if(Us.setFormat(Es),Us.setStyle(ws),Us.select(),As===0)Os.insertBefore(Us,!1);else{const[Gs]=Os.splitText(As);Gs.insertAfter(Us,!1)}return void(Us.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=dn.length))}Os.setFormat(Es),Os.setStyle(ws)}const Fs=ks-As;Os=Os.spliceText(As,Fs,dn,!0),Os.getTextContent()===""?Os.remove():this.anchor.type==="text"&&(Os.isComposing()?this.anchor.offset-=dn.length:(this.format=Ls,this.style=Bs))}else{const Ls=new Set([...Os.getParentKeys(),...Ps.getParentKeys()]),Bs=Gi(Os)?Os:Os.getParentOrThrow();let Fs=Gi(Ps)?Ps:Ps.getParentOrThrow(),Us=Ps;if(!Bs.is(Fs)&&Fs.isInline())do Us=Fs,Fs=Fs.getParentOrThrow();while(Fs.isInline());if(Cs.type==="text"&&(ks!==0||Ps.getTextContent()==="")||Cs.type==="element"&&Ps.getIndexWithinParent()<ks)if(Ur(Ps)&&!Ps.isToken()&&ks!==Ps.getTextContentSize()){if(Ps.isSegmented()){const Ys=Jr(Ps.getTextContent());Ps.replace(Ys),Ps=Ys}ns(Cs.getNode())||Cs.type!=="text"||(Ps=Ps.spliceText(0,ks,"")),Ls.add(Ps.__key)}else{const Ys=Ps.getParentOrThrow();Ys.canBeEmpty()||Ys.getChildrenSize()!==1?Ps.remove():Ys.remove()}else Ls.add(Ps.__key);const Gs=Fs.getChildren(),Js=new Set(Rs),Ws=Bs.is(Fs),Zs=Bs.isInline()&&Os.getNextSibling()===null?Bs:Os;for(let Ys=Gs.length-1;Ys>=0;Ys--){const Qs=Gs[Ys];if(Qs.is(Os)||Gi(Qs)&&Qs.isParentOf(Os))break;Qs.isAttached()&&(!Js.has(Qs)||Qs.is(Us)?Ws||Zs.insertAfter(Qs,!1):Qs.remove())}if(!Ws){let Ys=Fs,Qs=null;for(;Ys!==null;){const ai=Ys.getChildren(),ia=ai.length;
1439(ia===0||ai[ia-1].is(Qs))&&(Ls.delete(Ys.__key),Qs=Ys),Ys=Ys.getParent()}}if(Os.isToken())if(As===Ms)Os.select();else{const Ys=Jr(dn);Ys.select(),Os.replace(Ys)}else Os=Os.spliceText(As,Ms-As,dn,!0),Os.getTextContent()===""?Os.remove():Os.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=dn.length);for(let Ys=1;Ys<js;Ys++){const Qs=Rs[Ys],ai=Qs.__key;Ls.has(ai)||Qs.remove()}}}removeText(){this.insertText("")}formatText(dn){if(this.isCollapsed())return this.toggleFormat(dn),void ue(null);const ms=this.getNodes(),xs=[];for(const Fs of ms)Ur(Fs)&&xs.push(Fs);const bs=xs.length;if(bs===0)return this.toggleFormat(dn),void ue(null);const Es=this.anchor,ws=this.focus,Rs=this.isBackward(),js=Rs?ws:Es,Cs=Rs?Es:ws;let As=0,ks=xs[0],Os=js.type==="element"?0:js.offset;if(js.type==="text"&&Os===ks.getTextContentSize()&&(As=1,ks=xs[1],Os=0),ks==null)return;const Ms=ks.getFormatFlags(dn,null),Ds=bs-1;let Ps=xs[Ds];const Ls=Cs.type==="text"?Cs.offset:Ps.getTextContentSize();if(ks.is(Ps)){if(Os===Ls)return;if(Os===0&&Ls===ks.getTextContentSize())ks.setFormat(Ms);else{const Fs=ks.splitText(Os,Ls),Us=Os===0?Fs[0]:Fs[1];Us.setFormat(Ms),js.type==="text"&&js.set(Us.__key,0,"text"),Cs.type==="text"&&Cs.set(Us.__key,Ls-Os,"text")}return void(this.format=Ms)}Os!==0&&([,ks]=ks.splitText(Os),Os=0),ks.setFormat(Ms);const Bs=Ps.getFormatFlags(dn,Ms);Ls>0&&(Ls!==Ps.getTextContentSize()&&([Ps]=Ps.splitText(Ls)),Ps.setFormat(Bs));for(let Fs=As+1;Fs<Ds;Fs++){const Us=xs[Fs];if(!Us.isToken()){const Gs=Us.getFormatFlags(dn,Bs);Us.setFormat(Gs)}}js.type==="text"&&js.set(ks.__key,Os,"text"),Cs.type==="text"&&Cs.set(Ps.__key,Ls,"text"),this.format=Ms|Bs}insertNodes(dn){if(dn.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Ds=pi();return ti(Ds)||H$4(134),Ds.insertNodes(dn)}const ms=fn((this.isBackward()?this.focus:this.anchor).getNode(),an),xs=dn[dn.length-1];if("__language"in ms&&Gi(ms)){if("__language"in dn[0])this.insertText(dn[0].getTextContent());else{const Ds=bi(this);ms.splice(Ds,0,dn),xs.selectEnd()}return}if(!dn.some((Ds=>(Gi(Ds)||Yi(Ds))&&!Ds.isInline()))){Gi(ms)||H$4(135);const Ds=bi(this);return ms.splice(Ds,0,dn),void xs.selectEnd()}const bs=(function(Ds){const Ps=cs();let Ls=null;for(let Bs=0;Bs<Ds.length;Bs++){const Fs=Ds[Bs],Us=Cr(Fs);if(Us||Yi(Fs)&&Fs.isInline()||Gi(Fs)&&Fs.isInline()||Ur(Fs)||Fs.isParentRequired()){if(Ls===null&&(Ls=Fs.createParentElementNode(),Ps.append(Ls),Us))continue;Ls!==null&&Ls.append(Fs)}else Ps.append(Fs),Ls=null}return Ps})(dn),Es=bs.getLastDescendant(),ws=bs.getChildren(),Rs=Ds=>"__value"in Ds&&"__checked"in Ds,js=!Gi(ms)||!ms.isEmpty()?this.insertParagraph():null,Cs=ws[ws.length-1];let As=ws[0];var ks;Gi(ks=As)&&an(ks)&&!ks.isEmpty()&&Gi(ms)&&(!ms.isEmpty()||Rs(ms))&&(Gi(ms)||H$4(135),ms.append(...As.getChildren()),As=ws[1]),As&&(function(Ds,Ps,Ls){const Bs=Ps.getParentOrThrow().getLastChild();let Fs=Ps;const Us=[Ps];for(;Fs!==Bs;)Fs.getNextSibling()||H$4(140),Fs=Fs.getNextSibling(),Us.push(Fs);let Gs=Ds;for(const Js of Us)Gs=Gs.insertAfter(Js)})(ms,As);const Os=fn(Es,an);js&&Gi(Os)&&(Rs(js)||an(Cs))&&(Os.append(...js.getChildren()),js.remove()),Gi(ms)&&ms.isEmpty()&&ms.remove(),Es.selectEnd();const Ms=Gi(ms)?ms.getLastChild():null;Cr(Ms)&&Os!==ms&&Ms.remove()}insertParagraph(){if(this.anchor.key==="root"){const ws=cs();return pe$1().splice(this.anchor.offset,0,[ws]),ws.select(),ws}const dn=bi(this),ms=fn(this.anchor.getNode(),an);Gi(ms)||H$4(136);const xs=ms.getChildAtIndex(dn),bs=xs?[xs,...xs.getNextSiblings()]:[],Es=ms.insertNewAfter(this,!1);return Es?(Es.append(...bs),Es.selectStart(),Es):null}insertLineBreak(dn){const ms=kr();if(this.insertNodes([ms]),dn){const xs=ms.getParentOrThrow(),bs=ms.getIndexWithinParent();xs.select(bs,bs)}}extract(){const dn=this.getNodes(),ms=dn.length,xs=ms-1,bs=this.anchor,Es=this.focus;let ws=dn[0],Rs=dn[xs];const[js,Cs]=ii(this);if(ms===0)return[];if(ms===1){if(Ur(ws)&&!this.isCollapsed()){const ks=js>Cs?Cs:js,Os=js>Cs?js:Cs,Ms=ws.splitText(ks,Os),Ds=ks===0?Ms[0]:Ms[1];return Ds!=null?[Ds]:[]}return[ws]}const As=bs.isBefore(Es);if(Ur(ws)){const ks=As?js:Cs;ks===ws.getTextContentSize()?dn.shift():ks!==0&&([,ws]=ws.splitText(ks),dn[0]=ws)}
1439if(Ur(Rs)){const ks=Rs.getTextContent().length,Os=As?Cs:js;Os===0?dn.pop():Os!==ks&&([Rs]=Rs.splitText(Os),dn[xs]=Rs)}return dn}modify(dn,ms,xs){const bs=this.focus,Es=this.anchor,ws=dn==="move",Rs=Re$1(bs,ms);if(Yi(Rs)&&!Rs.isIsolated()){if(ws&&Rs.isKeyboardSelectable()){const Ms=hi();return Ms.add(Rs.__key),void me(Ms)}const Os=ms?Rs.getPreviousSibling():Rs.getNextSibling();if(Ur(Os)){const Ms=Os.__key,Ds=ms?Os.getTextContent().length:0;return bs.set(Ms,Ds,"text"),void(ws&&Es.set(Ms,Ds,"text"))}{const Ms=Rs.getParentOrThrow();let Ds,Ps;return Gi(Os)?(Ps=Os.__key,Ds=ms?Os.getChildrenSize():0):(Ds=Rs.getIndexWithinParent(),Ps=Ms.__key,ms||Ds++),bs.set(Ps,Ds,"element"),void(ws&&Es.set(Ps,Ds,"element"))}}const js=Wi(),Cs=on(js._window);if(!Cs)return;const As=js._blockCursorElement,ks=js._rootElement;if(ks===null||As===null||!Gi(Rs)||Rs.isInline()||Rs.canBeEmpty()||rn(As,js,ks),(function(Os,Ms,Ds,Ps){Os.modify(Ms,Ds,Ps)})(Cs,dn,ms?"backward":"forward",xs),Cs.rangeCount>0){const Os=Cs.getRangeAt(0),Ms=this.anchor.getNode(),Ds=ns(Ms)?Ms:Ye$1(Ms);if(this.applyDOMRange(Os),this.dirty=!0,!ws){const Ps=this.getNodes(),Ls=[];let Bs=!1;for(let Fs=0;Fs<Ps.length;Fs++){const Us=Ps[Fs];qe$1(Us,Ds)?Ls.push(Us):Bs=!0}if(Bs&&Ls.length>0)if(ms){const Fs=Ls[0];Gi(Fs)?Fs.selectStart():Fs.getParentOrThrow().selectStart()}else{const Fs=Ls[Ls.length-1];Gi(Fs)?Fs.selectEnd():Fs.getParentOrThrow().selectEnd()}Cs.anchorNode===Os.startContainer&&Cs.anchorOffset===Os.startOffset||(function(Fs){const Us=Fs.focus,Gs=Fs.anchor,Js=Gs.key,Ws=Gs.offset,Zs=Gs.type;Zr(Gs,Us.key,Us.offset,Us.type),Zr(Us,Js,Ws,Zs),Fs._cachedNodes=null})(this)}}}forwardDeletion(dn,ms,xs){if(!xs&&(dn.type==="element"&&Gi(ms)&&dn.offset===ms.getChildrenSize()||dn.type==="text"&&dn.offset===ms.getTextContentSize())){const bs=ms.getParent(),Es=ms.getNextSibling()||(bs===null?null:bs.getNextSibling());if(Gi(Es)&&Es.isShadowRoot())return!0}return!1}deleteCharacter(dn){const ms=this.isCollapsed();if(this.isCollapsed()){const xs=this.anchor;let bs=xs.getNode();if(this.forwardDeletion(xs,bs,dn))return;const Es=this.focus,ws=Re$1(Es,dn);if(Yi(ws)&&!ws.isIsolated()){if(ws.isKeyboardSelectable()&&Gi(bs)&&bs.getChildrenSize()===0){bs.remove();const Rs=hi();Rs.add(ws.__key),me(Rs)}else ws.remove(),Wi().dispatchCommand(e$1,void 0);return}if(!dn&&Gi(ws)&&Gi(bs)&&bs.isEmpty())return bs.remove(),void ws.selectStart();if(this.modify("extend",dn,"character"),this.isCollapsed()){if(dn&&xs.offset===0&&(xs.type==="element"?xs.getNode():xs.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const Rs=Es.type==="text"?Es.getNode():null;if(bs=xs.type==="text"?xs.getNode():null,Rs!==null&&Rs.isSegmented()){const js=Es.offset,Cs=Rs.getTextContentSize();if(Rs.is(bs)||dn&&js!==Cs||!dn&&js!==0)return void si(Rs,dn,js)}else if(bs!==null&&bs.isSegmented()){const js=xs.offset,Cs=bs.getTextContentSize();if(bs.is(Rs)||dn&&js!==0||!dn&&js!==Cs)return void si(bs,dn,js)}(function(js,Cs){const As=js.anchor,ks=js.focus,Os=As.getNode(),Ms=ks.getNode();if(Os===Ms&&As.type==="text"&&ks.type==="text"){const Ds=As.offset,Ps=ks.offset,Ls=Ds<Ps,Bs=Ls?Ds:Ps,Fs=Ls?Ps:Ds,Us=Fs-1;Bs!==Us&&(Te$1(Os.getTextContent().slice(Bs,Fs))||(Cs?ks.offset=Us:As.offset=Us))}})(this,dn)}}if(this.removeText(),dn&&!ms&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const xs=this.anchor.getNode();xs.isEmpty()&&ns(xs.getParent())&&xs.getIndexWithinParent()===0&&xs.collapseAtStart(this)}}deleteLine(dn){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",dn,"lineboundary"),(dn?this.focus:this.anchor).offset===0&&this.modify("extend",dn,"character")),this.removeText()}deleteWord(dn){if(this.isCollapsed()){const ms=this.anchor,xs=ms.getNode();if(this.forwardDeletion(ms,xs,dn))return;this.modify("extend",dn,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ni(ds){return ds instanceof Gr}function ri(ds){const dn=ds.offset;if(ds.type==="text")return dn;const ms=ds.getNode();return dn===ms.getChildrenSize()?ms.getTextContent().length:0}function ii(ds){const dn=ds.getStartEndPoints();if(dn===null)return[0,0];const[ms,xs]=dn;return ms.type==="element"&&xs.type==="element"&&ms.key===xs.key&&ms.offset===xs.offset?[0,0]:[ri(ms),ri(xs)]}function si(ds,dn,ms){const xs=ds,bs=xs.getTextContent().split(/(?=\s)/g),Es=bs.length;let ws=0,Rs=0;for(let Cs=0;Cs<Es;Cs++){const As=Cs===Es-1;if(Rs=ws,ws+=bs[Cs].length,dn&&ws===ms||ws>ms||As){bs.splice(Cs,1),As&&(Rs=void 0);break}}const js=bs.join("").trim();js===""?xs.remove():(xs.setTextContent(js),xs.select(Rs,Rs))}function oi(ds,dn,ms,xs){let bs,Es=dn;if(ds.nodeType===it$1){let ws=!1;const Rs=ds.childNodes,js=Rs.length;Es===js&&(ws=!0,Es=js-1);let Cs=Rs[Es],As=!1;if(Cs===xs._blockCursorElement?(Cs=Rs[Es+1],As=!0):xs._blockCursorElement!==null&&Es--,bs=xe$1(Cs),Ur(bs))Es=ve$1(bs,ws);else{let ks=xe$1(ds);if(ks===null)return null;if(Gi(ks)){Es=Math.min(ks.getChildrenSize(),Es);let Os=ks.getChildAtIndex(Es);if(Gi(Os)&&(function(Ms,Ds,Ps){const Ls=Ms.getParent();return Ps===null||Ls===null||!Ls.canBeEmpty()||Ls!==Ps.getNode()})(Os,0,ms)){const Ms=ws?Os.getLastDescendant():Os.getFirstDescendant();Ms===null?(ks=Os,Es=0):(Os=Ms,ks=Gi(Os)?Os:Os.getParentOrThrow())}Ur(Os)?(bs=Os,ks=null,Es=ve$1(Os,ws)):Os!==ks&&ws&&!As&&Es++}else{const Os=ks.getIndexWithinParent();Es=dn===0&&Yi(ks)&&xe$1(ds)===ks?Os:Os+1,ks=ks.getParentOrThrow()}if(Gi(ks))return qr(ks.__key,Es,"element")}}else bs=xe$1(ds);return Ur(bs)?qr(bs.__key,Es,"text"):null}function li(ds,dn,ms){const xs=ds.offset,bs=ds.getNode();if(xs===0){const Es=bs.getPreviousSibling(),ws=bs.getParent();if(dn){if((ms||!dn)&&Es===null&&Gi(ws)&&ws.isInline()){const Rs=ws.getPreviousSibling();Ur(Rs)&&(ds.key=Rs.__key,ds.offset=Rs.getTextContent().length)}}else Gi(Es)&&!ms&&Es.isInline()?(ds.key=Es.__key,ds.offset=Es.getChildrenSize(),ds.type="element"):Ur(Es)&&(ds.key=Es.__key,ds.offset=Es.getTextContent().length)}else if(xs===bs.getTextContent().length){const Es=bs.getNextSibling(),ws=bs.getParent();if(dn&&Gi(Es)&&Es.isInline())ds.key=Es.__key,ds.offset=0,ds.type="element";else if((ms||dn)&&Es===null&&Gi(ws)&&ws.isInline()&&!ws.canInsertTextAfter()){const Rs=ws.getNextSibling();Ur(Rs)&&(ds.key=Rs.__key,ds.offset=0)}}}function ci(ds,dn,ms){if(ds.type==="text"&&dn.type==="text"){const xs=ds.isBefore(dn),bs=ds.is(dn);li(ds,xs,bs),li(dn,!xs,bs),bs&&(dn.key=ds.key,dn.offset=ds.offset,dn.type=ds.type);const Es=Wi();if(Es.isComposing()&&Es._compositionKey!==ds.key&&ti(ms)){const ws=ms.anchor,Rs=ms.focus;
1439Zr(ds,ws.key,ws.offset,ws.type),Zr(dn,Rs.key,Rs.offset,Rs.type)}}}function ui(ds,dn,ms,xs,bs,Es){if(ds===null||ms===null||!Gt(bs,ds,ms))return null;const ws=oi(ds,dn,ti(Es)?Es.anchor:null,bs);if(ws===null)return null;const Rs=oi(ms,xs,ti(Es)?Es.focus:null,bs);if(Rs===null)return null;if(ws.type==="element"&&Rs.type==="element"){const js=xe$1(ds),Cs=xe$1(ms);if(Yi(js)&&Yi(Cs))return null}return ci(ws,Rs,Es),[ws,Rs]}function fi(ds,dn,ms,xs,bs,Es){const ws=Mi(),Rs=new ei(qr(ds,dn,bs),qr(ms,xs,Es),0,"");return Rs.dirty=!0,ws._selection=Rs,Rs}function di(){const ds=qr("root",0,"element"),dn=qr("root",0,"element");return new ei(ds,dn,0,"")}function hi(){return new Gr(new Set)}function gi(ds,dn){return _i(null,ds,dn,null)}function _i(ds,dn,ms,xs){const bs=ms._window;if(bs===null)return null;const Es=xs||bs.event,ws=Es?Es.type:void 0,Rs=ws==="selectionchange",js=!Mt&&(Rs||ws==="beforeinput"||ws==="compositionstart"||ws==="compositionend"||ws==="click"&&Es&&Es.detail===3||ws==="drop"||ws===void 0);let Cs,As,ks,Os;if(ti(ds)&&!js)return ds.clone();if(dn===null)return null;if(Cs=dn.anchorNode,As=dn.focusNode,ks=dn.anchorOffset,Os=dn.focusOffset,Rs&&ti(ds)&&!Gt(ms,Cs,As))return ds.clone();const Ms=ui(Cs,ks,As,Os,ms,ds);if(Ms===null)return null;const[Ds,Ps]=Ms;return new ei(Ds,Ps,ti(ds)?ds.format:0,ti(ds)?ds.style:"")}function pi(){return Mi()._selection}function yi(){return Wi()._editorState._selection}function mi(ds,dn,ms,xs=1){const bs=ds.anchor,Es=ds.focus,ws=bs.getNode(),Rs=Es.getNode();if(!dn.is(ws)&&!dn.is(Rs))return;const js=dn.__key;if(ds.isCollapsed()){const Cs=bs.offset;if(ms<=Cs&&xs>0||ms<Cs&&xs<0){const As=Math.max(0,Cs+xs);bs.set(js,As,"element"),Es.set(js,As,"element"),xi(ds)}}else{const Cs=ds.isBackward(),As=Cs?Es:bs,ks=As.getNode(),Os=Cs?bs:Es,Ms=Os.getNode();if(dn.is(ks)){const Ds=As.offset;(ms<=Ds&&xs>0||ms<Ds&&xs<0)&&As.set(js,Math.max(0,Ds+xs),"element")}if(dn.is(Ms)){const Ds=Os.offset;(ms<=Ds&&xs>0||ms<Ds&&xs<0)&&Os.set(js,Math.max(0,Ds+xs),"element")}}xi(ds)}function xi(ds){const dn=ds.anchor,ms=dn.offset,xs=ds.focus,bs=xs.offset,Es=dn.getNode(),ws=xs.getNode();if(ds.isCollapsed()){if(!Gi(Es))return;const Rs=Es.getChildrenSize(),js=ms>=Rs,Cs=js?Es.getChildAtIndex(Rs-1):Es.getChildAtIndex(ms);if(Ur(Cs)){let As=0;js&&(As=Cs.getTextContentSize()),dn.set(Cs.__key,As,"text"),xs.set(Cs.__key,As,"text")}}else{if(Gi(Es)){const Rs=Es.getChildrenSize(),js=ms>=Rs,Cs=js?Es.getChildAtIndex(Rs-1):Es.getChildAtIndex(ms);if(Ur(Cs)){let As=0;js&&(As=Cs.getTextContentSize()),dn.set(Cs.__key,As,"text")}}if(Gi(ws)){const Rs=ws.getChildrenSize(),js=bs>=Rs,Cs=js?ws.getChildAtIndex(Rs-1):ws.getChildAtIndex(bs);if(Ur(Cs)){let As=0;js&&(As=Cs.getTextContentSize()),xs.set(Cs.__key,As,"text")}}}}function vi(ds,dn,ms,xs,bs){let Es=null,ws=0,Rs=null;xs!==null?(Es=xs.__key,Ur(xs)?(ws=xs.getTextContentSize(),Rs="text"):Gi(xs)&&(ws=xs.getChildrenSize(),Rs="element")):bs!==null&&(Es=bs.__key,Ur(bs)?Rs="text":Gi(bs)&&(Rs="element")),Es!==null&&Rs!==null?ds.set(Es,ws,Rs):(ws=dn.getIndexWithinParent(),ws===-1&&(ws=ms.getChildrenSize()),ds.set(ms.__key,ws,"element"))}function Ti(ds,dn,ms,xs,bs){ds.type==="text"?(ds.key=ms,dn||(ds.offset+=bs)):ds.offset>xs.getIndexWithinParent()&&(ds.offset-=1)}function Si(ds,dn,ms,xs,bs,Es,ws){const Rs=xs.anchorNode,js=xs.focusNode,Cs=xs.anchorOffset,As=xs.focusOffset,ks=document.activeElement;if(bs.has("collaboration")&&ks!==Es||ks!==null&&Zt(ks))return;if(!ti(dn))return void(ds!==null&&Gt(ms,Rs,js)&&xs.removeAllRanges());const Os=dn.anchor,Ms=dn.focus,Ds=Os.key,Ps=Ms.key,Ls=Ve$1(ms,Ds),Bs=Ve$1(ms,Ps),Fs=Os.offset,Us=Ms.offset,Gs=dn.format,Js=dn.style,Ws=dn.isCollapsed();let Zs=Ls,Ys=Bs,Qs=!1;if(Os.type==="text"){Zs=re$1(Ls);const ta=Os.getNode();Qs=ta.getFormat()!==Gs||ta.getStyle()!==Js}else ti(ds)&&ds.anchor.type==="text"&&(Qs=!0);var ai,ia,ca,ha,ea;if(Ms.type==="text"&&(Ys=re$1(Bs)),Zs!==null&&Ys!==null&&(Ws&&(ds===null||Qs||ti(ds)&&(ds.format!==Gs||ds.style!==Js))&&(ai=Gs,ia=Js,ca=Fs,ha=Ds,ea=performance.now(),lr=[ai,ia,ca,ha,ea]),Cs!==Fs||As!==Us||Rs!==Zs||js!==Ys||xs.type==="Range"&&Ws||(ks!==null&&Es.contains(ks)||Es.focus({preventScroll:!0}),Os.type==="element"))){try{xs.setBaseAndExtent(Zs,Fs,Ys,Us)}catch{}if(!bs.has("skip-scroll-into-view")&&dn.isCollapsed()&&Es!==null&&Es===document.activeElement){const ta=dn instanceof ei&&dn.anchor.type==="element"?Zs.childNodes[Fs]||null:xs.rangeCount>0?xs.getRangeAt(0):null;if(ta!==null){let aa;if(ta instanceof Text){const fa=document.createRange();fa.selectNode(ta),aa=fa.getBoundingClientRect()}else aa=ta.getBoundingClientRect();(function(fa,ua,Ea){const ra=Ea.ownerDocument,Ia=ra.defaultView;if(Ia===null)return;let{top:$a,bottom:oa}=ua,sa=0,Ra=0,_a=Ea;for(;_a!==null;){const Oa=_a===ra.body;if(Oa)sa=0,Ra=Qe$1(fa).innerHeight;else{const Ga=_a.getBoundingClientRect();sa=Ga.top,Ra=Ga.bottom}let za=0;if($a<sa?za=-(sa-$a):oa>Ra&&(za=oa-Ra),za!==0)if(Oa)Ia.scrollBy(0,za);else{const Ga=_a.scrollTop;_a.scrollTop+=za;const qa=_a.scrollTop-Ga;$a-=qa,oa-=qa}if(Oa)break;_a=$e$1(_a)}})(ms,aa,Es)}}rr=!0}}function ki(ds){let dn=pi()||yi();dn===null&&(dn=pe$1().selectEnd()),dn.insertNodes(ds)}function bi(ds){ds.isCollapsed()||ds.removeText();
1439const dn=ds.anchor;let ms=dn.getNode(),xs=dn.offset;for(;!an(ms);)[ms,xs]=Ni(ms,xs);return xs}function Ni(ds,dn){const ms=ds.getParent();if(!ms){const bs=cs();return pe$1().append(bs),bs.select(),[pe$1(),0]}if(Ur(ds)){const bs=ds.splitText(dn);if(bs.length===0)return[ms,ds.getIndexWithinParent()];const Es=dn===0?0:1;return[ms,bs[0].getIndexWithinParent()+Es]}if(!Gi(ds)||dn===0)return[ms,ds.getIndexWithinParent()];const xs=ds.getChildAtIndex(dn);if(xs){const bs=new ei(qr(ds.__key,dn,"element"),qr(ds.__key,dn,"element"),0,""),Es=ds.insertNewAfter(bs);Es&&Es.append(xs,...xs.getNextSiblings())}return[ms,ds.getIndexWithinParent()+1]}let wi=null,Ei=null,Pi=!1,Di=!1,Fi=0;const Ii={characterData:!0,childList:!0,subtree:!0};function Oi(){return Pi||wi!==null&&wi._readOnly}function Li(){Pi&&H$4(13)}function Ai(){Fi>99&&H$4(14)}function Mi(){return wi===null&&H$4(15),wi}function Wi(){return Ei===null&&H$4(16),Ei}function zi(){return Ei}function Bi(ds,dn,ms){const xs=dn.__type,bs=(function(Rs,js){const Cs=Rs._nodes.get(js);return Cs===void 0&&H$4(30,js),Cs})(ds,xs);let Es=ms.get(xs);Es===void 0&&(Es=Array.from(bs.transforms),ms.set(xs,Es));const ws=Es.length;for(let Rs=0;Rs<ws&&(Es[Rs](dn),dn.isAttached());Rs++);}function Ri(ds,dn){return ds!==void 0&&ds.__key!==dn&&ds.isAttached()}function Ki(ds){return Ji(ds,Wi()._nodes)}function Ji(ds,dn){const ms=ds.type,xs=dn.get(ms);xs===void 0&&H$4(17,ms);const bs=xs.klass;ds.type!==bs.getType()&&H$4(18,bs.name);const Es=bs.importJSON(ds),ws=ds.children;if(Gi(Es)&&Array.isArray(ws))for(let Rs=0;Rs<ws.length;Rs++){const js=Ji(ws[Rs],dn);Es.append(js)}return Es}function Ui(ds,dn){const ms=wi,xs=Pi,bs=Ei;wi=ds,Pi=!0,Ei=null;try{return dn()}finally{wi=ms,Pi=xs,Ei=bs}}function Vi(ds,dn){const ms=ds._pendingEditorState,xs=ds._rootElement,bs=ds._headless||xs===null;if(ms===null)return;const Es=ds._editorState,ws=Es._selection,Rs=ms._selection,js=ds._dirtyType!==ot,Cs=wi,As=Pi,ks=Ei,Os=ds._updating,Ms=ds._observer;let Ds=null;if(ds._pendingEditorState=null,ds._editorState=ms,!bs&&js&&Ms!==null){Ei=ds,wi=ms,Pi=!1,ds._updating=!0;try{const Ws=ds._dirtyType,Zs=ds._dirtyElements,Ys=ds._dirtyLeaves;Ms.disconnect(),Ds=jn(Es,ms,ds,Ws,Zs,Ys)}catch(Ws){if(Ws instanceof Error&&ds._onError(Ws),Di)throw Ws;return _s(ds,null,xs,ms),Vt(ds),ds._dirtyType=ct$2,Di=!0,Vi(ds,Es),void(Di=!1)}finally{Ms.observe(xs,Ii),ds._updating=Os,wi=Cs,Pi=As,Ei=ks}}ms._readOnly||(ms._readOnly=!0);const Ps=ds._dirtyLeaves,Ls=ds._dirtyElements,Bs=ds._normalizedNodes,Fs=ds._updateTags,Us=ds._deferred;js&&(ds._dirtyType=ot,ds._cloneNotNeeded.clear(),ds._dirtyLeaves=new Set,ds._dirtyElements=new Map,ds._normalizedNodes=new Set,ds._updateTags=new Set),(function(Ws,Zs){const Ys=Ws._decorators;let Qs=Ws._pendingDecorators||Ys;const ai=Zs._nodeMap;let ia;for(ia in Qs)ai.has(ia)||(Qs===Ys&&(Qs=ge(Ws)),delete Qs[ia])})(ds,ms);const Gs=bs?null:on(ds._window);if(ds._editable&&Gs!==null&&(js||Rs===null||Rs.dirty)){Ei=ds,wi=ms;try{if(Ms!==null&&Ms.disconnect(),js||Rs===null||Rs.dirty){const Ws=ds._blockCursorElement;Ws!==null&&rn(Ws,ds,xs),Si(ws,Rs,ds,Gs,Fs,xs)}sn(ds,xs,Rs),Ms!==null&&Ms.observe(xs,Ii)}finally{Ei=ks,wi=Cs}}Ds!==null&&(function(Ws,Zs,Ys,Qs,ai){const ia=Array.from(Ws._listeners.mutation),ca=ia.length;for(let ha=0;ha<ca;ha++){const[ea,ta]=ia[ha],aa=Zs.get(ta);aa!==void 0&&ea(aa,{dirtyLeaves:Qs,prevEditorState:ai,updateTags:Ys})}})(ds,Ds,Fs,Ps,Es),ti(Rs)||Rs===null||ws!==null&&ws.is(Rs)||ds.dispatchCommand(e$1,void 0);const Js=ds._pendingDecorators;Js!==null&&(ds._decorators=Js,ds._pendingDecorators=null,$i("decorator",ds,!0,Js)),(function(Ws,Zs,Ys){const Qs=_e(Zs),ai=_e(Ys);Qs!==ai&&$i("textcontent",Ws,!0,ai)})(ds,dn||Es,ms),$i("update",ds,!0,{dirtyElements:Ls,dirtyLeaves:Ps,editorState:ms,normalizedNodes:Bs,prevEditorState:dn||Es,tags:Fs}),(function(Ws,Zs){if(Ws._deferred=[],Zs.length!==0){const Ys=Ws._updating;Ws._updating=!0;try{for(let Qs=0;Qs<Zs.length;Qs++)Zs[Qs]()}finally{Ws._updating=Ys}}})(ds,Us),(function(Ws){const Zs=Ws._updates;if(Zs.length!==0){const Ys=Zs.shift();if(Ys){const[Qs,ai]=Ys;qi(Ws,Qs,ai)}}})(ds)}function $i(ds,dn,ms,...xs){const bs=dn._updating;dn._updating=ms;try{const Es=Array.from(dn._listeners[ds]);for(let ws=0;ws<Es.length;ws++)Es[ws].apply(null,xs)}finally{dn._updating=bs}}function Hi(ds,dn,ms){if(ds._updating===!1||Ei!==ds){let bs=!1;return ds.update((()=>{bs=Hi(ds,dn,ms)})),bs}const xs=Se(ds);for(let bs=4;bs>=0;bs--)for(let Es=0;Es<xs.length;Es++){const ws=xs[Es]._commands.get(dn);if(ws!==void 0){const Rs=ws[bs];if(Rs!==void 0){const js=Array.from(Rs),Cs=js.length;for(let As=0;As<Cs;As++)if(js[As](ms,ds)===!0)return!0}}}return!1}function ji(ds,dn){const ms=ds._updates;let xs=dn||!1;for(;ms.length!==0;){const bs=ms.shift();if(bs){const[Es,ws]=bs;let Rs,js;ws!==void 0&&(Rs=ws.onUpdate,js=ws.tag,ws.skipTransforms&&(xs=!0),Rs&&ds._deferred.push(Rs),js&&ds._updateTags.add(js)),Es()}}return xs}function qi(ds,dn,ms){const xs=ds._updateTags;let bs,Es,ws=!1,Rs=!1;ms!==void 0&&(bs=ms.onUpdate,Es=ms.tag,Es!=null&&xs.add(Es),ws=ms.skipTransforms||
1439!1,Rs=ms.discrete||!1),bs&&ds._deferred.push(bs);const js=ds._editorState;let Cs=ds._pendingEditorState,As=!1;(Cs===null||Cs._readOnly)&&(Cs=ds._pendingEditorState=new ss(new Map((Cs||js)._nodeMap)),As=!0),Cs._flushSync=Rs;const ks=wi,Os=Pi,Ms=Ei,Ds=ds._updating;wi=Cs,Pi=!1,ds._updating=!0,Ei=ds;try{As&&(ds._headless?js._selection!==null&&(Cs._selection=js._selection.clone()):Cs._selection=(function(Fs){const Us=Fs.getEditorState()._selection,Gs=on(Fs._window);return ti(Us)||Us==null?_i(Us,Gs,Fs,null):Us.clone()})(ds));const Ls=ds._compositionKey;dn(),ws=ji(ds,ws),(function(Fs,Us){const Gs=Us.getEditorState()._selection,Js=Fs._selection;if(ti(Js)){const Ws=Js.anchor,Zs=Js.focus;let Ys;if(Ws.type==="text"&&(Ys=Ws.getNode(),Ys.selectionTransform(Gs,Js)),Zs.type==="text"){const Qs=Zs.getNode();Ys!==Qs&&Qs.selectionTransform(Gs,Js)}}})(Cs,ds),ds._dirtyType!==ot&&(ws?(function(Fs,Us){const Gs=Us._dirtyLeaves,Js=Fs._nodeMap;for(const Ws of Gs){const Zs=Js.get(Ws);Ur(Zs)&&Zs.isAttached()&&Zs.isSimpleText()&&!Zs.isUnmergeable()&&jt(Zs)}})(Cs,ds):(function(Fs,Us){const Gs=Us._dirtyLeaves,Js=Us._dirtyElements,Ws=Fs._nodeMap,Zs=ae$1(),Ys=new Map;let Qs=Gs,ai=Qs.size,ia=Js,ca=ia.size;for(;ai>0||ca>0;){if(ai>0){Us._dirtyLeaves=new Set;for(const ha of Qs){const ea=Ws.get(ha);Ur(ea)&&ea.isAttached()&&ea.isSimpleText()&&!ea.isUnmergeable()&&jt(ea),ea!==void 0&&Ri(ea,Zs)&&Bi(Us,ea,Ys),Gs.add(ha)}if(Qs=Us._dirtyLeaves,ai=Qs.size,ai>0){Fi++;continue}}Us._dirtyLeaves=new Set,Us._dirtyElements=new Map;for(const ha of ia){const ea=ha[0],ta=ha[1];if(ea!=="root"&&!ta)continue;const aa=Ws.get(ea);aa!==void 0&&Ri(aa,Zs)&&Bi(Us,aa,Ys),Js.set(ea,ta)}Qs=Us._dirtyLeaves,ai=Qs.size,ia=Us._dirtyElements,ca=ia.size,Fi++}Us._dirtyLeaves=Gs,Us._dirtyElements=Js})(Cs,ds),ji(ds),(function(Fs,Us,Gs,Js){const Ws=Fs._nodeMap,Zs=Us._nodeMap,Ys=[];for(const[Qs]of Js){const ai=Zs.get(Qs);ai!==void 0&&(ai.isAttached()||(Gi(ai)&&hn(ai,Qs,Ws,Zs,Ys,Js),Ws.has(Qs)||Js.delete(Qs),Ys.push(Qs)))}for(const Qs of Ys)Zs.delete(Qs);for(const Qs of Gs){const ai=Zs.get(Qs);ai===void 0||ai.isAttached()||(Ws.has(Qs)||Gs.delete(Qs),Zs.delete(Qs))}})(js,Cs,ds._dirtyLeaves,ds._dirtyElements)),Ls!==ds._compositionKey&&(Cs._flushSync=!0);const Bs=Cs._selection;if(ti(Bs)){const Fs=Cs._nodeMap,Us=Bs.anchor.key,Gs=Bs.focus.key;Fs.get(Us)!==void 0&&Fs.get(Gs)!==void 0||H$4(19)}else ni(Bs)&&Bs._nodes.size===0&&(Cs._selection=null)}catch(Ls){return Ls instanceof Error&&ds._onError(Ls),ds._pendingEditorState=js,ds._dirtyType=ct$2,ds._cloneNotNeeded.clear(),ds._dirtyLeaves=new Set,ds._dirtyElements.clear(),void Vi(ds)}finally{wi=ks,Pi=Os,Ei=Ms,ds._updating=Ds,Fi=0}ds._dirtyType!==ot||(function(Ls,Bs){const Fs=Bs.getEditorState()._selection,Us=Ls._selection;if(Us!==null){if(Us.dirty||!Us.is(Fs))return!0}else if(Fs!==null)return!0;return!1})(Cs,ds)?Cs._flushSync?(Cs._flushSync=!1,Vi(ds)):As&&Yt((()=>{Vi(ds)})):(Cs._flushSync=!1,As&&(xs.clear(),ds._deferred=[],ds._pendingEditorState=null))}function Qi(ds,dn,ms){ds._updating?ds._updates.push([dn,ms]):qi(ds,dn,ms)}class Xi extends vr{constructor(dn){super(dn)}decorate(dn,ms){H$4(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Yi(ds){return ds instanceof Xi}class Zi extends vr{constructor(dn){super(dn),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const dn=this.getFormat();return Ft$1[dn]||""}getIndent(){return this.getLatest().__indent}getChildren(){const dn=[];let ms=this.getFirstChild();for(;ms!==null;)dn.push(ms),ms=ms.getNextSibling();return dn}getChildrenKeys(){const dn=[];let ms=this.getFirstChild();for(;ms!==null;)dn.push(ms.__key),ms=ms.getNextSibling();return dn}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const dn=Wi()._dirtyElements;return dn!==null&&dn.has(this.__key)}isLastChild(){const dn=this.getLatest(),ms=this.getParentOrThrow().getLastChild();return ms!==null&&ms.is(dn)}getAllTextNodes(){const dn=[];let ms=this.getFirstChild();for(;ms!==null;){if(Ur(ms)&&dn.push(ms),Gi(ms)){const xs=ms.getAllTextNodes();dn.push(...xs)}ms=ms.getNextSibling()}return dn}getFirstDescendant(){let dn=this.getFirstChild();for(;Gi(dn);){const ms=dn.getFirstChild();if(ms===null)break;dn=ms}return dn}getLastDescendant(){let dn=this.getLastChild();for(;Gi(dn);){const ms=dn.getLastChild();if(ms===null)break;dn=ms}return dn}
1439getDescendantByIndex(dn){const ms=this.getChildren(),xs=ms.length;if(dn>=xs){const Es=ms[xs-1];return Gi(Es)&&Es.getLastDescendant()||Es||null}const bs=ms[dn];return Gi(bs)&&bs.getFirstDescendant()||bs||null}getFirstChild(){const dn=this.getLatest().__first;return dn===null?null:fe$1(dn)}getFirstChildOrThrow(){const dn=this.getFirstChild();return dn===null&&H$4(45,this.__key),dn}getLastChild(){const dn=this.getLatest().__last;return dn===null?null:fe$1(dn)}getLastChildOrThrow(){const dn=this.getLastChild();return dn===null&&H$4(96,this.__key),dn}getChildAtIndex(dn){const ms=this.getChildrenSize();let xs,bs;if(dn<ms/2){for(xs=this.getFirstChild(),bs=0;xs!==null&&bs<=dn;){if(bs===dn)return xs;xs=xs.getNextSibling(),bs++}return null}for(xs=this.getLastChild(),bs=ms-1;xs!==null&&bs>=dn;){if(bs===dn)return xs;xs=xs.getPreviousSibling(),bs--}return null}getTextContent(){let dn="";const ms=this.getChildren(),xs=ms.length;for(let bs=0;bs<xs;bs++){const Es=ms[bs];dn+=Es.getTextContent(),Gi(Es)&&bs!==xs-1&&!Es.isInline()&&(dn+=St$1)}return dn}getTextContentSize(){let dn=0;const ms=this.getChildren(),xs=ms.length;for(let bs=0;bs<xs;bs++){const Es=ms[bs];dn+=Es.getTextContentSize(),Gi(Es)&&bs!==xs-1&&!Es.isInline()&&(dn+=St$1.length)}return dn}getDirection(){return this.getLatest().__dir}hasFormat(dn){if(dn!==""){const ms=Dt$1[dn];return!!(this.getFormat()&ms)}return!1}select(dn,ms){Li();const xs=pi();let bs=dn,Es=ms;const ws=this.getChildrenSize();if(!this.canBeEmpty()){if(dn===0&&ms===0){const js=this.getFirstChild();if(Ur(js)||Gi(js))return js.select(0,0)}else if(!(dn!==void 0&&dn!==ws||ms!==void 0&&ms!==ws)){const js=this.getLastChild();if(Ur(js)||Gi(js))return js.select()}}bs===void 0&&(bs=ws),Es===void 0&&(Es=ws);const Rs=this.__key;return ti(xs)?(xs.anchor.set(Rs,bs,"element"),xs.focus.set(Rs,Es,"element"),xs.dirty=!0,xs):fi(Rs,bs,Rs,Es,"element","element")}selectStart(){const dn=this.getFirstDescendant();return dn?dn.selectStart():this.select()}selectEnd(){const dn=this.getLastDescendant();return dn?dn.selectEnd():this.select()}clear(){const dn=this.getWritable();
1439return this.getChildren().forEach((ms=>ms.remove())),dn}append(...dn){return this.splice(this.getChildrenSize(),0,dn)}setDirection(dn){const ms=this.getWritable();return ms.__dir=dn,ms}setFormat(dn){return this.getWritable().__format=dn!==""?Dt$1[dn]:0,this}setIndent(dn){return this.getWritable().__indent=dn,this}splice(dn,ms,xs){const bs=xs.length,Es=this.getChildrenSize(),ws=this.getWritable(),Rs=ws.__key,js=[],Cs=[],As=this.getChildAtIndex(dn+ms);let ks=null,Os=Es-ms+bs;if(dn!==0)if(dn===Es)ks=this.getLastChild();else{const Ds=this.getChildAtIndex(dn);Ds!==null&&(ks=Ds.getPreviousSibling())}if(ms>0){let Ds=ks===null?this.getFirstChild():ks.getNextSibling();for(let Ps=0;Ps<ms;Ps++){Ds===null&&H$4(100);const Ls=Ds.getNextSibling(),Bs=Ds.__key;le$1(Ds.getWritable()),Cs.push(Bs),Ds=Ls}}let Ms=ks;for(let Ds=0;Ds<bs;Ds++){const Ps=xs[Ds];Ms!==null&&Ps.is(Ms)&&(ks=Ms=Ms.getPreviousSibling());const Ls=Ps.getWritable();Ls.__parent===Rs&&Os--,le$1(Ls);const Bs=Ps.__key;if(Ms===null)ws.__first=Bs,Ls.__prev=null;else{const Fs=Ms.getWritable();Fs.__next=Bs,Ls.__prev=Fs.__key}Ps.__key===Rs&&H$4(76),Ls.__parent=Rs,js.push(Bs),Ms=Ps}if(dn+ms===Es)Ms!==null&&(Ms.getWritable().__next=null,ws.__last=Ms.__key);else if(As!==null){const Ds=As.getWritable();if(Ms!==null){const Ps=Ms.getWritable();
1439Ds.__prev=Ms.__key,Ps.__next=As.__key}else Ds.__prev=null}if(ws.__size=Os,Cs.length){const Ds=pi();if(ti(Ds)){const Ps=new Set(Cs),Ls=new Set(js),{anchor:Bs,focus:Fs}=Ds;ts(Bs,Ps,Ls)&&vi(Bs,Bs.getNode(),this,ks,As),ts(Fs,Ps,Ls)&&vi(Fs,Fs.getNode(),this,ks,As),Os!==0||this.canBeEmpty()||Ze$1(this)||this.remove()}}return ws}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(dn,ms){return null}canIndent(){return!0}collapseAtStart(dn){return!1}excludeFromCopy(dn){return!1}canReplaceWith(dn){return!0}canInsertAfter(dn){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(dn){return!1}extractWithChild(dn,ms,xs){return!1}}function Gi(ds){return ds instanceof Zi}function ts(ds,dn,ms){let xs=ds.getNode();for(;xs;){const bs=xs.__key;if(dn.has(bs)&&!ms.has(bs))return!0;xs=xs.getParent()}return!1}class es extends Zi{static getType(){return"root"}static clone(){return new es}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){H$4(51)}getTextContent(){const dn=this.__cachedText;return!Oi()&&Wi()._dirtyType!==ot||dn===null?super.getTextContent():dn}remove(){H$4(52)}replace(dn){H$4(53)}insertBefore(dn){H$4(54)}insertAfter(dn){H$4(55)}updateDOM(dn,ms){return!1}append(...dn){for(let ms=0;ms<dn.length;ms++){const xs=dn[ms];Gi(xs)||Yi(xs)||H$4(56)}return super.append(...dn)}static importJSON(dn){const ms=pe$1();return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function ns(ds){return ds instanceof es}function rs(){return new ss(new Map([["root",new es]]))}function is(ds){const dn=ds.exportJSON(),ms=ds.constructor;if(dn.type!==ms.getType()&&H$4(130,ms.name),Gi(ds)){const xs=dn.children;Array.isArray(xs)||H$4(59,ms.name);const bs=ds.getChildren();for(let Es=0;Es<bs.length;Es++){const ws=is(bs[Es]);xs.push(ws)}}return dn}class ss{constructor(dn,ms){this._nodeMap=dn,this._selection=ms||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(dn){return Ui(this,dn)}clone(dn){const ms=new ss(this._nodeMap,dn===void 0?this._selection:dn);return ms._readOnly=!0,ms}toJSON(){return Ui(this,(()=>({root:is(pe$1())})))}}class os extends Zi{constructor(dn){super(dn),this.__textFormat=0}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(dn){const ms=this.getWritable();return ms.__textFormat=dn,ms}hasTextFormat(dn){const ms=Et$2[dn];return!!(this.getTextFormat()&ms)}static clone(dn){return new os(dn.__key)}createDOM(dn){const ms=document.createElement("p"),xs=Me$1(dn.theme,"paragraph");return xs!==void 0&&ms.classList.add(...xs),ms}updateDOM(dn,ms,xs){return!1}static importDOM(){return{p:dn=>({conversion:ls,priority:0})}}exportDOM(dn){const{element:ms}=super.exportDOM(dn);if(ms&&un(ms)){this.isEmpty()&&ms.append(document.createElement("br"));const xs=this.getFormatType();ms.style.textAlign=xs;const bs=this.getDirection();bs&&(ms.dir=bs);const Es=this.getIndent();Es>0&&(ms.style.textIndent=20*Es+"px")}return{element:ms}}static importJSON(dn){const ms=cs();return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms.setTextFormat(dn.textFormat),ms}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),type:"paragraph",version:1}}insertNewAfter(dn,ms){const xs=cs();xs.setTextFormat(dn.format);const bs=this.getDirection();return xs.setDirection(bs),xs.setFormat(this.getFormatType()),this.insertAfter(xs,ms),xs}collapseAtStart(){const dn=this.getChildren();if(dn.length===0||Ur(dn[0])&&dn[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ls(ds){const dn=cs();if(ds.style){dn.setFormat(ds.style.textAlign);const ms=parseInt(ds.style.textIndent,10)/20;ms>0&&dn.setIndent(ms)}return{node:dn}}function cs(){return tn(new os)}function us(ds){return ds instanceof os}const as=0,fs=1,hs=3,gs=4;function _s(ds,dn,ms,xs){const bs=ds._keyToDOMMap;bs.clear(),ds._editorState=rs(),ds._pendingEditorState=xs,ds._compositionKey=null,ds._dirtyType=ot,ds._cloneNotNeeded.clear(),ds._dirtyLeaves=new Set,ds._dirtyElements.clear(),ds._normalizedNodes=new Set,ds._updateTags=new Set,ds._updates=[],ds._blockCursorElement=null;const Es=ds._observer;Es!==null&&(Es.disconnect(),ds._observer=null),dn!==null&&(dn.textContent=""),ms!==null&&(ms.textContent="",bs.set("root",ms))}function ps(ds){const dn=ds||{},ms=zi(),xs=dn.theme||{},bs=ds===void 0?ms:dn.parentEditor||null,Es=dn.disableEvents||!1,ws=rs(),Rs=dn.namespace||(bs!==null?bs._config.namespace:ke$1()),js=dn.editorState,Cs=[es,Ir,Tr,Vr,os,...dn.nodes||[]],{onError:As,html:ks}=dn,Os=dn.editable===void 0||dn.editable;let Ms;
1439if(ds===void 0&&ms!==null)Ms=ms._nodes;else{Ms=new Map;for(let Ps=0;Ps<Cs.length;Ps++){let Ls=Cs[Ps],Bs=null,Fs=null;if(typeof Ls!="function"){const Ws=Ls;Ls=Ws.replace,Bs=Ws.with,Fs=Ws.withKlass||null}const Us=Ls.getType(),Gs=Ls.transform(),Js=new Set;Gs!==null&&Js.add(Gs),Ms.set(Us,{exportDOM:ks&&ks.export?ks.export.get(Ls):void 0,klass:Ls,replace:Bs,replaceWithKlass:Fs,transforms:Js})}}const Ds=new ys(ws,bs,Ms,{disableEvents:Es,namespace:Rs,theme:xs},As||console.error,(function(Ps,Ls){const Bs=new Map,Fs=new Set,Us=Gs=>{Object.keys(Gs).forEach((Js=>{let Ws=Bs.get(Js);Ws===void 0&&(Ws=[],Bs.set(Js,Ws)),Ws.push(Gs[Js])}))};return Ps.forEach((Gs=>{const Js=Gs.klass.importDOM;if(Js==null||Fs.has(Js))return;Fs.add(Js);const Ws=Js.call(Gs.klass);Ws!==null&&Us(Ws)})),Ls&&Us(Ls),Bs})(Ms,ks?ks.import:void 0),Os);return js!==void 0&&(Ds._pendingEditorState=js,Ds._dirtyType=ct$2),Ds}class ys{constructor(dn,ms,xs,bs,Es,ws,Rs){this._parentEditor=ms,this._rootElement=null,this._editorState=dn,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=bs,this._nodes=xs,this._decorators={},this._pendingDecorators=null,this._dirtyType=ot,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ke$1(),this._onError=Es,this._htmlConversions=ws,this._editable=Rs,this._headless=ms!==null&&ms._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(dn){const ms=this._listeners.update;return ms.add(dn),()=>{ms.delete(dn)}}registerEditableListener(dn){const ms=this._listeners.editable;return ms.add(dn),()=>{ms.delete(dn)}}registerDecoratorListener(dn){const ms=this._listeners.decorator;return ms.add(dn),()=>{ms.delete(dn)}}registerTextContentListener(dn){const ms=this._listeners.textcontent;return ms.add(dn),()=>{ms.delete(dn)}}registerRootListener(dn){const ms=this._listeners.root;return dn(this._rootElement,null),ms.add(dn),()=>{dn(null,this._rootElement),ms.delete(dn)}}registerCommand(dn,ms,xs){xs===void 0&&H$4(35);const bs=this._commands;bs.has(dn)||bs.set(dn,[new Set,new Set,new Set,new Set,new Set]);const Es=bs.get(dn);Es===void 0&&H$4(36,String(dn));const ws=Es[xs];return ws.add(ms),()=>{ws.delete(ms),Es.every((Rs=>Rs.size===0))&&bs.delete(dn)}}registerMutationListener(dn,ms){this._nodes.get(dn.getType())===void 0&&H$4(37,dn.name);const xs=this._listeners.mutation;return xs.set(ms,dn),()=>{xs.delete(ms)}}registerNodeTransformToKlass(dn,ms){const xs=dn.getType(),bs=this._nodes.get(xs);return bs===void 0&&H$4(37,dn.name),bs.transforms.add(ms),bs}registerNodeTransform(dn,ms){const xs=this.registerNodeTransformToKlass(dn,ms),bs=[xs],Es=xs.replaceWithKlass;if(Es!=null){const js=this.registerNodeTransformToKlass(Es,ms);bs.push(js)}var ws,Rs;return ws=this,Rs=dn.getType(),Qi(ws,(()=>{const js=Mi();if(js.isEmpty())return;if(Rs==="root")return void pe$1().markDirty();const Cs=js._nodeMap;for(const[,As]of Cs)As.markDirty()}),ws._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{bs.forEach((js=>js.transforms.delete(ms)))}}hasNode(dn){return this._nodes.has(dn.getType())}hasNodes(dn){return dn.every(this.hasNode.bind(this))}dispatchCommand(dn,ms){return Je$1(this,dn,ms)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(dn){const ms=this._rootElement;if(dn!==ms){const xs=Me$1(this._config.theme,"root"),bs=this._pendingEditorState||this._editorState;if(this._rootElement=dn,_s(this,ms,dn,bs),ms!==null&&(this._config.disableEvents||mr(ms),xs!=null&&ms.classList.remove(...xs)),dn!==null){const Es=(function(Rs){const js=Rs.ownerDocument;return js&&js.defaultView||null})(dn),ws=dn.style;ws.userSelect="text",ws.whiteSpace="pre-wrap",ws.wordBreak="break-word",dn.setAttribute("data-lexical-editor","true"),this._window=Es,this._dirtyType=ct$2,Vt(this),this._updateTags.add("history-merge"),Vi(this),this._config.disableEvents||(function(Rs,js){const Cs=Rs.ownerDocument,As=nr.get(Cs);(As===void 0||As<1)&&Cs.addEventListener("selectionchange",_r),nr.set(Cs,As||1),Rs.__lexicalEditor=js;const ks=hr(Rs);for(let Os=0;Os<Yn.length;Os++){const[Ms,Ds]=Yn[Os],Ps=typeof Ds=="function"?Ls=>{yr(Ls)||(pr(Ls),(js.isEditable()||Ms==="click")&&Ds(Ls,js))}:Ls=>
1439{if(!yr(Ls)&&(pr(Ls),js.isEditable()))switch(Ms){case"cut":return Je$1(js,W$2,Ls);case"copy":return Je$1(js,M$3,Ls);case"paste":return Je$1(js,c$5,Ls);case"dragstart":return Je$1(js,O$3,Ls);case"dragover":return Je$1(js,L$4,Ls);case"dragend":return Je$1(js,A$6,Ls);case"focus":return Je$1(js,U$2,Ls);case"blur":return Je$1(js,V$5,Ls);case"drop":return Je$1(js,F$3,Ls)}};Rs.addEventListener(Ms,Ps),ks.push((()=>{Rs.removeEventListener(Ms,Ps)}))}})(dn,this),xs!=null&&dn.classList.add(...xs)}else this._editorState=bs,this._pendingEditorState=null,this._window=null;$i("root",this,!1,dn,ms)}}getElementByKey(dn){return this._keyToDOMMap.get(dn)||null}getEditorState(){return this._editorState}setEditorState(dn,ms){dn.isEmpty()&&H$4(38),Ut(this);const xs=this._pendingEditorState,bs=this._updateTags,Es=ms!==void 0?ms.tag:null;xs===null||xs.isEmpty()||(Es!=null&&bs.add(Es),Vi(this)),this._pendingEditorState=dn,this._dirtyType=ct$2,this._dirtyElements.set("root",!1),this._compositionKey=null,Es!=null&&bs.add(Es),Vi(this)}parseEditorState(dn,ms){return(function(xs,bs,Es){const ws=rs(),Rs=wi,js=Pi,Cs=Ei,As=bs._dirtyElements,ks=bs._dirtyLeaves,Os=bs._cloneNotNeeded,Ms=bs._dirtyType;bs._dirtyElements=new Map,bs._dirtyLeaves=new Set,bs._cloneNotNeeded=new Set,bs._dirtyType=0,wi=ws,Pi=!1,Ei=bs;try{const Ds=bs._nodes;Ji(xs.root,Ds),Es&&Es(),ws._readOnly=!0}catch(Ds){Ds instanceof Error&&bs._onError(Ds)}finally{bs._dirtyElements=As,bs._dirtyLeaves=ks,bs._cloneNotNeeded=Os,bs._dirtyType=Ms,wi=Rs,Pi=js,Ei=Cs}return ws})(typeof dn=="string"?JSON.parse(dn):dn,this,ms)}update(dn,ms){Qi(this,dn,ms)}focus(dn,ms={}){const xs=this._rootElement;xs!==null&&(xs.setAttribute("autocapitalize","off"),Qi(this,(()=>{const bs=pi(),Es=pe$1();bs!==null?bs.dirty=!0:Es.getChildrenSize()!==0&&(ms.defaultSelection==="rootStart"?Es.selectStart():Es.selectEnd())}),{onUpdate:()=>{xs.removeAttribute("autocapitalize"),dn&&dn()},tag:"focus"}),this._pendingEditorState===null&&xs.removeAttribute("autocapitalize"))}blur(){const dn=this._rootElement;dn!==null&&dn.blur();const ms=on(this._window);ms!==null&&ms.removeAllRanges()}isEditable(){return this._editable}setEditable(dn){this._editable!==dn&&(this._editable=dn,$i("editable",this,!0,dn))}toJSON(){return{editorState:this._editorState.toJSON()}}}const d$2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;var m$4=d$2?reactExports.useLayoutEffect:reactExports.useEffect;const u$5={tag:"history-merge"};function f$1({initialConfig:ds,children:dn}){const ms=reactExports.useMemo((()=>{const{theme:xs,namespace:bs,editor__DEPRECATED:Es,nodes:ws,onError:Rs,editorState:js,html:Cs}=ds,As=t$2(null,xs);let ks=Es||null;if(ks===null){const Os=ps({editable:ds.editable,html:Cs,namespace:bs,nodes:ws,onError:Ms=>Rs(Ms,Os),theme:xs});(function(Ms,Ds){if(Ds!==null){if(Ds===void 0)Ms.update((()=>{const Ps=pe$1();if(Ps.isEmpty()){const Ls=cs();Ps.append(Ls);const Bs=d$2?document.activeElement:null;(pi()!==null||Bs!==null&&Bs===Ms.getRootElement())&&Ls.select()}}),u$5);else if(Ds!==null)switch(typeof Ds){case"string":{const Ps=Ms.parseEditorState(Ds);Ms.setEditorState(Ps,u$5);break}case"object":Ms.setEditorState(Ds,u$5);break;case"function":Ms.update((()=>{pe$1().isEmpty()&&Ds(Ms)}),u$5)}}})(Os,js),ks=Os}return[ks,As]}),[]);return m$4((()=>{const xs=ds.editable,[bs]=ms;bs.setEditable(xs===void 0||xs)}),[]),reactExports.createElement(l$3.Provider,{value:ms},dn)}var u$4=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function c$4(ds){return{initialValueFn:()=>ds.isEditable(),subscribe:dn=>ds.registerEditableListener(dn)}}function a$2(){return(function(ds){const[dn]=o$5(),ms=reactExports.useMemo((()=>ds(dn)),[dn,ds]),xs=reactExports.useRef(ms.initialValueFn()),[bs,Es]=reactExports.useState(xs.current);return u$4((()=>{const{initialValueFn:ws,subscribe:Rs}=ms,js=ws();return xs.current!==js&&(xs.current=js,Es(js)),Rs((Cs=>{xs.current=Cs,Es(Cs)}))}),[ms,ds]),bs})(c$4)}function s$1(){return pe$1().getTextContent()}function u$3(ds,dn=!0){if(ds)return!1;let ms=s$1();return dn&&(ms=ms.trim()),ms===""}function c$3(ds){if(!u$3(ds,!1))return!1;const dn=pe$1().getChildren(),ms=dn.length;if(ms>1)return!1;for(let xs=0;xs<ms;xs++){const bs=dn[xs];if(Yi(bs))return!1;if(Gi(bs)){if(!us(bs)||bs.__indent!==0)return!1;const Es=bs.getChildren(),ws=Es.length;for(let Rs=0;Rs<ws;Rs++){const js=Es[xs];if(!Ur(js))return!1}}}return!0}function g$5(ds){return()=>c$3(ds)}const m$3=new Map;function N$4(ds){const dn={},ms=ds.split(";");for(const xs of ms)if(xs!==""){const[bs,Es]=xs.split(/:([^]+)/);bs&&Es&&(dn[bs.trim()]=Es.trim())}return dn}function v$2(ds){const dn=ds.constructor.clone(ds);return dn.__parent=ds.__parent,dn.__next=ds.__next,dn.__prev=ds.__prev,Gi(ds)&&Gi(dn)?(xs=ds,(ms=dn).__first=xs.__first,ms.__last=xs.__last,ms.__size=xs.__size,ms.__format=xs.__format,ms.__indent=xs.__indent,ms.__dir=xs.__dir,ms):Ur(ds)&&Ur(dn)?(function(bs,Es){return bs.__format=Es.__format,bs.__style=Es.__style,bs.__mode=Es.__mode,bs.__detail=Es.__detail,bs})(dn,ds):us(ds)&&us(dn)?(function(bs,Es){return bs.__textFormat=Es.__textFormat,b
1439s})(dn,ds):dn;var ms,xs}function C$3(ds,dn){const ms=ds.getStartEndPoints();if(dn.isSelected(ds)&&!dn.isSegmented()&&!dn.isToken()&&ms!==null){const[xs,bs]=ms,Es=ds.isBackward(),ws=xs.getNode(),Rs=bs.getNode(),js=dn.is(ws),Cs=dn.is(Rs);if(js||Cs){const[As,ks]=ii(ds),Os=ws.is(Rs),Ms=dn.is(Es?Rs:ws),Ds=dn.is(Es?ws:Rs);let Ps,Ls=0;return Os?(Ls=As>ks?ks:As,Ps=As>ks?As:ks):Ms?(Ls=Es?ks:As,Ps=void 0):Ds&&(Ls=0,Ps=Es?As:ks),dn.__text=dn.__text.slice(Ls,Ps),dn}}return dn}function F$2(ds){const dn=ds.getStyle(),ms=N$4(dn);m$3.set(dn,ms)}function b$3(ds,dn){if(ds===null)return;const ms=ds.getStartEndPoints(),xs=ms?ms[0]:null;if(xs!==null&&xs.key==="root"){const ws=dn(),Rs=pe$1(),js=Rs.getFirstChild();return void(js?js.replace(ws,!0):Rs.append(ws))}const bs=ds.getNodes(),Es=xs!==null&&(function(ws,Rs){let js=ws;for(;js!==null&&js.getParent()!==null&&!Rs(js);)js=js.getParentOrThrow();return Rs(js)?js:null})(xs.getNode(),j$2);Es&&bs.indexOf(Es)===-1&&bs.push(Es);for(let ws=0;ws<bs.length;ws++){const Rs=bs[ws];if(!j$2(Rs))continue;if(!Gi(Rs))throw Error("Expected block node to be an ElementNode");const js=dn();js.setFormat(Rs.getFormatType()),js.setIndent(Rs.getIndent()),Rs.replace(js,!0)}}function A$5(ds,dn){const ms=Re$1(ds.focus,dn);return Yi(ms)&&!ms.isIsolated()||Gi(ms)&&!ms.isInline()&&!ms.canBeEmpty()}function R$2(ds,dn,ms,xs){ds.modify(dn?"extend":"move",ms,xs)}function D$5(ds){const dn=ds.anchor.getNode();return(ns(dn)?dn:dn.getParentOrThrow()).getDirection()==="rtl"}function L$3(ds,dn,ms){const xs=D$5(ds);R$2(ds,dn,ms?!xs:xs,"character")}function j$2(ds){if(Yi(ds)||!Gi(ds)||Ze$1(ds))return!1;const dn=ds.getFirstChild(),ms=dn===null||Cr(dn)||Ur(dn)||dn.isInline();return!ds.isInline()&&ds.canBeEmpty()!==!1&&ms}var g$4=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const p$3=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,h$1=p$3&&"documentMode"in document?document.documentMode:null;!(!p$3||!("InputEvent"in window)||h$1)&&"getTargetRanges"in new window.InputEvent("input");function A$4(...ds){const dn=[];for(const ms of ds)if(ms&&typeof ms=="string")for(const[xs]of ms.matchAll(/\S+/g))dn.push(xs);return dn}function b$2(...ds){return()=>{ds.forEach((dn=>dn()))}}function B$3(ds,...dn){const ms=A$4(...dn);ms.length>0&&ds.classList.add(...ms)}function C$2(ds,...dn){const ms=A$4(...dn);ms.length>0&&ds.classList.remove(...ms)}function D$4(ds,dn){let ms=ds;for(;ms!=null;){if(ms instanceof dn)return ms;ms=ms.getParent()}return null}function H$3(ds){const dn=I$2(ds,(ms=>Gi(ms)&&!ms.isInline()));return Gi(dn)||g$4(4,ds.__key),dn}const I$2=(ds,dn)=>{let ms=ds;for(;ms!==pe$1()&&ms!=null;){if(dn(ms))return ms;ms=ms.getParent()}return null};function k$3(ds){const dn=pi()||yi();if(ti(dn)){const{focus:ms}=dn,xs=ms.getNode(),bs=ms.offset;if(Ze$1(xs)){const Es=xs.getChildAtIndex(bs);Es==null?xs.append(ds):Es.insertBefore(ds),ds.selectNext()}else{let Es,ws;Ur(xs)?(Es=xs.getParentOrThrow(),ws=xs.getIndexWithinParent(),bs>0&&(ws+=1,xs.splitText(bs))):(Es=xs,ws=bs);const[,Rs]=ln(Es,ws);Rs.insertBefore(ds),Rs.selectStart()}}else{if(dn!=null){const xs=dn.getNodes();xs[xs.length-1].getTopLevelElementOrThrow().insertAfter(ds)}else pe$1().append(ds);const ms=cs();ds.insertAfter(ms),ms.select()}return ds.getLatest()}function $$2(ds,dn){return ds!==null&&Object.getPrototypeOf(ds).constructor.name===dn.name}function V$4(ds,dn){const ms=ds.getFirstChild();ms!==null?ms.insertBefore(dn):ds.append(dn)}function o$3(ds){const dn=window.location.origin,ms=xs=>{if(xs.origin!==dn)return;const bs=ds.getRootElement();if(document.activeElement!==bs)return;const Es=xs.data;if(typeof Es=="string"){let ws;try{ws=JSON.parse(Es)}catch{return}if(ws&&ws.protocol==="nuanria_messaging"&&ws.type==="request"){const Rs=ws.payload;if(Rs&&Rs.functionId==="makeChanges"){const js=Rs.args;
1439if(js){const[Cs,As,ks,Os,Ms,Ds]=js;ds.update((()=>{const Ps=pi();if(ti(Ps)){const Ls=Ps.anchor;let Bs=Ls.getNode(),Fs=0,Us=0;if(Ur(Bs)&&Cs>=0&&As>=0&&(Fs=Cs,Us=Cs+As,Ps.setTextNodeRange(Bs,Fs,Bs,Us)),Fs===Us&&ks===""||(Ps.insertRawText(ks),Bs=Ls.getNode()),Ur(Bs)){Fs=Os,Us=Os+Ms;const Gs=Bs.getTextContentSize();Fs=Fs>Gs?Gs:Fs,Us=Us>Gs?Gs:Us,Ps.setTextNodeRange(Bs,Fs,Bs,Us)}xs.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",ms,!0),()=>{window.removeEventListener("message",ms,!0)}}function i$1(ds,dn){const ms=dn.body?dn.body.childNodes:[];let xs=[];for(let bs=0;bs<ms.length;bs++){const Es=ms[bs];if(!u$2.has(Es.nodeName)){const ws=a$1(Es,ds);ws!==null&&(xs=xs.concat(ws))}}return xs}function c$2(ds,dn){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const ms=document.createElement("div"),xs=pe$1().getChildren();for(let bs=0;bs<xs.length;bs++)s(ds,xs[bs],ms,dn);return ms.innerHTML}function s(ds,dn,ms,xs=null){let bs=xs===null||dn.isSelected(xs);const Es=Gi(dn)&&dn.excludeFromCopy("html");let ws=dn;if(xs!==null){let Ms=v$2(dn);Ms=Ur(Ms)&&xs!==null?C$3(xs,Ms):Ms,ws=Ms}const Rs=Gi(ws)?ws.getChildren():[],js=ds._nodes.get(ws.getType());let Cs;Cs=js&&js.exportDOM!==void 0?js.exportDOM(ds,ws):ws.exportDOM(ds);const{element:As,after:ks}=Cs;if(!As)return!1;const Os=document.createDocumentFragment();for(let Ms=0;Ms<Rs.length;Ms++){const Ds=Rs[Ms],Ps=s(ds,Ds,Os,xs);!bs&&Gi(dn)&&Ps&&dn.extractWithChild(Ds,xs,"html")&&(bs=!0)}if(bs&&!Es){if(un(As)&&As.append(Os),ms.append(As),ks){const Ms=ks.call(ws,As);Ms&&As.replaceWith(Ms)}}else ms.append(Os);return bs}const u$2=new Set(["STYLE","SCRIPT"]);function a$1(ds,dn,ms=new Map,xs){let bs=[];if(u$2.has(ds.nodeName))return bs;let Es=null;const ws=(function(ks,Os){const{nodeName:Ms}=ks,Ds=Os._htmlConversions.get(Ms.toLowerCase());let Ps=null;if(Ds!==void 0)for(const Ls of Ds){const Bs=Ls(ks);Bs!==null&&(Ps===null||(Ps.priority||0)<(Bs.priority||0))&&(Ps=Bs)}return Ps!==null?Ps.conversion:null})(ds,dn),Rs=ws?ws(ds):null;let js=null;if(Rs!==null){js=Rs.after;const ks=Rs.node;if(Es=Array.isArray(ks)?ks[ks.length-1]:ks,Es!==null){for(const[,Os]of ms)if(Es=Os(Es,xs),!Es)break;Es&&bs.push(...Array.isArray(ks)?ks:[Es])}Rs.forChild!=null&&ms.set(ds.nodeName,Rs.forChild)}const Cs=ds.childNodes;let As=[];for(let ks=0;ks<Cs.length;ks++)As.push(...a$1(Cs[ks],dn,new Map(ms),Es));return js!=null&&(As=js(As)),Es==null?bs=bs.concat(As):Gi(Es)&&Es.append(...As),bs}var g$3=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const w$2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,y$2=ds=>w$2?(ds||window).getSelection():null;function v$1(ds){const dn=pi();if(dn==null)throw Error("Expected valid LexicalSelection");return ti(dn)&&dn.isCollapsed()||dn.getNodes().length===0?"":c$2(ds,dn)}function D$3(ds){const dn=pi();if(dn==null)throw Error("Expected valid LexicalSelection");return ti(dn)&&dn.isCollapsed()||dn.getNodes().length===0?null:JSON.stringify(T$1(ds,dn))}function E$3(ds,dn,ms){const xs=ds.getData("application/x-lexical-editor");if(xs)try{const ws=JSON.parse(xs);if(ws.namespace===ms._config.namespace&&Array.isArray(ws.nodes))return N$3(ms,_$3(ws.nodes),dn)}catch{}const bs=ds.getData("text/html");if(bs)try{const ws=new DOMParser().parseFromString(bs,"text/html");return N$3(ms,i$1(ms,ws),dn)}catch{}const Es=ds.getData("text/plain")||ds.getData("text/uri-list");if(Es!=null)if(ti(dn)){const ws=Es.split(/(\r?\n|\t)/);ws[ws.length-1]===""&&ws.pop();for(let Rs=0;Rs<ws.length;Rs++){const js=ws[Rs];js===`
1440`||js===`\r
1441`?dn.insertParagraph():js==="	"?dn.insertNodes([$r()]):dn.insertText(js)}}else dn.insertRawText(Es)}function N$3(ds,dn,ms){ds.dispatchCommand(n$2,{nodes:dn,selection:ms})||ms.insertNodes(dn)}function S$2(ds,dn,ms,xs=[]){let bs=dn===null||ms.isSelected(dn);const Es=Gi(ms)&&ms.excludeFromCopy("html");let ws=ms;if(dn!==null){let Cs=v$2(ms);Cs=Ur(Cs)&&dn!==null?C$3(dn,Cs):Cs,ws=Cs}const Rs=Gi(ws)?ws.getChildren():[],js=(function(Cs){const As=Cs.exportJSON(),ks=Cs.constructor;if(As.type!==ks.getType()&&g$3(58,ks.name),Gi(Cs)){const Os=As.children;Array.isArray(Os)||g$3(59,ks.name)}return As})(ws);if(Ur(ws)){const Cs=ws.__text;Cs.length>0?js.text=Cs:bs=!1}for(let Cs=0;Cs<Rs.length;Cs++){const As=Rs[Cs],ks=S$2(ds,dn,As,js.children);!bs&&Gi(ms)&&ks&&ms.extractWithChild(As,dn,"clone")&&(bs=!0)}if(bs&&!Es)xs.push(js);else if(Array.isArray(js.children))for(let Cs=0;Cs<js.children.length;Cs++){const As=js.children[Cs];xs.push(As)}return bs}function T$1(ds,dn){const ms=[],xs=pe$1().getChildren();for(let bs=0;bs<xs.length;bs++)S$2(ds,dn,xs[bs],ms);return{namespace:ds._config.namespace,nodes:ms}}function _$3(ds){const dn=[];for(let ms=0;ms<ds.length;ms++){const xs=ds[ms],bs=Ki(xs);Ur(bs)&&F$2(bs),dn.push(bs)}return dn}let A$3=null;async function R$1(ds,dn){if(A$3!==null)return!1;if(dn!==null)return new Promise(((Rs,js)=>{ds.update((()=>{Rs(P$2(ds,dn))}))}));const ms=ds.getRootElement(),xs=ds._window==null?window.document:ds._window.document,bs=y$2(ds._window);if(ms===null||bs===null)return!1;const Es=xs.createElement("span");Es.style.cssText="position: fixed; top: -1000px;",Es.append(xs.createTextNode("#")),ms.append(Es);const ws=new Range;return ws.setStart(Es,0),ws.setEnd(Es,1),bs.removeAllRanges(),bs.addRange(ws),new Promise(((Rs,js)=>{const Cs=ds.registerCommand(M$3,(As=>($$2(As,ClipboardEvent)&&(Cs(),A$3!==null&&(window.clearTimeout(A$3),A$3=null),Rs(P$2(ds,As))),!0)),gs);A$3=window.setTimeout((()=>{Cs(),A$3=null,Rs(!1)}),50),xs.execCommand("copy"),Es.remove()}))}function P$2(ds,dn){const ms=y$2(ds._window);if(!ms)return!1;const xs=ms.anchorNode,bs=ms.focusNode;if(xs!==null&&bs!==null&&!Gt(ds,xs,bs))return!1;dn.preventDefault();const Es=dn.clipboardData,ws=pi();if(Es===null||ws===null)return!1;const Rs=v$1(ds),js=D$3(ds);let Cs="";return ws!==null&&(Cs=ws.getTextContent()),Rs!==null&&Es.setData("text/html",Rs),js!==null&&Es.setData("application/x-lexical-editor",js),Es.setData("text/plain",Cs),!0}function st$1(ds,dn){if(document.caretRangeFromPoint!==void 0){const ms=document.caretRangeFromPoint(ds,dn);return ms===null?null:{node:ms.startContainer,offset:ms.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const ms=document.caretPositionFromPoint(ds,dn);return ms===null?null:{node:ms.offsetNode,offset:ms.offset}}return null}const at$1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ct$1=at$1&&"documentMode"in document?document.documentMode:null,ut=!(!at$1||!("InputEvent"in window)||ct$1)&&"getTargetRanges"in new window.InputEvent("input"),lt$1=at$1&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),dt$1=at$1&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,mt$1=at$1&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ft$1=at$1&&/AppleWeb
1441Kit\/[\d.]+/.test(navigator.userAgent)&&!mt$1,gt$1=t$1();let pt$1=class b0 extends Zi{static getType(){return"quote"}static clone(dn){return new b0(dn.__key)}constructor(dn){super(dn)}createDOM(dn){const ms=document.createElement("blockquote");return B$3(ms,dn.theme.quote),ms}updateDOM(dn,ms){return!1}static importDOM(){return{blockquote:dn=>({conversion:xt$1,priority:0})}}exportDOM(dn){const{element:ms}=super.exportDOM(dn);if(ms&&un(ms)){this.isEmpty()&&ms.append(document.createElement("br"));const xs=this.getFormatType();ms.style.textAlign=xs;const bs=this.getDirection();bs&&(ms.dir=bs)}return{element:ms}}static importJSON(dn){const ms=ht$1();return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(dn,ms){const xs=cs(),bs=this.getDirection();return xs.setDirection(bs),this.insertAfter(xs,ms),xs}collapseAtStart(){const dn=cs();return this.getChildren().forEach((ms=>dn.append(ms))),this.replace(dn),!0}};function ht$1(){return tn(new pt$1)}function vt$1(ds){return ds instanceof pt$1}let Ct$1=class E0 extends Zi{static getType(){return"heading"}static clone(dn){return new E0(dn.__tag,dn.__key)}constructor(dn,ms){super(ms),this.__tag=dn}getTag(){return this.__tag}createDOM(dn){const ms=this.__tag,xs=document.createElement(ms),bs=dn.theme.heading;if(bs!==void 0){const Es=bs[ms];B$3(xs,Es)}return xs}updateDOM(dn,ms){return!1}static importDOM(){return{h1:dn=>({conversion:Dt,priority:0}),h2:dn=>({conversion:Dt,priority:0}),h3:dn=>({conversion:Dt,priority:0}),h4:dn=>({conversion:Dt,priority:0}),h5:dn=>({conversion:Dt,priority:0}),h6:dn=>({conversion:Dt,priority:0}),p:dn=>{const ms=dn.firstChild;return ms!==null&&yt$1(ms)?{conversion:()=>({node:null}),priority:3}:null},span:dn=>yt$1(dn)?{conversion:ms=>({node:wt$1("h1")}),priority:3}:null}}exportDOM(dn){const{element:ms}=super.exportDOM(dn);if(ms&&un(ms)){this.isEmpty()&&ms.append(document.createElement("br"));const xs=this.getFormatType();ms.style.textAlign=xs;const bs=this.getDirection();bs&&(ms.dir=bs)}return{element:ms}}static importJSON(dn){const ms=wt$1(dn.tag);return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(dn,ms=!0){const xs=dn?dn.anchor.offset:0,bs=xs!==this.getTextContentSize()&&dn?wt$1(this.getTag()):cs(),Es=this.getDirection();if(bs.setDirection(Es),this.insertAfter(bs,ms),xs===0&&!this.isEmpty()&&dn){const ws=cs();ws.select(),this.replace(ws,!0)}return bs}collapseAtStart(){const dn=this.isEmpty()?cs():wt$1(this.getTag());
1441return this.getChildren().forEach((ms=>dn.append(ms))),this.replace(dn),!0}extractWithChild(){return!0}};function yt$1(ds){return ds.nodeName.toLowerCase()==="span"&&ds.style.fontSize==="26pt"}function Dt(ds){const dn=ds.nodeName.toLowerCase();let ms=null;return dn!=="h1"&&dn!=="h2"&&dn!=="h3"&&dn!=="h4"&&dn!=="h5"&&dn!=="h6"||(ms=wt$1(dn),ds.style!==null&&ms.setFormat(ds.style.textAlign)),{node:ms}}function xt$1(ds){const dn=ht$1();return ds.style!==null&&dn.setFormat(ds.style.textAlign),{node:dn}}function wt$1(ds){return tn(new Ct$1(ds))}function Et$1(ds){return ds instanceof Ct$1}function Nt(ds){let dn=null;if($$2(ds,DragEvent)?dn=ds.dataTransfer:$$2(ds,ClipboardEvent)&&(dn=ds.clipboardData),dn===null)return[!1,[],!1];const ms=dn.types,xs=ms.includes("Files"),bs=ms.includes("text/html")||ms.includes("text/plain");return[xs,Array.from(dn.files),bs]}function At(ds){const dn=pi();if(!ti(dn))return!1;const ms=new Set,xs=dn.getNodes();for(let bs=0;bs<xs.length;bs++){const Es=xs[bs],ws=Es.getKey();if(ms.has(ws))continue;const Rs=H$3(Es),js=Rs.getKey();Rs.canIndent()&&!ms.has(js)&&(ms.add(js),ds(Rs))}return ms.size>0}function Pt$1(ds){const dn=he$1(ds);return Yi(dn)}function Ot(ds){return b$2(ds.registerCommand(r,(dn=>{const ms=pi();return!!ni(ms)&&(ms.clear(),!0)}),0),ds.registerCommand(i$2,(dn=>{const ms=pi();return!!ti(ms)&&(ms.deleteCharacter(dn),!0)}),as),ds.registerCommand(a$3,(dn=>{const ms=pi();return!!ti(ms)&&(ms.deleteWord(dn),!0)}),as),ds.registerCommand(f$2,(dn=>{const ms=pi();return!!ti(ms)&&(ms.deleteLine(dn),!0)}),as),ds.registerCommand(l$2,(dn=>{const ms=pi();if(typeof dn=="string")ms!==null&&ms.insertText(dn);else{if(ms===null)return!1;const xs=dn.dataTransfer;if(xs!=null)E$3(xs,ms,ds);else if(ti(ms)){const bs=dn.data;return bs&&ms.insertText(bs),!0}}return!0}),as),ds.registerCommand(u$6,(()=>{const dn=pi();return!!ti(dn)&&(dn.removeText(),!0)}),as),ds.registerCommand(d$3,(dn=>{const ms=pi();return!!ti(ms)&&(ms.formatText(dn),!0)}),as),ds.registerCommand(I$3,(dn=>{const ms=pi();if(!ti(ms)&&!ni(ms))return!1;const xs=ms.getNodes();for(const bs of xs){const Es=I$2(bs,(ws=>Gi(ws)&&!ws.isInline()));Es!==null&&Es.setFormat(dn)}return!0}),as),ds.registerCommand(s$2,(dn=>{const ms=pi();return!!ti(ms)&&(ms.insertLineBreak(dn),!0)}),as),ds.registerCommand(o$4,(()=>{const dn=pi();return!!ti(dn)&&(dn.insertParagraph(),!0)}),as),ds.registerCommand(E$4,(()=>(ki([$r()]),!0)),as),ds.registerCommand(P$3,(()=>At((dn=>{const ms=dn.getIndent();dn.setIndent(ms+1)}))),as),ds.registerCommand(D$6,(()=>At((dn=>{const ms=dn.getIndent();ms>0&&dn.setIndent(ms-1)}))),as),ds.registerCommand(v$3,(dn=>{const ms=pi();if(ni(ms)&&!Pt$1(dn.target)){const xs=ms.getNodes();if(xs.length>0)return xs[0].selectPrevious(),!0}else if(ti(ms)){const xs=Re$1(ms.focus,!0);if(!dn.shiftKey&&Yi(xs)&&!xs.isIsolated()&&!xs.isInline())return xs.selectPrevious(),dn.preventDefault(),!0}return!1}),as),ds.registerCommand(T$2,(dn=>{const ms=pi();if(ni(ms)){const xs=ms.getNodes();if(xs.length>0)return xs[0].selectNext(0,0),!0}else if(ti(ms)){if((function(bs){const Es=bs.focus;return Es.key==="root"&&Es.offset===pe$1().getChildrenSize()})(ms))return dn.preventDefault(),!0;const xs=Re$1(ms.focus,!1);if(!dn.shiftKey&&Yi(xs)&&!xs.isIsolated()&&!xs.isInline())return xs.selectNext(),dn.preventDefault(),!0}return!1}),as),ds.registerCommand(m$5,(dn=>{const ms=pi();if(ni(ms)){const xs=ms.getNodes();if(xs.length>0)return dn.preventDefault(),xs[0].selectPrevious(),!0}if(!ti(ms))return!1;if(A$5(ms,!0)){const xs=dn.shiftKey;return dn.preventDefault(),L$3(ms,xs,!0),!0}return!1}),as),ds.registerCommand(p$4,(dn=>{const ms=pi();if(ni(ms)&&!Pt$1(dn.target)){const bs=ms.getNodes();if(bs.length>0)return dn.preventDefault(),bs[0].selectNext(0,0),!0}if(!ti(ms))return!1;const xs=dn.shiftKey;return!!A$5(ms,!1)&&(dn.preventDefault(),L$3(ms,xs,!1),!0)}),as),ds.registerCommand(C$4,(dn=>{if(Pt$1(dn.target))return!1;const ms=pi();if(!ti(ms))return!1;dn.preventDefault();const{anchor:xs}=ms,bs=xs.getNode();return ms.isCollapsed()&&xs.offset===0&&!ns(bs)&&H$3(bs).getIndent()>0?ds.dispatchCommand(D$6,void 0):ds.dispatchCommand(i$2,!0)}),as),ds.registerCommand(N$5,(dn=>{if(Pt$1(dn.target))return!1;const ms=pi();return!!ti(ms)&&(dn.preventDefault(),ds.dispatchCommand(i$2,!1))}),as),ds.registerCommand(S$3,(dn=>{const ms=pi();if(!ti(ms))return!1;if(dn!==null){if((dt$1||lt$1||ft$1)&&ut)return!1;if(dn.preventDefault(),dn.shiftKey)return ds.dispatchCommand(s$2,!1)}return ds.dispatchCommand(o$4,void 0)}),as),ds.registerCommand(b$4,(()=>{const dn=pi();return!!ti(dn)&&(ds.blur(),!0)}),as),ds.registerCommand(F$3,(dn=>{const[,ms]=Nt(dn);if(ms.length>0){const bs=st$1(dn.clientX,dn.clientY);if(bs!==null){const{offset:Es,node:ws}=bs,Rs=he$1(ws);if(Rs!==null){const js=di();if(Ur(Rs))js.anchor.set(Rs.getKey(),Es,"text"),js.focus.set(Rs.getKey(),Es,"text");else{const As=Rs.getParentOrThrow().getKey(),ks=Rs.getIndexWithinParent()+1;js.anchor.set(As,ks,"element"),js.focus.set(As,ks,"element")}const Cs=qt(js);me(Cs)}ds.dispatchCommand(gt$1,ms)}return dn.preventDefault(),!0}const xs=pi();return!!ti(xs)}),as),ds.registerCommand(O$3,(dn=>{const[ms]=Nt(dn),xs=pi();return!(ms&&!ti(xs))}),as),ds.registerCommand(L$4,(dn=>{const[ms]=Nt(dn),xs=pi();if(ms&&!ti(xs))return!1;const bs=st$1(dn.clientX,dn.clientY);if(bs!==null){const Es=he$1(bs.node);Yi(Es)&&dn.preventDefault()}return!0}),as),ds.registerCommand(z$3,(()=>(Ae$1(),!0)),as),ds.registerCommand(M$3,(dn=>(R$1(ds,$$2(dn,ClipboardEvent)?dn:null),!0)),as),ds.registerCommand(W$2,(dn=>((async function(ms,xs){await R$1(xs,$$2(ms,ClipboardEvent)?ms:null),xs.update((()=>{const bs=pi();
1441ti(bs)?bs.removeText():ni(bs)&&bs.getNodes().forEach((Es=>Es.remove()))}))})(dn,ds),!0)),as),ds.registerCommand(c$5,(dn=>{const[,ms,xs]=Nt(dn);return ms.length>0&&!xs?(ds.dispatchCommand(gt$1,ms),!0):Zt(dn.target)?!1:pi()!==null&&((function(bs,Es){bs.preventDefault(),Es.update((()=>{const ws=pi(),Rs=$$2(bs,InputEvent)||$$2(bs,KeyboardEvent)?null:bs.clipboardData;Rs!=null&&ws!==null&&E$3(Rs,ws,Es)}),{tag:"paste"})})(dn,ds),!0)}),as))}var p$2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function E$2(ds){return ds.getEditorState().read(g$5(ds.isComposing()))}function x$2({contentEditable:ds,placeholder:dn,ErrorBoundary:ms}){const[xs]=o$5(),bs=(function(Es,ws){const[Rs,js]=reactExports.useState((()=>Es.getDecorators()));return p$2((()=>Es.registerDecoratorListener((Cs=>{reactDomExports.flushSync((()=>{js(Cs)}))}))),[Es]),reactExports.useEffect((()=>{js(Es.getDecorators())}),[Es]),reactExports.useMemo((()=>{const Cs=[],As=Object.keys(Rs);for(let ks=0;ks<As.length;ks++){const Os=As[ks],Ms=reactExports.createElement(ws,{onError:Ps=>Es._onError(Ps)},reactExports.createElement(reactExports.Suspense,{fallback:null},Rs[Os])),Ds=Es.getElementByKey(Os);Ds!==null&&Cs.push(reactDomExports.createPortal(Ms,Ds,Os))}return Cs}),[ws,Rs,Es])})(xs,ms);return(function(Es){p$2((()=>b$2(Ot(Es),o$3(Es))),[Es])})(xs),reactExports.createElement(reactExports.Fragment,null,ds,reactExports.createElement(g$2,{content:dn}),bs)}function g$2({content:ds}){const[dn]=o$5(),ms=(function(bs){const[Es,ws]=reactExports.useState((()=>E$2(bs)));return p$2((()=>{function Rs(){const js=E$2(bs);ws(js)}return Rs(),b$2(bs.registerUpdateListener((()=>{Rs()})),bs.registerEditableListener((()=>{Rs()})))}),[bs]),Es})(dn),xs=a$2();return ms?typeof ds=="function"?ds(xs):ds:null}function n$1(){return n$1=Object.assign?Object.assign.bind():function(ds){for(var dn=1;dn<arguments.length;dn++){var ms=arguments[dn];for(var xs in ms)Object.prototype.hasOwnProperty.call(ms,xs)&&(ds[xs]=ms[xs])}return ds},n$1.apply(this,arguments)}var d$1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function l$1({ariaActiveDescendant:ds,ariaAutoComplete:dn,ariaControls:ms,ariaDescribedBy:xs,ariaExpanded:bs,ariaLabel:Es,ariaLabelledBy:ws,ariaMultiline:Rs,ariaOwns:js,ariaRequired:Cs,autoCapitalize:As,className:ks,id:Os,role:Ms="textbox",spellCheck:Ds=!0,style:Ps,tabIndex:Ls,"data-testid":Bs,...Fs}
1441){const[Us]=o$5(),[Gs,Js]=reactExports.useState(!1),Ws=reactExports.useCallback((Zs=>{Zs&&Zs.ownerDocument&&Zs.ownerDocument.defaultView&&Us.setRootElement(Zs)}),[Us]);return d$1((()=>(Js(Us.isEditable()),Us.registerEditableListener((Zs=>{Js(Zs)})))),[Us]),reactExports.createElement("div",n$1({},Fs,{"aria-activedescendant":Gs?ds:void 0,"aria-autocomplete":Gs?dn:"none","aria-controls":Gs?ms:void 0,"aria-describedby":xs,"aria-expanded":Gs&&Ms==="combobox"?!!bs:void 0,"aria-label":Es,"aria-labelledby":ws,"aria-multiline":Rs,"aria-owns":Gs?js:void 0,"aria-readonly":!Gs||void 0,"aria-required":Cs,autoCapitalize:As,className:ks,contentEditable:Gs,"data-testid":Bs,id:Os,ref:Ws,role:Ms,spellCheck:Ds,style:Ps,tabIndex:Ls}))}const l=0,_$2=1,f=2,p$1=0,h=1,m$2=2,g$1=3,y$1=4;function S$1(ds,dn,ms,xs,bs){if(ds===null||ms.size===0&&xs.size===0&&!bs)return p$1;const Es=dn._selection,ws=ds._selection;if(bs)return h;if(!(ti(Es)&&ti(ws)&&ws.isCollapsed()&&Es.isCollapsed()))return p$1;const Rs=(function(Bs,Fs,Us){const Gs=Bs._nodeMap,Js=[];for(const Ws of Fs){const Zs=Gs.get(Ws);Zs!==void 0&&Js.push(Zs)}for(const[Ws,Zs]of Us){if(!Zs)continue;const Ys=Gs.get(Ws);Ys===void 0||ns(Ys)||Js.push(Ys)}return Js})(dn,ms,xs);if(Rs.length===0)return p$1;if(Rs.length>1){const Bs=dn._nodeMap,Fs=Bs.get(Es.anchor.key),Us=Bs.get(ws.anchor.key);return Fs&&Us&&!ds._nodeMap.has(Fs.__key)&&Ur(Fs)&&Fs.__text.length===1&&Es.anchor.offset===1?m$2:p$1}const js=Rs[0],Cs=ds._nodeMap.get(js.__key);if(!Ur(Cs)||!Ur(js)||Cs.__mode!==js.__mode)return p$1;const As=Cs.__text,ks=js.__text;if(As===ks)return p$1;const Os=Es.anchor,Ms=ws.anchor;if(Os.key!==Ms.key||Os.type!=="text")return p$1;const Ds=Os.offset,Ps=Ms.offset,Ls=ks.length-As.length;return Ls===1&&Ps===Ds-1?m$2:Ls===-1&&Ps===Ds+1?g$1:Ls===-1&&Ps===Ds?y$1:p$1}function k$2(ds,dn){let ms=Date.now(),xs=p$1;return(bs,Es,ws,Rs,js,Cs)=>{const As=Date.now();if(Cs.has("historic"))return xs=p$1,ms=As,f;const ks=S$1(bs,Es,Rs,js,ds.isComposing()),Os=(()=>{const Ms=ws===null||ws.editor===ds,Ds=Cs.has("history-push");if(!Ds&&Ms&&Cs.has("history-merge"))return l;if(bs===null)return _$2;const Ps=Es._selection;return Rs.size>0||js.size>0?Ds===!1&&ks!==p$1&&ks===xs&&As<ms+dn&&Ms||Rs.size===1&&(function(Ls,Bs,Fs){const Us=Bs._nodeMap.get(Ls),Gs=Fs._nodeMap.get(Ls),Js=Bs._selection,Ws=Fs._selection;let Zs=!1;return ti(Js)&&ti(Ws)&&(Zs=Js.anchor.type==="element"&&Js.focus.type==="element"&&Ws.anchor.type==="text"&&Ws.focus.type==="text"),!(Zs||!Ur(Us)||!Ur(Gs))&&Us.__type===Gs.__type&&Us.__text===Gs.__text&&Us.__mode===Gs.__mode&&Us.__detail===Gs.__detail&&Us.__style===Gs.__style&&Us.__format===Gs.__format&&Us.__parent===Gs.__parent})(Array.from(Rs)[0],bs,Es)?l:_$2:Ps!==null?l:f})();return ms=As,xs=ks,Os}}function C$1(ds){ds.undoStack=[],ds.redoStack=[],ds.current=null}function x$1(ds,dn,ms){const xs=k$2(ds,ms),bs=({editorState:Rs,prevEditorState:js,dirtyLeaves:Cs,dirtyElements:As,tags:ks})=>{const Os=dn.current,Ms=dn.redoStack,Ds=dn.undoStack,Ps=Os===null?null:Os.editorState;if(Os!==null&&Rs===Ps)return;const Ls=xs(js,Rs,Os,Cs,As,ks);if(Ls===_$2)Ms.length!==0&&(dn.redoStack=[],ds.dispatchCommand(K$2,!1)),Os!==null&&(Ds.push({...Os}),ds.dispatchCommand(J$3,!0));else if(Ls===f)return;dn.current={editor:ds,editorState:Rs}},Es=b$2(ds.registerCommand(h$2,(()=>((function(Rs,js){const Cs=js.redoStack,As=js.undoStack;if(As.length!==0){const ks=js.current,Os=As.pop();ks!==null&&(Cs.push(ks),Rs.dispatchCommand(K$2,!0)),As.length===0&&Rs.dispatchCommand(J$3,!1),js.current=Os||null,Os&&Os.editor.setEditorState(Os.editorState,{tag:"historic"})}})(ds,dn),!0)),as),ds.registerCommand(g$6,(()=>((function(Rs,js){const Cs=js.redoStack,As=js.undoStack;if(Cs.length!==0){const ks=js.current;ks!==null&&(As.push(ks),Rs.dispatchCommand(J$3,!0));const Os=Cs.pop();Cs.length===0&&Rs.dispatchCommand(K$2,!1),js.current=Os||null,Os&&Os.editor.setEditorState(Os.editorState,{tag:"historic"})}})(ds,dn),!0)),as),ds.registerCommand(B$4,(()=>(C$1(dn),!1)),as),ds.registerCommand(R$3,(()=>(C$1(dn),ds.dispatchCommand(K$2,!1),ds.dispatchCommand(J$3,!1),!0)),as),ds.registerUpdateListener(bs)),ws=ds.registerUpdateListener(bs);return()=>{Es(),ws()}}function M$2(){return{current:null,redoStack:[],undoStack:[]}}function c$1({externalHistoryState:ds}){const[dn]=o$5();return(function(ms,xs,bs=1e3){const Es=reactExports.useMemo((()=>xs||M$2()),[xs]);reactExports.useEffect((()=>
1441x$1(ms,Es,bs)),[bs,ms,Es])})(dn,ds),null}var o$2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function i({ignoreHistoryMergeTagChange:ds=!0,ignoreSelectionChange:dn=!1,onChange:ms}){const[xs]=o$5();return o$2((()=>{if(ms)return xs.registerUpdateListener((({editorState:bs,dirtyElements:Es,dirtyLeaves:ws,prevEditorState:Rs,tags:js})=>{dn&&Es.size===0&&ws.size===0||ds&&js.has("history-merge")||Rs.isEmpty()||ms(bs,xs,js)}))}),[xs,ds,dn,ms]),null}var p=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};function _$1(ds){let dn=1,ms=ds.getParent();for(;ms!=null;){if(I$1(ms)){const xs=ms.getParent();if(z$2(xs)){dn++,ms=xs.getParent();continue}p(40)}return dn}return dn}function m$1(ds){let dn=ds.getParent();z$2(dn)||p(40);let ms=dn;for(;ms!==null;)ms=ms.getParent(),z$2(ms)&&(dn=ms);return dn}function v(ds){let dn=[];const ms=ds.getChildren().filter(I$1);for(let xs=0;xs<ms.length;xs++){const bs=ms[xs],Es=bs.getFirstChild();z$2(Es)?dn=dn.concat(v(Es)):dn.push(bs)}return dn}function y(ds){return I$1(ds)&&z$2(ds.getFirstChild())}function C(ds){return D$2().append(ds)}function T(ds,dn){return I$1(ds)&&(dn.length===0||dn.length===1&&ds.is(dn[0])&&ds.getChildrenSize()===0)}function k$1(ds,dn){ds.update((()=>{const ms=pi();if(ms!==null){const xs=ms.getNodes();if(ti(ms)){const Es=ms.getStartEndPoints();Es===null&&p(143);const[ws]=Es,Rs=ws.getNode(),js=Rs.getParent();if(T(Rs,xs)){const Cs=J$2(dn);if(Ze$1(js)){Rs.replace(Cs);const As=D$2();Gi(Rs)&&(As.setFormat(Rs.getFormatType()),As.setIndent(Rs.getIndent())),Cs.append(As)}else if(I$1(Rs)){const As=Rs.getParentOrThrow();S(Cs,As.getChildren()),As.replace(Cs)}return}}const bs=new Set;for(let Es=0;Es<xs.length;Es++){const ws=xs[Es];if(!Gi(ws)||!ws.isEmpty()||I$1(ws)||bs.has(ws.getKey())){if(se$1(ws)){let Rs=ws.getParent();for(;Rs!=null;){const js=Rs.getKey();if(z$2(Rs)){if(!bs.has(js)){const Cs=J$2(dn);S(Cs,Rs.getChildren()),Rs.replace(Cs),bs.add(js)}break}{const Cs=Rs.getParent();if(Ze$1(Cs)&&!bs.has(js)){bs.add(js),b$1(Rs,dn);break}Rs=Cs}}}}else b$1(ws,dn)}}}))}function S(ds,dn){ds.splice(ds.getChildrenSize(),0,dn)}function b$1(ds,dn){if(z$2(ds))return ds;const ms=ds.getPreviousSibling(),xs=ds.getNextSibling(),bs=D$2();if(bs.setFormat(ds.getFormatType()),bs.setIndent(ds.getIndent()),S(bs,ds.getChildren()),z$2(ms)&&dn===ms.getListType())return ms.append(bs),ds.remove(),z$2(xs)&&dn===xs.getListType()&&(S(ms,xs.getChildren()),xs.remove()),ms;if(z$2(xs)&&dn===xs.getListType())return xs.getFirstChildOrThrow().insertBefore(bs),ds.remove(),xs;{const Es=J$2(dn);return Es.append(bs),ds.replace(Es),Es}}function P$1(ds,dn){const ms=ds.getLastChild(),xs=dn.getFirstChild();ms&&xs&&y(ms)&&y(xs)&&(P$1(ms.getFirstChild(),xs.getFirstChild()),xs.remove());const bs=dn.getChildren();bs.length>0&&ds.append(...bs),dn.remove()}function N$2(ds){ds.update((()=>{const dn=pi();if(ti(dn)){const ms=new Set,xs=dn.getNodes(),bs=dn.anchor.getNode();if(T(bs,xs))ms.add(m$1(bs));else for(let Es=0;Es<xs.length;Es++){const ws=xs[Es];if(se$1(ws)){const Rs=D$4(ws,E$1);Rs!=null&&ms.add(m$1(Rs))}}for(const Es of ms){let ws=Es;const Rs=v(Es);for(const js of Rs){const Cs=cs();S(Cs,js.getChildren()),ws.insertAfter(Cs),ws=Cs,js.__key===dn.anch
1441or.key&&dn.anchor.set(Cs.getKey(),0,"element"),js.__key===dn.focus.key&&dn.focus.set(Cs.getKey(),0,"element"),js.remove()}Es.remove()}}}))}function x(ds){const dn=new Set;if(y(ds)||dn.has(ds.getKey()))return;const ms=ds.getParent(),xs=ds.getNextSibling(),bs=ds.getPreviousSibling();if(y(xs)&&y(bs)){const Es=bs.getFirstChild();if(z$2(Es)){Es.append(ds);const ws=xs.getFirstChild();z$2(ws)&&(S(Es,ws.getChildren()),xs.remove(),dn.add(xs.getKey()))}}else if(y(xs)){const Es=xs.getFirstChild();if(z$2(Es)){const ws=Es.getFirstChild();ws!==null&&ws.insertBefore(ds)}}else if(y(bs)){const Es=bs.getFirstChild();z$2(Es)&&Es.append(ds)}else if(z$2(ms)){const Es=D$2(),ws=J$2(ms.getListType());Es.append(ws),ws.append(ds),bs?bs.insertAfter(Es):xs?xs.insertBefore(Es):ms.append(Es)}}function A$2(ds){if(y(ds))return;const dn=ds.getParent(),ms=dn?dn.getParent():void 0;if(z$2(ms?ms.getParent():void 0)&&I$1(ms)&&z$2(dn)){const xs=dn?dn.getFirstChild():void 0,bs=dn?dn.getLastChild():void 0;if(ds.is(xs))ms.insertBefore(ds),dn.isEmpty()&&ms.remove();else if(ds.is(bs))ms.insertAfter(ds),dn.isEmpty()&&ms.remove();else{const Es=dn.getListType(),ws=D$2(),Rs=J$2(Es);
1441ws.append(Rs),ds.getPreviousSiblings().forEach((As=>Rs.append(As)));const js=D$2(),Cs=J$2(Es);js.append(Cs),S(Cs,ds.getNextSiblings()),ms.insertBefore(ws),ms.insertAfter(js),ms.replace(ds)}}}function O$2(){const ds=pi();if(!ti(ds)||!ds.isCollapsed())return!1;const dn=ds.anchor.getNode();if(!I$1(dn)||dn.getChildrenSize()!==0)return!1;const ms=m$1(dn),xs=dn.getParent();z$2(xs)||p(40);const bs=xs.getParent();let Es;if(Ze$1(bs))Es=cs(),ms.insertAfter(Es);else{if(!I$1(bs))return!1;Es=D$2(),bs.insertAfter(Es)}Es.select();const ws=dn.getNextSiblings();if(ws.length>0){const Rs=J$2(xs.getListType());if(us(Es))Es.insertAfter(Rs);else{const js=D$2();js.append(Rs),Es.insertAfter(js)}ws.forEach((js=>{js.remove(),Rs.append(js)}))}return(function(Rs){let js=Rs;for(;js.getNextSibling()==null&&js.getPreviousSibling()==null;){const Cs=js.getParent();if(Cs==null||!I$1(js)&&!z$2(js))break;js=Cs}js.remove()})(dn),!0}function L$2(...ds){const dn=[];for(const ms of ds)if(ms&&typeof ms=="string")for(const[xs]of ms.matchAll(/\S+/g))dn.push(xs);return dn}let E$1=class v0 extends Zi{static getType(){return"listitem"}static clone(dn){return new v0(dn.__value,dn.__checked,dn.__key)}constructor(dn,ms,xs){super(xs),this.__value=dn===void 0?1:dn,this.__checked=ms}createDOM(dn){const ms=document.createElement("li"),xs=this.getParent();return z$2(xs)&&xs.getListType()==="check"&&w$1(ms,this,null),ms.value=this.__value,F$1(ms,dn.theme,this),ms}updateDOM(dn,ms,xs){const bs=this.getParent();return z$2(bs)&&bs.getListType()==="check"&&w$1(ms,this,dn),ms.value=this.__value,F$1(ms,xs.theme,this),!1}static transform(){return dn=>{if(I$1(dn)||p(144),dn.__checked==null)return;const ms=dn.getParent();z$2(ms)&&ms.getListType()!=="check"&&dn.getChecked()!=null&&dn.setChecked(void 0)}}static importDOM(){return{li:dn=>({conversion:M$1,priority:0})}}static importJSON(dn){const ms=D$2();return ms.setChecked(dn.checked),ms.setValue(dn.value),ms.setFormat(dn.format),ms.setDirection(dn.direction),ms}exportDOM(dn){const ms=this.createDOM(dn._config);return ms.style.textAlign=this.getFormatType(),{element:ms}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...dn){for(let ms=0;ms<dn.length;ms++){const xs=dn[ms];if(Gi(xs)&&this.canMergeWith(xs)){const bs=xs.getChildren();this.append(...bs),xs.remove()}else super.append(xs)}return this}replace(dn,ms){if(I$1(dn))return super.replace(dn);this.setIndent(0);const xs=this.getParentOrThrow();if(!z$2(xs))return dn;if(xs.__first===this.getKey())xs.insertBefore(dn);else if(xs.__last===this.getKey())xs.insertAfter(dn);else{const bs=J$2(xs.getListType());let Es=this.getNextSibling();for(;Es;){const ws=Es;Es=Es.getNextSibling(),bs.append(ws)}xs.insertAfter(dn),dn.insertAfter(bs)}
1441return ms&&(Gi(dn)||p(139),this.getChildren().forEach((bs=>{dn.append(bs)}))),this.remove(),xs.getChildrenSize()===0&&xs.remove(),dn}insertAfter(dn,ms=!0){const xs=this.getParentOrThrow();if(z$2(xs)||p(39),I$1(dn))return super.insertAfter(dn,ms);const bs=this.getNextSiblings();if(xs.insertAfter(dn,ms),bs.length!==0){const Es=J$2(xs.getListType());bs.forEach((ws=>Es.append(ws))),dn.insertAfter(Es,ms)}return dn}remove(dn){const ms=this.getPreviousSibling(),xs=this.getNextSibling();super.remove(dn),ms&&xs&&y(ms)&&y(xs)&&(P$1(ms.getFirstChild(),xs.getFirstChild()),xs.remove())}insertNewAfter(dn,ms=!0){const xs=D$2(this.__checked==null&&void 0);return this.insertAfter(xs,ms),xs}collapseAtStart(dn){const ms=cs();this.getChildren().forEach((ws=>ms.append(ws)));const xs=this.getParentOrThrow(),bs=xs.getParentOrThrow(),Es=I$1(bs);if(xs.getChildrenSize()===1)if(Es)xs.remove(),bs.select();else{xs.insertBefore(ms),xs.remove();const ws=dn.anchor,Rs=dn.focus,js=ms.getKey();ws.type==="element"&&ws.getNode().is(this)&&ws.set(js,ws.offset,"element"),Rs.type==="element"&&Rs.getNode().is(this)&&Rs.set(js,Rs.offset,"element")}else xs.insertBefore(ms),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(dn){this.getWritable().__value=dn}getChecked(){return this.getLatest().__checked}setChecked(dn){this.getWritable().__checked=dn}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const dn=this.getParent();if(dn===null)return this.getLatest().__indent;let ms=dn.getParentOrThrow(),xs=0;for(;I$1(ms);)ms=ms.getParentOrThrow().getParentOrThrow(),xs++;return xs}setIndent(dn){typeof dn=="number"&&dn>-1||p(117);let ms=this.getIndent();for(;ms!==dn;)ms<dn?(x(this),ms++):(A$2(this),ms--);return this}canInsertAfter(dn){return I$1(dn)}canReplaceWith(dn){return I$1(dn)}canMergeWith(dn){return us(dn)||I$1(dn)}extractWithChild(dn,ms){if(!ti(ms))return!1;const xs=ms.anchor.getNode(),bs=ms.focus.getNode();return this.isParentOf(xs)&&this.isParentOf(bs)&&this.getTextContent().length===ms.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return J$2("bullet")}};function F$1(ds,dn,ms){const xs=[],bs=[],Es=dn.list,ws=Es?Es.listitem:void 0;let Rs;if(Es&&Es.nested&&(Rs=Es.nested.listitem),ws!==void 0&&xs.push(...L$2(ws)),Es){const js=ms.getParent(),Cs=z$2(js)&&js.getListType()==="check",As=ms.getChecked();Cs&&!As||bs.push(Es.listitemUnchecked),Cs&&As||bs.push(Es.listitemChecked),Cs&&xs.push(As?Es.listitemChecked:Es.listitemUnchecked)}if(Rs!==void 0){const js=L$2(Rs);ms.getChildren().some((Cs=>z$2(Cs)))?xs.push(...js):bs.push(...js)}bs.length>0&&C$2(ds,...bs),xs.length>0&&B$3(ds,...xs)}function w$1(ds,dn,ms,xs){z$2(dn.getFirstChild())?(ds.removeAttribute("role"),ds.removeAttribute("tabIndex"),ds.removeAttribute("aria-checked")):(ds.setAttribute("role","checkbox"),ds.setAttribute("tabIndex","-1"),ms&&dn.__checked===ms.__checked||ds.setAttribute("aria-checked",dn.getChecked()?"true":"false"))}function M$1(ds){return{node:D$2(un(ds)&&ds.getAttribute("aria-checked")==="true")}}function D$2(ds){return tn(new E$1(void 0,ds))}function I$1(ds){return ds instanceof E$1}class R extends Zi{static getType(){return"list"}static clone(dn){const ms=dn.__listType||V$3[dn.__tag];return new R(ms,dn.__start,dn.__key)}constructor(dn,ms,xs){super(xs);const bs=V$3[dn]||dn;this.__listType=bs,this.__tag=bs==="number"?"ol":"ul",this.__start=ms}getTag(){return this.__tag}setListType(dn){const ms=this.getWritable();ms.__listType=dn,ms.__tag=dn==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(dn,ms){const xs=this.__tag,bs=document.createElement(xs);return this.__start!==1&&bs.setAttribute("start",String(this.__start)),bs.__lexicalListType=this.__listType,K$1(bs,dn.theme,this),bs}updateDOM(dn,ms,xs){return dn.__tag!==this.__tag||(K$1(ms,xs.theme,this),!1)}static transform(){return dn=>{if(!z$2(dn))throw Error("node is not a ListNode");(function(ms){const xs=ms.getNextSibling();z$2(xs)&&ms.getListType()===xs.getListType()&&P$1(ms,xs)})(dn),(function(ms){const xs=ms.getListType()!=="check";let bs=ms.getStart();for(const Es of ms.getChildren())I$1(Es)&&(Es.getValue()!==bs&&Es.setValue(bs),xs&&Es.getChecked()!=null&&Es.setChecked(void 0),z$2(Es.getFirstChild())||bs++)})(dn)}}
1441static importDOM(){return{ol:dn=>({conversion:W$1,priority:0}),ul:dn=>({conversion:W$1,priority:0})}}static importJSON(dn){const ms=J$2(dn.listType,dn.start);return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}exportDOM(dn){const{element:ms}=super.exportDOM(dn);return ms&&un(ms)&&(this.__start!==1&&ms.setAttribute("start",String(this.__start)),this.__listType==="check"&&ms.setAttribute("__lexicalListType","check")),{element:ms}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...dn){for(let ms=0;ms<dn.length;ms++){const xs=dn[ms];if(I$1(xs))super.append(xs);else{const bs=D$2();if(z$2(xs))bs.append(xs);else if(Gi(xs)){const Es=Jr(xs.getTextContent());bs.append(Es)}else bs.append(xs);super.append(bs)}}return this}extractWithChild(dn){return I$1(dn)}}function K$1(ds,dn,ms){const xs=[],bs=[],Es=dn.list;if(Es!==void 0){const ws=Es[`${ms.__tag}Depth`]||[],Rs=_$1(ms)-1,js=Rs%ws.length,Cs=ws[js],As=Es[ms.__tag];let ks;const Os=Es.nested,Ms=Es.checklist;if(Os!==void 0&&Os.list&&(ks=Os.list),As!==void 0&&xs.push(As),Ms!==void 0&&ms.__listType==="check"&&xs.push(Ms),Cs!==void 0){xs.push(...L$2(Cs));for(let Ds=0;Ds<ws.length;Ds++)Ds!==js&&bs.push(ms.__tag+Ds)}if(ks!==void 0){const Ds=L$2(ks);Rs>1?xs.push(...Ds):bs.push(...Ds)}}bs.length>0&&C$2(ds,...bs),xs.length>0&&B$3(ds,...xs)}function B$2(ds){const dn=[];for(let ms=0;ms<ds.length;ms++){const xs=ds[ms];if(I$1(xs)){dn.push(xs);const bs=xs.getChildren();bs.length>1&&bs.forEach((Es=>{z$2(Es)&&dn.push(C(Es))}))}else dn.push(C(xs))}return dn}function W$1(ds){const dn=ds.nodeName.toLowerCase();let ms=null;return dn==="ol"?ms=J$2("number",ds.start):dn==="ul"&&(ms=un(ds)&&ds.getAttribute("__lexicallisttype")==="check"?J$2("check"):J$2("bullet")),{after:B$2,node:ms}}const V$3={ol:"number",ul:"bullet"};function J$2(ds,dn=1){return tn(new R(ds,dn))}function z$2(ds){return ds instanceof R}const U$1=t$1(),$$1=t$1(),H$2=t$1();function u$1(){const[ds]=o$5();return reactExports.useEffect((()=>{if(!ds.hasNodes([R,E$1]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[ds]),(function(dn){reactExports.useEffect((()=>b$2(dn.registerCommand($$1,(()=>(k$1(dn,"number"),!0)),fs),dn.registerCommand(U$1,(()=>(k$1(dn,"bullet"),!0)),fs),dn.registerCommand(H$2,(()=>(N$2(dn),!0)),fs),dn.registerCommand(o$4,(()=>!!O$2()),fs))),[dn])})(ds),null}const o$1=new Set(["http:","https:","mailto:","sms:","tel:"]);class _ extends Zi{static getType(){return"link"}static clone(dn){return new _(dn.__url,{rel:dn.__rel,target:dn.__target,title:dn.__title},dn.__key)}constructor(dn,ms={},xs){super(xs);const{target:bs=null,rel:Es=null,title:ws=null}=ms;this.__url=dn,this.__target=bs,this.__rel=Es,this.__title=ws}createDOM(dn){const ms=document.createElement("a");return ms.href=this.sanitizeUrl(this.__url),this.__target!==null&&(ms.target=this.__target),this.__rel!==null&&(ms.rel=this.__rel),this.__title!==null&&(ms.title=this.__title),B$3(ms,dn.theme.link),ms}updateDOM(dn,ms,xs){const bs=this.__url,Es=this.__target,ws=this.__rel,Rs=this.__title;return bs!==dn.__url&&(ms.href=bs),Es!==dn.__target&&(Es?ms.target=Es:ms.removeAttribute("target")),ws!==dn.__rel&&(ws?ms.rel=ws:ms.removeAttribute("rel")),Rs!==dn.__title&&(Rs?ms.title=Rs:ms.removeAttribute("title")),!1}static importDOM(){return{a:dn=>({conversion:a,priority:1})}}static importJSON(dn){const ms=g(dn.url,{rel:dn.rel,target:dn.target,title:dn.title});return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}sanitizeUrl(dn){try{const ms=new URL(dn);if(!o$1.has(ms.protocol))return"about:blank"}catch{return dn}return dn}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(dn){this.getWritable().__url=dn}getTarget(){return this.getLatest().__target}setTarget(dn){this.getWritable().__target=dn}getRel(){return this.getLatest().__rel}setRel(dn){this.getWritable().__rel=dn}getTitle(){return this.getLatest().__title}setTitle(dn){this.getWritable().__title=dn}insertNewAfter(dn,ms=!0){const xs=g(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(xs,ms),xs}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(dn,ms,xs){if(!ti(ms))return!1;const bs=ms.anchor.getNode(),Es=ms.focus.getNode();return this.isParentOf(bs)&&this.isParentOf(Es)&&ms.getTextContent().length>0}}function a(ds){let dn=null;if(cn$2(ds)){const ms=ds.textContent;(ms!==null&&ms!==""||ds.children.length>0)&&(dn=g(ds.getAttribute("href")||"",{rel:ds.getAttribute("rel"),target:ds.getAttribute("target"),title:ds.getAttribute("title")}))}return{node:dn}}function g(ds,dn){return tn(new _(ds,dn))}function c(ds){return ds instanceof _}const d=t$1();function m(ds,dn={}){const{target:ms,title:xs}=dn,bs=dn.rel===void 0?"noreferrer":dn.rel,Es=pi();if(!ti(Es))return;const ws=Es.extract();if(ds===null)ws.forEach((Rs=>{const js=Rs.getParent();if(c(js)){const Cs=js.getChildren();for(let As=0;As<Cs.length;As++)js.insertBefore(Cs[As]);js.remove()}}));else{if(ws.length===1){const Cs=(function(As,ks){let Os=As;for(;Os!==null&&Os.getParent()!==null&&!ks(Os);)Os=Os.getParentOrThrow();return ks(Os)?Os:null})(ws[0],c);if(Cs!==null)return Cs.setURL(ds),ms!==void 0&&Cs.setTarget(ms),bs!==null&&Cs.setRel(bs),void(xs!==void 0&&Cs.setTitle(xs))}let Rs=null,js=null;ws.forEach((Cs=>{const As=Cs.getParent();if(As!==js&&As!==null&&(!Gi(Cs)||Cs.isInline())){if(c(As))return js=As,As.setURL(ds),ms!==void 0&&As.setTarget(ms),bs!==null&&js.setRel(bs),void(xs!==void 0&&js.setTitle(xs));if(As.is(Rs)||(Rs=As,js=g(ds,{rel:bs,target:ms,title:xs}),c(As)?Cs.getPreviousSibling()===null?As.insertBefore(js):As.insertAfter(js):Cs.insertBefore(js)),c(Cs)){if(Cs.is(js))return;if(js!==null){const ks=Cs.getChildren();for(let Os=0;Os<ks.length;Os++)js.append(ks[Os])}Cs.remove()}else js!==null&&js.append(Cs)}}))}}function u({validateUrl:ds}){const[dn]=o$5();return reactExports.useEffect((()=>
1441{if(!dn.hasNodes([_]))throw new Error("LinkPlugin: LinkNode not registered on editor");return b$2(dn.registerCommand(d,(ms=>{if(ms===null)return m(ms),!0;if(typeof ms=="string")return!(ds!==void 0&&!ds(ms))&&(m(ms),!0);{const{url:xs,target:bs,rel:Es,title:ws}=ms;return m(xs,{rel:Es,target:bs,title:ws}),!0}}),fs),ds!==void 0?dn.registerCommand(c$5,(ms=>{const xs=pi();if(!ti(xs)||xs.isCollapsed()||!$$2(ms,ClipboardEvent))return!1;const bs=ms;if(bs.clipboardData===null)return!1;const Es=bs.clipboardData.getData("text");return!!ds(Es)&&!xs.getNodes().some((ws=>Gi(ws)))&&(dn.dispatchCommand(d,Es),ms.preventDefault(),!0)}),fs):()=>{})}),[dn,ds]),null}function e(ds,dn){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ms,xs){return ms.__proto__=xs,ms},e(ds,dn)}var t={error:null},o=(function(ds){var dn,ms;function xs(){for(var Es,ws=arguments.length,Rs=new Array(ws),js=0;js<ws;js++)Rs[js]=arguments[js];return(Es=ds.call.apply(ds,[this].concat(Rs))||this).state=t,Es.resetErrorBoundary=function(){for(var Cs,As=arguments.length,ks=new Array(As),Os=0;Os<As;Os++)ks[Os]=arguments[Os];Es.props.onReset==null||(Cs=Es.props).onReset.apply(Cs,ks),Es.reset()},Es}ms=ds,(dn=xs).prototype=Object.create(ms.prototype),dn.prototype.constructor=dn,e(dn,ms),xs.getDerivedStateFromError=function(Es){return{error:Es}};var bs=xs.prototype;return bs.reset=function(){this.setState(t)},bs.componentDidCatch=function(Es,ws){var Rs,js;(Rs=(js=this.props).onError)==null||Rs.call(js,Es,ws)},bs.componentDidUpdate=function(Es,ws){var Rs,js,Cs,As,ks=this.state.error,Os=this.props.resetKeys;ks!==null&&ws.error!==null&&((Cs=Es.resetKeys)===void 0&&(Cs=[]),(As=Os)===void 0&&(As=[]),Cs.length!==As.length||Cs.some((function(Ms,Ds){return!Object.is(Ms,As[Ds])})))&&((Rs=(js=this.props).onResetKeysChange)==null||Rs.call(js,Es.resetKeys,Os),this.reset())},bs.render=function(){var Es=this.state.error,ws=this.props,Rs=ws.fallbackRender,js=ws.FallbackComponent,Cs=ws.fallback;if(Es!==null){var As={error:Es,resetErrorBoundary:this.resetErrorBoundary};if(reactExports.isValidElement(Cs))return Cs;if(typeof Rs=="function")return Rs(As);if(js)return reactExports.createElement(js,As);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},xs})(reactExports.Component);function n({children:ds,onError:dn}){return reactExports.createElement(o,{fallback:reactExports.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:dn},ds)}var prism={exports:{}},hasRequiredPrism;function requirePrism(){return hasRequiredPrism||(hasRequiredPrism=1,(function(ds){var dn=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var ms=(function(xs){var bs=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,Es=0,ws={},Rs={manual:xs.Prism&&xs.Prism.manual,disableWorkerMessageHandler:xs.Prism&&xs.Prism.disableWorkerMessageHandler,util:{encode:function Fs(Us){return Us instanceof js?new js(Us.type,Fs(Us.content),Us.alias):Array.isArray(Us)?Us.map(Fs):Us.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(Fs){return Object.prototype.toString.call(Fs).slice(8,-1)},objId:function(Fs){return Fs.__id||Object.defineProperty(Fs,"__id",{value:++Es}),Fs.__id},clone:function Fs(Us,Gs){Gs=Gs||{};var Js,Ws;switch(Rs.util.type(Us)){case"Object":if(Ws=Rs.util.objId(Us),Gs[Ws])return Gs[Ws];Js={},Gs[Ws]=Js;for(var Zs in Us)Us.hasOwnProperty(Zs)&&(Js[Zs]=Fs(Us[Zs],Gs));return Js;case"Array":return Ws=Rs.util.objId(Us),Gs[Ws]?Gs[Ws]:(Js=[],Gs[Ws]=Js,Us.forEach(function(Ys,Qs){Js[Qs]=Fs(Ys,Gs)}),Js);default:return Us}},getLanguage:function(Fs){for(;Fs;){var Us=bs.exec(Fs.className);if(Us)return Us[1].toLowerCase();Fs=Fs.parentElement}return"none"},setLanguage:function(Fs,Us){Fs.className=Fs.className.replace(RegExp(bs,"gi"),""),Fs.classList.add("language-"+Us)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(Js){var Fs=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Js.stack)||[])[1];if(Fs){var Us=document.getElementsByTagName("script");for(var Gs in Us)if(Us[Gs].src==Fs)return Us[Gs]}return null}},isActive:function(Fs,Us,Gs){for(var Js="no-"+Us;Fs;){var Ws=Fs.classList;if(Ws.contains(Us))return!0;
vendor: 4,348 bytes, line 1441
1441if(Ws.contains(Js))return!1;Fs=Fs.parentElement}return!!Gs}},languages:{plain:ws,plaintext:ws,text:ws,txt:ws,extend:function(Fs,Us){var Gs=Rs.util.clone(Rs.languages[Fs]);for(var Js in Us)Gs[Js]=Us[Js];return Gs},insertBefore:function(Fs,Us,Gs,Js){Js=Js||Rs.languages;var Ws=Js[Fs],Zs={};for(var Ys in Ws)if(Ws.hasOwnProperty(Ys)){if(Ys==Us)for(var Qs in Gs)Gs.hasOwnProperty(Qs)&&(Zs[Qs]=Gs[Qs]);Gs.hasOwnProperty(Ys)||(Zs[Ys]=Ws[Ys])}var ai=Js[Fs];return Js[Fs]=Zs,Rs.languages.DFS(Rs.languages,function(ia,ca){ca===ai&&ia!=Fs&&(this[ia]=Zs)}),Zs},DFS:function Fs(Us,Gs,Js,Ws){Ws=Ws||{};var Zs=Rs.util.objId;for(var Ys in Us)if(Us.hasOwnProperty(Ys)){Gs.call(Us,Ys,Us[Ys],Js||Ys);var Qs=Us[Ys],ai=Rs.util.type(Qs);ai==="Object"&&!Ws[Zs(Qs)]?(Ws[Zs(Qs)]=!0,Fs(Qs,Gs,null,Ws)):ai==="Array"&&!Ws[Zs(Qs)]&&(Ws[Zs(Qs)]=!0,Fs(Qs,Gs,Ys,Ws))}}},plugins:{},highlightAll:function(Fs,Us){Rs.highlightAllUnder(document,Fs,Us)},highlightAllUnder:function(Fs,Us,Gs){var Js={callback:Gs,container:Fs,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};Rs.hooks.run("before-highlightall",Js),Js.elements=Array.prototype.slice.apply(Js.container.querySelectorAll(Js.selector)),Rs.hooks.run("before-all-elements-highlight",Js);for(var Ws=0,Zs;Zs=Js.elements[Ws++];)Rs.highlightElement(Zs,Us===!0,Js.callback)},highlightElement:function(Fs,Us,Gs){var Js=Rs.util.getLanguage(Fs),Ws=Rs.languages[Js];Rs.util.setLanguage(Fs,Js);var Zs=Fs.parentElement;Zs&&Zs.nodeName.toLowerCase()==="pre"&&Rs.util.setLanguage(Zs,Js);var Ys=Fs.textContent,Qs={element:Fs,language:Js,grammar:Ws,code:Ys};function ai(ca){Qs.highlightedCode=ca,Rs.hooks.run("before-insert",Qs),Qs.element.innerHTML=Qs.highlightedCode,Rs.hooks.run("after-highlight",Qs),Rs.hooks.run("complete",Qs),Gs&&Gs.call(Qs.element)}if(Rs.hooks.run("before-sanity-check",Qs),Zs=Qs.element.parentElement,Zs&&Zs.nodeName.toLowerCase()==="pre"&&!Zs.hasAttribute("tabindex")&&Zs.setAttribute("tabindex","0"),!Qs.code){Rs.hooks.run("complete",Qs),Gs&&Gs.call(Qs.element);return}if(Rs.hooks.run("before-highlight",Qs),!Qs.grammar){ai(Rs.util.encode(Qs.code));return}if(Us&&xs.Worker){var ia=new Worker(Rs.filename);ia.onmessage=function(ca){ai(ca.data)},ia.postMessage(JSON.stringify({language:Qs.language,code:Qs.code,immediateClose:!0}))}else ai(Rs.highlight(Qs.code,Qs.grammar,Qs.language))},highlight:function(Fs,Us,Gs){var Js={code:Fs,grammar:Us,language:Gs};if(Rs.hooks.run("before-tokenize",Js),!Js.grammar)throw new Error('The language "'+Js.language+'" has no grammar.');return Js.tokens=Rs.tokenize(Js.code,Js.grammar),Rs.hooks.run("after-tokenize",Js),js.stringify(Rs.util.encode(Js.tokens),Js.language)},tokenize:function(Fs,Us){var Gs=Us.rest;if(Gs){for(var Js in Gs)Us[Js]=Gs[Js];delete Us.rest}var Ws=new ks;return Os(Ws,Ws.head,Fs),As(Fs,Ws,Us,Ws.head,0),Ds(Ws)},hooks:{all:{},add:function(Fs,Us){var Gs=Rs.hooks.all;Gs[Fs]=Gs[Fs]||[],Gs[Fs].push(Us)},run:function(Fs,Us){var Gs=Rs.hooks.all[Fs];if(!(!Gs||!Gs.length))for(var Js=0,Ws;Ws=Gs[Js++];)Ws(Us)}},Token:js};xs.Prism=Rs;function js(Fs,Us,Gs,Js){this.type=Fs,this.content=Us,this.alias=Gs,this.length=(Js||"").length|0}js.stringify=function Fs(Us,Gs){if(typeof Us=="string")return Us;if(Array.isArray(Us)){var Js="";return Us.forEach(function(ai){Js+=Fs(ai,Gs)}),Js}var Ws={type:Us.type,content:Fs(Us.content,Gs),tag:"span",classes:["token",Us.type],attributes:{},language:Gs},Zs=Us.alias;Zs&&(Array.isArray(Zs)?Array.prototype.push.apply(Ws.classes,Zs):Ws.classes.push(Zs)),Rs.hooks.run("wrap",Ws);var Ys="";for(var Qs in Ws.attributes)Ys+=" "+Qs+'="'+(Ws.attributes[Qs]||"").replace(/"/g,"&quot;")+'"';return"<"+Ws.tag+' class="'+Ws.classes.join(" ")+'"'+Ys+">"+Ws.content+"</"+Ws.tag+">"};function Cs(Fs,Us,Gs,Js){Fs.lastIndex=Us;var Ws=Fs.exec(Gs);if(Ws&&Js&&Ws[1]){var Zs=Ws[1].length;Ws.index+=Zs,Ws[0]=Ws[0].slice(Zs)}return Ws}function As(Fs,Us,Gs,Js,Ws,Zs){for(var Ys in Gs)if(!(!Gs.hasOwnProperty(Ys)||!Gs[Ys])){var Qs=Gs[Ys];Qs=Array.isArray(Qs)?Qs:[Qs];for(var ai=0;ai<Qs.length;++ai){if(Zs&&Zs.cause==Ys+","+ai)return;var ia=Qs[ai],ca=ia.inside,ha=!!ia.lookbehind,ea=!!ia.greedy,ta=ia.alias;if(ea&&!ia.pattern.global){var aa=ia.pattern.toString().match(/[imsuy]*$/)[0];ia.pattern=RegExp(ia.pattern.source,aa+"g")}for(var fa=ia.pattern||ia,ua=Js.next,Ea=Ws;ua!==Us.tail&&!(Zs&&Ea>
vendor: 4,354 bytes, line 1441
1441=Zs.reach);Ea+=ua.value.length,ua=ua.next){var ra=ua.value;if(Us.length>Fs.length)return;if(!(ra instanceof js)){var Ia=1,$a;if(ea){if($a=Cs(fa,Ea,Fs,ha),!$a||$a.index>=Fs.length)break;var _a=$a.index,oa=$a.index+$a[0].length,sa=Ea;for(sa+=ua.value.length;_a>=sa;)ua=ua.next,sa+=ua.value.length;if(sa-=ua.value.length,Ea=sa,ua.value instanceof js)continue;for(var Ra=ua;Ra!==Us.tail&&(sa<oa||typeof Ra.value=="string");Ra=Ra.next)Ia++,sa+=Ra.value.length;Ia--,ra=Fs.slice(Ea,sa),$a.index-=Ea}else if($a=Cs(fa,0,ra,ha),!$a)continue;var _a=$a.index,Oa=$a[0],za=ra.slice(0,_a),Ga=ra.slice(_a+Oa.length),qa=Ea+ra.length;Zs&&qa>Zs.reach&&(Zs.reach=qa);var Ma=ua.prev;za&&(Ma=Os(Us,Ma,za),Ea+=za.length),Ms(Us,Ma,Ia);var Fa=new js(Ys,ca?Rs.tokenize(Oa,ca):Oa,ta,Oa);if(ua=Os(Us,Ma,Fa),Ga&&Os(Us,ua,Ga),Ia>1){var Ka={cause:Ys+","+ai,reach:qa};As(Fs,Us,Gs,ua.prev,Ea,Ka),Zs&&Ka.reach>Zs.reach&&(Zs.reach=Ka.reach)}}}}}}function ks(){var Fs={value:null,prev:null,next:null},Us={value:null,prev:Fs,next:null};Fs.next=Us,this.head=Fs,this.tail=Us,this.length=0}function Os(Fs,Us,Gs){var Js=Us.next,Ws={value:Gs,prev:Us,next:Js};return Us.next=Ws,Js.prev=Ws,Fs.length++,Ws}function Ms(Fs,Us,Gs){for(var Js=Us.next,Ws=0;Ws<Gs&&Js!==Fs.tail;Ws++)Js=Js.next;Us.next=Js,Js.prev=Us,Fs.length-=Ws}function Ds(Fs){for(var Us=[],Gs=Fs.head.next;Gs!==Fs.tail;)Us.push(Gs.value),Gs=Gs.next;return Us}if(!xs.document)return xs.addEventListener&&(Rs.disableWorkerMessageHandler||xs.addEventListener("message",function(Fs){var Us=JSON.parse(Fs.data),Gs=Us.language,Js=Us.code,Ws=Us.immediateClose;xs.postMessage(Rs.highlight(Js,Rs.languages[Gs],Gs)),Ws&&xs.close()},!1)),Rs;var Ps=Rs.util.currentScript();Ps&&(Rs.filename=Ps.src,Ps.hasAttribute("data-manual")&&(Rs.manual=!0));function Ls(){Rs.manual||Rs.highlightAll()}if(!Rs.manual){var Bs=document.readyState;Bs==="loading"||Bs==="interactive"&&Ps&&Ps.defer?document.addEventListener("DOMContentLoaded",Ls):window.requestAnimationFrame?window.requestAnimationFrame(Ls):window.setTimeout(Ls,16)}return Rs})(dn);ds.exports&&(ds.exports=ms),typeof commonjsGlobal<"u"&&(commonjsGlobal.Prism=ms),ms.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ms.languages.markup.tag.inside["attr-value"].inside.entity=ms.languages.markup.entity,ms.languages.markup.doctype.inside["internal-subset"].inside=ms.languages.markup,ms.hooks.add("wrap",function(xs){xs.type==="entity"&&(xs.attributes.title=xs.content.replace(/&amp;/,"&"))}),Object.defineProperty(ms.languages.markup.tag,"addInlined",{value:function(bs,Es){var ws={};ws["language-"+Es]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ms.languages[Es]},ws.cdata=/^<!\[CDATA\[|\]\]>$/i;var Rs={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:ws}};Rs["language-"+Es]={pattern:/[\s\S]+/,inside:ms.languages[Es]};var js={};js[bs]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return bs}),"i"),lookbehind:!0,greedy:!0,inside:Rs},ms.languages.insertBefore("markup","cdata",js)}}),Object.defineProperty(ms.languages.markup.tag,"addAttribute",{value:function(xs,bs){ms.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+xs+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\
1441s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[bs,"language-"+bs],inside:ms.languages[bs]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ms.languages.html=ms.languages.markup,ms.languages.mathml=ms.languages.markup,ms.languages.svg=ms.languages.markup,ms.languages.xml=ms.languages.extend("markup",{}),ms.languages.ssml=ms.languages.xml,ms.languages.atom=ms.languages.xml,ms.languages.rss=ms.languages.xml,(function(xs){var bs=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;xs.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+bs.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+bs.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+bs.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+bs.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:bs,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},xs.languages.css.atrule.inside.rest=xs.languages.css;var Es=xs.languages.markup;Es&&(Es.tag.addInlined("style","css"),Es.tag.addAttribute("style","css"))})(ms),ms.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ms.languages.javascript=ms.languages.extend("clike",{"class-name":[ms.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ms.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ms.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}
vendor: 5,340 bytes, lines 1441-1442
1441/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ms.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ms.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ms.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ms.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ms.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ms.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ms.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ms.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ms.languages.markup&&(ms.languages.markup.tag.addInlined("script","javascript"),ms.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ms.languages.js=ms.languages.javascript,(function(){if(typeof ms>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var xs="Loading…",bs=function(Ps,Ls){return"✖ Error "+Ps+" while fetching file: "+Ls},Es="✖ Error: File does not exist or is empty",ws={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},Rs="data-src-status",js="loading",Cs="loaded",As="failed",ks="pre[data-src]:not(["+Rs+'="'+Cs+'"]):not(['+Rs+'="'+js+'"])';function Os(Ps,Ls,Bs){var Fs=new XMLHttpRequest;Fs.open("GET",Ps,!0),Fs.onreadystatechange=function(){Fs.readyState==4&&(Fs.status<400&&Fs.responseText?Ls(Fs.responseText):Fs.status>=400?Bs(bs(Fs.status,Fs.statusText)):Bs(Es))},Fs.send(null)}function Ms(Ps){var Ls=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(Ps||"");if(Ls){var Bs=Number(Ls[1]),Fs=Ls[2],Us=Ls[3];return Fs?Us?[Bs,Number(Us)]:[Bs,void 0]:[Bs,Bs]}}ms.hooks.add("before-highlightall",function(Ps){Ps.selector+=", "+ks}),ms.hooks.add("before-sanity-check",function(Ps){var Ls=Ps.element;if(Ls.matches(ks)){Ps.code="",Ls.setAttribute(Rs,js);var Bs=Ls.appendChild(document.createElement("CODE"));Bs.textContent=xs;var Fs=Ls.getAttribute("data-src"),Us=Ps.language;if(Us==="none"){var Gs=(/\.(\w+)$/.exec(Fs)||[,"none"])[1];Us=ws[Gs]||Gs}ms.util.setLanguage(Bs,Us),ms.util.setLanguage(Ls,Us);var Js=ms.plugins.autoloader;Js&&Js.loadLanguages(Us),Os(Fs,function(Ws){Ls.setAttribute(Rs,Cs);var Zs=Ms(Ls.getAttribute("data-range"));if(Zs){var Ys=Ws.split(/\r\n?|\n/g),Qs=Zs[0],ai=Zs[1]==null?Ys.length:Zs[1];Qs<0&&(Qs+=Ys.length),Qs=Math.max(0,Math.min(Qs-1,Ys.length)),ai<0&&(ai+=Ys.length),ai=Math.max(0,Math.min(ai,Ys.length)),Ws=Ys.slice(Qs,ai).join(`
1442`),Ls.hasAttribute("data-start")||Ls.setAttribute("data-start",String(Qs+1))}Bs.textContent=Ws,ms.highlightElement(Bs)},function(Ws){Ls.setAttribute(Rs,As),Bs.textContent=Ws})}}),ms.plugins.fileHighlight={highlight:function(Ls){for(var Bs=(Ls||document).querySelectorAll(ks),Fs=0,Us;Us=Bs[Fs++];)ms.highlightElement(Us)}};var Ds=!1;ms.fileHighlight=function(){Ds||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),Ds=!0),ms.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(prism)),prism.exports}requirePrism();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
1442],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2}
1442)*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(ds){ds.type==="entity"&&(ds.attributes.title=ds.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function ds(dn,ms){var xs={};xs["language-"+ms]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[ms]},xs.cdata=/^<!\[CDATA\[|\]\]>$/i;var bs={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:xs}};bs["language-"+ms]={pattern:/[\s\S]+/,inside:Prism.languages[ms]};var Es={};Es[dn]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return dn}),"i"),lookbehind:!0,greedy:!0,inside:bs},Prism.languages.insertBefore("markup","cdata",Es)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(ds,dn){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+ds+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[dn,"language-"+dn],inside:Prism.languages[dn]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(ds){var dn=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function ms(As){return As=As.replace(/<inner>/g,function(){return dn}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+As+")")}var xs=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,bs=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return xs}),Es=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;ds.languages.markdown=ds.languages.extend("markup",{}),ds.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:ds.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+bs+Es+"(?:"+bs+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+bs+Es+")(?:"+bs+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(xs),inside:ds.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+bs+")"+Es+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+bs+"$"),inside:{"table-header":{pattern:RegExp(xs),alias:"important",inside:ds.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}
vendor: 6,293 bytes, line 1442
1442|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:ms(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:ms(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:ms(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:ms(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(As){["url","bold","italic","strike","code-snippet"].forEach(function(ks){As!==ks&&(ds.languages.markdown[As].inside.content.inside[ks]=ds.languages.markdown[ks])})}),ds.hooks.add("after-tokenize",function(As){if(As.language!=="markdown"&&As.language!=="md")return;function ks(Os){if(!(!Os||typeof Os=="string"))for(var Ms=0,Ds=Os.length;Ms<Ds;Ms++){var Ps=Os[Ms];if(Ps.type!=="code"){ks(Ps.content);continue}var Ls=Ps.content[1],Bs=Ps.content[3];if(Ls&&Bs&&Ls.type==="code-language"&&Bs.type==="code-block"&&typeof Ls.content=="string"){var Fs=Ls.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");Fs=(/[a-z][\w-]*/i.exec(Fs)||[""])[0].toLowerCase();var Us="language-"+Fs;Bs.alias?typeof Bs.alias=="string"?Bs.alias=[Bs.alias,Us]:Bs.alias.push(Us):Bs.alias=[Us]}}}ks(As.tokens)}),ds.hooks.add("wrap",function(As){if(As.type==="code-block"){for(var ks="",Os=0,Ms=As.classes.length;Os<Ms;Os++){var Ds=As.classes[Os],Ps=/language-(.+)/.exec(Ds);if(Ps){ks=Ps[1];break}}var Ls=ds.languages[ks];if(Ls)As.content=ds.highlight(Cs(As.content),Ls,ks);else if(ks&&ks!=="none"&&ds.plugins.autoloader){var Bs="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);As.attributes.id=Bs,ds.plugins.autoloader.loadLanguages(ks,function(){var Fs=document.getElementById(Bs);Fs&&(Fs.innerHTML=ds.highlight(Fs.textContent,ds.languages[ks],ks))})}}});var ws=RegExp(ds.languages.markup.tag.pattern.source,"gi"),Rs={amp:"&",lt:"<",gt:">",quot:'"'},js=String.fromCodePoint||String.fromCharCode;function Cs(As){var ks=As.replace(ws,"");return ks=ks.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(Os,Ms){if(Ms=Ms.toLowerCase(),Ms[0]==="#"){var Ds;return Ms[1]==="x"?Ds=parseInt(Ms.slice(2),16):Ds=Number(Ms.slice(1)),js(Ds)}else{var Ps=Rs[Ms];return Ps||Os}}),ks}ds.languages.md=ds.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(ds){var dn=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;ds.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+dn.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
vendor: 6,705 bytes, line 1442
1442*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+dn.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+dn.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+dn.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:dn,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},ds.languages.css.atrule.inside.rest=ds.languages.css;var ms=ds.languages.markup;ms&&(ms.tag.addInlined("style","css"),ms.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var prismPython={},hasRequiredPrismPython;function requirePrismPython(){return hasRequiredPrismPython||(hasRequiredPrismPython=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01
1442])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),prismPython}requirePrismPython();var prismRust={},hasRequiredPrismRust;function requirePrismRust(){return hasRequiredPrismRust||(hasRequiredPrismRust=1,(function(ds){for(var dn=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,ms=0;ms<2;ms++)dn=dn.replace(/<self>/g,function(){return dn});dn=dn.replace(/<self>/g,function(){return/[^\s\S]/.source}),ds.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+dn),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},ds.languages.rust["closure-params"].inside.rest=ds.languages.rust,ds.languages.rust.attribute.inside.string=ds.languages.rust.string})(Prism)),prismRust}requirePrismRust();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ 	]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]
1442*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(ds){ds.inside.interpolation.inside=Prism.languages.swift});var prismTypescript={},hasRequiredPrismTypescript;function requirePrismTypescript(){return hasRequiredPrismTypescript||(hasRequiredPrismTypescript=1,(function(ds){ds.languages.typescript=ds.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),ds.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete ds.languages.typescript.parameter,delete ds.languages.typescript["literal-property"];var dn=ds.languages.extend("typescript",{});delete dn["class-name"],ds.languages.typescript["class-name"].inside=dn,ds.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:dn}}}}),ds.languages.ts=ds.languages.typescript})(Prism)),prismTypescript}requirePrismTypescript();var prismJava={},hasRequiredPrismJava;function requirePrismJava(){return hasRequiredPrismJava||(hasRequiredPrismJava=1,(function(ds){var dn=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,ms=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,xs={pattern:RegExp(/(^|[^\w.])/.source+ms+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};ds.languages.java=ds.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[xs,{pattern:RegExp(/(^|[^\w.])/.source+ms+/[A-Z]\w*(?
1442=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:xs.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+ms+/[A-Z]\w*\b/.source),lookbehind:!0,inside:xs.inside}],keyword:dn,function:[ds.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),ds.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),ds.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":xs,keyword:dn,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+ms+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:xs.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+ms+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:xs.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return dn.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),prismJava}requirePrismJava();var prismCpp={},hasRequiredPrismCpp;function requirePrismCpp(){return hasRequiredPrismCpp||(hasRequiredPrismCpp=1,(function(ds){var dn=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,ms=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return dn.source});ds.languages.cpp=ds.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return dn.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:dn,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),ds.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return ms})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),ds.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:ds.languages.cpp}}}}),ds.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),ds.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:ds.languages.extend("cpp",{})}}),ds.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},ds.languages.cpp["base-clause"])})(Prism)),prismCpp}requirePrismCpp();const w=ds=>ds!=null&&window.Prism.languages.hasOwnProperty(ds)?ds:void 0;function k(ds,dn){for(const ms of ds.childNodes){if(un(ms)&&ms.tagName===dn)return!0;k(ms,dn)}return!1}const P="data-highlight-language";let L$1=class w0 extends Zi{static getType(){return"code"}static clone(dn){return new w0(dn.__language,dn.__key)}constructor(dn,ms){super(ms),this.__language=w(dn)}createDOM(dn){const ms=document.createElement("code");
1442B$3(ms,dn.theme.code),ms.setAttribute("spellcheck","false");const xs=this.getLanguage();return xs&&ms.setAttribute(P,xs),ms}updateDOM(dn,ms,xs){const bs=this.__language,Es=dn.__language;return bs?bs!==Es&&ms.setAttribute(P,bs):Es&&ms.removeAttribute(P),!1}exportDOM(dn){const ms=document.createElement("pre");B$3(ms,dn._config.theme.code),ms.setAttribute("spellcheck","false");const xs=this.getLanguage();return xs&&ms.setAttribute(P,xs),{element:ms}}static importDOM(){return{code:dn=>dn.textContent!=null&&(/\r?\n/.test(dn.textContent)||k(dn,"BR"))?{conversion:A$1,priority:1}:null,div:dn=>({conversion:D$1,priority:1}),pre:dn=>({conversion:A$1,priority:0}),table:dn=>F(dn)?{conversion:M,priority:3}:null,td:dn=>{const ms=dn,xs=ms.closest("table");return ms.classList.contains("js-file-line")?{conversion:z$1,priority:3}:xs&&F(xs)?{conversion:B$1,priority:3}:null},tr:dn=>{const ms=dn.closest("table");return ms&&F(ms)?{conversion:B$1,priority:3}:null}}}static importJSON(dn){const ms=E(dn.language);return ms.setFormat(dn.format),ms.setIndent(dn.indent),ms.setDirection(dn.direction),ms}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(dn,ms=!0){const xs=this.getChildren(),bs=xs.length;if(bs>=2&&xs[bs-1].getTextContent()===`
1443`&&xs[bs-2].getTextContent()===`
1444`&&dn.isCollapsed()&&dn.anchor.key===this.__key&&dn.anchor.offset===bs){xs[bs-1].remove(),xs[bs-2].remove();const js=cs();return this.insertAfter(js,ms),js}const{anchor:Es,focus:ws}=dn,Rs=(Es.isBefore(ws)?Es:ws).getNode();if(Ur(Rs)){let js=Y$2(Rs);const Cs=[];for(;;)if(Hr(js))Cs.push($r()),js=js.getNextSibling();else{if(!V$2(js))break;{let Ls=0;const Bs=js.getTextContent(),Fs=js.getTextContentSize();for(;Ls<Fs&&Bs[Ls]===" ";)Ls++;if(Ls!==0&&Cs.push(G$2(" ".repeat(Ls))),Ls!==Fs)break;js=js.getNextSibling()}}const As=Rs.splitText(Es.offset)[0],ks=Es.offset===0?0:1,Os=As.getIndexWithinParent()+ks,Ms=Rs.getParentOrThrow(),Ds=[kr(),...Cs];Ms.splice(Os,0,Ds);const Ps=Cs[Cs.length-1];Ps?Ps.select():Es.offset===0?As.selectPrevious():As.getNextSibling().selectNext(0,0)}if(O$1(Rs)){const{offset:js}=dn.anchor;Rs.splice(js,0,[kr()]),Rs.select(js+1,js+1)}return null}canIndent(){return!1}collapseAtStart(){const dn=cs();
1444return this.getChildren().forEach((ms=>dn.append(ms))),this.replace(dn),!0}setLanguage(dn){this.getWritable().__language=w(dn)}getLanguage(){return this.getLatest().__language}};function E(ds){return tn(new L$1(ds))}function O$1(ds){return ds instanceof L$1}function A$1(ds){let dn;return un(ds)&&(dn=ds.getAttribute(P)),{node:E(dn)}}function D$1(ds){const dn=ds,ms=H$1(dn);return ms||(function(xs){let bs=xs.parentElement;for(;bs!==null;){if(H$1(bs))return!0;bs=bs.parentElement}return!1})(dn)?{after:xs=>{const bs=ds.parentNode;return bs!=null&&ds!==bs.lastChild&&xs.push(kr()),xs},node:ms?E():null}:{node:null}}function M(){return{node:E()}}function B$1(){return{node:null}}function z$1(ds){const dn=ds;return{after:ms=>(dn.parentNode&&dn.parentNode.nextSibling&&ms.push(kr()),ms),node:null}}function H$1(ds){return ds.style.fontFamily.match("monospace")!==null}function F(ds){return ds.classList.contains("js-file-line-container")}let Q$2=class S0 extends Ir{constructor(dn,ms,xs){super(dn,xs),this.__highlightType=ms}static getType(){return"code-highlight"}static clone(dn){return new S0(dn.__text,dn.__highlightType||void 0,dn.__key)}getHighlightType(){return this.getLatest().__highlightType}canHaveFormat(){return!1}createDOM(dn){const ms=super.createDOM(dn),xs=X$2(dn.theme,this.__highlightType);return B$3(ms,xs),ms}updateDOM(dn,ms,xs){const bs=super.updateDOM(dn,ms,xs),Es=X$2(xs.theme,dn.__highlightType),ws=X$2(xs.theme,this.__highlightType);return Es!==ws&&(Es&&C$2(ms,Es),ws&&B$3(ms,ws)),bs}static importJSON(dn){const ms=G$2(dn.text,dn.highlightType);return ms.setFormat(dn.format),ms.setDetail(dn.detail),ms.setMode(dn.mode),ms.setStyle(dn.style),ms}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(dn){return this}isParentRequired(){return!0}createParentElementNode(){return E()}};function X$2(ds,dn){return dn&&ds&&ds.codeHighlight&&ds.codeHighlight[dn]}function G$2(ds,dn){return tn(new Q$2(ds,dn))}function V$2(ds){return ds instanceof Q$2}function Y$2(ds){let dn=ds,ms=ds;for(;V$2(ms)||Hr(ms);)dn=ms,ms=ms.getPreviousSibling();return dn}function L(ds,dn){const ms={};for(const xs of ds){const bs=dn(xs);ms[bs]?ms[bs].push(xs):ms[bs]=[xs]}return ms}function A(ds){const dn=L(ds,(ms=>ms.type));return{element:dn.element||[],textFormat:dn["text-format"]||[],textMatch:dn["text-match"]||[]}}const N$1=/[!-/:-@[-`{-~\s]/;function z(ds,dn,ms,xs){for(const bs of dn){const Es=bs.export(ds,(ws=>j$1(ws,ms,xs)));if(Es!=null)return Es}return Gi(ds)?j$1(ds,ms,xs):Yi(ds)?ds.getTextContent():null}function j$1(ds,dn,ms){const xs=[],bs=ds.getChildren();e:for(const Es of bs){for(const ws of ms){const Rs=ws.export(Es,(js=>j$1(js,dn,ms)),((js,Cs)=>B(js,Cs,dn)));if(Rs!=null){xs.push(Rs);continue e}}Cr(Es)?xs.push(`
1445`):Ur(Es)?xs.push(B(Es,Es.getTextContent(),dn)):Gi(Es)?xs.push(j$1(Es,dn,ms)):Yi(Es)&&xs.push(Es.getTextContent())}return xs.join("")}function B(ds,dn,ms){const xs=dn.trim();let bs=xs;const Es=new Set;for(const ws of ms){const Rs=ws.format[0],js=ws.tag;D(ds,Rs)&&!Es.has(Rs)&&(Es.add(Rs),D(I(ds,!0),Rs)||(bs=js+bs),D(I(ds,!1),Rs)||(bs+=js))}return dn.replace(xs,(()=>bs))}function I(ds,dn){let ms=dn?ds.getPreviousSibling():ds.getNextSibling();if(!ms){const xs=ds.getParentOrThrow();xs.isInline()&&(ms=dn?xs.getPreviousSibling():xs.getNextSibling())}for(;ms;){if(Gi(ms)){if(!ms.isInline())break;const xs=dn?ms.getLastDescendant():ms.getFirstDescendant();if(Ur(xs))return xs;ms=dn?ms.getPreviousSibling():ms.getNextSibling()}if(Ur(ms))return ms;if(!Gi(ms))return null}return null}function D(ds,dn){return Ur(ds)&&ds.hasFormat(dn)}const U=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,K=U&&"documentMode"in document?document.documentMode:null;U&&"InputEvent"in window&&!K&&new window.InputEvent("input");const O=U&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),V$1=U&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,W=U&&/^(?=.*Chrome).*/i.test(navigator.userAgent),q$1=U&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!W,G$1=/^\s{0,3}$/,H=/^```(\w{1,10})?\s?$/;function J$1(ds){const dn=A(ds),ms=(function(xs){const bs={},Es={},ws=[],Rs="(?<![\\\\])";for(const js of xs){const{tag:Cs}=js;bs[Cs]=js;const As=Cs.replace(/(\*|\^|\+)/g,"\\$1");ws.push(As),Es[Cs]=O||V$1||q$1?new RegExp(`(${As})(?![${As}\\s])(.*?[^${As}\\s])${As}(?!${As})`):new RegExp(`(?<![\\\\${As}])(${As})((\\\\${As})?.*?[^${As}\\s](\\\\${As})?)((?<!\\\\)|(?<=\\\\\\\\))(${As})(?![\\\\${As}])`)}return{fullMatchRegExpByTag:Es,openTagsRegExp:new RegExp((O||V$1||q$1?"":`${Rs}`)+"("+ws.join("|")+")","g"),transformersByTag:bs}})(dn.textFormat);return(xs,bs)=>{const Es=xs.split(`
1446`),ws=Es.length,Rs=bs||pe$1();Rs.clear();for(let Cs=0;Cs<ws;Cs++){const As=Es[Cs],[ks,Os]=Y$1(Es,Cs,Rs);ks==null?X$1(As,Rs,dn.element,ms,dn.textMatch):Cs=Os}const js=Rs.getChildren();for(const Cs of js)Q$1(Cs)&&Rs.getChildrenSize()>1&&Cs.remove();pi()!==null&&Rs.selectEnd()}}function Q$1(ds){if(!us(ds))return!1;const dn=ds.getFirstChild();return dn==null||ds.getChildrenSize()===1&&Ur(dn)&&G$1.test(dn.getTextContent())}function X$1(ds,dn,ms,xs,bs){const Es=ds.trim(),ws=Jr(Es),Rs=cs();Rs.append(ws),dn.append(Rs);for(const{regExp:js,replace:Cs}of ms){const As=ds.match(js);if(As){ws.setTextContent(ds.slice(As[0].length)),Cs(Rs,[ws],As,!0);break}}if(Z$1(ws,xs,bs),Rs.isAttached()&&Es.length>0){const js=Rs.getPreviousSibling();if(us(js)||vt$1(js)||z$2(js)){let Cs=js;if(z$2(js)){const As=js.getLastDescendant();Cs=As==null?null:I$2(As,I$1)}Cs!=null&&Cs.getTextContentSize()>0&&(Cs.splice(Cs.getChildrenSize(),0,[kr(),...Rs.getChildren()]),Rs.remove())}}}
1446function Y$1(ds,dn,ms){const xs=ds[dn].match(H);if(xs){let bs=dn;const Es=ds.length;for(;++bs<Es;)if(ds[bs].match(H)){const ws=E(xs[1]),Rs=Jr(ds.slice(dn+1,bs).join(`
1447`));return ws.append(Rs),ms.append(ws),[ws,bs]}}return[null,dn]}function Z$1(ds,dn,ms){const xs=ds.getTextContent(),bs=(function(Cs,As){const ks=Cs.match(As.openTagsRegExp);if(ks==null)return null;for(const Os of ks){const Ms=Os.replace(/^\s/,""),Ds=As.fullMatchRegExpByTag[Ms];if(Ds==null)continue;const Ps=Cs.match(Ds),Ls=As.transformersByTag[Ms];if(Ps!=null&&Ls!=null){if(Ls.intraword!==!1)return Ps;const{index:Bs=0}=Ps,Fs=Cs[Bs-1],Us=Cs[Bs+Ps[0].length];if((!Fs||N$1.test(Fs))&&(!Us||N$1.test(Us)))return Ps}}return null})(xs,dn);if(!bs)return void tt$1(ds,ms);let Es,ws,Rs;if(bs[0]===xs)Es=ds;else{const Cs=bs.index||0,As=Cs+bs[0].length;Cs===0?[Es,ws]=ds.splitText(As):[Rs,Es,ws]=ds.splitText(Cs,As)}Es.setTextContent(bs[2]);const js=dn.transformersByTag[bs[1]];if(js)for(const Cs of js.format)Es.hasFormat(Cs)||Es.toggleFormat(Cs);Es.hasFormat("code")||Z$1(Es,dn,ms),Rs&&Z$1(Rs,dn,ms),ws&&Z$1(ws,dn,ms)}function tt$1(ds,dn){let ms=ds;e:for(;ms;){for(const xs of dn){const bs=ms.getTextContent().match(xs.importRegExp);if(!bs)continue;const Es=bs.index||0,ws=Es+bs[0].length;let Rs,js;Es===0?[Rs,ms]=ms.splitText(ws):[,Rs,js]=ms.splitText(Es,ws),js&&tt$1(js,dn),xs.replace(Rs,bs);continue e}break}}const rt=ds=>(dn,ms,xs)=>{const bs=ds(xs);bs.append(...ms),dn.replace(bs),bs.select(0,0)},it=ds=>(dn,ms,xs)=>{const bs=dn.getPreviousSibling(),Es=dn.getNextSibling(),ws=D$2(ds==="check"?xs[3]==="x":void 0);if(z$2(Es)&&Es.getListType()===ds){const js=Es.getFirstChild();js!==null?js.insertBefore(ws):Es.append(ws),dn.remove()}else if(z$2(bs)&&bs.getListType()===ds)bs.append(ws),dn.remove();else{const js=J$2(ds,ds==="number"?Number(xs[2]):void 0);js.append(ws),dn.replace(js)}ws.append(...ms),ws.select(0,0);const Rs=(function(js){const Cs=js.match(/\t/g),As=js.match(/ /g);let ks=0;return Cs&&(ks+=Cs.length),As&&(ks+=Math.floor(As.length/4)),ks})(xs[1]);Rs&&ws.setIndent(Rs)},st=(ds,dn,ms)=>{const xs=[],bs=ds.getChildren();let Es=0;for(const ws of bs)if(I$1(ws)){if(ws.getChildrenSize()===1){const As=ws.getFirstChild();if(z$2(As)){xs.push(st(As,dn,ms+1));continue}}const Rs=" ".repeat(4*ms),js=ds.getListType(),Cs=js==="number"?`${ds.getStart()+Es}. `:js==="check"?`- [${ws.getChecked()?"x":" "}] `:"- ";xs.push(Rs+Cs+dn(ws)),Es++}return xs.join(`
1448`)},ct={dependencies:[Ct$1],export:(ds,dn)=>{if(!Et$1(ds))return null;const ms=Number(ds.getTag().slice(1));return"#".repeat(ms)+" "+dn(ds)},regExp:/^(#{1,6})\s/,replace:rt((ds=>{const dn="h"+ds[1].length;return wt$1(dn)})),type:"element"},lt={dependencies:[pt$1],export:(ds,dn)=>{if(!vt$1(ds))return null;const ms=dn(ds).split(`
1449`),xs=[];for(const bs of ms)xs.push("> "+bs);return xs.join(`
1450`)},regExp:/^>\s/,replace:(ds,dn,ms,xs)=>{if(xs){const Es=ds.getPreviousSibling();if(vt$1(Es))return Es.splice(Es.getChildrenSize(),0,[kr(),...dn]),Es.select(0,0),void ds.remove()}const bs=ht$1();bs.append(...dn),ds.replace(bs),bs.select(0,0)},type:"element"},at={dependencies:[L$1],export:ds=>{if(!O$1(ds))return null;const dn=ds.getTextContent();return"```"+(ds.getLanguage()||"")+(dn?`
1451`+dn:"")+"\n```"},regExp:/^```(\w{1,10})?\s/,replace:rt((ds=>E(ds?ds[1]:void 0))),type:"element"},ft={dependencies:[R,E$1],export:(ds,dn)=>z$2(ds)?st(ds,dn,0):null,regExp:/^(\s*)[-*+]\s/,replace:it("bullet"),type:"element"},gt={dependencies:[R,E$1],export:(ds,dn)=>z$2(ds)?st(ds,dn,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:it("number"),type:"element"},pt={format:["code"],tag:"`",type:"text-format"},dt={format:["highlight"],tag:"==",type:"text-format"},mt={format:["bold","italic"],tag:"***",type:"text-format"},ht={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},xt={format:["bold"],tag:"**",type:"text-format"},Tt={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Ct={format:["strikethrough"],tag:"~~",type:"text-format"},yt={format:["italic"],tag:"*",type:"text-format"},vt={format:["italic"],intraword:!1,tag:"_",type:"text-format"},wt={dependencies:[_],export:(ds,dn,ms)=>{if(!c(ds))return null;const xs=ds.getTitle(),bs=xs?`[${ds.getTextContent()}](${ds.getURL()} "${xs}")`:`[${ds.getTextContent()}](${ds.getURL()})`,Es=ds.getFirstChild();return ds.getChildrenSize()===1&&Ur(Es)?ms(Es,bs):bs},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(ds,dn)=>{const[,ms,xs,bs]=dn,Es=g(xs,{title:bs}),ws=Jr(ms);ws.setFormat(ds.getFormat()),Es.append(ws),ds.replace(Es)},trigger:")",type:"text-match"},St=[ct,lt,at,ft,gt],bt=[pt,mt,ht,xt,Tt,dt,yt,vt,Ct],Et=[wt],$t=[...St,...bt,...Et];function Ft(ds,dn=$t,ms){return J$1(dn)(ds,ms)}function Pt(ds=$t,dn){return(function(xs){const bs=A(xs),Es=bs.textFormat.filter((ws=>ws.format.length===1));return ws=>{const Rs=[],js=(ws||pe$1()).getChildren();for(const Cs of js){const As=z(Cs,bs.element,Es,bs.textMatch);As!=null&&Rs.push(As)}return Rs.join(`
1452
1453`)}})(ds)(dn)}const X=/^(\d+(?:\.\d+)?)px$/,Y={COLUMN:2,NO_STATUS:0,ROW:1};class J extends Zi{static getType(){return"tablecell"}static clone(dn){const ms=new J(dn.__headerState,dn.__colSpan,dn.__width,dn.__key);return ms.__rowSpan=dn.__rowSpan,ms.__backgroundColor=dn.__backgroundColor,ms}static importDOM(){return{td:dn=>({conversion:$,priority:0}),th:dn=>({conversion:$,priority:0})}}static importJSON(dn){const ms=dn.colSpan||1,xs=dn.rowSpan||1,bs=j(dn.headerState,ms,dn.width||void 0);return bs.__rowSpan=xs,bs.__backgroundColor=dn.backgroundColor||null,bs}constructor(dn=Y.NO_STATUS,ms=1,xs,bs){super(bs),this.__colSpan=ms,this.__rowSpan=1,this.__headerState=dn,this.__width=xs,this.__backgroundColor=null}createDOM(dn){const ms=document.createElement(this.getTag());return this.__width&&(ms.style.width=`${this.__width}px`),this.__colSpan>1&&(ms.colSpan=this.__colSpan),this.__rowSpan>1&&(ms.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(ms.style.backgroundColor=this.__backgroundColor),B$3(ms,dn.theme.tableCell,this.hasHeader()&&dn.theme.tableCellHeader),ms}exportDOM(dn){const{element:ms}=super.exportDOM(dn);if(ms){const xs=ms,bs=700,Es=this.getParentOrThrow().getChildrenSize();xs.style.border="1px solid black",this.__colSpan>1&&(xs.colSpan=this.__colSpan),this.__rowSpan>1&&(xs.rowSpan=this.__rowSpan),xs.style.width=`${this.getWidth()||Math.max(90,bs/Es)}px`,xs.style.verticalAlign="top",xs.style.textAlign="start";
1453const ws=this.getBackgroundColor();ws!==null?xs.style.backgroundColor=ws:this.hasHeader()&&(xs.style.backgroundColor="#f2f3f5")}return{element:ms}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth()}}getColSpan(){return this.__colSpan}setColSpan(dn){return this.getWritable().__colSpan=dn,this}getRowSpan(){return this.__rowSpan}setRowSpan(dn){return this.getWritable().__rowSpan=dn,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(dn){return this.getWritable().__headerState=dn,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(dn){return this.getWritable().__width=dn,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(dn){this.getWritable().__backgroundColor=dn}toggleHeaderStyle(dn){const ms=this.getWritable();return(ms.__headerState&dn)===dn?ms.__headerState-=dn:ms.__headerState+=dn,ms}hasHeaderState(dn){return(this.getHeaderStyles()&dn)===dn}hasHeader(){return this.getLatest().__headerState!==Y.NO_STATUS}updateDOM(dn){return dn.__headerState!==this.__headerState||dn.__width!==this.__width||dn.__colSpan!==this.__colSpan||dn.__rowSpan!==this.__rowSpan||dn.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function $(ds){const dn=ds,ms=ds.nodeName.toLowerCase();let xs;X.test(dn.style.width)&&(xs=parseFloat(dn.style.width));const bs=j(ms==="th"?Y.ROW:Y.NO_STATUS,dn.colSpan,xs);bs.__rowSpan=dn.rowSpan;const Es=dn.style.backgroundColor;Es!==""&&(bs.__backgroundColor=Es);const ws=dn.style,Rs=ws.fontWeight==="700"||ws.fontWeight==="bold",js=ws.textDecoration==="line-through",Cs=ws.fontStyle==="italic",As=ws.textDecoration==="underline";return{after:ks=>(ks.length===0&&ks.push(cs()),ks),forChild:(ks,Os)=>{if(q(Os)&&!Gi(ks)){const Ms=cs();return Cr(ks)&&ks.getTextContent()===`
1454`?null:(Ur(ks)&&(Rs&&ks.toggleFormat("bold"),js&&ks.toggleFormat("strikethrough"),Cs&&ks.toggleFormat("italic"),As&&ks.toggleFormat("underline")),Ms.append(ks),Ms)}return ks},node:bs}}function j(ds,dn=1,ms){return tn(new J(ds,dn,ms))}function q(ds){return ds instanceof J}const G=t$1();class Q extends Zi{static getType(){return"tablerow"}static clone(dn){return new Q(dn.__height,dn.__key)}static importDOM(){return{tr:dn=>({conversion:V,priority:0})}}static importJSON(dn){return Z(dn.height)}constructor(dn,ms){super(ms),this.__height=dn}exportJSON(){return{...super.exportJSON(),...this.getHeight()&&{height:this.getHeight()},type:"tablerow",version:1}}createDOM(dn){const ms=document.createElement("tr");return this.__height&&(ms.style.height=`${this.__height}px`),B$3(ms,dn.theme.tableRow),ms}isShadowRoot(){return!0}setHeight(dn){return this.getWritable().__height=dn,this.__height}getHeight(){return this.getLatest().__height}updateDOM(dn){return dn.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function V(ds){const dn=ds;let ms;return X.test(dn.style.height)&&(ms=parseFloat(dn.style.height)),{node:Z(ms)}}function Z(ds){return tn(new Q(ds))}function ee(ds){return ds instanceof Q}var te=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};const ne=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function oe(ds,dn,ms=!0){const xs=tt();for(let bs=0;bs<ds;bs++){const Es=Z();for(let ws=0;ws<dn;ws++){let Rs=Y.NO_STATUS;typeof ms=="object"?(bs===0&&ms.rows&&(Rs|=Y.ROW),ws===0&&ms.columns&&(Rs|=Y.COLUMN)):ms&&(bs===0&&(Rs|=Y.ROW),ws===0&&(Rs|=Y.COLUMN));const js=j(Rs),Cs=cs();Cs.append(Jr()),js.append(Cs),Es.append(js)}xs.append(Es)}return xs}function re(ds){const dn=I$2(ds,(ms=>q(ms)));return q(dn)?dn:null}function le(ds){const dn=I$2(ds,(ms=>ee(ms)));if(ee(dn))return dn;throw new Error("Expected table cell to be inside of table row.")}function se(ds){const dn=I$2(ds,(ms=>nt(ms)));if(nt(dn))return dn;throw new Error("Expected table cell to be inside of table.")}function ie(ds){const dn=le(ds);return se(dn).getChildren().findIndex((ms=>ms.is(dn)))}function ae(ds){return le(ds).getChildren().findIndex((dn=>dn.is(ds)))}function ce(ds,dn){const ms=se(ds),{x:xs,y:bs}=ms.getCordsFromCellNode(ds,dn);return{above:ms.getCellNodeFromCords(xs,bs-1,dn),below:ms.getCellNodeFromCords(xs,bs+1,dn),left:ms.getCellNodeFromCords(xs-1,bs,dn),right:ms.getCellNodeFromCords(xs+1,bs,dn)}}function he(ds,dn){const ms=ds.getChildren();if(dn>=ms.length||dn<0)throw new Error("Expected table cell to be inside of table row.");return ms[dn].remove(),ds}function de(ds,dn,ms=!0,xs,bs){const Es=ds.getChildren();if(dn>=Es.length||dn<0)throw new Error("Table row target index out of range");const ws=Es[dn];if(!ee(ws))throw new Error("Row before insertion index does not exist.");for(let Rs=0;Rs<xs;Rs++){const js=ws.getChildren(),Cs=js.length,As=Z();for(let ks=0;ks<Cs;ks++){const Os=js[ks];q(Os)||te(12);const{above:Ms,below:Ds}=ce(Os,bs);let Ps=Y.NO_STATUS;const Ls=Ms&&Ms.getWidth()||Ds&&Ds.getWidth()||void 0;(Ms&&Ms.hasHeaderState(Y.COLUMN)||Ds&&Ds.hasHeaderState(Y.COLUMN))&&(Ps|=Y.COLUMN);const Bs=j(Ps,1,Ls);Bs.append(cs()),As.append(Bs)}ms?ws.insertAfter(As):ws.insertBefore(As)}return ds}function fe(ds,dn,ms=!0,xs,bs){const Es=ds.getChildren(),ws=[];for(let Rs=0;Rs<Es.length;Rs++){const js=Es[Rs];if(ee(js))for(let Cs=0;Cs<xs;Cs++){const As=js.getChildren();if(dn>=As.length||dn<0)throw new Error("Table column target index out of range");const ks=As[dn];q(ks)||te(12);const{left:Os,right:Ms}=ce(ks,bs);let Ds=Y.NO_STATUS;(Os&&Os.hasHeaderState(Y.ROW)||Ms&&Ms.hasHeaderState(Y.ROW))&&(Ds|=Y.ROW);const Ps=j(Ds);Ps.append(cs()),ws.push({newTableCell:Ps,targetCell:ks})}}return ws.forEach((({newTableCell:Rs,targetCell:js})=>{ms?js.insertAfter(Rs):js.insertBefore(Rs)})),ds}function pe(ds,dn){const ms=ds.getChildren();for(let xs=0;xs<ms.length;xs++){const bs=ms[xs];if(ee(bs)){const Es=bs.getChildren();if(dn>=Es.length||dn<0)throw new Error("Table column target index out of range");Es[dn].remove()}}return ds}function ye(ds,dn,ms){const xs=[];let bs=null,Es=null;function ws(Cs,As,ks){const Os={cell:ks,startColumn:As,startRow:Cs},Ms=ks.__rowSpan,Ds=ks.__colSpan;for(let Ps=0;Ps<Ms;Ps++){xs[Cs+Ps]===void 0&&(xs[Cs+Ps]=[]);for(let Ls=0;Ls<Ds;Ls++)xs[Cs+Ps][As+Ls]=Os}dn.is(ks)&&(bs=Os),ms.is(ks)&&(Es=Os)}function Rs(Cs,As){return xs[Cs]===void 0||xs[Cs][As]===void 0}const js=ds.getChildren();for(let Cs=0;Cs<js.length;
1454Cs++){const As=js[Cs];ee(As)||te(146);const ks=As.getChildren();let Os=0;for(const Ms of ks){for(q(Ms)||te(147);!Rs(Cs,Os);)Os++;ws(Cs,Os,Ms),Os+=Ms.__colSpan}}return bs===null&&te(110),Es===null&&te(111),[xs,bs,Es]}function Ne(ds){let dn;if(ds instanceof J)dn=ds;else if("__type"in ds){const bs=I$2(ds,q);q(bs)||te(148),dn=bs}else{const bs=I$2(ds.getNode(),q);q(bs)||te(148),dn=bs}const ms=dn.getParent();ee(ms)||te(149);const xs=ms.getParent();return nt(xs)||te(150),[dn,ms,xs]}function xe(ds){const[dn,,ms]=Ne(ds),xs=ms.getChildren(),bs=xs.length,Es=xs[0].getChildren().length,ws=new Array(bs);for(let Rs=0;Rs<bs;Rs++)ws[Rs]=new Array(Es);for(let Rs=0;Rs<bs;Rs++){const js=xs[Rs].getChildren();let Cs=0;for(let As=0;As<js.length;As++){for(;ws[Rs][Cs];)Cs++;const ks=js[As],Os=ks.__rowSpan||1,Ms=ks.__colSpan||1;for(let Ds=0;Ds<Os;Ds++)for(let Ps=0;Ps<Ms;Ps++)ws[Rs+Ds][Cs+Ps]=ks;if(dn===ks)return{colSpan:Ms,columnIndex:Cs,rowIndex:Rs,rowSpan:Os};Cs+=Ms}}return null}class Te{constructor(dn,ms,xs){this.anchor=ms,this.focus=xs,ms._selection=this,xs._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=dn}getStartEndPoints(){return[this.anchor,this.focus]}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(dn){this._cachedNodes=dn}is(dn){return!!ve(dn)&&this.tableKey===dn.tableKey&&this.anchor.is(dn.anchor)&&this.focus.is(dn.focus)}set(dn,ms,xs){this.dirty=!0,this.tableKey=dn,this.anchor.key=ms,this.focus.key=xs,this._cachedNodes=null}clone(){return new Te(this.tableKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(dn){}insertText(){}insertNodes(dn){const ms=this.focus.getNode();Gi(ms)||te(151),qt(ms.select(0,ms.getChildrenSize())).insertNodes(dn)}getShape(){const dn=fe$1(this.anchor.key);q(dn)||te(152);const ms=xe(dn);ms===null&&te(153);const xs=fe$1(this.focus.key);q(xs)||te(154);const bs=xe(xs);bs===null&&te(155);const Es=Math.min(ms.columnIndex,bs.columnIndex),ws=Math.max(ms.columnIndex,bs.columnIndex),Rs=Math.min(ms.rowIndex,bs.rowIndex),js=Math.max(ms.rowIndex,bs.rowIndex);return{fromX:Math.min(Es,ws),fromY:Math.min(Rs,js),toX:Math.max(Es,ws),toY:Math.max(Rs,js)}}getNodes(){const dn=this._cachedNodes;if(dn!==null)return dn;const ms=this.anchor.getNode(),xs=this.focus.getNode(),bs=I$2(ms,q),Es=I$2(xs,q);q(bs)||te(152),q(Es)||te(154);const ws=bs.getParent();ee(ws)||te(156);const Rs=ws.getParent();nt(Rs)||te(157);const js=Es.getParents()[1];if(js!==Rs){if(Rs.isParentOf(Es)){const Zs=js.getParent();Zs==null&&te(159),this.set(this.tableKey,Es.getKey(),Zs.getKey())}else{const Zs=Rs.getParent();Zs==null&&te(158),this.set(this.tableKey,Zs.getKey(),Es.getKey())}return this.getNodes()}const[Cs,As,ks]=ye(Rs,bs,Es);let Os=Math.min(As.startColumn,ks.startColumn),Ms=Math.min(As.startRow,ks.startRow),Ds=Math.max(As.startColumn+As.cell.__colSpan-1,ks.startColumn+ks.cell.__colSpan-1),Ps=Math.max(As.startRow+As.cell.__rowSpan-1,ks.startRow+ks.cell.__rowSpan-1),Ls=Os,Bs=Ms,Fs=Os,Us=Ms;function Gs(Zs){const{cell:Ys,startColumn:Qs,startRow:ai}=Zs;Os=Math.min(Os,Qs),Ms=Math.min(Ms,ai),Ds=Math.max(Ds,Qs+Ys.__colSpan-1),Ps=Math.max(Ps,ai+Ys.__rowSpan-1)}for(;Os<Ls||Ms<Bs||Ds>Fs||Ps>Us;){if(Os<Ls){const Zs=Us-Bs,Ys=Ls-1;for(let Qs=0;Qs<=Zs;Qs++)Gs(Cs[Bs+Qs][Ys]);Ls=Ys}if(Ms<Bs){const Zs=Fs-Ls,Ys=Bs-1;for(let Qs=0;Qs<=Zs;Qs++)Gs(Cs[Ys][Ls+Qs]);Bs=Ys}if(Ds>Fs){const Zs=Us-Bs,Ys=Fs+1;for(let Qs=0;Qs<=Zs;Qs++)Gs(Cs[Bs+Qs][Ys]);Fs=Ys}if(Ps>Us){const Zs=Fs-Ls,Ys=Us+1;for(let Qs=0;Qs<=Zs;Qs++)Gs(Cs[Ys][Ls+Qs]);Us=Ys}}const Js=[Rs];let Ws=null;for(let Zs=Ms;Zs<=Ps;Zs++)for(let Ys=Os;Ys<=Ds;Ys++){const{cell:Qs}=Cs[Zs][Ys],ai=Qs.getParent();ee(ai)||te(160),ai!==Ws&&Js.push(ai),Js.push(Qs,...Oe(Qs)),Ws=ai}return Oi()||(this._cachedNodes=Js),Js}getTextContent(){const dn=this.getNodes();let ms="";for(let xs=0;xs<dn.length;xs++)ms+=dn[xs].getTextContent();return ms}}function ve(ds){return ds instanceof Te}function Ee(){const ds=qr("root",0,"element"),dn=qr("root",0,"element");return new Te("root",ds,dn)}function Oe(ds){const dn=[],ms=[ds];for(;ms.length>0;){const xs=ms.pop();xs===void 0&&te(112),Gi(xs)&&ms.unshift(...xs.getChildren()),xs!==ds&&dn.push(xs)}return dn}class Me{constructor(dn,ms){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=ms,this.editor=dn,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTable(),this.isSelecting=!1}getTable(){return this.table}removeListeners(){Array.from(this.listenersToRemove).forEach((dn=>dn()))}trackTable(){const dn=new MutationObserver((ms=>{this.editor.update((()=>{let xs=!1;for(let Es=0;
1454Es<ms.length;Es++){const ws=ms[Es].target.nodeName;if(ws==="TABLE"||ws==="TR"){xs=!0;break}}if(!xs)return;const bs=this.editor.getElementByKey(this.tableNodeKey);if(!bs)throw new Error("Expected to find TableElement in DOM");this.table=Pe(bs)}))}));this.editor.update((()=>{const ms=this.editor.getElementByKey(this.tableNodeKey);if(!ms)throw new Error("Expected to find TableElement in DOM");this.table=Pe(ms),dn.observe(ms,{childList:!0,subtree:!0})}))}clearHighlight(){const dn=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),dn.update((()=>{if(!nt(fe$1(this.tableNodeKey)))throw new Error("Expected TableNode.");const ms=dn.getElementByKey(this.tableNodeKey);if(!ms)throw new Error("Expected to find TableElement in DOM");const xs=Pe(ms);Ae(dn,xs,null),me(null),dn.dispatchCommand(e$1,void 0)}))}enableHighlightStyle(){const dn=this.editor;dn.update((()=>{const ms=dn.getElementByKey(this.tableNodeKey);if(!ms)throw new Error("Expected to find TableElement in DOM");C$2(ms,dn._config.theme.tableSelection),ms.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}))}disableHighlightStyle(){const dn=this.editor;dn.update((()=>{const ms=dn.getElementByKey(this.tableNodeKey);if(!ms)throw new Error("Expected to find TableElement in DOM");B$3(ms,dn._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}))}updateTableTableSelection(dn){if(dn!==null&&dn.tableKey===this.tableNodeKey){const ms=this.editor;this.tableSelection=dn,this.isHighlightingCells=!0,this.disableHighlightStyle(),Ae(ms,this.table,this.tableSelection)}else dn==null?this.clearHighlight():(this.tableNodeKey=dn.tableKey,this.updateTableTableSelection(dn))}setFocusCellForSelection(dn,ms=!1){const xs=this.editor;xs.update((()=>{const bs=fe$1(this.tableNodeKey);if(!nt(bs))throw new Error("Expected TableNode.");if(!xs.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const Es=dn.x,ws=dn.y;if(this.focusCell=dn,this.anchorCell!==null){const Rs=Ke(xs._window);Rs&&Rs.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===Es&&this.anchorY===ws&&!ms){if(Es===this.focusX&&ws===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();if(this.focusX=Es,this.focusY=ws,this.isHighlightingCells){const Rs=he$1(dn.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null&&q(Rs)&&bs.is($e(Rs))){const js=Rs.getKey();this.tableSelection=this.tableSelection.clone()||Ee(),this.focusCellNodeKey=js,this.tableSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),me(this.tableSelection),xs.dispatchCommand(e$1,void 0),Ae(xs,this.table,this.tableSelection)}}}))}setAnchorCellForSelection(dn){this.isHighlightingCells=!1,this.anchorCell=dn,this.anchorX=dn.x,this.anchorY=dn.y,this.editor.update((()=>{const ms=he$1(dn.elem);if(q(ms)){const xs=ms.getKey();this.tableSelection=this.tableSelection!=null?this.tableSelection.clone():Ee(),this.anchorCellNodeKey=xs}}))}formatCells(dn){this.editor.update((()=>{const ms=pi();ve(ms)||te(11);const xs=di(),bs=xs.anchor,Es=xs.focus;ms.getNodes().forEach((ws=>{q(ws)&&ws.getTextContentSize()!==0&&(bs.set(ws.getKey(),0,"element"),Es.set(ws.getKey(),ws.getChildrenSize(),"element"),xs.formatText(dn))})),me(ms),this.editor.dispatchCommand(e$1,void 0)}))}clearText(){const dn=this.editor;dn.update((()=>{const ms=fe$1(this.tableNodeKey);if(!nt(ms))throw new Error("Expected TableNode.");const xs=pi();ve(xs)||te(11);const bs=xs.getNodes().filter(q);bs.length!==this.table.columns*this.table.rows?(bs.forEach((Es=>{if(Gi(Es)){const ws=cs(),Rs=Jr();
1454ws.append(Rs),Es.append(ws),Es.getChildren().forEach((js=>{js!==ws&&js.remove()}))}})),Ae(dn,this.table,null),me(null),dn.dispatchCommand(e$1,void 0)):(ms.selectPrevious(),ms.remove(),pe$1().selectStart())}))}}const Re="__lexicalTableSelection",Ke=ds=>ne?(ds||window).getSelection():null;function ke(ds,dn,ms,xs){const bs=ms.getRootElement();if(bs===null)throw new Error("No root element.");const Es=new Me(ms,ds.getKey()),ws=ms._window||window;(function(ks,Os){ks[Re]=Os})(dn,Es);const Rs=()=>{const ks=()=>{Es.isSelecting=!1,ws.removeEventListener("mouseup",ks),ws.removeEventListener("mousemove",Os)},Os=Ms=>{const Ds=He(Ms.target);Ds===null||Es.anchorX===Ds.x&&Es.anchorY===Ds.y||(Ms.preventDefault(),Es.setFocusCellForSelection(Ds))};return{onMouseMove:Os,onMouseUp:ks}};dn.addEventListener("mousedown",(ks=>{setTimeout((()=>{if(ks.button!==0||!ws)return;const Os=He(ks.target);Os!==null&&(qe(ks),Es.setAnchorCellForSelection(Os));const{onMouseUp:Ms,onMouseMove:Ds}=Rs();Es.isSelecting=!0,ws.addEventListener("mouseup",Ms),ws.addEventListener("mousemove",Ds)}),0)}));const js=ks=>{ks.button===0&&ms.update((()=>{const Os=pi(),Ms=ks.target;ve(Os)&&Os.tableKey===Es.tableNodeKey&&bs.contains(Ms)&&Es.clearHighlight()}))};ws.addEventListener("mousedown",js),Es.listenersToRemove.add((()=>ws.removeEventListener("mousedown",js))),Es.listenersToRemove.add(ms.registerCommand(T$2,(ks=>je(ms,ks,"down",ds,Es)),hs)),Es.listenersToRemove.add(ms.registerCommand(v$3,(ks=>je(ms,ks,"up",ds,Es)),hs)),Es.listenersToRemove.add(ms.registerCommand(m$5,(ks=>je(ms,ks,"backward",ds,Es)),hs)),Es.listenersToRemove.add(ms.registerCommand(p$4,(ks=>je(ms,ks,"forward",ds,Es)),hs)),Es.listenersToRemove.add(ms.registerCommand(b$4,(ks=>{const Os=pi();if(ve(Os)){const Ms=I$2(Os.focus.getNode(),q);if(q(Ms))return qe(ks),Ms.selectEnd(),!0}return!1}),hs)),[a$3,f$2,i$2].forEach((ks=>{Es.listenersToRemove.add(ms.registerCommand(ks,(Os=>()=>{const Ms=pi();if(!We(Ms,ds))return!1;if(ve(Ms))return Es.clearText(),!0;if(ti(Ms)){const Ds=I$2(Ms.anchor.getNode(),(Js=>q(Js)));if(!q(Ds))return!1;const Ps=Ms.anchor.getNode(),Ls=Ms.focus.getNode(),Bs=ds.isParentOf(Ps),Fs=ds.isParentOf(Ls);if(Bs&&!Fs||Fs&&!Bs)return Es.clearText(),!0;const Us=I$2(Ms.anchor.getNode(),(Js=>Gi(Js))),Gs=Us&&I$2(Us,(Js=>Gi(Js)&&q(Js.getParent())));if(!Gi(Gs)||!Gi(Us))return!1;if(Os===f$2&&Gs.getPreviousSibling()===null)return!0}return!1})(ks),gs))}));const Cs=ks=>{const Os=pi();if(!We(Os,ds))return!1;if(ve(Os))return ks.preventDefault(),ks.stopPropagation(),Es.clearText(),!0;if(ti(Os)){const Ms=I$2(Os.anchor.getNode(),(Ds=>q(Ds)));if(!q(Ms))return!1}return!1};function As(ks){const Os=ds.getCordsFromCellNode(ks,Es.table);return ds.getDOMCellFromCordsOrThrow(Os.x,Os.y,Es.table)}return Es.listenersToRemove.add(ms.registerCommand(C$4,Cs,gs)),Es.listenersToRemove.add(ms.registerCommand(N$5,Cs,gs)),Es.listenersToRemove.add(ms.registerCommand(d$3,(ks=>{const Os=pi();if(!We(Os,ds))return!1;if(ve(Os))return Es.formatCells(ks),!0;if(ti(Os)){const Ms=I$2(Os.anchor.getNode(),(Ds=>q(Ds)));if(!q(Ms))return!1}return!1}),gs)),Es.listenersToRemove.add(ms.registerCommand(I$3,(ks=>{const Os=pi();if(!ve(Os)||!We(Os,ds))return!1;const Ms=Os.anchor.getNode(),Ds=Os.focus.getNode();if(!q(Ms)||!q(Ds))return!1;const[Ps,Ls,Bs]=ye(ds,Ms,Ds),Fs=Math.max(Ls.startRow,Bs.startRow),Us=Math.max(Ls.startColumn,Bs.startColumn),Gs=Math.min(Ls.startRow,Bs.startRow),Js=Math.min(Ls.startColumn,Bs.startColumn);for(let Ws=Gs;Ws<=Fs;Ws++)for(let Zs=Js;Zs<=Us;Zs++){const Ys=Ps[Ws][Zs].cell;Ys.setFormat(ks);const Qs=Ys.getChildren();for(let ai=0;ai<Qs.length;ai++){const ia=Qs[ai];Gi(ia)&&!ia.isInline()&&ia.setFormat(ks)}}return!0}),gs)),Es.listenersToRemove.add(ms.registerCommand(l$2,(ks=>{const Os=pi();if(!We(Os,ds))return!1;if(ve(Os))return Es.clearHighlight(),!1;if(ti(Os)){const Ms=I$2(Os.anchor.getNode(),(Ds=>q(Ds)));if(!q(Ms))return!1;if(typeof ks=="string"){const Ds=Qe(ms,Os,ds);if(Ds)return Ge(Ds,ds,[Jr(ks)]),!0}}return!1}),gs)),xs&&Es.listenersToRemove.add(ms.registerCommand(w$3,(ks=>{const Os=pi();if(!ti(Os)||!Os.isCollapsed()||!We(Os,ds))return!1;const Ms=Je(Os.anchor.getNode());if(Ms===null)return!1;qe(ks);const Ds=ds.getCordsFromCellNode(Ms,Es.table);return Ie(Es,ds,Ds.x,Ds.y,ks.shiftKey?"backward":"forward"),!0}),gs)),Es.listenersToRemove.add(ms.registerCommand(U$2,(ks=>ds.isSelected()),hs)),Es.listenersToRemove.add(ms.registerCommand(n$2,(ks=>{const{nodes:Os,selection:Ms}=ks,Ds=Ms.getStartEndPoints(),Ps=ve(Ms),Ls=ti(Ms)&&I$2(Ms.anchor.getNode(),(Ia=>q(Ia)))!==null&&I$2(Ms.focus.getNode(),(Ia=>q(Ia)))!==null||Ps;if(Os.length!==1||!nt(Os[0])||!Ls||Ds===null)return!1;const[Bs]=Ds,Fs=Os[0],Us=Fs.getChildren(),Gs=Fs.getFirstChildOrThrow().getChildrenSize(),Js=Fs.getChildrenSize(),Ws=I$2(Bs.getNode(),(Ia=>q(Ia))),Zs=Ws&&I$2(Ws,(Ia=>ee(Ia))),Ys=Zs&&I$2(Zs,(Ia=>nt(Ia)));if(!q(Ws)||!ee(Zs)||!nt(Ys))return!1;const Qs=Zs.getIndexWithinParent(),ai=Math.min(Ys.getChildrenSize()-1,Qs+Js-1),ia=Ws.getIndexWithinParent(),ca=Math.min(Zs.getChildrenSize()-1,ia+Gs-1),ha=Math.min(ia,ca),ea=Math.min(Qs,ai),ta=Math.max(ia,ca),aa=Math.max(Qs,ai),fa=Ys.getChildren();let ua,Ea,ra=0;for(let Ia=ea;Ia<=aa;Ia++){const $a=fa[Ia];if(!ee($a))return!1;const oa=Us[ra];if(!ee(oa))return!1;const sa=$a.getChildren(),Ra=oa.getChildren();let _a=0;for(let Oa=ha;Oa<=ta;Oa++){const za=sa[Oa];if(!q(za))return!1;const Ga=Ra[_a];if(!q(Ga))return!1;Ia===ea&&Oa===ha?ua=za.getKey():Ia===aa&&Oa===ta&&(Ea=za.getKey());const qa=za.getChildren();
1454Ga.getChildren().forEach((Ma=>{Ur(Ma)&&cs().append(Ma),za.append(Ma)})),qa.forEach((Ma=>Ma.remove())),_a++}ra++}if(ua&&Ea){const Ia=Ee();Ia.set(Os[0].getKey(),ua,Ea),me(Ia)}return!0}),gs)),Es.listenersToRemove.add(ms.registerCommand(e$1,(()=>{const ks=pi(),Os=yi();if(ti(ks)){const{anchor:Ms,focus:Ds}=ks,Ps=Ms.getNode(),Ls=Ds.getNode(),Bs=Je(Ps),Fs=Je(Ls),Us=!(!Bs||!ds.is($e(Bs))),Gs=!(!Fs||!ds.is($e(Fs))),Js=Us!==Gs,Ws=Us&&Gs,Zs=ks.isBackward();if(Js){const Ys=ks.clone();Gs?Ys.focus.set(ds.getParentOrThrow().getKey(),Zs?ds.getIndexWithinParent():ds.getIndexWithinParent()+1,"element"):Ys.anchor.set(ds.getParentOrThrow().getKey(),Zs?ds.getIndexWithinParent()+1:ds.getIndexWithinParent(),"element"),me(Ys),De(ms,Es)}else Ws&&(Bs.is(Fs)||(Es.setAnchorCellForSelection(As(Bs)),Es.setFocusCellForSelection(As(Fs),!0),Es.isSelecting||setTimeout((()=>{const{onMouseUp:Ys,onMouseMove:Qs}=Rs();Es.isSelecting=!0,ws.addEventListener("mouseup",Ys),ws.addEventListener("mousemove",Qs)}),0)))}else if(ks&&ve(ks)&&ks.is(Os)&&ks.tableKey===ds.getKey()){const Ms=Ke(ms._window);if(Ms&&Ms.anchorNode&&Ms.focusNode){const Ds=he$1(Ms.focusNode),Ps=Ds&&!ds.is($e(Ds)),Ls=he$1(Ms.anchorNode),Bs=Ls&&ds.is($e(Ls));if(Ps&&Bs&&Ms.rangeCount>0){const Fs=gi(Ms,ms);
1454Fs&&(Fs.anchor.set(ds.getKey(),ks.isBackward()?ds.getChildrenSize():0,"element"),Ms.removeAllRanges(),me(Fs))}}}return ks&&!ks.is(Os)&&(ve(ks)||ve(Os))&&Es.tableSelection&&!Es.tableSelection.is(Os)?(ve(ks)&&ks.tableKey===Es.tableNodeKey?Es.updateTableTableSelection(ks):!ve(ks)&&ve(Os)&&Os.tableKey===Es.tableNodeKey&&Es.updateTableTableSelection(null),!1):(Es.hasHijackedSelectionStyles&&!ds.isSelected()?(function(Ms,Ds){Ds.enableHighlightStyle(),Be(Ds.table,(Ps=>{const Ls=Ps.elem;Ps.highlighted=!1,Ye(Ms,Ps),Ls.getAttribute("style")||Ls.removeAttribute("style")}))})(ms,Es):!Es.hasHijackedSelectionStyles&&ds.isSelected()&&De(ms,Es),!1)}),gs)),Es.listenersToRemove.add(ms.registerCommand(o$4,(()=>{const ks=pi();if(!ti(ks)||!ks.isCollapsed()||!We(ks,ds))return!1;const Os=Qe(ms,ks,ds);return!!Os&&(Ge(Os,ds),!0)}),gs)),Es}function He(ds){let dn=ds;for(;dn!=null;){const ms=dn.nodeName;if(ms==="TD"||ms==="TH"){const xs=dn._cell;return xs===void 0?null:xs}dn=dn.parentNode}return null}function Pe(ds){const dn=[],ms={columns:0,domRows:dn,rows:0};let xs=ds.firstChild,bs=0,Es=0;for(dn.length=0;xs!=null;){const ws=xs.nodeName;if(ws==="TD"||ws==="TH"){const Cs={elem:xs,hasBackgroundColor:xs.style.backgroundColor!=="",highlighted:!1,x:bs,y:Es};xs._cell=Cs;let As=dn[Es];As===void 0&&(As=dn[Es]=[]),As[bs]=Cs}else{const Cs=xs.firstChild;if(Cs!=null){xs=Cs;continue}}const Rs=xs.nextSibling;if(Rs!=null){bs++,xs=Rs;continue}const js=xs.parentNode;if(js!=null){const Cs=js.nextSibling;if(Cs==null)break;Es++,bs=0,xs=Cs}}return ms.columns=bs+1,ms.rows=Es+1,ms}function Ae(ds,dn,ms){const xs=new Set(ms?ms.getNodes():[]);Be(dn,((bs,Es)=>{const ws=bs.elem;xs.has(Es)?(bs.highlighted=!0,Xe(ds,bs)):(bs.highlighted=!1,Ye(ds,bs),ws.getAttribute("style")||ws.removeAttribute("style"))}))}function Be(ds,dn){const{domRows:ms}=ds;for(let xs=0;xs<ms.length;xs++){const bs=ms[xs];if(bs)for(let Es=0;Es<bs.length;Es++){const ws=bs[Es];if(!ws)continue;const Rs=he$1(ws.elem);Rs!==null&&dn(ws,Rs,{x:Es,y:xs})}}}function De(ds,dn){dn.disableHighlightStyle(),Be(dn.table,(ms=>{ms.highlighted=!0,Xe(ds,ms)}))}const Ie=(ds,dn,ms,xs,bs)=>{const Es=bs==="forward";switch(bs){case"backward":case"forward":return ms!==(Es?ds.table.columns-1:0)?Ue(dn.getCellNodeFromCordsOrThrow(ms+(Es?1:-1),xs,ds.table),Es):xs!==(Es?ds.table.rows-1:0)?Ue(dn.getCellNodeFromCordsOrThrow(Es?0:ds.table.columns-1,xs+(Es?1:-1),ds.table),Es):Es?dn.selectNext():dn.selectPrevious(),!0;case"up":return xs!==0?Ue(dn.getCellNodeFromCordsOrThrow(ms,xs-1,ds.table),!1):dn.selectPrevious(),!0;case"down":return xs!==ds.table.rows-1?Ue(dn.getCellNodeFromCordsOrThrow(ms,xs+1,ds.table),!0):dn.selectNext(),!0;default:return!1}},Le=(ds,dn,ms,xs,bs)=>{const Es=bs==="forward";switch(bs){case"backward":case"forward":return ms!==(Es?ds.table.columns-1:0)&&ds.setFocusCellForSelection(dn.getDOMCellFromCordsOrThrow(ms+(Es?1:-1),xs,ds.table)),!0;case"up":return xs!==0&&(ds.setFocusCellForSelection(dn.getDOMCellFromCordsOrThrow(ms,xs-1,ds.table)),!0);case"down":return xs!==ds.table.rows-1&&(ds.setFocusCellForSelection(dn.getDOMCellFromCordsOrThrow(ms,xs+1,ds.table)),!0);default:return!1}};function We(ds,dn){if(ti(ds)||ve(ds)){const ms=dn.isParentOf(ds.anchor.getNode()),xs=dn.isParentOf(ds.focus.getNode());return ms&&xs}return!1}function Ue(ds,dn){dn?ds.selectStart():ds.selectEnd()}const ze="172,206,247";function Xe(ds,dn){const ms=dn.elem,xs=he$1(ms);q(xs)||te(131),xs.getBackgroundColor()===null?ms.style.setProperty("background-color",`rgb(${ze})`):ms.style.setProperty("background-image",`linear-gradient(to right, rgba(${ze},0.85), rgba(${ze},0.85))`),ms.style.setProperty("caret-color","transparent")}function Ye(ds,dn){const ms=dn.elem,xs=he$1(ms);q(xs)||te(131),xs.getBackgroundColor()===null&&ms.style.removeProperty("background-color"),ms.style.removeProperty("background-image"),ms.style.removeProperty("caret-color")}function Je(ds){const dn=I$2(ds,q);return q(dn)?dn:null}function $e(ds){const dn=I$2(ds,nt);return nt(dn)?dn:null}function je(ds,dn,ms,xs,bs){const Es=pi();if(!We(Es,xs)){if(ms==="backward"&&ti(Es)&&Es.isCollapsed()){const ws=Es.anchor.type,Rs=Es.anchor.offset;if(ws!=="element"&&(ws!=="text"||Rs!==0))return!1;const js=Es.anchor.getNode();if(!js)return!1;const Cs=I$2(js,(ks=>Gi(ks)&&!ks.isInline()));if(!Cs)return!1;const As=Cs.getPreviousSibling();return!(!As||!nt(As))&&(qe(dn),As.selectEnd(),!0)}return!1}if(ti(Es)&&Es.isCollapsed()){const{anchor:ws,focus:Rs}=Es,js=I$2(ws.getNode(),q),Cs=I$2(Rs.getNode(),q);
1454if(!q(js)||!js.is(Cs))return!1;const As=$e(js);if(As!==xs&&As!=null){const Bs=ds.getElementByKey(As.getKey());if(Bs!=null)return bs.table=Pe(Bs),je(ds,dn,ms,As,bs)}if(ms==="backward"||ms==="forward"){const Bs=ws.type,Fs=ws.offset,Us=ws.getNode();return!!Us&&!!(function(Gs,Js,Ws,Zs){return(function(Ys,Qs,ai){return Ys==="element"&&(ai==="backward"?Qs.getPreviousSibling()===null:Qs.getNextSibling()===null)})(Gs,Ws,Zs)||(function(Ys,Qs,ai,ia){const ca=I$2(ai,(ea=>Gi(ea)&&!ea.isInline()));if(!ca)return!1;const ha=ia==="backward"?Qs===0:Qs===ai.getTextContentSize();return Ys==="text"&&ha&&(ia==="backward"?ca.getPreviousSibling()===null:ca.getNextSibling()===null)})(Gs,Js,Ws,Zs)})(Bs,Fs,Us,ms)&&(function(Gs,Js,Ws,Zs){const Ys=I$2(Js,q);if(!q(Ys))return!1;const[Qs,ai]=ye(Ws,Ys,Ys);if(!(function(ca,ha,ea){const ta=ca[0][0],aa=ca[ca.length-1][ca[0].length-1],{startColumn:fa,startRow:ua}=ha;return ea==="backward"?fa===ta.startColumn&&ua===ta.startRow:fa===aa.startColumn&&ua===aa.startRow})(Qs,ai,Zs))return!1;const ia=(function(ca,ha,ea){const ta=I$2(ca,(fa=>Gi(fa)&&!fa.isInline()));if(!ta)return;const aa=ha==="backward"?ta.getPreviousSibling():ta.getNextSibling();return aa&&nt(aa)?aa:ha==="backward"?ea.getPreviousSibling():ea.getNextSibling()})(Js,Zs,Ws);return!ia||nt(ia)?!1:(qe(Gs),Zs==="backward"?ia.selectEnd():ia.selectStart(),!0)})(dn,Us,xs,ms)}const ks=ds.getElementByKey(js.__key),Os=ds.getElementByKey(ws.key);if(Os==null||ks==null)return!1;let Ms;if(ws.type==="element")Ms=Os.getBoundingClientRect();else{const Bs=window.getSelection();if(Bs===null||Bs.rangeCount===0)return!1;Ms=Bs.getRangeAt(0).getBoundingClientRect()}const Ds=ms==="up"?js.getFirstChild():js.getLastChild();if(Ds==null)return!1;const Ps=ds.getElementByKey(Ds.__key);if(Ps==null)return!1;const Ls=Ps.getBoundingClientRect();if(ms==="up"?Ls.top>Ms.top-Ms.height:Ms.bottom+Ms.height>Ls.bottom){qe(dn);const Bs=xs.getCordsFromCellNode(js,bs.table);if(!dn.shiftKey)return Ie(bs,xs,Bs.x,Bs.y,ms);{const Fs=xs.getDOMCellFromCordsOrThrow(Bs.x,Bs.y,bs.table);bs.setAnchorCellForSelection(Fs),bs.setFocusCellForSelection(Fs,!0)}return!0}}else if(ve(Es)){const{anchor:ws,focus:Rs}=Es,js=I$2(ws.getNode(),q),Cs=I$2(Rs.getNode(),q),[As]=Es.getNodes(),ks=ds.getElementByKey(As.getKey());if(!q(js)||!q(Cs)||!nt(As)||ks==null)return!1;bs.updateTableTableSelection(Es);const Os=Pe(ks),Ms=xs.getCordsFromCellNode(js,Os),Ds=xs.getDOMCellFromCordsOrThrow(Ms.x,Ms.y,Os);if(bs.setAnchorCellForSelection(Ds),qe(dn),dn.shiftKey){const Ps=xs.getCordsFromCellNode(Cs,Os);return Le(bs,As,Ps.x,Ps.y,ms)}return Cs.selectEnd(),!0}return!1}function qe(ds){ds.preventDefault(),ds.stopImmediatePropagation(),ds.stopPropagation()}function Ge(ds,dn,ms){const xs=cs();ds==="first"?dn.insertBefore(xs):dn.insertAfter(xs),xs.append(...ms||[]),xs.selectEnd()}function Qe(ds,dn,ms){const xs=window.getSelection();if(!xs||xs.anchorNode!==ds.getRootElement())return;const bs=I$2(dn.anchor.getNode(),(Ds=>q(Ds)));if(!bs)return;const Es=I$2(bs,(Ds=>nt(Ds)));if(!nt(Es)||!Es.is(ms))return;const[ws,Rs]=ye(ms,bs,bs),js=ws[0][0],Cs=ws[ws.length-1][ws[0].length-1],{startRow:As,startColumn:ks}=Rs,Os=As===js.startRow&&ks===js.startColumn,Ms=As===Cs.startRow&&ks===Cs.startColumn;return Os?"first":Ms?"last":void 0}class Ve extends Zi{static getType(){return"table"}static clone(dn){return new Ve(dn.__key)}static importDOM(){return{table:dn=>({conversion:et,priority:1})}}static importJSON(dn){return tt()}constructor(dn){super(dn)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(dn,ms){const xs=document.createElement("table");return B$3(xs,dn.theme.table),xs}updateDOM(){return!1}exportDOM(dn){return{...super.exportDOM(dn),after:ms=>{if(ms){const xs=ms.cloneNode(),bs=document.createElement("colgroup"),Es=document.createElement("tbody");un(ms)&&Es.append(...ms.children);const ws=this.getFirstChildOrThrow();if(!ee(ws))throw new Error("Expected to find row node.");const Rs=ws.getChildrenSize();for(let js=0;js<Rs;js++){const Cs=document.createElement("col");bs.append(Cs)}return xs.replaceChildren(bs,Es),xs}}}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(dn,ms){const{rows:xs,domRows:bs}=ms;for(let Es=0;Es<xs;Es++){const ws=bs[Es];if(ws==null)continue;const Rs=ws.findIndex((js=>{if(!js)return;const{elem:Cs}=js;return he$1(Cs)===dn}));if(Rs!==-1)return{x:Rs,y:Es}}throw new Error("Cell not found in table.")}getDOMCellFromCords(dn,ms,xs){const{domRows:bs}=xs,Es=bs[ms];if(Es==null)return null;const ws=Es[dn];return ws??null}getDOMCellFromCordsOrThrow(dn,ms,xs){const bs=this.getDOMCellFromCords(dn,ms,xs);if(!bs)throw new Error("Cell not found at cords.");return bs}getCellNodeFromCords(dn,ms,xs){const bs=this.getDOMCellFromCords(dn,ms,xs);if(bs==null)return null;const Es=he$1(bs.elem);return q(Es)?Es:null}getCellNodeFromCordsOrThrow(dn,ms,xs){const bs=this.getCellNodeFromCords(dn,ms,xs);if(!bs)throw new Error("Node at cords not TableCellNode.");return bs}canSelectBefore(){return!0}canIndent(){return!1}}function Ze(ds,dn){const ms=ds.getElementByKey(dn.getKey());if(ms==null)throw new Error("Table Element Not Found");return Pe(ms)}function et(ds){return{node:tt()}}function tt(){return tn(new Ve)}
1454function nt(ds){return ds instanceof Ve}const TABLE_ROW_REGEXP=/^\s*\|?.+\|.+\|?\s*$/,TABLE_DIVIDER_REGEXP=/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/,splitRowCells=ds=>{let dn=ds.trim();dn.startsWith("|")&&(dn=dn.slice(1)),dn.endsWith("|")&&(dn=dn.slice(0,-1));const ms="";return dn.replace(/\\\|/g,ms).split("|").map(bs=>bs.replace(new RegExp(ms,"g"),"|").trim())},isDividerLine=ds=>{if(!TABLE_DIVIDER_REGEXP.test(ds))return!1;const dn=splitRowCells(ds);return dn.length>0&&dn.every(ms=>/^:?-{3,}:?$/.test(ms))},restoreLine=(ds,dn)=>{const ms=ds[0];Ur(ms)&&ms.setTextContent(dn.trim())},createRow=(ds,dn)=>{const ms=Z();return ds.forEach(xs=>{const bs=j(dn),Es=cs();Es.append(Jr(xs||"")),bs.append(Es),ms.append(bs)}),ms},exportTable=(ds,dn)=>{const ms=ds.getChildren().filter(ee);if(ms.length===0)return null;const xs=ms.map(ws=>`| ${ws.getChildren().filter(q).map(Cs=>dn(Cs).trim().replace(/\|/g,"\\|").replace(/\n/g,"<br/>")).join(" | ")} |`),Es=`| ${ms[0].getChildren().filter(q).map(()=>"---").join(" | ")} |`;return[xs[0],Es,...xs.slice(1)].join(`
1455`)},TABLE_TRANSFORMER={dependencies:[Ve,Q,J],export:(ds,dn)=>nt(ds)?exportTable(ds,dn):null,regExp:TABLE_ROW_REGEXP,replace:(ds,dn,ms,xs)=>{if(!xs)return;const bs=ms[0];if(isDividerLine(bs)){const Rs=ds.getPreviousSibling();if(nt(Rs)){ds.remove();return}if(!us(Rs)){restoreLine(dn,bs);return}const js=Rs.getTextContent();if(!TABLE_ROW_REGEXP.test(js)){restoreLine(dn,bs);return}const Cs=splitRowCells(js);if(Cs.length===0){restoreLine(dn,bs);return}const As=tt();As.append(createRow(Cs,Y.ROW)),Rs.replace(As),ds.remove();return}const Es=ds.getPreviousSibling();if(!nt(Es)){restoreLine(dn,bs);return}const ws=splitRowCells(bs);if(ws.length===0){restoreLine(dn,bs);return}Es.append(createRow(ws,Y.NO_STATUS)),ds.remove()},type:"element"},MARKDOWN_TRANSFORMERS=[TABLE_TRANSFORMER,...$t],MARKDOWN_IMPORT_TAG="markdown-import";function MarkdownIOPlugin({initialMarkdown:ds,loadId:dn}){const[ms]=o$5();return reactExports.useEffect(()=>{ms.update(()=>{pe$1().clear(),Ft(ds||"",MARKDOWN_TRANSFORMERS)},{tag:MARKDOWN_IMPORT_TAG})},[ms,ds,dn]),null}function cn$1(...ds){return ds.filter(Boolean).join(" ")}function MicrophoneRecorder({onTranscript:ds,onStart:dn,onStop:ms}){const[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(null),[Rs,js]=reactExports.useState(),Cs=!!Rs?.audioInput?.mediaStream?.active,As=reactExports.useCallback(async()=>{if(!navigator.mediaDevices)return;const Ls=(await navigator.mediaDevices.enumerateDevices()).filter(Fs=>Fs.kind==="audioinput");bs(Ls);const Bs=Ls.find(Fs=>Fs.deviceId==="default");if(Bs){const Fs=Ls.find(Us=>Us.groupId===Bs.groupId&&Us.deviceId!=="default");ws(Fs??Ls[0]??null)}else ws(Ls[0]??null)},[]);reactExports.useEffect(()=>{if(As(),!!navigator.mediaDevices)return navigator.mediaDevices.ondevicechange=()=>{As()},()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=null)}},[As]);const ks=reactExports.useCallback(async()=>{try{Rs&&(await Rs.stop(),Rs.destroy()),js(void 0),ms?.()}catch(Ps){console.error("Transcription stop failed",Ps)}},[Rs,ms]),Os=reactExports.useCallback(async Ps=>{const Ls=Ps??Es;if(Ls){Rs&&(await Rs.stop(),Rs.destroy()),dn?.();try{const Bs=await navigator.mediaDevices.getUserMedia({audio:{deviceId:Ls.deviceId},video:!1}),Fs=new MicrophoneStream({stream:Bs,objectMode:!1});js(Fs),await Sdk.transcriptionClient.startRecording(Fs,Us=>{Us.text&&ds(Us)})}catch(Bs){console.error("Transcription start failed",Bs)}}},[Rs,Es,dn,ds]);reactExports.useEffect(()=>()=>{Rs&&Rs.stop().then()},[Rs]);const Ms=cn$1("px-2.5 py-1.5 rounded-md border border-secondary text-sm bg-white cursor-pointer hover:bg-slate-100 inline-flex items-center gap-1 max-h-[30px]",Cs?"!bg-secondary text-white":"border-[--border-medium] hover:bg-[--background-neutral]"),Ds=reactExports.useMemo(()=>xs.map(Ps=>({id:Ps.deviceId,label:Ps.label||"Microphone"})),[xs]);return jsxRuntimeExports.jsxs("div",{className:"relative",children:[!Cs&&jsxRuntimeExports.jsx("button",{type:"button",title:"Dictate",onClick:()=>Os(),className:Ms,children:jsxRuntimeExports.jsx(Mic,{className:"text-primary",size:16})}),Cs&&jsxRuntimeExports.jsx("button",{type:"button",title:"Stop dictation",onClick:ks,className:Ms,children:jsxRuntimeExports.jsx(X$4,{size:16})}),Cs&&Es&&Ds.length>1&&jsxRuntimeExports.jsx("div",{className:"absolute -bottom-11 right-0 z-50",children:jsxRuntimeExports.jsx("select",{className:"rounded-md border border-[--border-medium] bg-white px-2 py-1 text-xs shadow-sm",value:Es.deviceId,onChange:async Ps=>{const Ls=xs.find(Bs=>Bs.deviceId===Ps.target.value)??null;await ks(),ws(Ls),Ls&&await Os(Ls)},children:Ds.map(Ps=>jsxRuntimeExports.jsx("option",{value:Ps.id,children:Ps.label},Ps.id))})})]})}
1455function cn(...ds){return ds.filter(Boolean).join(" ")}function ToolbarButton({active:ds,onClick:dn,title:ms,children:xs,disabled:bs}){return jsxRuntimeExports.jsx("button",{type:"button",title:ms,onClick:dn,disabled:bs,className:cn("px-2.5 py-1.5 rounded-md border border-secondary text-sm bg-white cursor-pointer hover:bg-slate-100 inline-flex items-center gap-1 max-h-[30px]",ds?"!bg-secondary text-white":"border-[--border-medium] hover:bg-[--background-neutral]",bs&&"opacity-50 cursor-not-allowed hover:bg-white"),children:xs})}function FormattingToolbar(){const[ds]=o$5(),dn=reactExports.useRef(null),ms=reactExports.useRef(null),[xs,bs]=reactExports.useState("paragraph"),[Es,ws]=reactExports.useState({bold:!1,italic:!1,underline:!1,code:!1,link:!1}),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(null),ks=reactExports.useCallback(()=>{const Ws=pi();if(ti(Ws)){let Zs=Ws.anchor.getNode(),Ys=!1;for(;Zs;){if(c(Zs)){Ys=!0;break}Zs=Zs.getParent?.()}ws({bold:Ws.hasFormat("bold"),italic:Ws.hasFormat("italic"),underline:Ws.hasFormat("underline"),code:Ws.hasFormat("code"),link:Ys});const Qs=Ws.anchor.getNode(),ai=Qs.getTopLevelElementOrThrow(),ia=ai.getType(),ca=re(Qs);if(ca){const ha=se(ca),ea=ha.getChildrenSize(),ta=ha.getFirstChild(),aa=ee(ta)?ta.getChildrenSize():0;js(!0),As({rows:ea,cols:aa})}else js(!1),As(null);if(ia==="heading")bs(ai.getTag());else if(ia==="quote")bs("quote");else if(ia==="list"){const ha=ai.getListType?.();bs(ha==="number"?"ol":"ul")}else bs("paragraph")}},[]);reactExports.useEffect(()=>ds.registerCommand(e$1,()=>(ds.getEditorState().read(ks),!1),1),[ds,ks]);const Os=Ws=>{ds.update(()=>{const Zs=pi();if(ti(Zs)){if(Ws==="ol"){ds.dispatchCommand($$1,void 0);return}if(Ws==="ul"){ds.dispatchCommand(U$1,void 0);return}ds.dispatchCommand(H$2,void 0),b$3(Zs,()=>Ws==="paragraph"?cs():Ws==="quote"?ht$1():wt$1(Ws))}})},Ms=()=>{const Ws=window.prompt("Enter URL (leave blank to remove):","https://");ds.dispatchCommand(d,Ws&&Ws.trim()?Ws.trim():null)},Ds=()=>{ds.update(()=>{const Ws=pi();ti(Ws)&&(Es.bold&&ds.dispatchCommand(d$3,"bold"),Es.italic&&ds.dispatchCommand(d$3,"italic"),Es.underline&&ds.dispatchCommand(d$3,"underline"),Es.code&&ds.dispatchCommand(d$3,"code"),ds.dispatchCommand(H$2,void 0))})},Ps=reactExports.useCallback(Ws=>{const Zs=Ws.text.trim();Zs&&ds.update(()=>{let Ys=pi();if(ti(Ys)||(pe$1().selectEnd(),Ys=pi()),!ti(Ys))return;const Qs=dn.current?fe$1(dn.current):null,ai=Qs&&Ur(Qs)?Qs:null,ia=!!ai,ca=!!(ms.current&&Ws.resultId&&ms.current===Ws.resultId);if(!ia||!ca&&!Ws.isFinal){ai&&ai.setStyle("");const ha=Jr(Zs);if(Ws.isFinal||ha.setStyle("opacity:0.65;"),Ys.insertNodes([ha]),Ws.isFinal){const ea=Jr(" ");ha.insertAfter(ea),ea.selectEnd(),dn.current=null,ms.current=null}else dn.current=ha.getKey(),ms.current=Ws.resultId??null,ha.selectEnd();return}if(ai)if(ai.setTextContent(Zs),Ws.isFinal){ai.setStyle("");const ha=Jr(" ");
1455ai.insertAfter(ha),ha.selectEnd(),dn.current=null,ms.current=null}else ai.selectEnd();else dn.current=null,ms.current=null})},[ds]),Ls=reactExports.useCallback(()=>{ds.update(()=>{const Ws=dn.current?fe$1(dn.current):null,Zs=Ws&&Ur(Ws)?Ws:null;if(Zs){Zs.setStyle("");const Ys=Jr(" ");Zs.insertAfter(Ys),Ys.selectEnd()}dn.current=null,ms.current=null})},[ds]),Bs=()=>{const Ws=window.prompt("Table size (rows x columns)","3x3");if(!Ws)return;const Zs=Ws.match(/^\s*(\d+)\s*[xX]\s*(\d+)\s*$/);if(!Zs){window.alert("Use format rows x columns, e.g. 3x3.");return}const Ys=Math.max(1,parseInt(Zs[1],10)),Qs=Math.max(1,parseInt(Zs[2],10));ds.dispatchCommand(G,{rows:String(Ys),columns:String(Qs),includeHeaders:!0})},Fs=Ws=>{ds.update(()=>{const Zs=pi();if(!ti(Zs))return;const Ys=re(Zs.anchor.getNode());if(!Ys)return;const Qs=se(Ys),ai=Ze(ds,Qs);if(!ai)return;const ia=ie(Ys);de(Qs,ia,Ws,1,ai)})},Us=Ws=>{ds.update(()=>{const Zs=pi();if(!ti(Zs))return;const Ys=re(Zs.anchor.getNode());if(!Ys)return;const Qs=se(Ys),ai=Ze(ds,Qs);if(!ai)return;const ia=ae(Ys);fe(Qs,ia,Ws,1,ai)})},Gs=()=>{ds.update(()=>{const Ws=pi();if(!ti(Ws))return;const Zs=re(Ws.anchor.getNode());if(!Zs)return;const Ys=se(Zs);if(Ys.getChildrenSize()<=1)return;const Qs=ie(Zs);he(Ys,Qs)})},Js=()=>{ds.update(()=>{const Ws=pi();if(!ti(Ws))return;const Zs=re(Ws.anchor.getNode());if(!Zs)return;const Ys=se(Zs),Qs=Ys.getFirstChild();if((ee(Qs)?Qs.getChildrenSize():0)<=1)return;const ia=ae(Zs);pe(Ys,ia)})};return jsxRuntimeExports.jsxs("div",{className:"sticky top-[56px] z-10 pb-2 mb-2 flex flex-nowrap items-center gap-2 overflow-x-auto scrollbar-thin",children:[jsxRuntimeExports.jsx(MicrophoneRecorder,{onTranscript:Ps,onStart:()=>ds.focus(),onStop:Ls}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium]"}),jsxRuntimeExports.jsx(ToolbarButton,{onClick:()=>ds.dispatchCommand(h$2,void 0),title:"Undo (⌘/Ctrl+Z)",children:jsxRuntimeExports.jsx(Undo2,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{onClick:()=>ds.dispatchCommand(g$6,void 0),title:"Redo (⇧⌘/Ctrl+Y)",children:jsxRuntimeExports.jsx(Redo2,{size:16})}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium] mx-1"}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="h1",onClick:()=>Os("h1"),title:"Heading 1",children:jsxRuntimeExports.jsx(Heading1,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="h2",onClick:()=>Os("h2"),title:"Heading 2",children:jsxRuntimeExports.jsx(Heading2,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="h3",onClick:()=>Os("h3"),title:"Heading 3",children:jsxRuntimeExports.jsx(Heading3,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="paragraph",onClick:()=>Os("paragraph"),title:"Paragraph",children:"P"}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="quote",onClick:()=>Os("quote"),title:"Block quote",children:jsxRuntimeExports.jsx(Quote,{size:16})}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium] mx-1"}),jsxRuntimeExports.jsx(ToolbarButton,{active:Es.bold,onClick:()=>ds.dispatchCommand(d$3,"bold"),title:"Bold (⌘/Ctrl+B)",children:jsxRuntimeExports.jsx(Bold,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:Es.italic,onClick:()=>ds.dispatchCommand(d$3,"italic"),title:"Italic (⌘/Ctrl+I)",children:jsxRuntimeExports.jsx(Italic,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:Es.underline,onClick:()=>ds.dispatchCommand(d$3,"underline"),title:"Underline (⌘/Ctrl+U)",children:jsxRuntimeExports.jsx(Underline,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:Es.code,onClick:()=>ds.dispatchCommand(d$3,"code"),title:"Inline code",children:jsxRuntimeExports.jsx(CodeXml,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:Es.link,onClick:Ms,title:"Link",children:jsxRuntimeExports.jsx(Link,{size:16})}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium] mx-1"}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="ul",onClick:()=>Os("ul"),title:"Bulleted list",children:jsxRuntimeExports.jsx(List,{size:16})}),jsxRuntimeExports.jsx(ToolbarButton,{active:xs==="ol",onClick:()=>Os("ol"),title:"Numbered list",children:jsxRuntimeExports.jsx(ListOrdered,{size:16})}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium] mx-1"}),jsxRuntimeExports.jsx(ToolbarButton,{onClick:Ds,title:"Clear formatting",children:jsxRuntimeExports.jsx(Eraser,{size:16})}),jsxRuntimeExports.jsx("div",{className:"w-px h-6 bg-[--border-medium] mx-1"}),jsxRuntimeExports.jsx(ToolbarButton,{onClick:Bs,title:"Insert table",children:jsxRuntimeExports.jsx(Table,{size:16})}),jsxRuntimeExports.jsxs(ToolbarButton,{disabled:!Rs,onClick:()=>Fs(!0),title:"Add row",children:[jsxRuntimeExports.jsx(TableRowsSplit,{size:16}),jsxRuntimeExports.jsx(Plus,{size:14})]}),jsxRuntimeExports.jsxs(ToolbarButton,{disabled:!Rs||(Cs?.rows??0)<=1,onClick:Gs,title:"Remove row",children:[jsxRuntimeExports.jsx(TableRowsSplit,{size:16}),jsxRuntimeExports.jsx(Minus,{size:14})]}),jsxRuntimeExports.jsxs(ToolbarButton,{disabled:!Rs,onClick:()=>Us(!0),title:"Add column",children:[jsxRuntimeExports.jsx(TableColumnsSplit,{size:16}),jsxRuntimeExports.jsx(Plus,{size:14})]}),jsxRuntimeExports.jsxs(ToolbarButton,{disabled:!Rs||(Cs?.cols??0)<=1,onClick:Js,title:"Remove c
1455olumn",children:[jsxRuntimeExports.jsx(TableColumnsSplit,{size:16}),jsxRuntimeExports.jsx(Minus,{size:14})]})]})}var b=function(ds){const dn=new URLSearchParams;dn.append("code",ds);for(let ms=1;ms<arguments.length;ms++)dn.append("v",arguments[ms]);throw Error(`Minified Lexical error #${ds}; visit https://lexical.dev/docs/error?${dn} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)};function N({hasCellMerge:ds=!0,hasCellBackgroundColor:dn=!0,hasTabHandler:ms=!0}){const[xs]=o$5();return reactExports.useEffect((()=>(xs.hasNodes([Ve,J,Q])||b(10),xs.registerCommand(G,(({columns:bs,rows:Es,includeHeaders:ws})=>{const Rs=oe(Number(Es),Number(bs),ws);k$3(Rs);const js=Rs.getFirstDescendant();return Ur(js)&&js.select(),!0}),as))),[xs]),reactExports.useEffect((()=>{const bs=new Map,Es=Rs=>{const js=Rs.getKey(),Cs=xs.getElementByKey(js);if(Cs&&!bs.has(js)){const As=ke(Rs,Cs,xs,ms);bs.set(js,As)}};xs.getEditorState().read((()=>{const Rs=ze$1(Ve);for(const js of Rs)nt(js)&&Es(js)}));const ws=xs.registerMutationListener(Ve,(Rs=>{for(const[js,Cs]of Rs)if(Cs==="created")xs.getEditorState().read((()=>{const As=fe$1(js);nt(As)&&Es(As)}));else if(Cs==="destroyed"){const As=bs.get(js);As!==void 0&&(As.removeListeners(),bs.delete(js))}}));return()=>{ws();for(const[,Rs]of bs)Rs.removeListeners()}}),[xs,ms]),reactExports.useEffect((()=>{if(!ds)return xs.registerNodeTransform(J,(bs=>{if(bs.getColSpan()>1||bs.getRowSpan()>1){const[,,Es]=Ne(bs),[ws]=ye(Es,bs,bs),Rs=ws.length,js=ws[0].length;let Cs=Es.getFirstChild();if(!ee(Cs))throw Error("Expected TableNode first child to be a RowNode");const As=[];for(let ks=0;ks<Rs;ks++){if(ks!==0&&(Cs=Cs.getNextSibling(),!ee(Cs)))throw Error("Expected TableNode first child to be a RowNode");let Os=null;for(let Ms=0;Ms<js;Ms++){const Ds=ws[ks][Ms],Ps=Ds.cell;if(Ds.startRow===ks&&Ds.startColumn===Ms)Os=Ps,As.push(Ps);else if(Ps.getColSpan()>1||Ps.getRowSpan()>1){if(!q(Ps))throw Error("Expected TableNode cell to be a TableCellNode");const Ls=j(Ps.__headerState);Os!==null?Os.insertAfter(Ls):V$4(Cs,Ls)}}}for(const ks of As)ks.setColSpan(1),ks.setRowSpan(1)}}))}),[xs,ds]),reactExports.useEffect((()=>{if(!dn)return xs.registerNodeTransform(J,(bs=>{bs.getBackgroundColor()!==null&&bs.setBackgroundColor(null)}))}),[xs,dn,ds]),null}function LexicalEditor({initialMarkdown:ds,loadId:dn,onMarkdownChange:ms}){const xs=reactExports.useMemo(()=>({namespace:"manualmagic-sop-editor",editable:!0,nodes:[Ct$1,pt$1,R,E$1,_,L$1,Ve,Q,J],theme:{paragraph:"mb-3",heading:{h1:"text-3xl font-bold mb-4",h2:"text-2xl font-semibold mb-3",h3:"text-xl font-semibold mb-2"},quote:"border-l-4 pl-3 italic text-[--text-medium] mb-3",list:{nested:{listitem:"ml-6"},ul:"list-disc ml-5 mb-3",ol:"list-decimal ml-5 mb-3"},link:"text-[--color-primary] underline",code:"font-mono bg-[--background-neutral] rounded px-1",table:"w-full border-collapse mb-3",tableRow:"",tableCell:"border border-[--border-medium] px-3 py-2 align-top text-sm",tableCellHeader:"bg-[--background-neutral] font-semibold",text:{underline:"underline underline-offset-2",bold:"font-bold",italic:"italic",code:"font-mono bg-[--background-neutral] rounded px-1"}},onError(Es){console.error(Es)}}),[]),bs=(Es,ws,Rs)=>{Rs.has(MARKDOWN_IMPORT_TAG)||Es.read(()=>{const js=Pt(MARKDOWN_TRANSFORMERS);ms(js)})};return jsxRuntimeExports.jsx(f$1,{initialConfig:xs,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col flex-1 min-h-0 w-full h-full",children:[jsxRuntimeExports.jsx(FormattingToolbar,{}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col flex-1 min-h-0 w-full rounded-b-xl overflow-hidden bg-[#f1e9d24a]",children:[jsxRuntimeExports.jsx(x$2,{contentEditable:jsxRuntimeExports.jsx(l$1,{className:"flex-1 min-h-0 w-full max-w-full  p-1 md:p-5 outline-none leading-7 overflow-auto overflow-x-hidden break-words whitespace-pre-wrap"}),placeholder:jsxRuntimeExports.jsx("div",{className:"p-5 text-[--text-muted]",children:"Start writing…"}),ErrorBoundary:n}),jsxRuntimeExports.jsx(c$1,{}),jsxRuntimeExports.jsx(u$1,{}),jsxRuntimeExports.jsx(u,{}),jsxRuntimeExports.jsx(N,{}),jsxRuntimeExports.jsx(i,{onChange:bs,ignoreSelectionChange:!0}),jsxRuntimeExports.jsx(MarkdownIOPlugin,{initialMarkdown:ds,loadId:dn})]})]})})}function SavingStatus({status:ds}){return jsxRuntimeExports.jsx("div",{className:`fixed bottom-10 right-10 px-4 py-2 rounded-lg transition-opacity duration-300 ${ds===SavableInputStatus.Ready?"opacity-0":"opacity-100"} bg-white z-50 shadow-lg border border-gray-300`,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center text-xl",children:[ds===SavableInputStatus.Processing&&jsxRuntimeExports.jsxs("div",{className:"flex flex-row",children:[jsxRuntimeExports.jsx(Saving,{colour:"#000",className:"w-[30px] h-[30px]"}),jsxRuntimeExports.jsx("div",{className:"ml-3 text-black",children:"Saving..."})]}),ds===SavableInputStatus.Done&&jsxRuntimeExports.jsxs("div",{className:"flex flex-row",children:[jsxRuntimeExports.jsx(Tick,{colour:"#000",className:"!w-[30px] !h-[30px]"}),jsxRuntimeExports.jsx("div",{className:"ml-3 text-black",children:"All changes saved."})]}),ds===SavableInputStatus.Failure&&jsxRuntimeExports.jsxs("div",{className:"flex flex-row",children:[jsxRuntimeExports.jsx(Close,{c
1455olour:"#000",className:"w-[30px] h-[30px] mr-2"}),jsxRuntimeExports.jsx("div",{className:"ml-3 text-red-800",children:"Failed to save changes."})]})]})})}function BaseConfirmDialog(ds){const{open:dn,onClose:ms,title:xs,message:bs,children:Es}=ds,ws=reactExports.useRef(null);reactExports.useEffect(()=>{const js=ws.current;if(!js)return;dn?js.showModal():js.close();const Cs=()=>ms();return js.addEventListener("close",Cs),()=>{js.removeEventListener("close",Cs)}},[dn,ms]);const Rs=js=>{js.target===ws.current&&ms()};return jsxRuntimeExports.jsxs("dialog",{ref:ws,onClick:Rs,className:"w-full max-w-md bg-white rounded-xl shadow-xl backdrop:bg-black/70 p-0 border-0 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:[jsxRuntimeExports.jsx("div",{className:"px-6 py-4",children:jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-dark",children:xs})}),jsxRuntimeExports.jsx("div",{className:"px-6 py-4",children:jsxRuntimeExports.jsx("p",{className:"text-gray-600",children:bs})}),jsxRuntimeExports.jsx("div",{className:"px-6 py-4 flex items-center justify-end gap-3",children:Es})]})}function AsyncConfirmModal(ds){const{open:dn,onClose:ms,title:xs,message:bs,confirmText:Es="Confirm",cancelText:ws="Cancel",danger:Rs=!1,validate:js,save:Cs,onSuccess:As,onFailure:ks,showSuccessMillis:Os=200}=ds,[Ms,Ds]=reactExports.useState(null),Ps=Bs=>{Ds(null),ms(),As?.(Bs)},Ls=Bs=>{const Fs=Object.values(Bs)[0]||"An error occurred";Ds(Fs),ks?.(Bs)};return jsxRuntimeExports.jsx(BaseConfirmDialog,{open:dn,onClose:()=>{Ds(null),ms()},title:xs,message:bs,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full",children:[Ms&&jsxRuntimeExports.jsx("div",{className:"w-full mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-700 text-sm",children:Ms}),jsxRuntimeExports.jsxs("div",{className:"flex flex-row w-full justify-end gap-2 mt-2",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,onClick:ms,text:ws}
1455),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:Es,validate:js,save:Cs,onSuccess:Ps,onFailure:Ls,showSuccessMillis:Os,className:Rs?"!bg-red-600 !hover:bg-red-700":""})]})]})})}function EditorTab({id:ds}){const dn=useNavigate(),[ms,xs]=reactExports.useState([]),[bs,Es]=reactExports.useState(""),[ws,Rs]=reactExports.useState(0),js=reactExports.useRef(""),[Cs,As]=reactExports.useState(!1),[ks,Os]=reactExports.useState(!1),[Ms,Ds]=reactExports.useState(!1),[Ps,Ls]=reactExports.useState(PageState.NotReady),{save:Bs,status:Fs,cancelPendingSave:Us}=useNetworkDebounce(async Zs=>await Sdk.businessProcessClient.modifyContent(ds,Zs));reactExports.useEffect(()=>{(async()=>{const Zs=await new TemplatesClient().list();xs(Zs.map(Ys=>({id:Ys.id,name:Ys.name})))})()},[]),reactExports.useEffect(()=>{Ps===PageState.NotReady&&(Ls(PageState.Loading),(async()=>{const Zs=await Sdk.businessProcessClient.fetchContent(ds);js.current=Zs.data??"",Es(Zs.data??""),Ls(PageState.Ready)})())},[ds,Ps]);const Gs=Zs=>{Us(),js.current=Zs,Es(Zs),Rs(Ys=>Ys+1)},Js=Zs=>{Gs(Zs),As(!1)},Ws=Zs=>{Gs(Zs),Ds(!1)};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Ps===PageState.Ready&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>dn("/settings/brand-voice"),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(Settings2,{size:16})," ","Brand Voice"]})}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,onClick:()=>Ds(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(History,{size:16})," ","History"]})}),notBlank(bs)&&jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,onClick:()=>Os(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(Trash2,{size:16})," ","Reset"]})}),jsxRuntimeExports.jsx(Button,{onClick:()=>As(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(RotateCcw,{size:16})," ",notBlank(bs)?"Revise Draft":"Generate Draft"]})})]})}),jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0",children:jsxRuntimeExports.jsx(LexicalEditor,{initialMarkdown:bs,loadId:ws,onMarkdownChange:Zs=>{Zs!==js.current&&(js.current=Zs,Bs({content:Zs}))}})}),Cs&&jsxRuntimeExports.jsx(RegenerateSOPModal,{id:ds,onClose:()=>As(!1),onSubmit:Js,templates:ms,existing:notBlank(bs)}),Ms&&jsxRuntimeExports.jsx(SopHistoryModal,{id:ds,onClose:()=>Ds(!1),onRestore:Ws}),jsxRuntimeExports.jsx(AsyncConfirmModal,{open:ks,onClose:()=>Os(!1),title:"Reset SOP",message:"This will delete all current content from this SOP. You can then start fresh - either type new info or generate a new draft. This cannot be undone.",confirmText:"Reset",cancelText:"Cancel",danger:!0,save:()=>Sdk.businessProcessClient.modifyContent(ds,{content:""}),onSuccess:()=>Gs("")}),jsxRuntimeExports.jsx(SavingStatus,{status:Fs})]})})}function GenerateChecklistModal({id:ds,onClose:dn,onSubmit:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(!1);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-2xl bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Generate Checklist"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"p-4 space-y-4",children:Es?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx("p",{className:"text-base text-[--text-medium]",children:"Writing checklist…"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Feedback (Optional)"}),jsxRuntimeExports.jsx("textarea",{value:xs,onChange:Rs=>bs(Rs.target.value),rows:3,className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary",placeholder:"e.g. tighten Minimum Standards, add handoff steps…"})]}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-[--text-medium]",children:["Brand voice is applied automatically when regenerating. You can adjust voice in ",jsxRuntimeExports.jsx("strong",{children:"Settings → Brand Voice"}),"."]})]})}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn,children:"Cancel"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Generate Checklist",save:()=>(ws(!0),Sdk.checklistClient.generateChecklist(ds,xs)),onSuccess:Rs=>{ws(!1),ms(Rs?.data??"")},onFailure:()=>{ws(!1),dn()}})]})]})})}function ConfirmModal(ds){const{open:dn,onClose:ms,onConfirm:xs,title:bs,message:Es,confirmText:ws="Confirm",cancelText:Rs="Cancel",danger:js=!1}=ds,Cs=()=>{xs(),ms()};return jsxRuntimeExports.jsxs(BaseConfirmDialog,{open:dn,onClose:ms,title:bs,message:Es,children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,onClick:ms,text:Rs}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,text:ws,onClick:Cs,className:js?"!bg-red-600 !hover:bg-red-700":"",children:ws})]})}function ChecklistTab({id:ds}){const[dn,ms]=reactExports.useState(!1),[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(PageState.NotReady),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(),ks=()=>{Sdk.checklistClient.fetchChecklists(ds).then(Zs=>{bs(Zs.data),ws(PageState.Ready)})};reactExports.useEffect(()=>{Es===PageState.NotReady&&ks()},[ds,Es]);const Os=()=>{As(void 0),js(!0)},Ms=Zs=>{As(Zs.id),js(!1)},Ds=()=>{As(void 0),js(!1)},Ps=async(Zs,Ys)=>{const Qs=Ys.map(ai=>
1455ai.trim()).filter(Boolean);if(Qs.length===0){Ds();return}Cs?await Sdk.checklistClient.modifyChecklist(Cs,Zs,Qs):await Sdk.checklistClient.addChecklist(ds,Zs,Qs),As(void 0),js(!1),ws(PageState.NotReady)},[Ls,Bs]=reactExports.useState(!1),[Fs,Us]=reactExports.useState(),Gs=Zs=>{Us(Zs),Bs(!0)},Js=async()=>{Fs&&(await Sdk.checklistClient.removeChecklist(Fs),Bs(!1),Us(void 0),ws(PageState.NotReady))},Ws=reactExports.useMemo(()=>Rs||Cs,[Rs,Cs]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Es===PageState.Ready&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col ",children:[!Ws&&jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>Os(),text:"New checklist"}),jsxRuntimeExports.jsx(Button,{onClick:()=>ms(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(RotateCcw,{size:16}),"Generate"]})})]})}),Ws&&jsxRuntimeExports.jsx(NamedListEditor,{initialName:Cs?xs.find(Zs=>Zs.id===Cs)?.name??"":"",initialItems:Cs?xs.find(Zs=>Zs.id===Cs)?.items??[""]:[""],onCancel:Ds,onSave:Ps}),!Ws&&xs.map(Zs=>jsxRuntimeExports.jsxs("div",{className:"mt-4 flex-1 mb-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center mb-2",children:[jsxRuntimeExports.jsx("div",{className:"flex-1 font-bold",children:Zs.name}),jsxRuntimeExports.jsx("button",{className:"icon-btn ml-auto",onClick:()=>Ms(Zs),title:"Edit",children:jsxRuntimeExports.jsx(PenLine,{className:"text-primary",size:16})}),jsxRuntimeExports.jsx("button",{className:"icon-btn ml-2 text-red-600",onClick:()=>Gs(Zs.id),title:"Delete",children:jsxRuntimeExports.jsx(Trash2,{size:16,color:"red"})})]}),jsxRuntimeExports.jsx("div",{className:"mb-2",children:Zs.items.map((Ys,Qs)=>jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center",children:[jsxRuntimeExports.jsx(Circle,{size:30,className:"pr-3 min-w-[30px]"}),jsxRuntimeExports.jsx("span",{children:Ys})]},Qs))}),jsxRuntimeExports.jsx("hr",{})]},Zs.id)),dn&&jsxRuntimeExports.jsx(GenerateChecklistModal,{id:ds,onClose:()=>ms(!1),onSubmit:()=>{ws(PageState.NotReady),ms(!1)}}),jsxRuntimeExports.jsx(ConfirmModal,{open:Ls,onClose:()=>Bs(!1),onConfirm:Js,title:"Delete checklist",message:"Are you sure you want to delete this checklist? This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",danger:!0})]})})}function GenerateFAQModal({id:ds,onClose:dn,onSubmit:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(!1);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-2xl bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Generate FAQs"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"p-4 space-y-4",children:Es?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx("p",{className:"text-base text-[--text-medium]",children:"Writing FAQ…"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Feedback (Optional)"}),jsxRuntimeExports.jsx("textarea",{value:xs,onChange:Rs=>bs(Rs.target.value),rows:3,className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary",placeholder:"e.g. add common objections, clarify prerequisites…"})]}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-[--text-medium]",children:["Brand voice is applied automatically when generating. You can adjust voice in ",jsxRuntimeExports.jsx("strong",{children:"Settings → Brand Voice"}),"."]})]})}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn,children:"Cancel"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Generate FAQs",save:()=>(ws(!0),Sdk.faqClient.generateFaq(ds,xs)),onSuccess:Rs=>{ws(!1),ms(Rs?.data??"")},onFailure:()=>{ws(!1),dn()}})]})]})})}function FAQTab({id:ds}){const[dn,ms]=reactExports.useState(!1),[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(PageState.NotReady),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(),ks=()=>{Sdk.faqClient.fetchFaqs(ds).then(Ws=>{bs(Ws.data),ws(PageState.Ready)})};reactExports.useEffect(()=>{Es===PageState.NotReady&&ks()},[ds,Es]);const Os=()=>{As(void 0),js(!0)},Ms=Ws=>{As(Ws.id),js(!1)},Ds=()=>{As(void 0),js(!1)},Ps=async(Ws,Zs)=>{const Ys=Zs.map(Qs=>
1455Qs.trim()).filter(Boolean);if(Ys.length===0){Ds();return}Cs?await Sdk.faqClient.modifyFaq(Cs,Ws,Ys):await Sdk.faqClient.addFaq(ds,Ws,Ys),As(void 0),js(!1),ws(PageState.NotReady)},[Ls,Bs]=reactExports.useState(!1),[Fs,Us]=reactExports.useState(),Gs=Ws=>{Us(Ws),Bs(!0)},Js=async()=>{Fs&&(await Sdk.faqClient.removeFaq(Fs),Bs(!1),Us(void 0),ws(PageState.NotReady))};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Es===PageState.Ready&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col ",children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>Os(),text:"New FAQ"}),jsxRuntimeExports.jsx(Button,{onClick:()=>ms(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(RotateCcw,{size:16}),"Generate"]})})]})}),(Rs||Cs)&&jsxRuntimeExports.jsx(NamedListEditor,{initialName:Cs?xs.find(Ws=>Ws.id===Cs)?.name??"":"",initialItems:Cs?xs.find(Ws=>Ws.id===Cs)?.items??[""]:[""],onCancel:Ds,onSave:Ps}),!(Rs||Cs)&&xs.map(Ws=>jsxRuntimeExports.jsxs("div",{className:"mt-4 flex-1 mb-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center mb-2",children:[jsxRuntimeExports.jsx("div",{className:"flex-1 font-bold mb-2 text-lg",children:Ws.name}),jsxRuntimeExports.jsx("button",{className:"icon-btn ml-auto",onClick:()=>Ms(Ws),title:"Edit",children:jsxRuntimeExports.jsx(PenLine,{className:"text-primary",size:16})}),jsxRuntimeExports.jsx("button",{className:"icon-btn ml-2 text-red-600",onClick:()=>Gs(Ws.id),title:"Delete",children:jsxRuntimeExports.jsx(Trash2,{size:16,color:"red"})})]}),jsxRuntimeExports.jsx("div",{className:"mb-2",children:Ws.items.map((Zs,Ys)=>jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center mb-4",children:Zs},Ys))}),jsxRuntimeExports.jsx("hr",{})]},Ws.id)),dn&&jsxRuntimeExports.jsx(GenerateFAQModal,{id:ds,onClose:()=>ms(!1),onSubmit:()=>{ws(PageState.NotReady),ms(!1)}}),jsxRuntimeExports.jsx(ConfirmModal,{open:Ls,onClose:()=>Bs(!1),onConfirm:Js,title:"Delete FAQ list",message:"Are you sure you want to delete this FAQ list? This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",danger:!0})]})})}function GenerateIllustrationModal({id:ds,onClose:dn,onSubmit:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(!1);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-2xl bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Generate Image"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsx("div",{className:"p-4",children:"Image generation can take several minutes. We'll send you an email once it's ready"}),jsxRuntimeExports.jsx("div",{className:"p-4 space-y-4",children:Es?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-12",children:jsxRuntimeExports.jsx("p",{className:"text-base text-[--text-medium]",children:"Generating illustration…"})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Feedback (Optional)"}),jsxRuntimeExports.jsx("textarea",{value:xs,onChange:Rs=>bs(Rs.target.value),rows:3,className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary",placeholder:"e.g. flat illustration, infographic, diagram of…"})]})})}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn,children:"Cancel"}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Generate Image",save:()=>(ws(!0),Sdk.processAssetsClient.generateIllustration(ds,xs)),onSuccess:Rs=>{ws(!1),ms(Rs?.data??"")},onFailure:()=>{ws(!1),dn()}})]})]})})}function guessKind(ds){const dn=ds.name.toLowerCase();return dn.endsWith(".pdf")?"pdf":/(\.doc|\.docx)$/.test(dn)?"doc":/(\.txt|\.md)$/.test(dn)?"text":"other"}function formatBytes(ds){if(!ds&&ds!==0)return"-";const dn=["B","KB","MB","GB","TB"],ms=Math.min(Math.floor(Math.log(Math.max(ds,1))/Math.log(1024)),dn.length-1);return`${(ds/Math.pow(1024,ms)).toFixed(ms===0?0:2)} ${dn[ms]}`}async function sha1(ds){const dn=await ds.arrayBuffer(),ms=await crypto.subtle.digest("SHA-1",dn);return Array.from(new Uint8Array(ms)).map(xs=>xs.toString(16).padStart(2,"0")).join("")}const MAX_UPLOAD_BYTES=1e3*1024*1024,MAX_UPLOAD_LABEL="1 GB";function baseNameOf(ds){const dn=ds.split(/[/\\]/).pop()||ds,ms=dn.lastIndexOf(".");return ms>0?dn.substring(0,ms):dn}function tooLargeMessage(ds){return`File is ${formatBytes(ds)} - max limit is ${MAX_UPLOAD_LABEL}.`}function UploadAssetModal({id:ds,onClose:dn,onSubmit:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(null),[Rs,js]=reactExports.useState(null),[Cs,As]=reactExports.useState(null),ks=reactExports.useCallback(Ps=>{const Ls=Ps.target.files&&Ps.target.files.length>0?Ps.target.files[0]:null;ws(Ls),Ls?(bs(Bs=>Bs&&Bs.trim().length>0?Bs:baseNameOf(Ls.name)),js(Ls.size>MAX_UPLOAD_BYTES?tooLargeMessage(Ls.size):null)):js(null)},[]),Os=reactExports.useCallback(()=>{const Ps={};return Es?Es.size>MAX_UPLOAD_BYTES&&(Ps.file=tooLargeMessage(Es.size)):Ps.file="Please choose a file",(!xs||xs.trim().length===0)&&(Ps.name="Please enter a name"),js(Object.values(Ps)[0]||null),Ps},[Es,xs]),Ms=reactExports.useCallback(()=>Es?(As(0),Sdk.processAssetsClient.uploadAsset(ds,xs.trim(),Es,Ps=>As(Ps))):Promise.reject(new Error("No file selected")),[Es,ds,xs]),Ds=reactExports.useCallback(Ps=>
1455{As(null),js(Ps.response||Object.values(Ps)[0]||"Upload failed. Please try again.")},[]);return jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-30 bg-black/30 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-lg bg-white rounded-xl shadow-lg border border-[--border-medium]",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[--border-medium]",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-[--color-heading]",children:"Upload asset"}),jsxRuntimeExports.jsx("button",{onClick:dn,className:"icon-btn","aria-label":"Close",children:jsxRuntimeExports.jsx(X$4,{size:18})})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 space-y-4",children:[Rs&&jsxRuntimeExports.jsx("div",{className:"text-sm text-red-600 bg-red-50 border border-red-200 rounded-md p-2",children:Rs}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"File"}),jsxRuntimeExports.jsx("input",{type:"file",onChange:ks,className:"block w-full text-sm text-gray-900 border border-[--border-medium] rounded-lg cursor-pointer p-3 bg-gray-50 focus:outline-none focus:ring-2 focus:ring-tertiary"}),Es&&jsxRuntimeExports.jsxs("p",{className:"text-xs text-[--text-medium] mt-1",children:[formatBytes(Es.size)," · max ",MAX_UPLOAD_LABEL]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm text-[--text-medium] mb-1",children:"Name"}),jsxRuntimeExports.jsx("input",{type:"text",value:xs,onChange:Ps=>bs(Ps.target.value),placeholder:"Enter a name for this asset",className:"w-full rounded-lg border border-[--border-medium] p-3 focus:outline-none focus:ring-2 focus:ring-tertiary"})]}),Cs!==null&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"h-2 w-full bg-gray-200 rounded-full overflow-hidden",children:jsxRuntimeExports.jsx("div",{className:"h-full bg-tertiary transition-all duration-150",style:{width:`${Cs}%`}})}),jsxRuntimeExports.jsxs("div",{className:"text-xs text-[--text-medium] mt-1",children:["Uploading… ",Cs,"%"]})]})]}),jsxRuntimeExports.jsxs("div",{className:"p-4 border-t border-[--border-medium] flex justify-end gap-3",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Upload",validate:Os,save:Ms,onSuccess:()=>{ms()},onFailure:Ds})]})]})})}function AssetsTab({id:ds}){const[dn,ms]=reactExports.useState([]),[xs,bs]=reactExports.useState(PageState.NotReady),[Es,ws]=reactExports.useState(!1),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(!1),[ks,Os]=reactExports.useState(!1),[Ms,Ds]=reactExports.useState(null),Ps=async()=>{ws(!0);try{const{data:Us}=await Sdk.processAssetsClient.fetchAssets(ds),Gs=[...Us??[]].sort((Js,Ws)=>(Ws.createdEpoch??0)-(Js.createdEpoch??0));ms(Gs),bs(PageState.Ready)}finally{ws(!1)}},Ls=async Us=>{const Gs=window.open("","_blank");try{const{data:Js}=await Sdk.processAssetsClient.downloadAsset(Us);Js?Gs?Gs.location.href=Js:window.location.assign(Js):Gs&&Gs.close()}catch(Js){Gs&&Gs.close(),console.error("Failed to download asset",Js)}},Bs=Us=>{Ds(Us),Os(!0)},Fs=async()=>{if(Ms)try{await Sdk.processAssetsClient.deleteAsset(Ms.id),Os(!1),Ds(null),bs(PageState.NotReady)}catch(Us){console.error("Failed to delete asset",Us)}};return reactExports.useEffect(()=>{xs===PageState.NotReady&&Ps()},[ds,xs]),jsxRuntimeExports.jsx("div",{className:"space-y-3",children:xs===PageState.Ready&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>{Ps()},disabled:Es,jsx:jsxRuntimeExports.jsx("span",{className:"inline-flex items-center gap-2",children:jsxRuntimeExports.jsx(RefreshCw,{size:16,className:Es?"animate-spin":""})})}),jsxRuntimeExports.jsx(Button,{onClick:()=>As(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(Upload$1,{size:16}),"Upload asset"]})}),jsxRuntimeExports.jsx(Button,{onClick:()=>js(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(RotateCcw,{size:16}),"Generate Image"]})})]})}),jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:dn.map(Us=>jsxRuntimeExports.jsxs("div",{className:"border border-[var(--border-medium)] rounded-md p-3 flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("div",{className:"font-medium",children:Us.name}),jsxRuntimeExports.jsx("div",{className:"text-xs text-[--text-medium]",children:Us.createdEpoch?`Uploaded ${DateTime.fromSeconds(Us.createdEpoch).toFormat("ff")}`:""})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>Ls(Us.id),jsx:jsxRuntimeExports.jsx(Download,{className:"text-primary",size:20})}),jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Secondary,onClick:()=>Bs(Us),jsx:jsxRuntimeExports.jsx(Trash2,{color:"red",size:20})})]})]},Us.id))}),Rs&&jsxRuntimeExports.jsx(GenerateIllustrationModal,{id:ds,onClose:()=>js(!1),onSubmit:()=>{js(!1),bs(PageState.NotReady)}}),Cs&&jsxRuntimeExports.jsx(UploadAssetModal,{id:ds,onClose:()=>As(!1),onSubmit:()=>{As(!1),bs(PageState.NotReady)}}),jsxRuntimeExports.jsx(ConfirmModal,{open:ks,onClose:()=>{Os(!1),Ds(null)},onConfirm:Fs,title:"Delete asset",message:`Are you sure you want to delete "${Ms?.name??"this asset"}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",danger:!0})]})})}function ExportSOPModal({id:ds,onClose:dn}){const[ms,xs]=reactExports.useState(!1),[bs,Es]=reactExports.useState(!1),[ws,Rs]=reactExports.useState(null);return jsxRuntimeExports.jsx(Modal,{onClose:dn,title:"Export SOP",children:jsxRuntimeExports.jsx("div",{className:"space-y-4",children:ws?jsxRuntimeExports.jsxs("div",{className:"py-8 text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-base text-[--secondary] mb-4",children:ws}),jsxRuntimeExports.jsx(Button,{text:"Close",buttonType:ButtonType.Primary,onClick:dn})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:"text-[--text-medium]",children:"Select what to include in the export:"}),jsxRuntimeExports.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:ms,onChange:js=>xs(js.target.checked),className:"w-4 h-4 rounded border-[--border-medium] text-[--color-primary] focus:ring-2 focus:ring-tertiary"}),jsxRuntimeExports.jsx("span",{className:"text-[--secondary]",children:"Include Checklist"})]}),jsxRuntimeExports.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:bs,onChange:js=>Es(js.target.checked),className:"w-4 h-4 rounded border-[--border-medium] text-[--color-primary] focus:ring-2 focus:ring-tertiary"}),jsxRuntimeExports.jsx("span",{className:"text-[--secondary]",children:"Include FAQ"})]}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:dn}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Export",save:()=>Sdk.processAssetsClient.generateProcessPdf(ds,ms,bs),onSuccess:js=>{const Cs=js?.data;Cs?.message&&Rs(Cs.message)}
1455,onFailure:()=>{dn()}})]})]})})})}const Label="_Label_12tzx_1",Select="_Select_12tzx_6",Icon="_Icon_12tzx_19",styles={Label,Select,Icon};function FormSelect({className:ds,labelClassName:dn,label:ms,name:xs,options:bs,...Es}){return jsxRuntimeExports.jsxs("div",{className:`${ds||""}`,children:[ms&&jsxRuntimeExports.jsx("label",{htmlFor:xs,children:jsxRuntimeExports.jsx("div",{className:`${styles.Label} ${dn||""} text-lg`,children:ms})}),jsxRuntimeExports.jsxs("div",{className:"overflow-hidden relative mt-2",children:[jsxRuntimeExports.jsx("select",{className:`${styles.Select} w-full bg-white px-3 py-[5px] text-[15px] outline-none`,name:xs,...Es,children:bs?bs.map(ws=>jsxRuntimeExports.jsx("option",{value:ws.value,children:ws.text},ws.text)):""}),jsxRuntimeExports.jsx(ChevronDown,{className:`${styles.Icon}`})]})]})}function OverviewTab({card:ds,onUpdate:dn}){const[ms,xs]=reactExports.useState(!1),[bs,Es]=reactExports.useState(!1),ws=useNavigate(),Rs=ds.category;return jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>Es(!0),className:"rounded-xs border border-gray-500 px-3 py-2 text-red-600 hover:bg-red-50 cursor-pointer","aria-label":"Delete SOP",title:"Delete SOP",children:jsxRuntimeExports.jsx(Trash2,{size:16})}),jsxRuntimeExports.jsx(Button,{onClick:()=>xs(!0),jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:["Design and Export SOP",jsxRuntimeExports.jsx(Download,{size:16})]})})]})}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 flex-1 mt-2",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(FormTextArea,{label:"Objective",name:"objective",defaultValue:ds.objective,onInputUpdated:js=>dn({...ds,objective:js}),characterLimit:2e3,rows:2,autoSize:!1}),jsxRuntimeExports.jsx(FormSelect,{label:"Category",value:Rs,onChange:js=>{dn({...ds,category:js.target.value})},options:PillarMap.map(js=>({value:js.value,text:js.value}))}),ds.owner?.name&&jsxRuntimeExports.jsx("div",{className:"mt-5",children:jsxRuntimeExports.jsxs("label",{className:"block text-sm text-[var(--secondary)]",children:["Created by ",ds.owner?.name]})})]}),jsxRuntimeExports.jsx("div",{className:"space-y-3",children:jsxRuntimeExports.jsx(FormList,{label:"Tags",name:"tags",defaultItems:[],externalItems:ds.tags,onInputUpdated:js=>{const Cs={...ds,tags:js};dn(Cs)},rows:1,showAdd:!1,showDelete:!0,autoAddBlankRow:!0,examples:"tags will appear on the board cards"})})]}),ms&&jsxRuntimeExports.jsx(ExportSOPModal,{id:ds.id,onClose:()=>xs(!1)}),jsxRuntimeExports.jsx(ConfirmModal,{open:bs,onClose:()=>Es(!1),onConfirm:async()=>{await Sdk.businessProcessClient.deleteSOP(ds.id),ws("/board")},title:"Delete SOP",message:"Are you sure you want to delete this SOP? This will also permanently delete any associated assets.",confirmText:"Delete SOP",cancelText:"Cancel",danger:!0})]})}var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(ds,dn,ms)=>dn in ds?__defProp(ds,dn,{enumerable:!0,configurable:!0,writable:!0,value:ms}):ds[dn]=ms,__spreadValues=(ds,dn)=>{for(var ms in dn||(dn={}))__hasOwnProp.call(dn,ms)&&__defNormalProp(ds,ms,dn[ms]);if(__getOwnPropSymbols)for(var ms of __getOwnPropSymbols(dn))__propIsEnum.call(dn,ms)&&__defNormalProp(ds,ms,dn[ms]);return ds},__objRest=(ds,dn)=>{var ms={};for(var xs in ds)__hasOwnProp.call(ds,xs)&&dn.indexOf(xs)<0&&(ms[xs]=ds[xs]);if(ds!=null&&__getOwnPropSymbols)for(var xs of __getOwnPropSymbols(ds))dn.indexOf(xs)<0&&__propIsEnum.call(ds,xs)&&(ms[xs]=ds[xs]);return ms};var qrcodegen;(ds=>{const dn=class So{constructor(js,Cs,As,ks){if(this.version=js,this.errorCorrectionLevel=Cs,this.modules=[],this.isFunction=[],js<So.MIN_VERSION||js>So.MAX_VERSION)throw new RangeError("Version value out of range");if(ks<-1||ks>7)throw new RangeError("Mask value out of range");this.size=js*4+17;let Os=[];for(let Ds=0;Ds<this.size;Ds++)Os.push(!1);for(let Ds=0;Ds<this.size;Ds++)this.modules.push(Os.slice()),this.isFunction.push(Os.slice());this.drawFunctionPatterns();const Ms=this.addEccAndInterleave(As);if(this.drawCodewords(Ms),ks==-1){let Ds=1e9;for(let Ps=0;Ps<8;Ps++){this.applyMask(Ps),this.drawFormatBits(Ps);const Ls=this.getPenaltyScore();Ls<Ds&&(ks=Ps,Ds=Ls),this.applyMask(Ps)}}bs(0<=ks&&ks<=7),this.mask=ks,this.applyMask(ks),this.drawFormatBits(ks),this.isFunction=[]}static encodeText(js,Cs){const As=ds.QrSegment.makeSegments(js);return So.encodeSegments(As,Cs)}static encodeBinary(js,Cs){const As=ds.QrSegment.makeBytes(js);return So.encodeSegments([As],Cs)}static encodeSegments(js,Cs,As=1,ks=40,Os=-1,Ms=!0){if(!(So.MIN_VERSION<=As&&As<=ks&&ks<=So.MAX_VERSION)||Os<-1||Os>7)throw new RangeError("Invalid value");let Ds,Ps;for(Ds=As;;Ds++){const Us=So.getNumDataCodewords(Ds,Cs)*8,Gs=ws.getTotalBits(js,Ds);if(Gs<=Us){Ps=Gs;break}if(Ds>=ks)throw new RangeError("Data too long")}for(const Us of[So.Ecc.MEDIUM,So.Ecc.QUARTILE,So.Ecc.HIGH])Ms&&Ps<=So.getNumDataCodewords(Ds,Us)*8&&(Cs=Us);let Ls=[];for(const Us of js){ms(Us.mode.modeBits,4,Ls),ms(Us.numChars,Us.mode.numCharCountBits(Ds),Ls);for(const Gs of Us.getData())Ls.push(Gs)}bs(Ls.length==Ps);const Bs=So.getNumDataCodewords(Ds,Cs)*8;bs(Ls.length<=Bs),ms(0,Math.min(4,Bs-Ls.length),Ls),ms(0,(8-Ls.length%8)%8,Ls),bs(Ls.length%8==0);for(let Us=236;Ls.length<Bs;Us^=253)ms(Us,8,Ls);let Fs=[];for(;Fs.length*8<Ls.length;)Fs.push(0);return Ls.forEach((Us,Gs)=>Fs[Gs>>>3]|=Us<<7-(Gs&7)),new So(Ds,Cs,Fs,Os)}getModule(js,Cs){return 0<=js&&js<this.size&&0<=Cs&&Cs<this.size&&this.modules[Cs][js]}getModules(){return this.modules}drawFunctionPatterns(){for(let As=0;As<this.size;As++)this.setFunctionModule(6,As,As%2==0),this.setFunctionModule(As,6,As%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const js=this.getAlignmentPatternPositions(),Cs=js.length;for(let As=0;As<Cs;As++)for(let ks=0;ks<Cs;ks++)As==0&&ks==0||As==0&&ks==Cs-1||As==Cs-1&&ks==0||this.drawAlignmentPattern(js[As],js[ks]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(js){const Cs=this.errorCorrectionLevel.formatBits<<3|js;let As=Cs;for(let Os=0;Os<10;Os++)As=As<<1^(As>>>9)*1335;const ks=(Cs<<10|As)^21522;bs(ks>>>15==0);for(let Os=0;Os<=5;Os++)this.setFunctionModule(8,Os,xs(ks,Os));this.setFunctionModule(8,7,xs(ks,6)),this.setFunctionModule(8,8,xs(ks,7)),this.setFunctionModule(7,8,xs(ks,8));for(let Os=9;Os<15;Os++)this.setFunctionModule(14-Os,8,xs(ks,Os));for(let Os=0;Os<8;Os++)this.setFunctionModule(this.size-1-Os,8,xs(ks,Os));for(let Os=8;Os<15;Os++)this.setFunctionModule(8,this.size-15+Os,xs(ks,Os));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let js=this.version;for(let As=0;As<12;As++)js=js<<1^(js>>>11)*7973;const Cs=this.version<<12|js;bs(Cs>>>18==0);for(let As=0;As<18;As++){const ks=xs(Cs,As),Os=this.size-11+As%3,Ms=Math.floor(As/3);this.setFunctionModule(Os,Ms,ks),this.setFunctionModule(Ms,Os,ks)}}drawFinderPattern(js,Cs){for(let As=-4;As<=4;As++)for(let ks=-4;ks<=4;ks++){const Os=Math.max(Math.abs(ks),Math.abs(As)),Ms=js+ks,Ds=Cs+As;0<=Ms&&Ms<this.size&&0<=Ds&&Ds<this.size&&this.setFunctionModule(Ms,Ds,Os!=2&&Os!=4)}}drawAlignmentPattern(js,Cs){for(let As=-2;As<=2;As++)for(let ks=-2;ks<=2;
1455ks++)this.setFunctionModule(js+ks,Cs+As,Math.max(Math.abs(ks),Math.abs(As))!=1)}setFunctionModule(js,Cs,As){this.modules[Cs][js]=As,this.isFunction[Cs][js]=!0}addEccAndInterleave(js){const Cs=this.version,As=this.errorCorrectionLevel;if(js.length!=So.getNumDataCodewords(Cs,As))throw new RangeError("Invalid argument");const ks=So.NUM_ERROR_CORRECTION_BLOCKS[As.ordinal][Cs],Os=So.ECC_CODEWORDS_PER_BLOCK[As.ordinal][Cs],Ms=Math.floor(So.getNumRawDataModules(Cs)/8),Ds=ks-Ms%ks,Ps=Math.floor(Ms/ks);let Ls=[];const Bs=So.reedSolomonComputeDivisor(Os);for(let Us=0,Gs=0;Us<ks;Us++){let Js=js.slice(Gs,Gs+Ps-Os+(Us<Ds?0:1));Gs+=Js.length;const Ws=So.reedSolomonComputeRemainder(Js,Bs);Us<Ds&&Js.push(0),Ls.push(Js.concat(Ws))}let Fs=[];for(let Us=0;Us<Ls[0].length;Us++)Ls.forEach((Gs,Js)=>{(Us!=Ps-Os||Js>=Ds)&&Fs.push(Gs[Us])});return bs(Fs.length==Ms),Fs}drawCodewords(js){if(js.length!=Math.floor(So.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let Cs=0;for(let As=this.size-1;As>=1;As-=2){As==6&&(As=5);for(let ks=0;ks<this.size;ks++)for(let Os=0;Os<2;Os++){const Ms=As-Os,Ps=(As+1&2)==0?this.size-1-ks:ks;!this.isFunction[Ps][Ms]&&Cs<js.length*8&&(this.modules[Ps][Ms]=xs(js[Cs>>>3],7-(Cs&7)),Cs++)}}bs(Cs==js.length*8)}applyMask(js){if(js<0||js>7)throw new RangeError("Mask value out of range");for(let Cs=0;Cs<this.size;Cs++)for(let As=0;As<this.size;As++){let ks;switch(js){case 0:ks=(As+Cs)%2==0;break;case 1:ks=Cs%2==0;break;case 2:ks=As%3==0;break;case 3:ks=(As+Cs)%3==0;break;case 4:ks=(Math.floor(As/3)+Math.floor(Cs/2))%2==0;break;case 5:ks=As*Cs%2+As*Cs%3==0;break;case 6:ks=(As*Cs%2+As*Cs%3)%2==0;break;case 7:ks=((As+Cs)%2+As*Cs%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[Cs][As]&&ks&&(this.modules[Cs][As]=!this.modules[Cs][As])}}getPenaltyScore(){let js=0;for(let Os=0;Os<this.size;Os++){let Ms=!1,Ds=0,Ps=[0,0,0,0,0,0,0];for(let Ls=0;Ls<this.size;Ls++)this.modules[Os][Ls]==Ms?(Ds++,Ds==5?js+=So.PENALTY_N1:Ds>5&&js++):(this.finderPenaltyAddHistory(Ds,Ps),Ms||(js+=this.finderPenaltyCountPatterns(Ps)*So.PENALTY_N3),Ms=this.modules[Os][Ls],Ds=1);js+=this.finderPenaltyTerminateAndCount(Ms,Ds,Ps)*So.PENALTY_N3}for(let Os=0;Os<this.size;Os++){let Ms=!1,Ds=0,Ps=[0,0,0,0,0,0,0];for(let Ls=0;Ls<this.size;Ls++)this.modules[Ls][Os]==Ms?(Ds++,Ds==5?js+=So.PENALTY_N1:Ds>5&&js++):(this.finderPenaltyAddHistory(Ds,Ps),Ms||(js+=this.finderPenaltyCountPatterns(Ps)*So.PENALTY_N3),Ms=this.modules[Ls][Os],Ds=1);js+=this.finderPenaltyTerminateAndCount(Ms,Ds,Ps)*So.PENALTY_N3}for(let Os=0;Os<this.size-1;Os++)for(let Ms=0;Ms<this.size-1;Ms++){const Ds=this.modules[Os][Ms];Ds==this.modules[Os][Ms+1]&&Ds==this.modules[Os+1][Ms]&&Ds==this.modules[Os+1][Ms+1]&&(js+=So.PENALTY_N2)}let Cs=0;for(const Os of this.modules)Cs=Os.reduce((Ms,Ds)=>Ms+(Ds?1:0),Cs);const As=this.size*this.size,ks=Math.ceil(Math.abs(Cs*20-As*10)/As)-1;return bs(0<=ks&&ks<=9),js+=ks*So.PENALTY_N4,bs(0<=js&&js<=2568888),js}getAlignmentPatternPositions(){if(this.version==1)return[];{const js=Math.floor(this.version/7)+2,Cs=this.version==32?26:Math.ceil((this.version*4+4)/(js*2-2))*2;let As=[6];for(let ks=this.size-7;As.length<js;ks-=Cs)As.splice(1,0,ks);return As}}static getNumRawDataModules(js){if(js<So.MIN_VERSION||js>So.MAX_VERSION)throw new RangeError("Version number out of range");let Cs=(16*js+128)*js+64;if(js>=2){const As=Math.floor(js/7)+2;Cs-=(25*As-10)*As-55,js>=7&&(Cs-=36)}return bs(208<=Cs&&Cs<=29648),Cs}static getNumDataCodewords(js,Cs){return Math.floor(So.getNumRawDataModules(js)/8)-So.ECC_CODEWORDS_PER_BLOCK[Cs.ordinal][js]*So.NUM_ERROR_CORRECTION_BLOCKS[Cs.ordinal][js]}static reedSolomonComputeDivisor(js){if(js<1||js>255)throw new RangeError("Degree out of range");let Cs=[];for(let ks=0;ks<js-1;ks++)Cs.push(0);Cs.push(1);let As=1;for(let ks=0;ks<js;ks++){for(let Os=0;Os<Cs.length;Os++)Cs[Os]=So.reedSolomonMultiply(Cs[Os],As),Os+1<Cs.length&&(Cs[Os]^=Cs[Os+1]);As=So.reedSolomonMultiply(As,2)}return Cs}static reedSolomonComputeRemainder(js,Cs){let As=Cs.map(ks=>0);for(const ks of js){const Os=ks^As.shift();As.push(0),Cs.forEach((Ms,Ds)=>As[Ds]^=So.reedSolomonMultiply(Ms,Os))}return As}static reedSolomonMultiply(js,Cs){if(js>>>8||Cs>>>8)throw new RangeError("Byte out of range");let As=0;for(let ks=7;ks>=0;ks--)As=As<<1^(As>>>7)*285,As^=(Cs>>>ks&1)*js;return bs(As>>>8==0),As}finderPenaltyCountPatterns(js){const Cs=js[1];bs(Cs<=this.size*3);const As=Cs>0&&js[2]==Cs&&js[3]==Cs*3&&js[4]==Cs&&js[5]==Cs;return(As&&js[0]>=Cs*4&&js[6]>=Cs?1:0)+(As&&js[6]>=Cs*4&&js[0]>=Cs?1:0)}finderPenaltyTerminateAndCount(js,Cs,As){return js&&(this.finderPenaltyAddHistory(Cs,As),Cs=0),Cs+=this.size,this.finderPenaltyAddHistory(Cs,As),this.finderPenaltyCountPatterns(As)}finderPenaltyAddHistory(js,Cs){Cs[0]==0&&(js+=this.size),Cs.pop(),Cs.unshift(js)}};
1455dn.MIN_VERSION=1,dn.MAX_VERSION=40,dn.PENALTY_N1=3,dn.PENALTY_N2=3,dn.PENALTY_N3=40,dn.PENALTY_N4=10,dn.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],dn.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],ds.QrCode=dn;function ms(Rs,js,Cs){if(js<0||js>31||Rs>>>js)throw new RangeError("Value out of range");for(let As=js-1;As>=0;As--)Cs.push(Rs>>>As&1)}function xs(Rs,js){return(Rs>>>js&1)!=0}function bs(Rs){if(!Rs)throw new Error("Assertion error")}const Es=class rl{constructor(js,Cs,As){if(this.mode=js,this.numChars=Cs,this.bitData=As,Cs<0)throw new RangeError("Invalid argument");this.bitData=As.slice()}static makeBytes(js){let Cs=[];for(const As of js)ms(As,8,Cs);return new rl(rl.Mode.BYTE,js.length,Cs)}static makeNumeric(js){if(!rl.isNumeric(js))throw new RangeError("String contains non-numeric characters");let Cs=[];for(let As=0;As<js.length;){const ks=Math.min(js.length-As,3);ms(parseInt(js.substring(As,As+ks),10),ks*3+1,Cs),As+=ks}return new rl(rl.Mode.NUMERIC,js.length,Cs)}static makeAlphanumeric(js){if(!rl.isAlphanumeric(js))throw new RangeError("String contains unencodable characters in alphanumeric mode");let Cs=[],As;for(As=0;As+2<=js.length;As+=2){let ks=rl.ALPHANUMERIC_CHARSET.indexOf(js.charAt(As))*45;ks+=rl.ALPHANUMERIC_CHARSET.indexOf(js.charAt(As+1)),ms(ks,11,Cs)}return As<js.length&&ms(rl.ALPHANUMERIC_CHARSET.indexOf(js.charAt(As)),6,Cs),new rl(rl.Mode.ALPHANUMERIC,js.length,Cs)}static makeSegments(js){return js==""?[]:rl.isNumeric(js)?[rl.makeNumeric(js)]:rl.isAlphanumeric(js)?[rl.makeAlphanumeric(js)]:[rl.makeBytes(rl.toUtf8ByteArray(js))]}static makeEci(js){let Cs=[];if(js<0)throw new RangeError("ECI assignment value out of range");if(js<128)ms(js,8,Cs);else if(js<16384)ms(2,2,Cs),ms(js,14,Cs);else if(js<1e6)ms(6,3,Cs),ms(js,21,Cs);else throw new RangeError("ECI assignment value out of range");return new rl(rl.Mode.ECI,0,Cs)}static isNumeric(js){return rl.NUMERIC_REGEX.test(js)}static isAlphanumeric(js){return rl.ALPHANUMERIC_REGEX.test(js)}getData(){return this.bitData.slice()}static getTotalBits(js,Cs){let As=0;for(const ks of js){const Os=ks.mode.numCharCountBits(Cs);if(ks.numChars>=1<<Os)return 1/0;As+=4+Os+ks.bitData.length}return As}static toUtf8ByteArray(js){js=encodeURI(js);let Cs=[];for(let As=0;As<js.length;As++)js.charAt(As)!="%"?Cs.push(js.charCodeAt(As)):(Cs.push(parseInt(js.substring(As+1,As+3),16)),As+=2);return Cs}};Es.NUMERIC_REGEX=/^[0-9]*$/,Es.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,Es.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let ws=Es;ds.QrSegment=Es})(qrcodegen||(qrcodegen={}));(ds=>{(dn=>{const ms=class{constructor(bs,Es){this.ordinal=bs,this.formatBits=Es}};ms.LOW=new ms(0,1),ms.MEDIUM=new ms(1,0),ms.QUARTILE=new ms(2,3),ms.HIGH=new ms(3,2),dn.Ecc=ms})(ds.QrCode||(ds.QrCode={}))})(qrcodegen||(qrcodegen={}));(ds=>{(dn=>{const ms=class{constructor(bs,Es){this.modeBits=bs,this.numBitsCharCount=Es}numCharCountBits(bs){return this.numBitsCharCount[Math.floor((bs+7)/17)]}};ms.NUMERIC=new ms(1,[10,12,14]),ms.ALPHANUMERIC=new ms(2,[9,11,13]),ms.BYTE=new ms(4,[8,16,16]),ms.KANJI=new ms(8,[8,10,12]),ms.ECI=new ms(7,[0,0,0]),dn.Mode=ms})(ds.QrSegment||(ds.QrSegment={}))})(qrcodegen||(qrcodegen={}));var qrcodegen_default=qrcodegen;var ERROR_LEVEL_MAP={L:qrcodegen_default.QrCode.Ecc.LOW,M:qrcodegen_default.QrCode.Ecc.MEDIUM,Q:qrcodegen_default.QrCode.Ecc.QUARTILE,H:qrcodegen_default.QrCode.Ecc.HIGH},DEFAULT_SIZE=128,DEFAULT_LEVEL="L",DEFAULT_BGCOLOR="#FFFFFF",DEFAULT_FGCOLOR="#000000",DEFAULT_INCLUDEMARGIN=!1,DEFAULT_MINVERSION=1,SPEC_MARGIN_SIZE=4,DEFAULT_MARGIN_SIZE=0,DEFAULT_IMG_SCALE=.1;function generatePath(ds,dn=0){const ms=[];return ds.forEach(function(xs,bs){let Es=null;xs.forEach(function(ws,Rs){if(!ws&&Es!==null){ms.push(`M${Es+dn} ${bs+dn}h${Rs-Es}v1H${Es+dn}z`),Es=null;return}if(Rs===xs.length-1){if(!ws)return;Es===null?ms.push(`M${Rs+dn},${bs+dn} h1v1H${Rs+dn}z`):ms.push(`M${Es+dn},${bs+dn} h${Rs+1-Es}v1H${Es+dn}z`);return}ws&&Es===null&&(Es=Rs)})}),ms.join("")}function excavateModules(ds,dn){return ds.slice().map((ms,xs)=>xs<dn.y||xs>=dn.y+dn.h?ms:ms.map((bs,Es)=>Es<dn.x||Es>=dn.x+dn.w?bs:!1))}function getImageSettings(ds,dn,ms,xs){if(xs==null)return null;const bs=ds.length+ms*2,Es=Math.floor(dn*DEFAULT_IMG_SCALE),ws=bs/dn,Rs=(xs.width||Es)*ws,js=(xs.height||Es)*ws,Cs=xs.x==null?ds.length/2-Rs/2:xs.x*ws,As=xs.y==null?ds.length/2-js/2:xs.y*ws,ks=xs.opacity==null?1:xs.opacity;let Os=null;if(xs.excavate){let Ds=Math.floor(Cs),Ps=Math.floor(As),Ls=Math.ceil(Rs+Cs-Ds),Bs=Math.ceil(js+As-Ps);Os={x:Ds,y:Ps,w:Ls,h:Bs}}const Ms=xs.crossOrigin;return{x:Cs,y:As,h:js,w:Rs,excavation:Os,opacity:ks,crossOrigin:Ms}}function getMarginSize(ds,dn){return dn!=null?Math.max(Math.floor(dn),0):ds?SPEC_MARGIN_SIZE:DEFAULT_MARGIN_SIZE}function useQRCode({value:ds,level:dn,minVersion:ms,includeMargin:xs,marginSize:bs,imageSettings:Es,size:ws,boostLevel:Rs}){let js=React.useMemo(()=>{const Ds=(Array.isArray(ds)?ds:[ds]).reduce((Ps,Ls)=>(Ps.push(...qrcodegen_default.QrSegment.makeSegments(Ls)),Ps),[]);return qrcodegen_default.QrCode.encodeSegments(Ds,ERROR_LEVEL_MAP[dn],ms,void 0,void 0,Rs)},[ds,dn,ms,Rs]);const{cells:Cs,margin:As,numCells:ks,calculatedImageSettings:Os}=React.useMemo(()=>{let Ms=js.getModules();const Ds=getMarginSize(xs,bs),Ps=Ms.length+Ds*2,Ls=getImageSettings(Ms,ws,Ds,Es);return{cells:Ms,margin:Ds,numCells:Ps,calculatedImageSettings:Ls}},[js,ws,Es,xs,bs]);return{qrcode:js,margin:As,cells:Cs,numCells:ks,calculatedImageSettings:Os}}var SUPPORTS_PATH2D=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),QRCodeCanvas=React.forwardRef(function ds(dn,ms){const xs=dn,{value:bs,size:Es=DEFAULT_SIZE,level:ws=DEFAULT_LEVEL,bgColor:Rs=DEFAULT_BGCOLOR,fgColor:js=DEFAULT_FGCOLOR,includeMargin:Cs=DEFAULT_INCLUDEMARGIN,minVersion:As=DEFAULT_MINVERSION,boostLevel:ks,marginSize:Os,imageSettings:Ms}=xs,Ps=__objRest(xs,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:Ls}=Ps,Bs=__objRest(Ps,["style"]),Fs=Ms?.src,Us=React.useRef(null),Gs=React.useRef(null),Js=React.useCallback(ea=>{Us.current=ea,typeof ms=="function"?ms(ea):ms&&(ms.current=ea)},[ms]),[Ws,Zs]=React.useState(!1),{margin:Ys,cells:Qs,numCells:ai,calculatedImageSettings:ia}=useQRCode({value:bs,level:ws,minVersion:As,boostLevel:ks,includeMargin:Cs,marginSize:Os,imageSettings:Ms,size:Es});React.useEffect(()=>{if(Us.current!=null){const ea=Us.current,ta=ea.getContext("2d");if(!ta)return;let aa=Qs;const fa=Gs.current,ua=ia!=null&&fa!==null&&fa.complete&&fa.naturalHeight!==0&&fa.naturalWi
1455dth!==0;ua&&ia.excavation!=null&&(aa=excavateModules(Qs,ia.excavation));const Ea=window.devicePixelRatio||1;ea.height=ea.width=Es*Ea;const ra=Es/ai*Ea;ta.scale(ra,ra),ta.fillStyle=Rs,ta.fillRect(0,0,ai,ai),ta.fillStyle=js,SUPPORTS_PATH2D?ta.fill(new Path2D(generatePath(aa,Ys))):Qs.forEach(function(Ia,$a){Ia.forEach(function(oa,sa){oa&&ta.fillRect(sa+Ys,$a+Ys,1,1)})}),ia&&(ta.globalAlpha=ia.opacity),ua&&ta.drawImage(fa,ia.x+Ys,ia.y+Ys,ia.w,ia.h)}}),React.useEffect(()=>{Zs(!1)},[Fs]);const ca=__spreadValues({height:Es,width:Es},Ls);let ha=null;return Fs!=null&&(ha=React.createElement("img",{src:Fs,key:Fs,style:{display:"none"},onLoad:()=>{Zs(!0)},ref:Gs,crossOrigin:ia?.crossOrigin})),React.createElement(React.Fragment,null,React.createElement("canvas",__spreadValues({style:ca,height:Es,width:Es,ref:Js,role:"img"},Bs)),ha)});QRCodeCanvas.displayName="QRCodeCanvas";var QRCodeSVG=React.forwardRef(function ds(dn,ms){const xs=dn,{value:bs,size:Es=DEFAULT_SIZE,level:ws=DEFAULT_LEVEL,bgColor:Rs=DEFAULT_BGCOLOR,fgColor:js=DEFAULT_FGCOLOR,includeMargin:Cs=DEFAULT_INCLUDEMARGIN,minVersion:As=DEFAULT_MINVERSION,boostLevel:ks,title:Os,marginSize:Ms,imageSettings:Ds}=xs,Ps=__objRest(xs,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:Ls,cells:Bs,numCells:Fs,calculatedImageSettings:Us}=useQRCode({value:bs,level:ws,minVersion:As,boostLevel:ks,includeMargin:Cs,marginSize:Ms,imageSettings:Ds,size:Es});let Gs=Bs,Js=null;Ds!=null&&Us!=null&&(Us.excavation!=null&&(Gs=excavateModules(Bs,Us.excavation)),Js=React.createElement("image",{href:Ds.src,height:Us.h,width:Us.w,x:Us.x+Ls,y:Us.y+Ls,preserveAspectRatio:"none",opacity:Us.opacity,crossOrigin:Us.crossOrigin}));const Ws=generatePath(Gs,Ls);return React.createElement("svg",__spreadValues({height:Es,width:Es,viewBox:`0 0 ${Fs} ${Fs}`,ref:ms,role:"img"},Ps),!!Os&&React.createElement("title",null,Os),React.createElement("path",{fill:Rs,d:`M0,0 h${Fs}v${Fs}H0z`,shapeRendering:"crispEdges"}),React.createElement("path",{fill:js,d:Ws,shapeRendering:"crispEdges"}),Js)});QRCodeSVG.displayName="QRCodeSVG";function QRCodeTab({id:ds}){const dn=reactExports.useRef(null),ms=`${window.location.origin}/ops-manual/sop/${ds}`,xs=()=>{if(!dn.current)return;const Es=dn.current.toDataURL("image/png"),ws=document.createElement("a");ws.href=Es,ws.download=`sop-${ds}-qrcode.png`,document.body.appendChild(ws),ws.click(),document.body.removeChild(ws)};return jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx(DocToolbar,{buttons:jsxRuntimeExports.jsx(Button,{onClick:xs,jsx:jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center gap-2",children:[jsxRuntimeExports.jsx(Download,{size:16}),"Download PNG"]})})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold mb-2",children:"QR Code for SOP"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-[var(--text-medium)] mb-4",children:"Scan this QR code to open the SOP in your browser"})]}),jsxRuntimeExports.jsx("div",{className:"bg-white p-6 rounded-lg shadow-sm",children:jsxRuntimeExports.jsx(QRCodeCanvas,{ref:dn,value:ms,size:256,level:"H"})}),jsxRuntimeExports.jsx("div",{className:"text-center text-sm text-[var(--text-medium)]",children:jsxRuntimeExports.jsx("p",{className:"font-mono bg-[var(--background-neutral)] px-3 py-2 rounded",children:ms})})]})]})}const TAB_BY_SLUG={overview:"Overview",editor:"Editor",checklist:"Checklist",faq:"FAQ",storyboard:"Storyboard",assets:"Assets","qr-code":"QR Code"};function tabFromSlug(ds){if(ds)return TAB_BY_SLUG[ds.toLowerCase()]}function SopDialogContent({card:ds}){const[dn]=useSearchParams(),ms=tabFromSlug(dn.get("tab"))??"Overview",[xs,bs]=reactExports.useState(ms),[Es,ws]=reactExports.useState(ds),Rs=()=>{window.open(`/ops-manual/sop/${Es.id}`,"_blank","noopener,noreferrer")},{save:js,status:Cs}=useNetworkDebounce(async As=>{const ks=await Sdk.businessProcessClient.modifyBusinessProcess(ds.id,As),Os=ks.data;return Os&&ws(Os),ks});return reactExports.useEffect(()=>{const As=tabFromSlug(dn.get("tab"));As&&bs(As)},[dn]),jsxRuntimeExports.jsxs("div",{className:"space-y-4 flex-1 flex flex-col min-w-0 min-h-0 ",children:[jsxRuntimeExports.jsx("nav",{className:"mb-0",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 overflow-x-scroll whitespace-nowrap no-scrollbar max-w-full min-w-0",children:[["Overview","Editor","Checklist","FAQ","Storyboard","Assets","QR Code"].map(As=>
1455jsxRuntimeExports.jsx("button",{className:`cursor-pointer rounded-t-lg px-3 py-2 text-sm ${xs===As?"bg-[var(--background-neutral)] text-[var(--secondary)] border-b-1 border-[var(--primary)] mt-[1px]":"text-[var(--text-medium)] hover:text-[var(--secondary)]"}`,onClick:()=>bs(As),children:As},As)),jsxRuntimeExports.jsxs("button",{className:"cursor-pointer rounded-t-lg px-3 py-2 text-sm text-[var(--text-medium)] hover:text-[var(--secondary)] inline-flex items-center gap-1",onClick:Rs,type:"button",children:["Preview",jsxRuntimeExports.jsx(ExternalLink,{size:14})]})]})}),jsxRuntimeExports.jsx(SavingStatus,{status:Cs}),jsxRuntimeExports.jsxs("div",{className:"overflow-y-scroll h-full relative px-1 md:px-2",children:[xs==="Overview"&&jsxRuntimeExports.jsx(OverviewTab,{card:Es,onUpdate:As=>{ws(As),js(As)}}),xs==="Editor"&&jsxRuntimeExports.jsx(EditorTab,{id:Es.id}),xs==="Checklist"&&jsxRuntimeExports.jsx(ChecklistTab,{id:Es.id}),xs==="FAQ"&&jsxRuntimeExports.jsx(FAQTab,{id:Es.id}),xs==="Storyboard"&&jsxRuntimeExports.jsx(StoryboardTab,{id:Es.id}),xs==="Assets"&&jsxRuntimeExports.jsx(AssetsTab,{id:Es.id}),xs==="QR Code"&&jsxRuntimeExports.jsx(QRCodeTab,{id:Es.id})]})]})}function SOPHeader({card:ds}){const dn=useNavigate();return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsx("div",{className:"mx-auto w-full h-14 flex items-center gap-3",children:jsxRuntimeExports.jsxs("div",{className:"ml-3 gap-3 flex-row items-center flex",children:[jsxRuntimeExports.jsx("div",{className:"underline cursor-pointer",onClick:()=>dn("/board"),children:"SOP Board"}),jsxRuntimeExports.jsx(ChevronRight,{className:"text-secondary",size:23}),jsxRuntimeExports.jsx("div",{className:"flex-1 min-w-0 text-[var(--secondary)] truncate",children:ds.objective})]})}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}function SopScreen(){const{sopId:ds}=useParams(),{manualId:dn}=useManualSelector(),ms=useNavigate(),[xs,bs]=reactExports.useState(null),[Es,ws]=reactExports.useState(!0),[Rs,js]=reactExports.useState();return reactExports.useEffect(()=>{async function Cs(As){try{ws(!0);const{data:ks}=await Sdk.businessProcessClient.fetch(As);bs(ks)}catch{js("Unable to load SOP.")}finally{ws(!1)}}dn&&ds&&Cs(ds)},[dn,ds]),Es?jsxRuntimeExports.jsx("div",{className:"p-6",children:"Loading SOP…"}):Rs||!xs?jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx("div",{className:"mb-3 text-red-600",children:Rs??"SOP not found."}),jsxRuntimeExports.jsx("button",{className:"rounded-md border px-3 py-2",onClick:()=>ms("/board"),children:"Back to board"})]}):jsxRuntimeExports.jsxs("div",{className:"flex flex-col flex-1 min-h-0 min-w-0 overflow-hidden max-w-full",children:[jsxRuntimeExports.jsx(SOPHeader,{card:xs}),jsxRuntimeExports.jsx(SopDialogContent,{card:xs})]})}function Dropzone({onFiles:ds,accept:dn,disabled:ms,className:xs}){const[bs,Es]=reactExports.useState(!1),ws=reactExports.useRef(null),Rs=()=>!ms&&ws.current?.click(),js=reactExports.useCallback(Os=>{if(!Os||Os.length===0)return;const Ms=Array.from(Os);ds(Ms),ws.current&&(ws.current.value="")},[ds]),Cs=Os=>{Os.preventDefault(),Os.stopPropagation(),!ms&&(Es(!1),js(Os.dataTransfer.files))},As=Os=>{Os.preventDefault(),!ms&&(Os.dataTransfer.dropEffect="copy",Es(!0))},ks=Os=>{Os.preventDefault(),Es(!1)};return jsxRuntimeExports.jsxs("div",{role:"button",tabIndex:0,onKeyDown:Os=>(Os.key==="Enter"||Os.key===" ")&&Rs(),"aria-label":"File upload drop zone",onDrop:Cs,onDragOver:As,onDragLeave:ks,onClick:Rs,className:["group relative rounded-2xl border-2 border-dashed p-10 text-center select-none bg-tertiary/20 text-secondary","transition-colors",ms?"cursor-not-allowed bg-[--background-neutral] border-[--border-medium] opacity-70":"cursor-pointer bg-[--background] border-[--border-medium] hover:border-[--primary]",bs?"border-[--primary]":"",xs||""].join(" "),children:[jsxRuntimeExports.jsx(CloudUpload,{className:"mx-auto w-10 h-10 text-primary","aria-hidden":"true"}),jsxRuntimeExports.jsx("p",{className:"hidden md:block mt-2 font-[var(--font-futura-500)] text-[--color-heading]",children:"Drag & drop files here"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-[--text-medium] hidden md:block",children:"or"}),jsxRuntimeExports.jsx("span",{className:"mt-3 inline-block rounded-xl bg-[--primary] px-4 py-2 ",children:"Browse files"}),jsxRuntimeExports.jsx("input",{ref:ws,type:"file",multiple:!0,accept:dn,className:"sr-only",onChange:Os=>js(Os.currentTarget.files),disabled:ms}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-xs text-[--text-medium]",children:"PDF, DOCX, TXT, MD · up to 100MB each"})]})}const DEFAULT_CONCURRENCY=3;function runWithConcurrency(ds,dn=DEFAULT_CONCURRENCY){return new Promise((ms,xs)=>{const bs=[];let Es=0,ws=0,Rs=0,js=!1;const Cs=()=>
1455{if(!js){if(Rs===ds.length)return ms(bs);for(;Es<dn&&ws<ds.length;){const As=ws++;Es++,ds[As]().then(ks=>{bs[As]=ks}).catch(ks=>{js=!0,xs(ks)}).finally(()=>{Es--,Rs++,Cs()})}}};Cs()})}const MAX_FILES=200;function useUploader(ds){const{manualId:dn,toast:ms}=ds,[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(null),[ks,Os]=reactExports.useState(null),Ms=reactExports.useCallback(Js=>{if(!Js?.length)return;const Ws=xs.length;Ws+Js.length>MAX_FILES&&console.warn(`Max ${MAX_FILES} files per batch. Extra files will be ignored.`);const Ys=Js.slice(0,Math.max(0,MAX_FILES-Ws)).map(Qs=>({id:uuid(),name:Qs.name,size:Qs.size,type:Qs.type||"application/octet-stream",kind:guessKind(Qs),raw:Qs,pillar:"auto",progress:0,status:Qs.size>MAX_UPLOAD_BYTES?"failed":"queued",error:Qs.size>MAX_UPLOAD_BYTES?`File exceeds the ${MAX_UPLOAD_LABEL} limit`:void 0}));bs(Qs=>[...Qs,...Ys]),Ys.length&&(ms??console.log)(`${Ys.length} file(s) queued`)},[xs.length,ms]),Ds=reactExports.useCallback(Js=>{bs(Ws=>Ws.filter(Zs=>Zs.id!==Js))},[]),Ps=reactExports.useCallback(()=>{bs([]),ws(void 0),As(null),Os(null)},[]),Ls=reactExports.useCallback((Js,Ws)=>{bs(Zs=>Zs.map(Ys=>Ys.id===Js?{...Ys,pillar:Ws}:Ys))},[]),Bs=reactExports.useMemo(()=>xs.some(Js=>["queued","failed","duplicate"].includes(Js.status)),[xs]),Fs=reactExports.useMemo(()=>xs.length>0&&xs.every(Js=>Js.status==="uploaded"),[xs]),Us=reactExports.useMemo(()=>{if(!xs.length)return 0;const Js=xs.reduce((Ws,Zs)=>Ws+(Zs.progress||(Zs.status==="uploaded"?100:0)),0);return Math.round(Js/xs.length)},[xs]),Gs=reactExports.useCallback(async()=>{const Js=xs.filter(Ws=>["queued","failed","duplicate"].includes(Ws.status));if(Js.length){js(!0);try{const Ws=Js.map(Qs=>async()=>{try{bs(ca=>ca.map(ha=>ha.id===Qs.id?{...ha,status:"hashing",progress:1}:ha));const ai=await sha1(Qs.raw),ia=xs.some(ca=>ca.sha1&&ca.sha1===ai&&ca.id!==Qs.id);bs(ca=>ca.map(ha=>ha.id===Qs.id?{...ha,sha1:ai,status:ia?"duplicate":"queued",error:ia?"Duplicate in batch":void 0}:ha))}catch(ai){bs(ia=>ia.map(ca=>ca.id===Qs.id?{...ca,status:"failed",error:ai.message}:ca))}});await runWithConcurrency(Ws);const Zs=new Set(Js.map(Qs=>Qs.id).filter(Qs=>{const ai=xs.find(ia=>ia.id===Qs);return ai&&!["failed","duplicate"].includes(ai.status)})),Ys=xs.filter(Qs=>Zs.has(Qs.id)).map(Qs=>async()=>{bs(ai=>ai.map(ia=>ia.id===Qs.id?{...ia,status:"analysing",progress:1}:ia));try{const ia=`${(await Sdk.uploadClient.uploadFile(dn,Qs.raw,Qs.pillar,ca=>{bs(ha=>ha.map(ea=>ea.id===Qs.id?{...ea,progress:Math.max(ea.progress,Math.floor(ca))}:ea))})).status}`.startsWith("2")?"ready":"failed";bs(ca=>ca.map(ha=>ha.id===Qs.id?{...ha,status:ia,progress:100,error:void 0}:ha))}catch(ai){bs(ia=>ia.map(ca=>ca.id===Qs.id?{...ca,status:"failed",error:ai.message}:ca))}});await runWithConcurrency(Ys),(ms??console.log)("Upload complete")}finally{js(!1)}}},[xs,Es,dn,ms]);return{files:xs,setFiles:bs,batchId:Es,uploading:Rs,ingestJob:Cs,ingestStatus:ks,overallProgress:Us,canUpload:Bs,allUploaded:Fs,addFiles:Ms,removeFile:Ds,clearAll:Ps,setFilePillar:Ls,uploadAll:Gs}}function UploadHeader(){return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsx("div",{className:"mx-auto w-full h-14 flex items-center gap-3",children:jsxRuntimeExports.jsxs("div",{className:"ml-3 gap-3 flex flex-row items-center",children:[jsxRuntimeExports.jsx(ManualSwitcher,{readOnly:!0}),jsxRuntimeExports.jsx(ChevronRight,{className:"text-secondary",size:23}),jsxRuntimeExports.jsx("div",{children:" Upload IP"})]})}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}const ACCEPT$1=".pdf,.doc,.docx,.txt,.md";function UploadIpScreen(){const{manualId:ds}=useManualSelector(),{files:dn,uploadAll:ms,overallProgress:xs,ingestStatus:bs,addFiles:Es,uploading:ws}=useUploader({manualId:ds,toast:js=>console.log(js)}),Rs=useNavigate();return reactExports.useEffect(()=>{if(ws)return;dn.some(Cs=>Cs.status==="queued")&&ms()},[dn,ws,ms]),jsxRuntimeExports.jsxs("div",{className:"bg-gradient-to-b from-[--background] to-[--background-tint] overflow-y-scroll",children:[jsxRuntimeExports.jsx(UploadHeader,{}),jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full md:p-6",children:[jsxRuntimeExports.jsx("div",{className:"mb-6 grid grid-cols-1 gap-6",children:jsxRuntimeExports.jsxs("div",{className:"md:col-span-2 space-y-6",children:[jsxRuntimeExports.jsx("div",{className:"rounded-sm md:rounded-2xl md:border border-[--border-medium] shadow-sm bg-white p-6",children:jsxRuntimeExports.jsx(Dropzone,{onFiles:Es,accept:ACCEPT$1})}),dn.length>0&&jsxRuntimeExports.jsxs("div",{className:"md:rounded-2xl md:border border-[--border-medium] shadow-sm bg-white",children:[jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between border-b border-[--border-medium] px-4 py-3",children:jsxRuntimeExports.jsxs("div",{className:"font-[var(--font-futura-500)] text-[--color-heading]",children:[dn.length," file(s) - Upload ",xs,"%"]})}),jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full text-sm",children:[jsxRuntimeExports.jsx("thead",{className:"text-left text-medium",children:jsxRuntimeExports.jsxs("tr",{className:"[&>th]:px-4 [&>th]:py-2",children:[jsxRuntimeExports.jsx("th",{children:"Name"}),jsxRuntimeExports.jsx("th",{children:"Size"}),jsxRuntimeExports.jsx("th",{className:"text-right",children:"Status"})]})}),jsxRuntimeExports.jsx("tbody",{children:dn.map(js=>jsxRuntimeExports.jsxs("tr",{className:"border-t border-[--border-medium] [&>td]:px-4 [&>td]:py-3",children:[jsxRuntimeExports.jsx("td",{className:"truncate max-w-[360px]",title:js.name,children:js.name}),jsxRuntimeExports.jsx("td",{children:formatBytes(js.size)}),jsxRuntimeExports.jsxs("td",{className:"text-right",children:[["queued","hashing"].includes(js.status)&&jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center justify-end gap-2 text-[--secondary] text-md font-bold",children:["UPLOADING…",jsxRuntimeExports.jsx(CloudUpload,{
1455className:"w-4 h-4"}),jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3 h-3 animate-spin"})]}),js.status==="analysing"&&jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center justify-end gap-2 text-secondary text-md font-bold",children:["ANALYSING…",jsxRuntimeExports.jsx(Search,{className:"w-4 h-4"}),jsxRuntimeExports.jsx(LoaderCircle,{className:"w-3 h-3 animate-spin"})]}),(js.status==="ready"||js.status==="uploaded")&&jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center justify-end gap-2 text-green-700 text-md font-bold",children:["READY",jsxRuntimeExports.jsx(CircleCheck,{className:"w-4 h-4"})]}),js.status==="failed"&&jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center justify-end gap-2 text-red-700 text-md font-bold",children:["FAILED",jsxRuntimeExports.jsx(CircleX,{className:"w-4 h-4"})]}),js.status==="duplicate"&&jsxRuntimeExports.jsx("span",{className:"inline-flex items-center justify-end gap-2 text-amber-700 text-md font-bold",children:"duplicate"}),js.error&&jsxRuntimeExports.jsx("div",{className:"text-xs text-red-600",children:js.error})]})]},js.id))})]})}),bs&&jsxRuntimeExports.jsxs("div",{className:"border-t border-[--border-medium] px-4 py-3 text-sm","aria-live":"polite",children:["Stage: ",jsxRuntimeExports.jsx("strong",{children:bs.stage})," · ",bs.progress,"%",bs.stage==="complete"&&jsxRuntimeExports.jsx("button",{className:"btn-primary ml-3",onClick:()=>Rs("/board"),children:"Open Board"})]})]})]})}),jsxRuntimeExports.jsx("div",{className:"mb-6 justify-between w-full gap-6 max-w-fit",children:jsxRuntimeExports.jsxs("div",{className:"md:rounded-2xl md:border border-[--border-medium] shadow-sm bg-white p-4 text-lg text-medium  flex-2",children:[jsxRuntimeExports.jsx("div",{className:"text-primary font-bold",children:"Help"}),jsxRuntimeExports.jsx("p",{className:"mt-2",children:"Upload your files and they will start processing automatically. Categorisation and gap analysis will then run."}),jsxRuntimeExports.jsx("p",{className:"mt-2",children:"Accepted: PDF, DOCX, TXT, MD"}),jsxRuntimeExports.jsx("p",{children:"Up to 100MB per file. Max 200 files per batch."})]})})]})]})}function AskWizardPage(){const{manualId:ds}=useManualSelector(),[dn,ms]=reactExports.useState(""),[xs,bs]=reactExports.useState(!1),[Es,ws]=reactExports.useState(),Rs=reactExports.useRef(null);reactExports.useEffect(()=>{const As=ks=>{ks.key==="/"&&!ks.target?.closest("input,textarea")&&(ks.preventDefault(),Rs.current?.focus())};return window.addEventListener("keydown",As),()=>window.removeEventListener("keydown",As)},[]);async function js(As){const ks=As.trim();if(!ks)return;bs(!0);const Os=await Sdk.askMyWizard.askMyWizard(ds,ks);`${Os.status}`.startsWith("2")?ws(Os.data):ws(""),bs(!1)}const Cs=reactExports.useMemo(()=>notBlank(Es),[Es]);return jsxRuntimeExports.jsx("div",{className:"flex flex-col h-full overflow-y-scroll",children:jsxRuntimeExports.jsxs("div",{className:Es?"mt-2":"mt-48",children:[!Cs&&jsxRuntimeExports.jsxs("header",{className:"flex flex-col items-center gap-3 mb-5",children:[jsxRuntimeExports.jsx("div",{className:"grid place-content-center mb-5",children:jsxRuntimeExports.jsx(WizardHat,{width:100,colour:"#f5842c",className:"text-[var(--color-primary)]"})}),jsxRuntimeExports.jsx("h1",{className:"text-2xl text-center font-[var(--font-futura-800)] text-[var(--color-heading)]",children:"Ask Your Wizard"}),jsxRuntimeExports.jsx("p",{className:"text-[var(--text-medium)] text-lg text-center max-w-prose",children:"Search across your uploaded IP, SOPs, and manual structure."})]}),jsxRuntimeExports.jsxs("div",{className:"max-w-3xl mx-auto",children:[jsxRuntimeExports.jsx("form",{onSubmit:As=>{As.preventDefault(),js(dn)},role:"search","aria-label":"Ask Wizard",className:"relative",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 card px-3 py-2.5",children:[jsxRuntimeExports.jsx(Search,{size:18,className:"text-[var(--text-medium)]"}),jsxRuntimeExports.jsx("input",{ref:Rs,value:dn,onChange:As=>ms(As.target.value),placeholder:"Ask a question… e.g., “How do we onboard a new brand?”",className:"w-full bg-transparent outline-none text-[var(--color-heading)]","aria-label":"Search query"}),dn&&jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{ms(""),ws(""),Rs.current?.focus()},"aria-label":"Clear search",className:"btn btn-ghost",children:jsxRuntimeExports.jsx(X$4,{size:16})}),jsxRuntimeExports.jsx("button",{type:"submit",className:"btn btn-primary curs
1455or-pointer",children:xs?jsxRuntimeExports.jsx(LoaderCircle,{size:16,className:"animate-spin"}):"Ask"})]})}),!xs&&!Cs&&dn===""&&jsxRuntimeExports.jsx("div",{className:"mt-6 card",children:jsxRuntimeExports.jsxs("div",{className:"card-body",children:[jsxRuntimeExports.jsx("div",{className:"eyebrow mb-2",children:"Try"}),jsxRuntimeExports.jsxs("ul",{className:"grid sm:grid-cols-2 gap-2 text-sm",children:[jsxRuntimeExports.jsx("li",{className:"pill",children:"“Draft a checklist for store closing”"}),jsxRuntimeExports.jsx("li",{className:"pill",children:"“Show minimum standards for food safety”"}),jsxRuntimeExports.jsx("li",{className:"pill",children:"“Find PTO policy examples”"}),jsxRuntimeExports.jsx("li",{className:"pill",children:"“Where is the complaints SOP?”"})]})]})}),jsxRuntimeExports.jsx("div",{className:"mt-6 space-y-3",children:xs&&jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"animate-spin",size:18}),jsxRuntimeExports.jsx("span",{children:"Searching your knowledge…"})]})})})]}),!xs&&Es&&jsxRuntimeExports.jsx("div",{className:"mt-10 space-y-3 max-w-7xl p-4 mx-auto mb-10",children:jsxRuntimeExports.jsx("div",{className:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:Es}})})]})})}function HeaderBar(ds){return jsxRuntimeExports.jsxs("div",{className:"sticky top-0 z-30 bg-white/50 backdrop-blur border-b border-neutral-200",children:[jsxRuntimeExports.jsx("div",{className:"mx-auto w-full h-14 flex items-center gap-2 pl-1 text-lg",children:ds.children}),jsxRuntimeExports.jsx(BrandRibbon,{})]})}function SettingsBreadcrumb({current:ds}){const dn=useNavigate();return jsxRuntimeExports.jsxs(HeaderBar,{children:[jsxRuntimeExports.jsx(ArrowLeft,{size:20,className:"ml-2 inline-block cursor-pointer",onClick:()=>dn(-1)}),jsxRuntimeExports.jsx(Link$1,{to:"/settings",className:"underline text-[--text-dark]",children:"Settings"}),ds&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:"mx-2",children:"/"}),jsxRuntimeExports.jsx("span",{className:"text-gray-900 font-medium",children:ds})]})]})}function LinkCard({title:ds,description:dn,to:ms}){return jsxRuntimeExports.jsx(Link$1,{to:ms,className:"block h-full",children:jsxRuntimeExports.jsx(Card,{title:ds,className:"h-full hover:!bg-gray-50",children:jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600",children:dn})})})}function SettingsHome(){const ds="/settings",dn=[{title:"Brand Voice",description:"Configure tone, style, and writing preferences for generated content.",to:`${ds}/brand-voice`},{title:"Business Details",description:"Provide details about your business.",to:`${ds}/business-details`},{title:"Target Reader",description:"Define your target reader",to:`${ds}/target-reader`},{title:"Preferences",description:"Configure app styles.",to:`${ds}/preferences`},{title:"Workspace",description:"Transfer ownership of this workspace to someone else.",to:`${ds}/workspace`}];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SettingsBreadcrumb,{}),jsxRuntimeExports.jsx("div",{className:"p-2 md:p-6",children:jsxRuntimeExports.jsx("div",{className:"grid items-stretch grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:dn.map(ms=>jsxRuntimeExports.jsx(LinkCard,{title:ms.title,description:ms.description,to:ms.to},ms.title))})})]})}var Language=(ds=>(ds.Arabic="Arabic",ds.Bulgarian="Bulgarian",ds.Chinese="Chinese",ds.Czech="Czech",ds.Danish="Danish",ds.Dutch="Dutch",ds.EnglishUK="English (UK)",ds.EnglishUS="English (US)",ds.Finnish="Finnish",ds.French="French",ds.German="German",ds.Greek="Greek",ds.Hebrew="Hebrew",ds.Hindi="Hindi",ds.Hungarian="Hungarian",ds.Indonesian="Indonesian",ds.Italian="Italian",ds.Japanese="Japanese",ds.Korean="Korean",ds.Malay="Malay",ds.Norwegian="Norwegian",ds.Polish="Polish",ds.Portuguese="Portuguese",ds.Romanian="Romanian",ds.Russian="Russian",ds.Spanish="Spanish",ds.Swedish="Swedish",ds.Thai="Thai",ds.Turkish="Turkish",ds.Ukrainian="Ukrainian",ds.Vietnamese="Vietnamese",ds))(Language||{});const BrandVoiceContext=reactExports.createContext({}),useBrandVoiceContext=()=>{const ds=reactExports.useContext(BrandVoiceContext);if(ds===void 0)throw new Error("useBrandVoiceContext must be used within a BrandVoiceProvider");return ds},LanguageSelection=()=>{const{language:ds,setLanguage:dn,saveChanges:ms}=useBrandVoiceContext();return jsxRuntimeExports.jsxs(Card,{title:"Language",children:[jsxRuntimeExports.jsx("label",{className:"block text-gray-700 mb-2",children:"Select the language for your brand voice"}),jsxRuntimeExports.jsx("select",{value:ds,onChange:xs=>{const bs=xs.target.value;dn(bs),ms({language:bs})},className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50",children:Object.keys(Language).map(xs=>jsxRuntimeExports.jsx("option",{value:xs,children:Language[xs]},xs))}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"This will affect how AI generates content for your brand."})]})},PersonalityTraitSliders=()=>{const{traits:ds,handleTraitChange:dn}=useBrandVoiceContext(),{professionalPlayfulSlider:ms=3,formalCasualSlider:xs=3,authoritativeApproachableSlider:bs=3,enthusiasticCalmSlider:Es=3,friendlyBoldSlider:ws=3}=ds;return jsxRuntimeExports.jsx(Card,{title:"Brand personality",children:jsxRuntimeExports.jsxs("div",{className:"space-y-6",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between mb-2",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Professional"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Playful"})]}),jsxRuntimeExports.jsx("input",{type:"range",min:"1",max:"5",value:ms,onChange:Rs=>dn("professionalPlayfulSlider",parseInt(Rs.target.value)),className:"w-full h-2 bg-gray-200 accent-primary rounded-lg appearance-none cursor-pointer"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between mb-2",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Formal"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Casual"})]}),jsxRuntimeExports.jsx("input",{type:"range",min:"1",max:"5",value:xs,onChange:Rs=>dn("formalCasualSlider",parseInt(Rs.target.value)),className:"w-full h-2 bg-gray-200 accent-primary rounded-lg appearance-none cursor-pointer"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between mb-2",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Authoritative"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Approachable"})]}),jsxRuntimeExports.jsx("input",{type:"range",min:"1",max:"5",value:bs,onChange:Rs=>dn("authoritativeApproachableSlider",parseInt(Rs.target.value)),className:"w-full h-2 bg-gray-200 accent-primary rounded-lg appearance-none cursor-pointer"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between mb-2",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Enthusiastic"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Calm"})]}),jsxRuntimeExports.jsx("input",{type:"range",min:"1",max:"5",value:Es,onChange:Rs=>dn("enthusiasticCalmSlider",parseInt(Rs.target.value)),className:"w-full h-2 bg-gray-200 accent-primary rounded-lg appearance-none cursor-pointer"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between mb-2",children:[jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Friendly"}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Bold"})]}),jsxRuntimeExports.jsx("input",{type:"range",min:"1",max:"5",value:ws,onChange:Rs=>dn("friendlyBoldSlider",parseInt(Rs.target.value)),className:"w-full h-2 bg-gray-200 accent-primary rounded-lg appearance-none cursor-pointer"})]})]})})},BrandKeywords=()=>{const{keywords:ds,newKeyword:dn,setNewKeyword:ms,handleAddKeyword:xs,handleRemoveKeyword:bs}
1455=useBrandVoiceContext();return jsxRuntimeExports.jsxs(Card,{title:"Describe your brand in 3 words",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:ds.map((Es,ws)=>jsxRuntimeExports.jsxs("div",{className:"bg-secondary/10 text-secondary px-3 py-1 rounded-full flex items-center",children:[Es,jsxRuntimeExports.jsx("button",{onClick:()=>bs(Es),className:"ml-2 text-secondary hover:text-secondary/70 cursor-pointer",children:jsxRuntimeExports.jsx(Close,{colour:"var(--color-primary)",width:16})})]},ws))}),ds.length<3&&jsxRuntimeExports.jsxs("div",{className:"flex",children:[jsxRuntimeExports.jsx("input",{type:"text",value:dn,onChange:Es=>ms(Es.target.value),placeholder:"Add a keyword (e.g., innovative)",className:"flex-grow px-4 py-2 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-secondary/50",onKeyUp:Es=>Es.key==="Enter"&&xs()}),jsxRuntimeExports.jsx("button",{onClick:xs,className:"px-4 py-2 bg-secondary text-white rounded-r-lg hover:bg-secondary/90",children:"Add"})]}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[ds.length,"/3 keywords added. ",ds.length<3?`Add ${3-ds.length} more.`:""]})]})},NO_GO_OPTIONS=["Sarcastic","Salesy","Corporate","Quirky","Edgy","Passive","Jargon-heavy","Aggressive"],Exclusions=()=>{const{exclusions:ds,otherNoGo:dn,setOtherNoGo:ms,handleNoGoToggle:xs,handleAddCustomExclusion:bs}=useBrandVoiceContext();return jsxRuntimeExports.jsxs(Card,{title:"Never sound like this",children:[jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-4",children:NO_GO_OPTIONS.map(Es=>jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",id:`nogo-${Es}`,checked:ds.includes(Es),onChange:()=>xs(Es),className:"h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded"}),jsxRuntimeExports.jsx("label",{htmlFor:`nogo-${Es}`,className:"ml-2 text-gray-700",children:Es})]},Es))}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx("label",{className:"block text-gray-700 mb-2",children:"Other (custom)"}),jsxRuntimeExports.jsxs("div",{className:"flex",children:[jsxRuntimeExports.jsx("input",{type:"text",value:dn,onChange:Es=>ms(Es.target.value),placeholder:"Add custom tone to avoid",className:"flex-grow px-4 py-2 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-secondary/50",onKeyUp:Es=>Es.key==="Enter"&&bs()}),jsxRuntimeExports.jsx("button",{onClick:bs,className:"px-4 py-2 bg-secondary text-white rounded-r-lg hover:bg-secondary/90",children:"Add"})]})]}),ds.length>0&&jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx("h4",{className:"font-medium text-dark mb-2",children:"Active Exclusions"}),jsxRuntimeExports.jsx("div",{className:"flex flex-wrap gap-2",children:ds.sort().map((Es,ws)=>jsxRuntimeExports.jsxs("div",{className:"bg-secondary text-white px-3 py-1 rounded-full flex items-center",children:[Es,jsxRuntimeExports.jsx("button",{onClick:()=>xs(Es),className:"ml-2 text-white hover:text-white/70 focus:outline-none cursor-pointer",children:jsxRuntimeExports.jsx(Close,{colour:"#ffffff",width:16})})]},ws))})]})]})};var LearningCommunicationStyle=(ds=>(ds.PLAIN_LANGUAGE="Plain-Language (Neutral)",ds.PRIMER_JANET_JOHN="Primer / Janet-and-John",ds.DIRECTIVE_COMMAND_CONTROL="Directive / Command-and-Control",ds.COACHING_SUPPORTIVE="Coaching & Supportive",ds.PROFESSIONAL_REGULATORY="Professional / Regulatory (Formal)",ds.CONVERSATIONAL_FRIENDLY="Conversational (Friendly)",ds.TECHNICAL_PRECISION="Technical Precision (Engineer-to-Engineer)",ds.SAFETY_CRITICAL_CLOSED_LOOP="Safety-Critical / Closed-Loop",ds.VISUAL_FIRST_CAPTION_LED="Visual-First (Caption-Led)",ds.SCENARIO_LED_STORY_CASE="Scenario-Led (Story/Case)",ds.MICROLEARNING_BITE_SIZED="Microlearning (Bite-Sized)",ds.LEAN_TWI_JI="Lean TWI JI (Steps–Key Points–Reasons)",ds.PLAYBOOK_TACTICAL="Playbook / Tactical (Outcome-Oriented)",ds.SERVICE_CONCIERGE="Service / Concierge (Customer-Centric)",ds))(LearningCommunicationStyle||{});const COMMUNICATION_STYLE_METADATA={PLAIN_LANGUAGE:{category:"Basic Styles",useCase:"Broad audiences where reading age or language fluency varies",hallmarks:"Short sentences, everyday words, no j
1455argon",example:"1. Open the valve. 2. Check the pressure gauge."},PRIMER_JANET_JOHN:{category:"Basic Styles",useCase:"Novices or ESL learners needing controlled vocabulary",hallmarks:"One idea per step, repeated structures, scaffolded complexity",example:"This is the valve. You open the valve. The valve opens."},DIRECTIVE_COMMAND_CONTROL:{category:"Professional Styles",useCase:"Time-critical or high-stakes operations where brevity matters",hallmarks:"Imperatives, zero ambiguity, bullets, numbered steps",example:"1. Open valve. 2. Monitor gauge. 3. Close valve at 50 PSI."},COACHING_SUPPORTIVE:{category:"Professional Styles",useCase:"Skill development contexts where learners need encouragement",hallmarks:"Tips, watch-outs, positive framing, incremental guidance",example:"Try opening the valve slowly-this helps you feel the resistance. Well done!"},PROFESSIONAL_REGULATORY:{category:"Professional Styles",useCase:"Compliance, audits, or quality systems requiring formal citations",hallmarks:"Defined terms, citations to standards, shall/must language",example:"Per ISO 9001:2015 clause 8.5.1, the operator shall verify gauge calibration."},CONVERSATIONAL_FRIENDLY:{category:"Professional Styles",useCase:"Internal teams or communities wanting a warm, relatable tone",hallmarks:"Contractions, you/we pronouns, light warmth, questions",example:"So here's what we'll do: open the valve and keep an eye on that gauge, okay?"},TECHNICAL_PRECISION:{category:"Specialised Styles",useCase:"Subject-matter experts who need exact specs and tolerances",hallmarks:"Specifications, units, model numbers, rationale for design choices",example:"Rotate valve CW 90° ±5° to achieve 48-52 PSI (target: 50 PSI, tolerance: ±2 PSI)."},SAFETY_CRITICAL_CLOSED_LOOP:{category:"Specialised Styles",useCase:"High-risk environments requiring confirmations and read-backs",hallmarks:"Read-backs, confirmation steps, stop gates, explicit warnings",example:"Before opening valve, confirm: 'Valve is closed.' Now open valve. Read back pressure."},VISUAL_FIRST_CAPTION_LED:{category:"Specialised Styles",useCase:"UI-driven or machinery tasks where diagrams are primary",hallmarks:"Tight captions, callouts, annotated screenshots/photos",example:"[Image: valve with arrow] → Rotate this valve clockwise."},SCENARIO_LED_STORY_CASE:{category:"Specialised Styles",useCase:"Decision-making or exception-handling situations",hallmarks:"When/If/Then structures, vignettes, realistic examples",example:"When gauge reads 50 PSI, then close valve. If it exceeds 55, immediately shut down."},MICROLEARNING_BITE_SIZED:{category:"Specialised Styles",useCase:"Mobile or just-in-time learning requiring ultra-concise modules",hallmarks:"1-2 minute chunks, skimmable bullets, QR codes to deeper content",example:"Quick tip: Check gauge before opening valve. [QR: Full procedure]"},LEAN_TWI_JI:{category:"Specialised Styles",useCase:"Standard work documentation in Lean manufacturing contexts",hallmarks:"Major steps, key points, reasons for each point",example:"Step 1: Open valve. Key point: Rotate slowly. Reason: Prevents pressure spike."},PLAYBOOK_TACTICAL:{category:"Specialised Styles",useCase:"Incident response, sales plays, or tactical moves with clear goals",hallmarks:"Goal, trigger, success criteria, contingencies",example:"Goal: Stabilize pressure. Trigger: Gauge >55. Action: Close valve. Success: <50 PSI."},SERVICE_CONCIERGE:{category:"Specialised Styles",useCase:"Customer-facing instructions where politeness and clarity matter",hallmarks:"Please/thank you, positive framing, next-step cues",example:"Please open the valve gently. You'll see the gauge rise-perfect! Thank you."}},COMMUNICATION_STYLE_CATEGORIES=["Basic Styles","Professional Styles","Specialised Styles"];function getAllLearningStyleKeys(){return Object.keys(LearningCommunicationStyle)}function getLearningStylesByCategory(ds){return getAllLearningStyleKeys().filter(dn=>COMMUNICATION_STYLE_METADATA[dn].category===ds).map(dn=>
1455({key:dn,metadata:COMMUNICATION_STYLE_METADATA[dn]}))}const CommunicationStyleSelection=()=>{const{learningCommunicationStyle:ds,setLearningCommunicationStyle:dn,saveChanges:ms}=useBrandVoiceContext(),[xs,bs]=reactExports.useState(!1),[Es,ws]=reactExports.useState(null),[Rs,js]=reactExports.useState(null),[Cs,As]=reactExports.useState(null),ks=()=>{ws(ds??null),As(null),js(null),bs(!0)},Os=()=>{bs(!1),As(null),js(null),ws(null)},Ms=()=>{Es&&(dn(Es),ms({learningCommunicationStyle:Es}),Os())},Ds=Ws=>{ws(Ws)},Ps=Ws=>{js(Rs===Ws?null:Ws)},Ls=Ws=>{const Zs=Es===Ws.key,Ys=Rs===Ws.key;return jsxRuntimeExports.jsx("div",{className:`border rounded-lg transition-all ${Zs?"border-primary bg-primary/5":"border-gray-300 bg-white"}`,children:jsxRuntimeExports.jsx("div",{className:"p-4",children:jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntimeExports.jsx("input",{type:"radio",id:Ws.key,name:"learningStyle",checked:Zs,onChange:()=>Ds(Ws.key),className:"mt-1 w-4 h-4 text-primary focus:ring-primary/50"}),jsxRuntimeExports.jsxs("div",{className:"flex-1",children:[jsxRuntimeExports.jsx("label",{htmlFor:Ws.key,className:"font-medium text-dark cursor-pointer block",children:LearningCommunicationStyle[Ws.key]}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 mt-1",children:Ws.metadata.useCase}),jsxRuntimeExports.jsx("button",{onClick:()=>Ps(Ws.key),className:"text-sm text-primary hover:underline mt-2 focus:outline-none",children:Ys?"Hide details":"Show details"}),Ys&&jsxRuntimeExports.jsxs("div",{className:"mt-3 space-y-2 text-sm",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-semibold text-gray-700",children:"Hallmarks: "}),jsxRuntimeExports.jsx("span",{className:"text-gray-600",children:Ws.metadata.hallmarks})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"font-semibold text-gray-700",children:"Example: "}),jsxRuntimeExports.jsxs("span",{className:"text-gray-600 italic",children:['"',Ws.metadata.example,'"']})]})]})]})]})})},Ws.key)},Bs=ds,Fs=Bs?LearningCommunicationStyle[Bs]:"None selected",Us=Bs?COMMUNICATION_STYLE_METADATA[Bs]:null,Gs=Ws=>{As(Ws),js(null)},Js=()=>{As(null),js(null)};return jsxRuntimeExports.jsxs(Card,{title:"Learning Communication Style",children:[jsxRuntimeExports.jsx("p",{className:"text-gray-700 mb-4",children:"Select the communication style that best fits your training materials and audience."}),jsxRuntimeExports.jsxs("div",{className:"mb-4 p-4 bg-primary/10 border border-primary/30 rounded-lg",children:[jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Currently selected:"}),jsxRuntimeExports.jsx("div",{className:"font-semibold text-dark text-lg",children:Fs}),Us&&jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600 mt-1",children:Us.useCase})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-row",children:jsxRuntimeExports.jsx(Button,{className:"ml-auto",text:"Choose style",onClick:ks,buttonType:ButtonType.Secondary})}),xs&&jsxRuntimeExports.jsxs("div",{className:"fixed inset-0 z-50",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-black/70",onClick:Os,"aria-hidden":"true"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-3xl bg-white rounded-xl shadow-xl overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:"px-6 py-4 border-b",children:jsxRuntimeExports.jsx("h3",{className:"text-lg font-semibold text-dark",children:"To select, or change your preferred communication style, select a category:"})}),jsxRuntimeExports.jsx("div",{className:"p-6 max-h-[70vh] overflow-y-auto",children:Cs?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("button",{onClick:Js,className:"mb-4 text-primary hover:underline focus:outline-none flex items-center gap-1",children:[jsxRuntimeExports.jsx("span",{children:"←"})," Back to categories"]}),jsxRuntimeExports.jsx("h4",{className:"font-semibold text-dark mb-3 text-sm uppercase tracking-wide",children:Cs}),jsxRuntimeExports.jsx("div",{className:"space-y-3",children:getLearningStylesByCategory(Cs).map(Ls)})]}):jsxRuntimeExports.jsx("div",{className:"space-y-3",children:COMMUNICATION_STYLE_CATEGORIES.map(Ws=>jsxRuntimeExports.jsxs("button",{onClick:()=>Gs(Ws),className:"w-full p-4 border border-gray-300 rounded-lg hover:border-primary hover:bg-primary/5 transition-all text-left",children:[jsxRuntimeExports.jsx("div",{className:"font-semibold text-dark",children:Ws}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-600 mt-1",children:[getLearningStylesByCategory(Ws).length," styles available"]})]},Ws))})}),jsxRuntimeExports.jsxs("div",{className:"px-6 py-4 border-t bg-gray-50 flex items-center justify-end gap-3",children:[jsxRuntimeExports.jsx("button",{type:"button",onClick:Os,className:"px-4 py-2 text-sm font-medium rounded-md border border-gray-300 text-gray-700 hover:bg-gray-100",children:"Cancel"}),jsxRuntimeExports.jsx("button",{type:"button",onClick:Ms,disabled:!Es,className:`px-4 py-2 text-sm font-medium rounded-md text-white ${Es?"bg-primary hover:opacity-90":"bg-gray-300 cursor-not-allowed"}`,children:"Select"})]})]})})]})]})},BrandVoiceStatements=()=>{const{brandVoice:ds,brandVoiceExampleText:dn,setBrandVoiceExampleText:ms,analyzingExample:xs,handleAnalyzeBrandVoiceExample:bs}=useBrandVoiceContext(),[Es,ws]=reactExports.useState(!1),Rs=xs?SavableInputStatus.Processing:SavableInputStatus.Ready,js=()=>{ws(!0)},Cs=()=>{ws(!1),ms("")},As=async()=>{await bs(),Cs()},ks=reactExports.useMemo(()=>ds?.statements||[],[ds]),Os=async Ms=>await Sdk.brandClient.upsertBrandVoice({statements:Ms});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Card,{title:"Brand Voice Statements",children:[jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Upload examples of your brand voice to help us understand your communication style."}),ks.length>0?jsxRuntimeExports.jsx(FormList,{name:"brandVoiceStatements",defaultItems:[],externalItems:ks,rows:0,showDelete:!0,showAdd:!1,onEditSave:Os,placeholder:"Brand voice statement...",autoAddBlankRow:!0}):jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-500 italic",children:"No brand voice statements yet. Upload an example to get started."}),jsxRuntimeExports.jsx("div",{className:"flex flex-row",children:jsxRuntimeExports.jsx(Button,{text:"Upload Example",onClick:js,className:"mb-4 ml-auto",buttonType:ButtonType.Secondary})})]}),Es&&jsxRuntimeExports.jsxs(Modal,{onClose:Cs,title:"Upload Brand Voice Example",children:[jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Paste any content that represents your brand voice. We'll analyze it and extract key characteristics."}),jsxRuntimeExports.jsx("div",{className:"mb-4",children:jsxRuntimeExports.jsx("textarea",{value:dn,onChange:Ms=>ms(Ms.target.value),placeholder:"Paste your brand content here (e.g., social media posts, website copy, marketing materials)...",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50 min-h-[200px] resize-y",disabled:xs})}),jsxRuntimeExports.jsxs("div",{className:"flex gap-3 justify-end",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",onClick:Cs,disabled:xs,buttonType:ButtonType.Secondary}),jsxRuntimeExports.jsx(Button,{text:"Analyze",onClick:As,disabled:!dn.trim()||xs,status:Rs})]})]})]})};function BrandVoice(){const{loading:ds,status:dn,brandVoice:ms}=useBrandVoiceContext();return ds===PageState.Loading?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary"})}):jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Brand Voice"})}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb
1455-2",children:"Brand Voice"}),jsxRuntimeExports.jsx("p",{children:"Define your brand voice to ensure all AI-generated content is consistent with your brand's identity and values."})]})}),jsxRuntimeExports.jsx(SavingStatus,{status:dn}),ms&&jsxRuntimeExports.jsxs("div",{className:"p-2 md:px-6 grid grid-cols-1 gap-12 lg:grid-cols-2",children:[jsxRuntimeExports.jsx(LanguageSelection,{}),jsxRuntimeExports.jsx(CommunicationStyleSelection,{}),jsxRuntimeExports.jsx(BrandVoiceStatements,{}),jsxRuntimeExports.jsx(PersonalityTraitSliders,{}),jsxRuntimeExports.jsx(BrandKeywords,{}),jsxRuntimeExports.jsx(Exclusions,{})]})]})}function TeamSettings(){return jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Team"}),jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl mb-2",children:"Team"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-4",children:"Manage collaborators and roles for this manual."}),jsxRuntimeExports.jsx("div",{className:"rounded border bg-white p-4",children:jsxRuntimeExports.jsx("div",{className:"text-gray-700",children:"Team management coming soon."})})]})]})}function ColorPicker({label:ds,value:dn,onChange:ms,placeholder:xs}){return jsxRuntimeExports.jsxs("div",{className:"flex flex-row gap-x-2 items-center",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center",children:[jsxRuntimeExports.jsx("label",{className:"min-w-22 text-sm font-medium text-secondary",children:ds}),jsxRuntimeExports.jsx("input",{type:"color",value:dn,onChange:bs=>ms(bs.target.value),className:"h-10 min-w-20 cursor-pointer border-[--color-border-medium]"})]}),jsxRuntimeExports.jsx("input",{type:"text",value:dn,onChange:bs=>ms(bs.target.value),className:"px-3 py-2 h-[34px] max-w-[100px] rounded border border-[--color-border-medium] text-sm font-mono",placeholder:xs})]})}function LogoUpload({currentLogoUrl:ds,onLogoUpdated:dn}){const[ms,xs]=reactExports.useState(ds),[bs,Es]=reactExports.useState(!1),[ws,Rs]=reactExports.useState(null),[js,Cs]=reactExports.useState(!1),As=reactExports.useRef(null),{updateLogo:ks,removeLogo:Os}=useTheme();reactExports.useEffect(()=>{xs(ds)},[ds]);const Ms=async Ls=>{const Bs=Ls.target.files;if(!Bs||Bs.length===0)return;const Fs=Bs[0];if(!Fs.type.startsWith("image/")){Rs("Please select an image file");return}try{Es(!0),Rs(null);const Us=await ks(Fs);Us&&(xs(Us),dn?.(Us)),As.current&&(As.current.value="")}catch(Us){console.error("Error uploading logo:",Us),Rs("Failed to upload logo. Please try again.")}finally{Es(!1)}},Ds=()=>{As.current?.click()},Ps=async()=>{try{Es(!0),Rs(null),await Os(),xs(void 0)}catch(Ls){console.error("Error removing logo:",Ls),Rs("Failed to remove logo. Please try again.")}finally{Es(!1)}};return jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx("input",{ref:As,type:"file",accept:"image/*",onChange:Ms,className:"hidden"}),ws&&jsxRuntimeExports.jsx("div",{className:"alert alert-error",children:jsxRuntimeExports.jsx("span",{children:ws})}),ms?jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx("img",{src:ms,alt:"Organisation logo",className:"max-h-48 object-contain border border-gray-200 rounded"})}),jsxRuntimeExports.jsxs("div",{className:"flex gap-3",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,text:"Remove Logo",onClick:()=>Cs(!0),disabled:bs}),jsxRuntimeExports.jsx(Button,{className:"ml-auto",onClick:Ds,text:bs?"Uploading...":"Change Logo",disabled:bs})]})]}):jsxRuntimeExports.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:Ds,children:jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600",children:bs?jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Uploading..."}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("span",{className:"font-medium text-primary curs
1455or-pointer",children:"Click to upload"})})}),jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-500",children:"PNG, JPG, GIF up to 10MB"})]})}),jsxRuntimeExports.jsx(ConfirmModal,{open:js,onClose:()=>Cs(!1),onConfirm:Ps,title:"Remove Logo",message:"Are you sure you want to remove your organisation's logo? This action cannot be undone.",confirmText:"Remove Logo",danger:!0})]})}const DEFAULT_THEME={primaryColor:"#f5842c",secondaryColor:"#042549",tertiaryColor:"#6bc7ed",backgroundColor:"#ffffff",bodyColor:"#6bc7ed"};function PreferencesSettings(){const{userTheme:ds,updateTheme:dn}=useTheme(),[ms,xs]=reactExports.useState(DEFAULT_THEME),[bs,Es]=reactExports.useState(!1),[ws,Rs]=reactExports.useState(null),[js,Cs]=reactExports.useState(!1);reactExports.useEffect(()=>{ds&&xs({primaryColor:ds.primaryColor??DEFAULT_THEME.primaryColor,secondaryColor:ds.secondaryColor??DEFAULT_THEME.secondaryColor,tertiaryColor:ds.tertiaryColor??DEFAULT_THEME.tertiaryColor,backgroundColor:ds.backgroundColor??DEFAULT_THEME.backgroundColor,bodyColor:ds.bodyColor??DEFAULT_THEME.bodyColor})},[ds]);const As=(Ms,Ds)=>{xs(Ps=>({...Ps,[Ms]:Ds}))},ks=async()=>{Es(!0),Rs(null);try{dn(ms)}catch(Ms){console.error("Failed to save theme",Ms),Rs("Failed to save theme. Please try again.")}finally{Es(!1)}},Os=async()=>{Es(!0),Rs(null);try{xs(DEFAULT_THEME),dn(DEFAULT_THEME)}catch(Ms){console.error("Failed to reset theme",Ms),Rs("Failed to reset theme. Please try again.")}finally{Es(!1)}};return jsxRuntimeExports.jsxs("div",{className:"flex flex-col overflow-y-auto",children:[jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Preferences"}),jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl mb-2",children:"Preferences"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-6",children:"General preferences and defaults for your workspace."}),ws&&jsxRuntimeExports.jsx("div",{className:"alert alert-error mb-4 max-w-2xl",children:jsxRuntimeExports.jsx("span",{children:ws})}),jsxRuntimeExports.jsxs("div",{className:"space-y-6 max-w-4xl",children:[jsxRuntimeExports.jsxs(Card,{title:"Theme Colors",children:[jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsx(ColorPicker,{label:"Primary",value:ms.primaryColor,onChange:Ms=>As("primaryColor",Ms),placeholder:"#f5842c"}),jsxRuntimeExports.jsx(ColorPicker,{label:"Secondary",value:ms.secondaryColor,onChange:Ms=>As("secondaryColor",Ms),placeholder:"#042549"}),jsxRuntimeExports.jsx(ColorPicker,{label:"Tertiary",value:ms.tertiaryColor,onChange:Ms=>As("tertiaryColor",Ms),placeholder:"#6bc7ed"}),jsxRuntimeExports.jsx(ColorPicker,{label:"Background",value:ms.backgroundColor,onChange:Ms=>As("backgroundColor",Ms),placeholder:"#ffffff"}),jsxRuntimeExports.jsx(ColorPicker,{label:"Body Text",value:ms.bodyColor,onChange:Ms=>As("bodyColor",Ms),placeholder:"#6bc7ed"})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-row gap-3 mt-6",children:[jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Cancel,text:"Reset to Default",onClick:()=>Cs(!0),disabled:bs}),jsxRuntimeExports.jsx(Button,{onClick:ks,text:bs?"Saving...":"Save",disabled:bs})]})]}),jsxRuntimeExports.jsxs(Card,{title:"Upload Logo",children:[jsxRuntimeExports.jsx("p",{className:"mb-4",children:"Upload your organisation's logo."}),jsxRuntimeExports.jsx(LogoUpload,{currentLogoUrl:ds?.logoUrl})]})]})]}),jsxRuntimeExports.jsx(ConfirmModal,{open:js,onClose:()=>Cs(!1),onConfirm:Os,title:"Reset Theme to Default",message:"Are you sure you want to reset all theme colors to their default values? This action cannot be undone.",confirmText:"Reset to Default",cancelText:"Cancel",danger:!0})]})}const DISPOSITION_LABELS={Leave:"Leave the workspace",Reader:"Stay as a Reader",Admin:"Stay as an Admin"},UK="Europe/London";function formatTransferDate(ds){return DateTime.fromSeconds(ds,{zone:UK}).toFormat("d LLLL yyyy")}function formatTransferDateTime(ds){return DateTime.fromSeconds(ds,{zone:UK}).toFormat("d LLLL yyyy 'at' HH:mm '(UK time)'")}function seatCount(ds,dn){return`${ds} ${dn} ${ds===1?"seat":"seats"}`}const sizeClasses={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-12 w-12"},colourClasses={primary:"border-primary",blue:"border-blue-600"},Spinner=({size:ds="lg",colour:dn="primary",className:ms=""})=>{const xs=sizeClasses[ds],bs=colourClasses[dn];return jsxRuntimeExports.jsx("div",{className:`animate-spin rounded-full border-t-2 border-b-2 ${xs} ${bs} ${ms}`,role:"status","aria-label":"Loading"})};function extractErrorMessage(ds){if(typeof ds=="string")return ds;if(ds&&typeof ds=="object"&&"message"in ds){const dn=ds.message;if(typeof dn=="string")return dn}if(ds&&typeof ds=="object"&&"error"in ds){const dn=ds.error;if(typeof dn=="string")return dn.split("_").join(" ").toLowerCase()}return"An error occurred"}
1455const NETWORK_ERROR="We could not reach Manual Magic. Check your connection and try again.";function responseErrorMessage(ds,dn){return ds?.status?ds.status===400&&typeof ds.data=="string"&&ds.data.trim()!==""?ds.data:dn:NETWORK_ERROR}function throwUnlessOk(ds,dn){if(ds?.status&&ds.status>=200&&ds.status<300)return ds;throw new Error(responseErrorMessage(ds,dn))}const DISPOSITIONS=["Leave","Reader","Admin"],DISPOSITION_HINTS={Leave:"You lose access to the workspace as soon as they accept.",Reader:"You can still read the manual but cannot change anything. Needs a spare reader seat.",Admin:"You keep admin access, but not ownership or billing. Needs a spare admin seat."};function afterwards(ds,dn){const ms=dn?"you":ds.initiatedByName;switch(ds.outgoingDisposition){case"Leave":return`${ms} ${dn?"leave":"leaves"} the workspace`;case"Reader":return`${ms} ${dn?"stay":"stays"} as a Reader`;case"Admin":return`${ms} ${dn?"stay":"stays"} as an Admin`}}function TransferOwnership(){const[ds,dn]=reactExports.useState(PageState.NotReady),[ms,xs]=reactExports.useState(),[bs,Es]=reactExports.useState(""),[ws,Rs]=reactExports.useState("Leave"),[js,Cs]=reactExports.useState(""),[As,ks]=reactExports.useState({}),[Os,Ms]=reactExports.useState(!1),Ds=reactExports.useCallback(async()=>{const Fs=await Sdk.ownershipTransferClient.current();Fs?.status===200&&Fs.data?(xs(Fs.data),dn(PageState.Ready)):dn(PageState.Error)},[]);reactExports.useEffect(()=>{Ds()},[Ds]);const Ps=()=>{const Fs={};return isBlank(bs)?Fs.email="Enter the new owner's email address":/\S+@\S+\.\S+/.test(bs)||(Fs.email="That email address does not look right"),isBlank(js)&&(Fs.password="Enter your password"),Fs};if(ds===PageState.NotReady)return jsxRuntimeExports.jsx(Card,{title:"Transfer ownership",children:jsxRuntimeExports.jsx(Spinner,{size:"md"})});if(ds===PageState.Error||!ms)return jsxRuntimeExports.jsx(Card,{title:"Transfer ownership",children:jsxRuntimeExports.jsx("p",{children:"We could not load the transfer details. Reload the page to try again."})});const Ls=ms.canManage,Bs=ms.transfer&&["Pending","Accepting"].includes(ms.transfer.status)?ms.transfer:null;return Bs?jsxRuntimeExports.jsxs(Card,{title:"Transfer ownership",children:[Bs.status==="Accepting"?jsxRuntimeExports.jsxs("p",{children:[Bs.newOwnerEmail," is accepting the transfer now."]}):jsxRuntimeExports.jsxs("p",{children:["Waiting for ",Bs.newOwnerEmail," to accept. The link expires on ",formatTransferDateTime(Bs.expiresEpoch),"."]}),jsxRuntimeExports.jsxs("p",{className:"mt-2",children:["When they accept, they become the owner and take over billing, and ",afterwards(Bs,Ls),"."]}),Ls&&Bs.status==="Pending"&&jsxRuntimeExports.jsx("div",{className:"mt-4 flex",children:jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Cancel,text:"Cancel transfer",onClick:()=>Ms(!0)})}),!Ls&&jsxRuntimeExports.jsx("p",{className:"mt-2",children:"Only the owner can transfer the workspace or cancel a transfer."}),jsxRuntimeExports.jsx(AsyncConfirmModal,{open:Os,onClose:()=>Ms(!1),title:"Cancel this transfer?",message:`The link we sent to ${Bs.newOwnerEmail} will stop working. Nothing in the workspace changes.`,confirmText:"Cancel transfer",cancelText:"Keep it",danger:!0,save:async()=>throwUnlessOk(await Sdk.ownershipTransferClient.cancel(),"The transfer could not be cancelled. Try again in a few minutes."),onSuccess:()=>{Ds()}})]}):Ls?jsxRuntimeExports.jsxs(Card,{title:"Transfer ownership",children:[jsxRuntimeExports.jsx("p",{className:"mb-4",children:"Hand this workspace to someone else. They become the owner, and you choose what happens to you."}),jsxRuntimeExports.jsxs("form",{onSubmit:Fs=>Fs.preventDefault(),children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:flex-row md:items-end gap-2 md:gap-6",children:[jsxRuntimeExports.jsx(FormInput,{className:"md:flex-1",label:"New owner's email",name:"newOwnerEmail",placeholder:"[email protected]",onChange:Fs=>Es(Fs.currentTarget.value),value:bs,autoComplete:"off"}),jsxRuntimeExports.jsx("p",{className:"md:flex-1 text-sm text-gray-600",children:"They must not belong to any other Manual Magic workspace. They can be new to Manual Magic, or already be in this one."})]}),As.email&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:As.email}),jsxRuntimeExports.jsxs("fieldset",{className:"mt-6",children:[jsxRuntimeExports.jsx("legend",{className:"text-lg mb-2",children:"What happens to you"}),jsxRuntimeExports.jsx("div",{className:"space-y-2",children:DISPOSITIONS.map(Fs=>jsxRuntimeExports.jsxs("label",{htmlFor:`disposition-${Fs}`,className:`flex items-start gap-3 border rounded-lg p-3 cursor-pointer ${ws===Fs?"border-primary bg-primary/5":"border-gray-300 bg-white"}`,children:[jsxRuntimeExports.jsx("input",{type:"radio",id:`disposition-${Fs}`,name:"outgoingDisposition",checked:ws===Fs,onChange:()=>Rs(Fs),className:"mt-1 w-4 h-4 accent-primary focus:ring-primary/50"}),jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx("span",{className:"font-medium block",children:DISPOSITION_LABELS[Fs]}),jsxRuntimeExports.jsx("span",{className:"text-sm text-gray-600",children:DISPOSITION_HINTS[Fs]})]})]},Fs))})]}),jsxRuntimeExports.jsx(FormPassword,{className:"mt-6",label:"Your password",name:"password",onChange:Fs=>Cs(Fs.currentTarget.value),value:js,autoComplete:"current-password"}),As.password&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:As.password}),jsxRuntimeExports.jsx("div",{className:"mt-6 rounded border border-gray-200 bg-gray-50 p-4",children:jsxRuntimeExports.jsx("p",{children:"The new owner gets full admin control of this workspace and takes over billing. Their card replaces the one on file. We email them a link that lasts 72 hours, and nothing changes until they accept. You can cancel before then."})}),As.response&&jsxRuntimeExports.jsx("p",{className:"mt-4 rounded border border-red-200 bg-red-50 p-3 text-red-700",children:As.response}),jsxRuntimeExports.jsx("div",{className:"mt-6 flex",children:jsxRuntimeExports.jsx(AsyncButton,{className:"ml-auto",text:"Send transfer",validate:Ps,save:async()=>throwUnlessOk(await Sdk.ownershipTransferClient.initiate({newOwnerEmail:bs.trim(),outgoingDisposition:ws,password:js}),"The transfer could not be started. Try again in a few minutes."),onSuccess:()=>{Es(""),Cs(""),Rs("Leave"),ks({}),Ds()},onFailure:Fs=>ks(Fs)})})]})]}):jsxRuntimeExports.jsx(Card,{title:"Transfer ownership",children:jsxRuntimeExports.jsx("p",{children:"Only the owner can transfer the workspace."})})}function WorkspaceSettings(){return jsxRuntimeExports.jsxs("div",{className:"flex flex-col overflow-y-auto",children:[jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Workspace"}),jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl mb-2",children:"Worksp
1455ace"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-6",children:"Who owns this workspace."}),jsxRuntimeExports.jsx("div",{className:"space-y-6 max-w-4xl",children:jsxRuntimeExports.jsx(TransferOwnership,{})})]})]})}const DEFAULT_TRAITS={professionalPlayfulSlider:3,formalCasualSlider:3,authoritativeApproachableSlider:3,enthusiasticCalmSlider:3,friendlyBoldSlider:3},BrandVoiceProvider=({children:ds})=>{const[dn,ms]=reactExports.useState(PageState.NotReady),[xs,bs]=reactExports.useState(),[Es,ws]=reactExports.useState("LinkedIn"),[Rs,js]=reactExports.useState("a new product launch"),[Cs,As]=reactExports.useState(DEFAULT_TRAITS),[ks,Os]=reactExports.useState(Language.EnglishUK),[Ms,Ds]=reactExports.useState([]),[Ps,Ls]=reactExports.useState(""),[Bs,Fs]=reactExports.useState([]),[Us,Gs]=reactExports.useState(""),[Js,Ws]=reactExports.useState(""),[Zs,Ys]=reactExports.useState("text"),[Qs,ai]=reactExports.useState([]),[ia,ca]=reactExports.useState(""),[ha,ea]=reactExports.useState(void 0),[ta,aa]=reactExports.useState(""),[fa,ua]=reactExports.useState(!1),{save:Ea,status:ra}=useNetworkDebounce(async Ma=>{const Fa=await Sdk.brandClient.upsertBrandVoice(Ma);let Ka=Fa.data;return Ka&&(bs(Ka),Os(Ka.language),As(Ka.traits||DEFAULT_TRAITS),Ds(Ka.keywords||[]),Fs(Ka.references||[]),ai(Ka.exclusions||[]),ea(Ka.learningCommunicationStyle)),Fa});reactExports.useEffect(()=>{const Ma=async()=>{try{const Fa=await Sdk.brandClient.brandVoice();Fa?.data?(bs(Fa.data),Os(Fa.data.language),As(Fa.data.traits||DEFAULT_TRAITS),Ds(Fa.data.keywords||[]),Fs(Fa.data.references||[]),ai(Fa.data.exclusions||[]),ea(Fa.data.learningCommunicationStyle)):Ea({language:Language.EnglishUK}),ms(PageState.Ready)}catch(Fa){console.error("Failed to load data:",Fa),ms(PageState.Error)}};dn===PageState.NotReady&&(ms(PageState.Loading),Ma())},[dn]);const Ia=reactExports.useCallback((Ma,Fa)=>{const Ka={...Cs||DEFAULT_TRAITS,[Ma]:Fa};As(Ka),Ea({language:ks,traits:Ka,keywords:Ms,references:Bs,exclusions:Qs})},[Cs,Ea,ks,Ms,Bs,Qs]),$a=reactExports.useCallback(()=>{if(!Ps.trim()||Ms.length>=3||Ms.includes(Ps.trim()))return;Ls("");const Ma=[...Ms,Ps.trim()];Ds(Ma),Ea({keywords:Ma})},[Ps,Ms,Ea]),oa=reactExports.useCallback(Ma=>{let Fa=Ms.filter(Ka=>Ka!==Ma);Ds(Fa),Ea({keywords:Fa})},[Ms,Ea]),sa=reactExports.useCallback(()=>{Zs==="text"&&Us.trim()?(Ea({references:[...Bs,{type:"text",value:Us.trim()}]}),Gs("")):Zs==="url"&&Js.trim()&&(Ea({references:[...Bs,{type:"url",value:Js.trim()}]}),Ws(""))},[Zs,Us,Js,Bs,Ea]),Ra=reactExports.useCallback(Ma=>{const Fa=Ma.target.files?.[0];if(!Fa)return;const Ka=new FileReader;Ka.onload=()=>{const mo={type:"file",value:Fa.name},ko=[...Bs,mo];Fs(ko),Ea({references:ko})},Ka.readAsDataURL(Fa)},[Bs,Ea]),_a=reactExports.useCallback(Ma=>{const Fa=[...Bs];Fa.splice(Ma,1),Ea({references:Fa})},[Bs,Ea]),Oa=reactExports.useCallback(Ma=>{let Fa;Qs.includes(Ma)?Fa=Qs.filter(Ka=>Ka!==Ma):Fa=[...Qs,Ma],ai(Fa),Ea({exclusions:Fa})},[Qs,Ea]),za=reactExports.useCallback(()=>{if(!ia.trim()||Qs.includes(ia.trim()))return;const Ma=[...Qs,ia.trim()];ca(""),ai(Ma),Ea({exclusions:Ma})},[ia,Qs,Ea]),Ga=reactExports.useCallback(async()=>{if(!(!ta.trim()||!xs)){ua(!0);try{const Ma=await Sdk.brandClient.analyzeBrandVoiceExample(ta);if(Ma.status===200&&Ma.data){const Ka=[...xs.statements||[],...Ma.data],mo=await Sdk.brandClient.upsertBrandVoice({statements:Ka});mo.data&&(bs(mo.data),aa(""))}}catch(Ma){console.error("Failed to analyze brand voice example:",Ma)}finally{ua(!1)}}},[ta,xs]),qa=reactExports.useCallback(async Ma=>{!xs||!xs.statements||Ea({statements:xs.statements.filter((Fa,Ka)=>Ka!==Ma)})},[xs]);return jsxRuntimeExports.jsx(BrandVoiceContext.Provider,{value:{brandVoice:xs,loading:dn,platform:Es,setPlatform:ws,topic:Rs,setTopic:js,traits:Cs,language:ks,setLanguage:Os,keywords:Ms,newKeyword:Ps,setNewKeyword:Ls,references:Bs,referenceText:Us,setReferenceText:Gs,referenceUrl:Js,setReferenceUrl:Ws,activeReferenceTab:Zs,setActiveReferenceTab:Ys,exclusions:Qs,otherNoGo:ia,setOtherNoGo:ca,learningCommunicationStyle:ha,setLearningCommunicationStyle:ea,brandVoiceExampleText:ta,setBrandVoiceExampleText:aa,analyzingExample:fa,status:ra,saveChanges:Ea,handleTraitChange:Ia,handleAddKeyword:$a,handleRemoveKeyword:oa,handleAddReference:sa,handleReferenceFileUpload:Ra,handleRemoveReference:_a,handleNoGoToggle:Oa,handleAddCustomExclusion:za,handleAnalyzeBrandVoiceExample:Ga,handleRemoveBrandVoiceStatement:qa},children:dn===PageState.Ready&&xs&&ds})},TargetReaderContext=reactExports.createContext({}),useTargetReaderContext=()=>{const ds=reactExports.useContext(TargetReaderContext);if(ds===void 0)throw new Error("useTargetReaderContext must be used within a TargetReaderProvider");return ds},TargetReaderProvider=({children:ds})=>{const[dn,ms]=reactExports.useState(PageState.NotReady),[xs,bs]=reactExports.useState(),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState(""),[ks,Os]=reactExports.useState(""),{save:Ms,status:Ds}=useNetworkDebounce(async Us=>
1455{const Gs=await Sdk.businessDetailsClient.updateBusinessDetails(Us),Js=Gs.data;return Js&&(bs(Js),ws(Js.targetReaders??""),js(Js.idealOutcomes??""),As(Js.accessPatterns??""),Os(Js.readerBackground??"")),Gs});reactExports.useEffect(()=>{const Us=async()=>{try{const Gs=await Sdk.businessDetailsClient.fetchBusinessDetails();Gs?.data&&(bs(Gs.data),ws(Gs.data.targetReaders??""),js(Gs.data.idealOutcomes??""),As(Gs.data.accessPatterns??""),Os(Gs.data.readerBackground??"")),ms(PageState.Ready)}catch(Gs){console.error("Failed to load business details:",Gs),ms(PageState.Error)}};dn===PageState.NotReady&&(ms(PageState.Loading),Us())},[dn]);const Ps=reactExports.useCallback(Us=>{ws(Us),Ms({targetReaders:Us,idealOutcomes:Rs,accessPatterns:Cs,readerBackground:ks})},[Ms,Rs,Cs,ks]),Ls=reactExports.useCallback(Us=>{js(Us),Ms({targetReaders:Es,idealOutcomes:Us,accessPatterns:Cs,readerBackground:ks})},[Ms,Es,Cs,ks]),Bs=reactExports.useCallback(Us=>{As(Us),Ms({targetReaders:Es,idealOutcomes:Rs,accessPatterns:Us,readerBackground:ks})},[Ms,Es,Rs,ks]),Fs=reactExports.useCallback(Us=>{Os(Us),Ms({targetReaders:Es,idealOutcomes:Rs,accessPatterns:Cs,readerBackground:Us})},[Ms,Es,Rs,Cs]);return jsxRuntimeExports.jsx(TargetReaderContext.Provider,{value:{businessDetails:xs,loading:dn,targetReaders:Es,setTargetReaders:ws,idealOutcomes:Rs,setIdealOutcomes:js,accessPatterns:Cs,setAccessPatterns:As,readerBackground:ks,setReaderBackground:Os,status:Ds,saveChanges:Ms,handleTargetReadersChange:Ps,handleIdealOutcomesChange:Ls,handleAccessPatternsChange:Bs,handleReaderBackgroundChange:Fs},children:dn===PageState.Ready&&ds})},BusinessDetailsContext=reactExports.createContext({}),useBusinessDetailsContext=()=>{const ds=reactExports.useContext(BusinessDetailsContext);if(ds===void 0)throw new Error("useBusinessDetailsContext must be used within a BusinessDetailsProvider");return ds},BusinessDetailsProvider=({children:ds})=>{const[dn,ms]=reactExports.useState(PageState.NotReady),[xs,bs]=reactExports.useState(),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState(""),[ks,Os]=reactExports.useState([]),[Ms,Ds]=reactExports.useState([]),[Ps,Ls]=reactExports.useState([]),[Bs,Fs]=reactExports.useState([]),{save:Us,status:Gs}=useNetworkDebounce(async ca=>{const ha=await Sdk.businessDetailsClient.updateBusinessDetails(ca),ea=ha.data;return ea&&(bs(ea),ws(ea.businessDescription??""),js(ea.serviceModel??""),As(ea.businessSector??""),Os(ea.customerEngagementMethods??[]),Ds(ea.standardRoles??[]),Ls(ea.regulatoryStandards??[]),Fs(ea.criticalEquipment??[])),ha});reactExports.useEffect(()=>{const ca=async()=>{try{const ha=await Sdk.businessDetailsClient.fetchBusinessDetails();ha?.data&&(bs(ha.data),ws(ha.data.businessDescription??""),js(ha.data.serviceModel??""),As(ha.data.businessSector??""),Os(ha.data.customerEngagementMethods??[]),Ds(ha.data.standardRoles??[]),Ls(ha.data.regulatoryStandards??[]),Fs(ha.data.criticalEquipment??[])),ms(PageState.Ready)}catch(ha){console.error("Failed to load business details:",ha),ms(PageState.Error)}};dn===PageState.NotReady&&(ms(PageState.Loading),ca())},[dn]);const Js=reactExports.useCallback(ca=>{ws(ca),Us({businessDescription:ca,serviceModel:Rs,businessSector:Cs,customerEngagementMethods:ks,standardRoles:Ms,regulatoryStandards:Ps,criticalEquipment:Bs})},[Us,Rs,Cs,ks,Ms,Ps,Bs]),Ws=reactExports.useCallback(ca=>{js(ca),Us({businessDescription:Es,serviceModel:ca,businessSector:Cs,customerEngagementMethods:ks,standardRoles:Ms,regulatoryStandards:Ps,criticalEquipment:Bs})},[Us,Es,Cs,ks,Ms,Ps,Bs]),Zs=reactExports.useCallback(ca=>{As(ca),Us({businessDescription:Es,serviceModel:Rs,businessSector:ca,customerEngagementMethods:ks,standardRoles:Ms,regulatoryStandards:Ps,criticalEquipment:Bs})},[Us,Es,ks,Ms,Ps,Bs]),Ys=reactExports.useCallback(ca=>{Os(ca),Us({businessDescription:Es,serviceModel:Rs,businessSector:Cs,customerEngagementMethods:ca,standardRoles:Ms,regulatoryStandards:Ps,criticalEquipment:Bs})},[Us,Es,Rs,Cs,Ms,Ps,Bs]),Qs=reactExports.useCallback(ca=>{Ds(ca),Us({businessDescription:Es,serviceModel:Rs,businessSector:Cs,customerEngagementMethods:ks,standardRoles:ca,regulatoryStandards:Ps,criticalEquipment:Bs})},[Us,Es,Rs,Cs,ks,Ps,Bs]),ai=reactExports.useCallback(ca=>{Ls(ca),Us({businessDescription:Es,serviceModel:Rs,businessSector:Cs,customerEngagementMethods:ks,standardRoles:Ms,regulatoryStandards:ca,criticalEquipment:Bs})},[Us,Es,Rs,ks,Ms,Bs]),ia=reactExports.useCallback(ca=>{Fs(ca),Us({businessDescription:Es,serviceModel:Rs,businessSector:Cs,customerEngagementMethods:ks,standardRoles:Ms,regulatoryStandards:Ps,criticalEquipment:ca})},[Us,Es,Rs,Cs,ks,Ms,Ps]);
1455return jsxRuntimeExports.jsx(BusinessDetailsContext.Provider,{value:{businessDetails:xs,loading:dn,businessDescription:Es,setBusinessDescription:ws,serviceModel:Rs,setServiceModel:js,businessSector:Cs,setBusinessSector:As,customerEngagementMethods:ks,setCustomerEngagementMethods:Os,standardRoles:Ms,setStandardRoles:Ds,regulatoryStandards:Ps,setRegulatoryStandards:Ls,criticalEquipment:Bs,setCriticalEquipment:Fs,status:Gs,saveChanges:Us,handleBusinessDescriptionChange:Js,handleServiceModelChange:Ws,handleBusinessSectorChange:Zs,handleCustomerEngagementMethodsChange:Ys,handleStandardRolesChange:Qs,handleRegulatoryStandardsChange:ai,handleCriticalEquipmentChange:ia},children:dn===PageState.Ready&&ds})};function BusinessDetails(){const{businessDescription:ds,serviceModel:dn,businessSector:ms,customerEngagementMethods:xs,standardRoles:bs,regulatoryStandards:Es,criticalEquipment:ws,status:Rs,handleBusinessDescriptionChange:js,handleServiceModelChange:Cs,handleBusinessSectorChange:As,handleCustomerEngagementMethodsChange:ks,handleStandardRolesChange:Os,handleRegulatoryStandardsChange:Ms,handleCriticalEquipmentChange:Ds}=useBusinessDetailsContext();return jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Business Details"})}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Business Details"}),jsxRuntimeExports.jsx("p",{children:"Tell us about your business to help us provide better AI suggestions."})]})}),jsxRuntimeExports.jsx(SavingStatus,{status:Rs}),jsxRuntimeExports.jsx("div",{className:"max-w-4xl",children:jsxRuntimeExports.jsxs("div",{className:"md:px-6 space-y-8",children:[jsxRuntimeExports.jsx(Card,{title:"Your Business",className:"space-y-8",children:jsxRuntimeExports.jsx(FormTextArea,{label:"What does your business do?",name:"businessDescription",placeholder:"Describe your business...",defaultValue:ds,onInputUpdated:js,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1})}),jsxRuntimeExports.jsxs(Card,{title:"Business Details",className:"space-y-8",children:[jsxRuntimeExports.jsx(FormTextArea,{label:"What best describes your business model?",name:"serviceModels",examples:"Direct sales, franchising, advertising-based, brick-and-mortar, stores, manufacturing",defaultValue:dn,onInputUpdated:Cs,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1}),jsxRuntimeExports.jsx(FormTextArea,{label:"What best describes your business sector?",name:"businessSector",examples:"F&B, Hospitality, Full-service dining, Retail, Personal services (e.g., salon), residential, domiciliary, community care, field services, Fitness/wellness",defaultValue:ms,onInputUpdated:As,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1}),jsxRuntimeExports.jsx(FormList,{label:"How do customers primarily engage with you?",name:"customerEngagementMethods",defaultItems:[],externalItems:xs,rows:3,showDelete:!0,autoAddBlankRow:!0,examples:"Walk-in, Appointment/booking, Drive-thru, Delivery, E-commerce click-and-collect, On-site/field visit",onInputUpdated:ks}),jsxRuntimeExports.jsx(FormList,{label:"Which standard roles exist at a typical unit?",name:"standardRoles",defaultItems:[],externalItems:bs,rows:3,showDelete:!0,autoAddBlankRow:!0,examples:"Franchisee/Owner, General Manager, Shift Lead/Supervisor, Frontline Associate/Team Member, Prep/Tech, Trainer, Auditor",onInputUpdated:Os}),jsxRuntimeExports.jsx(FormList,{label:"Which regulated/brand standards apply to your business?",name:"regulatoryStandards",defaultItems:[],externalItems:Es,rows:3,showDelete:!0,autoAddBlankRow:!0,examples:"Food safety (HACCP), Allergen handling, Health & safety (OSHA/H&S), Data privacy (GDPR), Payment security (PCI), Brand visual standards",onInputUpdated:Ms}),jsxRuntimeExports.jsx(FormList,{label:"What equipment/systems are critical to a shift?",name:"criticalEquipment",defaultItems:[],externalItems:ws,rows:3,showDelete:!0,autoAddBlankRow:!0,examples:"POS, Inventory system, Scheduling app, Espresso machine/oven/grill, Refrigerator/freezer, Vehicle/tools kit, Cleaning/sanitising station",onInputUpdated:Ds})]})]})})]})}function TargetReader(){const{targetReaders:ds,idealOutcomes:dn,accessPatterns:ms,readerBackgroun
1455d:xs,status:bs,handleTargetReadersChange:Es,handleIdealOutcomesChange:ws,handleAccessPatternsChange:Rs,handleReaderBackgroundChange:js}=useTargetReaderContext();return jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto",children:[jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx(SettingsBreadcrumb,{current:"Business Details"})}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Target Reader"}),jsxRuntimeExports.jsx("p",{children:"Tell us about your target reader to help us tailor content for your audience."})]})}),jsxRuntimeExports.jsx(SavingStatus,{status:bs}),jsxRuntimeExports.jsx("div",{className:"max-w-4xl",children:jsxRuntimeExports.jsx("div",{className:"px-6 space-y-8",children:jsxRuntimeExports.jsxs(Card,{className:"space-y-8",children:[jsxRuntimeExports.jsx(FormTextArea,{label:"Who is your target reader?",name:"targetReaders",placeholder:"Describe your primary and secondary readers...",defaultValue:ds,examples:"Primary: Restaurant Manager (60%) - responsible for daily operations, staff scheduling, compliance. Secondary: Shift Supervisors (30%), New Hires (10%)",onInputUpdated:Es,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1}),jsxRuntimeExports.jsx(FormTextArea,{label:"What jobs/outcomes must this reader achieve?",name:"idealOutcomes",placeholder:"Describe key KPIs, compliance requirements, and success metrics...",defaultValue:dn,examples:"Pass health inspections, maintain <2% food waste, resolve customer complaints within 10 mins, achieve 90%+ employee retention",onInputUpdated:ws,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1}),jsxRuntimeExports.jsx(FormTextArea,{label:"When/where will readers use this manual?",name:"accessPatterns",placeholder:"Describe moments of need, devices, connectivity requirements...",defaultValue:ms,examples:"Pre-shift briefings (tablet, online), during service (mobile, offline), emergency procedures (print backup), desktop for training",onInputUpdated:Rs,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1}),jsxRuntimeExports.jsx(FormTextArea,{label:"What is the reader's baseline capability?",name:"readerBackground",placeholder:"Describe background, certifications, existing systems, language level...",defaultValue:xs,examples:"High school education, Food Handler certification required, familiar with Square POS and 7shifts, ESL support needed for 40% of staff",onInputUpdated:js,characterLimit:2e3,showCopy:!0,rows:4,autoSize:!1})]})})})]})}function AddManual({onAdd:ds}){const[dn,ms]=reactExports.useState(""),[xs,bs]=reactExports.useState();function Es(){const js={};return dn?.trim()||(js.name="Name required"),js}function ws(js){js?.data&&ds?.(js?.data)}function Rs(js){bs(js.response||js.name||"Unable to create manual. Please try again.")}return jsxRuntimeExports.jsx("div",{className:"p-6 text-[--text-dark]",children:jsxRuntimeExports.jsxs("div",{className:"max-w-3xl mx-auto",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-semibold",children:"Create your Operations Manual"}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-[--text-muted]",children:"Create your first manual. Once created you can upload your existing IP and assign sections to your team."}),jsxRuntimeExports.jsxs("div",{className:"mt-6 rounded-lg border border-[--border-medium] bg-[--background-neutral] p-6",children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-[--text-muted]",children:"Manual Name"}),jsxRuntimeExports.jsx("input",{className:"mt-2 w-full rounded border border-[--border-medium] bg-white p-2",value:dn,onChange:js=>ms(js.target.value),placeholder:"Provide a name for your Operations Manual"}),xs&&jsxRuntimeExports.jsx("p",{className:"mt-3 text-red-600",children:xs}),jsxRuntimeExports.jsx("div",{className:"mt-6 flex justify-end",children:jsxRuntimeExports.jsx(AsyncButton,{className:"px-4",text:"Create",validate:Es,save:()=>Sdk.manualsClient.create(dn.trim()),onSuccess:ws,onFailure:Rs,disabled:!dn?.trim()})})]})]})})}function InviteAdminModal({availableSeats:ds,onClose:dn,onSuccess:ms}){const[xs,bs]=reactExports.useState(""),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState({}),ks=()=>{bs(""),ws(""),js(""),As({}),dn()};return jsxRuntimeExports.jsx(Modal,{onClose:ks,title:"Invite Admin to Organisation",children:jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[ds>0&&ds<3&&jsxRuntimeExports.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:jsxRuntimeExports.jsxs("p",{className:"text-sm text-amber-800",children:["Only ",ds," admin seat",ds!==1?"s":""," remaining."]})}),jsxRuntimeExports.jsx(FormInput,{name:"first-name",label:"First Name",value:xs,onChange:Os=>bs(Os.target.value),placeholder:"John",autoFocus:!0}),Cs.firstName&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Cs.firstName}),jsxRuntimeExports.jsx(FormInput,{name:"last-name",label:"Last Name",value:Es,onChange:Os=>ws(Os.target.value),placeholder:"Doe"}),Cs.lastName&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Cs.lastName}),jsxRuntimeExports.jsx(FormInput,{name:"email",label:"Email",value:Rs,onChange:Os=>js(Os.target.value),placeholder:"[email protected]"}),Cs.email&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Cs.email}),Cs.response&&jsxRuntimeExports.jsx("p",{className:"mt-2 text-sm text-red-600",children:Cs.response}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[jsxRuntimeExports.jsx(Button,{className:"px-4 py-2 text-sm rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50",onClick:ks,type:"button",text:"Cancel",buttonType:ButtonType.Cancel}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:"Send Invite",validate:()=>{const Os={};return xs.trim()||(Os.firstName="First name is required"),Es.trim()||(Os.lastName="Last name is required"),Rs.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Rs)||(Os.email="Please enter a valid email address"):Os.email="Email is required",As(Os),Os},save:()=>Sdk.organisationMembersClient.createMemberInvite({firstName:xs.trim(),lastName:Es.trim(),email:Rs.trim(),isAdmin:!0}),onSuccess:()=>{debugger;bs(""),ws(""),js(""),As({}),ks(),ms?.()},onFailure:Os=>{As(Ms=>({...Ms,...Os}))}})]})]})})}function TeamInvitesList({invites:ds,title:dn,emptyMessage:ms}){return jsxRuntimeExports.jsx(Card,{title:dn,children:ds.length===0?jsxRuntimeExports.jsx("div",{className:"text-center py-12 text-gray-500",children:jsxRuntimeExports.jsx("p",{children:ms})}):jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full text-sm",children:[jsxRuntimeExports.jsx("thead",{className:"text-left border-b border-gray-200",children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Name"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Email"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Invited"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700 text-right",children:"Status"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700 text-right"})]})}),jsxRuntimeExports.jsx("tbody",{children:ds.map(xs=>jsxRuntimeExports.jsxs("tr",{className:"border-t border-gray-100 hover:bg-gray-50",children:[jsxRuntimeExports.jsx("td",{className:"px-4 py-3",children:jsxRuntimeExports.jsxs("span",{className:"font-medium text-gray-900",children:[xs.firstName," ",xs.lastName]})}),jsxRuntimeExports.jsx("td",{className:"px-4 py-3 text-gray-600",children:xs.email}),jsxRuntimeExports.jsx("td",{className:"px-4 py-3 text-gray-600",children:DateTime.fromISO(xs.createdAt).toLocaleStr
1455ing(DateTime.DATE_MED)}),jsxRuntimeExports.jsx("td",{className:"pl-4 pr-2 py-3 text-right",children:jsxRuntimeExports.jsx("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium rounded-full bg-yellow-100 text-yellow-800",children:"Pending"})}),jsxRuntimeExports.jsx("td",{className:"pl-2 pr-4 py-3 text-right",children:jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Secondary,text:"Resend",save:()=>Sdk.organisationMembersClient.resendMemberInvite(xs.id)})})]},xs.id))})]})})})}var MemberRole=(ds=>(ds.Admin="Admin",ds.Member="Member",ds))(MemberRole||{});const NoSeatsAvailableModal=({seatType:ds,currentAllocation:dn,onUpgrade:ms,onClose:xs})=>{const bs=ds==="admin",Es=bs?dn.adminSeatsUsed:dn.readerSeatsUsed,ws=bs?dn.adminSeatsPurchased:dn.readerSeatsPurchased,Rs=bs?"admin":"reader";return jsxRuntimeExports.jsx(Modal,{onClose:xs,title:`No ${bs?"Admin":"Reader"} Seats Available`,children:jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs("p",{className:"text-gray-700",children:["You've used all available ",Rs," seats."]}),jsxRuntimeExports.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:jsxRuntimeExports.jsxs("p",{className:"text-sm text-gray-600",children:["You're currently using ",jsxRuntimeExports.jsxs("strong",{children:[Es," of ",ws]})," ",Rs," seat",ws!==1?"s":"","."]})}),jsxRuntimeExports.jsxs("p",{className:"text-gray-700",children:["To add more ",Rs,bs?"s":" members",", you'll need to upgrade your subscription."]}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:xs}),jsxRuntimeExports.jsx(Button,{text:"Upgrade Now",buttonType:ButtonType.Primary,onClick:()=>{xs(),ms()}})]})]})})};function TeamMembersSection({licenceAllocation:ds,onRefreshLicences:dn,onManageLicences:ms}){const[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState(!0),[Rs,js]=reactExports.useState(null),[Cs,As]=reactExports.useState(null),[ks,Os]=reactExports.useState(!1),[Ms,Ds]=reactExports.useState(!1),[Ps,Ls]=reactExports.useState([]),Bs=async()=>{ws(!0),js(null);try{const[Js,Ws]=await Promise.all([Sdk.organisationMembersClient.listOrganisationMembers(),Sdk.organisationMembersClient.getInvites({role:MemberRole.Admin})]),Zs=Js.filter(Ys=>Ys.roles.includes(MemberRole.Admin));bs(Zs),Ls(Ws)}catch(Js){console.error("Failed to load team members:",Js),js("Failed to load team members")}finally{ws(!1)}};reactExports.useEffect(()=>{Bs()},[]);const Fs=Js=>new Date(Js).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Us=()=>{if(ds&&ds.adminSeatsAvailable===0){Ds(!0);return}Os(!0)},Gs=()=>{const Js=ds?.adminSeatsPurchased||1;ms(Js+1,ds?.readerSeatsPurchased)};return Es?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center py-12",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Rs&&jsxRuntimeExports.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:Rs}),jsxRuntimeExports.jsx(Card,{title:"Admin Users",action:jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,text:"Add Admin",onClick:Us}),children:xs.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-12 text-gray-500",children:[jsxRuntimeExports.jsx("p",{className:"mb-2",children:"No team members yet."}),jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Add a team member to get started."})]}):jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full text-sm",children:[jsxRuntimeExports.jsx("thead",{className:"text-left border-b border-gray-200",children:jsxRuntimeExports.jsxs("tr",{className:"[&>th]:px-4 [&>th]:py-3 [&>th]:font-medium [&>th]:text-gray-700",children:[jsxRuntimeExports.jsx("th",{children:"Name"}),jsxRuntimeExports.jsx("th",{children:"Email"}),jsxRuntimeExports.jsx("th",{children:"Joined"}),jsxRuntimeExports.jsx("th",{})]})}),jsxRuntimeExports.jsx("tbody",{children:xs.map(Js=>jsxRuntimeExports.jsxs("tr",{className:"border-t border-gray-100 hover:bg-gray-50 [&>td]:px-4 [&>td]:py-3",children:[jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"flex items-center gap-2",children:jsxRuntimeExports.jsxs("span",{className:"font-medium text-gray-900",children:[Js.user.firstName," ",Js.user.lastName]})})}),jsxRuntimeExports.jsx("td",{className:"text-gray-600",children:Js.user.email}),jsxRuntimeExports.jsx("td",{className:"text-gray-600",children:Fs(Js.joinedAt)}),jsxRuntimeExports.jsx("td",{className:"text-right",children:jsxRuntimeExports.jsx("div",{className:"flex justify-end gap-2",children:jsxRuntimeExports.jsx(Button,{onClick:()=>As(Js),jsx:jsxRuntimeExports.jsx(Trash2,{color:"red"}),buttonType:ButtonType.Quaternary})})})]},Js.id))})]})})}),jsxRuntimeExports.jsx("div",{className:"mt-6",children:jsxRuntimeExports.jsx(TeamInvitesList,{invites:Ps,title:"Pending Invites",emptyMessage:"No pending invites"})}),ks&&jsxRuntimeExports.jsx(InviteAdminModal,{availableSeats:ds?.adminSeatsAvailable||0,onClose:()=>Os(!1),onSuccess:async()=>{Os(!1),await Bs(),await dn()}}),Ms&&ds&&jsxRuntimeExports.jsx(NoSeatsAvailableModal,{seatType:"admin",currentAllocation:ds,onUpgrade:Gs,onClose:()=>Ds(!1)}),jsxRuntimeExports.jsx(AsyncConfirmModal,{open:Cs!==null,onClose:()=>As(null),save:async()=>
1455{if(!Cs)throw new Error("No member selected");return await Sdk.organisationMembersClient.removeOrganisationMember(Cs.id)},onSuccess:async()=>{As(null),await Bs()},onFailure:Js=>{console.error("Failed to remove organisation member:",Js)},title:"Remove Admin User",message:`Are you sure you want to remove ${Cs?.user.firstName} ${Cs?.user.lastName} from the organisation? This action cannot be undone.`,confirmText:"Remove",cancelText:"Cancel",danger:!0})]})}function Tabs({tabs:ds,activeTab:dn,onChange:ms,className:xs}){return jsxRuntimeExports.jsx("nav",{className:`flex gap-2 border-b border-[--border-medium] ${xs||""}`,children:ds.map(bs=>jsxRuntimeExports.jsx("button",{type:"button",className:`rounded-t-lg px-4 py-2 text-sm font-medium transition-colors ${dn===bs.id?"bg-[--background-neutral] text-[--secondary] border-b-2 border-[--secondary]":"text-[--text-medium] hover:text-[--text-dark] hover:bg-gray-50"}`,onClick:()=>ms(bs.id),children:bs.label},bs.id))})}function RequireAuth({children:ds,roles:dn=[],permissions:ms=[]}){const[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState([]),[Rs,js]=reactExports.useState(!0);reactExports.useEffect(()=>{(async()=>{try{const[Ms,Ds]=await Promise.all([Sdk.organisationMembersClient.getMyPermissions(),Sdk.organisationClient.myOrganisation()]);bs(Ms),ws(Ds?.roles??[])}catch(Ms){console.error("Failed to load permissions and roles:",Ms)}finally{js(!1)}})()},[]);const Cs=dn.length>0&&dn.some(Os=>Es.includes(Os)),As=ms.length>0&&ms.some(Os=>xs.includes(Os)),ks=Cs||As;return Rs?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):ks?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ds}):jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto max-w-5xl",children:[jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Team Details"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-6",children:"Manage members and admins for this team."})]}),jsxRuntimeExports.jsx("div",{className:"px-6 pb-6",children:jsxRuntimeExports.jsxs("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg text-yellow-800",children:[jsxRuntimeExports.jsx("p",{className:"font-medium mb-1",children:"Access Restricted"}),jsxRuntimeExports.jsx("p",{children:"Please ask your organisation admin if you think you should be able to invite others to your team."})]})})]})}function TeamsList({teams:ds,onDeleteTeam:dn}){const ms=useNavigate();return!ds||ds.length===0?jsxRuntimeExports.jsxs("div",{className:"text-center py-12 text-gray-500",children:[jsxRuntimeExports.jsx("p",{className:"mb-2",children:"No teams yet."}),dn&&jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Create a team to organise members."})]}):jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsx("table",{className:"w-full text-md",children:jsxRuntimeExports.jsx("tbody",{children:ds?.map(xs=>jsxRuntimeExports.jsxs("tr",{className:"border-t border-gray-100 hover:bg-gray-50",children:[jsxRuntimeExports.jsx("td",{className:"px-3 py-2",children:jsxRuntimeExports.jsx("button",{className:"font-medium text-gray-900 hover:text-primary hover:underline cursor-pointer text-left",onClick:()=>ms(`/team/${xs.id}`),children:xs.name})}),dn&&jsxRuntimeExports.jsx("td",{className:"px-2 py-2 text-right",children:jsxRuntimeExports.jsx("div",{className:"flex justify-end",children:jsxRuntimeExports.jsx(Button,{className:"text-red-600 hover:text-red-700 font-medium",onClick:()=>dn(xs),buttonType:ButtonType.Quaternary,jsx:jsxRuntimeExports.jsx(Trash2,{})})})})]},xs.id))})})})}function AllTeamsSection(){const[ds,dn]=reactExports.useState([]),[ms,xs]=reactExports.useState(!0),[bs,Es]=reactExports.useState(null),[ws,Rs]=reactExports.useState(!1),[js,Cs]=reactExports.useState(""),[As,ks]=reactExports.useState({}),[Os,Ms]=reactExports.useState(null);reactExports.useEffect(()=>{Ds()},[]);const Ds=async()=>{xs(!0),Es(null);try{const Ps=await Sdk.teamsClient.listTeams();dn(Ps)}catch(Ps){console.error("Failed to load teams:",Ps),Es("Failed to load teams")}finally{xs(!1)}};return ms?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center py-12",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[bs&&jsxRuntimeExports.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:bs}),jsxRuntimeExports.jsx(Card,{title:"Teams",action:jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,text:"Create Team",onClick:()=>{ks({}),Cs(""),Rs(!0)}}),children:jsxRuntimeExports.jsx(TeamsList,{teams:ds,onDeleteTeam:Ms})}),ws&&jsxRuntimeExports.jsx(Modal,{onClose:()=>Rs(!1),title:"Create Team",className:"max-w-xl",children:jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",htmlFor:"team-name",children:"Team name"}),jsxRuntimeExports.jsx("input",{id:"team-name",type:"text",value:js,onChange:Ps=>Cs(Ps.target.value),placeholder:"e.g. Support, Marketing, Engineering",className:`w-full rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 ${As.name?"border-red-500":"border-gray-300"}`,autoFocus:!0}),As.name&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:As.name}),As.response&&jsxRuntimeExports.jsx("p",{className:"mt-2 text-sm text-red-600",children:As.response})]}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[jsxRuntimeExports.jsx(Button,{className:"px-4 py-2 text-sm rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50",onClick:()=>Rs(!1),type:"button",text:"Cancel",buttonType:ButtonType.Cancel}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:"Create",validate:()=>{const Ps={};return js.trim()||(Ps.name="Please enter a team name"),ks(Ps),Ps},save:()=>Sdk.teamsClient.createTeam({name:js.trim()}),onSuccess:async()=>{Rs(!1),Cs(""),ks({}),await Ds()},onFailure:Ps=>{ks(Ls=>({...Ls,...Ps}))}})]})]})}),jsxRuntimeExports.jsx(AsyncConfirmModal,{open:Os!==null,onClose:()=>Ms(null),save:async()=>
1455{if(!Os)throw new Error("No team selected");return await Sdk.teamsClient.deleteTeam(Os.id)},onSuccess:async()=>{Ms(null),await Ds()},onFailure:Ps=>{console.error("Failed to delete team:",Ps)},title:"Delete Team",message:`Are you sure you want to delete "${Os?.name}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",danger:!0})]})}function MyTeamsSection(){const[ds,dn]=reactExports.useState([]),[ms,xs]=reactExports.useState(!0),[bs,Es]=reactExports.useState(null);reactExports.useEffect(()=>{ws()},[]);const ws=async()=>{xs(!0),Es(null);try{dn(await Sdk.teamsClient.getMyTeams())}catch(Rs){console.error("Failed to load my teams:",Rs),Es("Failed to load teams")}finally{xs(!1)}};return ms?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center py-12",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[bs&&jsxRuntimeExports.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:bs}),jsxRuntimeExports.jsxs(Card,{title:"My Teams",children:[jsxRuntimeExports.jsx("div",{className:"mb-4 text-sm text-gray-600",children:"Click a team to view and manage members."}),jsxRuntimeExports.jsx(TeamsList,{teams:ds})]})]})}const LicenceStatusBanner=ds=>{const{licenceAllocation:dn,onManageClick:ms,onCancelDowngrade:xs}=ds,bs=(js,Cs)=>
1455{if(Cs===0)return"text-gray-600";const As=js/Cs*100;return As===0?"text-red-600 font-semibold":As<=20?"text-amber-600":"text-secondary"},Es=bs(dn.adminSeatsAvailable,dn.adminSeatsPurchased),ws=bs(dn.readerSeatsAvailable,dn.readerSeatsPurchased),Rs=js=>new Date(js*1e3).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"});return jsxRuntimeExports.jsxs("div",{className:"mb-6",children:[jsxRuntimeExports.jsxs(Card,{className:"flex items-center justify-between !text-sm",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-8",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"Admin Seats: "}),jsxRuntimeExports.jsxs("span",{className:`${Es}`,children:[dn.adminSeatsAvailable," of ",dn.adminSeatsPurchased," available"]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"Reader Seats: "}),jsxRuntimeExports.jsxs("span",{className:`${ws}`,children:[dn.readerSeatsAvailable," of ",dn.readerSeatsPurchased," available"]})]})]}),jsxRuntimeExports.jsx(Button,{text:"Manage Licences",buttonType:ButtonType.Primary,onClick:ms})]}),dn.pendingDowngrade&&jsxRuntimeExports.jsxs(Card,{className:"mt-2 flex items-center justify-between !text-sm",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("strong",{children:"Pending change:"})," Seats will reduce to ",dn.pendingDowngrade.targetAdminSeats," admin",dn.pendingDowngrade.targetAdminSeats!==1?"s":""," and "," ",dn.pendingDowngrade.targetReaderSeats," reader",dn.pendingDowngrade.targetReaderSeats!==1?"s":""," on "," ",Rs(dn.pendingDowngrade.effectiveDateEpoch),"."]}),jsxRuntimeExports.jsx(AsyncButton,{text:"Cancel downgrade",buttonType:ButtonType.Cancel,className:"!px-3 !py-1 !text-sm",save:()=>Sdk.customerClient.cancelPendingDowngrade(),onSuccess:xs})]})]})},SubscriptionChangePreview=({quote:ds,loading:dn})=>{const ms=usePriceFormatter(ds?.currency||"gbp");if(dn)return jsxRuntimeExports.jsx("div",{className:"bg-gray-50 rounded-lg p-4 flex justify-center items-center",children:jsxRuntimeExports.jsx(Spinner,{size:"sm"})});if(!ds)return null;if(ds.type==="NO_CHANGE")return jsxRuntimeExports.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600",children:"No changes to your current subscription."})});const xs=Es=>new Date(Es*1e3).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),bs=ds.type==="UPGRADE";return jsxRuntimeExports.jsxs("div",{className:`rounded-lg p-4 ${bs?"bg-blue-50 border border-blue-200":"bg-amber-50 border border-amber-200"}`,children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-sm mb-3",children:bs?"Upgrade Summary":"Downgrade Summary"}),jsxRuntimeExports.jsxs("div",{className:"space-y-2 text-sm",children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-700",children:"Seats changing to:"}),jsxRuntimeExports.jsxs("span",{className:"font-medium",children:[ds.newAdminSeats," admin",ds.newAdminSeats!==1?"s":"",", ",ds.newReaderSeats," reader",ds.newReaderSeats!==1?"s":""]})]}),bs&&ds.immediateCharge!=null&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-700",children:"Immediate charge:"}),jsxRuntimeExports.jsx("span",{className:"font-bold text-blue-700",children:ms(ds.immediateCharge)})]}),!bs&&jsxRuntimeExports.jsxs("div",{className:"flex justify-between",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-700",children:"Changes take effect:"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-amber-700",children:xs(ds.effectiveDateEpoch)})]}),jsxRuntimeExports.jsxs("div",{className:"flex justify-between pt-2 border-t border-gray-200",children:[jsxRuntimeExports.jsx("span",{className:"text-gray-700",children:"New monthly total:"}),jsxRuntimeExports.jsx("span",{className:"font-bold",children:ms(ds.newMonthlyTotal)})]}),ds.message&&jsxRuntimeExports.jsx("p",{className:"text-md text-gray-600 pt-2 font-semibold italic",children:ds.message})]})]})},SEAT_LIMITS={admin:{min:1,max:50},reader:{min:0,max:200}},ManageLicencesModal=ds=>{const{currentAllocation:dn,initialAdminSeats:ms,initialReaderSeats:xs,onClose:bs,onSuccess:Es}=ds,[ws,Rs]=reactExports.useState(ms||dn.adminSeatsPurchased),[js,Cs]=reactExports.useState(xs||dn.readerSeatsPurchased),[As,ks]=reactExports.useState(null),[Os,Ms]=reactExports.useState({}
1455),[Ds,Ps]=reactExports.useState(null),[Ls,Bs]=reactExports.useState({}),{status:Fs,save:Us}=useNetworkDebounce(async ia=>{const ca=await Sdk.customerClient.fetchSubscriptionQuote({adminSeats:ia.adminSeats,readerSeats:ia.readerSeats});return ca.status===200&&ks(ca.data),ca},{skipDoneState:!0});reactExports.useEffect(()=>{(async()=>{const ca=await Sdk.customerClient.mySubscription();ca.status===200&&Ms({currentMonthlyTotal:ca.data.totalAfterTax,currency:ca.data.currency})})()},[]),reactExports.useEffect(()=>{let ia=null;if(ws===""||js===""){Ps(null),ks(null);return}ws<dn.adminSeatsUsed?ia=`Cannot reduce to ${ws} admin seat${ws!==1?"s":""} while ${dn.adminSeatsUsed} ${dn.adminSeatsUsed!==1?"are":"is"} currently active. Remove ${dn.adminSeatsUsed-ws} admin${dn.adminSeatsUsed-ws!==1?"s":""} first.`:js<dn.readerSeatsUsed&&(ia=`Cannot reduce to ${js} reader seat${js!==1?"s":""} while ${dn.readerSeatsUsed} ${dn.readerSeatsUsed!==1?"are":"is"} currently active. Remove ${dn.readerSeatsUsed-js} reader${dn.readerSeatsUsed-js!==1?"s":""} first.`),Ps(ia),ia||Us({adminSeats:ws,readerSeats:js})},[ws,js,dn.adminSeatsUsed,dn.readerSeatsUsed]);const Gs=ia=>{const ca=ia.target.value;if(ca===""){Rs("");return}const ha=parseInt(ca,10);!isNaN(ha)&&ha>=SEAT_LIMITS.admin.min&&ha<=SEAT_LIMITS.admin.max&&Rs(ha)},Js=ia=>{const ca=ia.target.value;if(ca===""){Cs("");return}const ha=parseInt(ca,10);!isNaN(ha)&&ha>=SEAT_LIMITS.reader.min&&ha<=SEAT_LIMITS.reader.max&&Cs(ha)},Ws=As?.type==="NO_CHANGE",Ys=!!Ds||Ws||(ws===""||js==="")||Fs===SavableInputStatus.Processing,Qs=usePriceFormatter(Os.currency||As?.currency||"gbp"),ai=()=>As?.type==="UPGRADE"?"Confirm Upgrade":As?.type==="DOWNGRADE"?"Confirm Downgrade":"Confirm Changes";return jsxRuntimeExports.jsx(Modal,{onClose:bs,title:"Manage Licences",className:"overflow-y-auto",children:jsxRuntimeExports.jsxs("div",{className:"space-y-4 h-full",children:[jsxRuntimeExports.jsxs(Card,{className:"bg-gray-50 rounded-lg p-4 text-sm",children:[jsxRuntimeExports.jsx("h4",{className:"font-semibold mb-2",children:"Current Subscription"}),jsxRuntimeExports.jsxs("div",{className:"text-gray-700 space-y-1",children:[jsxRuntimeExports.jsxs("div",{children:["Admin seats: ",jsxRuntimeExports.jsx("strong",{children:dn.adminSeatsUsed})," used of ",jsxRuntimeExports.jsx("strong",{children:dn.adminSeatsPurchased})," purchased"]}),jsxRuntimeExports.jsxs("div",{children:["Reader seats: ",jsxRuntimeExports.jsx("strong",{children:dn.readerSeatsUsed})," used of ",jsxRuntimeExports.jsx("strong",{children:dn.readerSeatsPurchased})," purchased"]}),Os.currentMonthlyTotal!=null&&jsxRuntimeExports.jsxs("div",{className:"pt-2 border-t border-gray-200 mt-4",children:["Current monthly total: ",jsxRuntimeExports.jsx("strong",{children:Qs(Os.currentMonthlyTotal)})]})]})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Administrator Seats"}),jsxRuntimeExports.jsx("input",{type:"number",min:SEAT_LIMITS.admin.min,max:SEAT_LIMITS.admin.max,step:"1",value:ws,onChange:Gs,className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary"})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Reader Seats"}),jsxRuntimeExports.jsx("input",{type:"number",min:SEAT_LIMITS.reader.min,max:SEAT_LIMITS.reader.max,step:"1",value:js,onChange:Js,className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary"})]}),Ds&&jsxRuntimeExports.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:jsxRuntimeExports.jsx("p",{className:"text-sm text-red-800",children:Ds})}),jsxRuntimeExports.jsx(SubscriptionChangePreview,{quote:As,loading:Fs===SavableInputStatus.Processing}),Ls.response&&jsxRuntimeExports.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:jsxRuntimeExports.jsx("p",{className:"text-sm text-red-800",children:Ls.response})}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[jsxRuntimeExports.jsx(Button,{text:"Cancel",buttonType:ButtonType.Cancel,onClick:bs}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:ai(),disabled:Ys,save:async()=>await Sdk.customerClient.updateLicences({endOfBillingCycleDate:As?.effectiveDateEpoch,adminSeats:ws,readerSeats:js}),onSuccess:async()=>{bs(),Es()},onFailure:ia=>{const ca=extractErrorMessage(ia.response);Bs({response:ca})}})]})]})})};function TeamManagementScreen(){const[ds,dn]=reactExports.useState("members"),[ms,xs]=reactExports.useState([]),[bs,Es]=reactExports.useState(!0),[ws,Rs]=reactExports.useState(null),[js,Cs]=reactExports.useState(PageState.NotReady),[As,ks]=reactExports.useState(!1),[Os,Ms]=reactExports.useState({}),Ds=async()=>{Cs(PageState.Loading);try{const Bs=await Sdk.customerClient.fetchLicences();Rs(Bs.data),Cs(PageState.Ready)}catch{Cs(PageState.Error)}};reactExports.useEffect(()=>{(async()=>{try{const Fs=await Sdk.organisationClient.myOrganisation();xs(Fs?.roles??[]),Fs?.roles?.includes("Admin")&&await Ds()}finally{Es(!1)}})()},[]);const Ps=ms.includes("Admin"),Ls=(Bs,Fs)=>{Ms({admin:Bs,reader:Fs}),ks(!0)};return bs?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsx(RequireAuth,{roles:["Admin"],permissions:["InviteMembers"],children:jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto w-full",children:[jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold mb-2",children:Ps?"Organisation Management":"Team Management"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-6",children:Ps?"Manage collaborators and assign roles for your organisation.":"View your teams and manage team members."})]}),jsxRuntimeExports.jsxs("div",{className:"px-6 pb-6 max-w-5xl",children:[Ps&&js===PageState.Ready&&ws&&jsxRuntimeExports.jsx(LicenceStatusBanner,{licenceAllocation:ws,onManageClick:()=>Ls(),onCancelDowngrade:Ds}),Ps?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tabs,{tabs:[{id:"members",label:"Admins"},{id:"teams",label:"Teams"}],activeTab:ds,onChange:Bs=>
1455dn(Bs),className:"mb-6"}),ds==="members"&&jsxRuntimeExports.jsx(TeamMembersSection,{licenceAllocation:ws,onRefreshLicences:Ds,onManageLicences:Ls}),ds==="teams"&&jsxRuntimeExports.jsx(AllTeamsSection,{})]}):jsxRuntimeExports.jsx(MyTeamsSection,{})]}),As&&ws&&jsxRuntimeExports.jsx(ManageLicencesModal,{currentAllocation:ws,initialAdminSeats:Os.admin,initialReaderSeats:Os.reader,onClose:()=>{ks(!1),Ms({})},onSuccess:Ds})]})})}function TeamMembersList(ds){const{teamMembers:dn,emptyMessage:ms,title:xs,onAddMember:bs,onRemoveMember:Es,onTogglePermission:ws,currentUserId:Rs}=ds;return jsxRuntimeExports.jsx(Card,{title:xs,action:bs?jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,text:"Add Member",onClick:bs}):void 0,children:dn.length===0?jsxRuntimeExports.jsx("div",{className:"text-center py-12 text-gray-500",children:jsxRuntimeExports.jsx("p",{children:ms})}):jsxRuntimeExports.jsx("div",{className:"overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full text-sm",children:[jsxRuntimeExports.jsx("thead",{className:"text-left border-b border-gray-200",children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Name"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Email"}),jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Joined"}),ws&&jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700",children:"Can Invite Others"}),Es&&jsxRuntimeExports.jsx("th",{className:"px-4 py-3 font-medium text-gray-700"})]})}),jsxRuntimeExports.jsx("tbody",{children:dn.map(js=>{const Cs=js.member;if(!Cs)return null;const As=Cs.userId===Rs,ks=Cs.user;return jsxRuntimeExports.jsxs("tr",{className:"border-t border-gray-100 hover:bg-gray-50",children:[jsxRuntimeExports.jsx("td",{className:"px-4 py-3",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsxs("span",{className:"font-medium text-gray-900",children:[ks.firstName," ",ks.lastName]}),As&&jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-500 italic",children:"(You)"})]})}),jsxRuntimeExports.jsx("td",{className:"px-4 py-3 text-gray-600",children:ks.email}),jsxRuntimeExports.jsx("td",{className:"px-4 py-3 text-gray-600",children:DateTime.fromISO(js.joinedAt).toLocaleString(DateTime.DATE_MED)}),ws&&jsxRuntimeExports.jsx("td",{className:"px-4 py-3",children:jsxRuntimeExports.jsx("input",{type:"checkbox",checked:Cs.canInviteMembers??Cs.permissions?.includes("InviteMembers")??!1,onChange:Os=>ws(js,Os.target.checked),disabled:As,className:`h-4 w-4 text-secondary-600 border-gray-300 rounded ${As?"opacity-50 cursor-not-allowed":"cursor-pointer"}`})}),Es&&jsxRuntimeExports.jsx("td",{className:"px-4 py-3 text-right",children:!As&&jsxRuntimeExports.jsx("div",{className:"flex justify-end gap-2",children:jsxRuntimeExports.jsx(Button,{className:"text-red-600 hover:text-red-700 font-medium",onClick:()=>Es(js),buttonType:ButtonType.Quaternary,text:"Remove"})})})]},js.id)})})]})})})}function InviteMemberModal({availableSeats:ds,onClose:dn,teamId:ms,isAdmin:xs,onSuccess:bs}){const[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(""),[Cs,As]=reactExports.useState(""),[ks,Os]=reactExports.useState(!1),[Ms,Ds]=reactExports.useState({}),Ps=()=>{ws(""),js(""),As(""),Os(!1),Ds({}),dn()};return jsxRuntimeExports.jsx(Modal,{onClose:Ps,title:"Invite New Member",children:jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[ds!=null&&ds>0&&ds<3&&jsxRuntimeExports.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:jsxRuntimeExports.jsxs("p",{className:"text-sm text-amber-800",children:["Only ",ds," reader seat",ds!==1?"s":""," remaining."]})}),jsxRuntimeExports.jsx(FormInput,{name:"first-name",label:"First Name",value:Es,onChange:Ls=>ws(Ls.target.value),placeholder:"John",autoFocus:!0}),Ms.firstName&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Ms.firstName}),jsxRuntimeExports.jsx(FormInput,{name:"last-name",label:"Last Name",value:Rs,onChange:Ls=>js(Ls.target.value),placeholder:"Doe"}),Ms.lastName&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Ms.lastName}),jsxRuntimeExports.jsx(FormInput,{name:"email",label:"Email",value:Cs,onChange:Ls=>As(Ls.target.value),placeholder:"[email protected]"}),Ms.email&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Ms.email}),jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",id:"can-invite-others",checked:ks,onChange:Ls=>Os(Ls.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),jsxRuntimeExports.jsx("label",{htmlFor:"can-invite-others",className:"ml-2 block text-sm text-gray-700",children:"Can Invite Other Team Members"})]}),Ms.response&&jsxRuntimeExports.jsx("p",{className:"mt-2 text-sm text-red-600",children:extractErrorMessage(Ms.response)}),jsxRuntimeExports.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[jsxRuntimeExports.jsx(Button,{className:"px-4 py-2 text-sm rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50",onClick:Ps,type:"button",text:"Cancel",buttonType:ButtonType.Cancel}),jsxRuntimeExports.jsx(AsyncButton,{buttonType:ButtonType.Primary,text:"Send Invite",validate:()=>{const Ls={};return Es.trim()||(Ls.firstName="First name is required"),Rs.trim()||(Ls.lastName="Last name is required"),Cs.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Cs)||(Ls.email="Please enter a valid email address"):Ls.email="Email is required",Ds(Ls),Ls},save:async()=>Sdk.organisationMembersClient.createMemberInvite({firstName:Es.trim(),lastName:Rs.trim(),email:Cs.trim(),teamId:ms,isAdmin:xs,canInviteMembers:ks}),onSuccess:async()=>{ws(""),js(""),As(""),Os(!1),Ds({}),Ps(),bs?.()},onFailure:Ls=>{Ds(Bs=>({...Bs,...Ls}))}})]})]})})}function TeamDetailScreen(){const ds=useNavigate(),{teamId:dn}=useParams(),{user:ms}=useAccountContext(),[xs,bs]=reactExports.useState([]),[Es,ws]=reactExports.useState([]),[Rs,js]=reactExports.useState(!0),[Cs,As]=reactExports.useState(null),[ks,Os]=reactExports.useState(!1),[Ms,Ds]=reactExports.useState(null),Ps=reactExports.useCallback(async()=>
1455{if(dn){js(!0),As(null);try{const[Bs,Fs]=await Promise.all([Sdk.teamsClient.getTeamMembers(dn),Sdk.organisationMembersClient.getInvites({teamId:dn})]);bs(Bs),ws(Fs)}catch(Bs){console.error("Failed to load team data:",Bs),As("Failed to load team data")}finally{js(!1)}}},[dn]),Ls=reactExports.useCallback(async(Bs,Fs)=>{const Us=[...xs];bs(Gs=>updateItemWhere(Gs,Js=>Js.id===Bs.id,Js=>({...Js,member:{...Js.member,canInviteMembers:Fs}})));try{await Sdk.organisationMembersClient.updateMemberCanInvite(Bs.member.userId,Fs)}catch(Gs){console.error("Failed to update member permissions:",Gs),bs(Us),As("Failed to update member permissions")}},[xs]);return reactExports.useEffect(()=>{dn&&Ps()},[Ps,dn]),Rs?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsx(RequireAuth,{roles:["Admin"],permissions:["InviteMembers"],children:jsxRuntimeExports.jsxs("div",{className:"h-full overflow-y-auto",children:[jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,className:"mb-4",text:"← Back",onClick:()=>ds("/team")}),jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Team Details"}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-6",children:"Manage members and admins for this team."})]}),jsxRuntimeExports.jsxs("div",{className:"px-6 pb-6 max-w-5xl",children:[Cs&&jsxRuntimeExports.jsx("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:Cs}),jsxRuntimeExports.jsx(TeamMembersList,{teamMembers:xs,title:"Team Members",emptyMessage:"No members in this team",onAddMember:()=>Os(!0),onRemoveMember:Ds,onTogglePermission:Ls,currentUserId:ms?.id}),jsxRuntimeExports.jsx("div",{className:"mt-6",children:jsxRuntimeExports.jsx(TeamInvitesList,{invites:Es,title:"Pending Invites",emptyMessage:"No pending invites"})})]}),ks&&jsxRuntimeExports.jsx(InviteMemberModal,{onClose:()=>Os(!1),teamId:dn,isAdmin:!1,onSuccess:async()=>{Os(!1),await Ps()}}),jsxRuntimeExports.jsx(AsyncConfirmModal,{open:Ms!==null,onClose:()=>Ds(null),save:async()=>{if(!Ms||!dn)throw new Error("No member selected");return await Sdk.teamsClient.removeTeamMember(dn,Ms.organisationMemberId)},onSuccess:async()=>{Ds(null),await Ps()},onFailure:Bs=>{console.error("Failed to remove team member:",Bs)},title:"Remove Team Member",message:`Are you sure you want to remove ${Ms?.member.user.firstName} ${Ms?.member.user.lastName} from this team?`,confirmText:"Remove",cancelText:"Cancel",danger:!0})]})})}function SortableBusinessProcessItem({sop:ds,onClick:dn,isDragEnabled:ms,showEditLink:xs}){const{attributes:bs,listeners:Es,setNodeRef:ws,transform:Rs,transition:js,isDragging:Cs}=useSortable({id:ds.id,disabled:!ms}),As={transform:CSS$1.Transform.toString(Rs),transition:js,opacity:Cs?.5:1};return jsxRuntimeExports.jsxs("div",{ref:ws,style:As,className:"p-4 hover:bg-gray-50 cursor-pointer transition-colors flex items-start gap-3",children:[ms&&jsxRuntimeExports.jsx("button",{...bs,...Es,className:"cursor-grab hover:bg-gray-200 rounded p-1 mt-1 flex-shrink-0 hidden md:inline-flex",onClick:ks=>ks.stopPropagation(),children:jsxRuntimeExports.jsx(GripVertical,{size:20,className:"text-gray-400"})}),jsxRuntimeExports.jsxs("div",{className:"flex-1",onClick:dn,children:[jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-blue-600 hover:text-blue-800",children:ds.objective}),xs&&jsxRuntimeExports.jsx(Link$1,{to:`/sop/${ds.id}`,className:"ml-auto text-xs text-[var(--secondary)] underline hover:text-[var(--primary)]",onClick:ks=>ks.stopPropagation(),onPointerDown:ks=>ks.stopPropagation(),onMouseDown:ks=>ks.stopPropagation(),onTouchStart:ks=>ks.stopPropagation(),children:"Edit"})]}),ds.description&&jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 mb-2",children:ds.description}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[ds.tags.map((ks,Os)=>jsxRuntimeExports.jsx("span",{className:"px-2 py-1 text-xs border border-gray-300 rounded-full text-gray-700",children:ks},Os)),jsxRuntimeExports.jsxs("span",{className:"text-xs text-gray-500 ml-auto",children:["Updated ",DateTime.fromSeconds(ds.updatedEpoch).toFormat("dd LLL yyyy")]})]})]})]})}const CATEGORY_CARDS$1=[{key:"intro",value:"Introduction",label:"Introduction",description:"Purpose, key principles, and how to get the most from your manual.",icon:Handshake,glow:"rgba(190, 178, 157, 0.28)",plaque:"linear-gradient(180deg, #F2EEE7 0%, #D6CBB8 100%)",iconTheme:"text-slate-800"},{key:"team",value:"Your Team",label:"People",description:"Hiring, onboarding, expectations, and people practices that keep teams aligned.",icon:Users,glow:"rgba(177, 161, 143, 0.24)",plaque:"linear-gradient(180deg, #ECE4DA 0%, #C7B6A3 100%)",iconTheme:"text-slate-800"},{key:"day-to-day",value:"Day-to-Day Operating Requirements",label:"Operations & Management",description:"Daily standards, workflows, service delivery, and management routines.",icon:ClipboardList,glow:"rgba(164, 172, 154, 0.24)",plaque:"linear-gradient(180deg, #E6EADF 0%, #ADB8A0 100%)",iconTheme:"text-slate-800"},{key:"marketing",value:"Marketing & Promotion",label:"Sales & Marketing",description:"Promotion, visibility, and customer messaging that helps drive demand.",icon:Monitor,glow:"rgba(154, 166, 178, 0.24)",plaque:"linear-gradient(180deg, #E4E9ED 0%, #9FAFBA 100%)",iconTheme:"text-slate-800"},{key:"growth-profit",value:"Business Development, Growth & Profit",label:"Growth & Profit",description:"Performance, financial health, improvement, and scaling the business well.",icon:ChartColumnBig,glow:"rgba(168, 155, 176, 0.24)",plaque:"linear-gradient(180deg, #E9E3EB 0%, #B4A7BA 100%)",iconTheme:"text-slate-800"},{key:"setup",value:"New business Set-Up & Support",label:"Set-Up & Support",description:"Launch readiness, systems, support resources, and the essentials for getting started.",icon:Rocket,glow:"rgba(174, 168, 160, 0.22)",plaque:"linear-gradient(180deg, #EAE7E2 0%, #C1B8AC 100%)",iconTheme:"text-slate-800"}],CATEGORY_BY_KEY=new Map(CATEGORY_CARDS$1.map(ds=>[ds.key,ds.value])),OpsManualScreen=()=>{const{manualId:ds}=useManualSelector(),dn=useNavigate(),{categoryKey:ms}=useParams(),{isAdmin:xs}=useAuth(),[bs,Es]=reactExports.useState([]),[ws,Rs]=reactExports.useState(PageState.NotReady),[js,Cs]=reactExports.useState(""),As=ms?CATEGORY_BY_KEY.get(ms)??null:null,{save:ks,status:Os}=useNetworkDebounce(async Us=>await Sdk.businessProcessClient.reorderBusinessProcesses(ds,Us.processIds));reactExports.useEffect(()=>{const Us=async()=>{try{Rs(PageState.Loading);const Js=(await Sdk.businessProcessClient.fetchAll(ds)).data.filter(Ws=>Ws.status==="Published");Es(Js)}finally{Rs(PageState.Ready)}};ws===PageState.NotReady&&Us()},[ds,ws]),reactExports.useEffect(()=>
1455{ms&&!As&&dn("/ops-manual",{replace:!0})},[ms,As,dn]);const Ds=bs.filter(Us=>{if(!js.trim())return!0;const Gs=js.toLowerCase();return Us.objective.toLowerCase().includes(Gs)||Us.description.toLowerCase().includes(Gs)||Us.tags.some(Js=>Js.toLowerCase().includes(Gs))}).filter(Us=>!As||Us.category===As).reduce((Us,Gs)=>(Us[Gs.category]||(Us[Gs.category]=[]),Us[Gs.category].push(Gs),Us),{}),Ps=Object.keys(Ds).sort(),Ls=reactExports.useMemo(()=>{const Us=new Map;return bs.forEach(Gs=>Us.set(Gs.category,(Us.get(Gs.category)??0)+1)),Us},[bs]),Bs=Us=>Gs=>{const{active:Js,over:Ws}=Gs;if(!Ws||Js.id===Ws.id)return;const Zs=Ds[Us],Ys=Zs.findIndex(ea=>ea.id===Js.id),Qs=Zs.findIndex(ea=>ea.id===Ws.id);if(Ys===-1||Qs===-1)return;const ai=arrayMove(Zs,Ys,Qs),ia=new Set(Zs.map(ea=>ea.id));let ca=0;const ha=bs.map(ea=>{if(!ia.has(ea.id))return ea;const ta=ai[ca];return ca+=1,ta??ea});Es(ha),ks({processIds:ha.map(ea=>ea.id)})},Fs=Us=>{const Gs=Us.icon,Js=Ls.get(Us.value)??0;return jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>dn(`/ops-manual/category/${Us.key}`),className:"group flex w-full flex-col items-center text-center transition-transform duration-300 hover:-translate-y-1 cursor-pointer",children:[jsxRuntimeExports.jsxs("div",{className:"relative flex w-full justify-center",children:[jsxRuntimeExports.jsx("div",{className:"absolute top-6 h-24 w-24 rounded-full blur-2xl opacity-75 transition-opacity duration-300 group-hover:opacity-90",style:{backgroundColor:Us.glow}}),jsxRuntimeExports.jsx("div",{className:"relative flex h-[8.5rem] w-[8.5rem] items-center justify-center rounded-[1.75rem] border border-white/65 px-6 py-6 transition-transform duration-300 group-hover:-translate-y-1 md:h-[10.25rem] md:w-[10.25rem]",style:{background:Us.plaque,boxShadow:"0 16px 28px rgba(15, 23, 42, 0.12), inset 0 2px 0 rgba(255,255,255,0.55), inset 0 -10px 18px rgba(15,23,42,0.08)"},children:jsxRuntimeExports.jsx(Gs,{size:58,strokeWidth:.85,className:Us.iconTheme})})]}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex max-w-[17rem] flex-col items-center gap-2",children:[jsxRuntimeExports.jsx("h3",{className:"text-[1.55rem] leading-[1.08] font-black text-slate-900 md:text-[1.75rem]",style:{fontFamily:"var(--font-futura-800)"},children:Us.label}),jsxRuntimeExports.jsx("p",{className:"text-base leading-7 text-slate-600",children:Us.description}),jsxRuntimeExports.jsxs("div",{className:"pt-1 text-[0.72rem] font-semibold uppercase tracking-[0.22em] text-slate-500",children:[Js," procedure",Js===1?"":"s"]})]})]},Us.value)};return ws!==PageState.Ready?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsx("div",{className:"h-full overflow-y-auto",children:jsxRuntimeExports.jsxs("div",{className:"p-2 md:p-6",children:[jsxRuntimeExports.jsxs("div",{className:"mb-2 hidden items-center justify-between md:flex",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-bold",children:"Your Operations Manual"}),xs&&jsxRuntimeExports.jsx(SavingStatus,{status:Os})]}),jsxRuntimeExports.jsxs("div",{className:"relative mb-6",children:[jsxRuntimeExports.jsx(Search,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400",size:20}),jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search SOPs...",value:js,onChange:Us=>Cs(Us.target.value),className:"w-full rounded-2xl border border-slate-200 bg-white/85 py-3 pr-4 pl-11 text-slate-700 shadow-sm outline-none transition focus:border-slate-300 focus:ring-2 focus:ring-slate-200"})]}),!As&&isBlank(js)&&jsxRuntimeExports.jsxs("div",{className:"relative overflow-hidden rounded-[2rem] border border-white/70 bg-[linear-gradient(180deg,#fffcf9_0%,#f4f1ec_100%)] px-6 py-8 shadow-[0_24px_70px_rgba(15,23,42,0.08)] md:px-10 md:py-12",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-x-0 top-0 h-32 bg-[radial-gradient(circle_at_top,rgba(255,255,255,0.85),transparent_72%)]"}),jsxRuntimeExports.jsx("div",{className:"absolute -bottom-8 left-[-3rem] h-28 w-72 rounded-full bg-[rgba(120,128,120,0.15)] blur-2xl"}),jsxRuntimeExports.jsx("div",{className:"absolute bottom-[-2.5rem] left-[22%] h-32 w-80 rounded-full bg-[rgba(150,150,140,0.18)] blur-2xl"}),jsxRuntimeExports.jsx("div",{className:"absolute bottom-[-2rem] right-[-1rem] h-24 w-72 rounded-full bg-[rgba(120,128,120,0.15)] blur-2xl"}),jsxRuntimeExports.jsxs("div",{className:"relative mx-auto max-w-3xl text-center",children:[jsxRuntimeExports.jsx("h2",{className:"mt-3 text-3xl leading-tight text-slate-900 md:text-[2.55rem]",style:{fontFamily:"var(--font-futura-800)"},children:"Browse the manual by category"}),jsxRuntimeExports.jsx("p",{className:"mt-4 text-base leading-7 text-slate-600 md:text-lg",children:"Choose a section to see the procedures inside it. The layout mirrors a printed guide so readers can scan visually and jump straight to the right topic."})]}),jsxRuntimeExports.jsx("div",{className:"relative mt-10 grid items-start justify-items-center gap-x-8 gap-y-10 md:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-6",children:CATEGORY_CARDS$1.map(Fs)})]}),(As||notBlank(js))&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(As||isBlank(js))&&jsxRuntimeExports.jsx("div",{className:"mb-4 flex items-center gap-2",children:jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>dn("/ops-manual"),className:"flex items-center gap-1 text-sm font-semibold text-[var(--secondary)] hover:opacity-80",children:[jsxRuntimeExports.jsx(ArrowLeft,{size:16}),"Back to categories"]})}),jsxRuntimeExports.jsxs("div",{className:"space-y-6",children:[Ps.length===0&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{className:"rounded-xl bg-white p-6 text-center",children:jsxRuntimeExports.jsxs("h2",{className:"text-lg font-semibold text-[var(--secondary)]",children:["No SOPs found",As?` in ${As}`:"",notBlank(js)&&` matching "${js}"`,"."]})})}),Ps.map(Us=>jsxRuntimeExports.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white shadow-sm",children:[jsxRuntimeExports.jsx("h2",{className:"rounded-t-lg border-b border-gray-200 bg-gray-50 p-4 text-lg font-semibold",children:Us}),jsxRuntimeExports.jsx(DndContext,{onDragEnd:xs?Bs(Us):void 0,children:jsxRuntimeExports.jsx(SortableContext,{items:Ds[Us].map(Gs=>Gs.id),strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("div",{className:"divide-y divide-gray-200",children:Ds[Us].map(Gs=>jsxRuntimeExports.jsx(SortableBusinessProcessItem,{sop:Gs,onClick:()=>dn(`/ops-manual/sop/${Gs.id}`),isDragEnabled:xs,showEditLink:xs},Gs.id))})})})]},Us))]})]})]})})},IMAGE_EXTENSIONS=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","tif","tiff","heic","heif"]),VIDEO_EXTENSIONS=new Set(["mp4","mov","webm","ogg","m4v","avi","mkv"]),CATEGORY_ROUTE_BY_NAME={[SopCategory.Introduction]:"intro",[SopCategory.SetupSupport]:"setup",[SopCategory.Team]:"team",[SopCategory.MarketingAndPromotion]:"marketing",[SopCategory.Operations]:"day-to-day",[S
1455opCategory.GrowthAndProfit]:"growth-profit"};function extensionForAsset(ds){const ms=(ds.fileName?.toLowerCase()??"").split(".");if(ms.length>1)return ms[ms.length-1];const xs=ds.name.toLowerCase().split(".");return xs.length>1?xs[xs.length-1]:""}function contentTypeForAsset(ds){return ds.contentType?.toLowerCase()??""}function browserVideoType(ds){const dn=contentTypeForAsset(ds),ms=extensionForAsset(ds);if(dn==="video/quicktime"||ms==="mov"||ms==="m4v")return"video/mp4";if(dn.startsWith("video/"))return dn;switch(ms){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":return"video/ogg";default:return}}function isImageAsset(ds){return contentTypeForAsset(ds).startsWith("image/")||IMAGE_EXTENSIONS.has(extensionForAsset(ds))}function isVideoAsset(ds){return contentTypeForAsset(ds).startsWith("video/")||VIDEO_EXTENSIONS.has(extensionForAsset(ds))}const ReadOnlySopDetail=()=>{const{sopId:ds}=useParams(),dn=useNavigate(),{isAdmin:ms}=useAuth(),[xs,bs]=reactExports.useState(null),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState([]),[Cs,As]=reactExports.useState({}),[ks,Os]=reactExports.useState({}),[Ms,Ds]=reactExports.useState(PageState.NotReady),Ps=Rs.filter(isImageAsset),Ls=Rs.filter(isVideoAsset),Bs=Rs.filter(Gs=>!isImageAsset(Gs)&&!isVideoAsset(Gs)),Fs=()=>{const Gs=xs?.category?CATEGORY_ROUTE_BY_NAME[xs.category]:void 0,Js=Gs?`/ops-manual/category/${Gs}`:"/ops-manual";if(window.history.length>1){dn(-1);return}dn(Js)};reactExports.useEffect(()=>{const Gs=async()=>{if(ds)try{Ds(PageState.Loading);const Js=await Sdk.businessProcessClient.fetch(ds);bs(Js.data);const[Ws,Zs]=await Promise.all([Sdk.businessProcessClient.fetchContent(ds),Sdk.processAssetsClient.fetchAssets(ds)]);ws(Ws.data);const Ys=[...Zs.data??[]].sort((ca,ha)=>(ha.createdEpoch??0)-(ca.createdEpoch??0));js(Ys);const Qs=Ys.filter(isImageAsset),ai=Ys.filter(isVideoAsset),ia=[...Qs,...ai];if(ia.length===0)As({}),Os({});else{const ca=await Promise.all(ia.map(async aa=>{try{const{data:fa}=await Sdk.processAssetsClient.viewAsset(aa.id);return[aa.id,fa]}catch(fa){return console.error("Failed to load preview asset",fa),[aa.id,""]}})),ha=Object.fromEntries(ca.filter(([,aa])=>!!aa)),ea={},ta={};Qs.forEach(aa=>{ha[aa.id]&&(ea[aa.id]=ha[aa.id])}),ai.forEach(aa=>{ha[aa.id]&&(ta[aa.id]=ha[aa.id])}),As(ea),Os(ta)}}finally{Ds(PageState.Ready)}};Ms===PageState.NotReady&&Gs()},[ds,Ms]);const Us=async Gs=>{const Js=window.open("","_blank");try{const{data:Ws}=await Sdk.processAssetsClient.downloadAsset(Gs);Ws?Js?Js.location.href=Ws:window.location.assign(Ws):Js&&Js.close()}catch(Ws){Js&&Js.close(),console.error("Failed to download asset",Ws)}};return Ms!==PageState.Ready||!xs?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center h-64",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-600"})}):jsxRuntimeExports.jsx("div",{className:"h-full overflow-y-auto",children:jsxRuntimeExports.jsxs("div",{className:"p-1 md:p-6 max-w-4xl",children:[jsxRuntimeExports.jsxs("div",{className:"mb-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsxRuntimeExports.jsxs("button",{onClick:Fs,className:"flex items-center text-primary hover:opacity-80 cursor-pointer",children:[jsxRuntimeExports.jsx(ArrowLeft,{size:20,className:"mr-2"}),"Back"]}),ms&&ds&&jsxRuntimeExports.jsxs(Link$1,{to:`/sop/${ds}?tab=editor`,className:"inline-flex items-center gap-2 bg-primary text-white px-4 py-2 rounded-md text-sm font-semibold hover:brightness-95 cursor-pointer",children:[jsxRuntimeExports.jsx(Pencil,{size:16}),"Edit"]})]}),jsxRuntimeExports.jsx("h1",{className:"text-3xl font-bold mb-2",children:xs.objective}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center text-sm text-gray-600",children:[jsxRuntimeExports.jsx("span",{className:"px-3 py-1 bg-gray-100 rounded-full italic",children:xs.category}),jsxRuntimeExports.jsx("span",{children:"•"}),xs.updatedEpoch&&jsxRuntimeExports.jsxs("span",{children:["Updated ",DateTime.fromSeconds(xs.updatedEpoch).toFormat("dd LLLL yyyy")]})]})]}),jsxRuntimeExports.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-3 md:p-8",children:Es?
1455jsxRuntimeExports.jsx("div",{className:"max-w-none leading-7",children:jsxRuntimeExports.jsx(SopMarkdown,{content:Es})}):jsxRuntimeExports.jsx("p",{className:"text-gray-500 text-center py-12",children:"No content available."})}),(Object.keys(Cs).length>0||Object.keys(ks).length>0||Bs.length>0)&&jsxRuntimeExports.jsxs("div",{className:"mt-6 bg-white md:rounded-lg md:border md:border-gray-200 md:p-6",children:[jsxRuntimeExports.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Resources"}),Object.keys(Cs).length>0&&jsxRuntimeExports.jsx("div",{className:"space-y-6 mb-8",children:Ps.map(Gs=>{const Js=Cs[Gs.id];return Js?jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsx("img",{src:Js,alt:Gs.name,className:"w-full border border-gray-200 max-h-[600px] object-contain bg-gray-50",loading:"lazy"}),jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{Us(Gs.id)},className:"w-full flex items-center justify-between py-1 text-left hover:bg-gray-50 cursor-pointer",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-gray-800",children:Gs.name}),jsxRuntimeExports.jsx("span",{className:"text-sm text-primary",children:"Download"})]},Gs.id)]},Gs.id):null})}),Object.keys(ks).length>0&&jsxRuntimeExports.jsx("div",{className:"space-y-6 mb-8",children:Ls.map(Gs=>{const Js=ks[Gs.id];return Js?jsxRuntimeExports.jsxs("div",{className:"space-y-2",children:[jsxRuntimeExports.jsxs("video",{controls:!0,preload:"metadata",className:"w-full border border-gray-200 max-h-[600px] object-contain bg-gray-50",children:[jsxRuntimeExports.jsx("source",{src:Js,type:browserVideoType(Gs)}),"Your browser does not support the video tag."]}),jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{Us(Gs.id)},className:"w-full flex items-center justify-between py-1 text-left hover:bg-gray-50 cursor-pointer",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-gray-800",children:Gs.name}),jsxRuntimeExports.jsx("span",{className:"text-sm text-primary",children:"Download"})]},Gs.id)]},Gs.id):null})}),Bs.length>0&&jsxRuntimeExports.jsx("div",{className:"space-y-2",children:Bs.map(Gs=>jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{Us(Gs.id)},className:"w-full flex items-center justify-between border border-gray-200 rounded-md px-4 py-3 text-left hover:bg-gray-50 cursor-pointer",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-gray-800",children:Gs.name}),jsxRuntimeExports.jsx("span",{className:"text-sm text-primary",children:"Download"})]},Gs.id))})]})]})})};function InAppPageOrArticle(){const ds=useNavigate();return jsxRuntimeExports.jsxs("div",{className:"h-full min-h-0 overflow-y-auto",children:[jsxRuntimeExports.jsxs(HeaderBar,{children:[jsxRuntimeExports.jsx(ArrowLeft,{size:20,className:"ml-2 inline-block cursor-pointer",onClick:()=>ds("/")}),jsxRuntimeExports.jsx("span",{className:"text-sm text-[--text-medium]",children:"Dashboard"})]}),jsxRuntimeExports.jsx(PageOrArticle,{})]})}function Secure(){const{routing:ds,selectedManualId:dn,setSelectedManualId:ms,isAdmin:xs}=useAccountContext();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ds===AppRouting.Welcome&&jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Welcome,{})}),jsxRuntimeExports.jsx(Route,{path:"/welcome",element:jsxRuntimeExports.jsx(Welcome,{})})]}),ds===AppRouting.PasswordRequired&&jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/set-password",element:jsxRuntimeExports.jsx(SetPassword,{})}),jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(Layout,{}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"/:slug/*",element:jsxRuntimeExports.jsx(PageOrArticle,{})})]})]}),ds===AppRouting.PaymentRequired&&jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/checkout",element:jsxRuntimeExports.jsx(Checkout,{})}),jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(SignUpRedirect,{path:"/checkout"})}),jsxRuntimeExports.jsx(Route,{path:"/sign-up",element:jsxRuntimeExports.jsx(SignUpRedirect,{path:"/checkout"})}),jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(Layout,{}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(PageOrArt
1455icle,{})}),jsxRuntimeExports.jsx(Route,{path:"/:slug/*",element:jsxRuntimeExports.jsx(PageOrArticle,{})})]})]}),ds===AppRouting.App&&jsxRuntimeExports.jsx(MenuProvider,{children:jsxRuntimeExports.jsxs(Routes,{children:[!xs&&dn&&jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(ManualSelectorProvider,{manualId:dn}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Navigate,{to:"/ops-manual",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"book",element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual",element:jsxRuntimeExports.jsx(OpsManualScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual/category/:categoryKey",element:jsxRuntimeExports.jsx(OpsManualScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual/sop/:sopId",element:jsxRuntimeExports.jsx(ReadOnlySopDetail,{})}),jsxRuntimeExports.jsx(Route,{path:"team",element:jsxRuntimeExports.jsx(TeamManagementScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"team/:teamId",element:jsxRuntimeExports.jsx(TeamDetailScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/ops-manual",replace:!0})})]}),xs&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[dn===void 0&&jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(AddManual,{onAdd:bs=>ms(bs.id)})}),dn&&jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(ManualSelectorProvider,{manualId:dn}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(DashboardScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"book",element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"faq",element:jsxRuntimeExports.jsx(InAppPageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"blog",element:jsxRuntimeExports.jsx(InAppPageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"blog/:slug",element:jsxRuntimeExports.jsx(InAppPageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"upload",element:jsxRuntimeExports.jsx(UploadIpScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"board",element:jsxRuntimeExports.jsx(BoardScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"board/create",element:jsxRuntimeExports.jsx(CreateSopPage,{})}),jsxRuntimeExports.jsx(Route,{path:"sop/:sopId",element:jsxRuntimeExports.jsx(SopScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"wizard",element:jsxRuntimeExports.jsx(AskWizardPage,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual",element:jsxRuntimeExports.jsx(OpsManualScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual/category/:categoryKey",element:jsxRuntimeExports.jsx(OpsManualScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"ops-manual/sop/:sopId",element:jsxRuntimeExports.jsx(ReadOnlySopDetail,{})}),jsxRuntimeExports.jsx(Route,{path:"settings",element:jsxRuntimeExports.jsx(SettingsHome,{})}),jsxRuntimeExports.jsx(Route,{path:"settings/brand-voice",element:jsxRuntimeExports.jsx(BrandVoiceProvider,{children:jsxRuntimeExports.jsx(BrandVoice,{})})}),jsxRuntimeExports.jsx(Route,{path:"settings/business-details",element:jsxRuntimeExports.jsx(BusinessDetailsProvider,{children:jsxRuntimeExports.jsx(BusinessDetails,{})})}),jsxRuntimeExports.jsx(Route,{path:"settings/target-reader",element:jsxRuntimeExports.jsx(TargetReaderProvider,{children:jsxRuntimeExports.jsx(TargetReader,{})})}),jsxRuntimeExports.jsx(Route,{path:"team",element:jsxRuntimeExports.jsx(TeamManagementScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"team/:teamId",element:jsxRuntimeExports.jsx(TeamDetailScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"settings/team",element:jsxRuntimeExports.jsx(TeamSettings,{})}),jsxRuntimeExports.jsx(Route,{path:"settings/preferences",element:jsxRuntimeExports.jsx(PreferencesSettings,{})}),jsxRuntimeExports.jsx(Route,{path:"settings/workspace",element:jsxRuntimeExports.jsx(WorkspaceSettings,{})}),jsxRuntimeExports.jsx(Route,{path:"consultancy",element:jsxRuntimeExports.jsx(ConsultancySalesPage,{})})]})]})]})})]})}function RequestSubmitted(){const ds=useNavigate(),{state:dn}=useLocation();return jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Email Sent",subtitle:`We have sent an email to ${dn?.email}`,children:jsxRuntimeExports.jsx("form",{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"mt-5 text-md",children:jsxRuntimeExports.jsx("span",{children:"Check your inbox for password recovery options"})}),jsxRuntimeExports.jsx("div",{className:"mt-5 flex",children:jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Primary,className:"ml-auto mr-auto",text:"Back to login",onClick:()=>ds("/")})})]})})})}function validate(ds,dn){const ms={};
1455return(!ds||ds==="")&&(ms.password="Password is required"),(ds&&ds.length<8||!/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/.test(ds))&&(ms.password="8 characters, 1 number & 1 uppercase"),ds!==dn&&(ms.confirm="Passwords must match"),ms}function determineRoute(ds){return Auth.isAuthenticated()?ds??"/":"/"}function ResetPassword(){const[ds]=useSearchParams({}),dn=useNavigate(),[ms,xs]=reactExports.useState(""),[bs,Es]=reactExports.useState(""),[ws,Rs]=reactExports.useState({});return jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Reset password",subtitle:"Enter your new password",children:jsxRuntimeExports.jsx("form",{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(FormPassword,{label:"Password",className:"mt-5",name:"password",placeholder:"Password",onChange:js=>xs(js.currentTarget.value),value:ms,autoComplete:"new-password"}),ws.password&&jsxRuntimeExports.jsx("p",{children:ws.password}),jsxRuntimeExports.jsx(FormPassword,{label:"Confirm",className:"mt-5",name:"confirm",placeholder:"Confirm",onCh
1455ange:js=>Es(js.currentTarget.value),value:bs,autoComplete:"new-password"}),ws.confirm&&jsxRuntimeExports.jsx("p",{children:ws.confirm}),ws.response&&jsxRuntimeExports.jsx("p",{children:ws.response}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex",children:[jsxRuntimeExports.jsx(Button,{className:"ml-auto mr-2",text:"Cancel",onClick:()=>dn("/")}),jsxRuntimeExports.jsx(AsyncButton,{text:"Reset password",validate:()=>validate(ms,bs),save:()=>Sdk.userClient.resetPassword(ms,ds.get("code")),onSuccess:js=>{js&&js.status===200?dn(determineRoute()??"/"):Rs({confirm:"Failed to update password. Please try again later"})},onFailure:js=>Rs(js)})]})]})})})}function registerSW(ds={}){const{immediate:dn=!1,onNeedReload:ms,onNeedRefresh:xs,onOfflineReady:bs,onRegistered:Es,onRegisteredSW:ws,onRegisterError:Rs}=ds;let js,Cs,As;const ks=async(Ms=!0)=>{await Cs,As?.()};async function Os(){if("serviceWorker"in navigator){if(js=await __vitePreload(async()=>{const{Workbox:Ms}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:Ms}},[]).then(({Workbox:Ms})=>new Ms("/sw.js",{scope:"/",type:"classic"})).catch(Ms=>{Rs?.(Ms)}),!js)return;As=()=>{js?.messageSkipWaiting()};{let Ms=!1;const Ds=()=>{Ms=!0,js?.addEventListener("controlling",Ps=>{Ps.isUpdate&&(ms?ms():window.location.reload())}),xs?.()};js.addEventListener("installed",Ps=>{typeof Ps.isUpdate>"u"?typeof Ps.isExternal<"u"&&Ps.isExternal?Ds():!Ms&&bs?.():Ps.isUpdate||bs?.()}),js.addEventListener("waiting",Ds)}js.register({immediate:dn}).then(Ms=>{ws?ws("/sw.js",Ms):Es?.(Ms)}).catch(Ms=>{Rs?.(Ms)})}}return Cs=Os(),ks}function useRegisterSW(ds={}){const{immediate:dn=!0,onNeedReload:ms,onNeedRefresh:xs,onOfflineReady:bs,onRegistered:Es,onRegisteredSW:ws,onRegisterError:Rs}=ds,[js,Cs]=reactExports.useState(!1),[As,ks]=reactExports.useState(!1),[Os]=reactExports.useState(()=>registerSW({immediate:dn,onNeedReload:ms,onOfflineReady(){ks(!0),bs?.()},onNeedRefresh(){Cs(!0),xs?.()},onRegistered:Es,onRegisteredSW:ws,onRegisterError:Rs}));return{needRefresh:[js,Cs],offlineReady:[As,ks],updateServiceWorker:Os}}const APP_UPDATED_SEARCH_PARAM="appUpdated";function ReloadPrompt(){const ds=useLocation(),[dn,ms]=reactExports.useState(!1),xs=reactExports.useRef(!1),{needRefresh:[bs,Es],updateServiceWorker:ws}=useRegisterSW({immediate:!0,onRegisteredSW(As,ks){ks&&(ks.update(),setInterval(()=>{ks.update()},2e4))},onRegisterError(As){console.debug("SW registration error",As)}}),Rs=reactExports.useCallback(async()=>{if(xs.current)return;xs.current=!0,await ws(!0);const As=new URL(window.location.href),ks=As.searchParams;ks.set(APP_UPDATED_SEARCH_PARAM,String(Date.now())),window.location.replace(`${As.pathname}?${ks.toString()}`)},[ws]),js=()=>{Es(!1),ms(!1)},Cs=As=>["/sop/*","/wizard","/board","/settings/*"].some(Os=>Os.endsWith("/*")?As.startsWith(Os.slice(0,-2)):As===Os);return reactExports.useEffect(()=>{if(new URLSearchParams(ds.search).has(APP_UPDATED_SEARCH_PARAM)){Es(!1);return}bs&&(Cs(ds.pathname)?ms(!0):(console.log("New version available, auto-reloading..."),Rs().then(()=>console.log("Update successful"))))},[bs,Es,ds.pathname,ds.search,Rs]),jsxRuntimeExports.jsx("div",{children:dn&&jsxRuntimeExports.jsxs("section",{className:"z-[1000] rounded-sm mb-4 mr-6 w-90 right-0 bottom-0 fixed p-4 border-2 bg-[#FF5C36] text-white border-tertiary",children:[jsxRuntimeExports.jsxs("div",{className:"font-copy",children:[jsxRuntimeExports.jsx("h1",{className:"mb-2 !text-black",children:"UPDATES AVAILABLE"}),jsxRuntimeExports.jsx("p",{className:"font-bold mt-2",children:"RELOADS PAGE"})]}),jsxRuntimeExports.jsxs("section",{className:"mt-8 font-copy text-right flex",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,text:"LATER",className:"!border-2",onClick:()=>js()}),jsxRuntimeExports.jsx(Button,{className:"ml-auto !border-solid !border-2 !border-white",buttonType:ButtonType.Primary,text:"UPDATE NOW",onClick:()=>Rs()})]})]})})}function HomeProvider({children:ds,mobileBreakpoint:dn=768}){const[ms,xs]=reactExports.useState(defaultCurrencyCode()),[bs,Es]=reactExports.useState(),[ws,Rs]=reactExports.useState(typeof window<"u"?window.innerWidth<dn:!1);return reactExports.useEffect(()=>{fetchIP().then(async Cs=>Es(Cs));function js(){Rs(window.innerWidth<dn)}return window.addEventListener("resize",js),js(),()=>window.removeEventListener("resize",js)},[dn]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(HomeContext.Provider,{value:{ip:bs,currency:ms,setCurrency:xs,isMobileDevice:ws},children:bs&&ds})})}function deriveThemeVariables(ds){const dn={};return ds.primaryColor&&(dn["--color-primary"]=ds.primaryColor,dn["--primary"]=ds.primaryColor,dn["--color-primary-hover"]=ds.primaryColor),ds.secondaryColor&&(dn["--color-secondary"]=ds.secondaryColor,dn["--secondary"]=ds.secondaryColor,dn["--color-heading"]=ds.secondaryColor),ds.tertiaryColor&&(dn["--color-tertiary"]=ds.tertiaryColor,dn["--color-body"]=ds.tertiaryColor),ds.backgroundColor&&(dn["--color-background"]=ds.backgroundColor,dn["--background"]=ds.backgroundColor),ds.bodyColor&&(dn["--color-body"]=ds.bodyColor),dn}function ThemeProvider({children:ds}){const[dn,ms]=reactExports.useState(null);reactExports.useEffect(()=>{Sdk.organisationClient.myOrganisation().then(Rs=>{Rs?.theme&&ms({...Rs.theme,logoUrl:Rs.theme?.logoUrl})})},[]),reactExports.useEffect(()=>{if(dn){const Rs=deriveThemeVariables(dn);
1455Object.entries(Rs).forEach(([js,Cs])=>{document.documentElement.style.setProperty(js,Cs)})}},[dn]);const xs=reactExports.useCallback(async Rs=>{ms(js=>({logoUrl:js?.logoUrl,...Rs}));try{await Sdk.organisationClient.updateTheme(Rs)}catch(js){console.error("Failed to update theme on backend",js)}},[]),bs=reactExports.useCallback(async Rs=>{const js=await Sdk.organisationClient.uploadLogo(Rs);if(js)return ms(Cs=>({...Cs??{},logoUrl:js})),js},[]),Es=reactExports.useCallback(async()=>{await Sdk.organisationClient.removeLogo(),ms(Rs=>({...Rs??{},logoUrl:void 0}))},[]),ws=reactExports.useMemo(()=>({userTheme:dn,updateTheme:xs,updateLogo:bs,removeLogo:Es}),[bs,xs,dn,Es]);return jsxRuntimeExports.jsx(ThemeContext.Provider,{value:ws,children:ds})}const SUPPORT_EMAIL="[email protected]";function NoWorkspace(){const ds=useNavigate();return jsxRuntimeExports.jsxs(AuthPageTemplate,{title:"No workspace",subtitle:"You are not part of a workspace any more",children:[jsxRuntimeExports.jsx("p",{className:"md:hidden text-xl font-semibold mb-2",children:"You are not part of a workspace any more"}),jsxRuntimeExports.jsx("p",{children:"Your account still exists, but you are no longer part of a Manual Magic workspace. This happens when you hand your workspace to a new owner and choose to leave, or when an admin removes you."}),jsxRuntimeExports.jsx("p",{className:"mt-4",children:"If you need access again, ask an admin of the workspace to invite you."}),jsxRuntimeExports.jsxs("p",{className:"mt-4",children:["To close your account, email ",jsxRuntimeExports.jsx("a",{className:"underline",href:`mailto:${SUPPORT_EMAIL}`,children:SUPPORT_EMAIL})," from the address you sign in with and ask us to close it. We will email you when it is done."]}),jsxRuntimeExports.jsx("div",{className:"mt-6 flex",children:jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Secondary,text:"Sign out",onClick:()=>{Sdk.userClient.logout(),ds("/",{replace:!0})}})})]})}function LoginRedirect(){const ds=useLocation(),dn=`${ds.pathname}${ds.search}`;return jsxRuntimeExports.jsx(Navigate,{to:`/login?redirect=${encodeURIComponent(dn)}`,replace:!0})}function Home(){const ds=Auth.isAuthenticated()&&Auth.hasOrganisation();return jsxRuntimeExports.jsxs(HomeProvider,{children:[!Auth.isAuthenticated()&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsxs(Route,{path:"/",element:jsxRuntimeExports.jsx(Layout,{}),children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"/:slug/*",element:jsxRuntimeExports.jsx(PageOrArticle,{})})]}),jsxRuntimeExports.jsx(Route,{path:"/settings/*",element:jsxRuntimeExports.jsx(LoginRedirect,{})}),jsxRuntimeExports.jsx(Route,{path:"/login",element:jsxRuntimeExports.jsx(Login,{})}),jsxRuntimeExports.jsx(Route,{path:"/sign-up",element:jsxRuntimeExports.jsx(SignUp,{})}),jsxRuntimeExports.jsx(Route,{path:"/forgotten-password",element:jsxRuntimeExports.jsx(ForgotPassword,{})}),jsxRuntimeExports.jsx(Route,{path:"/reset-password",element:jsxRuntimeExports.jsx(ResetPassword,{})}),jsxRuntimeExports.jsx(Route,{path:"/submitted",element:jsxRuntimeExports.jsx(RequestSubmitted,{})})]}),jsxRuntimeExports.jsx(ReloadPrompt,{})]}),Auth.isAuthenticated()&&!ds&&jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/legal/*",element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NoWorkspace,{})})]}),ds&&jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/legal/*",element:jsxRuntimeExports.jsx(PageOrArticle,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(AccountProvider,{children:jsxRuntimeExports.jsxs(ThemeProvider,{children:[jsxRuntimeExports.jsx(Secure,{}),jsxRuntimeExports.jsx(ReloadPrompt,{})]})})})]})]})}const BookRedirect=()=>{const ds="https://cdn.manualmagic.ai/Manual+Magic+Create+the+Operations+Manual+Your+Franchisees+Need+to+Succeed.pdf",dn=useNavigate(),ms=reactExports.useRef(!1);return reactExports.useEffect(()=>{ms.current||(ms.current=!0,window.open(ds,"_blank"),dn("/",{replace:!0}))},[dn]),null};var dist={},ga4={},gtag={},hasRequiredGtag;function requireGtag(){return hasRequiredGtag||(hasRequiredGtag=1,(function(ds){Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;var dn=function(){for(var bs=arguments.length,Es=new Array(bs),ws=0;ws<bs;ws++)Es[ws]=arguments[ws];if(typeof window<"u"){var Rs;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(Rs=window).gtag.apply(Rs,Es)}},ms=dn;ds.default=ms})(gtag)),gtag}var format={},hasRequiredFormat;function requireFormat(){return hasRequiredFormat||(hasRequiredFormat=1,
1455(function(ds){Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=ws;var dn=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function ms(Rs){return Rs.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(js,Cs,As){return Cs>0&&Cs+js.length!==As.length&&js.search(dn)>-1&&As.charAt(Cs-2)!==":"&&(As.charAt(Cs+js.length)!=="-"||As.charAt(Cs-1)==="-")&&As.charAt(Cs-1).search(/[^\s-]/)<0?js.toLowerCase():js.substr(1).search(/[A-Z]|\../)>-1?js:js.charAt(0).toUpperCase()+js.substr(1)})}function xs(Rs){return typeof Rs=="string"&&Rs.indexOf("@")!==-1}var bs="REDACTED (Potential Email Address)";function Es(Rs){return xs(Rs)?(console.warn("This arg looks like an email address, redacting."),bs):Rs}function ws(){var Rs=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",js=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Cs=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,As=Rs||"";return js&&(As=ms(Rs)),Cs&&(As=Es(As)),As}})(format)),format}var hasRequiredGa4;function requireGa4(){return hasRequiredGa4||(hasRequiredGa4=1,(function(ds){Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=ds.GA4=void 0;var dn=ws(requireGtag()),ms=ws(requireFormat()),xs=["eventCategory","eventAction","eventLabel","eventValue","hitType"],bs=["title","location"],Es=["page","hitType"];function ws(ea){return ea&&ea.__esModule?ea:{default:ea}}function Rs(ea,ta){if(ea==null)return{};var aa=js(ea,ta),fa,ua;if(Object.getOwnPropertySymbols){var Ea=Object.getOwnPropertySymbols(ea);for(ua=0;ua<Ea.length;ua++)fa=Ea[ua],!(ta.indexOf(fa)>=0)&&Object.prototype.propertyIsEnumerable.call(ea,fa)&&(aa[fa]=ea[fa])}return aa}function js(ea,ta){if(ea==null)return{};var aa={},fa=Object.keys(ea),ua,Ea;for(Ea=0;Ea<fa.length;Ea++)ua=fa[Ea],!(ta.indexOf(ua)>=0)&&(aa[ua]=ea[ua]);return aa}function Cs(ea){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ta){return typeof ta}:function(ta){return ta&&typeof Symbol=="function"&&ta.constructor===Symbol&&ta!==Symbol.prototype?"symbol":typeof ta},Cs(ea)}function As(ea){return Ms(ea)||Os(ea)||Fs(ea)||ks()}function ks(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1456In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Os(ea){if(typeof Symbol<"u"&&ea[Symbol.iterator]!=null||ea["@@iterator"]!=null)return Array.from(ea)}function Ms(ea){if(Array.isArray(ea))return Us(ea)}function Ds(ea,ta){var aa=Object.keys(ea);if(Object.getOwnPropertySymbols){var fa=Object.getOwnPropertySymbols(ea);ta&&(fa=fa.filter(function(ua){return Object.getOwnPropertyDescriptor(ea,ua).enumerable})),aa.push.apply(aa,fa)}return aa}function Ps(ea){for(var ta=1;ta<arguments.length;ta++){var aa=arguments[ta]!=null?arguments[ta]:{};ta%2?Ds(Object(aa),!0).forEach(function(fa){Qs(ea,fa,aa[fa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(aa)):Ds(Object(aa)).forEach(function(fa){Object.defineProperty(ea,fa,Object.getOwnPropertyDescriptor(aa,fa))})}return ea}function Ls(ea,ta){return Js(ea)||Gs(ea,ta)||Fs(ea,ta)||Bs()}function Bs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1457In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fs(ea,ta){if(ea){if(typeof ea=="string")return Us(ea,ta);var aa=Object.prototype.toString.call(ea).slice(8,-1);if(aa==="Object"&&ea.constructor&&(aa=ea.constructor.name),aa==="Map"||aa==="Set")return Array.from(ea);if(aa==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(aa))return Us(ea,ta)}}function Us(ea,ta){(ta==null||ta>ea.length)&&(ta=ea.length);for(var aa=0,fa=new Array(ta);aa<ta;aa++)fa[aa]=ea[aa];return fa}function Gs(ea,ta){var aa=ea==null?null:typeof Symbol<"u"&&ea[Symbol.iterator]||ea["@@iterator"];if(aa!=null){var fa,ua,Ea,ra,Ia=[],$a=!0,oa=!1;try{if(Ea=(aa=aa.call(ea)).next,ta!==0)for(;!($a=(fa=Ea.call(aa)).done)&&(Ia.push(fa.value),Ia.length!==ta);$a=!0);}catch(sa){oa=!0,ua=sa}
1457finally{try{if(!$a&&aa.return!=null&&(ra=aa.return(),Object(ra)!==ra))return}finally{if(oa)throw ua}}return Ia}}function Js(ea){if(Array.isArray(ea))return ea}function Ws(ea,ta){if(!(ea instanceof ta))throw new TypeError("Cannot call a class as a function")}function Zs(ea,ta){for(var aa=0;aa<ta.length;aa++){var fa=ta[aa];fa.enumerable=fa.enumerable||!1,fa.configurable=!0,"value"in fa&&(fa.writable=!0),Object.defineProperty(ea,ai(fa.key),fa)}}function Ys(ea,ta,aa){return ta&&Zs(ea.prototype,ta),Object.defineProperty(ea,"prototype",{writable:!1}),ea}function Qs(ea,ta,aa){return ta=ai(ta),ta in ea?Object.defineProperty(ea,ta,{value:aa,enumerable:!0,configurable:!0,writable:!0}):ea[ta]=aa,ea}function ai(ea){var ta=ia(ea,"string");return Cs(ta)==="symbol"?ta:String(ta)}function ia(ea,ta){if(Cs(ea)!=="object"||ea===null)return ea;var aa=ea[Symbol.toPrimitive];if(aa!==void 0){var fa=aa.call(ea,ta);if(Cs(fa)!=="object")return fa;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ta==="string"?String:Number)(ea)}var ca=(function(){function ea(){var ta=this;Ws(this,ea),Qs(this,"reset",function(){ta.isInitialized=!1,ta._testMode=!1,ta._currentMeasurementId,ta._hasLoadedGA=!1,ta._isQueuing=!1,ta._queueGtag=[]}),Qs(this,"_gtag",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];ta._testMode||ta._isQueuing?ta._queueGtag.push(fa):dn.default.apply(void 0,fa)}),Qs(this,"_loadGA",function(aa,fa){var ua=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!ta._hasLoadedGA){var Ea=document.createElement("script");Ea.async=!0,Ea.src="".concat(ua,"?id=").concat(aa),fa&&Ea.setAttribute("nonce",fa),document.body.appendChild(Ea),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},ta._hasLoadedGA=!0}}),Qs(this,"_toGtagOptions",function(aa){if(aa){var fa={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},ua=Object.entries(aa).reduce(function(Ea,ra){var Ia=Ls(ra,2),$a=Ia[0],oa=Ia[1];return fa[$a]?Ea[fa[$a]]=oa:Ea[$a]=oa,Ea},{});return ua}}),Qs(this,"initialize",function(aa){var fa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!aa)throw new Error("Require GA_MEASUREMENT_ID");var ua=typeof aa=="string"?[{trackingId:aa}]:aa;ta._currentMeasurementId=ua[0].trackingId;var Ea=fa.gaOptions,ra=fa.gtagOptions,Ia=fa.nonce,$a=fa.testMode,oa=$a===void 0?!1:$a,sa=fa.gtagUrl;if(ta._testMode=oa,oa||ta._loadGA(ta._currentMeasurementId,Ia,sa),ta.isInitialized||(ta._gtag("js",new Date),ua.forEach(function(Oa){var za=Ps(Ps(Ps({},ta._toGtagOptions(Ps(Ps({},Ea),Oa.gaOptions))),ra),Oa.gtagOptions);Object.keys(za).length?ta._gtag("config",Oa.trackingId,za):ta._gtag("config",Oa.trackingId)})),ta.isInitialized=!0,!oa){var Ra=As(ta._queueGtag);for(ta._queueGtag=[],ta._isQueuing=!1;Ra.length;){var _a=Ra.shift();ta._gtag.apply(ta,As(_a)),_a[0]==="get"&&(ta._isQueuing=!0)}}}),Qs(this,"set",function(aa){if(!aa){console.warn("`fieldsObject` is required in .set()");return}if(Cs(aa)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(aa).length===0&&console.warn("empty `fieldsObject` given to .set()"),ta._gaCommand("set",aa)}),Qs(this,"_gaCommandSendEvent",function(aa,fa,ua,Ea,ra){ta._gtag("event",fa,Ps(Ps({event_category:aa,event_label:ua,value:Ea},ra&&{non_interaction:ra.nonInteraction}),ta._toGtagOptions(ra)))}),Qs(this,"_gaCommandSendEventParameters",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];
1457if(typeof fa[0]=="string")ta._gaCommandSendEvent.apply(ta,As(fa.slice(1)));else{var Ea=fa[0],ra=Ea.eventCategory,Ia=Ea.eventAction,$a=Ea.eventLabel,oa=Ea.eventValue;Ea.hitType;var sa=Rs(Ea,xs);ta._gaCommandSendEvent(ra,Ia,$a,oa,sa)}}),Qs(this,"_gaCommandSendTiming",function(aa,fa,ua,Ea){ta._gtag("event","timing_complete",{name:fa,value:ua,event_category:aa,event_label:Ea})}),Qs(this,"_gaCommandSendPageview",function(aa,fa){if(fa&&Object.keys(fa).length){var ua=ta._toGtagOptions(fa),Ea=ua.title,ra=ua.location,Ia=Rs(ua,bs);ta._gtag("event","page_view",Ps(Ps(Ps(Ps({},aa&&{page_path:aa}),Ea&&{page_title:Ea}),ra&&{page_location:ra}),Ia))}else aa?ta._gtag("event","page_view",{page_path:aa}):ta._gtag("event","page_view")}),Qs(this,"_gaCommandSendPageviewParameters",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];if(typeof fa[0]=="string")ta._gaCommandSendPageview.apply(ta,As(fa.slice(1)));else{var Ea=fa[0],ra=Ea.page;Ea.hitType;var Ia=Rs(Ea,Es);ta._gaCommandSendPageview(ra,Ia)}}),Qs(this,"_gaCommandSend",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];var Ea=typeof fa[0]=="string"?fa[0]:fa[0].hitType;switch(Ea){case"event":ta._gaCommandSendEventParameters.apply(ta,fa);break;case"pageview":ta._gaCommandSendPageviewParameters.apply(ta,fa);break;case"timing":ta._gaCommandSendTiming.apply(ta,As(fa.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(Ea));break;default:console.warn("Send command doesn't exist: ".concat(Ea))}}),Qs(this,"_gaCommandSet",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];typeof fa[0]=="string"&&(fa[0]=Qs({},fa[0],fa[1])),ta._gtag("set",ta._toGtagOptions(fa[0]))}),Qs(this,"_gaCommand",function(aa){for(var fa=arguments.length,ua=new Array(fa>1?fa-1:0),Ea=1;Ea<fa;Ea++)ua[Ea-1]=arguments[Ea];switch(aa){case"send":ta._gaCommandSend.apply(ta,ua);break;case"set":ta._gaCommandSet.apply(ta,ua);break;default:console.warn("Command doesn't exist: ".concat(aa))}}),Qs(this,"ga",function(){for(var aa=arguments.length,fa=new Array(aa),ua=0;ua<aa;ua++)fa[ua]=arguments[ua];if(typeof fa[0]=="string")ta._gaCommand.apply(ta,fa);else{var Ea=fa[0];ta._gtag("get",ta._currentMeasurementId,"client_id",function(ra){ta._isQueuing=!1;var Ia=ta._queueGtag;for(Ea({get:function(sa){return sa==="clientId"?ra:sa==="trackingId"?ta._currentMeasurementId:sa==="apiVersion"?"1":void 0}});Ia.length;){var $a=Ia.shift();ta._gtag.apply(ta,As($a))}}),ta._isQueuing=!0}return ta.ga}),Qs(this,"event",function(aa,fa){if(typeof aa=="string")ta._gtag("event",aa,ta._toGtagOptions(fa));else{var ua=aa.action,Ea=aa.category,ra=aa.label,Ia=aa.value,$a=aa.nonInteraction,oa=aa.transport;if(!Ea||!ua){console.warn("args.category AND args.action are required in event()");return}var sa={hitType:"event",eventCategory:(0,ms.default)(Ea),eventAction:(0,ms.default)(ua)};ra&&(sa.eventLabel=(0,ms.default)(ra)),typeof Ia<"u"&&(typeof Ia!="number"?console.warn("Expected `args.value` arg to be a Number."):sa.eventValue=Ia),typeof $a<"u"&&(typeof $a!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):sa.nonInteraction=$a),typeof oa<"u"&&(typeof oa!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(oa)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),sa.transport=oa)),ta._gaCommand("send",sa)}}),Qs(this,"send",function(aa){ta._gaCommand("send",aa)}),this.reset()}return Ys(ea,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),ea})();ds.GA4=ca;var ha=new ca;ds.default=ha})(ga4)),ga4}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(ds){function dn(Rs){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(js){return typeof js}:function(js){return js&&typeof Symbol=="function"&&js.constructor===Symbol&&js!==Symbol.prototype?"symbol":typeof js},dn(Rs)}Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=ds.ReactGAImplementation=void 0;var ms=bs(requireGa4());function xs(Rs){if(typeof WeakMap!="function")return null;var js=new WeakMap,Cs=new WeakMap;return(xs=function(ks){return ks?Cs:js})(Rs)}function bs(Rs,js){if(Rs&&Rs.__esModule)return Rs;if(Rs===null||dn(Rs)!=="object"&&typeof Rs!="function")return{default:Rs};var Cs=xs(js);if(Cs&&Cs.has(Rs))return Cs.get(Rs);var As={},ks=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Os in Rs)if(Os!=="default"&&Object.prototype.hasOwnProperty.call(Rs,Os)){var Ms=ks?Object.getOwnPropertyDescriptor(Rs,Os):null;Ms&&(Ms.get||Ms.set)?Object.defineProperty(As,Os,Ms):As[Os]=Rs[Os]}return As.default=Rs,Cs&&Cs.set(Rs,As),As}var Es=ms.GA4;ds.ReactGAImplementation=Es;var ws=ms.default;ds.default=ws})(dist)),dist}var distExports=requireDist();const ReactGA=getDefaultExportFromCjs(distExports);function ClaromentisSso(){const ds=useNavigate(),[dn]=useSearchParams(),ms=sanitizeRedirectPath(dn.get("redirect"));return reactExports.useEffect(()=>{if(Auth.isAuthenticated()){ds(ms,{replace:!0});return}const xs=new URL(`${Sdk.config.apiUrl}/v1/users/oauth/claromentis/start`);ms!=="/"&&xs.searchParams.set("redirect",ms),window.location.replace(xs.toString())},[ds,ms]),jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Connecting to Claromentis",subtitle:"We’re redirecting you to sign in with your Claromentis account.",children:jsxRuntimeExports.jsxs("div",{className:"text-center space-y-4",children:[jsxRuntimeExports.jsx("p",{className:"text-white/90",children:"If nothing happens, continue to Claromentis manually."}),jsxRuntimeExports.jsx("a",{href:`${Sdk.config.apiUrl}/v1/users/oauth/claromentis/start${ms==="/"?"":`?redirect=${encodeURIComponent(ms)}`}`,className:"block text-center rounded-xs px-4 py-2 font-bold border border-white text-white hover:brightness-95",children:"Continue with Claromentis"}),jsxRuntimeExports.jsx(Link$1,{to:`/login${ms==="/"?"":`?redirect=${encodeURIComponent(ms)}`}`,className:"underline",children:"Back to login"})]})})}const STORAGE_KEY="mm_demo_session",DemoSessionContext=reactExports.createContext(void 0);function DemoSessionProvider({children:ds}){const[dn,ms]=reactExports.useState(()=>sessionStorage.getItem(STORAGE_KEY)),xs=Es=>{sessionStorage.setItem(STORAGE_KEY,Es),ms(Es)},bs=()=>{sessionStorage.removeItem(STORAGE_KEY),ms(null)};return jsxRuntimeExports.jsx(DemoSessionContext.Provider,{value:{sessionId:dn,setSessionId:xs,clear:bs},children:ds})}function useDemoSession(){const ds=reactExports.useContext(DemoSessionContext);if(!ds)throw new Error("useDemoSession must be used within a DemoSessionProvider");return ds}const ACCEPT=".pdf,.doc,.docx,.txt,.md";function errorTextFrom(ds,dn){return typeof ds=="string"&&ds.trim()?ds:dn}function DemoUploadScreen(){const ds=useNavigate(),{setSessionId:dn}=useDemoSession(),[ms,xs]=reactExports.useState(""),[bs,Es]=reactExports.useState(""),[ws,Rs]=reactExports.useState("idle"),[js,Cs]=reactExports.useState(0),[As,ks]=reactExports.useState(""),Os=ws==="uploading"||ws==="analysing",Ms=async Ps=>{Rs("uploading"),Cs(0),ks("");try{const Ls=await Sdk.demoClient.createSession(ms,bs);if(Ls.status!==200||!Ls.data?.sessionId)throw new Error(errorTextFrom(Ls.data,"We couldn't start the demo. Please try again."));const Bs=Ls.data.sessionId,Fs=await Sdk.demoClient.upload(Bs,Ps,Us=>{Cs(Us),Us>=100&&Rs("analysing")});if(`${Fs.status}`.startsWith("2")){dn(Bs),saveDemoContact({companyName:ms.trim(),email:bs.trim()}),ds("/try/manual");return}throw new Error(errorTextFrom(Fs.data,"We couldn't process that file. Please try another document."))}catch(Ls){ks(Ls instanceof Error?Ls.message:"Something went wrong. Please try again."),Rs("error")}},Ds=Ps=>{!Ps.length||Os||Ms(Ps[0])};return jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 md:py-16",children:[jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl leading-tight text-slate-900 md:text-[2.6rem]",style:{fontFamily:"var(--font-futura-800)"},children:"See your Operations manual start to build from one document"}),jsxRuntimeExports.jsx("p",{className:"mt-4 text-base leading-7 text-slate-600 md:text-lg",children:"Upload a single Word or PDF document - a franchise agreement, business plan, anything you'd like to create sample SOPs from. We'll have your drafts ready in about 30 seconds."})]}),jsxRuntimeExports.jsxs("div",{className:"mt-10 rounded-[2rem] border border-white/70 bg-white/80 p-6 shadow-[0_24px_70px_rgba(15,23,42,0.08)] md:p-10",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[jsxRuntimeExports.jsxs("label",{className:"flex flex-col gap-1 text-sm text-slate-600",children:[jsxRuntimeExports.jsxs("span",{children:["Company name ",jsxRuntimeExports.jsx("span",{className:"text-slate-400",children:"(optional)"})]}),jsxRuntimeExports.jsx("input",{type:"text",value:ms,disabled:Os,onChange:Ps=>xs(Ps.currentTarget.value),placeholder:"Your company",className:"rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-slate-800 outline-none focus:border-slate-300 focus:ring-2 focus:ring-slate-200 disabled:opacity-60"})]}),jsxRuntimeExports.jsxs("label",{className:"flex flex-col gap-1 text-sm text-slate-600",children:[jsxRuntimeExports.jsxs("span",{children:["Email ",jsxRuntimeExports.jsx("span",{className:"text-slate-400",children:"(optional)"})]}),jsxRuntimeExports.jsx("input",{type:"email",value:bs,disabled:Os,onChange:Ps=>Es(Ps.currentTarget.value),placeholder:"[email protected]",className:"rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-slate-800 outline-none focus:border-slate-300 focus:ring-2 focus:ring-slate-200 disabled:opacity-60"})]})]}),jsxRuntimeExports.jsxs("div",{className:"mt-6",children:[!Os&&jsxRuntimeExports.jsx(Dropzone,{onFiles:Ds,accept:ACCEPT,disabled:Os}),ws==="uploading"&&jsxRuntimeExports.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-8 text-center",children:[jsxRuntimeExports.jsx("p",{className:"font-semibold text-slate-800",children:"Uploading your document…"}),jsxRuntimeExports.jsx("div",{className:"mx-auto mt-4 h-2 w-full max-w-md overflow-hidden rounded-full bg-slate-100",children:jsxRuntimeExports.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${js}%`}})})]}),ws==="analysing"&&jsxRuntimeExports.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-10 text-center",children:[jsxRuntimeExports.jsx("div",{className:"mx-auto h-12 w-12 animate-spin rounded-full border-t-2 border-b-2 border-primary"}),jsxRuntimeExports.jsx("p",{className:"mt-4 font-semibold text-slate-800",children:"Building SOPs…"}),jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Reading your document and drafting your SOPs."})]}),ws==="error"&&jsxRuntimeExports.jsxs("div",{className:"rounded-2xl border border-red-200 bg-red-50 p-8 text-center",children:[jsxRuntimeExports.jsx("p",{className:"font-semibold text-red-700",children:As}),jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Rs("idle"),Cs(0)},className:"mt-4 inline-block rounded-lg bg-primary px-5 py-2.5 font-semibold text-white hover:brightness-95",children:"Try again"})]})]}),jsxRuntimeExports.jsx("p",{className:"mt-4 text-center text-xs text-slate-400",children:"PDF, Word, or text · one document · up to 10MB"})]})]})}const CATEGORY_CARDS=[{key:"intro",value:"Introduction",label:"Introduction",description:"Purpose, key principles, and how to get the most from your manual.",icon:Handshake,glow:"rgba(190, 178, 157, 0.28)",plaque:"linear-gradient(180deg, #F2EEE7 0%, #D6CBB8 100%)",iconTheme:"text-slate-800"},{key:"team",value:"Your Team",label:"People",description:"Hiring, onboarding, expectations, and people practices that keep teams aligned.",icon:Users,glow:"rgba(177, 161, 143, 0.24)",plaque:"linear-gradient(180deg, #ECE4DA 0%, #C7B6A3 100%)",iconTheme:"text-slate-800"},{key:"day-to-day",value:"Day-to-Day Operating Requirements",label:"Operations & Management",description:"Daily standards, workflows, service delivery, and management routines.",icon:ClipboardList,glow:"rgba(164, 172, 154, 0.24)",plaque:"linear-gradient(180deg, #E6EADF 0%, #ADB8A0 100%)",iconTheme:"text-slate-800"},{key:"marketing",value:"Marketing & Promotion",label:"Sales & Marketing",description:"Promotion, visibility, and customer messaging that helps drive demand.",icon:Monitor,glow:"rgba(154, 166, 178, 0.24)",plaque:"linear-gradient(180deg, #E4E9ED 0%, #9FAFBA 100%)",iconTheme:"text-slate-800"},{key:"growth-profit",value:"Business Development, Growth & Profit",label:"Growth & Profit",description:"Performance, financial health, improvement, and scaling the business well.",icon:ChartColumnBig,glow:"rgba(168, 155, 176, 0.24)",plaque:"linear-gradient(180deg, #E9E3EB 0%, #B4A7BA 100%)",iconTheme:"text-slate-800"},{key:"setup",value:"New business Set-Up & Support",label:"Set-Up & Support",description:"Launch readiness, systems, support resources, and the essentials for getting started.",icon:Rocket,glow:"rgba(174, 168, 160, 0.22)",plaque:"linear-gradient(180deg, #EAE7E2 0%, #C1B8AC 100%)",iconTheme:"text-slate-800"}];function DemoManualScreen(){const ds=useNavigate(),{sessionId:dn}=useDemoSession(),[ms,xs]=reactExports.useState([]),[bs,Es]=reactExports.useState(PageState.NotReady),[ws,Rs]=reactExports.useState(!1);reactExports.useEffect(()=>{if(!dn){ds("/try",{replace:!0});return}const Ds=async()=>{try{Es(PageState.Loading),Rs(!1);const Ps=await Sdk.demoClient.fetchAll(dn);if(!`${Ps.status}`.startsWith("2")){Rs(!0);return}xs(Array.isArray(Ps.data)?Ps.data:[])}catch{Rs(!0)}finally{Es(PageState.Ready)}};bs===PageState.NotReady&&Ds()},[dn,bs,ds]);const js=()=>{Rs(!1),Es(PageState.NotReady)},Cs=reactExports.useMemo(()=>{const Ds=new Map;
1457return ms.forEach(Ps=>Ds.set(Ps.category,(Ds.get(Ps.category)??0)+1)),Ds},[ms]),As=dn?`/sign-up?demo=${dn}`:"/sign-up",ks=dn?{demoSessionId:dn}:void 0,Os=Ds=>{const Ps=Ds.icon,Ls=Cs.get(Ds.value)??0;return jsxRuntimeExports.jsxs("div",{className:"group flex h-full w-full flex-col items-center text-center",children:[jsxRuntimeExports.jsxs("div",{className:"relative flex w-full justify-center",children:[jsxRuntimeExports.jsx("div",{className:"absolute top-6 h-24 w-24 rounded-full blur-2xl opacity-75",style:{backgroundColor:Ds.glow}}),jsxRuntimeExports.jsx("div",{className:"relative flex h-[8.5rem] w-[8.5rem] items-center justify-center rounded-[1.75rem] border border-white/65 px-6 py-6 md:h-[10.25rem] md:w-[10.25rem]",style:{background:Ds.plaque,boxShadow:"0 16px 28px rgba(15, 23, 42, 0.12), inset 0 2px 0 rgba(255,255,255,0.55), inset 0 -10px 18px rgba(15,23,42,0.08)"},children:jsxRuntimeExports.jsx(Ps,{size:58,strokeWidth:.85,className:Ds.iconTheme})})]}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex w-full max-w-[17rem] flex-1 flex-col items-center",children:[jsxRuntimeExports.jsx("h3",{className:"text-balance text-[1.2rem] leading-[1.15] font-black text-slate-900 md:text-[1.35rem]",style:{fontFamily:"var(--font-futura-800)"},children:Ds.label}),jsxRuntimeExports.jsxs("div",{className:"mt-auto pt-3 text-[0.72rem] font-semibold uppercase tracking-[0.22em] text-slate-500",children:[Ls," procedure",Ls===1?"":"s"]})]})]},Ds.value)};if(bs!==PageState.Ready)return jsxRuntimeExports.jsx("div",{className:"flex h-64 items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-t-2 border-b-2 border-primary"})});if(ws)return jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-20 text-center",children:[jsxRuntimeExports.jsx("h2",{className:"text-xl font-semibold text-slate-700",children:"Something went wrong loading your manual."}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-slate-500",children:"Please try again in a moment."}),jsxRuntimeExports.jsxs("div",{className:"mt-6 flex items-center justify-center gap-4",children:[jsxRuntimeExports.jsx("button",{type:"button",onClick:js,className:"rounded-lg bg-primary px-6 py-3 font-semibold text-white hover:brightness-95",children:"Try again"}),jsxRuntimeExports.jsx(Link$1,{to:"/try",className:"font-semibold text-primary hover:opacity-80",children:"Start a new demo"})]})]});const Ms=({className:Ds=""})=>jsxRuntimeExports.jsx(Link$1,{to:As,state:ks,className:`inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 font-semibold text-white hover:brightness-95 ${Ds}`,children:"Create an account so you don't lose your progress"});return jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-10 md:py-14",children:[jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl leading-tight text-slate-900 md:text-[2.4rem]",style:{fontFamily:"var(--font-futura-800)"},children:"Here's the start of your manual"}),jsxRuntimeExports.jsx("p",{className:"mx-auto mt-4 max-w-2xl text-base leading-7 text-slate-600 md:text-lg",children:"We've drafted your SOPs so you can get a idea of what to add, edit and build yourself."}),jsxRuntimeExports.jsx("div",{className:"mt-6",children:jsxRuntimeExports.jsx(Ms,{})})]}),jsxRuntimeExports.jsx("div",{className:"mt-12 grid items-stretch justify-items-center gap-x-8 gap-y-10 md:grid-cols-3 xl:grid-cols-6",children:CATEGORY_CARDS.map(Os)}),jsxRuntimeExports.jsxs("div",{className:"mt-12 space-y-6",children:[ms.length===0&&jsxRuntimeExports.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-8 text-center",children:[jsxRuntimeExports.jsx("h2",{className:"text-lg font-semibold text-slate-700",children:"We couldn't pull clear procedures from that document."}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-slate-500",children:"Try another document with more of your operating detail in it."}),jsxRuntimeExports.jsx(Link$1,{to:"/try",className:"mt-4 inline-block font-semibold text-primary hover:opacity-80",children:"Try a different document"})]}),CATEGORY_CARDS.map(Ds=>{const Ps=ms.filter(Ls=>Ls.category===Ds.value);return Ps.length===0?null:jsxRuntimeExports.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white shadow-sm",children:[jsxRuntimeExports.jsx("h2",{className:"rounded-t-lg border-b border-gray-200 bg-gray-50 p-4 text-lg font-semibold",children:Ds.value}),jsxRuntimeExports.jsx("div",{className:"divide-y divide-gray-200",children:Ps.map(Ls=>jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>ds(`/try/manual/sop/${Ls.id}`),className:"flex w-full items-center justify-between p-4 text-left hover:bg-gray-50",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"font-medium text-slate-800",children:Ls.objective}),Ls.description&&jsxRuntimeExports.jsx("div",{className:"mt-1 line-clamp-2 text-sm text-slate-500",children:Ls.description})]}),jsxRuntimeExports.jsx("span",{className:"ml-4 shrink-0 text-sm font-semibold text-primary",children:"Read →"})]},Ls.id))})]},Ds.value)})]}),ms.length>0&&jsxRuntimeExports.jsxs("div",{className:"mt-12 rounded-[2rem] border border-white/70 bg-white/80 p-8 text-center shadow-[0_24px_70px_rgba(15,23,42,0.08)]",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl text-slate-900",style:{fontFamily:"var(--font-futura-800)"},children:"Make it yours"}),jsxRuntimeExports.jsx("p",{className:"mx-auto mt-3 max-w-xl text-slate-600",children:"Create an account to customise it with your own operational intelligence."}),jsxRuntimeExports.jsx("div",{className:"mt-6",children:jsxRuntimeExports.jsx(Ms,{})})]})]})}function DemoSopDetail(){const{sopId:ds}
1457=useParams(),dn=useNavigate(),{sessionId:ms}=useDemoSession(),[xs,bs]=reactExports.useState(null),[Es,ws]=reactExports.useState(""),[Rs,js]=reactExports.useState(!1),[Cs,As]=reactExports.useState(PageState.NotReady);reactExports.useEffect(()=>{if(!ms){dn("/try",{replace:!0});return}if(!ds)return;const Ds=async()=>{try{As(PageState.Loading),js(!1);const Ps=await Sdk.demoClient.fetch(ms,ds);if(!`${Ps.status}`.startsWith("2")||!Ps.data?.objective){dn("/try/manual",{replace:!0});return}bs(Ps.data);const Ls=await Sdk.demoClient.fetchContent(ms,ds);`${Ls.status}`.startsWith("2")&&typeof Ls.data=="string"&&Ls.data.trim()?ws(Ls.data):js(!0)}catch{js(!0)}finally{As(PageState.Ready)}};Cs===PageState.NotReady&&Ds()},[ms,ds,Cs,dn]);const ks=ms?`/sign-up?demo=${ms}`:"/sign-up",Os=ms?{demoSessionId:ms}:void 0,Ms=()=>{ws(""),js(!1),As(PageState.NotReady)};return Cs!==PageState.Ready||!xs?jsxRuntimeExports.jsx("div",{className:"flex h-64 items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-t-2 border-b-2 border-primary"})}):jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-10 md:py-14",children:[jsxRuntimeExports.jsxs("div",{className:"mb-6",children:[jsxRuntimeExports.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[jsxRuntimeExports.jsxs("button",{onClick:()=>dn("/try/manual"),className:"flex items-center text-primary hover:opacity-80",children:[jsxRuntimeExports.jsx(ArrowLeft,{size:20,className:"mr-2"}),"Back to manual"]}),jsxRuntimeExports.jsxs(Link$1,{to:ks,state:Os,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-semibold text-white hover:brightness-95",children:[jsxRuntimeExports.jsx(Pencil,{size:16}),"Create an account to edit"]})]}),jsxRuntimeExports.jsx("h1",{className:"mb-2 text-3xl font-bold",children:xs.objective}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[jsxRuntimeExports.jsx("span",{className:"rounded-full bg-gray-100 px-3 py-1 italic",children:xs.category}),xs.updatedEpoch&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"•"}),jsxRuntimeExports.jsxs("span",{children:["Updated ",DateTime.fromSeconds(xs.updatedEpoch).toFormat("dd LLLL yyyy")]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"rounded-lg border border-gray-200 bg-white p-3 md:p-8",children:Es?jsxRuntimeExports.jsx("div",{className:"max-w-none leading-7",children:jsxRuntimeExports.jsx(Markdown,{remarkPlugins:[remarkGfm],components:{h1:({...Ds})=>jsxRuntimeExports.jsx("h1",{className:"mb-4 text-3xl font-bold",...Ds}),h2:({...Ds})=>jsxRuntimeExports.jsx("h2",{className:"mb-3 text-2xl font-semibold",...Ds}),h3:({...Ds})=>jsxRuntimeExports.jsx("h3",{className:"mb-2 text-xl font-semibold",...Ds}),p:({...Ds})=>jsxRuntimeExports.jsx("p",{className:"mb-3",...Ds}),ul:({...Ds})=>jsxRuntimeExports.jsx("ul",{className:"mb-3 ml-5 list-disc",...Ds}),ol:({...Ds})=>jsxRuntimeExports.jsx("ol",{className:"mb-3 ml-5 list-decimal",...Ds}),blockquote:({...Ds})=>jsxRuntimeExports.jsx("blockquote",{className:"mb-3 border-l-4 pl-3 italic text-[--text-medium]",...Ds}),table:({...Ds})=>jsxRuntimeExports.jsx("div",{className:"mb-4 overflow-x-auto",children:jsxRuntimeExports.jsx("table",{className:"w-full border-collapse text-sm",...Ds})}),thead:({...Ds})=>jsxRuntimeExports.jsx("thead",{className:"bg-gray-50",...Ds}),th:({...Ds})=>jsxRuntimeExports.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold",...Ds}),td:({...Ds})=>jsxRuntimeExports.jsx("td",{className:"border border-gray-200 px-3 py-2 align-top",...Ds}),a:({...Ds})=>jsxRuntimeExports.jsx("a",{className:"text-[--color-primary] underline",...Ds})},children:Es})}):jsxRuntimeExports.jsxs("div",{className:"py-12 text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-gray-600",children:Rs?"We couldn't generate this SOP just now.":"No content available."}),jsxRuntimeExports.jsx("button",{type:"button",onClick:Ms,className:"mt-4 inline-block rounded-lg bg-primary px-5 py-2.5 font-semibold text-white hover:brightness-95",children:"Try again"})]})}),jsxRuntimeExports.jsxs("div",{className:"mt-8 rounded-2xl border border-white/70 bg-white/80 p-6 text-center",children:[jsxRuntimeExports.jsx("p",{className:"text-slate-700",children:"This is a draft we generated from your document. Create an account to edit it and keep your manual."}),jsxRuntimeExports.jsx(Link$1,{to:ks,state:Os,className:"mt-4 inline-block rounded-lg bg-primary px-6 py-3 font-semibold text-white hover:brightness-95",children:"Create an account so you don't lose your progress"})]})]})}function TryApp(){return jsxRuntimeExports.jsx(DemoSessionProvider,{children:jsxRuntimeExports.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto bg-[linear-gradient(180deg,#fffcf9_0%,#f4f1ec_100%)]",children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(DemoUploadScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"manual",element:jsxRuntimeExports.jsx(DemoManualScreen,{})}),jsxRuntimeExports.jsx(Route,{path:"manual/sop/:sopId",element:jsxRuntimeExports.jsx(DemoSopDetail,{})})]})})})}function TransferSummary({display:ds}){const dn=usePriceFormatter(ds.currency??DEFAULT_CURRENCY),ms=ds.organisationName??"this workspace",xs=[ds.adminSeats!==null?seatCount(ds.adminSeats,"admin"):void 0,ds.readerSeats!==null?seatCount(ds.readerSeats,"reader"):void 0].filter(
1457Boolean).join(" and ");return jsxRuntimeExports.jsxs("div",{className:"rounded border border-gray-200 bg-gray-50 p-4 text-secondary",children:[jsxRuntimeExports.jsxs("p",{className:"text-lg font-semibold",children:[ds.outgoingOwnerName??"The owner"," wants to hand ",ms," over to you."]}),jsxRuntimeExports.jsxs("dl",{className:"mt-3 grid grid-cols-1 sm:grid-cols-[max-content_1fr] gap-x-4 gap-y-1 text-md",children:[jsxRuntimeExports.jsx("dt",{className:"font-semibold",children:"Workspace"}),jsxRuntimeExports.jsx("dd",{children:ms}),ds.outgoingOwnerName&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("dt",{className:"font-semibold",children:"Handed over by"}),jsxRuntimeExports.jsx("dd",{children:ds.outgoingOwnerName})]}),xs&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("dt",{className:"font-semibold",children:"Seats"}),jsxRuntimeExports.jsx("dd",{children:xs})]}),ds.renewalAmount!==null&&ds.renewalEpoch!==null&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("dt",{className:"font-semibold",children:"Next renewal"}),jsxRuntimeExports.jsxs("dd",{children:[dn(ds.renewalAmount)," on ",formatTransferDate(ds.renewalEpoch)]})]}),ds.expiresEpoch!==null&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("dt",{className:"font-semibold",children:"Link expires"}),jsxRuntimeExports.jsx("dd",{children:formatTransferDateTime(ds.expiresEpoch)})]})]}),jsxRuntimeExports.jsxs("p",{className:"mt-3",children:["When you accept, you become the owner and get full admin control of the workspace and everything in it.",ds.requiresCard?" You also take over billing: the card you add below replaces the one on file and pays for the next renewal.":" There is no paid subscription on this workspace, so you do not need to add a card."]})]})}const DEAD_ENDS={NotFound:{subtitle:"This link does not work",message:"We could not find a transfer for this link. Check you copied the whole link from the email. If you did, ask the owner to start the transfer again."},Accepting:{subtitle:"This transfer is being completed",message:"Someone is accepting this transfer right now. Wait a few minutes, then reload this page."},Completed:{subtitle:"This transfer is done",message:"This workspace has already been handed over. If you are the new owner, sign in to use it."},Cancelled:{subtitle:"This transfer was cancelled",message:"The owner cancelled this transfer. Nothing has changed. If you still expect to take over the workspace, ask them to start a new transfer."},Declined:{subtitle:"This transfer was turned down",message:"This transfer was turned down, so nothing has changed. If that was a mistake, ask the owner to start a new transfer."},DeclinedHere:{subtitle:"You turned down this transfer",message:"Nothing has changed, and we have told the owner. If you change your mind, ask them to start a new transfer."},Expired:{subtitle:"This link has expired",message:"Transfer links only last 72 hours. Nothing has changed. Ask the owner to start a new transfer."}};function TransferDeadEnd({reason:ds}){const dn=useNavigate(),{subtitle:ms,message:xs}=DEAD_ENDS[ds],bs=Auth.isAuthenticated();return jsxRuntimeExports.jsxs(AuthPageTemplate,{title:"Workspace transfer",subtitle:ms,children:[jsxRuntimeExports.jsx("p",{className:"md:hidden text-xl font-semibold mb-2",children:ms}),jsxRuntimeExports.jsx("p",{children:xs}),jsxRuntimeExports.jsxs("div",{className:"mt-5 flex",children:[ds==="Completed"&&jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Primary,text:bs?"Open Manual Magic":"Sign in",onClick:()=>dn(bs?"/":"/login")}),ds==="Accepting"&&jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Secondary,text:"Reload",onClick:()=>window.location.reload()})]})]})}const PASSWORD_RULE=/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/,CARD_NOT_ACCEPTED="Your card was not accepted. Check the details or try a different card.";function AcceptTransferForm(ds){const{token:dn,display:ms,approvedSetupIntentId:xs,redirectFailed:bs,card:Es,confirmCard:ws,onDeclined:Rs}=ds,js=useNavigate(),[Cs,As]=reactExports.useState(()=>getTransferNames(dn)?.firstName??""),[ks,Os]=reactExports.useState(()=>getTransferNames(dn)?.lastName??""),[Ms,Ds]=reactExports.useState(""),[Ps,Ls]=reactExports.useState(""),[Bs,Fs]=reactExports.useState(xs),[Us,Gs]=reactExports.useState({}),[Js,Ws]=reactExports.useState(!1),Zs=!ms.newOwnerHasAccount,Ys=ms.newOwnerEmail??"your email address",Qs=()=>{const ca={};return Zs?(isBlank(Cs)&&(ca.firstName="Enter your first name"),isBlank(ks)&&(ca.lastName="Enter your last name"),PASSWORD_RULE.test(Ms)||(ca.password="8 characters, 1 number & 1 uppercase"),Ms!==Ps&&(ca.confirm="Passwords must match")):isBlank(Ms)&&(ca.password="Enter your password"),ms.requiresCard&&!Bs&&!ws&&(ca.card="The card form has not loaded. Reload the page and try again."),ca},ai=async()=>{let ca=Bs;ms.requiresCard&&!ca&&ws&&(setTransferNames(dn,{firstName:Cs,lastName:ks}),ca=await ws(),Fs(ca));const ha=await Sdk.ownershipTransferClient.accept(dn,{password:Ms,firstName:Zs?Cs.trim():void 0,lastName:Zs?ks.trim():void 0,setupIntentId:ms.requiresCard?ca:void 0});return throwUnlessOk(ha,ha?.status===409?"This transfer is already being accepted, or it is no longer open. Reload the page to see where it stands.":"Something went wrong and the transfer did not complete. Try again in a few minutes.")},ia=jsxRuntimeExports.jsx(AsyncConfirmModal,{open:Js,onClose:()=>Ws(!1),title:"Turn down this transfer?",message:"Nothing in the workspace changes. We will tell the owner, and this link will stop working.",confirmText:"Turn it down",cancelText:"Go back",danger:!0,save:async()=>throwUnlessOk(await Sdk.ownershipTransferClient.decline(dn),"We could not turn down the transfer. Try again in a few minutes."),onSuccess:()=>{clearTransferNames(dn),Rs()}});return ms.newOwnerMustResetPassword?jsxRuntimeExports.jsxs("div",{className:"mt-6",children:[jsxRuntimeExports.jsx("h3",{className:"text-xl mb-2",children:"Set a password first"}),jsxRuntimeExports.jsxs("p",{children:["There is already a Manual Magic account for ",Ys,", but it has no password yet. You need one before you can take over this workspace."]}),jsxRuntimeExports.jsxs("ol",{className:"list-decimal pl-5 mt-3 space-y-1",children:[jsxRuntimeExports.jsxs("li",{children:["Go to ",jsxRuntimeExports.jsx(Link$1,{to:"/forgotten-password",className:"underline",children:"Forgotten password"})," and enter ",Ys,"."]}),jsxRuntimeExports.jsx("li",{children:"Follow the link in the email we send you and choose a password."}),jsxRuntimeExports.jsx("li",{children:"Open the transfer link from your email again."})]}),jsxRuntimeExports.jsx("div",{className:"mt-6 flex",children:jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Cancel,text:"No thanks",onClick:()=>Ws(!0)})}),ia]}):jsxRuntimeExports.jsxs("div",{className:"mt-6",children:[xs&&jsxRuntimeExports.jsx("p",{className:"mb-4 rounded border border-green-200 bg-green-50 p-3 text-green-800",children:"Your bank approved your card. Enter your password again to finish."}),bs&&!Bs&&jsxRuntimeExports.jsx("p",{className:"mb-4 rounded border border-red-200 bg-red-50 p-3 text-red-700",children:"Your bank did not approve the card. Try again, or use a different card."}),jsxRuntimeExports.jsx("h3",{className:"text-xl mb-2",children:Zs?"Create your account":"Sign in to accept"}),jsxRuntimeExports.jsx("p",{className:"mb-4",children:Zs?`You are creating a new Manual Magic account for ${Ys}.`:`You already have a Manual Magic account for ${Ys}. Enter its password.`}),jsxRuntimeExports.jsxs("form",{onSubmit:ca=>ca.preventDefault(),children:[Zs&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"First name",name:"firstName",onChange:ca=>As(ca.currentTarget.value),value:Cs,autoComplete:"given-name"}),Us.firstName&&jsxRuntimeExports.jsx("p",{className:"-mt-3 mb-4 text-sm text-red-600",children:Us.firstName}),jsxRuntimeExports.jsx(FormInput,{className:"mb-4",label:"Last name",name:"lastName",onChange:ca=>Os(ca.currentTarget.value),value:ks,autoComplete:"family-name"}),Us.lastName&&jsxRuntimeExports.jsx("p",{className:"-mt-3 mb-4 text-sm text-red-600",children:Us.lastName})]}),jsxRuntimeExports.jsx(FormPassword,{label:Zs?"Choose a password":"Password",name:"password",onChange:ca=>Ds(ca.currentTarget.value),value:Ms,autoComplete:Zs?"new-password":"current-password"}),Us.password&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Us.password}),Zs&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FormPassword,{className:"mt-4",label:"Confirm password",name:"confirm",onCh
1457ange:ca=>Ls(ca.currentTarget.value),value:Ps,autoComplete:"new-password"}),Us.confirm&&jsxRuntimeExports.jsx("p",{className:"mt-1 text-sm text-red-600",children:Us.confirm})]}),!Zs&&jsxRuntimeExports.jsx("div",{className:"mt-2",children:jsxRuntimeExports.jsx(Link$1,{to:"/forgotten-password",className:"underline",children:"Forgotten your password?"})}),ms.requiresCard&&jsxRuntimeExports.jsxs("div",{className:"mt-6",children:[jsxRuntimeExports.jsx("h3",{className:"text-xl mb-2",children:"Your card"}),Bs?jsxRuntimeExports.jsx("p",{children:"Your card is saved. It will pay for the workspace from the next renewal."}):Es,Us.card&&jsxRuntimeExports.jsx("p",{className:"mt-2 text-sm text-red-600",children:Us.card})]}),Us.response&&jsxRuntimeExports.jsx("p",{className:"mt-4 rounded border border-red-200 bg-red-50 p-3 text-red-700",children:Us.response}),jsxRuntimeExports.jsxs("div",{className:"mt-6 flex flex-row items-center gap-2",children:[jsxRuntimeExports.jsx(Button,{buttonType:ButtonType.Cancel,text:"No thanks",onClick:()=>Ws(!0)}),jsxRuntimeExports.jsx(AsyncButton,{className:"ml-auto",text:"Accept and take over",validate:Qs,save:ai,onSuccess:()=>{clearTransferNames(dn),js("/")},onFailure:ca=>Gs(ca)})]})]}),ia]})}function CardAcceptTransferForm(ds){const dn=useStripe(),ms=useElements(),xs=async()=>{if(!dn||!ms)throw new Error("The card form has not finished loading. Wait a moment and try again.");const{error:Es,setupIntent:ws}=await dn.confirmSetup({elements:ms,confirmParams:{return_url:`${window.location.origin}/transfer/${ds.token}`},redirect:"if_required"});if(Es)throw new Error(Es.message||CARD_NOT_ACCEPTED);if(ws.status!=="succeeded")throw new Error(CARD_NOT_ACCEPTED);return ws.id},bs={layout:"tabs"};return jsxRuntimeExports.jsx(AcceptTransferForm,{...ds,card:jsxRuntimeExports.jsx(PaymentElement,{options:bs}),confirmCard:xs})}function TransferAccept(){const{token:ds=""}=useParams(),[dn]=useSearchParams(),ms=dn.get("redirect_status"),xs=dn.get("setup_intent"),bs=ms==="succeeded"&&xs?xs:void 0,Es=ms!==null&&ms!=="succeeded",[ws,Rs]=reactExports.useState(PageState.NotReady),[js,Cs]=reactExports.useState(null),[As,ks]=reactExports.useState(),[Os,Ms]=reactExports.useState(),[Ds,Ps]=reactExports.useState(!1),Ls=reactExports.useRef(null);if(reactExports.useEffect(()=>{const Fs=`${ds}:${bs??""}`;if(Ls.current===Fs)return;Ls.current=Fs,(async()=>{const Gs=await Sdk.ownershipTransferClient.display(ds);if(Gs?.status===404){Cs(null),Rs(PageState.Ready);return}if(Gs?.status!==200||!Gs.data){Rs(PageState.Error);return}const Js=Gs.data;if(Cs(Js),Js.status==="Pending"&&Js.requiresCard&&!Js.newOwnerMustResetPassword&&!bs){const Ws=await Sdk.ownershipTransferClient.setupIntent(ds);Ws?.status===200&&Ws.data?.clientSecret?ks(Ws.data.clientSecret):Ms(responseErrorMessage(Ws,"The card form could not be loaded. Reload the page to try again."))}Rs(PageState.Ready)})()},[ds,bs]),ws===PageState.NotReady)return jsxRuntimeExports.jsx(AuthPageTemplate,{title:"Workspace transfer",subtitle:"Loading the transfer",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center py-6",children:[jsxRuntimeExports.jsx(Spinner,{}),jsxRuntimeExports.jsx("p",{className:"mt-4",children:"Loading the transfer..."})]})});if(ws===PageState.Error)return jsxRuntimeExports.jsxs(AuthPageTemplate,{title:"Workspace transfer",subtitle:"Something went wrong",children:[jsxRuntimeExports.jsx("p",{children:"We could not load this transfer. Check your connection and try again."}),jsxRuntimeExports.jsx("div",{className:"mt-5 flex",children:jsxRuntimeExports.jsx(Button,{className:"ml-auto",buttonType:ButtonType.Secondary,text:"Reload",onClick:()=>window.location.reload()})})]});if(Ds)return jsxRuntimeExports.jsx(TransferDeadEnd,{reason:"DeclinedHere"});if(!js)return jsxRuntimeExports.jsx(TransferDeadEnd,{reason:"NotFound"});if(js.status!=="Pending")return jsxRuntimeExports.jsx(TransferDeadEnd,{reason:js.status});const Bs={token:ds,display:js,approvedSetupIntentId:bs,redirectFailed:Es,onDeclined:()=>Ps(!0)};return jsxRuntimeExports.jsxs(AuthPageTemplate,{title:"Take over a workspace",subtitle:"Check what you are taking on, then accept",children:[jsxRuntimeExports.jsx(TransferSummary,{display:js}),As&&!bs?jsxRuntimeExports.jsx(Elements,{stripe:stripePromise,options:{appearance:stripeAppearance,clientSecret:As},children:jsxRuntimeExports.jsx(CardAcceptTransferForm,{...Bs})},As):jsxRuntimeExports.jsx(AcceptTransferForm,{...Bs,card:Os&&jsxRuntimeExports.jsx("p",{className:"text-red-600",children:Os})})]})}const NotFound=()=>jsxRuntimeExports.jsx("span",{children:"Sorry, page not found"}),CLAROMENTIS_CALLBACK_PARAMS=["code","state","error","error_description"];window.location.pathname.toLowerCase().startsWith("/transfer/")||ReactGA.initialize("G-DPE0226PFC",{testMode:!Sdk.config.prod});function isClaromentisOAuthCallback(ds){return ds.has("state")&&(ds.has("code")||ds.has("error"))}function forwardClaromentisOAuthCallback(ds){const dn=new URL(`${Sdk.config.apiUrl}/v1/users/oauth/claromentis/callback`);CLAROMENTIS_CALLBACK_PARAMS.forEach(ms=>{const xs=ds.get(ms);xs&&dn.searchParams.set(ms,xs)}),window.location.replace(dn.toString())}function App(){const[ds,dn]=reactExports.useState(!1),[ms,xs]=reactExports.useState(!0);reactExports.useEffect(()=>{window.addEventListener("online",()=>xs(!0)),window.addEventListener("offline",()=>xs(!1))},[]);const[bs]=useSearchParams({});return reactExports.useEffect(()=>{if(isClaromentisOAuthCallback(bs)){forwardClaromentisOAuthCallback(bs);return}bs.has("ac")&&localStorage.setItem(WEB_AUTH_TOKEN,bs.get("ac")),dn(!0)},[bs]),jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col",children:ds&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!ms&&jsxRuntimeExports.jsx("div",{className:"text-center bg-slate-200 font-md text-white",children:"You are offline - data won't be saved"}),jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/book",element:jsxRuntimeExports.jsx(BookRedirect,{})}),jsxRuntimeExports.jsx(Route,{path:"/claromentis-sso",element:jsxRuntimeExports.jsx(ClaromentisSso,{})}),jsxRuntimeExports.jsx(Route,{path:"/try/*",element:jsxRuntimeExports.jsx(TryApp,{})}),jsxRuntimeExports.jsx(Route,{path:"/transfer/:token",element:jsxRuntimeExports.jsx(TransferAccept,{})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(Home,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFound,{})})]})]})})}var client={exports:{}},reactDomClient_production={}
vendor: 4,218 bytes, line 1457
1457,scheduler={exports:{}},scheduler_production={};var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,(function(ds){function dn(aa,fa){var ua=aa.length;aa.push(fa);e:for(;0<ua;){var Ea=ua-1>>>1,ra=aa[Ea];if(0<bs(ra,fa))aa[Ea]=fa,aa[ua]=ra,ua=Ea;else break e}}function ms(aa){return aa.length===0?null:aa[0]}function xs(aa){if(aa.length===0)return null;var fa=aa[0],ua=aa.pop();if(ua!==fa){aa[0]=ua;e:for(var Ea=0,ra=aa.length,Ia=ra>>>1;Ea<Ia;){var $a=2*(Ea+1)-1,oa=aa[$a],sa=$a+1,Ra=aa[sa];if(0>bs(oa,ua))sa<ra&&0>bs(Ra,oa)?(aa[Ea]=Ra,aa[sa]=ua,Ea=sa):(aa[Ea]=oa,aa[$a]=ua,Ea=$a);else if(sa<ra&&0>bs(Ra,ua))aa[Ea]=Ra,aa[sa]=ua,Ea=sa;else break e}}return fa}function bs(aa,fa){var ua=aa.sortIndex-fa.sortIndex;return ua!==0?ua:aa.id-fa.id}if(ds.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Es=performance;ds.unstable_now=function(){return Es.now()}}else{var ws=Date,Rs=ws.now();ds.unstable_now=function(){return ws.now()-Rs}}var js=[],Cs=[],As=1,ks=null,Os=3,Ms=!1,Ds=!1,Ps=!1,Ls=!1,Bs=typeof setTimeout=="function"?setTimeout:null,Fs=typeof clearTimeout=="function"?clearTimeout:null,Us=typeof setImmediate<"u"?setImmediate:null;function Gs(aa){for(var fa=ms(Cs);fa!==null;){if(fa.callback===null)xs(Cs);else if(fa.startTime<=aa)xs(Cs),fa.sortIndex=fa.expirationTime,dn(js,fa);else break;fa=ms(Cs)}}function Js(aa){if(Ps=!1,Gs(aa),!Ds)if(ms(js)!==null)Ds=!0,Ws||(Ws=!0,ca());else{var fa=ms(Cs);fa!==null&&ta(Js,fa.startTime-aa)}}var Ws=!1,Zs=-1,Ys=5,Qs=-1;function ai(){return Ls?!0:!(ds.unstable_now()-Qs<Ys)}function ia(){if(Ls=!1,Ws){var aa=ds.unstable_now();Qs=aa;var fa=!0;try{e:{Ds=!1,Ps&&(Ps=!1,Fs(Zs),Zs=-1),Ms=!0;var ua=Os;try{t:{for(Gs(aa),ks=ms(js);ks!==null&&!(ks.expirationTime>aa&&ai());){var Ea=ks.callback;if(typeof Ea=="function"){ks.callback=null,Os=ks.priorityLevel;var ra=Ea(ks.expirationTime<=aa);if(aa=ds.unstable_now(),typeof ra=="function"){ks.callback=ra,Gs(aa),fa=!0;break t}ks===ms(js)&&xs(js),Gs(aa)}else xs(js);ks=ms(js)}if(ks!==null)fa=!0;else{var Ia=ms(Cs);Ia!==null&&ta(Js,Ia.startTime-aa),fa=!1}}break e}finally{ks=null,Os=ua,Ms=!1}fa=void 0}}finally{fa?ca():Ws=!1}}}var ca;if(typeof Us=="function")ca=function(){Us(ia)};else if(typeof MessageChannel<"u"){var ha=new MessageChannel,ea=ha.port2;ha.port1.onmessage=ia,ca=function(){ea.postMessage(null)}}else ca=function(){Bs(ia,0)};function ta(aa,fa){Zs=Bs(function(){aa(ds.unstable_now())},fa)}ds.unstable_IdlePriority=5,ds.unstable_ImmediatePriority=1,ds.unstable_LowPriority=4,ds.unstable_NormalPriority=3,ds.unstable_Profiling=null,ds.unstable_UserBlockingPriority=2,ds.unstable_cancelCallback=function(aa){aa.callback=null},ds.unstable_forceFrameRate=function(aa){0>aa||125<aa?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ys=0<aa?Math.floor(1e3/aa):5},ds.unstable_getCurrentPriorityLevel=function(){return Os},ds.unstable_next=function(aa){switch(Os){case 1:case 2:case 3:var fa=3;break;default:fa=Os}var ua=Os;Os=fa;try{return aa()}finally{Os=ua}},ds.unstable_requestPaint=function(){Ls=!0},ds.unstable_runWithPriority=function(aa,fa){switch(aa){case 1:case 2:case 3:case 4:case 5:break;default:aa=3}var ua=Os;Os=aa;try{return fa()}finally{Os=ua}},ds.unstable_scheduleCallback=function(aa,fa,ua){var Ea=ds.unstable_now();switch(typeof ua=="object"&&ua!==null?(ua=ua.delay,ua=typeof ua=="number"&&0<ua?Ea+ua:Ea):ua=Ea,aa){case 1:var ra=-1;break;case 2:ra=250;break;case 5:ra=1073741823;break;case 4:ra=1e4;break;default:ra=5e3}return ra=ua+ra,aa={id:As++,callback:fa,priorityLevel:aa,startTime:ua,expirationTime:ra,sortIndex:-1},ua>Ea?(aa.sortIndex=ua,dn(Cs,aa),ms(js)===null&&aa===ms(Cs)&&(Ps?(Fs(Zs),Zs=-1):Ps=!0,ta(Js,ua-Ea))):(aa.sortIndex=ra,dn(js,aa),Ds||Ms||(Ds=!0,Ws||(Ws=!0,ca()))),aa},ds.unstable_shouldYield=ai,ds.unstable_wrapCallback=function(aa){var fa=Os;return function(){var ua=Os;Os=fa;try{return aa.apply(this,arguments)}finally{Os=ua}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler
vendor: 23,644 bytes, lines 1457-1464
1457=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var ds=requireScheduler(),dn=requireReact(),ms=requireReactDom();function xs(vs){var Ss="https://react.dev/errors/"+vs;if(1<arguments.length){Ss+="?args[]="+encodeURIComponent(arguments[1]);for(var Ts=2;Ts<arguments.length;Ts++)Ss+="&args[]="+encodeURIComponent(arguments[Ts])}return"Minified React error #"+vs+"; visit "+Ss+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function bs(vs){return!(!vs||vs.nodeType!==1&&vs.nodeType!==9&&vs.nodeType!==11)}function Es(vs){for(var Ss=vs,Ts=Ss;Ts&&!Ts.alternate;)Ss=Ts,(Ss.flags&4098)!==0&&(vs=Ss.return),Ts=Ss.return;for(;Ss.return;)Ss=Ss.return;return Ss.tag===3?vs:null}function ws(vs){if(vs.tag===13){var Ss=vs.memoizedState;if(Ss===null&&(vs=vs.alternate,vs!==null&&(Ss=vs.memoizedState)),Ss!==null)return Ss.dehydrated}return null}function Rs(vs){if(vs.tag===31){var Ss=vs.memoizedState;if(Ss===null&&(vs=vs.alternate,vs!==null&&(Ss=vs.memoizedState)),Ss!==null)return Ss.dehydrated}return null}function js(vs){if(Es(vs)!==vs)throw Error(xs(188))}function Cs(vs){var Ss=vs.alternate;if(!Ss){if(Ss=Es(vs),Ss===null)throw Error(xs(188));return Ss!==vs?null:vs}for(var Ts=vs,Ns=Ss;;){var Is=Ts.return;if(Is===null)break;var $s=Is.alternate;if($s===null){if(Ns=Is.return,Ns!==null){Ts=Ns;continue}break}if(Is.child===$s.child){for($s=Is.child;$s;){if($s===Ts)return js(Is),vs;if($s===Ns)return js(Is),Ss;$s=$s.sibling}throw Error(xs(188))}if(Ts.return!==Ns.return)Ts=Is,Ns=$s;else{for(var Ks=!1,Ci=Is.child;Ci;){if(Ci===Ts){Ks=!0,Ts=Is,Ns=$s;break}if(Ci===Ns){Ks=!0,Ns=Is,Ts=$s;break}Ci=Ci.sibling}if(!Ks){for(Ci=$s.child;Ci;){if(Ci===Ts){Ks=!0,Ts=$s,Ns=Is;break}if(Ci===Ns){Ks=!0,Ns=$s,Ts=Is;break}Ci=Ci.sibling}if(!Ks)throw Error(xs(189))}}if(Ts.alternate!==Ns)throw Error(xs(190))}if(Ts.tag!==3)throw Error(xs(188));return Ts.stateNode.current===Ts?vs:Ss}function As(vs){var Ss=vs.tag;if(Ss===5||Ss===26||Ss===27||Ss===6)return vs;for(vs=vs.child;vs!==null;){if(Ss=As(vs),Ss!==null)return Ss;vs=vs.sibling}return null}function ks(vs,Ss,Ts,Ns,Is,$s){for(;vs!==null;){if((vs.tag===5||vs.tag===27||vs.tag===6)&&Ts(vs,Ns,Is,$s)||(vs.tag!==22||vs.memoizedState===null)&&(Ss||vs.tag!==5&&vs.tag!==27)&&ks(vs.child,Ss,Ts,Ns,Is,$s))return!0;vs=vs.sibling}return!1}function Os(vs){for(vs=vs.return;vs!==null;){if(vs.tag===3||vs.tag===5||vs.tag===27)return vs;vs=vs.return}return null}function Ms(vs){var Ss=!1;for(vs=vs.return;vs!==null&&(vs.tag===4&&(Ss=!0),!(vs.tag===3||vs.tag===5||vs.tag===27));)vs=vs.return;return Ss}function Ds(vs){var Ss=[null,null],Ts=Os(vs);return Ts===null||Ps(Ss,vs,Ts.child,{foundSelf:!1}),Ss}function Ps(vs,Ss,Ts,Ns){for(;Ts!==null;){if(Ts===Ss)Ns.foundSelf=!0;else if(Ts.tag===5||Ts.tag===27||Ts.tag===6){if(Ns.foundSelf)return vs[1]=Ts,!0;vs[0]=Ts}else if((Ts.tag!==22||Ts.memoizedState===null)&&Ps(vs,Ss,Ts.child,Ns))return!0;Ts=Ts.sibling}return!1}function Ls(vs){switch(vs.tag){case 5:case 27:case 6:return vs.stateNode;case 3:return vs.stateNode.containerInfo;default:throw Error(xs(559))}}var Bs=null,Fs=null;function Us(vs,Ss,Ts){return vs===Ts?!0:vs===Ss?(Bs=vs,!0):!1}function Gs(vs,Ss,Ts){return vs===Ts?(Fs=vs,!1):vs===Ss?(Fs!==null&&(Bs=vs),!0):!1}function Js(vs){if(vs===null)return null;do vs=vs===null?null:vs.return;while(vs&&vs.tag!==5&&vs.tag!==27&&vs.tag!==3);return vs||null}function Ws(vs,Ss,Ts){for(var Ns=0,Is=vs;Is;Is=Ts(Is))Ns++;Is=0;for(var $s=Ss;$s;$s=Ts($s))Is++;for(;0<Ns-Is;)vs=Ts(vs),Ns--;for(;0<Is-Ns;)Ss=Ts(Ss),Is--;for(;Ns--;){if(vs===Ss||Ss!==null&&vs===Ss.alternate)return vs;vs=Ts(vs),Ss=Ts(Ss)}return null}var Zs=Object.assign,Ys=Symbol.for("react.element"),Qs=Symbol.for("react.transitional.element"),ai=Symbol.for("react.portal"),ia=Symbol.for("react.fragment"),ca=Symbol.for("react.strict_mode"),ha=Symbol.for("react.profiler"),ea=Symbol.for("react.consumer"),ta=Symbol.for("react.context"),aa=Symbol.for("react.forward_ref"),fa=Symbol.for("react.suspense"),ua=Symbol.for("react.suspense_list"),Ea=Symbol.for("react.memo"),ra=Symbol.for("react.lazy"),Ia=Symbol.for("react.activity"),$a=Symbol.for("react.legacy_hidden"),oa=Symbol.for("react.memo_cache_sentinel"),sa=Symbol.for("react.view_transition"),Ra=Symbol.for("react.recoverable"),_a=Symbol.iterator;function Oa(vs){return vs===null||typeof vs!="object"?null:(vs=_a&&vs[_a]||vs["@@iterator"],typeof vs=="function"?vs:null)}var za=Symbol.for("react.client.reference");function Ga(vs){if(vs==null)return null;if(typeof vs=="function")return vs.$$typeof===za?null:vs.displayName||vs.name||null;if(typeof vs=="string")return vs;switch(vs){case ia:return"Fragment";case ha:return"Profiler";case ca:return"StrictMode";case fa:return"Suspense";case ua:return"SuspenseList";case Ia:return"Activity";case sa:return"ViewTransition"}if(typeof vs=="object")switch(vs.$$typeof){case ai:return"Portal";case ta:return vs.displayName||"Context";case ea:return(vs._context.displayName||"Context")+".Consumer";case aa:var Ss=vs.render;return vs=vs.displayName,vs||(vs=Ss.displayName||Ss.name||"",vs=vs!==""?"ForwardRef("+vs+")":"ForwardRef"),vs;case Ea:return Ss=vs.displayName||null,Ss!==null?Ss:Ga(vs.type)||"Memo";case ra:Ss=vs._payload,vs=vs._init;try{return Ga(vs(Ss))}catch{}}return null}var qa=Array.isArray,Ma=dn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fa=ms.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ka={pending:!1,data:null,method:null,action:null},mo=[],ko=-1;function bo(vs){return{current:vs}}function oo(vs){0>ko||(vs.current=mo[ko],mo[ko]=null,ko--)}function Va(vs,Ss){ko++,mo[ko]=vs.current,vs.current=Ss}var uo=bo(null),Eo=bo(null),Ao=bo(null),Zo=bo(null);function sl(vs,Ss){switch(Va(Ao,Ss),Va(Eo,vs),Va(uo,null),Ss.nodeType){case 9:case 11:vs=(vs=Ss.documentElement)&&(vs=vs.namespaceURI)?R1(vs):0;break;default:if(vs=Ss.tagName,Ss=Ss.namespaceURI)Ss=R1(Ss),vs=j1(Ss,vs);else switch(vs){case"svg":vs=1;break;case"math":vs=2;break;default:vs=0}}oo(uo),Va(uo,vs)}function Po(){oo(uo),oo(Eo),oo(Ao)}function Ro(vs){var Ss=vs.memoizedState;Ss!==null&&(wd._currentValue=Ss.memoizedState,Va(Zo,vs)),Ss=uo.current;var Ts=j1(Ss,vs.type);Ss!==Ts&&(Va(Eo,vs),Va(uo,Ts))}function Vs(vs){Eo.current===vs&&(oo(uo),oo(Eo)),Zo.current===vs&&(oo(Zo),wd._currentValue=Ka)}var la,ga;function Na(vs){if(la===void 0)try{throw Error()}catch(Ts){var Ss=Ts.stack.trim().match(/\n( *(at )?)/);la=Ss&&Ss[1]||"",ga=-1<Ts.stack.indexOf(`
1458    at`)?" (<anonymous>)":-1<Ts.stack.indexOf("@")?"@unknown:0:0":""}return`
1459`+la+vs+ga}var Hs=!1;function zs(vs,Ss){if(!vs||Hs)return"";Hs=!0;var Ts=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Ns={DetermineComponentFrameRoot:function(){try{if(Ss){var Pa=function(){throw Error()};if(Object.defineProperty(Pa.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pa,[])}catch(Ya){var va=Ya}Reflect.construct(vs,[],Pa)}else{try{Pa.call()}catch(Ya){va=Ya}Pa=!1;try{var Ta=Object.getOwnPropertyDescriptor(vs.prototype,"props");Object.defineProperty(vs.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Pa=!0,new vs}finally{Pa&&(Ta!==void 0?Object.defineProperty(vs.prototype,"props",Ta):delete vs.prototype.props)}}}else{try{throw Error()}catch(Ya){va=Ya}(Pa=vs())&&typeof Pa.catch=="function"&&Pa.catch(function(){})}}catch(Ya){if(Ya&&va&&typeof Ya.stack=="string")return[Ya.stack,va.stack]}return[null,null]}};Ns.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Is=Object.getOwnPropertyDescriptor(Ns.DetermineComponentFrameRoot,"name");Is&&Is.configurable&&Object.defineProperty(Ns.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var $s=Ns.DetermineComponentFrameRoot(),Ks=$s[0],Ci=$s[1];if(Ks&&Ci){var ma=Ks.split(`
1460`),Sa=Ci.split(`
1461`);for(Is=Ns=0;Ns<ma.length&&!ma[Ns].includes("DetermineComponentFrameRoot");)Ns++;for(;Is<Sa.length&&!Sa[Is].includes("DetermineComponentFrameRoot");)Is++;if(Ns===ma.length||Is===Sa.length)for(Ns=ma.length-1,Is=Sa.length-1;1<=Ns&&0<=Is&&ma[Ns]!==Sa[Is];)Is--;for(;1<=Ns&&0<=Is;Ns--,Is--)if(ma[Ns]!==Sa[Is]){if(Ns!==1||Is!==1)do if(Ns--,Is--,0>Is||ma[Ns]!==Sa[Is]){var Aa=`
1462`+ma[Ns].replace(" at new "," at ");return vs.displayName&&Aa.includes("<anonymous>")&&(Aa=Aa.replace("<anonymous>",vs.displayName)),Aa}while(1<=Ns&&0<=Is);break}}}finally{Hs=!1,Error.prepareStackTrace=Ts}return(Ts=vs?vs.displayName||vs.name:"")?Na(Ts):""}function qs(vs,Ss){switch(vs.tag){case 26:case 27:case 5:return Na(vs.type);case 16:return Na("Lazy");case 13:return vs.child!==Ss&&Ss!==null?Na("Suspense Fallback"):Na("Suspense");case 19:return Na("SuspenseList");case 0:case 15:return zs(vs.type,!1);case 11:return zs(vs.type.render,!1);case 1:return zs(vs.type,!0);case 31:return Na("Activity");case 30:return Na("ViewTransition");default:return""}}function Xs(vs){try{var Ss="",Ts=null;do Ss+=qs(vs,Ts),Ts=vs,vs=vs.return;while(vs);return Ss}catch(Ns){return`
1463Error generating stack: `+Ns.message+`
1464`+Ns.stack}}var na=Object.prototype.hasOwnProperty,da=ds.unstable_scheduleCallback,xa=ds.unstable_cancelCallback,ka=ds.unstable_shouldYield,Ha=ds.unstable_requestPaint,La=ds.unstable_now,Wa=ds.unstable_getCurrentPriorityLevel,Ja=ds.unstable_ImmediatePriority,Za=ds.unstable_UserBlockingPriority,Xo=ds.unstable_NormalPriority,El=ds.unstable_LowPriority,Dl=ds.unstable_IdlePriority,_l=ds.log,ml=ds.unstable_setDisableYieldValue,il=null,Wo=null;function Lo(vs){if(typeof _l=="function"&&ml(vs),Wo&&typeof Wo.setStrictMode=="function")try{Wo.setStrictMode(il,vs)}catch{}}var Go=Math.clz32?Math.clz32:ba,$l=Math.log,pa=Math.LN2;function ba(vs){return vs>>>=0,vs===0?32:31-($l(vs)/pa|0)|0}var Ca=256,Ua=262144,Ba=4194304;function Qa(vs){var Ss=vs&42;if(Ss!==0)return Ss;switch(vs&-vs){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return vs&-vs;case 262144:case 524288:case 1048576:case 2097152:return vs&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return vs&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return vs}}function eo(vs,Ss,Ts){var Ns=vs.pendingLanes;if(Ns===0)return 0;var Is=0,$s=vs.suspendedLanes,Ks=vs.pingedLanes;vs=vs.warmLanes;var Ci=Ns&134217727;return Ci!==0?(Ns=Ci&~$s,Ns!==0?Is=Qa(Ns):(Ks&=Ci,Ks!==0?Is=Qa(Ks):Ts||(Ts=Ci&~vs,Ts!==0&&(Is=Qa(Ts))))):(Ci=Ns&~$s,Ci!==0?Is=Qa(Ci):Ks!==0?Is=Qa(Ks):Ts||(Ts=Ns&~vs,Ts!==0&&(Is=Qa(Ts)))),Is===0?0:Ss!==0&&Ss!==Is&&(Ss&$s)===0&&($s=Is&-Is,Ts=Ss&-Ss,$s>=Ts||$s===32&&(Ts&4194048)!==0)?Ss:Is}function ro(vs,Ss){return(vs.pendingLanes&~(vs.suspendedLanes&~vs.pingedLanes)&Ss)===0}function to(vs,Ss){(Ss&8)!==0&&(Ss|=Ss&32);var Ts=vs.entangledLanes;if(Ts!==0)for(vs=vs.entanglements,Ts&=Ss;0<Ts;){var Ns=31-Go(Ts),Is=1<<Ns;Ss|=vs[Ns],Ts&=~Is}return Ss}function lo(vs,Ss){switch(vs){case 1:case 2:case 4:case 8:case 64:return Ss+250;case 16:case 32: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 Ss+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function so(){var vs=Ba;return Ba<<=1,(Ba&62914560)===0&&(Ba=4194304),vs}function fo(vs){for(var Ss=[],Ts=0;31>Ts;Ts++)Ss.push(vs);return Ss}function ao(vs,Ss){vs.pendingLanes|=Ss,Ss!==268435456&&(vs.suspendedLanes=0,vs.pingedLanes=0,vs.warmLanes=0)}function No(vs,Ss,Ts,Ns,Is,$s){var Ks=vs.pendingLanes;vs.pendingLanes=Ts,vs.suspendedLanes=0,vs.pingedLanes=0,vs.warmLanes=0,vs.expiredLanes&=Ts,vs.entangledLanes&=Ts,vs.errorRecoveryDisabledLanes&=Ts,vs.shellSuspendCounter=0;var Ci=vs.entanglements,ma=vs.expirationTimes,Sa=vs.hiddenUpdates;for(Ts=Ks&~Ts;0<Ts;){var Aa=31-Go(Ts),Pa=1<<Aa;Ci[Aa]=0,ma[Aa]=-1;var va=Sa[Aa];if(va!==null)for(Sa[Aa]=null,Aa=0;Aa<va.length;Aa++){var Ta=va[Aa];Ta!==null&&(Ta.lane&=-536870913)}Ts&=~Pa}Ns!==0&&Do(vs,Ns,0),$s!==0&&Is===0&&vs.tag!==0&&(vs.suspendedLanes|=$s&~(Ks&~Ss))}function Do(vs,Ss,Ts){vs.pendingLanes|=Ss,vs.suspendedLanes&=~Ss;var Ns=31-Go(Ss);vs.entangledLanes|=Ss,vs.entanglements[Ns]=vs.entanglements[Ns]|1073741824|Ts&261930}function el(vs,Ss){var Ts=vs.entangledLanes|=Ss;for(vs=vs.entanglements;Ts;){var Ns=31-Go(Ts),Is=1<<Ns;Is&Ss|vs[Ns]&Ss&&(vs[Ns]|=Ss),Ts&=~Is}}function Oo(vs,Ss){var Ts=Ss&-Ss;return Ts=(Ts&42)!==0?1:To(Ts),(Ts&(vs.suspendedLanes|Ss))!==0?0:Ts}function To(vs){switch(vs){case 2:vs=1;break;case 8:vs=4;break;case 32:vs=16;break;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:vs=128;break;case 268435456:vs=134217728;break;default:vs=0}return vs}function pl(vs){return vs&=-vs,2<vs?8<vs?(vs&134217727)!==0?32:268435456:8:2}function vl(){var vs=Fa.p;return vs!==0?vs:(vs=window.event,vs===void 0?32:c0(vs.type))}function Bc(vs,Ss){var Ts=Fa.p;try{return Fa.p=vs,Ss()}finally{Fa.p=Ts}}var hl=Math.random().toString(36).slice(2),Yo="__reactFiber$"+hl,Jo="__reactProps$"+hl,wl="__reactContainer$"+hl,Pu="__reactEvents$"+hl,dc="__reactListeners$"+hl,Lu="__reactHandles$"+hl,hu="__reactResources$"+hl,fc="__reactMarker$"+hl,xo="__reactLoad$"+hl;function dl(vs){delete vs[Yo],delete vs[Jo],delete vs[dc],delete vs[Lu]}function gl(vs){var Ss;if(Ss=vs[Yo])return Ss;for(var Ts=vs.parentNode;Ts;){if(Ss=Ts[wl]||Ts[Yo]){if(Ts=Ss.alternate,Ss.child!==null||Ts!==null&&Ts.child!==null)for(vs=z1(vs);vs!==null;){if(Ts=vs[Yo])return Ts;vs=z1(vs)}return Ss}vs=Ts,Ts=vs.parentNode}return null}function Al(vs){if(vs=vs[Yo]||vs[wl]){var Ss=vs.tag;if(Ss===5||Ss===6||Ss===13||Ss===31||Ss===26||Ss===27||Ss===3)return vs}return null}function zc(vs){var Ss=vs.tag;if(Ss===5||Ss===26||Ss===27||Ss===6)return vs.stateNode;throw Error(xs(33))}function mc(vs){var Ss=vs[hu];return Ss||(Ss=vs[hu]={hoistableStyles:new Map,hoistableScripts:new Map}),Ss}function po(vs){vs[fc]=!0}function pc(vs){vs[xo]=void 0}var jd=new Set,hf={};function gu(vs,Ss){Fu(vs,Ss),Fu(vs+"Capture",Ss)}function Fu(vs,Ss){for(hf[vs]=Ss,vs=0;vs<Ss.length;vs++)jd.add(Ss[vs])}var R0=RegExp("^[: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]*$"),lg={},cg={};function j0(vs){return na.call(cg,vs)?!0:na.call(lg,vs)?!1:R0.test(vs)?cg[vs]=!0:(lg[vs]=!0,!1)}var Mo=!1;function ug(){var vs=Mo;return Mo=!1,vs}function gf(vs,Ss,Ts){if(j0(Ss))if(Ts===null)vs.removeAttribute(Ss);else{switch(typeof Ts){case"undefined":case"function":case"symbol":vs.removeAttribute(Ss);return;case"boolean":var Ns=Ss.toLowerCase().slice(0,5);if(Ns!=="data-"&&Ns!=="aria-"){vs.removeAttribute(Ss);return}}vs.setAttribute(Ss,Ts)}}function xf(vs,Ss,Ts){if(Ts===null)vs.removeAttribute(Ss);else{switch(typeof Ts){case"undefined":case"function":case"symbol":case"boolean":vs.removeAttribute(Ss);return}vs.setAttribute(Ss,Ts)}}function Cc(vs,Ss,Ts,Ns){if(Ns===null)vs.removeAttribute(Ts);else{switch(typeof Ns){case"undefined":case"function":case"symbol":case"boolean":vs.removeAttribute(Ts);return}vs.setAttributeNS(Ss,Ts,Ns)}}function zl(vs){switch(typeof vs){case"bigint":case"boolean":case"number":case"string":case"undefined":return vs;case"object":return vs;default:return""}}function dg(vs){var Ss=vs.type;return(vs=vs.nodeName)&&vs.toLowerCase()==="input"&&(Ss==="checkbox"||Ss==="radio")}function C0(vs,Ss,Ts){var Ns=Object.getOwnPropertyDescriptor(vs.constructor.prototype,Ss);if(!vs.hasOwnProperty(Ss)&&typeof Ns<"u"&&typeof Ns.get=="function"&&typeof Ns.set=="function"){var Is=Ns.get,$s=Ns.set;return Object.defineProperty(vs,Ss,{configurable:!0,get:function(){return Is.call(this)},set:function(Ks){Ts=""+Ks,$s.call(this,Ks)}}),Object.defineProperty(vs,Ss,{enumerable:Ns.enumerable}),{getValue:function(){return Ts},setValue:function(Ks){Ts=""+Ks},stopTracking:function(){vs._valueTracker=null,delete vs[Ss]}}}}function Pm(vs){if(!vs._valueTracker){var Ss=dg(vs)?"checked":"value";vs._valueTracker=C0(vs,Ss,""+vs[Ss])}}function fg(vs){if(!vs)return!1;var Ss=vs._valueTracker;if(!Ss)return!0;var Ts=Ss.getValue(),Ns="";return vs&&(Ns=dg(vs)?vs.checked?"true":"false":vs.value),vs=Ns,vs!==Ts?(Ss.setValue(vs),!0):!1}var T0=/[\n"\\]/g;function Zl(vs){return vs.replace(T0,function(Ss){return"\\"+Ss.charCodeAt(0).toString(16)+" "})}function Lm(vs,Ss,Ts,Ns,Is,$s,Ks,Ci){vs.name="",Ks!=null&&typeof Ks!="function"&&typeof Ks!="symbol"&&typeof Ks!="boolean"?vs.type=Ks:vs.removeAttribute("type"),Ss!=null?Ks==="number"?(Ss===0&&vs.value===""||vs.value!=Ss)&&(vs.value=""+zl(Ss)):vs.value!==""+zl(Ss)&&(vs.value=""+zl(Ss)):Ks!=="submit"&&Ks!=="reset"||vs.removeAttribute("value"),Ss!=null?Ks==="number"&&vs.value==Ss?Fm(vs,zl(vs.value)):Fm(vs,zl(Ss)):Ts!=null?Fm(vs,zl(Ts)):Ns!=null&&vs.removeAttribute("value"),Is==null&&$s!=null&&(vs.defaultChecked=!!$s),Is!=null&&(vs.checked=Is&&typeof Is!="function"&&typeof Is!="symbol"),Ci!=null&&typeof Ci!="function"&&typeof Ci!="symbol"&&typeof Ci!="boolean"?vs.name=""+zl(Ci):vs.removeAttribute("name")}function mg(vs,Ss,Ts,Ns,Is,$s,Ks,Ci){if($s!=null&&typeof $s!="function"&&typeof $s!="symbol"&&typeof $s!="boolean"&&(vs.type=$s),Ss!=null||Ts!=null){if(!($s!=="submit"&&$s!=="reset"||Ss!=null)){Pm(vs);return}Ts=Ts!=null?""+zl(Ts):"",Ss=Ss!=null?""+zl(Ss):Ts,Ci||Ss===vs.value||(vs.value=Ss),vs.defaultValue=Ss}Ns=Ns??Is,Ns=typeof Ns!="function"&&typeof Ns!="symbol"&&!!Ns,vs.checked=Ci?vs.checked:!!Ns,vs.defaultChecked=!!Ns,Ks!=null&&typeof Ks!="function"&&typeof Ks!="symbol"&&typeof Ks!="boolean"&&(vs.name=Ks),Pm(vs)}function Fm(vs,Ss){vs.defaultValue!==""+Ss&&(vs.defaultValue=""+Ss)}function Uu(vs,Ss,Ts,Ns){if(vs=vs.options,Ss){Ss={};for(var Is=0;Is<Ts.length;Is++)Ss["$"+Ts[Is]]=!0;for(Ts=0;Ts<vs.length;Ts++)Is=Ss.hasOwnProperty("$"+vs[Ts].value),vs[Ts].selected!==Is&&(vs[Ts].selected=Is),Is&&Ns&&(vs[Ts].defaultSelected=!0)}else{for(Ts=""+zl(Ts),Ss=null,Is=0;Is<vs.length;Is++){if(vs[Is].value===Ts){vs[Is].selected=!0,Ns&&(vs[Is].defaultSelected=!0);return}Ss!==null||vs[Is].disabled||(Ss=vs[Is])}Ss!==null&&(Ss.selected=!0)}}function pg(vs,Ss,Ts){if(Ss!=null&&(Ss=""+zl(Ss),Ss!==vs.value&&(vs.value=Ss),Ts==null)){vs.defaultValue!==Ss&&(vs.defaultValue=Ss);return}vs.defaultValue=Ts!=null?""+zl(Ts):""}function hg(vs,Ss,Ts,Ns){if(Ss==null){if(Ns!=null){if(Ts!=null)throw Error(xs(92));if(qa(Ns)){if(1<Ns.length)throw Error(xs(93));Ns=Ns[0]}Ts=Ns}Ts==null&&(Ts=""),Ss=Ts}Ts=zl(Ss),vs.defaultValue=Ts,Ns=vs.textContent,Ns===Ts&&Ns!==""&&Ns!==null&&(vs.value=Ns),Pm(vs)}function Bu(vs,Ss){if(Ss){var Ts=vs.firstChild;if(Ts&&Ts===vs.lastChild&&Ts.nodeType===3){Ts.nodeValue=Ss;return}}vs.textContent=Ss}var _0=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function gg(vs,Ss,Ts){var Ns=Ss.indexOf("--")===0;Ts==null||typeof Ts=="boolean"||Ts===""?Ns?vs.setProperty(Ss,""):Ss==="float"?vs.cssFloat="":vs[Ss]="":Ns?vs.setProperty(Ss,Ts):typeof Ts!="number"||Ts===0||_0.has(Ss)?Ss==="float"?vs.cssFloat=Ts:vs[Ss]=(""+Ts).trim():vs[Ss]=Ts+"px"}function xg(vs,Ss,Ts){if(Ss!=null&&typeof Ss!="object")throw Error(xs(62));if(vs=vs.style,Ts!=null){for(var Ns in Ts)!Ts.hasOwnProperty(Ns)||Ss!=null&&Ss.hasOwnProperty(Ns)||(Ns.indexOf("--")===0?vs.setProperty(Ns,""):Ns==="float"?vs.cssFloat="":vs[Ns]="",Mo=!0);for(var Is in Ss)Ns=Ss[Is],Ss.hasOwnProperty(Is)&&Ts[Is]!==Ns&&(gg(vs,Is,Ns),Mo=!0)}else for(var $s in Ss)Ss.hasOwnProperty($s)&&gg(vs,$s,Ss[$s])}function Um(vs){if(vs.indexOf("-")===-1)return!1;switch(vs){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 A0=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
1464-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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),k0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yf(vs){return k0.test(""+vs)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":vs}function hc(){}var Bm=null;function zm(vs){return vs=vs.target||vs.srcElement||window,vs.correspondingUseElement&&(vs=vs.correspondingUseElement),vs.nodeType===3?vs.parentNode:vs}var zu=null,Hu=null;function yg(vs){var Ss=Al(vs);if(Ss&&(vs=Ss.stateNode)){var Ts=vs[Jo]||null;e:switch(vs=Ss.stateNode,Ss.type){case"input":if(Lm(vs,Ts.value,Ts.defaultValue,Ts.defaultValue,Ts.checked,Ts.defaultChecked,Ts.type,Ts.name),Ss=Ts.name,Ts.type==="radio"&&Ss!=null){for(Ts=vs;Ts.parentNode;)Ts=Ts.parentNode;for(Ts=Ts.querySelectorAll('input[name="'+Zl(""+Ss)+'"][type="radio"]'),Ss=0;Ss<Ts.length;Ss++){var Ns=Ts[Ss];if(Ns!==vs&&Ns.form===vs.form){var Is=Ns[Jo]||null;if(!Is)throw Error(xs(90));Lm(Ns,Is.value,Is.defaultValue,Is.defaultValue,Is.checked,Is.defaultChecked,Is.type,Is.name)}}for(Ss=0;Ss<Ts.length;Ss++)Ns=Ts[Ss],Ns.form===vs.form&&fg(Ns)}break e;case"textarea":pg(vs,Ts.value,Ts.defaultValue);break e;case"select":Ss=Ts.value,Ss!=null&&Uu(vs,!!Ts.multiple,Ss,!1)}}}var Hm=!1;function bg(vs,Ss,Ts){if(Hm)return vs(Ss,Ts);Hm=!0;try{var Ns=vs(Ss);return Ns}finally{if(Hm=!1,(zu!==null||Hu!==null)&&(ym(),zu&&(Ss=zu,vs=Hu,Hu=zu=null,yg(Ss),vs)))for(Ss=0;Ss<vs.length;Ss++)yg(vs[Ss])}}function Cd(vs,Ss){var Ts=vs.stateNode;if(Ts===null)return null;var Ns=Ts[Jo]||null;if(Ns===null)return null;Ts=Ns[Ss];e:switch(Ss){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Ns=!Ns.disabled)||(vs=vs.type,Ns=!(vs==="button"||vs==="input"||vs==="select"||vs==="textarea")),vs=!Ns;break e;default:vs=!1}if(vs)return null;if(Ts&&typeof Ts!="function")throw Error(xs(231,Ss,typeof Ts));return Ts}var Tc=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qm=!1;if(Tc)try{var Td={};Object.defineProperty(Td,"passive",{get:function(){qm=!0}}),window.addEventListener("test",Td,Td),window.removeEventListener("test",Td,Td)}catch{qm=!1}var Hc=null,Vm=null,bf=null;function Eg(){if(bf)return bf;var vs,Ss=Vm,Ts=Ss.length,Ns,Is="value"in Hc?Hc.value:Hc.textContent,$s=Is.length;for(vs=0;vs<Ts&&Ss[vs]===Is[vs];vs++);var Ks=Ts-vs;for(Ns=1;Ns<=Ks&&Ss[Ts-Ns]===Is[$s-Ns];Ns++);return bf=Is.slice(vs,1<Ns?1-Ns:void 0)}function Ef(vs){var Ss=vs.keyCode;
vendor: 5,776 bytes, line 1464
1464return"charCode"in vs?(vs=vs.charCode,vs===0&&Ss===13&&(vs=13)):vs=Ss,vs===10&&(vs=13),32<=vs||vs===13?vs:0}function vf(){return!0}function vg(){return!1}function Nl(vs){function Ss(Ts,Ns,Is,$s,Ks){this._reactName=Ts,this._targetInst=Is,this.type=Ns,this.nativeEvent=$s,this.target=Ks,this.currentTarget=null;for(var Ci in vs)vs.hasOwnProperty(Ci)&&(Ts=vs[Ci],this[Ci]=Ts?Ts($s):$s[Ci]);return this.isDefaultPrevented=($s.defaultPrevented!=null?$s.defaultPrevented:$s.returnValue===!1)?vf:vg,this.isPropagationStopped=vg,this}return Zs(Ss.prototype,{preventDefault:function(){this.defaultPrevented=!0;var Ts=this.nativeEvent;Ts&&(Ts.preventDefault?Ts.preventDefault():typeof Ts.returnValue!="unknown"&&(Ts.returnValue=!1),this.isDefaultPrevented=vf)},stopPropagation:function(){var Ts=this.nativeEvent;Ts&&(Ts.stopPropagation?Ts.stopPropagation():typeof Ts.cancelBubble!="unknown"&&(Ts.cancelBubble=!0),this.isPropagationStopped=vf)},persist:function(){},isPersistent:vf}),Ss}var qc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(vs){return vs.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wf=Nl(qc),_d=Zs({},qc,{view:0,detail:0}),N0=Nl(_d),Wm,Gm,Ad,Sf=Zs({},_d,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Km,button:0,buttons:0,relatedTarget:function(vs){return vs.relatedTarget===void 0?vs.fromElement===vs.srcElement?vs.toElement:vs.fromElement:vs.relatedTarget},movementX:function(vs){return"movementX"in vs?vs.movementX:(vs!==Ad&&(Ad&&vs.type==="mousemove"?(Wm=vs.screenX-Ad.screenX,Gm=vs.screenY-Ad.screenY):Gm=Wm=0,Ad=vs),Wm)},movementY:function(vs){return"movementY"in vs?vs.movementY:Gm}}),wg=Nl(Sf),O0=Zs({},Sf,{dataTransfer:0}),M0=Nl(O0),I0=Zs({},_d,{relatedTarget:0}),Ym=Nl(I0),D0=Zs({},qc,{animationName:0,elapsedTime:0,pseudoElement:0}),$0=Nl(D0),P0=Zs({},qc,{clipboardData:function(vs){return"clipboardData"in vs?vs.clipboardData:window.clipboardData}}),L0=Nl(P0),F0=Zs({},qc,{data:0}),Sg=Nl(F0),U0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},B0={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"},z0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function H0(vs){var Ss=this.nativeEvent;return Ss.getModifierState?Ss.getModifierState(vs):(vs=z0[vs])?!!Ss[vs]:!1}function Km(){return H0}var q0=Zs({},_d,{key:function(vs){if(vs.key){var Ss=U0[vs.key]||vs.key;if(Ss!=="Unidentified")return Ss}return vs.type==="keypress"?(vs=Ef(vs),vs===13?"Enter":String.fromCharCode(vs)):vs.type==="keydown"||vs.type==="keyup"?B0[vs.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Km,charCode:function(vs){return vs.type==="keypress"?Ef(vs):0},keyCode:function(vs){return vs.type==="keydown"||vs.type==="keyup"?vs.keyCode:0},which:function(vs){return vs.type==="keypress"?Ef(vs):vs.type==="keydown"||vs.type==="keyup"?vs.keyCode:0}}),V0=Nl(q0),W0=Zs({},Sf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rg=Nl(W0),G0=Zs({},qc,{submitter:0}),Y0=Nl(G0),K0=Zs({},_d,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Km}),Z0=Nl(K0),J0=Zs({},qc,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q0=Nl(J0),X0=Zs({},Sf,{deltaX:function(vs){return"deltaX"in vs?vs.deltaX:"wheelDeltaX"in vs?-vs.wheelDeltaX:0},deltaY:function(vs){return"deltaY"in vs?vs.deltaY:"wheelDeltaY"in vs?-vs.wheelDeltaY:"wheelDelta"in vs?-vs.wheelDelta:0},deltaZ:0,deltaMode:0}),eb=Nl(X0),tb=Zs({},qc,{newState:0,oldState:0,source:0}),nb=Nl(tb),rb=[9,13,27,32],Zm=Tc&&"CompositionEvent"in window,kd=null;Tc&&"documentMode"in document&&(kd=document.documentMode);var sb=Tc&&"TextEvent"in window&&!kd,jg=Tc&&(!Zm||kd&&8<kd&&11>=kd),Cg=" ",Tg=!1;function _g(vs,Ss){switch(vs){case"keyup":return rb.indexOf(Ss.keyCode)!==-1;case"keydown":return Ss.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ag(vs){return vs=vs.detail,typeof vs=="object"&&"data"in vs?vs.data:null}var qu=!1;function ib(vs,Ss){switch(vs){case"compositionend":return Ag(Ss);case"keypress":return Ss.which!==32?null:(Tg=!0,Cg);case"textInput":return vs=Ss.data,vs===Cg&&Tg?null:vs;default:return null}}function ab(vs,Ss){if(qu)return vs==="compositionend"||!Zm&&_g(vs,Ss)?(vs=Eg(),bf=Vm=Hc=null,qu=!1,vs):null;switch(vs){case"paste":return null;case"keypress":if(!(Ss.ctrlKey||Ss.altKey||Ss.metaKey)||Ss.ctrlKey&&Ss.altKey){if(Ss.char&&1<Ss.char.length)return Ss.char;if(Ss.which)return String.fromCharCode(Ss.which)}return null;case"compositionend":return jg&&Ss.locale!=="ko"?null:Ss.data;default:return null}}var ob={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 kg(vs){var Ss=vs&&vs.nodeName&&vs.nodeName.toLowerCase();return Ss==="input"?!!ob[vs.type]:Ss==="textarea"}function Ng(vs,Ss,Ts,Ns){zu?Hu?Hu.push(Ns):Hu=[Ns]:zu=Ns,Ss=Rm(Ss,"onChange"),0<Ss.length&&(Ts=new wf("onChange","change",null,Ts,Ns),vs.push({event:Ts,listeners:Ss}))}var Nd=null,Od=null;function lb(vs){y1(vs,0)}function Rf(vs){var Ss=zc(vs);if(fg(Ss))return vs}function Og(vs,Ss){if(vs==="change")return Ss}
vendor: 43,773 bytes, line 1464
1464var Mg=!1;if(Tc){var Jm;if(Tc){var Qm="oninput"in document;if(!Qm){var Ig=document.createElement("div");Ig.setAttribute("oninput","return;"),Qm=typeof Ig.oninput=="function"}Jm=Qm}else Jm=!1;Mg=Jm&&(!document.documentMode||9<document.documentMode)}function Dg(){Nd&&(Nd.detachEvent("onpropertychange",$g),Od=Nd=null)}function $g(vs){if(vs.propertyName==="value"&&Rf(Od)){var Ss=[];Ng(Ss,Od,vs,zm(vs)),bg(lb,Ss)}}function cb(vs,Ss,Ts){vs==="focusin"?(Dg(),Nd=Ss,Od=Ts,Nd.attachEvent("onpropertychange",$g)):vs==="focusout"&&Dg()}function ub(vs){if(vs==="selectionchange"||vs==="keyup"||vs==="keydown")return Rf(Od)}function db(vs,Ss){if(vs==="click")return Rf(Ss)}function fb(vs,Ss){if(vs==="input"||vs==="change")return Rf(Ss)}function mb(vs,Ss){return vs===Ss&&(vs!==0||1/vs===1/Ss)||vs!==vs&&Ss!==Ss}var Hl=typeof Object.is=="function"?Object.is:mb;function Md(vs,Ss){if(Hl(vs,Ss))return!0;if(typeof vs!="object"||vs===null||typeof Ss!="object"||Ss===null)return!1;var Ts=Object.keys(vs),Ns=Object.keys(Ss);if(Ts.length!==Ns.length)return!1;for(Ns=0;Ns<Ts.length;Ns++){var Is=Ts[Ns];if(!na.call(Ss,Is)||!Hl(vs[Is],Ss[Is]))return!1}return!0}function Xm(vs){if(vs=vs||(typeof document<"u"?document:void 0),typeof vs>"u")return null;try{return vs.activeElement||vs.body}catch{return vs.body}}function Pg(vs){for(;vs&&vs.firstChild;)vs=vs.firstChild;return vs}function Lg(vs,Ss){var Ts=Pg(vs);vs=0;for(var Ns;Ts;){if(Ts.nodeType===3){if(Ns=vs+Ts.textContent.length,vs<=Ss&&Ns>=Ss)return{node:Ts,offset:Ss-vs};vs=Ns}e:{for(;Ts;){if(Ts.nextSibling){Ts=Ts.nextSibling;break e}Ts=Ts.parentNode}Ts=void 0}Ts=Pg(Ts)}}function Fg(vs,Ss){return vs&&Ss?vs===Ss?!0:vs&&vs.nodeType===3?!1:Ss&&Ss.nodeType===3?Fg(vs,Ss.parentNode):"contains"in vs?vs.contains(Ss):vs.compareDocumentPosition?!!(vs.compareDocumentPosition(Ss)&16):!1:!1}function Ug(vs){vs=vs!=null&&vs.ownerDocument!=null&&vs.ownerDocument.defaultView!=null?vs.ownerDocument.defaultView:window;for(var Ss=Xm(vs.document);Ss instanceof vs.HTMLIFrameElement;){try{var Ts=typeof Ss.contentWindow.location.href=="string"}catch{Ts=!1}if(Ts)vs=Ss.contentWindow;else break;Ss=Xm(vs.document)}return Ss}function ep(vs){var Ss=vs&&vs.nodeName&&vs.nodeName.toLowerCase();return Ss&&(Ss==="input"&&(vs.type==="text"||vs.type==="search"||vs.type==="tel"||vs.type==="url"||vs.type==="password")||Ss==="textarea"||vs.contentEditable==="true")}var pb=Tc&&"documentMode"in document&&11>=document.documentMode,Vu=null,tp=null,Id=null,np=!1;function Bg(vs,Ss,Ts){var Ns=Ts.window===Ts?Ts.document:Ts.nodeType===9?Ts:Ts.ownerDocument;np||Vu==null||Vu!==Xm(Ns)||(Ns=Vu,"selectionStart"in Ns&&ep(Ns)?Ns={start:Ns.selectionStart,end:Ns.selectionEnd}:(Ns=(Ns.ownerDocument&&Ns.ownerDocument.defaultView||window).getSelection(),Ns={anchorNode:Ns.anchorNode,anchorOffset:Ns.anchorOffset,focusNode:Ns.focusNode,focusOffset:Ns.focusOffset}),Id&&Md(Id,Ns)||(Id=Ns,Ns=Rm(tp,"onSelect"),0<Ns.length&&(Ss=new wf("onSelect","select",null,Ss,Ts),vs.push({event:Ss,listeners:Ns}),Ss.target=Vu)))}function xu(vs,Ss){var Ts={};return Ts[vs.toLowerCase()]=Ss.toLowerCase(),Ts["Webkit"+vs]="webkit"+Ss,Ts["Moz"+vs]="moz"+Ss,Ts}var Wu={animationend:xu("Animation","AnimationEnd"),animationiteration:xu("Animation","AnimationIteration"),animationstart:xu("Animation","AnimationStart"),transitionrun:xu("Transition","TransitionRun"),transitionstart:xu("Transition","TransitionStart"),transitioncancel:xu("Transition","TransitionCancel"),transitionend:xu("Transition","TransitionEnd")},rp={},zg={};Tc&&(zg=document.createElement("div").style,"AnimationEvent"in window||(delete Wu.animationend.animation,delete Wu.animationiteration.animation,delete Wu.animationstart.animation),"TransitionEvent"in window||delete Wu.transitionend.transition);function yu(vs){if(rp[vs])return rp[vs];if(!Wu[vs])return vs;var Ss=Wu[vs],Ts;for(Ts in Ss)if(Ss.hasOwnProperty(Ts)&&Ts in zg)return rp[vs]=Ss[Ts];return vs}var Hg=yu("animationend"),qg=yu("animationiteration"),Vg=yu("animationstart"),hb=yu("transitionrun"),gb=yu("transitionstart"),xb=yu("transitioncancel"),Wg=yu("transitionend"),Gg=new Map,sp="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");sp.push("scrollEnd");function ic(vs,Ss){Gg.set(vs,Ss),gu(Ss,[vs])}var yb=0;function Ac(vs,Ss){if(vs.name!=null&&vs.name!=="auto")return vs.name;if(Ss.autoName!==null)return Ss.autoName;vs=cc.identifierPrefix;var Ts=yb++;return vs="_"+vs+"t_"+Ts.toString(32)+"_",Ss.autoName=vs}function Yg(vs){if(vs==null||typeof vs=="string")return vs;var Ss=null,Ts=fd;if(Ts!==null)for(var Ns=0;Ns<Ts.length;Ns++){var Is=vs[Ts[Ns]];if(Is!=null){if(Is==="none")return"none";Ss=Ss==null?Is:Ss+(" "+Is)}}return Ss??vs.default}function kc(vs,Ss){return vs=Yg(vs),Ss=Yg(Ss),Ss==null?vs==="auto"?null:vs:Ss==="auto"?null:Ss}var jf=typeof reportError=="function"?reportError:function(vs){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Ss=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof vs=="object"&&vs!==null&&typeof vs.message=="string"?String(vs.message):String(vs),error:vs});if(!window.dispatchEvent(Ss))return}else if(typeof process$1=="object"&&typeof process$1.emit=="function"){process$1.emit("uncaughtException",vs);return}console.error(vs)},Jl=[],Gu=0,ip=0;function Cf(){for(var vs=Gu,Ss=ip=Gu=0;Ss<vs;){var Ts=Jl[Ss];Jl[Ss++]=null;var Ns=Jl[Ss];Jl[Ss++]=null;var Is=Jl[Ss];Jl[Ss++]=null;var $s=Jl[Ss];if(Jl[Ss++]=null,Ns!==null&&Is!==null){var Ks=Ns.pending;Ks===null?Is.next=Is:(Is.next=Ks.next,Ks.next=Is),Ns.pending=Is}$s!==0&&Kg(Ts,Is,$s)}}function Tf(vs,Ss,Ts,Ns){Jl[Gu++]=vs,Jl[Gu++]=Ss,Jl[Gu++]=Ts,Jl[Gu++]=Ns,ip|=Ns,vs.lanes|=Ns,vs=vs.alternate,vs!==null&&(vs.lanes|=Ns)}function ap(vs,Ss,Ts,Ns){return Tf(vs,Ss,Ts,Ns),_f(vs)}function bu(vs,Ss){return Tf(vs,null,null,Ss),_f(vs)}function Kg(vs,Ss,Ts){vs.lanes|=Ts;var Ns=vs.alternate;Ns!==null&&(Ns.lanes|=Ts);for(var Is=!1,$s=vs.return;$s!==null;)$s.childLanes|=Ts,Ns=$s.alternate,Ns!==null&&(Ns.childLanes|=Ts),$s.tag===22&&(vs=$s.stateNode,vs===null||vs._visibility&1||(Is=!0)),vs=$s,$s=$s.return;return vs.tag===3?($s=vs.stateNode,Is&&Ss!==null&&(Is=31-Go(Ts),vs=$s.hiddenUpdates,Ns=vs[Is],Ns===null?vs[Is]=[Ss]:Ns.push(Ss),Ss.lane=Ts|536870912),$s):null}function _f(vs){if(50<nf)throw nf=0,xm=null,Error(xs(185));for(var Ss=vs.return;Ss!==null;)vs=Ss,Ss=vs.return;return vs.tag===3?vs.stateNode:null}var Yu={};function bb(vs,Ss,Ts,Ns){this.tag=vs,this.key=Ts,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=Ss,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Ns,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pl(vs,Ss,Ts,Ns){return new bb(vs,Ss,Ts,Ns)}function op(vs){return vs=vs.prototype,!(!vs||!vs.isReactComponent)}function Nc(vs,Ss){var Ts=vs.alternate;return Ts===null?(Ts=Pl(vs.tag,Ss,vs.key,vs.mode),Ts.elementType=vs.elementType,Ts.type=vs.type,Ts.stateNode=vs.stateNode,Ts.alternate=vs,vs.alternate=Ts):(Ts.pendingProps=Ss,Ts.type=vs.type,Ts.flags=0,Ts.subtreeFlags=0,Ts.deletions=null),Ts.flags=vs.flags&1206910976,Ts.childLanes=vs.childLanes,Ts.lanes=vs.lanes,Ts.child=vs.child,Ts.memoizedProps=vs.memoizedProps,Ts.memoizedState=vs.memoizedState,Ts.updateQueue=vs.updateQueue,Ss=vs.dependencies,Ts.dependencies=Ss===null?null:{lanes:Ss.lanes,firstContext:Ss.firstContext},Ts.sibling=vs.sibling,Ts.index=vs.index,Ts.ref=vs.ref,Ts.refCleanup=vs.refCleanup,Ts}function Zg(vs,Ss){vs.flags&=1206910978;var Ts=vs.alternate;return Ts===null?(vs.childLanes=0,vs.lanes=Ss,vs.child=null,vs.subtreeFlags=0,vs.memoizedProps=null,vs.memoizedState=null,vs.updateQueue=null,vs.dependencies=null,vs.stateNode=null):(vs.childLanes=Ts.childLanes,vs.lanes=Ts.lanes,vs.child=Ts.child,vs.subtreeFlags=0,vs.deletions=null,vs.memoizedProps=Ts.memoizedProps,vs.memoizedState=Ts.memoizedState,vs.updateQueue=Ts.updateQueue,vs.type=Ts.type,Ss=Ts.dependencies,vs.dependencies=Ss===null?null:{lanes:Ss.lanes,firstContext:Ss.firstContext}),vs}function Af(vs,Ss,Ts,Ns,Is,$s){var Ks=0;if(Ns=vs,typeof Ns=="function")op(Ns)&&(Ks=1);else if(typeof Ns=="string")Ks=YE(vs,Ts,uo.current)?26:vs==="html"||vs==="head"||vs==="body"?27:5;else e:switch(Ns){case Ia:return vs=Pl(31,Ts,Ss,Is),vs.elementType=Ia,vs.lanes=$s,vs;case ia:return Eu(Ts.children,Is,$s,Ss);case ca:Ks=8,Is|=24;break;case ha:return vs=Pl(12,Ts,Ss,Is|2),vs.elementType=ha,vs.lanes=$s,vs;case fa:return vs=Pl(13,Ts,Ss,Is),vs.elementType=fa,vs.lanes=$s,vs;case ua:return vs=Pl(19,Ts,Ss,Is),vs.elementType=ua,vs.lanes=$s,vs;case $a:case sa:return vs=Is|32,vs=Pl(30,Ts,Ss,vs),vs.elementType=sa,vs.lanes=$s,vs.stateNode={autoName:null,paired:null,clones:null,ref:null},vs;default:if(typeof Ns=="object"&&Ns!==null)switch(Ns.$$typeof){case ta:Ks=10;break e;case ea:Ks=9;break e;case aa:Ks=11;break e;case Ea:Ks=14;break e;case ra:Ks=16,Ns=null;break e}Ks=29,Ts=Error(xs(130,vs===null?"null":typeof vs,"")),Ns=null}return Ss=Pl(Ks,Ts,Ss,Is),Ss.elementType=vs,Ss.type=Ns,Ss.lanes=$s,Ss}function Eu(vs,Ss,Ts,Ns){return vs=Pl(7,vs,Ns,Ss),vs.lanes=Ts,vs}function lp(vs,Ss,Ts){return vs=Pl(6,vs,null,Ss),vs.lanes=Ts,vs}function Jg(vs){var Ss=Pl(18,null,null,0);return Ss.stateNode=vs,Ss}function cp(vs,Ss,Ts){return Ss=Pl(4,vs.children!==null?vs.children:[],vs.key,Ss),Ss.lanes=Ts,Ss.stateNode={containerInfo:vs.containerInfo,pendingChildren:null,implementation:vs.implementation},Ss}var Qg=new WeakMap;function Ql(vs,Ss){if(typeof vs=="object"&&vs!==null){var Ts=Qg.get(vs);return Ts!==void 0?Ts:(Ss={value:vs,source:Ss,stack:Xs(Ss)},Qg.set(vs,Ss),Ss)}return{value:vs,source:Ss,stack:Xs(Ss)}}var Ku=[],Zu=0,kf=null,Dd=0,Xl=[],ec=0,Vc=null,gc=1,xc="";function Oc(vs,Ss){Ku[Zu++]=Dd,Ku[Zu++]=kf,kf=vs,Dd=Ss}function Xg(vs,Ss,Ts){Xl[ec++]=gc,Xl[ec++]=xc,Xl[ec++]=Vc,Vc=vs;var Ns=gc;vs=xc;var Is=32-Go(Ns)-1;Ns&=~(1<<Is),Ts+=1;var $s=32-Go(Ss)+Is;if(30<$s){var Ks=Is-Is%5;$s=(Ns&(1<<Ks)-1).toString(32),Ns>>=Ks,Is-=Ks,gc=1<<32-Go(Ss)+Is|Ts<<Is|Ns,xc=$s+vs}else gc=1<<$s|Ts<<Is|Ns,xc=vs}function Nf(vs){vs.return!==null&&(Oc(vs,1),Xg(vs,1,0))}function up(vs){for(;vs===kf;)kf=Ku[--Zu],Ku[Zu]=null,Dd=Ku[--Zu],Ku[Zu]=null;for(;vs===Vc;)Vc=Xl[--ec],Xl[ec]=null,xc=Xl[--ec],Xl[ec]=null,gc=Xl[--ec],Xl[ec]=null}function ex(vs,Ss){Xl[ec++]=gc,Xl[ec++]=xc,Xl[ec++]=Vc,gc=Ss.id,xc=Ss.overflow,Vc=vs}var xl=null,qo=null,yo=!1,Wc=null,tc=!1,dp=Error(xs(519));function Gc(vs){var Ss=Error(xs(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $d(Ql(Ss,vs)),dp}function tx(vs){var Ss=vs.stateNode,Ts=vs.type,Ns=vs.memoizedProps;switch(Ss[Yo]=vs,Ss[Jo]=Ns,Ts){case"dialog":wo("cancel",Ss),wo("close",Ss);break;case"iframe":case"object":case"embed":wo("load",Ss);break;case"video":case"audio":for(Ts=0;Ts<sf.length;Ts++)wo(sf[Ts],Ss);break;case"source":wo("error",Ss);break;case"img":case"image":case"link":wo("error",Ss),wo("load",Ss);break;case"details":wo("toggle",Ss);break;case"input":wo("invalid",Ss),mg(Ss,Ns.value,Ns.defaultValue,Ns.checked,Ns.defaultChecked,Ns.type,Ns.name,!0);break;case"select":wo("invalid",Ss);break;case"textarea":wo("invalid",Ss),hg(Ss,Ns.value,Ns.defaultValue,Ns.children)}Ts=Ns.children,typeof Ts!="string"&&typeof Ts!="number"&&typeof Ts!="bigint"||Ss.textContent===""+Ts||Ns.suppressHydrationWarning===!0||w1(Ss.textContent,Ts)?(Ns.popover!=null&&(wo("beforetoggle",Ss),wo("toggle",Ss)),Ns.onScroll!=null&&wo("scroll",Ss),Ns.onScrollEnd!=null&&wo("scrollend",Ss),Ns.onClick!=null&&(Ss.onclick=hc),Ss=!0):Ss=!1,Ss||Gc(vs,!0)}function Of(vs){for(xl=vs.return;xl;)switch(xl.tag){case 5:case 31:case 13:tc=!1;return;case 27:case 3:tc=!0;return;default:xl=xl.return}}function Ju(vs){if(vs!==xl)return!1;if(!yo)return Of(vs),yo=!0,!1;var Ss=vs.tag,Ts;if((Ts=Ss!==3&&Ss!==27)&&((Ts=Ss===5)&&(Ts=vs.type,Ts=!(Ts!=="form"&&Ts!=="button")||zh(vs.type,vs.memoizedProps)),Ts=!Ts),Ts&&qo&&Gc(vs),Of(vs),Ss===13){if(vs=vs.memoizedState,vs=vs!==null?vs.dehydrated:null,!vs)throw Error(xs(317));qo=B1(vs)}else if(Ss===31){if(vs=vs.memoizedState,vs=vs!==null?vs.dehydrated:null,!vs)throw Error(xs(317));qo=B1(vs)}else Ss===27?(Ss=qo,cu(vs.type)?(vs=Jh,Jh=null,qo=vs):qo=Ss):qo=xl?rc(vs.stateNode.nextSibling):null;return!0}function vu(){qo=xl=null,yo=!1}function fp(){var vs=Wc;return vs!==null&&(Ul===null?Ul=vs:Ul.push.apply(Ul,vs),Wc=null),vs}function $d(vs){Wc===null?Wc=[vs]:Wc.push(vs)}var mp=bo(null),wu=null,Mc=null;function Yc(vs,Ss,Ts){Va(mp,Ss._currentValue),Ss._currentValue=Ts}function Ic(vs){vs._currentValue=mp.current,oo(mp)}function Mf(vs,Ss,Ts){for(;vs!==null;){var Ns=vs.alternate;if((vs.childLanes&Ss)!==Ss?(vs.childLanes|=Ss,Ns!==null&&(Ns.childLanes|=Ss)):Ns!==null&&(Ns.childLanes&Ss)!==Ss&&(Ns.childLanes|=Ss),vs===Ts)break;vs=vs.return}}function pp(vs,Ss,Ts,Ns){var Is=vs.child;for(Is!==null&&(Is.return=vs);Is!==null;){var $s=Is.dependencies;if($s!==null){var Ks=Is.child;$s=$s.firstContext;e:for(;$s!==null;){var Ci=$s;$s=Is;for(var ma=0;ma<Ss.length;ma++)if(Ci.context===Ss[ma]){$s.lanes|=Ts,Ci=$s.alternate,Ci!==null&&(Ci.lanes|=Ts),Mf($s.return,Ts,vs),Ns||(Ks=null);break e}$s=Ci.next}}else if(Is.tag===18){if(Ks=Is.return,Ks===null)throw Error(xs(341));Ks.lanes|=Ts,$s=Ks.alternate,$s!==null&&($s.lanes|=Ts),Mf(Ks,Ts,vs),Ks=null}else Is.tag===13&&Is.memoizedState!==null&&Is.memoizedState.dehydrated===null?(Is.lanes|=Ts,Ks=Is.alternate,Ks!==null&&(Ks.lanes|=Ts),Mf(Is.return,Ts,vs),Ks=Is.child,Ks=Ks!==null?Ks.sibling:null):Ks=Is.child;if(Ks!==null)Ks.return=Is;else for(Ks=Is;Ks!==null;){if(Ks===vs){Ks=null;break}if(Is=Ks.sibling,Is!==null){Is.return=Ks.return,Ks=Is;break}Ks=Ks.return}Is=Ks}}function Su(vs,Ss,Ts,Ns){vs=null;for(var Is=Ss,$s=!1;Is!==null;){if(!$s){if((Is.flags&524288)!==0)$s=!0;else if((Is.flags&262144)!==0)break}if(Is.tag===10){var Ks=Is.alternate;if(Ks===null)throw Error(xs(387));if(Ks=Ks.memoizedProps,Ks!==null){var Ci=Is.type;Hl(Is.pendingProps.value,Ks.value)||(vs!==null?vs.push(Ci):vs=[Ci])}}else if(Is===Zo.current){if(Ks=Is.alternate,Ks===null)throw Error(xs(387));Ks.memoizedState.memoizedState!==Is.memoizedState.memoizedState&&(vs!==null?vs.push(wd):vs=[wd])}Is=Is.return}return vs!==null&&pp(Ss,vs,Ts,Ns),Ss.flags|=262144,vs!==null}function If(vs){for(vs=vs.firstContext;vs!==null;){if(!Hl(vs.context._currentValue,vs.memoizedValue))return!0;vs=vs.next}return!1}function Ru(vs){wu=vs,Mc=null,vs=vs.dependencies,vs!==null&&(vs.firstContext=null)}function Sl(vs){return nx(wu,vs)}function Df(vs,Ss){return wu===null&&Ru(vs),nx(vs,Ss)}function nx(vs,Ss){var Ts=Ss._currentValue;if(Ss={context:Ss,memoizedValue:Ts,next:null},Mc===null){if(vs===null)throw Error(xs(308));Mc=Ss,vs.dependencies={lanes:0,firstContext:Ss},vs.flags|=524288}else Mc=Mc.next=Ss;return Ts}var Eb=typeof AbortController<"u"?AbortController:function(){var vs=[],Ss=this.signal={aborted:!1,addEventListener:function(Ts,Ns){vs.push(Ns)}};this.abort=function(){Ss.aborted=!0,vs.forEach(function(Ts){return Ts()})}},vb=ds.unstable_scheduleCallback,wb=ds.unstable_NormalPriority,ol={$$typeof:ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hp(){return{controller:new Eb,data:new Map,refCount:0}}function Pd(vs){vs.refCount--,vs.refCount===0&&vb(wb,function(){vs.controller.abort()})}function rx(vs,Ss){if((vs.pendingLanes&4194048)!==0){var Ts=vs.transitionTypes;for(Ts===null&&(Ts=vs.transitionTypes=[]),vs=0;vs<Ss.length;vs++){var Ns=Ss[vs];Ts.indexOf(Ns)===-1&&Ts.push(Ns)}}}var Ld=null;function Sb(vs){var Ss=vs.transitionTypes;return vs.transitionTypes=null,Ss}var Fd=null,gp=0,ju=0,Qu=null;function Rb(vs,Ss){if(Fd===null){var Ts=Fd=[];gp=0,ju=Mh(),Qu={status:"pending",value:void 0,then:function(Ns){Ts.push(Ns)}}}return gp++,Ss.then(sx,sx),Ss}function sx(){if(--gp===0&&(Ld=null,Fd!==null)){Qu!==null&&(Qu.status="fulfilled");var vs=Fd;Fd=null,ju=0,Qu=null;for(var Ss=0;Ss<vs.length;Ss++)(0,vs[Ss])()}}function jb(vs,Ss){var Ts=[],Ns={status:"pending",value:null,reason:null,then:function(Is){Ts.push(Is)}};return vs.then(function(){Ns.status="fulfilled",Ns.value=Ss;for(var Is=0;Is<Ts.length;Is++)(0,Ts[Is])(Ss)},function(Is){for(Ns.status="rejected",Ns.reason=Is,Is=0;Is<Ts.length;Is++)(0,Ts[Is])(void 0)}),Ns}var ix=Ma.S;Ma.S=function(vs,Ss){if(Jy=La(),typeof Ss=="object"&&Ss!==null&&typeof Ss.then=="function"&&Rb(vs,Ss),Ld!==null)for(var Ts=gd;Ts!==null;)rx(Ts,Ld),Ts=Ts.next;if(Ts=vs.types,Ts!==null){for(var Ns=gd;Ns!==null;)rx(Ns,Ts),Ns=Ns.next;if(ju!==0){Ns=Ld,Ns===null&&(Ns=Ld=[]);for(var Is=0;Is<Ts.length;Is++){var $s=Ts[Is];Ns.indexOf($s)===-1&&Ns.push($s)}}}ix!==null&&ix(vs,Ss)};var Cu=bo(null);function xp(){var vs=Cu.current;return vs!==null?vs:Ho.pooledCache}function $f(vs,Ss){Ss===null?Va(Cu,Cu.current):Va(Cu,Ss.pool)}function ax(){var vs=xp();return vs===null?null:{parent:ol._currentValue,pool:vs}}var Xu=Error(xs(460)),yp=Error(xs(474)),Pf=Error(xs(542)),Lf={then:function(){}};function ox(vs){return vs=vs.status,vs==="fulfilled"||vs==="rejected"}function lx(vs,Ss,Ts){switch(Ts=vs[Ts],Ts===void 0?vs.push(Ss):Ts!==Ss&&(Ss.then(hc,hc),Ss=Ts),Ss.status){case"fulfilled":return Ss.value;case"rejected":throw vs=Ss.reason,ux(vs),vs===void 0&&!("reason"in Ss)?Error(xs(600)):vs;default:if(typeof Ss.status=="string")Ss.then(hc,hc);else{if(vs=Ho,vs!==null&&100<vs.shellSuspendCounter)throw Error(xs(482));vs=Ss,vs.status="pending",vs.then(function(Ns){if(Ss.status==="pending"){var Is=Ss;Is.status="fulfilled",Is.value=Ns}},function(Ns){if(Ss.status==="pending"){var Is=Ss;Is.status="rejected",Is.reason=Ns}})}switch(Ss.status){case"fulfilled":return Ss.value;case"rejected":throw vs=Ss.reason,ux(vs),vs}throw _u=Ss,Xu}}function Tu(vs){try{var Ss=vs._init;return Ss(vs._payload)}catch(Ts){throw Ts!==null&&typeof Ts=="object"&&typeof Ts.then=="function"?(_u=Ts,Xu):Ts}}var _u=null;function cx(){if(_u===null)throw Error(xs(459));var vs=_u;return _u=null,vs}function ux(vs){if(vs===Xu||vs===Pf)throw Error(xs(483))}var ed=null,Ud=0;function Ff(vs){var Ss=Ud;return Ud+=1,ed===null&&(ed=[]),lx(ed,vs,Ss)}function Kc(vs,Ss){Ss=Ss.props.ref,vs.ref=Ss!==void 0?Ss:null}function Uf(vs,Ss){throw Ss.$$typeof===Ys?Error(xs(525)):(vs=Object.prototype.toString.call(Ss),Error(xs(31,vs==="[object Object]"?"object with keys {"+Object.keys(Ss).join(", ")+"}":vs)))}function dx(vs){function Ss(wa,ya){if(vs){var ja=wa.deletions;ja===null?(wa.deletions=[ya],wa.flags|=16):ja.push(ya)}}function Ts(wa,ya){if(!vs)return null;for(;ya!==null;)Ss(wa,ya),ya=ya.sibling;return null}function Ns(wa){for(var ya=new Map;wa!==null;)wa.key===null?ya.set(wa.index,wa):ya.set(wa.key,wa),wa=wa.sibling;return ya}function Is(wa,ya){return wa=Nc(wa,ya),wa.index=0,wa.sibling=null,wa}function $s(wa,ya,ja){return wa.index=ja,vs?(ja=wa.alternate,ja!==null?(ja=ja.index,ja<ya?(wa.flags|=2,ya):ja):(wa.flags|=134217730,ya)):(wa.flags|=1048576,ya)}function Ks(wa){return vs&&wa.alternate===null&&(wa.flags|=134217730),wa}function Ci(wa,ya,ja,Da){return ya===null||ya.tag!==6?(ya=lp(ja,wa.mode,Da),ya.return=wa,ya):(ya=Is(ya,ja),ya.return=wa,ya)}function ma(wa,ya,ja,Da){var Xa=ja.type;return Xa===ia?(wa=Aa(wa,ya,ja.props.children,Da,ja.key),Kc(wa,ja),wa):ya!==null&&(ya.elementType===Xa||typeof Xa=="object"&&Xa!==null&&Xa.$$typeof===ra&&Tu(Xa)===ya.type)?(ya=Is(ya,ja.props),Kc(ya,ja),ya.return=wa,ya):(ya=Af(ja.type,ja.key,ja.props,null,wa.mode,Da),Kc(ya,ja),ya.return=wa,ya)}function Sa(wa,ya,ja,Da){return ya===null||ya.tag!==4||ya.stateNode.containerInfo!==ja.containerInfo||ya.stateNode.implementation!==ja.implementation?(ya=cp(ja,wa.mode,Da),ya.return=wa,ya):(ya=Is(ya,ja.children||[]),ya.return=wa,ya)}function Aa(wa,ya,ja,Da,Xa){return ya===null||ya.tag!==7?(ya=Eu(ja,wa.mode,Da,Xa),ya.return=wa,ya):(ya=Is(ya,ja),ya.return=wa,ya)}function Pa(wa,ya,ja){if(typeof ya=="string"&&ya!==""||typeof ya=="number"||typeof ya=="bigint")return ya=lp(""+ya,wa.mode,ja),ya.return=wa,ya;if(typeof ya=="object"&&ya!==null){switch(ya.$$typeof){case Qs:return ja=Af(ya.type,ya.key,ya.props,null,wa.mode,ja),Kc(ja,ya),ja.return=wa,ja;case ai:return ya=cp(ya,wa.mode,ja),ya.return=wa,ya;case ra:return ya=Tu(ya),Pa(wa,ya,ja)}if(qa(ya)||Oa(ya))return ya=Eu(ya,wa.mode,ja,null),ya.return=wa,ya;if(typeof ya.then=="function")return Pa(wa,Ff(ya),ja);if(ya.$$typeof===ta)return Pa(wa,Df(wa,ya),ja);Uf(wa,ya)}return null}function va(wa,ya,ja,Da){var Xa=ya!==null?ya.key:null;if(typeof ja=="string"&&ja!==""||typeof ja=="number"||typeof ja=="bigint")return Xa!==null?null:Ci(wa,ya,""+ja,Da);if(typeof ja=="object"&&ja!==null){switch(ja.$$typeof){case Qs:return ja.key===Xa?ma(wa,ya,ja,Da):null;case ai:return ja.key===Xa?Sa(wa,ya,ja,Da):null;case ra:return ja=Tu(ja),va(wa,ya,ja,Da)}if(qa(ja)||Oa(ja))return Xa!==null?null:Aa(wa,ya,ja,Da,null);if(typeof ja.then=="function")return va(wa,ya,Ff(ja),Da);if(ja.$$typeof===ta)return va(wa,ya,Df(wa,ja),Da);Uf(wa,ja)}return null}function Ta(wa,ya,ja,Da,Xa){if(typeof Da=="string"&&Da!==""||typeof Da=="number"||typeof Da=="bigint")return wa=wa.get(ja)||null,Ci(ya,wa,""+Da,Xa);if(typeof Da=="object"&&Da!==null){switch(Da.$$typeof){case Qs:return wa=wa.get(Da.key===null?ja:Da.key)||null,ma(ya,wa,Da,Xa);case ai:return wa=wa.get(Da.key===null?ja:Da.key)||null,Sa(ya,wa,Da,Xa);case ra:return Da=Tu(Da),Ta(wa,ya,ja,Da,Xa)}if(qa(Da)||Oa(Da))return wa=wa.get(ja)||null,Aa(ya,wa,Da,Xa,null);if(typeof Da.then=="function")return Ta(wa,ya,ja,Ff(Da),Xa);if(Da.$$typeof===ta)return Ta(wa,ya,ja,Df(ya,Da),Xa);Uf(ya,Da)}return null}function Ya(wa,ya,ja,Da){for(var Xa=null,Co=null,io=ya,co=ya=0,ul=null;io!==null&&co<ja.length;co++){io.index>co?(ul=io,io=null):ul=io.sibling;var _o=va(wa,io,ja[co],Da);if(_o===null){io===null&&(io=ul);break}vs&&io&&_o.alternate===null&&Ss(wa,io),ya=$s(_o,ya,co),Co===null?Xa=_o:Co.sibling=_o,Co=_o,io=ul}if(co===ja.length)return Ts(wa,io),yo&&Oc(wa,co),Xa;if(io===null){for(;co<ja.length;co++)io=Pa(wa,ja[co],Da),io!==null&&(ya=$s(io,ya,co),Co===null?Xa=io:Co.sibling=io,Co=io);return yo&&Oc(wa,co),Xa}for(io=Ns(io);co<ja.length;co++)ul=Ta(io,wa,co,ja[co],Da),ul!==null&&(vs&&(_o=ul.alternate,_o!==null&&io.delete(_o.key===null?co:_o.key)),ya=$s(ul,ya,co),Co===null?Xa=ul:Co.sibling=ul,Co=ul);return vs&&io.forEach(function(pu){return Ss(wa,pu)}),yo&&Oc(wa,co),Xa}function no(wa,ya,ja,Da){if(ja==null)throw Error(xs(151));for(var Xa=null,Co=null,io=ya,co=ya=0,ul=null,_o=ja.next();io!==null&&!_o.done;co++,_o=ja.next()){io.index>co?(ul=io,io=null):ul=io.sibling;var pu=va(wa,io,_o.value,Da);if(pu===null){io===null&&(io=ul);break}vs&&io&&pu.alternate===null&&Ss(wa,io),ya=$s(pu,ya,co),Co===null?Xa=pu:Co.sibling=pu,Co=pu,io=ul}if(_o.done)return Ts(wa,io),yo&&Oc(wa,co),Xa;if(io===null){for(;!_o.done;co++,_o=ja.next())_o=Pa(wa,_o.value,Da),_o!==null&&(ya=$s(_o,ya,co),Co===null?Xa=_o:Co.sibling=_o,Co=_o);return yo&&Oc(wa,co),Xa}for(io=Ns(io);!_o.done;co++,_o=ja.next())_o=Ta(io,wa,co,_o.value,Da),_o!==null&&(vs&&(ul=_o.alternate,ul!==null&&io.delete(ul.key===null?co:ul.key)),ya=$s(_o,ya,co),Co===null?Xa=_o:Co.sibling=_o,Co=_o);return vs&&io.forEach(function(av){return Ss(wa,av)}),yo&&Oc(wa,co),Xa}function go(wa,ya,ja,Da){if(typeof ja=="object"&&ja!==null&&ja.type===ia&&ja.key===null&&ja.props.ref===void 0&&(ja=ja.props.children),typeof ja=="object"&&ja!==null){switch(ja.$$typeof){case Qs:e:{for(var Xa=ja.key;ya!==null;){if(ya.key===Xa){if(Xa=ja.type,Xa===ia){if(ya.tag===7){Ts(wa,ya.sibling),Da=Is(ya,ja.props.children),Kc(Da,ja),Da.return=wa,wa=Da;break e}}else if(ya.elementType===Xa||typeof Xa=="object"&&Xa!==null&&Xa.$$typeof===ra&&Tu(Xa)===ya.type){Ts(wa,ya.sibling),Da=Is(ya,ja.props),Kc(Da,ja),Da.return=wa,wa=Da;break e}Ts(wa,ya);break}else Ss(wa,ya);ya=ya.sibling}ja.type===ia?(Da=Eu(ja.props.children,wa.mode,Da,ja.key),Kc(Da,ja),Da.return=wa,wa=Da):(Da=Af(ja.type,ja.key,ja.props,null,wa.mode,Da),Kc(Da,ja),Da.return=wa,wa=Da)}return Ks(wa);case ai:e:{for(Xa=ja.key;ya!==null;){if(ya.key===Xa)if(ya.tag===4&&ya.stateNode.containerInfo===ja.containerInfo&&ya.stateNode.implementation===ja.implementation){Ts(wa,ya.sibling),Da=Is(ya,ja.children||[]),Da.return=wa,wa=Da;break e}else{Ts(wa,ya);break}else Ss(wa,ya);ya=ya.sibling}Da=cp(ja,wa.mode,Da),Da.return=wa,wa=Da}return Ks(wa);case ra:return ja=Tu(ja),go(wa,ya,ja,Da)}if(qa(ja))return Ya(wa,ya,ja,Da);if(Oa(ja)){if(Xa=Oa(ja),typeof Xa!="function")throw Error(xs(150));return ja=Xa.call(ja),no(wa,ya,ja,Da)}if(typeof ja.then=="function")return go(wa,ya,Ff(ja),Da);if(ja.$$typeof===ta)return go(wa,ya,Df(wa,ja),Da);Uf(wa,ja)}return typeof ja=="string"&&ja!==""||typeof ja=="number"||typeof ja=="bigint"?(ja=""+ja,ya!==null&&ya.tag===6?(Ts(wa,ya.sibling),Da=Is(ya,ja),Da.return=wa,wa=Da):(Ts(wa,ya),Da=lp(ja,wa.mode,Da),Da.return=wa,wa=Da),Ks(wa)):Ts(wa,ya)}return function(wa,ya,ja,Da){try{Ud=0;var Xa=go(wa,ya,ja,Da);return ed=null,Xa}catch(io){if(io===Xu||io===Pf)throw io;var Co=Pl(29,io,null,wa.mode);return Co.lanes=Da,Co.return=wa,Co}}}var Au=dx(!0),fx=dx(!1),Zc=!1;function bp(vs){vs.updateQueue={baseState:vs.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ep(vs,Ss){vs=vs.updateQueue,Ss.updateQueue===vs&&(Ss.updateQueue={baseState:vs.baseState,firstBaseUpdate:vs.firstBaseUpdate,lastBaseUpdate:vs.lastBaseUpdate,shared:vs.shared,callbacks:null})}function Jc(vs){return{lane:vs,tag:0,payload:null,callback:null,next:null}}function Qc(vs,Ss,Ts){var Ns=vs.updateQueue;if(Ns===null)return null;if(Ns=Ns.shared,(Io&2)!==0){var Is=Ns.pending;return Is===null?Ss.next=Ss:(Ss.next=Is.next,Is.next=Ss),Ns.pending=Ss,Ss=_f(vs),Kg(vs,null,Ts),Ss}return Tf(vs,Ns,Ss,Ts),_f(vs)}function Bd(vs,Ss,Ts){if(Ss=Ss.updateQueue,Ss!==null&&(Ss=Ss.shared,(Ts&4194048)!==0)){var Ns=Ss.lanes;Ns&=vs.pendingLanes,Ts|=Ns,Ss.lanes=Ts,el(vs,Ts)}}function vp(vs,Ss){var Ts=vs.updateQueue,Ns=vs.alternate;if(Ns!==null&&(Ns=Ns.updateQueue,Ts===Ns)){var Is=null,$s=null;if(Ts=Ts.firstBaseUpdate,Ts!==null){do{var Ks={lane:Ts.lane,tag:Ts.tag,payload:Ts.payload,callback:null,next:null};$s===null?Is=$s=Ks:$s=$s.next=Ks,Ts=Ts.next}while(Ts!==null);$s===null?Is=$s=Ss:$s=$s.next=Ss}else Is=$s=Ss;Ts={baseState:Ns.baseState,firstBaseUpdate:Is,lastBaseUpdate:$s,shared:Ns.shared,callbacks:Ns.callbacks},vs.updateQueue=Ts;return}vs=Ts.lastBaseUpdate,vs===null?Ts.firstBaseUpdate=Ss:vs.next=Ss,Ts.lastBaseUpdate=Ss}var wp=!1;function zd(){if(wp){var vs=Qu;if(vs!==null)throw vs}}function Hd(vs,Ss,Ts,Ns){wp=!1;var Is=vs.updateQueue;Zc=!1;var $s=Is.firstBaseUpdate,Ks=Is.lastBaseUpdate,Ci=Is.shared.pending;if(Ci!==null){Is.shared.pending=null;var ma=Ci,Sa=ma.next;ma.next=null,Ks===null?$s=Sa:Ks.next=Sa,Ks=ma;var Aa=vs.alternate;Aa!==null&&(Aa=Aa.updateQueue,Ci=Aa.lastBaseUpdate,Ci!==Ks&&(Ci===null?Aa.firstBaseUpdate=Sa:Ci.next=Sa,Aa.lastBaseUpdate=ma))}if($s!==null){var Pa=Is.baseState;Ks=0,Aa=Sa=ma=null,Ci=$s;do{var va=Ci.lane&-536870913,Ta=va!==Ci.lane;if(Ta?(jo&va)===va:(Ns&va)===va){va!==0&&va===ju&&(wp=!0),Aa!==null&&(Aa=Aa.next={lane:0,tag:Ci.tag,payload:Ci.payload,callback:null,next:null});e:{var Ya=vs,no=Ci;va=Ss;var go=Ts;switch(no.tag){case 1:if(Ya=no.payload,typeof Ya=="function"){Pa=Ya.call(go,Pa,va);break e}Pa=Ya;break e;case 3:Ya.flags=Ya.flags&-65537|128;case 0:if(Ya=no.payload,va=typeof Ya=="function"?Ya.call(go,Pa,va):Ya,va==null)break e;Pa=Zs({},Pa,va);break e;case 2:Zc=!0}}va=Ci.callback,va!==null&&(vs.flags|=64,Ta&&(vs.flags|=8192),Ta=Is.callbacks,Ta===null?Is.callbacks=[va]:Ta.push(va))}else Ta={lane:va,tag:Ci.tag,payload:Ci.payload,callback:Ci.callback,next:null},Aa===null?(Sa=Aa=Ta,ma=Pa):Aa=Aa.next=Ta,Ks|=va;if(Ci=Ci.next,Ci===null){if(Ci=Is.shared.pending,Ci===null)break;Ta=Ci,Ci=Ta.next,Ta.next=null,Is.lastBaseUpdate=Ta,Is.shared.pending=null}}while(!0);Aa===null&&(ma=Pa),Is.baseState=ma,Is.firstBaseUpdate=Sa,Is.lastBaseUpdate=Aa,$s===null&&(Is.shared.lanes=0),iu|=Ks,vs.lanes=Ks,vs.memoizedState=Pa}}function mx(vs,Ss){if(typeof vs!="function")throw Error(xs(191,vs));vs.call(Ss)}function px(vs,Ss){var Ts=vs.callbacks;if(Ts!==null)for(vs.callbacks=null,vs=0;vs<Ts.length;vs++)mx(Ts[vs],Ss)}var Xc=bo(null),Bf=bo(0);function hx(vs,Ss){vs=Fc,Va(Bf,vs),Va(Xc,Ss),Fc=vs|Ss.baseLanes}function Sp(){Va(Bf,Fc),Va(Xc,Xc.current)}function Rp(){Fc=Bf.current,oo(Xc),oo(Bf)}var Rl=bo(null),kl=null;function eu(vs){var Ss=vs.alternate;Va(jl,jl.current&1),Va(Rl,vs),kl===null&&(Ss===null||Xc.current!==null||Ss.memoizedState!==null)&&(kl=vs)}function jp(vs){Va(jl,jl.current),Va(Rl,vs),kl===null&&(kl=vs)}function gx(vs){vs.tag===22?(Va(jl,jl.current),Va(Rl,vs),kl===null&&(kl=vs)):tu()}function tu(){Va(jl,jl.current),Va(Rl,Rl.current)}function ql(vs){oo(Rl),kl===vs&&(kl=null),oo(jl)}var jl=bo(0);function qd(vs,Ss){Va(Rl,Rl.current),Va(jl,Ss)}function Cp(vs){oo(jl),oo(Rl),kl===vs&&(kl=null)}function zf(vs){for(var Ss=vs;Ss!==null;){if(Ss.tag===13){var Ts=Ss.memoizedState;if(Ts!==null&&(Ts=Ts.dehydrated,Ts===null||Kh(Ts)||Zh(Ts)))return Ss}else if(Ss.tag===19&&Ss.memoizedProps.revealOrder!=="independent"){if((Ss.flags&128)!==0)return Ss}else if(Ss.child!==null){Ss.child.return=Ss,Ss=Ss.child;continue}if(Ss===vs)break;for(;Ss.sibling===null;){if(Ss.return===null||Ss.return===vs)return null;Ss=Ss.return}Ss.sibling.return=Ss.return,Ss=Ss.sibling}return null}var Dc=0,ho=null,zo=null,ll=null,Hf=!1,td=!1,ku=!1,qf=0,Vd=0,nd=null,Cb=0;function tl(){throw Error(xs(321))}function Tp(vs,Ss){if(Ss===null)return!1;for(var Ts=0;Ts<Ss.length&&Ts<vs.length;Ts++)if(!Hl(vs[Ts],Ss[Ts]))return!1;return!0}function _p(vs,Ss,Ts,Ns,Is,$s){return Dc=$s,ho=Ss,Ss.memoizedState=null,Ss.updateQueue=null,Ss.lanes=0,Ma.H=vs===null||vs.memoizedState===null?Xx:ey,ku=!1,$s=Ts(Ns,Is),ku=!1,td&&($s=yx(Ss,Ts,Ns,Is)),xx(vs),$s}function xx(vs){Ma.H=Jf;var Ss=zo!==null&&zo.next!==null;if(Dc=0,ll=zo=ho=null,Hf=!1,Vd=0,nd=null,Ss)throw Error(xs(300));vs===null||cl||(vs=vs.dependencies,vs!==null&&If(vs)&&(cl=!0))}function yx(vs,Ss,Ts,Ns){ho=vs;var Is=0;do{if(td&&(nd=null),Vd=0,td=!1,25<=Is)throw Error(xs(301));if(Is+=1,ll=zo=null,vs.updateQueue!=null){var $s=vs.updateQueue;$s.lastEffect=null,$s.events=null,$s.stores=null,$s.memoCache!=null&&($s.memoCache.index=0)}Ma.H=Ib,$s=Ss(Ts,Ns)}while(td);return $s}function Tb(){var vs=Ma.H,Ss=vs.useState()[0];return Ss=typeof Ss.then=="function"?Wd(Ss):Ss,vs=vs.useState()[0],(zo!==null?zo.memoizedState:null)!==vs&&(ho.flags|=1024),Ss}function Ap(){var vs=qf!==0;return qf=0,vs}function kp(vs,Ss,Ts){Ss.updateQueue=vs.updateQueue,Ss.flags&=-2053,vs.lanes&=~Ts}function Np(vs){if(Hf){for(vs=vs.memoizedState;vs!==null;){var Ss=vs.queue;Ss!==null&&(Ss.pending=null),vs=vs.next}Hf=!1}Dc=0,ll=zo=ho=null,td=!1,Vd=qf=0,nd=null}function Ol(){var vs={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ll===null?ho.memoizedState=ll=vs:ll=ll.next=vs,ll}function al(){if(zo===null){var vs=ho.alternate;vs=vs!==null?vs.memoizedState:null}else vs=zo.next;var Ss=ll===null?ho.memoizedState:ll.next;if(Ss!==null)ll=Ss,zo=vs;else{if(vs===null)throw ho.alternate===null?Error(xs(467)):Error(xs(310));zo=vs,vs={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},ll===null?ho.memoizedState=ll=vs:ll=ll.next=vs}return ll}function Vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wd(vs){var Ss=Vd;return Vd+=1,nd===null&&(nd=[]),vs=lx(nd,vs,Ss),Ss=ho,(ll===null?Ss.memoizedState:ll.next)===null&&(Ss=Ss.alternate,Ma.H=Ss===null||Ss.memoizedState===null?Xx:ey),vs}function Wf(vs){if(vs!==null&&typeof vs=="object"){if(typeof vs.then=="function")return Wd(vs);if(vs.$$typeof===Ra)return;if(vs.$$typeof===ta)return Sl(vs)}throw Error(xs(438,String(vs)))}function Op(vs){var Ss=null,Ts=ho.updateQueue;if(Ts!==null&&(Ss=Ts.memoCache),Ss==null){var Ns=ho.alternate;Ns!==null&&(Ns=Ns.updateQueue,Ns!==null&&(Ns=Ns.memoCache,Ns!=null&&(Ss={data:Ns.data.map(function(Is){return Is.slice()}),index:0})))}if(Ss==null&&(Ss={data:[],index:0}),Ts===null&&(Ts=Vf(),ho.updateQueue=Ts),Ts.memoCache=Ss,Ts=Ss.data[Ss.index],Ts===void 0)for(Ts=Ss.data[Ss.index]=Array(vs),Ns=0;Ns<vs;Ns++)Ts[Ns]=oa;return Ss.index++,Ts}function $c(vs,Ss){return typeof Ss=="function"?Ss(vs):Ss}function Gf(vs){var Ss=al();return Mp(Ss,zo,vs)}function Mp(vs,Ss,Ts){var Ns=vs.queue;if(Ns===null)throw Error(xs(311));Ns.lastRenderedReducer=Ts;var Is=vs.baseQueue,$s=Ns.pending;if($s!==null){if(Is!==null){var Ks=Is.next;Is.next=$s.next,$s.next=Ks}Ss.baseQueue=Is=$s,Ns.pending=null}if($s=vs.baseState,Is===null)vs.memoizedState=$s;else{Ss=Is.next;var Ci=Ks=null,ma=null,Sa=Ss,Aa=!1;do{var Pa=Sa.lane&-536870913;if(Pa!==Sa.lane?(jo&Pa)===Pa:(Dc&Pa)===Pa){var va=Sa.revertLane;if(va===0)ma!==null&&(ma=ma.next={lane:0,revertLane:0,gesture:null,action:Sa.action,hasEagerState:Sa.hasEagerState,eagerState:Sa.eagerState,next:null}),Pa===ju&&(Aa=!0);else if((Dc&va)===va){Sa=Sa.next,va===ju&&(Aa=!0);continue}else Pa={lane:0,revertLane:Sa.revertLane,gesture:null,action:Sa.action,hasEagerState:Sa.hasEagerState,eagerState:Sa.eagerState,next:null},ma===null?(Ci=ma=Pa,Ks=$s):ma=ma.next=Pa,ho.lanes|=va,iu|=va;Pa=Sa.action,ku&&Ts($s,Pa),$s=Sa.hasEagerState?Sa.eagerState:Ts($s,Pa)}else va={lane:Pa,revertLane:Sa.revertLane,gesture:Sa.gesture,action:Sa.action,hasEagerState:Sa.hasEagerState,eagerState:Sa.eagerState,next:null},ma===null?(Ci=ma=va,Ks=$s):ma=ma.next=va,ho.lanes|=Pa,iu|=Pa;Sa=Sa.next}while(Sa!==null&&Sa!==Ss);if(ma===null?Ks=$s:ma.next=Ci,!Hl($s,vs.memoizedState)&&(cl=!0,Aa&&(Ts=Qu,Ts!==null)))throw Ts;vs.memoizedState=$s,vs.baseState=Ks,vs.baseQueue=ma,Ns.lastRenderedState=$s}return Is===null&&(Ns.lanes=0),[vs.memoizedState,Ns.dispatch]}function Ip(vs){var Ss=al(),Ts=Ss.queue;if(Ts===null)throw Error(xs(311));Ts.lastRenderedReducer=vs;var Ns=Ts.dispatch,Is=Ts.pending,$s=Ss.memoizedState;if(Is!==null){Ts.pending=null;var Ks=Is=Is.next;do $s=vs($s,Ks.action),Ks=Ks.next;while(Ks!==Is);Hl($s,Ss.memoizedState)||(cl=!0),Ss.memoizedState=$s,Ss.baseQueue===null&&(Ss.baseState=$s),Ts.lastRenderedState=$s}return[$s,Ns]}function bx(vs,Ss,Ts){var Ns=ho,Is=al(),$s=yo;if($s){if(Ts===void 0)throw Error(xs(407));Ts=Ts()}else Ts=Ss();var Ks=!Hl((zo||Is).memoizedState,Ts);if(Ks&&(Is.memoizedState=Ts,cl=!0),Is=Is.queue,Pp(wx.bind(null,Ns,Is,vs),[vs]),vs=Is.getSnapshot!==Ss||Ks||ll!==null&&(ll.memoizedState.tag&1)!==0,rd(vs?9:8,{destroy:void 0},vx.bind(null,Ns,Is,Ts,Ss),null),vs){if(Ns.flags|=2048,Ho===null)throw Error(xs(349));$s||(Dc&127)!==0||Ex(Ns,Ss,Ts)}return Ts}function Ex(vs,Ss,Ts){vs.flags|=16384,vs={getSnapshot:Ss,value:Ts},Ss=ho.updateQueue,Ss===null?(Ss=Vf(),ho.updateQueue=Ss,Ss.stores=[vs]):(Ts=Ss.stores,Ts===null?Ss.stores=[vs]:Ts.push(vs))}function vx(vs,Ss,Ts,Ns){Ss.value=Ts,Ss.getSnapshot=Ns,Sx(Ss)&&Rx(vs)}function wx(vs,Ss,Ts){return Ts(function(){Sx(Ss)&&Rx(vs)})}function Sx(vs){var Ss=vs.getSnapshot;vs=vs.value;try{var Ts=Ss();return!Hl(vs,Ts)}catch{return!0}}function Rx(vs){var Ss=bu(vs,2);Ss!==null&&Bl(Ss,vs,2)}function Dp(vs){var Ss=Ol();if(typeof vs=="function"){var Ts=vs;if(vs=Ts(),ku){Lo(!0);try{Ts()}finally{Lo(!1)}}}return Ss.memoizedState=Ss.baseState=vs,Ss.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$c,lastRenderedState:vs},Ss}function jx(vs,Ss,Ts,Ns){return vs.baseState=Ts,Mp(vs,zo,typeof Ns=="function"?Ns:$c)}function _b(vs,Ss,Ts,Ns,Is){if(Zf(vs))throw Error(xs(485));if(vs=Ss.action,vs!==null){var $s={payload:Is,action:vs,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Ks){$s.listeners.push(Ks)}};Ma.T!==null?Ts(!0):$s.isTransition=!1,Ns($s),Ts=Ss.pending,Ts===null?($s.next=Ss.pending=$s,Cx(Ss,$s)):($s.next=Ts.next,Ss.pending=Ts.next=$s)}}function Cx(vs,Ss){var Ts=Ss.action,Ns=Ss.payload,Is=vs.state;if(Ss.isTransition){var $s=Ma.T,Ks={};Ks.types=$s!==null?$s.types:null,Ma.T=Ks;try{var Ci=Ts(Is,Ns),ma=Ma.S;ma!==null&&ma(Ks,Ci),Tx(vs,Ss,Ci)}catch(Sa){$p(vs,Ss,Sa)}finally{$s!==null&&Ks.types!==null&&($s.types=Ks.types),Ma.T=$s}}else try{$s=Ts(Is,Ns),Tx(vs,Ss,$s)}catch(Sa){$p(vs,Ss,Sa)}}function Tx(vs,Ss,Ts){Ts!==null&&typeof Ts=="object"&&typeof Ts.then=="function"?Ts.then(function(Ns){_x(vs,Ss,Ns)},function(Ns){return $p(vs,Ss,Ns)}):_x(vs,Ss,Ts)}function _x(vs,Ss,Ts){Ss.status="fulfilled",Ss.value=Ts,Ax(Ss),vs.state=Ts,Ss=vs.pending,Ss!==null&&(Ts=Ss.next,Ts===Ss?vs.pending=null:(Ts=Ts.next,Ss.next=Ts,Cx(vs,Ts)))}function $p(vs,Ss,Ts){var Ns=vs.pending;if(vs.pending=null,Ns!==null){Ns=Ns.next;do Ss.status="rejected",Ss.reason=Ts,Ax(Ss),Ss=Ss.next;while(Ss!==Ns)}vs.action=null}function Ax(vs){vs=vs.listeners;for(var Ss=0;Ss<vs.length;Ss++)(0,vs[Ss])()}function kx(vs,Ss){return Ss}function Nx(vs,Ss){if(yo){var Ts=Ho.formState;if(Ts!==null){e:{var Ns=ho;if(yo){if(qo){t:{for(var Is=qo,$s=tc;Is.nodeType!==8;){if(!$s){Is=null;break t}if(Is=rc(Is.nextSibling),Is===null){Is=null;break t}}$s=Is.data,Is=$s==="F!"||$s==="F"?Is:null}if(Is){qo=rc(Is.nextSibling),Ns=Is.data==="F!";break e}}Gc(Ns)}Ns=!1}Ns&&(Ss=Ts[0])}}return Ts=Ol(),Ts.memoizedState=Ts.baseState=Ss,Ns={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kx,lastRenderedState:Ss},Ts.queue=Ns,Ts=Zx.bind(null,ho,Ns),Ns.dispatch=Ts,Ns=Dp(!1),$s=zp.bind(null,ho,!1,Ns.queue),Ns=Ol(),Is={state:Ss,dispatch:null,action:vs,pending:null},Ns.queue=Is,Ts=_b.bind(null,ho,Is,$s,Ts),Is.dispatch=Ts,Ns.memoizedState=vs,[Ss,Ts,!1]}function Ox(vs){var Ss=al();return Mx(Ss,zo,vs)}function Mx(vs,Ss,Ts){if(Ss=Mp(vs,Ss,kx)[0],vs=Gf($c)[0],typeof Ss=="object"&&Ss!==null&&typeof Ss.then=="function")try{var Ns=Wd(Ss)}catch(Ks){throw Ks===Xu?Pf:Ks}else Ns=Ss;Ss=al();var Is=Ss.queue,$s=Is.dispatch;return Ts!==Ss.memoizedState&&(ho.flags|=2048,rd(9,{destroy:void 0},Ab.bind(null,Is,Ts),null)),[Ns,$s,vs]}function Ab(vs,Ss){vs.action=Ss}function Ix(vs){var Ss=al(),Ts=zo;if(Ts!==null)return Mx(Ss,Ts,vs);al(),Ss=Ss.memoizedState,Ts=al();var Ns=Ts.queue.dispatch;return Ts.memoizedState=vs,[Ss,Ns,!1]}function rd(vs,Ss,Ts,Ns){return vs={tag:vs,create:Ts,deps:Ns,inst:Ss,next:null},Ss=ho.updateQueue,Ss===null&&(Ss=Vf(),ho.updateQueue=Ss),Ts=Ss.lastEffect,Ts===null?Ss.lastEffect=vs.next=vs:(Ns=Ts.next,Ts.next=vs,vs.next=Ns,Ss.lastEffect=vs),vs}function Dx(){return al().memoizedState}function Yf(vs,Ss,Ts,Ns){var Is=Ol();ho.flags|=vs,Is.memoizedState=rd(1|Ss,{destroy:void 0},Ts,Ns===void 0?null:Ns)}function Kf(vs,Ss,Ts,Ns){var Is=al();Ns=Ns===void 0?null:Ns;var $s=Is.memoizedState.inst;zo!==null&&Ns!==null&&Tp(Ns,zo.memoizedState.deps)?Is.memoizedState=rd(Ss,$s,Ts,Ns):(ho.flags|=vs,Is.memoizedState=rd(1|Ss,$s,Ts,Ns))}function $x(vs,Ss){Yf(8390656,8,vs,Ss)}function Pp(vs,Ss){Kf(2048,8,vs,Ss)}function kb(vs){ho.flags|=4;var Ss=ho.updateQueue;if(Ss===null)Ss=Vf(),ho.updateQueue=Ss,Ss.events=[vs];else{var Ts=Ss.events;Ts===null?Ss.events=[vs]:Ts.push(vs)}}function Px(vs){var Ss=al().memoizedState;return kb({ref:Ss,nextImpl:vs}),function(){if((Io&2)!==0)throw Error(xs(440));return Ss.impl.apply(void 0,arguments)}}function Lx(vs,Ss){return Kf(4,2,vs,Ss)}function Fx(vs,Ss){return Kf(4,4,vs,Ss)}function Ux(vs,Ss){if(typeof Ss=="function"){vs=vs();var Ts=Ss(vs);return function(){typeof Ts=="function"?Ts():Ss(null)}}if(Ss!=null)return vs=vs(),Ss.current=vs,function(){Ss.current=null}}function Bx(vs,Ss,Ts){Ts=Ts!=null?Ts.concat([vs]):null,Kf(4,4,Ux.bind(null,Ss,vs),Ts)}function Lp(){}function zx(vs,Ss){var Ts=al();Ss=Ss===void 0?null:Ss;var Ns=Ts.memoizedState;return Ss!==null&&Tp(Ss,Ns[1])?Ns[0]:(Ts.memoizedState=[vs,Ss],vs)}function Hx(vs,Ss){var Ts=al();Ss=Ss===void 0?null:Ss;var Ns=Ts.memoizedState;if(Ss!==null&&Tp(Ss,Ns[1]))return Ns[0];if(Ns=vs(),ku){Lo(!0);try{vs()}finally{Lo(!1)}}return Ts.memoizedState=[Ns,Ss],Ns}function Fp(vs,Ss,Ts){return Ts===void 0||(Dc&1073741824)!==0&&(jo&261930)===0?vs.memoizedState=Ss:(vs.memoizedState=Ts,vs=Xy(),ho.lanes|=vs,iu|=vs,Ts)}function qx(vs,Ss,Ts,Ns){return Hl(Ts,Ss)?Ts:Xc.current!==null?(vs=Fp(vs,Ts,Ns),Hl(vs,Ss)||(cl=!0),vs):(Dc&106)===0||(Dc&1073741824)!==0&&(jo&261930)===0?(cl=!0,vs.memoizedState=Ts):(vs=Xy(),ho.lanes|=vs,iu|=vs,Ss)}function Vx(vs,Ss,Ts,Ns,Is){var $s=Fa.p;Fa.p=$s!==0&&8>$s?$s:8;var Ks=Ma.T,Ci={};Ci.types=Ks!==null?Ks.types:null,Ma.T=Ci,zp(vs,!1,Ss,Ts);try{var ma=Is(),Sa=Ma.S;if(Sa!==null&&Sa(Ci,ma),ma!==null&&typeof ma=="object"&&typeof ma.then=="function"){var Aa=jb(ma,Ns);Gd(vs,Ss,Aa,Yl(vs))}else Gd(vs,Ss,Ns,Yl(vs))}catch(Pa){Gd(vs,Ss,{then:function(){},status:"rejected",reason:Pa},Yl())}finally{Fa.p=$s,Ks!==null&&Ci.types!==null&&(Ks.types=Ci.types),Ma.T=Ks}}function Nb(){}function Up(vs,Ss,Ts,Ns){if(vs.tag!==5)throw Error(xs(476));var Is=Wx(vs).queue;Vx(vs,Is,Ss,Ka,Ts===null?Nb:function(){return Gx(vs),Ts(Ns)})}function Wx(vs){var Ss=vs.memoizedState;if(Ss!==null)return Ss;Ss={memoizedState:Ka,baseState:Ka,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$c,lastRenderedState:Ka},next:null};var Ts={};return Ss.next={memoizedState:Ts,baseState:Ts,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$c,lastRenderedState:Ts},next:null},vs.memoizedState=Ss,vs=vs.alternate,vs!==null&&(vs.memoizedState=Ss),Ss}function Gx(vs){var Ss=Wx(vs);Ss.next===null&&(Ss=vs.alternate.memoizedState),Gd(vs,Ss.next.queue,{},Yl())}function Bp(){return Sl(wd)}function Yx(){return al().memoizedState}function Kx(){return al().memoizedState}function Ob(vs){for(var Ss=vs.return;Ss!==null;){switch(Ss.tag){case 24:case 3:var Ts=Yl();vs=Jc(Ts);var Ns=Qc(Ss,vs,Ts);Ns!==null&&(Bl(Ns,Ss,Ts),Bd(Ns,Ss,Ts)),Ss={cache:hp()},vs.payload=Ss;return}Ss=Ss.return}}function Mb(vs,Ss,Ts){var Ns=Yl();Ts={lane:Ns,revertLane:0,gesture:null,action:Ts,hasEagerState:!1,eagerState:null,next:null},Zf(vs)?Jx(Ss,Ts):(Ts=ap(vs,Ss,Ts,Ns),Ts!==null&&(Bl(Ts,vs,Ns),Qx(Ts,Ss,Ns)))}function Zx(vs,Ss,Ts){var Ns=Yl();Gd(vs,Ss,Ts,Ns)}function Gd(vs,Ss,Ts,Ns){var Is={lane:Ns,revertLane:0,gesture:null,action:Ts,hasEagerState:!1,eagerState:null,next:null};if(Zf(vs))Jx(Ss,Is);else{var $s=vs.alternate;if(vs.lanes===0&&($s===null||$s.lanes===0)&&($s=Ss.lastRenderedReducer,$s!==null))try{var Ks=Ss.lastRenderedState,Ci=$s(Ks,Ts);if(Is.hasEagerState=!0,Is.eagerState=Ci,Hl(Ci,Ks))return Tf(vs,Ss,Is,0),Ho===null&&Cf(),!1}catch{}if(Ts=ap(vs,Ss,Is,Ns),Ts!==null)return Bl(Ts,vs,Ns),Qx(Ts,Ss,Ns),!0}return!1}function zp(vs,Ss,Ts,Ns){if(Ns={lane:2,revertLane:Mh(),gesture:null,action:Ns,hasEagerState:!1,eagerState:null,next:null},Zf(vs)){if(Ss)throw Error(xs(479))}else Ss=ap(vs,Ts,Ns,2),Ss!==null&&Bl(Ss,vs,2)}function Zf(vs){var Ss=vs.alternate;return vs===ho||Ss!==null&&Ss===ho}function Jx(vs,Ss){td=Hf=!0;var Ts=vs.pending;Ts===null?Ss.next=Ss:(Ss.next=Ts.next,Ts.next=Ss),vs.pending=Ss}function Qx(vs,Ss,Ts){if((Ts&4194048)!==0){var Ns=Ss.lanes;Ns&=vs.pendingLanes,Ts|=Ns,Ss.lanes=Ts,el(vs,Ts)}}var Jf={readContext:Sl,use:Wf,useCallback:tl,useContext:tl,useEffect:tl,useImperativeHandle:tl,useLayoutEffect:tl,useInsertionEffect:tl,useMemo:tl,useReducer:tl,useRef:tl,useState:tl,useDebugValue:tl,useDeferredValue:tl,useTransition:tl,useSyncExternalStore:tl,useId:tl,useHostTransitionStatus:tl,useFormState:tl,useActionState:tl,useOptimistic:tl,useMemoCache:tl,useCacheRefresh:tl,useEffectEvent:tl},Xx={readContext:Sl,use:Wf,useCallback:function(vs,Ss){return Ol().memoizedState=[vs,Ss===void 0?null:Ss],vs},useContext:Sl,useEffect:$x,useImperativeHandle:function(vs,Ss,Ts){Ts=T
vendor: 4,841 bytes, line 1464
1464s!=null?Ts.concat([vs]):null,Yf(4194308,4,Ux.bind(null,Ss,vs),Ts)},useLayoutEffect:function(vs,Ss){return Yf(4194308,4,vs,Ss)},useInsertionEffect:function(vs,Ss){Yf(4,2,vs,Ss)},useMemo:function(vs,Ss){var Ts=Ol();Ss=Ss===void 0?null:Ss;var Ns=vs();if(ku){Lo(!0);try{vs()}finally{Lo(!1)}}return Ts.memoizedState=[Ns,Ss],Ns},useReducer:function(vs,Ss,Ts){var Ns=Ol();if(Ts!==void 0){var Is=Ts(Ss);if(ku){Lo(!0);try{Ts(Ss)}finally{Lo(!1)}}}else Is=Ss;return Ns.memoizedState=Ns.baseState=Is,vs={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:Is},Ns.queue=vs,vs=vs.dispatch=Mb.bind(null,ho,vs),[Ns.memoizedState,vs]},useRef:function(vs){var Ss=Ol();return vs={current:vs},Ss.memoizedState=vs},useState:function(vs){vs=Dp(vs);var Ss=vs.queue,Ts=Zx.bind(null,ho,Ss);return Ss.dispatch=Ts,[vs.memoizedState,Ts]},useDebugValue:Lp,useDeferredValue:function(vs,Ss){var Ts=Ol();return Fp(Ts,vs,Ss)},useTransition:function(){var vs=Dp(!1);return vs=Vx.bind(null,ho,vs.queue,!0,!1),Ol().memoizedState=vs,[!1,vs]},useSyncExternalStore:function(vs,Ss,Ts){var Ns=ho,Is=Ol();if(yo){if(Ts===void 0)throw Error(xs(407));Ts=Ts()}else{if(Ts=Ss(),Ho===null)throw Error(xs(349));(jo&127)!==0||Ex(Ns,Ss,Ts)}Is.memoizedState=Ts;var $s={value:Ts,getSnapshot:Ss};return Is.queue=$s,$x(wx.bind(null,Ns,$s,vs),[vs]),Ns.flags|=2048,rd(9,{destroy:void 0},vx.bind(null,Ns,$s,Ts,Ss),null),Ts},useId:function(){var vs=Ol(),Ss=Ho.identifierPrefix;if(yo){var Ts=xc,Ns=gc;Ts=(Ns&~(1<<32-Go(Ns)-1)).toString(32)+Ts,Ss="_"+Ss+"R_"+Ts,Ts=qf++,0<Ts&&(Ss+="H"+Ts.toString(32)),Ss+="_"}else Ts=Cb++,Ss="_"+Ss+"r_"+Ts.toString(32)+"_";return vs.memoizedState=Ss},useHostTransitionStatus:Bp,useFormState:Nx,useActionState:Nx,useOptimistic:function(vs){var Ss=Ol();Ss.memoizedState=Ss.baseState=vs;var Ts={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return Ss.queue=Ts,Ss=zp.bind(null,ho,!0,Ts),Ts.dispatch=Ss,[vs,Ss]},useMemoCache:Op,useCacheRefresh:function(){return Ol().memoizedState=Ob.bind(null,ho)},useEffectEvent:function(vs){var Ss=Ol(),Ts={impl:vs};return Ss.memoizedState=Ts,function(){if((Io&2)!==0)throw Error(xs(440));return Ts.impl.apply(void 0,arguments)}}},ey={readContext:Sl,use:Wf,useCallback:zx,useContext:Sl,useEffect:Pp,useImperativeHandle:Bx,useInsertionEffect:Lx,useLayoutEffect:Fx,useMemo:Hx,useReducer:Gf,useRef:Dx,useState:function(){return Gf($c)},useDebugValue:Lp,useDeferredValue:function(vs,Ss){var Ts=al();return qx(Ts,zo.memoizedState,vs,Ss)},useTransition:function(){var vs=Gf($c)[0],Ss=al().memoizedState;return[typeof vs=="boolean"?vs:Wd(vs),Ss]},useSyncExternalStore:bx,useId:Yx,useHostTransitionStatus:Bp,useFormState:Ox,useActionState:Ox,useOptimistic:function(vs,Ss){var Ts=al();return jx(Ts,zo,vs,Ss)},useMemoCache:Op,useCacheRefresh:Kx,useEffectEvent:Px},Ib={readContext:Sl,use:Wf,useCallback:zx,useContext:Sl,useEffect:Pp,useImperativeHandle:Bx,useInsertionEffect:Lx,useLayoutEffect:Fx,useMemo:Hx,useReducer:Ip,useRef:Dx,useState:function(){return Ip($c)},useDebugValue:Lp,useDeferredValue:function(vs,Ss){var Ts=al();return zo===null?Fp(Ts,vs,Ss):qx(Ts,zo.memoizedState,vs,Ss)},useTransition:function(){var vs=Ip($c)[0],Ss=al().memoizedState;return[typeof vs=="boolean"?vs:Wd(vs),Ss]},useSyncExternalStore:bx,useId:Yx,useHostTransitionStatus:Bp,useFormState:Ix,useActionState:Ix,useOptimistic:function(vs,Ss){var Ts=al();return zo!==null?jx(Ts,zo,vs,Ss):(Ts.baseState=vs,[vs,Ts.queue.dispatch])},useMemoCache:Op,useCacheRefresh:Kx,useEffectEvent:Px};function Hp(vs,Ss,Ts,Ns){Ss=vs.memoizedState,Ts=Ts(Ns,Ss),Ts=Ts==null?Ss:Zs({},Ss,Ts),vs.memoizedState=Ts,vs.lanes===0&&(vs.updateQueue.baseState=Ts)}var qp={enqueueSetState:function(vs,Ss,Ts){vs=vs._reactInternals;var Ns=Yl(),Is=Jc(Ns);Is.payload=Ss,Ts!=null&&(Is.callback=Ts),Ss=Qc(vs,Is,Ns),Ss!==null&&(Bl(Ss,vs,Ns),Bd(Ss,vs,Ns))},enqueueReplaceState:function(vs,Ss,Ts){vs=vs._reactInternals;var Ns=Yl(),Is=Jc(Ns);Is.tag=1,Is.payload=Ss,Ts!=null&&(Is.callback=Ts),Ss=Qc(vs,Is,Ns),Ss!==null&&(Bl(Ss,vs,Ns),Bd(Ss,vs,Ns))},enqueueForceUpdate:function(vs,Ss){vs=vs._reactInternals;var Ts=Yl(),Ns=Jc(Ts);Ns.tag=2,Ss!=null&&(Ns.callback=Ss),Ss=Qc(vs,Ns,Ts),Ss!==null&&(Bl(Ss,vs,Ts),Bd(Ss,vs,Ts))}};function ty(vs,Ss,Ts,Ns,Is,$s,Ks){return vs=vs.stateNode,typeof vs.shouldComponentUpdate=="function"?vs.shouldComponentUpdate(Ns,$s,Ks):Ss.prototype&&Ss.prototype.isPureReactComponent?!Md(Ts,Ns)||!Md(Is,$s):!0}function ny(vs,Ss,Ts,Ns){vs=Ss.state,typeof Ss.componentWillReceiveProps=="function"&&Ss.componentWillReceiveProps(Ts,Ns),typeof Ss.UNSAFE_componentWillReceiveProps=="function"&&Ss.UNSAFE_componentWillReceiveProps(Ts,Ns),Ss.state!==vs&&qp.enqueueReplaceState(Ss,Ss.state,null)}function Nu(vs,Ss){var Ts=Ss;if("ref"in Ss){Ts={};for(var Ns in Ss)Ns!=="ref"&&(Ts[Ns]=Ss[Ns])}if(vs=vs.defaultProps){Ts===Ss&&(Ts=Zs({},Ts));
vendor: 74,900 bytes, line 1464
1464for(var Is in vs)Ts[Is]===void 0&&(Ts[Is]=vs[Is])}return Ts}function ry(vs){jf(vs)}function sy(vs){console.error(vs)}function iy(vs){jf(vs)}function Qf(vs,Ss){try{var Ts=vs.onUncaughtError;Ts(Ss.value,{componentStack:Ss.stack})}catch(Ns){setTimeout(function(){throw Ns})}}function ay(vs,Ss,Ts){try{var Ns=vs.onCaughtError;Ns(Ts.value,{componentStack:Ts.stack,errorBoundary:Ss.tag===1?Ss.stateNode:null})}catch(Is){setTimeout(function(){throw Is})}}function Vp(vs,Ss,Ts){return Ts=Jc(Ts),Ts.tag=3,Ts.payload={element:null},Ts.callback=function(){Qf(vs,Ss)},Ts}function oy(vs){return vs=Jc(vs),vs.tag=3,vs}function ly(vs,Ss,Ts,Ns){var Is=Ts.type.getDerivedStateFromError;if(typeof Is=="function"){var $s=Ns.value;vs.payload=function(){return Is($s)},vs.callback=function(){ay(Ss,Ts,Ns)}}var Ks=Ts.stateNode;Ks!==null&&typeof Ks.componentDidCatch=="function"&&(vs.callback=function(){ay(Ss,Ts,Ns),typeof Is!="function"&&(au===null?au=new Set([this]):au.add(this));var Ci=Ns.stack;this.componentDidCatch(Ns.value,{componentStack:Ci!==null?Ci:""})})}function Db(vs,Ss,Ts,Ns,Is){if(Ts.flags|=32768,Ns!==null&&typeof Ns=="object"&&typeof Ns.then=="function"){if(Ss=Ts.alternate,Ss!==null&&Su(Ss,Ts,Is,!0),Ts=Rl.current,Ts!==null){switch(Ts.tag){case 31:case 13:case 19:return kl===null?bm():Ts.alternate===null&&nl===0&&(nl=3),Ts.flags&=-257,Ts.flags|=65536,Ts.lanes=Is,Ns===Lf?Ts.flags|=16384:(Ss=Ts.updateQueue,Ss===null?Ts.updateQueue=new Set([Ns]):Ss.add(Ns),kh(vs,Ns,Is)),!1;case 22:return Ts.flags|=65536,Ns===Lf?Ts.flags|=16384:(Ss=Ts.updateQueue,Ss===null?(Ss={transitions:null,markerInstances:null,retryQueue:new Set([Ns])},Ts.updateQueue=Ss):(Ts=Ss.retryQueue,Ts===null?Ss.retryQueue=new Set([Ns]):Ts.add(Ns)),kh(vs,Ns,Is)),!1}throw Error(xs(435,Ts.tag))}return kh(vs,Ns,Is),bm(),!1}if(yo)return Ss=Rl.current,Ss!==null?((Ss.flags&65536)===0&&(Ss.flags|=256),Ss.flags|=65536,Ss.lanes=Is,Ns!==dp&&(vs=Error(xs(422),{cause:Ns}),$d(Ql(vs,Ts)))):(Ns!==dp&&(Ss=Error(xs(423),{cause:Ns}),$d(Ql(Ss,Ts))),vs=vs.current.alternate,vs.flags|=65536,Is&=-Is,vs.lanes|=Is,Ns=Ql(Ns,Ts),Is=Vp(vs.stateNode,Ns,Is),vp(vs,Is),nl!==4&&(nl=2)),!1;var $s=Error(xs(520),{cause:Ns});if($s=Ql($s,Ts),tf===null?tf=[$s]:tf.push($s),nl!==4&&(nl=2),Ss===null)return!0;Ns=Ql(Ns,Ts),Ts=Ss;do{switch(Ts.tag){case 3:return Ts.flags|=65536,vs=Is&-Is,Ts.lanes|=vs,vs=Vp(Ts.stateNode,Ns,vs),vp(Ts,vs),!1;case 1:if(Ss=Ts.type,$s=Ts.stateNode,(Ts.flags&128)===0&&(typeof Ss.getDerivedStateFromError=="function"||$s!==null&&typeof $s.componentDidCatch=="function"&&(au===null||!au.has($s))))return Ts.flags|=65536,Is&=-Is,Ts.lanes|=Is,Is=oy(Is),ly(Is,vs,Ts,Ns),vp(Ts,Is),!1;break;case 22:if(Ts.memoizedState!==null)return Ts.flags|=65536,!1}Ts=Ts.return}while(Ts!==null);return!1}var Wp=Error(xs(461)),cl=!1;function fl(vs,Ss,Ts,Ns){Ss.child=vs===null?fx(Ss,null,Ts,Ns):Au(Ss,vs.child,Ts,Ns)}function cy(vs,Ss,Ts,Ns,Is){Ts=Ts.render;var $s=Ss.ref;if("ref"in Ns){var Ks={};for(var Ci in Ns)Ci!=="ref"&&(Ks[Ci]=Ns[Ci])}else Ks=Ns;return Ru(Ss),Ns=_p(vs,Ss,Ts,Ks,$s,Is),Ci=Ap(),vs!==null&&!cl?(kp(vs,Ss,Is),Pc(vs,Ss,Is)):(yo&&Ci&&Nf(Ss),Ss.flags|=1,fl(vs,Ss,Ns,Is),Ss.child)}function uy(vs,Ss,Ts,Ns,Is){if(vs===null){var $s=Ts.type;return typeof $s=="function"&&!op($s)&&$s.defaultProps===void 0&&Ts.compare===null?(Ss.tag=15,Ss.type=$s,dy(vs,Ss,$s,Ns,Is)):(vs=Af(Ts.type,null,Ns,Ss,Ss.mode,Is),vs.ref=Ss.ref,vs.return=Ss,Ss.child=vs)}if($s=vs.child,!eh(vs,Is)){var Ks=$s.memoizedProps;if(Ts=Ts.compare,Ts=Ts!==null?Ts:Md,Ts(Ks,Ns)&&vs.ref===Ss.ref)return Pc(vs,Ss,Is)}return Ss.flags|=1,vs=Nc($s,Ns),vs.ref=Ss.ref,vs.return=Ss,Ss.child=vs}function dy(vs,Ss,Ts,Ns,Is){if(vs!==null){var $s=vs.memoizedProps;if(Md($s,Ns)&&vs.ref===Ss.ref)if(cl=!1,Ss.pendingProps=Ns=$s,eh(vs,Is))(vs.flags&131072)!==0&&(cl=!0);else return Ss.lanes=vs.lanes,Pc(vs,Ss,Is)}return Gp(vs,Ss,Ts,Ns,Is)}function fy(vs,Ss,Ts,Ns){var Is=Ns.children,$s=vs!==null?vs.memoizedState:null;if(vs===null&&Ss.stateNode===null&&(Ss.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Ns.mode==="hidden"){if((Ss.flags&128)!==0){if($s=$s!==null?$s.baseLanes|Ts:Ts,vs!==null){for(Ns=Ss.child=vs.child,Is=0;Ns!==null;)Is=Is|Ns.lanes|Ns.childLanes,Ns=Ns.sibling;Ns=Is&~$s}else Ns=0,Ss.child=null;return my(vs,Ss,$s,Ts,Ns)}if((Ts&536870912)!==0)Ss.memoizedState={baseLanes:0,cachePool:null},vs!==null&&$f(Ss,$s!==null?$s.cachePool:null),$s!==null?hx(Ss,$s):Sp(),gx(Ss);else return Ns=Ss.lanes=536870912,my(vs,Ss,$s!==null?$s.baseLanes|Ts:Ts,Ts,Ns)}else $s!==null?($f(Ss,$s.cachePool),hx(Ss,$s),tu(),Ss.memoizedState=null):(vs!==null&&$f(Ss,null),Sp(),tu());return fl(vs,Ss,Is,Ts),Ss.child}function Yd(vs,Ss){return vs!==null&&vs.tag===22||Ss.stateNode!==null||(Ss.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Ss.sibling}function my(vs,Ss,Ts,Ns,Is){var $s=xp();return $s=$s===null?null:{parent:ol._currentValue,pool:$s},Ss.memoizedState={baseLanes:Ts,cachePool:$s},vs!==null&&$f(Ss,null),Sp(),gx(Ss),vs!==null&&Su(vs,Ss,Ns,!0),Ss.childLanes=Is,null}function Xf(vs,Ss){return Ss=em({mode:Ss.mode,children:Ss.children},vs.mode),Ss.ref=vs.ref,vs.child=Ss,Ss.return=vs,Ss}function py(vs,Ss,Ts){return Au(Ss,vs.child,null,Ts),vs=Xf(Ss,Ss.pendingProps),vs.flags|=2,ql(Ss),Ss.memoizedState=null,vs}function $b(vs,Ss,Ts){var Ns=Ss.pendingProps,Is=(Ss.flags&128)!==0;if(Ss.flags&=-129,vs===null){if(yo){if(Ns.mode==="hidden")return vs=Xf(Ss,Ns),Ss.lanes=536870912,vs.memoizedState={baseLanes:0,cachePool:null},Yd(null,vs);if(jp(Ss),(vs=qo)?(vs=U1(vs,tc),vs=vs!==null&&vs.data==="&"?vs:null,vs!==null&&(Ss.memoizedState={dehydrated:vs,treeContext:Vc!==null?{id:gc,overflow:xc}:null,retryLane:536870912,hydrationErrors:null},Ts=Jg(vs),Ts.return=Ss,Ss.child=Ts,xl=Ss,qo=null)):vs=null,vs===null)throw Gc(Ss);return Ss.lanes=536870912,null}return Xf(Ss,Ns)}var $s=vs.memoizedState;if($s!==null){var Ks=$s.dehydrated;if(jp(Ss),Is)if(Ss.flags&256)Ss.flags&=-257,Ss=py(vs,Ss,Ts);else if(Ss.memoizedState!==null)Ss.child=vs.child,Ss.flags|=128,Ss=null;else throw Error(xs(558));else if(cl||Su(vs,Ss,Ts,!1),Is=(Ts&vs.childLanes)!==0,cl||Is){if(Xc.current===null){if(Ns=Ho,Ns!==null&&(Ks=Oo(Ns,Ts),Ks!==0&&Ks!==$s.retryLane))throw $s.retryLane=Ks,bu(vs,Ks),Bl(Ns,vs,Ks),Wp;bm()}Ss=py(vs,Ss,Ts)}else vs=$s.treeContext,qo=rc(Ks.nextSibling),xl=Ss,yo=!0,Wc=null,tc=!1,vs!==null&&ex(Ss,vs),Ss=Xf(Ss,Ns),Ss.flags|=134221824;return Ss}return vs=Nc(vs.child,{mode:Ns.mode,children:Ns.children}),vs.ref=Ss.ref,Ss.child=vs,vs.return=Ss,vs}function sd(vs,Ss){var Ts=Ss.ref;if(Ts===null)vs!==null&&vs.ref!==null&&(Ss.flags|=4194816);else{if(typeof Ts!="function"&&typeof Ts!="object")throw Error(xs(284));(vs===null||vs.ref!==Ts)&&(Ss.flags|=4194816)}}function Gp(vs,Ss,Ts,Ns,Is){return Ru(Ss),Ts=_p(vs,Ss,Ts,Ns,void 0,Is),Ns=Ap(),vs!==null&&!cl?(kp(vs,Ss,Is),Pc(vs,Ss,Is)):(yo&&Ns&&Nf(Ss),Ss.flags|=1,fl(vs,Ss,Ts,Is),Ss.child)}function hy(vs,Ss,Ts,Ns,Is,$s){return Ru(Ss),Ss.updateQueue=null,Ts=yx(Ss,Ns,Ts,Is),xx(vs),Ns=Ap(),vs!==null&&!cl?(kp(vs,Ss,$s),Pc(vs,Ss,$s)):(yo&&Ns&&Nf(Ss),Ss.flags|=1,fl(vs,Ss,Ts,$s),Ss.child)}function gy(vs,Ss,Ts,Ns,Is){if(Ru(Ss),Ss.stateNode===null){var $s=Yu,Ks=Ts.contextType;typeof Ks=="object"&&Ks!==null&&($s=Sl(Ks)),$s=new Ts(Ns,$s),Ss.memoizedState=$s.state!==null&&$s.state!==void 0?$s.state:null,$s.updater=qp,Ss.stateNode=$s,$s._reactInternals=Ss,$s=Ss.stateNode,$s.props=Ns,$s.state=Ss.memoizedState,$s.refs={},bp(Ss),Ks=Ts.contextType,$s.context=typeof Ks=="object"&&Ks!==null?Sl(Ks):Yu,$s.state=Ss.memoizedState,Ks=Ts.getDerivedStateFromProps,typeof Ks=="function"&&(Hp(Ss,Ts,Ks,Ns),$s.state=Ss.memoizedState),typeof Ts.getDerivedStateFromProps=="function"||typeof $s.getSnapshotBeforeUpdate=="function"||typeof $s.UNSAFE_componentWillMount!="function"&&typeof $s.componentWillMount!="function"||(Ks=$s.state,typeof $s.componentWillMount=="function"&&$s.componentWillMount(),typeof $s.UNSAFE_componentWillMount=="function"&&$s.UNSAFE_componentWillMount(),Ks!==$s.state&&qp.enqueueReplaceState($s,$s.state,null),Hd(Ss,Ns,$s,Is),zd(),$s.state=Ss.memoizedState),typeof $s.componentDidMount=="function"&&(Ss.flags|=4194308),Ns=!0}else if(vs===null){$s=Ss.stateNode;var Ci=Ss.memoizedProps,ma=Nu(Ts,Ci);$s.props=ma;var Sa=$s.context,Aa=Ts.contextType;Ks=Yu,typeof Aa=="object"&&Aa!==null&&(Ks=Sl(Aa));var Pa=Ts.getDerivedStateFromProps;Aa=typeof Pa=="function"||typeof $s.getSnapshotBeforeUpdate=="function",Ci=Ss.pendingProps!==Ci,Aa||typeof $s.UNSAFE_componentWillReceiveProps!="function"&&typeof $s.componentWillReceiveProps!="function"||(Ci||Sa!==Ks)&&ny(Ss,$s,Ns,Ks),Zc=!1;var va=Ss.memoizedState;$s.state=va,Hd(Ss,Ns,$s,Is),zd(),Sa=Ss.memoizedState,Ci||va!==Sa||Zc?(typeof Pa=="function"&&(Hp(Ss,Ts,Pa,Ns),Sa=Ss.memoizedState),(ma=Zc||ty(Ss,Ts,ma,Ns,va,Sa,Ks))?(Aa||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"&&(Ss.flags|=4194308)):(typeof $s.componentDidMount=="function"&&(Ss.flags|=4194308),Ss.memoizedProps=Ns,Ss.memoizedState=Sa),$s.props=Ns,$s.state=Sa,$s.context=Ks,Ns=ma):(typeof $s.componentDidMount=="function"&&(Ss.flags|=4194308),Ns=!1)}else{$s=Ss.stateNode,Ep(vs,Ss),Ks=Ss.memoizedProps,Aa=Nu(Ts,Ks),$s.props=Aa,Pa=Ss.pendingProps,va=$s.context,Sa=Ts.contextType,ma=Yu,typeof Sa=="object"&&Sa!==null&&(ma=Sl(Sa)),Ci=Ts.getDerivedStateFromProps,(Sa=typeof Ci=="function"||typeof $s.getSnapshotBeforeUpdate=="function")||typeof $s.UNSAFE_componentWillReceiveProps!="function"&&typeof $s.componentWillReceiveProps!="function"||(Ks!==Pa||va!==ma)&&ny(Ss,$s,Ns,ma),Zc=!1,va=Ss.memoizedState,$s.state=va,Hd(Ss,Ns,$s,Is),zd();var Ta=Ss.memoizedState;Ks!==Pa||va!==Ta||Zc||vs!==null&&vs.dependencies!==null&&If(vs.dependencies)?(typeof Ci=="function"&&(Hp(Ss,Ts,Ci,Ns),Ta=Ss.memoizedState),(Aa=Zc||ty(Ss,Ts,Aa,Ns,va,Ta,ma)||vs!==null&&vs.dependencies!==null&&If(vs.dependencies))?(Sa||typeof $s.UNSAFE_componentWillUpdate!="function"&&typeof $s.componentWillUpdate!="function"||(typeof $s.componentWillUpdate=="function"&&$s.componentWillUpdate(Ns,Ta,ma),typeof $s.UNSAFE_componentWillUpdate=="function"&&$s.UNSAFE_componentWillUpdate(Ns,Ta,ma)),typeof $s.componentDidUpdate=="function"&&(Ss.flags|=4),typeof $s.getSnapshotBeforeUpdate=="function"&&(Ss.flags|=1024)):(typeof $s.componentDidUpdate!="function"||Ks===vs.memoizedProps&&va===vs.memoizedState||(Ss.flags|=4),typeof $s.getSnapshotBeforeUpdate!="function"||Ks===vs.memoizedProps&&va===vs.memoizedState||(Ss.flags|=1024),Ss.memoizedProps=Ns,Ss.memoizedState=Ta),$s.props=Ns,$s.state=Ta,$s.context=ma,Ns=Aa):(typeof $s.componentDidUpdate!="function"||Ks===vs.memoizedProps&&va===vs.memoizedState||(Ss.flags|=4),typeof $s.getSnapshotBeforeUpdate!="function"||Ks===vs.memoizedProps&&va===vs.memoizedState||(Ss.flags|=1024),Ns=!1)}return $s=Ns,sd(vs,Ss),Ns=(Ss.flags&128)!==0,$s||Ns?($s=Ss.stateNode,Ts=Ns&&typeof Ts.getDerivedStateFromError!="function"?null:$s.render(),Ss.flags|=1,vs!==null&&Ns?(Ss.child=Au(Ss,vs.child,null,Is),Ss.child=Au(Ss,null,Ts,Is)):fl(vs,Ss,Ts,Is),Ss.memoizedState=$s.state,vs=Ss.child):vs=Pc(vs,Ss,Is),vs}function xy(vs,Ss,Ts,Ns){return vu(),Ss.flags|=256,fl(vs,Ss,Ts,Ns),Ss.child}var Yp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kp(vs){return{baseLanes:vs,cachePool:ax()}}function Zp(vs,Ss,Ts){return vs=vs!==null?vs.childLanes&~Ts:0,Ss&&(vs|=Gl),vs}function yy(vs,Ss,Ts){var Ns=Ss.pendingProps,Is=!1,$s=(Ss.flags&128)!==0,Ks;if((Ks=$s)||(Ks=vs!==null&&vs.memoizedState===null?!1:(jl.current&2)!==0),Ks&&(Is=!0,Ss.flags&=-129),Ks=(Ss.flags&32)!==0,Ss.flags&=-33,vs===null){if(yo){if(Is?eu(Ss):tu(),(vs=qo)?(vs=U1(vs,tc),vs=vs!==null&&vs.data!=="&"?vs:null,vs!==null&&(Ss.memoizedState={dehydrated:vs,treeContext:Vc!==null?{id:gc,overflow:xc}:null,retryLane:536870912,hydrationErrors:null},Ts=Jg(vs),Ts.return=Ss,Ss.child=Ts,xl=Ss,qo=null)):vs=null,vs===null)throw Gc(Ss);return Zh(vs)?Ss.lanes=32:Ss.lanes=536870912,null}return $s=Ns.children,Ns=Ns.fallback,Is?(tu(),Is=Ss.mode,$s=em({mode:"hidden",children:$s},Is),Ns=Eu(Ns,Is,Ts,null),$s.return=Ss,Ns.return=Ss,$s.sibling=Ns,Ss.child=$s,Ns=Ss.child,Ns.memoizedState=Kp(Ts),Ns.childLanes=Zp(vs,Ks,Ts),Ss.memoizedState=Yp,Yd(null,Ns)):(eu(Ss),Jp(Ss,$s))}var Ci=vs.memoizedState;if(Ci!==null){var ma=Ci.dehydrated;if(ma!==null)return Pb(vs,Ss,$s,Ks,Ns,ma,Ci,Ts)}return Is?(tu(),Is=Ns.fallback,$s=Ss.mode,Ci=vs.child,ma=Ci.sibling,Ns=Nc(Ci,{mode:"hidden",children:Ns.children}),Ns.subtreeFlags=Ci.subtreeFlags&1206910976,ma!==null?Is=Nc(ma,Is):(Is=Eu(Is,$s,Ts,null),Is.flags|=2),Is.return=Ss,Ns.return=Ss,Ns.sibling=Is,Ss.child=Ns,Yd(null,Ns),Ns=Ss.child,Is=vs.child.memoizedState,Is===null?Is=Kp(Ts):($s=Is.cachePool,$s!==null?(Ci=ol._currentValue,$s=$s.parent!==Ci?{parent:Ci,pool:Ci}:$s):$s=ax(),Is={baseLanes:Is.baseLanes|Ts,cachePool:$s}),Ns.memoizedState=Is,Ns.childLanes=Zp(vs,Ks,Ts),Ss.memoizedState=Yp,Yd(vs.child,Ns)):(eu(Ss),Ts=vs.child,vs=Ts.sibling,Ts=Nc(Ts,{mode:"visible",children:Ns.children}),Ts.return=Ss,Ts.sibling=null,vs!==null&&(Ks=Ss.deletions,Ks===null?(Ss.deletions=[vs],Ss.flags|=16):Ks.push(vs)),Ss.child=Ts,Ss.memoizedState=null,Ts)}function Jp(vs,Ss){return Ss=em({mode:"visible",children:Ss},vs.mode),Ss.return=vs,vs.child=Ss}function em(vs,Ss){return vs=Pl(22,vs,null,Ss),vs.lanes=0,vs}function tm(vs,Ss,Ts){return Au(Ss,vs.child,null,Ts),vs=Jp(Ss,Ss.pendingProps.children),vs.flags|=2,Ss.memoizedState=null,vs}function Pb(vs,Ss,Ts,Ns,Is,$s,Ks,Ci){if(Ts)return Ss.flags&256?(eu(Ss),Ss.flags&=-257,tm(vs,Ss,Ci)):Ss.memoizedState!==null?(tu(),Ss.child=vs.child,Ss.flags|=128,null):(tu(),$s=Is.fallback,Ks=Ss.mode,Is=em({mode:"visible",children:Is.children},Ks),$s=Eu($s,Ks,Ci,null),$s.flags|=2,Is.return=Ss,$s.return=Ss,Is.sibling=$s,Ss.child=Is,Au(Ss,vs.child,null,Ci),Is=Ss.child,Is.memoizedState=Kp(Ci),Is.childLanes=Zp(vs,Ns,Ci),Ss.memoizedState=Yp,Yd(null,Is));if(eu(Ss),Zh($s)){if(Ns=$s.nextSibling&&$s.nextSibling.dataset,Ns)var ma=Ns.dgst;return Ns=ma,Ns!==""&&(Is=Error(xs(419)),Is.stack="",Is.digest=Ns,$d({value:Is,source:null,stack:null})),tm(vs,Ss,Ci)}if(cl||Su(vs,Ss,Ci,!1),Ns=(Ci&vs.childLanes)!==0,cl||Ns){if(Xc.current!==null)return tm(vs,Ss,Ci);if(Ns=Ho,Ns!==null&&(Is=Oo(Ns,Ci),Is!==0&&Is!==Ks.retryLane))throw Ks.retryLane=Is,bu(vs,Is),Bl(Ns,vs,Is),Wp;return Kh($s)||bm(),tm(vs,Ss,Ci)}return Kh($s)?(Ss.flags|=192,Ss.child=vs.child,null):(vs=Ks.treeContext,qo=rc($s.nextSibling),xl=Ss,yo=!0,Wc=null,tc=!1,vs!==null&&ex(Ss,vs),Ss=Jp(Ss,Is.children),Ss.flags|=134221824,Ss)}function by(vs,Ss,Ts){vs.lanes|=Ss;var Ns=vs.alternate;Ns!==null&&(Ns.lanes|=Ss),Mf(vs.return,Ss,Ts)}function Ey(vs){for(var Ss=null;vs!==null;){var Ts=vs.alternate;Ts!==null&&zf(Ts)===null&&(Ss=vs),vs=vs.sibling}return Ss}function nm(vs,Ss,Ts,Ns,Is,$s){var Ks=vs.memoizedState;Ks===null?vs.memoizedState={isBackwards:Ss,rendering:null,renderingStartTime:0,last:Ns,tail:Ts,tailMode:Is,treeForkCount:$s}:(Ks.isBackwards=Ss,Ks.rendering=null,Ks.renderingStartTime=0,Ks.last=Ns,Ks.tail=Ts,Ks.tailMode=Is,Ks.treeForkCount=$s)}function Qp(vs){var Ss=vs.child;for(vs.child=null;Ss!==null;){var Ts=Ss.sibling;Ss.sibling=vs.child,vs.child=Ss,Ss=Ts}}function Xp(vs,Ss,Ts){var Ns=Ss.pendingProps,Is=Ns.revealOrder,$s=Ns.tail;Ns=Ns.children;var Ks=jl.current;if(Ss.flags&128)return qd(Ss,Ks),null;var Ci=(Ks&2)!==0;if(Ci?(Ks=Ks&1|2,Ss.flags|=128):Ks&=1,qd(Ss,Ks),Is==="backwards"&&vs!==null?(Qp(vs),fl(vs,Ss,Ns,Ts),Qp(vs)):fl(vs,Ss,Ns,Ts),Ns=yo?Dd:0,!Ci&&vs!==null&&(vs.flags&128)!==0)e:for(vs=Ss.child;vs!==null;){if(vs.tag===13)vs.memoizedState!==null&&by(vs,Ts,Ss);else if(vs.tag===19)by(vs,Ts,Ss);else if(vs.child!==null){vs.child.return=vs,vs=vs.child;continue}if(vs===Ss)break e;for(;vs.sibling===null;){if(vs.return===null||vs.return===Ss)break e;vs=vs.return}vs.sibling.return=vs.return,vs=vs.sibling}switch(Is){case"backwards":Ts=Ey(Ss.child),Ts===null?(Is=Ss.child,Ss.child=null):(Is=Ts.sibling,Ts.sibling=null,Qp(Ss)),nm(Ss,!0,Is,null,$s,Ns);break;case"unstable_legacy-backwards":for(Ts=null,Is=Ss.child,Ss.child=null;Is!==null;){if(vs=Is.alternate,vs!==null&&zf(vs)===null){Ss.child=Is;break}vs=Is.sibling,Is.sibling=Ts,Ts=Is,Is=vs}nm(Ss,!0,Ts,null,$s,Ns);break;case"together":nm(Ss,!1,null,null,void 0,Ns);break;case"independent":Ss.memoizedState=null;break;default:Ts=Ey(Ss.child),Ts===null?(Is=Ss.child,Ss.child=null):(Is=Ts.sibling,Ts.sibling=null),nm(Ss,!1,Is,Ts,$s,Ns)}return Ss.child}function vy(vs,Ss,Ts){var Ns=Ss.pendingProps;return Yc(Ss,Ss.type,Ns.value),fl(vs,Ss,Ns.children,Ts),Ss.child}function Pc(vs,Ss,Ts){if(vs!==null&&(Ss.dependencies=vs.dependencies),iu|=Ss.lanes,(Ts&Ss.childLanes)===0)if(vs!==null){if(Su(vs,Ss,Ts,!1),(Ts&Ss.childLanes)===0)return null}else return null;if(vs!==null&&Ss.child!==vs.child)throw Error(xs(153));if(Ss.child!==null){for(vs=Ss.child,Ts=Nc(vs,vs.pendingProps),Ss.child=Ts,Ts.return=Ss;vs.sibling!==null;)vs=vs.sibling,Ts=Ts.sibling=Nc(vs,vs.pendingProps),Ts.return=Ss;Ts.sibling=null}return Ss.child}function eh(vs,Ss){return(vs.lanes&Ss)!==0?!0:(vs=vs.dependencies,!!(vs!==null&&If(vs)))}function Lb(vs,Ss,Ts){switch(Ss.tag){case 3:sl(Ss,Ss.stateNode.containerInfo),Yc(Ss,ol,vs.memoizedState.cache),vu();break;case 27:case 5:Ro(Ss);break;case 4:sl(Ss,Ss.stateNode.containerInfo);break;case 10:Yc(Ss,Ss.type,Ss.memoizedProps.value);break;case 31:if(Ss.memoizedState!==null)return Ss.flags|=128,jp(Ss),null;break;case 13:var Ns=Ss.memoizedState;if(Ns!==null){if(Ns.dehydrated!==null)return eu(Ss),Ss.flags|=128,null;Ns=Su(vs,Ss,Ts,!1);var Is=Ss.child.childLanes;return Ns||(Ts&Is)!==0?yy(vs,Ss,Ts):(eu(Ss),vs=Pc(vs,Ss,Ts),vs!==null?vs.sibling:null)}eu(Ss);break;case 19:if(Ss.flags&128)return Xp(vs,Ss,Ts);if(Is=(vs.flags&128)!==0,Ns=(Ts&Ss.childLanes)!==0,Ns||(Su(vs,Ss,Ts,!1),Ns=(Ts&Ss.childLanes)!==0),Is){if(Ns)return Xp(vs,Ss,Ts);Ss.flags|=128}if(Is=Ss.memoizedState,Is!==null&&(Is.rendering=null,Is.tail=null,Is.lastEffect=null),qd(Ss,jl.current),Ns)break;return null;case 22:return Ss.lanes=0,fy(vs,Ss,Ts,Ss.pendingProps);case 24:Yc(Ss,ol,vs.memoizedState.cache)}return Pc(vs,Ss,Ts)}function wy(vs,Ss,Ts){if(vs!==null)if(vs.memoizedProps!==Ss.pendingProps)cl=!0;else{if(!eh(vs,Ts)&&(Ss.flags&128)===0)return cl=!1,Lb(vs,Ss,Ts);cl=(vs.flags&131072)!==0}else cl=!1,yo&&(Ss.flags&1048576)!==0&&Xg(Ss,Dd,Ss.index);switch(Ss.lanes=0,Ss.tag){case 16:e:{var Ns=Ss.pendingProps;if(vs=Tu(Ss.elementType),Ss.type=vs,typeof vs=="function")op(vs)?(Ns=Nu(vs,Ns),Ss.tag=1,Ss=gy(null,Ss,vs,Ns,Ts)):(Ss.tag=0,Ss=Gp(null,Ss,vs,Ns,Ts));else{if(vs!=null){var Is=vs.$$typeof;if(Is===aa){Ss.tag=11,Ss=cy(null,Ss,vs,Ns,Ts);break e}else if(Is===Ea){Ss.tag=14,Ss=uy(null,Ss,vs,Ns,Ts);break e}else if(Is===ta){Ss.tag=10,Ss.type=vs,Ss=vy(null,Ss,Ts);break e}}throw Ss=Ga(vs)||vs,Error(xs(306,Ss,""))}}return Ss;case 0:return Gp(vs,Ss,Ss.type,Ss.pendingProps,Ts);case 1:return Ns=Ss.type,Is=Nu(Ns,Ss.pendingProps),gy(vs,Ss,Ns,Is,Ts);case 3:e:{if(sl(Ss,Ss.stateNode.containerInfo),vs===null)throw Error(xs(387));Ns=Ss.pendingProps;var $s=Ss.memoizedState;Is=$s.element,Ep(vs,Ss),Hd(Ss,Ns,null,Ts);var Ks=Ss.memoizedState;if(Ns=Ks.cache,Yc(Ss,ol,Ns),Ns!==$s.cache&&pp(Ss,[ol],Ts,!0),zd(),Ns=Ks.element,$s.isDehydrated)if($s={element:Ns,isDehydrated:!1,cache:Ks.cache},Ss.updateQueue.baseState=$s,Ss.memoizedState=$s,Ss.flags&256){Ss=xy(vs,Ss,Ns,Ts);break e}else if(Ns!==Is){Is=Ql(Error(xs(424)),Ss),$d(Is),Ss=xy(vs,Ss,Ns,Ts);break e}else for(vs=Ss.stateNode.containerInfo,vs.nodeType===9?vs=vs.body:vs=vs.nodeName==="HTML"?vs.ownerDocument.body:vs,qo=rc(vs.firstChild),xl=Ss,yo=!0,Wc=null,tc=!0,Ts=fx(Ss,null,Ns,Ts),Ss.child=Ts;Ts;)Ts.flags=Ts.flags&-3|134221824,Ts=Ts.sibling;else{if(vu(),Ns===Is){Ss=Pc(vs,Ss,Ts);break e}fl(vs,Ss,Ns,Ts)}Ss=Ss.child}return Ss;case 26:return sd(vs,Ss),vs===null?(Ts=G1(Ss.type,null,Ss.pendingProps,null))?Ss.memoizedState=Ts:yo||(Ss.stateNode=C1(Ss.type,Ss.pendingProps,Ao.current,Ss)):Ss.memoizedState=G1(Ss.type,vs.memoizedProps,Ss.pendingProps,vs.memoizedState),null;case 27:return Ro(Ss),vs===null&&yo&&(Ns=Ss.stateNode=H1(Ss.type,Ss.pendingProps,Ao.current),xl=Ss,tc=!0,Is=qo,cu(Ss.type)?(Jh=Is,qo=rc(Ns.firstChild)):qo=Is),fl(vs,Ss,Ss.pendingProps.children,Ts),sd(vs,Ss),vs===null&&(Ss.flags|=4194304),Ss.child;case 5:return vs===null&&yo&&((Is=Ns=qo)&&(Ns=ME(Ns,Ss.type,Ss.pendingProps,tc),Ns!==null?(Ss.stateNode=Ns,xl=Ss,qo=rc(Ns.firstChild),tc=!1,Is=!0):Is=!1),Is||Gc(Ss)),Ro(Ss),Is=Ss.type,$s=Ss.pendingProps,Ks=vs!==null?vs.memoizedProps:null,Ns=$s.children,zh(Is,$s)?Ns=null:Ks!==null&&zh(Is,Ks)&&(Ss.flags|=32),Ss.memoizedState!==null&&(Is=_p(vs,Ss,Tb,null,null,Ts),wd._currentValue=Is),sd(vs,Ss),fl(vs,Ss,Ns,Ts),Ss.child;case 6:return vs===null&&yo&&((vs=Ts=qo)&&(Ts=IE(Ts,Ss.pendingProps,tc),Ts!==null?(Ss.stateNode=Ts,xl=Ss,qo=null,vs=!0):vs=!1),vs||Gc(Ss)),null;case 13:return yy(vs,Ss,Ts);case 4:return sl(Ss,Ss.stateNode.containerInfo),Ns=Ss.pendingProps,vs===null?Ss.child=Au(Ss,null,Ns,Ts):fl(vs,Ss,Ns,Ts),Ss.child;case 11:return cy(vs,Ss,Ss.type,Ss.pendingProps,Ts);case 7:return Ns=Ss.pendingProps,sd(vs,Ss),fl(vs,Ss,Ns,Ts),Ss.child;case 8:return fl(vs,Ss,Ss.pendingProps.children,Ts),Ss.child;case 12:return fl(vs,Ss,Ss.pendingProps.children,Ts),Ss.child;case 10:return vy(vs,Ss,Ts);case 9:return Is=Ss.type._context,Ns=Ss.pendingProps.children,Ru(Ss),Is=Sl(Is),Ns=Ns(Is),Ss.flags|=1,fl(vs,Ss,Ns,Ts),Ss.child;case 14:return uy(vs,Ss,Ss.type,Ss.pendingProps,Ts);case 15:return dy(vs,Ss,Ss.type,Ss.pendingProps,Ts);case 19:return Xp(vs,Ss,Ts);case 31:return $b(vs,Ss,Ts);case 22:return fy(vs,Ss,Ts,Ss.pendingProps);case 24:return Ru(Ss),Ns=Sl(ol),vs===null?(Is=xp(),Is===null&&(Is=Ho,$s=hp(),Is.pooledCache=$s,$s.refCount++,$s!==null&&(Is.pooledCacheLanes|=Ts),Is=$s),Ss.memoizedState={parent:Ns,cache:Is},bp(Ss),Yc(Ss,ol,Is)):((vs.lanes&Ts)!==0&&(Ep(vs,Ss),Hd(Ss,null,null,Ts),zd()),Is=vs.memoizedState,$s=Ss.memoizedState,Is.parent!==Ns?(Is={parent:Ns,cache:Ns},Ss.memoizedState=Is,Ss.lanes===0&&(Ss.memoizedState=Ss.updateQueue.baseState=Is),Yc(Ss,ol,Ns)):(Ns=$s.cache,Yc(Ss,ol,Ns),Ns!==Is.cache&&pp(Ss,[ol],Ts,!0))),fl(vs,Ss,Ss.pendingProps.children,Ts),Ss.child;case 30:return Ss.stateNode===null&&(Ss.stateNode={autoName:null,paired:null,clones:null,ref:null}),Ns=Ss.pendingProps,Ns.name!=null&&Ns.name!=="auto"?Ss.flags|=vs===null?18882560:18874368:yo&&Nf(Ss),vs!==null&&vs.memoizedProps.name!==Ns.name?Ss.flags|=4194816:sd(vs,Ss),fl(vs,Ss,Ns.children,Ts),Ss.child;case 29:throw Ss.pendingProps}throw Error(xs(156,Ss.tag))}function Lc(vs){vs.flags|=4}function th(vs,Ss,Ts,Ns,Is){var $s;if(($s=(vs.mode&32)!==0)&&($s=Ts===null?J1(Ss,Ns):J1(Ss,Ns)&&(Ns.src!==Ts.src||Ns.srcSet!==Ts.srcSet)),$s){if(vs.flags|=16777216,(Is&335544128)===Is)if(vs.stateNode.complete)vs.flags|=8192;else if(r1())vs.flags|=8192;else throw _u=Lf,yp}else vs.flags&=-16777217}function Sy(vs,Ss){if(Ss.type!=="stylesheet"||(Ss.state.loading&4)!==0)vs.flags&=-16777217;else if(vs.flags|=16777216,!Q1(Ss))if(r1())vs.flags|=8192;else throw _u=Lf,yp}function rm(vs,Ss){Ss!==null&&(vs.flags|=4),vs.flags&16384&&(Ss=vs.tag!==22?so():536870912,vs.lanes|=Ss,cd|=Ss)}function Kd(vs,Ss){if(!yo)switch(vs.tailMode){case"visible":break;case"collapsed":for(var Ts=vs.tail,Ns=null;Ts!==null;)Ts.alternate!==null&&(Ns=Ts),Ts=Ts.sibling;Ns===null?Ss||vs.tail===null?vs.tail=null:vs.tail.sibling=null:Ns.sibling=null;break;default:for(Ss=vs.tail,Ts=null;Ss!==null;)Ss.alternate!==null&&(Ts=Ss),Ss=Ss.sibling;Ts===null?vs.tail=null:Ts.sibling=null}}function Vo(vs){var Ss=vs.alternate!==null&&vs.alternate.child===vs.child,Ts=0,Ns=0;if(Ss)for(var Is=vs.child;Is!==null;)Ts|=Is.lanes|Is.childLanes,Ns|=Is.subtreeFlags&1206910976,Ns|=Is.flags&1206910976,Is.return=vs,Is=Is.sibling;else for(Is=vs.child;Is!==null;)Ts|=Is.lanes|Is.childLanes,Ns|=Is.subtreeFlags,Ns|=Is.flags,Is.return=vs,Is=Is.sibling;return vs.subtreeFlags|=Ns,vs.childLanes=Ts,Ss}function Fb(vs,Ss,Ts){var Ns=Ss.pendingProps;switch(up(Ss),Ss.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vo(Ss),null;case 1:return Vo(Ss),null;case 3:return Ts=Ss.stateNode,Ns=null,vs!==null&&(Ns=vs.memoizedState.cache),Ss.memoizedState.cache!==Ns&&(Ss.flags|=2048),Ic(ol),Po(),Ts.pendingContext&&(Ts.context=Ts.pendingContext,Ts.pendingContext=null),(vs===null||vs.child===null)&&(Ju(Ss)?Lc(Ss):vs===null||vs.memoizedState.isDehydrated&&(Ss.flags&256)===0||(Ss.flags|=1024,fp())),Vo(Ss),null;case 26:var Is=Ss.type,$s=Ss.memoizedState;return vs===null?(Lc(Ss),$s!==null?(Vo(Ss),Sy(Ss,$s)):(Vo(Ss),th(Ss,Is,null,Ns,Ts))):$s?$s!==vs.memoizedState?(Lc(Ss),Vo(Ss),Sy(Ss,$s)):(Vo(Ss),Ss.flags&=-16777217):(vs=vs.memoizedProps,vs!==Ns&&Lc(Ss),Vo(Ss),th(Ss,Is,vs,Ns,Ts)),null;case 27:if(Vs(Ss),Ts=Ao.current,Is=Ss.type,vs!==null&&Ss.stateNode!=null)vs.memoizedProps!==Ns&&Lc(Ss);else{if(!Ns){if(Ss.stateNode===null)throw Error(xs(166));return Vo(Ss),Ss.subtreeFlags&=-33554433,null}vs=uo.current,Ju(Ss)?tx(Ss):(vs=H1(Is,Ns,Ts),Ss.stateNode=vs,Lc(Ss))}return Vo(Ss),Ss.subtreeFlags&=-33554433,null;case 5:if(Vs(Ss),Is=Ss.type,vs!==null&&Ss.stateNode!=null)vs.memoizedProps!==Ns&&Lc(Ss);else{if(!Ns){if(Ss.stateNode===null)throw Error(xs(166));return Vo(Ss),Ss.subtreeFlags&=-33554433,null}if($s=uo.current,Ju(Ss))tx(Ss);else{var Ks=of(Ao.current);switch($s){case 1:$s=Ks.createElementNS("http://www.w3.org/2000/svg",Is);break;case 2:$s=Ks.createElementNS("http://www.w3.org/1998/Math/MathML",Is);break;default:switch(Is){case"svg":$s=Ks.createElementNS("http://www.w3.org/2000/svg",Is);break;case"math":$s=Ks.createElementNS("http://www.w3.org/1998/Math/MathML",Is);break;case"script":$s=Ks.createElement("div"),$s.innerHTML="<script><\/script>",$s=$s.removeChild($s.firstChild);break;case"select":$s=typeof Ns.is=="string"?Ks.createElement("select",{is:Ns.is}):Ks.createElement("select"),Ns.multiple?$s.multiple=!0:Ns.size&&($s.size=Ns.size);break;default:$s=typeof Ns.is=="string"?Ks.createElement(Is,{is:Ns.is}):Ks.createElement(Is)}}$s[Yo]=Ss,$s[Jo]=Ns;e:for(Ks=Ss.child;Ks!==null;){if(Ks.tag===5||Ks.tag===6)$s.appendChild(Ks.stateNode);else if(Ks.tag!==4&&Ks.tag!==27&&Ks.child!==null){Ks.child.return=Ks,Ks=Ks.child;continue}if(Ks===Ss)break e;for(;Ks.sibling===null;){if(Ks.return===null||Ks.return===Ss)break e;Ks=Ks.return}Ks.sibling.return=Ks.return,Ks=Ks.sibling}Ss.stateNode=$s;e:switch(Tl($s,Is,Ns),Is){case"button":case"input":case"select":case"textarea":Ns=!!Ns.autoFocus;break e;case"img":Ns=!0;break e;default:Ns=!1}Ns&&Lc(Ss)}}return Vo(Ss),Ss.subtreeFlags&=-33554433,th(Ss,Ss.type,vs===null?null:vs.memoizedProps,Ss.pendingProps,Ts),null;case 6:if(vs&&Ss.stateNode!=null)vs.memoizedProps!==Ns&&Lc(Ss);else{if(typeof Ns!="string"&&Ss.stateNode===null)throw Error(xs(166));if(vs=Ao.current,Ju(Ss)){if(vs=Ss.stateNode,Ts=Ss.memoizedProps,Ns=null,Is=xl,Is!==null)switch(Is.tag){case 27:case 5:Ns=Is.memoizedProps}vs[Yo]=Ss,vs=!!(vs.nodeValue===Ts||Ns!==null&&Ns.suppressHydrationWarning===!0||w1(vs.nodeValue,Ts)),vs||Gc(Ss,!0)}else vs=of(vs).createTextNode(Ns),vs[Yo]=Ss,Ss.stateNode=vs}return Vo(Ss),null;case 31:if(Ts=Ss.memoizedState,vs===null||vs.memoizedState!==null){if(Ns=Ju(Ss),Ts!==null){if(vs===null){if(!Ns)throw Error(xs(318));if(vs=Ss.memoizedState,vs=vs!==null?vs.dehydrated:null,!vs)throw Error(xs(557));vs[Yo]=Ss}else vu(),(Ss.flags&128)===0&&(Ss.memoizedState=null),Ss.flags|=4;Vo(Ss),vs=!1}else Ts=fp(),vs!==null&&vs.memoizedState!==null&&(vs.memoizedState.hydrationErrors=Ts),vs=!0;if(!vs)return Ss.flags&256?(ql(Ss),Ss):(ql(Ss),null);if((Ss.flags&128)!==0)throw Error(xs(558))}return Vo(Ss),null;case 13:if(Ns=Ss.memoizedState,vs===null||vs.memoizedState!==null&&vs.memoizedState.dehydrated!==null){if(Is=Ju(Ss),Ns!==null&&Ns.dehydrated!==null){if(vs===null){if(!Is)throw Error(xs(318));if(Is=Ss.memoizedState,Is=Is!==null?Is.dehydrated:null,!Is)throw Error(xs(317));Is[Yo]=Ss}else vu(),(Ss.flags&128)===0&&(Ss.memoizedState=null),Ss.flags|=4;Vo(Ss),Is=!1}else Is=fp(),vs!==null&&vs.memoizedState!==null&&(vs.memoizedState.hydrationErrors=Is),Is=!0;if(!Is)return Ss.flags&256?(ql(Ss),Ss):(ql(Ss),null)}return ql(Ss),(Ss.flags&128)!==0?(Ss.lanes=Ts,Ss):(Ts=Ns!==null,vs=vs!==null&&vs.memoizedState!==null,Ts&&(Ns=Ss.child,Is=null,Ns.alternate!==null&&Ns.alternate.memoizedState!==null&&Ns.alternate.memoizedState.cachePool!==null&&(Is=Ns.alternate.memoizedState.cachePool.pool),$s=null,Ns.memoizedState!==null&&Ns.memoizedState.cachePool!==null&&($s=Ns.memoizedState.cachePool.pool),$s!==Is&&(Ns.flags|=2048)),Ts!==vs&&Ts&&(Ss.child.flags|=8192),rm(Ss,Ss.updateQueue),Vo(Ss),null);case 4:return Po(),vs===null&&Ph(Ss.stateNode.containerInfo),Ss.flags|=67108864,Vo(Ss),null;case 10:return Ic(Ss.type),Vo(Ss),null;case 19:if(Cp(Ss),Ns=Ss.memoizedState,Ns===null)return Vo(Ss),null;if(Is=(Ss.flags&128)!==0,$s=Ns.rendering,$s===null)if(Is)Kd(Ns,!1);else{if(nl!==0||vs!==null&&(vs.flags&128)!==0)for(vs=Ss.child;vs!==null;){if($s=zf(vs),$s!==null){for(Ss.flags|=128,Kd(Ns,!1),vs=$s.updateQueue,Ss.updateQueue=vs,rm(Ss,vs),Ss.subtreeFlags=0,vs=Ts,Ts=Ss.child;Ts!==null;)Zg(Ts,vs),Ts=Ts.sibling;return qd(Ss,jl.current&1|2),yo&&Oc(Ss,Ns.treeForkCount),Ss.child}vs=vs.sibling}Ns.tail!==null&&La()>hm&&(Ss.flags|=128,Is=!0,Kd(Ns,!1),Ss.lanes=4194304)}else{if(!Is)if(vs=zf($s),vs!==null){if(Ss.flags|=128,Is=!0,vs=vs.updateQueue,Ss.updateQueue=vs,rm(Ss,vs),Kd(Ns,!0),Ns.tail===null&&Ns.tailMode!=="collapsed"&&Ns.tailMode!=="visible"&&!$s.alternate&&!yo)return Vo(Ss),null}else 2*La()-Ns.renderingStartTime>hm&&Ts!==536870912&&(Ss.flags|=128,Is=!0,Kd(Ns,!1),Ss.lanes=4194304);Ns.isBackwards?($s.sibling=Ss.child,Ss.child=$s):(vs=Ns.last,vs!==null?vs.sibling=$s:Ss.child=$s,Ns.last=$s)}if(Ns.tail!==null){vs=Ns.tail;e:{for(Ts=vs;Ts!==null;){if(Ts.alternate!==null){Ts=!1;break e}Ts=Ts.sibling}Ts=!0}return Ns.rendering=vs,Ns.tail=vs.sibling,Ns.renderingStartTime=La(),vs.sibling=null,$s=jl.current,$s=Is?$s&1|2:$s&1,Ns.tailMode==="visible"||Ns.tailMode==="collapsed"||!Ts||yo?qd(Ss,$s):(Ts=$s,Va(Rl,Ss),Va(jl,Ts),kl===null&&(kl=Ss)),yo&&Oc(Ss,Ns.treeForkCount),vs}return Vo(Ss),null;case 22:case 23:return ql(Ss),Rp(),Ns=Ss.memoizedState!==null,vs!==null?vs.memoizedState!==null!==Ns&&(Ss.flags|=8192):Ns&&(Ss.flags|=8192),Ns?(Ts&536870912)!==0&&(Ss.flags&128)===0&&(Vo(Ss),Ss.subtreeFlags&6&&(Ss.flags|=8192)):Vo(Ss),Ts=Ss.updateQueue,Ts!==null&&rm(Ss,Ts.retryQueue),Ts=null,vs!==null&&vs.memoizedState!==null&&vs.memoizedState.cachePool!==null&&(Ts=vs.memoizedState.cachePool.pool),Ns=null,Ss.memoizedState!==null&&Ss.memoizedState.cachePool!==null&&(Ns=Ss.memoizedState.cachePool.pool),Ns!==Ts&&(Ss.flags|=2048),vs!==null&&oo(Cu),null;case 24:return Ts=null,vs!==null&&(Ts=vs.memoizedState.cache),Ss.memoizedState.cache!==Ts&&(Ss.flags|=2048),Ic(ol),Vo(Ss),null;case 25:return null;case 30:return Ss.flags|=33554432,Vo(Ss),null}throw Error(xs(156,Ss.tag))}function Ub(vs,Ss){switch(up(Ss),Ss.tag){case 1:return vs=Ss.flags,vs&65536?(Ss.flags=vs&-65537|128,Ss):null;case 3:return Ic(ol),Po(),vs=Ss.flags,(vs&65536)!==0&&(vs&128)===0?(Ss.flags=vs&-65537|128,Ss):null;case 26:case 27:case 5:return Vs(Ss),null;case 31:if(Ss.memoizedState!==null){if(ql(Ss),Ss.alternate===null)throw Error(xs(340));vu()}return vs=Ss.flags,vs&65536?(Ss.flags=vs&-65537|128,Ss):null;case 13:if(ql(Ss),vs=Ss.memoizedState,vs!==null&&vs.dehydrated!==null){if(Ss.alternate===null)throw Error(xs(340));vu()}return vs=Ss.flags,vs&65536?(Ss.flags=vs&-65537|128,Ss):null;case 19:return Cp(Ss),vs=Ss.flags,vs&65536?(Ss.flags=vs&-65537|128,vs=Ss.memoizedState,vs!==null&&(vs.rendering=null,vs.tail=null),Ss.flags|=4,Ss):null;case 4:return Po(),null;case 10:return Ic(Ss.type),null;case 22:case 23:return ql(Ss),Rp(),vs!==null&&oo(Cu),vs=Ss.flags,vs&65536?(Ss.flags=vs&-65537|128,Ss):null;case 24:return Ic(ol),null;case 25:return null;default:return null}}function Ry(vs,Ss){switch(up(Ss),Ss.tag){case 3:Ic(ol),Po();break;case 26:case 27:case 5:Vs(Ss);break;case 4:Po();break;case 31:Ss.memoizedState!==null&&ql(Ss);break;case 13:ql(Ss);break;case 19:Cp(Ss);break;case 10:Ic(Ss.type);break;case 22:case 23:ql(Ss),Rp(),vs!==null&&oo(Cu);break;case 24:Ic(ol)}}function Zd(vs,Ss){try{var Ts=Ss.updateQueue,Ns=Ts!==null?Ts.lastEffect:null;if(Ns!==null){var Is=Ns.next;Ts=Is;do{if((Ts.tag&vs)===vs){Ns=void 0;var $s=Ts.create,Ks=Ts.inst;Ns=$s(),Ks.destroy=Ns}Ts=Ts.next}while(Ts!==Is)}}catch(Ci){Uo(Ss,Ss.return,Ci)}}function nu(vs,Ss,Ts){try{var Ns=Ss.updateQueue,Is=Ns!==null?Ns.lastEffect:null;if(Is!==null){var $s=Is.next;Ns=$s;do{if((Ns.tag&vs)===vs){var Ks=Ns.inst,Ci=Ks.destroy;if(Ci!==void 0){Ks.destroy=void 0,Is=Ss;var ma=Ts,Sa=Ci;try{Sa()}catch(Aa){Uo(Is,ma,Aa)}}}Ns=Ns.next}while(Ns!==$s)}}catch(Aa){Uo(Ss,Ss.return,Aa)}}function jy(vs){var Ss=vs.updateQueue;if(Ss!==null){var Ts=vs.stateNode;try{px(Ss,Ts)}catch(Ns){Uo(vs,vs.return,Ns)}}}function Cy(vs,Ss,Ts){Ts.props=Nu(vs.type,vs.memoizedProps),Ts.state=vs.memoizedState;try{Ts.componentWillUnmount()}catch(Ns){Uo(vs,Ss,Ns)}}function yc(vs,Ss){try{var Ts=vs.ref;if(Ts!==null){switch(vs.tag){case 26:case 27:case 5:var Ns=vs.stateNode;break;case 30:var Is=vs.stateNode,$s=Ac(vs.memoizedProps,Is);(Is.ref===null||Is.ref.name!==$s)&&(Is.ref=M1($s)),Ns=Is.ref;break;case 7:if(vs.stateNode===null){var Ks=new Kl(vs);ks(vs.child,!1,NE,Ks,void 0,void 0),vs.stateNode=Ks}Ns=vs.stateNode;break;default:Ns=vs.stateNode}typeof Ts=="function"?vs.refCleanup=Ts(Ns):Ts.current=Ns}}catch(Ci){Uo(vs,Ss,Ci)}}function Cl(vs,Ss){var Ts=vs.ref,Ns=vs.refCleanup;if(Ts!==null)if(typeof Ns=="function")try{Ns()}catch(Is){Uo(vs,Ss,Is)}finally{vs.refCleanup=null,vs=vs.alternate,vs!=null&&(vs.refCleanup=null)}else if(typeof Ts=="function")try{Ts(null)}catch(Is){Uo(vs,Ss,Is)}else Ts.current=null}function sm(vs,Ss){if((vs.tag===5||vs.tag===27||vs.tag===6)&&vs.alternate===null&&Ss!==null)for(var Ts=0;Ts<Ss.length;Ts++)F1(vs.stateNode,Ss[Ts])}function Ty(vs){for(var Ss=vs.return;Ss!==null&&(rh(Ss)&&F1(vs.stateNode,Ss.stateNode),!nh(Ss));)Ss=Ss.return}function Jd(vs){for(var Ss=vs.return;Ss!==null&&(rh(Ss)&&OE(vs.stateNode,Ss.stateNode),!nh(Ss));)Ss=Ss.return}function nh(vs){return vs.tag===5||vs.tag===3||vs.tag===27}function rh(vs){return vs&&vs.tag===7&&vs.stateNode!==null}function sh(vs){var Ss=vs.type,Ts=vs.memoizedProps,Ns=vs.stateNode;try{e:switch(Ss){case"button":case"input":case"select":case"textarea":Ts.autoFocus&&Ns.focus();break e;case"img":Ts.src?Ns.src=Ts.src:Ts.srcSet&&(Ns.srcset=Ts.srcSet)}}catch(Is){Uo(vs,vs.return,Is)}}function ih(vs,Ss,Ts){try{var Ns=vs.stateNode;fE(Ns,vs.type,Ts,Ss),Ns[Jo]=Ss}catch(Is){Uo(vs,vs.return,Is)}}function _y(vs){return vs.tag===5||vs.tag===3||vs.tag===26||vs.tag===27&&cu(vs.type)||vs.tag===4}function ah(vs){e:for(;;){for(;vs.sibling===null;){if(vs.return===null||_y(vs.return))return null;vs=vs.return}for(vs.sibling.return=vs.return,vs=vs.sibling;vs.tag!==5&&vs.tag!==6&&vs.tag!==18;){if(vs.tag===27&&cu(vs.type)||vs.flags&2||vs.child===null||vs.tag===4)continue e;vs.child.return=vs,vs=vs.child}if(!(vs.flags&2))return vs.stateNode}}function oh(vs,Ss,Ts,Ns){var Is=vs.tag;if(Is===5||Is===6)Is=vs.stateNode,Ss?(Ts.nodeType===9?Ts.body:Ts.nodeName==="HTML"?Ts.ownerDocument.body:Ts).insertBefore(Is,Ss):(Ss=Ts.nodeType===9?Ts.body:Ts.nodeName==="HTML"?Ts.ownerDocument.body:Ts,Ss.appendChild(Is),Ts=Ts._reactRootContainer,Ts!=null||Ss.onclick!==null||(Ss.onclick=hc)),sm(vs,Ns),Mo=!0;else if(Is!==4&&(Is===27&&(sm(vs,Ns),Ns=null,cu(vs.type)&&(Ts=vs.stateNode,Ss=null)),vs=vs.child,vs!==null))for(oh(vs,Ss,Ts,Ns),vs=vs.sibling;vs!==null;)oh(vs,Ss,Ts,Ns),vs=vs.sibling}function im(vs,Ss,Ts,Ns){var Is=vs.tag;if(Is===5||Is===6)Is=vs.stateNode,Ss?Ts.insertBefore(Is,Ss):Ts.appendChild(Is),sm(vs,Ns),Mo=!0;else if(Is!==4&&(Is===27&&(sm(vs,Ns),Ns=null,cu(vs.type)&&(Ts=vs.stateNode)),vs=vs.child,vs!==null))for(im(vs,Ss,Ts,Ns),vs=vs.sibling;vs!==null;)im(vs,Ss,Ts,Ns),vs=vs.sibling}function Ay(vs){var Ss=vs.stateNode,Ts=vs.memoizedProps;try{for(var Ns=vs.type,Is=Ss.attributes;Is.length;)Ss.removeAttributeNode(Is[0]);Tl(Ss,Ns,Ts),Ss[Yo]=vs,Ss[Jo]=Ts}catch($s){Uo(vs,vs.return,$s)}}var am=!1,Vl=null;function ky(vs){(vs.tag===30||(vs.subtreeFlags&33554432)!==0)&&(am=!0)}var bc=null;function Ny(){var vs=bc;return bc=null,vs}var Ll=0;function id(vs,Ss,Ts,Ns,Is){return Ll=0,Oy(vs.child,Ss,Ts,Ns,Is)}function Oy(vs,Ss,Ts,Ns,Is){for(var $s=!1;vs!==null;){if(vs.tag===5){var Ks=vs.stateNode;if(Ns!==null){var Ci=Vh(Ks);Ns.push(Ci),Ci.view&&($s=!0)}else $s||Vh(Ks).view&&($s=!0);am=!0,N1(Ks,Ll===0?Ss:Ss+"_"+Ll,Ts),Ll++}else(vs.tag!==22||vs.memoizedState===null)&&(vs.tag===30&&Is||Oy(vs.child,Ss,Ts,Ns,Is)&&($s=!0));vs=vs.sibling}return $s}function Ec(vs,Ss){for(;vs!==null;)vs.tag===5?O1(vs.stateNode,vs.memoizedProps):(vs.tag!==22||vs.memoizedState===null)&&(vs.tag===30&&Ss||Ec(vs.child,Ss)),vs=vs.sibling}function om(vs){if((vs.subtreeFlags&18874368)!==0)for(vs=vs.child;vs!==null;){if((vs.tag!==22||vs.memoizedState===null)&&(om(vs),vs.tag===30&&(vs.flags&18874368)!==0&&vs.stateNode.paired)){var Ss=vs.memoizedProps;if(Ss.name==null||Ss.name==="auto")throw Error(xs(544));var Ts=Ss.name;Ss=kc(Ss.default,Ss.share),Ss!=="none"&&(id(vs,Ts,Ss,null,!1)||Ec(vs.child,!1))}vs=vs.sibling}}function lh(vs,Ss){if(vs.tag===30){var Ts=vs.stateNode,Ns=vs.memoizedProps,Is=Ac(Ns,Ts),$s=kc(Ns.default,Ts.paired?Ns.share:Ns.enter);$s!=="none"?id(vs,Is,$s,null,!1)?(om(vs),Ts.paired||Ss||md(vs,Ns.onEnter)):Ec(vs.child,!1):om(vs)}else if((vs.subtreeFlags&33554432)!==0)for(vs=vs.child;vs!==null;)lh(vs,Ss),vs=vs.sibling;else om(vs)}function ch(vs){if(Vl!==null&&Vl.size!==0){var Ss=Vl;if((vs.subtreeFlags&18874368)!==0)for(vs=vs.child;vs!==null;){if(vs.tag!==22||vs.memoizedState===null){if(vs.tag===30&&(vs.flags&18874368)!==0){var Ts=vs.memoizedProps,Ns=Ts.name;if(Ns!=null&&Ns!=="auto"){var Is=Ss.get(Ns);if(Is!==void 0){var $s=kc(Ts.default,Ts.share);if($s!=="none"&&(id(vs,Ns,$s,null,!1)?($s=vs.stateNode,Is.paired=$s,$s.paired=Is,md(vs,Ts.onShare)):Ec(vs.child,!1)),Ss.delete(Ns),Ss.size===0)break}}}ch(vs)}vs=vs.sibling}}}function uh(vs){if(vs.tag===30){var Ss=vs.memoizedProps,Ts=Ac(Ss,vs.stateNode),Ns=Vl!==null?Vl.get(Ts):void 0,Is=kc(Ss.default,Ns!==void 0?Ss.share:Ss.exit);Is!=="none"&&(id(vs,Ts,Is,null,!1)?Ns!==void 0?(Is=vs.stateNode,Ns.paired=Is,Is.paired=Ns,Vl.delete(Ts),md(vs,Ss.onShare)):md(vs,Ss.onExit):Ec(vs.child,!1)),Vl!==null&&ch(vs)}else if((vs.subtreeFlags&33554432)!==0)for(vs=vs.child;vs!==null;)uh(vs),vs=vs.sibling;else Vl!==null&&ch(vs)}function My(vs){for(vs=vs.child;vs!==null;){if(vs.tag===30){var Ss=vs.memoizedProps,Ts=Ac(Ss,vs.stateNode);Ss=kc(Ss.default,Ss.update),vs.flags&=-5,Ss!=="none"&&id(vs,Ts,Ss,vs.memoizedState=[],!1)}else(vs.subtreeFlags&33554432)!==0&&My(vs);vs=vs.sibling}}function dh(vs){if((vs.subtreeFlags&18874368)!==0)for(vs=vs.child;vs!==null;){if(vs.tag!==22||vs.memoizedState===null){if(vs.tag===30&&(vs.flags&18874368)!==0){var Ss=vs.stateNode;Ss.paired!==null&&(Ss.paired=null,Ec(vs.child,!1))}dh(vs)}vs=vs.sibling}}function lm(vs){if(vs.tag===30)vs.stateNode.paired=null,Ec(vs.child,!1),dh(vs);else if((vs.subtreeFlags&33554432)!==0)for(vs=vs.child;vs!==null;)lm(vs),vs=vs.sibling;else dh(vs)}function Iy(vs){for(vs=vs.child;vs!==null;)vs.tag===30?Ec(vs.child,!1):(vs.subtreeFlags&33554432)!==0&&Iy(vs),vs=vs.sibling}function fh(vs,Ss,Ts,Ns,Is,$s,Ks){for(var Ci=!1;Ss!==null;){if(Ss.tag===5){var ma=Ss.stateNode;if($s!==null&&Ll<$s.length){var Sa=$s[Ll],Aa=Vh(ma);(Sa.view||Aa.view)&&(Ci=!0);var Pa;if(Pa=(vs.flags&4)===0)if(Aa.clip)Pa=!0;else{Pa=Sa.rect;var va=Aa.rect;Pa=Pa.y!==va.y||Pa.x!==va.x||Pa.height!==va.height||Pa.width!==va.width}Pa&&(vs.flags|=4),Aa.abs?Aa=!Sa.abs:(Sa=Sa.rect,Aa=Aa.rect,Aa=Sa.height!==Aa.height||Sa.width!==Aa.width),Aa&&(vs.flags|=32)}else vs.flags|=32;(vs.flags&4)!==0&&N1(ma,Ll===0?Ts:Ts+"_"+Ll,Is),Ci&&(vs.flags&4)!==0||(bc===null&&(bc=[]),bc.push(ma,Ll===0?Ns:Ns+"_"+Ll,Ss.memoizedProps)),Ll++}else(Ss.tag!==22||Ss.memoizedState===null)&&(Ss.tag===30&&Ks?vs.flags|=Ss.flags&32:fh(vs,Ss.child,Ts,Ns,Is,$s,Ks)&&(Ci=!0));Ss=Ss.sibling}return Ci}function Dy(vs,Ss){for(vs=vs.child;vs!==null;){if(vs.tag===30){var Ts=vs.memoizedProps,Ns=vs.stateNode,Is=Ac(Ts,Ns),$s=kc(Ts.default,Ts.update),Ks;Ks=vs.memoizedState,vs.memoizedState=null,Ns=vs;var Ci=vs.child;Ll=0,Is=fh(Ns,Ci,Is,Is,$s,Ks,!1),(vs.flags&4)!==0&&Is&&md(vs,Ts.onUpdate)}else(vs.subtreeFlags&33554432)!==0&&Dy(vs);vs=vs.sibling}}var yl=!1,$o=!1,vc=!1,mh=!1,$y=typeof WeakSet=="function"?WeakSet:Set,bl=null,wc=!1,Qd=!1,cm=!1,ph=!1;function Bb(vs,Ss,Ts){if(vs=vs.containerInfo,Uh=Sd,vs=Ug(vs),ep(vs)){if("selectionStart"in vs)var Ns={start:vs.selectionStart,end:vs.selectionEnd};else e:{Ns=(Ns=vs.ownerDocument)&&Ns.defaultView||window;var Is=Ns.getSelection&&Ns.getSelection();if(Is&&Is.rangeCount!==0){Ns=Is.anchorNode;var $s=Is.anchorOffset,Ks=Is.focusNode;Is=Is.focusOffset;try{Ns.nodeType,Ks.nodeType}catch{Ns=null;break e}var Ci=0,ma=-1,Sa=-1,Aa=0,Pa=0,va=vs,Ta=null;t:for(;;){for(var Ya;va!==Ns||$s!==0&&va.nodeType!==3||(ma=Ci+$s),va!==Ks||Is!==0&&va.nodeType!==3||(Sa=Ci+Is),va.nodeType===3&&(Ci+=va.nodeValue.length),(Ya=va.firstChild)!==null;)Ta=va,va=Ya;for(;;){if(va===vs)break t;if(Ta===Ns&&++Aa===$s&&(ma=Ci),Ta===Ks&&++Pa===Is&&(Sa=Ci),(Ya=va.nextSibling)!==null)break;va=Ta,Ta=va.parentNode}va=Ya}Ns=ma===-1||Sa===-1?null:{start:ma,end:Sa}}else Ns=null}Ns=Ns||{start:0,end:0}}else Ns=null;for(Bh={focusedElem:vs,selectionRange:Ns},Sd=!1,Ts=(Ts&335544064)===Ts,bl=Ss,Ss=Ts?9270:1024;bl!==null;){if(vs=bl,Ts&&(Ns=vs.deletions,Ns!==null))for($s=0;$s<Ns.length;$s++)Ts&&uh(Ns[$s]);if(vs.alternate===null&&(vs.flags&2)!==0)Ts&&ky(vs),um(Ts);else{if(vs.tag===22){if(Ns=vs.alternate,vs.memoizedState!==null){Ns!==null&&Ns.memoizedState===null&&Ts&&uh(Ns),um(Ts);continue}else if(Ns!==null&&Ns.memoizedState!==null){Ts&&ky(vs),um(Ts);continue}}Ns=vs.child,(vs.subtreeFlags&Ss)!==0&&Ns!==null?(Ns.return=vs,bl=Ns):(Ts&&My(vs),um(Ts))}}Vl=null}function um(vs){for(;bl!==null;){var Ss=bl,Ts=vs,Ns=Ss.alternate,Is=Ss.flags;switch(Ss.tag){case 0:case 11:case 15:break;case 1:if((Is&1024)!==0&&Ns!==null){Ts=void 0,Is=Ns.memoizedProps,Ns=Ns.memoizedState;var $s=Ss.stateNode;try{var Ks=Nu(Ss.type,Is);Ts=$s.getSnapshotBeforeUpdate(Ks,Ns),$s.__reactInternalSnapshotBeforeUpdate=Ts}catch(Ci){Uo(Ss,Ss.return,Ci)}}break;case 3:if((Is&1024)!==0){if(Ns=Ss.stateNode.containerInfo,Ts=Ns.nodeType,Ts===9)Yh(Ns);else if(Ts===1)switch(Ns.nodeName){case"HEAD":case"HTML":case"BODY":Yh(Ns);break;default:Ns.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:Ts&&Ns!==null&&(Ts=Ac(Ns.memoizedProps,Ns.stateNode),Is=Ss.memoizedProps,Is=kc(Is.default,Is.update),Is!=="none"&&id(Ns,Ts,Is,Ns.memoizedState=[],!0));break;default:if((Is&1024)!==0)throw Error(xs(163))}if(Ns=Ss.sibling,Ns!==null){Ns.return=Ss.return,bl=Ns;break}bl=Ss.return}}function Py(vs,Ss,Ts){var Ns=Ts.flags;switch(Ts.tag){case 0:case 11:case 15:Sc(vs,Ts),Ns&4&&Zd(5,Ts);break;case 1:if(Sc(vs,Ts),Ns&4)if(vs=Ts.stateNode,Ss===null)try{vs.componentDidMount()}catch(Ks){Uo(Ts,Ts.return,Ks)}else{var Is=Nu(Ts.type,Ss.memoizedProps);Ss=Ss.memoizedState;try{vs.componentDidUpdate(Is,Ss,vs.__reactInternalSnapshotBeforeUpdate)}catch(Ks){Uo(Ts,Ts.return,Ks)}}Ns&64&&jy(Ts),Ns&512&&yc(Ts,Ts.return);break;case 3:if(Sc(vs,Ts),Ns&64&&(vs=Ts.updateQueue,vs!==null)){if(Ss=null,Ts.child!==null)switch(Ts.child.tag){case 27:case 5:Ss=Ts.child.stateNode;break;case 1:Ss=Ts.child.stateNode}try{px(vs,Ss)}catch(Ks){Uo(Ts,Ts.return,Ks)}}break;case 27:Ss===null&&Ns&4&&Ay(Ts);case 26:case 5:Sc(vs,Ts),Ss===null&&Ns&4&&sh(Ts),Ns&512&&yc(Ts,Ts.return);break;case 12:Sc(vs,Ts);break;case 31:Sc(vs,Ts),Ns&4&&By(vs,Ts);break;case 13:Sc(vs,Ts),Ns&4&&zy(vs,Ts),Ns&64&&(vs=Ts.memoizedState,vs!==null&&(vs=vs.dehydrated,vs!==null&&(Ts=Xb.bind(null,Ts),DE(vs,Ts))));break;case 22:if(Ns=Ts.memoizedState!==null||yl,!Ns){var $s=Ss!==null&&Ss.memoizedState!==null||$o;Ss=yl,Is=$o,yl=Ns,($o=$s)&&!Is?(Ns=2,(Ts.subtreeFlags&8772)!==0&&(Ns|=1),lc(vs,Ts,Ns)):Sc(vs,Ts),yl=Ss,$o=Is}break;case 30:Sc(vs,Ts),Ns&512&&yc(Ts,Ts.return);break;case 7:Ns&512&&yc(Ts,Ts.return);default:Sc(vs,Ts)}}function hh(vs,Ss){for(vs=vs.child;vs!==null;)Ly(vs,Ss),vs=vs.sibling}function Ly(vs,Ss){switch(vs.tag){case 5:case 26:try{var Ts=vs.stateNode;if(Ss){var Ns=Ts.style;typeof Ns.setProperty=="function"?Ns.setProperty("display","none","important"):Ns.display="none"}else{var Is=vs.stateNode,$s=vs.memoizedProps.style,Ks=$s!=null&&$s.hasOwnProperty("display")?$s.display:null;Is.style.display=Ks==null||typeof Ks=="boolean"?"":(""+Ks).trim()}}catch(ma){Uo(vs,vs.return,ma)}gh(vs,Ss);break;case 6:try{vs.stateNode.nodeValue=Ss?"":vs.memoizedProps,Mo=!0}catch(ma){Uo(vs,vs.return,ma)}break;case 18:try{var Ci=vs.stateNode;Ss?k1(Ci,!0):k1(vs.stateNode,!1)}catch(ma){Uo(vs,vs.return,ma)}break;case 22:case 23:vs.memoizedState===null&&hh(vs,Ss);break;default:hh(vs,Ss)}}function gh(vs,Ss){if(vs.subtreeFlags&67108864)for(vs=vs.child;vs!==null;){e:{var Ts=vs,Ns=Ss;switch(Ts.tag){case 4:Ly(Ts,Ns);break e;case 22:Ts.memoizedState===null&&gh(Ts,Ns);break e;default:gh(Ts,Ns)}}vs=vs.sibling}}function Fy(vs){var Ss=vs.alternate;Ss!==null&&(vs.alternate=null,Fy(Ss)),vs.child=null,vs.deletions=null,vs.sibling=null,vs.tag===5&&(Ss=vs.stateNode,Ss!==null&&dl(Ss)),vs.stateNode=null,vs.return=null,vs.dependencies=null,vs.memoizedProps=null,vs.memoizedState=null,vs.pendingProps=null,vs.stateNode=null,vs.updateQueue=null}var Ko=null,Fl=!1;function ac(vs,Ss,Ts){for(Ts=Ts.child;Ts!==null;)Uy(vs,Ss,Ts),Ts=Ts.sibling}function Uy(vs,Ss,Ts){if(Wo&&typeof Wo.onCommitFiberUnmount=="function")try{Wo.onCommitFiberUnmount(il,Ts)}catch{}switch(Ts.tag){case 26:$o||Cl(Ts,Ss),ac(vs,Ss,Ts),Ts.memoizedState?Ts.memoizedState.count--:Ts.stateNode&&!$o&&(Ts=Ts.stateNode,Ts.parentNode.removeChild(Ts));break;case 27:$o||Cl(Ts,Ss),Jd(Ts);var Ns=Ko,Is=Fl;cu(Ts.type)&&(Ko=Ts.stateNode,Fl=!1),ac(vs,Ss,Ts),q1(Ts.stateNode,Ts.type,Ts.memoizedProps),Ko=Ns,Fl=Is;break;case 5:$o||Cl(Ts,Ss),Jd(Ts);case 6:if(Ts.tag===6&&Jd(Ts),Ns=Ko,Is=Fl,Ko=null,ac(vs,Ss,Ts),Ko=Ns,Fl=Is,Ko!==null)if(Fl)try{(Ko.nodeType===9?Ko.body:Ko.nodeName==="HTML"?Ko.ownerDocument.body:Ko).removeChild(Ts.stateNode),Mo=!0}catch($s){Uo(Ts,Ss,$s)}else try{Ko.removeChild(Ts.stateNode),Mo=!0}catch($s){Uo(Ts,Ss,$s)}break;case 18:Ko!==null&&(Fl?(vs=Ko,A1(vs.nodeType===9?vs.body:vs.nodeName==="HTML"?vs.ownerDocument.body:vs,Ts.stateNode),Rd(vs)):A1(Ko,Ts.stateNode));break;case 4:Ns=Ko,Is=Fl,Ko=Ts.stateNode.containerInfo,Fl=!0,ac(vs,Ss,Ts),Ko=Ns,Fl=Is;break;case 0:case 11:case 14:case 15:nu(2,Ts,Ss),$o||nu(4,Ts,Ss),ac(vs,Ss,Ts);break;case 1:$o||(Cl(Ts,Ss),Ns=Ts.stateNode,typeof Ns.componentWillUnmount=="function"&&Cy(Ts,Ss,Ns)),ac(vs,Ss,Ts);break;case 21:ac(vs,Ss,Ts);break;case 22:$o=(Ns=$o)||Ts.memoizedState!==null,ac(vs,Ss,Ts),$o=Ns;break;case 30:Cl(Ts,Ss),ac(vs,Ss,Ts);break;case 7:$o||Cl(Ts,Ss),ac(vs,Ss,Ts);break;default:ac(vs,Ss,Ts)}}function By(vs,Ss){if(Ss.memoizedState===null&&(vs=Ss.alternate,vs!==null&&(vs=vs.memoizedState,vs!==null))){vs=vs.dehydrated;try{Rd(vs)}catch(Ts){Uo(Ss,Ss.return,Ts)}}}function zy(vs,Ss){if(Ss.memoizedState===null&&(vs=Ss.alternate,vs!==null&&(vs=vs.memoizedState,vs!==null&&(vs=vs.dehydrated,vs!==null))))try{Rd(vs)}catch(Ts){Uo(Ss,Ss.return,Ts)}}function zb(vs){switch(vs.tag){case 31:case 13:case 19:var Ss=vs.stateNode;return Ss===null&&(Ss=vs.stateNode=new $y),Ss;case 22:return vs=vs.stateNode,Ss=vs._retryCache,Ss===null&&(Ss=vs._retryCache=new $y),Ss;default:throw Error(xs(435,vs.tag))}}function dm(vs,Ss){var Ts=zb(vs);Ss.forEach(function(Ns){if(!Ts.has(Ns)){Ts.add(Ns);var Is=eE.bind(null,vs,Ns);Ns.then(Is,Is)}})}function Ml(vs,Ss,Ts){var Ns=Ss.deletions;if(Ns!==null)for(var Is=0;Is<Ns.length;Is++){var $s=Ns[Is],Ks=vs,Ci=Ss,ma=Ci;e:for(;ma!==null;){switch(ma.tag){case 27:if(cu(ma.type)){Ko=ma.stateNode,Fl=!1;break e}break;case 5:Ko=ma.stateNode,Fl=!1;break e;case 3:case 4:Ko=ma.stateNode.containerInfo,Fl=!0;break e}ma=ma.return}if(Ko===null)throw Error(xs(160));Uy(Ks,Ci,$s),Ko=null,Fl=!1,Ks=$s.alternate,Ks!==null&&(Ks.return=null),$s.return=null}if(Ss.subtreeFlags&13886)for(Ss=Ss.child;Ss!==null;)Hy(Ss,vs,Ts),Ss=Ss.sibling}var oc=null;function Hy(vs,Ss,Ts){var Ns=vs.alternate,Is=vs.flags;switch(vs.tag){case 0:case 11:case 14:case 15:if(Is&4&&(Ns=vs.updateQueue,Ns=Ns!==null?Ns.events:null,Ns!==null))for(var $s=0;$s<Ns.length;$s++){var Ks=Ns[$s];Ks.ref.impl=Ks.nextImpl}Ml(Ss,vs,Ts),Il(vs),Is&4&&(nu(3,vs,vs.return),Zd(3,vs),nu(5,vs,vs.return));break;case 1:Ml(Ss,vs,Ts),Il(vs),Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),Is&64&&yl&&(vs=vs.updateQueue,vs!==null&&(Ss=vs.callbacks,Ss!==null&&(Ts=vs.shared.hiddenCallbacks,vs.shared.hiddenCallbacks=Ts===null?Ss:Ts.concat(Ss))));break;case 26:if($s=oc,Ml(Ss,vs,Ts),Il(vs),Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),Is&4)if(Is=Ns!==null?Ns.memoizedState:null,Ts=vs.memoizedState,Ns===null)if(Ts===null)if(vs.stateNode===null)if(yl)vs.stateNode=C1(vs.type,vs.memoizedProps,Ss.containerInfo,vs);else{e:{Ss=vs.type,Ts=vs.memoizedProps,Is=$s.ownerDocument||$s;t:switch(Ss){case"title":Ns=Is.getElementsByTagName("title")[0],(!Ns||Ns[fc]||Ns[Yo]||Ns.namespaceURI==="http://www.w3.org/2000/svg"||Ns.hasAttribute("itemprop"))&&(Ns=Is.createElement(Ss),Is.head.insertBefore(Ns,Is.querySelector("head > title"))),Tl(Ns,Ss,Ts),Ns[Yo]=vs,po(Ns),Ss=Ns;break e;case"link":if($s=Z1("link","href",Is).get(Ss+(Ts.href||""))){for(Ks=0;Ks<$s.length;Ks++)if(Ns=$s[Ks],Ns.getAttribute("href")===(Ts.href==null||Ts.href===""?null:Ts.href)&&Ns.getAttribute("rel")===(Ts.rel==null?null:Ts.rel)&&Ns.getAttribute("title")===(Ts.title==null?null:Ts.title)&&Ns.getAttribute("crossorigin")===(Ts.crossOrigin==null?null:Ts.crossOrigin)){$s.splice(Ks,1);break t}}Ns=Is.createElement(Ss),Tl(Ns,Ss,Ts),Is.head.appendChild(Ns);break;case"meta":if($s=Z1("meta","content",Is).get(Ss+(Ts.content||""))){for(Ks=0;Ks<$s.length;Ks++)if(Ns=$s[Ks],Ns.getAttribute("content")===(Ts.content==null?null:""+Ts.content)&&Ns.getAttribute("name")===(Ts.name==null?null:Ts.name)&&Ns.getAttribute("property")===(Ts.property==null?null:Ts.property)&&Ns.getAttribute("http-equiv")===(Ts.httpEquiv==null?null:Ts.httpEquiv)&&Ns.getAttribute("charset")===(Ts.charSet==null?null:Ts.charSet)){$s.splice(Ks,1);break t}}Ns=Is.createElement(Ss),Tl(Ns,Ss,Ts),Is.head.appendChild(Ns);break;default:throw Error(xs(468,Ss))}Ns[Yo]=vs,po(Ns),Ss=Ns}vs.stateNode=Ss}else yl||tg($s,vs.type,vs.stateNode);else vs.stateNode=K1($s,Ts,vs.memoizedProps);else Is!==Ts?(Is===null?(Ss=Ns.stateNode,Ss===null||$o||Ss.parentNode.removeChild(Ss)):Is.count--,Ts===null?yl||tg($s,vs.type,vs.stateNode):K1($s,Ts,vs.memoizedProps)):Ts===null&&vs.stateNode!==null&&ih(vs,vs.memoizedProps,Ns.memoizedProps);break;case 27:Ml(Ss,vs,Ts),Il(vs),Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),Ns!==null&&Is&4&&ih(vs,vs.memoizedProps,Ns.memoizedProps);break;case 5:if($s=vc,vc=!1,Ml(Ss,vs,Ts),vc=$s,Il(vs),Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),vs.flags&32){Ss=vs.stateNode;try{Bu(Ss,""),Mo=!0}catch(Aa){Uo(vs,vs.return,Aa)}}Is&4&&vs.stateNode!=null&&(Ss=vs.memoizedProps,ih(vs,Ss,Ns!==null?Ns.memoizedProps:Ss)),Is&1024&&(mh=!0);break;case 6:if(Ml(Ss,vs,Ts),Il(vs),Is&4){if(vs.stateNode===null)throw Error(xs(162));Ss=vs.memoizedProps,Ts=vs.stateNode;try{Ts.nodeValue=Ss,Mo=!0}catch(Aa){Uo(vs,vs.return,Aa)}}break;case 3:if(Mo=!1,Cm=null,$s=oc,oc=lf(Ss.containerInfo),Ml(Ss,vs,Ts),oc=$s,Il(vs),Is&4&&Ns!==null&&Ns.memoizedState.isDehydrated)try{Rd(Ss.containerInfo)}catch(Aa){Uo(vs,vs.return,Aa)}mh&&(mh=!1,qy(vs)),Mo=!1;break;case 4:Is=vc,vc=yl,Ns=ug(),$s=oc,oc=lf(vs.stateNode.containerInfo),Ml(Ss,vs,Ts),Il(vs),oc=$s,Mo&&Qd&&(cm=!0),Mo=Ns,vc=Is;break;case 12:Ml(Ss,vs,Ts),Il(vs);break;case 31:Ml(Ss,vs,Ts),Il(vs),Is&4&&(Ss=vs.updateQueue,Ss!==null&&(vs.updateQueue=null,dm(vs,Ss)));break;case 13:Ml(Ss,vs,Ts),Il(vs),vs.child.flags&8192&&vs.memoizedState!==null!=(Ns!==null&&Ns.memoizedState!==null)&&(pm=La()),Is&4&&(Ss=vs.updateQueue,Ss!==null&&(vs.updateQueue=null,dm(vs,Ss)));break;case 22:$s=vs.memoizedState!==null,Ks=Ns!==null&&Ns.memoizedState!==null;var Ci=yl,ma=$o,Sa=vc;yl=Ci||$s,vc=Sa||$s,$o=ma||Ks,Ml(Ss,vs,Ts),$o=ma,vc=Sa,yl=Ci,Il(vs),Is&8192&&(Ss=vs.stateNode,Ss._visibility=$s?Ss._visibility&-2:Ss._visibility|1,!$s||Ns===null||Ks||yl||$o||(Ss=Ks||$o,Ts=yl,Ns=$o,yl=$s||yl,$o=Ss,ru(vs,2),yl=Ts,$o=Ns),!$s&&vc||hh(vs,$s)),Is&4&&(Ss=vs.updateQueue,Ss!==null&&(Ts=Ss.retryQueue,Ts!==null&&(Ss.retryQueue=null,dm(vs,Ts))));break;case 19:Ml(Ss,vs,Ts),Il(vs),Is&4&&(Ss=vs.updateQueue,Ss!==null&&(vs.updateQueue=null,dm(vs,Ss)));break;case 30:Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),Is=ug(),$s=Qd,Ks=(Ts&335544064)===Ts,Ci=vs.memoizedProps,Qd=Ks&&kc(Ci.default,Ci.update)!=="none",Ml(Ss,vs,Ts),Il(vs),Ks&&Ns!==null&&Mo&&(vs.flags|=4),Qd=$s,Mo=Is;break;case 21:break;case 7:Is&512&&($o||Ns===null||Cl(Ns,Ns.return)),Ns&&Ns.stateNode!==null&&(Ns.stateNode._fragmentFiber=vs);default:Ml(Ss,vs,Ts),Il(vs)}}function Il(vs){var Ss=vs.flags;if(Ss&2){try{for(var Ts,Ns=vs.return;Ns!==null;){if(_y(Ns)){Ts=Ns;break}Ns=Ns.return}Ns=null;for(var Is=vs.return;Is!==null;){if(rh(Is)){var $s=Is.stateNode;Ns===null?Ns=[$s]:Ns.push($s)}if(nh(Is))break;Is=Is.return}var Ks=Ns;if(Ts==null)throw Error(xs(160));switch(Ts.tag){case 27:var Ci=Ts.stateNode,ma=ah(vs);im(vs,ma,Ci,Ks);break;case 5:var Sa=Ts.stateNode;Ts.flags&32&&(Bu(Sa,""),Ts.flags&=-33);var Aa=ah(vs);im(vs,Aa,Sa,Ks);break;case 3:case 4:var Pa=Ts.stateNode.containerInfo,va=ah(vs);oh(vs,va,Pa,Ks);break;default:throw Error(xs(161))}}catch(Ta){Uo(vs,vs.return,Ta)}vs.flags&=-3}Ss&4096&&(vs.flags&=-4097)}function qy(vs){if(vs.subtreeFlags&1024)for(vs=vs.child;vs!==null;){var Ss=vs;qy(Ss),Ss.tag===5&&Ss.flags&1024&&(Ss=Ss.stateNode,Sd=!0,Ss.reset(),Sd=!1),vs=vs.sibling}}function ad(vs,Ss){if(Ss.subtreeFlags&9270)for(Ss=Ss.child;Ss!==null;)Vy(Ss,vs),Ss=Ss.sibling;else Dy(Ss)}function Vy(vs,Ss){var Ts=vs.alternate;if(Ts===null)lh(vs,!1);else switch(vs.tag){case 3:if(ph=wc=!1,Ny(),ad(Ss,vs),!wc&&!cm){if(vs=bc,vs!==null)for(var Ns=0;Ns<vs.length;Ns+=3){Ts=vs[Ns];var Is=vs[Ns+1];O1(Ts,vs[Ns+2]),Ts=Ts.ownerDocument.documentElement,Ts!==null&&Ts.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+Is+")"})}vs=Ss.containerInfo,vs=vs.nodeType===9?vs.documentElement:vs.ownerDocument.documentElement,vs!==null&&vs.style.viewTransitionName===""&&(vs.style.viewTransitionName="none",vs.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),vs.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ph=!0}bc=null;break;case 5:ad(Ss,vs);break;case 4:Ns=wc,wc=!1,ad(Ss,vs),wc&&(cm=!0),wc=Ns;break;case 22:vs.memoizedState===null&&(Ts.memoizedState!==null?lh(vs,!1):ad(Ss,vs));break;case 30:Ns=wc,Is=Ny(),wc=!1,ad(Ss,vs),wc&&(vs.flags|=4);var $s=vs.memoizedProps,Ks=vs.stateNode;Ss=Ac($s,Ks),Ks=Ac(Ts.memoizedProps,Ks);var Ci=kc($s.default,$s.update);Ci==="none"?Ss=!1:($s=Ts.memoizedState,Ts.memoizedState=null,Ts=vs.child,Ll=0,Ss=fh(vs,Ts,Ss,Ks,Ci,$s,!0),Ll!==($s===null?0:$s.length)&&(vs.flags|=32)),(vs.flags&4)!==0&&Ss?(md(vs,vs.memoizedProps.onUpdate),bc=Is):Is!==null&&(Is.push.apply(Is,bc),bc=Is),wc=(vs.flags&32)!==0?!0:Ns;break;default:ad(Ss,vs)}}function Sc(vs,Ss){if(Ss.subtreeFlags&8772)for(Ss=Ss.child;Ss!==null;)Py(vs,Ss.alternate,Ss),Ss=Ss.sibling}function ru(vs,Ss){for(vs=vs.child;vs!==null;){var Ts=vs,Ns=Ss;switch(Ts.tag){case 0:case 11:case 14:case 15:nu(4,Ts,Ts.return),ru(Ts,Ns);break;case 1:Cl(Ts,Ts.return);var Is=Ts.stateNode;typeof Is.componentWillUnmount=="function"&&Cy(Ts,Ts.return,Is),ru(Ts,Ns);break;case 27:(Ns&2)!==0&&q1(Ts.stateNode,Ts.type,Ts.memoizedProps);case 5:Cl(Ts,Ts.return),Ts.tag!==5&&Ts.tag!==27||Jd(Ts),ru(Ts,Ns);break;case 6:Jd(Ts);break;case 26:Cl(Ts,Ts.return),Is=Ts.stateNode,Ts.memoizedState!==null||Is===null||$o||Is.parentNode.removeChild(Is),ru(Ts,Ns);break;case 22:Ts.memoizedState===null&&ru(Ts,Ns);break;case 30:Cl(Ts,Ts.return),ru(Ts,Ns);break;case 7:Cl(Ts,Ts.return);default:ru(Ts,Ns)}vs=vs.sibling}}function lc(vs,Ss,Ts){for(Ts=(Ss.subtreeFlags&8772)!==0?Ts:Ts&-2,Ss=Ss.child;Ss!==null;){var Ns=Ss.alternate,Is=vs,$s=Ss,Ks=$s.flags,Ci=(Ts&1)!==0;switch($s.tag){case 0:case 11:case 15:lc(Is,$s,Ts),Zd(4,$s);break;case 1:if(lc(Is,$s,Ts),Ns=$s,Is=Ns.stateNode,typeof Is.componentDidMount=="function")try{Is.componentDidMount()}catch(Aa){Uo(Ns,Ns.return,Aa)}if(Ns=$s,Is=Ns.updateQueue,Is!==null){var ma=Ns.stateNode;try{var Sa=Is.shared.hiddenCallbacks;if(Sa!==null)for(Is.shared.hiddenCallbacks=null,Is=0;Is<Sa.length;Is++)mx(Sa[Is],ma)}catch(Aa){Uo(Ns,Ns.return,Aa)}}Ci&&Ks&64&&jy($s),yc($s,$s.return);break;case 27:(Ts&2)!==0&&Ay($s);case 5:$s.tag!==5&&$s.tag!==27||Ty($s),lc(Is,$s,Ts),Ci&&Ns===null&&Ks&4&&sh($s),yc($s,$s.return);break;case 6:Ty($s);break;case 26:ma=$s.stateNode,$s.memoizedState!==null||ma===null||yl||tg(lf(ma.ownerDocument),$s.type,ma),lc(Is,$s,Ts),Ci&&Ns===null&&Ks&4&&sh($s),yc($s,$s.return);break;case 12:lc(Is,$s,Ts);break;case 31:lc(Is,$s,Ts),Ci&&Ks&4&&By(Is,$s);break;case 13:lc(Is,$s,Ts),Ci&&Ks&4&&zy(Is,$s);break;case 22:$s.memoizedState===null&&lc(Is,$s,Ts),yc($s,$s.return);break;case 30:lc(Is,$s,Ts),yc($s,$s.return);break;case 7:yc($s,$s.return);default:lc(Is,$s,Ts)}Ss=Ss.sibling}}function xh(vs,Ss){var Ts=null;vs!==null&&vs.memoizedState!==null&&vs.memoizedState.cachePool!==null&&(Ts=vs.memoizedState.cachePool.pool),vs=null,Ss.memoizedState!==null&&Ss.memoizedState.cachePool!==null&&(vs=Ss.memoizedState.cachePool.pool),vs!==Ts&&(vs!=null&&vs.refCount++,Ts!=null&&Pd(Ts))}function yh(vs,Ss){vs=null,Ss.alternate!==null&&(vs=Ss.alternate.memoizedState.cache),Ss=Ss.memoizedState.cache,Ss!==vs&&(Ss.refCount++,vs!=null&&Pd(vs))}function nc(vs,Ss,Ts,Ns){var Is=(Ts&335544064)===Ts;if(Ss.subtreeFlags&(Is?10262:10256))for(Ss=Ss.child;Ss!==null;)Wy(vs,Ss,Ts,Ns),Ss=Ss.sibling;else Is&&Iy(Ss)}function Wy(vs,Ss,Ts,Ns){var Is=(Ts&335544064)===Ts;Is&&Ss.alternate===null&&Ss.return!==null&&Ss.return.alternate!==null&&lm(Ss);var $s=Ss.flags;switch(Ss.tag){case 0:case 11:case 15:nc(vs,Ss,Ts,Ns),$s&2048&&Zd(9,Ss);break;case 1:nc(vs,Ss,Ts,Ns);break;case 3:nc(vs,Ss,Ts,Ns),Is&&ph&&(vs=vs.containerInfo,vs=vs.nodeType===9?vs.body:vs.nodeName==="HTML"?vs.ownerDocument.body:vs,vs.style.viewTransitionName==="root"&&(vs.style.viewTransitionName=""),vs=vs.ownerDocument.documentElement,vs!==null&&vs.style.viewTransitionName==="none"&&(vs.style.viewTransitionName="")),$s&2048&&($s=null,Ss.alternate!==null&&($s=Ss.alternate.memoizedState.cache),Ss=Ss.memoizedState.cache,Ss!==$s&&(Ss.refCount++,$s!=null&&Pd($s)));break;case 12:if($s&2048){nc(vs,Ss,Ts,Ns),$s=Ss.stateNode;try{var Ks=Ss.memoizedProps,Ci=Ks.id,ma=Ks.onPostCommit;typeof ma=="function"&&ma(Ci,Ss.alternate===null?"mount":"update",$s.passiveEffectDuration,-0)}catch(Sa){Uo(Ss,Ss.return,Sa)}}else nc(vs,Ss,Ts,Ns);break;case 31:nc(vs,Ss,Ts,Ns);break;case 13:nc(vs,Ss,Ts,Ns);break;case 23:break;case 22:Ks=Ss.stateNode,Ci=Ss.alternate,Ss.memoizedState!==null?(Is&&Ci!==null&&Ci.memoizedState===null&&lm(Ci),Ks._visibility&2?nc(vs,Ss,Ts,Ns):Xd(vs,Ss)):(Is&&Ci!==null&&Ci.memoizedState!==null&&lm(Ss),Ks._visibility&2?nc(vs,Ss,Ts,Ns):(Ks._visibility|=2,od(vs,Ss,Ts,Ns,(Ss.subtreeFlags&10256)!==0||!1))),$s&2048&&xh(Ci,Ss);break;case 24:nc(vs,Ss,Ts,Ns),$s&2048&&yh(Ss.alternate,Ss);break;case 30:Is&&($s=Ss.alternate,$s!==null&&(Ec($s.child,!0),Ec(Ss.child,!0))),nc(vs,Ss,Ts,Ns);break;default:nc(vs,Ss,Ts,Ns)}}function od(vs,Ss,Ts,Ns,Is){for(Is=Is&&((Ss.subtreeFlags&10256)!==0||!1),Ss=Ss.child;Ss!==null;){var $s=vs,Ks=Ss,Ci=Ts,ma=Ns,Sa=Ks.flags;switch(Ks.tag){case 0:case 11:case 15:od($s,Ks,Ci,ma,Is),Zd(8,Ks);break;case 23:break;case 22:var Aa=Ks.stateNode;Ks.memoizedState!==null?Aa._visibility&2?od($s,Ks,Ci,ma,Is):Xd($s,Ks):(Aa._visibility|=2,od($s,Ks,Ci,ma,Is)),Is&&Sa&2048&&xh(Ks.alternate,Ks);break;case 24:od($s,Ks,Ci,ma,Is),Is&&Sa&2048&&yh(Ks.alternate,Ks);break;default:od($s,Ks,Ci,ma,Is)}Ss=Ss.sibling}}function Xd(vs,Ss){if(Ss.subtreeFlags&10256)for(Ss=Ss.child;Ss!==null;){var Ts=vs,Ns=Ss,Is=Ns.flags;switch(Ns.tag){case 22:Xd(Ts,Ns),Is&2048&&xh(Ns.alternate,Ns);break;case 24:Xd(Ts,Ns),Is&2048&&yh(Ns.alternate,Ns);break;default:Xd(Ts,Ns)}Ss=Ss.sibling}}var Ou=8192;function Mu(vs,Ss,Ts){if(vs.subtreeFlags&Ou)for(vs=vs.child;vs!==null;)Gy(vs,Ss,Ts),vs=vs.sibling}function Gy(vs,Ss,Ts){switch(vs.tag){case 26:Mu(vs,Ss,Ts),vs.flags&Ou&&(vs.memoizedState!==null?KE(Ts,oc,vs.memoizedState,vs.memoizedProps):(vs=vs.stateNode,(Ss&335544128)===Ss&&e0(Ts,vs)));break;case 5:Mu(vs,Ss,Ts),vs.flags&Ou&&(vs=vs.stateNode,(Ss&335544128)===Ss&&e0(Ts,vs));break;case 3:case 4:var Ns=oc;oc=lf(vs.stateNode.containerInfo),Mu(vs,Ss,Ts),oc=Ns;break;case 22:vs.memoizedState===null&&(Ns=vs.alternate,Ns!==null&&Ns.memoizedState!==null?(Ns=Ou,Ou=16777216,Mu(vs,Ss,Ts),Ou=Ns):Mu(vs,Ss,Ts));break;case 30:if((vs.flags&Ou)!==0&&(Ns=vs.memoizedProps.name,Ns!=null&&Ns!=="auto")){var Is=vs.stateNode;Is.paired=null,Vl===null&&(Vl=new Map),Vl.set(Ns,Is)}Mu(vs,Ss,Ts);break;default:Mu(vs,Ss,Ts)}}function Yy(vs){var Ss=vs.alternate;if(Ss!==null&&(vs=Ss.child,vs!==null)){Ss.child=null;do Ss=vs.sibling,vs.sibling=null,vs=Ss;while(vs!==null)}}function ef(vs){var Ss=vs.deletions;if((vs.flags&16)!==0){if(Ss!==null)for(var Ts=0;Ts<Ss.length;Ts++){var Ns=Ss[Ts];bl=Ns,Zy(Ns,vs)}Yy(vs)}if(vs.subtreeFlags&10256)for(vs=vs.child;vs!==null;)Ky(vs),vs=vs.sibling}function Ky(vs){switch(vs.tag){case 0:case 11:case 15:ef(vs),vs.flags&2048&&nu(9,vs,vs.return);break;case 3:ef(vs);break;case 12:ef(vs);break;case 22:var Ss=vs.stateNode;vs.memoizedState!==null&&Ss._visibility&2&&(vs.return===null||vs.return.tag!==13)?(Ss._visibility&=-3,fm(vs)):ef(vs);break;default:ef(vs)}}function fm(vs){var Ss=vs.deletions;if((vs.flags&16)!==0){if(Ss!==null)for(var Ts=0;Ts<Ss.length;Ts++){var Ns=Ss[Ts];bl=Ns,Zy(Ns,vs)}Yy(vs)}for(vs=vs.child;vs!==null;){switch(Ss=vs,Ss.tag){case 0:case 11:case 15:nu(8,Ss,Ss.return),fm(Ss);break;case 22:Ts=Ss.stateNode,Ts._visibility&2&&(Ts._visibility&=-3,fm(Ss));break;default:fm(Ss)}vs=vs.sibling}}function Zy(vs,Ss){for(;bl!==null;){var Ts=bl;switch(Ts.tag){case 0:case 11:case 15:nu(8,Ts,Ss);break;case 23:case 22:if(Ts.memoizedState!==null&&Ts.memoizedState.cachePool!==null){var Ns=Ts.memoizedState.cachePool.pool;Ns!=null&&Ns.refCount++}break;case 24:Pd(Ts.memoizedState.cache)}if(Ns=Ts.child,Ns!==null)Ns.return=Ts,bl=Ns;else e:for(Ts=vs;bl!==null;){Ns=bl;var Is=Ns.sibling,$s=Ns.return;if(Fy(Ns),Ns===Ts){bl=null;break e}if(Is!==null){Is.return=$s,bl=Is;break e}bl=$s}}}var Hb={getCacheForType:function(vs){var Ss=Sl(ol),Ts=Ss.data.get(vs);return Ts===void 0&&(Ts=vs(),Ss.data.set(vs,Ts)),Ts},cacheSignal:function(){return Sl(ol).controller.signal}},qb=typeof WeakMap=="function"?WeakMap:Map,Io=0,Ho=null,vo=null,jo=0,Fo=0,Wl=null,su=!1,ld=!1,bh=!1,Fc=0,nl=0,iu=0,Iu=0,mm=0,Gl=0,cd=0,tf=null,Ul=null,Eh=!1,pm=0,Jy=0,hm=1/0,gm=null,au=null,Qo=0,cc=null,Du=null,Rc=0,vh=0,wh=null,Qy=null,ud=null,dd=null,fd=null,nf=0,xm=null;function Yl(){return(Io&2)!==0&&jo!==0?jo&-jo:Ma.T!==null?Mh():vl()}function Xy(){if(Gl===0)if((jo&536870912)===0||yo){var vs=Ua;Ua<<=1,(Ua&3932160)===0&&(Ua=262144),Gl=vs}else Gl=536870912;return vs=Rl.current,vs!==null&&(vs.flags|=32),Gl}function md(vs,Ss){if(Ss!=null){var Ts=vs.stateNode,Ns=Ts.ref;Ns===null&&(Ns=Ts.ref=M1(Ac(vs.memoizedProps,Ts))),dd===null&&(dd=[]),dd.push(Ss.bind(null,Ns))}}function Bl(vs,Ss,Ts){(vs===Ho&&(Fo===2||Fo===9)||vs.cancelPendingCommit!==null)&&(pd(vs,0),ou(vs,jo,Gl,!1)),ao(vs,Ts),((Io&2)===0||vs!==Ho)&&(vs===Ho&&((Io&2)===0&&(Iu|=Ts),nl===4&&ou(vs,jo,Gl,!1)),jc(vs))}function e1(vs,Ss,Ts){if((Io&6)!==0)throw Error(xs(327));var Ns=!Ts&&(Ss&127)===0&&(Ss&vs.expiredLanes)===0||ro(vs,Ss),Is=Ns?Gb(vs,Ss):Rh(vs,Ss,!0),$s=Ns;do{if(Is===0){ld&&!Ns&&ou(vs,Ss,0,!1);break}else{if(Ts=vs.current.alternate,$s&&!Vb(Ts)){Is=Rh(vs,Ss,!1),$s=!1;continue}if(Is===2){if($s=Ss,vs.errorRecoveryDisabledLanes&$s)var Ks=0;else Ks=vs.pendingLanes&-536870913,Ks=Ks!==0?Ks:Ks&536870912?536870912:0;if(Ks!==0){Ss=Ks;e:{var Ci=vs;Is=tf;var ma=Ci.current.memoizedState.isDehydrated;if(ma&&(pd(Ci,Ks).flags|=256),Ks=Rh(Ci,Ks,!1),Ks!==2&&Ks!==6){if(bh&&!ma){Ci.errorRecoveryDisabledLanes|=$s,Iu|=$s,Is=4;break e}$s=Ul,Ul=Is,$s!==null&&(Ul===null?Ul=$s:Ul.push.apply(Ul,$s))}Is=Ks}if($s=!1,Is!==2)continue}}if(Is===1){pd(vs,0),ou(vs,Ss,0,!0);break}e:{switch(Ns=vs,$s=Is,$s){case 0:case 1:throw Error(xs(345));case 4:if((Ss&4194048)!==Ss&&(Ss&62914560)!==Ss)break;case 6:ou(Ns,Ss,Gl,!su);break e;case 2:Ul=null;break;case 3:case 5:break;default:throw Error(xs(329))}if((Ss&62914560)===Ss&&(Is=pm+300-La(),10<Is)){if(ou(Ns,Ss,Gl,!su),eo(Ns,0,!0)!==0)break e;Rc=Ss,Ns.timeoutHandle=qh(t1.bind(null,Ns,Ts,Ul,gm,Eh,Ss,Gl,Iu,cd,su,$s,"Throttled",-0,0),Is);break e}t1(Ns,Ts,Ul,gm,Eh,Ss,Gl,Iu,cd,su,$s,null,-0,0)}}break}while(!0);jc(vs)}function t1(vs,Ss,Ts,Ns,Is,$s,Ks,Ci,ma,Sa,Aa,Pa,va,Ta){vs.timeoutHandle=-1;var Ya=Ss.subtreeFlags,no=($s&335544064)===$s;if(Pa=null,(no||Ya&8192||(Ya&16785408)===16785408)&&(Pa={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hc},Vl=null,Gy(Ss,$s,Pa),no&&(Ya=Pa,no=vs.containerInfo,no=(no.nodeType===9?no:no.ownerDocument).__reactViewTransition,no!=null&&(Ya.count++,Ya.waitingForViewTransition=!0,Ya=df.bind(Ya),no.finished.then(Ya,Ya))),Ya=($s&62914560)===$s?pm-La():($s&4194048)===$s?Jy-La():0,Ya=ZE(Pa,Ya),Ya!==null)){Rc=$s,vs.cancelPendingCommit=Ya(c1.bind(null,vs,Ss,$s,Ts,Ns,Is,Ks,Ci,ma,Sa,Aa,Pa,null,va,Ta)),ou(vs,$s,Ks,!Sa);return}c1(vs,Ss,$s,Ts,Ns,Is,Ks,Ci,ma,Sa,Aa,Pa)}function Vb(vs){for(var Ss=vs;;){var Ts=Ss.tag;if((Ts===0||Ts===11||Ts===15)&&Ss.flags&16384&&(Ts=Ss.updateQueue,Ts!==null&&(Ts=Ts.stores,Ts!==null)))for(var Ns=0;Ns<Ts.length;Ns++){var Is=Ts[Ns],$s=Is.getSnapshot;Is=Is.value;try{if(!Hl($s(),Is))return!1}catch{return!1}}if(Ts=Ss.child,Ss.subtreeFlags&16384&&Ts!==null)Ts.return=Ss,Ss=Ts;else{if(Ss===vs)break;for(;Ss.sibling===null;){if(Ss.return===null||Ss.return===vs)return!0;Ss=Ss.return}Ss.sibling.return=Ss.return,Ss=Ss.sibling}}return!0}function ou(vs,Ss,Ts,Ns){Ss=to(vs,Ss),Ss&=~mm,Ss&=~Iu,vs.suspendedLanes|=Ss,vs.pingedLanes&=~Ss,Ns&&(vs.warmLanes|=Ss),Ns=vs.expirationTimes;for(var Is=Ss;0<Is;){var $s=31-Go(Is),Ks=1<<$s;Ns[$s]=-1,Is&=~Ks}Ts!==0&&Do(vs,Ts,Ss)}function ym(){return(Io&6)===0?(rf(0),!1):!0}function Sh(){if(vo!==null){if(Fo===0)var vs=vo.return;else vs=vo,Mc=wu=null,Np(vs),ed=null,Ud=0,vs=vo;for(;vs!==null;)Ry(vs.alternate,vs),vs=vs.return;vo=null}}function pd(vs,Ss){var Ts=vs.timeoutHandle;return Ts!==-1&&(vs.timeoutHandle=-1,hE(Ts)),Ts=vs.cancelPendingCommit,Ts!==null&&(vs.cancelPendingCommit=null,Ts()),Rc=0,Sh(),Ho=vs,vo=Ts=Nc(vs.current,null),jo=Ss,Fo=0,Wl=null,su=!1,ld=ro(vs,Ss),bh=!1,cd=Gl=mm=Iu=iu=nl=0,Ul=tf=null,Eh=!1,Fc=to(vs,Ss),Cf(),Ts}function n1(vs,Ss){ho=null,Ma.H=Jf,Ss===Xu||Ss===Pf?(Ss=cx(),Fo=3):Ss===yp?(Ss=cx(),Fo=4):Fo=Ss===Wp?8:Ss!==null&&typeof Ss=="object"&&typeof Ss.then=="function"?6:1,Wl=Ss,vo===null&&(nl=1,Qf(vs,Ql(Ss,vs.current)))}function r1(){var vs=Rl.current;return vs===null?!0:(jo&4194048)===jo?kl===null:(jo&62914560)===jo||(jo&536870912)!==0?vs===kl:!1}function s1(){var vs=Ma.H;return Ma.H=Jf,vs===null?Jf:vs}function i1(){var vs=Ma.A;return Ma.A=Hb,vs}function bm(){nl=4,su||(jo&4194048)!==jo&&Rl.current!==null||(ld=!0),(iu&134217727)===0&&(Iu&134217727)===0||Ho===null||ou(Ho,jo,Gl,!1)}function Rh(vs,Ss,Ts){var Ns=Io;Io|=2;var Is=s1(),$s=i1();(Ho!==vs||jo!==Ss)&&(gm=null,pd(vs,Ss)),Ss=!1;var Ks=nl;e:do try{if(Fo!==0&&vo!==null){var Ci=vo,ma=Wl;switch(Fo){case 8:Sh(),Ks=6;break e;case 3:case 2:case 9:case 6:Rl.current===null&&(Ss=!0);var Sa=Fo;if(Fo=0,Wl=null,hd(vs,Ci,ma,Sa),Ts&&ld){Ks=0;break e}break;default:Sa=Fo,Fo=0,Wl=null,hd(vs,Ci,ma,Sa)}}Wb(),Ks=nl;break}catch(Aa){n1(vs,Aa)}while(!0);return Ss&&vs.shellSuspendCounter++,Mc=wu=null,Io=Ns,Ma.H=Is,Ma.A=$s,vo===null&&(Ho=null,jo=0,Cf()),Ks}function Wb(){for(;vo!==null;)a1(vo)}function Gb(vs,Ss){var Ts=Io;Io|=2;var Ns=s1(),Is=i1();Ho!==vs||jo!==Ss?(gm=null,hm=La()+500,pd(vs,Ss)):ld=ro(vs,Ss);e:do try{if(Fo!==0&&vo!==null){Ss=vo;var $s=Wl;t:switch(Fo){case 1:Fo=0,Wl=null,hd(vs,Ss,$s,1);break;case 2:case 9:if(ox($s)){Fo=0,Wl=null,o1(Ss);break}Ss=function(){Fo!==2&&Fo!==9||Ho!==vs||(Fo=7),jc(vs)},$s.then(Ss,Ss);break e;case 3:Fo=7;break e;case 4:Fo=5;break e;case 7:ox($s)?(Fo=0,Wl=null,o1(Ss)):(Fo=0,Wl=null,hd(vs,Ss,$s,7));break;case 5:var Ks=null;switch(vo.tag){case 26:Ks=vo.memoizedState;case 5:case 27:var Ci=vo;if(Ks?Q1(Ks):Ci.stateNode.complete){Fo=0,Wl=null;var ma=Ci.sibling;if(ma!==null)vo=ma;else{var Sa=Ci.return;Sa!==null?(vo=Sa,Em(Sa)):vo=null}break t}}Fo=0,Wl=null,hd(vs,Ss,$s,5);break;case 6:Fo=0,Wl=null,hd(vs,Ss,$s,6);break;case 8:Sh(),nl=6;break e;default:throw Error(xs(462))}}Yb();break}catch(Aa){n1(vs,Aa)}while(!0);return Mc=wu=null,Ma.H=Ns,Ma.A=Is,Io=Ts,vo!==null?0:(Ho=null,jo=0,Cf(),nl)}function Yb(){for(;vo!==null&&!ka();)a1(vo)}function a1(vs){var Ss=wy(vs.alternate,vs,Fc);vs.memoizedProps=vs.pendingProps,Ss===null?Em(vs):vo=Ss}function o1(vs){var Ss=vs,Ts=Ss.alternate;switch(Ss.tag){case 15:case 0:Ss=hy(Ts,Ss,Ss.pendingProps,Ss.type,void 0,jo);break;case 11:Ss=hy(Ts,Ss,Ss.pendingProps,Ss.type.render,Ss.ref,jo);break;case 5:Np(Ss);var Ns=Ss;Ns===xl&&(yo?(Of(Ns),Ns.tag===5&&Ns.stateNode!=null&&(qo=Ns.stateNode)):(Of(Ns),yo=!0));default:Ry(Ts,Ss),Ss=vo=Zg(Ss,Fc),Ss=wy(Ts,Ss,Fc)}vs.memoizedProps=vs.pendingProps,Ss===null?Em(vs):vo=Ss}function hd(vs,Ss,Ts,Ns){Mc=wu=null,Np(Ss),ed=null,Ud=0;var Is=Ss.return;try{if(Db(vs,Is,Ss,Ts,jo)){nl=1,Qf(vs,Ql(Ts,vs.current)),vo=null;return}}catch($s){if(Is!==null)throw vo=Is,$s;nl=1,Qf(vs,Ql(Ts,vs.current)),vo=null;return}Ss.flags&32768?(yo||Ns===1?vs=!0:ld||(jo&536870912)!==0?vs=!1:(su=vs=!0,(Ns===2||Ns===9||Ns===3||Ns===6)&&(Ns=Rl.current,Ns!==null&&Ns.tag===13&&(Ns.flags|=16384))),l1(Ss,vs)):Em(Ss)}function Em(vs){var Ss=vs;do{if((Ss.flags&32768)!==0){l1(Ss,su);return}vs=Ss.return;var Ts=Fb(Ss.alternate,Ss,Fc);if(Ts!==null){vo=Ts;return}if(Ss=Ss.sibling,Ss!==null){vo=Ss;return}vo=Ss=vs}while(Ss!==null);nl===0&&(nl=5)}function l1(vs,Ss){do{var Ts=Ub(vs.alternate,vs);if(Ts!==null){Ts.flags&=32767,vo=Ts;return}if(Ts=vs.return,Ts!==null&&(Ts.flags|=32768,Ts.subtreeFlags=0,Ts.deletions=null),!Ss&&(vs=vs.sibling,vs!==null)){vo=vs;return}vo=vs=Ts}while(vs!==null);nl=6,vo=null}function c1(vs,Ss,Ts,Ns,Is,$s,Ks,Ci,ma,Sa,Aa,Pa){vs.cancelPendingCommit=null;do vm();while(Qo!==0);if((Io&6)!==0)throw Error(xs(327));if(Ss!==null){if(Ss===vs.current)throw Error(xs(177));vs===Ho&&(vo=Ho=null,jo=0),Du=Ss,cc=vs,Rc=Ts,wh=Is,Qy=Ns,Kb(vs,Ss,Ts,Ks,Ci,ma,Pa)}}function Kb(vs,Ss,Ts,Ns,Is,$s,Ks){var Ci=Ss.lanes|Ss.childLanes;if(vh=Ci,Ci|=ip,No(vs,Ts,Ci,Ns,Is,$s),dd=null,(Ts&335544064)===Ts?(fd=Sb(vs),Ns=10262):(fd=null,Ns=10256),(Ss.subtreeFlags&Ns)!==0||(Ss.flags&Ns)!==0?(vs.callbackNode=null,vs.callbackPriority=0,tE(Xo,function(){return Ah(),null})):(vs.callbackNode=null,vs.callbackPriority=0),am=!1,Ns=(Ss.flags&13878)!==0,(Ss.subtreeFlags&13878)!==0||Ns){Ns=Ma.T,Ma.T=null,Is=Fa.p,Fa.p=2,$s=Io,Io|=4;try{Bb(vs,Ss,Ts)}finally{Io=$s,Fa.p=Is,Ma.T=Ns}}Qo=1,am?ud=vE(Ks,vs.containerInfo,fd,jh,Ch,Jb,Th,Ah,Zb):(jh(),Ch(),Th())}function Zb(vs){if(Qo!==0){var Ss=cc.onRecoverableError;Ss(vs,{componentStack:null})}}function Jb(){Qo===3&&(Qo=0,Vy(Du,cc),Qo=4)}function jh(){if(Qo===1){Qo=0;var vs=cc,Ss=Du,Ts=Rc,Ns=(Ss.flags&13878)!==0;if((Ss.subtreeFlags&13878)!==0||Ns){Ns=Ma.T,Ma.T=null;var Is=Fa.p;Fa.p=2;var $s=Io;Io|=4;try{Qd=cm=!1,Hy(Ss,vs,Ts),Ts=Bh;var Ks=Ug(vs.containerInfo),Ci=Ts.focusedElem,ma=Ts.selectionRange;if(Ks!==Ci&&Ci&&Ci.ownerDocument&&Fg(Ci.ownerDocument.documentElement,Ci)){if(ma!==null&&ep(Ci)){var Sa=ma.start,Aa=ma.end;if(Aa===void 0&&(Aa=Sa),"selectionStart"in Ci)Ci.selectionStart=Sa,Ci.selectionEnd=Math.min(Aa,Ci.value.length);else{var Pa=Ci.ownerDocument||document,va=Pa&&Pa.defaultView||window;if(va.getSelection){var Ta=va.getSelection(),Ya=Ci.textContent.length,no=Math.min(ma.start,Ya),go=ma.end===void 0?no:Math.min(ma.end,Ya);!Ta.extend&&no>go&&(Ks=go,go=no,no=Ks);var wa=Lg(Ci,no),ya=Lg(Ci,go);if(wa&&ya&&(Ta.rangeCount!==1||Ta.anchorNode!==wa.node||Ta.anchorOffset!==wa.offset||Ta.focusNode!==ya.node||Ta.focusOffset!==ya.offset)){var ja=Pa.createRange();ja.setStart(wa.node,wa.offset),Ta.removeAllRanges(),no>go?(Ta.addRange(ja),Ta.extend(ya.node,ya.offset)):(ja.setEnd(ya.node,ya.offset),Ta.addRange(ja))}}}}for(Pa=[],Ta=Ci;Ta=Ta.parentNode;)Ta.nodeType===1&&Pa.push({element:Ta,left:Ta.scrollLeft,top:Ta.scrollTop});for(typeof Ci.focus=="function"&&Ci.focus(),Ci=0;Ci<Pa.length;Ci++){var Da=Pa[Ci];Da.element.scrollLeft=Da.left,Da.element.scrollTop=Da.top}}Sd=!!Uh,Bh=Uh=null}finally{Io=$s,Fa.p=Is,Ma.T=Ns}}vs.current=Ss,Qo=2}}function Ch(){if(Qo===2){Qo=0;var vs=cc,Ss=Du,Ts=(Ss.flags&8772)!==0;if((Ss.subtreeFlags&8772)!==0||Ts){Ts=Ma.T,Ma.T=null;var Ns=Fa.p;Fa.p=2;var Is=Io;Io|=4;try{Py(vs,Ss.alternate,Ss)}finally{Io=Is,Fa.p=Ns,Ma.T=Ts}}Qo=3}}function Th(){if(Qo===4||Qo===3){Qo=0;var vs=ud;ud=null,Ha();var Ss=cc,Ts=Du,Ns=Rc,Is=Qy,$s=(Ns&335544064)===Ns?10262:10256;if((Ts.subtreeFlags&$s)!==0||(Ts.flags&$s)!==0?Qo=5:(Qo=0,Du=cc=null,u1(Ss,Ss.pendingLanes)),$s=Ss.pendingLanes,$s===0&&(au=null),pl(Ns),Ts=Ts.stateNode,Wo&&typeof Wo.onCommitFiberRoot=="function")try{Wo.onCommitFiberRoot(il,Ts,void 0,(Ts.current.flags&128)===128)}catch{}if(Is!==null){Ts=Ma.T,$s=Fa.p,Fa.p=2,Ma.T=null;try{for(var Ks=Ss.onRecoverableError,Ci=0;Ci<Is.length;Ci++){var ma=Is[Ci];Ks(ma.value,{componentStack:ma.stack})}}finally{Ma.T=Ts,Fa.p=$s}}if(Is=dd,Ks=fd,fd=null,Is!==null&&(dd=null,Ks===null&&(Ks=[]),vs!==null))for(ma=0;ma<Is.length;ma++)Ts=(0,Is[ma])(Ks),Ts!==void 0&&vs.finished.finally(Ts);(Rc&3)!==0&&vm(),jc(Ss),$s=Ss.pendingLanes,(Ns&261930)!==0&&($s&42)!==0?Ss===xm?nf++:(nf=0,xm=Ss):(nf=0,xm=null),rf(0)}}function u1(vs,Ss){(vs.pooledCacheLanes&=Ss)===0&&(Ss=vs.pooledCache,Ss!=null&&(vs.pooledCache=null,Pd(Ss)))}function vm(){return ud!==null&&(ud.skipTransition(),ud=null),jh(),Ch(),Th(),Ah()}function Ah(){if(Qo!==5)return!1;var vs=cc,Ss=vh;vh=0;var Ts=pl(Rc),Ns=Ma.T,Is=Fa.p;try{Fa.p=32>Ts?32:Ts,Ma.T=null,Ts=wh,wh=null;var $s=cc,Ks=Rc;if(Qo=0,Du=cc=null,Rc=0,(Io&6)!==0)throw Error(xs(331));var Ci=Io;if(Io|=4,Ky($s.current),Wy($s,$s.current,Ks,Ts),Io=Ci,rf(0,!1),Wo&&typeof Wo.onPostCommitFiberRoot=="function")try{Wo.onPostCommitFiberRoot(il,$s)}catch{}return!0}finally{Fa.p=Is,Ma.T=Ns,u1(vs,Ss)}}function d1(vs,Ss,Ts){Ss=Ql(Ts,Ss),Ss=Vp(vs.stateNode,Ss,2),vs=Qc(vs,Ss,2),vs!==null&&(ao(vs,2),jc(vs))}function Uo(vs,Ss,Ts){if(vs.tag===3)d1(vs,vs,Ts);else for(;Ss!==null;){if(Ss.tag===3){d1(Ss,vs,Ts);break}else if(Ss.tag===1){var Ns=Ss.stateNode;if(typeof Ss.type.getDerivedStateFromError=="function"||typeof Ns.componentDidCatch=="function"&&(au===null||!au.has(Ns))){vs=Ql(Ts,vs),Ts=oy(2),Ns=Qc(Ss,Ts,2),Ns!==null&&(ly(Ts,Ns,Ss,vs),ao(Ns,2),jc(Ns));break}}Ss=Ss.return}}function kh(vs,Ss,Ts){var Ns=vs.pingCache;if(Ns===null){Ns=vs.pingCache=new qb;var Is=new Set;Ns.set(Ss,Is)}
vendor: 4,585 bytes, line 1464
1464else Is=Ns.get(Ss),Is===void 0&&(Is=new Set,Ns.set(Ss,Is));Is.has(Ts)||(bh=!0,Is.add(Ts),vs=Qb.bind(null,vs,Ss,Ts),Ss.then(vs,vs))}function Qb(vs,Ss,Ts){var Ns=vs.pingCache;Ns!==null&&Ns.delete(Ss),vs.pingedLanes|=vs.suspendedLanes&Ts,vs.warmLanes&=~Ts,Ho===vs&&(jo&Ts)===Ts&&((nl===4||nl===3&&(jo&62914560)===jo&&300>La()-pm)&&(Io&2)===0?pd(vs,0):mm|=Ts,cd===jo&&(cd=0)),jc(vs)}function f1(vs,Ss){Ss===0&&(Ss=so()),vs=bu(vs,Ss),vs!==null&&(ao(vs,Ss),jc(vs))}function Xb(vs){var Ss=vs.memoizedState,Ts=0;Ss!==null&&(Ts=Ss.retryLane),f1(vs,Ts)}function eE(vs,Ss){var Ts=0;switch(vs.tag){case 31:case 13:var Ns=vs.stateNode,Is=vs.memoizedState;Is!==null&&(Ts=Is.retryLane);break;case 19:Ns=vs.stateNode;break;case 22:Ns=vs.stateNode._retryCache;break;default:throw Error(xs(314))}Ns!==null&&Ns.delete(Ss),f1(vs,Ts)}function tE(vs,Ss){return da(vs,Ss)}var gd=null,xd=null,Nh=!1,wm=!1,Oh=!1,lu=0;function jc(vs){vs!==xd&&vs.next===null&&(xd===null?gd=xd=vs:xd=xd.next=vs),wm=!0,Nh||(Nh=!0,rE())}function rf(vs,Ss){if(!Oh&&wm){Oh=!0;do for(var Ts=!1,Ns=gd;Ns!==null;){if(vs!==0){var Is=Ns.pendingLanes;if(Is===0)var $s=0;else{var Ks=Ns.suspendedLanes,Ci=Ns.pingedLanes;$s=(1<<31-Go(42|vs)+1)-1,$s&=Is&~(Ks&~Ci),$s=$s&201326741?$s&201326741|1:$s?$s|2:0}$s!==0&&(Ts=!0,g1(Ns,$s))}else $s=jo,$s=eo(Ns,Ns===Ho?$s:0,Ns.cancelPendingCommit!==null||Ns.timeoutHandle!==-1),($s&3)===0||ro(Ns,$s)||(Ts=!0,g1(Ns,$s));Ns=Ns.next}while(Ts);Oh=!1}}function nE(){m1()}function m1(){wm=Nh=!1;var vs=0;lu!==0&&pE()&&(vs=lu);for(var Ss=La(),Ts=null,Ns=gd;Ns!==null;){var Is=Ns.next,$s=p1(Ns,Ss);$s===0?(Ns.next=null,Ts===null?gd=Is:Ts.next=Is,Is===null&&(xd=Ts)):(Ts=Ns,(vs!==0||($s&3)!==0)&&(wm=!0)),Ns=Is}Qo!==0&&Qo!==5||rf(vs),lu!==0&&(lu=0)}function p1(vs,Ss){for(var Ts=vs.suspendedLanes,Ns=vs.pingedLanes,Is=vs.expirationTimes,$s=vs.pendingLanes&-62914561;0<$s;){var Ks=31-Go($s),Ci=1<<Ks,ma=Is[Ks];ma===-1?((Ci&Ts)===0||(Ci&Ns)!==0)&&(Is[Ks]=lo(Ci,Ss)):ma<=Ss&&(vs.expiredLanes|=Ci),$s&=~Ci}if(Ss=Ho,Ts=jo,Ts=eo(vs,vs===Ss?Ts:0,vs.cancelPendingCommit!==null||vs.timeoutHandle!==-1),Ns=vs.callbackNode,Ts===0||vs===Ss&&(Fo===2||Fo===9)||vs.cancelPendingCommit!==null)return Ns!==null&&Ns!==null&&xa(Ns),vs.callbackNode=null,vs.callbackPriority=0;if((Ts&3)===0||ro(vs,Ts)){if(Ss=Ts&-Ts,Ss===vs.callbackPriority)return Ss;switch(Ns!==null&&xa(Ns),pl(Ts)){case 2:case 8:Ts=Za;break;case 32:Ts=Xo;break;case 268435456:Ts=Dl;break;default:Ts=Xo}return Ns=h1.bind(null,vs),Ts=da(Ts,Ns),vs.callbackPriority=Ss,vs.callbackNode=Ts,Ss}return Ns!==null&&Ns!==null&&xa(Ns),vs.callbackPriority=2,vs.callbackNode=null,2}function h1(vs,Ss){if(Qo!==0&&Qo!==5)return vs.callbackNode=null,vs.callbackPriority=0,null;var Ts=vs.callbackNode;if(vm()&&vs.callbackNode!==Ts)return null;var Ns=jo;return Ns=eo(vs,vs===Ho?Ns:0,vs.cancelPendingCommit!==null||vs.timeoutHandle!==-1),Ns===0?null:(e1(vs,Ns,Ss),p1(vs,La()),vs.callbackNode!=null&&vs.callbackNode===Ts?h1.bind(null,vs):null)}function g1(vs,Ss){if(vm())return null;e1(vs,Ss,!0)}function rE(){gE(function(){(Io&6)!==0?da(Ja,nE):m1()})}function Mh(){if(lu===0){var vs=ju;vs===0&&(vs=Ca,Ca<<=1,(Ca&261888)===0&&(Ca=256)),lu=vs}return lu}function x1(vs){return vs==null||typeof vs=="symbol"||typeof vs=="boolean"?null:typeof vs=="function"?vs:yf(vs)}function sE(vs,Ss,Ts,Ns,Is){if(Ss==="submit"&&Ts&&Ts.stateNode===Is){var $s=x1((Is[Jo]||null).action),Ks=Ns.submitter;Ks&&(Ss=(Ss=Ks[Jo]||null)?x1(Ss.formAction):Ks.getAttribute("formAction"),Ss!==null&&($s=Ss,Ks=null));var Ci=new wf("action","action",null,Ns,Is);vs.push({event:Ci,listeners:[{instance:null,listener:function(){if(Ns.defaultPrevented){if(lu!==0){var ma=new FormData(Is,Ks);Up(Ts,{pending:!0,data:ma,method:Is.method,action:$s},null,ma)}}else typeof $s=="function"&&(Ci.preventDefault(),ma=new FormData(Is,Ks),Up(Ts,{pending:!0,data:ma,method:Is.method,action:$s},$s,ma))},currentTarget:Is}]})}}for(var Ih=0;Ih<sp.length;Ih++){var Dh=sp[Ih],iE=Dh.toLowerCase(),aE=Dh[0].toUpperCase()+Dh.slice(1);ic(iE,"on"+aE)}ic(Hg,"onAnimationEnd"),ic(qg,"onAnimationIteration"),ic(Vg,"onAnimationStart"),ic("dblclick","onDoubleClick"),ic("focusin","onFocus"),ic("focusout","onBlur"),ic(hb,"onTransitionRun"),ic(gb,"onTransitionStart"),ic(xb,"onTransitionCancel"),ic(Wg,"onTransitionEnd"),Fu("onMouseEnter",["mouseout","mouseover"]),Fu("onMouseLeave",["mouseout","mouseover"]),Fu("onPointerEnter",["pointerout","pointerover"]),Fu("onPointerLeave",["pointerout","pointerover"]),gu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gu("onSelect","focusout contextmenu dragend focu
1464sin keydown keyup mousedown mouseup selectionchange".split(" ")),gu("onBeforeInput",["compositionend","keypress","textInput","paste"]),gu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sf="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(" "),oE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sf));function y1(vs,Ss){Ss=(Ss&4)!==0;for(var Ts=0;Ts<vs.length;Ts++){var Ns=vs[Ts],Is=Ns.event;Ns=Ns.listeners;e:{var $s=void 0;if(Ss)for(var Ks=Ns.length-1;0<=Ks;Ks--){var Ci=Ns[Ks],ma=Ci.instance,Sa=Ci.currentTarget;if(Ci=Ci.listener,ma!==$s&&Is.isPropagationStopped())break e;$s=Ci,Is.currentTarget=Sa;try{$s(Is)}catch(Aa){jf(Aa)}Is.currentTarget=null,$s=ma}else for(Ks=0;Ks<Ns.length;Ks++){if(Ci=Ns[Ks],ma=Ci.instance,Sa=Ci.currentTarget,Ci=Ci.listener,ma!==$s&&Is.isPropagationStopped())break e;$s=Ci,Is.currentTarget=Sa;try{$s(Is)}catch(Aa){jf(Aa)}Is.currentTarget=null,$s=ma}}}}function wo(vs,Ss){var Ts=Ss[Pu];Ts===void 0&&(Ts=Ss[Pu]=new Set);var Ns=vs+"__bubble";Ts.has(Ns)||(b1(Ss,vs,2,!1),Ts.add(Ns))}function $h(vs,Ss,Ts){var Ns=0;Ss&&(Ns|=4),b1(Ts,vs,Ns,Ss)}var Sm="_reactListening"+Math.random().toString(36).slice(2);function Ph(vs){if(!vs[Sm]){vs[Sm]=!0,jd.forEach(function(Ts){Ts!=="selectionchange"&&(oE.has(Ts)||$h(Ts,!1,vs),$h(Ts,!0,vs))});var Ss=vs.nodeType===9?vs:vs.ownerDocument;Ss===null||Ss[Sm]||(Ss[Sm]=!0,$h("selectionchange",!1,Ss))}}function b1(vs,Ss,Ts,Ns){switch(c0(Ss)){case 2:var Is=ev;break;case 8:Is=tv;break;default:Is=rg}Ts=Is.bind(null,Ss,Ts,vs),Is=void 0,!qm||Ss!=="touchstart"&&Ss!=="touchmove"&&Ss!=="wheel"||(Is=!0),Ns?Is!==void 0?vs.addEventListener(Ss,Ts,{capture:!0,passive:Is}):vs.addEventListener(Ss,Ts,!0):Is!==void 0?vs.addEventListener(Ss,Ts,{passive:Is}):vs.addEventListener(Ss,Ts,!1)}function Lh(vs,Ss,Ts,Ns,Is){var $s=Ns;if((Ss&1)===0&&(Ss&2)===0&&Ns!==null)e:for(;;){if(Ns===null)return;var Ks=Ns.tag;if(Ks===3||Ks===4){var Ci=Ns.stateNode.containerInfo;if(Ci===Is)break;if(Ks===4)for(Ks=Ns.return;Ks!==null;){var ma=Ks.tag;if((ma===3||ma===4)&&Ks.stateNode.containerInfo===Is)return;Ks=Ks.return}for(;Ci!==null;){if(Ks=gl(Ci),Ks===null)return;if(ma=Ks.tag,ma===5||ma===6||ma===26||ma===27){Ns=$s=Ks;continue e}Ci=Ci.parentNode}}Ns=Ns.return}bg(function(){var Sa=$s,Aa=zm(Ts),Pa=[];e:{var va=Gg.get(vs);if(va!==void 0){var Ta=wf,Ya=vs;switch(vs){case"keypress":if(Ef(Ts)===0)break e;case"keydown":case"keyup":Ta=V0;break;case"focusin":Ya="focus",Ta=Ym;break;case"focusout":Ya="blur",Ta=Ym;break;case"beforeblur":case"afterblur":Ta=Ym;break;case"click":if(Ts.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ta=wg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ta=M0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ta=Z0;break;case Hg:case qg:case Vg:Ta=$0;break;case Wg:Ta=Q0;break;case"scroll":case"scrollend":Ta=N0;break;case"wheel":Ta=eb;break;case"copy":case"cut":case"paste":Ta=L0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ta=Rg;break;case"submit":Ta=Y0;break;case"toggle":case"beforetoggle":Ta=nb}var no=(Ss&4)!==0,go=!no&&(vs==="scroll"||vs==="scrollend"),wa=no?va!==null?va+"Capture":null:va;no=[];for(var ya=Sa,ja;ya!==null;){var Da=ya;if(ja=Da.stateNode,Da=Da.tag,Da!==5&&Da!==26&&Da!==27||ja===null||wa===null||(Da=Cd(ya,wa),Da!=null&&no.push(af(ya,Da,ja))),go)break;ya=ya.return}0<no.length&&(va=new Ta(va,Ya,null,Ts,Aa),Pa.push({event:va,listeners:no}))}}if((Ss&7)===0){e:{if(Ta=vs==="mouseover"||vs==="pointerover",va=vs==="mouseout"||vs==="pointerout",Ta&&Ts!==Bm&&(Ya=Ts.relatedTarget||Ts.fromElement)&&(gl(Ya)||Ya[wl]))break e;(va||Ta)&&(Ya=Aa.window===Aa?Aa:(Ta=Aa.ownerDocument)?Ta.defaultView||Ta.parentWindow:window,va?(Ta=Ts.relatedTarget||Ts.toElement,va=Sa,Ta=Ta?gl(Ta):null,Ta!==null&&(go=Es(Ta),no=Ta.tag,Ta!==go||no!==5&&no!==27&&no!==6)&&(Ta=null)):(va=null,Ta=Sa),va!==Ta&&(no=wg,Da="onMouseLeave",wa="onMouseEnter",ya="mouse",(vs==="pointerout"||vs==="pointerover")&&(no=Rg,Da="onPointerLeave",wa="onPointerEnter",ya="pointer"),go=va==null?Ya:zc(va),ja=Ta==null?Ya:zc(Ta),Ya=new no(Da,ya+"leave",va,Ts,Aa),Ya.target=go,Ya.relatedTarget=ja,Da=null,gl(Aa)===Sa&&(no=new no(wa,ya+"enter",Ta,Ts,Aa),no.target=ja,no.relatedTarget=go,Da=no),go=Da,no=va&&Ta?Ws(va,Ta,lE):null,va!==null&&E1(Pa,Ya,va,no,!1),Ta!==null&&go!==null&&E1(Pa,go,Ta,no,!0)))}e:{if(va=Sa?zc(Sa):window,Ta=va.nodeName&&va.nodeName.toLowerCase(),Ta==="select"||Ta==="input"&&va.type==="file")var Xa=Og;else if(kg(va))if(Mg)Xa=fb;else{Xa=ub;var Co=cb}else Ta=va.nodeName,!Ta||Ta.toLowerCase()!=="input"||va.type!=="checkbox"&&va.type!=="radio"?Sa&&Um(Sa.elementType)&&(Xa=Og):Xa=db;if(Xa&&(Xa=Xa(vs,Sa))){Ng(Pa,Xa,Ts,Aa);break e}Co&&Co(vs,va,Sa)}switch(Co=Sa?zc(Sa):window,vs){case"focusin":(kg(Co)||Co.contentEditable==="true")&&(Vu=Co,tp=Sa,Id=null);break;case"focusout":Id=tp=Vu=null;break;case"mousedown":np=!0;break;case"contextmenu":case"mouseup":case"dragend":np=!1,Bg(Pa,Ts,Aa);break;case"selectionchange":if(pb)break;case"keydown":case"keyup":Bg(Pa,Ts,Aa)}var io;if(Zm)e:{switch(vs){case"compositionstart":var co="onCompositionStart";break e;case"compositionend":co="onCompositionEnd";break e;case"compositionupdate":co="onCompositionUpdate";break e}co=void 0}else qu?_g(vs,Ts)&&(co="onCompositionEnd"):vs==="keydown"&&Ts.keyCode===229&&(co="onCompositionStart");co&&(jg&&Ts.locale!=="ko"&&(qu||co!=="onCompositionStart"?co==="onCompositionEnd"&&qu&&(io=Eg()):(Hc=Aa,Vm="value"in Hc?Hc.value:Hc.textContent,qu=!0)),Co=Rm(Sa,co),0<Co.length&&(co=new Sg(co,vs,null,Ts,Aa),Pa.push({event:co,listeners:Co}),io?co.data=io:(io=Ag(Ts),io!==null&&(co.data=io)))),(io=sb?ib(vs,Ts):ab(vs,Ts))&&(co=Rm(Sa,"onBeforeInput"),0<co.length&&(Co=new Sg("onBeforeInput","beforeinput",null,Ts,Aa),Pa.push({event:Co,listeners:co}),Co.data=io)),sE(Pa,vs,Sa,Ts,Aa)}y1(Pa,Ss)})}function af(vs,Ss,Ts){return{instance:vs,listener:Ss,currentTarget:Ts}}function Rm(vs,Ss){for(var Ts=Ss+"Capture",Ns=[];vs!==null;){var Is=vs,$s=Is.stateNode;if(Is=Is.tag,Is!==5&&Is!==26&&Is!==27||$s===null||(Is=Cd(vs,Ts),Is!=null&&Ns.unshift(af(vs,Is,$s)),Is=Cd(vs,Ss),Is!=null&&Ns.push(af(vs,Is,$s))),vs.tag===3)return Ns;vs=vs.return}return[]}function lE(vs){if(vs===null)return null;do vs=vs.return;while(vs&&vs.tag!==5&&vs.tag!==27);return vs||null}function E1(vs,Ss,Ts,Ns,Is){for(var $s=Ss._reactName,Ks=[];Ts!==null&&Ts!==Ns;
vendor: 28,737 bytes, lines 1464-1465
1464){var Ci=Ts,ma=Ci.alternate,Sa=Ci.stateNode;if(Ci=Ci.tag,ma!==null&&ma===Ns)break;Ci!==5&&Ci!==26&&Ci!==27||Sa===null||(ma=Sa,Is?(Sa=Cd(Ts,$s),Sa!=null&&Ks.unshift(af(Ts,Sa,ma))):Is||(Sa=Cd(Ts,$s),Sa!=null&&Ks.push(af(Ts,Sa,ma)))),Ts=Ts.return}Ks.length!==0&&vs.push({event:Ss,listeners:Ks})}var cE=/\r\n?/g,uE=/\u0000|\uFFFD/g;function v1(vs){return(typeof vs=="string"?vs:""+vs).replace(cE,`
1465`).replace(uE,"")}function w1(vs,Ss){return Ss=v1(Ss),v1(vs)===Ss}function Bo(vs,Ss,Ts,Ns,Is,$s){switch(Ts){case"children":if(typeof Ns=="string")Ss==="body"||Ss==="textarea"&&Ns===""||Bu(vs,Ns);else if(typeof Ns=="number"||typeof Ns=="bigint")Ss!=="body"&&Bu(vs,""+Ns);else return;break;case"className":xf(vs,"class",Ns);break;case"tabIndex":xf(vs,"tabindex",Ns);break;case"dir":case"role":case"viewBox":case"width":case"height":xf(vs,Ts,Ns);break;case"style":xg(vs,Ns,$s);return;case"data":if(Ss!=="object"){xf(vs,"data",Ns);break}case"src":case"href":if(Ns===""&&(Ss!=="a"||Ts!=="href")){vs.removeAttribute(Ts);break}if(Ns==null||typeof Ns=="function"||typeof Ns=="symbol"||typeof Ns=="boolean"){vs.removeAttribute(Ts);break}Ns=yf(Ns),vs.setAttribute(Ts,Ns);break;case"action":case"formAction":if(typeof Ns=="function"){vs.setAttribute(Ts,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof $s=="function"&&(Ts==="formAction"?(Ss!=="input"&&Bo(vs,Ss,"name",Is.name,Is,null),Bo(vs,Ss,"formEncType",Is.formEncType,Is,null),Bo(vs,Ss,"formMethod",Is.formMethod,Is,null),Bo(vs,Ss,"formTarget",Is.formTarget,Is,null)):(Bo(vs,Ss,"encType",Is.encType,Is,null),Bo(vs,Ss,"method",Is.method,Is,null),Bo(vs,Ss,"target",Is.target,Is,null)));if(Ns==null||typeof Ns=="symbol"||typeof Ns=="boolean"){vs.removeAttribute(Ts);break}Ns=yf(Ns),vs.setAttribute(Ts,Ns);break;case"onClick":Ns!=null&&(vs.onclick=hc);return;case"onScroll":Ns!=null&&wo("scroll",vs);return;case"onScrollEnd":Ns!=null&&wo("scrollend",vs);return;case"dangerouslySetInnerHTML":if(Ns!=null){if(typeof Ns!="object"||!("__html"in Ns))throw Error(xs(61));if(Ts=Ns.__html,Ts!=null){if(Is.children!=null)throw Error(xs(60));$s?.__html!==Ts&&(vs.innerHTML=Ts)}}break;case"multiple":vs.multiple=Ns&&typeof Ns!="function"&&typeof Ns!="symbol";break;case"muted":vs.muted=Ns&&typeof Ns!="function"&&typeof Ns!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(Ns==null||typeof Ns=="function"||typeof Ns=="boolean"||typeof Ns=="symbol"){vs.removeAttribute("xlink:href");break}Ts=yf(Ns),vs.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",Ts);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Ns!=null&&typeof Ns!="function"&&typeof Ns!="symbol"?vs.setAttribute(Ts,Ns):vs.removeAttribute(Ts);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Ns&&typeof Ns!="function"&&typeof Ns!="symbol"?vs.setAttribute(Ts,""):vs.removeAttribute(Ts);break;case"capture":case"download":Ns===!0?vs.setAttribute(Ts,""):Ns!==!1&&Ns!=null&&typeof Ns!="function"&&typeof Ns!="symbol"?vs.setAttribute(Ts,Ns):vs.removeAttribute(Ts);break;case"cols":case"rows":case"size":case"span":Ns!=null&&typeof Ns!="function"&&typeof Ns!="symbol"&&!isNaN(Ns)&&1<=Ns?vs.setAttribute(Ts,Ns):vs.removeAttribute(Ts);break;case"rowSpan":case"start":Ns==null||typeof Ns=="function"||typeof Ns=="symbol"||isNaN(Ns)?vs.removeAttribute(Ts):vs.setAttribute(Ts,Ns);break;case"popover":wo("beforetoggle",vs),wo("toggle",vs),gf(vs,"popover",Ns);break;case"xlinkActuate":Cc(vs,"http://www.w3.org/1999/xlink","xlink:actuate",Ns);break;case"xlinkArcrole":Cc(vs,"http://www.w3.org/1999/xlink","xlink:arcrole",Ns);break;case"xlinkRole":Cc(vs,"http://www.w3.org/1999/xlink","xlink:role",Ns);break;case"xlinkShow":Cc(vs,"http://www.w3.org/1999/xlink","xlink:show",Ns);break;case"xlinkTitle":Cc(vs,"http://www.w3.org/1999/xlink","xlink:title",Ns);break;case"xlinkType":Cc(vs,"http://www.w3.org/1999/xlink","xlink:type",Ns);break;case"xmlBase":Cc(vs,"http://www.w3.org/XML/1998/namespace","xml:base",Ns);break;case"xmlLang":Cc(vs,"http://www.w3.org/XML/1998/namespace","xml:lang",Ns);break;case"xmlSpace":Cc(vs,"http://www.w3.org/XML/1998/namespace","xml:space",Ns);break;case"is":gf(vs,"is",Ns);break;case"innerText":case"textContent":return;default:if(!(2<Ts.length)||Ts[0]!=="o"&&Ts[0]!=="O"||Ts[1]!=="n"&&Ts[1]!=="N")Ts=A0.get(Ts)||Ts,gf(vs,Ts,Ns);else return}Mo=!0}function Fh(vs,Ss,Ts,Ns,Is,$s){switch(Ts){case"style":xg(vs,Ns,$s);return;case"dangerouslySetInnerHTML":if(Ns!=null){if(typeof Ns!="object"||!("__html"in Ns))throw Error(xs(61));if(Ts=Ns.__html,Ts!=null){if(Is.children!=null)throw Error(xs(60));$s?.__html!==Ts&&(vs.innerHTML=Ts)}}break;case"children":if(typeof Ns=="string")Bu(vs,Ns);else if(typeof Ns=="number"||typeof Ns=="bigint")Bu(vs,""+Ns);else return;break;case"onScroll":Ns!=null&&wo("scroll",vs);return;case"onScrollEnd":Ns!=null&&wo("scrollend",vs);return;case"onClick":Ns!=null&&(vs.onclick=hc);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!hf.hasOwnProperty(Ts))e:{if(Ts[0]==="o"&&Ts[1]==="n"&&(Is=Ts.endsWith("Capture"),$s=Ts.slice(2,Is?Ts.length-7:void 0),Ss=vs[Jo]||null,Ss=Ss!=null?Ss[Ts]:null,typeof Ss=="function"&&vs.removeEventListener($s,Ss,Is),typeof Ns=="function")){typeof Ss!="function"&&Ss!==null&&(Ts in vs?vs[Ts]=null:vs.hasAttribute(Ts)&&vs.removeAttribute(Ts)),vs.addEventListener($s,Ns,Is);break e}Mo=!0,Ts in vs?vs[Ts]=Ns:Ns===!0?vs.setAttribute(Ts,""):gf(vs,Ts,Ns)}return}Mo=!0}function Tl(vs,Ss,Ts){switch(Ss){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wo("error",vs),wo("load",vs);var Ns=!1,Is=!1,$s;for($s in Ts)if(Ts.hasOwnProperty($s)){var Ks=Ts[$s];if(Ks!=null)switch($s){case"src":Ns=!0;break;case"srcSet":Is=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(xs(137,Ss));default:Bo(vs,Ss,$s,Ks,Ts,null)}}Is&&Bo(vs,Ss,"srcSet",Ts.srcSet,Ts,null),Ns&&Bo(vs,Ss,"src",Ts.src,Ts,null);return;case"input":wo("invalid",vs);var Ci=$s=Ks=Is=null,ma=null,Sa=null;for(Ns in Ts)if(Ts.hasOwnProperty(Ns)){var Aa=Ts[Ns];if(Aa!=null)switch(Ns){case"name":Is=Aa;break;case"type":Ks=Aa;break;case"checked":ma=Aa;break;case"defaultChecked":Sa=Aa;break;case"value":$s=Aa;break;case"defaultValue":Ci=Aa;break;case"children":case"dangerouslySetInnerHTML":if(Aa!=null)throw Error(xs(137,Ss));break;default:Bo(vs,Ss,Ns,Aa,Ts,null)}}mg(vs,$s,Ci,ma,Sa,Ks,Is,!1);return;case"select":wo("invalid",vs),Ns=Ks=$s=null;for(Is in Ts)if(Ts.hasOwnProperty(Is)&&(Ci=Ts[Is],Ci!=null))switch(Is){case"value":$s=Ci;break;case"defaultValue":Ks=Ci;break;case"multiple":Ns=Ci;default:Bo(vs,Ss,Is,Ci,Ts,null)}Ss=$s,Ts=Ks,vs.multiple=!!Ns,Ss!=null?Uu(vs,!!Ns,Ss,!1):Ts!=null&&Uu(vs,!!Ns,Ts,!0);return;case"textarea":wo("invalid",vs),$s=Is=Ns=null;for(Ks in Ts)if(Ts.hasOwnProperty(Ks)&&(Ci=Ts[Ks],Ci!=null))switch(Ks){case"value":Ns=Ci;break;case"defaultValue":Is=Ci;break;case"children":$s=Ci;break;case"dangerouslySetInnerHTML":if(Ci!=null)throw Error(xs(91));break;default:Bo(vs,Ss,Ks,Ci,Ts,null)}hg(vs,Ns,Is,$s);return;case"option":for(ma in Ts)Ts.hasOwnProperty(ma)&&(Ns=Ts[ma],Ns!=null)&&(ma==="selected"?vs.selected=Ns&&typeof Ns!="function"&&typeof Ns!="symbol":Bo(vs,Ss,ma,Ns,Ts,null));return;case"dialog":wo("beforetoggle",vs),wo("toggle",vs),wo("cancel",vs),wo("close",vs);break;case"iframe":case"object":wo("load",vs);break;case"video":case"audio":for(Ns=0;Ns<sf.length;Ns++)wo(sf[Ns],vs);break;case"image":wo("error",vs),wo("load",vs);break;case"details":wo("toggle",vs);break;case"embed":case"source":case"link":wo("error",vs),wo("load",vs);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Sa in Ts)if(Ts.hasOwnProperty(Sa)&&(Ns=Ts[Sa],Ns!=null))switch(Sa){case"children":case"dangerouslySetInnerHTML":throw Error(xs(137,Ss));default:Bo(vs,Ss,Sa,Ns,Ts,null)}return;default:if(Um(Ss)){for(Aa in Ts)Ts.hasOwnProperty(Aa)&&(Ns=Ts[Aa],Ns!==void 0&&Fh(vs,Ss,Aa,Ns,Ts,void 0));return}}for(Ci in Ts)Ts.hasOwnProperty(Ci)&&(Ns=Ts[Ci],Ns!=null&&Bo(vs,Ss,Ci,Ns,Ts,null))}var dE={};function fE(vs,Ss,Ts,Ns){switch(Ss){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var Is=null,$s=null,Ks=null,Ci=null,ma=null,Sa=null,Aa=null;for(Ta in Ts){var Pa=Ts[Ta];if(Ts.hasOwnProperty(Ta)&&Pa!=null)switch(Ta){case"checked":break;case"value":break;case"defaultValue":ma=Pa;default:Ns.hasOwnProperty(Ta)||Bo(vs,Ss,Ta,null,Ns,Pa)}}for(var va in Ns){var Ta=Ns[va];if(Pa=Ts[va],Ns.hasOwnProperty(va)&&(Ta!=null||Pa!=null))switch(va){case"type":Ta!==Pa&&(Mo=!0),$s=Ta;break;case"name":Ta!==Pa&&(Mo=!0),Is=Ta;break;case"checked":Ta!==Pa&&(Mo=!0),Sa=Ta;break;case"defaultChecked":Ta!==Pa&&(Mo=!0),Aa=Ta;break;case"value":Ta!==Pa&&(Mo=!0),Ks=Ta;break;case"defaultValue":Ta!==Pa&&(Mo=!0),Ci=Ta;break;case"children":case"dangerouslySetInnerHTML":if(Ta!=null)throw Error(xs(137,Ss));break;default:Ta!==Pa&&Bo(vs,Ss,va,Ta,Ns,Pa)}}Lm(vs,Ks,Ci,ma,Sa,Aa,$s,Is);return;case"select":Ta=Ks=Ci=va=null;for($s in Ts)if(ma=Ts[$s],Ts.hasOwnProperty($s)&&ma!=null)switch($s){case"value":break;case"multiple":Ta=ma;default:Ns.hasOwnProperty($s)||Bo(vs,Ss,$s,null,Ns,ma)}for(Is in Ns)if($s=Ns[Is],ma=Ts[Is],Ns.hasOwnProperty(Is)&&($s!=null||ma!=null))switch(Is){case"value":$s!==ma&&(Mo=!0),va=$s;break;case"defaultValue":$s!==ma&&(Mo=!0),Ci=$s;break;case"multiple":$s!==ma&&(Mo=!0),Ks=$s;default:$s!==ma&&Bo(vs,Ss,Is,$s,Ns,ma)}Ss=Ci,Ts=Ks,Ns=Ta,va!=null?Uu(vs,!!Ts,va,!1):!!Ns!=!!Ts&&(Ss!=null?Uu(vs,!!Ts,Ss,!0):Uu(vs,!!Ts,Ts?[]:"",!1));return;case"textarea":Ta=va=null;for(Ci in Ts)if(Is=Ts[Ci],Ts.hasOwnProperty(Ci)&&Is!=null&&!Ns.hasOwnProperty(Ci))switch(Ci){case"value":break;case"children":break;default:Bo(vs,Ss,Ci,null,Ns,Is)}for(Ks in Ns)if(Is=Ns[Ks],$s=Ts[Ks],Ns.hasOwnProperty(Ks)&&(Is!=null||$s!=null))switch(Ks){case"value":Is!==$s&&(Mo=!0),va=Is;break;case"defaultValue":Is!==$s&&(Mo=!0),Ta=Is;break;case"children":break;case"dangerouslySetInnerHTML":if(Is!=null)throw Error(xs(91));break;default:Is!==$s&&Bo(vs,Ss,Ks,Is,Ns,$s)}pg(vs,va,Ta);return;case"option":for(var Ya in Ts)va=Ts[Ya],Ts.hasOwnProperty(Ya)&&va!=null&&!Ns.hasOwnProperty(Ya)&&(Ya==="selected"?vs.selected=!1:Bo(vs,Ss,Ya,null,Ns,va));for(ma in Ns)va=Ns[ma],Ta=Ts[ma],Ns.hasOwnProperty(ma)&&va!==Ta&&(va!=null||Ta!=null)&&(ma==="selected"?(va!==Ta&&(Mo=!0),vs.selected=va&&typeof va!="function"&&typeof va!="symbol"):Bo(vs,Ss,ma,va,Ns,Ta));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var no in Ts)va=Ts[no],Ts.hasOwnProperty(no)&&va!=null&&!Ns.hasOwnProperty(no)&&Bo(vs,Ss,no,null,Ns,va);for(Sa in Ns)if(va=Ns[Sa],Ta=Ts[Sa],Ns.hasOwnProperty(Sa)&&va!==Ta&&(va!=null||Ta!=null))switch(Sa){case"children":case"dangerouslySetInnerHTML":if(va!=null)throw Error(xs(137,Ss));break;default:Bo(vs,Ss,Sa,va,Ns,Ta)}return;default:if(Um(Ss)){for(var go in Ts)va=Ts[go],Ts.hasOwnProperty(go)&&va!==void 0&&!Ns.hasOwnProperty(go)&&Fh(vs,Ss,go,void 0,Ns,va);for(Aa in Ns)va=Ns[Aa],Ta=Ts[Aa],!Ns.hasOwnProperty(Aa)||va===Ta||va===void 0&&Ta===void 0||Fh(vs,Ss,Aa,va,Ns,Ta);return}}for(var wa in Ts)va=Ts[wa],Ts.hasOwnProperty(wa)&&va!=null&&!Ns.hasOwnProperty(wa)&&Bo(vs,Ss,wa,null,Ns,va);for(Pa in Ns)va=Ns[Pa],Ta=Ts[Pa],!Ns.hasOwnProperty(Pa)||va===Ta||va==null&&Ta==null||Bo(vs,Ss,Pa,va,Ns,Ta)}function S1(vs){switch(vs){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mE(){if(typeof performance.getEntriesByType=="function"){for(var vs=0,Ss=0,Ts=performance.getEntriesByType("resource"),Ns=0;Ns<Ts.length;Ns++){var Is=Ts[Ns],$s=Is.transferSize,Ks=Is.initiatorType,Ci=Is.duration;if($s&&Ci&&S1(Ks)){for(Ks=0,Ci=Is.responseEnd,Ns+=1;Ns<Ts.length;Ns++){var ma=Ts[Ns],Sa=ma.startTime;if(Sa>Ci)break;var Aa=ma.transferSize,Pa=ma.initiatorType;Aa&&S1(Pa)&&(ma=ma.responseEnd,Ks+=Aa*(ma<Ci?1:(Ci-Sa)/(ma-Sa)))}if(--Ns,Ss+=8*($s+Ks)/(Is.duration/1e3),vs++,10<vs)break}}if(0<vs)return Ss/vs/1e6}return navigator.connection&&(vs=navigator.connection.downlink,typeof vs=="number")?vs:5}var Uh=null,Bh=null;function of(vs){return vs.nodeType===9?vs:vs.ownerDocument}function R1(vs){switch(vs){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function j1(vs,Ss){if(vs===0)switch(Ss){case"svg":return 1;case"math":return 2;default:return 0}return vs===1&&Ss==="foreignObject"?0:vs}function C1(vs,Ss,Ts,Ns){return Ts=of(Ts).createElement(vs),Ts[Yo]=Ns,Ts[Jo]=Ss,Tl(Ts,vs,Ss),po(Ts),Ts}function zh(vs,Ss){return vs==="textarea"||vs==="noscript"||typeof Ss.children=="string"||typeof Ss.children=="number"||typeof Ss.children=="bigint"||typeof Ss.dangerouslySetInnerHTML=="object"&&Ss.dangerouslySetInnerHTML!==null&&Ss.dangerouslySetInnerHTML.__html!=null}var Hh=null;function pE(){var vs=window.event;return vs&&vs.type==="popstate"?vs===Hh?!1:(Hh=vs,!0):(Hh=null,!1)}var qh=typeof setTimeout=="function"?setTimeout:void 0,hE=typeof clearTimeout=="function"?clearTimeout:void 0,T1=typeof Promise=="function"?Promise:void 0,_1=typeof requestAnimationFrame=="function"?requestAnimationFrame:qh,gE=typeof queueMicrotask=="function"?queueMicrotask:typeof T1<"u"?function(vs){return T1.resolve(null).then(vs).catch(xE)}:qh;function xE(vs){setTimeout(function(){throw vs})}function cu(vs){return vs==="head"}function A1(vs,Ss){var Ts=Ss,Ns=0;do{var Is=Ts.nextSibling;if(vs.removeChild(Ts),Is&&Is.nodeType===8)if(Ts=Is.data,Ts==="/$"||Ts==="/&"){if(Ns===0){vs.removeChild(Is),Rd(Ss);return}Ns--}else if(Ts==="$"||Ts==="$?"||Ts==="$~"||Ts==="$!"||Ts==="&")Ns++;else if(Ts==="html")Qh(vs.ownerDocument.documentElement);else if(Ts==="head"){Ts=vs.ownerDocument.head,Qh(Ts);for(var $s=Ts.firstChild;$s;){var Ks=$s.nextSibling,Ci=$s.nodeName;$s[fc]||Ci==="SCRIPT"||Ci==="STYLE"||Ci==="LINK"&&$s.rel.toLowerCase()==="stylesheet"||Ts.removeChild($s),$s=Ks}}else Ts==="body"&&Qh(vs.ownerDocument.body);Ts=Is}while(Ts);Rd(Ss)}function k1(vs,Ss){var Ts=vs;vs=0;do{var Ns=Ts.nextSibling;if(Ts.nodeType===1?Ss?(Ts._stashedDisplay=Ts.style.display,Ts.style.display="none"):(Ts.style.display=Ts._stashedDisplay||"",Ts.getAttribute("style")===""&&Ts.removeAttribute("style")):Ts.nodeType===3&&(Ss?(Ts._stashedText=Ts.nodeValue,Ts.nodeValue=""):Ts.nodeValue=Ts._stashedText||""),Ns&&Ns.nodeType===8)if(Ts=Ns.data,Ts==="/$"){if(vs===0)break;vs--}else Ts!=="$"&&Ts!=="$?"&&Ts!=="$~"&&Ts!=="$!"||vs++;Ts=Ns}while(Ts)}function N1(vs,Ss,Ts){if(Ss=CSS.escape(Ss)!==Ss?"r-"+btoa(Ss).replace(/=/g,""):Ss,vs.style.viewTransitionName=Ss,Ts!=null&&(vs.style.viewTransitionClass=Ts),Ts=getComputedStyle(vs),Ts.display==="inline"){if(Ss=vs.getClientRects(),Ss.length===1)var Ns=1;else for(var Is=Ns=0;Is<Ss.length;Is++){var $s=Ss[Is];0<$s.width&&0<$s.height&&Ns++}Ns===1&&(vs=vs.style,vs.display=Ss.length===1?"inline-block":"block",vs.marginTop="-"+Ts.paddingTop,vs.marginBottom="-"+Ts.paddingBottom)}}function O1(vs,Ss){vs=vs.style,Ss=Ss.style;var Ts=Ss!=null?Ss.hasOwnProperty("viewTransitionName")?Ss.viewTransitionName:Ss.hasOwnProperty("view-transition-name")?Ss["view-transition-name"]:null:null;vs.viewTransitionName=Ts==null||typeof Ts=="boolean"?"":(""+Ts).trim(),Ts=Ss!=null?Ss.hasOwnProperty("viewTransitionClass")?Ss.viewTransitionClass:Ss.hasOwnProperty("view-transition-class")?Ss["view-transition-class"]:null:null,vs.viewTransitionClass=Ts==null||typeof Ts=="boolean"?"":(""+Ts).trim(),vs.display==="inline-block"&&(Ss==null?vs.display=vs.margin="":(Ts=Ss.display,vs.display=Ts==null||typeof Ts=="boolean"?"":Ts,Ts=Ss.margin,Ts!=null?vs.margin=Ts:(Ts=Ss.hasOwnProperty("marginTop")?Ss.marginTop:Ss["margin-top"],vs.marginTop=Ts==null||typeof Ts=="boolean"?"":Ts,Ss=Ss.hasOwnProperty("marginBottom")?Ss.marginBottom:Ss["margin-bottom"],vs.marginBottom=Ss==null||typeof Ss=="boolean"?"":Ss)))}function yE(vs,Ss,Ts){return Ts=Ts.ownerDocument.defaultView,{rect:vs,abs:Ss.position==="absolute"||Ss.position==="fixed",clip:Ss.clipPath!=="none"||Ss.overflow!=="visible"||Ss.filter!=="none"||Ss.mask!=="none"||Ss.mask!=="none"||Ss.borderRadius!=="0px",view:0<=vs.bottom&&0<=vs.right&&vs.top<=Ts.innerHeight&&vs.left<=Ts.innerWidth}}function Vh(vs){var Ss=vs.getBoundingClientRect(),Ts=getComputedStyle(vs);return yE(Ss,Ts,vs)}function bE(vs){return vs.documentElement.clientHeight}function EE(vs){this.addEventListener("load",vs),this.addEventListener("error",vs)}function vE(vs,Ss,Ts,Ns,Is,$s,Ks,Ci,ma){var Sa=Ss.nodeType===9?Ss:Ss.ownerDocument;try{var Aa=Sa.startViewTransition({update:function(){var va=Sa.defaultView,Ta=va.navigation&&va.navigation.transition,Ya=Sa.fonts.status;Ns();var no=[];if(Ya==="loaded"&&(bE(Sa),Sa.fonts.status==="loading"&&no.push(Sa.fonts.ready)),Ya=no.length,vs!==null)for(var go=vs.suspenseyImages,wa=0,ya=0;ya<go.length;ya++){var ja=go[ya];if(!ja.complete){var Da=ja.getBoundingClientRect();if(0<Da.bottom&&0<Da.right&&Da.top<va.innerHeight&&Da.left<va.innerWidth){if(wa+=X1(ja),wa>Tm){no.length=Ya;break}ja=new Promise(EE.bind(ja)),no.push(ja)}}}if(0<no.length)return va=Promise.race([Promise.all(no),new Promise(function(Xa){return setTimeout(Xa,500)})]).then(Is,Is),(Ta?Promise.allSettled([Ta.finished,va]):va).then($s,$s);if(Is(),Ta)return Ta.finished.then($s,$s);$s()},types:Ts});Sa.__reactViewTransition=Aa;var Pa=[];return Aa.ready.then(function(){for(var va=Sa.documentElement.getAnimations({subtree:!0}),Ta=0;Ta<va.length;Ta++){var Ya=va[Ta],no=Ya.effect,go=no.pseudoElement;if(go!=null&&go.startsWith("::view-transition")){Pa.push(Ya),Ya=no.getKeyframes();for(var wa=go=void 0,ya=!0,ja=0;ja<Ya.length;ja++){var Da=Ya[ja],Xa=Da.width;if(go===void 0)go=Xa;else if(go!==Xa){ya=!1;break}if(Xa=Da.height,wa===void 0)wa=Xa;else if(wa!==Xa){ya=!1;break}delete Da.width,delete Da.height,Da.transform==="none"&&delete Da.transform}ya&&go!==void 0&&wa!==void 0&&(no.setKeyframes(Ya),ya=getComputedStyle(no.target,no.pseudoElement),ya.width!==go||ya.height!==wa)&&(ya=Ya[0],ya.width=go,ya.height=wa,ya=Ya[Ya.length-1],ya.width=go,ya.height=wa,no.setKeyframes(Ya))}}Ks()},function(va){Sa.__reactViewTransition===Aa&&(Sa.__reactViewTransition=null);try{typeof va=="object"&&va!==null&&va.name==="InvalidStateError"&&(va.message==="View transition was skipped because document visibility state is hidden."||va.message==="Skipping view transition because document visibility state has become hidden."||va.message==="Skipping view transition because viewport size changed."||va.message==="Transition was aborted because of invalid state")&&(va=null),va!==null&&ma(va)}finally{Ns(),Is(),Ks()}}),Aa.finished.finally(function(){for(var va=0;va<Pa.length;va++)Pa[va].cancel();Sa.__reactViewTransition===Aa&&(Sa.__reactViewTransition=null),Ci()}),Aa}catch{return Ns(),Is(),Ks(),null}}function $u(vs,Ss){this._scope=document.documentElement,this._selector="::view-transition-"+vs+"("+Ss+")"}$u.prototype.animate=function(vs,Ss){return Ss=typeof Ss=="number"?{duration:Ss}:Zs({},Ss),Ss.pseudoElement=this._selector,this._scope.animate(vs,Ss)},$u.prototype.getAnimations=function(){for(var vs=this._scope,Ss=this._selector,Ts=vs.getAnimations({subtree:!0}),Ns=[],Is=0;Is<Ts.length;Is++){var $s=Ts[Is].effect;$s!==null&&$s.target===vs&&$s.pseudoElement===Ss&&Ns.push(Ts[Is])}return Ns},$u.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function M1(vs){return{name:vs,group:new $u("group",vs),imagePair:new $u("image-pair",vs),old:new $u("old",vs),new:new $u("new",vs)}}function Kl(vs){this._fragmentFiber=vs,this._observers=this._eventListeners=null}Kl.prototype.addEventListener=function(vs,Ss,Ts){var Ns=null,Is=null;if(!(Ts!=null&&typeof Ts!="boolean"&&(Ns=Ts.signal||null,Ns!==null&&Ns.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var $s=this._eventListeners;if(D1($s,vs,Ss,Ts)===-1){var Ks=this,Ci=Ss;Ts!=null&&typeof Ts!="boolean"&&Ts.once===!0&&(Ci=function(ma){Ks.removeEventListener(vs,Ss,Ts),typeof Ss=="function"?Ss.call(this,ma):Ss.handleEvent(ma)}),Ns!==null&&(Is=Ks.removeEventListener.bind(Ks,vs,Ss,Ts),Ns.addEventListener("abort",Is,{once:!0}),Is=Ns.removeEventListener.bind(Ns,"abort",Is)),Ns=yd(Ts),$s.push({type:vs,listener:Ss,optionsOrUseCapture:Ts,attachedListener:Ci,cleanup:Is}),ks(this._fragmentFiber.child,!1,wE,vs,Ci,Ns)}this._eventListeners=$s}};function wE(vs,Ss,Ts,Ns){return Ls(vs).addEventListener(Ss,Ts,Ns),!1}Kl.prototype.removeEventListener=function(vs,Ss,Ts){var Ns=this._eventListeners;if(Ns!==null&&(Ss=D1(Ns,vs,Ss,Ts),Ss!==-1)){var Is=Ns[Ss];Ts=Is.attachedListener;var $s=Is.cleanup;Is=yd(Is.optionsOrUseCapture),ks(this._fragmentFiber.child,!1,SE,vs,Ts,Is),Ns.splice(Ss,1),$s!==null&&$s()}};function SE(vs,Ss,Ts,Ns){return Ls(vs).removeEventListener(Ss,Ts,Ns),!1}function yd(vs){return vs!=null&&typeof vs!="boolean"&&(vs.once===!0||vs.signal instanceof AbortSignal)?{capture:vs.capture,passive:vs.passive}:vs}function I1(vs){return vs==null?"c=0":typeof vs=="boolean"?"c="+(vs?"1":"0"):"c="+(vs.capture?"1":"0")}function D1(vs,Ss,Ts,Ns){if(vs.length===0)return-1;Ns=I1(Ns);for(var Is=0;Is<vs.length;Is++){var $s=vs[Is];if($s.type===Ss&&$s.listener===Ts&&I1($s.optionsOrUseCapture)===Ns)return Is}return-1}Kl.prototype.dispatchEvent=function(vs){var Ss=Os(this._fragmentFiber);if(Ss===null)return!0;Ss=Ls(Ss);var Ts=this._eventListeners;if(Ts!==null&&0<Ts.length||!vs.bubbles){var Ns=Ss.nodeType===9?Ss.createComment(""):document.createTextNode("");if(Ts)for(var Is=0;Is<Ts.length;Is++){var $s=Ts[Is];Ns.addEventListener($s.type,$s.attachedListener,yd($s.optionsOrUseCapture))}if(Ss.appendChild(Ns),vs=Ns.dispatchEvent(vs),Ts)for(Is=0;Is<Ts.length;Is++)$s=Ts[Is],Ns.removeEventListener($s.type,$s.attachedListener,yd($s.optionsOrUseCapture));return Ss.removeChild(Ns),vs}return Ss.dispatchEvent(vs)},Kl.prototype.focus=function(vs){ks(this._fragmentFiber.child,!0,$1,vs,void 0,void 0)};function $1(vs,Ss){return vs.tag===6?!1:(vs=Ls(vs),$E(vs,Ss))}Kl.prototype.focusLast=function(vs){var Ss=[];ks(this._fragmentFiber.child,!0,Wh,Ss,void 0,void 0);for(var Ts=Ss.length-1;0<=Ts&&!$1(Ss[Ts],vs);Ts--);};function Wh(vs,Ss){return Ss.push(vs),!1}Kl.prototype.blur=function(){var vs=Os(this._fragmentFiber);vs!==null&&(vs=Ls(vs),vs=of(vs).activeElement,vs!==null&&ks(this._fragmentFiber.child,!1,RE,vs,void 0,void 0))};function RE(vs,Ss){return vs.tag===6?!1:(vs=Ls(vs),vs===Ss||vs.contains(Ss)?(Ss.blur(),!0):!1)}Kl.prototype.observeUsing=function(vs){this._observers===null&&(this._observers=new Set),this._observers.add(vs),ks(this._fragmentFiber.child,!1,jE,vs,void 0,void 0)};function jE(vs,Ss){return vs.tag===6||(vs=Ls(vs),Ss.observe(vs)),!1}Kl.prototype.unobserveUsing=function(vs){var Ss=this._observers;if(Ss!==null&&Ss.has(vs)){Ss.delete(vs),ks(this._fragmentFiber.child,!1,CE,vs,void 0,void 0);for(var Ts=Ss=0;Ts<uc.length;Ts++){var Ns=uc[Ts];Ns.fragmentInstance===this&&Ns.observer===vs?vs.unobserve(Ns.instance):uc[Ss++]=Ns}uc.length=Ss}};function CE(vs,Ss){return vs.tag===6||(vs=Ls(vs),Ss.unobserve(vs)),!1}var uc=[],Gh=!1;function TE(vs,Ss,Ts){uc.push({fragmentInstance:vs,observer:Ss,instance:Ts}),Gh||(Gh=!0,PE(function(){Gh=!1;var Ns=uc;uc=[];for(var Is=0;Is<Ns.length;Is++){var $s=Ns[Is];$s.observer.unobserve($s.instance)}}))}Kl.prototype.getClientRects=function(){var vs=[];return ks(this._fragmentFiber.child,!1,AE,vs,void 0,void 0),vs};function AE(vs,Ss){if(vs.tag===6){vs=vs.stateNode;var Ts=vs.ownerDocument.createRange();Ts.selectNodeContents(vs),Ss.push.apply(Ss,Ts.getClientRects())}else vs=Ls(vs),Ss.push.apply(Ss,vs.getClientRects());return!1}Kl.prototype.getRootNode=function(vs){var Ss=Os(this._fragmentFiber);return Ss===null?this:Ls(Ss).getRootNode(vs)},Kl.prototype.compareDocumentPosition=function(vs){var Ss=Os(this._fragmentFiber);if(Ss===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var Ts=[];ks(this._fragmentFiber.child,!1,Wh,Ts,void 0,void 0);var Ns=Ls(Ss);if(Ts.length===0){if(Ts=Ns,Ms(this._fragmentFiber)){e:{for(Ss=this._fragmentFiber.return;Ss!==null;){if(Ss.tag===4){Ss=Ss.stateNode.containerInfo;break e}if(Ss.tag===3||Ss.tag===5||Ss.tag===27)break;Ss=Ss.return}Ss=null}Ss!=null&&(Ts=Ss)}Ss=this._fragmentFiber;var Is=Ns=Ts.compareDocumentPosition(vs);return Ts===vs?Is=Node.DOCUMENT_POSITION_CONTAINS:Ns&Node.DOCUMENT_POSITION_CONTAINED_BY&&(Ts=Ds(Ss)[1],Ts===null?Is=Node.DOCUMENT_POSITION_PRECEDING:(vs=Ls(Ts).compareDocumentPosition(vs),Is=vs===0||vs&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),Is|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}Ss=Ls(Ts[0]),Is=Ls(Ts[Ts.length-1]);var $s=Ms(this._fragmentFiber)?Ss.parentElement:Ns;if($s==null)return Node.DOCUMENT_POSITION_DISCONNECTED;Ns=$s.compareDocumentPosition(Ss)&Node.DOCUMENT_POSITION_CONTAINED_BY,$s=$s.compareDocumentPosition(Is)&Node.DOCUMENT_POSITION_CONTAINED_BY;var Ks=Ss.compareDocumentPosition(vs),Ci=Is.compareDocumentPosition(vs),ma=Ks&Node.DOCUMENT_POSITION_CONTAINED_BY||Ci&Node.DOCUMENT_POSITION_CONTAINED_BY;return Ci=Ns&&$s&&Ks&Node.DOCUMENT_POSITION_FOLLOWING&&Ci&Node.DOCUMENT_POSITION_PRECEDING,Ss=Ns&&Ss===vs||$s&&Is===vs||ma||Ci?Node.DOCUMENT_POSITION_CONTAINED_BY:!Ns&&Ss===vs||!$s&&Is===vs?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:Ks,Ss&Node.DOCUMENT_POSITION_DISCONNECTED||Ss&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||kE(Ss,this._fragmentFiber,Ts[0],Ts[Ts.length-1],vs)?Ss:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function kE(vs,Ss,Ts,Ns,Is){var $s=gl(Is);if(vs&Node.DOCUMENT_POSITION_CONTAINED_BY){if(Ts=!!$s)e:{for(;$s!==null;){if($s.tag===7&&($s===Ss||$s.alternate===Ss)){Ts=!0;break e}$s=$s.return}Ts=!1}return Ts}if(vs&Node.DOCUMENT_POSITION_CONTAINS){if($s===null)return $s=Is.ownerDocument,Is===$s||Is===$s.documentElement||Is===$s.body;e:{for($s=Ss,Ss=Os(Ss);$s!==null;){if(!($s.tag!==5&&$s.tag!==3&&$s.tag!==27||$s!==Ss&&$s.alternate!==Ss)){$s=!0;break e}$s=$s.return}$s=!1}return $s}return vs&Node.DOCUMENT_POSITION_PRECEDING?((Ss=!!$s)&&!(Ss=$s===Ts)&&(Ss=Ws(Ts,$s,Js),Ss===null?Ss=!1:(ks(Ss,!0,Us,$s,Ts),$s=Bs,Bs=null,Ss=$s!==null)),Ss):vs&Node.DOCUMENT_POSITION_FOLLOWING?((Ss=!!$s)&&!(Ss=$s===Ns)&&(Ss=Ws(Ns,$s,Js),Ss===null?Ss=!1:(ks(Ss,!0,Gs,$s,Ns),$s=Bs,Fs=Bs=null,Ss=$s!==null)),Ss):!1}function P1(vs,Ss){var Ts=vs.ownerDocument.createRange();Ts.selectNodeContents(vs),vs=Ts.getBoundingClientRect(),window.scrollTo(window.scrollX+vs.left,Ss?window.scrollY+vs.top:window.scrollY+vs.bottom-window.innerHeight)}Kl.prototype.scrollIntoView=function(vs){if(typeof vs=="object")throw Error(xs(566));var Ss=[];ks(this._fragmentFiber.child,!1,Wh,Ss,void 0,void 0);var Ts=vs!==!1;if(Ss.length===0){var Ns=Ds(this._fragmentFiber);if(Ns=Ts?Ns[1]||Ns[0]||Os(this._fragmentFiber):Ns[0]||Ns[1],Ns===null)return;if(Ns.tag===6){vs=Ls(Ns),P1(vs,Ts);return}if(Ns=Ls(Ns),Ns.nodeType!==9){if(Ns.nodeType===11){Ts="host"in Ns?Ns.host:null,Ts!==null&&Ts.scrollIntoView(vs);return}Ns.scrollIntoView(vs)}}for(Ns=Ts?Ss.length-1:0;Ns!==(Ts?-1:Ss.length);){var Is=Ss[Ns];Is.tag===6?(Is=Ls(Is),P1(Is,Ts)):Ls(Is).scrollIntoView(vs),Ns+=Ts?-1:1}};function NE(vs,Ss){return vs=Ls(vs),L1(vs,Ss),!1}function L1(vs,Ss){vs.reactFragments==null&&(vs.reactFragments=new Set),vs.reactFragments.add(Ss)}function F1(vs,Ss){var Ts=Ss._eventListeners;if(Ts!==null)for(var Ns=0;Ns<Ts.length;Ns++){var Is=Ts[Ns];vs.addEventListener(Is.type,Is.attachedListener,yd(Is.optionsOrUseCapture))}vs.nodeType!==3&&(Ts=Ss._observers,Ts!==null&&Ts.forEach(function($s){for(var Ks=0,Ci=0;Ci<uc.length;Ci++){var ma=uc[Ci];(ma.fragmentInstance!==Ss||ma.observer!==$s||ma.instance!==vs)&&(uc[Ks++]=ma)}uc.length=Ks,$s.observe(vs)}),L1(vs,Ss))}function OE(vs,Ss){var Ts=Ss._eventListeners;if(Ts!==null)for(var Ns=0;Ns<Ts.length;Ns++){var Is=Ts[Ns];vs.removeEventListener(Is.type,Is.attachedListener,yd(Is.optionsOrUseCapture))}vs.nodeType!==3&&(Ts=Ss._observers,Ts!==null&&Ts.forEach(function($s){typeof $s.rootMargin=="str
1465ing"?TE(Ss,$s,vs):$s.unobserve(vs)}),vs.reactFragments!=null&&vs.reactFragments.delete(Ss))}function Yh(vs){var Ss=vs.firstChild;for(Ss&&Ss.nodeType===10&&(Ss=Ss.nextSibling);Ss;){var Ts=Ss;switch(Ss=Ss.nextSibling,Ts.nodeName){case"HTML":case"HEAD":case"BODY":Yh(Ts),dl(Ts);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(Ts.rel.toLowerCase()==="stylesheet")continue}vs.removeChild(Ts)}}function ME(vs,Ss,Ts,Ns){for(;vs.nodeType===1;){var Is=Ts;if(vs.nodeName.toLowerCase()!==Ss.toLowerCase()){if(!Ns&&(vs.nodeName!=="INPUT"||vs.type!=="hidden"))break}else if(Ns){if(!vs[fc])switch(Ss){case"meta":if(!vs.hasAttribute("itemprop"))break;return vs;case"link":if($s=vs.getAttribute("rel"),$s==="stylesheet"&&vs.hasAttribute("data-precedence"))break;if($s!==Is.rel||vs.getAttribute("href")!==(Is.href==null||Is.href===""?null:Is.href)||vs.getAttribute("crossorigin")!==(Is.crossOrigin==null?null:Is.crossOrigin)||vs.getAttribute("title")!==(Is.title==null?null:Is.title))break;return vs;case"style":if(vs.hasAttribute("data-precedence"))break;return vs;case"script":if($s=vs.getAttribute("src"),($s!==(Is.src==null?null:Is.src)||vs.getAttribute("type")!==(Is.type==null?null:Is.type)||vs.getAttribute("crossorigin")!==(Is.crossOrigin==null?null:Is.crossOrigin))&&$s&&vs.hasAttribute("async")&&!vs.hasAttribute("itemprop"))break;return vs;default:return vs}}else if(Ss==="input"&&vs.type==="hidden"){var $s=Is.name==null?null:""+Is.name;if(Is.type==="hidden"&&vs.getAttribute("name")===$s)return vs}else return vs;if(vs=rc(vs.nextSibling),vs===null)break}return null}function IE(vs,Ss,Ts){if(Ss==="")return null;for(;vs.nodeType!==3;)if((vs.nodeType!==1||vs.nodeName!=="INPUT"||vs.type!=="hidden")&&!Ts||(vs=rc(vs.nextSibling),vs===null))return null;return vs}function U1(vs,Ss){for(;vs.nodeType!==8;)if((vs.nodeType!==1||vs.nodeName!=="INPUT"||vs.type!=="hidden")&&!Ss||(vs=rc(vs.nextSibling),vs===null))return null;return vs}function Kh(vs){return vs.data==="$?"||vs.data==="$~"}function Zh(vs){return vs.data==="$!"||vs.data==="$?"&&vs.ownerDocument.readyState!=="loading"}function DE(vs,Ss){var Ts=vs.ownerDocument;if(vs.data==="$~")vs._reactRetry=Ss;else if(vs.data!=="$?"||Ts.readyState!=="loading")Ss();else{var Ns=function(){Ss(),Ts.removeEventListener("DOMContentLoaded",Ns)};Ts.addEventListener("DOMContentLoaded",Ns),vs._reactRetry=Ns}}function rc(vs){for(;vs!=null;vs=vs.nextSibling){var Ss=vs.nodeType;if(Ss===1||Ss===3)break;if(Ss===8){if(Ss=vs.data,Ss==="$"||Ss==="$!"||Ss==="$?"||Ss==="$~"||Ss==="&"||Ss==="F!"||Ss==="F")break;if(Ss==="/$"||Ss==="/&")return null}}return vs}var Jh=null;function B1(vs){vs=vs.nextSibling;for(var Ss=0;vs;){if(vs.nodeType===8){var Ts=vs.data;if(Ts==="/$"||Ts==="/&"){if(Ss===0)return rc(vs.nextSibling);Ss--}else Ts!=="$"&&Ts!=="$!"&&Ts!=="$?"&&Ts!=="$~"&&Ts!=="&"||Ss++}vs=vs.nextSibling}return null}function z1(vs){vs=vs.previousSibling;for(var Ss=0;vs;){if(vs.nodeType===8){var Ts=vs.data;if(Ts==="$"||Ts==="$!"||Ts==="$?"||Ts==="$~"||Ts==="&"){if(Ss===0)return vs;Ss--}else Ts!=="/$"&&Ts!=="/&"||Ss++}vs=vs.previousSibling}return null}function $E(vs,Ss){function Ts(){Ns=!0}if(vs.ownerDocument.activeElement===vs)return!0;var Ns=!1;try{vs.ownerDocument.addEventListener("focus",Ts,!0),(vs.focus||HTMLElement.prototype.focus).call(vs,Ss)}finally{vs.ownerDocument.removeEventListener("focus",Ts,!0)}return Ns}function PE(vs){_1(function(){_1(function(Ss){return vs(Ss)})})}function H1(vs,Ss,Ts){switch(Ss=of(Ts),vs){case"html":if(vs=Ss.documentElement,!vs)throw Error(xs(452));return vs;case"head":if(vs=Ss.head,!vs)throw Error(xs(453));return vs;case"body":if(vs=Ss.body,!vs)throw Error(xs(454));return vs;default:throw Error(xs(451))}}function q1(vs,Ss,Ts){for(var Ns in Ts){var Is=Ts[Ns];Ts.hasOwnProperty(Ns)&&Is!=null&&Bo(vs,Ss,Ns,null,dE,Is)}Ts.dangerouslySetInnerHTML!=null&&(vs.textContent=""),vs.onclick===hc&&(vs.onclick=null),dl(vs)}function Qh(vs){for(var Ss=vs.attributes;Ss.length;)vs.removeAttributeNode(Ss[0]);dl(vs)}var sc=new Map,V1=new Set;function lf(vs){if(typeof vs.getRootNode=="function"){var Ss=vs.getRootNode();if(Ss.nodeType===9||Ss.nodeType===11)return Ss}
vendor: 9,104 bytes, line 1465
1465return vs.nodeType===9?vs:vs.ownerDocument}var Uc=Fa.d;Fa.d={f:LE,r:FE,D:UE,C:BE,L:zE,m:HE,X:VE,S:qE,M:WE};function LE(){var vs=Uc.f(),Ss=ym();return vs||Ss}function FE(vs){var Ss=Al(vs);Ss!==null&&Ss.tag===5&&Ss.type==="form"?Gx(Ss):Uc.r(vs)}var bd=typeof document>"u"?null:document;function W1(vs,Ss,Ts){var Ns=bd;if(Ns&&typeof Ss=="string"&&Ss){var Is=Zl(Ss);Is='link[rel="'+vs+'"][href="'+Is+'"]',typeof Ts=="string"&&(Is+='[crossorigin="'+Ts+'"]'),V1.has(Is)||(V1.add(Is),vs={rel:vs,crossOrigin:Ts,href:Ss},Ns.querySelector(Is)===null&&(Ss=Ns.createElement("link"),Tl(Ss,"link",vs),po(Ss),Ns.head.appendChild(Ss)))}}function UE(vs){Uc.D(vs),W1("dns-prefetch",vs,null)}function BE(vs,Ss){Uc.C(vs,Ss),W1("preconnect",vs,Ss)}function zE(vs,Ss,Ts){Uc.L(vs,Ss,Ts);var Ns=bd;if(Ns&&vs&&Ss){var Is='link[rel="preload"][as="'+Zl(Ss)+'"]';Ss==="image"&&Ts&&Ts.imageSrcSet?(Is+='[imagesrcset="'+Zl(Ts.imageSrcSet)+'"]',typeof Ts.imageSizes=="string"&&(Is+='[imagesizes="'+Zl(Ts.imageSizes)+'"]')):Is+='[href="'+Zl(vs)+'"]';var $s=Is;switch(Ss){case"style":$s=Ed(vs);break;case"script":$s=vd(vs)}if(!(sc.has($s)||(vs=Zs({rel:"preload",href:Ss==="image"&&Ts&&Ts.imageSrcSet?void 0:vs,as:Ss},Ts),sc.set($s,vs),Ns.querySelector(Is)!==null||Ss==="style"&&Ns.querySelector(cf($s))||Ss==="script"&&Ns.querySelector(uf($s))))){var Ks=Ns.createElement("link");Tl(Ks,"link",vs),Ss==="style"&&(Ks[xo]=!0,Ks.onload=Ks.onerror=function(){pc(Ks)}),po(Ks),Ns.head.appendChild(Ks)}}}function HE(vs,Ss){Uc.m(vs,Ss);var Ts=bd;if(Ts&&vs){var Ns=Ss&&typeof Ss.as=="string"?Ss.as:"script",Is='link[rel="modulepreload"][as="'+Zl(Ns)+'"][href="'+Zl(vs)+'"]',$s=Is;switch(Ns){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":$s=vd(vs)}if(!sc.has($s)&&(vs=Zs({rel:"modulepreload",href:vs},Ss),sc.set($s,vs),Ts.querySelector(Is)===null)){switch(Ns){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(Ts.querySelector(uf($s)))return}Ns=Ts.createElement("link"),Tl(Ns,"link",vs),po(Ns),Ts.head.appendChild(Ns)}}}function qE(vs,Ss,Ts){Uc.S(vs,Ss,Ts);var Ns=bd;if(Ns&&vs){var Is=mc(Ns).hoistableStyles,$s=Ed(vs);Ss=Ss||"default";var Ks=Is.get($s);if(!Ks){var Ci={loading:0,preload:null};if(Ks=Ns.querySelector(cf($s)))Ci.loading=5;else{vs=Zs({rel:"stylesheet",href:vs,"data-precedence":Ss},Ts),(Ts=sc.get($s))&&Xh(vs,Ts);var ma=Ks=Ns.createElement("link");po(ma),Tl(ma,"link",vs),ma._p=new Promise(function(Sa,Aa){ma.onload=Sa,ma.onerror=Aa}),ma.addEventListener("load",function(){Ci.loading|=1}),ma.addEventListener("error",function(){Ci.loading|=2}),Ci.loading|=4,jm(Ks,Ss,Ns)}Ks={type:"stylesheet",instance:Ks,count:1,state:Ci},Is.set($s,Ks)}}}function VE(vs,Ss){Uc.X(vs,Ss);var Ts=bd;if(Ts&&vs){var Ns=mc(Ts).hoistableScripts,Is=vd(vs),$s=Ns.get(Is);$s||($s=Ts.querySelector(uf(Is)),$s||(vs=Zs({src:vs,async:!0},Ss),(Ss=sc.get(Is))&&eg(vs,Ss),$s=Ts.createElement("script"),po($s),Tl($s,"link",vs),Ts.head.appendChild($s)),$s={type:"script",instance:$s,count:1,state:null},Ns.set(Is,$s))}}function WE(vs,Ss){Uc.M(vs,Ss);var Ts=bd;if(Ts&&vs){var Ns=mc(Ts).hoistableScripts,Is=vd(vs),$s=Ns.get(Is);$s||($s=Ts.querySelector(uf(Is)),$s||(vs=Zs({src:vs,async:!0,type:"module"},Ss),(Ss=sc.get(Is))&&eg(vs,Ss),$s=Ts.createElement("script"),po($s),Tl($s,"link",vs),Ts.head.appendChild($s)),$s={type:"script",instance:$s,count:1,state:null},Ns.set(Is,$s))}}function G1(vs,Ss,Ts,Ns){var Is=(Is=Ao.current)?lf(Is):null;if(!Is)throw Error(xs(446));switch(vs){case"meta":case"title":return null;case"style":return typeof Ts.precedence=="string"&&typeof Ts.href=="string"?(Ts=Ed(Ts.href),Ss=mc(Is).hoistableStyles,Ns=Ss.get(Ts),Ns||(Ns={type:"style",instance:null,count:0,state:null},Ss.set(Ts,Ns)),Ns):{type:"void",instance:null,count:0,state:null};case"link":if(Ts.rel==="stylesheet"&&typeof Ts.href=="string"&&typeof Ts.precedence=="string"){vs=Ed(Ts.href);var $s=mc(Is).hoistableStyles,Ks=$s.get(vs);if(Ks||(Is=Is.ownerDocument||Is,Ks={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},$s.set(vs,Ks),($s=Is.querySelector(cf(vs)))?$s._p||(Ks.instance=$s,Ks.state.loading=5):($s=sc.get(vs),$s||($s={rel:"preload",as:"style",href:Ts.href,crossOrigin:Ts.crossOrigin,integrity:Ts.integrity,media:Ts.media,hrefLang:Ts.hrefLang,referrerPolicy:Ts.referrerPolicy},sc.set(vs,$s)),GE(Is,vs,$s,Ks.state))),Ss&&Ns===null)throw Error(xs(528,""));return Ks}if(Ss&&Ns!==null)throw Error(xs(529,""));return null;case"script":return Ss=Ts.async,Ts=Ts.src,typeof Ts=="string"&&Ss&&typeof Ss!="function"&&typeof Ss!="symbol"?(Ts=vd(Ts),Ss=mc(Is).hoistableScripts,Ns=Ss.get(Ts),Ns||(Ns={type:"script",instance:null,count:0,state:null},Ss.set(Ts,Ns)),Ns):{type:"void",instance:null,count:0,state:null};default:throw Error(xs(444,vs))}}function Ed(vs){return'href="'+Zl(vs)+'"'}function cf(vs){return'link[rel="stylesheet"]['+vs+"]"}function Y1(vs){return Zs({},vs,{"data-precedence":vs.precedence,precedence:null})}function GE(vs,Ss,Ts,Ns){if(Ss=vs.querySelector('link[rel="preload"][as="style"]['+Ss+"]")){if(Ss[xo]!==!0){Ns.loading=1;return}}else Ss=vs.createElement("link"),Ss[xo]=!0,Ss.onload=Ss.onerror=pc.bind(null,Ss),Tl(Ss,"link",Ts),po(Ss),vs.head.appendChild(Ss);Ns.preload=Ss,Ss.addEventListener("load",function(){return Ns.loading|=1}),Ss.addEventListener("error",function(){return Ns.loading|=2})}function vd(vs){return'[src="'+Zl(vs)+'"]'}function uf(vs){return"script[async]"+vs}function K1(vs,Ss,Ts){if(Ss.count++,Ss.instance===null)switch(Ss.type){case"style":var Ns=vs.querySelector('style[data-href~="'+Zl(Ts.href)+'"]');if(Ns)return Ss.instance=Ns,po(Ns),Ns;var Is=Zs({},Ts,{"data-href":Ts.href,"data-precedence":Ts.precedence,href:null,precedence:null});return Ns=(vs.ownerDocument||vs).createElement("style"),po(Ns),Tl(Ns,"style",Is),jm(Ns,Ts.precedence,vs),Ss.instance=Ns;case"stylesheet":Is=Ed(Ts.href);var $s=vs.querySelector(cf(Is));if($s)return Ss.state.loading|=4,Ss.instance=$s,po($s),$s;Ns=Y1(Ts),(Is=sc.get(Is))&&Xh(Ns,Is),$s=(vs.ownerDocument||vs).createElement("link"),po($s);var Ks=$s;return Ks._p=new Promise(function(Ci,ma){Ks.onload=Ci,Ks.onerror=ma}),Tl($s,"link",Ns),Ss.state.loading|=4,jm($s,Ts.precedence,vs),Ss.instance=$s;case"script":return $s=vd(Ts.src),(Is=vs.querySelector(uf($s)))?(Ss.instance=Is,po(Is),Is):(Ns=Ts,(Is=sc.get($s))&&(Ns=Zs({},Ts),eg(Ns,Is)),vs=vs.ownerDocument||vs,Is=vs.createElement("script"),po(Is),Tl(Is,"link",Ns),vs.head.appendChild(Is),Ss.instance=Is);case"void":return null;default:throw Error(xs(443,Ss.type))}else Ss.type==="stylesheet"&&(Ss.state.loading&4)===0&&(Ns=Ss.instance,Ss.state.loading|=4,jm(Ns,Ts.precedence,vs));return Ss.instance}function jm(vs,Ss,Ts){for(var Ns=Ts.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),Is=Ns.length?Ns[Ns.length-1]:null,$s=Is,Ks=0;Ks<Ns.length;Ks++){var Ci=Ns[Ks];if(Ci.dataset.precedence===Ss)$s=Ci;else if($s!==Is)break}$s?$s.parentNode.insertBefore(vs,$s.nextSibling):(Ss=Ts.nodeType===9?Ts.head:Ts,Ss.insertBefore(vs,Ss.firstChild))}function Xh(vs,Ss){vs.crossOrigin==null&&(vs.crossOrigin=Ss.crossOrigin),vs.referrerPolicy==null&&(vs.referrerPolicy=Ss.referrerPolicy),vs.title==null&&(vs.title=Ss.title)}function eg(vs,Ss){vs.crossOrigin==null&&(vs.crossOrigin=Ss.crossOrigin),vs.referrerPolicy==null&&(vs.referrerPolicy=Ss.referrerPolicy),vs.integrity==null&&(vs.integrity=Ss.integrity)}var Cm=null;function Z1(vs,Ss,Ts){if(Cm===null){var Ns=new Map,Is=Cm=new Map;Is.set(Ts,Ns)}else Is=Cm,Ns=Is.get(Ts),Ns||(Ns=new Map,Is.set(Ts,Ns));if(Ns.has(vs))return Ns;for(Ns.set(vs,null),Ts=Ts.getElementsByTagName(vs),Is=0;Is<Ts.length;Is++){var $s=Ts[Is];if(!($s[fc]||$s[Yo]||vs==="link"&&$s.getAttribute("rel")==="stylesheet")&&$s.namespaceURI!=="http://www.w3.org/2000/svg"){var Ks=$s.getAttribute(Ss)||"";Ks=vs+Ks;var Ci=Ns.get(Ks);Ci?Ci.push($s):Ns.set(Ks,[$s])}}return Ns}function tg(vs,Ss,Ts){vs=vs.ownerDocument||vs,vs.head.insertBefore(Ts,Ss==="title"?vs.querySelector("head > title"):null)}function YE(vs,Ss,Ts){if(Ts===1||Ss.itemProp!=null)return!1;switch(vs){case"meta":case"title":return!0;case"style":if(typeof Ss.precedence!="string"||typeof Ss.href!="string"||Ss.href==="")break;return!0;case"link":if(typeof Ss.rel!="string"||typeof Ss.href!="string"||Ss.href===""||Ss.onLoad||Ss.onError)break;return Ss.rel==="stylesheet"?(vs=Ss.disabled,typeof Ss.precedence=="string"&&vs==null):!0;case"script":if(Ss.async&&typeof Ss.async!="function"&&typeof Ss.async!="symbol"&&!Ss.onLoad&&!Ss.onError&&Ss.src&&typeof Ss.src=="string")return!0}return!1}function J1(vs,Ss){return vs==="img"&&Ss.src!=null&&Ss.src!==""&&Ss.onLoad==null&&Ss.loading!=="lazy"}function Q1(vs){return!(vs.type==="stylesheet"&&(vs.state.loading&3)===0)}function X1(vs){return(vs.width||100)*(vs.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function e0(vs,Ss){typeof Ss.decode=="function"&&(vs.imgCount++,Ss.complete||(vs.imgBytes+=X1(Ss),vs.suspenseyImages.push(Ss)),vs=JE.bind(vs),Ss.decode().then(vs,vs))}function KE(vs,Ss,Ts,Ns){if(Ts.type==="stylesheet"&&(typeof Ns.media!="str
1465ing"||matchMedia(Ns.media).matches!==!1)&&(Ts.state.loading&4)===0){if(Ts.instance===null){var Is=Ed(Ns.href),$s=Ss.querySelector(cf(Is));if($s){Ss=$s._p,Ss!==null&&typeof Ss=="object"&&typeof Ss.then=="function"&&(vs.count++,vs=df.bind(vs),Ss.then(vs,vs)),Ts.state.loading|=4,Ts.instance=$s,po($s);return}$s=Ss.ownerDocument||Ss,Ns=Y1(Ns),(Is=sc.get(Is))&&Xh(Ns,Is),$s=$s.createElement("link"),po($s);var Ks=$s;Ks._p=new Promise(function(Ci,ma){Ks.onload=Ci,Ks.onerror=ma}),Tl($s,"link",Ns),Ts.instance=$s}vs.stylesheets===null&&(vs.stylesheets=new Map),vs.stylesheets.set(Ts,Ss),(Ss=Ts.state.preload)&&(Ts.state.loading&3)===0&&(vs.count++,Ts=df.bind(vs),Ss.addEventListener("load",Ts),Ss.addEventListener("error",Ts))}}var Tm=0;function ZE(vs,Ss){return vs.stylesheets&&vs.count===0&&Am(vs,vs.stylesheets),0<vs.count||0<vs.imgCount?function(Ts){var Ns=setTimeout(function(){if(vs.stylesheets&&Am(vs,vs.stylesheets),vs.unsuspend){var $s=vs.unsuspend;vs.unsuspend=null,$s()}},6e4+Ss);0<vs.imgBytes&&Tm===0&&(Tm=62500*mE());var Is=setTimeout(function(){if(vs.waitingForImages=!1,vs.count===0&&(vs.stylesheets&&Am(vs,vs.stylesheets),vs.unsuspend)){var $s=vs.unsuspend;vs.unsuspend=null,$s()}},(vs.imgBytes>Tm?50:800)+Ss);return vs.unsuspend=Ts,function(){vs.unsuspend=null,clearTimeout(Ns),clearTimeout(Is)}}:null}function t0(vs){if(vs.count===0&&(vs.imgCount===0||!vs.waitingForImages)){if(vs.stylesheets)Am(vs,vs.stylesheets);else if(vs.unsuspend){var Ss=vs.unsuspend;vs.unsuspend=null,Ss()}}}function df(){this.count--,t0(this)}function JE(){this.imgCount--,t0(this)}var _m=null;function Am(vs,Ss){vs.stylesheets=null,vs.unsuspend!==null&&(vs.count++,_m=new Map,Ss.forEach(QE,vs),_m=null,df.call(vs))}function QE(vs,Ss){if(!(Ss.state.loading&4)){var Ts=_m.get(vs);if(Ts)var Ns=Ts.get(null);else{Ts=new Map,_m.set(vs,Ts);for(var Is=vs.querySelectorAll("link[data-precedence],style[data-precedence]"),$s=0;$s<Is.length;$s++){var Ks=Is[$s];(Ks.nodeName==="LINK"||Ks.getAttribute("media")!=="not all")&&(Ts.set(Ks.dataset.precedence,Ks),Ns=Ks)}Ns&&Ts.set(null,Ns)}Is=Ss.instance,Ks=Is.getAttribute("data-precedence"),$s=Ts.get(Ks)||Ns,$s===Ns&&Ts.set(null,Is),Ts.set(Ks,Is),this.count++,Ns=df.bind(this),Is.addEventListener("load",Ns),Is.addEventListener("error",Ns),$s?$s.parentNode.insertBefore(Is,$s.nextSibling):(vs=vs.nodeType===9?vs.head:vs,vs.insertBefore(Is,vs.firstChild)),Ss.state.loading|=4}}var wd={$$typeof:ta,Provider:null,Consumer:null,_currentValue:Ka,_currentValue2:Ka,_threadCount:0};function XE(vs,Ss,Ts,Ns,Is,$s,Ks,Ci,ma){this.tag=1,this.containerInfo=vs,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.hiddenUpdates=fo(null),this.identifierPrefix=Ns,this.onUncaughtError=Is,this.onCaughtError=$s,this.onRecoverableError=Ks,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ma,this.transitionTypes=null,this.incompleteTransitions=new Map}function r0(vs,Ss,Ts,Ns,Is,$s,Ks,Ci,ma,Sa,Aa,Pa){return vs=new XE(vs,Ss,Ts,Ks,ma,Sa,Aa,Pa,Ci),Ss=1,$s===!0&&(Ss|=24),$s=Pl(3,null,null,Ss),vs.current=$s,$s.stateNode=vs,Ss=hp(),Ss.refCount++,vs.pooledCache=Ss,Ss.refCount++,$s.memoizedState={element:Ns,isDehydrated:Ts,cache:Ss},bp($s),vs}function s0(vs){return vs?(vs=Yu,vs):Yu}function i0(vs,Ss,Ts,Ns,Is,$s){Is=s0(Is),Ns.context===null?Ns.context=Is:Ns.pendingContext=Is,Ns=Jc(Ss),Ns.payload={element:Ts},$s=$s===void 0?null:$s,$s!==null&&(Ns.callback=$s),Ts=Qc(vs,Ns,Ss),Ts!==null&&(Bl(Ts,vs,Ss),Bd(Ts,vs,Ss))}function a0(vs,Ss){if(vs=vs.memoizedState,vs!==null&&vs.dehydrated!==null){var Ts=vs.retryLane;vs.retryLane=Ts!==0&&Ts<Ss?Ts:Ss}}function ng(vs,Ss){a0(vs,Ss),(vs=vs.alternate)&&a0(vs,Ss)}function o0(vs){if(vs.tag===13||vs.tag===31){var Ss=bu(vs,67108864);Ss!==null&&Bl(Ss,vs,67108864),ng(vs,67108864)}}function l0(vs){if(vs.tag===13||vs.tag===31){var Ss=Yl();Ss=To(Ss);var Ts=bu(vs,Ss);Ts!==null&&Bl(Ts,vs,Ss),ng(vs,Ss)}}var Sd=!0;function ev(vs,Ss,Ts,Ns){var Is=Ma.T;Ma.T=null;var $s=Fa.p;try{Fa.p=2,rg(vs,Ss,Ts,Ns)}finally{Fa.p=$s,Ma.T=Is}}function tv(vs,Ss,Ts,Ns){var Is=Ma.T;Ma.T=null;var $s=Fa.p;try{Fa.p=8,rg(vs,Ss,Ts,Ns)}finally{Fa.p=$s,Ma.T=Is}}function rg(vs,Ss,Ts,Ns){if(Sd){var Is=sg(Ns);if(Is===null)Lh(vs,Ss,Ns,km,Ts),u0(vs,Ns);else if(rv(Is,vs,Ss,Ts,Ns))Ns.stopPropagation();else if(u0(vs,Ns),Ss&4&&-1<nv.indexOf(vs)){for(;Is!==null;){var $s=Al(Is);
vendor: 4,461 bytes, line 1465
1465if($s!==null)switch($s.tag){case 3:if($s=$s.stateNode,$s.current.memoizedState.isDehydrated){var Ks=Qa($s.pendingLanes);if(Ks!==0){var Ci=$s;for(Ci.pendingLanes|=2,Ci.entangledLanes|=2;Ks;){var ma=1<<31-Go(Ks);Ci.entanglements[1]|=ma,Ks&=~ma}jc($s),(Io&6)===0&&(hm=La()+500,rf(0))}}break;case 31:case 13:Ci=bu($s,2),Ci!==null&&Bl(Ci,$s,2),ym(),ng($s,2)}if($s=sg(Ns),$s===null&&Lh(vs,Ss,Ns,km,Ts),$s===Is)break;Is=$s}Is!==null&&Ns.stopPropagation()}else Lh(vs,Ss,Ns,null,Ts)}}function sg(vs){return vs=zm(vs),ig(vs)}var km=null;function ig(vs){if(km=null,vs=gl(vs),vs!==null){var Ss=Es(vs);if(Ss===null)vs=null;else{var Ts=Ss.tag;if(Ts===13){if(vs=ws(Ss),vs!==null)return vs;vs=null}else if(Ts===31){if(vs=Rs(Ss),vs!==null)return vs;vs=null}else if(Ts===3){if(Ss.stateNode.current.memoizedState.isDehydrated)return Ss.tag===3?Ss.stateNode.containerInfo:null;vs=null}else Ss!==vs&&(vs=null)}}return km=vs,null}function c0(vs){switch(vs){case"beforetoggle":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"seeked":case"submit":case"toggle":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"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wa()){case Ja:return 2;case Za:return 8;case Xo:case El:return 32;case Dl:return 268435456;default:return 32}default:return 32}}var ag=!1,uu=null,du=null,fu=null,ff=new Map,mf=new Map,mu=[],nv="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".split(" ");function u0(vs,Ss){switch(vs){case"focusin":case"focusout":uu=null;break;case"dragenter":case"dragleave":du=null;break;case"mouseover":case"mouseout":fu=null;break;case"pointerover":case"pointerout":ff.delete(Ss.pointerId);break;case"gotpointercapture":case"lostpointercapture":mf.delete(Ss.pointerId)}}function pf(vs,Ss,Ts,Ns,Is,$s){return vs===null||vs.nativeEvent!==$s?(vs={blockedOn:Ss,domEventName:Ts,eventSystemFlags:Ns,nativeEvent:$s,targetContainers:[Is]},Ss!==null&&(Ss=Al(Ss),Ss!==null&&o0(Ss)),vs):(vs.eventSystemFlags|=Ns,Ss=vs.targetContainers,Is!==null&&Ss.indexOf(Is)===-1&&Ss.push(Is),vs)}function rv(vs,Ss,Ts,Ns,Is){switch(Ss){case"focusin":return uu=pf(uu,vs,Ss,Ts,Ns,Is),!0;case"dragenter":return du=pf(du,vs,Ss,Ts,Ns,Is),!0;case"mouseover":return fu=pf(fu,vs,Ss,Ts,Ns,Is),!0;case"pointerover":var $s=Is.pointerId;return ff.set($s,pf(ff.get($s)||null,vs,Ss,Ts,Ns,Is)),!0;case"gotpointercapture":return $s=Is.pointerId,mf.set($s,pf(mf.get($s)||null,vs,Ss,Ts,Ns,Is)),!0}return!1}function d0(vs){var Ss=gl(vs.target);if(Ss!==null){var Ts=Es(Ss);if(Ts!==null){if(Ss=Ts.tag,Ss===13){if(Ss=ws(Ts),Ss!==null){vs.blockedOn=Ss,Bc(vs.priority,function(){l0(Ts)});return}}else if(Ss===31){if(Ss=Rs(Ts),Ss!==null){vs.blockedOn=Ss,Bc(vs.priority,function(){l0(Ts)});return}}else if(Ss===3&&Ts.stateNode.current.memoizedState.isDehydrated){vs.blockedOn=Ts.tag===3?Ts.stateNode.containerInfo:null;return}}}vs.blockedOn=null}function Nm(vs){if(vs.blockedOn!==null)return!1;for(var Ss=vs.targetContainers;0<Ss.length;){var Ts=sg(vs.nativeEvent);if(Ts===null){Ts=vs.nativeEvent;var Ns=new Ts.constructor(Ts.type,Ts);Bm=Ns,Ts.target.dispatchEvent(Ns),Bm=null}else return Ss=Al(Ts),Ss!==null&&o0(Ss),vs.blockedOn=Ts,!1;Ss.shift()}return!0}function f0(vs,Ss,Ts){Nm(vs)&&Ts.delete(Ss)}function sv(){ag=!1,uu!==null&&Nm(uu)&&(uu=null),du!==null&&Nm(du)&&(du=null),fu!==null&&Nm(fu)&&(fu=null),ff.forEach(f0),mf.forEach(f0)}
vendor: 5,386 bytes, line 1465
1465function Om(vs,Ss){vs.blockedOn===Ss&&(vs.blockedOn=null,ag||(ag=!0,ds.unstable_scheduleCallback(ds.unstable_NormalPriority,sv)))}var Mm=null;function m0(vs){Mm!==vs&&(Mm=vs,ds.unstable_scheduleCallback(ds.unstable_NormalPriority,function(){Mm===vs&&(Mm=null);for(var Ss=0;Ss<vs.length;Ss+=3){var Ts=vs[Ss],Ns=vs[Ss+1],Is=vs[Ss+2];if(typeof Ns!="function"){if(ig(Ns||Ts)===null)continue;break}var $s=Al(Ts);$s!==null&&(vs.splice(Ss,3),Ss-=3,Up($s,{pending:!0,data:Is,method:Ts.method,action:Ns},Ns,Is))}}))}function Rd(vs){function Ss(ma){return Om(ma,vs)}uu!==null&&Om(uu,vs),du!==null&&Om(du,vs),fu!==null&&Om(fu,vs),ff.forEach(Ss),mf.forEach(Ss);for(var Ts=0;Ts<mu.length;Ts++){var Ns=mu[Ts];Ns.blockedOn===vs&&(Ns.blockedOn=null)}for(;0<mu.length&&(Ts=mu[0],Ts.blockedOn===null);)d0(Ts),Ts.blockedOn===null&&mu.shift();if(Ts=(vs.ownerDocument||vs).$$reactFormReplay,Ts!=null)for(Ns=0;Ns<Ts.length;Ns+=3){var Is=Ts[Ns],$s=Ts[Ns+1],Ks=Is[Jo]||null;if(typeof $s=="function")Ks||m0(Ts);else if(Ks){var Ci=null;if($s&&$s.hasAttribute("formAction")){if(Is=$s,Ks=$s[Jo]||null)Ci=Ks.formAction;else if(ig(Is)!==null)continue}else Ci=Ks.action;typeof Ci=="function"?Ts[Ns+1]=Ci:(Ts.splice(Ns,3),Ns-=3),m0(Ts)}}}function p0(){function vs($s){$s.canIntercept&&$s.info==="react-transition"&&$s.intercept({handler:function(){return new Promise(function(Ks){return Is=Ks})},focusReset:"manual",scroll:"manual"})}function Ss(){Is!==null&&(Is(),Is=null),Ns||setTimeout(Ts,20)}function Ts(){if(!Ns&&!navigation.transition){var $s=navigation.currentEntry;$s&&$s.url!=null&&navigation.navigate($s.url,{state:$s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var Ns=!1,Is=null;return navigation.addEventListener("navigate",vs),navigation.addEventListener("navigatesuccess",Ss),navigation.addEventListener("navigateerror",Ss),setTimeout(Ts,100),function(){Ns=!0,navigation.removeEventListener("navigate",vs),navigation.removeEventListener("navigatesuccess",Ss),navigation.removeEventListener("navigateerror",Ss),Is!==null&&(Is(),Is=null)}}}function og(vs){this._internalRoot=vs}Im.prototype.render=og.prototype.render=function(vs){var Ss=this._internalRoot;if(Ss===null)throw Error(xs(409));var Ts=Ss.current,Ns=Yl();i0(Ts,Ns,vs,Ss,null,null)},Im.prototype.unmount=og.prototype.unmount=function(){var vs=this._internalRoot;if(vs!==null){this._internalRoot=null;var Ss=vs.containerInfo;i0(vs.current,2,null,vs,null,null),ym(),Ss[wl]=null}};function Im(vs){this._internalRoot=vs}Im.prototype.unstable_scheduleHydration=function(vs){if(vs){var Ss=vl();vs={blockedOn:null,target:vs,priority:Ss};for(var Ts=0;Ts<mu.length&&Ss!==0&&Ss<mu[Ts].priority;Ts++);mu.splice(Ts,0,vs),Ts===0&&d0(vs)}};var h0=dn.version;if(h0!=="19.3.0")throw Error(xs(527,h0,"19.3.0"));Fa.findDOMNode=function(vs){var Ss=vs._reactInternals;if(Ss===void 0)throw typeof vs.render=="function"?Error(xs(188)):(vs=Object.keys(vs).join(","),Error(xs(268,vs)));return vs=Cs(Ss),vs=vs!==null?As(vs):null,vs=vs===null?null:vs.stateNode,vs};var iv={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:Ma,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dm.isDisabled&&Dm.supportsFiber)try{il=Dm.inject(iv),Wo=Dm}catch{}}return reactDomClient_production.createRoot=function(vs,Ss){if(!bs(vs))throw Error(xs(299));var Ts=!1,Ns="",Is=ry,$s=sy,Ks=iy;return Ss!=null&&(Ss.unstable_strictMode===!0&&(Ts=!0),Ss.identifierPrefix!==void 0&&(Ns=Ss.identifierPrefix),Ss.onUncaughtError!==void 0&&(Is=Ss.onUncaughtError),Ss.onCaughtError!==void 0&&($s=Ss.onCaughtError),Ss.onRecoverableError!==void 0&&(Ks=Ss.onRecoverableError)),Ss=r0(vs,1,!1,null,null,Ts,Ns,null,Is,$s,Ks,p0),vs[wl]=Ss.current,Ph(vs),new og(Ss)},reactDomClient_production.hydrateRoot=function(vs,Ss,Ts){if(!bs(vs))throw Error(xs(299));var Ns=!1,Is="",$s=ry,Ks=sy,Ci=iy,ma=null;return Ts!=null&&(Ts.unstable_strictMode===!0&&(Ns=!0),Ts.identifierPrefix!==void 0&&(Is=Ts.identifierPrefix),Ts.onUncaughtError!==void 0&&($s=Ts.onUncaughtError),Ts.onCaughtError!==void 0&&(Ks=Ts.onCaughtError),Ts.onRecoverableError!==void 0&&(Ci=Ts.onRecoverableError),Ts.formState!==void 0&&(ma=Ts.formState)),Ss=r0(vs,1,!0,Ss,Ts??null,Ns,Is,ma,$s,Ks,Ci,p0),Ss.context=s0(null),Ts=Ss.current,Ns=Yl(),Ns=To(Ns),Is=Jc(Ns),Is.callback=null,Qc(Ts,Is,Ns),Ts=Ns,Ss.current.lanes=Ts,ao(Ss,Ts),jc(Ss),vs[wl]=Ss.current,Ph(vs),new Im(Ss)},reactDomClient_production.version="19.3.0",reactDomClient_production}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client.exports;hasRequiredClient=1;function ds(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ds)}catch(dn){console.error(dn)}}return ds(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient();const router=createBrowserRouter([{path:"/*",element:jsxRuntimeExports.jsx(App,{})}]),root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(RouterProvider2,{router})}));export{EventStreamCodec as E,HeaderMarshaller as H,Int64$1 as I,MessageDecoderStream as M,SmithyMessageDecoderStream as S,TypeRegistry as T,EventStreamMarshaller as a,MessageEncoder
1465Stream as b,SmithyMessageEncoderStream as c,EventStreamMarshaller$1 as d,eventStreamSerdeProvider as e,fromUtf8 as f,getChunkedStream as g,hasOwn as h,getMessageUnmarshaller as i,iterableToReadableStream as j,resolveEventStreamSerdeConfig as k,readableStreamToIterable as r,toUtf8 as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.