(()=>{var e={54697:function(e,t,r){"use strict";r.d(t,{Z:()=>y});/* ESM import */var n=r(16166);/* ESM import */var i=r(70128);/* ESM import */var a=r(11147);/* ESM import */var o=r(72864);/* ESM import */var s=r(18185);/* ESM import */var u=r(22300);/* ESM import */var l=r(79593);var c=function e(e,t,r){var n=0;var a=0;while(true){n=a;a=(0,i/* .peek */.fj)();// &\f
if(n===38&&a===12){t[r]=1}if((0,i/* .token */.r)(a)){break}(0,i/* .next */.lp)()}return(0,i/* .slice */.tP)(e,i/* .position */.FK)};var d=function e(e,t){// pretend we've started with a comma
var r=-1;var n=44;do{switch((0,i/* .token */.r)(n)){case 0:// &\f
if(n===38&&(0,i/* .peek */.fj)()===12){// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
t[r]=1}e[r]+=c(i/* .position */.FK-1,t,r);break;case 2:e[r]+=(0,i/* .delimit */.iF)(n);break;case 4:// comma
if(n===44){// colon
e[++r]=(0,i/* .peek */.fj)()===58?"&\f":"";t[r]=e[r].length;break}// fallthrough
default:e[r]+=(0,a/* .from */.Dp)(n)}}while(n=(0,i/* .next */.lp)())return e};var f=function e(e,t){return(0,i/* .dealloc */.cE)(d((0,i/* .alloc */.un)(e),t))};// WeakSet would be more appropriate, but only WeakMap is supported in IE11
var p=/* #__PURE__ */new WeakMap;var h=function e(e){if(e.type!=="rule"||!e.parent||// positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
e.length<1){return}var t=e.value;var r=e.parent;var n=e.column===r.column&&e.line===r.line;while(r.type!=="rule"){r=r.parent;if(!r)return}// short-circuit for the simplest case
if(e.props.length===1&&t.charCodeAt(0)!==58&&!p.get(r)){return}// if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if(n){return}p.set(e,true);var i=[];var a=f(t,i);var o=r.props;for(var s=0,u=0;s<a.length;s++){for(var l=0;l<o.length;l++,u++){e.props[u]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+" "+a[s]}}};var v=function e(e){if(e.type==="decl"){var t=e.value;if(t.charCodeAt(0)===108&&// charcode for b
t.charCodeAt(2)===98){// this ignores label
e["return"]="";e.value=""}}};/* eslint-disable no-fallthrough */function m(e,t){switch((0,a/* .hash */.vp)(e,t)){// color-adjust
case 5103:return o/* .WEBKIT */.G$+"print-"+e+e;// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o/* .WEBKIT */.G$+e+e;// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:case 4246:case 4810:case 6968:case 2756:return o/* .WEBKIT */.G$+e+o/* .MOZ */.uj+e+o.MS+e+e;// flex, flex-direction
case 6828:case 4268:return o/* .WEBKIT */.G$+e+o.MS+e+e;// order
case 6165:return o/* .WEBKIT */.G$+e+o.MS+"flex-"+e+e;// align-items
case 5187:return o/* .WEBKIT */.G$+e+(0,a/* .replace */.gx)(e,/(\w+).+(:[^]+)/,o/* .WEBKIT */.G$+"box-$1$2"+o.MS+"flex-$1$2")+e;// align-self
case 5443:return o/* .WEBKIT */.G$+e+o.MS+"flex-item-"+(0,a/* .replace */.gx)(e,/flex-|-self/,"")+e;// align-content
case 4675:return o/* .WEBKIT */.G$+e+o.MS+"flex-line-pack"+(0,a/* .replace */.gx)(e,/align-content|flex-|-self/,"")+e;// flex-shrink
case 5548:return o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,"shrink","negative")+e;// flex-basis
case 5292:return o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,"basis","preferred-size")+e;// flex-grow
case 6060:return o/* .WEBKIT */.G$+"box-"+(0,a/* .replace */.gx)(e,"-grow","")+o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,"grow","positive")+e;// transition
case 4554:return o/* .WEBKIT */.G$+(0,a/* .replace */.gx)(e,/([^-])(transform)/g,"$1"+o/* .WEBKIT */.G$+"$2")+e;// cursor
case 6187:return(0,a/* .replace */.gx)((0,a/* .replace */.gx)((0,a/* .replace */.gx)(e,/(zoom-|grab)/,o/* .WEBKIT */.G$+"$1"),/(image-set)/,o/* .WEBKIT */.G$+"$1"),e,"")+e;// background, background-image
case 5495:case 3959:return(0,a/* .replace */.gx)(e,/(image-set\([^]*)/,o/* .WEBKIT */.G$+"$1"+"$`$1");// justify-content
case 4968:return(0,a/* .replace */.gx)((0,a/* .replace */.gx)(e,/(.+:)(flex-)?(.*)/,o/* .WEBKIT */.G$+"box-pack:$3"+o.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o/* .WEBKIT */.G$+e+e;// (margin|padding)-inline-(start|end)
case 4095:case 3583:case 4068:case 2532:return(0,a/* .replace */.gx)(e,/(.+)-inline(.+)/,o/* .WEBKIT */.G$+"$1$2")+e;// (min|max)?(width|height|inline-size|block-size)
case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:// stretch, max-content, min-content, fill-available
if((0,a/* .strlen */.to)(e)-1-t>6)switch((0,a/* .charat */.uO)(e,t+1)){// (m)ax-content, (m)in-content
case 109:// -
if((0,a/* .charat */.uO)(e,t+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return(0,a/* .replace */.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+o/* .WEBKIT */.G$+"$2-$3"+"$1"+o/* .MOZ */.uj+((0,a/* .charat */.uO)(e,t+3)==108?"$3":"$2-$3"))+e;// (s)tretch
case 115:return~(0,a/* .indexof */.Cw)(e,"stretch")?m((0,a/* .replace */.gx)(e,"stretch","fill-available"),t)+e:e}break;// position: sticky
case 4949:// (s)ticky?
if((0,a/* .charat */.uO)(e,t+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch((0,a/* .charat */.uO)(e,(0,a/* .strlen */.to)(e)-3-(~(0,a/* .indexof */.Cw)(e,"!important")&&10))){// stic(k)y
case 107:return(0,a/* .replace */.gx)(e,":",":"+o/* .WEBKIT */.G$)+e;// (inline-)?fl(e)x
case 101:return(0,a/* .replace */.gx)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o/* .WEBKIT */.G$+((0,a/* .charat */.uO)(e,14)===45?"inline-":"")+"box$3"+"$1"+o/* .WEBKIT */.G$+"$2$3"+"$1"+o.MS+"$2box$3")+e}break;// writing-mode
case 5936:switch((0,a/* .charat */.uO)(e,t+11)){// vertical-l(r)
case 114:return o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;// vertical-r(l)
case 108:return o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;// horizontal(-)tb
case 45:return o/* .WEBKIT */.G$+e+o.MS+(0,a/* .replace */.gx)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o/* .WEBKIT */.G$+e+o.MS+e+e}return e}var g=function e(e,t,r,n){if(e.length>-1){if(!e["return"])switch(e.type){case o/* .DECLARATION */.h5:e["return"]=m(e.value,e.length);break;case o/* .KEYFRAMES */.lK:return(0,s/* .serialize */.q)([(0,i/* .copy */.JG)(e,{value:(0,a/* .replace */.gx)(e.value,"@","@"+o/* .WEBKIT */.G$)})],n);case o/* .RULESET */.Fr:if(e.length)return(0,a/* .combine */.$e)(e.props,function(t){switch((0,a/* .match */.EQ)(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return(0,s/* .serialize */.q)([(0,i/* .copy */.JG)(e,{props:[(0,a/* .replace */.gx)(t,/:(read-\w+)/,":"+o/* .MOZ */.uj+"$1")]})],n);// :placeholder
case"::placeholder":return(0,s/* .serialize */.q)([(0,i/* .copy */.JG)(e,{props:[(0,a/* .replace */.gx)(t,/:(plac\w+)/,":"+o/* .WEBKIT */.G$+"input-$1")]}),(0,i/* .copy */.JG)(e,{props:[(0,a/* .replace */.gx)(t,/:(plac\w+)/,":"+o/* .MOZ */.uj+"$1")]}),(0,i/* .copy */.JG)(e,{props:[(0,a/* .replace */.gx)(t,/:(plac\w+)/,o.MS+"input-$1")]})],n)}return""})}}};var b=[g];var y=function e(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");// get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(r,function(e){// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var t=e.getAttribute("data-emotion");if(t.indexOf(" ")===-1){return}document.head.appendChild(e);e.setAttribute("data-s","")})}var i=e.stylisPlugins||b;var a={};var o;var c=[];{o=e.container||document.head;Array.prototype.forEach.call(// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){var t=e.getAttribute("data-emotion").split(" ");for(var r=1;r<t.length;r++){a[t[r]]=true}c.push(e)})}var d;var f=[h,v];{var p;var m=[s/* .stringify */.P,(0,u/* .rulesheet */.cD)(function(e){p.insert(e)})];var g=(0,u/* .middleware */.qR)(f.concat(i,m));var y=function e(e){return(0,s/* .serialize */.q)((0,l/* .compile */.MY)(e),g)};d=function e(e,t,r,n){p=r;y(e?e+"{"+t.styles+"}":t.styles);if(n){_.inserted[t.name]=true}}}var _={key:t,sheet:new n/* .StyleSheet */.m({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:d};_.sheet.hydrate(c);return _}},66292:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/* eslint-disable */// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
function n(e){// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var t=0;// Mix 4 bytes at a time into the hash
var r,n=0,i=e.length;for(;i>=4;++n,i-=4){r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24;r=/* Math.imul(k, m): */(r&65535)*0x5bd1e995+((r>>>16)*59797<<16);r^=/* k >>> r: */r>>>24;t=/* Math.imul(k, m): */(r&65535)*0x5bd1e995+((r>>>16)*59797<<16)^/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}// Handle the last few bytes of the input array
switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255;t=/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}// Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
t^=t>>>13;t=/* Math.imul(h, m): */(t&65535)*0x5bd1e995+((t>>>16)*59797<<16);return((t^t>>>15)>>>0).toString(36)}},45042:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){var t=Object.create(null);return function(r){if(t[r]===undefined)t[r]=e(r);return t[r]}}},87685:function(e,t,r){"use strict";r.d(t,{C:()=>d,E:()=>S,T:()=>h,c:()=>x,h:()=>_,w:()=>p});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);/* ESM import */var a=r(54697);/* ESM import */var o=r(70444);/* ESM import */var s=r(92549);/* ESM import */var u=r(27278);var l=false;var c=/* #__PURE__ */n.createContext(// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement!=="undefined"?/* #__PURE__ */(0,a/* ["default"] */.Z)({key:"css"}):null);var d=c.Provider;var f=function e(){return useContext(c)};var p=function e(e){return/*#__PURE__*/(0,n.forwardRef)(function(t,r){// the cache will never be null in the browser
var i=(0,n.useContext)(c);return e(t,i,r)})};var h=/* #__PURE__ */n.createContext({});var v=function e(){return React.useContext(h)};var m=function e(e,t){if(typeof t==="function"){var r=t(e);return r}return _extends({},e,t)};var g=/* #__PURE__ *//* unused pure expression or super */null&&weakMemoize(function(e){return weakMemoize(function(t){return m(e,t)})});var b=function e(e){var t=React.useContext(h);if(e.theme!==t){t=g(t)(e.theme)}return /*#__PURE__*/React.createElement(h.Provider,{value:t},e.children)};function y(e){var t=e.displayName||e.name||"Component";var r=/*#__PURE__*/React.forwardRef(function t(t,r){var n=React.useContext(h);return /*#__PURE__*/React.createElement(e,_extends({theme:n,ref:r},t))});r.displayName="WithTheme("+t+")";return hoistNonReactStatics(r,e)}var _={}.hasOwnProperty;var w="__EMOTION_TYPE_PLEASE_DO_NOT_USE__";var x=function e(e,t){var r={};for(var n in t){if(_.call(t,n)){r[n]=t[n]}}r[w]=e;// Runtime labeling is an opt-in feature because:
return r};var E=function e(e){var t=e.cache,r=e.serialized,n=e.isStringTag;(0,o/* .registerStyles */.hC)(t,r,n);(0,u/* .useInsertionEffectAlwaysWithSyncFallback */.L)(function(){return(0,o/* .insertStyles */.My)(t,r,n)});return null};var Z=/* #__PURE__ */p(function(e,t,r){var i=e.css;// so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if(typeof i==="string"&&t.registered[i]!==undefined){i=t.registered[i]}var a=e[w];var u=[i];var c="";if(typeof e.className==="string"){c=(0,o/* .getRegisteredStyles */.fp)(t.registered,u,e.className)}else if(e.className!=null){c=e.className+" "}var d=(0,s/* .serializeStyles */.O)(u,undefined,n.useContext(h));c+=t.key+"-"+d.name;var f={};for(var p in e){if(_.call(e,p)&&p!=="css"&&p!==w&&!l){f[p]=e[p]}}f.className=c;if(r){f.ref=r}return /*#__PURE__*/n.createElement(n.Fragment,null,/*#__PURE__*/n.createElement(E,{cache:t,serialized:d,isStringTag:typeof a==="string"}),/*#__PURE__*/n.createElement(a,f))});var S=Z},70917:function(e,t,r){"use strict";r.d(t,{F4:()=>v,az:()=>f,iv:()=>h,xB:()=>p});/* ESM import */var n=r(87685);/* ESM import */var i=r(87363);/* ESM import */var a=/*#__PURE__*/r.n(i);/* ESM import */var o=r(70444);/* ESM import */var s=r(27278);/* ESM import */var u=r(92549);/* ESM import */var l=r(54697);/* ESM import */var c=r(8679);/* ESM import */var d=/*#__PURE__*/r.n(c);var f=function e(e,t){// eslint-disable-next-line prefer-rest-params
var r=arguments;if(t==null||!n.h.call(t,"css")){return i.createElement.apply(undefined,r)}var a=r.length;var o=new Array(a);o[0]=n.E;o[1]=(0,n.c)(e,t);for(var s=2;s<a;s++){o[s]=r[s]}return i.createElement.apply(null,o)};(function(e){var t;(function(e){})(t||(t=e.JSX||(e.JSX={})))})(f||(f={}));// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var p=/* #__PURE__ */(0,n.w)(function(e,t){var r=e.styles;var a=(0,u/* .serializeStyles */.O)([r],undefined,i.useContext(n.T));// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var l=i.useRef();(0,s/* .useInsertionEffectWithLayoutFallback */.j)(function(){var e=t.key+"-global";// use case of https://github.com/emotion-js/emotion/issues/2675
var r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy});var n=false;var i=document.querySelector('style[data-emotion="'+e+" "+a.name+'"]');if(t.sheet.tags.length){r.before=t.sheet.tags[0]}if(i!==null){n=true;// clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
i.setAttribute("data-emotion",e);r.hydrate([i])}l.current=[r,n];return function(){r.flush()}},[t]);(0,s/* .useInsertionEffectWithLayoutFallback */.j)(function(){var e=l.current;var r=e[0],n=e[1];if(n){e[1]=false;return}if(a.next!==undefined){// insert keyframes
(0,o/* .insertStyles */.My)(t,a.next,true)}if(r.tags.length){// if this doesn't exist then it will be null so the style element will be appended
var i=r.tags[r.tags.length-1].nextElementSibling;r.before=i;r.flush()}t.insert("",a,r,false)},[t,a.name]);return null});function h(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return(0,u/* .serializeStyles */.O)(t)}function v(){var e=h.apply(void 0,arguments);var t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function e(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var m=function e(t){var r=t.length;var n=0;var i="";for(;n<r;n++){var a=t[n];if(a==null)continue;var o=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a)){o=e(a)}else{o="";for(var s in a){if(a[s]&&s){o&&(o+=" ");o+=s}}}break}default:{o=a}}if(o){i&&(i+=" ");i+=o}}return i};function g(e,t,r){var n=[];var i=getRegisteredStyles(e,n,r);if(n.length<2){return r}return i+t(n)}var b=function e(e){var t=e.cache,r=e.serializedArr;useInsertionEffectAlwaysWithSyncFallback(function(){for(var e=0;e<r.length;e++){insertStyles(t,r[e],false)}});return null};var y=/* #__PURE__ *//* unused pure expression or super */null&&withEmotionCache(function(e,t){var r=false;var n=[];var i=function e(){if(r&&isDevelopment){throw new Error("css can only be used during render")}for(var e=arguments.length,i=new Array(e),a=0;a<e;a++){i[a]=arguments[a]}var o=serializeStyles(i,t.registered);n.push(o);// registration has to happen here as the result of this might get consumed by `cx`
registerStyles(t,o,false);return t.key+"-"+o.name};var a=function e(){if(r&&isDevelopment){throw new Error("cx can only be used during render")}for(var e=arguments.length,n=new Array(e),a=0;a<e;a++){n[a]=arguments[a]}return g(t.registered,i,m(n))};var o={css:i,cx:a,theme:React.useContext(ThemeContext)};var s=e.children(o);r=true;return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(b,{cache:t,serializedArr:n}),s)})},35944:function(e,t,r){"use strict";r.d(t,{BX:()=>p,HY:()=>d,tZ:()=>f});/* ESM import */var n=r(85893);/* ESM import */var i=r(87685);/* ESM import */var a=r(87363);/* ESM import */var o=/*#__PURE__*/r.n(a);/* ESM import */var s=r(54697);/* ESM import */var u=r(8679);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(27278);var d=n.Fragment;var f=function e(e,t,r){if(!i.h.call(t,"css")){return n.jsx(e,t,r)}return n.jsx(i.E,(0,i.c)(e,t),r)};var p=function e(e,t,r){if(!i.h.call(t,"css")){return n.jsxs(e,t,r)}return n.jsxs(i.E,(0,i.c)(e,t),r)}},92549:function(e,t,r){"use strict";r.d(t,{O:()=>b});/* ESM import */var n=r(66292);/* ESM import */var i=r(94371);/* ESM import */var a=r(45042);var o=false;var s=/[A-Z]|^ms/g;var u=/_EMO_([^_]+?)_([^]*?)_EMO_/g;var l=function e(e){return e.charCodeAt(1)===45};var c=function e(e){return e!=null&&typeof e!=="boolean"};var d=/* #__PURE__ */(0,a/* ["default"] */.Z)(function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()});var f=function e(e,t){switch(e){case"animation":case"animationName":{if(typeof t==="string"){return t.replace(u,function(e,t,r){g={name:t,styles:r,next:g};return t})}}}if(i/* ["default"] */.Z[e]!==1&&!l(e)&&typeof t==="number"&&t!==0){return t+"px"}return t};var p="Component selectors can only be used in conjunction with "+"@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware "+"compiler transform.";function h(e,t,r){if(r==null){return""}var n=r;if(n.__emotion_styles!==undefined){return n}switch(typeof r){case"boolean":{return""}case"object":{var i=r;if(i.anim===1){g={name:i.name,styles:i.styles,next:g};return i.name}var a=r;if(a.styles!==undefined){var o=a.next;if(o!==undefined){// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while(o!==undefined){g={name:o.name,styles:o.styles,next:g};o=o.next}}var s=a.styles+";";return s}return v(e,t,r)}case"function":{if(e!==undefined){var u=g;var l=r(e);g=u;return h(e,t,l)}break}}// finalize string values (regular strings and functions interpolated into css calls)
var c=r;if(t==null){return c}var d=t[c];return d!==undefined?d:c}function v(e,t,r){var n="";if(Array.isArray(r)){for(var i=0;i<r.length;i++){n+=h(e,t,r[i])+";"}}else{for(var a in r){var s=r[a];if(typeof s!=="object"){var u=s;if(t!=null&&t[u]!==undefined){n+=a+"{"+t[u]+"}"}else if(c(u)){n+=d(a)+":"+f(a,u)+";"}}else{if(a==="NO_COMPONENT_SELECTOR"&&o){throw new Error(p)}if(Array.isArray(s)&&typeof s[0]==="string"&&(t==null||t[s[0]]===undefined)){for(var l=0;l<s.length;l++){if(c(s[l])){n+=d(a)+":"+f(a,s[l])+";"}}}else{var v=h(e,t,s);switch(a){case"animation":case"animationName":{n+=d(a)+":"+v+";";break}default:{n+=a+"{"+v+"}"}}}}}}return n}var m=/label:\s*([^\s;{]+)\s*(;|$)/g;// this is the cursor for keyframes
// keyframes are stored on the SerializedStyles object as a linked list
var g;function b(e,t,r){if(e.length===1&&typeof e[0]==="object"&&e[0]!==null&&e[0].styles!==undefined){return e[0]}var i=true;var a="";g=undefined;var o=e[0];if(o==null||o.raw===undefined){i=false;a+=h(r,t,o)}else{var s=o;a+=s[0]}// we start at 1 since we've already handled the first arg
for(var u=1;u<e.length;u++){a+=h(r,t,e[u]);if(i){var l=o;a+=l[u]}}// using a global regex with .exec is stateful so lastIndex has to be reset each time
m.lastIndex=0;var c="";var d;// https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while((d=m.exec(a))!==null){c+="-"+d[1]}var f=(0,n/* ["default"] */.Z)(a)+c;return{name:f,styles:a,next:g}}},16166:function(e,t,r){"use strict";r.d(t,{m:()=>o});var n=false;/*

Based off glamor's StyleSheet, thanks Sunil ❤️

high performance StyleSheet for css-in-js systems

- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance

// usage

import { StyleSheet } from '@emotion/sheet'

let styleSheet = new StyleSheet({ key: '', container: document.head })

styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet

styleSheet.flush()
- empties the stylesheet of all its contents

*/function i(e){if(e.sheet){return e.sheet}// this weirdness brought to you by firefox
/* istanbul ignore next */for(var t=0;t<document.styleSheets.length;t++){if(document.styleSheets[t].ownerNode===e){return document.styleSheets[t]}}// this function should always return with a value
// TS can't understand it though so we make it stop complaining here
return undefined}function a(e){var t=document.createElement("style");t.setAttribute("data-emotion",e.key);if(e.nonce!==undefined){t.setAttribute("nonce",e.nonce)}t.appendChild(document.createTextNode(""));t.setAttribute("data-s","");return t}var o=/*#__PURE__*/function(){// Using Node instead of HTMLElement since container may be a ShadowRoot
function e(e){var t=this;this._insertTag=function(e){var r;if(t.tags.length===0){if(t.insertionPoint){r=t.insertionPoint.nextSibling}else if(t.prepend){r=t.container.firstChild}else{r=t.before}}else{r=t.tags[t.tags.length-1].nextSibling}t.container.insertBefore(e,r);t.tags.push(e)};this.isSpeedy=e.speedy===undefined?!n:e.speedy;this.tags=[];this.ctr=0;this.nonce=e.nonce;// key is the value of the data-emotion attribute, it's used to identify different sheets
this.key=e.key;this.container=e.container;this.prepend=e.prepend;this.insertionPoint=e.insertionPoint;this.before=null}var t=e.prototype;t.hydrate=function e(e){e.forEach(this._insertTag)};t.insert=function e(e){// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if(this.ctr%(this.isSpeedy?65e3:1)===0){this._insertTag(a(this))}var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=i(t);try{// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
r.insertRule(e,r.cssRules.length)}catch(e){}}else{t.appendChild(document.createTextNode(e))}this.ctr++};t.flush=function e(){this.tags.forEach(function(e){var t;return(t=e.parentNode)==null?void 0:t.removeChild(e)});this.tags=[];this.ctr=0};return e}()},94371:function(e,t,r){"use strict";r.d(t,{Z:()=>n});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,// SVG-related properties
fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},27278:function(e,t,r){"use strict";r.d(t,{L:()=>s,j:()=>u});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=function e(e){return e()};var o=n["useInsertion"+"Effect"]?n["useInsertion"+"Effect"]:false;var s=o||a;var u=o||n.useLayoutEffect},70444:function(e,t,r){"use strict";r.d(t,{My:()=>o,fp:()=>i,hC:()=>a});var n=true;function i(e,t,r){var n="";r.split(" ").forEach(function(r){if(e[r]!==undefined){t.push(e[r]+";")}else if(r){n+=r+" "}});return n}var a=function e(e,t,r){var i=e.key+"-"+t.name;if(// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(r===false||// we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
n===false)&&e.registered[i]===undefined){e.registered[i]=t.styles}};var o=function e(e,t,r){a(e,t,r);var n=e.key+"-"+t.name;if(e.inserted[t.name]===undefined){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,true);i=i.next}while(i!==undefined)}}},89188:function(e,t,r){"use strict";r.d(t,{kZ:()=>p});/* ESM import */var n=r(26143);/* ESM import */var i=r(40583);/* ESM import */var a=r(7994);/* ESM import */var o=r(21955);/* ESM import */var s=r(50380);/* ESM import */var u=r(98293);/* ESM import */var l=r(3);/* ESM import */var c=r(62556);var d={placement:"bottom",modifiers:[],strategy:"absolute"};function f(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==="function")})}function p(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,p=r===void 0?[]:r,h=t.defaultOptions,v=h===void 0?d:h;return function e(e,t,r){if(r===void 0){r=v}var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},d,v),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}};var m=[];var g=false;var b={state:h,setOptions:function r(r){var n=typeof r==="function"?r(h.options):r;_();h.options=Object.assign({},v,h.options,n);h.scrollParents={reference:(0,c/* .isElement */.kK)(e)?(0,a/* ["default"] */.Z)(e):e.contextElement?(0,a/* ["default"] */.Z)(e.contextElement):[],popper:(0,a/* ["default"] */.Z)(t)};// Orders the modifiers based on their dependencies and `phase`
// properties
var i=(0,s/* ["default"] */.Z)((0,l/* ["default"] */.Z)([].concat(p,h.options.modifiers)));// Strip out disabled modifiers
h.orderedModifiers=i.filter(function(e){return e.enabled});y();return b.update()},// Sync update – it will always be executed, even if not necessary. This
// is useful for low frequency updates where sync behavior simplifies the
// logic.
// For high frequency updates (e.g. `resize` and `scroll` events), always
// prefer the async Popper#update method
forceUpdate:function e(){if(g){return}var e=h.elements,t=e.reference,r=e.popper;// Don't proceed if `reference` or `popper` are not valid elements
// anymore
if(!f(t,r)){return}// Store the reference and popper rects to be read by modifiers
h.rects={reference:(0,n/* ["default"] */.Z)(t,(0,o/* ["default"] */.Z)(r),h.options.strategy==="fixed"),popper:(0,i/* ["default"] */.Z)(r)};// Modifiers have the ability to reset the current update cycle. The
// most common use case for this is the `flip` modifier changing the
// placement, which then needs to re-run all the modifiers, because the
// logic was previously ran for the previous placement and is therefore
// stale/incorrect
h.reset=false;h.placement=h.options.placement;// On each update cycle, the `modifiersData` property for each modifier
// is filled with the initial data specified by the modifier. This means
// it doesn't persist and is fresh on each update.
// To ensure persistent data, use `${name}#persistent`
h.orderedModifiers.forEach(function(e){return h.modifiersData[e.name]=Object.assign({},e.data)});for(var a=0;a<h.orderedModifiers.length;a++){if(h.reset===true){h.reset=false;a=-1;continue}var s=h.orderedModifiers[a],u=s.fn,l=s.options,c=l===void 0?{}:l,d=s.name;if(typeof u==="function"){h=u({state:h,options:c,name:d,instance:b})||h}}},// Async and optimistically optimized update – it will not be executed if
// not necessary (debounced to run at most once-per-tick)
update:(0,u/* ["default"] */.Z)(function(){return new Promise(function(e){b.forceUpdate();e(h)})}),destroy:function e(){_();g=true}};if(!f(e,t)){return b}b.setOptions(r).then(function(e){if(!g&&r.onFirstUpdate){r.onFirstUpdate(e)}});// Modifiers have the ability to execute arbitrary code before the first
// update cycle runs. They will be executed in the same order as the update
// cycle. This is useful when a modifier adds some persistent data that
// other modifiers need to use, but the modifier is run after the dependent
// one.
function y(){h.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,i=e.effect;if(typeof i==="function"){var a=i({state:h,name:t,instance:b,options:n});var o=function e(){};m.push(a||o)}})}function _(){m.forEach(function(e){return e()});m=[]}return b}}var h=/*#__PURE__*//* unused pure expression or super */null&&p();// eslint-disable-next-line import/no-unused-modules
},94985:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(62556);function i(e,t){var r=t.getRootNode&&t.getRootNode();// First, attempt with faster native method
if(e.contains(t)){return true}else if(r&&(0,n/* .isShadowRoot */.Zq)(r)){var i=t;do{if(i&&e.isSameNode(i)){return true}// $FlowFixMe[prop-missing]: need a better way to handle this...
i=i.parentNode||i.host}while(i)}// Give up, the result is false
return false}},50400:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(62556);/* ESM import */var i=r(138);/* ESM import */var a=r(62057);/* ESM import */var o=r(67977);function s(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}var s=e.getBoundingClientRect();var u=1;var l=1;if(t&&(0,n/* .isHTMLElement */.Re)(e)){u=e.offsetWidth>0?(0,i/* .round */.NM)(s.width)/e.offsetWidth||1:1;l=e.offsetHeight>0?(0,i/* .round */.NM)(s.height)/e.offsetHeight||1:1}var c=(0,n/* .isElement */.kK)(e)?(0,a/* ["default"] */.Z)(e):window,d=c.visualViewport;var f=!(0,o/* ["default"] */.Z)()&&r;var p=(s.left+(f&&d?d.offsetLeft:0))/u;var h=(s.top+(f&&d?d.offsetTop:0))/l;var v=s.width/u;var m=s.height/l;return{width:v,height:m,top:h,right:p+v,bottom:h+m,left:p,x:p,y:h}}},21437:function(e,t,r){"use strict";r.d(t,{Z:()=>_});/* ESM import */var n=r(87701);/* ESM import */var i=r(3155);/* ESM import */var a=r(27723);/* ESM import */var o=r(7994);/* ESM import */var s=r(21955);/* ESM import */var u=r(67252);/* ESM import */var l=r(43062);/* ESM import */var c=r(62556);/* ESM import */var d=r(50400);/* ESM import */var f=r(95923);/* ESM import */var p=r(94985);/* ESM import */var h=r(96333);/* ESM import */var v=r(65626);/* ESM import */var m=r(138);function g(e,t){var r=(0,d/* ["default"] */.Z)(e,false,t==="fixed");r.top=r.top+e.clientTop;r.left=r.left+e.clientLeft;r.bottom=r.top+e.clientHeight;r.right=r.left+e.clientWidth;r.width=e.clientWidth;r.height=e.clientHeight;r.x=r.left;r.y=r.top;return r}function b(e,t,r){return t===n/* .viewport */.Pj?(0,v/* ["default"] */.Z)((0,i/* ["default"] */.Z)(e,r)):(0,c/* .isElement */.kK)(t)?g(t,r):(0,v/* ["default"] */.Z)((0,a/* ["default"] */.Z)((0,u/* ["default"] */.Z)(e)))}// A "clipping parent" is an overflowable container with the characteristic of
// clipping (or hiding) overflowing elements with a position different from
// `initial`
function y(e){var t=(0,o/* ["default"] */.Z)((0,f/* ["default"] */.Z)(e));var r=["absolute","fixed"].indexOf((0,l/* ["default"] */.Z)(e).position)>=0;var n=r&&(0,c/* .isHTMLElement */.Re)(e)?(0,s/* ["default"] */.Z)(e):e;if(!(0,c/* .isElement */.kK)(n)){return[]}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return t.filter(function(e){return(0,c/* .isElement */.kK)(e)&&(0,p/* ["default"] */.Z)(e,n)&&(0,h/* ["default"] */.Z)(e)!=="body"})}// Gets the maximum area that the element is visible in due to any number of
// clipping parents
function _(e,t,r,n){var i=t==="clippingParents"?y(e):[].concat(t);var a=[].concat(i,[r]);var o=a[0];var s=a.reduce(function(t,r){var i=b(e,r,n);t.top=(0,m/* .max */.Fp)(i.top,t.top);t.right=(0,m/* .min */.VV)(i.right,t.right);t.bottom=(0,m/* .min */.VV)(i.bottom,t.bottom);t.left=(0,m/* .max */.Fp)(i.left,t.left);return t},b(e,o,n));s.width=s.right-s.left;s.height=s.bottom-s.top;s.x=s.left;s.y=s.top;return s}},26143:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(50400);/* ESM import */var i=r(64782);/* ESM import */var a=r(96333);/* ESM import */var o=r(62556);/* ESM import */var s=r(4063);/* ESM import */var u=r(67252);/* ESM import */var l=r(60611);/* ESM import */var c=r(138);function d(e){var t=e.getBoundingClientRect();var r=(0,c/* .round */.NM)(t.width)/e.offsetWidth||1;var n=(0,c/* .round */.NM)(t.height)/e.offsetHeight||1;return r!==1||n!==1}// Returns the composite rect of an element relative to its offsetParent.
// Composite means it takes into account transforms as well as layout.
function f(e,t,r){if(r===void 0){r=false}var c=(0,o/* .isHTMLElement */.Re)(t);var f=(0,o/* .isHTMLElement */.Re)(t)&&d(t);var p=(0,u/* ["default"] */.Z)(t);var h=(0,n/* ["default"] */.Z)(e,f,r);var v={scrollLeft:0,scrollTop:0};var m={x:0,y:0};if(c||!c&&!r){if((0,a/* ["default"] */.Z)(t)!=="body"||// https://github.com/popperjs/popper-core/issues/1078
(0,l/* ["default"] */.Z)(p)){v=(0,i/* ["default"] */.Z)(t)}if((0,o/* .isHTMLElement */.Re)(t)){m=(0,n/* ["default"] */.Z)(t,true);m.x+=t.clientLeft;m.y+=t.clientTop}else if(p){m.x=(0,s/* ["default"] */.Z)(p)}}return{x:h.left+v.scrollLeft-m.x,y:h.top+v.scrollTop-m.y,width:h.width,height:h.height}}},43062:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(62057);function i(e){return(0,n/* ["default"] */.Z)(e).getComputedStyle(e)}},67252:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(62556);function i(e){// $FlowFixMe[incompatible-return]: assume body is always available
return(((0,n/* .isElement */.kK)(e)?e.ownerDocument:e.document)||window.document).documentElement}},27723:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(67252);/* ESM import */var i=r(43062);/* ESM import */var a=r(4063);/* ESM import */var o=r(82163);/* ESM import */var s=r(138);// Gets the entire size of the scrollable document area, even extending outside
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
function u(e){var t;var r=(0,n/* ["default"] */.Z)(e);var u=(0,o/* ["default"] */.Z)(e);var l=(t=e.ownerDocument)==null?void 0:t.body;var c=(0,s/* .max */.Fp)(r.scrollWidth,r.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0);var d=(0,s/* .max */.Fp)(r.scrollHeight,r.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0);var f=-u.scrollLeft+(0,a/* ["default"] */.Z)(e);var p=-u.scrollTop;if((0,i/* ["default"] */.Z)(l||r).direction==="rtl"){f+=(0,s/* .max */.Fp)(r.clientWidth,l?l.clientWidth:0)-c}return{width:c,height:d,x:f,y:p}}},18328:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},40583:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(50400);// Returns the layout rect of an element relative to its offsetParent. Layout
// means it doesn't take into account transforms.
function i(e){var t=(0,n/* ["default"] */.Z)(e);// Use the clientRect sizes if it's not been transformed.
// Fixes https://github.com/popperjs/popper-core/issues/1223
var r=e.offsetWidth;var i=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-i)<=1){i=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}},96333:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return e?(e.nodeName||"").toLowerCase():null}},64782:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(82163);/* ESM import */var i=r(62057);/* ESM import */var a=r(62556);/* ESM import */var o=r(18328);function s(e){if(e===(0,i/* ["default"] */.Z)(e)||!(0,a/* .isHTMLElement */.Re)(e)){return(0,n/* ["default"] */.Z)(e)}else{return(0,o/* ["default"] */.Z)(e)}}},21955:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(62057);/* ESM import */var i=r(96333);/* ESM import */var a=r(43062);/* ESM import */var o=r(62556);/* ESM import */var s=r(67313);/* ESM import */var u=r(95923);/* ESM import */var l=r(85918);function c(e){if(!(0,o/* .isHTMLElement */.Re)(e)||// https://github.com/popperjs/popper-core/issues/837
(0,a/* ["default"] */.Z)(e).position==="fixed"){return null}return e.offsetParent}// `.offsetParent` reports `null` for fixed elements, while absolute elements
// return the containing block
function d(e){var t=/firefox/i.test((0,l/* ["default"] */.Z)());var r=/Trident/i.test((0,l/* ["default"] */.Z)());if(r&&(0,o/* .isHTMLElement */.Re)(e)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var n=(0,a/* ["default"] */.Z)(e);if(n.position==="fixed"){return null}}var s=(0,u/* ["default"] */.Z)(e);if((0,o/* .isShadowRoot */.Zq)(s)){s=s.host}while((0,o/* .isHTMLElement */.Re)(s)&&["html","body"].indexOf((0,i/* ["default"] */.Z)(s))<0){var c=(0,a/* ["default"] */.Z)(s);// This is non-exhaustive but covers the most common CSS properties that
// create a containing block.
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
if(c.transform!=="none"||c.perspective!=="none"||c.contain==="paint"||["transform","perspective"].indexOf(c.willChange)!==-1||t&&c.willChange==="filter"||t&&c.filter&&c.filter!=="none"){return s}else{s=s.parentNode}}return null}// Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs.
function f(e){var t=(0,n/* ["default"] */.Z)(e);var r=c(e);while(r&&(0,s/* ["default"] */.Z)(r)&&(0,a/* ["default"] */.Z)(r).position==="static"){r=c(r)}if(r&&((0,i/* ["default"] */.Z)(r)==="html"||(0,i/* ["default"] */.Z)(r)==="body"&&(0,a/* ["default"] */.Z)(r).position==="static")){return t}return r||d(e)||t}},95923:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(96333);/* ESM import */var i=r(67252);/* ESM import */var a=r(62556);function o(e){if((0,n/* ["default"] */.Z)(e)==="html"){return e}return(// $FlowFixMe[incompatible-return]
// $FlowFixMe[prop-missing]
e.assignedSlot||// step into the shadow DOM of the parent of a slotted node
e.parentNode||((0,a/* .isShadowRoot */.Zq)(e)?e.host:null)||// ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
(0,i/* ["default"] */.Z)(e)// fallback
)}},97523:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(95923);/* ESM import */var i=r(60611);/* ESM import */var a=r(96333);/* ESM import */var o=r(62556);function s(e){if(["html","body","#document"].indexOf((0,a/* ["default"] */.Z)(e))>=0){// $FlowFixMe[incompatible-return]: assume body is always available
return e.ownerDocument.body}if((0,o/* .isHTMLElement */.Re)(e)&&(0,i/* ["default"] */.Z)(e)){return e}return s((0,n/* ["default"] */.Z)(e))}},3155:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(62057);/* ESM import */var i=r(67252);/* ESM import */var a=r(4063);/* ESM import */var o=r(67977);function s(e,t){var r=(0,n/* ["default"] */.Z)(e);var s=(0,i/* ["default"] */.Z)(e);var u=r.visualViewport;var l=s.clientWidth;var c=s.clientHeight;var d=0;var f=0;if(u){l=u.width;c=u.height;var p=(0,o/* ["default"] */.Z)();if(p||!p&&t==="fixed"){d=u.offsetLeft;f=u.offsetTop}}return{width:l,height:c,x:d+(0,a/* ["default"] */.Z)(e),y:f}}},62057:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}},82163:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(62057);function i(e){var t=(0,n/* ["default"] */.Z)(e);var r=t.pageXOffset;var i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}},4063:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(50400);/* ESM import */var i=r(67252);/* ESM import */var a=r(82163);function o(e){// If <html> has a CSS width greater than the viewport, then this will be
// incorrect for RTL.
// Popper 1 is broken in this case and never had a bug report so let's assume
// it's not an issue. I don't think anyone ever specifies width on <html>
// anyway.
// Browsers where the left scrollbar doesn't cause an issue report `0` for
// this (e.g. Edge 2019, IE11, Safari)
return(0,n/* ["default"] */.Z)((0,i/* ["default"] */.Z)(e)).left+(0,a/* ["default"] */.Z)(e).scrollLeft}},62556:function(e,t,r){"use strict";r.d(t,{Re:()=>a,Zq:()=>o,kK:()=>i});/* ESM import */var n=r(62057);function i(e){var t=(0,n/* ["default"] */.Z)(e).Element;return e instanceof t||e instanceof Element}function a(e){var t=(0,n/* ["default"] */.Z)(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o(e){// IE 11 has no ShadowRoot
if(typeof ShadowRoot==="undefined"){return false}var t=(0,n/* ["default"] */.Z)(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}},67977:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(85918);function i(){return!/^((?!chrome|android).)*safari/i.test((0,n/* ["default"] */.Z)())}},60611:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(43062);function i(e){// Firefox wants us to check `-x` and `-y` variations as well
var t=(0,n/* ["default"] */.Z)(e),r=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+i)}},67313:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(96333);function i(e){return["table","td","th"].indexOf((0,n/* ["default"] */.Z)(e))>=0}},7994:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(97523);/* ESM import */var i=r(95923);/* ESM import */var a=r(62057);/* ESM import */var o=r(60611);/*
given a DOM element, return the list of all scroll parents, up the list of ancesors
until we get to the top window object. This list is what we attach scroll listeners
to, because if any of these parent elements scroll, we'll need to re-calculate the
reference element's position.
*/function s(e,t){var r;if(t===void 0){t=[]}var u=(0,n/* ["default"] */.Z)(e);var l=u===((r=e.ownerDocument)==null?void 0:r.body);var c=(0,a/* ["default"] */.Z)(u);var d=l?[c].concat(c.visualViewport||[],(0,o/* ["default"] */.Z)(u)?u:[]):u;var f=t.concat(d);return l?f:f.concat(s((0,i/* ["default"] */.Z)(d)))}},87701:function(e,t,r){"use strict";r.d(t,{BL:()=>l,Ct:()=>m,F2:()=>a,I:()=>i,Pj:()=>f,YP:()=>h,bw:()=>v,d7:()=>s,k5:()=>p,mv:()=>u,t$:()=>o,ut:()=>c,we:()=>n,xs:()=>O,zV:()=>d});var n="top";var i="bottom";var a="right";var o="left";var s="auto";var u=[n,i,a,o];var l="start";var c="end";var d="clippingParents";var f="viewport";var p="popper";var h="reference";var v=/*#__PURE__*/u.reduce(function(e,t){return e.concat([t+"-"+l,t+"-"+c])},[]);var m=/*#__PURE__*/[].concat(u,[s]).reduce(function(e,t){return e.concat([t,t+"-"+l,t+"-"+c])},[]);// modifiers that need to read the DOM
var g="beforeRead";var b="read";var y="afterRead";// pure-logic modifiers
var _="beforeMain";var w="main";var x="afterMain";// modifier with the purpose to write to the DOM (or write into a framework state)
var E="beforeWrite";var Z="write";var S="afterWrite";var O=[g,b,y,_,w,x,E,Z,S]},17824:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(96333);/* ESM import */var i=r(62556);// This modifier takes the styles prepared by the `computeStyles` modifier
// and applies them to the HTMLElements such as popper and arrow
function a(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{};var a=t.attributes[e]||{};var o=t.elements[e];// arrow is optional + virtual elements
if(!(0,i/* .isHTMLElement */.Re)(o)||!(0,n/* ["default"] */.Z)(o)){return}// Flow doesn't support to extend this property, but it's the most
// effective way to apply styles to an HTMLElement
// $FlowFixMe[cannot-write]
Object.assign(o.style,r);Object.keys(a).forEach(function(e){var t=a[e];if(t===false){o.removeAttribute(e)}else{o.setAttribute(e,t===true?"":t)}})})}function o(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}return function(){Object.keys(t.elements).forEach(function(e){var a=t.elements[e];var o=t.attributes[e]||{};var s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);// Set all values to an empty string to unset them
var u=s.reduce(function(e,t){e[t]="";return e},{});// arrow is optional + virtual elements
if(!(0,i/* .isHTMLElement */.Re)(a)||!(0,n/* ["default"] */.Z)(a)){return}Object.assign(a.style,u);Object.keys(o).forEach(function(e){a.removeAttribute(e)})})}}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const s={name:"applyStyles",enabled:true,phase:"write",fn:a,effect:o,requires:["computeStyles"]}},66896:function(e,t,r){"use strict";r.d(t,{Z:()=>v});/* ESM import */var n=r(6206);/* ESM import */var i=r(40583);/* ESM import */var a=r(94985);/* ESM import */var o=r(21955);/* ESM import */var s=r(11516);/* ESM import */var u=r(57516);/* ESM import */var l=r(63293);/* ESM import */var c=r(33706);/* ESM import */var d=r(87701);// eslint-disable-next-line import/no-unused-modules
var f=function e(e,t){e=typeof e==="function"?e(Object.assign({},t.rects,{placement:t.placement})):e;return(0,l/* ["default"] */.Z)(typeof e!=="number"?e:(0,c/* ["default"] */.Z)(e,d/* .basePlacements */.mv))};function p(e){var t;var r=e.state,a=e.name,l=e.options;var c=r.elements.arrow;var p=r.modifiersData.popperOffsets;var h=(0,n/* ["default"] */.Z)(r.placement);var v=(0,s/* ["default"] */.Z)(h);var m=[d/* .left */.t$,d/* .right */.F2].indexOf(h)>=0;var g=m?"height":"width";if(!c||!p){return}var b=f(l.padding,r);var y=(0,i/* ["default"] */.Z)(c);var _=v==="y"?d/* .top */.we:d/* .left */.t$;var w=v==="y"?d/* .bottom */.I:d/* .right */.F2;var x=r.rects.reference[g]+r.rects.reference[v]-p[v]-r.rects.popper[g];var E=p[v]-r.rects.reference[v];var Z=(0,o/* ["default"] */.Z)(c);var S=Z?v==="y"?Z.clientHeight||0:Z.clientWidth||0:0;var O=x/2-E/2;// Make sure the arrow doesn't overflow the popper if the center point is
// outside of the popper bounds
var k=b[_];var T=S-y[g]-b[w];var C=S/2-y[g]/2+O;var R=(0,u/* .within */.u)(k,C,T);// Prevents breaking syntax highlighting...
var A=v;r.modifiersData[a]=(t={},t[A]=R,t.centerOffset=R-C,t)}function h(e){var t=e.state,r=e.options;var n=r.element,i=n===void 0?"[data-popper-arrow]":n;if(i==null){return}// CSS selector
if(typeof i==="string"){i=t.elements.popper.querySelector(i);if(!i){return}}if(!(0,a/* ["default"] */.Z)(t.elements.popper,i)){return}t.elements.arrow=i}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const v={name:"arrow",enabled:true,phase:"main",fn:p,effect:h,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},36531:function(e,t,r){"use strict";r.d(t,{Z:()=>v});/* ESM import */var n=r(87701);/* ESM import */var i=r(21955);/* ESM import */var a=r(62057);/* ESM import */var o=r(67252);/* ESM import */var s=r(43062);/* ESM import */var u=r(6206);/* ESM import */var l=r(14943);/* ESM import */var c=r(138);// eslint-disable-next-line import/no-unused-modules
var d={top:"auto",right:"auto",bottom:"auto",left:"auto"};// Round the offsets to the nearest suitable subpixel based on the DPR.
// Zooming can change the DPR, but it seems to report a value that will
// cleanly divide the values into the appropriate subpixels.
function f(e,t){var r=e.x,n=e.y;var i=t.devicePixelRatio||1;return{x:(0,c/* .round */.NM)(r*i)/i||0,y:(0,c/* .round */.NM)(n*i)/i||0}}function p(e){var t;var r=e.popper,u=e.popperRect,l=e.placement,c=e.variation,p=e.offsets,h=e.position,v=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,b=e.isFixed;var y=p.x,_=y===void 0?0:y,w=p.y,x=w===void 0?0:w;var E=typeof g==="function"?g({x:_,y:x}):{x:_,y:x};_=E.x;x=E.y;var Z=p.hasOwnProperty("x");var S=p.hasOwnProperty("y");var O=n/* .left */.t$;var k=n/* .top */.we;var T=window;if(m){var C=(0,i/* ["default"] */.Z)(r);var R="clientHeight";var A="clientWidth";if(C===(0,a/* ["default"] */.Z)(r)){C=(0,o/* ["default"] */.Z)(r);if((0,s/* ["default"] */.Z)(C).position!=="static"&&h==="absolute"){R="scrollHeight";A="scrollWidth"}}// $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
C=C;if(l===n/* .top */.we||(l===n/* .left */.t$||l===n/* .right */.F2)&&c===n/* .end */.ut){k=n/* .bottom */.I;var M=b&&C===T&&T.visualViewport?T.visualViewport.height:C[R];x-=M-u.height;x*=v?1:-1}if(l===n/* .left */.t$||(l===n/* .top */.we||l===n/* .bottom */.I)&&c===n/* .end */.ut){O=n/* .right */.F2;var P=b&&C===T&&T.visualViewport?T.visualViewport.width:C[A];_-=P-u.width;_*=v?1:-1}}var D=Object.assign({position:h},m&&d);var I=g===true?f({x:_,y:x},(0,a/* ["default"] */.Z)(r)):{x:_,y:x};_=I.x;x=I.y;if(v){var L;return Object.assign({},D,(L={},L[k]=S?"0":"",L[O]=Z?"0":"",L.transform=(T.devicePixelRatio||1)<=1?"translate("+_+"px, "+x+"px)":"translate3d("+_+"px, "+x+"px, 0)",L))}return Object.assign({},D,(t={},t[k]=S?x+"px":"",t[O]=Z?_+"px":"",t.transform="",t))}function h(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,i=n===void 0?true:n,a=r.adaptive,o=a===void 0?true:a,s=r.roundOffsets,c=s===void 0?true:s;var d={placement:(0,u/* ["default"] */.Z)(t.placement),variation:(0,l/* ["default"] */.Z)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};if(t.modifiersData.popperOffsets!=null){t.styles.popper=Object.assign({},t.styles.popper,p(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,p(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:c})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const v={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:h,data:{}}},82372:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(62057);// eslint-disable-next-line import/no-unused-modules
var i={passive:true};function a(e){var t=e.state,r=e.instance,a=e.options;var o=a.scroll,s=o===void 0?true:o,u=a.resize,l=u===void 0?true:u;var c=(0,n/* ["default"] */.Z)(t.elements.popper);var d=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(s){d.forEach(function(e){e.addEventListener("scroll",r.update,i)})}if(l){c.addEventListener("resize",r.update,i)}return function(){if(s){d.forEach(function(e){e.removeEventListener("scroll",r.update,i)})}if(l){c.removeEventListener("resize",r.update,i)}}}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const o={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:a,data:{}}},4927:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(30697);/* ESM import */var i=r(6206);/* ESM import */var a=r(30483);/* ESM import */var o=r(23161);/* ESM import */var s=r(86413);/* ESM import */var u=r(87701);/* ESM import */var l=r(14943);// eslint-disable-next-line import/no-unused-modules
function c(e){if((0,i/* ["default"] */.Z)(e)===u/* .auto */.d7){return[]}var t=(0,n/* ["default"] */.Z)(e);return[(0,a/* ["default"] */.Z)(e),t,(0,a/* ["default"] */.Z)(t)]}function d(e){var t=e.state,r=e.options,a=e.name;if(t.modifiersData[a]._skip){return}var d=r.mainAxis,f=d===void 0?true:d,p=r.altAxis,h=p===void 0?true:p,v=r.fallbackPlacements,m=r.padding,g=r.boundary,b=r.rootBoundary,y=r.altBoundary,_=r.flipVariations,w=_===void 0?true:_,x=r.allowedAutoPlacements;var E=t.options.placement;var Z=(0,i/* ["default"] */.Z)(E);var S=Z===E;var O=v||(S||!w?[(0,n/* ["default"] */.Z)(E)]:c(E));var k=[E].concat(O).reduce(function(e,r){return e.concat((0,i/* ["default"] */.Z)(r)===u/* .auto */.d7?(0,s/* ["default"] */.Z)(t,{placement:r,boundary:g,rootBoundary:b,padding:m,flipVariations:w,allowedAutoPlacements:x}):r)},[]);var T=t.rects.reference;var C=t.rects.popper;var R=new Map;var A=true;var M=k[0];for(var P=0;P<k.length;P++){var D=k[P];var I=(0,i/* ["default"] */.Z)(D);var L=(0,l/* ["default"] */.Z)(D)===u/* .start */.BL;var F=[u/* .top */.we,u/* .bottom */.I].indexOf(I)>=0;var N=F?"width":"height";var j=(0,o/* ["default"] */.Z)(t,{placement:D,boundary:g,rootBoundary:b,altBoundary:y,padding:m});var B=F?L?u/* .right */.F2:u/* .left */.t$:L?u/* .bottom */.I:u/* .top */.we;if(T[N]>C[N]){B=(0,n/* ["default"] */.Z)(B)}var U=(0,n/* ["default"] */.Z)(B);var W=[];if(f){W.push(j[I]<=0)}if(h){W.push(j[B]<=0,j[U]<=0)}if(W.every(function(e){return e})){M=D;A=false;break}R.set(D,W)}if(A){// `2` may be desired in some cases – research later
var z=w?3:1;var J=function e(e){var t=k.find(function(t){var r=R.get(t);if(r){return r.slice(0,e).every(function(e){return e})}});if(t){M=t;return"break"}};for(var q=z;q>0;q--){var H=J(q);if(H==="break")break}}if(t.placement!==M){t.modifiersData[a]._skip=true;t.placement=M;t.reset=true}}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const f={name:"flip",enabled:true,phase:"main",fn:d,requiresIfExists:["offset"],data:{_skip:false}}},19892:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(87701);/* ESM import */var i=r(23161);function a(e,t,r){if(r===void 0){r={x:0,y:0}}return{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function o(e){return[n/* .top */.we,n/* .right */.F2,n/* .bottom */.I,n/* .left */.t$].some(function(t){return e[t]>=0})}function s(e){var t=e.state,r=e.name;var n=t.rects.reference;var s=t.rects.popper;var u=t.modifiersData.preventOverflow;var l=(0,i/* ["default"] */.Z)(t,{elementContext:"reference"});var c=(0,i/* ["default"] */.Z)(t,{altBoundary:true});var d=a(l,n);var f=a(c,s,u);var p=o(d);var h=o(f);t.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:h};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const u={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:s}},82122:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(6206);/* ESM import */var i=r(87701);// eslint-disable-next-line import/no-unused-modules
function a(e,t,r){var a=(0,n/* ["default"] */.Z)(e);var o=[i/* .left */.t$,i/* .top */.we].indexOf(a)>=0?-1:1;var s=typeof r==="function"?r(Object.assign({},t,{placement:e})):r,u=s[0],l=s[1];u=u||0;l=(l||0)*o;return[i/* .left */.t$,i/* .right */.F2].indexOf(a)>=0?{x:l,y:u}:{x:u,y:l}}function o(e){var t=e.state,r=e.options,n=e.name;var o=r.offset,s=o===void 0?[0,0]:o;var u=i/* .placements.reduce */.Ct.reduce(function(e,r){e[r]=a(r,t.rects,s);return e},{});var l=u[t.placement],c=l.x,d=l.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=c;t.modifiersData.popperOffsets.y+=d}t.modifiersData[n]=u}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const s={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:o}},77421:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(72581);function i(e){var t=e.state,r=e.name;// Offsets are the actual position the popper needs to have to be
// properly positioned near its reference element
// This is the most basic placement, and will be adjusted by
// the modifiers in the next step
t.modifiersData[r]=(0,n/* ["default"] */.Z)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const a={name:"popperOffsets",enabled:true,phase:"read",fn:i,data:{}}},5219:function(e,t,r){"use strict";r.d(t,{Z:()=>v});/* ESM import */var n=r(87701);/* ESM import */var i=r(6206);/* ESM import */var a=r(11516);/* ESM import */var o=r(73967);/* ESM import */var s=r(57516);/* ESM import */var u=r(40583);/* ESM import */var l=r(21955);/* ESM import */var c=r(23161);/* ESM import */var d=r(14943);/* ESM import */var f=r(23607);/* ESM import */var p=r(138);function h(e){var t=e.state,r=e.options,h=e.name;var v=r.mainAxis,m=v===void 0?true:v,g=r.altAxis,b=g===void 0?false:g,y=r.boundary,_=r.rootBoundary,w=r.altBoundary,x=r.padding,E=r.tether,Z=E===void 0?true:E,S=r.tetherOffset,O=S===void 0?0:S;var k=(0,c/* ["default"] */.Z)(t,{boundary:y,rootBoundary:_,padding:x,altBoundary:w});var T=(0,i/* ["default"] */.Z)(t.placement);var C=(0,d/* ["default"] */.Z)(t.placement);var R=!C;var A=(0,a/* ["default"] */.Z)(T);var M=(0,o/* ["default"] */.Z)(A);var P=t.modifiersData.popperOffsets;var D=t.rects.reference;var I=t.rects.popper;var L=typeof O==="function"?O(Object.assign({},t.rects,{placement:t.placement})):O;var F=typeof L==="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L);var N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null;var j={x:0,y:0};if(!P){return}if(m){var B;var U=A==="y"?n/* .top */.we:n/* .left */.t$;var W=A==="y"?n/* .bottom */.I:n/* .right */.F2;var z=A==="y"?"height":"width";var J=P[A];var q=J+k[U];var H=J-k[W];var V=Z?-I[z]/2:0;var $=C===n/* .start */.BL?D[z]:I[z];var G=C===n/* .start */.BL?-I[z]:-D[z];// We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
var X=t.elements.arrow;var K=Z&&X?(0,u/* ["default"] */.Z)(X):{width:0,height:0};var Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,f/* ["default"] */.Z)();var Y=Q[U];var ee=Q[W];// If the reference length is smaller than the arrow length, we don't want
// to include its full size in the calculation. If the reference is small
// and near the edge of a boundary, the popper can overflow even if the
// reference is not overflowing as well (e.g. virtual elements with no
// width or height)
var et=(0,s/* .within */.u)(0,D[z],K[z]);var er=R?D[z]/2-V-et-Y-F.mainAxis:$-et-Y-F.mainAxis;var en=R?-D[z]/2+V+et+ee+F.mainAxis:G+et+ee+F.mainAxis;var ei=t.elements.arrow&&(0,l/* ["default"] */.Z)(t.elements.arrow);var ea=ei?A==="y"?ei.clientTop||0:ei.clientLeft||0:0;var eo=(B=N==null?void 0:N[A])!=null?B:0;var es=J+er-eo-ea;var eu=J+en-eo;var el=(0,s/* .within */.u)(Z?(0,p/* .min */.VV)(q,es):q,J,Z?(0,p/* .max */.Fp)(H,eu):H);P[A]=el;j[A]=el-J}if(b){var ec;var ed=A==="x"?n/* .top */.we:n/* .left */.t$;var ef=A==="x"?n/* .bottom */.I:n/* .right */.F2;var ep=P[M];var eh=M==="y"?"height":"width";var ev=ep+k[ed];var em=ep-k[ef];var eg=[n/* .top */.we,n/* .left */.t$].indexOf(T)!==-1;var eb=(ec=N==null?void 0:N[M])!=null?ec:0;var ey=eg?ev:ep-D[eh]-I[eh]-eb+F.altAxis;var e_=eg?ep+D[eh]+I[eh]-eb-F.altAxis:em;var ew=Z&&eg?(0,s/* .withinMaxClamp */.q)(ey,ep,e_):(0,s/* .within */.u)(Z?ey:ev,ep,Z?e_:em);P[M]=ew;j[M]=ew-ep}t.modifiersData[h]=j}// eslint-disable-next-line import/no-unused-modules
/* ESM default export */const v={name:"preventOverflow",enabled:true,phase:"main",fn:h,requiresIfExists:["offset"]}},20804:function(e,t,r){"use strict";r.d(t,{fi:()=>h});/* ESM import */var n=r(89188);/* ESM import */var i=r(82372);/* ESM import */var a=r(77421);/* ESM import */var o=r(36531);/* ESM import */var s=r(17824);/* ESM import */var u=r(82122);/* ESM import */var l=r(4927);/* ESM import */var c=r(5219);/* ESM import */var d=r(66896);/* ESM import */var f=r(19892);var p=[i/* ["default"] */.Z,a/* ["default"] */.Z,o/* ["default"] */.Z,s/* ["default"] */.Z,u/* ["default"] */.Z,l/* ["default"] */.Z,c/* ["default"] */.Z,d/* ["default"] */.Z,f/* ["default"] */.Z];var h=/*#__PURE__*/(0,n/* .popperGenerator */.kZ)({defaultModifiers:p});// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
// eslint-disable-next-line import/no-unused-modules
},86413:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(14943);/* ESM import */var i=r(87701);/* ESM import */var a=r(23161);/* ESM import */var o=r(6206);function s(e,t){if(t===void 0){t={}}var r=t,s=r.placement,u=r.boundary,l=r.rootBoundary,c=r.padding,d=r.flipVariations,f=r.allowedAutoPlacements,p=f===void 0?i/* .placements */.Ct:f;var h=(0,n/* ["default"] */.Z)(s);var v=h?d?i/* .variationPlacements */.bw:i/* .variationPlacements.filter */.bw.filter(function(e){return(0,n/* ["default"] */.Z)(e)===h}):i/* .basePlacements */.mv;var m=v.filter(function(e){return p.indexOf(e)>=0});if(m.length===0){m=v}// $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
var g=m.reduce(function(t,r){t[r]=(0,a/* ["default"] */.Z)(e,{placement:r,boundary:u,rootBoundary:l,padding:c})[(0,o/* ["default"] */.Z)(r)];return t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}},72581:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(6206);/* ESM import */var i=r(14943);/* ESM import */var a=r(11516);/* ESM import */var o=r(87701);function s(e){var t=e.reference,r=e.element,s=e.placement;var u=s?(0,n/* ["default"] */.Z)(s):null;var l=s?(0,i/* ["default"] */.Z)(s):null;var c=t.x+t.width/2-r.width/2;var d=t.y+t.height/2-r.height/2;var f;switch(u){case o/* .top */.we:f={x:c,y:t.y-r.height};break;case o/* .bottom */.I:f={x:c,y:t.y+t.height};break;case o/* .right */.F2:f={x:t.x+t.width,y:d};break;case o/* .left */.t$:f={x:t.x-r.width,y:d};break;default:f={x:t.x,y:t.y}}var p=u?(0,a/* ["default"] */.Z)(u):null;if(p!=null){var h=p==="y"?"height":"width";switch(l){case o/* .start */.BL:f[p]=f[p]-(t[h]/2-r[h]/2);break;case o/* .end */.ut:f[p]=f[p]+(t[h]/2-r[h]/2);break;default:}}return f}},98293:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){var t;return function(){if(!t){t=new Promise(function(r){Promise.resolve().then(function(){t=undefined;r(e())})})}return t}}},23161:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(21437);/* ESM import */var i=r(67252);/* ESM import */var a=r(50400);/* ESM import */var o=r(72581);/* ESM import */var s=r(65626);/* ESM import */var u=r(87701);/* ESM import */var l=r(62556);/* ESM import */var c=r(63293);/* ESM import */var d=r(33706);// eslint-disable-next-line import/no-unused-modules
function f(e,t){if(t===void 0){t={}}var r=t,f=r.placement,p=f===void 0?e.placement:f,h=r.strategy,v=h===void 0?e.strategy:h,m=r.boundary,g=m===void 0?u/* .clippingParents */.zV:m,b=r.rootBoundary,y=b===void 0?u/* .viewport */.Pj:b,_=r.elementContext,w=_===void 0?u/* .popper */.k5:_,x=r.altBoundary,E=x===void 0?false:x,Z=r.padding,S=Z===void 0?0:Z;var O=(0,c/* ["default"] */.Z)(typeof S!=="number"?S:(0,d/* ["default"] */.Z)(S,u/* .basePlacements */.mv));var k=w===u/* .popper */.k5?u/* .reference */.YP:u/* .popper */.k5;var T=e.rects.popper;var C=e.elements[E?k:w];var R=(0,n/* ["default"] */.Z)((0,l/* .isElement */.kK)(C)?C:C.contextElement||(0,i/* ["default"] */.Z)(e.elements.popper),g,y,v);var A=(0,a/* ["default"] */.Z)(e.elements.reference);var M=(0,o/* ["default"] */.Z)({reference:A,element:T,strategy:"absolute",placement:p});var P=(0,s/* ["default"] */.Z)(Object.assign({},T,M));var D=w===u/* .popper */.k5?P:A;// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var I={top:R.top-D.top+O.top,bottom:D.bottom-R.bottom+O.bottom,left:R.left-D.left+O.left,right:D.right-R.right+O.right};var L=e.modifiersData.offset;// Offsets can be applied only to the popper element
if(w===u/* .popper */.k5&&L){var F=L[p];Object.keys(I).forEach(function(e){var t=[u/* .right */.F2,u/* .bottom */.I].indexOf(e)>=0?1:-1;var r=[u/* .top */.we,u/* .bottom */.I].indexOf(e)>=0?"y":"x";I[e]+=F[r]*t})}return I}},33706:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e,t){return t.reduce(function(t,r){t[r]=e;return t},{})}},73967:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return e==="x"?"y":"x"}},6206:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return e.split("-")[0]}},23607:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(){return{top:0,right:0,bottom:0,left:0}}},11516:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},30697:function(e,t,r){"use strict";r.d(t,{Z:()=>i});var n={left:"right",right:"left",bottom:"top",top:"bottom"};function i(e){return e.replace(/left|right|bottom|top/g,function(e){return n[e]})}},30483:function(e,t,r){"use strict";r.d(t,{Z:()=>i});var n={start:"end",end:"start"};function i(e){return e.replace(/start|end/g,function(e){return n[e]})}},14943:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return e.split("-")[1]}},138:function(e,t,r){"use strict";r.d(t,{Fp:()=>n,NM:()=>a,VV:()=>i});var n=Math.max;var i=Math.min;var a=Math.round},3:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){var t=e.reduce(function(e,t){var r=e[t.name];e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t;return e},{});// IE11 does not support Object.values
return Object.keys(t).map(function(e){return t[e]})}},63293:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(23607);function i(e){return Object.assign({},(0,n/* ["default"] */.Z)(),e)}},50380:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(87701);// source: https://stackoverflow.com/questions/49875255
function i(e){var t=new Map;var r=new Set;var n=[];e.forEach(function(e){t.set(e.name,e)});// On visiting object, check for its dependencies and visit them recursively
function i(e){r.add(e.name);var a=[].concat(e.requires||[],e.requiresIfExists||[]);a.forEach(function(e){if(!r.has(e)){var n=t.get(e);if(n){i(n)}}});n.push(e)}e.forEach(function(e){if(!r.has(e.name)){// check for visited object
i(e)}});return n}function a(e){// order based on dependencies
var t=i(e);// order based on phase
return n/* .modifierPhases.reduce */.xs.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}},65626:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},85918:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(){var e=navigator.userAgentData;if(e!=null&&e.brands&&Array.isArray(e.brands)){return e.brands.map(function(e){return e.brand+"/"+e.version}).join(" ")}return navigator.userAgent}},57516:function(e,t,r){"use strict";r.d(t,{q:()=>a,u:()=>i});/* ESM import */var n=r(138);function i(e,t,r){return(0,n/* .max */.Fp)(e,(0,n/* .min */.VV)(t,r))}function a(e,t,r){var n=i(e,t,r);return n>r?r:n}},12599:function(e,t,r){"use strict";r.d(t,{J0:()=>l,RQ:()=>G,WK:()=>ed,X3:()=>er,Zn:()=>U,aU:()=>i,cP:()=>v,cm:()=>H,fp:()=>w,pC:()=>V,q_:()=>u});/**
 * @remix-run/router v1.23.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function n(){n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return n.apply(this,arguments)}////////////////////////////////////////////////////////////////////////////////
//#region Types and Constants
////////////////////////////////////////////////////////////////////////////////
/**
 * Actions represent the type of change to a location value.
 */var i;(function(e){/**
   * A POP indicates a change to an arbitrary index in the history stack, such
   * as a back or forward navigation. It does not describe the direction of the
   * navigation, only that the current index changed.
   *
   * Note: This is the default action for newly created history objects.
   */e["Pop"]="POP";/**
   * A PUSH indicates a new entry being added to the history stack, such as when
   * a link is clicked and a new page loads. When this happens, all subsequent
   * entries in the stack are lost.
   */e["Push"]="PUSH";/**
   * A REPLACE indicates the entry at the current index in the history stack
   * being replaced by a new one.
   */e["Replace"]="REPLACE"})(i||(i={}));const a="popstate";/**
 * Memory history stores the current location in memory. It is designed for use
 * in stateful non-browser environments like tests and React Native.
 */function o(e){if(e===void 0){e={}}let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=false}=e;let a;// Declare so we can access from createMemoryLocation
a=t.map((e,t)=>f(e,typeof e==="string"?null:e.state,t===0?"default":undefined));let o=l(r==null?a.length-1:r);let s=i.Pop;let u=null;function l(e){return Math.min(Math.max(e,0),a.length-1)}function d(){return a[o]}function f(e,t,r){if(t===void 0){t=null}let n=p(a?d().pathname:"/",e,t,r);c(n.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(e));return n}function m(e){return typeof e==="string"?e:h(e)}let g={get index(){return o},get action(){return s},get location(){return d()},createHref:m,createURL(e){return new URL(m(e),"http://localhost")},encodeLocation(e){let t=typeof e==="string"?v(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,t){s=i.Push;let r=f(e,t);o+=1;a.splice(o,a.length,r);if(n&&u){u({action:s,location:r,delta:1})}},replace(e,t){s=i.Replace;let r=f(e,t);a[o]=r;if(n&&u){u({action:s,location:r,delta:0})}},go(e){s=i.Pop;let t=l(o+e);let r=a[t];o=t;if(u){u({action:s,location:r,delta:e})}},listen(e){u=e;return()=>{u=null}}};return g}/**
 * Browser history stores the location in regular URLs. This is the standard for
 * most web apps, but it requires some configuration on the server to ensure you
 * serve the same app at multiple URLs.
 *
 * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
 */function s(e){if(e===void 0){e={}}function t(e,t){let{pathname:r,search:n,hash:i}=e.location;return p("",{pathname:r,search:n,hash:i},// state defaults to `null` because `window.history.state` does
t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function r(e,t){return typeof t==="string"?t:h(t)}return m(t,r,null,e)}/**
 * Hash history stores the location in window.location.hash. This makes it ideal
 * for situations where you don't want to send the location to the server for
 * some reason, either because you do cannot configure it or the URL space is
 * reserved for something else.
 *
 * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
 */function u(e){if(e===void 0){e={}}function t(e,t){let{pathname:r="/",search:n="",hash:i=""}=v(e.location.hash.substr(1));// Hash URL should always have a leading / just like window.location.pathname
// does, so if an app ends up at a route like /#something then we add a
// leading slash so all of our path-matching behaves the same as if it would
// in a browser router.  This is particularly important when there exists a
// root splat route (<Route path="*">) since that matches internally against
// "/*" and we'd expect /#something to 404 in a hash router app.
if(!r.startsWith("/")&&!r.startsWith(".")){r="/"+r}return p("",{pathname:r,search:n,hash:i},// state defaults to `null` because `window.history.state` does
t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function r(e,t){let r=e.document.querySelector("base");let n="";if(r&&r.getAttribute("href")){let t=e.location.href;let r=t.indexOf("#");n=r===-1?t:t.slice(0,r)}return n+"#"+(typeof t==="string"?t:h(t))}function n(e,t){c(e.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}return m(t,r,n,e)}function l(e,t){if(e===false||e===null||typeof e==="undefined"){throw new Error(t)}}function c(e,t){if(!e){// eslint-disable-next-line no-console
if(typeof console!=="undefined")console.warn(t);try{// Welcome to debugging history!
//
// This error is thrown as a convenience, so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(t);// eslint-disable-next-line no-empty
}catch(e){}}}function d(){return Math.random().toString(36).substr(2,8)}/**
 * For browser-based histories, we combine the state and key into an object
 */function f(e,t){return{usr:e.state,key:e.key,idx:t}}/**
 * Creates a Location object with a unique key from the given Path
 */function p(e,t,r,i){if(r===void 0){r=null}let a=n({pathname:typeof e==="string"?e:e.pathname,search:"",hash:""},typeof t==="string"?v(t):t,{state:r,// TODO: This could be cleaned up.  push/replace should probably just take
// full Locations now and avoid the need to run through this flow at all
// But that's a pretty big refactor to the current test suite so going to
// keep as is for the time being and just let any incoming keys take precedence
key:t&&t.key||i||d()});return a}/**
 * Creates a string URL path from the given pathname, search, and hash components.
 */function h(e){let{pathname:t="/",search:r="",hash:n=""}=e;if(r&&r!=="?")t+=r.charAt(0)==="?"?r:"?"+r;if(n&&n!=="#")t+=n.charAt(0)==="#"?n:"#"+n;return t}/**
 * Parses a string URL path into its separate pathname, search, and hash components.
 */function v(e){let t={};if(e){let r=e.indexOf("#");if(r>=0){t.hash=e.substr(r);e=e.substr(0,r)}let n=e.indexOf("?");if(n>=0){t.search=e.substr(n);e=e.substr(0,n)}if(e){t.pathname=e}}return t}function m(e,t,r,o){if(o===void 0){o={}}let{window:s=document.defaultView,v5Compat:u=false}=o;let c=s.history;let d=i.Pop;let v=null;let m=g();// Index should only be null when we initialize. If not, it's because the
// user called history.pushState or history.replaceState directly, in which
// case we should log a warning as it will result in bugs.
if(m==null){m=0;c.replaceState(n({},c.state,{idx:m}),"")}function g(){let e=c.state||{idx:null};return e.idx}function b(){d=i.Pop;let e=g();let t=e==null?null:e-m;m=e;if(v){v({action:d,location:x.location,delta:t})}}function y(e,t){d=i.Push;let n=p(x.location,e,t);if(r)r(n,e);m=g()+1;let a=f(n,m);let o=x.createHref(n);// try...catch because iOS limits us to 100 pushState calls :/
try{c.pushState(a,"",o)}catch(e){// If the exception is because `state` can't be serialized, let that throw
// outwards just like a replace call would so the dev knows the cause
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
// https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
if(e instanceof DOMException&&e.name==="DataCloneError"){throw e}// They are going to lose state here, but there is no real
// way to warn them about it since the page will refresh...
s.location.assign(o)}if(u&&v){v({action:d,location:x.location,delta:1})}}function _(e,t){d=i.Replace;let n=p(x.location,e,t);if(r)r(n,e);m=g();let a=f(n,m);let o=x.createHref(n);c.replaceState(a,"",o);if(u&&v){v({action:d,location:x.location,delta:0})}}function w(e){// window.location.origin is "null" (the literal string value) in Firefox
// under certain conditions, notably when serving from a local HTML file
// See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
let t=s.location.origin!=="null"?s.location.origin:s.location.href;let r=typeof e==="string"?e:h(e);// Treating this as a full URL will strip any trailing spaces so we need to
// pre-encode them since they might be part of a matching splat param from
// an ancestor route
r=r.replace(/ $/,"%20");l(t,"No window.location.(origin|href) available to create URL for href: "+r);return new URL(r,t)}let x={get action(){return d},get location(){return e(s,c)},listen(e){if(v){throw new Error("A history only accepts one active listener")}s.addEventListener(a,b);v=e;return()=>{s.removeEventListener(a,b);v=null}},createHref(e){return t(s,e)},createURL:w,encodeLocation(e){// Encode a Location the same way window.location would
let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:y,replace:_,go(e){return c.go(e)}};return x}//#endregion
var g;(function(e){e["data"]="data";e["deferred"]="deferred";e["redirect"]="redirect";e["error"]="error"})(g||(g={}));const b=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e){return e.index===true}// Walk the route tree generating unique IDs where necessary, so we are working
// solely with AgnosticDataRouteObject's within the Router
function _(e,t,r,i){if(r===void 0){r=[]}if(i===void 0){i={}}return e.map((e,a)=>{let o=[...r,String(a)];let s=typeof e.id==="string"?e.id:o.join("-");l(e.index!==true||!e.children,"Cannot specify children on an index route");l(!i[s],'Found a route id collision on id "'+s+'".  Route '+"id's must be globally unique within Data Router usages");if(y(e)){let r=n({},e,t(e),{id:s});i[s]=r;return r}else{let r=n({},e,t(e),{id:s,children:undefined});i[s]=r;if(e.children){r.children=_(e.children,t,o,i)}return r}})}/**
 * Matches the given routes to a location and returns the match data.
 *
 * @see https://reactrouter.com/v6/utils/match-routes
 */function w(e,t,r){if(r===void 0){r="/"}return x(e,t,r,false)}function x(e,t,r,n){let i=typeof t==="string"?v(t):t;let a=U(i.pathname||"/",r);if(a==null){return null}let o=Z(e);O(o);let s=null;for(let e=0;s==null&&e<o.length;++e){// Incoming pathnames are generally encoded from either window.location
// or from router.navigate, but we want to match against the unencoded
// paths in the route definitions.  Memory router locations won't be
// encoded here but there also shouldn't be anything to decode so this
// should be a safe operation.  This avoids needing matchRoutes to be
// history-aware.
let t=B(a);s=L(o[e],t,n)}return s}function E(e,t){let{route:r,pathname:n,params:i}=e;return{id:r.id,pathname:n,params:i,data:t[r.id],handle:r.handle}}function Z(e,t,r,n){if(t===void 0){t=[]}if(r===void 0){r=[]}if(n===void 0){n=""}let i=(e,i,a)=>{let o={relativePath:a===undefined?e.path||"":a,caseSensitive:e.caseSensitive===true,childrenIndex:i,route:e};if(o.relativePath.startsWith("/")){l(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes.");o.relativePath=o.relativePath.slice(n.length)}let s=G([n,o.relativePath]);let u=r.concat(o);// Add the children before adding this route to the array, so we traverse the
// route tree depth-first and child routes appear before their parents in
// the "flattened" version.
if(e.children&&e.children.length>0){l(// Our types know better, but runtime JS may not!
// @ts-expect-error
e.index!==true,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".'));Z(e.children,t,u,s)}// Routes without a path shouldn't ever match by themselves unless they are
// index routes, so don't add them to the list of possible branches.
if(e.path==null&&!e.index){return}t.push({path:s,score:D(s,e.index),routesMeta:u})};e.forEach((e,t)=>{var r;// coarse-grain check for optional params
if(e.path===""||!((r=e.path)!=null&&r.includes("?"))){i(e,t)}else{for(let r of S(e.path)){i(e,t,r)}}});return t}/**
 * Computes all combinations of optional path segments for a given path,
 * excluding combinations that are ambiguous and of lower priority.
 *
 * For example, `/one/:two?/three/:four?/:five?` explodes to:
 * - `/one/three`
 * - `/one/:two/three`
 * - `/one/three/:four`
 * - `/one/three/:five`
 * - `/one/:two/three/:four`
 * - `/one/:two/three/:five`
 * - `/one/three/:four/:five`
 * - `/one/:two/three/:four/:five`
 */function S(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t;// Optional path segments are denoted by a trailing `?`
let i=r.endsWith("?");// Compute the corresponding required segment: `foo?` -> `foo`
let a=r.replace(/\?$/,"");if(n.length===0){// Intepret empty string as omitting an optional segment
// `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
return i?[a,""]:[a]}let o=S(n.join("/"));let s=[];// All child paths with the prefix.  Do this for all children before the
// optional version for all children, so we get consistent ordering where the
// parent optional aspect is preferred as required.  Otherwise, we can get
// child sections interspersed where deeper optional segments are higher than
// parent optional segments, where for example, /:two would explode _earlier_
// then /:one.  By always including the parent as required _for all children_
// first, we avoid this issue
s.push(...o.map(e=>e===""?a:[a,e].join("/")));// Then, if this is an optional value, add all child versions without
if(i){s.push(...o)}// for absolute paths, ensure `/` instead of empty segment
return s.map(t=>e.startsWith("/")&&t===""?"/":t)}function O(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score// Higher score first
    :I(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}const k=/^:[\w-]+$/;const T=3;const C=2;const R=1;const A=10;const M=-2;const P=e=>e==="*";function D(e,t){let r=e.split("/");let n=r.length;if(r.some(P)){n+=M}if(t){n+=C}return r.filter(e=>!P(e)).reduce((e,t)=>e+(k.test(t)?T:t===""?R:A),n)}function I(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?// If two routes are siblings, we should try to match the earlier sibling
// first. This allows people to have fine-grained control over the matching
// behavior by simply putting routes with identical paths in the order they
// want them tried.
e[e.length-1]-t[t.length-1]:// Otherwise, it doesn't really make sense to rank non-siblings by index,
// so they sort equally.
0}function L(e,t,r){if(r===void 0){r=false}let{routesMeta:n}=e;let i={};let a="/";let o=[];for(let e=0;e<n.length;++e){let s=n[e];let u=e===n.length-1;let l=a==="/"?t:t.slice(a.length)||"/";let c=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);let d=s.route;if(!c&&u&&r&&!n[n.length-1].route.index){c=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:false},l)}if(!c){return null}Object.assign(i,c.params);o.push({// TODO: Can this as be avoided?
params:i,pathname:G([a,c.pathname]),pathnameBase:X(G([a,c.pathnameBase])),route:d});if(c.pathnameBase!=="/"){a=G([a,c.pathnameBase])}}return o}/**
 * Returns a path with params interpolated.
 *
 * @see https://reactrouter.com/v6/utils/generate-path
 */function F(e,t){if(t===void 0){t={}}let r=e;if(r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")){c(false,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));r=r.replace(/\*$/,"/*")}// ensure `/` is added at the beginning if the path is absolute
const n=r.startsWith("/")?"/":"";const i=e=>e==null?"":typeof e==="string"?e:String(e);const a=r.split(/\/+/).map((e,r,n)=>{const a=r===n.length-1;// only apply the splat if it's the last segment
if(a&&e==="*"){const e="*";// Apply the splat
return i(t[e])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];l(r==="?"||n!=null,'Missing ":'+e+'" param');return i(n)}// Remove any optional markers from optional static segments
return e.replace(/\?$/g,"")})// Remove empty segments
.filter(e=>!!e);return n+a.join("/")}/**
 * Performs pattern matching on a URL pathname and returns information about
 * the match.
 *
 * @see https://reactrouter.com/v6/utils/match-path
 */function N(e,t){if(typeof e==="string"){e={path:e,caseSensitive:false,end:true}}let[r,n]=j(e.path,e.caseSensitive,e.end);let i=t.match(r);if(!i)return null;let a=i[0];let o=a.replace(/(.)\/+$/,"$1");let s=i.slice(1);let u=n.reduce((e,t,r)=>{let{paramName:n,isOptional:i}=t;// We need to compute the pathnameBase here using the raw splat value
// instead of using params["*"] later because it will be decoded then
if(n==="*"){let e=s[r]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const u=s[r];if(i&&!u){e[n]=undefined}else{e[n]=(u||"").replace(/%2F/g,"/")}return e},{});return{params:u,pathname:a,pathnameBase:o,pattern:e}}function j(e,t,r){if(t===void 0){t=false}if(r===void 0){r=true}c(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[];let i="^"+e.replace(/\/*\*?$/,"")// Ignore trailing / and /*, we'll handle it below
.replace(/^\/*/,"/")// Make sure it has a leading /
.replace(/[\\.*+^${}|()[\]]/g,"\\$&")// Escape special regex chars
.replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>{n.push({paramName:t,isOptional:r!=null});return r?"/?([^\\/]+)?":"/([^\\/]+)"});if(e.endsWith("*")){n.push({paramName:"*"});i+=e==="*"||e==="/*"?"(.*)$"// Already matched the initial /, just match the rest
:"(?:\\/(.+)|\\/*)$";// Don't include the / in params["*"]
}else if(r){// When matching to the end, ignore trailing slashes
i+="\\/*$"}else if(e!==""&&e!=="/"){// If our path is non-empty and contains anything beyond an initial slash,
// then we have _some_ form of path in our regex, so we should expect to
// match only if we find the end of this path segment.  Look for an optional
// non-captured trailing slash (to match a portion of the URL) or the end
// of the path (if we've matched to the end).  We used to do this with a
// word boundary but that gives false positives on routes like
// /user-preferences since `-` counts as a word boundary.
i+="(?:(?=\\/|$))"}else;let a=new RegExp(i,t?undefined:"i");return[a,n]}function B(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){c(false,'The URL path "'+e+'" could not be decoded because it is is a '+"malformed URL segment. This is probably due to a bad percent "+("encoding ("+t+")."));return e}}/**
 * @private
 */function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase())){return null}// We want to leave trailing slash behavior in the user's control, so if they
// specify a basename with a trailing slash, we should support it
let r=t.endsWith("/")?t.length-1:t.length;let n=e.charAt(r);if(n&&n!=="/"){// pathname does not start with basename/
return null}return e.slice(r)||"/"}/**
 * Returns a resolved path object relative to the given pathname.
 *
 * @see https://reactrouter.com/v6/utils/resolve-path
 */function W(e,t){if(t===void 0){t="/"}let{pathname:r,search:n="",hash:i=""}=typeof e==="string"?v(e):e;let a=r?r.startsWith("/")?r:z(r,t):t;return{pathname:a,search:K(n),hash:Q(i)}}function z(e,t){let r=t.replace(/\/+$/,"").split("/");let n=e.split("/");n.forEach(e=>{if(e===".."){// Keep the root "" segment so the pathname starts at /
if(r.length>1)r.pop()}else if(e!=="."){r.push(e)}});return r.length>1?r.join("/"):"/"}function J(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}/**
 * @private
 *
 * When processing relative navigation we want to ignore ancestor routes that
 * do not contribute to the path, such that index/pathless layout routes don't
 * interfere.
 *
 * For example, when moving a route element into an index route and/or a
 * pathless layout route, relative link behavior contained within should stay
 * the same.  Both of the following examples should link back to the root:
 *
 *   <Route path="/">
 *     <Route path="accounts" element={<Link to=".."}>
 *   </Route>
 *
 *   <Route path="/">
 *     <Route path="accounts">
 *       <Route element={<AccountsLayout />}>       // <-- Does not contribute
 *         <Route index element={<Link to=".."} />  // <-- Does not contribute
 *       </Route
 *     </Route>
 *   </Route>
 */function q(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}// Return the array of pathnames for the current route matches - used to
// generate the routePathnames input for resolveTo()
function H(e,t){let r=q(e);// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
// match so we include splat values for "." links.  See:
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
if(t){return r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase)}return r.map(e=>e.pathnameBase)}/**
 * @private
 */function V(e,t,r,i){if(i===void 0){i=false}let a;if(typeof e==="string"){a=v(e)}else{a=n({},e);l(!a.pathname||!a.pathname.includes("?"),J("?","pathname","search",a));l(!a.pathname||!a.pathname.includes("#"),J("#","pathname","hash",a));l(!a.search||!a.search.includes("#"),J("#","search","hash",a))}let o=e===""||a.pathname==="";let s=o?"/":a.pathname;let u;// Routing is relative to the current pathname if explicitly requested.
//
// If a pathname is explicitly provided in `to`, it should be relative to the
// route context. This is explained in `Note on `<Link to>` values` in our
// migration guide from v5 as a means of disambiguation between `to` values
// that begin with `/` and those that do not. However, this is problematic for
// `to` values that do not provide a pathname. `to` can simply be a search or
// hash string, in which case we should assume that the navigation is relative
// to the current location's pathname and *not* the route pathname.
if(s==null){u=r}else{let e=t.length-1;// With relative="route" (the default), each leading .. segment means
// "go up one route" instead of "go up one URL segment".  This is a key
// difference from how <a href> works and a major reason we call this a
// "to" value instead of a "href".
if(!i&&s.startsWith("..")){let t=s.split("/");while(t[0]===".."){t.shift();e-=1}a.pathname=t.join("/")}u=e>=0?t[e]:"/"}let c=W(a,u);// Ensure the pathname has a trailing slash if the original "to" had one
let d=s&&s!=="/"&&s.endsWith("/");// Or if this was a link to the current path which has a trailing slash
let f=(o||s===".")&&r.endsWith("/");if(!c.pathname.endsWith("/")&&(d||f)){c.pathname+="/"}return c}/**
 * @private
 */function $(e){// Empty strings should be treated the same as / paths
return e===""||e.pathname===""?"/":typeof e==="string"?v(e).pathname:e.pathname}/**
 * @private
 */const G=e=>e.join("/").replace(/\/\/+/g,"/");/**
 * @private
 */const X=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");/**
 * @private
 */const K=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e;/**
 * @private
 */const Q=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;/**
 * This is a shortcut for creating `application/json` responses. Converts `data`
 * to JSON and sets the `Content-Type` header.
 *
 * @deprecated The `json` method is deprecated in favor of returning raw objects.
 * This method will be removed in v7.
 */const Y=function e(e,t){if(t===void 0){t={}}let r=typeof t==="number"?{status:t}:t;let i=new Headers(r.headers);if(!i.has("Content-Type")){i.set("Content-Type","application/json; charset=utf-8")}return new Response(JSON.stringify(e),n({},r,{headers:i}))};class ee{constructor(e,t){this.type="DataWithResponseInit";this.data=e;this.init=t||null}}/**
 * Create "responses" that contain `status`/`headers` without forcing
 * serialization into an actual `Response` - used by Remix single fetch
 */function et(e,t){return new ee(e,typeof t==="number"?{status:t}:t)}class er extends Error{}class en{constructor(e,t){this.pendingKeysSet=new Set;this.subscribers=new Set;this.deferredKeys=[];l(e&&typeof e==="object"&&!Array.isArray(e),"defer() only accepts plain objects");// Set up an AbortController + Promise we can race against to exit early
// cancellation
let r;this.abortPromise=new Promise((e,t)=>r=t);this.controller=new AbortController;let n=()=>r(new er("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n);this.controller.signal.addEventListener("abort",n);this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{});if(this.done){// All incoming values were resolved
this.unlistenAbortSignal()}this.init=t}trackPromise(e,t){if(!(t instanceof Promise)){return t}this.deferredKeys.push(e);this.pendingKeysSet.add(e);// We store a little wrapper promise that will be extended with
// _data/_error props upon resolve/reject
let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,undefined,t),t=>this.onSettle(r,e,t));// Register rejection listeners to avoid uncaught promise rejections on
// errors or aborted deferred values
r.catch(()=>{});Object.defineProperty(r,"_tracked",{get:()=>true});return r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof er){this.unlistenAbortSignal();Object.defineProperty(e,"_error",{get:()=>r});return Promise.reject(r)}this.pendingKeysSet.delete(t);if(this.done){// Nothing left to abort!
this.unlistenAbortSignal()}// If the promise was resolved/rejected with undefined, we'll throw an error as you
// should always resolve with a value or null
if(r===undefined&&n===undefined){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, '+"you must resolve/reject with a value or `null`.");Object.defineProperty(e,"_error",{get:()=>r});this.emit(false,t);return Promise.reject(r)}if(n===undefined){Object.defineProperty(e,"_error",{get:()=>r});this.emit(false,t);return Promise.reject(r)}Object.defineProperty(e,"_data",{get:()=>n});this.emit(false,t);return n}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){this.subscribers.add(e);return()=>this.subscribers.delete(e)}cancel(){this.controller.abort();this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t));this.emit(true)}async resolveData(e){let t=false;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r);t=await new Promise(t=>{this.subscribe(n=>{e.removeEventListener("abort",r);if(n||this.done){t(n)}})})}return t}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){l(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds");return Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:ea(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function ei(e){return e instanceof Promise&&e._tracked===true}function ea(e){if(!ei(e)){return e}if(e._error){throw e._error}return e._data}/**
 * @deprecated The `defer` method is deprecated in favor of returning raw
 * objects. This method will be removed in v7.
 */const eo=function e(e,t){if(t===void 0){t={}}let r=typeof t==="number"?{status:t}:t;return new en(e,r)};/**
 * A redirect response. Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const es=function e(e,t){if(t===void 0){t=302}let r=t;if(typeof r==="number"){r={status:r}}else if(typeof r.status==="undefined"){r.status=302}let i=new Headers(r.headers);i.set("Location",e);return new Response(null,n({},r,{headers:i}))};/**
 * A redirect response that will force a document reload to the new location.
 * Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const eu=(e,t)=>{let r=es(e,t);r.headers.set("X-Remix-Reload-Document","true");return r};/**
 * A redirect response that will perform a `history.replaceState` instead of a
 * `history.pushState` for client-side navigation redirects.
 * Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const el=(e,t)=>{let r=es(e,t);r.headers.set("X-Remix-Replace","true");return r};/**
 * @private
 * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
 *
 * We don't export the class for public use since it's an implementation
 * detail, but we export the interface above so folks can build their own
 * abstractions around instances via isRouteErrorResponse()
 */class ec{constructor(e,t,r,n){if(n===void 0){n=false}this.status=e;this.statusText=t||"";this.internal=n;if(r instanceof Error){this.data=r.toString();this.error=r}else{this.data=r}}}/**
 * Check if the given error is an ErrorResponse generated from a 4xx/5xx
 * Response thrown from an action/loader
 */function ed(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.internal==="boolean"&&"data"in e}const ef=["post","put","patch","delete"];const ep=new Set(ef);const eh=["get",...ef];const ev=new Set(eh);const em=new Set([301,302,303,307,308]);const eg=new Set([307,308]);const eb=/* unused pure expression or super */null&&{state:"idle",location:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const ey=/* unused pure expression or super */null&&{state:"idle",data:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const e_=/* unused pure expression or super */null&&{state:"unblocked",proceed:undefined,reset:undefined,location:undefined};const ew=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const ex=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});const eE="remix-router-transitions";//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createRouter
////////////////////////////////////////////////////////////////////////////////
/**
 * Create a router and listen to history POP navigations
 */function eZ(e){const t=e.window?e.window:typeof window!=="undefined"?window:undefined;const r=typeof t!=="undefined"&&typeof t.document!=="undefined"&&typeof t.document.createElement!=="undefined";const a=!r;l(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties){o=e.mapRouteProperties}else if(e.detectErrorBoundary){// If they are still using the deprecated version, wrap it with the new API
let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else{o=ex}// Routes keyed by ID
let s={};// Routes in tree format for matching
let u=_(e.routes,o,undefined,s);let d;let f=e.basename||"/";let h=e.dataStrategy||eU;let v=e.patchRoutesOnNavigation;// Config driven behavior flags
let m=n({v7_fetcherPersist:false,v7_normalizeFormMethod:false,v7_partialHydration:false,v7_prependBasename:false,v7_relativeSplatPath:false,v7_skipActionErrorRevalidation:false},e.future);// Cleanup function for history
let b=null;// Externally-provided functions to call on all state changes
let y=new Set;// Externally-provided object to hold scroll restoration locations during routing
let Z=null;// Externally-provided function to get scroll restoration keys
let S=null;// Externally-provided function to get current scroll position
let O=null;// One-time flag to control the initial hydration scroll restoration.  Because
// we don't get the saved positions from <ScrollRestoration /> until _after_
// the initial render, we need to manually trigger a separate updateState to
// send along the restoreScrollPosition
// Set to true if we have `hydrationData` since we assume we were SSR'd and that
// SSR did the initial scroll restoration.
let k=e.hydrationData!=null;let T=w(u,e.history.location,f);let C=false;let R=null;if(T==null&&!v){// If we do not match a user-provided-route, fall back to the root
// to allow the error boundary to take over
let t=e2(404,{pathname:e.history.location.pathname});let{matches:r,route:n}=e1(u);T=r;R={[n.id]:t}}// In SPA apps, if the user provided a patchRoutesOnNavigation implementation and
// our initial match is a splat route, clear them out so we run through lazy
// discovery on hydration in case there's a more accurate lazy route match.
// In SSR apps (with `hydrationData`), we expect that the server will send
// up the proper matched routes so we don't want to run lazy discovery on
// initial hydration and want to hydrate into the splat route.
if(T&&!e.hydrationData){let t=tc(T,u,e.history.location.pathname);if(t.active){T=null}}let A;if(!T){A=false;T=[];// If partial hydration and fog of war is enabled, we will be running
// `patchRoutesOnNavigation` during hydration so include any partial matches as
// the initial matches so we can properly render `HydrateFallback`'s
if(m.v7_partialHydration){let t=tc(null,u,e.history.location.pathname);if(t.active&&t.matches){C=true;T=t.matches}}}else if(T.some(e=>e.route.lazy)){// All initialMatches need to be loaded before we're ready.  If we have lazy
// functions around still then we'll need to run them in initialize()
A=false}else if(!T.some(e=>e.route.loader)){// If we've got no loaders to run, then we're good to go
A=true}else if(m.v7_partialHydration){// If partial hydration is enabled, we're initialized so long as we were
// provided with hydrationData for every route with a loader, and no loaders
// were marked for explicit hydration
let t=e.hydrationData?e.hydrationData.loaderData:null;let r=e.hydrationData?e.hydrationData.errors:null;// If errors exist, don't consider routes below the boundary
if(r){let e=T.findIndex(e=>r[e.route.id]!==undefined);A=T.slice(0,e+1).every(e=>!eD(e.route,t,r))}else{A=T.every(e=>!eD(e.route,t,r))}}else{// Without partial hydration - we're initialized if we were provided any
// hydrationData - which is expected to be complete
A=e.hydrationData!=null}let M;let P={historyAction:e.history.action,location:e.history.location,matches:T,initialized:A,navigation:eb,// Don't restore on initial updateState() if we were SSR'd
restoreScrollPosition:e.hydrationData!=null?false:null,preventScrollReset:false,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||R,fetchers:new Map,blockers:new Map};// -- Stateful internal variables to manage navigations --
// Current navigation in progress (to be committed in completeNavigation)
let D=i.Pop;// Should the current navigation prevent the scroll reset if scroll cannot
// be restored?
let I=false;// AbortController for the active navigation
let L;// Should the current navigation enable document.startViewTransition?
let F=false;// Store applied view transitions so we can apply them on POP
let N=new Map;// Cleanup function for persisting applied transitions to sessionStorage
let j=null;// We use this to avoid touching history in completeNavigation if a
// revalidation is entirely uninterrupted
let B=false;// Use this internal flag to force revalidation of all loaders:
//  - submissions (completed or interrupted)
//  - useRevalidator()
//  - X-Remix-Revalidate (from redirect)
let W=false;// Use this internal array to capture routes that require revalidation due
// to a cancelled deferred on action submission
let z=[];// Use this internal array to capture fetcher loads that were cancelled by an
// action navigation and require revalidation
let J=new Set;// AbortControllers for any in-flight fetchers
let q=new Map;// Track loads based on the order in which they started
let H=0;// Track the outstanding pending navigation data load to be compared against
// the globally incrementing load when a fetcher load lands after a completed
// navigation
let V=-1;// Fetchers that triggered data reloads as a result of their actions
let $=new Map;// Fetchers that triggered redirect navigations
let G=new Set;// Most recent href/match for fetcher.load calls for fetchers
let X=new Map;// Ref-count mounted fetchers so we know when it's ok to clean them up
let K=new Map;// Fetchers that have requested a delete when using v7_fetcherPersist,
// they'll be officially removed after they return to idle
let Q=new Set;// Store DeferredData instances for active route matches.  When a
// route loader returns defer() we stick one in here.  Then, when a nested
// promise resolves we update loaderData.  If a new navigation starts we
// cancel active deferreds for eliminated routes.
let Y=new Map;// Store blocker functions in a separate Map outside of router state since
// we don't need to update UI state if they change
let ee=new Map;// Flag to ignore the next history update, so we can revert the URL change on
// a POP navigation that was blocked by the user without touching router state
let et=undefined;// Initialize the router, all side effects should be kicked off from here.
// Implemented as a Fluent API for ease of:
//   let router = createRouter(init).initialize();
function er(){// If history informs us of a POP navigation, start the navigation but do not update
// state.  We'll update our own state once the navigation completes
b=e.history.listen(t=>{let{action:r,location:n,delta:i}=t;// Ignore this event if it was just us resetting the URL from a
// blocked POP navigation
if(et){et();et=undefined;return}c(ee.size===0||i!=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 a=e3({currentLocation:P.location,nextLocation:n,historyAction:r});if(a&&i!=null){// Restore the URL to match the current UI, but don't update router state
let t=new Promise(e=>{et=e});e.history.go(i*-1);// Put the blocker into a blocked state
eX(a,{state:"blocked",location:n,proceed(){eX(a,{state:"proceeding",proceed:undefined,reset:undefined,location:n});// Re-do the same POP navigation we just blocked, after the url
// restoration is also complete.  See:
// https://github.com/remix-run/react-router/issues/11613
t.then(()=>e.history.go(i))},reset(){let e=new Map(P.blockers);e.set(a,e_);ea({blockers:e})}});return}return el(r,n)});if(r){// FIXME: This feels gross.  How can we cleanup the lines between
// scrollRestoration/appliedTransitions persistance?
tb(t,N);let e=()=>ty(t,N);t.addEventListener("pagehide",e);j=()=>t.removeEventListener("pagehide",e)}// Kick off initial data load if needed.  Use Pop to avoid modifying history
// Note we don't do any handling of lazy here.  For SPA's it'll get handled
// in the normal navigation flow.  For SSR it's expected that lazy modules are
// resolved prior to router creation since we can't go into a fallbackElement
// UI for SSR'd apps
if(!P.initialized){el(i.Pop,P.location,{initialHydration:true})}return M}// Clean up a router and it's side effects
function en(){if(b){b()}if(j){j()}y.clear();L&&L.abort();P.fetchers.forEach((e,t)=>eI(t));P.blockers.forEach((e,t)=>eG(t))}// Subscribe to state updates for the router
function ei(e){y.add(e);return()=>y.delete(e)}// Update our state and notify the calling context of the change
function ea(e,t){if(t===void 0){t={}}P=n({},P,e);// Prep fetcher cleanup so we can tell the UI which fetcher data entries
// can be removed
let r=[];let i=[];if(m.v7_fetcherPersist){P.fetchers.forEach((e,t)=>{if(e.state==="idle"){if(Q.has(t)){// Unmounted from the UI and can be totally removed
i.push(t)}else{// Returned to idle but still mounted in the UI, so semi-remains for
// revalidations and such
r.push(t)}}})}// Remove any lingering deleted fetchers that have already been removed
// from state.fetchers
Q.forEach(e=>{if(!P.fetchers.has(e)&&!q.has(e)){i.push(e)}});// Iterate over a local copy so that if flushSync is used and we end up
// removing and adding a new subscriber due to the useCallback dependencies,
// we don't get ourselves into a loop calling the new subscriber immediately
[...y].forEach(e=>e(P,{deletedFetchers:i,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===true}));// Remove idle fetchers from state since we only care about in-flight fetchers.
if(m.v7_fetcherPersist){r.forEach(e=>P.fetchers.delete(e));i.forEach(e=>eI(e))}else{// We already called deleteFetcher() on these, can remove them from this
// Set now that we've handed the keys off to the data layer
i.forEach(e=>Q.delete(e))}}// Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
// and setting state.[historyAction/location/matches] to the new route.
// - Location is a required param
// - Navigation will always be set to IDLE_NAVIGATION
// - Can pass any other state in newState
function eo(t,r,a){var o,s;let{flushSync:l}=a===void 0?{}:a;// Deduce if we're in a loading/actionReload state:
// - We have committed actionData in the store
// - The current navigation was a mutation submission
// - We're past the submitting state and into the loading state
// - The location being loaded is not the result of a redirect
let c=P.actionData!=null&&P.navigation.formMethod!=null&&to(P.navigation.formMethod)&&P.navigation.state==="loading"&&((o=t.state)==null?void 0:o._isRedirect)!==true;let f;if(r.actionData){if(Object.keys(r.actionData).length>0){f=r.actionData}else{// Empty actionData -> clear prior actionData due to an action error
f=null}}else if(c){// Keep the current data if we're wrapping up the action reload
f=P.actionData}else{// Clear actionData on any other completed navigations
f=null}// Always preserve any existing loaderData from re-used routes
let p=r.loaderData?eQ(P.loaderData,r.loaderData,r.matches||[],r.errors):P.loaderData;// On a successful navigation we can assume we got through all blockers
// so we can start fresh
let h=P.blockers;if(h.size>0){h=new Map(h);h.forEach((e,t)=>h.set(t,e_))}// Always respect the user flag.  Otherwise don't reset on mutation
// submission navigations unless they redirect
let v=I===true||P.navigation.formMethod!=null&&to(P.navigation.formMethod)&&((s=t.state)==null?void 0:s._isRedirect)!==true;// Commit any in-flight routes at the end of the HMR revalidation "navigation"
if(d){u=d;d=undefined}if(B);else if(D===i.Pop);else if(D===i.Push){e.history.push(t,t.state)}else if(D===i.Replace){e.history.replace(t,t.state)}let m;// On POP, enable transitions if they were enabled on the original navigation
if(D===i.Pop){// Forward takes precedence so they behave like the original navigation
let e=N.get(P.location.pathname);if(e&&e.has(t.pathname)){m={currentLocation:P.location,nextLocation:t}}else if(N.has(t.pathname)){// If we don't have a previous forward nav, assume we're popping back to
// the new location and enable if that location previously enabled
m={currentLocation:t,nextLocation:P.location}}}else if(F){// Store the applied transition on PUSH/REPLACE
let e=N.get(P.location.pathname);if(e){e.add(t.pathname)}else{e=new Set([t.pathname]);N.set(P.location.pathname,e)}m={currentLocation:P.location,nextLocation:t}}ea(n({},r,{actionData:f,loaderData:p,historyAction:D,location:t,initialized:true,navigation:eb,revalidation:"idle",restoreScrollPosition:ta(t,r.matches||P.matches),preventScrollReset:v,blockers:h}),{viewTransitionOpts:m,flushSync:l===true});// Reset stateful navigation vars
D=i.Pop;I=false;F=false;B=false;W=false;z=[]}// Trigger a navigation event, which can either be a numerical POP or a PUSH
// replace with an optional submission
async function es(t,r){if(typeof t==="number"){e.history.go(t);return}let a=eR(P.location,P.matches,f,m.v7_prependBasename,t,m.v7_relativeSplatPath,r==null?void 0:r.fromRouteId,r==null?void 0:r.relative);let{path:o,submission:s,error:u}=eA(m.v7_normalizeFormMethod,false,a,r);let l=P.location;let c=p(P.location,o,r&&r.state);// When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
// URL from window.location, so we need to encode it here so the behavior
// remains the same as POP and non-data-router usages.  new URL() does all
// the same encoding we'd get from a history.pushState/window.location read
// without having to touch history
c=n({},c,e.history.encodeLocation(c));let d=r&&r.replace!=null?r.replace:undefined;let h=i.Push;if(d===true){h=i.Replace}else if(d===false);else if(s!=null&&to(s.formMethod)&&s.formAction===P.location.pathname+P.location.search){// By default on submissions to the current location we REPLACE so that
// users don't have to double-click the back button to get to the prior
// location.  If the user redirects to a different location from the
// action/loader this will be ignored and the redirect will be a PUSH
h=i.Replace}let v=r&&"preventScrollReset"in r?r.preventScrollReset===true:undefined;let g=(r&&r.flushSync)===true;let b=e3({currentLocation:l,nextLocation:c,historyAction:h});if(b){// Put the blocker into a blocked state
eX(b,{state:"blocked",location:c,proceed(){eX(b,{state:"proceeding",proceed:undefined,reset:undefined,location:c});// Send the same navigation through
es(t,r)},reset(){let e=new Map(P.blockers);e.set(b,e_);ea({blockers:e})}});return}return await el(h,c,{submission:s,// Send through the formData serialization error if we have one so we can
// render at the right error boundary after we match routes
pendingError:u,preventScrollReset:v,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:g})}// Revalidate all current loaders.  If a navigation is in progress or if this
// is interrupted by a navigation, allow this to "succeed" by calling all
// loaders during the next loader round
function eu(){ek();ea({revalidation:"loading"});// If we're currently submitting an action, we don't need to start a new
// navigation, we'll just let the follow up loader execution call all loaders
if(P.navigation.state==="submitting"){return}// If we're currently in an idle state, start a new navigation for the current
// action/location and mark it as uninterrupted, which will skip the history
// update in completeNavigation
if(P.navigation.state==="idle"){el(P.historyAction,P.location,{startUninterruptedRevalidation:true});return}// Otherwise, if we're currently in a loading state, just start a new
// navigation to the navigation.location but do not trigger an uninterrupted
// revalidation so that history correctly updates once the navigation completes
el(D||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,// Proxy through any rending view transition
enableViewTransition:F===true})}// Start a navigation to the given action/location.  Can optionally provide a
// overrideNavigation which will override the normalLoad in the case of a redirect
// navigation
async function el(t,r,i){// Abort any in-progress navigations and start a new one. Unset any ongoing
// uninterrupted revalidations unless told otherwise, since we want this
// new navigation to update history normally
L&&L.abort();L=null;D=t;B=(i&&i.startUninterruptedRevalidation)===true;// Save the current scroll position every time we start a new navigation,
// and track whether we should reset scroll on completion
ti(P.location,P.matches);I=(i&&i.preventScrollReset)===true;F=(i&&i.enableViewTransition)===true;let a=d||u;let o=i&&i.overrideNavigation;let s=i!=null&&i.initialHydration&&P.matches&&P.matches.length>0&&!C?// `matchRoutes()` has already been called if we're in here via `router.initialize()`
P.matches:w(a,r,f);let l=(i&&i.flushSync)===true;// Short circuit if it's only a hash change and not a revalidation or
// mutation submission.
//
// Ignore on initial page loads because since the initial hydration will always
// be "same hash".  For example, on /page#hash and submit a <Form method="post">
// which will default to a navigation to /page
if(s&&P.initialized&&!W&&e5(P.location,r)&&!(i&&i.submission&&to(i.submission.formMethod))){eo(r,{matches:s},{flushSync:l});return}let c=tc(s,a,r.pathname);if(c.active&&c.matches){s=c.matches}// Short circuit with a 404 on the root error boundary if we match nothing
if(!s){let{error:e,notFoundMatches:t,route:n}=e6(r.pathname);eo(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:l});return}// Create a controller/Request for this navigation
L=new AbortController;let p=eV(e.history,r,L.signal,i&&i.submission);let h;if(i&&i.pendingError){// If we have a pendingError, it means the user attempted a GET submission
// with binary FormData so assign here and skip to handleLoaders.  That
// way we handle calling loaders above the boundary etc.  It's not really
// different from an actionError in that sense.
h=[e0(s).route.id,{type:g.error,error:i.pendingError}]}else if(i&&i.submission&&to(i.submission.formMethod)){// Call action if we received an action submission
let t=await ec(p,r,i.submission,s,c.active,{replace:i.replace,flushSync:l});if(t.shortCircuited){return}// If we received a 404 from handleAction, it's because we couldn't lazily
// discover the destination route so we don't want to call loaders
if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(e7(n)&&ed(n.error)&&n.error.status===404){L=null;eo(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}});return}}s=t.matches||s;h=t.pendingActionResult;o=tp(r,i.submission);l=false;// No need to do fog of war matching again on loader execution
c.active=false;// Create a GET request for the loaders
p=eV(e.history,p.url,p.signal)}// Call loaders
let{shortCircuited:v,matches:m,loaderData:b,errors:y}=await ef(p,r,s,c.active,o,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&i.initialHydration===true,l,h);if(v){return}// Clean up now that the action/loaders have completed.  Don't clean up if
// we short circuited because pendingNavigationController will have already
// been assigned to a new controller for the next navigation
L=null;eo(r,n({matches:m||s},eY(h),{loaderData:b,errors:y}))}// Call the action matched by the leaf route for this navigation and handle
// redirects/errors
async function ec(e,t,r,n,a,o){if(o===void 0){o={}}ek();// Put us in a submitting state
let s=th(t,r);ea({navigation:s},{flushSync:o.flushSync===true});if(a){let r=await t_(n,t.pathname,e.signal);if(r.type==="aborted"){return{shortCircuited:true}}else if(r.type==="error"){let e=e0(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:g.error,error:r.error}]}}else if(!r.matches){let{notFoundMatches:e,error:r,route:n}=e6(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:g.error,error:r}]}}else{n=r.matches}}// Call our action and get the result
let u;let l=td(n,t);if(!l.route.action&&!l.route.lazy){u={type:g.error,error:e2(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})}}else{let t=await eS("action",P,e,[l],n,null);u=t[l.route.id];if(e.signal.aborted){return{shortCircuited:true}}}if(te(u)){let t;if(o&&o.replace!=null){t=o.replace}else{// If the user didn't explicity indicate replace behavior, replace if
// we redirected to the exact same location we're currently at to avoid
// double back-buttons
let r=eH(u.response.headers.get("Location"),new URL(e.url),f);t=r===P.location.pathname+P.location.search}await eZ(e,u,true,{submission:r,replace:t});return{shortCircuited:true}}if(e9(u)){throw e2(400,{type:"defer-action"})}if(e7(u)){// Store off the pending error - we use it to determine which loaders
// to call and will commit it when we complete the navigation
let e=e0(n,l.route.id);// By default, all submissions to the current location are REPLACE
// navigations, but if the action threw an error that'll be rendered in
// an errorElement, we fall back to PUSH so that the user can use the
// back button to get back to the pre-submission form location to try
// again
if((o&&o.replace)!==true){D=i.Push}return{matches:n,pendingActionResult:[e.route.id,u]}}return{matches:n,pendingActionResult:[l.route.id,u]}}// Call all applicable loaders for the given matches, handling redirects,
// errors, etc.
async function ef(t,r,i,a,o,s,l,c,p,h,v){// Figure out the right navigation we want to use for data loading
let g=o||tp(r,s);// If this was a redirect from an action we don't have a "submission" but
// we have it on the loading navigation so use that if available
let b=s||l||tf(g);// If this is an uninterrupted revalidation, we remain in our current idle
// state.  If not, we need to switch to our loading state and load data,
// preserving any new action data or existing action data (in the case of
// a revalidation interrupting an actionReload)
// If we have partialHydration enabled, then don't update the state for the
// initial data load since it's not a "navigation"
let y=!B&&(!m.v7_partialHydration||!p);// When fog of war is enabled, we enter our `loading` state earlier so we
// can discover new routes during the `loading` state.  We skip this if
// we've already run actions since we would have done our matching already.
// If the children() function threw then, we want to proceed with the
// partial matches it discovered.
if(a){if(y){let e=ep(v);ea(n({navigation:g},e!==undefined?{actionData:e}:{}),{flushSync:h})}let e=await t_(i,r.pathname,t.signal);if(e.type==="aborted"){return{shortCircuited:true}}else if(e.type==="error"){let t=e0(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(!e.matches){let{error:e,notFoundMatches:t,route:n}=e6(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}else{i=e.matches}}let _=d||u;let[w,x]=eP(e.history,P,i,b,r,m.v7_partialHydration&&p===true,m.v7_skipActionErrorRevalidation,W,z,J,Q,X,G,_,f,v);// Cancel pending deferreds for no-longer-matched routes or routes we're
// about to reload.  Note that if this is an action reload we would have
// already cancelled all pending deferreds so this would be a no-op
tt(e=>!(i&&i.some(t=>t.route.id===e))||w&&w.some(t=>t.route.id===e));V=++H;// Short circuit if we have no loaders to run
if(w.length===0&&x.length===0){let e=eB();eo(r,n({matches:i,loaderData:{},// Commit pending error if we're short circuiting
errors:v&&e7(v[1])?{[v[0]]:v[1].error}:null},eY(v),e?{fetchers:new Map(P.fetchers)}:{}),{flushSync:h});return{shortCircuited:true}}if(y){let e={};if(!a){// Only update navigation/actionNData if we didn't already do it above
e.navigation=g;let t=ep(v);if(t!==undefined){e.actionData=t}}if(x.length>0){e.fetchers=eh(x)}ea(e,{flushSync:h})}x.forEach(e=>{eF(e.key);if(e.controller){// Fetchers use an independent AbortController so that aborting a fetcher
// (via deleteFetcher) does not abort the triggering navigation that
// triggered the revalidation
q.set(e.key,e.controller)}});// Proxy navigation abort through to revalidation fetchers
let E=()=>x.forEach(e=>eF(e.key));if(L){L.signal.addEventListener("abort",E)}let{loaderResults:Z,fetcherResults:S}=await eO(P,i,w,x,t);if(t.signal.aborted){return{shortCircuited:true}}// Clean up _after_ loaders have completed.  Don't clean up if we short
// circuited because fetchControllers would have been aborted and
// reassigned to new controllers for the next navigation
if(L){L.signal.removeEventListener("abort",E)}x.forEach(e=>q.delete(e.key));// If any loaders returned a redirect Response, start a new REPLACE navigation
let O=e4(Z);if(O){await eZ(t,O.result,true,{replace:c});return{shortCircuited:true}}O=e4(S);if(O){// If this redirect came from a fetcher make sure we mark it in
// fetchRedirectIds so it doesn't get revalidated on the next set of
// loader executions
G.add(O.key);await eZ(t,O.result,true,{replace:c});return{shortCircuited:true}}// Process and commit output from loaders
let{loaderData:k,errors:T}=eK(P,i,Z,v,x,S,Y);// Wire up subscribers to update loaderData as promises settle
Y.forEach((e,t)=>{e.subscribe(r=>{// Note: No need to updateState here since the TrackedPromise on
// loaderData is stable across resolve/reject
// Remove this instance if we were aborted or if promises have settled
if(r||e.done){Y.delete(t)}})});// Preserve SSR errors during partial hydration
if(m.v7_partialHydration&&p&&P.errors){T=n({},P.errors,T)}let C=eB();let R=ez(V);let A=C||R||x.length>0;return n({matches:i,loaderData:k,errors:T},A?{fetchers:new Map(P.fetchers)}:{})}function ep(e){if(e&&!e7(e[1])){// This is cast to `any` currently because `RouteData`uses any and it
// would be a breaking change to use any.
// TODO: v7 - change `RouteData` to use `unknown` instead of `any`
return{[e[0]]:e[1].data}}else if(P.actionData){if(Object.keys(P.actionData).length===0){return null}else{return P.actionData}}}function eh(e){e.forEach(e=>{let t=P.fetchers.get(e.key);let r=tv(undefined,t?t.data:undefined);P.fetchers.set(e.key,r)});return new Map(P.fetchers)}// Trigger a fetcher load/submit for the given fetcher key
function ev(e,t,r,n){if(a){throw new Error("router.fetch() was called during the server render, but it shouldn't be. "+"You are likely calling a useFetcher() method in the body of your component. "+"Try moving it to a useEffect or a callback.")}eF(e);let i=(n&&n.flushSync)===true;let o=d||u;let s=eR(P.location,P.matches,f,m.v7_prependBasename,r,m.v7_relativeSplatPath,t,n==null?void 0:n.relative);let l=w(o,s,f);let c=tc(l,o,s);if(c.active&&c.matches){l=c.matches}if(!l){eC(e,t,e2(404,{pathname:s}),{flushSync:i});return}let{path:p,submission:h,error:v}=eA(m.v7_normalizeFormMethod,true,s,n);if(v){eC(e,t,v,{flushSync:i});return}let g=td(l,p);let b=(n&&n.preventScrollReset)===true;if(h&&to(h.formMethod)){em(e,t,p,g,l,c.active,i,b,h);return}// Store off the match so we can call it's shouldRevalidate on subsequent
// revalidations
X.set(e,{routeId:t,path:p});eE(e,t,p,g,l,c.active,i,b,h)}// Call the action for the matched fetcher.submit(), and then handle redirects,
// errors, and revalidation
async function em(t,r,n,i,a,o,s,c,p){ek();X.delete(t);function h(e){if(!e.route.action&&!e.route.lazy){let e=e2(405,{method:p.formMethod,pathname:n,routeId:r});eC(t,r,e,{flushSync:s});return true}return false}if(!o&&h(i)){return}// Put this fetcher into it's submitting state
let v=P.fetchers.get(t);eT(t,tm(p,v),{flushSync:s});let g=new AbortController;let b=eV(e.history,n,g.signal,p);if(o){let e=await t_(a,new URL(b.url).pathname,b.signal,t);if(e.type==="aborted"){return}else if(e.type==="error"){eC(t,r,e.error,{flushSync:s});return}else if(!e.matches){eC(t,r,e2(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=td(a,n);if(h(i)){return}}}// Call the action for the fetcher
q.set(t,g);let y=H;let _=await eS("action",P,b,[i],a,t);let x=_[i.route.id];if(b.signal.aborted){// We can delete this so long as we weren't aborted by our own fetcher
// re-submit which would have put _new_ controller is in fetchControllers
if(q.get(t)===g){q.delete(t)}return}// When using v7_fetcherPersist, we don't want errors bubbling up to the UI
// or redirects processed for unmounted fetchers so we just revert them to
// idle
if(m.v7_fetcherPersist&&Q.has(t)){if(te(x)||e7(x)){eT(t,tg(undefined));return}// Let SuccessResult's fall through for revalidation
}else{if(te(x)){q.delete(t);if(V>y){// A new navigation was kicked off after our action started, so that
// should take precedence over this redirect navigation.  We already
// set isRevalidationRequired so all loaders for the new route should
// fire unless opted out via shouldRevalidate
eT(t,tg(undefined));return}else{G.add(t);eT(t,tv(p));return eZ(b,x,false,{fetcherSubmission:p,preventScrollReset:c})}}// Process any non-redirect errors thrown
if(e7(x)){eC(t,r,x.error);return}}if(e9(x)){throw e2(400,{type:"defer-action"})}// Start the data load for current matches, or the next location if we're
// in the middle of a navigation
let E=P.navigation.location||P.location;let Z=eV(e.history,E,g.signal);let S=d||u;let O=P.navigation.state!=="idle"?w(S,P.navigation.location,f):P.matches;l(O,"Didn't find any matches after fetcher action");let k=++H;$.set(t,k);let T=tv(p,x.data);P.fetchers.set(t,T);let[C,R]=eP(e.history,P,O,p,E,false,m.v7_skipActionErrorRevalidation,W,z,J,Q,X,G,S,f,[i.route.id,x]);// Put all revalidating fetchers into the loading state, except for the
// current fetcher which we want to keep in it's current loading state which
// contains it's action submission info + action data
R.filter(e=>e.key!==t).forEach(e=>{let t=e.key;let r=P.fetchers.get(t);let n=tv(undefined,r?r.data:undefined);P.fetchers.set(t,n);eF(t);if(e.controller){q.set(t,e.controller)}});ea({fetchers:new Map(P.fetchers)});let A=()=>R.forEach(e=>eF(e.key));g.signal.addEventListener("abort",A);let{loaderResults:M,fetcherResults:I}=await eO(P,O,C,R,Z);if(g.signal.aborted){return}g.signal.removeEventListener("abort",A);$.delete(t);q.delete(t);R.forEach(e=>q.delete(e.key));let F=e4(M);if(F){return eZ(Z,F.result,false,{preventScrollReset:c})}F=e4(I);if(F){// If this redirect came from a fetcher make sure we mark it in
// fetchRedirectIds so it doesn't get revalidated on the next set of
// loader executions
G.add(F.key);return eZ(Z,F.result,false,{preventScrollReset:c})}// Process and commit output from loaders
let{loaderData:N,errors:j}=eK(P,O,M,undefined,R,I,Y);// Since we let revalidations complete even if the submitting fetcher was
// deleted, only put it back to idle if it hasn't been deleted
if(P.fetchers.has(t)){let e=tg(x.data);P.fetchers.set(t,e)}ez(k);// If we are currently in a navigation loading state and this fetcher is
// more recent than the navigation, we want the newer data so abort the
// navigation and complete it with the fetcher data
if(P.navigation.state==="loading"&&k>V){l(D,"Expected pending action");L&&L.abort();eo(P.navigation.location,{matches:O,loaderData:N,errors:j,fetchers:new Map(P.fetchers)})}else{// otherwise just update with the fetcher data, preserving any existing
// loaderData for loaders that did not need to reload.  We have to
// manually merge here since we aren't going through completeNavigation
ea({errors:j,loaderData:eQ(P.loaderData,N,O,j),fetchers:new Map(P.fetchers)});W=false}}// Call the matched loader for fetcher.load(), handling redirects, errors, etc.
async function eE(t,r,n,i,a,o,s,u,c){let d=P.fetchers.get(t);eT(t,tv(c,d?d.data:undefined),{flushSync:s});let f=new AbortController;let p=eV(e.history,n,f.signal);if(o){let e=await t_(a,new URL(p.url).pathname,p.signal,t);if(e.type==="aborted"){return}else if(e.type==="error"){eC(t,r,e.error,{flushSync:s});return}else if(!e.matches){eC(t,r,e2(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=td(a,n)}}// Call the loader for this fetcher route match
q.set(t,f);let h=H;let v=await eS("loader",P,p,[i],a,t);let m=v[i.route.id];// Deferred isn't supported for fetcher loads, await everything and treat it
// as a normal load.  resolveDeferredData will return undefined if this
// fetcher gets aborted, so we just leave result untouched and short circuit
// below if that happens
if(e9(m)){m=await tl(m,p.signal,true)||m}// We can delete this so long as we weren't aborted by our our own fetcher
// re-load which would have put _new_ controller is in fetchControllers
if(q.get(t)===f){q.delete(t)}if(p.signal.aborted){return}// We don't want errors bubbling up or redirects followed for unmounted
// fetchers, so short circuit here if it was removed from the UI
if(Q.has(t)){eT(t,tg(undefined));return}// If the loader threw a redirect Response, start a new REPLACE navigation
if(te(m)){if(V>h){// A new navigation was kicked off after our loader started, so that
// should take precedence over this redirect navigation
eT(t,tg(undefined));return}else{G.add(t);await eZ(p,m,false,{preventScrollReset:u});return}}// Process any non-redirect errors thrown
if(e7(m)){eC(t,r,m.error);return}l(!e9(m),"Unhandled fetcher deferred data");// Put the fetcher back into an idle state
eT(t,tg(m.data))}/**
   * Utility function to handle redirects returned from an action or loader.
   * Normally, a redirect "replaces" the navigation that triggered it.  So, for
   * example:
   *
   *  - user is on /a
   *  - user clicks a link to /b
   *  - loader for /b redirects to /c
   *
   * In a non-JS app the browser would track the in-flight navigation to /b and
   * then replace it with /c when it encountered the redirect response.  In
   * the end it would only ever update the URL bar with /c.
   *
   * In client-side routing using pushState/replaceState, we aim to emulate
   * this behavior and we also do not update history until the end of the
   * navigation (including processed redirects).  This means that we never
   * actually touch history until we've processed redirects, so we just use
   * the history action from the original navigation (PUSH or REPLACE).
   */async function eZ(a,o,s,u){let{submission:c,fetcherSubmission:d,preventScrollReset:h,replace:v}=u===void 0?{}:u;if(o.response.headers.has("X-Remix-Revalidate")){W=true}let m=o.response.headers.get("Location");l(m,"Expected a Location header on the redirect Response");m=eH(m,new URL(a.url),f);let g=p(P.location,m,{_isRedirect:true});if(r){let r=false;if(o.response.headers.has("X-Remix-Reload-Document")){// Hard reload if the response contained X-Remix-Reload-Document
r=true}else if(ew.test(m)){const n=e.history.createURL(m);r=// Hard reload if it's an absolute URL to a new origin
n.origin!==t.location.origin||// Hard reload if it's an absolute URL that does not match our basename
U(n.pathname,f)==null}if(r){if(v){t.location.replace(m)}else{t.location.assign(m)}return}}// There's no need to abort on redirects, since we don't detect the
// redirect until the action/loaders have settled
L=null;let b=v===true||o.response.headers.has("X-Remix-Replace")?i.Replace:i.Push;// Use the incoming submission if provided, fallback on the active one in
// state.navigation
let{formMethod:y,formAction:_,formEncType:w}=P.navigation;if(!c&&!d&&y&&_&&w){c=tf(P.navigation)}// If this was a 307/308 submission we want to preserve the HTTP method and
// re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
// redirected location
let x=c||d;if(eg.has(o.response.status)&&x&&to(x.formMethod)){await el(b,g,{submission:n({},x,{formAction:m}),// Preserve these flags across redirects
preventScrollReset:h||I,enableViewTransition:s?F:undefined})}else{// If we have a navigation submission, we will preserve it through the
// redirect navigation
let e=tp(g,c);await el(b,g,{overrideNavigation:e,// Send fetcher submissions through for shouldRevalidate
fetcherSubmission:d,// Preserve these flags across redirects
preventScrollReset:h||I,enableViewTransition:s?F:undefined})}}// Utility wrapper for calling dataStrategy client-side without having to
// pass around the manifest, mapRouteProperties, etc.
async function eS(e,t,r,n,i,a){let u;let l={};try{u=await eW(h,e,t,r,n,i,a,s,o)}catch(e){// If the outer dataStrategy method throws, just return the error for all
// matches - and it'll naturally bubble to the root
n.forEach(t=>{l[t.route.id]={type:g.error,error:e}});return l}for(let[e,t]of Object.entries(u)){if(e8(t)){let n=t.result;l[e]={type:g.redirect,response:eq(n,r,e,i,f,m.v7_relativeSplatPath)}}else{l[e]=await eJ(t)}}return l}async function eO(t,r,n,i,a){let o=t.matches;// Kick off loaders and fetchers in parallel
let s=eS("loader",t,a,n,r,null);let u=Promise.all(i.map(async r=>{if(r.matches&&r.match&&r.controller){let n=await eS("loader",t,eV(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key);let i=n[r.match.route.id];// Fetcher results are keyed by fetcher key from here on out, not routeId
return{[r.key]:i}}else{return Promise.resolve({[r.key]:{type:g.error,error:e2(404,{pathname:r.path})}})}}));let l=await s;let c=(await u).reduce((e,t)=>Object.assign(e,t),{});await Promise.all([ts(r,l,a.signal,o,t.loaderData),tu(r,c,i)]);return{loaderResults:l,fetcherResults:c}}function ek(){// Every interruption triggers a revalidation
W=true;// Cancel pending route-level deferreds and mark cancelled routes for
// revalidation
z.push(...tt());// Abort in-flight fetcher loads
X.forEach((e,t)=>{if(q.has(t)){J.add(t)}eF(t)})}function eT(e,t,r){if(r===void 0){r={}}P.fetchers.set(e,t);ea({fetchers:new Map(P.fetchers)},{flushSync:(r&&r.flushSync)===true})}function eC(e,t,r,n){if(n===void 0){n={}}let i=e0(P.matches,t);eI(e);ea({errors:{[i.route.id]:r},fetchers:new Map(P.fetchers)},{flushSync:(n&&n.flushSync)===true})}function eM(e){K.set(e,(K.get(e)||0)+1);// If this fetcher was previously marked for deletion, unmark it since we
// have a new instance
if(Q.has(e)){Q.delete(e)}return P.fetchers.get(e)||ey}function eI(e){let t=P.fetchers.get(e);// Don't abort the controller if this is a deletion of a fetcher.submit()
// in it's loading phase since - we don't want to abort the corresponding
// revalidation and want them to complete and land
if(q.has(e)&&!(t&&t.state==="loading"&&$.has(e))){eF(e)}X.delete(e);$.delete(e);G.delete(e);// If we opted into the flag we can clear this now since we're calling
// deleteFetcher() at the end of updateState() and we've already handed the
// deleted fetcher keys off to the data layer.
// If not, we're eagerly calling deleteFetcher() and we need to keep this
// Set populated until the next updateState call, and we'll clear
// `deletedFetchers` then
if(m.v7_fetcherPersist){Q.delete(e)}J.delete(e);P.fetchers.delete(e)}function eL(e){let t=(K.get(e)||0)-1;if(t<=0){K.delete(e);Q.add(e);if(!m.v7_fetcherPersist){eI(e)}}else{K.set(e,t)}ea({fetchers:new Map(P.fetchers)})}function eF(e){let t=q.get(e);if(t){t.abort();q.delete(e)}}function ej(e){for(let t of e){let e=eM(t);let r=tg(e.data);P.fetchers.set(t,r)}}function eB(){let e=[];let t=false;for(let r of G){let n=P.fetchers.get(r);l(n,"Expected fetcher: "+r);if(n.state==="loading"){G.delete(r);e.push(r);t=true}}ej(e);return t}function ez(e){let t=[];for(let[r,n]of $){if(n<e){let e=P.fetchers.get(r);l(e,"Expected fetcher: "+r);if(e.state==="loading"){eF(r);$.delete(r);t.push(r)}}}ej(t);return t.length>0}function e$(e,t){let r=P.blockers.get(e)||e_;if(ee.get(e)!==t){ee.set(e,t)}return r}function eG(e){P.blockers.delete(e);ee.delete(e)}// Utility function to update blockers, ensuring valid state transitions
function eX(e,t){let r=P.blockers.get(e)||e_;// Poor mans state machine :)
// https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
l(r.state==="unblocked"&&t.state==="blocked"||r.state==="blocked"&&t.state==="blocked"||r.state==="blocked"&&t.state==="proceeding"||r.state==="blocked"&&t.state==="unblocked"||r.state==="proceeding"&&t.state==="unblocked","Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(P.blockers);n.set(e,t);ea({blockers:n})}function e3(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(ee.size===0){return}// We ony support a single active blocker at the moment since we don't have
// any compelling use cases for multi-blocker yet
if(ee.size>1){c(false,"A router only supports one blocker at a time")}let i=Array.from(ee.entries());let[a,o]=i[i.length-1];let s=P.blockers.get(a);if(s&&s.state==="proceeding"){// If the blocker is currently proceeding, we don't need to re-check
// it and can let this navigation continue
return}// At this point, we know we're unblocked/blocked so we need to check the
// user-provided blocker function
if(o({currentLocation:t,nextLocation:r,historyAction:n})){return a}}function e6(e){let t=e2(404,{pathname:e});let r=d||u;let{matches:n,route:i}=e1(r);// Cancel all pending deferred on 404s since we don't keep any routes
tt();return{notFoundMatches:n,route:i,error:t}}function tt(e){let t=[];Y.forEach((r,n)=>{if(!e||e(n)){// Cancel the deferred - but do not remove from activeDeferreds here -
// we rely on the subscribers to do that so our tests can assert proper
// cleanup via _internalActiveDeferreds
r.cancel();t.push(n);Y.delete(n)}});return t}// Opt in to capturing and reporting scroll positions during navigations,
// used by the <ScrollRestoration> component
function tr(e,t,r){Z=e;O=t;S=r||null;// Perform initial hydration scroll restoration, since we miss the boat on
// the initial updateState() because we've not yet rendered <ScrollRestoration/>
// and therefore have no savedScrollPositions available
if(!k&&P.navigation===eb){k=true;let e=ta(P.location,P.matches);if(e!=null){ea({restoreScrollPosition:e})}}return()=>{Z=null;O=null;S=null}}function tn(e,t){if(S){let r=S(e,t.map(e=>E(e,P.loaderData)));return r||e.key}return e.key}function ti(e,t){if(Z&&O){let r=tn(e,t);Z[r]=O()}}function ta(e,t){if(Z){let r=tn(e,t);let n=Z[r];if(typeof n==="number"){return n}}return null}function tc(e,t,r){if(v){if(!e){let e=x(t,r,f,true);return{active:true,matches:e||[]}}else{if(Object.keys(e[0].params).length>0){// If we matched a dynamic param or a splat, it might only be because
// we haven't yet discovered other routes that would match with a
// higher score.  Call patchRoutesOnNavigation just to be sure
let e=x(t,r,f,true);return{active:true,matches:e}}}}return{active:false,matches:null}}async function t_(e,t,r,n){if(!v){return{type:"success",matches:e}}let i=e;while(true){let e=d==null;let a=d||u;let l=s;try{await v({signal:r,path:t,matches:i,fetcherKey:n,patch:(e,t)=>{if(r.aborted)return;eN(e,t,a,l,o)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{// If we are not in the middle of an HMR revalidation and we changed the
// routes, provide a new identity so when we `updateState` at the end of
// this navigation/fetch `router.routes` will be a new identity and
// trigger a re-run of memoized `router.routes` dependencies.
// HMR will already update the identity and reflow when it lands
// `inFlightDataRoutes` in `completeNavigation`
if(e&&!r.aborted){u=[...u]}}if(r.aborted){return{type:"aborted"}}let c=w(a,t,f);if(c){return{type:"success",matches:c}}let p=x(a,t,f,true);// Avoid loops if the second pass results in the same partial matches
if(!p||i.length===p.length&&i.every((e,t)=>e.route.id===p[t].route.id)){return{type:"success",matches:null}}i=p}}function tw(e){s={};d=_(e,o,undefined,s)}function tx(e,t){let r=d==null;let n=d||u;eN(e,t,n,s,o);// If we are not in the middle of an HMR revalidation and we changed the
// routes, provide a new identity and trigger a reflow via `updateState`
// to re-run memoized `router.routes` dependencies.
// HMR will already update the identity and reflow when it lands
// `inFlightDataRoutes` in `completeNavigation`
if(r){u=[...u];ea({})}}M={get basename(){return f},get future(){return m},get state(){return P},get routes(){return u},get window(){return t},initialize:er,subscribe:ei,enableScrollRestoration:tr,navigate:es,fetch:ev,revalidate:eu,// Passthrough to history-aware createHref used by useHref so we get proper
// hash-aware URLs in DOM paths
createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eM,deleteFetcher:eL,dispose:en,getBlocker:e$,deleteBlocker:eG,patchRoutes:tx,_internalFetchControllers:q,_internalActiveDeferreds:Y,// TODO: Remove setRoutes, it's temporary to avoid dealing with
// updating the tree while validating the update algorithm.
_internalSetRoutes:tw};return M}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createStaticHandler
////////////////////////////////////////////////////////////////////////////////
const eS=Symbol("deferred");function eO(e,t){l(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={};let i=(t?t.basename:null)||"/";let a;if(t!=null&&t.mapRouteProperties){a=t.mapRouteProperties}else if(t!=null&&t.detectErrorBoundary){// If they are still using the deprecated version, wrap it with the new API
let e=t.detectErrorBoundary;a=t=>({hasErrorBoundary:e(t)})}else{a=ex}// Config driven behavior flags
let o=n({v7_relativeSplatPath:false,v7_throwAbortReason:false},t?t.future:null);let s=_(e,a,undefined,r);/**
   * The query() method is intended for document requests, in which we want to
   * call an optional action and potentially multiple loaders for all nested
   * routes.  It returns a StaticHandlerContext object, which is very similar
   * to the router state (location, loaderData, actionData, errors, etc.) and
   * also adds SSR-specific information such as the statusCode and headers
   * from action/loaders Responses.
   *
   * It _should_ never throw and should report all errors through the
   * returned context.errors object, properly associating errors to their error
   * boundary.  Additionally, it tracks _deepestRenderedBoundaryId which can be
   * used to emulate React error boundaries during SSr by performing a second
   * pass only down to the boundaryId.
   *
   * The one exception where we do not return a StaticHandlerContext is when a
   * redirect response is returned or thrown from any action/loader.  We
   * propagate that out and return the raw Response so the HTTP server can
   * return it directly.
   *
   * - `opts.requestContext` is an optional server context that will be passed
   *   to actions/loaders in the `context` parameter
   * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent
   *   the bubbling of errors which allows single-fetch-type implementations
   *   where the client will handle the bubbling and we may need to return data
   *   for the handling route
   */async function u(e,t){let{requestContext:r,skipLoaderErrorBubbling:a,dataStrategy:o}=t===void 0?{}:t;let u=new URL(e.url);let l=e.method;let c=p("",h(u),null,"default");let f=w(s,c,i);// SSR supports HEAD requests while SPA doesn't
if(!ta(l)&&l!=="HEAD"){let e=e2(405,{method:l});let{matches:t,route:r}=e1(s);return{basename:i,location:c,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!f){let e=e2(404,{pathname:c.pathname});let{matches:t,route:r}=e1(s);return{basename:i,location:c,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let v=await d(e,c,f,r,o||null,a===true,null);if(tn(v)){return v}// When returning StaticHandlerContext, we patch back in the location here
// since we need it for React Context.  But this helps keep our submit and
// loadRouteData operating on a Request instead of a Location
return n({location:c,basename:i},v)}/**
   * The queryRoute() method is intended for targeted route requests, either
   * for fetch ?_data requests or resource route requests.  In this case, we
   * are only ever calling a single action or loader, and we are returning the
   * returned value directly.  In most cases, this will be a Response returned
   * from the action/loader, but it may be a primitive or other value as well -
   * and in such cases the calling context should handle that accordingly.
   *
   * We do respect the throw/return differentiation, so if an action/loader
   * throws, then this method will throw the value.  This is important so we
   * can do proper boundary identification in Remix where a thrown Response
   * must go to the Catch Boundary but a returned Response is happy-path.
   *
   * One thing to note is that any Router-initiated Errors that make sense
   * to associate with a status code will be thrown as an ErrorResponse
   * instance which include the raw Error, such that the calling context can
   * serialize the error as they see fit while including the proper response
   * code.  Examples here are 404 and 405 errors that occur prior to reaching
   * any user-defined loaders.
   *
   * - `opts.routeId` allows you to specify the specific route handler to call.
   *   If not provided the handler will determine the proper route by matching
   *   against `request.url`
   * - `opts.requestContext` is an optional server context that will be passed
   *    to actions/loaders in the `context` parameter
   */async function c(e,t){let{routeId:r,requestContext:n,dataStrategy:a}=t===void 0?{}:t;let o=new URL(e.url);let u=e.method;let l=p("",h(o),null,"default");let c=w(s,l,i);// SSR supports HEAD requests while SPA doesn't
if(!ta(u)&&u!=="HEAD"&&u!=="OPTIONS"){throw e2(405,{method:u})}else if(!c){throw e2(404,{pathname:l.pathname})}let f=r?c.find(e=>e.route.id===r):td(c,l);if(r&&!f){throw e2(403,{pathname:l.pathname,routeId:r})}else if(!f){// This should never hit I don't think?
throw e2(404,{pathname:l.pathname})}let v=await d(e,l,c,n,a||null,false,f);if(tn(v)){return v}let m=v.errors?Object.values(v.errors)[0]:undefined;if(m!==undefined){// If we got back result.errors, that means the loader/action threw
// _something_ that wasn't a Response, but it's not guaranteed/required
// to be an `instanceof Error` either, so we have to use throw here to
// preserve the "error" state outside of queryImpl.
throw m}// Pick off the right state value to return
if(v.actionData){return Object.values(v.actionData)[0]}if(v.loaderData){var g;let e=Object.values(v.loaderData)[0];if((g=v.activeDeferreds)!=null&&g[f.route.id]){e[eS]=v.activeDeferreds[f.route.id]}return e}return undefined}async function d(e,t,r,i,a,o,s){l(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(to(e.method.toLowerCase())){let n=await f(e,r,s||td(r,t),i,a,o,s!=null);return n}let u=await v(e,r,i,a,o,s);return tn(u)?u:n({},u,{actionData:null,actionHeaders:{}})}catch(e){// If the user threw/returned a Response in callLoaderOrAction for a
// `queryRoute` call, we throw the `DataStrategyResult` to bail out early
// and then return or throw the raw Response here accordingly
if(e6(e)&&tn(e.result)){if(e.type===g.error){throw e.result}return e.result}// Redirects are always returned since they don't propagate to catch
// boundaries
if(ti(e)){return e}throw e}}async function f(e,t,r,i,a,s,u){let l;if(!r.route.action&&!r.route.lazy){let t=e2(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:r.route.id});if(u){throw t}l={type:g.error,error:t}}else{let n=await m("action",e,[r],t,u,i,a);l=n[r.route.id];if(e.signal.aborted){eT(e,u,o)}}if(te(l)){// Uhhhh - this should never happen, we should always throw these from
// callLoaderOrAction, but the type narrowing here keeps TS happy and we
// can get back on the "throw all redirect responses" train here should
// this ever happen :/
throw new Response(null,{status:l.response.status,headers:{Location:l.response.headers.get("Location")}})}if(e9(l)){let e=e2(400,{type:"defer-action"});if(u){throw e}l={type:g.error,error:e}}if(u){// Note: This should only be non-Response values if we get here, since
// isRouteRequest should throw any Response received in callLoaderOrAction
if(e7(l)){throw l.error}return{matches:[r],loaderData:{},actionData:{[r.route.id]:l.data},errors:null,// Note: statusCode + headers are unused here since queryRoute will
// return the raw Response or value
statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}// Create a GET request for the loaders
let c=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(e7(l)){// Store off the pending error - we use it to determine which loaders
// to call and will commit it when we complete the navigation
let e=s?r:e0(t,r.route.id);let o=await v(c,t,i,a,s,null,[e.route.id,l]);// action status codes take precedence over loader status codes
return n({},o,{statusCode:ed(l.error)?l.error.status:l.statusCode!=null?l.statusCode:500,actionData:null,actionHeaders:n({},l.headers?{[r.route.id]:l.headers}:{})})}let d=await v(c,t,i,a,s,null);return n({},d,{actionData:{[r.route.id]:l.data}},l.statusCode?{statusCode:l.statusCode}:{},{actionHeaders:l.headers?{[r.route.id]:l.headers}:{}})}async function v(e,t,r,i,a,s,u){let l=s!=null;// Short circuit if we have no loaders to run (queryRoute())
if(l&&!(s!=null&&s.route.loader)&&!(s!=null&&s.route.lazy)){throw e2(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:s==null?void 0:s.route.id})}let c=s?[s]:u&&e7(u[1])?eM(t,u[0]):t;let d=c.filter(e=>e.route.loader||e.route.lazy);// Short circuit if we have no loaders to run (query())
if(d.length===0){return{matches:t,// Add a null for all matched routes for proper revalidation on the client
loaderData:t.reduce((e,t)=>Object.assign(e,{[t.route.id]:null}),{}),errors:u&&e7(u[1])?{[u[0]]:u[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null}}let f=await m("loader",e,d,t,l,r,i);if(e.signal.aborted){eT(e,l,o)}// Process and commit output from loaders
let p=new Map;let h=eX(t,f,u,p,a);// Add a null for any non-loader matches for proper revalidation on the client
let v=new Set(d.map(e=>e.route.id));t.forEach(e=>{if(!v.has(e.route.id)){h.loaderData[e.route.id]=null}});return n({},h,{matches:t,activeDeferreds:p.size>0?Object.fromEntries(p.entries()):null})}// Utility wrapper for calling dataStrategy server-side without having to
// pass around the manifest, mapRouteProperties, etc.
async function m(e,t,n,s,u,l,c){let d=await eW(c||eU,e,null,t,n,s,null,r,a,l);let f={};await Promise.all(s.map(async e=>{if(!(e.route.id in d)){return}let r=d[e.route.id];if(e8(r)){let n=r.result;// Throw redirects and let the server handle them with an HTTP redirect
throw eq(n,t,e.route.id,s,i,o.v7_relativeSplatPath)}if(tn(r.result)&&u){// For SSR single-route requests, we want to hand Responses back
// directly without unwrapping
throw r}f[e.route.id]=await eJ(r)}));return f}return{dataRoutes:s,query:u,queryRoute:c}}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Helpers
////////////////////////////////////////////////////////////////////////////////
/**
 * Given an existing StaticHandlerContext and an error thrown at render time,
 * provide an updated StaticHandlerContext suitable for a second SSR render
 */function ek(e,t,r){let i=n({},t,{statusCode:ed(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}});return i}function eT(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==undefined){throw e.signal.reason}let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function eC(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==undefined)}function eR(e,t,r,n,i,a,o,s){let u;let l;if(o){// Grab matches up to the calling route so our route-relative logic is
// relative to the correct source route
u=[];for(let e of t){u.push(e);if(e.route.id===o){l=e;break}}}else{u=t;l=t[t.length-1]}// Resolve the relative path
let c=V(i?i:".",H(u,a),U(e.pathname,r)||e.pathname,s==="path");// When `to` is not specified we inherit search/hash from the current
// location, unlike when to="." and we just inherit the path.
// See https://github.com/remix-run/remix/issues/927
if(i==null){c.search=e.search;c.hash=e.hash}// Account for `?index` params when routing to the current location
if((i==null||i===""||i===".")&&l){let e=tc(c.search);if(l.route.index&&!e){// Add one when we're targeting an index route
c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"}else if(!l.route.index&&e){// Remove existing ones when we're not
let e=new URLSearchParams(c.search);let t=e.getAll("index");e.delete("index");t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}// If we're operating within a basename, prepend it to the pathname.  If
// this is a root navigation, then just use the raw basename which allows
// the basename to have full control over the presence of a trailing slash
// on root actions
if(n&&r!=="/"){c.pathname=c.pathname==="/"?r:G([r,c.pathname])}return h(c)}// Normalize navigation options by converting formMethod=GET formData objects to
// URLSearchParams so they behave identically to links with query params
function eA(e,t,r,n){// Return location verbatim on non-submission navigations
if(!n||!eC(n)){return{path:r}}if(n.formMethod&&!ta(n.formMethod)){return{path:r,error:e2(405,{method:n.formMethod})}}let i=()=>({path:r,error:e2(400,{type:"invalid-body"})});// Create a Submission on non-GET navigations
let a=n.formMethod||"get";let o=e?a.toUpperCase():a.toLowerCase();let s=e3(r);if(n.body!==undefined){if(n.formEncType==="text/plain"){// text only support POST/PUT/PATCH/DELETE submissions
if(!to(o)){return i()}let e=typeof n.body==="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:undefined,json:undefined,text:e}}}else if(n.formEncType==="application/json"){// json only supports POST/PUT/PATCH/DELETE submissions
if(!to(o)){return i()}try{let e=typeof n.body==="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:undefined,json:e,text:undefined}}}catch(e){return i()}}}l(typeof FormData==="function","FormData is not available in this environment");let u;let c;if(n.formData){u=e$(n.formData);c=n.formData}else if(n.body instanceof FormData){u=e$(n.body);c=n.body}else if(n.body instanceof URLSearchParams){u=n.body;c=eG(u)}else if(n.body==null){u=new URLSearchParams;c=new FormData}else{try{u=new URLSearchParams(n.body);c=eG(u)}catch(e){return i()}}let d={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:undefined,text:undefined};if(to(d.formMethod)){return{path:r,submission:d}}// Flatten submission onto URLSearchParams for GET submissions
let f=v(r);// On GET navigation submissions we can drop the ?index param from the
// resulting location since all loaders will run.  But fetcher GET submissions
// only run a single loader so we need to preserve any incoming ?index params
if(t&&f.search&&tc(f.search)){u.append("index","")}f.search="?"+u;return{path:h(f),submission:d}}// Filter out all routes at/below any caught error as they aren't going to
// render so we don't need to load them
function eM(e,t,r){if(r===void 0){r=false}let n=e.findIndex(e=>e.route.id===t);if(n>=0){return e.slice(0,r?n+1:n)}return e}function eP(e,t,r,i,a,o,s,u,l,c,d,f,p,h,v,m){let g=m?e7(m[1])?m[1].error:m[1].data:undefined;let b=e.createURL(t.location);let y=e.createURL(a);// Pick navigation matches that are net-new or qualify for revalidation
let _=r;if(o&&t.errors){// On initial hydration, only consider matches up to _and including_ the boundary.
// This is inclusive to handle cases where a server loader ran successfully,
// a child server loader bubbled up to this route, but this route has
// `clientLoader.hydrate` so we want to still run the `clientLoader` so that
// we have a complete version of `loaderData`
_=eM(r,Object.keys(t.errors)[0],true)}else if(m&&e7(m[1])){// If an action threw an error, we call loaders up to, but not including the
// boundary
_=eM(r,m[0])}// Don't revalidate loaders by default after action 4xx/5xx responses
// when the flag is enabled.  They can still opt-into revalidation via
// `shouldRevalidate` via `actionResult`
let x=m?m[1].statusCode:undefined;let E=s&&x&&x>=400;let Z=_.filter((e,r)=>{let{route:a}=e;if(a.lazy){// We haven't loaded this route yet so we don't know if it's got a loader!
return true}if(a.loader==null){return false}if(o){return eD(a,t.loaderData,t.errors)}// Always call the loader on new route instances and pending defer cancellations
if(eI(t.loaderData,t.matches[r],e)||l.some(t=>t===e.route.id)){return true}// This is the default implementation for when we revalidate.  If the route
// provides it's own implementation, then we give them full control but
// provide this value so they can leverage it if needed after they check
// their own specific use cases
let s=t.matches[r];let c=e;return eF(e,n({currentUrl:b,currentParams:s.params,nextUrl:y,nextParams:c.params},i,{actionResult:g,actionStatus:x,defaultShouldRevalidate:E?false:// Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
u||b.pathname+b.search===y.pathname+y.search||// Search params affect all loaders
b.search!==y.search||eL(s,c)}))});// Pick fetcher.loads that need to be revalidated
let S=[];f.forEach((e,a)=>{// Don't revalidate:
//  - on initial hydration (shouldn't be any fetchers then anyway)
//  - if fetcher won't be present in the subsequent render
//    - no longer matches the URL (v7_fetcherPersist=false)
//    - was unmounted but persisted due to v7_fetcherPersist=true
if(o||!r.some(t=>t.route.id===e.routeId)||d.has(a)){return}let s=w(h,e.path,v);// If the fetcher path no longer matches, push it in with null matches so
// we can trigger a 404 in callLoadersAndMaybeResolveData.  Note this is
// currently only a use-case for Remix HMR where the route tree can change
// at runtime and remove a route previously loaded via a fetcher
if(!s){S.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}// Revalidating fetchers are decoupled from the route matches since they
// load from a static href.  They revalidate based on explicit revalidation
// (submission, useRevalidator, or X-Remix-Revalidate)
let l=t.fetchers.get(a);let f=td(s,e.path);let m=false;if(p.has(a)){// Never trigger a revalidation of an actively redirecting fetcher
m=false}else if(c.has(a)){// Always mark for revalidation if the fetcher was cancelled
c.delete(a);m=true}else if(l&&l.state!=="idle"&&l.data===undefined){// If the fetcher hasn't ever completed loading yet, then this isn't a
// revalidation, it would just be a brand new load if an explicit
// revalidation is required
m=u}else{// Otherwise fall back on any user-defined shouldRevalidate, defaulting
// to explicit revalidations only
m=eF(f,n({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},i,{actionResult:g,actionStatus:x,defaultShouldRevalidate:E?false:u}))}if(m){S.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}});return[Z,S]}function eD(e,t,r){// We dunno if we have a loader - gotta find out!
if(e.lazy){return true}// No loader, nothing to initialize
if(!e.loader){return false}let n=t!=null&&t[e.id]!==undefined;let i=r!=null&&r[e.id]!==undefined;// Don't run if we error'd during SSR
if(!n&&i){return false}// Explicitly opting-in to running on hydration
if(typeof e.loader==="function"&&e.loader.hydrate===true){return true}// Otherwise, run if we're not yet initialized with anything
return!n&&!i}function eI(e,t,r){let n=// [a] -> [a, b]
!t||// [a, b] -> [a, c]
r.route.id!==t.route.id;// Handle the case that we don't have data for a re-used route, potentially
// from a prior error or from a cancelled pending deferred
let i=e[r.route.id]===undefined;// Always load if this is a net-new route or we don't yet have data
return n||i}function eL(e,t){let r=e.route.path;return(// param change for this match, /users/123 -> /users/456
e.pathname!==t.pathname||// splat param changed, which is not present in match.path
// e.g. /files/images/avatar.jpg -> files/finances.xls
r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"])}function eF(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r==="boolean"){return r}}return t.defaultShouldRevalidate}function eN(e,t,r,n,i){var a;let o;if(e){let t=n[e];l(t,"No route found to patch children into: routeId = "+e);if(!t.children){t.children=[]}o=t.children}else{o=r}// Don't patch in routes we already know about so that `patch` is idempotent
// to simplify user-land code. This is useful because we re-call the
// `patchRoutesOnNavigation` function for matched routes with params.
let s=t.filter(e=>!o.some(t=>ej(e,t)));let u=_(s,i,[e||"_","patch",String(((a=o)==null?void 0:a.length)||"0")],n);o.push(...u)}function ej(e,t){// Most optimal check is by id
if("id"in e&&"id"in t&&e.id===t.id){return true}// Second is by pathing differences
if(!(e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive)){return false}// Pathless layout routes are trickier since we need to check children.
// If they have no children then they're the same as far as we can tell
if((!e.children||e.children.length===0)&&(!t.children||t.children.length===0)){return true}// Otherwise, we look to see if every child in the new route is already
// represented in the existing route's children
return e.children.every((e,r)=>{var n;return(n=t.children)==null?void 0:n.some(t=>ej(e,t))})}/**
 * Execute route.lazy() methods to lazily load route modules (loader, action,
 * shouldRevalidate) and update the routeManifest in place which shares objects
 * with dataRoutes so those get updated as well.
 */async function eB(e,t,r){if(!e.lazy){return}let i=await e.lazy();// If the lazy route function was executed and removed by another parallel
// call then we can return - first lazy() to finish wins because the return
// value of lazy is expected to be static
if(!e.lazy){return}let a=r[e.id];l(a,"No route found in manifest");// Update the route in place.  This should be safe because there's no way
// we could yet be sitting on this route as we can't get there without
// resolving lazy() first.
//
// This is different than the HMR "update" use-case where we may actively be
// on the route being updated.  The main concern boils down to "does this
// mutation affect any ongoing navigations or any current state.matches
// values?".  If not, it should be safe to update in place.
let o={};for(let e in i){let t=a[e];let r=t!==undefined&&// This property isn't static since it should always be updated based
// on the route updates
e!=="hasErrorBoundary";c(!r,'Route "'+a.id+'" has a static property "'+e+'" '+"defined but its lazy function is also returning a value for this property. "+('The lazy route property "'+e+'" will be ignored.'));if(!r&&!b.has(e)){o[e]=i[e]}}// Mutate the route with the provided updates.  Do this first so we pass
// the updated version to mapRouteProperties
Object.assign(a,o);// Mutate the `hasErrorBoundary` property on the route based on the route
// updates and remove the `lazy` function so we don't resolve the lazy
// route again.
Object.assign(a,n({},t(a),{lazy:undefined}))}// Default implementation of `dataStrategy` which fetches all loaders in parallel
async function eU(e){let{matches:t}=e;let r=t.filter(e=>e.shouldLoad);let n=await Promise.all(r.map(e=>e.resolve()));return n.reduce((e,t,n)=>Object.assign(e,{[r[n].route.id]:t}),{})}async function eW(e,t,r,i,a,o,s,u,l,c){let d=o.map(e=>e.route.lazy?eB(e.route,l,u):undefined);let f=o.map((e,r)=>{let o=d[r];let s=a.some(t=>t.route.id===e.route.id);// `resolve` encapsulates route.lazy(), executing the loader/action,
// and mapping return values/thrown errors to a `DataStrategyResult`.  Users
// can pass a callback to take fine-grained control over the execution
// of the loader/action
let u=async r=>{if(r&&i.method==="GET"&&(e.route.lazy||e.route.loader)){s=true}return s?ez(t,i,e,o,r,c):Promise.resolve({type:g.data,result:undefined})};return n({},e,{shouldLoad:s,resolve:u})});// Send all matches here to allow for a middleware-type implementation.
// handler will be a no-op for unneeded routes and we filter those results
// back out below.
let p=await e({matches:f,request:i,params:o[0].params,fetcherKey:s,context:c});// Wait for all routes to load here but 'swallow the error since we want
// it to bubble up from the `await loadRoutePromise` in `callLoaderOrAction` -
// called from `match.resolve()`
try{await Promise.all(d)}catch(e){// No-op
}return p}// Default logic for calling a loader/action is the user has no specified a dataStrategy
async function ez(e,t,r,n,i,a){let o;let s;let u=n=>{// Setup a promise we can race against so that abort signals short circuit
let o;// This will never resolve so safe to type it as Promise<DataStrategyResult> to
// satisfy the function return value
let u=new Promise((e,t)=>o=t);s=()=>o();t.signal.addEventListener("abort",s);let l=i=>{if(typeof n!=="function"){return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]")))}return n({request:t,params:r.params,context:a},...i!==undefined?[i]:[])};let c=(async()=>{try{let e=await (i?i(e=>l(e)):l());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,u])};try{let i=r.route[e];// If we have a route.lazy promise, await that first
if(n){if(i){// Run statically defined handler in parallel with lazy()
let e;let[t]=await Promise.all([// If the handler throws, don't let it immediately bubble out,
// since we need to let the lazy() execution finish so we know if this
// route has a boundary that can handle the error
u(i).catch(t=>{e=t}),n]);if(e!==undefined){throw e}o=t}else{// Load lazy route module, then run any returned handler
await n;i=r.route[e];if(i){// Handler still runs even if we got interrupted to maintain consistency
// with un-abortable behavior of handler execution on non-lazy or
// previously-lazy-loaded routes
o=await u(i)}else if(e==="action"){let e=new URL(t.url);let n=e.pathname+e.search;throw e2(405,{method:t.method,pathname:n,routeId:r.route.id})}else{// lazy() route has no loader to run.  Short circuit here so we don't
// hit the invariant below that errors on returning undefined.
return{type:g.data,result:undefined}}}}else if(!i){let e=new URL(t.url);let r=e.pathname+e.search;throw e2(404,{pathname:r})}else{o=await u(i)}l(o.result!==undefined,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(e){// We should already be catching and converting normal handler executions to
// DataStrategyResults and returning them, so anything that throws here is an
// unexpected error we still need to wrap
return{type:g.error,result:e}}finally{if(s){t.signal.removeEventListener("abort",s)}}return o}async function eJ(e){let{result:t,type:r}=e;if(tn(t)){let e;try{let r=t.headers.get("Content-Type");// Check between word boundaries instead of startsWith() due to the last
// paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
if(r&&/\bapplication\/json\b/.test(r)){if(t.body==null){e=null}else{e=await t.json()}}else{e=await t.text()}}catch(e){return{type:g.error,error:e}}if(r===g.error){return{type:g.error,error:new ec(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}}return{type:g.data,data:e,statusCode:t.status,headers:t.headers}}if(r===g.error){if(tt(t)){var n,i;if(t.data instanceof Error){var a,o;return{type:g.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):undefined}}// Convert thrown data() to ErrorResponse instances
return{type:g.error,error:new ec(((n=t.init)==null?void 0:n.status)||500,undefined,t.data),statusCode:ed(t)?t.status:undefined,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):undefined}}return{type:g.error,error:t,statusCode:ed(t)?t.status:undefined}}if(tr(t)){var s,u;return{type:g.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(tt(t)){var l,c;return{type:g.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(c=t.init)!=null&&c.headers?new Headers(t.init.headers):undefined}}return{type:g.data,data:t}}// Support relative routing in internal redirects
function eq(e,t,r,n,i,a){let o=e.headers.get("Location");l(o,"Redirects returned/thrown from loaders/actions must have a Location header");if(!ew.test(o)){let s=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=eR(new URL(t.url),s,i,true,o,a);e.headers.set("Location",o)}return e}function eH(e,t,r){if(ew.test(e)){// Strip off the protocol+origin for same-origin + same-basename absolute redirects
let n=e;let i=n.startsWith("//")?new URL(t.protocol+n):new URL(n);let a=U(i.pathname,r)!=null;if(i.origin===t.origin&&a){return i.pathname+i.search+i.hash}}return e}// Utility method for creating the Request instances for loaders/actions during
// client-side navigations and fetches.  During SSR we will always have a
// Request instance from the static handler (query/queryRoute)
function eV(e,t,r,n){let i=e.createURL(e3(t)).toString();let a={signal:r};if(n&&to(n.formMethod)){let{formMethod:e,formEncType:t}=n;// Didn't think we needed this but it turns out unlike other methods, patch
// won't be properly normalized to uppercase and results in a 405 error.
// See: https://fetch.spec.whatwg.org/#concept-method
a.method=e.toUpperCase();if(t==="application/json"){a.headers=new Headers({"Content-Type":t});a.body=JSON.stringify(n.json)}else if(t==="text/plain"){// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=n.text}else if(t==="application/x-www-form-urlencoded"&&n.formData){// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=e$(n.formData)}else{// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=n.formData}}return new Request(i,a)}function e$(e){let t=new URLSearchParams;for(let[r,n]of e.entries()){// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
t.append(r,typeof n==="string"?n:n.name)}return t}function eG(e){let t=new FormData;for(let[r,n]of e.entries()){t.append(r,n)}return t}function eX(e,t,r,n,i){// Fill in loaderData/errors from our loaders
let a={};let o=null;let s;let u=false;let c={};let d=r&&e7(r[1])?r[1].error:undefined;// Process loader results into state.loaderData/state.errors
e.forEach(r=>{if(!(r.route.id in t)){return}let f=r.route.id;let p=t[f];l(!te(p),"Cannot handle redirect results in processLoaderData");if(e7(p)){let t=p.error;// If we have a pending action error, we report it at the highest-route
// that throws a loader error, and then clear it out to indicate that
// it was consumed
if(d!==undefined){t=d;d=undefined}o=o||{};if(i){o[f]=t}else{// Look upwards from the matched route for the closest ancestor error
// boundary, defaulting to the root match.  Prefer higher error values
// if lower errors bubble to the same boundary
let r=e0(e,f);if(o[r.route.id]==null){o[r.route.id]=t}}// Clear our any prior loaderData for the throwing route
a[f]=undefined;// Once we find our first (highest) error, we set the status code and
// prevent deeper status codes from overriding
if(!u){u=true;s=ed(p.error)?p.error.status:500}if(p.headers){c[f]=p.headers}}else{if(e9(p)){n.set(f,p.deferredData);a[f]=p.deferredData.data;// Error status codes always override success status codes, but if all
// loaders are successful we take the deepest status code.
if(p.statusCode!=null&&p.statusCode!==200&&!u){s=p.statusCode}if(p.headers){c[f]=p.headers}}else{a[f]=p.data;// Error status codes always override success status codes, but if all
// loaders are successful we take the deepest status code.
if(p.statusCode&&p.statusCode!==200&&!u){s=p.statusCode}if(p.headers){c[f]=p.headers}}}});// If we didn't consume the pending action error (i.e., all loaders
// resolved), then consume it here.  Also clear out any loaderData for the
// throwing route
if(d!==undefined&&r){o={[r[0]]:d};a[r[0]]=undefined}return{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function eK(e,t,r,i,a,o,s){let{loaderData:u,errors:c}=eX(t,r,i,s,false// This method is only called client side so we always want to bubble
);// Process results from our revalidating fetchers
a.forEach(t=>{let{key:r,match:i,controller:a}=t;let s=o[r];l(s,"Did not find corresponding fetcher result");// Process fetcher non-redirect errors
if(a&&a.signal.aborted){// Nothing to do for aborted fetchers
return}else if(e7(s)){let t=e0(e.matches,i==null?void 0:i.route.id);if(!(c&&c[t.route.id])){c=n({},c,{[t.route.id]:s.error})}e.fetchers.delete(r)}else if(te(s)){// Should never get here, redirects should get processed above, but we
// keep this to type narrow to a success result in the else
l(false,"Unhandled fetcher revalidation redirect")}else if(e9(s)){// Should never get here, deferred data should be awaited for fetchers
// in resolveDeferredResults
l(false,"Unhandled fetcher deferred data")}else{let t=tg(s.data);e.fetchers.set(r,t)}});return{loaderData:u,errors:c}}function eQ(e,t,r,i){let a=n({},t);for(let n of r){let r=n.route.id;if(t.hasOwnProperty(r)){if(t[r]!==undefined){a[r]=t[r]}}else if(e[r]!==undefined&&n.route.loader){// Preserve existing keys not included in newLoaderData and where a loader
// wasn't removed by HMR
a[r]=e[r]}if(i&&i.hasOwnProperty(r)){break}}return a}function eY(e){if(!e){return{}}return e7(e[1])?{// Clear out prior actionData on errors
actionData:{}}:{actionData:{[e[0]]:e[1].data}}}// Find the nearest error boundary, looking upwards from the leaf route (or the
// route specified by routeId) for the closest ancestor error boundary,
// defaulting to the root match
function e0(e,t){let r=t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e];return r.reverse().find(e=>e.route.hasErrorBoundary===true)||e[0]}function e1(e){// Prefer a root layout route if present, otherwise shim in a route object
let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function e2(e,t){let{pathname:r,routeId:n,method:i,type:a,message:o}=t===void 0?{}:t;let s="Unknown Server Error";let u="Unknown @remix-run/router error";if(e===400){s="Bad Request";if(i&&r&&n){u="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request."}else if(a==="defer-action"){u="defer() is not supported in actions"}else if(a==="invalid-body"){u="Unable to encode submission body"}}else if(e===403){s="Forbidden";u='Route "'+n+'" does not match URL "'+r+'"'}else if(e===404){s="Not Found";u='No route matches URL "'+r+'"'}else if(e===405){s="Method Not Allowed";if(i&&r&&n){u="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request."}else if(i){u='Invalid request method "'+i.toUpperCase()+'"'}}return new ec(e||500,s,new Error(u),true)}// Find any returned redirect errors, starting from the lowest match
function e4(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(te(n)){return{key:r,result:n}}}}function e3(e){let t=typeof e==="string"?v(e):e;return h(n({},t,{hash:""}))}function e5(e,t){if(e.pathname!==t.pathname||e.search!==t.search){return false}if(e.hash===""){// /page -> /page#hash
return t.hash!==""}else if(e.hash===t.hash){// /page#hash -> /page#hash
return true}else if(t.hash!==""){// /page#hash -> /page#other
return true}// If the hash is removed the browser will re-perform a request to the server
// /page#hash -> /page
return false}function e6(e){return e!=null&&typeof e==="object"&&"type"in e&&"result"in e&&(e.type===g.data||e.type===g.error)}function e8(e){return tn(e.result)&&em.has(e.result.status)}function e9(e){return e.type===g.deferred}function e7(e){return e.type===g.error}function te(e){return(e&&e.type)===g.redirect}function tt(e){return typeof e==="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function tr(e){let t=e;return t&&typeof t==="object"&&typeof t.data==="object"&&typeof t.subscribe==="function"&&typeof t.cancel==="function"&&typeof t.resolveData==="function"}function tn(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.headers==="object"&&typeof e.body!=="undefined"}function ti(e){if(!tn(e)){return false}let t=e.status;let r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function ta(e){return ev.has(e.toLowerCase())}function to(e){return ep.has(e.toLowerCase())}async function ts(e,t,r,n,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,u]=a[o];let l=e.find(e=>(e==null?void 0:e.route.id)===s);// If we don't have a match, then we can have a deferred result to do
// anything with.  This is for revalidating fetchers where the route was
// removed during HMR
if(!l){continue}let c=n.find(e=>e.route.id===l.route.id);let d=c!=null&&!eL(c,l)&&(i&&i[l.route.id])!==undefined;if(e9(u)&&d){// Note: we do not have to touch activeDeferreds here since we race them
// against the signal in resolveDeferredData and they'll get aborted
// there if needed
await tl(u,r,false).then(e=>{if(e){t[s]=e}})}}}async function tu(e,t,r){for(let n=0;n<r.length;n++){let{key:i,routeId:a,controller:o}=r[n];let s=t[i];let u=e.find(e=>(e==null?void 0:e.route.id)===a);// If we don't have a match, then we can have a deferred result to do
// anything with.  This is for revalidating fetchers where the route was
// removed during HMR
if(!u){continue}if(e9(s)){// Note: we do not have to touch activeDeferreds here since we race them
// against the signal in resolveDeferredData and they'll get aborted
// there if needed
l(o,"Expected an AbortController for revalidating fetcher deferred result");await tl(s,o.signal,true).then(e=>{if(e){t[i]=e}})}}}async function tl(e,t,r){if(r===void 0){r=false}let n=await e.deferredData.resolveData(t);if(n){return}if(r){try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(e){// Handle any TrackedPromise._error values encountered while unwrapping
return{type:g.error,error:e}}}return{type:g.data,data:e.deferredData.data}}function tc(e){return new URLSearchParams(e).getAll("index").some(e=>e==="")}function td(e,t){let r=typeof t==="string"?v(t).search:t.search;if(e[e.length-1].route.index&&tc(r||"")){// Return the leaf index route when index is present
return e[e.length-1]}// Otherwise grab the deepest "path contributing" match (ignoring index and
// pathless layout routes)
let n=q(e);return n[n.length-1]}function tf(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:a,json:o}=e;if(!t||!r||!n){return}if(i!=null){return{formMethod:t,formAction:r,formEncType:n,formData:undefined,json:undefined,text:i}}else if(a!=null){return{formMethod:t,formAction:r,formEncType:n,formData:a,json:undefined,text:undefined}}else if(o!==undefined){return{formMethod:t,formAction:r,formEncType:n,formData:undefined,json:o,text:undefined}}}function tp(e,t){if(t){let r={state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}else{let t={state:"loading",location:e,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};return t}}function th(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}function tv(e,t){if(e){let r={state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t};return r}else{let e={state:"loading",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined,data:t};return e}}function tm(e,t){let r={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:undefined};return r}function tg(e){let t={state:"idle",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined,data:e};return t}function tb(e,t){try{let r=e.sessionStorage.getItem(eE);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{})){if(n&&Array.isArray(n)){t.set(r,new Set(n||[]))}}}}catch(e){// no-op, use default empty object
}}function ty(e,t){if(t.size>0){let r={};for(let[e,n]of t){r[e]=[...n]}try{e.sessionStorage.setItem(eE,JSON.stringify(r))}catch(e){c(false,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}//#endregion
//# sourceMappingURL=router.js.map
},26602:function(e,t,r){"use strict";r.d(t,{ZP:()=>S});/* ESM import */var n=r(75950);/* ESM import */var i=r(87363);/* ESM import */var a=/*#__PURE__*/r.n(i);/* ESM import */var o=r(61533);/* ESM import */var s=/*#__PURE__*/r.n(o);function u(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}var l=typeof window!=="undefined"&&typeof document!=="undefined";function c(e,t){if(e){if(typeof e==="function"){e(t)}if(({}).hasOwnProperty.call(e,"current")){e.current=t}}}function d(){return l&&document.createElement("div")}function f(e){var t={"data-placement":e.placement};if(e.referenceHidden){t["data-reference-hidden"]=""}if(e.escaped){t["data-escaped"]=""}return t}function p(e,t){if(e===t){return true}else if(typeof e==="object"&&e!=null&&typeof t==="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length){return false}for(var r in e){if(t.hasOwnProperty(r)){if(!p(e[r],t[r])){return false}}else{return false}}return true}else{return false}}function h(e){var t=[];e.forEach(function(e){if(!t.find(function(t){return p(e,t)})){t.push(e)}});return t}function v(e,t){var r,n;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:h([].concat(((r=e.popperOptions)==null?void 0:r.modifiers)||[],((n=t.popperOptions)==null?void 0:n.modifiers)||[]))})})}var m=l?i.useLayoutEffect:i.useEffect;function g(e){// Using refs instead of state as it's recommended to not store imperative
// values in state due to memory problems in React(?)
var t=(0,i.useRef)();if(!t.current){t.current=typeof e==="function"?e():e}return t.current}function b(e,t,r){r.split(/\s+/).forEach(function(r){if(r){e.classList[t](r)}})}var y={name:"className",defaultValue:"",fn:function e(e){var t=e.popper.firstElementChild;var r=function t(){var t;return!!((t=e.props.render)==null?void 0:t.$$tippy)};function n(){if(e.props.className&&!r()){if(false){}return}b(t,"add",e.props.className)}function i(){if(r()){b(t,"remove",e.props.className)}}return{onCreate:n,onBeforeUpdate:i,onAfterUpdate:n}}};function _(e){function t(t){var r=t.children,n=t.content,s=t.visible,l=t.singleton,p=t.render,h=t.reference,b=t.disabled,_=b===void 0?false:b,w=t.ignoreAttributes,x=w===void 0?true:w,E=t.__source,Z=t.__self,S=u(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]);var O=s!==undefined;var k=l!==undefined;var T=(0,i.useState)(false),C=T[0],R=T[1];var A=(0,i.useState)({}),M=A[0],P=A[1];var D=(0,i.useState)(),I=D[0],L=D[1];var F=g(function(){return{container:d(),renders:1}});var N=Object.assign({ignoreAttributes:x},S,{content:F.container});if(O){if(false){}N.trigger="manual";N.hideOnClick=false}if(k){_=true}var j=N;var B=N.plugins||[];if(p){j=Object.assign({},N,{plugins:k&&l.data!=null?[].concat(B,[{fn:function e(){return{onTrigger:function e(e,t){var r=l.data.children.find(function(e){var r=e.instance;return r.reference===t.currentTarget});e.state.$$activeSingletonInstance=r.instance;L(r.content)}}}}]):B,render:function e(){return{popper:F.container}}})}var U=[h].concat(r?[r.type]:[]);// CREATE
m(function(){var t=h;if(h&&h.hasOwnProperty("current")){t=h.current}var r=e(t||F.ref||d(),Object.assign({},j,{plugins:[y].concat(N.plugins||[])}));F.instance=r;if(_){r.disable()}if(s){r.show()}if(k){l.hook({instance:r,content:n,props:j,setSingletonContent:L})}R(true);return function(){r.destroy();l==null?void 0:l.cleanup(r)}},U);// UPDATE
m(function(){var e;// Prevent this effect from running on 1st render
if(F.renders===1){F.renders++;return}var t=F.instance;t.setProps(v(t.props,j));// Fixes #264
(e=t.popperInstance)==null?void 0:e.forceUpdate();if(_){t.disable()}else{t.enable()}if(O){if(s){t.show()}else{t.hide()}}if(k){l.hook({instance:t,content:n,props:j,setSingletonContent:L})}});m(function(){var e;if(!p){return}var t=F.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat((((e=t.props.popperOptions)==null?void 0:e.modifiers)||[]).filter(function(e){var t=e.name;return t!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t;var r=e.state;var n=(t=r.modifiersData)==null?void 0:t.hide;// WARNING: this is a high-risk path that can cause an infinite
// loop. This expression _must_ evaluate to false when required
if(M.placement!==r.placement||M.referenceHidden!==(n==null?void 0:n.isReferenceHidden)||M.escaped!==(n==null?void 0:n.hasPopperEscaped)){P({placement:r.placement,referenceHidden:n==null?void 0:n.isReferenceHidden,escaped:n==null?void 0:n.hasPopperEscaped})}r.attributes.popper={}}}])})})},[M.placement,M.referenceHidden,M.escaped].concat(U));return /*#__PURE__*/a().createElement(a().Fragment,null,r?/*#__PURE__*/(0,i.cloneElement)(r,{ref:function e(e){F.ref=e;c(r.ref,e)}}):null,C&&/*#__PURE__*/(0,o.createPortal)(p?p(f(M),I,F.instance):n,F.container))}return t}function w(e){return function t(t){var r=t===void 0?{}:t,n=r.disabled,i=n===void 0?false:n,a=r.overrides,o=a===void 0?[]:a;var s=useState(false),l=s[0],c=s[1];var d=g({children:[],renders:1});m(function(){if(!l){c(true);return}var t=d.children,r=d.sourceData;if(!r){if(false){}return}var n=e(t.map(function(e){return e.instance}),Object.assign({},r.props,{popperOptions:r.instance.props.popperOptions,overrides:o,plugins:[y].concat(r.props.plugins||[])}));d.instance=n;if(i){n.disable()}return function(){n.destroy();d.children=t.filter(function(e){var t=e.instance;return!t.state.isDestroyed})}},[l]);m(function(){if(!l){return}if(d.renders===1){d.renders++;return}var e=d.children,t=d.instance,r=d.sourceData;if(!(t&&r)){return}var n=r.props,a=n.content,s=u(n,["content"]);t.setProps(v(t.props,Object.assign({},s,{overrides:o})));t.setInstances(e.map(function(e){return e.instance}));if(i){t.disable()}else{t.enable()}});return useMemo(function(){var e={data:d,hook:function e(e){d.sourceData=e;d.setSingletonContent=e.setSingletonContent},cleanup:function e(){d.sourceData=null}};var t={hook:function e(e){var t,r;d.children=d.children.filter(function(t){var r=t.instance;return e.instance!==r});d.children.push(e);if(((t=d.instance)==null?void 0:t.state.isMounted)&&((r=d.instance)==null?void 0:r.state.$$activeSingletonInstance)===e.instance){d.setSingletonContent==null?void 0:d.setSingletonContent(e.content)}if(d.instance&&!d.instance.state.isDestroyed){d.instance.setInstances(d.children.map(function(e){return e.instance}))}},cleanup:function e(e){d.children=d.children.filter(function(t){return t.instance!==e});if(d.instance&&!d.instance.state.isDestroyed){d.instance.setInstances(d.children.map(function(e){return e.instance}))}}};return[e,t]},[])}}var x=function(e,t){return/*#__PURE__*/(0,i.forwardRef)(function r(r,n){var o=r.children,s=u(r,["children"]);return(/*#__PURE__*/// If I spread them separately here, Babel adds the _extends ponyfill for
// some reason
a().createElement(e,Object.assign({},t,s),o?/*#__PURE__*/(0,i.cloneElement)(o,{ref:function e(e){c(n,e);c(o.ref,e)}}):null))})};var E=/*#__PURE__*//* unused pure expression or super */null&&w(createSingleton);var Z=/*#__PURE__*/x(/*#__PURE__*/_(n/* ["default"] */.ZP),{render:function e(){return""}});/* ESM default export */const S=Z;//# sourceMappingURL=tippy-react-headless.esm.js.map
},43832:function(e,t){/*!
 * CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
 *
 * Copyright 2014 Trevor Parscal
 * Copyright 2010 Roan Kattouw
 * Copyright 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var r;/**
 * Create a tokenizer object.
 *
 * This utility class is used by CSSJanus to protect strings by replacing them temporarily with
 * tokens and later transforming them back.
 *
 * @class
 * @constructor
 * @param {RegExp} regex Regular expression whose matches to replace by a token
 * @param {string} token Placeholder text
 */function n(e,t){var r=[],n=0;/**
	 * Add a match.
	 *
	 * @private
	 * @param {string} match Matched string
	 * @return {string} Token to leave in the matched string's place
	 */function i(e){r.push(e);return t}/**
	 * Get a match.
	 *
	 * @private
	 * @return {string} Original matched string to restore
	 */function a(){return r[n++]}return{/**
		 * Replace matching strings with tokens.
		 *
		 * @param {string} str String to tokenize
		 * @return {string} Tokenized string
		 */tokenize:function(t){return t.replace(e,i)},/**
		 * Restores tokens to their original values.
		 *
		 * @param {string} str String previously run through tokenize()
		 * @return {string} Original string
		 */detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),a)}}}/**
 * Create a CSSJanus object.
 *
 * CSSJanus transforms CSS rules with horizontal relevance so that a left-to-right stylesheet can
 * become a right-to-left stylesheet automatically. Processing can be bypassed for an entire rule
 * or a single property by adding a / * @noflip * / comment above the rule or property.
 *
 * @class
 * @constructor
 */function i(){var // Tokens
e="`TMP`",t="`TMPLTR`",r="`TMPRTL`",i="`NOFLIP_SINGLE`",a="`NOFLIP_CLASS`",o="`COMMENT`",// Patterns
s="[^\\u0020-\\u007e]",u="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",l="(?:[0-9]*\\.[0-9]+|[0-9]+)",c="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",d="direction\\s*:\\s*",f="[!#$%&*-~]",p="['\"]?\\s*",h="(^|[^a-zA-Z])",v="[^\\}]*?",m="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",g="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",b="(?:"+u+"|\\\\[^\\r\\n\\f0-9a-f])",y="(?:[_a-z]|"+s+"|"+b+")",_="(?:[_a-z0-9-]|"+s+"|"+b+")",w="-?"+y+_+"*",x=l+"(?:\\s*"+c+"|"+w+")?",E="((?:-?"+x+")|(?:inherit|auto))",Z="(?:-?"+l+"(?:\\s*"+c+")?)",S="(?:\\+|\\-|\\*|\\/)",O="(?:\\(|\\)|\\t| )",k="(?:"+O+"|"+Z+"|"+S+"){3,}",T="(?:calc\\((?:"+k+")\\))",C="((?:-?"+x+")|(?:inherit|auto)|"+T+")",R="((?:margin|padding|border-width)\\s*:\\s*)",A="((?:-color|border-style)\\s*:\\s*)",M="(#?"+_+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",// The use of a lazy match ("*?") may cause a backtrack limit to be exceeded before finding
// the intended match. This affects 'urlCharsPattern' and 'lookAheadNotOpenBracePattern'.
// We have not yet found this problem on Node.js, but we have on PHP 7, where it was
// mitigated by using a possessive quantifier ("*+"), which are not supported in JS.
// See <https://phabricator.wikimedia.org/T215746#4944830>.
P="(?:"+f+"|"+s+"|"+b+")*?",D="(?![a-zA-Z])",I="(?!("+_+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+o+")*?{)",L="(?!"+P+p+"\\))",F="(?="+P+p+"\\))",N="(\\s*(?:!important\\s*)?[;}])",// Regular expressions
j=/`TMP`/g,B=/`TMPLTR`/g,U=/`TMPRTL`/g,W=new RegExp(g,"gi"),z=new RegExp("("+m+I+"[^;}]+;?)","gi"),J=new RegExp("("+m+v+"})","gi"),q=new RegExp("("+d+")ltr","gi"),H=new RegExp("("+d+")rtl","gi"),V=new RegExp(h+"(left)"+D+L+I,"gi"),$=new RegExp(h+"(right)"+D+L+I,"gi"),G=new RegExp(h+"(left)"+F,"gi"),X=new RegExp(h+"(right)"+F,"gi"),K=/(:dir\( *)ltr( *\))/g,Q=/(:dir\( *)rtl( *\))/g,Y=new RegExp(h+"(ltr)"+F,"gi"),ee=new RegExp(h+"(rtl)"+F,"gi"),et=new RegExp(h+"([ns]?)e-resize","gi"),er=new RegExp(h+"([ns]?)w-resize","gi"),en=new RegExp(R+C+"(\\s+)"+C+"(\\s+)"+C+"(\\s+)"+C+N,"gi"),ei=new RegExp(A+M+"(\\s+)"+M+"(\\s+)"+M+"(\\s+)"+M+N,"gi"),ea=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+x+")","gi"),eo=new RegExp("(background-position-x\\s*:\\s*)(-?"+l+"%)","gi"),// border-radius: <length or percentage>{1,4} [optional: / <length or percentage>{1,4} ]
es=new RegExp("(border-radius\\s*:\\s*)"+E+"(?:(?:\\s+"+E+")(?:\\s+"+E+")?(?:\\s+"+E+")?)?"+"(?:(?:(?:\\s*\\/\\s*)"+E+")(?:\\s+"+E+")?(?:\\s+"+E+")?(?:\\s+"+E+")?)?"+N,"gi"),eu=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+E,"gi"),el=new RegExp("(text-shadow\\s*:\\s*)"+E+"(\\s*)"+M,"gi"),ec=new RegExp("(text-shadow\\s*:\\s*)"+M+"(\\s*)"+E,"gi"),ed=new RegExp("(text-shadow\\s*:\\s*)"+E,"gi"),ef=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+E+"(\\s*\\))","gi"),ep=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+E+"((?:\\s*,\\s*"+E+"){0,2}\\s*\\))","gi");/**
	 * Invert the horizontal value of a background position property.
	 *
	 * @private
	 * @param {string} match Matched property
	 * @param {string} pre Text before value
	 * @param {string} value Horizontal value
	 * @return {string} Inverted property
	 */function eh(e,t,r){var n,i;if(r.slice(-1)==="%"){n=r.indexOf(".");if(n!==-1){// Two off, one for the "%" at the end, one for the dot itself
i=r.length-n-2;r=100-parseFloat(r);r=r.toFixed(i)+"%"}else{r=100-parseFloat(r)+"%"}}return t+r}/**
	 * Invert a set of border radius values.
	 *
	 * @private
	 * @param {Array} values Matched values
	 * @return {string} Inverted values
	 */function ev(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]];break}return e.join(" ")}/**
	 * Invert a set of border radius values.
	 *
	 * @private
	 * @param {string} match Matched property
	 * @param {string} pre Text before value
	 * @param {string} [firstGroup1]
	 * @param {string} [firstGroup2]
	 * @param {string} [firstGroup3]
	 * @param {string} [firstGroup4]
	 * @param {string} [secondGroup1]
	 * @param {string} [secondGroup2]
	 * @param {string} [secondGroup3]
	 * @param {string} [secondGroup4]
	 * @param {string} [post] Text after value
	 * @return {string} Inverted property
	 */function em(e,t){var r,n=[].slice.call(arguments),i=n.slice(2,6).filter(function(e){return e}),a=n.slice(6,10).filter(function(e){return e}),o=n[10]||"";if(a.length){r=ev(i)+" / "+ev(a)}else{r=ev(i)}return t+r+o}/**
	 * Flip the sign of a CSS value, possibly with a unit.
	 *
	 * We can't just negate the value with unary minus due to the units.
	 *
	 * @private
	 * @param {string} value
	 * @return {string}
	 */function eg(e){if(parseFloat(e)===0){// Don't mangle zeroes
return e}if(e[0]==="-"){return e.slice(1)}return"-"+e}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} offset
	 * @return {string}
	 */function eb(e,t,r){return t+eg(r)}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} prefix
	 * @param {string} offset
	 * @param {string} suffix
	 * @return {string}
	 */function ey(e,t,r,n,i){return t+r+eg(n)+i}/**
	 * @private
	 * @param {string} match
	 * @param {string} property
	 * @param {string} color
	 * @param {string} space
	 * @param {string} offset
	 * @return {string}
	 */function e_(e,t,r,n,i){return t+r+n+eg(i)}return{/**
		 * Transform a left-to-right stylesheet to right-to-left.
		 *
		 * @param {string} css Stylesheet to transform
		 * @param {Object} options Options
		 * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs
		 * (e.g. 'ltr', 'rtl')
		 * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs
		 * (e.g. 'left', 'right')
		 * @return {string} Transformed stylesheet
		 */"transform":function(s,u){// Use single quotes in this object literal key for closure compiler.
// Tokenizers
var l=new n(z,i),c=new n(J,a),d=new n(W,o);// Tokenize
s=d.tokenize(c.tokenize(l.tokenize(// We wrap tokens in ` , not ~ like the original implementation does.
// This was done because ` is not a legal character in CSS and can only
// occur in URLs, where we escape it to %60 before inserting our tokens.
s.replace("`","%60"))));// Transform URLs
if(u.transformDirInUrl){// Replace 'ltr' with 'rtl' and vice versa in background URLs
s=s.replace(K,"$1"+t+"$2").replace(Q,"$1"+r+"$2").replace(Y,"$1"+e).replace(ee,"$1ltr").replace(j,"rtl").replace(B,"ltr").replace(U,"rtl")}if(u.transformEdgeInUrl){// Replace 'left' with 'right' and vice versa in background URLs
s=s.replace(G,"$1"+e).replace(X,"$1left").replace(j,"right")}// Transform rules
s=s// Replace direction: ltr; with direction: rtl; and vice versa.
.replace(q,"$1"+e).replace(H,"$1ltr").replace(j,"rtl")// Flip rules like left: , padding-right: , etc.
.replace(V,"$1"+e).replace($,"$1left").replace(j,"right")// Flip East and West in rules like cursor: nw-resize;
.replace(et,"$1$2"+e).replace(er,"$1$2e-resize").replace(j,"w-resize")// Border radius
.replace(es,em)// Shadows
.replace(eu,eb).replace(el,e_).replace(ec,e_).replace(ed,eb)// Translate
.replace(ef,ey).replace(ep,ey)// Swap the second and fourth parts in four-part notation rules
// like padding: 1px 2px 3px 4px;
.replace(en,"$1$2$3$8$5$6$7$4$9").replace(ei,"$1$2$3$8$5$6$7$4$9")// Flip horizontal background percentages
.replace(ea,eh).replace(eo,eh);// Detokenize
s=l.detokenize(c.detokenize(d.detokenize(s)));return s}}}/* Initialization */r=new i;/* Exports */if(true&&e.exports){/**
	 * Transform a left-to-right stylesheet to right-to-left.
	 *
	 * This function is a static wrapper around the transform method of an instance of CSSJanus.
	 *
	 * @param {string} css Stylesheet to transform
	 * @param {Object|boolean} [options] Options object, or transformDirInUrl option (back-compat)
	 * @param {boolean} [options.transformDirInUrl=false] Transform directions in URLs
	 * (e.g. 'ltr', 'rtl')
	 * @param {boolean} [options.transformEdgeInUrl=false] Transform edges in URLs
	 * (e.g. 'left', 'right')
	 * @param {boolean} [transformEdgeInUrl] Back-compat parameter
	 * @return {string} Transformed stylesheet
	 */t.transform=function(e,t,n){var i;if(typeof t==="object"){i=t}else{i={};if(typeof t==="boolean"){i.transformDirInUrl=t}if(typeof n==="boolean"){i.transformEdgeInUrl=n}}return r.transform(e,i)}}else if(typeof window!=="undefined"){/* global window */// Allow cssjanus to be used in a browser.
// eslint-disable-next-line dot-notation
window["cssjanus"]=r}},4810:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e,t){var r=e<0?"-":"";var n=Math.abs(e).toString();while(n.length<t){n="0"+n}return r+n}},44941:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(8493);/* ESM default export */const i=n/* ["default"] */.Z},84314:function(e,t,r){"use strict";r.d(t,{j:()=>i});var n={};function i(){return n}function a(e){n=e}},49969:function(e,t,r){"use strict";r.d(t,{Z:()=>v});/* ESM import */var n=r(37594);/* ESM import */var i=r(64328);/* ESM import */var a=r(7032);/* ESM import */var o=r(80376);/* ESM import */var s=r(7651);/* ESM import */var u=r(4810);/* ESM import */var l=r(65834);var c={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};/*
 * |     | Unit                           |     | Unit                           |
 * |-----|--------------------------------|-----|--------------------------------|
 * |  a  | AM, PM                         |  A* | Milliseconds in day            |
 * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |
 * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |
 * |  d  | Day of month                   |  D  | Day of year                    |
 * |  e  | Local day of week              |  E  | Day of week                    |
 * |  f  |                                |  F* | Day of week in month           |
 * |  g* | Modified Julian day            |  G  | Era                            |
 * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |
 * |  i! | ISO day of week                |  I! | ISO week of year               |
 * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |
 * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |
 * |  l* | (deprecated)                   |  L  | Stand-alone month              |
 * |  m  | Minute                         |  M  | Month                          |
 * |  n  |                                |  N  |                                |
 * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |
 * |  p! | Long localized time            |  P! | Long localized date            |
 * |  q  | Stand-alone quarter            |  Q  | Quarter                        |
 * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |
 * |  s  | Second                         |  S  | Fraction of second             |
 * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |
 * |  u  | Extended year                  |  U* | Cyclic year                    |
 * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |
 * |  w  | Local week of year             |  W* | Week of month                  |
 * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |
 * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |
 * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |
 *
 * Letters marked by * are not implemented but reserved by Unicode standard.
 *
 * Letters marked by ! are non-standard, but implemented by date-fns:
 * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
 * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
 *   i.e. 7 for Sunday, 1 for Monday, etc.
 * - `I` is ISO week of year, as opposed to `w` which is local week of year.
 * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
 *   `R` is supposed to be used in conjunction with `I` and `i`
 *   for universal ISO week-numbering date, whereas
 *   `Y` is supposed to be used in conjunction with `w` and `e`
 *   for week-numbering date specific to the locale.
 * - `P` is long localized date format
 * - `p` is long localized time format
 */var d={// Era
G:function e(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){// AD, BC
case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});// A, B
case"GGGGG":return r.era(n,{width:"narrow"});// Anno Domini, Before Christ
case"GGGG":default:return r.era(n,{width:"wide"})}},// Year
y:function e(e,t,r){// Ordinal number
if(t==="yo"){var n=e.getUTCFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
var i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return l/* ["default"].y */.Z.y(e,t)},// Local week-numbering year
Y:function e(e,t,r,n){var i=(0,s/* ["default"] */.Z)(e,n);// Returns 1 for 1 BC (which is year 0 in JavaScript)
var a=i>0?i:1-i;// Two digit year
if(t==="YY"){var o=a%100;return(0,u/* ["default"] */.Z)(o,2)}// Ordinal number
if(t==="Yo"){return r.ordinalNumber(a,{unit:"year"})}// Padding
return(0,u/* ["default"] */.Z)(a,t.length)},// ISO week-numbering year
R:function e(e,t){var r=(0,a/* ["default"] */.Z)(e);// Padding
return(0,u/* ["default"] */.Z)(r,t.length)},// Extended year. This is a single number designating the year of this calendar system.
// The main difference between `y` and `u` localizers are B.C. years:
// | Year | `y` | `u` |
// |------|-----|-----|
// | AC 1 |   1 |   1 |
// | BC 1 |   1 |   0 |
// | BC 2 |   2 |  -1 |
// Also `yy` always returns the last two digits of a year,
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
u:function e(e,t){var r=e.getUTCFullYear();return(0,u/* ["default"] */.Z)(r,t.length)},// Quarter
Q:function e(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){// 1, 2, 3, 4
case"Q":return String(n);// 01, 02, 03, 04
case"QQ":return(0,u/* ["default"] */.Z)(n,2);// 1st, 2nd, 3rd, 4th
case"Qo":return r.ordinalNumber(n,{unit:"quarter"});// Q1, Q2, Q3, Q4
case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});// 1st quarter, 2nd quarter, ...
case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},// Stand-alone quarter
q:function e(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){// 1, 2, 3, 4
case"q":return String(n);// 01, 02, 03, 04
case"qq":return(0,u/* ["default"] */.Z)(n,2);// 1st, 2nd, 3rd, 4th
case"qo":return r.ordinalNumber(n,{unit:"quarter"});// Q1, Q2, Q3, Q4
case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});// 1st quarter, 2nd quarter, ...
case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},// Month
M:function e(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return l/* ["default"].M */.Z.M(e,t);// 1st, 2nd, ..., 12th
case"Mo":return r.ordinalNumber(n+1,{unit:"month"});// Jan, Feb, ..., Dec
case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});// J, F, ..., D
case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});// January, February, ..., December
case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},// Stand-alone month
L:function e(e,t,r){var n=e.getUTCMonth();switch(t){// 1, 2, ..., 12
case"L":return String(n+1);// 01, 02, ..., 12
case"LL":return(0,u/* ["default"] */.Z)(n+1,2);// 1st, 2nd, ..., 12th
case"Lo":return r.ordinalNumber(n+1,{unit:"month"});// Jan, Feb, ..., Dec
case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});// J, F, ..., D
case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});// January, February, ..., December
case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},// Local week of year
w:function e(e,t,r,n){var i=(0,o/* ["default"] */.Z)(e,n);if(t==="wo"){return r.ordinalNumber(i,{unit:"week"})}return(0,u/* ["default"] */.Z)(i,t.length)},// ISO week of year
I:function e(e,t,r){var n=(0,i/* ["default"] */.Z)(e);if(t==="Io"){return r.ordinalNumber(n,{unit:"week"})}return(0,u/* ["default"] */.Z)(n,t.length)},// Day of the month
d:function e(e,t,r){if(t==="do"){return r.ordinalNumber(e.getUTCDate(),{unit:"date"})}return l/* ["default"].d */.Z.d(e,t)},// Day of year
D:function e(e,t,r){var i=(0,n/* ["default"] */.Z)(e);if(t==="Do"){return r.ordinalNumber(i,{unit:"dayOfYear"})}return(0,u/* ["default"] */.Z)(i,t.length)},// Day of week
E:function e(e,t,r){var n=e.getUTCDay();switch(t){// Tue
case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});// T
case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});// Tu
case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});// Tuesday
case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},// Local day of week
e:function e(e,t,r,n){var i=e.getUTCDay();var a=(i-n.weekStartsOn+8)%7||7;switch(t){// Numerical value (Nth day of week with current locale or weekStartsOn)
case"e":return String(a);// Padded numerical value
case"ee":return(0,u/* ["default"] */.Z)(a,2);// 1st, 2nd, ..., 7th
case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});// T
case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});// Tu
case"eeeeee":return r.day(i,{width:"short",context:"formatting"});// Tuesday
case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},// Stand-alone local day of week
c:function e(e,t,r,n){var i=e.getUTCDay();var a=(i-n.weekStartsOn+8)%7||7;switch(t){// Numerical value (same as in `e`)
case"c":return String(a);// Padded numerical value
case"cc":return(0,u/* ["default"] */.Z)(a,t.length);// 1st, 2nd, ..., 7th
case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});// T
case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});// Tu
case"cccccc":return r.day(i,{width:"short",context:"standalone"});// Tuesday
case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},// ISO day of week
i:function e(e,t,r){var n=e.getUTCDay();var i=n===0?7:n;switch(t){// 2
case"i":return String(i);// 02
case"ii":return(0,u/* ["default"] */.Z)(i,t.length);// 2nd
case"io":return r.ordinalNumber(i,{unit:"day"});// Tue
case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});// T
case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});// Tu
case"iiiiii":return r.day(n,{width:"short",context:"formatting"});// Tuesday
case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},// AM or PM
a:function e(e,t,r){var n=e.getUTCHours();var i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// AM, PM, midnight, noon
b:function e(e,t,r){var n=e.getUTCHours();var i;if(n===12){i=c.noon}else if(n===0){i=c.midnight}else{i=n/12>=1?"pm":"am"}switch(t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// in the morning, in the afternoon, in the evening, at night
B:function e(e,t,r){var n=e.getUTCHours();var i;if(n>=17){i=c.evening}else if(n>=12){i=c.afternoon}else if(n>=4){i=c.morning}else{i=c.night}switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},// Hour [1-12]
h:function e(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;if(n===0)n=12;return r.ordinalNumber(n,{unit:"hour"})}return l/* ["default"].h */.Z.h(e,t)},// Hour [0-23]
H:function e(e,t,r){if(t==="Ho"){return r.ordinalNumber(e.getUTCHours(),{unit:"hour"})}return l/* ["default"].H */.Z.H(e,t)},// Hour [0-11]
K:function e(e,t,r){var n=e.getUTCHours()%12;if(t==="Ko"){return r.ordinalNumber(n,{unit:"hour"})}return(0,u/* ["default"] */.Z)(n,t.length)},// Hour [1-24]
k:function e(e,t,r){var n=e.getUTCHours();if(n===0)n=24;if(t==="ko"){return r.ordinalNumber(n,{unit:"hour"})}return(0,u/* ["default"] */.Z)(n,t.length)},// Minute
m:function e(e,t,r){if(t==="mo"){return r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"})}return l/* ["default"].m */.Z.m(e,t)},// Second
s:function e(e,t,r){if(t==="so"){return r.ordinalNumber(e.getUTCSeconds(),{unit:"second"})}return l/* ["default"].s */.Z.s(e,t)},// Fraction of second
S:function e(e,t){return l/* ["default"].S */.Z.S(e,t)},// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
X:function e(e,t,r,n){var i=n._originalDate||e;var a=i.getTimezoneOffset();if(a===0){return"Z"}switch(t){// Hours and optional minutes
case"X":return p(a);// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XX`
case"XXXX":case"XX":// Hours and minutes without `:` delimiter
return h(a);// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `XXX`
case"XXXXX":case"XXX":default:return h(a,":")}},// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
x:function e(e,t,r,n){var i=n._originalDate||e;var a=i.getTimezoneOffset();switch(t){// Hours and optional minutes
case"x":return p(a);// Hours, minutes and optional seconds without `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xx`
case"xxxx":case"xx":// Hours and minutes without `:` delimiter
return h(a);// Hours, minutes and optional seconds with `:` delimiter
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
// so this token always has the same output as `xxx`
case"xxxxx":case"xxx":default:return h(a,":")}},// Timezone (GMT)
O:function e(e,t,r,n){var i=n._originalDate||e;var a=i.getTimezoneOffset();switch(t){// Short
case"O":case"OO":case"OOO":return"GMT"+f(a,":");// Long
case"OOOO":default:return"GMT"+h(a,":")}},// Timezone (specific non-location)
z:function e(e,t,r,n){var i=n._originalDate||e;var a=i.getTimezoneOffset();switch(t){// Short
case"z":case"zz":case"zzz":return"GMT"+f(a,":");// Long
case"zzzz":default:return"GMT"+h(a,":")}},// Seconds timestamp
t:function e(e,t,r,n){var i=n._originalDate||e;var a=Math.floor(i.getTime()/1e3);return(0,u/* ["default"] */.Z)(a,t.length)},// Milliseconds timestamp
T:function e(e,t,r,n){var i=n._originalDate||e;var a=i.getTime();return(0,u/* ["default"] */.Z)(a,t.length)}};function f(e,t){var r=e>0?"-":"+";var n=Math.abs(e);var i=Math.floor(n/60);var a=n%60;if(a===0){return r+String(i)}var o=t||"";return r+String(i)+o+(0,u/* ["default"] */.Z)(a,2)}function p(e,t){if(e%60===0){var r=e>0?"-":"+";return r+(0,u/* ["default"] */.Z)(Math.abs(e)/60,2)}return h(e,t)}function h(e,t){var r=t||"";var n=e>0?"-":"+";var i=Math.abs(e);var a=(0,u/* ["default"] */.Z)(Math.floor(i/60),2);var o=(0,u/* ["default"] */.Z)(i%60,2);return n+a+r+o}/* ESM default export */const v=d},65834:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(4810);/*
 * |     | Unit                           |     | Unit                           |
 * |-----|--------------------------------|-----|--------------------------------|
 * |  a  | AM, PM                         |  A* |                                |
 * |  d  | Day of month                   |  D  |                                |
 * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |
 * |  m  | Minute                         |  M  | Month                          |
 * |  s  | Second                         |  S  | Fraction of second             |
 * |  y  | Year (abs)                     |  Y  |                                |
 *
 * Letters marked by * are not implemented but reserved by Unicode standard.
 */var i={// Year
y:function e(e,t){// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
// | Year     |     y | yy |   yyy |  yyyy | yyyyy |
// |----------|-------|----|-------|-------|-------|
// | AD 1     |     1 | 01 |   001 |  0001 | 00001 |
// | AD 12    |    12 | 12 |   012 |  0012 | 00012 |
// | AD 123   |   123 | 23 |   123 |  0123 | 00123 |
// | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
var r=e.getUTCFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
var i=r>0?r:1-r;return(0,n/* ["default"] */.Z)(t==="yy"?i%100:i,t.length)},// Month
M:function e(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):(0,n/* ["default"] */.Z)(r+1,2)},// Day of the month
d:function e(e,t){return(0,n/* ["default"] */.Z)(e.getUTCDate(),t.length)},// AM or PM
a:function e(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},// Hour [1-12]
h:function e(e,t){return(0,n/* ["default"] */.Z)(e.getUTCHours()%12||12,t.length)},// Hour [0-23]
H:function e(e,t){return(0,n/* ["default"] */.Z)(e.getUTCHours(),t.length)},// Minute
m:function e(e,t){return(0,n/* ["default"] */.Z)(e.getUTCMinutes(),t.length)},// Second
s:function e(e,t){return(0,n/* ["default"] */.Z)(e.getUTCSeconds(),t.length)},// Fraction of second
S:function e(e,t){var r=t.length;var i=e.getUTCMilliseconds();var a=Math.floor(i*Math.pow(10,r-3));return(0,n/* ["default"] */.Z)(a,t.length)}};/* ESM default export */const a=i},97621:function(e,t,r){"use strict";r.d(t,{Z:()=>s});var n=function e(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}};var i=function e(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}};var a=function e(e,t){var r=e.match(/(P+)(p+)?/)||[];var a=r[1];var o=r[2];if(!o){return n(e,t)}var s;switch(a){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",n(a,t)).replace("{{time}}",i(o,t))};var o={p:i,P:a};/* ESM default export */const s=o},24262:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/**
 * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
 * They usually appear for dates that denote time before the timezones were introduced
 * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
 * and GMT+01:00:00 after that date)
 *
 * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
 * which would lead to incorrect calculations.
 *
 * This function returns the timezone offset in milliseconds that takes seconds in account.
 */function n(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}},37594:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);var a=864e5;function o(e){(0,i/* ["default"] */.Z)(1,arguments);var t=(0,n["default"])(e);var r=t.getTime();t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0);var o=t.getTime();var s=r-o;return Math.floor(s/a)+1}},64328:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(19013);/* ESM import */var i=r(66979);/* ESM import */var a=r(22585);/* ESM import */var o=r(13882);var s=6048e5;function u(e){(0,o/* ["default"] */.Z)(1,arguments);var t=(0,n["default"])(e);var r=(0,i/* ["default"] */.Z)(t).getTime()-(0,a/* ["default"] */.Z)(t).getTime();// Round the number of days to the nearest integer
// because the number of milliseconds in a week is not constant
// (e.g. it's different in the week of the daylight saving time clock shift)
return Math.round(r/s)+1}},7032:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);/* ESM import */var a=r(66979);function o(e){(0,i/* ["default"] */.Z)(1,arguments);var t=(0,n["default"])(e);var r=t.getUTCFullYear();var o=new Date(0);o.setUTCFullYear(r+1,0,4);o.setUTCHours(0,0,0,0);var s=(0,a/* ["default"] */.Z)(o);var u=new Date(0);u.setUTCFullYear(r,0,4);u.setUTCHours(0,0,0,0);var l=(0,a/* ["default"] */.Z)(u);if(t.getTime()>=s.getTime()){return r+1}else if(t.getTime()>=l.getTime()){return r}else{return r-1}}},80376:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(19013);/* ESM import */var i=r(59025);/* ESM import */var a=r(41489);/* ESM import */var o=r(13882);var s=6048e5;function u(e,t){(0,o/* ["default"] */.Z)(1,arguments);var r=(0,n["default"])(e);var u=(0,i/* ["default"] */.Z)(r,t).getTime()-(0,a/* ["default"] */.Z)(r,t).getTime();// Round the number of days to the nearest integer
// because the number of milliseconds in a week is not constant
// (e.g. it's different in the week of the daylight saving time clock shift)
return Math.round(u/s)+1}},7651:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);/* ESM import */var a=r(59025);/* ESM import */var o=r(83946);/* ESM import */var s=r(84314);function u(e,t){var r,u,l,c,d,f,p,h;(0,i/* ["default"] */.Z)(1,arguments);var v=(0,n["default"])(e);var m=v.getUTCFullYear();var g=(0,s/* .getDefaultOptions */.j)();var b=(0,o/* ["default"] */.Z)((r=(u=(l=(c=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&c!==void 0?c:t===null||t===void 0?void 0:(d=t.locale)===null||d===void 0?void 0:(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&l!==void 0?l:g.firstWeekContainsDate)!==null&&u!==void 0?u:(p=g.locale)===null||p===void 0?void 0:(h=p.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&r!==void 0?r:1);// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
if(!(b>=1&&b<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var y=new Date(0);y.setUTCFullYear(m+1,0,b);y.setUTCHours(0,0,0,0);var _=(0,a/* ["default"] */.Z)(y,t);var w=new Date(0);w.setUTCFullYear(m,0,b);w.setUTCHours(0,0,0,0);var x=(0,a/* ["default"] */.Z)(w,t);if(v.getTime()>=_.getTime()){return m+1}else if(v.getTime()>=x.getTime()){return m}else{return m-1}}},5267:function(e,t,r){"use strict";r.d(t,{Do:()=>o,Iu:()=>a,qp:()=>s});var n=["D","DD"];var i=["YY","YYYY"];function a(e){return n.indexOf(e)!==-1}function o(e){return i.indexOf(e)!==-1}function s(e,t,r){if(e==="YYYY"){throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="YY"){throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="D"){throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="DD"){throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}}},13882:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e,t){if(t.length<e){throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}}},66979:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);function a(e){(0,i/* ["default"] */.Z)(1,arguments);var t=1;var r=(0,n["default"])(e);var a=r.getUTCDay();var o=(a<t?7:0)+a-t;r.setUTCDate(r.getUTCDate()-o);r.setUTCHours(0,0,0,0);return r}},22585:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(7032);/* ESM import */var i=r(66979);/* ESM import */var a=r(13882);function o(e){(0,a/* ["default"] */.Z)(1,arguments);var t=(0,n/* ["default"] */.Z)(e);var r=new Date(0);r.setUTCFullYear(t,0,4);r.setUTCHours(0,0,0,0);var o=(0,i/* ["default"] */.Z)(r);return o}},59025:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);/* ESM import */var a=r(83946);/* ESM import */var o=r(84314);function s(e,t){var r,s,u,l,c,d,f,p;(0,i/* ["default"] */.Z)(1,arguments);var h=(0,o/* .getDefaultOptions */.j)();var v=(0,a/* ["default"] */.Z)((r=(s=(u=(l=t===null||t===void 0?void 0:t.weekStartsOn)!==null&&l!==void 0?l:t===null||t===void 0?void 0:(c=t.locale)===null||c===void 0?void 0:(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&u!==void 0?u:h.weekStartsOn)!==null&&s!==void 0?s:(f=h.locale)===null||f===void 0?void 0:(p=f.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&r!==void 0?r:0);// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
if(!(v>=0&&v<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var m=(0,n["default"])(e);var g=m.getUTCDay();var b=(g<v?7:0)+g-v;m.setUTCDate(m.getUTCDate()-b);m.setUTCHours(0,0,0,0);return m}},41489:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(7651);/* ESM import */var i=r(13882);/* ESM import */var a=r(59025);/* ESM import */var o=r(83946);/* ESM import */var s=r(84314);function u(e,t){var r,u,l,c,d,f,p,h;(0,i/* ["default"] */.Z)(1,arguments);var v=(0,s/* .getDefaultOptions */.j)();var m=(0,o/* ["default"] */.Z)((r=(u=(l=(c=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&c!==void 0?c:t===null||t===void 0?void 0:(d=t.locale)===null||d===void 0?void 0:(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&l!==void 0?l:v.firstWeekContainsDate)!==null&&u!==void 0?u:(p=v.locale)===null||p===void 0?void 0:(h=p.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&r!==void 0?r:1);var g=(0,n/* ["default"] */.Z)(e,t);var b=new Date(0);b.setUTCFullYear(g,0,m);b.setUTCHours(0,0,0,0);var y=(0,a/* ["default"] */.Z)(b,t);return y}},83946:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){if(e===null||e===true||e===false){return NaN}var t=Number(e);if(isNaN(t)){return t}return t<0?Math.ceil(t):Math.floor(t)}},51820:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(83946);/* ESM import */var i=r(19013);/* ESM import */var a=r(13882);/**
 * @name addMilliseconds
 * @category Millisecond Helpers
 * @summary Add the specified number of milliseconds to the given date.
 *
 * @description
 * Add the specified number of milliseconds to the given date.
 *
 * @param {Date|Number} date - the date to be changed
 * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
 * @returns {Date} the new date with the milliseconds added
 * @throws {TypeError} 2 arguments required
 *
 * @example
 * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
 * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
 * //=> Thu Jul 10 2014 12:45:30.750
 */function o(e,t){(0,a/* ["default"] */.Z)(2,arguments);var r=(0,i["default"])(e).getTime();var o=(0,n/* ["default"] */.Z)(t);return new Date(r+o)}},58545:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>s});/* ESM import */var n=r(83946);/* ESM import */var i=r(51820);/* ESM import */var a=r(13882);var o=6e4;/**
 * @name addMinutes
 * @category Minute Helpers
 * @summary Add the specified number of minutes to the given date.
 *
 * @description
 * Add the specified number of minutes to the given date.
 *
 * @param {Date|Number} date - the date to be changed
 * @param {Number} amount - the amount of minutes to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
 * @returns {Date} the new date with the minutes added
 * @throws {TypeError} 2 arguments required
 *
 * @example
 * // Add 30 minutes to 10 July 2014 12:00:00:
 * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)
 * //=> Thu Jul 10 2014 12:30:00
 */function s(e,t){(0,a/* ["default"] */.Z)(2,arguments);var r=(0,n/* ["default"] */.Z)(t);return(0,i/* ["default"] */.Z)(e,r*o)}},36948:function(e,t,r){"use strict";r.d(t,{qk:()=>u,vh:()=>s,yJ:()=>o});/**
 * Days in 1 week.
 *
 * @name daysInWeek
 * @constant
 * @type {number}
 * @default
 */var n=7;/**
 * Days in 1 year
 * One years equals 365.2425 days according to the formula:
 *
 * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.
 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
 *
 * @name daysInYear
 * @constant
 * @type {number}
 * @default
 */var i=365.2425;/**
 * Maximum allowed time.
 *
 * @name maxTime
 * @constant
 * @type {number}
 * @default
 */var a=Math.pow(10,8)*24*60*60*1e3;/**
 * Milliseconds in 1 minute
 *
 * @name millisecondsInMinute
 * @constant
 * @type {number}
 * @default
 */var o=6e4;/**
 * Milliseconds in 1 hour
 *
 * @name millisecondsInHour
 * @constant
 * @type {number}
 * @default
 */var s=36e5;/**
 * Milliseconds in 1 second
 *
 * @name millisecondsInSecond
 * @constant
 * @type {number}
 * @default
 */var u=1e3;/**
 * Minimum allowed time.
 *
 * @name minTime
 * @constant
 * @type {number}
 * @default
 */var l=/* unused pure expression or super */null&&-a;/**
 * Minutes in 1 hour
 *
 * @name minutesInHour
 * @constant
 * @type {number}
 * @default
 */var c=60;/**
 * Months in 1 quarter
 *
 * @name monthsInQuarter
 * @constant
 * @type {number}
 * @default
 */var d=3;/**
 * Months in 1 year
 *
 * @name monthsInYear
 * @constant
 * @type {number}
 * @default
 */var f=12;/**
 * Quarters in 1 year
 *
 * @name quartersInYear
 * @constant
 * @type {number}
 * @default
 */var p=4;/**
 * Seconds in 1 hour
 *
 * @name secondsInHour
 * @constant
 * @type {number}
 * @default
 */var h=3600;/**
 * Seconds in 1 minute
 *
 * @name secondsInMinute
 * @constant
 * @type {number}
 * @default
 */var v=60;/**
 * Seconds in 1 day
 *
 * @name secondsInDay
 * @constant
 * @type {number}
 * @default
 */var m=/* unused pure expression or super */null&&h*24;/**
 * Seconds in 1 week
 *
 * @name secondsInWeek
 * @constant
 * @type {number}
 * @default
 */var g=/* unused pure expression or super */null&&m*7;/**
 * Seconds in 1 year
 *
 * @name secondsInYear
 * @constant
 * @type {number}
 * @default
 */var b=/* unused pure expression or super */null&&m*i;/**
 * Seconds in 1 month
 *
 * @name secondsInMonth
 * @constant
 * @type {number}
 * @default
 */var y=/* unused pure expression or super */null&&b/12;/**
 * Seconds in 1 quarter
 *
 * @name secondsInQuarter
 * @constant
 * @type {number}
 * @default
 */var _=/* unused pure expression or super */null&&y*3},32449:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>y});/* ESM import */var n=r(12274);/* ESM import */var i=r(91218);/* ESM import */var a=r(19013);/* ESM import */var o=r(49969);/* ESM import */var s=r(97621);/* ESM import */var u=r(24262);/* ESM import */var l=r(5267);/* ESM import */var c=r(83946);/* ESM import */var d=r(13882);/* ESM import */var f=r(84314);/* ESM import */var p=r(44941);// This RegExp consists of three parts separated by `|`:
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
//   (one of the certain letters followed by `o`)
// - (\w)\1* matches any sequences of the same letter
// - '' matches two quote characters in a row
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
//   except a single quote symbol, which ends the sequence.
//   Two quote characters do not end the sequence.
//   If there is no matching single quote
//   then the sequence will continue until the end of the string.
// - . matches any single character unmatched by previous parts of the RegExps
var h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;// This RegExp catches symbols escaped by quotes, and also
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
var v=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var m=/^'([^]*?)'?$/;var g=/''/g;var b=/[a-zA-Z]/;/**
 * @name format
 * @category Common Helpers
 * @summary Format the date.
 *
 * @description
 * Return the formatted date string in the given format. The result may vary by locale.
 *
 * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
 * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * The characters wrapped between two single quotes characters (') are escaped.
 * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
 * (see the last example)
 *
 * Format of the string is based on Unicode Technical Standard #35:
 * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
 * with a few additions (see note 7 below the table).
 *
 * Accepted patterns:
 * | Unit                            | Pattern | Result examples                   | Notes |
 * |---------------------------------|---------|-----------------------------------|-------|
 * | Era                             | G..GGG  | AD, BC                            |       |
 * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |
 * |                                 | GGGGG   | A, B                              |       |
 * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |
 * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |
 * |                                 | yy      | 44, 01, 00, 17                    | 5     |
 * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |
 * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |
 * |                                 | yyyyy   | ...                               | 3,5   |
 * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |
 * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |
 * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |
 * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |
 * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |
 * |                                 | YYYYY   | ...                               | 3,5   |
 * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |
 * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |
 * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |
 * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |
 * |                                 | RRRRR   | ...                               | 3,5,7 |
 * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |
 * |                                 | uu      | -43, 01, 1900, 2017               | 5     |
 * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |
 * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |
 * |                                 | uuuuu   | ...                               | 3,5   |
 * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |
 * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |
 * |                                 | QQ      | 01, 02, 03, 04                    |       |
 * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |
 * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |
 * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |
 * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |
 * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |
 * |                                 | qq      | 01, 02, 03, 04                    |       |
 * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |
 * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |
 * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |
 * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |
 * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |
 * |                                 | MM      | 01, 02, ..., 12                   |       |
 * |                                 | MMM     | Jan, Feb, ..., Dec                |       |
 * |                                 | MMMM    | January, February, ..., December  | 2     |
 * |                                 | MMMMM   | J, F, ..., D                      |       |
 * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |
 * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |
 * |                                 | LL      | 01, 02, ..., 12                   |       |
 * |                                 | LLL     | Jan, Feb, ..., Dec                |       |
 * |                                 | LLLL    | January, February, ..., December  | 2     |
 * |                                 | LLLLL   | J, F, ..., D                      |       |
 * | Local week of year              | w       | 1, 2, ..., 53                     |       |
 * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |
 * |                                 | ww      | 01, 02, ..., 53                   |       |
 * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |
 * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |
 * |                                 | II      | 01, 02, ..., 53                   | 7     |
 * | Day of month                    | d       | 1, 2, ..., 31                     |       |
 * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |
 * |                                 | dd      | 01, 02, ..., 31                   |       |
 * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |
 * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |
 * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |
 * |                                 | DDD     | 001, 002, ..., 365, 366           |       |
 * |                                 | DDDD    | ...                               | 3     |
 * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |
 * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |
 * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |
 * |                                 | ii      | 01, 02, ..., 07                   | 7     |
 * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |
 * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |
 * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |
 * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |
 * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |
 * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |
 * |                                 | ee      | 02, 03, ..., 01                   |       |
 * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | eeeee   | M, T, W, T, F, S, S               |       |
 * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |
 * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |
 * |                                 | cc      | 02, 03, ..., 01                   |       |
 * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |
 * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |
 * |                                 | ccccc   | M, T, W, T, F, S, S               |       |
 * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |
 * | AM, PM                          | a..aa   | AM, PM                            |       |
 * |                                 | aaa     | am, pm                            |       |
 * |                                 | aaaa    | a.m., p.m.                        | 2     |
 * |                                 | aaaaa   | a, p                              |       |
 * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |
 * |                                 | bbb     | am, pm, noon, midnight            |       |
 * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |
 * |                                 | bbbbb   | a, p, n, mi                       |       |
 * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |
 * |                                 | BBBB    | at night, in the morning, ...     | 2     |
 * |                                 | BBBBB   | at night, in the morning, ...     |       |
 * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |
 * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |
 * |                                 | hh      | 01, 02, ..., 11, 12               |       |
 * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |
 * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |
 * |                                 | HH      | 00, 01, 02, ..., 23               |       |
 * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |
 * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |
 * |                                 | KK      | 01, 02, ..., 11, 00               |       |
 * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |
 * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |
 * |                                 | kk      | 24, 01, 02, ..., 23               |       |
 * | Minute                          | m       | 0, 1, ..., 59                     |       |
 * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |
 * |                                 | mm      | 00, 01, ..., 59                   |       |
 * | Second                          | s       | 0, 1, ..., 59                     |       |
 * |                                 | so      | 0th, 1st, ..., 59th               | 7     |
 * |                                 | ss      | 00, 01, ..., 59                   |       |
 * | Fraction of second              | S       | 0, 1, ..., 9                      |       |
 * |                                 | SS      | 00, 01, ..., 99                   |       |
 * |                                 | SSS     | 000, 001, ..., 999                |       |
 * |                                 | SSSS    | ...                               | 3     |
 * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |
 * |                                 | XX      | -0800, +0530, Z                   |       |
 * |                                 | XXX     | -08:00, +05:30, Z                 |       |
 * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |
 * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |
 * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |
 * |                                 | xx      | -0800, +0530, +0000               |       |
 * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |
 * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |
 * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |
 * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |
 * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |
 * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |
 * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |
 * | Seconds timestamp               | t       | 512969520                         | 7     |
 * |                                 | tt      | ...                               | 3,7   |
 * | Milliseconds timestamp          | T       | 512969520900                      | 7     |
 * |                                 | TT      | ...                               | 3,7   |
 * | Long localized date             | P       | 04/29/1453                        | 7     |
 * |                                 | PP      | Apr 29, 1453                      | 7     |
 * |                                 | PPP     | April 29th, 1453                  | 7     |
 * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |
 * | Long localized time             | p       | 12:00 AM                          | 7     |
 * |                                 | pp      | 12:00:00 AM                       | 7     |
 * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |
 * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |
 * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |
 * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |
 * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |
 * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |
 * Notes:
 * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
 *    are the same as "stand-alone" units, but are different in some languages.
 *    "Formatting" units are declined according to the rules of the language
 *    in the context of a date. "Stand-alone" units are always nominative singular:
 *
 *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
 *
 *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
 *
 * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
 *    the single quote characters (see below).
 *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
 *    the output will be the same as default pattern for this unit, usually
 *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
 *    are marked with "2" in the last column of the table.
 *
 *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
 *
 *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
 *
 * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
 *    The output will be padded with zeros to match the length of the pattern.
 *
 *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
 *
 * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
 *    These tokens represent the shortest form of the quarter.
 *
 * 5. The main difference between `y` and `u` patterns are B.C. years:
 *
 *    | Year | `y` | `u` |
 *    |------|-----|-----|
 *    | AC 1 |   1 |   1 |
 *    | BC 1 |   1 |   0 |
 *    | BC 2 |   2 |  -1 |
 *
 *    Also `yy` always returns the last two digits of a year,
 *    while `uu` pads single digit years to 2 characters and returns other years unchanged:
 *
 *    | Year | `yy` | `uu` |
 *    |------|------|------|
 *    | 1    |   01 |   01 |
 *    | 14   |   14 |   14 |
 *    | 376  |   76 |  376 |
 *    | 1453 |   53 | 1453 |
 *
 *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),
 *    except local week-numbering years are dependent on `options.weekStartsOn`
 *    and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
 *    and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
 *
 * 6. Specific non-location timezones are currently unavailable in `date-fns`,
 *    so right now these tokens fall back to GMT timezones.
 *
 * 7. These patterns are not in the Unicode Technical Standard #35:
 *    - `i`: ISO day of week
 *    - `I`: ISO week of year
 *    - `R`: ISO week-numbering year
 *    - `t`: seconds timestamp
 *    - `T`: milliseconds timestamp
 *    - `o`: ordinal number modifier
 *    - `P`: long localized date
 *    - `p`: long localized time
 *
 * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
 *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
 *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 *
 * @param {Date|Number} date - the original date
 * @param {String} format - the string of tokens
 * @param {Object} [options] - an object with options.
 * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
 * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
 * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
 * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
 *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
 *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @returns {String} the formatted date string
 * @throws {TypeError} 2 arguments required
 * @throws {RangeError} `date` must not be Invalid Date
 * @throws {RangeError} `options.locale` must contain `localize` property
 * @throws {RangeError} `options.locale` must contain `formatLong` property
 * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
 * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
 * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
 * @throws {RangeError} format string contains an unescaped latin alphabet character
 *
 * @example
 * // Represent 11 February 2014 in middle-endian format:
 * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
 * //=> '02/11/2014'
 *
 * @example
 * // Represent 2 July 2014 in Esperanto:
 * import { eoLocale } from 'date-fns/locale/eo'
 * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
 *   locale: eoLocale
 * })
 * //=> '2-a de julio 2014'
 *
 * @example
 * // Escape string by single quote characters:
 * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
 * //=> "3 o'clock"
 */function y(e,t,r){var m,g,y,w,x,E,Z,S,O,k,T,C,R,A,M,P,D,I;(0,d/* ["default"] */.Z)(2,arguments);var L=String(t);var F=(0,f/* .getDefaultOptions */.j)();var N=(m=(g=r===null||r===void 0?void 0:r.locale)!==null&&g!==void 0?g:F.locale)!==null&&m!==void 0?m:p/* ["default"] */.Z;var j=(0,c/* ["default"] */.Z)((y=(w=(x=(E=r===null||r===void 0?void 0:r.firstWeekContainsDate)!==null&&E!==void 0?E:r===null||r===void 0?void 0:(Z=r.locale)===null||Z===void 0?void 0:(S=Z.options)===null||S===void 0?void 0:S.firstWeekContainsDate)!==null&&x!==void 0?x:F.firstWeekContainsDate)!==null&&w!==void 0?w:(O=F.locale)===null||O===void 0?void 0:(k=O.options)===null||k===void 0?void 0:k.firstWeekContainsDate)!==null&&y!==void 0?y:1);// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
if(!(j>=1&&j<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var B=(0,c/* ["default"] */.Z)((T=(C=(R=(A=r===null||r===void 0?void 0:r.weekStartsOn)!==null&&A!==void 0?A:r===null||r===void 0?void 0:(M=r.locale)===null||M===void 0?void 0:(P=M.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&R!==void 0?R:F.weekStartsOn)!==null&&C!==void 0?C:(D=F.locale)===null||D===void 0?void 0:(I=D.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&T!==void 0?T:0);// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
if(!(B>=0&&B<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(!N.localize){throw new RangeError("locale must contain localize property")}if(!N.formatLong){throw new RangeError("locale must contain formatLong property")}var U=(0,a["default"])(e);if(!(0,n["default"])(U)){throw new RangeError("Invalid time value")}// Convert the date in system timezone to the same date in UTC+00:00 timezone.
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
var W=(0,u/* ["default"] */.Z)(U);var z=(0,i/* ["default"] */.Z)(U,W);var J={firstWeekContainsDate:j,weekStartsOn:B,locale:N,_originalDate:U};var q=L.match(v).map(function(e){var t=e[0];if(t==="p"||t==="P"){var r=s/* ["default"] */.Z[t];return r(e,N.formatLong)}return e}).join("").match(h).map(function(n){// Replace two single quote characters with one single quote character
if(n==="''"){return"'"}var i=n[0];if(i==="'"){return _(n)}var a=o/* ["default"] */.Z[i];if(a){if(!(r!==null&&r!==void 0&&r.useAdditionalWeekYearTokens)&&(0,l/* .isProtectedWeekYearToken */.Do)(n)){(0,l/* .throwProtectedError */.qp)(n,t,String(e))}if(!(r!==null&&r!==void 0&&r.useAdditionalDayOfYearTokens)&&(0,l/* .isProtectedDayOfYearToken */.Iu)(n)){(0,l/* .throwProtectedError */.qp)(n,t,String(e))}return a(z,n,N.localize,J)}if(i.match(b)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`")}return n}).join("");return q}function _(e){var t=e.match(m);if(!t){return e}return t[1].replace(g,"'")}},313:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* ESM import */var n=r(19013);/* ESM import */var i=r(13882);/**
 * @name isBefore
 * @category Common Helpers
 * @summary Is the first date before the second one?
 *
 * @description
 * Is the first date before the second one?
 *
 * @param {Date|Number} date - the date that should be before the other one to return true
 * @param {Date|Number} dateToCompare - the date to compare with
 * @returns {Boolean} the first date is before the second date
 * @throws {TypeError} 2 arguments required
 *
 * @example
 * // Is 10 July 1989 before 11 February 1987?
 * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
 * //=> false
 */function a(e,t){(0,i/* ["default"] */.Z)(2,arguments);var r=(0,n["default"])(e);var a=(0,n["default"])(t);return r.getTime()<a.getTime()}},71381:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* ESM import */var n=r(58133);/* ESM import */var i=r(13882);/**
 * @name isDate
 * @category Common Helpers
 * @summary Is the given value a date?
 *
 * @description
 * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
 *
 * @param {*} value - the value to check
 * @returns {boolean} true if the given value is a date
 * @throws {TypeError} 1 arguments required
 *
 * @example
 * // For a valid date:
 * const result = isDate(new Date())
 * //=> true
 *
 * @example
 * // For an invalid date:
 * const result = isDate(new Date(NaN))
 * //=> true
 *
 * @example
 * // For some value:
 * const result = isDate('2014-02-31')
 * //=> false
 *
 * @example
 * // For an object:
 * const result = isDate({})
 * //=> false
 */function a(e){(0,i/* ["default"] */.Z)(1,arguments);return e instanceof Date||(0,n/* ["default"] */.Z)(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}},12274:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>o});/* ESM import */var n=r(71381);/* ESM import */var i=r(19013);/* ESM import */var a=r(13882);/**
 * @name isValid
 * @category Common Helpers
 * @summary Is the given date valid?
 *
 * @description
 * Returns false if argument is Invalid Date and true otherwise.
 * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
 * Invalid Date is a Date, whose time value is NaN.
 *
 * Time value of Date: http://es5.github.io/#x15.9.1.1
 *
 * @param {*} date - the date to check
 * @returns {Boolean} the date is valid
 * @throws {TypeError} 1 argument required
 *
 * @example
 * // For the valid date:
 * const result = isValid(new Date(2014, 1, 31))
 * //=> true
 *
 * @example
 * // For the value, convertable into a date:
 * const result = isValid(1393804800000)
 * //=> true
 *
 * @example
 * // For the invalid date:
 * const result = isValid(new Date(''))
 * //=> false
 */function o(e){(0,a/* ["default"] */.Z)(1,arguments);if(!(0,n["default"])(e)&&typeof e!=="number"){return false}var t=(0,i["default"])(e);return!isNaN(Number(t))}},49526:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};// TODO: Remove String()
var r=t.width?String(t.width):e.defaultWidth;var n=e.formats[r]||e.formats[e.defaultWidth];return n}}},88486:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return function(t,r){var n=r!==null&&r!==void 0&&r.context?String(r.context):"standalone";var i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth;var o=r!==null&&r!==void 0&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth;var u=r!==null&&r!==void 0&&r.width?String(r.width):e.defaultWidth;i=e.values[u]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;// @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
return i[l]}}},76723:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return function(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=r.width;var o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth];var s=t.match(o);if(!s){return null}var u=s[0];var l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth];var c=Array.isArray(l)?a(l,function(e){return e.test(u)}):i(l,function(e){return e.test(u)});var d;d=e.valueCallback?e.valueCallback(c):c;d=r.valueCallback?r.valueCallback(d):d;var f=t.slice(u.length);return{value:d,rest:f}}}function i(e,t){for(var r in e){if(e.hasOwnProperty(r)&&t(e[r])){return r}}return undefined}function a(e,t){for(var r=0;r<e.length;r++){if(t(e[r])){return r}}return undefined}},60974:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return function(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=t.match(e.matchPattern);if(!n)return null;var i=n[0];var a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}},81991:function(e,t,r){"use strict";r.d(t,{Z:()=>a});var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var i=function e(e,t,r){var i;var a=n[e];if(typeof a==="string"){i=a}else if(t===1){i=a.one}else{i=a.other.replace("{{count}}",t.toString())}if(r!==null&&r!==void 0&&r.addSuffix){if(r.comparison&&r.comparison>0){return"in "+i}else{return i+" ago"}}return i};/* ESM default export */const a=i},72763:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(49526);var i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};var a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};var o={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};var s={date:(0,n/* ["default"] */.Z)({formats:i,defaultWidth:"full"}),time:(0,n/* ["default"] */.Z)({formats:a,defaultWidth:"full"}),dateTime:(0,n/* ["default"] */.Z)({formats:o,defaultWidth:"full"})};/* ESM default export */const u=s},21865:function(e,t,r){"use strict";r.d(t,{Z:()=>a});var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var i=function e(e,t,r,i){return n[e]};/* ESM default export */const a=i},11950:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(88486);var i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};var a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
var o={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};var s={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};var u={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};var l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};var c=function e(e,t){var r=Number(e);// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
var n=r%100;if(n>20||n<10){switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}}return r+"th"};var d={ordinalNumber:c,era:(0,n/* ["default"] */.Z)({values:i,defaultWidth:"wide"}),quarter:(0,n/* ["default"] */.Z)({values:a,defaultWidth:"wide",argumentCallback:function e(e){return e-1}}),month:(0,n/* ["default"] */.Z)({values:o,defaultWidth:"wide"}),day:(0,n/* ["default"] */.Z)({values:s,defaultWidth:"wide"}),dayPeriod:(0,n/* ["default"] */.Z)({values:u,defaultWidth:"wide",formattingValues:l,defaultFormattingWidth:"wide"})};/* ESM default export */const f=d},7219:function(e,t,r){"use strict";r.d(t,{Z:()=>b});/* ESM import */var n=r(76723);/* ESM import */var i=r(60974);var a=/^(\d+)(th|st|nd|rd)?/i;var o=/\d+/i;var s={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};var u={any:[/^b/i,/^(a|c)/i]};var l={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};var c={any:[/1/i,/2/i,/3/i,/4/i]};var d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};var f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};var p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};var h={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};var v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};var m={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};var g={ordinalNumber:(0,i/* ["default"] */.Z)({matchPattern:a,parsePattern:o,valueCallback:function e(e){return parseInt(e,10)}}),era:(0,n/* ["default"] */.Z)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any"}),quarter:(0,n/* ["default"] */.Z)({matchPatterns:l,defaultMatchWidth:"wide",parsePatterns:c,defaultParseWidth:"any",valueCallback:function e(e){return e+1}}),month:(0,n/* ["default"] */.Z)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,n/* ["default"] */.Z)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),dayPeriod:(0,n/* ["default"] */.Z)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:m,defaultParseWidth:"any"})};/* ESM default export */const b=g},8493:function(e,t,r){"use strict";r.d(t,{Z:()=>l});/* ESM import */var n=r(81991);/* ESM import */var i=r(72763);/* ESM import */var a=r(21865);/* ESM import */var o=r(11950);/* ESM import */var s=r(7219);/**
 * @type {Locale}
 * @category Locales
 * @summary English locale (United States).
 * @language English
 * @iso-639-2 eng
 * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
 * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
 */var u={code:"en-US",formatDistance:n/* ["default"] */.Z,formatLong:i/* ["default"] */.Z,formatRelative:a/* ["default"] */.Z,localize:o/* ["default"] */.Z,match:s/* ["default"] */.Z,options:{weekStartsOn:0/* Sunday */,firstWeekContainsDate:1}};/* ESM default export */const l=u},23855:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>o});/* ESM import */var n=r(36948);/* ESM import */var i=r(13882);/* ESM import */var a=r(83946);/**
 * @name parseISO
 * @category Common Helpers
 * @summary Parse ISO string
 *
 * @description
 * Parse the given string in ISO 8601 format and return an instance of Date.
 *
 * Function accepts complete ISO 8601 formats as well as partial implementations.
 * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
 *
 * If the argument isn't a string, the function cannot parse the string or
 * the values are invalid, it returns Invalid Date.
 *
 * @param {String} argument - the value to convert
 * @param {Object} [options] - an object with options.
 * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format
 * @returns {Date} the parsed date in the local time zone
 * @throws {TypeError} 1 argument required
 * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
 *
 * @example
 * // Convert string '2014-02-11T11:30:30' to date:
 * const result = parseISO('2014-02-11T11:30:30')
 * //=> Tue Feb 11 2014 11:30:30
 *
 * @example
 * // Convert string '+02014101' to date,
 * // if the additional number of digits in the extended year format is 1:
 * const result = parseISO('+02014101', { additionalDigits: 1 })
 * //=> Fri Apr 11 2014 00:00:00
 */function o(e,t){var r;(0,i/* ["default"] */.Z)(1,arguments);var n=(0,a/* ["default"] */.Z)((r=t===null||t===void 0?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0){throw new RangeError("additionalDigits must be 0, 1 or 2")}if(!(typeof e==="string"||Object.prototype.toString.call(e)==="[object String]")){return new Date(NaN)}var o=d(e);var s;if(o.date){var u=f(o.date,n);s=p(u.restDateString,u.year)}if(!s||isNaN(s.getTime())){return new Date(NaN)}var l=s.getTime();var c=0;var h;if(o.time){c=v(o.time);if(isNaN(c)){return new Date(NaN)}}if(o.timezone){h=g(o.timezone);if(isNaN(h)){return new Date(NaN)}}else{var m=new Date(l+c);// js parsed string assuming it's in UTC timezone
// but we need it to be parsed in our timezone
// so we use utc values to build date in our timezone.
// Year values from 0 to 99 map to the years 1900 to 1999
// so set year explicitly with setFullYear.
var b=new Date(0);b.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate());b.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds());return b}return new Date(l+c+h)}var s={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/};var u=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;var l=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;var c=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e){var t={};var r=e.split(s.dateTimeDelimiter);var n;// The regex match should only return at maximum two array elements.
// [date], [time], or [date, time].
if(r.length>2){return t}if(/:/.test(r[0])){n=r[0]}else{t.date=r[0];n=r[1];if(s.timeZoneDelimiter.test(t.date)){t.date=e.split(s.timeZoneDelimiter)[0];n=e.substr(t.date.length,e.length)}}if(n){var i=s.timezone.exec(n);if(i){t.time=n.replace(i[1],"");t.timezone=i[1]}else{t.time=n}}return t}function f(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)");var n=e.match(r);// Invalid ISO-formatted year
if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null;var a=n[2]?parseInt(n[2]):null;// either year or century is null, not both
return{year:a===null?i:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function p(e,t){// Invalid ISO-formatted year
if(t===null)return new Date(NaN);var r=e.match(u);// Invalid ISO-formatted string
if(!r)return new Date(NaN);var n=!!r[4];var i=h(r[1]);var a=h(r[2])-1;var o=h(r[3]);var s=h(r[4]);var l=h(r[5])-1;if(n){if(!E(t,s,l)){return new Date(NaN)}return b(t,s,l)}else{var c=new Date(0);if(!w(t,a,o)||!x(t,i)){return new Date(NaN)}c.setUTCFullYear(t,a,Math.max(i,o));return c}}function h(e){return e?parseInt(e):1}function v(e){var t=e.match(l);if(!t)return NaN;// Invalid ISO-formatted time
var r=m(t[1]);var i=m(t[2]);var a=m(t[3]);if(!Z(r,i,a)){return NaN}return r*n/* .millisecondsInHour */.vh+i*n/* .millisecondsInMinute */.yJ+a*1e3}function m(e){return e&&parseFloat(e.replace(",","."))||0}function g(e){if(e==="Z")return 0;var t=e.match(c);if(!t)return 0;var r=t[1]==="+"?-1:1;var i=parseInt(t[2]);var a=t[3]&&parseInt(t[3])||0;if(!S(i,a)){return NaN}return r*(i*n/* .millisecondsInHour */.vh+a*n/* .millisecondsInMinute */.yJ)}function b(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7;var a=(t-1)*7+r+1-i;n.setUTCDate(n.getUTCDate()+a);return n}// Validation functions
// February is null to handle the leap year (using ||)
var y=[31,null,31,30,31,30,31,31,30,31,30,31];function _(e){return e%400===0||e%4===0&&e%100!==0}function w(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(y[t]||(_(e)?29:28))}function x(e,t){return t>=1&&t<=(_(e)?366:365)}function E(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function Z(e,t,r){if(e===24){return t===0&&r===0}return r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function S(e,t){return t>=0&&t<=59}},91218:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(51820);/* ESM import */var i=r(13882);/* ESM import */var a=r(83946);/**
 * @name subMilliseconds
 * @category Millisecond Helpers
 * @summary Subtract the specified number of milliseconds from the given date.
 *
 * @description
 * Subtract the specified number of milliseconds from the given date.
 *
 * @param {Date|Number} date - the date to be changed
 * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
 * @returns {Date} the new date with the milliseconds subtracted
 * @throws {TypeError} 2 arguments required
 *
 * @example
 * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
 * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
 * //=> Thu Jul 10 2014 12:45:29.250
 */function o(e,t){(0,i/* ["default"] */.Z)(2,arguments);var r=(0,a/* ["default"] */.Z)(t);return(0,n/* ["default"] */.Z)(e,-r)}},19013:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* ESM import */var n=r(58133);/* ESM import */var i=r(13882);/**
 * @name toDate
 * @category Common Helpers
 * @summary Convert the given argument to an instance of Date.
 *
 * @description
 * Convert the given argument to an instance of Date.
 *
 * If the argument is an instance of Date, the function returns its clone.
 *
 * If the argument is a number, it is treated as a timestamp.
 *
 * If the argument is none of the above, the function returns Invalid Date.
 *
 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
 *
 * @param {Date|Number} argument - the value to convert
 * @returns {Date} the parsed date in the local time zone
 * @throws {TypeError} 1 argument required
 *
 * @example
 * // Clone the date:
 * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
 * //=> Tue Feb 11 2014 11:30:30
 *
 * @example
 * // Convert the timestamp to date:
 * const result = toDate(1392098430000)
 * //=> Tue Feb 11 2014 11:30:30
 */function a(e){(0,i/* ["default"] */.Z)(1,arguments);var t=Object.prototype.toString.call(e);// Clone the date
if(e instanceof Date||(0,n/* ["default"] */.Z)(e)==="object"&&t==="[object Date]"){// Prevent the date to lose the milliseconds when passed to new Date() in IE10
return new Date(e.getTime())}else if(typeof e==="number"||t==="[object Number]"){return new Date(e)}else{if((typeof e==="string"||t==="[object String]")&&typeof console!=="undefined"){// eslint-disable-next-line no-console
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");// eslint-disable-next-line no-console
console.warn(new Error().stack)}return new Date(NaN)}}},17187:function(e){"use strict";// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var t=typeof Reflect==="object"?Reflect:null;var r=t&&typeof t.apply==="function"?t.apply:function e(e,t,r){return Function.prototype.apply.call(e,t,r)};var n;if(t&&typeof t.ownKeys==="function"){n=t.ownKeys}else if(Object.getOwnPropertySymbols){n=function e(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}}else{n=function e(e){return Object.getOwnPropertyNames(e)}}function i(e){if(console&&console.warn)console.warn(e)}var a=Number.isNaN||function e(e){return e!==e};function o(){o.init.call(this)}e.exports=o;e.exports.once=b;// Backwards-compat with node 0.10.x
o.EventEmitter=o;o.prototype._events=undefined;o.prototype._eventsCount=0;o.prototype._maxListeners=undefined;// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
var s=10;function u(e){if(typeof e!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:true,get:function(){return s},set:function(e){if(typeof e!=="number"||e<0||a(e)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".")}s=e}});o.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
o.prototype.setMaxListeners=function e(e){if(typeof e!=="number"||e<0||a(e)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".")}this._maxListeners=e;return this};function l(e){if(e._maxListeners===undefined)return o.defaultMaxListeners;return e._maxListeners}o.prototype.getMaxListeners=function e(){return l(this)};o.prototype.emit=function e(e){var t=[];for(var n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error";var a=this._events;if(a!==undefined)i=i&&a.error===undefined;else if(!i)return false;// If there is no 'error' event listener then throw.
if(i){var o;if(t.length>0)o=t[0];if(o instanceof Error){// Note: The comments on the `throw` lines are intentional, they show
// up in Node's output if this results in an unhandled exception.
throw o;// Unhandled 'error' event
}// At least give some kind of context to the user
var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));s.context=o;throw s;// Unhandled 'error' event
}var u=a[e];if(u===undefined)return false;if(typeof u==="function"){r(u,this,t)}else{var l=u.length;var c=v(u,l);for(var n=0;n<l;++n)r(c[n],this,t)}return true};function c(e,t,r,n){var a;var o;var s;u(r);o=e._events;if(o===undefined){o=e._events=Object.create(null);e._eventsCount=0}else{// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if(o.newListener!==undefined){e.emit("newListener",t,r.listener?r.listener:r);// Re-assign `events` because a newListener handler could have caused the
// this._events to be assigned to a new object
o=e._events}s=o[t]}if(s===undefined){// Optimize the case of one listener. Don't need the extra array object.
s=o[t]=r;++e._eventsCount}else{if(typeof s==="function"){// Adding the second element, need to change to array.
s=o[t]=n?[r,s]:[s,r];// If we've already got an array, just append.
}else if(n){s.unshift(r)}else{s.push(r)}// Check for listener leak
a=l(e);if(a>0&&s.length>a&&!s.warned){s.warned=true;// No error code for this since it is a Warning
// eslint-disable-next-line no-restricted-syntax
var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");c.name="MaxListenersExceededWarning";c.emitter=e;c.type=t;c.count=s.length;i(c)}}return e}o.prototype.addListener=function e(e,t){return c(this,e,t,false)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function e(e,t){return c(this,e,t,true)};function d(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function f(e,t,r){var n={fired:false,wrapFn:undefined,target:e,type:t,listener:r};var i=d.bind(n);i.listener=r;n.wrapFn=i;return i}o.prototype.once=function e(e,t){u(t);this.on(e,f(this,e,t));return this};o.prototype.prependOnceListener=function e(e,t){u(t);this.prependListener(e,f(this,e,t));return this};// Emits a 'removeListener' event if and only if the listener was removed.
o.prototype.removeListener=function e(e,t){var r,n,i,a,o;u(t);n=this._events;if(n===undefined)return this;r=n[e];if(r===undefined)return this;if(r===t||r.listener===t){if(--this._eventsCount===0)this._events=Object.create(null);else{delete n[e];if(n.removeListener)this.emit("removeListener",e,r.listener||t)}}else if(typeof r!=="function"){i=-1;for(a=r.length-1;a>=0;a--){if(r[a]===t||r[a].listener===t){o=r[a].listener;i=a;break}}if(i<0)return this;if(i===0)r.shift();else{m(r,i)}if(r.length===1)n[e]=r[0];if(n.removeListener!==undefined)this.emit("removeListener",e,o||t)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function e(e){var t,r,n;r=this._events;if(r===undefined)return this;// not listening for removeListener, no need to emit
if(r.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(r[e]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete r[e]}return this}// emit removeListener for all listeners on all events
if(arguments.length===0){var i=Object.keys(r);var a;for(n=0;n<i.length;++n){a=i[n];if(a==="removeListener")continue;this.removeAllListeners(a)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}t=r[e];if(typeof t==="function"){this.removeListener(e,t)}else if(t!==undefined){// LIFO order
for(n=t.length-1;n>=0;n--){this.removeListener(e,t[n])}}return this};function p(e,t,r){var n=e._events;if(n===undefined)return[];var i=n[t];if(i===undefined)return[];if(typeof i==="function")return r?[i.listener||i]:[i];return r?g(i):v(i,i.length)}o.prototype.listeners=function e(e){return p(this,e,true)};o.prototype.rawListeners=function e(e){return p(this,e,false)};o.listenerCount=function(e,t){if(typeof e.listenerCount==="function"){return e.listenerCount(t)}else{return h.call(e,t)}};o.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==undefined){var r=t[e];if(typeof r==="function"){return 1}else if(r!==undefined){return r.length}}return 0}o.prototype.eventNames=function e(){return this._eventsCount>0?n(this._events):[]};function v(e,t){var r=new Array(t);for(var n=0;n<t;++n)r[n]=e[n];return r}function m(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){var t=new Array(e.length);for(var r=0;r<t.length;++r){t[r]=e[r].listener||e[r]}return t}function b(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,a);n(r)}function a(){if(typeof e.removeListener==="function"){e.removeListener("error",i)}r([].slice.call(arguments))};_(e,t,a,{once:true});if(t!=="error"){y(e,i,{once:true})}})}function y(e,t,r){if(typeof e.on==="function"){_(e,"error",t,r)}}function _(e,t,r,n){if(typeof e.on==="function"){if(n.once){e.once(t,r)}else{e.on(t,r)}}else if(typeof e.addEventListener==="function"){// EventTarget does not have `error` event semantics like Node
// EventEmitters, we do not listen for `error` events here.
e.addEventListener(t,function i(a){// IE does not have builtin `{ once: true }` support so we
// have to do it manually.
if(n.once){e.removeEventListener(t,i)}r(a)})}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}}},8679:function(e,t,r){"use strict";var n=r(59864);/**
 * Copyright 2015, Yahoo! Inc.
 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
 */var i={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true};var a={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var o={"$$typeof":true,render:true,defaultProps:true,displayName:true,propTypes:true};var s={"$$typeof":true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true};var u={};u[n.ForwardRef]=o;u[n.Memo]=s;function l(e){// React v16.11 and below
if(n.isMemo(e)){return s}// React v16.12 and above
return u[e["$$typeof"]]||i}var c=Object.defineProperty;var d=Object.getOwnPropertyNames;var f=Object.getOwnPropertySymbols;var p=Object.getOwnPropertyDescriptor;var h=Object.getPrototypeOf;var v=Object.prototype;function m(e,t,r){if(typeof t!=="string"){// don't hoist over string (html) components
if(v){var n=h(t);if(n&&n!==v){m(e,n,r)}}var i=d(t);if(f){i=i.concat(f(t))}var o=l(e);var s=l(t);for(var u=0;u<i.length;++u){var g=i[u];if(!a[g]&&!(r&&r[g])&&!(s&&s[g])&&!(o&&o[g])){var b=p(t,g);try{// Avoid failures from read-only properties
c(e,g,b)}catch(e){}}}}return e}e.exports=m},54740:function(e,t,r){"use strict";t.__esModule=true;t["default"]=v;var n=o(r(48987));var i=o(r(93848));var a=o(r(5598));function o(e){return e&&e.__esModule?e:{"default":e}}var s=/^#[a-fA-F0-9]{6}$/;var u=/^#[a-fA-F0-9]{8}$/;var l=/^#[a-fA-F0-9]{3}$/;var c=/^#[a-fA-F0-9]{4}$/;var d=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;var f=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;var p=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;var h=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;/**
 * Returns an RgbColor or RgbaColor object. This utility function is only useful
 * if want to extract a color component. With the color util `toColorString` you
 * can convert a RgbColor or RgbaColor object back to a string.
 *
 * @example
 * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
 * const color1 = parseToRgb('rgb(255, 0, 0)');
 * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
 * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
 */function v(e){if(typeof e!=="string"){throw new a["default"](3)}var t=(0,i["default"])(e);if(t.match(s)){return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)}}if(t.match(u)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(l)){return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)}}if(t.match(c)){var o=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:o}}var v=d.exec(t);if(v){return{red:parseInt(""+v[1],10),green:parseInt(""+v[2],10),blue:parseInt(""+v[3],10)}}var m=f.exec(t.substring(0,50));if(m){return{red:parseInt(""+m[1],10),green:parseInt(""+m[2],10),blue:parseInt(""+m[3],10),alpha:parseFloat(""+m[4])>1?parseFloat(""+m[4])/100:parseFloat(""+m[4])}}var g=p.exec(t);if(g){var b=parseInt(""+g[1],10);var y=parseInt(""+g[2],10)/100;var _=parseInt(""+g[3],10)/100;var w="rgb("+(0,n["default"])(b,y,_)+")";var x=d.exec(w);if(!x){throw new a["default"](4,t,w)}return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10)}}var E=h.exec(t.substring(0,50));if(E){var Z=parseInt(""+E[1],10);var S=parseInt(""+E[2],10)/100;var O=parseInt(""+E[3],10)/100;var k="rgb("+(0,n["default"])(Z,S,O)+")";var T=d.exec(k);if(!T){throw new a["default"](4,t,k)}return{red:parseInt(""+T[1],10),green:parseInt(""+T[2],10),blue:parseInt(""+T[3],10),alpha:parseFloat(""+E[4])>1?parseFloat(""+E[4])/100:parseFloat(""+E[4])}}throw new a["default"](5)}e.exports=t["default"]},7782:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=o(r(81480));var i=o(r(1294));var a=o(r(5598));function o(e){return e&&e.__esModule?e:{"default":e}}/**
 * Returns a string value for the color. The returned result is the smallest possible hex notation.
 *
 * @example
 * // Styles as object usage
 * const styles = {
 *   background: rgb(255, 205, 100),
 *   background: rgb({ red: 255, green: 205, blue: 100 }),
 * }
 *
 * // styled-components usage
 * const div = styled.div`
 *   background: ${rgb(255, 205, 100)};
 *   background: ${rgb({ red: 255, green: 205, blue: 100 })};
 * `
 *
 * // CSS in JS Output
 *
 * element {
 *   background: "#ffcd64";
 *   background: "#ffcd64";
 * }
 */function s(e,t,r){if(typeof e==="number"&&typeof t==="number"&&typeof r==="number"){return(0,n["default"])("#"+(0,i["default"])(e)+(0,i["default"])(t)+(0,i["default"])(r))}else if(typeof e==="object"&&t===undefined&&r===undefined){return(0,n["default"])("#"+(0,i["default"])(e.red)+(0,i["default"])(e.green)+(0,i["default"])(e.blue))}throw new a["default"](6)}e.exports=t["default"]},86138:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=o(r(54740));var i=o(r(7782));var a=o(r(5598));function o(e){return e&&e.__esModule?e:{"default":e}}/**
 * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
 *
 * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
 *
 * @example
 * // Styles as object usage
 * const styles = {
 *   background: rgba(255, 205, 100, 0.7),
 *   background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
 *   background: rgba(255, 205, 100, 1),
 *   background: rgba('#ffffff', 0.4),
 *   background: rgba('black', 0.7),
 * }
 *
 * // styled-components usage
 * const div = styled.div`
 *   background: ${rgba(255, 205, 100, 0.7)};
 *   background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
 *   background: ${rgba(255, 205, 100, 1)};
 *   background: ${rgba('#ffffff', 0.4)};
 *   background: ${rgba('black', 0.7)};
 * `
 *
 * // CSS in JS Output
 *
 * element {
 *   background: "rgba(255,205,100,0.7)";
 *   background: "rgba(255,205,100,0.7)";
 *   background: "#ffcd64";
 *   background: "rgba(255,255,255,0.4)";
 *   background: "rgba(0,0,0,0.7)";
 * }
 */function s(e,t,r,o){if(typeof e==="string"&&typeof t==="number"){var s=(0,n["default"])(e);return"rgba("+s.red+","+s.green+","+s.blue+","+t+")"}else if(typeof e==="number"&&typeof t==="number"&&typeof r==="number"&&typeof o==="number"){return o>=1?(0,i["default"])(e,t,r):"rgba("+e+","+t+","+r+","+o+")"}else if(typeof e==="object"&&t===undefined&&r===undefined&&o===undefined){return e.alpha>=1?(0,i["default"])(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new a["default"](7)}e.exports=t["default"]},5598:function(e,t){"use strict";t.__esModule=true;t["default"]=void 0;function r(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function n(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;u(e,t)}function i(e){var t=typeof Map==="function"?new Map:undefined;i=function e(e){if(e===null||!s(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof t!=="undefined"){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,l(this).constructor)}r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}});return u(r,e)};return i(e)}function a(e,t,r){if(o())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&u(i,r.prototype),i}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function t(){return!!e})()}function s(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e==="function"}}function u(e,t){u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(e,t){e.__proto__=t;return e};return u(e,t)}function l(e){l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function e(e){return e.__proto__||Object.getPrototypeOf(e)};return l(e)}// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
/**
 * Parse errors.md and turn it into a simple hash of code: message
 * @private
 */var c=/* unused pure expression or super */null&&{"1":"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n","2":"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n","3":"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n","4":"Couldn't generate valid rgb string from %s, it returned %s.\n\n","5":"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n","6":"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n","7":"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n","8":"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n","9":"Please provide a number of steps to the modularScale helper.\n\n","10":"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n","11":'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',"12":'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',"13":'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',"14":'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',"15":'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',"16":"You must provide a template to this method.\n\n","17":"You passed an unsupported selector state to this method.\n\n","18":"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n","19":"fromSize and toSize must be provided as stringified numbers with the same units.\n\n","20":"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n","21":"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n","22":"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n","23":"fontFace expects a name of a font-family.\n\n","24":"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n","25":"fontFace expects localFonts to be an array.\n\n","26":"fontFace expects fileFormats to be an array.\n\n","27":"radialGradient requries at least 2 color-stops to properly render.\n\n","28":"Please supply a filename to retinaImage() as the first argument.\n\n","29":"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n","30":"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n","31":"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n","32":"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n","33":"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n","34":"borderRadius expects a radius value as a string or number as the second argument.\n\n","35":'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',"36":"Property must be a string value.\n\n","37":"Syntax Error at %s.\n\n","38":"Formula contains a function that needs parentheses at %s.\n\n","39":"Formula is missing closing parenthesis at %s.\n\n","40":"Formula has too many closing parentheses at %s.\n\n","41":"All values in a formula must have the same unit or be unitless.\n\n","42":"Please provide a number of steps to the modularScale helper.\n\n","43":"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n","44":"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n","45":"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n","46":"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n","47":"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n","48":"fromSize and toSize must be provided as stringified numbers with the same units.\n\n","49":"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n","50":"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n","51":"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n","52":"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n","53":"fontFace expects localFonts to be an array.\n\n","54":"fontFace expects fileFormats to be an array.\n\n","55":"fontFace expects a name of a font-family.\n\n","56":"linearGradient requries at least 2 color-stops to properly render.\n\n","57":"radialGradient requries at least 2 color-stops to properly render.\n\n","58":"Please supply a filename to retinaImage() as the first argument.\n\n","59":"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n","60":"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n","61":"Property must be a string value.\n\n","62":"borderRadius expects a radius value as a string or number as the second argument.\n\n","63":'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',"64":"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n","65":"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n","66":"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n","67":"You must provide a template to this method.\n\n","68":"You passed an unsupported selector state to this method.\n\n","69":'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',"70":'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',"71":'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',"72":'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',"73":"Please provide a valid CSS variable.\n\n","74":"CSS variable not found and no default was provided.\n\n","75":"important requires a valid style object, got a %s instead.\n\n","76":"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n","77":'remToPx expects a value in "rem" but you provided it in "%s".\n\n',"78":'base must be set in "px" or "%" but you set it in "%s".\n'};/**
 * super basic version of sprintf
 * @private
 */function d(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=t[0];var i=[];var a;for(a=1;a<t.length;a+=1){i.push(t[a])}i.forEach(function(e){n=n.replace(/%[a-z]/,e)});return n}/**
 * Create an error file out of errors.md for development and a simple web link to the full errors
 * in production mode.
 * @private
 */var f=t["default"]=/*#__PURE__*/function(e){n(t,e);function t(t){var n;if(true){n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this}else{var i,a,o}return r(n)}return t}(/*#__PURE__*/i(Error));e.exports=t["default"]},48987:function(e,t){"use strict";t.__esModule=true;t["default"]=void 0;function r(e){return Math.round(e*255)}function n(e,t,n){return r(e)+","+r(t)+","+r(n)}function i(e,t,r,i){if(i===void 0){i=n}if(t===0){// achromatic
return i(r,r,r)}// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
var a=(e%360+360)%360/60;var o=(1-Math.abs(2*r-1))*t;var s=o*(1-Math.abs(a%2-1));var u=0;var l=0;var c=0;if(a>=0&&a<1){u=o;l=s}else if(a>=1&&a<2){u=s;l=o}else if(a>=2&&a<3){l=o;c=s}else if(a>=3&&a<4){l=s;c=o}else if(a>=4&&a<5){u=s;c=o}else if(a>=5&&a<6){u=o;c=s}var d=r-o/2;var f=u+d;var p=l+d;var h=c+d;return i(f,p,h)}var a=t["default"]=i;e.exports=t["default"]},93848:function(e,t){"use strict";t.__esModule=true;t["default"]=void 0;var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};/**
 * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
 * @private
 */function n(e){if(typeof e!=="string")return e;var t=e.toLowerCase();return r[t]?"#"+r[t]:e}var i=t["default"]=n;e.exports=t["default"]},1294:function(e,t){"use strict";t.__esModule=true;t["default"]=void 0;function r(e){var t=e.toString(16);return t.length===1?"0"+t:t}var n=t["default"]=r;e.exports=t["default"]},81480:function(e,t){"use strict";t.__esModule=true;t["default"]=void 0;/**
 * Reduces hex values if possible e.g. #ff8866 to #f86
 * @private
 */var r=function e(e){if(e.length===7&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]){return"#"+e[1]+e[3]+e[5]}return e};var n=t["default"]=r;e.exports=t["default"]},62587:function(e){"use strict";// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&";n=n||"=";var a={};if(typeof e!=="string"||e.length===0){return a}var o=/\+/g;e=e.split(r);var s=1e3;if(i&&typeof i.maxKeys==="number"){s=i.maxKeys}var u=e.length;// maxKeys <= 0 means that we should not limit keys count
if(s>0&&u>s){u=s}for(var l=0;l<u;++l){var c=e[l].replace(o,"%20"),d=c.indexOf(n),f,p,h,v;if(d>=0){f=c.substr(0,d);p=c.substr(d+1)}else{f=c;p=""}h=decodeURIComponent(f);v=decodeURIComponent(p);if(!t(a,h)){a[h]=v}else if(Array.isArray(a[h])){a[h].push(v)}else{a[h]=[a[h],v]}}return a}},12361:function(e){"use strict";// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){r=r||"&";n=n||"=";if(e===null){e=undefined}if(typeof e==="object"){return Object.keys(e).map(function(i){var a=encodeURIComponent(t(i))+n;if(Array.isArray(e[i])){return e[i].map(function(e){return a+encodeURIComponent(t(e))}).join(r)}else{return a+encodeURIComponent(t(e[i]))}}).filter(Boolean).join(r)}if(!i)return"";return encodeURIComponent(t(i))+n+encodeURIComponent(t(e))}},17673:function(e,t,r){"use strict";var n;n=/* unused reexport */r(62587);n=t.stringify=r(12361)},20745:function(e,t,r){"use strict";var n=r(61533);if(true){t.createRoot=n.createRoot;t.hydrateRoot=n.hydrateRoot}else{var i}},69921:function(e,t){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,y=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case c:case d:case a:case s:case o:case p:return e;default:switch(e=e&&e.$$typeof,e){case l:case f:case m:case v:case u:return e;default:return t}}case i:return t}}}function x(e){return w(e)===d}t.AsyncMode=c;t.ConcurrentMode=d;t.ContextConsumer=l;t.ContextProvider=u;t.Element=n;t.ForwardRef=f;t.Fragment=a;t.Lazy=m;t.Memo=v;t.Portal=i;t.Profiler=s;t.StrictMode=o;t.Suspense=p;t.isAsyncMode=function(e){return x(e)||w(e)===c};t.isConcurrentMode=x;t.isContextConsumer=function(e){return w(e)===l};t.isContextProvider=function(e){return w(e)===u};t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n};t.isForwardRef=function(e){return w(e)===f};t.isFragment=function(e){return w(e)===a};t.isLazy=function(e){return w(e)===m};t.isMemo=function(e){return w(e)===v};t.isPortal=function(e){return w(e)===i};t.isProfiler=function(e){return w(e)===s};t.isStrictMode=function(e){return w(e)===o};t.isSuspense=function(e){return w(e)===p};t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===s||e===o||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===_||e.$$typeof===g)};t.typeOf=w},59864:function(e,t,r){"use strict";if(true){e.exports=r(69921)}else{}},89250:function(e,t,r){"use strict";r.d(t,{$A:()=>eo,F0:()=>ev,Fg:()=>ef,TH:()=>m,V$:()=>T,j3:()=>ep,s0:()=>w});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);/* ESM import */var a=r(12599);/**
 * React Router v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function o(){o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return o.apply(this,arguments)}// Create react-specific types from the agnostic types in @remix-run/router to
// export from react-router
const s=/*#__PURE__*/n.createContext(null);if(false){}const u=/*#__PURE__*/n.createContext(null);if(false){}const l=/*#__PURE__*/n.createContext(null);if(false){}/**
 * A Navigator is a "location changer"; it's how you get to different locations.
 *
 * Every history instance conforms to the Navigator interface, but the
 * distinction is useful primarily when it comes to the low-level `<Router>` API
 * where both the location and a navigator must be provided separately in order
 * to avoid "tearing" that may occur in a suspense-enabled app if the action
 * and/or location were to be read directly from the history instance.
 */const c=/*#__PURE__*/n.createContext(null);if(false){}const d=/*#__PURE__*/n.createContext(null);if(false){}const f=/*#__PURE__*/n.createContext({outlet:null,matches:[],isDataRoute:false});if(false){}const p=/*#__PURE__*/n.createContext(null);if(false){}/**
 * Returns the full href for the given "to" value. This is useful for building
 * custom links that are also accessible and preserve right-click behavior.
 *
 * @see https://reactrouter.com/v6/hooks/use-href
 */function h(e,t){let{relative:r}=t===void 0?{}:t;!v()?false?0:UNSAFE_invariant(false):void 0;let{basename:n,navigator:i}=React.useContext(c);let{hash:a,pathname:o,search:s}=k(e,{relative:r});let u=o;// If we're operating within a basename, prepend it to the pathname prior
// to creating the href.  If this is a root navigation, then just use the raw
// basename which allows the basename to have full control over the presence
// of a trailing slash on root links
if(n!=="/"){u=o==="/"?n:joinPaths([n,o])}return i.createHref({pathname:u,search:s,hash:a})}/**
 * Returns true if this component is a descendant of a `<Router>`.
 *
 * @see https://reactrouter.com/v6/hooks/use-in-router-context
 */function v(){return n.useContext(d)!=null}/**
 * Returns the current location object, which represents the current URL in web
 * browsers.
 *
 * Note: If you're using this it may mean you're doing some of your own
 * "routing" in your app, and we'd like to know what your use case is. We may
 * be able to provide something higher-level to better suit your needs.
 *
 * @see https://reactrouter.com/v6/hooks/use-location
 */function m(){!v()?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;return n.useContext(d).location}/**
 * Returns the current navigation action which describes how the router came to
 * the current location, either by a pop, push, or replace on the history stack.
 *
 * @see https://reactrouter.com/v6/hooks/use-navigation-type
 */function g(){return React.useContext(d).navigationType}/**
 * Returns a PathMatch object if the given pattern matches the current URL.
 * This is useful for components that need to know "active" state, e.g.
 * `<NavLink>`.
 *
 * @see https://reactrouter.com/v6/hooks/use-match
 */function b(e){!v()?false?0:UNSAFE_invariant(false):void 0;let{pathname:t}=m();return React.useMemo(()=>matchPath(e,UNSAFE_decodePath(t)),[t,e])}/**
 * The interface for the navigate() function returned from useNavigate().
 */const y=/* unused pure expression or super */null&&"You should call navigate() in a React.useEffect(), not when "+"your component is first rendered.";// Mute warnings for calls to useNavigate in SSR environments
function _(e){let t=n.useContext(c).static;if(!t){// We should be able to get rid of this once react 18.3 is released
// See: https://github.com/facebook/react/pull/26395
// eslint-disable-next-line react-hooks/rules-of-hooks
n.useLayoutEffect(e)}}/**
 * Returns an imperative method for changing the location. Used by `<Link>`s, but
 * may also be used by other elements to change the location.
 *
 * @see https://reactrouter.com/v6/hooks/use-navigate
 */function w(){let{isDataRoute:e}=n.useContext(f);// Conditional usage is OK here because the usage of a data router is static
// eslint-disable-next-line react-hooks/rules-of-hooks
return e?ee():x()}function x(){!v()?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;let e=n.useContext(s);let{basename:t,future:r,navigator:i}=n.useContext(c);let{matches:o}=n.useContext(f);let{pathname:u}=m();let l=JSON.stringify((0,a/* .UNSAFE_getResolveToMatches */.cm)(o,r.v7_relativeSplatPath));let d=n.useRef(false);_(()=>{d.current=true});let p=n.useCallback(function(r,n){if(n===void 0){n={}}false?0:void 0;// Short circuit here since if this happens on first render the navigate
// is useless because we haven't wired up our history listener yet
if(!d.current)return;if(typeof r==="number"){i.go(r);return}let o=(0,a/* .resolveTo */.pC)(r,JSON.parse(l),u,n.relative==="path");// If we're operating within a basename, prepend it to the pathname prior
// to handing off to history (but only if we're not in a data router,
// otherwise it'll prepend the basename inside of the router).
// If this is a root navigation, then we navigate to the raw basename
// which allows the basename to have full control over the presence of a
// trailing slash on root links
if(e==null&&t!=="/"){o.pathname=o.pathname==="/"?t:(0,a/* .joinPaths */.RQ)([t,o.pathname])}(!!n.replace?i.replace:i.push)(o,n.state,n)},[t,i,l,u,e]);return p}const E=/*#__PURE__*/n.createContext(null);/**
 * Returns the context (if provided) for the child route at this level of the route
 * hierarchy.
 * @see https://reactrouter.com/v6/hooks/use-outlet-context
 */function Z(){return React.useContext(E)}/**
 * Returns the element for the child route at this level of the route
 * hierarchy. Used internally by `<Outlet>` to render child routes.
 *
 * @see https://reactrouter.com/v6/hooks/use-outlet
 */function S(e){let t=n.useContext(f).outlet;if(t){return /*#__PURE__*/n.createElement(E.Provider,{value:e},t)}return t}/**
 * Returns an object of key/value pairs of the dynamic params from the current
 * URL that were matched by the route path.
 *
 * @see https://reactrouter.com/v6/hooks/use-params
 */function O(){let{matches:e}=React.useContext(f);let t=e[e.length-1];return t?t.params:{}}/**
 * Resolves the pathname of the given `to` value against the current location.
 *
 * @see https://reactrouter.com/v6/hooks/use-resolved-path
 */function k(e,t){let{relative:r}=t===void 0?{}:t;let{future:n}=React.useContext(c);let{matches:i}=React.useContext(f);let{pathname:a}=m();let o=JSON.stringify(UNSAFE_getResolveToMatches(i,n.v7_relativeSplatPath));return React.useMemo(()=>resolveTo(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}/**
 * Returns the element of the route that matched the current location, prepared
 * with the correct context to render the remainder of the route tree. Route
 * elements in the tree must render an `<Outlet>` to render their child route's
 * element.
 *
 * @see https://reactrouter.com/v6/hooks/use-routes
 */function T(e,t){return C(e,t)}// Internal implementation with accept optional param for RouterProvider usage
function C(e,t,r,i){!v()?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;let{navigator:s}=n.useContext(c);let{matches:u}=n.useContext(f);let l=u[u.length-1];let p=l?l.params:{};let h=l?l.pathname:"/";let g=l?l.pathnameBase:"/";let b=l&&l.route;if(false){}let y=m();let _;if(t){var w;let e=typeof t==="string"?(0,a/* .parsePath */.cP)(t):t;!(g==="/"||((w=e.pathname)==null?void 0:w.startsWith(g)))?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;_=e}else{_=y}let x=_.pathname||"/";let E=x;if(g!=="/"){// Determine the remaining pathname by removing the # of URL segments the
// parentPathnameBase has, instead of removing based on character count.
// This is because we can't guarantee that incoming/outgoing encodings/
// decodings will match exactly.
// We decode paths before matching on a per-segment basis with
// decodeURIComponent(), but we re-encode pathnames via `new URL()` so they
// match what `window.location.pathname` would reflect.  Those don't 100%
// align when it comes to encoded URI characters such as % and &.
//
// So we may end up with:
//   pathname:           "/descendant/a%25b/match"
//   parentPathnameBase: "/descendant/a%b"
//
// And the direct substring removal approach won't work :/
let e=g.replace(/^\//,"").split("/");let t=x.replace(/^\//,"").split("/");E="/"+t.slice(e.length).join("/")}let Z=(0,a/* .matchRoutes */.fp)(e,{pathname:E});if(false){}let S=D(Z&&Z.map(e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,a/* .joinPaths */.RQ)([g,// Re-encode pathnames that were decoded inside matchRoutes
    s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase==="/"?g:(0,a/* .joinPaths */.RQ)([g,// Re-encode pathnames that were decoded inside matchRoutes
    s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),u,r,i);// When a user passes in a `locationArg`, the associated routes need to
// be wrapped in a new `LocationContext.Provider` in order for `useLocation`
// to use the scoped location instead of the global location.
if(t&&S){return /*#__PURE__*/n.createElement(d.Provider,{value:{location:o({pathname:"/",search:"",hash:"",state:null,key:"default"},_),navigationType:a/* .Action.Pop */.aU.Pop}},S)}return S}function R(){let e=G();let t=(0,a/* .isRouteErrorResponse */.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e);let r=e instanceof Error?e.stack:null;let i="rgba(200,200,200, 0.5)";let o={padding:"0.5rem",backgroundColor:i};let s={padding:"2px 4px",backgroundColor:i};let u=null;if(false){}return /*#__PURE__*/n.createElement(n.Fragment,null,/*#__PURE__*/n.createElement("h2",null,"Unexpected Application Error!"),/*#__PURE__*/n.createElement("h3",{style:{fontStyle:"italic"}},t),r?/*#__PURE__*/n.createElement("pre",{style:o},r):null,u)}const A=/*#__PURE__*/n.createElement(R,null);class M extends n.Component{constructor(e){super(e);this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){// When we get into an error state, the user will likely click "back" to the
// previous page that didn't have an error. Because this wraps the entire
// application, that will have no effect--the error page continues to display.
// This gives us a mechanism to recover from the error when the location changes.
//
// Whether we're in an error state or not, we update the location in state
// so that when we are in an error state, it gets reset when a new location
// comes in and the user recovers from the error.
if(t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"){return{error:e.error,location:e.location,revalidation:e.revalidation}}// If we're not changing locations, preserve the location but still surface
// any new errors that may come through. We retain the existing error, we do
// this because the error provided from the app state may be cleared without
// the location changing.
return{error:e.error!==undefined?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==undefined?/*#__PURE__*/n.createElement(f.Provider,{value:this.props.routeContext},/*#__PURE__*/n.createElement(p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function P(e){let{routeContext:t,match:r,children:i}=e;let a=n.useContext(s);// Track how deep we got in our render pass to emulate SSR componentDidCatch
// in a DataStaticRouter
if(a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)){a.staticContext._deepestRenderedBoundaryId=r.route.id}return /*#__PURE__*/n.createElement(f.Provider,{value:t},i)}function D(e,t,r,i){var o;if(t===void 0){t=[]}if(r===void 0){r=null}if(i===void 0){i=null}if(e==null){var s;if(!r){return null}if(r.errors){// Don't bail if we have data router errors so we can render them in the
// boundary.  Use the pre-matched (or shimmed) matches
e=r.matches}else if((s=i)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0){// Don't bail if we're initializing with partial hydration and we have
// router matches.  That means we're actively running `patchRoutesOnNavigation`
// so we should render down the partial matches to the appropriate
// `HydrateFallback`.  We only do this if `parentMatches` is empty so it
// only impacts the root matches for `RouterProvider` and no descendant
// `<Routes>`
e=r.matches}else{return null}}let u=e;// If we have data errors, trim matches to the highest error boundary
let l=(o=r)==null?void 0:o.errors;if(l!=null){let e=u.findIndex(e=>e.route.id&&(l==null?void 0:l[e.route.id])!==undefined);!(e>=0)?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;u=u.slice(0,Math.min(u.length,e+1))}// If we're in a partial hydration mode, detect if we need to render down to
// a given HydrateFallback while we load the rest of the hydration data
let c=false;let d=-1;if(r&&i&&i.v7_partialHydration){for(let e=0;e<u.length;e++){let t=u[e];// Track the deepest fallback up until the first route without data
if(t.route.HydrateFallback||t.route.hydrateFallbackElement){d=e}if(t.route.id){let{loaderData:e,errors:n}=r;let i=t.route.loader&&e[t.route.id]===undefined&&(!n||n[t.route.id]===undefined);if(t.route.lazy||i){// We found the first route that's not ready to render (waiting on
// lazy, or has a loader that hasn't run yet).  Flag that we need to
// render a fallback and render up until the appropriate fallback
c=true;if(d>=0){u=u.slice(0,d+1)}else{u=[u[0]]}break}}}}return u.reduceRight((e,i,a)=>{// Only data routers handle errors/fallbacks
let o;let s=false;let f=null;let p=null;if(r){o=l&&i.route.id?l[i.route.id]:undefined;f=i.route.errorElement||A;if(c){if(d<0&&a===0){er("route-fallback",false,"No `HydrateFallback` element provided to render during initial hydration");s=true;p=null}else if(d===a){s=true;p=i.route.hydrateFallbackElement||null}}}let h=t.concat(u.slice(0,a+1));let v=()=>{let t;if(o){t=f}else if(s){t=p}else if(i.route.Component){// Note: This is a de-optimized path since React won't re-use the
// ReactElement since it's identity changes with each new
// React.createElement call.  We keep this so folks can use
// `<Route Component={...}>` in `<Routes>` but generally `Component`
// usage is only advised in `RouterProvider` when we can convert it to
// `element` ahead of time.
t=/*#__PURE__*/n.createElement(i.route.Component,null)}else if(i.route.element){t=i.route.element}else{t=e}return /*#__PURE__*/n.createElement(P,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};// Only wrap in an error boundary within data router usages when we have an
// ErrorBoundary/errorElement on this route.  Otherwise let it bubble up to
// an ancestor ErrorBoundary/errorElement
return r&&(i.route.ErrorBoundary||i.route.errorElement||a===0)?/*#__PURE__*/n.createElement(M,{location:r.location,revalidation:r.revalidation,component:f,error:o,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:true}}):v()},null)}var I=/*#__PURE__*/function(e){e["UseBlocker"]="useBlocker";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";return e}(I||{});var L=/*#__PURE__*/function(e){e["UseBlocker"]="useBlocker";e["UseLoaderData"]="useLoaderData";e["UseActionData"]="useActionData";e["UseRouteError"]="useRouteError";e["UseNavigation"]="useNavigation";e["UseRouteLoaderData"]="useRouteLoaderData";e["UseMatches"]="useMatches";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";e["UseRouteId"]="useRouteId";return e}(L||{});function F(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function N(e){let t=n.useContext(s);!t?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;return t}function j(e){let t=n.useContext(u);!t?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;return t}function B(e){let t=n.useContext(f);!t?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;return t}// Internal version with hookName-aware debugging
function U(e){let t=B(e);let r=t.matches[t.matches.length-1];!r.route.id?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;return r.route.id}/**
 * Returns the ID for the nearest contextual route
 */function W(){return U(L.UseRouteId)}/**
 * Returns the current navigation, defaulting to an "idle" navigation when
 * no navigation is in progress
 */function z(){let e=j(L.UseNavigation);return e.navigation}/**
 * Returns a revalidate function for manually triggering revalidation, as well
 * as the current state of any manual revalidations
 */function J(){let e=N(I.UseRevalidator);let t=j(L.UseRevalidator);return React.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}/**
 * Returns the active route matches, useful for accessing loaderData for
 * parent/child routes or the route "handle" property
 */function q(){let{matches:e,loaderData:t}=j(L.UseMatches);return React.useMemo(()=>e.map(e=>UNSAFE_convertRouteMatchToUiMatch(e,t)),[e,t])}/**
 * Returns the loader data for the nearest ancestor Route loader
 */function H(){let e=j(L.UseLoaderData);let t=U(L.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return undefined}return e.loaderData[t]}/**
 * Returns the loaderData for the given routeId
 */function V(e){let t=j(L.UseRouteLoaderData);return t.loaderData[e]}/**
 * Returns the action data for the nearest ancestor Route action
 */function $(){let e=j(L.UseActionData);let t=U(L.UseLoaderData);return e.actionData?e.actionData[t]:undefined}/**
 * Returns the nearest ancestor Route error, which could be a loader/action
 * error or a render error.  This is intended to be called from your
 * ErrorBoundary/errorElement to display a proper error message.
 */function G(){var e;let t=n.useContext(p);let r=j(L.UseRouteError);let i=U(L.UseRouteError);// If this was a render error, we put it in a RouteError context inside
// of RenderErrorBoundary
if(t!==undefined){return t}// Otherwise look for errors from our data router state
return(e=r.errors)==null?void 0:e[i]}/**
 * Returns the happy-path data from the nearest ancestor `<Await />` value
 */function X(){let e=React.useContext(l);return e==null?void 0:e._data}/**
 * Returns the error from the nearest ancestor `<Await />` value
 */function K(){let e=React.useContext(l);return e==null?void 0:e._error}let Q=0;/**
 * Allow the application to block navigations within the SPA and present the
 * user a confirmation dialog to confirm the navigation.  Mostly used to avoid
 * using half-filled form data.  This does not handle hard-reloads or
 * cross-origin navigations.
 */function Y(e){let{router:t,basename:r}=N(I.UseBlocker);let n=j(L.UseBlocker);let[i,a]=React.useState("");let s=React.useCallback(t=>{if(typeof e!=="function"){return!!e}if(r==="/"){return e(t)}// If they provided us a function and we've got an active basename, strip
// it from the locations we expose to the user to match the behavior of
// useLocation
let{currentLocation:n,nextLocation:i,historyAction:a}=t;return e({currentLocation:o({},n,{pathname:stripBasename(n.pathname,r)||n.pathname}),nextLocation:o({},i,{pathname:stripBasename(i.pathname,r)||i.pathname}),historyAction:a})},[r,e]);// This effect is in charge of blocker key assignment and deletion (which is
// tightly coupled to the key)
React.useEffect(()=>{let e=String(++Q);a(e);return()=>t.deleteBlocker(e)},[t]);// This effect handles assigning the blockerFunction.  This is to handle
// unstable blocker function identities, and happens only after the prior
// effect so we don't get an orphaned blockerFunction in the router with a
// key of "".  Until then we just have the IDLE_BLOCKER.
React.useEffect(()=>{if(i!==""){t.getBlocker(i,s)}},[t,i,s]);// Prefer the blocker from `state` not `router.state` since DataRouterContext
// is memoized so this ensures we update on blocker state updates
return i&&n.blockers.has(i)?n.blockers.get(i):IDLE_BLOCKER}/**
 * Stable version of useNavigate that is used when we are in the context of
 * a RouterProvider.
 */function ee(){let{router:e}=N(I.UseNavigateStable);let t=U(L.UseNavigateStable);let r=n.useRef(false);_(()=>{r.current=true});let i=n.useCallback(function(n,i){if(i===void 0){i={}}false?0:void 0;// Short circuit here since if this happens on first render the navigate
// is useless because we haven't wired up our router subscriber yet
if(!r.current)return;if(typeof n==="number"){e.navigate(n)}else{e.navigate(n,o({fromRouteId:t},i))}},[e,t]);return i}const et={};function er(e,t,r){if(!t&&!et[e]){et[e]=true;false?0:void 0}}const en=/* unused pure expression or super */null&&{};function ei(e,t){if(false){}}const ea=(e,t,r)=>ei(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+r+"."));function eo(e,t){if((e==null?void 0:e.v7_startTransition)===undefined){ea("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition")}if((e==null?void 0:e.v7_relativeSplatPath)===undefined&&(!t||t.v7_relativeSplatPath===undefined)){ea("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}if(t){if(t.v7_fetcherPersist===undefined){ea("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist")}if(t.v7_normalizeFormMethod===undefined){ea("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod")}if(t.v7_partialHydration===undefined){ea("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration")}if(t.v7_skipActionErrorRevalidation===undefined){ea("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation")}}}/**
  Webpack + React 17 fails to compile on any of the following because webpack
  complains that `startTransition` doesn't exist in `React`:
  * import { startTransition } from "react"
  * import * as React from from "react";
    "startTransition" in React ? React.startTransition(() => setState()) : setState()
  * import * as React from from "react";
    "startTransition" in React ? React["startTransition"](() => setState()) : setState()

  Moving it to a constant such as the following solves the Webpack/React 17 issue:
  * import * as React from from "react";
    const START_TRANSITION = "startTransition";
    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()

  However, that introduces webpack/terser minification issues in production builds
  in React 18 where minification/obfuscation ends up removing the call of
  React.startTransition entirely from the first half of the ternary.  Grabbing
  this exported reference once up front resolves that issue.

  See https://github.com/remix-run/react-router/issues/10579
*/const es="startTransition";const eu=n[es];/**
 * Given a Remix Router instance, render the appropriate UI
 */function el(e){let{fallbackElement:t,router:r,future:n}=e;let[i,a]=React.useState(r.state);let{v7_startTransition:o}=n||{};let l=React.useCallback(e=>{if(o&&eu){eu(()=>a(e))}else{a(e)}},[a,o]);// Need to use a layout effect here so we are subscribed early enough to
// pick up on any render-driven redirects/navigations (useEffect/<Navigate>)
React.useLayoutEffect(()=>r.subscribe(l),[r,l]);React.useEffect(()=>{false?0:void 0;// Only log this once on initial mount
// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);let c=React.useMemo(()=>{return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:n==null?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:true,state:t,preventScrollReset:n==null?void 0:n.preventScrollReset})}},[r]);let d=r.basename||"/";let f=React.useMemo(()=>({router:r,navigator:c,static:false,basename:d}),[r,c,d]);React.useEffect(()=>eo(n,r.future),[r,n]);// The fragment and {null} here are important!  We need them to keep React 18's
// useId happy when we are server-rendering since we may have a <script> here
// containing the hydrated server-side staticContext (from StaticRouterProvider).
// useId relies on the component tree structure to generate deterministic id's
// so we need to ensure it remains the same on the client even though
// we don't need the <script> tag
return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(s.Provider,{value:f},/*#__PURE__*/React.createElement(u.Provider,{value:i},/*#__PURE__*/React.createElement(ev,{basename:d,location:i.location,navigationType:i.historyAction,navigator:c,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?/*#__PURE__*/React.createElement(ec,{routes:r.routes,future:r.future,state:i}):t))),null)}function ec(e){let{routes:t,future:r,state:n}=e;return C(t,undefined,n,r)}/**
 * A `<Router>` that stores all entries in memory.
 *
 * @see https://reactrouter.com/v6/router-components/memory-router
 */function ed(e){let{basename:t,children:r,initialEntries:n,initialIndex:i,future:a}=e;let o=React.useRef();if(o.current==null){o.current=createMemoryHistory({initialEntries:n,initialIndex:i,v5Compat:true})}let s=o.current;let[u,l]=React.useState({action:s.action,location:s.location});let{v7_startTransition:c}=a||{};let d=React.useCallback(e=>{c&&eu?eu(()=>l(e)):l(e)},[l,c]);React.useLayoutEffect(()=>s.listen(d),[s,d]);React.useEffect(()=>eo(a),[a]);return /*#__PURE__*/React.createElement(ev,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:s,future:a})}/**
 * Changes the current location.
 *
 * Note: This API is mostly useful in React.Component subclasses that are not
 * able to use hooks. In functional components, we recommend you use the
 * `useNavigate` hook instead.
 *
 * @see https://reactrouter.com/v6/components/navigate
 */function ef(e){let{to:t,replace:r,state:i,relative:o}=e;!v()?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;let{future:s,static:u}=n.useContext(c);false?0:void 0;let{matches:l}=n.useContext(f);let{pathname:d}=m();let p=w();// Resolve the path outside of the effect so that when effects run twice in
// StrictMode they navigate to the same place
let h=(0,a/* .resolveTo */.pC)(t,(0,a/* .UNSAFE_getResolveToMatches */.cm)(l,s.v7_relativeSplatPath),d,o==="path");let g=JSON.stringify(h);n.useEffect(()=>p(JSON.parse(g),{replace:r,state:i,relative:o}),[p,g,o,r,i]);return null}/**
 * Renders the child route's element, if there is one.
 *
 * @see https://reactrouter.com/v6/components/outlet
 */function ep(e){return S(e.context)}/**
 * Declares an element that should be rendered at a certain URL path.
 *
 * @see https://reactrouter.com/v6/components/route
 */function eh(e){false?0:UNSAFE_invariant(false)}/**
 * Provides location context for the rest of the app.
 *
 * Note: You usually won't render a `<Router>` directly. Instead, you'll render a
 * router that is more specific to your environment such as a `<BrowserRouter>`
 * in web browsers or a `<StaticRouter>` for server rendering.
 *
 * @see https://reactrouter.com/v6/router-components/router
 */function ev(e){let{basename:t="/",children:r=null,location:i,navigationType:s=a/* .Action.Pop */.aU.Pop,navigator:u,static:l=false,future:f}=e;!!v()?false?0:(0,a/* .UNSAFE_invariant */.J0)(false):void 0;// Preserve trailing slashes on basename, so we can let the user control
// the enforcement of trailing slashes throughout the app
let p=t.replace(/^\/*/,"/");let h=n.useMemo(()=>({basename:p,navigator:u,static:l,future:o({v7_relativeSplatPath:false},f)}),[p,f,u,l]);if(typeof i==="string"){i=(0,a/* .parsePath */.cP)(i)}let{pathname:m="/",search:g="",hash:b="",state:y=null,key:_="default"}=i;let w=n.useMemo(()=>{let e=(0,a/* .stripBasename */.Zn)(m,p);if(e==null){return null}return{location:{pathname:e,search:g,hash:b,state:y,key:_},navigationType:s}},[p,m,g,b,y,_,s]);false?0:void 0;if(w==null){return null}return /*#__PURE__*/n.createElement(c.Provider,{value:h},/*#__PURE__*/n.createElement(d.Provider,{children:r,value:w}))}/**
 * A container for a nested tree of `<Route>` elements that renders the branch
 * that best matches the current location.
 *
 * @see https://reactrouter.com/v6/components/routes
 */function em(e){let{children:t,location:r}=e;return T(ex(t),r)}/**
 * Component to use for rendering lazily loaded data from returning defer()
 * in a loader function
 */function eg(e){let{children:t,errorElement:r,resolve:n}=e;return /*#__PURE__*/React.createElement(e_,{resolve:n,errorElement:r},/*#__PURE__*/React.createElement(ew,null,t))}var eb=/*#__PURE__*/function(e){e[e["pending"]=0]="pending";e[e["success"]=1]="success";e[e["error"]=2]="error";return e}(eb||{});const ey=new Promise(()=>{});class e_ extends n.Component{constructor(e){super(e);this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props;let i=null;let o=eb.pending;if(!(r instanceof Promise)){// Didn't get a promise - provide as a resolved promise
o=eb.success;i=Promise.resolve();Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_data",{get:()=>r})}else if(this.state.error){// Caught a render error, provide it as a rejected promise
o=eb.error;let e=this.state.error;i=Promise.reject().catch(()=>{});// Avoid unhandled rejection warnings
Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_error",{get:()=>e})}else if(r._tracked){// Already tracked promise - check contents
i=r;o="_error"in i?eb.error:"_data"in i?eb.success:eb.pending}else{// Raw (untracked) promise - track it
o=eb.pending;Object.defineProperty(r,"_tracked",{get:()=>true});i=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e}))}if(o===eb.error&&i._error instanceof a/* .AbortedDeferredError */.X3){// Freeze the UI by throwing a never resolved promise
throw ey}if(o===eb.error&&!t){// No errorElement, throw to the nearest route-level error boundary
throw i._error}if(o===eb.error){// Render via our errorElement
return /*#__PURE__*/n.createElement(l.Provider,{value:i,children:t})}if(o===eb.success){// Render children with resolved value
return /*#__PURE__*/n.createElement(l.Provider,{value:i,children:e})}// Throw to the suspense boundary
throw i}}/**
 * @private
 * Indirection to leverage useAsyncValue for a render-prop API on `<Await>`
 */function ew(e){let{children:t}=e;let r=X();let n=typeof t==="function"?t(r):t;return /*#__PURE__*/React.createElement(React.Fragment,null,n)}///////////////////////////////////////////////////////////////////////////////
// UTILS
///////////////////////////////////////////////////////////////////////////////
/**
 * Creates a route config from a React "children" object, which is usually
 * either a `<Route>` element or an array of them. Used internally by
 * `<Routes>` to create a route config from its children.
 *
 * @see https://reactrouter.com/v6/utils/create-routes-from-children
 */function ex(e,t){if(t===void 0){t=[]}let r=[];React.Children.forEach(e,(e,n)=>{if(!/*#__PURE__*/React.isValidElement(e)){// Ignore non-elements. This allows people to more easily inline
// conditionals in their route config.
return}let i=[...t,n];if(e.type===React.Fragment){// Transparently support React.Fragment and its children.
r.push.apply(r,ex(e.props.children,i));return}!(e.type===eh)?false?0:UNSAFE_invariant(false):void 0;!(!e.props.index||!e.props.children)?false?0:UNSAFE_invariant(false):void 0;let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};if(e.props.children){a.children=ex(e.props.children,i)}r.push(a)});return r}/**
 * Renders the result of `matchRoutes()` into a React element.
 */function eE(e){return D(e)}function eZ(e){let t={// Note: this check also occurs in createRoutesFromChildren so update
// there if you change this -- please and thank you!
hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};if(e.Component){if(false){}Object.assign(t,{element:/*#__PURE__*/React.createElement(e.Component),Component:undefined})}if(e.HydrateFallback){if(false){}Object.assign(t,{hydrateFallbackElement:/*#__PURE__*/React.createElement(e.HydrateFallback),HydrateFallback:undefined})}if(e.ErrorBoundary){if(false){}Object.assign(t,{errorElement:/*#__PURE__*/React.createElement(e.ErrorBoundary),ErrorBoundary:undefined})}return t}function eS(e,t){return createRouter({basename:t==null?void 0:t.basename,future:o({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createMemoryHistory({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:eZ,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation}).initialize()}//# sourceMappingURL=index.js.map
},75251:function(e,t,r){"use strict";/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n=r(87363),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,a={},l=null,c=null;void 0!==r&&(l=""+r);void 0!==t.key&&(l=""+t.key);void 0!==t.ref&&(c=t.ref);for(n in t)o.call(t,n)&&!u.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:i,type:e,key:l,ref:c,props:a,_owner:s.current}}t.Fragment=a;t.jsx=l;t.jsxs=l},85893:function(e,t,r){"use strict";if(true){e.exports=r(75251)}else{}},75950:function(e,t,r){"use strict";r.d(t,{ZP:()=>eP});/* ESM import */var n=r(20804);/* ESM import */var i=r(17824);/**!
* tippy.js v6.3.7
* (c) 2017-2021 atomiks
* MIT License
*/var a='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>';var o="tippy-content";var s="tippy-backdrop";var u="tippy-arrow";var l="tippy-svg-arrow";var c={passive:true,capture:true};var d=function e(){return document.body};function f(e,t){return({}).hasOwnProperty.call(e,t)}function p(e,t,r){if(Array.isArray(e)){var n=e[t];return n==null?Array.isArray(r)?r[t]:r:n}return e}function h(e,t){var r=({}).toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function v(e,t){return typeof e==="function"?e.apply(void 0,t):e}function m(e,t){// Avoid wrapping in `setTimeout` if ms is 0 anyway
if(t===0){return e}var r;return function(n){clearTimeout(r);r=setTimeout(function(){e(n)},t)}}function g(e,t){var r=Object.assign({},e);t.forEach(function(e){delete r[e]});return r}function b(e){return e.split(/\s+/).filter(Boolean)}function y(e){return[].concat(e)}function _(e,t){if(e.indexOf(t)===-1){e.push(t)}}function w(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function x(e){return e.split("-")[0]}function E(e){return[].slice.call(e)}function Z(e){return Object.keys(e).reduce(function(t,r){if(e[r]!==undefined){t[r]=e[r]}return t},{})}function S(){return document.createElement("div")}function O(e){return["Element","Fragment"].some(function(t){return h(e,t)})}function k(e){return h(e,"NodeList")}function T(e){return h(e,"MouseEvent")}function C(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function R(e){if(O(e)){return[e]}if(k(e)){return E(e)}if(Array.isArray(e)){return e}return E(document.querySelectorAll(e))}function A(e,t){e.forEach(function(e){if(e){e.style.transitionDuration=t+"ms"}})}function M(e,t){e.forEach(function(e){if(e){e.setAttribute("data-state",t)}})}function P(e){var t;var r=y(e),n=r[0];// Elements created via a <template> have an ownerDocument with no reference to the body
return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function D(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,a=e.props;var o=a.interactiveBorder;var s=x(i.placement);var u=i.modifiersData.offset;if(!u){return true}var l=s==="bottom"?u.top.y:0;var c=s==="top"?u.bottom.y:0;var d=s==="right"?u.left.x:0;var f=s==="left"?u.right.x:0;var p=t.top-n+l>o;var h=n-t.bottom-c>o;var v=t.left-r+d>o;var m=r-t.right-f>o;return p||h||v||m})}function I(e,t,r){var n=t+"EventListener";// some browsers apparently support `transition` (unprefixed) but only fire
// `webkitTransitionEnd`...
["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}/**
 * Compared to xxx.contains, this function works for dom structures with shadow
 * dom
 */function L(e,t){var r=t;while(r){var n;if(e.contains(r)){return true}r=r.getRootNode==null?void 0:(n=r.getRootNode())==null?void 0:n.host}return false}var F={isTouch:false};var N=0;/**
 * When a `touchstart` event is fired, it's assumed the user is using touch
 * input. We'll bind a `mousemove` event listener to listen for mouse input in
 * the future. This way, the `isTouch` property is fully dynamic and will handle
 * hybrid devices that use a mix of touch + mouse input.
 */function j(){if(F.isTouch){return}F.isTouch=true;if(window.performance){document.addEventListener("mousemove",B)}}/**
 * When two `mousemove` event are fired consecutively within 20ms, it's assumed
 * the user is using mouse input again. `mousemove` can fire on touch devices as
 * well, but very rarely that quickly.
 */function B(){var e=performance.now();if(e-N<20){F.isTouch=false;document.removeEventListener("mousemove",B)}N=e}/**
 * When an element is in focus and has a tippy, leaving the tab/window and
 * returning causes it to show again. For mouse users this is unexpected, but
 * for keyboard use it makes sense.
 * TODO: find a better technique to solve this problem
 */function U(){var e=document.activeElement;if(C(e)){var t=e._tippy;if(e.blur&&!t.state.isVisible){e.blur()}}}function W(){document.addEventListener("touchstart",j,c);window.addEventListener("blur",U)}var z=typeof window!=="undefined"&&typeof document!=="undefined";var J=z?!!window.msCrypto:false;function q(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function H(e){var t=/[ \t]{2,}/g;var r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function V(e){return H("\n  %ctippy.js\n\n  %c"+H(e)+"\n\n  %c\uD83D\uDC77‍ This is a development-only message. It will be removed in production.\n  ")}function $(e){return[V(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}// Assume warnings and errors never have the same message
var G;if(false){}function X(){G=new Set}function K(e,t){if(e&&!G.has(t)){var r;G.add(t);(r=console).warn.apply(r,$(t))}}function Q(e,t){if(e&&!G.has(t)){var r;G.add(t);(r=console).error.apply(r,$(t))}}function Y(e){var t=!e;var r=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;Q(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" "));Q(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ee={animateFill:false,followCursor:false,inlinePositioning:false,sticky:false};var et={allowHTML:false,animation:"fade",arrow:true,content:"",inertia:false,maxWidth:350,role:"tooltip",theme:"",zIndex:9999};var er=Object.assign({appendTo:d,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:true,ignoreAttributes:false,interactive:false,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function e(){},onBeforeUpdate:function e(){},onCreate:function e(){},onDestroy:function e(){},onHidden:function e(){},onHide:function e(){},onMount:function e(){},onShow:function e(){},onShown:function e(){},onTrigger:function e(){},onUntrigger:function e(){},onClickOutside:function e(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:false,touch:true,trigger:"mouseenter focus",triggerTarget:null},ee,et);var en=Object.keys(er);var ei=function e(e){/* istanbul ignore else */if(false){}var t=Object.keys(e);t.forEach(function(t){er[t]=e[t]})};function ea(e){var t=e.plugins||[];var r=t.reduce(function(t,r){var n=r.name,i=r.defaultValue;if(n){var a;t[n]=e[n]!==undefined?e[n]:(a=er[n])!=null?a:i}return t},{});return Object.assign({},e,r)}function eo(e,t){var r=t?Object.keys(ea(Object.assign({},er,{plugins:t}))):en;var n=r.reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n){return t}if(r==="content"){t[r]=n}else{try{t[r]=JSON.parse(n)}catch(e){t[r]=n}}return t},{});return n}function es(e,t){var r=Object.assign({},t,{content:v(t.content,[e])},t.ignoreAttributes?{}:eo(e,t.plugins));r.aria=Object.assign({},er.aria,r.aria);r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content};return r}function eu(e,t){if(e===void 0){e={}}if(t===void 0){t=[]}var r=Object.keys(e);r.forEach(function(e){var r=g(er,Object.keys(ee));var n=!f(r,e);// Check if the prop exists in `plugins`
if(n){n=t.filter(function(t){return t.name===e}).length===0}K(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function el(e){var t=e.firstElementChild;var r=E(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(o)}),arrow:r.find(function(e){return e.classList.contains(u)||e.classList.contains(l)}),backdrop:r.find(function(e){return e.classList.contains(s)})}}var ec=1;var ed=[];// Used by `hideAll()`
var ef=[];function ep(e,t){var r=es(e,Object.assign({},er,ea(Z(t))));// ===========================================================================
// 🔒 Private members
// ===========================================================================
var i;var a;var o;var s=false;var u=false;var l=false;var f=false;var h;var g;var x;var O=[];var k=m(eS,r.interactiveDebounce);var C;// ===========================================================================
// 🔑 Public members
// ===========================================================================
var R=ec++;var N=null;var j=w(r.plugins);var B={// Is the instance currently enabled?
isEnabled:true,// Is the tippy currently showing and not transitioning out?
isVisible:false,// Has the instance been destroyed?
isDestroyed:false,// Is the tippy currently mounted to the DOM?
isMounted:false,// Has the tippy finished transitioning in?
isShown:false};var U={// properties
id:R,reference:e,popper:S(),popperInstance:N,props:r,state:B,plugins:j,// methods
clearDelayTimeouts:eF,setProps:eN,setContent:ej,show:eB,hide:eU,hideWithInteractivity:eW,enable:eI,disable:eL,unmount:ez,destroy:eJ};// TODO: Investigate why this early return causes a TDZ error in the tests —
// it doesn't seem to happen in the browser
/* istanbul ignore if */if(!r.render){if(false){}return U}// ===========================================================================
// Initial mutations
// ===========================================================================
var W=r.render(U),z=W.popper,q=W.onUpdate;z.setAttribute("data-tippy-root","");z.id="tippy-"+U.id;U.popper=z;e._tippy=U;z._tippy=U;var H=j.map(function(e){return e.fn(U)});var V=e.hasAttribute("aria-expanded");ex();eo();et();en("onCreate",[U]);if(r.showOnCreate){eP()}// Prevent a tippy with a delay from hiding if the cursor left then returned
// before it started hiding
z.addEventListener("mouseenter",function(){if(U.props.interactive&&U.state.isVisible){U.clearDelayTimeouts()}});z.addEventListener("mouseleave",function(){if(U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0){Q().addEventListener("mousemove",k)}});return U;// ===========================================================================
// 🔒 Private methods
// ===========================================================================
function $(){var e=U.props.touch;return Array.isArray(e)?e:[e,0]}function G(){return $()[0]==="hold"}function X(){var e;// @ts-ignore
return!!((e=U.props.render)!=null&&e.$$tippy)}function K(){return C||e}function Q(){var e=K().parentNode;return e?P(e):document}function Y(){return el(z)}function ee(e){// For touch or keyboard input, force `0` delay for UX reasons
// Also if the instance is mounted but not visible (transitioning out),
// ignore delay
if(U.state.isMounted&&!U.state.isVisible||F.isTouch||h&&h.type==="focus"){return 0}return p(U.props.delay,e?0:1,er.delay)}function et(e){if(e===void 0){e=false}z.style.pointerEvents=U.props.interactive&&!e?"":"none";z.style.zIndex=""+U.props.zIndex}function en(e,t,r){if(r===void 0){r=true}H.forEach(function(r){if(r[e]){r[e].apply(r,t)}});if(r){var n;(n=U.props)[e].apply(n,t)}}function ei(){var t=U.props.aria;if(!t.content){return}var r="aria-"+t.content;var n=z.id;var i=y(U.props.triggerTarget||e);i.forEach(function(e){var t=e.getAttribute(r);if(U.state.isVisible){e.setAttribute(r,t?t+" "+n:n)}else{var i=t&&t.replace(n,"").trim();if(i){e.setAttribute(r,i)}else{e.removeAttribute(r)}}})}function eo(){if(V||!U.props.aria.expanded){return}var t=y(U.props.triggerTarget||e);t.forEach(function(e){if(U.props.interactive){e.setAttribute("aria-expanded",U.state.isVisible&&e===K()?"true":"false")}else{e.removeAttribute("aria-expanded")}})}function eu(){Q().removeEventListener("mousemove",k);ed=ed.filter(function(e){return e!==k})}function ep(t){// Moved finger to scroll instead of an intentional tap outside
if(F.isTouch){if(l||t.type==="mousedown"){return}}var r=t.composedPath&&t.composedPath()[0]||t.target;// Clicked on interactive popper
if(U.props.interactive&&L(z,r)){return}// Clicked on the event listeners target
if(y(U.props.triggerTarget||e).some(function(e){return L(e,r)})){if(F.isTouch){return}if(U.state.isVisible&&U.props.trigger.indexOf("click")>=0){return}}else{en("onClickOutside",[U,t])}if(U.props.hideOnClick===true){U.clearDelayTimeouts();U.hide();// `mousedown` event is fired right before `focus` if pressing the
// currentTarget. This lets a tippy with `focus` trigger know that it
// should not show
u=true;setTimeout(function(){u=false});// The listener gets added in `scheduleShow()`, but this may be hiding it
// before it shows, and hide()'s early bail-out behavior can prevent it
// from being cleaned up
if(!U.state.isMounted){eg()}}}function eh(){l=true}function ev(){l=false}function em(){var e=Q();e.addEventListener("mousedown",ep,true);e.addEventListener("touchend",ep,c);e.addEventListener("touchstart",ev,c);e.addEventListener("touchmove",eh,c)}function eg(){var e=Q();e.removeEventListener("mousedown",ep,true);e.removeEventListener("touchend",ep,c);e.removeEventListener("touchstart",ev,c);e.removeEventListener("touchmove",eh,c)}function eb(e,t){e_(e,function(){if(!U.state.isVisible&&z.parentNode&&z.parentNode.contains(z)){t()}})}function ey(e,t){e_(e,t)}function e_(e,t){var r=Y().box;function n(e){if(e.target===r){I(r,"remove",n);t()}}// Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if(e===0){return t()}I(r,"remove",g);I(r,"add",n);g=n}function ew(t,r,n){if(n===void 0){n=false}var i=y(U.props.triggerTarget||e);i.forEach(function(e){e.addEventListener(t,r,n);O.push({node:e,eventType:t,handler:r,options:n})})}function ex(){if(G()){ew("touchstart",eZ,{passive:true});ew("touchend",eO,{passive:true})}b(U.props.trigger).forEach(function(e){if(e==="manual"){return}ew(e,eZ);switch(e){case"mouseenter":ew("mouseleave",eO);break;case"focus":ew(J?"focusout":"blur",ek);break;case"focusin":ew("focusout",ek);break}})}function eE(){O.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});O=[]}function eZ(e){var t;var r=false;if(!U.state.isEnabled||eT(e)||u){return}var n=((t=h)==null?void 0:t.type)==="focus";h=e;C=e.currentTarget;eo();if(!U.state.isVisible&&T(e)){// If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
ed.forEach(function(t){return t(e)})}// Toggle show/hide when clicking click-triggered tooltips
if(e.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||s)&&U.props.hideOnClick!==false&&U.state.isVisible){r=true}else{eP(e)}if(e.type==="click"){s=!r}if(r&&!n){eD(e)}}function eS(e){var t=e.target;var n=K().contains(t)||z.contains(t);if(e.type==="mousemove"&&n){return}var i=eM().concat(z).map(function(e){var t;var n=e._tippy;var i=(t=n.popperInstance)==null?void 0:t.state;if(i){return{popperRect:e.getBoundingClientRect(),popperState:i,props:r}}return null}).filter(Boolean);if(D(i,e)){eu();eD(e)}}function eO(e){var t=eT(e)||U.props.trigger.indexOf("click")>=0&&s;if(t){return}if(U.props.interactive){U.hideWithInteractivity(e);return}eD(e)}function ek(e){if(U.props.trigger.indexOf("focusin")<0&&e.target!==K()){return}// If focus was moved to within the popper
if(U.props.interactive&&e.relatedTarget&&z.contains(e.relatedTarget)){return}eD(e)}function eT(e){return F.isTouch?G()!==e.type.indexOf("touch")>=0:false}function eC(){eR();var t=U.props,r=t.popperOptions,i=t.placement,a=t.offset,o=t.getReferenceClientRect,s=t.moveTransition;var u=X()?el(z).arrow:null;var l=o?{getBoundingClientRect:o,contextElement:o.contextElement||K()}:e;var c={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t=e.state;if(X()){var r=Y(),n=r.box;["placement","reference-hidden","escaped"].forEach(function(e){if(e==="placement"){n.setAttribute("data-placement",t.placement)}else{if(t.attributes.popper["data-popper-"+e]){n.setAttribute("data-"+e,"")}else{n.removeAttribute("data-"+e)}}});t.attributes.popper={}}}};var d=[{name:"offset",options:{offset:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},c];if(X()&&u){d.push({name:"arrow",options:{element:u,padding:3}})}d.push.apply(d,(r==null?void 0:r.modifiers)||[]);U.popperInstance=(0,n/* .createPopper */.fi)(l,z,Object.assign({},r,{placement:i,onFirstUpdate:x,modifiers:d}))}function eR(){if(U.popperInstance){U.popperInstance.destroy();U.popperInstance=null}}function eA(){var e=U.props.appendTo;var t;// By default, we'll append the popper to the triggerTargets's parentNode so
// it's directly after the reference element so the elements inside the
// tippy can be tabbed to
// If there are clipping issues, the user can specify a different appendTo
// and ensure focus management is handled correctly manually
var r=K();if(U.props.interactive&&e===d||e==="parent"){t=r.parentNode}else{t=v(e,[r])}// The popper element needs to exist on the DOM before its position can be
// updated as Popper needs to read its dimensions
if(!t.contains(z)){t.appendChild(z)}U.state.isMounted=true;eC();/* istanbul ignore else */if(false){}}function eM(){return E(z.querySelectorAll("[data-tippy-root]"))}function eP(e){U.clearDelayTimeouts();if(e){en("onTrigger",[U,e])}em();var t=ee(true);var r=$(),n=r[0],a=r[1];if(F.isTouch&&n==="hold"&&a){t=a}if(t){i=setTimeout(function(){U.show()},t)}else{U.show()}}function eD(e){U.clearDelayTimeouts();en("onUntrigger",[U,e]);if(!U.state.isVisible){eg();return}// For interactive tippies, scheduleHide is added to a document.body handler
// from onMouseLeave so must intercept scheduled hides from mousemove/leave
// events when trigger contains mouseenter and click, and the tip is
// currently shown as a result of a click.
if(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&s){return}var t=ee(false);if(t){a=setTimeout(function(){if(U.state.isVisible){U.hide()}},t)}else{// Fixes a `transitionend` problem when it fires 1 frame too
// late sometimes, we don't want hide() to be called.
o=requestAnimationFrame(function(){U.hide()})}}// ===========================================================================
// 🔑 Public methods
// ===========================================================================
function eI(){U.state.isEnabled=true}function eL(){// Disabling the instance should also hide it
// https://github.com/atomiks/tippy.js-react/issues/106
U.hide();U.state.isEnabled=false}function eF(){clearTimeout(i);clearTimeout(a);cancelAnimationFrame(o)}function eN(t){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}en("onBeforeUpdate",[U,t]);eE();var r=U.props;var n=es(e,Object.assign({},r,Z(t),{ignoreAttributes:true}));U.props=n;ex();if(r.interactiveDebounce!==n.interactiveDebounce){eu();k=m(eS,n.interactiveDebounce)}// Ensure stale aria-expanded attributes are removed
if(r.triggerTarget&&!n.triggerTarget){y(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")})}else if(n.triggerTarget){e.removeAttribute("aria-expanded")}eo();et();if(q){q(r,n)}if(U.popperInstance){eC();// Fixes an issue with nested tippies if they are all getting re-rendered,
// and the nested ones get re-rendered first.
// https://github.com/atomiks/tippyjs-react/issues/177
// TODO: find a cleaner / more efficient solution(!)
eM().forEach(function(e){// React (and other UI libs likely) requires a rAF wrapper as it flushes
// its work in one
requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})}en("onAfterUpdate",[U,t])}function ej(e){U.setProps({content:e})}function eB(){/* istanbul ignore else */if(false){}// Early bail-out
var e=U.state.isVisible;var t=U.state.isDestroyed;var r=!U.state.isEnabled;var n=F.isTouch&&!U.props.touch;var i=p(U.props.duration,0,er.duration);if(e||t||r||n){return}// Normalize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.
// Using a wrapper element (i.e. <span>) is recommended.
if(K().hasAttribute("disabled")){return}en("onShow",[U],false);if(U.props.onShow(U)===false){return}U.state.isVisible=true;if(X()){z.style.visibility="visible"}et();em();if(!U.state.isMounted){z.style.transition="none"}// If flipping to the opposite side after hiding at least once, the
// animation will use the wrong placement without resetting the duration
if(X()){var a=Y(),o=a.box,s=a.content;A([o,s],0)}x=function e(){var e;if(!U.state.isVisible||f){return}f=true;// reflow
void z.offsetHeight;z.style.transition=U.props.moveTransition;if(X()&&U.props.animation){var t=Y(),r=t.box,n=t.content;A([r,n],i);M([r,n],"visible")}ei();eo();_(ef,U);// certain modifiers (e.g. `maxSize`) require a second update after the
// popper has been positioned for the first time
(e=U.popperInstance)==null?void 0:e.forceUpdate();en("onMount",[U]);if(U.props.animation&&X()){ey(i,function(){U.state.isShown=true;en("onShown",[U])})}};eA()}function eU(){/* istanbul ignore else */if(false){}// Early bail-out
var e=!U.state.isVisible;var t=U.state.isDestroyed;var r=!U.state.isEnabled;var n=p(U.props.duration,1,er.duration);if(e||t||r){return}en("onHide",[U],false);if(U.props.onHide(U)===false){return}U.state.isVisible=false;U.state.isShown=false;f=false;s=false;if(X()){z.style.visibility="hidden"}eu();eg();et(true);if(X()){var i=Y(),a=i.box,o=i.content;if(U.props.animation){A([a,o],n);M([a,o],"hidden")}}ei();eo();if(U.props.animation){if(X()){eb(n,U.unmount)}}else{U.unmount()}}function eW(e){/* istanbul ignore else */if(false){}Q().addEventListener("mousemove",k);_(ed,k);k(e)}function ez(){/* istanbul ignore else */if(false){}if(U.state.isVisible){U.hide()}if(!U.state.isMounted){return}eR();// If a popper is not interactive, it will be appended outside the popper
// tree by default. This seems mainly for interactive tippies, but we should
// find a workaround if possible
eM().forEach(function(e){e._tippy.unmount()});if(z.parentNode){z.parentNode.removeChild(z)}ef=ef.filter(function(e){return e!==U});U.state.isMounted=false;en("onHidden",[U])}function eJ(){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}U.clearDelayTimeouts();U.unmount();eE();delete e._tippy;U.state.isDestroyed=true;en("onDestroy",[U])}}function eh(e,t){if(t===void 0){t={}}var r=er.plugins.concat(t.plugins||[]);/* istanbul ignore else */if(false){}W();var n=Object.assign({},t,{plugins:r});var i=R(e);/* istanbul ignore else */if(false){var a,o}var s=i.reduce(function(e,t){var r=t&&ep(t,n);if(r){e.push(r)}return e},[]);return O(e)?s[0]:s}eh.defaultProps=er;eh.setDefaultProps=ei;eh.currentInput=F;var ev=function e(e){var t=e===void 0?{}:e,r=t.exclude,n=t.duration;ef.forEach(function(e){var t=false;if(r){t=C(r)?e.reference===r:e.popper===r.popper}if(!t){var i=e.props.duration;e.setProps({duration:n});e.hide();if(!e.state.isDestroyed){e.setProps({duration:i})}}})};// every time the popper is destroyed (i.e. a new target), removing the styles
// and causing transitions to break for singletons when the console is open, but
// most notably for non-transform styles being used, `gpuAcceleration: false`.
var em=Object.assign({},i/* ["default"] */.Z,{effect:function e(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}// intentionally return no cleanup function
// return () => { ... }
}});var eg=function e(e,t){var r;if(t===void 0){t={}}/* istanbul ignore else */if(false){}var n=e;var i=[];var a=[];var o;var s=t.overrides;var u=[];var l=false;function c(){a=n.map(function(e){return y(e.props.triggerTarget||e.reference)}).reduce(function(e,t){return e.concat(t)},[])}function d(){i=n.map(function(e){return e.reference})}function f(e){n.forEach(function(t){if(e){t.enable()}else{t.disable()}})}function p(e){return n.map(function(t){var r=t.setProps;t.setProps=function(n){r(n);if(t.reference===o){e.setProps(n)}};return function(){t.setProps=r}})}// have to pass singleton, as it maybe undefined on first call
function h(e,t){var r=a.indexOf(t);// bail-out
if(t===o){return}o=t;var u=(s||[]).concat("content").reduce(function(e,t){e[t]=n[r].props[t];return e},{});e.setProps(Object.assign({},u,{getReferenceClientRect:typeof u.getReferenceClientRect==="function"?u.getReferenceClientRect:function(){var e;return(e=i[r])==null?void 0:e.getBoundingClientRect()}}))}f(false);d();c();var v={fn:function e(){return{onDestroy:function e(){f(true)},onHidden:function e(){o=null},onClickOutside:function e(e){if(e.props.showOnCreate&&!l){l=true;o=null}},onShow:function e(e){if(e.props.showOnCreate&&!l){l=true;h(e,i[0])}},onTrigger:function e(e,t){h(e,t.currentTarget)}}}};var m=eh(S(),Object.assign({},g(t,["overrides"]),{plugins:[v].concat(t.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((r=t.popperOptions)==null?void 0:r.modifiers)||[],[em])})}));var b=m.show;m.show=function(e){b();// first time, showOnCreate or programmatic call with no params
// default to showing first instance
if(!o&&e==null){return h(m,i[0])}// triggered from event (do nothing as prepareInstance already called by onTrigger)
// programmatic call with no params when already visible (do nothing again)
if(o&&e==null){return}// target is index of instance
if(typeof e==="number"){return i[e]&&h(m,i[e])}// target is a child tippy instance
if(n.indexOf(e)>=0){var t=e.reference;return h(m,t)}// target is a ReferenceElement
if(i.indexOf(e)>=0){return h(m,e)}};m.showNext=function(){var e=i[0];if(!o){return m.show(0)}var t=i.indexOf(o);m.show(i[t+1]||e)};m.showPrevious=function(){var e=i[i.length-1];if(!o){return m.show(e)}var t=i.indexOf(o);var r=i[t-1]||e;m.show(r)};var _=m.setProps;m.setProps=function(e){s=e.overrides||s;_(e)};m.setInstances=function(e){f(true);u.forEach(function(e){return e()});n=e;f(false);d();c();u=p(m);m.setProps({triggerTarget:a})};u=p(m);return m};var eb=/* unused pure expression or super */null&&{mouseover:"mouseenter",focusin:"focus",click:"click"};/**
 * Creates a delegate instance that controls the creation of tippy instances
 * for child elements (`target` CSS selector).
 */function ey(e,t){/* istanbul ignore else */if(false){}var r=[];var n=[];var i=false;var a=t.target;var o=g(t,["target"]);var s=Object.assign({},o,{trigger:"manual",touch:false});var u=Object.assign({touch:er.touch},o,{showOnCreate:true});var l=eh(e,s);var d=y(l);function f(e){if(!e.target||i){return}var r=e.target.closest(a);if(!r){return}// Get relevant trigger with fallbacks:
// 1. Check `data-tippy-trigger` attribute on target node
// 2. Fallback to `trigger` passed to `delegate()`
// 3. Fallback to `defaultProps.trigger`
var o=r.getAttribute("data-tippy-trigger")||t.trigger||er.trigger;// @ts-ignore
if(r._tippy){return}if(e.type==="touchstart"&&typeof u.touch==="boolean"){return}if(e.type!=="touchstart"&&o.indexOf(eb[e.type])<0){return}var s=eh(r,u);if(s){n=n.concat(s)}}function p(e,t,n,i){if(i===void 0){i=false}e.addEventListener(t,n,i);r.push({node:e,eventType:t,handler:n,options:i})}function h(e){var t=e.reference;p(t,"touchstart",f,c);p(t,"mouseover",f);p(t,"focusin",f);p(t,"click",f)}function v(){r.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});r=[]}function m(e){var t=e.destroy;var r=e.enable;var a=e.disable;e.destroy=function(e){if(e===void 0){e=true}if(e){n.forEach(function(e){e.destroy()})}n=[];v();t()};e.enable=function(){r();n.forEach(function(e){return e.enable()});i=false};e.disable=function(){a();n.forEach(function(e){return e.disable()});i=true};h(e)}d.forEach(m);return l}var e_=/* unused pure expression or super */null&&{name:"animateFill",defaultValue:false,fn:function e(e){var t;// @ts-ignore
if(!((t=e.props.render)!=null&&t.$$tippy)){if(false){}return{}}var r=el(e.popper),n=r.box,i=r.content;var a=e.props.animateFill?ew():null;return{onCreate:function t(){if(a){n.insertBefore(a,n.firstElementChild);n.setAttribute("data-animatefill","");n.style.overflow="hidden";e.setProps({arrow:false,animation:"shift-away"})}},onMount:function e(){if(a){var e=n.style.transitionDuration;var t=Number(e.replace("ms",""));// The content should fade in after the backdrop has mostly filled the
// tooltip element. `clip-path` is the other alternative but is not
// well-supported and is buggy on some devices.
i.style.transitionDelay=Math.round(t/10)+"ms";a.style.transitionDuration=e;M([a],"visible")}},onShow:function e(){if(a){a.style.transitionDuration="0ms"}},onHide:function e(){if(a){M([a],"hidden")}}}}};function ew(){var e=S();e.className=s;M([e],"hidden");return e}var ex=/* unused pure expression or super */null&&{clientX:0,clientY:0};var eE=/* unused pure expression or super */null&&[];function eZ(e){var t=e.clientX,r=e.clientY;ex={clientX:t,clientY:r}}function eS(e){e.addEventListener("mousemove",eZ)}function eO(e){e.removeEventListener("mousemove",eZ)}var ek=/* unused pure expression or super */null&&{name:"followCursor",defaultValue:false,fn:function e(e){var t=e.reference;var r=P(e.props.triggerTarget||t);var n=false;var i=false;var a=true;var o=e.props;function s(){return e.props.followCursor==="initial"&&e.state.isVisible}function u(){r.addEventListener("mousemove",d)}function l(){r.removeEventListener("mousemove",d)}function c(){n=true;e.setProps({getReferenceClientRect:null});n=false}function d(r){// If the instance is interactive, avoid updating the position unless it's
// over the reference element
var n=r.target?t.contains(r.target):true;var i=e.props.followCursor;var a=r.clientX,o=r.clientY;var s=t.getBoundingClientRect();var u=a-s.left;var l=o-s.top;if(n||!e.props.interactive){e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){var e=t.getBoundingClientRect();var r=a;var n=o;if(i==="initial"){r=e.left+u;n=e.top+l}var s=i==="horizontal"?e.top:n;var c=i==="vertical"?e.right:r;var d=i==="horizontal"?e.bottom:n;var f=i==="vertical"?e.left:r;return{width:c-f,height:d-s,top:s,right:c,bottom:d,left:f}}})}}function f(){if(e.props.followCursor){eE.push({instance:e,doc:r});eS(r)}}function p(){eE=eE.filter(function(t){return t.instance!==e});if(eE.filter(function(e){return e.doc===r}).length===0){eO(r)}}return{onCreate:f,onDestroy:p,onBeforeUpdate:function t(){o=e.props},onAfterUpdate:function t(t,r){var a=r.followCursor;if(n){return}if(a!==undefined&&o.followCursor!==a){p();if(a){f();if(e.state.isMounted&&!i&&!s()){u()}}else{l();c()}}},onMount:function t(){if(e.props.followCursor&&!i){if(a){d(ex);a=false}if(!s()){u()}}},onTrigger:function e(e,t){if(T(t)){ex={clientX:t.clientX,clientY:t.clientY}}i=t.type==="focus"},onHidden:function t(){if(e.props.followCursor){c();l();a=true}}}}};function eT(e,t){var r;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((r=e.popperOptions)==null?void 0:r.modifiers)||[]).filter(function(e){var r=e.name;return r!==t.name}),[t])})}}var eC=/* unused pure expression or super */null&&{name:"inlinePositioning",defaultValue:false,fn:function e(e){var t=e.reference;function r(){return!!e.props.inlinePositioning}var n;var i=-1;var a=false;var o=[];var s={name:"tippyInlinePositioning",enabled:true,phase:"afterWrite",fn:function t(t){var i=t.state;if(r()){if(o.indexOf(i.placement)!==-1){o=[]}if(n!==i.placement&&o.indexOf(i.placement)===-1){o.push(i.placement);e.setProps({// @ts-ignore - unneeded DOMRect properties
getReferenceClientRect:function e(){return u(i.placement)}})}n=i.placement}}};function u(e){return eR(x(e),t.getBoundingClientRect(),E(t.getClientRects()),i)}function l(t){a=true;e.setProps(t);a=false}function c(){if(!a){l(eT(e.props,s))}}return{onCreate:c,onAfterUpdate:c,onTrigger:function t(t,r){if(T(r)){var n=E(e.reference.getClientRects());var a=n.find(function(e){return e.left-2<=r.clientX&&e.right+2>=r.clientX&&e.top-2<=r.clientY&&e.bottom+2>=r.clientY});var o=n.indexOf(a);i=o>-1?o:i}},onHidden:function e(){i=-1}}}};function eR(e,t,r,n){// Not an inline element, or placement is not yet known
if(r.length<2||e===null){return t}// There are two rects and they are disjoined
if(r.length===2&&n>=0&&r[0].left>r[1].right){return r[n]||t}switch(e){case"top":case"bottom":{var i=r[0];var a=r[r.length-1];var o=e==="top";var s=i.top;var u=a.bottom;var l=o?i.left:a.left;var c=o?i.right:a.right;var d=c-l;var f=u-s;return{top:s,bottom:u,left:l,right:c,width:d,height:f}}case"left":case"right":{var p=Math.min.apply(Math,r.map(function(e){return e.left}));var h=Math.max.apply(Math,r.map(function(e){return e.right}));var v=r.filter(function(t){return e==="left"?t.left===p:t.right===h});var m=v[0].top;var g=v[v.length-1].bottom;var b=p;var y=h;var _=y-b;var w=g-m;return{top:m,bottom:g,left:b,right:y,width:_,height:w}}default:{return t}}}var eA=/* unused pure expression or super */null&&{name:"sticky",defaultValue:false,fn:function e(e){var t=e.reference,r=e.popper;function n(){return e.popperInstance?e.popperInstance.state.elements.reference:t}function i(t){return e.props.sticky===true||e.props.sticky===t}var a=null;var o=null;function s(){var t=i("reference")?n().getBoundingClientRect():null;var u=i("popper")?r.getBoundingClientRect():null;if(t&&eM(a,t)||u&&eM(o,u)){if(e.popperInstance){e.popperInstance.update()}}a=t;o=u;if(e.state.isMounted){requestAnimationFrame(s)}}return{onMount:function t(){if(e.props.sticky){s()}}}}};function eM(e,t){if(e&&t){return e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left}return true}eh.setDefaultProps({animation:false});/* ESM default export */const eP=eh;//# sourceMappingURL=tippy-headless.esm.js.map
},14578:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-2x-45983f4c.webp"},43567:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-269f7e17.webp"},38032:function(e,t,r){"use strict";// EXPORTS
r.d(t,{L:()=>/* binding */a});// CONCATENATED MODULE: ./assets/react/v3/shared/config/route-configs.ts
var n=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce((e,r)=>e.replace(":".concat(r),String(t[r])),e)};var i=e=>{return{template:e,buildLink:t=>n(e,t)}};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/config/route-configs.ts
var a={Home:i("/"),CourseBasics:i("/basics"),CourseCurriculum:i("/curriculum"),CourseAdditional:i("/additional"),CourseCertificate:i("/certificate"),IconList:i("/icons")}},20203:function(e,t,r){"use strict";// EXPORTS
r.d(t,{Z:()=>/* binding */rl});// EXTERNAL MODULE: ./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(35944);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread.js
var i=r(7409);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread_props.js
var a=r(99282);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var o=r(70917);// EXTERNAL MODULE: external "React"
var s=r(87363);var u=/*#__PURE__*/r.n(s);// EXTERNAL MODULE: ./node_modules/react-hook-form/dist/index.esm.mjs
var l=r(52293);// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js
var c=r(89250);// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var d=r(99469);// EXTERNAL MODULE: external "wp.i18n"
var f=r(38003);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Button.tsx
var p=r(19398);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/MagicButton.tsx
var h=r(53052);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/SVGIcon.tsx
var v=r(26815);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Tooltip.tsx
var m=r(58982);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_async_to_generator.js
var g=r(76150);// EXTERNAL MODULE: ./node_modules/date-fns/esm/isBefore/index.js
var b=r(313);// EXTERNAL MODULE: ./node_modules/date-fns/esm/format/index.js
var y=r(32449);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var _=r(98848);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_tagged_template_literal.js
var w=r(58865);// EXTERNAL MODULE: ./assets/react/v3/shared/config/styles.ts
var x=r(60860);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/useAnimation.tsx
var E=r(54354);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var Z=r(29535);// EXTERNAL MODULE: ./assets/react/v3/shared/config/typography.ts
var S=r(76487);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/usePortalPopover.tsx
var O=r(98567);// EXTERNAL MODULE: ./assets/react/v3/shared/molecules/Popover.tsx
var k=r(97669);// CONCATENATED MODULE: ./assets/react/v3/shared/molecules/DropdownButton.tsx
function T(){var e=(0,w._)(["\n      padding: "," ",";\n    "]);T=function t(){return e};return e}function C(){var e=(0,w._)(["\n      font-size: ",";\n      line-height: ",";\n      padding: "," ",";\n    "]);C=function t(){return e};return e}function R(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n\n        &:hover,\n        &:focus,\n        &:active {\n          background-color: ",";\n          color: ",";\n        }\n      "]);R=function t(){return e};return e}function A(){var e=(0,w._)(["\n      background-color: ",";\n      color: ",";\n\n      &:not(:disabled) {\n        &:hover,\n        &:focus {\n          background-color: ",";\n          color: ",";\n        }\n\n        &:active {\n          background-color: ",";\n          color: ",";\n        }\n      }\n\n      ","\n    "]);A=function t(){return e};return e}function M(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n      "]);M=function t(){return e};return e}function P(){var e=(0,w._)(["\n      background-color: ",";\n      color: ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);P=function t(){return e};return e}function D(){var e=(0,w._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);D=function t(){return e};return e}function I(){var e=(0,w._)(["\n      background-color: ",";\n      color: ",";\n      box-shadow: 0 0 0 1px ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);I=function t(){return e};return e}function L(){var e=(0,w._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);L=function t(){return e};return e}function F(){var e=(0,w._)(["\n      background-color: ",";\n      color: ",";\n      box-shadow: 0 0 0 1px ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n        box-shadow: 0 0 0 1px ",";\n        z-index: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n        box-shadow: 0 0 0 1px ",";\n      }\n\n      ","\n    "]);F=function t(){return e};return e}function N(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n      "]);N=function t(){return e};return e}function j(){var e=(0,w._)(["\n      background-color: ",";\n      color: ",";\n\n      &:hover:not(:disabled) {\n        background-color: ",";\n      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);j=function t(){return e};return e}function B(){var e=(0,w._)(["\n        color: ",";\n\n        svg {\n          color: ",";\n        }\n      "]);B=function t(){return e};return e}function U(){var e=(0,w._)(["\n      background-color: transparent;\n      color: ",";\n      padding: "," ",";\n\n      svg {\n        color: ",";\n      }\n\n      &:hover:not(:disabled) {\n        text-decoration: underline;\n        color: ",";\n\n        svg {\n          color: ",";\n        }\n      }\n\n      &:active:not(:disabled) {\n        color: ",";\n      }\n\n      &:focus:not(:disabled) {\n        color: ",";\n        svg {\n          color: ",";\n        }\n      }\n\n      ","\n    "]);U=function t(){return e};return e}function W(){var e=(0,w._)(["\n      color: transparent;\n    "]);W=function t(){return e};return e}function z(){var e=(0,w._)(["\n      margin-right: 0;\n      margin-left: ",";\n    "]);z=function t(){return e};return e}function J(){var e=(0,w._)(["\n      border-color: ",";\n    "]);J=function t(){return e};return e}function q(){var e=(0,w._)(["\n      border-color: ",";\n    "]);q=function t(){return e};return e}function H(){var e=(0,w._)(["\n      border-color: ",";\n    "]);H=function t(){return e};return e}function V(){var e=(0,w._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 30px;\n        height: 30px;\n      }\n    "]);V=function t(){return e};return e}function $(){var e=(0,w._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 20px;\n        height: 20px;\n      }\n    "]);$=function t(){return e};return e}function G(){var e=(0,w._)(["\n      color: ",";\n    "]);G=function t(){return e};return e}function X(){var e=(0,w._)(["\n      pointer-events: none;\n      color: ",";\n    "]);X=function t(){return e};return e}var K=e=>{var{text:t,type:r="button",disabled:o=false,onClick:s,buttonContentCss:u,isDanger:l=false,icon:c}=e,d=(0,_._)(e,["text","type","disabled","onClick","buttonContentCss","isDanger","icon"]);return/*#__PURE__*/(0,n/* .jsxs */.BX)("button",(0,a._)((0,i._)({type:r,css:et.dropdownOption({disabled:o,isDanger:l}),disabled:o,onClick:s},d),{children:[c&&/*#__PURE__*/(0,n/* .jsx */.tZ)(n/* .Fragment */.HY,{children:c}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:[et.dropdownOptionContent,u],children:t})]}))};var Q=e=>{var{type:t="button",text:r,children:o,variant:l="primary",placement:c=O/* .POPOVER_PLACEMENTS.BOTTOM_RIGHT */.h_.BOTTOM_RIGHT,animationType:d=E/* .AnimationType.slideUp */.ru.slideUp,size:f="regular",icon:p,iconPosition:h="left",loading:m=false,disabled:g=false,tabIndex:b=-1,onClick:y,buttonCss:w,buttonContentCss:x,dropdownMaxWidth:Z="140px",disabledDropdown:S=false}=e,T=(0,_._)(e,["type","text","children","variant","placement","animationType","size","icon","iconPosition","loading","disabled","tabIndex","onClick","buttonCss","buttonContentCss","dropdownMaxWidth","disabledDropdown"]);var C=(0,s.useRef)(null);var[R,A]=(0,s.useState)(false);return/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:et.wrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("button",(0,a._)((0,i._)({type:t,css:[et.button({variant:l,size:f,loading:m,disabled:g}),w],onClick:y,tabIndex:b,disabled:g||m},T),{children:[m&&!g&&/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:et.spinner,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("span",{css:[et.buttonContent({loading:m,disabled:g}),x],children:[p&&h==="left"&&/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:et.buttonIcon({iconPosition:h}),children:p}),r,p&&h==="right"&&/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:et.buttonIcon({iconPosition:h}),children:p})]})]})),/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{"data-cy":"dropdown-trigger",ref:C,type:"button",disabled:g||S,css:[et.button({variant:l,size:f,loading:false,disabled:g||S}),et.dropdownButton({variant:l,size:f,disabled:g||S})],onClick:()=>A(!R),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"chevronDown",width:24,height:24})})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)(k/* ["default"] */.Z,{gap:4,maxWidth:Z,placement:c,triggerRef:C,isOpen:R,closePopover:()=>A(false),animationType:d,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:et.dropdownWrapper,children:u().Children.map(o,e=>{if(/*#__PURE__*/u().isValidElement(e)){var t=(0,a._)((0,i._)({},e.props),{onClick:t=>{var r;A(false);(r=e.props)===null||r===void 0?void 0:r.onClick(t)}});return /*#__PURE__*/u().cloneElement(e,t)}return e})})})]})};Q.Item=K;/* ESM default export */const Y=Q;var ee=/*#__PURE__*/(0,o/* .keyframes */.F4)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var et={wrapper:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.inlineFlex */.i.display.inlineFlex(),";align-items:center;border-radius:",x/* .borderRadius["6"] */.E0["6"],";:focus-within{box-shadow:",x/* .shadow.focus */.AF.focus,";}"),button:e=>{var{variant:t,size:r,loading:n,disabled:i}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";",S/* .typography.caption */.c.caption("medium"),"    display:inline-block;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;color:",x/* .colorTokens.text.primary */.Jv.text.primary,";border:0;padding:",x/* .spacing["8"] */.W0["8"]," ",x/* .spacing["16"] */.W0["16"],";border-radius:",x/* .borderRadius["6"] */.E0["6"]," 0 0 ",x/* .borderRadius["6"] */.E0["6"],";z-index:",x/* .zIndex.level */.W5.level,";transition-property:box-shadow,background-color,opacity;transition-duration:150ms;transition-timing-function:ease-in-out;position:relative;",r==="large"&&(0,o/* .css */.iv)(T(),x/* .spacing["12"] */.W0["12"],x/* .spacing["32"] */.W0["32"])," ",r==="small"&&(0,o/* .css */.iv)(C(),x/* .fontSize["13"] */.JB["13"],x/* .lineHeight["20"] */.Nv["20"],x/* .spacing["6"] */.W0["6"],x/* .spacing["16"] */.W0["16"]),"    \n    ",t==="primary"&&(0,o/* .css */.iv)(A(),x/* .colorTokens.action.primary["default"] */.Jv.action.primary["default"],x/* .colorTokens.text.white */.Jv.text.white,x/* .colorTokens.action.primary.hover */.Jv.action.primary.hover,x/* .colorTokens.text.white */.Jv.text.white,x/* .colorTokens.action.primary.active */.Jv.action.primary.active,x/* .colorTokens.text.white */.Jv.text.white,(i||n)&&(0,o/* .css */.iv)(R(),x/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,x/* .colorTokens.text.disable */.Jv.text.disable,x/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,x/* .colorTokens.text.disable */.Jv.text.disable))," ",t==="secondary"&&(0,o/* .css */.iv)(P(),x/* .colorTokens.action.secondary["default"] */.Jv.action.secondary["default"],x/* .colorTokens.text.brand */.Jv.text.brand,x/* .colorTokens.action.secondary.hover */.Jv.action.secondary.hover,x/* .colorTokens.action.secondary.active */.Jv.action.secondary.active,(i||n)&&(0,o/* .css */.iv)(M(),x/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,x/* .colorTokens.text.disable */.Jv.text.disable))," ",t==="secondary"&&(0,o/* .css */.iv)(I(),x/* .colorTokens.action.outline["default"] */.Jv.action.outline["default"],x/* .colorTokens.text.brand */.Jv.text.brand,x/* .colorTokens.stroke.brand */.Jv.stroke.brand,x/* .colorTokens.action.outline.hover */.Jv.action.outline.hover,x/* .colorTokens.action.outline.active */.Jv.action.outline.active,(i||n)&&(0,o/* .css */.iv)(D(),x/* .colorTokens.text.disable */.Jv.text.disable,x/* .colorTokens.action.outline.disable */.Jv.action.outline.disable))," ",t==="tertiary"&&(0,o/* .css */.iv)(F(),x/* .colorTokens.background.white */.Jv.background.white,x/* .colorTokens.text.subdued */.Jv.text.subdued,x/* .colorTokens.stroke["default"] */.Jv.stroke["default"],x/* .colorTokens.background.hover */.Jv.background.hover,x/* .colorTokens.stroke.hover */.Jv.stroke.hover,x/* .zIndex.positive */.W5.positive,x/* .colorTokens.background.active */.Jv.background.active,x/* .colorTokens.stroke.hover */.Jv.stroke.hover,(i||n)&&(0,o/* .css */.iv)(L(),x/* .colorTokens.text.disable */.Jv.text.disable,x/* .colorTokens.action.outline.disable */.Jv.action.outline.disable))," ",t==="danger"&&(0,o/* .css */.iv)(j(),x/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,x/* .colorTokens.text.error */.Jv.text.error,x/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,x/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,(i||n)&&(0,o/* .css */.iv)(N(),x/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,x/* .colorTokens.text.disable */.Jv.text.disable))," ",t==="text"&&(0,o/* .css */.iv)(U(),x/* .colorTokens.text.subdued */.Jv.text.subdued,x/* .spacing["4"] */.W0["4"],x/* .spacing["8"] */.W0["8"],x/* .colorTokens.icon["default"] */.Jv.icon["default"],x/* .colorTokens.text.primary */.Jv.text.primary,x/* .colorTokens.icon.brand */.Jv.icon.brand,x/* .colorTokens.text.title */.Jv.text.title,x/* .colorTokens.text.title */.Jv.text.title,x/* .colorTokens.icon.brand */.Jv.icon.brand,(i||n)&&(0,o/* .css */.iv)(B(),x/* .colorTokens.text.disable */.Jv.text.disable,x/* .colorTokens.icon.disable */.Jv.icon.disable)),":disabled{cursor:not-allowed;}")},buttonContent:e=>{var{loading:t,disabled:r}=e;return/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;",t&&!r&&(0,o/* .css */.iv)(W()))},buttonIcon:e=>{var{iconPosition:t}=e;return/*#__PURE__*/(0,o/* .css */.iv)("display:grid;place-items:center;margin-right:",x/* .spacing["6"] */.W0["6"],";",t==="right"&&(0,o/* .css */.iv)(z(),x/* .spacing["6"] */.W0["6"]))},spinner:/*#__PURE__*/(0,o/* .css */.iv)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",ee," 1.5s linear infinite;}"),dropdownButton:e=>{var{variant:t,size:r,disabled:n}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.flexCenter */.i.flexCenter(),"    padding-inline:",x/* .spacing["8"] */.W0["8"],";border-left:1px solid transparent;border-radius:0 ",x/* .borderRadius["6"] */.E0["6"]," ",x/* .borderRadius["6"] */.E0["6"]," 0;svg{width:24px;height:24px;}",t==="primary"&&(0,o/* .css */.iv)(J(),x/* .colorTokens.stroke.brand */.Jv.stroke.brand)," ",t==="danger"&&(0,o/* .css */.iv)(q(),x/* .colorTokens.stroke.danger */.Jv.stroke.danger)," ",n&&(0,o/* .css */.iv)(H(),x/* .colorTokens.stroke.disable */.Jv.stroke.disable)," ",r==="large"&&(0,o/* .css */.iv)(V(),x/* .spacing["12"] */.W0["12"])," ",r==="small"&&(0,o/* .css */.iv)($(),x/* .spacing["6"] */.W0["6"]))},dropdownWrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;padding-block:",x/* .spacing["6"] */.W0["6"],";"),dropdownOption:e=>{var{disabled:t,isDanger:r}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";",S/* .typography.body */.c.body(),";color:",x/* .colorTokens.text.primary */.Jv.text.primary,";width:100%;padding:",x/* .spacing["6"] */.W0["6"]," ",x/* .spacing["16"] */.W0["16"]," ",x/* .spacing["6"] */.W0["6"]," ",x/* .spacing["20"] */.W0["20"],";transition:background-color 0.3s ease-in-out;cursor:pointer;display:flex;align-items:center;gap:",x/* .spacing["8"] */.W0["8"],";outline:2px solid transparent;outline-offset:-2px;",r&&(0,o/* .css */.iv)(G(),x/* .colorTokens.text.error */.Jv.text.error),":hover{background-color:",x/* .colorTokens.background.hover */.Jv.background.hover,";color:",r?x/* .colorTokens.text.error */.Jv.text.error:x/* .colorTokens.text.title */.Jv.text.title,";}:focus,:active{outline-color:",x/* .colorTokens.stroke.brand */.Jv.stroke.brand,";}",t&&(0,o/* .css */.iv)(X(),x/* .colorTokens.text.disable */.Jv.text.disable),"    svg:first-of-type{color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";}")},dropdownOptionContent:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;svg{flex-shrink:0;}")};// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/Modal.tsx
var er=r(63260);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/BasicModalWrapper.tsx
var en=r(22128);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/Show.tsx
var ei=r(17106);// CONCATENATED MODULE: ./assets/react/v3/shared/components/modals/SuccessModal.tsx
var ea=e=>{var{title:t,description:r,image:i,image2x:a,imageAlt:o,closeModal:s,actions:u,wrapperCss:l,bodyCss:c}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)(en/* ["default"] */.Z,{onClose:()=>s({action:"CLOSE"}),entireHeader:/*#__PURE__*/(0,n/* .jsx */.tZ)(n/* .Fragment */.HY,{children:" "}),maxWidth:408,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:[es.wrapper,l],children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{src:i,srcSet:a?"".concat(i," 1x, ").concat(a," 2x"):undefined,alt:o,css:es.image})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:[es.body,c],children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{css:S/* .typography.heading5 */.c.heading5("medium"),children:t}),/*#__PURE__*/(0,n/* .jsx */.tZ)("p",{css:es.message,children:r})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:es.footer,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:u,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{onClick:()=>s({action:"CLOSE"}),size:"small",children:(0,f.__)("Ok","tutor")}),children:u})})]})})};/* ESM default export */const eo=ea;var es={wrapper:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.flex */.i.display.flex("column"),";padding:",x/* .spacing["24"] */.W0["24"],";gap:",x/* .spacing["24"] */.W0["24"],";"),image:/*#__PURE__*/(0,o/* .css */.iv)("width:100%;height:auto;object-position:center;object-fit:contain;"),body:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",x/* .spacing["8"] */.W0["8"],";"),message:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.subdued */.Jv.text.subdued,";"),footer:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.flex */.i.display.flex(),";justify-content:flex-end;gap:",x/* .spacing["16"] */.W0["16"],";padding-top:",x/* .spacing["8"] */.W0["8"],";")};// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/services/course.ts
var eu=r(90406);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/utils/utils.ts
var el=r(14784);// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var ec=r(34039);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var ed=r(74053);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/types.ts
var ef=r(22456);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/util.ts + 4 modules
var ep=r(34403);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/config/route-configs.ts + 1 modules
var eh=r(38032);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var ev=r(75537);// CONCATENATED MODULE: ./assets/react/v3/public/images/review-submitted-2x.webp
const em=r.p+"js/images/review-submitted-2x-e2f2f56c.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/review-submitted.webp
const eg=r.p+"js/images/review-submitted-edf6b690.webp";// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/header/HeaderActions.tsx
var eb=(0,el/* .getCourseId */.z)();var ey=()=>{var e,t,r,u,h;var{fields:m}=(0,ev/* .useCourseBuilderSlot */.l)();var _=(0,l/* .useFormContext */.Gc)();var w=(0,c/* .useNavigate */.s0)();var{showModal:E}=(0,er/* .useModal */.d)();var S=(0,l/* .useWatch */.qo)({name:"post_status"});var O=(0,l/* .useWatch */.qo)({name:"visibility"});var k=(0,l/* .useWatch */.qo)({name:"preview_link"});var T=(0,l/* .useWatch */.qo)({name:"isScheduleEnabled"});var C=(0,l/* .useWatch */.qo)({name:"schedule_date"});var R=(0,l/* .useWatch */.qo)({name:"schedule_time"});var[A,M]=(0,s.useState)(S);var P=(0,d/* .useQueryClient */.NL)();var D=(0,eu/* .useCreateCourseMutation */._c)();var I=(0,eu/* .useUpdateCourseMutation */.mG)();var L=P.getQueryData(["CourseDetails",eb]);var F=_.formState.dirtyFields.schedule_date||_.formState.dirtyFields.schedule_time;var N=!!ec/* .tutorConfig.tutor_pro_url */.y.tutor_pro_url;var j=(e=ec/* .tutorConfig.current_user.roles */.y.current_user.roles)===null||e===void 0?void 0:e.includes(ed/* .TutorRoles.ADMINISTRATOR */.er.ADMINISTRATOR);var B=(t=ec/* .tutorConfig.current_user.roles */.y.current_user.roles)===null||t===void 0?void 0:t.includes(ed/* .TutorRoles.TUTOR_INSTRUCTOR */.er.TUTOR_INSTRUCTOR);var U=((r=ec/* .tutorConfig.settings */.y.settings)===null||r===void 0?void 0:r.instructor_can_delete_course)==="on"||j;var W=((u=ec/* .tutorConfig.settings */.y.settings)===null||u===void 0?void 0:u.hide_admin_bar_for_users)==="off";var z=((h=ec/* .tutorConfig.settings */.y.settings)===null||h===void 0?void 0:h.instructor_can_publish_course)==="on";var J=(e,t)=>(0,g._)(function*(){var r=e=>{Promise.resolve().then(()=>{_.trigger(e,{shouldFocus:true})})};var s=()=>{w(eh/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.L.CourseBasics.buildLink(),{state:{isError:true}})};if(e.isScheduleEnabled&&(!e.schedule_date||!e.schedule_time||!(0,b["default"])(new Date,new Date("".concat(e.schedule_date," ").concat(e.schedule_time))))){s();_.setValue("showScheduleForm",true,{shouldDirty:true});if(!e.schedule_date){r("schedule_date");return}if(!e.schedule_time){r("schedule_time");return}}if(e.course_price_type==="paid"){var u,l,c;if(!e.course_product_id&&((u=ec/* .tutorConfig.settings */.y.settings)===null||u===void 0?void 0:u.monetize_by)==="edd"){s();r("course_product_id");return}if(N&&((l=ec/* .tutorConfig.settings */.y.settings)===null||l===void 0?void 0:l.monetize_by)==="wc"&&e.course_product_id!=="-1"||((c=ec/* .tutorConfig.settings */.y.settings)===null||c===void 0?void 0:c.monetize_by)==="tutor"&&!["membership","subscription"].includes(e.course_selling_option)){if(e.course_price===""||Number(e.course_price)<=0){s();r("course_price");return}if(e.course_sale_price&&Number(e.course_sale_price)>=Number(e.course_price)){s();r("course_sale_price");return}}}var d=(0,eu/* .convertCourseDataToPayload */.iC)(e,(0,ep/* .findSlotFields */.hk)({fields:m.Basic},{fields:m.Additional}));M(t);if(eb){var h;var v=(0,ep/* .determinePostStatus */.Xl)(t,O);var g=yield I.mutateAsync((0,i._)((0,a._)((0,i._)({course_id:Number(eb)},d),{post_status:v}),!e.isScheduleEnabled?{post_date:(0,y["default"])(new Date,ed/* .DateFormats.yearMonthDayHourMinuteSecond24H */.E_.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,ep/* .convertToGMT */.WK)(new Date)}:{},e.isScheduleEnabled&&{edit_date:true},["subscription","membership"].includes(e.course_selling_option)&&(!(0,ef/* .isDefined */.$K)(L.course_pricing.price)||Number(L.course_pricing.price)===0)&&{course_price:1}));if(!g.data){return}if(t==="pending"){E({component:eo,props:{title:(0,f.__)("Course submitted for review","tutor"),description:(0,f.__)("Thank you for submitting your course. It will be reviewed by our team shortly.","tutor"),image:eg,image2x:em,imageAlt:(0,f.__)("Course submitted for review","tutor"),wrapperCss:/*#__PURE__*/(0,o/* .css */.iv)("align-items:center;text-align:center;"),actions:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:Z/* .styleUtils.flexCenter */.i.flexCenter(),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{as:"a",href:window.location.href.includes("wp-admin")?ec/* .tutorConfig.backend_course_list_url */.y.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.y.frontend_course_list_url,size:"small",children:(0,f.__)("Back to Courses","tutor")})})}})}if(B&&((h=ec/* .tutorConfig.settings */.y.settings)===null||h===void 0?void 0:h.enable_redirect_on_course_publish_from_frontend)==="on"&&["publish","future"].includes(v)){window.location.href=ec/* ["default"].TUTOR_MY_COURSES_PAGE_URL */.Z.TUTOR_MY_COURSES_PAGE_URL}return}var x=yield D.mutateAsync((0,i._)({},d));if(x.data){window.location.href="".concat(ec/* ["default"].TUTOR_SITE_URL */.Z.TUTOR_SITE_URL,"/wp-admin/admin.php?page=create-course&course_id=").concat(x.data)}})();var q=()=>{if(!z&&!j&&B){return{text:(0,f.__)("Submit","tutor"),action:"pending"}}var e=(0,b["default"])(new Date,new Date("".concat(C," ").concat(R)));var t=!eb||["pending","draft"].includes(S);if(t){var r=F&&T&&e;return{text:r?(0,f.__)("Schedule","tutor"):(0,f.__)("Publish","tutor"),action:r?"future":"publish"}}if(T){var n=F&&e;return{text:n?(0,f.__)("Schedule","tutor"):(0,f.__)("Update","tutor"),action:"future"}}return{text:(0,f.__)("Update","tutor"),action:"publish"}};var H=()=>{var e={text:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:[Z/* .styleUtils.display.flex */.i.display.flex(),{alignItems:"center"}],children:[(0,f.__)("Preview","tutor"),/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"linkExternal",width:24,height:24})]}),onClick:!eb||S==="draft"&&eb?()=>window.open(k,"_blank","noopener"):ep/* .noop */.ZT,isDanger:false,dataCy:"preview-course"};var t={text:/*#__PURE__*/(0,n/* .jsx */.tZ)(n/* .Fragment */.HY,{children:(0,f.__)("Move to Trash","tutor")}),onClick:()=>(0,g._)(function*(){if(U){try{yield _.handleSubmit(e=>J(e,"trash"))()}finally{window.location.href=window.location.href.includes("wp-admin")?ec/* .tutorConfig.backend_course_list_url */.y.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.y.frontend_course_list_url}}})(),isDanger:true,dataCy:"move-to-trash"};var r={text:/*#__PURE__*/(0,n/* .jsx */.tZ)(n/* .Fragment */.HY,{children:(0,f.__)("Switch to Draft","tutor")}),onClick:_.handleSubmit(e=>J(e,"draft")),isDanger:false,dataCy:"switch-to-draft"};var o={text:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:[Z/* .styleUtils.display.flex */.i.display.flex(),{alignItems:"center"}],children:[(0,f.__)("Legacy Mode","tutor"),/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"linkExternal",width:24,height:24})]}),onClick:()=>{var e=eb?"".concat(ec/* ["default"].TUTOR_SITE_URL */.Z.TUTOR_SITE_URL,"/wp-admin/post.php?post=").concat(eb,"&action=edit"):"".concat(ec/* ["default"].TUTOR_SITE_URL */.Z.TUTOR_SITE_URL,"/wp-admin/post-new.php?post_type=courses");window.open(e,"_blank","noopener")},isDanger:false,dataCy:"back-to-legacy"};var s={text:/*#__PURE__*/(0,n/* .jsx */.tZ)(n/* .Fragment */.HY,{children:(0,f.__)("Publish Immediately","tutor")}),onClick:_.handleSubmit(e=>J((0,a._)((0,i._)({},e),{isScheduleEnabled:false}),"publish")),isDanger:false,dataCy:"publish-immediately"};var u=[e];if((j||z)&&T&&(0,b["default"])(new Date,new Date("".concat(C," ").concat(R)))){u.unshift(s)}if(eb&&S!=="draft"){u.pop();if(j||z){u.push(r)}}if(j||U){u.push(t)}if(j||W){u.push(o)}return u};(0,s.useEffect)(()=>{if(I.isSuccess){_.reset(_.getValues())}// eslint-disable-next-line react-hooks/exhaustive-deps
},[I.isSuccess]);return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:e_.headerRight,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:S==="draft"&&O!=="private",fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{as:"a",href:k,target:"_blank",variant:"text",icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"linkExternal",width:24,height:24}),iconPosition:"right",disabled:!k,size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop,children:(0,f.__)("Preview","tutor")})}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"upload",width:24,height:24}),loading:A==="draft"&&I.isPending,iconPosition:"left",buttonCss:/*#__PURE__*/(0,o/* .css */.iv)("padding-inline:",x/* .spacing["16"] */.W0["16"],";"),onClick:_.handleSubmit(e=>J(e,"draft")),size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop,children:(0,f.__)("Save as Draft","tutor")})})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:H().length>0,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{"data-cy":"course-builder-submit-button",size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?"regular":"small",loading:D.isPending||["publish","future","pending"].includes(A)&&I.isPending,onClick:_.handleSubmit(e=>J(e,q().action)),children:q().text}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(Y,{"data-cy":"course-builder-submit-button",text:q().text,size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?"regular":"small",variant:"primary",loading:D.isPending||["publish","future","pending"].includes(A)&&I.isPending,onClick:_.handleSubmit(e=>J(e,q().action)),dropdownMaxWidth:T&&(0,b["default"])(new Date,new Date("".concat(C," ").concat(R)))?"190px":"164px",disabledDropdown:H().length===0,children:H().map((e,t)=>/*#__PURE__*/(0,n/* .jsx */.tZ)(Y.Item,{text:e.text,onClick:e.onClick,isDanger:e.isDanger,"data-cy":e.dataCy},t))})})]})};var e_={headerRight:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["12"] */.W0["12"],";")};/* ESM default export */const ew=ey;// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseNavigatorContext.tsx
var ex=r(89459);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/For.tsx
var eE=r(36352);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/Tracker.tsx
function eZ(){var e=(0,w._)(["\n      color: ",";\n    "]);eZ=function t(){return e};return e}function eS(){var e=(0,w._)(["\n      color: ",";\n      cursor: not-allowed;\n    "]);eS=function t(){return e};return e}function eO(){var e=(0,w._)(["\n        border-color: ",";\n        border-color: ",";\n        background-color: ",";\n        color: ",";\n      "]);eO=function t(){return e};return e}var ek=()=>{var{steps:e}=(0,ex/* .useCourseNavigator */.O)();var t=(0,c/* .useNavigate */.s0)();var r=(0,l/* .useFormContext */.Gc)();var i=r.watch("post_title");var a=e=>(0,g._)(function*(){t(e.path)})();return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{"data-cy":"tutor-tracker",css:eC.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:e,children:e=>/*#__PURE__*/(0,n/* .jsxs */.BX)("button",{type:"button",css:eC.element({isActive:e.isActive,isDisabled:e.id!=="basic"&&!i}),onClick:()=>a(e),disabled:e.id!=="basic"&&!i,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{"data-element-id":true,children:e.indicator}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{"data-element-name":true,"data-isActive":e.isActive,children:e.label}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:e.indicator<3,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{"data-element-indicator":true})})]},e.id)})})};/* ESM default export */const eT=ek;var eC={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;"),element:e=>{var{isActive:t=false,isDisabled:r=false}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";",Z/* .styleUtils.display.flex */.i.display.flex(),";",S/* .typography.small */.c.small(),";padding:",x/* .spacing["4"] */.W0["4"]," ",x/* .spacing["0"] */.W0["0"]," ",x/* .spacing["4"] */.W0["4"]," ",x/* .spacing["8"] */.W0["8"],";gap:",x/* .spacing["8"] */.W0["8"],";align-items:center;&:hover,&:focus{background:none;box-shadow:none;color:",x/* .colorTokens.text.primary */.Jv.text.primary,";}&:focus-visible{outline:2px solid ",x/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;border-radius:",x/* .borderRadius["4"] */.E0["4"],";}&:is(:first-of-type){padding-left:0;}",t&&(0,o/* .css */.iv)(eZ(),x/* .colorTokens.text.primary */.Jv.text.primary)," ",r&&(0,o/* .css */.iv)(eS(),x/* .colorTokens.text.hints */.Jv.text.hints),"    [data-element-id]{",Z/* .styleUtils.display.flex */.i.display.flex(),";",S/* .typography.small */.c.small("bold"),";line-height:",x/* .lineHeight["20"] */.Nv["20"],";width:24px;height:24px;border-radius:",x/* .borderRadius.circle */.E0.circle,";justify-content:center;align-items:center;border:1px solid ",x/* .colorTokens.color.black["10"] */.Jv.color.black["10"],";color:",x/* .colorTokens.text.hints */.Jv.text.hints,";",t&&(0,o/* .css */.iv)(eO(),x/* .colorTokens.stroke.brand */.Jv.stroke.brand,x/* .colorTokens.stroke.brand */.Jv.stroke.brand,x/* .colorTokens.design.brand */.Jv.design.brand,x/* .colorTokens.text.white */.Jv.text.white),"}[data-element-indicator]{width:16px;height:2px;border-radius:",x/* .spacing["6"] */.W0["6"],";background-color:",x/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";margin-inline:4px;}",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{[data-element-name]:not([data-isActive='true']){display:none;}}")}};// EXTERNAL MODULE: ./assets/react/v3/shared/components/fields/FormTextareaInput.tsx
var eR=r(3473);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/useFormWithGlobalError.ts
var eA=r(37861);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/ContentGenerationContext.tsx
var eM={prompt:"",title:"",featured_image:"",description:"",topics:[],time:0};var eP={title:false,description:false,topic:false,content:false,quiz:false};var eD={title:"",description:"",topic:"",content:"",quiz:""};var eI=/*#__PURE__*/u().createContext({abortControllerRef:{current:null},abortStatus:[],currentStep:"prompt",setCurrentStep:ep/* .noop */.ZT,contents:[eM],updateContents:ep/* .noop */.ZT,pointer:0,setPointer:ep/* .noop */.ZT,appendContent:ep/* .noop */.ZT,removeContent:ep/* .noop */.ZT,appendLoading:ep/* .noop */.ZT,removeLoading:ep/* .noop */.ZT,appendErrors:ep/* .noop */.ZT,removeErrors:ep/* .noop */.ZT,currentContent:{},currentErrors:{},currentAbortStatus:false,loading:[{title:false,description:false,content:false,topic:false,quiz:false}],errors:[{title:"",description:"",topic:"",content:"",quiz:""}],updateErrors:ep/* .noop */.ZT,currentLoading:{},updateLoading:ep/* .noop */.ZT,updateAbortStatus:ep/* .noop */.ZT});var eL=()=>(0,s.useContext)(eI);var eF=e=>{var{children:t}=e;var r=(0,s.useRef)(null);var[o,u]=(0,s.useState)("prompt");var[l,c]=(0,s.useState)([eM]);var[d,f]=(0,s.useState)(0);var[p,h]=(0,s.useState)([{title:false,description:false,content:false,topic:false,quiz:false}]);var[v,m]=(0,s.useState)([{title:"",description:"",topic:"",content:"",quiz:""}]);var[g,b]=(0,s.useState)([]);var y=(0,s.useMemo)(()=>{return l[d]},[d,l]);var _=(0,s.useMemo)(()=>{return p[d]},[d,p]);var w=(0,s.useMemo)(()=>{return v[d]},[d,v]);var x=(0,s.useMemo)(()=>{return g[d]},[d,g]);var E=(0,s.useCallback)((e,t)=>{var r,n,o,s;var u;var l=(u=(r=e.topics)===null||r===void 0?void 0:r.length)!==null&&u!==void 0?u:0;var f;var p=(f=(n=e.topics)===null||n===void 0?void 0:n.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="lesson").length},0))!==null&&f!==void 0?f:0;var h;var v=(h=(o=e.topics)===null||o===void 0?void 0:o.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="quiz").length},0))!==null&&h!==void 0?h:0;var m;var g=(m=(s=e.topics)===null||s===void 0?void 0:s.reduce((e,t)=>{return e+t.contents.filter(e=>e.type==="assignment").length},0))!==null&&m!==void 0?m:0;var b=(0,ef/* .isDefined */.$K)(t)?t:d;c(t=>{var r,n;var o=[...t];(r=o)[n=b]||(r[n]=eM);o[b]=(0,a._)((0,i._)({},o[b],e),{counts:{topics:l,lessons:p,quizzes:v,assignments:g}});return o})},[d]);var Z=(0,s.useCallback)((e,t)=>{var r=(0,ef/* .isDefined */.$K)(t)?t:d;h(t=>{var n,a;var o=[...t];(n=o)[a=r]||(n[a]=eP);o[r]=(0,i._)({},o[r],e);return o})},[d]);var S=(0,s.useCallback)((e,t)=>{var r=(0,ef/* .isDefined */.$K)(t)?t:d;m(t=>{var n=[...t];n[r]=(0,i._)({},n[r],e);return n})},[d]);var O=(0,s.useCallback)((e,t)=>{var r=(0,ef/* .isDefined */.$K)(t)?t:d;b(t=>{var n=[...t];n[r]=e;return n})},[d]);var k=(0,s.useCallback)(()=>{c(e=>[...e,eM])},[]);var T=(0,s.useCallback)(()=>{c(e=>[...e].slice(0,-1))},[]);var C=(0,s.useCallback)(()=>{h(e=>[...e,eP])},[]);var R=(0,s.useCallback)(()=>{h(e=>[...e].slice(0,-1))},[]);var A=(0,s.useCallback)(()=>{m(e=>[...e,eD])},[]);var M=(0,s.useCallback)(()=>{m(e=>[...e].slice(0,-1))},[]);var P={abortControllerRef:r,abortStatus:g,currentStep:o,setCurrentStep:u,contents:l,loading:p,errors:v,pointer:d,setPointer:f,updateContents:E,updateLoading:Z,updateErrors:S,updateAbortStatus:O,currentContent:y,currentLoading:_,currentErrors:w,currentAbortStatus:x,appendContent:k,removeContent:T,appendLoading:C,removeLoading:R,appendErrors:A,removeErrors:M};return/*#__PURE__*/(0,n/* .jsx */.tZ)(eI.Provider,{value:P,children:t})};/* ESM default export */const eN=eF;// EXTERNAL MODULE: ./assets/react/v3/shared/services/magic-ai.ts
var ej=r(15287);// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-blue.webp
const eB=r.p+"js/images/course-generation-placeholder-blue-19c28853.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-green.webp
const eU=r.p+"js/images/course-generation-placeholder-green-a82f3c5b.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-purple.webp
const eW=r.p+"js/images/course-generation-placeholder-purple-859bd9be.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-red.webp
const ez=r.p+"js/images/course-generation-placeholder-red-2ee8f879.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-rust.webp
const eJ=r.p+"js/images/course-generation-placeholder-rust-e879972a.webp";// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/hooks/useGenerateCourseContent.ts
var eq=[eB,ez,eJ,eU,eW];var eH=()=>{var{abortControllerRef:e,updateContents:t,updateLoading:r,updateErrors:n,updateAbortStatus:o}=eL();var s=(0,ej/* .useGenerateCourseContentMutation */.wl)("title");var u=(0,ej/* .useGenerateCourseContentMutation */.wl)("description");var l=(0,ej/* .useGenerateCourseTopicNamesMutation */.Ye)();var c=(0,ej/* .useGenerateCourseTopicContentMutation */.F3)();var d=(0,ej/* .useGenerateQuizQuestionsMutation */.tg)();var f=(o,f)=>(0,g._)(function*(){var p=Date.now();if(!e.current){e.current=new AbortController}if(o.length){t({prompt:o},f)}try{r({title:true,description:true,content:true,topic:true,quiz:true},f);var h=yield s.mutateAsync({type:"title",prompt:o,signal:e.current.signal});r({title:false},f);if(!h.data){return}var v=h.data;t({title:v,prompt:o},f);var m=yield(0,ep/* .fetchImageUrlAsBase64 */.yP)(eq[Math.floor(Math.random()*eq.length)]);t({featured_image:m},f);try{var g=yield u.mutateAsync({type:"description",title:v,signal:e.current.signal});r({description:false},f);t({description:g.data},f)}catch(e){r({description:false},f);n({description:e},f)}try{var b=function(t){var r=function(r){var a=i.contents[r];if(a.type==="quiz"){var o;var s=d.mutateAsync({title:v,topic_name:i.title,quiz_title:a.title,signal:(o=e.current)===null||o===void 0?void 0:o.signal}).then(e=>{var n;(n=_[t].contents[r]).questions||(n.questions=[]);_[t].contents[r].questions=e.data}).catch(e=>{n({quiz:e},f)});x.push(s)}};var i=_[t];for(var a=0;a<i.contents.length;a++)r(a)};var y=yield l.mutateAsync({type:"topic_names",title:v,signal:e.current.signal});r({topic:false},f);var _=y.data.map(e=>(0,a._)((0,i._)({},e),{contents:[],is_active:true}));t({topics:_},f);var w=_.map((r,i)=>{var a;return c.mutateAsync({title:v,topic_name:r.title,index:i,signal:(a=e.current)===null||a===void 0?void 0:a.signal}).then(e=>{var r;var{index:n,topic_contents:i}=e.data;(r=_[n]).contents||(r.contents=[]);_[n].contents.push(...i);t({topics:_},f)}).catch(e=>{n({topic:e},f)})});yield Promise.allSettled(w);r({content:false},f);/** Generate quiz contents  */var x=[];for(var E=0;E<_.length;E++)b(E);yield Promise.allSettled(x);r({quiz:false},f);var Z=Date.now();t({topics:_,time:Z-p},f)}catch(e){r({topic:false,content:false,quiz:false},f);n({topic:e},f)}}catch(e){r({title:false,content:false,description:false,quiz:false,topic:false},f);n({title:e,content:e,description:e,quiz:e,topic:e},f)}})();var p=()=>{if(e.current){e.current.abort();e.current=null;r({title:false,content:false,description:false,quiz:false,topic:false});o(true)}};return{startGeneration:f,cancelGeneration:p}};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/BasicPrompt.tsx
var eV=e=>{var{onClose:t}=e;var r=(0,eA/* .useFormWithGlobalError */.O)({defaultValues:{prompt:""}});var{setCurrentStep:o}=eL();var{startGeneration:u}=eH();(0,s.useEffect)(()=>{r.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,n/* .jsxs */.BX)("form",{css:eG.container,onSubmit:r.handleSubmit(e=>(0,g._)(function*(){o("generation");u(e.prompt)})()),children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:eG.header,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:eG.headerContent,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:eG.iconWithTitle,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.tZ)("p",{css:eG.title,children:(0,f.__)("AI Studio","tutor")})]})}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:eG.actionsWrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{type:"button",css:eG.closeButton,onClick:t,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"timesThin",width:24,height:24})})})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:eG.content,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(l/* .Controller */.Qr,{control:r.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.tZ)(eR/* ["default"] */.Z,(0,a._)((0,i._)({},e),{placeholder:(0,f.__)("Enter a brief overview of your course topics and structure","tutor"),isMagicAi:true}))})}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:eG.footer,children:/*#__PURE__*/(0,n/* .jsxs */.BX)(h/* ["default"] */.Z,{type:"submit",disabled:r.watch("prompt")==="",children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicAi",width:24,height:24}),(0,f.__)("Generate Now","tutor")]})})]})};/* ESM default export */const e$=eV;var eG={container:/*#__PURE__*/(0,o/* .css */.iv)("position:absolute;background:",x/* .colorTokens.background.white */.Jv.background.white,";box-shadow:",x/* .shadow.modal */.AF.modal,";border-radius:",x/* .borderRadius["10"] */.E0["10"],";overflow:hidden;top:50%;left:50%;translate:-50% -50%;max-width:560px;width:100%;:dir(rtl){translate:50% -50%;}",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{width:90%;}"),header:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",ed/* .modal.BASIC_MODAL_HEADER_HEIGHT */.oC.BASIC_MODAL_HEADER_HEIGHT,"px;background:",x/* .colorTokens.background.white */.Jv.background.white,";border-bottom:1px solid ",x/* .colorTokens.stroke.divider */.Jv.stroke.divider,";padding-inline:",x/* .spacing["16"] */.W0["16"],";"),headerContent:/*#__PURE__*/(0,o/* .css */.iv)("place-self:center start;display:inline-flex;align-items:center;gap:",x/* .spacing["12"] */.W0["12"],";"),iconWithTitle:/*#__PURE__*/(0,o/* .css */.iv)("display:inline-flex;align-items:center;gap:",x/* .spacing["4"] */.W0["4"],";color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";"),title:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.body */.c.body("medium"),";color:",x/* .colorTokens.text.title */.Jv.text.title,";text-transform:capitalize;"),subtitle:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.text.ellipsis */.i.text.ellipsis(1)," ",S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.hints */.Jv.text.hints,";"),actionsWrapper:/*#__PURE__*/(0,o/* .css */.iv)("place-self:center end;display:inline-flex;gap:",x/* .spacing["16"] */.W0["16"],";"),closeButton:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",x/* .borderRadius.circle */.E0.circle,";background:",x/* .colorTokens.background.white */.Jv.background.white,";svg{color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",x/* .colorTokens.icon.hover */.Jv.icon.hover,";}}:focus{box-shadow:",x/* .shadow.focus */.AF.focus,";}"),content:/*#__PURE__*/(0,o/* .css */.iv)("background-color:",x/* .colorTokens.background.white */.Jv.background.white,";overflow-y:auto;width:100%;padding:",x/* .spacing["12"] */.W0["12"]," ",x/* .spacing["20"] */.W0["20"]," ",x/* .spacing["4"] */.W0["4"]," ",x/* .spacing["20"] */.W0["20"],";"),footer:/*#__PURE__*/(0,o/* .css */.iv)("padding:",x/* .spacing["8"] */.W0["8"]," ",x/* .spacing["20"] */.W0["20"]," ",x/* .spacing["12"] */.W0["12"]," ",x/* .spacing["20"] */.W0["20"],";")};// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Alert.tsx
var eX=r(87056);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/LoadingSpinner.tsx
var eK=r(2613);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Toast.tsx
var eQ=r(13985);// EXTERNAL MODULE: ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs
var eY=r(6154);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Skeleton.tsx
var e0=r(97503);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/TopicContentSkeleton.tsx
var e1=()=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:e4.spacer,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:e4.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"50%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:e4.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"40%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:e4.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})]})};/* ESM default export */const e2=e1;var e4={group:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;gap:",x/* .spacing["16"] */.W0["16"],";align-items:center;"),spacer:/*#__PURE__*/(0,o/* .css */.iv)("margin-left:",x/* .spacing["16"] */.W0["16"],";display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/ContentAccordion.tsx
function e3(){var e=(0,w._)(["\n      margin-top: ",";\n    "]);e3=function t(){return e};return e}function e5(){var e=(0,w._)(["\n      svg {\n        transform: rotate(180deg);\n      }\n    "]);e5=function t(){return e};return e}var e6={lesson:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"lesson",width:24,height:24,"data-lesson-icon":true}),assignment:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"assignment",width:24,height:24,"data-assignment-icon":true}),quiz:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"quiz",width:24,height:24,"data-quiz-icon":true})};var e8=e=>{var{data:t,setIsActive:r}=e;var{currentLoading:i}=eL();var a=i.content&&t.contents.length===0;var s=(0,eY/* .useSpring */.q_)({maxHeight:t.is_active?300:0,opacity:t.is_active?1:0,config:{duration:300,easing:e=>e*(2-e)}});return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{onClick:t.contents.length?r:ep/* .noop */.ZT,onKeyDown:ep/* .noop */.ZT,css:/*#__PURE__*/(0,o/* .css */.iv)("cursor:",t.contents.length?"pointer":"default",";"),children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:te.title,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:te.titleAndIcon({isActive:t.is_active}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"chevronDown",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.tZ)("p",{children:t.title})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("p",{children:[t.contents.length," ",(0,f.__)("Contents","tutor")]})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:t.contents.length>0&&!a,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:a,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:/*#__PURE__*/(0,o/* .css */.iv)("margin-top:",x/* .spacing["16"] */.W0["16"],";"),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(e2,{})})}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eY/* .animated.div */.q.div,{style:s,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:te.content(t.is_active),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!a,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:t.contents,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:te.contentItem,children:[e.type==="quiz"&&!i.content&&i.quiz&&!(e===null||e===void 0?void 0:e.questions)?/*#__PURE__*/(0,n/* .jsx */.tZ)(eK/* .GradientLoadingSpinner */.Bt,{}):e6[e.type],/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:e.title})]},t)}})})})})})]})};var e9=()=>{var{currentContent:e}=eL();var[t,r]=(0,s.useState)([]);(0,s.useEffect)(()=>{if(e.topics){r(e.topics.map(e=>(0,a._)((0,i._)({},e),{is_active:true})))}},[e.topics]);return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:te.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.tZ)(e8,{data:e,isActive:t===0,setIsActive:()=>{r(e=>{return e.map((e,r)=>{if(r===t){return(0,a._)((0,i._)({},e),{is_active:!e.is_active})}return(0,i._)({},e)})})}},t)}})})};/* ESM default export */const e7=e9;var te={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["24"] */.W0["24"],";"),content:e=>/*#__PURE__*/(0,o/* .css */.iv)("margin-left:",x/* .spacing["32"] */.W0["32"],";display:flex;flex-direction:column;gap:",x/* .spacing["8"] */.W0["8"],";",e&&(0,o/* .css */.iv)(e3(),x/* .spacing["16"] */.W0["16"]),";"),contentItem:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["8"] */.W0["8"],";[data-lesson-icon]{color:",x/* .colorTokens.icon.subdued */.Jv.icon.subdued,";}[data-assignment-icon]{color:",x/* .colorTokens.icon.processing */.Jv.icon.processing,";}[data-quiz-icon]{color:",x/* .colorTokens.design.warning */.Jv.design.warning,";}"),titleAndIcon:e=>{var{isActive:t}=e;return/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["8"] */.W0["8"],";svg{transition:transform 0.3s ease-in-out;}",t&&(0,o/* .css */.iv)(e5()),";")},title:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;p{",S/* .typography.body */.c.body("medium"),";color:",x/* .colorTokens.text.subdued */.Jv.text.subdued,";}& > p{",S/* .typography.caption */.c.caption(),";}")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/ContentSkeleton.tsx
var tt=()=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"85%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"60%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]})]})};/* ESM default export */const tr=tt;var tn={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";width:100%;margin-top:",x/* .spacing["16"] */.W0["16"],";"),group:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;gap:",x/* .spacing["16"] */.W0["16"],";align-items:center;")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/DescriptionSkeleton.tsx
var ti=()=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:to.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"30%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"95%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"35%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"65%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})};/* ESM default export */const ta=ti;var to={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";width:100%;margin-top:",x/* .spacing["16"] */.W0["16"],";")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/TitleSkeleton.tsx
var ts=()=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tl.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"24px",height:"24px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"24px"})]})};/* ESM default export */const tu=ts;var tl={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["16"] */.W0["16"],";width:100%;")};// CONCATENATED MODULE: ./assets/react/v3/public/images/ai-studio-error-2x.webp
const tc=r.p+"js/images/ai-studio-error-2x-4767a6a1.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/ai-studio-error.webp
const td=r.p+"js/images/ai-studio-error-7b87f088.webp";// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/ImageSkeleton.tsx
var tf=()=>{return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:th.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(e0/* ["default"] */.Z,{isMagicAi:true,animation:true,width:"100%",height:"390px"})})};/* ESM default export */const tp=tf;var th={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["16"] */.W0["16"],";width:100%;")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/ContentGeneration.tsx
function tv(){var e=(0,w._)(["\n      [data-check-icon] {\n        color: "," !important;\n      }\n    "]);tv=function t(){return e};return e}function tm(){var e=(0,w._)(["\n      border-color: ",";\n    "]);tm=function t(){return e};return e}function tg(){var e=(0,w._)(["\n      border-color: ",";\n    "]);tg=function t(){return e};return e}function tb(){var e=(0,w._)(["\n      cursor: default;\n    "]);tb=function t(){return e};return e}var ty={title:{loading_label:(0,f.__)("Now generating course title...","tutor"),completed_label:(0,f.__)("Course title generated.","tutor"),error_label:(0,f.__)("Error generating course title.","tutor"),completed:false,hasError:false},description:{loading_label:(0,f.__)("Now generating course description...","tutor"),completed_label:(0,f.__)("Course description generated.","tutor"),error_label:(0,f.__)("Error generating course description.","tutor"),completed:false,hasError:false},topic:{loading_label:(0,f.__)("Now generating topic names...","tutor"),completed_label:(0,f.__)("Course topics generated.","tutor"),error_label:(0,f.__)("Error generating topics.","tutor"),completed:false,hasError:false},content:{loading_label:(0,f.__)("Now generating course contents...","tutor"),completed_label:(0,f.__)("Course contents generated.","tutor"),error_label:(0,f.__)("Error generating course contents.","tutor"),completed:false,hasError:false},quiz:{loading_label:(0,f.__)("Now generating quiz questions...","tutor"),completed_label:(0,f.__)("Quiz questions generated.","tutor"),error_label:(0,f.__)("Error generating quiz questions.","tutor"),completed:false,hasError:false}};var t_=(0,el/* .getCourseId */.z)();var tw=e=>{var{onClose:t}=e;var r,o,u;var[c,d]=(0,s.useState)(ty);var[m,g]=(0,s.useState)(false);var{contents:b,loading:y,pointer:_,abortStatus:w,currentContent:x,currentLoading:E,currentErrors:Z,currentAbortStatus:S,setPointer:O,appendContent:k,appendLoading:T,appendErrors:C,errors:R}=eL();var{startGeneration:A,cancelGeneration:M}=eH();var P=(0,ej/* .useSaveAIGeneratedCourseContentMutation */.LK)();var D=(0,s.useRef)(null);var I=(0,s.useRef)(null);var L=(0,eA/* .useFormWithGlobalError */.O)({defaultValues:{prompt:""}});var F=L.watch("prompt");var{showToast:N}=(0,eQ/* .useToast */.p)();(0,s.useEffect)(()=>{var e;d(e=>{var t=(0,i._)({},e);var r=(0,ep/* .getObjectKeys */.Zt)(t);for(var n of r){var o=t[n];var s=!E[n];var u=!!Z[n];t[n]=(0,a._)((0,i._)({},o),{completed:s,hasError:u})}return t});(e=I.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},[E,Z]);(0,s.useEffect)(()=>{if(m){var e;(e=D.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"});L.setFocus("prompt")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[m]);var j=(0,ep/* .getObjectValues */.zt)(E).some(e=>e);var B=j||m||!x.title||!((r=x.topics)===null||r===void 0?void 0:r.length)||!((o=x.topics)===null||o===void 0?void 0:o.every(e=>{var t;return(t=e.contents)===null||t===void 0?void 0:t.length}));return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.container,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.left,children:/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:Object.values(c).every(e=>!e.hasError)||x.title,fallback:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.errorWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{css:tE.errorImage,src:td,srcSet:"".concat(td," 1x, ").concat(tc," 2x"),alt:(0,f.__)("Ai Studio Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{css:tE.errorMessage,children:(0,f.__)("An error occurred while generating course content. Please try again.","tutor")})]}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.title,children:/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:!E.title,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(tu,{}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"book",width:32,height:32}),/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{title:x.title,children:x.title})]})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.leftContentWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!E.title,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(tp,{}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.imageWrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{src:x.featured_image,alt:x.title})})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!E.description,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(ta,{}),children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.section,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{children:(0,f.__)("Course Info","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.content,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{dangerouslySetInnerHTML:{__html:x.description}})})]})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!E.topic,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(tr,{}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:(u=x.topics)===null||u===void 0?void 0:u.length,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.section,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{children:(0,f.__)("Course Content","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.content,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(e7,{})})]})})})]})]})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.right,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:b.length>1,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.navigator,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",disabled:_===0||j,onClick:()=>O(e=>Math.max(0,e-1)),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:!ed/* .isRTL */.dZ?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.navigatorContent,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:_+1}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:"/"}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:b.length})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",disabled:_>=b.length-1||j,onClick:()=>O(e=>Math.min(b.length-1,e+1)),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:!ed/* .isRTL */.dZ?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.rightContents,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:y,children:(e,t)=>{var r,i,a,o,s,u,l,d;var p=_!==t;var x=_===t&&!m;var E=b[t];var Z=(0,ep/* .getObjectValues */.zt)(y[t]).some(e=>e);var S=(0,ep/* .getObjectValues */.zt)(R[t]).every(e=>e);var M=R[t];var P=w[t];var D=E.counts&&(0,ep/* .getObjectValues */.zt)(E.counts).some(e=>e>0)||false;return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{ref:t===_&&!m?I:undefined,css:tE.box({deactivated:p,hasError:(0,ep/* .getObjectValues */.zt)(R[t]).some(e=>e)||P||D,isActive:_===t&&!m}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.boxContent,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("h6",{children:Z&&(0,f.__)("Generating course content","tutor")||P&&(0,f.__)("Generation aborted","tutor")||S&&(0,f.__)("Error generating course content","tutor")||(0,f.__)("Generated course content","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:b[t].prompt,children:e=>/*#__PURE__*/(0,n/* .jsxs */.BX)("p",{css:tE.subtitle,children:['"',e,'"']})}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.items,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:Z,fallback:/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:!S,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!P,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:(0,ep/* .getObjectKeys */.Zt)(M),children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.item,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c[e].error_label]},t)})}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.item,children:(E===null||E===void 0?void 0:(r=E.counts)===null||r===void 0?void 0:r.topics)?/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the total number of topics */(0,f.sprintf)((0,f.__)("%d Topics in total","tutor"),(i=E.counts)===null||i===void 0?void 0:i.topics)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c.topic.error_label]})||""}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.item,children:(E===null||E===void 0?void 0:(a=E.counts)===null||a===void 0?void 0:a.lessons)?/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of lessons */(0,f.sprintf)((0,f.__)("%d Lessons","tutor"),(o=E.counts)===null||o===void 0?void 0:o.lessons)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating lessons.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.item,children:(E===null||E===void 0?void 0:(s=E.counts)===null||s===void 0?void 0:s.quizzes)?/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of quizzes */(0,f.sprintf)((0,f.__)("%d Quizzes","tutor"),(u=E.counts)===null||u===void 0?void 0:u.quizzes)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating quizzes.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:(0,ep/* .isAddonEnabled */.ro)(ed/* .Addons.TUTOR_ASSIGNMENTS */.AO.TUTOR_ASSIGNMENTS),children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.item,children:(E===null||E===void 0?void 0:(l=E.counts)===null||l===void 0?void 0:l.assignments)?/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"checkFilledWhite",width:24,height:24,"data-check-icon":true}),/* translators: %d is the number of assignments */(0,f.sprintf)((0,f.__)("%d Assignments","tutor"),(d=E.counts)===null||d===void 0?void 0:d.assignments)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating assignments.","tutor")]})||""})})]}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eE/* ["default"] */.Z,{each:(0,ep/* .getObjectKeys */.Zt)(c),children:(e,t)=>{var r=c[e];return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.item,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:p,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!p,children:/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:r.completed,fallback:/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(eK/* .GradientLoadingSpinner */.Bt,{}),r.loading_label]}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]})})]},t)}})})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.boxFooter,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:x,children:/*#__PURE__*/(0,n/* .jsxs */.BX)(h/* ["default"] */.Z,{variant:"primary_outline",disabled:j,onClick:()=>{g(true)},children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicWand",width:24,height:24}),(0,f.__)("Generate a New Course","tutor")]})}),/*#__PURE__*/(0,n/* .jsxs */.BX)(h/* ["default"] */.Z,{variant:"outline",disabled:j,onClick:()=>{O(y.length);T();k();C();A(b[t].prompt,y.length)},children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"tryAgain",width:24,height:24}),(0,f.__)("Regenerate Course","tutor")]})]})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{type:"button",css:tE.overlayButton({hasAnyContent:D}),onClick:()=>{if(D){O(t)}},disabled:j||_===t})]},t)}}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!j&&!m&&!((x===null||x===void 0?void 0:x.topics.every(e=>e.contents.length))&&x.topics.length)&&!S,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(eX/* ["default"] */.Z,{icon:"warning",type:"danger",children:(0,f.__)("Failed to generate course content. Try again.","tutor")})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:m,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tE.box({deactivated:true,hasError:false,isActive:true}),children:/*#__PURE__*/(0,n/* .jsxs */.BX)("form",{ref:D,css:tE.regenerateForm,onSubmit:L.handleSubmit(e=>{g(false);O(y.length);T();k();C();A(e.prompt,y.length);L.reset()}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(l/* .Controller */.Qr,{control:L.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.tZ)(eR/* ["default"] */.Z,(0,a._)((0,i._)({},e),{isMagicAi:true,placeholder:(0,f.__)("Type your desired course topic. e.g. Learning piano, Cooking 101..","tutor"),rows:4}))}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.formButtons,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"primary_outline",disabled:j,onClick:()=>{g(false);L.reset()},children:(0,f.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.BX)(h/* ["default"] */.Z,{type:"submit",disabled:j||!F,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicWand",width:24,height:24}),(0,f.__)("Generate Now","tutor")]})]})]})})})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tE.rightFooter,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"primary_outline",onClick:()=>{if(j){M()}else{t()}},children:j?(0,f.__)("Stop Generation","tutor"):(0,f.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"primary",disabled:B,onClick:()=>{P.mutate({course_id:t_,payload:JSON.stringify(x)});t();N({type:"success",message:(0,f.__)("Course content stored into a local file.","tutor")})},children:(0,f.__)("Append the Course","tutor")})]})]})]})})};/* ESM default export */const tx=tw;var tE={container:/*#__PURE__*/(0,o/* .css */.iv)("position:absolute;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:end;"),navigator:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;margin-left:-",x/* .spacing["16"] */.W0["16"],";margin-bottom:",x/* .spacing["16"] */.W0["16"],";"),navigatorContent:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["4"] */.W0["4"],";span{",S/* .typography.caption */.c.caption(),";}span:first-of-type{color:",x/* .colorTokens.text.primary */.Jv.text.primary,";}"),wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;gap:",x/* .spacing["28"] */.W0["28"],";height:calc(100vh - ",x/* .spacing["56"] */.W0["56"],");width:1300px;",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{width:90%;gap:",x/* .spacing["16"] */.W0["16"],";flex-wrap:wrap-reverse;",Z/* .styleUtils.overflowYAuto */.i.overflowYAuto,";}"),regenerateForm:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";width:100%;button{width:auto;}"),formButtons:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;width:100%;justify-content:end;align-items:center;gap:",x/* .spacing["16"] */.W0["16"],";"),leftContentWrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";padding-inline:",x/* .spacing["40"] */.W0["40"],";margin-top:",x/* .spacing["8"] */.W0["8"],";"),box:e=>{var{deactivated:t,hasError:r,isActive:n}=e;return/*#__PURE__*/(0,o/* .css */.iv)("width:100%;border-radius:",x/* .borderRadius["8"] */.E0["8"],";border:1px solid ",r?x/* .colorTokens.stroke.danger */.Jv.stroke.danger:x/* .colorTokens.bg.brand */.Jv.bg.brand,";padding:",x/* .spacing["16"] */.W0["16"]," ",x/* .spacing["12"] */.W0["12"],";display:flex;gap:",x/* .spacing["12"] */.W0["12"],";transition:border 0.3s ease;position:relative;svg{flex-shrink:0;}",t&&(0,o/* .css */.iv)(tv(),x/* .colorTokens.icon.disable.muted */.Jv.icon.disable.muted)," ",!t&&(0,o/* .css */.iv)(tm(),r?x/* .colorTokens.stroke.danger */.Jv.stroke.danger:x/* .colorTokens.bg.brand */.Jv.bg.brand)," ",n&&(0,o/* .css */.iv)(tg(),x/* .colorTokens.stroke.brand */.Jv.stroke.brand),":hover{border-color:",r?x/* .colorTokens.stroke.danger */.Jv.stroke.danger:x/* .colorTokens.stroke.brand */.Jv.stroke.brand,";background-color:",!n&&x/* .colorTokens.background.hover */.Jv.background.hover,";}")},boxFooter:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["16"] */.W0["16"],";justify-content:end;button{width:auto;}"),rightContents:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";overflow-y:auto;height:100%;padding-right:",x/* .spacing["20"] */.W0["20"],";",Z/* .styleUtils.overflowYAuto */.i.overflowYAuto,";"),rightFooter:/*#__PURE__*/(0,o/* .css */.iv)("margin-top:auto;padding-top:",x/* .spacing["16"] */.W0["16"],";padding-right:",x/* .spacing["20"] */.W0["20"],";display:flex;align-items:center;justify-content:center;gap:",x/* .spacing["12"] */.W0["12"],";"),subtitle:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.title */.Jv.text.title,";"),boxContent:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["12"] */.W0["12"],";width:100%;h6{",S/* .typography.body */.c.body("medium"),";color:",x/* .colorTokens.color.black.main */.Jv.color.black.main,";}p{",S/* .typography.caption */.c.caption("medium"),";color:",x/* .colorTokens.text.title */.Jv.text.title,";}"),items:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["4"] */.W0["4"],";position:relative;[data-error='true']{color:",x/* .colorTokens.icon.error */.Jv.icon.error,";}"),item:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["8"] */.W0["8"],";",S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.title */.Jv.text.title,";",Z/* .styleUtils.textEllipsis */.i.textEllipsis,";svg{color:",x/* .colorTokens.stroke.success.fill70 */.Jv.stroke.success.fill70,";[data-error='true']{color:",x/* .colorTokens.icon.error */.Jv.icon.error,";}}"),section:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";& > h5{",S/* .typography.heading6 */.c.heading6("medium"),";color:",x/* .colorTokens.text.primary */.Jv.text.primary,";height:42px;border-bottom:1px solid ",x/* .colorTokens.stroke.border */.Jv.stroke.border,";}"),content:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.hints */.Jv.text.hints,";display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";h6{",S/* .typography.caption */.c.caption(),";color:",x/* .colorTokens.text.primary */.Jv.text.primary,";}"),left:/*#__PURE__*/(0,o/* .css */.iv)("width:792px;background-color:",x/* .colorTokens.background.white */.Jv.background.white,";border-radius:",x/* .borderRadius["12"] */.E0["12"]," ",x/* .borderRadius["12"] */.E0["12"]," 0 0;display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.W0["16"],";overflow-y:auto;padding-bottom:",x/* .spacing["32"] */.W0["32"],";",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{width:100%;}"),right:/*#__PURE__*/(0,o/* .css */.iv)("width:480px;height:100%;background-color:",x/* .colorTokens.background.white */.Jv.background.white,";border-radius:",x/* .borderRadius["12"] */.E0["12"]," ",x/* .borderRadius["12"] */.E0["12"]," 0 0;padding:",x/* .spacing["24"] */.W0["24"]," ",x/* .spacing["0"] */.W0["0"]," ",x/* .spacing["24"] */.W0["24"]," ",x/* .spacing["20"] */.W0["20"],";display:flex;flex-direction:column;justify-content:space-between;",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{width:100%;border-radius:",x/* .borderRadius["12"] */.E0["12"],";}"),title:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;gap:",x/* .spacing["8"] */.W0["8"],";color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";z-index:",x/* .zIndex.header */.W5.header,";min-height:40px;padding:",x/* .spacing["40"] */.W0["40"]," ",x/* .spacing["40"] */.W0["40"]," ",x/* .spacing["16"] */.W0["16"]," ",x/* .spacing["40"] */.W0["40"],";background-color:",x/* .colorTokens.background.white */.Jv.background.white,";svg{flex-shrink:0;color:",x/* .colorTokens.text.ai.purple */.Jv.text.ai.purple,";}& > h5{",S/* .typography.heading5 */.c.heading5("medium"),";",Z/* .styleUtils.textEllipsis */.i.textEllipsis,";color:",x/* .colorTokens.text.ai.purple */.Jv.text.ai.purple,";}"),imageWrapper:/*#__PURE__*/(0,o/* .css */.iv)("width:100%;height:390px;border-radius:",x/* .borderRadius["10"] */.E0["10"],";overflow:hidden;position:relative;flex-shrink:0;img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}"),errorWrapper:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.flexCenter */.i.flexCenter("column"),";height:100%;color:",x/* .colorTokens.icon.error */.Jv.icon.error,";text-align:center;gap:",x/* .spacing["16"] */.W0["16"],";"),errorImage:/*#__PURE__*/(0,o/* .css */.iv)("height:300px;width:100%;object-fit:cover;object-position:center;"),errorMessage:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.heading5 */.c.heading5("medium"),";color:",x/* .colorTokens.text.error */.Jv.text.error,";margin-inline:",x/* .spacing["96"] */.W0["96"],";"),overlayButton:e=>{var{hasAnyContent:t}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";position:absolute;top:0;left:0;width:100%;height:100%;",!t&&(0,o/* .css */.iv)(tb()),":disabled{cursor:default;}")}};// EXTERNAL MODULE: ./assets/react/v3/shared/components/FocusTrap.tsx
var tZ=r(62067);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/modals/AICourseBuilderModal.tsx
var tS=e=>{var{closeModal:t}=e;var{currentStep:r}=eL();if(r==="prompt"){return/*#__PURE__*/(0,n/* .jsx */.tZ)(e$,{onClose:t})}return/*#__PURE__*/(0,n/* .jsx */.tZ)(tx,{onClose:t})};var tO=e=>{var{closeModal:t}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)(eN,{children:/*#__PURE__*/(0,n/* .jsx */.tZ)(tZ/* ["default"] */.Z,{children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:tT.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(tS,{closeModal:t})})})})};/* ESM default export */const tk=tO;var tT={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("width:100vw;height:100vh;position:relative;")};// CONCATENATED MODULE: ./assets/react/v3/public/images/logo.svg
var tC,tR,tA;function tM(){return tM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tM.apply(null,arguments)}var tP=function e(e){return /*#__PURE__*/s.createElement("svg",tM({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 108 24"},e),tC||(tC=/*#__PURE__*/s.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M79.285 19.01h5.639v1.163H78.05V7.838h1.234V19.01ZM97.436 7.838v12.336h-1.234V9.706l-4.318 7.225h-.176l-4.317-7.225v10.468h-1.234V7.838h1.513l4.126 6.905 4.126-6.905zm5.991 12.548q-1.691 0-2.898-.802a4.18 4.18 0 0 1-1.683-2.212l1.057-.616q.335 1.146 1.234 1.788.898.644 2.308.643 1.374 0 2.141-.607.767-.608.767-1.613 0-.968-.705-1.463-.705-.493-2.326-1.021-1.92-.635-2.538-1.023-1.41-.845-1.41-2.45 0-1.567 1.093-2.476 1.092-.907 2.696-.907 1.445 0 2.503.749a4.55 4.55 0 0 1 1.568 1.912l-1.04.582q-.846-2.045-3.031-2.045-1.145 0-1.85.564-.705.565-.705 1.569 0 .916.635 1.374.634.459 2.096.934l.961.327q.291.097.846.316.555.221.82.388t.643.459q.379.29.546.581.168.292.299.705.133.414.132.89 0 1.57-1.145 2.51-1.145.944-3.014.944m-37.14-.202V8.099h2.337v1.207h.038c1.052-1.5 2.766-1.538 3.389-1.558v2.571a4.6 4.6 0 0 0-1.811.487c-.798.428-1.46 1.44-1.46 3.35v6.047l-2.493-.02Zm-3.635-6.034c0 2.055-1.659 3.727-3.698 3.727-2.04 0-3.698-1.672-3.698-3.728s1.659-3.727 3.698-3.727c2.04 0 3.698 1.672 3.698 3.727Zm.64-4.275a6.12 6.12 0 0 0-4.338-1.79 6.12 6.12 0 0 0-4.338 1.79 6 6 0 0 0-1.777 4.274 6 6 0 0 0 1.777 4.274 6.13 6.13 0 0 0 4.338 1.79 6.13 6.13 0 0 0 4.338-1.79 6 6 0 0 0 1.777-4.274c0-1.613-.63-3.13-1.777-4.274M50.087 20.174h-2.493V10.36h-1.81V8.082h1.81V2.906h2.493v5.176h2.18v2.278h-2.18zM34.8 8.082v5.666c0 3.292 1.46 4.168 3.31 4.168 2.065 0 3.486-1.325 3.486-4.245V8.082h2.493v12.093H41.81v-1.773h-.058c-.681 1.15-2.24 1.773-3.914 1.773-1.52 0-2.843-.487-3.797-1.325-1.11-.954-1.753-2.453-1.753-5.121V8.082zm-6.387 12.126H25.92v-9.856h-1.81V8.074h1.81V2.906h2.493v5.168h2.18v2.278h-2.18z",clipRule:"evenodd"})),tR||(tR=/*#__PURE__*/s.createElement("path",{fill:"#0049F8",fillRule:"evenodd",d:"M5.054 14.882a1.13 1.13 0 0 1-1.075-1.075V11.36c0-.592.482-1.075 1.075-1.075.592 0 1.075.483 1.075 1.075v2.447c0 .592-.445 1.075-1.002 1.075zm7.71 0c-.593 0-1.075-.444-1.075-1.037V11.36c0-.592.482-1.075 1.075-1.075.592 0 1.075.483 1.075 1.075v2.447a1.08 1.08 0 0 1-1.075 1.076Z",clipRule:"evenodd"})),tA||(tA=/*#__PURE__*/s.createElement("path",{fill:"#0049F8",fillRule:"evenodd",d:"M2.546 9.52c.48-1 1.44-1.64 2.56-1.68 1.598.04 2.88 1.398 2.841 3v5.404c.08.6.64 1 1.24.918.48-.08.88-.439.918-.918v-5.4c-.041-1.6 1.24-2.96 2.842-3.001 1.081 0 2.04.6 2.48 1.561 1.799 3.56.4 7.88-3.16 9.683a7.18 7.18 0 0 1-9.68-3.164c-1-2-1.038-4.4-.041-6.402ZM7.067 2.4h4.04v1.561A9 9 0 0 0 9.03 3.72c-.681 0-1.36.08-2 .2zm11.002 11.08c0-.24.04-.438.04-.721 0-3.28-1.76-6.281-4.64-7.881V2.4h1.761a1.18 1.18 0 0 0 1.202-1.202C16.432.518 15.91 0 15.23 0H2.946c-.68.041-1.198.559-1.198 1.24s.521 1.201 1.202 1.201h1.76v2.442c-4.363 2.396-6.003 7.88-3.603 12.239.12.2.2.359.321.558 3.4 5.722 12.521 6.281 15.602 6.32.28 0 .521-.12.76-.28.2-.2.28-.48.28-.76-.002.004-.002-9.48-.002-9.48Z",clipRule:"evenodd"})))};/* ESM default export */const tD=tP;// CONCATENATED MODULE: ./assets/react/v3/shared/components/Logo.tsx
var tI=e=>{var{wrapperCss:t}=e;var r;var i=!!ec/* .tutorConfig.tutor_pro_url */.y.tutor_pro_url;return/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{tabIndex:-1,type:"button",css:[Z/* .styleUtils.resetButton */.i.resetButton,tL.logo,t],children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:i&&((r=ec/* .tutorConfig.settings */.y.settings)===null||r===void 0?void 0:r.course_builder_logo_url),fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(tD,{width:108,height:24}),children:e=>/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{src:e,alt:"Tutor LMS"})})})};var tL={logo:/*#__PURE__*/(0,o/* .css */.iv)("padding-left:",x/* .spacing["32"] */.W0["32"],";cursor:default;&:focus,&:active,&:hover{background:none;}img{max-height:24px;width:auto;object-fit:contain;object-position:center;}",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{padding-left:",x/* .spacing["24"] */.W0["24"],";}",x/* .Breakpoint.smallMobile */.Uo.smallMobile,"{grid-area:logo;padding-left:",x/* .spacing["16"] */.W0["16"],";}")};/* ESM default export */const tF=tI;// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/ConfirmationModal.tsx
var tN=r(6293);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/ProIdentifierModal.tsx
var tj=r(31342);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/SetupOpenAiModal.tsx
var tB=r(99678);// CONCATENATED MODULE: ./assets/react/v3/public/images/pro-placeholders/generate-course-2x.webp
const tU=r.p+"js/images/generate-course-2x-bece3b67.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/pro-placeholders/generate-course.webp
const tW=r.p+"js/images/generate-course-c1a5f0d9.webp";// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/header/Header.tsx
var tz=(0,el/* .getCourseId */.z)();var tJ=()=>{var e,t,r,i,a;var o=(0,l/* .useFormContext */.Gc)();var s=(0,d/* .useQueryClient */.NL)();var{currentIndex:u}=(0,ex/* .useCourseNavigator */.O)();var{showModal:c}=(0,er/* .useModal */.d)();var g=(e=s.getQueryData(["CourseDetails",tz]))===null||e===void 0?void 0:e.total_enrolled_student;var b=o.formState.dirtyFields&&Object.keys(o.formState.dirtyFields).length>0;var y=!!ec/* .tutorConfig.tutor_pro_url */.y.tutor_pro_url;var _=((t=ec/* .tutorConfig.settings */.y.settings)===null||t===void 0?void 0:t.chatgpt_enable)==="on";var w=(r=ec/* .tutorConfig.settings */.y.settings)===null||r===void 0?void 0:r.chatgpt_key_exist;var x=(i=ec/* .tutorConfig.current_user.roles */.y.current_user.roles)===null||i===void 0?void 0:i.includes(ed/* .TutorRoles.ADMINISTRATOR */.er.ADMINISTRATOR);var E=((a=ec/* .tutorConfig.settings */.y.settings)===null||a===void 0?void 0:a.hide_admin_bar_for_users)==="off";var S=()=>{if(!y){c({component:tj/* ["default"] */.Z,props:{image:tW,image2x:tU}})}else if(!w){c({component:tB/* ["default"] */.Z,props:{image:tW,image2x:tU}})}else{c({component:tk,isMagicAi:true,props:{title:(0,f.__)("Create with AI","tutor"),icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicAiColorize",width:24,height:24})}})}};var O=()=>{if(b){c({component:tN/* ["default"] */.Z,props:{title:(0,f.__)("Do you want to exit without saving?","tutor"),description:(0,f.__)("You’re about to leave the course creation process without saving your changes.","tutor"),confirmButtonText:(0,f.__)("Yes, exit without saving","tutor"),confirmButtonVariant:"danger",cancelButtonText:(0,f.__)("Continue editing","tutor"),maxWidth:445}}).then(e=>{if(e.action==="CONFIRM"){var t=window.location.href.includes("wp-admin");window.location.href=t?ec/* .tutorConfig.backend_course_list_url */.y.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.y.frontend_course_list_url}})}else{var e=window.location.href.includes("wp-admin");window.location.href=e?ec/* .tutorConfig.backend_course_list_url */.y.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.y.frontend_course_list_url}};return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tH.wrapper(x||E),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(tF,{}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tH.container,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tH.titleAndTackerWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tH.titleAndTacker,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("h6",{css:tH.title,children:(0,f.__)("Course Builder","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:tH.divider,"data-title-divider":true}),/*#__PURE__*/(0,n/* .jsx */.tZ)(eT,{})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)(ei/* ["default"] */.Z,{when:u===0&&g===0&&(_||!y),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:tH.divider}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:Z/* .styleUtils.flexCenter */.i.flexCenter(),children:/*#__PURE__*/(0,n/* .jsxs */.BX)(h/* ["default"] */.Z,{variant:"plain",css:tH.magicButton,onClick:S,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:ed/* .CURRENT_VIEWPORT.isAboveTablet */.iM.isAboveTablet,children:(0,f.__)("Generate with AI","tutor")})]})})]})]}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ew,{})})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:tH.closeButtonWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ew,{})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(m/* ["default"] */.Z,{delay:200,content:(0,f.__)("Exit","tutor"),placement:"left",children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{isIconOnly:true,size:"small",variant:"danger",buttonCss:tH.closeButton,"aria-label":(0,f.__)("Exit","tutor"),onClick:O,icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"cross",width:32,height:32})})})]})]})};/* ESM default export */const tq=tJ;var tH={wrapper:e=>/*#__PURE__*/(0,o/* .css */.iv)("height:",x/* .headerHeight */.J9,"px;width:100%;background-color:",x/* .colorTokens.surface.navbar */.Jv.surface.navbar,";border-bottom:1px solid ",x/* .colorTokens.stroke.divider */.Jv.stroke.divider,";display:grid;grid-template-columns:1fr ",x/* .containerMaxWidth */.V4,"px 1fr;align-items:center;position:sticky;top:",e?ed/* .WP_ADMIN_BAR_HEIGHT */.WQ:"0px",";z-index:",x/* .zIndex.header */.W5.header,";",x/* .Breakpoint.tablet */.Uo.tablet,"{grid-template-columns:auto 1fr auto;}",x/* .Breakpoint.smallMobile */.Uo.smallMobile,"{height:auto;padding-block:",x/* .spacing["8"] */.W0["8"],";grid-template-areas:'logo closeButton'\n        'container container';row-gap:",x/* .spacing["8"] */.W0["8"],";}"),container:/*#__PURE__*/(0,o/* .css */.iv)("max-width:",x/* .containerMaxWidth */.V4,"px;width:100%;height:",x/* .headerHeight */.J9,"px;",Z/* .styleUtils.display.flex */.i.display.flex(),";justify-content:space-between;align-items:center;",x/* .Breakpoint.tablet */.Uo.tablet,"{[data-title-divider]{margin-left:",x/* .spacing["12"] */.W0["12"],";}}",x/* .Breakpoint.smallMobile */.Uo.smallMobile,"{height:auto;grid-area:container;order:2;justify-content:center;[data-title-divider]{display:none;}}"),titleAndTackerWrapper:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.flex */.i.display.flex(),";align-items:center;"),titleAndTacker:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.display.flex */.i.display.flex(),";gap:",x/* .spacing["12"] */.W0["12"],";align-items:center;margin-right:",x/* .spacing["16"] */.W0["16"],";"),divider:/*#__PURE__*/(0,o/* .css */.iv)("width:2px;height:16px;background-color:",x/* .colorTokens.stroke.divider */.Jv.stroke.divider,";border-radius:",x/* .borderRadius["20"] */.E0["20"],";"),title:/*#__PURE__*/(0,o/* .css */.iv)(S/* .typography.body */.c.body("medium"),";color:",x/* .colorTokens.text.subdued */.Jv.text.subdued,";",x/* .Breakpoint.tablet */.Uo.tablet,"{display:none;[data-title-divider]{display:none;}}"),closeButtonWrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;justify-content:flex-end;margin-right:",x/* .spacing["16"] */.W0["16"],";",x/* .Breakpoint.smallMobile */.Uo.smallMobile,"{grid-area:closeButton;order:1;margin-right:",x/* .spacing["8"] */.W0["8"],";}"),closeButton:/*#__PURE__*/(0,o/* .css */.iv)("background-color:transparent;svg{color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";}&:hover,&:focus{background-color:",x/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,";svg{color:",x/* .colorTokens.icon.error */.Jv.icon.error,";}}"),previewButton:/*#__PURE__*/(0,o/* .css */.iv)("color:",x/* .colorTokens.text.title */.Jv.text.title,";svg{color:",x/* .colorTokens.icon["default"] */.Jv.icon["default"],";}"),magicButton:/*#__PURE__*/(0,o/* .css */.iv)("display:inline-flex;align-items:center;gap:",x/* .spacing["4"] */.W0["4"],";padding-inline:",x/* .spacing["4"] */.W0["4"],";margin-left:",x/* .spacing["4"] */.W0["4"],";")};// EXTERNAL MODULE: ./node_modules/events/events.js
var tV=r(17187);// CONCATENATED MODULE: ./assets/react/v3/shared/utils/localStorage.ts
var t$=new tV.EventEmitter;var tG=(e,t)=>{localStorage.setItem(e,t)};var tX=e=>{localStorage.removeItem(e)};var tK=e=>{if(typeof window!=="undefined"){return localStorage.getItem(e)||null}return null};// CONCATENATED MODULE: ./assets/react/v3/shared/hooks/useResize.ts
var tQ=e=>{var{resizeDivRef:t,options:r}=e;var[n,i]=(0,s.useState)(false);var[a,o]=(0,s.useState)(null);var[u,l]=(0,s.useState)({x:0,y:0});var[c,d]=(0,s.useState)({width:0,height:0});var f=(e,n)=>{var a;e.preventDefault();e.stopPropagation();i(true);if(!(0,ef/* .isDefined */.$K)(t===null||t===void 0?void 0:t.current)){return}var s=(a=t.current)===null||a===void 0?void 0:a.getBoundingClientRect();var u={width:(r===null||r===void 0?void 0:r.maxWidth)||window.innerWidth,height:(r===null||r===void 0?void 0:r.maxHeight)||window.innerHeight};var c={width:(r===null||r===void 0?void 0:r.minWidth)||0,height:(r===null||r===void 0?void 0:r.minHeight)||0};var f=(e,t)=>{var r=Math.min(Math.max(e,c.width),u.width);var n=Math.min(Math.max(t,c.height),u.height);return{width:r,height:n}};var p,h;var v={x:(p=s.x)!==null&&p!==void 0?p:0,y:(h=s.y)!==null&&h!==void 0?h:0};var m,g;var b={width:(m=s.width)!==null&&m!==void 0?m:0,height:(g=s.height)!==null&&g!==void 0?g:0};var y={x:e.pageX,y:e.pageY};var _=(0,ep/* .throttle */.P2)(e=>{var t=e.pageX-y.x;var r=e.pageY-y.y;o(n);switch(n){case"top":if(c.height>b.height-r){l(e=>({x:e.x,y:s.bottom-c.height}));d(f(b.width,c.height));return}if(e.pageY<s.top-u.height){l(e=>({x:e.x,y:s.bottom-u.height}))}l({x:v.x,y:v.y+r});d(f(b.width,b.height-r));return;case"bottom":if(c.height>b.height+r){d(f(b.width,c.height))}d(f(b.width,b.height+r));return;case"left":if(e.pageX>s.right-c.width){l(e=>({x:s.right-c.width,y:e.y}));d(f(c.width,b.height));return}if(c.width>b.width-t){return}l({x:v.x+t,y:v.y});d(f(b.width-t,b.height));return;case"right":d(f(b.width+t,b.height));return;case"top-left":if(e.pageX>s.right-c.width){l(e=>({x:s.right-c.width,y:e.y}));d(e=>f(c.width,e.height))}else{l({x:v.x+t,y:v.y+r});d(f(b.width-t,b.height-r))}if(c.height>b.height-r){l(e=>({x:e.x,y:s.bottom-c.height}));d(e=>f(e.width,c.height))}else{l({x:Math.min(v.x+t,s.right-c.width),y:v.y+r});d(f(b.width-t,b.height-r))}return;case"top-right":if(c.height>b.height-r){l(e=>({x:e.x,y:s.bottom-c.height}));d(f(b.width+t,c.height))}else{l({x:v.x,y:v.y+r});d(f(b.width+t,b.height-r))}if(e.pageY<s.top-u.height){l(e=>({x:e.x,y:s.bottom-u.height}))}return;case"bottom-left":if(c.height>b.height+r){d(f(b.width,c.height))}if(e.pageX>s.right-c.width){l(e=>({x:s.right-c.width,y:e.y}));d(f(c.width,b.height+r));return}if(c.width>b.width-t){return}l({x:v.x+t,y:v.y});d(f(b.width-t,b.height+r));return;case"bottom-right":d(f(b.width+t,b.height+r));return}},10);var w=()=>{i(false);document.body.removeEventListener("mousemove",_);document.body.removeEventListener("mouseup",w);o(null)};document.body.addEventListener("mousemove",_);document.body.addEventListener("mouseup",w)};(0,s.useEffect)(()=>{if((0,ef/* .isDefined */.$K)(t===null||t===void 0?void 0:t.current)&&n){t.current.style.left="".concat(u.x,"px");t.current.style.top="".concat(u.y,"px")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[u]);(0,s.useEffect)(()=>{if((0,ef/* .isDefined */.$K)(t===null||t===void 0?void 0:t.current)&&n){t.current.style.width="".concat(c.width,"px");t.current.style.height="".concat(c.height,"px")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[c]);(0,s.useEffect)(()=>{if((0,ef/* .isDefined */.$K)(t===null||t===void 0?void 0:t.current)){d({width:t.current.offsetWidth,height:t.current.offsetHeight});l({x:t.current.offsetLeft,y:t.current.offsetTop})}},[t]);return{isResizing:n,resizeType:a,handleResize:f,size:c,position:u}};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/Notebook.tsx
function tY(){var e=(0,w._)(["\n      border-top-left-radius: ",";\n      background-color: ",";\n      box-shadow: ",";\n    "]);tY=function t(){return e};return e}function t0(){var e=(0,w._)(["\n      bottom: auto;\n      border-radius: ",";\n    "]);t0=function t(){return e};return e}function t1(){var e=(0,w._)(["\n      cursor: grab;\n      color: ",";\n    "]);t1=function t(){return e};return e}function t2(){var e=(0,w._)(["\n      border-bottom: 1px solid ",";\n      padding: "," ",";\n      color: ",";\n    "]);t2=function t(){return e};return e}function t4(){var e=(0,w._)(["\n      transform: rotate(180deg);\n    "]);t4=function t(){return e};return e}function t3(){var e=(0,w._)(["\n      display: none;\n    "]);t3=function t(){return e};return e}var t5=()=>{var[e,t]=(0,s.useState)(true);var[r,o]=(0,s.useState)(false);var[u,l]=(0,s.useState)(false);var[c,d]=(0,s.useState)({x:0,y:0});var[h,m]=(0,s.useState)("");var g=(0,s.useRef)(null);var b=(0,s.useRef)(null);var y=(0,eY/* .useSpring */.q_)({width:!e?ed/* .notebook.MIN_NOTEBOOK_WIDTH */.YB.MIN_NOTEBOOK_WIDTH:ed/* .notebook.NOTEBOOK_HEADER */.YB.NOTEBOOK_HEADER,height:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT:!e?ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT:ed/* .notebook.NOTEBOOK_HEADER */.YB.NOTEBOOK_HEADER,config:{duration:300,easing:e=>e*(2-e)}});var{handleResize:_}=tQ({resizeDivRef:g,options:{minHeight:ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT,minWidth:ed/* .notebook.MIN_NOTEBOOK_WIDTH */.YB.MIN_NOTEBOOK_WIDTH}});var w=e=>{e.currentTarget.contentEditable="false";var t;var r=(0,ep/* .jsonParse */.o3)((t=tK(ed/* .LocalStorageKeys.notebook */.dR.notebook))!==null&&t!==void 0?t:"{}");tG(ed/* .LocalStorageKeys.notebook */.dR.notebook,JSON.stringify((0,a._)((0,i._)({},r),{content:e.currentTarget.innerHTML})))};var x=e=>{var t;e.preventDefault();var r=document.createElement("div");var n;r.innerHTML=(n=(t=e.clipboardData)===null||t===void 0?void 0:t.getData("text/plain"))!==null&&n!==void 0?n:"";var i;var a=(i=r.innerText)!==null&&i!==void 0?i:"";var o=window.getSelection();var s=o===null||o===void 0?void 0:o.getRangeAt(0);s===null||s===void 0?void 0:s.deleteContents();var u=document.createTextNode(a);s===null||s===void 0?void 0:s.insertNode(u);if(u&&o){var l=document.createRange();l.setStartAfter(u);l.collapse(true);o.removeAllRanges();o.addRange(l)}};var E=t=>{t.preventDefault();t.stopPropagation();if(e||!u){return}if((0,ef/* .isDefined */.$K)(b.current)){b.current.blur()}o(true);var{clientX:r,clientY:n}=t;var i=g.current;if(i){var a=i.getBoundingClientRect();d({x:r-a.left,y:n-a.top})}};var S=()=>{if((0,ef/* .isDefined */.$K)(g.current)){var e=g.current;var{left:t,top:r,height:n,width:o}=e.style;var s=(0,ep/* .jsonParse */.o3)(tK(ed/* .LocalStorageKeys.notebook */.dR.notebook)||"{}");tG(ed/* .LocalStorageKeys.notebook */.dR.notebook,JSON.stringify((0,a._)((0,i._)({},s),{position:{left:t,top:r,height:n,width:o}})))}};(0,s.useEffect)(()=>{var e=(0,ep/* .throttle */.P2)(e=>{if(!r||!(0,ef/* .isDefined */.$K)(g.current)){return}l(true);var t=g.current;var{offsetWidth:n,offsetHeight:i}=t;var{innerWidth:a,innerHeight:o}=window;var s=Math.min(Math.max(e.clientX-c.x,0),a-n);var u=Math.min(Math.max(e.clientY-c.y,0),o-i);t.style.left="".concat(s,"px");t.style.top="".concat(u,"px")},10);var t=()=>{o(false);if(!(0,ef/* .isDefined */.$K)(g.current)){return}var e=g.current;var{left:t,top:r,height:n,width:s}=e.style;var u=(0,ep/* .jsonParse */.o3)(tK(ed/* .LocalStorageKeys.notebook */.dR.notebook)||"{}");if(t==="auto"||r==="auto"){return}tG(ed/* .LocalStorageKeys.notebook */.dR.notebook,JSON.stringify((0,a._)((0,i._)({},u),{position:{left:t,top:r,height:n,width:s}})))};document.addEventListener("mousemove",e);document.addEventListener("mouseup",t);return()=>{document.removeEventListener("mousemove",e);document.removeEventListener("mouseup",t)}},[r,c]);(0,s.useEffect)(()=>{if(!(0,ef/* .isDefined */.$K)(g.current)){return}var t=g.current;if(!u){t.style.left="auto";t.style.top="auto";t.style.height=ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?"".concat(ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT,"px"):"".concat(ed/* .notebook.NOTEBOOK_HEADER */.YB.NOTEBOOK_HEADER,"px");return}if(!e&&u){var r;var n=(0,ep/* .jsonParse */.o3)((r=tK(ed/* .LocalStorageKeys.notebook */.dR.notebook))!==null&&r!==void 0?r:"{}");var{left:i="auto",top:a="auto",height:o,width:s}=n.position||{};var l=(e,t,r)=>{if(e==="auto"){var n=t/2-r;return"".concat(Math.max(n,0),"px")}return e};var c=(e,t,r,n)=>{if((0,ef/* .isDefined */.$K)(e)){var i=Number(e.split("px")[0]);var a=Number(l(n,t,r).split("px")[0]);return t<i+a?"".concat(t-20,"px"):e}return"".concat(Math.min(t-10,2*r),"px")};t.style.left=l(i,window.innerWidth,ed/* .notebook.MIN_NOTEBOOK_WIDTH */.YB.MIN_NOTEBOOK_WIDTH);t.style.top=l(a,window.innerHeight,ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT);t.style.width=c(s,window.innerWidth,ed/* .notebook.MIN_NOTEBOOK_WIDTH */.YB.MIN_NOTEBOOK_WIDTH,i);t.style.height=c(o,window.innerHeight,ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT,a);return}},[e,u]);(0,s.useEffect)(()=>{var e=(0,ep/* .jsonParse */.o3)(tK(ed/* .LocalStorageKeys.notebook */.dR.notebook)||"{}");if(e.content){m(e.content)}},[]);return/*#__PURE__*/(0,n/* .jsxs */.BX)(eY/* .animated.div */.q.div,{ref:g,css:t8.wrapper({isCollapsed:e,isFloating:u}),style:!u?(0,i._)({},y):{},children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!e,fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:t8.verticalTitleWrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{type:"button",css:[Z/* .styleUtils.resetButton */.i.resetButton,t8.verticalButton],onClick:()=>t(false),children:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.iM.isAboveDesktop?(0,f.__)("Notebook","tutor"):/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"note",height:24,width:24})})}),children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:t8.header({isCollapsed:e,isFloating:u}),onMouseDown:E,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:Z/* .styleUtils.text.ellipsis */.i.text.ellipsis(1),children:(0,f.__)("Notebook","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:t8.actions,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:!u,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",size:"small",onClick:()=>{t(e=>!e);l(false)},buttonCss:t8.collapseButton({isCollapsed:e}),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"plusMinus",height:24,width:24})})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",size:"small",onClick:()=>l(e=>!e),children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:u?"arrowsIn":"arrowsOut",height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:u,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",size:"small",onClick:()=>{l(false);t(true)},children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"cross",height:24,width:24})})})]})]})}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:t8.notebookWrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{ref:b,css:t8.notebook({isCollapsed:e}),onBlur:e=>w(e),onPaste:e=>x(e),onClick:e=>{e.stopPropagation();e.currentTarget.contentEditable="true";e.currentTarget.focus()},onKeyDown:e=>{e.stopPropagation();if(e.key==="Escape"){e.preventDefault();e.currentTarget.blur()}},dangerouslySetInnerHTML:{__html:h}})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(ei/* ["default"] */.Z,{when:u&&!e,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{type:"button",css:t8.textFieldExpand,onMouseDown:e=>_(e,"bottom-right"),onMouseUp:S,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"textFieldExpand",height:16,width:16})})})]})};/* ESM default export */const t6=t5;var t8={wrapper:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,o/* .css */.iv)("position:fixed;background-color:",x/* .colorTokens.background.active */.Jv.background.active,";bottom:0;right:0;height:",ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT,"px;border-radius:",x/* .borderRadius.card */.E0.card," 0 0 0;transition:box-shadow background-color 0.3s ease-in-out;box-shadow:",x/* .shadow.notebook */.AF.notebook,";z-index:",x/* .zIndex.notebook */.W5.notebook,";overflow:hidden;&:focus-within{outline:2px solid ",x/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}",!t&&(0,o/* .css */.iv)(tY(),x/* .borderRadius.card */.E0.card,x/* .colorTokens.background.white */.Jv.background.white,x/* .shadow.dropList */.AF.dropList)," ",r&&(0,o/* .css */.iv)(t0(),x/* .borderRadius.card */.E0.card))},verticalTitleWrapper:/*#__PURE__*/(0,o/* .css */.iv)("position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-90deg);background-color:",x/* .colorTokens.background.active */.Jv.background.active,";color:",x/* .colorTokens.text.title */.Jv.text.title,";",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{transform:translate(-50%,-50%) rotate(0deg);}"),verticalButton:/*#__PURE__*/(0,o/* .css */.iv)("text-align:center;width:",ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.YB.MIN_NOTEBOOK_HEIGHT,"px;height:",ed/* .notebook.NOTEBOOK_HEADER */.YB.NOTEBOOK_HEADER,"px;",S/* .typography.body */.c.body("bold"),";&:focus,&:active,&:hover{background:none;color:",x/* .colorTokens.text.primary */.Jv.text.primary,";}"),header:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,o/* .css */.iv)("display:flex;justify-content:space-between;align-items:center;padding:",x/* .spacing["12"] */.W0["12"]," ",x/* .spacing["16"] */.W0["16"],";",S/* .typography.body */.c.body("medium"),";color:transparent;",r&&(0,o/* .css */.iv)(t1(),x/* .colorTokens.text.title */.Jv.text.title)," ",!t&&(0,o/* .css */.iv)(t2(),x/* .colorTokens.stroke.divider */.Jv.stroke.divider,x/* .spacing["8"] */.W0["8"],x/* .spacing["12"] */.W0["12"],x/* .colorTokens.text.title */.Jv.text.title))},actions:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;"),collapseButton:e=>{var{isCollapsed:t}=e;return/*#__PURE__*/(0,o/* .css */.iv)("transition:all 0.3s ease-in-out;",!t&&(0,o/* .css */.iv)(t4()))},notebookWrapper:/*#__PURE__*/(0,o/* .css */.iv)("padding-block:",x/* .spacing["16"] */.W0["16"],";width:100%;height:calc(100% - ",ed/* .notebook.NOTEBOOK_HEADER */.YB.NOTEBOOK_HEADER,'px);background:url(\'data:image/svg+xml,<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="%23D9D9D9"/></svg>\')\n      repeat;transition:all 0.3s ease-in-out;'),notebook:e=>{var{isCollapsed:t}=e;return/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.overflowYAuto */.i.overflowYAuto,";padding-inline:",x/* .spacing["16"] */.W0["16"],";outline:none;word-wrap:break-word;height:100%;white-space:pre-wrap;",t&&(0,o/* .css */.iv)(t3()))},textFieldExpand:/*#__PURE__*/(0,o/* .css */.iv)(Z/* .styleUtils.resetButton */.i.resetButton,";position:absolute;bottom:",x/* .spacing["4"] */.W0["4"],";right:",x/* .spacing["4"] */.W0["4"],";user-select:none;color:",x/* .colorTokens.icon.hints */.Jv.icon.hints,";cursor:nwse-resize;")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/Layout.tsx
var t9=()=>{var{fields:e}=(0,ev/* .useCourseBuilderSlot */.l)();var t=(0,el/* .getCourseId */.z)();var r=(0,eA/* .useFormWithGlobalError */.O)({defaultValues:eu/* .courseDefaultData */.a7,shouldFocusError:true,mode:"onChange"});var o=(0,eu/* .useCourseDetailsQuery */.hL)(Number(t));(0,s.useEffect)(()=>{if(o.data){var t=Object.keys(r.formState.dirtyFields);var n=(0,eu/* .convertCourseDataToFormData */.H8)(o.data,(0,ep/* .findSlotFields */.hk)({fields:e.Basic},{fields:e.Additional}));var i=r.getValues();var a=Object.entries(n).reduce((e,r)=>{var[n,a]=r;var o=n;e[o]=t.includes(n)?i[o]:a;return e},{});r.reset(a,{keepDirtyValues:true,keepDirty:true})}// eslint-disable-next-line react-hooks/exhaustive-deps
},[o.data,r.reset]);return/*#__PURE__*/(0,n/* .jsx */.tZ)(l/* .FormProvider */.RV,(0,a._)((0,i._)({},r),{children:/*#__PURE__*/(0,n/* .jsx */.tZ)(ex/* .CourseNavigatorProvider */.K,{children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:re.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(tq,{}),/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:re.contentWrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(c/* .Outlet */.j3,{})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(t6,{})]})})}))};/* ESM default export */const t7=t9;var re={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("background-color:",x/* .colorTokens.surface.courseBuilder */.Jv.surface.courseBuilder,";"),contentWrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;max-width:",x/* .containerMaxWidth */.V4,"px;width:100%;min-height:calc(100vh - ",x/* .headerHeight */.J9,"px);margin:0 auto;",x/* .Breakpoint.smallTablet */.Uo.smallTablet,"{padding-inline:",x/* .spacing["12"] */.W0["12"],";padding-bottom:",x/* .spacing["56"] */.W0["56"],";}")};// EXTERNAL MODULE: ./assets/react/v3/shared/components/ErrorBoundary.tsx
var rt=r(68214);// CONCATENATED MODULE: ./assets/react/v3/shared/components/RouteSuspense.tsx
var rr=e=>{var{component:t}=e;var{pathname:r}=(0,c/* .useLocation */.TH)();return/*#__PURE__*/(0,n/* .jsx */.tZ)(rt/* ["default"] */.Z,{children:/*#__PURE__*/(0,n/* .jsx */.tZ)(s.Suspense,{fallback:/*#__PURE__*/(0,n/* .jsx */.tZ)(eK/* .LoadingOverlay */.fz,{}),children:t})},r)};/* ESM default export */const rn=rr;// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/config/routes.tsx
var ri,ra,ro,rs;if(false){}else{ri=/*#__PURE__*/u().lazy(()=>{(0,f.setLocaleData)(ec/* .tutorConfig.course_builder_basic_locales */.y.course_builder_basic_locales,"tutor");return r.e(/* import() | tutor-course-builder-basic */"694").then(r.bind(r,26328))});ra=/*#__PURE__*/u().lazy(()=>{(0,f.setLocaleData)(ec/* .tutorConfig.course_builder_curriculum_locales */.y.course_builder_curriculum_locales,"tutor");return r.e(/* import() | tutor-course-builder-curriculum */"501").then(r.bind(r,89577))});ro=/*#__PURE__*/u().lazy(()=>{(0,f.setLocaleData)(ec/* .tutorConfig.course_builder_additional_locales */.y.course_builder_additional_locales,"tutor");return r.e(/* import() | tutor-course-builder-additional */"85").then(r.bind(r,72079))});rs=/*#__PURE__*/u().lazy(()=>r.e(/* import() | tutor-course-builder-icon */"922").then(r.bind(r,39388)))}var ru=[{path:eh/* .CourseBuilderRouteConfigs.Home.template */.L.Home.template,element:/*#__PURE__*/(0,n/* .jsx */.tZ)(t7,{}),children:[{index:true,element:/*#__PURE__*/(0,n/* .jsx */.tZ)(c/* .Navigate */.Fg,{to:eh/* .CourseBuilderRouteConfigs.CourseBasics.template */.L.CourseBasics.template,replace:true})},{path:eh/* .CourseBuilderRouteConfigs.CourseBasics.template */.L.CourseBasics.template,element:/*#__PURE__*/(0,n/* .jsx */.tZ)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.tZ)(ri,{})})},{path:eh/* .CourseBuilderRouteConfigs.CourseCurriculum.template */.L.CourseCurriculum.template,element:/*#__PURE__*/(0,n/* .jsx */.tZ)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.tZ)(ra,{})})},{path:eh/* .CourseBuilderRouteConfigs.CourseAdditional.template */.L.CourseAdditional.template,element:/*#__PURE__*/(0,n/* .jsx */.tZ)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.tZ)(ro,{})})},...false?0:[]]},{path:"*",element:/*#__PURE__*/(0,n/* .jsx */.tZ)(c/* .Navigate */.Fg,{to:eh/* .CourseBuilderRouteConfigs.Home.template */.L.Home.template,replace:true})}];/* ESM default export */const rl=ru},75537:function(e,t,r){"use strict";r.d(t,{b:()=>f,l:()=>p});/* ESM import */var n=r(35944);/* ESM import */var i=r(18241);/* ESM import */var a=r(87363);/* ESM import */var o=/*#__PURE__*/r.n(a);var s={fields:{Basic:{after_description:[],after_settings:[]},Curriculum:{Lesson:{after_description:[],bottom_of_sidebar:[]},Quiz:{after_question_description:[],bottom_of_question_sidebar:[],bottom_of_settings:[]},Assignment:{after_description:[],bottom_of_sidebar:[]}},Additional:{after_certificates:[],bottom_of_sidebar:[]}},contents:{Basic:{after_description:[],after_settings:[]},Curriculum:{Lesson:{after_description:[],bottom_of_sidebar:[]},Quiz:{after_question_description:[],bottom_of_question_sidebar:[],bottom_of_settings:[]},Assignment:{after_description:[],bottom_of_sidebar:[]}},Additional:{after_certificates:[],bottom_of_sidebar:[]}}};var u=(e,t,r)=>{return(0,i/* .produce */.Uy)(e,e=>{var n=t.split(".");var[i,a,o]=n.length>2?n:[n[0],undefined,n[n.length-1]];var s=a?e[i][a]:e[i];// @ts-ignore
if(o&&s[o]){// @ts-ignore
s[o]=[...s[o],...r].sort((e,t)=>{var r,n;return((r=e.priority)!==null&&r!==void 0?r:10)-((n=t.priority)!==null&&n!==void 0?n:10)})}})};var l=(e,t,r)=>{var n=Array.isArray(r)?r:[r];return u(e,t,n)};var c=(e,t,r)=>{return u(e,t,[r])};var d=/*#__PURE__*/(0,a.createContext)({fields:s.fields,contents:s.contents,registerField:()=>{},registerContent:()=>{}});var f=e=>{var{children:t}=e;var[r,i]=(0,a.useState)(s.fields);var[o,u]=(0,a.useState)(s.contents);var f=(0,a.useCallback)((e,t)=>{i(r=>l(r,e,t))},[]);var p=(0,a.useCallback)((e,t)=>{u(r=>c(r,e,t))},[]);(0,a.useEffect)(()=>{var e=e=>({registerField:(t,r)=>f("Curriculum.".concat(e,".").concat(t),r),registerContent:(t,r)=>p("Curriculum.".concat(e,".").concat(t),r)});window.Tutor={CourseBuilder:{Basic:{registerField:(e,t)=>f("Basic.".concat(e),t),registerContent:(e,t)=>p("Basic.".concat(e),t)},Curriculum:{Lesson:e("Lesson"),Quiz:e("Quiz"),Assignment:e("Assignment")},Additional:{registerField:(e,t)=>f("Additional.".concat(e),t),registerContent:(e,t)=>p("Additional.".concat(e),t)}}}},[f,p]);var h=(0,a.useMemo)(()=>({fields:r,contents:o,registerField:f,registerContent:p}),[r,o,f,p]);return/*#__PURE__*/(0,n/* .jsx */.tZ)(d.Provider,{value:h,children:t})};var p=()=>{var e=(0,a.useContext)(d);if(!e){throw new Error("useCourseBuilderSlot must be used within CourseBuilderSlotProvider")}return e}},89459:function(e,t,r){"use strict";r.d(t,{K:()=>_,O:()=>y});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(35944);/* ESM import */var o=r(38032);/* ESM import */var s=r(20203);/* ESM import */var u=r(90406);/* ESM import */var l=r(14784);/* ESM import */var c=r(93283);/* ESM import */var d=r(22456);/* ESM import */var f=r(34403);/* ESM import */var p=r(38003);/* ESM import */var h=/*#__PURE__*/r.n(p);/* ESM import */var v=r(87363);/* ESM import */var m=/*#__PURE__*/r.n(v);var g=[{indicator:1,id:"basic",label:(0,p.__)("Basics","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.L.CourseBasics.buildLink(),isDisabled:false,isActive:true},{indicator:2,id:"curriculum",label:(0,p.__)("Curriculum","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseCurriculum.buildLink */.L.CourseCurriculum.buildLink(),isDisabled:true,isActive:false},{indicator:3,id:"additional",label:(0,p.__)("Additional","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseAdditional.buildLink */.L.CourseAdditional.buildLink(),isDisabled:true,isActive:false}];var b=/*#__PURE__*/m().createContext({steps:g,setSteps:f/* .noop */.ZT,updateStepByIndex:f/* .noop */.ZT,currentIndex:0,courseContent:null});var y=()=>(0,v.useContext)(b);var _=e=>{var{children:t}=e;var[r,o]=(0,v.useState)(g);var f=(0,c/* .useCurrentPath */.J)(s/* ["default"] */.Z);var p=(0,l/* .getCourseId */.z)();var h=(0,u/* .useCourseDetailsQuery */.hL)(Number(p));var m=(0,v.useMemo)(()=>{if(!h.data){return null}return h.data},[h.data]);var y=(0,v.useCallback)((e,t)=>{o(r=>{return r.map((r,i)=>{if(i===e){return(0,n._)({},r,t)}return r})})},[]);var _=(0,v.useMemo)(()=>{return r.findIndex(e=>e.path===f)},[r,f]);(0,v.useEffect)(()=>{o(e=>e.map((e,t)=>{return(0,i._)((0,n._)({},e),{isActive:t===_})}))},[_]);(0,v.useEffect)(()=>{if(!(0,d/* .isDefined */.$K)(m)){return}o(e=>e.map(e=>{return(0,i._)((0,n._)({},e),{isDisabled:false})}))},[m]);return/*#__PURE__*/(0,a/* .jsx */.tZ)(b.Provider,{value:{steps:r,setSteps:o,updateStepByIndex:y,currentIndex:_,courseContent:m},children:t})}},90406:function(e,t,r){"use strict";r.d(t,{H8:()=>Z,Z4:()=>L,_c:()=>O,a7:()=>x,hL:()=>R,iC:()=>E,m8:()=>N,mG:()=>T,ni:()=>M,pH:()=>B,qN:()=>W,vG:()=>D});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(65228);/* ESM import */var o=r(99469);/* ESM import */var s=r(24333);/* ESM import */var u=r(38003);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(32449);/* ESM import */var d=r(313);/* ESM import */var f=r(12274);/* ESM import */var p=r(23855);/* ESM import */var h=r(13985);/* ESM import */var v=r(34039);/* ESM import */var m=r(74053);/* ESM import */var g=r(82340);/* ESM import */var b=r(84225);/* ESM import */var y=r(22456);/* ESM import */var _=r(34403);var w=v/* .tutorConfig.current_user.data */.y.current_user.data;var x={post_date:"",post_name:"",post_title:"",post_content:"",post_status:"publish",visibility:"publish",post_password:"",post_author:{id:Number(w.id),name:w.display_name,email:w.user_email,avatar_url:""},thumbnail:null,video:{source:"",source_video_id:"",poster:"",poster_url:"",source_html5:"",source_external_url:"",source_shortcode:"",source_youtube:"",source_vimeo:"",source_embedded:""},course_price_type:"free",course_price:"",course_sale_price:"",course_selling_option:"one_time",course_categories:[],course_tags:[],course_instructors:[],enable_qna:false,is_public_course:false,course_level:"beginner",maximum_students:null,enrollment_expiry:0,course_benefits:"",course_requirements:"",course_target_audience:"",course_material_includes:"",course_duration_hours:0,course_duration_minutes:0,course_attachments:null,isContentDripEnabled:false,contentDripType:"",course_product_id:"",course_product_name:"",preview_link:"",course_prerequisites:[],tutor_course_certificate_template:"",enable_tutor_bp:false,bp_attached_group_ids:[],editor_used:{name:"classic",label:(0,u.__)("Classic Editor","tutor"),link:""},isScheduleEnabled:false,showScheduleForm:false,schedule_date:"",schedule_time:"",enable_coming_soon:false,coming_soon_thumbnail:null,enable_curriculum_preview:false,course_enrollment_period:false,enrollment_starts_date:"",enrollment_starts_time:"",enrollment_ends_date:"",enrollment_ends_time:"",pause_enrollment:false,tax_on_single:true,tax_on_subscription:true};var E=(e,t)=>{var r,a,o,s,u,l;var p,h,g,b,y,w,x,E,Z,S,O,k,T,C,R;return(0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)((0,i._)((0,n._)({},e.isScheduleEnabled&&{post_date:(0,c["default"])(new Date("".concat(e.schedule_date," ").concat(e.schedule_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.E_.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,_/* .convertToGMT */.WK)(new Date("".concat(e.schedule_date," ").concat(e.schedule_time)))}),{post_title:e.post_title,post_name:e.post_name}),e.editor_used.name==="classic"&&{post_content:e.post_content}),{post_status:e.post_status,post_password:e.visibility==="password_protected"?e.post_password:"",post_author:(p=(r=e.post_author)===null||r===void 0?void 0:r.id)!==null&&p!==void 0?p:null,"pricing[type]":e.course_price_type}),e.course_product_id||e.course_price_type==="free"?{"pricing[product_id]":e.course_price_type==="free"?"-1":e.course_product_id}:{}),{course_price:Number(e.course_price)||0,course_sale_price:Number(e.course_sale_price)||0,course_selling_option:e.course_selling_option,course_categories:(h=e.course_categories)!==null&&h!==void 0?h:[],course_tags:(g=e.course_tags.map(e=>e.id))!==null&&g!==void 0?g:[],thumbnail_id:(b=(a=e.thumbnail)===null||a===void 0?void 0:a.id)!==null&&b!==void 0?b:null,enable_qna:e.enable_qna?"yes":"no",is_public_course:e.is_public_course?"yes":"no",course_level:e.course_level,"course_settings[maximum_students]":(y=e.maximum_students)!==null&&y!==void 0?y:0,"course_settings[enrollment_expiry]":(w=e.enrollment_expiry)!==null&&w!==void 0?w:"","course_settings[enable_content_drip]":e.contentDripType?1:0,"course_settings[content_drip_type]":e.contentDripType,"course_settings[enable_tutor_bp]":e.enable_tutor_bp?1:0,"additional_content[course_benefits]":(x=e.course_benefits)!==null&&x!==void 0?x:"","additional_content[course_target_audience]":(E=e.course_target_audience)!==null&&E!==void 0?E:"","additional_content[course_duration][hours]":(Z=e.course_duration_hours)!==null&&Z!==void 0?Z:0,"additional_content[course_duration][minutes]":(S=e.course_duration_minutes)!==null&&S!==void 0?S:0,"additional_content[course_material_includes]":(O=e.course_material_includes)!==null&&O!==void 0?O:"","additional_content[course_requirements]":(k=e.course_requirements)!==null&&k!==void 0?k:"",preview_link:e.preview_link}),(0,_/* .isAddonEnabled */.ro)(m/* .Addons.TUTOR_MULTI_INSTRUCTORS */.AO.TUTOR_MULTI_INSTRUCTORS)&&{course_instructor_ids:[...e.course_instructors.map(e=>e.id),Number((o=e.post_author)===null||o===void 0?void 0:o.id)]},(0,_/* .isAddonEnabled */.ro)(m/* .Addons.TUTOR_PREREQUISITES */.AO.TUTOR_PREREQUISITES)&&{_tutor_prerequisites_main_edit:true,_tutor_course_prerequisites_ids:(T=(s=e.course_prerequisites)===null||s===void 0?void 0:s.map(e=>e.id))!==null&&T!==void 0?T:[]}),{tutor_course_certificate_template:e.tutor_course_certificate_template,_tutor_course_additional_data_edit:true,_tutor_attachments_main_edit:true}),e.video.source?Object.fromEntries(Object.entries(e.video).map(t=>{var[r,n]=t;return["video[".concat(r,"]"),r==="poster_url"&&!e.video.poster?"":n]})):{}),{tutor_attachments:(C=(e.course_attachments||[]).map(e=>e.id))!==null&&C!==void 0?C:[],bp_attached_group_ids:e.bp_attached_group_ids}),(0,d["default"])(new Date,new Date("".concat(e.schedule_date," ").concat(e.schedule_time)))&&{enable_coming_soon:e.enable_coming_soon?"1":"0",coming_soon_thumbnail_id:(R=(u=e.coming_soon_thumbnail)===null||u===void 0?void 0:u.id)!==null&&R!==void 0?R:0,enable_curriculum_preview:e.enable_curriculum_preview?"1":"0"}),{"course_settings[course_enrollment_period]":e.course_enrollment_period?"yes":"no","course_settings[enrollment_starts_at]":(0,f["default"])(new Date("".concat(e.enrollment_starts_date," ").concat(e.enrollment_starts_time)))?(0,_/* .convertToGMT */.WK)(new Date("".concat(e.enrollment_starts_date," ").concat(e.enrollment_starts_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.E_.yearMonthDayHourMinuteSecond24H):"","course_settings[enrollment_ends_at]":(0,f["default"])(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)))?(0,_/* .convertToGMT */.WK)(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.E_.yearMonthDayHourMinuteSecond24H):"","course_settings[pause_enrollment]":e.pause_enrollment?"yes":"no"}),Object.fromEntries(t.map(t=>{return[t,e[t]]})),!!((l=v/* .tutorConfig.settings */.y.settings)===null||l===void 0?void 0:l.enable_individual_tax_control)&&{tax_on_single:e.tax_on_single?"1":"0",tax_on_subscription:e.tax_on_subscription?"1":"0"})};var Z=(e,t)=>{var r,a,o;var s,u,l,h,g,b;return(0,i._)((0,n._)({post_date:e.post_date,post_title:e.post_title,post_name:e.post_name,post_content:e.post_content,post_status:e.post_status,visibility:(()=>{if(e.post_password.length){return"password_protected"}if(e.post_status==="private"){return"private"}return"publish"})(),post_password:e.post_password,post_author:{id:Number(e.post_author.ID),name:e.post_author.display_name,email:e.post_author.user_email,avatar_url:e.post_author.tutor_profile_photo_url},thumbnail:{id:e.thumbnail_id?Number(e.thumbnail_id):0,title:"",url:e.thumbnail},video:(0,i._)((0,n._)({},e.video),{source:Object.values(v/* .tutorConfig.supported_video_sources */.y.supported_video_sources).find(t=>t.value===e.video.source)?e.video.source:""}),course_product_name:e.course_pricing.product_name,course_price_type:!e.course_pricing.type?"free":e.course_pricing.type,course_price:e.course_pricing.price,course_sale_price:e.course_pricing.sale_price,course_selling_option:e.course_selling_option||"one_time",course_categories:e.course_categories.map(e=>e.term_id),course_tags:e.course_tags.map(e=>{return{id:e.term_id,name:e.name}}),enable_qna:e.enable_qna==="yes",is_public_course:e.is_public_course==="yes",course_level:e.course_level||"intermediate",maximum_students:e.course_settings.maximum_students,enrollment_expiry:e.course_settings.enrollment_expiry,course_benefits:e.course_benefits,course_duration_hours:e.course_duration.hours,course_duration_minutes:e.course_duration.minutes,course_material_includes:e.course_material_includes,course_requirements:e.course_requirements,course_target_audience:e.course_target_audience,isContentDripEnabled:e.course_settings.enable_content_drip===1,contentDripType:(0,_/* .isAddonEnabled */.ro)(m/* .Addons.CONTENT_DRIP */.AO.CONTENT_DRIP)?["unlock_by_date","specific_days","unlock_sequentially","after_finishing_prerequisites"].includes(e.course_settings.content_drip_type)?e.course_settings.content_drip_type:"":"",course_product_id:String(e.course_pricing.product_id)==="0"?"":String(e.course_pricing.product_id),course_instructors:(s=(r=e.course_instructors)===null||r===void 0?void 0:r.reduce((t,r)=>{if(String(r.id)!==String(e.post_author.ID)){t.push({id:r.id,name:r.display_name,email:r.user_email,avatar_url:r.avatar_url,isRemoveAble:false})}return t},[]))!==null&&s!==void 0?s:[],preview_link:(u=e.preview_link)!==null&&u!==void 0?u:"",course_prerequisites:((l=e.course_prerequisites)!==null&&l!==void 0?l:[]).map(e=>({id:e.id,title:e.post_title,image:e.featured_image,is_purchasable:false,regular_price:"",sale_price:""})),tutor_course_certificate_template:(h=e.course_certificate_template)!==null&&h!==void 0?h:"",course_attachments:(g=e.course_attachments)!==null&&g!==void 0?g:[],enable_tutor_bp:!!((0,_/* .isAddonEnabled */.ro)(m/* .Addons.BUDDYPRESS */.AO.BUDDYPRESS)&&e.course_settings.enable_tutor_bp===1),bp_attached_group_ids:(b=e.bp_attached_groups)!==null&&b!==void 0?b:[],editor_used:e.editor_used,isScheduleEnabled:(0,d["default"])(new Date,new Date(e.post_date)),showScheduleForm:!(0,d["default"])(new Date,new Date(e.post_date)),schedule_date:!(0,d["default"])((0,p["default"])(e.post_date),new Date)?(0,c["default"])((0,p["default"])(e.post_date),m/* .DateFormats.yearMonthDay */.E_.yearMonthDay):"",schedule_time:!(0,d["default"])((0,p["default"])(e.post_date),new Date)?(0,c["default"])((0,p["default"])(e.post_date),m/* .DateFormats.hoursMinutes */.E_.hoursMinutes):"",enable_coming_soon:e.enable_coming_soon==="1",coming_soon_thumbnail:{id:Number(e.coming_soon_thumbnail_id),title:"",url:e.coming_soon_thumbnail},enable_curriculum_preview:e.enable_curriculum_preview==="1",course_enrollment_period:e.course_settings.course_enrollment_period==="yes",enrollment_starts_date:(0,f["default"])(new Date(e.course_settings.enrollment_starts_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.nP)(e.course_settings.enrollment_starts_at),m/* .DateFormats.yearMonthDay */.E_.yearMonthDay):"",enrollment_starts_time:(0,f["default"])(new Date(e.course_settings.enrollment_starts_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.nP)(e.course_settings.enrollment_starts_at),m/* .DateFormats.hoursMinutes */.E_.hoursMinutes):"",enrollment_ends_date:(0,f["default"])(new Date(e.course_settings.enrollment_ends_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.nP)(e.course_settings.enrollment_ends_at),m/* .DateFormats.yearMonthDay */.E_.yearMonthDay):"",enrollment_ends_time:(0,f["default"])(new Date(e.course_settings.enrollment_ends_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.nP)(e.course_settings.enrollment_ends_at),m/* .DateFormats.hoursMinutes */.E_.hoursMinutes):"",pause_enrollment:e.course_settings.pause_enrollment==="yes"},Object.fromEntries(t.map(t=>{return[t,e[t]]}))),{tax_on_single:(0,y/* .isDefined */.$K)(e===null||e===void 0?void 0:(a=e.tax_collection)===null||a===void 0?void 0:a.tax_on_single)?e.tax_collection.tax_on_single==="1":true,tax_on_subscription:(0,y/* .isDefined */.$K)(e===null||e===void 0?void 0:(o=e.tax_collection)===null||o===void 0?void 0:o.tax_on_subscription)?e.tax_collection.tax_on_subscription==="1":true})};var S=e=>{return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].CREATED_COURSE */.Z.CREATED_COURSE,e)};var O=()=>{var{showToast:e}=(0,h/* .useToast */.p)();return(0,a/* .useMutation */.D)({mutationFn:S,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(t)})}})};var k=e=>{return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].UPDATE_COURSE */.Z.UPDATE_COURSE,e)};var T=()=>{var{showToast:e}=(0,h/* .useToast */.p)();var t=(0,o/* .useQueryClient */.NL)();return(0,a/* .useMutation */.D)({mutationFn:k,onSuccess:r=>{if(r.data){e({type:"success",message:(0,u.__)(r.message,"tutor")});t.invalidateQueries({queryKey:["CourseDetails",r.data]});t.invalidateQueries({queryKey:["InstructorList",String(r.data)]});t.invalidateQueries({queryKey:["WcProducts"]})}},onError:t=>{e({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(t)})}})};var C=e=>{return g/* .wpAjaxInstance.get */.R.get(b/* ["default"].GET_COURSE_DETAILS */.Z.GET_COURSE_DETAILS,{params:{course_id:e}})};var R=e=>{return(0,s/* .useQuery */.a)({queryKey:["CourseDetails",e],queryFn:()=>C(e).then(e=>{return e.data}),enabled:!!e})};var A=e=>{return g/* .wpAjaxInstance.get */.R.get(b/* ["default"].GET_WC_PRODUCTS */.Z.GET_WC_PRODUCTS,{params:(0,n._)({exclude_linked_products:true},e&&{course_id:e})})};var M=(e,t)=>{return(0,s/* .useQuery */.a)({queryKey:["WcProducts"],queryFn:()=>A(t).then(e=>e.data),enabled:e==="wc"})};var P=(e,t)=>{return g/* .wpAjaxInstance.get */.R.get(b/* ["default"].GET_WC_PRODUCT_DETAILS */.Z.GET_WC_PRODUCT_DETAILS,{params:{product_id:e,course_id:t}})};var D=(e,t,r,n)=>{return(0,s/* .useQuery */.a)({queryKey:["WcProductDetails",e,t],queryFn:()=>P(e,t).then(e=>e.data),enabled:!!e&&r==="paid"&&n==="wc"})};var I=e=>{return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].SAVE_ZOOM_MEETING */.Z.SAVE_ZOOM_MEETING,e)};var L=()=>{var{showToast:e}=(0,h/* .useToast */.p)();var t=(0,o/* .useQueryClient */.NL)();return(0,a/* .useMutation */.D)({mutationFn:I,onSuccess:(r,n)=>{if(r.data){e({type:"success",message:(0,u.__)(r.message,"tutor")});if(n.click_form==="course_builder"){t.invalidateQueries({queryKey:["Topic",n.course_id]})}if(n.click_form==="metabox"){t.invalidateQueries({queryKey:["CourseDetails",Number(n.course_id)]})}}},onError:t=>{e({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(t)})}})};var F=e=>{return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].DELETE_ZOOM_MEETING */.Z.DELETE_ZOOM_MEETING,{meeting_id:e})};var N=e=>{var{showToast:t}=(0,h/* .useToast */.p)();var r=(0,o/* .useQueryClient */.NL)();return(0,a/* .useMutation */.D)({mutationFn:F,onSuccess:n=>{if(n.data){t({type:"success",message:(0,u.__)(n.data.message,"tutor")});r.invalidateQueries({queryKey:["CourseDetails",Number(e)]});r.invalidateQueries({queryKey:["Topic",e]})}},onError:e=>{t({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(e)})}})};var j=e=>{var t=(0,i._)((0,n._)({},e["post-id"]&&e["event-id"]&&{"post-id":e["post-id"],"event-id":e["event-id"]}),{course_id:e.topic_id?e.topic_id:e.course_id,meeting_summary:e.meeting_summary,meeting_title:e.meeting_title,meeting_start_date:e.meeting_start_date,meeting_start_time:e.meeting_start_time,meeting_end_date:e.meeting_end_date,meeting_end_time:e.meeting_end_time,meeting_timezone:e.meeting_timezone,meeting_attendees_enroll_students:e.meeting_attendees_enroll_students,attendees:e.attendees});return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].SAVE_GOOGLE_MEET */.Z.SAVE_GOOGLE_MEET,t)};var B=()=>{var{showToast:e}=(0,h/* .useToast */.p)();var t=(0,o/* .useQueryClient */.NL)();return(0,a/* .useMutation */.D)({mutationFn:j,onSuccess:(r,n)=>{e({type:"success",message:(0,u.__)(r.message,"tutor")});if(n.topic_id){t.invalidateQueries({queryKey:["Topic",n.course_id]})}else{t.invalidateQueries({queryKey:["CourseDetails",n.course_id]})}},onError:t=>{e({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(t)})}})};var U=(e,t)=>{return g/* .wpAjaxInstance.post */.R.post(b/* ["default"].DELETE_GOOGLE_MEET */.Z.DELETE_GOOGLE_MEET,{"post-id":e,"event-id":t})};var W=(e,t)=>{var{showToast:r}=(0,h/* .useToast */.p)();var n=(0,o/* .useQueryClient */.NL)();return(0,a/* .useMutation */.D)({mutationFn:()=>U(t["post-id"],t["event-id"]),onSuccess:t=>{r({type:"success",message:(0,u.__)(t.message,"tutor")});n.invalidateQueries({queryKey:["CourseDetails",Number(e)]});n.invalidateQueries({queryKey:["Topic",Number(e)]})},onError:e=>{r({type:"danger",message:(0,_/* .convertToErrorMessage */.Mo)(e)})}})};var z=e=>{return wpAjaxInstance.post(endpoints.TUTOR_YOUTUBE_VIDEO_DURATION,{video_id:e})};var J=()=>{return useMutation({mutationFn:z})}},14784:function(e,t,r){"use strict";r.d(t,{W:()=>i,z:()=>n});var n=()=>{var e=new URLSearchParams(window.location.search);var t=e.get("course_id");return Number(t)};var i=(e,t)=>{return t.toString().replace(e,"")}},87056:function(e,t,r){"use strict";r.d(t,{Z:()=>d});/* ESM import */var n=r(35944);/* ESM import */var i=r(70917);/* ESM import */var a=r(60860);/* ESM import */var o=r(76487);/* ESM import */var s=r(17106);/* ESM import */var u=r(26815);var l={text:{warning:"#D47E00",success:"#D47E00",danger:"#f44337",info:"#D47E00",primary:"#D47E00"},icon:{warning:"#FAB000",success:"#FAB000",danger:"#f55e53",info:"#FAB000",primary:"#FAB000"},background:{warning:"#FBFAE9",success:"#FBFAE9",danger:"#fdd9d7",info:"#FBFAE9",primary:"#FBFAE9"}};var c=e=>{var{children:t,type:r="warning",icon:i}=e;return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:f.wrapper({type:r}),children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(s/* ["default"] */.Z,{when:i,children:e=>/*#__PURE__*/(0,n/* .jsx */.tZ)(u/* ["default"] */.Z,{style:f.icon({type:r}),name:e,height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:t})]})};/* ESM default export */const d=c;var f={wrapper:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.iv)(o/* .typography.caption */.c.caption(),";display:flex;align-items:start;padding:",a/* .spacing["8"] */.W0["8"]," ",a/* .spacing["12"] */.W0["12"],";width:100%;border-radius:",a/* .borderRadius.card */.E0.card,";gap:",a/* .spacing["4"] */.W0["4"],";background-color:",l.background[t],";color:",l.text[t],";")},icon:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.iv)("color:",l.icon[t],";flex-shrink:0;")}}},19398:function(e,t,r){"use strict";r.d(t,{Z:()=>w});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(98848);/* ESM import */var o=r(58865);/* ESM import */var s=r(35944);/* ESM import */var u=r(70917);/* ESM import */var l=r(87363);/* ESM import */var c=/*#__PURE__*/r.n(l);/* ESM import */var d=r(26815);/* ESM import */var f=r(60860);/* ESM import */var p=r(76487);/* ESM import */var h=r(78151);/* ESM import */var v=r(29535);function m(){var e=(0,o._)(["\n      color: transparent;\n    "]);m=function t(){return e};return e}function g(){var e=(0,o._)(["\n      margin-right: 0;\n      margin-left: ",";\n    "]);g=function t(){return e};return e}function b(){var e=(0,o._)(["\n      opacity: 0;\n    "]);b=function t(){return e};return e}function y(){var e=(0,o._)(["\n      margin-inline: 0;\n    "]);y=function t(){return e};return e}var _=/*#__PURE__*/c().forwardRef((e,t)=>{var{variant:r="primary",isOutlined:o=false,size:u="regular",loading:l=false,children:c,disabled:f=false,icon:p,iconPosition:h="left",buttonCss:v,buttonContentCss:m,as:g="button",tabIndex:b,isIconOnly:y=false}=e,_=(0,a._)(e,["variant","isOutlined","size","loading","children","disabled","icon","iconPosition","buttonCss","buttonContentCss","as","tabIndex","isIconOnly"]);var w=[S({variant:r,outlined:o?r:"none",size:u,isLoading:l?"true":"false",iconOnly:y?"true":"false"}),v];var x=/*#__PURE__*/(0,s/* .jsxs */.BX)(s/* .Fragment */.HY,{children:[l&&!f&&/*#__PURE__*/(0,s/* .jsx */.tZ)("span",{css:Z.spinner,children:/*#__PURE__*/(0,s/* .jsx */.tZ)(d/* ["default"] */.Z,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,s/* .jsxs */.BX)("span",{css:[Z.buttonContent({loading:l,disabled:f}),m],children:[p&&h==="left"&&/*#__PURE__*/(0,s/* .jsx */.tZ)("span",{css:Z.buttonIcon({iconPosition:h,loading:l,hasChildren:!!c}),children:p}),c,p&&h==="right"&&/*#__PURE__*/(0,s/* .jsx */.tZ)("span",{css:Z.buttonIcon({iconPosition:h,loading:l,hasChildren:!!c}),children:p})]})]});if(g==="a"){var{href:E,target:O,rel:k,download:T,onClick:C}=_,R=(0,a._)(_,["href","target","rel","download","onClick"]);// Auto-add security attributes for external links
var A=typeof E==="string"&&(E.startsWith("http")||E.startsWith("//"));var M=O==="_blank"&&A?"".concat(k?"".concat(k," "):"","noopener noreferrer"):k;return/*#__PURE__*/(0,s/* .jsx */.tZ)("a",(0,i._)((0,n._)({ref:t,css:w,href:f||l?undefined:E,target:f||l?undefined:O,rel:M,download:f||l?undefined:T,tabIndex:f||l?-1:b,"aria-disabled":f||l,onClick:f||l?e=>e.preventDefault():C,role:"button","data-size":u},R),{children:x}))}var{type:P="button",onClick:D,form:I,name:L,value:F}=_,N=(0,a._)(_,["type","onClick","form","name","value"]);return/*#__PURE__*/(0,s/* .jsx */.tZ)("button",(0,i._)((0,n._)({ref:t,type:P,css:w,disabled:f||l,tabIndex:b,onClick:D,form:I,name:L,value:F,"data-size":u},N),{children:x}))});_.displayName="Button";/* ESM default export */const w=_;var x=/*#__PURE__*/(0,u/* .keyframes */.F4)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var E={notOutlined:/*#__PURE__*/(0,u/* .css */.iv)("&:disabled,&[aria-disabled='true']{background-color:",f/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,";color:",f/* .colorTokens.text.disable */.Jv.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.Jv.icon.disable["default"],";}}"),outlined:/*#__PURE__*/(0,u/* .css */.iv)("&:disabled,&[aria-disabled='true']{background-color:transparent;border:none;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.action.outline.disable */.Jv.action.outline.disable,";color:",f/* .colorTokens.text.disable */.Jv.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.Jv.icon.disable["default"],";}}"),text:/*#__PURE__*/(0,u/* .css */.iv)("&:disabled,&[aria-disabled='true']{color:",f/* .colorTokens.text.disable */.Jv.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.Jv.icon.disable["default"],";}}")};var Z={base:/*#__PURE__*/(0,u/* .css */.iv)(v/* .styleUtils.resetButton */.i.resetButton,";",v/* .styleUtils.display.inlineFlex */.i.display.inlineFlex(),";justify-content:center;align-items:center;",p/* .typography.caption */.c.caption("medium"),";",v/* .styleUtils.text.align.center */.i.text.align.center,";color:",f/* .colorTokens.text.white */.Jv.text.white,";text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:0;padding:",f/* .spacing["8"] */.W0["8"]," ",f/* .spacing["32"] */.W0["32"],";border-radius:",f/* .borderRadius["6"] */.E0["6"],";z-index:",f/* .zIndex.level */.W5.level,";transition:all 150ms ease-in-out;position:relative;svg{color:",f/* .colorTokens.icon.white */.Jv.icon.white,";}&:disabled,&[aria-disabled='true']{cursor:not-allowed;}&:not(:disabled):not([aria-disabled='true']){&:focus{box-shadow:",f/* .shadow.focus */.AF.focus,";}&:focus-visible{box-shadow:none;outline:2px solid ",f/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}}"),variant:{primary:/*#__PURE__*/(0,u/* .css */.iv)("background-color:",f/* .colorTokens.action.primary["default"] */.Jv.action.primary["default"],";",E.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.Jv.text.white,";background-color:",f/* .colorTokens.action.primary.hover */.Jv.action.primary.hover,";}&:active{background-color:",f/* .colorTokens.action.primary.active */.Jv.action.primary.active,";color:",f/* .colorTokens.text.white */.Jv.text.white,";svg{color:",f/* .colorTokens.icon.white */.Jv.icon.white,";}}}"),secondary:/*#__PURE__*/(0,u/* .css */.iv)("background-color:",f/* .colorTokens.action.secondary["default"] */.Jv.action.secondary["default"],";color:",f/* .colorTokens.text.brand */.Jv.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.Jv.icon.brand,";}",E.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.Jv.action.secondary.hover,";color:",f/* .colorTokens.text.brand */.Jv.text.brand,";}&:active{background-color:",f/* .colorTokens.action.secondary.active */.Jv.action.secondary.active,";color:",f/* .colorTokens.text.brand */.Jv.text.brand,";}}"),tertiary:/*#__PURE__*/(0,u/* .css */.iv)("box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";color:",f/* .colorTokens.text.subdued */.Jv.text.subdued,";svg{color:",f/* .colorTokens.icon.hints */.Jv.icon.hints,";}",E.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.hover */.Jv.background.hover,";box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.hover */.Jv.stroke.hover,";color:",f/* .colorTokens.text.title */.Jv.text.title,";svg{color:",f/* .colorTokens.icon.brand */.Jv.icon.brand,";}}&:active{background-color:",f/* .colorTokens.background.active */.Jv.background.active,";svg{color:",f/* .colorTokens.icon.hints */.Jv.icon.hints,";}}}"),danger:/*#__PURE__*/(0,u/* .css */.iv)("background-color:",f/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,";color:",f/* .colorTokens.text.error */.Jv.text.error,";svg{color:",f/* .colorTokens.icon.error */.Jv.icon.error,";}",E.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus,&:active{background-color:",f/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,";color:",f/* .colorTokens.text.error */.Jv.text.error,";}}"),WP:/*#__PURE__*/(0,u/* .css */.iv)("background-color:",f/* .colorTokens.action.primary.wp */.Jv.action.primary.wp,";",E.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.Jv.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.Jv.text.white,";}&:active{background-color:",f/* .colorTokens.action.primary.wp */.Jv.action.primary.wp,";}}"),text:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;color:",f/* .colorTokens.text.subdued */.Jv.text.subdued,";padding:",f/* .spacing["8"] */.W0["8"],";svg{color:",f/* .colorTokens.icon.hints */.Jv.icon.hints,";}",E.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:transparent;color:",f/* .colorTokens.text.brand */.Jv.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.Jv.icon.brand,";}}&:active{background-color:transparent;color:",f/* .colorTokens.text.subdued */.Jv.text.subdued,";}}")},outlined:{primary:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.Jv.stroke.brand,";color:",f/* .colorTokens.text.brand */.Jv.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.Jv.icon.brand,";}",E.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.Jv.text.white,";svg{color:",f/* .colorTokens.icon.white */.Jv.icon.white,";}}}"),secondary:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.Jv.stroke.brand,";color:",f/* .colorTokens.text.brand */.Jv.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.Jv.icon.brand,";}",E.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.Jv.action.secondary.hover,";}}"),tertiary:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;",E.outlined,";"),danger:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;border:1px solid ",f/* .colorTokens.stroke.danger */.Jv.stroke.danger,";",E.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail,";}}"),WP:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;border:1px solid ",f/* .colorTokens.action.primary.wp */.Jv.action.primary.wp,";color:",f/* .colorTokens.action.primary.wp */.Jv.action.primary.wp,";svg{color:",f/* .colorTokens.icon.wp */.Jv.icon.wp,";}",E.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.Jv.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.Jv.text.white,";svg{color:",f/* .colorTokens.icon.white */.Jv.icon.white,";}}}"),text:/*#__PURE__*/(0,u/* .css */.iv)("background-color:transparent;border:none;color:",f/* .colorTokens.text.primary */.Jv.text.primary,";",E.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.brand */.Jv.text.brand,";}}"),none:/*#__PURE__*/(0,u/* .css */.iv)()},size:{regular:/*#__PURE__*/(0,u/* .css */.iv)("padding:",f/* .spacing["8"] */.W0["8"]," ",f/* .spacing["32"] */.W0["32"],";",p/* .typography.caption */.c.caption("medium"),";color:",f/* .colorTokens.text.white */.Jv.text.white,";min-height:40px;"),large:/*#__PURE__*/(0,u/* .css */.iv)("padding:",f/* .spacing["12"] */.W0["12"]," ",f/* .spacing["40"] */.W0["40"],";",p/* .typography.body */.c.body("medium"),";color:",f/* .colorTokens.text.white */.Jv.text.white,";min-height:48px;"),small:/*#__PURE__*/(0,u/* .css */.iv)("padding:",f/* .spacing["6"] */.W0["6"]," ",f/* .spacing["16"] */.W0["16"],";",p/* .typography.small */.c.small("medium"),";color:",f/* .colorTokens.text.white */.Jv.text.white,";min-height:32px;")},isIconOnly:{true:/*#__PURE__*/(0,u/* .css */.iv)("aspect-ratio:1 / 1;&[data-size='regular']{padding:",f/* .spacing["8"] */.W0["8"],";width:40px;}&[data-size='large']{padding:",f/* .spacing["12"] */.W0["12"],";width:48px;}&[data-size='small']{padding:",f/* .spacing["6"] */.W0["6"],";width:32px;}"),false:/*#__PURE__*/(0,u/* .css */.iv)()},isLoading:{true:/*#__PURE__*/(0,u/* .css */.iv)("opacity:0.8;cursor:wait;"),false:/*#__PURE__*/(0,u/* .css */.iv)()},iconWrapper:{left:/*#__PURE__*/(0,u/* .css */.iv)("order:-1;"),right:/*#__PURE__*/(0,u/* .css */.iv)("order:1;")},buttonContent:e=>{var{loading:t,disabled:r,isIconOnly:n}=e;return/*#__PURE__*/(0,u/* .css */.iv)(v/* .styleUtils.display.flex */.i.display.flex(),";align-items:center;",n&&"justify-content: center;"," ",t&&!r&&(0,u/* .css */.iv)(m()))},buttonIcon:e=>{var{iconPosition:t,loading:r,hasChildren:n=true}=e;return/*#__PURE__*/(0,u/* .css */.iv)("display:grid;place-items:center;margin-right:",f/* .spacing["4"] */.W0["4"],";",t==="right"&&(0,u/* .css */.iv)(g(),f/* .spacing["4"] */.W0["4"])," ",r&&(0,u/* .css */.iv)(b())," ",!n&&(0,u/* .css */.iv)(y()))},spinner:/*#__PURE__*/(0,u/* .css */.iv)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",x," 1s linear infinite;}")};var S=(0,h/* .createVariation */.Y)({variants:{size:{regular:Z.size.regular,large:Z.size.large,small:Z.size.small},isLoading:{true:Z.isLoading.true,false:Z.isLoading.false},iconOnly:{true:Z.isIconOnly.true,false:Z.isIconOnly.false},variant:{primary:Z.variant.primary,secondary:Z.variant.secondary,tertiary:Z.variant.tertiary,danger:Z.variant.danger,WP:Z.variant.WP,text:Z.variant.text},outlined:{primary:Z.outlined.primary,secondary:Z.outlined.secondary,tertiary:Z.outlined.tertiary,danger:Z.outlined.danger,WP:Z.outlined.WP,text:Z.outlined.text,none:Z.outlined.none}},defaultVariants:{variant:"primary",outlined:"none",size:"regular",isLoading:"false",iconOnly:"false"}},Z.base)},2613:function(e,t,r){"use strict";r.d(t,{Bt:()=>h,ZP:()=>v,fz:()=>d,g4:()=>f});/* ESM import */var n=r(35944);/* ESM import */var i=r(60860);/* ESM import */var a=r(70917);var o=/*#__PURE__*/(0,a/* .keyframes */.F4)("0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var s=/*#__PURE__*/(0,a/* .keyframes */.F4)("0%{stroke-dashoffset:180;transform:rotate(0deg);}50%{stroke-dashoffset:",180/4,";transform:rotate(135deg);}100%{stroke-dashoffset:180;transform:rotate(360deg);}");var u=/*#__PURE__*/(0,a/* .keyframes */.F4)("	0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var l={fullscreen:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;"),loadingOverlay:/*#__PURE__*/(0,a/* .css */.iv)("position:absolute;top:0;bottom:0;right:0;left:0;display:flex;align-items:center;justify-content:center;"),loadingSection:/*#__PURE__*/(0,a/* .css */.iv)("width:100%;height:100px;display:flex;justify-content:center;align-items:center;"),svg:/*#__PURE__*/(0,a/* .css */.iv)("animation:",o," 1.4s linear infinite;"),spinnerPath:/*#__PURE__*/(0,a/* .css */.iv)("stroke-dasharray:180;stroke-dashoffset:0;transform-origin:center;animation:",s," 1.4s linear infinite;"),spinGradient:/*#__PURE__*/(0,a/* .css */.iv)("transition:transform;transform-origin:center;animation:",u," 1s infinite linear;")};var c=e=>{var{size:t=30,color:r=i/* .colorTokens.icon.disable["default"] */.Jv.icon.disable["default"]}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)("svg",{width:t,height:t,css:l.svg,viewBox:"0 0 86 86",xmlns:"http://www.w3.org/2000/svg",children:/*#__PURE__*/(0,n/* .jsx */.tZ)("circle",{css:l.spinnerPath,fill:"none",stroke:r,strokeWidth:"6",strokeLinecap:"round",cx:"43",cy:"43",r:"30"})})};var d=()=>{return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:l.loadingOverlay,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(c,{})})};var f=()=>{return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:l.loadingSection,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(c,{})})};var p=()=>{return /*#__PURE__*/_jsx("div",{css:l.fullscreen,children:/*#__PURE__*/_jsx(c,{})})};var h=e=>{var{size:t=24}=e;return/*#__PURE__*/(0,n/* .jsxs */.BX)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("path",{d:"M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89472 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12",stroke:"url(#paint0_linear_2402_3559)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",css:l.spinGradient}),/*#__PURE__*/(0,n/* .jsx */.tZ)("defs",{children:/*#__PURE__*/(0,n/* .jsxs */.BX)("linearGradient",{id:"paint0_linear_2402_3559",x1:"4.50105",y1:"12",x2:"21.6571",y2:"6.7847",gradientUnits:"userSpaceOnUse",children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("stop",{stopColor:"#FF9645"}),/*#__PURE__*/(0,n/* .jsx */.tZ)("stop",{offset:"0.152804",stopColor:"#FF6471"}),/*#__PURE__*/(0,n/* .jsx */.tZ)("stop",{offset:"0.467993",stopColor:"#CF6EBD"}),/*#__PURE__*/(0,n/* .jsx */.tZ)("stop",{offset:"0.671362",stopColor:"#A477D1"}),/*#__PURE__*/(0,n/* .jsx */.tZ)("stop",{offset:"1",stopColor:"#3E64DE"})]})})]})};/* ESM default export */const v=c},53052:function(e,t,r){"use strict";r.d(t,{Z:()=>g});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(98848);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(87363);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(74053);/* ESM import */var d=r(60860);/* ESM import */var f=r(76487);/* ESM import */var p=r(78151);/* ESM import */var h=r(29535);/* ESM import */var v=r(2613);var m=/*#__PURE__*/l().forwardRef((e,t)=>{var{className:r,variant:s,size:u,children:l,type:c="button",disabled:d=false,roundedFull:f=true,loading:p}=e,h=(0,a._)(e,["className","variant","size","children","type","disabled","roundedFull","loading"]);return/*#__PURE__*/(0,o/* .jsx */.tZ)("button",(0,i._)((0,n._)({type:c,ref:t,css:y({variant:s,size:u,rounded:f?"true":"false"}),className:r,disabled:d},h),{children:/*#__PURE__*/(0,o/* .jsx */.tZ)("span",{css:b.buttonSpan,children:p?/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.ZP,{size:24}):l})}))});/* ESM default export */const g=m;var b={buttonSpan:/*#__PURE__*/(0,s/* .css */.iv)(h/* .styleUtils.flexCenter */.i.flexCenter(),";z-index:",d/* .zIndex.positive */.W5.positive,";"),base:/*#__PURE__*/(0,s/* .css */.iv)(h/* .styleUtils.resetButton */.i.resetButton,";",f/* .typography.small */.c.small("medium"),";display:flex;gap:",d/* .spacing["4"] */.W0["4"],";width:100%;justify-content:center;align-items:center;white-space:nowrap;position:relative;overflow:hidden;transition:box-shadow 0.5s ease;&:focus-visible{outline:2px solid ",d/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}&:disabled{cursor:not-allowed;background:",d/* .colorTokens.action.primary.disable */.Jv.action.primary.disable,";pointer-events:none;color:",d/* .colorTokens.text.disable */.Jv.text.disable,";border-color:",d/* .colorTokens.stroke.disable */.Jv.stroke.disable,";}"),default:e=>/*#__PURE__*/(0,s/* .css */.iv)("background:",!e?d/* .colorTokens.ai.gradient_1 */.Jv.ai.gradient_1:d/* .colorTokens.ai.gradient_1_rtl */.Jv.ai.gradient_1_rtl,";color:",d/* .colorTokens.text.white */.Jv.text.white,";&::before{content:'';position:absolute;inset:0;background:",!e?d/* .colorTokens.ai.gradient_2 */.Jv.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.Jv.ai.gradient_2_rtl,";opacity:0;transition:opacity 0.5s ease;}&:hover::before{opacity:1;}"),secondary:/*#__PURE__*/(0,s/* .css */.iv)("background-color:",d/* .colorTokens.action.secondary["default"] */.Jv.action.secondary["default"],";color:",d/* .colorTokens.text.brand */.Jv.text.brand,";border-radius:",d/* .borderRadius["6"] */.E0["6"],";&:hover{background-color:",d/* .colorTokens.action.secondary.hover */.Jv.action.secondary.hover,";}"),outline:/*#__PURE__*/(0,s/* .css */.iv)("position:relative;&::before{content:'';position:absolute;inset:0;background:",d/* .colorTokens.ai.gradient_1 */.Jv.ai.gradient_1,";color:",d/* .colorTokens.text.primary */.Jv.text.primary,";border:1px solid transparent;-webkit-mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;}&:hover{&::before{background:",d/* .colorTokens.ai.gradient_2 */.Jv.ai.gradient_2,";}}"),primaryOutline:/*#__PURE__*/(0,s/* .css */.iv)("border:1px solid ",d/* .colorTokens.brand.blue */.Jv.brand.blue,";color:",d/* .colorTokens.brand.blue */.Jv.brand.blue,";&:hover{background-color:",d/* .colorTokens.brand.blue */.Jv.brand.blue,";color:",d/* .colorTokens.text.white */.Jv.text.white,";}"),primary:/*#__PURE__*/(0,s/* .css */.iv)("background-color:",d/* .colorTokens.brand.blue */.Jv.brand.blue,";color:",d/* .colorTokens.text.white */.Jv.text.white,";"),ghost:/*#__PURE__*/(0,s/* .css */.iv)("background-color:transparent;color:",d/* .colorTokens.text.subdued */.Jv.text.subdued,";border-radius:",d/* .borderRadius["4"] */.E0["4"],";&:hover{color:",d/* .colorTokens.text.primary */.Jv.text.primary,";}"),plain:/*#__PURE__*/(0,s/* .css */.iv)("span{background:",!c/* .isRTL */.dZ?d/* .colorTokens.text.ai.gradient */.Jv.text.ai.gradient:d/* .colorTokens.ai.gradient_1_rtl */.Jv.ai.gradient_1_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;&:hover{background:",!c/* .isRTL */.dZ?d/* .colorTokens.ai.gradient_2 */.Jv.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.Jv.ai.gradient_2_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;}}"),size:{default:/*#__PURE__*/(0,s/* .css */.iv)("height:32px;padding-inline:",d/* .spacing["12"] */.W0["12"],";padding-block:",d/* .spacing["4"] */.W0["4"],";"),sm:/*#__PURE__*/(0,s/* .css */.iv)("height:24px;padding-inline:",d/* .spacing["10"] */.W0["10"],";"),icon:/*#__PURE__*/(0,s/* .css */.iv)("width:32px;height:32px;")},rounded:{true:/*#__PURE__*/(0,s/* .css */.iv)("border-radius:",d/* .borderRadius["54"] */.E0["54"],";&::before{border-radius:",d/* .borderRadius["54"] */.E0["54"],";}"),false:/*#__PURE__*/(0,s/* .css */.iv)("border-radius:",d/* .borderRadius["4"] */.E0["4"],";&::before{border-radius:",d/* .borderRadius["4"] */.E0["4"],";}")}};var y=(0,p/* .createVariation */.Y)({variants:{variant:{default:b.default(c/* .isRTL */.dZ),primary:b.primary,secondary:b.secondary,outline:b.outline,primary_outline:b.primaryOutline,ghost:b.ghost,plain:b.plain},size:{default:b.size.default,sm:b.size.sm,icon:b.size.icon},rounded:{true:b.rounded.true,false:b.rounded.false}},defaultVariants:{variant:"default",size:"default",rounded:"true"}},b.base)},26815:function(e,t,r){"use strict";r.d(t,{Z:()=>m});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(98848);/* ESM import */var o=r(58865);/* ESM import */var s=r(35944);/* ESM import */var u=r(34039);/* ESM import */var l=r(70917);/* ESM import */var c=r(87363);/* ESM import */var d=/*#__PURE__*/r.n(c);function f(){var e=(0,o._)(["\n      filter: grayscale(100%);\n    "]);f=function t(){return e};return e}var p={};var h=e=>{var{name:t,width:r=16,height:o=16,style:u,isColorIcon:l=false}=e,d=(0,a._)(e,["name","width","height","style","isColorIcon"]);var f,h;var[m,b]=(0,c.useState)(((f=p[t])===null||f===void 0?void 0:f.icon)||null);var[y,_]=(0,c.useState)(!((h=p[t])===null||h===void 0?void 0:h.icon));(0,c.useEffect)(()=>{var e;if((e=p[t])===null||e===void 0?void 0:e.icon){b(p[t].icon);_(false);return}_(true);v(t,r,o).then(e=>{b(e)}).catch(()=>{b(null)}).finally(()=>{_(false)})},[t,r,o]);var w=(0,n._)({},l&&{"data-colorize":true},d);var x=m?m.viewBox:"0 0 ".concat(r," ").concat(o);if(!m&&!y){return/*#__PURE__*/(0,s/* .jsx */.tZ)("svg",{viewBox:x,children:/*#__PURE__*/(0,s/* .jsx */.tZ)("rect",{width:r,height:o,fill:"transparent"})})}return/*#__PURE__*/(0,s/* .jsx */.tZ)("svg",(0,i._)((0,n._)({css:[u,{width:r,height:o},g.svg({isColorIcon:l})],xmlns:"http://www.w3.org/2000/svg",viewBox:x},w),{role:"presentation","aria-hidden":true,dangerouslySetInnerHTML:{__html:m?m.icon:""}}))};function v(e,t,r){var n,i;if((n=p[e])===null||n===void 0?void 0:n.icon){// Icon already loaded
return Promise.resolve(p[e].icon)}if((i=p[e])===null||i===void 0?void 0:i.promise){// Fetch already in progress, return existing promise
return p[e].promise}var a=e.trim().replace(/[A-Z]/g,e=>"-"+e.toLowerCase());var o="".concat(u/* .tutorConfig.tutor_url */.y.tutor_url,"/assets/icons/").concat(a,".svg");var s=fetch(o).then(t=>{if(!t.ok){throw new Error("Failed to load icon: ".concat(e))}return t.text()}).then(n=>{var i=new DOMParser;var a=i.parseFromString(n,"image/svg+xml");var o=a.querySelector("svg");var s=(o===null||o===void 0?void 0:o.getAttribute("viewBox"))||"0 0 ".concat(t," ").concat(r);var u=(o===null||o===void 0?void 0:o.innerHTML)||"";var l={viewBox:s,icon:u};p[e]={icon:l};return l}).catch(t=>{p[e]={error:t};throw t});p[e]={loading:true,promise:s};return s}h.displayName="SVGIcon";/* ESM default export */const m=/*#__PURE__*/(0,c.memo)(h,(e,t)=>{var r,n;return e.name===t.name&&e.height===t.height&&e.width===t.height&&e.isColorIcon===t.isColorIcon&&((r=e.style)===null||r===void 0?void 0:r.name)===((n=t.style)===null||n===void 0?void 0:n.name)});var g={svg:e=>{var{isColorIcon:t=false}=e;return/*#__PURE__*/(0,l/* .css */.iv)("transition:filter 0.3s ease-in-out;",t&&(0,l/* .css */.iv)(f()),";")}}},97503:function(e,t,r){"use strict";r.d(t,{Z:()=>h});/* ESM import */var n=r(58865);/* ESM import */var i=r(35944);/* ESM import */var a=r(60860);/* ESM import */var o=r(22456);/* ESM import */var s=r(70917);/* ESM import */var u=r(87363);/* ESM import */var l=/*#__PURE__*/r.n(u);function c(){var e=(0,n._)(["\n      border-radius: ",";\n    "]);c=function t(){return e};return e}function d(){var e=(0,n._)(["\n          background: linear-gradient(89.17deg, #fef4ff 0.2%, #f9d3ff 50.09%, #fef4ff 96.31%);\n        "]);d=function t(){return e};return e}function f(){var e=(0,n._)(["\n      :after {\n        content: '';\n        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);\n        position: absolute;\n        transform: translateX(-100%);\n        inset: 0;\n        ","\n\n        animation: ","s linear 0.5s infinite normal none running ",";\n      }\n    "]);f=function t(){return e};return e}var p=/*#__PURE__*/(0,u.forwardRef)((e,t)=>{var{width:r="100%",height:n=16,animation:a=false,isMagicAi:o=false,isRound:s=false,animationDuration:u=1.6,className:l}=e;return/*#__PURE__*/(0,i/* .jsx */.tZ)("span",{ref:t,css:m.skeleton(r,n,a,o,s,u),className:l})});/* ESM default export */const h=p;var v={wave:/*#__PURE__*/(0,s/* .keyframes */.F4)("0%{transform:translateX(-100%);}50%{transform:translateX(0%);}100%{transform:translateX(100%);}")};var m={skeleton:(e,t,r,n,i,u)=>/*#__PURE__*/(0,s/* .css */.iv)("display:block;width:",(0,o/* .isNumber */.hj)(e)?"".concat(e,"px"):e,";height:",(0,o/* .isNumber */.hj)(t)?"".concat(t,"px"):t,";border-radius:",a/* .borderRadius["6"] */.E0["6"],";background-color:",!n?"rgba(0, 0, 0, 0.11)":a/* .colorTokens.background.magicAi.skeleton */.Jv.background.magicAi.skeleton,";position:relative;-webkit-mask-image:-webkit-radial-gradient(center,white,black);overflow:hidden;",i&&(0,s/* .css */.iv)(c(),a/* .borderRadius.circle */.E0.circle)," ",r&&(0,s/* .css */.iv)(f(),n&&(0,s/* .css */.iv)(d()),u,v.wave))}},25959:function(e,t,r){"use strict";r.d(t,{Z:()=>_});/* ESM import */var n=r(58865);/* ESM import */var i=r(35944);/* ESM import */var a=r(60860);/* ESM import */var o=r(76487);/* ESM import */var s=r(17106);/* ESM import */var u=r(34403);/* ESM import */var l=r(70917);/* ESM import */var c=r(87363);/* ESM import */var d=/*#__PURE__*/r.n(c);/* ESM import */var f=r(2613);function p(){var e=(0,n._)(["\n        width: 26px;\n        height: 16px;\n      "]);p=function t(){return e};return e}function h(){var e=(0,n._)(["\n          top: 2px;\n          left: 3px;\n          width: 12px;\n          height: 12px;\n        "]);h=function t(){return e};return e}function v(){var e=(0,n._)(["\n            left: 11px;\n          "]);v=function t(){return e};return e}function m(){var e=(0,n._)(["\n      right: 3px;\n    "]);m=function t(){return e};return e}function g(){var e=(0,n._)(["\n      left: 3px;\n    "]);g=function t(){return e};return e}var b={switchStyles:e=>/*#__PURE__*/(0,l/* .css */.iv)("&[data-input]{all:unset;appearance:none;border:0;width:40px;height:24px;background:",a/* .colorTokens.color.black["10"] */.Jv.color.black["10"],";border-radius:12px;position:relative;display:inline-block;vertical-align:middle;cursor:pointer;transition:background-color 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,l/* .css */.iv)(p()),"      &::before{display:none !important;}&:focus{border:none;outline:none;box-shadow:none;}&:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}&:after{content:'';position:absolute;top:3px;left:",a/* .spacing["4"] */.W0["4"],";width:18px;height:18px;background:",a/* .colorTokens.background.white */.Jv.background.white,";border-radius:",a/* .borderRadius.circle */.E0.circle,";box-shadow:",a/* .shadow["switch"] */.AF["switch"],";transition:left 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,l/* .css */.iv)(h()),"}&:checked{background:",a/* .colorTokens.primary.main */.Jv.primary.main,";&:after{left:18px;",e==="small"&&(0,l/* .css */.iv)(v()),"}}&:disabled{pointer-events:none;filter:none;opacity:0.5;}}"),labelStyles:e=>/*#__PURE__*/(0,l/* .css */.iv)(o/* .typography.caption */.c.caption(),";color:",e?a/* .colorTokens.text.title */.Jv.text.title:a/* .colorTokens.text.subdued */.Jv.text.subdued,";"),wrapperStyle:e=>/*#__PURE__*/(0,l/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;width:fit-content;flex-direction:",e==="left"?"row":"row-reverse",";column-gap:",a/* .spacing["12"] */.W0["12"],";position:relative;"),spinner:e=>/*#__PURE__*/(0,l/* .css */.iv)("display:flex;position:absolute;top:50%;transform:translateY(-50%);",e&&(0,l/* .css */.iv)(m())," ",!e&&(0,l/* .css */.iv)(g()))};var y=/*#__PURE__*/d().forwardRef((e,t)=>{var{id:r=(0,u/* .nanoid */.x0)(),name:n,label:a,value:o,checked:l,disabled:c,loading:d,onChange:p,labelPosition:h="left",labelCss:v,size:m="regular"}=e;var g=e=>{p===null||p===void 0?void 0:p(e.target.checked,e)};return/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:b.wrapperStyle(h),children:[a&&/*#__PURE__*/(0,i/* .jsx */.tZ)("label",{css:[b.labelStyles(l||false),v],htmlFor:r,children:a}),/*#__PURE__*/(0,i/* .jsx */.tZ)("input",{ref:t,value:o?String(o):undefined,type:"checkbox",name:n,id:r,checked:!!l,disabled:c,css:b.switchStyles(m),onChange:g,"data-input":true}),/*#__PURE__*/(0,i/* .jsx */.tZ)(s/* ["default"] */.Z,{when:d,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("span",{css:b.spinner(!!l),children:/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.ZP,{size:m==="small"?12:20})})})]})});/* ESM default export */const _=y},13985:function(e,t,r){"use strict";r.d(t,{Z:()=>M,p:()=>R});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(58865);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(6154);/* ESM import */var l=r(87363);/* ESM import */var c=/*#__PURE__*/r.n(l);/* ESM import */var d=r(60860);/* ESM import */var f=r(76487);/* ESM import */var p=r(54354);/* ESM import */var h=r(22456);/* ESM import */var v=r(34403);/* ESM import */var m=r(19398);/* ESM import */var g=r(26815);function b(){var e=(0,a._)(["\n      left: ",";\n      top: calc("," + 60px);\n    "]);b=function t(){return e};return e}function y(){var e=(0,a._)(["\n      right: ",";\n      top: calc("," + 60px);\n    "]);y=function t(){return e};return e}function _(){var e=(0,a._)(["\n      left: 50%;\n      top: calc("," + 60px);\n      transform: translateX(-50%);\n    "]);_=function t(){return e};return e}function w(){var e=(0,a._)(["\n      left: ",";\n      bottom: ",";\n    "]);w=function t(){return e};return e}function x(){var e=(0,a._)(["\n      right: ",";\n      bottom: ",";\n    "]);x=function t(){return e};return e}function E(){var e=(0,a._)(["\n      left: 50%;\n      bottom: ",";\n      transform: translateX(-50%);\n    "]);E=function t(){return e};return e}function Z(){var e=(0,a._)(["\n      background: ",";\n    "]);Z=function t(){return e};return e}function S(){var e=(0,a._)(["\n      background: ",";\n    "]);S=function t(){return e};return e}function O(){var e=(0,a._)(["\n      background: ",";\n    "]);O=function t(){return e};return e}function k(){var e=(0,a._)(["\n      background: ",";\n\n      h5 {\n        color: ",";\n      }\n\n      svg > path {\n        color: ",";\n      }\n    "]);k=function t(){return e};return e}var T={type:"dark",message:"",autoCloseDelay:3e3,position:"bottom-right"};var C=/*#__PURE__*/c().createContext({showToast:()=>{}});var R=()=>(0,l.useContext)(C);var A=e=>{var{children:t,position:r="bottom-right"}=e;var[a,s]=(0,l.useState)([]);var c=(0,u/* .useTransition */.Yz)(a,{from:{opacity:0,y:-40},enter:{opacity:1,y:0},leave:{opacity:.5,y:100},config:{duration:300}});var d=(0,l.useCallback)(e=>{var t=(0,i._)((0,n._)({},T,e),{id:(0,v/* .nanoid */.x0)()});s(e=>[t,...e]);var r;if(!(0,h/* .isBoolean */.jn)(t.autoCloseDelay)&&t.autoCloseDelay){r=setTimeout(()=>{s(e=>e.slice(0,-1))},t.autoCloseDelay)}return()=>{clearTimeout(r)}},[]);return/*#__PURE__*/(0,o/* .jsxs */.BX)(C.Provider,{value:{showToast:d},children:[t,/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:P.toastWrapper(r),children:c((e,t)=>{return/*#__PURE__*/(0,o/* .jsxs */.BX)(p/* .AnimatedDiv */.XJ,{"data-cy":"tutor-toast",style:e,css:P.toastItem(t.type),children:[/*#__PURE__*/(0,o/* .jsx */.tZ)("h5",{css:P.message,children:t.message}),/*#__PURE__*/(0,o/* .jsx */.tZ)(m/* ["default"] */.Z,{variant:"text",onClick:()=>{s(e=>e.filter(e=>e.id!==t.id))},children:/*#__PURE__*/(0,o/* .jsx */.tZ)(g/* ["default"] */.Z,{name:"timesAlt",width:16,height:16})})]},t.id)})})]})};/* ESM default export */const M=A;var P={toastWrapper:e=>/*#__PURE__*/(0,s/* .css */.iv)("display:flex;flex-direction:column;gap:",d/* .spacing["16"] */.W0["16"],";max-width:400px;position:fixed;z-index:",d/* .zIndex.highest */.W5.highest,";",e==="top-left"&&(0,s/* .css */.iv)(b(),d/* .spacing["20"] */.W0["20"],d/* .spacing["20"] */.W0["20"])," ",e==="top-right"&&(0,s/* .css */.iv)(y(),d/* .spacing["20"] */.W0["20"],d/* .spacing["20"] */.W0["20"])," ",e==="top-center"&&(0,s/* .css */.iv)(_(),d/* .spacing["20"] */.W0["20"])," ",e==="bottom-left"&&(0,s/* .css */.iv)(w(),d/* .spacing["20"] */.W0["20"],d/* .spacing["20"] */.W0["20"])," ",e==="bottom-right"&&(0,s/* .css */.iv)(x(),d/* .spacing["20"] */.W0["20"],d/* .spacing["20"] */.W0["20"])," ",e==="bottom-center"&&(0,s/* .css */.iv)(E(),d/* .spacing["20"] */.W0["20"])),toastItem:e=>/*#__PURE__*/(0,s/* .css */.iv)("width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:",d/* .spacing["16"] */.W0["16"],";border-radius:",d/* .borderRadius["6"] */.E0["6"],";padding:",d/* .spacing["16"] */.W0["16"],";svg > path{color:",d/* .colorTokens.icon.white */.Jv.icon.white,";}",e==="dark"&&(0,s/* .css */.iv)(Z(),d/* .colorTokens.color.black.main */.Jv.color.black.main)," ",e==="danger"&&(0,s/* .css */.iv)(S(),d/* .colorTokens.design.error */.Jv.design.error)," ",e==="success"&&(0,s/* .css */.iv)(O(),d/* .colorTokens.design.success */.Jv.design.success)," ",e==="warning"&&(0,s/* .css */.iv)(k(),d/* .colorTokens.color.warning["70"] */.Jv.color.warning["70"],d/* .colorTokens.text.primary */.Jv.text.primary,d/* .colorTokens.text.primary */.Jv.text.primary)),message:/*#__PURE__*/(0,s/* .css */.iv)(f/* .typography.body */.c.body(),";color:",d/* .colorTokens.text.white */.Jv.text.white,";"),timesIcon:/*#__PURE__*/(0,s/* .css */.iv)("path{color:",d/* .colorTokens.icon.white */.Jv.icon.white,";}")}},58982:function(e,t,r){"use strict";r.d(t,{Z:()=>b});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(58865);/* ESM import */var o=r(35944);/* ESM import */var s=r(60860);/* ESM import */var u=r(54354);/* ESM import */var l=r(70917);/* ESM import */var c=r(6154);/* ESM import */var d=r(26602);function f(){var e=(0,a._)(["\n        bottom: auto;\n        left: -4px;\n        top: 50%;\n        transform: translateY(-50%) rotate(45deg);\n      "]);f=function t(){return e};return e}function p(){var e=(0,a._)(["\n        bottom: auto;\n        top: -4px;\n        left: 50%;\n        transform: translateX(-50%) rotate(45deg);\n      "]);p=function t(){return e};return e}function h(){var e=(0,a._)(["\n        bottom: auto;\n        top: 50%;\n        left: auto;\n        right: -4px;\n        transform: translateY(-50%) rotate(45deg);\n      "]);h=function t(){return e};return e}var v={opacity:0,transform:"scale(0.8)"};var m={tension:300,friction:15};var g=e=>{var{children:t,content:r,allowHTML:a,placement:l="top",hideOnClick:f,delay:p=0,disabled:h=false,visible:g}=e;var[b,_]=(0,c/* .useSpring */.q_)(()=>v);if(h)return t;var w=()=>{_.start({opacity:1,transform:"scale(1)",config:m})};var x=e=>{var{unmount:t}=e;_.start((0,i._)((0,n._)({},v),{onRest:t,config:(0,i._)((0,n._)({},m),{clamp:true})}))};return/*#__PURE__*/(0,o/* .jsx */.tZ)(d/* ["default"] */.ZP,{render:e=>{return/*#__PURE__*/(0,o/* .jsx */.tZ)(u/* .AnimatedDiv */.XJ,(0,i._)((0,n._)({style:b,hideOnOverflow:false},e),{css:y.contentBox(l),children:r}))},animation:true,onMount:w,onHide:x,allowHTML:a,delay:[p,100],hideOnClick:f,placement:l,visible:g,zIndex:s/* .zIndex.highest */.W5.highest,children:/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{children:t})})};/* ESM default export */const b=g;var y={contentBox:e=>/*#__PURE__*/(0,l/* .css */.iv)("max-width:250px;width:100%;background-color:",s/* .colorTokens.color.black.main */.Jv.color.black.main,";color:",s/* .colorTokens.text.white */.Jv.text.white,";border-radius:",s/* .borderRadius["6"] */.E0["6"],";padding:",s/* .spacing["4"] */.W0["4"]," ",s/* .spacing["8"] */.W0["8"],";font-size:",s/* .fontSize["15"] */.JB["15"],";line-height:",s/* .lineHeight["20"] */.Nv["20"],";position:relative;&::before{content:'';height:8px;width:8px;background-color:",s/* .colorTokens.color.black.main */.Jv.color.black.main,";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%) rotate(45deg);",e==="right"&&(0,l/* .css */.iv)(f())," ",e==="bottom"&&(0,l/* .css */.iv)(p())," ",e==="left"&&(0,l/* .css */.iv)(h()),"}")}},68214:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(35944);var i;if(false){}else{// eslint-disable-next-line @typescript-eslint/no-require-imports
i=r(93963)/* ["default"] */.Z}var a=e=>{var{children:t}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)(i,{children:t})};/* ESM default export */const o=a},93963:function(e,t,r){"use strict";// EXPORTS
r.d(t,{Z:()=>/* binding */g});// EXTERNAL MODULE: ./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(35944);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var i=r(70917);// EXTERNAL MODULE: external "wp.i18n"
var a=r(38003);// EXTERNAL MODULE: external "React"
var o=r(87363);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Button.tsx
var s=r(19398);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/SVGIcon.tsx
var u=r(26815);// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var l=r(34039);// EXTERNAL MODULE: ./assets/react/v3/shared/config/styles.ts
var c=r(60860);// EXTERNAL MODULE: ./assets/react/v3/shared/config/typography.ts
var d=r(76487);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/Show.tsx
var f=r(17106);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var p=r(29535);// CONCATENATED MODULE: ./assets/react/v3/public/images/production-error-2x.webp
const h=r.p+"js/images/production-error-2x-dc6519df.webp";// CONCATENATED MODULE: ./assets/react/v3/public/images/production-error.webp
const v=r.p+"js/images/production-error-24158233.webp";// CONCATENATED MODULE: ./assets/react/v3/shared/components/ErrorBoundaryProd.tsx
class m extends o.Component{static getDerivedStateFromError(){return{hasError:true}}componentDidCatch(e,t){// eslint-disable-next-line no-console
console.error(e,t)}render(){if(this.state.hasError){return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:b.container,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:b.productionErrorWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:b.productionErrorHeader,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{src:v,srcSet:"".concat(h," 2x"),alt:(0,a.__)("Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("h5",{css:d/* .typography.heading5 */.c.heading5("medium"),children:(0,a.__)("Oops! Something went wrong","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:b.instructions,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("p",{children:(0,a.__)("Try the following steps to resolve the issue:","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.BX)("ul",{children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("li",{children:(0,a.__)("Refresh the page.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("li",{children:(0,a.__)("Clear your browser cache.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)(f/* ["default"] */.Z,{when:l/* .tutorConfig.tutor_pro_url */.y.tutor_pro_url,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("li",{children:(0,a.__)("Ensure the Free and Pro plugins are on the same version.","tutor")})})]})]})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:b.productionFooter,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{children:/*#__PURE__*/(0,n/* .jsx */.tZ)(s/* ["default"] */.Z,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(u/* ["default"] */.Z,{name:"refresh",height:24,width:24}),onClick:()=>window.location.reload(),children:(0,a.__)("Reload","tutor")})}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:b.support,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:(0,a.__)("Still having trouble?","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:(0,a.__)("Contact","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("a",{href:l/* ["default"].TUTOR_SUPPORT_PAGE_URL */.Z.TUTOR_SUPPORT_PAGE_URL,children:(0,a.__)("Support","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:(0,a.__)("for assistance.","tutor")})]})]})]})})}return this.props.children}constructor(e){super(e);this.state={hasError:false}}}/* ESM default export */const g=m;var b={container:/*#__PURE__*/(0,i/* .css */.iv)("width:100%;height:auto;display:flex;justify-content:center;align-items:center;"),productionErrorWrapper:/*#__PURE__*/(0,i/* .css */.iv)(p/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",c/* .spacing["20"] */.W0["20"],";max-width:500px;width:100%;"),productionErrorHeader:/*#__PURE__*/(0,i/* .css */.iv)(p/* .styleUtils.display.flex */.i.display.flex("column"),";align-items:center;padding:",c/* .spacing["32"] */.W0["32"],";background:",c/* .colorTokens.background.white */.Jv.background.white,";border-radius:",c/* .borderRadius["12"] */.E0["12"],";box-shadow:0px -4px 0px 0px #ff0000;gap:",c/* .spacing["16"] */.W0["16"],";h5{text-align:center;}img{height:104px;width:101px;object-position:center;object-fit:contain;}"),instructions:/*#__PURE__*/(0,i/* .css */.iv)("width:100%;max-width:333px;p{width:100%;",d/* .typography.caption */.c.caption(),";margin-bottom:",c/* .spacing["4"] */.W0["4"],";}ul{padding-left:",c/* .spacing["16"] */.W0["16"],";li{",d/* .typography.caption */.c.caption(),";color:",c/* .colorTokens.text.title */.Jv.text.title,";list-style:unset;margin-bottom:",c/* .spacing["2"] */.W0["2"],";&::marker{color:",c/* .colorTokens.icon["default"] */.Jv.icon["default"],";}}}"),productionFooter:/*#__PURE__*/(0,i/* .css */.iv)(p/* .styleUtils.display.flex */.i.display.flex("column"),";align-items:center;gap:",c/* .spacing["12"] */.W0["12"],";"),support:/*#__PURE__*/(0,i/* .css */.iv)(p/* .styleUtils.flexCenter */.i.flexCenter("row"),";text-align:center;flex-wrap:wrap;gap:",c/* .spacing["4"] */.W0["4"],";",d/* .typography.caption */.c.caption(),";color:",c/* .colorTokens.text.title */.Jv.text.title,";a{color:",c/* .colorTokens.text.brand */.Jv.text.brand,";text-decoration:none;}")}},62067:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=e=>{var{children:t,blurPrevious:r=false}=e;var i=(0,n.useRef)(null);var a=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e=i.current;if(!e){return}a.current=document.activeElement;if(r&&a.current&&a.current!==document.body){a.current.blur()}var t=e=>{if(!e||!e.isConnected){return false}var t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"&&!e.hidden&&e.offsetParent!==null};var n=()=>{var r='a[href], button, textarea, input, select, [tabindex]:not([tabindex="-1"])';return Array.from(e.querySelectorAll(r)).filter(e=>{return!e.hasAttribute("disabled")&&t(e)})};var o=()=>{var t=document.querySelectorAll('[data-focus-trap="true"]');return t.length>0&&t[t.length-1]===e};var s=t=>{if(!o()||t.key!=="Tab"){return}var r=n();if(r.length===0){return}var i=r[0];var a=r[r.length-1];var s=document.activeElement;if(!e.contains(s)&&document.body!==s){t.preventDefault();i.focus();return}if(t.shiftKey&&s===i){t.preventDefault();a.focus();return}if(!t.shiftKey&&s===a){t.preventDefault();i.focus();return}};document.addEventListener("keydown",s,true);return()=>{document.removeEventListener("keydown",s,true);if(a.current&&t(a.current)){a.current.focus()}};// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,n.cloneElement)(n.Children.only(t),{ref:i,"data-focus-trap":"true",tabIndex:-1})};/* ESM default export */const o=a},84978:function(e,t,r){"use strict";r.d(t,{Z:()=>M});/* ESM import */var n=r(58865);/* ESM import */var i=r(35944);/* ESM import */var a=r(70917);/* ESM import */var o=r(38003);/* ESM import */var s=/*#__PURE__*/r.n(o);/* ESM import */var u=r(2613);/* ESM import */var l=r(26815);/* ESM import */var c=r(58982);/* ESM import */var d=r(60860);/* ESM import */var f=r(76487);/* ESM import */var p=r(17106);/* ESM import */var h=r(29535);/* ESM import */var v=r(22456);/* ESM import */var m=r(34403);function g(){var e=(0,n._)(["\n      opacity: 0.5;\n    "]);g=function t(){return e};return e}function b(){var e=(0,n._)(["\n      display: none;\n    "]);b=function t(){return e};return e}function y(){var e=(0,n._)(["\n      flex-direction: row;\n      align-items: center;\n      justify-content: space-between;\n      gap: ",";\n    "]);y=function t(){return e};return e}function _(){var e=(0,n._)(["\n        padding: 0 "," 0 ",";\n      "]);_=function t(){return e};return e}function w(){var e=(0,n._)(["\n        border-radius: 0;\n        border: none;\n        box-shadow: none;\n      "]);w=function t(){return e};return e}function x(){var e=(0,n._)(["\n        border-color: transparent;\n      "]);x=function t(){return e};return e}function E(){var e=(0,n._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);E=function t(){return e};return e}function Z(){var e=(0,n._)(["\n          border-color: ",";\n        "]);Z=function t(){return e};return e}function S(){var e=(0,n._)(["\n          color: ",";\n        "]);S=function t(){return e};return e}function O(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);O=function t(){return e};return e}function k(){var e=(0,n._)(["\n        border-color: ",";\n        background-color: ",";\n      "]);k=function t(){return e};return e}function T(){var e=(0,n._)(["\n      justify-content: end;\n    "]);T=function t(){return e};return e}function C(){var e=(0,n._)(["\n      color: ",";\n    "]);C=function t(){return e};return e}function R(){var e=(0,n._)(["\n      ",";\n    "]);R=function t(){return e};return e}var A=e=>{var{field:t,fieldState:r,children:n,disabled:a=false,readOnly:s=false,label:f,isInlineLabel:h=false,variant:g,loading:b,placeholder:y,helpText:_,isHidden:w=false,removeBorder:x=false,characterCount:E,isSecondary:Z=false,inputStyle:S,onClickAiButton:O,isMagicAi:k=false,generateWithAi:T=false,replaceEntireLabel:C=false}=e;var R;var A=(0,m/* .nanoid */.x0)();var M=[P.input({variant:g,hasFieldError:!!r.error,removeBorder:x,readOnly:s,hasHelpText:!!_,isSecondary:Z,isMagicAi:k})];if((0,v/* .isDefined */.$K)(S)){M.push(S)}var D=/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:P.inputWrapper,children:[n({id:A,name:t.name,css:M,"aria-invalid":r.error?"true":"false",disabled:a,readOnly:s,placeholder:y,className:"tutor-input-field"}),b&&/*#__PURE__*/(0,i/* .jsx */.tZ)("div",{css:P.loader,children:/*#__PURE__*/(0,i/* .jsx */.tZ)(u/* ["default"] */.ZP,{size:20,color:d/* .colorTokens.icon["default"] */.Jv.icon["default"]})})]});return/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:P.container({disabled:a,isHidden:w}),"data-cy":"form-field-wrapper",children:[/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:P.inputContainer(h),children:[(f||_)&&/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:P.labelContainer,children:[f&&/*#__PURE__*/(0,i/* .jsxs */.BX)("label",{htmlFor:A,css:P.label(h,C),children:[f,/*#__PURE__*/(0,i/* .jsx */.tZ)(p/* ["default"] */.Z,{when:T,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("button",{type:"button",onClick:()=>{O===null||O===void 0?void 0:O()},css:P.aiButton,children:/*#__PURE__*/(0,i/* .jsx */.tZ)(l/* ["default"] */.Z,{name:"magicAiColorize",width:32,height:32})})})]}),_&&!C&&/*#__PURE__*/(0,i/* .jsx */.tZ)(c/* ["default"] */.Z,{content:_,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,i/* .jsx */.tZ)(l/* ["default"] */.Z,{name:"info",width:20,height:20})})]}),E?/*#__PURE__*/(0,i/* .jsx */.tZ)(c/* ["default"] */.Z,{placement:"right",hideOnClick:false,content:E.maxLimit-E.inputCharacter>=0?E.maxLimit-E.inputCharacter:(0,o.__)("Limit exceeded","tutor"),children:D}):D]}),((R=r.error)===null||R===void 0?void 0:R.message)&&/*#__PURE__*/(0,i/* .jsxs */.BX)("p",{css:P.errorLabel(!!r.error,h),children:[/*#__PURE__*/(0,i/* .jsx */.tZ)(l/* ["default"] */.Z,{style:P.alertIcon,name:"info",width:20,height:20})," ",r.error.message]})]})};/* ESM default export */const M=A;var P={container:e=>{var{disabled:t,isHidden:r}=e;return/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:column;position:relative;background:inherit;width:100%;",t&&(0,a/* .css */.iv)(g())," ",r&&(0,a/* .css */.iv)(b()))},inputContainer:e=>/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:column;gap:",d/* .spacing["4"] */.W0["4"],";width:100%;",e&&(0,a/* .css */.iv)(y(),d/* .spacing["12"] */.W0["12"])),input:e=>/*#__PURE__*/(0,a/* .css */.iv)("&.tutor-input-field{",f/* .typography.body */.c.body("regular"),";width:100%;border-radius:",d/* .borderRadius["6"] */.E0["6"],";border:1px solid ",d/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";padding:",d/* .spacing["8"] */.W0["8"]," ",d/* .spacing["16"] */.W0["16"],";color:",d/* .colorTokens.text.title */.Jv.text.title,";appearance:textfield;&:not(textarea){height:40px;}",e.hasHelpText&&(0,a/* .css */.iv)(_(),d/* .spacing["32"] */.W0["32"],d/* .spacing["12"] */.W0["12"])," ",e.removeBorder&&(0,a/* .css */.iv)(w())," ",e.isSecondary&&(0,a/* .css */.iv)(x()),":focus{",h/* .styleUtils.inputFocus */.i.inputFocus,";",e.isMagicAi&&(0,a/* .css */.iv)(E(),d/* .colorTokens.stroke.magicAi */.Jv.stroke.magicAi,d/* .colorTokens.background.magicAi["8"] */.Jv.background.magicAi["8"])," ",e.hasFieldError&&(0,a/* .css */.iv)(Z(),d/* .colorTokens.stroke.danger */.Jv.stroke.danger),"}::-webkit-outer-spin-button,::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{",f/* .typography.caption */.c.caption("regular"),";color:",d/* .colorTokens.text.hints */.Jv.text.hints,";",e.isSecondary&&(0,a/* .css */.iv)(S(),d/* .colorTokens.text.hints */.Jv.text.hints),"}",e.hasFieldError&&(0,a/* .css */.iv)(O(),d/* .colorTokens.stroke.danger */.Jv.stroke.danger,d/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail)," ",e.readOnly&&(0,a/* .css */.iv)(k(),d/* .colorTokens.background.disable */.Jv.background.disable,d/* .colorTokens.background.disable */.Jv.background.disable),"}"),errorLabel:(e,t)=>/*#__PURE__*/(0,a/* .css */.iv)(f/* .typography.small */.c.small(),";line-height:",d/* .lineHeight["20"] */.Nv["20"],";display:flex;align-items:start;margin-top:",d/* .spacing["4"] */.W0["4"],";",t&&(0,a/* .css */.iv)(T())," ",e&&(0,a/* .css */.iv)(C(),d/* .colorTokens.text.status.onHold */.Jv.text.status.onHold),"    & svg{margin-right:",d/* .spacing["2"] */.W0["2"],";transform:rotate(180deg);}"),labelContainer:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;align-items:center;gap:",d/* .spacing["4"] */.W0["4"],";> div{display:flex;color:",d/* .colorTokens.color.black["30"] */.Jv.color.black["30"],";}"),label:(e,t)=>/*#__PURE__*/(0,a/* .css */.iv)(f/* .typography.caption */.c.caption(),";margin:0px;width:",t?"100%":"auto",";color:",d/* .colorTokens.text.title */.Jv.text.title,";display:flex;align-items:center;gap:",d/* .spacing["4"] */.W0["4"],";",e&&(0,a/* .css */.iv)(R(),f/* .typography.caption */.c.caption())),aiButton:/*#__PURE__*/(0,a/* .css */.iv)(h/* .styleUtils.resetButton */.i.resetButton,";width:32px;height:32px;border-radius:",d/* .borderRadius["4"] */.E0["4"],";display:flex;align-items:center;justify-content:center;:disabled{cursor:not-allowed;}&:focus,&:active,&:hover{background:none;}&:focus-visible{outline:2px solid ",d/* .colorTokens.stroke.brand */.Jv.stroke.brand,";}"),inputWrapper:/*#__PURE__*/(0,a/* .css */.iv)("position:relative;"),loader:/*#__PURE__*/(0,a/* .css */.iv)("position:absolute;top:50%;right:",d/* .spacing["12"] */.W0["12"],";transform:translateY(-50%);display:flex;"),alertIcon:/*#__PURE__*/(0,a/* .css */.iv)("flex-shrink:0;")}},78150:function(e,t,r){"use strict";r.d(t,{Z:()=>P});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(58865);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(38003);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(87363);/* ESM import */var d=/*#__PURE__*/r.n(c);/* ESM import */var f=r(19398);/* ESM import */var p=r(26815);/* ESM import */var h=r(84978);/* ESM import */var v=r(54273);/* ESM import */var m=r(63260);/* ESM import */var g=r(31342);/* ESM import */var b=r(99678);/* ESM import */var y=r(34039);/* ESM import */var _=r(60860);/* ESM import */var w=r(17106);/* ESM import */var x=r(52357);/* ESM import */var E=r(22456);/* ESM import */var Z=r(34403);/* ESM import */var S=r(14578);/* ESM import */var O=r(43567);/* ESM import */var k=r(29535);function T(){var e=(0,a._)(["\n      svg {\n        color: ",";\n      }\n    "]);T=function t(){return e};return e}var C;var R=!!y/* .tutorConfig.tutor_pro_url */.y.tutor_pro_url;var A=(C=y/* .tutorConfig.settings */.y.settings)===null||C===void 0?void 0:C.chatgpt_key_exist;var M=e=>{var{label:t,type:r="text",maxLimit:a,field:s,fieldState:l,disabled:d,readOnly:y,loading:_,placeholder:x,helpText:T,onChange:C,onKeyDown:M,isHidden:P,isClearable:I=false,isSecondary:L=false,removeBorder:F,dataAttribute:N,isInlineLabel:j=false,isPassword:B=false,style:U,selectOnFocus:W=false,autoFocus:z=false,generateWithAi:J=false,isMagicAi:q=false,allowNegative:H=false,onClickAiButton:V}=e;var[$,G]=(0,c.useState)(r);var{showModal:X}=(0,m/* .useModal */.d)();var K=(0,c.useRef)(null);var Q;var Y=(Q=s.value)!==null&&Q!==void 0?Q:"";var ee=undefined;if($==="number"){Y=(0,Z/* .parseNumberOnly */.jv)("".concat(Y),H).replace(/(\..*)\./g,"$1")}if(a){ee={maxLimit:a,inputCharacter:Y.toString().length}}var et=(0,n._)({},(0,E/* .isDefined */.$K)(N)&&{[N]:true});var er=()=>{if(!R){X({component:g/* ["default"] */.Z,props:{image:O,image2x:S}})}else if(!A){X({component:b/* ["default"] */.Z,props:{image:O,image2x:S}})}else{X({component:v/* ["default"] */.Z,isMagicAi:true,props:{title:(0,u.__)("AI Studio","tutor"),icon:/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{name:"magicAiColorize",width:24,height:24}),characters:120,field:s,fieldState:l,format:"title",is_html:false,fieldLabel:(0,u.__)("Create a Compelling Title","tutor"),fieldPlaceholder:(0,u.__)("Describe the main focus of your course in a few words","tutor")}});V===null||V===void 0?void 0:V()}};return/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{label:t,field:s,fieldState:l,disabled:d,readOnly:y,loading:_,placeholder:x,helpText:T,isHidden:P,characterCount:ee,isSecondary:L,removeBorder:F,isInlineLabel:j,inputStyle:U,generateWithAi:J,onClickAiButton:er,isMagicAi:q,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.tZ)(o/* .Fragment */.HY,{children:/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:D.container(I||B),children:[/*#__PURE__*/(0,o/* .jsx */.tZ)("input",(0,i._)((0,n._)({},s,e,et),{type:$==="number"?"text":$,value:Y,autoFocus:z,onChange:e=>{var{value:t}=e.target;var r=$==="number"?(0,Z/* .parseNumberOnly */.jv)(t):t;s.onChange(r);if(C){C(r)}},onClick:e=>{e.stopPropagation()},onKeyDown:e=>{e.stopPropagation();M===null||M===void 0?void 0:M(e.key)},autoComplete:"off",ref:e=>{s.ref(e);// @ts-ignore
K.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!W||!K.current){return}K.current.select()}})),/*#__PURE__*/(0,o/* .jsx */.tZ)(w/* ["default"] */.Z,{when:B,children:/*#__PURE__*/(0,o/* .jsx */.tZ)(f/* ["default"] */.Z,{isIconOnly:true,variant:"text",size:"small",onClick:()=>G(e=>e==="password"?"text":"password"),icon:/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{name:"eye",width:24,height:24}),"aria-label":(0,u.__)("Show/Hide Password","tutor"),buttonCss:D.eyeButton({type:$})})}),/*#__PURE__*/(0,o/* .jsx */.tZ)(w/* ["default"] */.Z,{when:I&&!!s.value&&$!=="password",children:/*#__PURE__*/(0,o/* .jsx */.tZ)(f/* ["default"] */.Z,{isIconOnly:true,variant:"text",size:"small",onClick:()=>s.onChange(""),buttonCss:k/* .styleUtils.inputClearButton */.i.inputClearButton,icon:/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{name:"cross",width:24,height:24}),"aria-label":(0,u.__)("Clear","tutor")})})]})})}})};/* ESM default export */const P=(0,x/* .withVisibilityControl */.v)(M);var D={container:e=>/*#__PURE__*/(0,s/* .css */.iv)("position:relative;display:flex;input{&.tutor-input-field{",e&&"padding-right: ".concat(_/* .spacing["36"] */.W0["36"],";"),";}}"),eyeButton:e=>{var{type:t}=e;return/*#__PURE__*/(0,s/* .css */.iv)(k/* .styleUtils.inputClearButton */.i.inputClearButton,";",t!=="password"&&(0,s/* .css */.iv)(T(),_/* .colorTokens.icon.brand */.Jv.icon.brand))}}},82325:function(e,t,r){"use strict";r.d(t,{Z:()=>j});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(98848);/* ESM import */var o=r(58865);/* ESM import */var s=r(35944);/* ESM import */var u=r(70917);/* ESM import */var l=r(38003);/* ESM import */var c=/*#__PURE__*/r.n(l);/* ESM import */var d=r(87363);/* ESM import */var f=/*#__PURE__*/r.n(d);/* ESM import */var p=r(19398);/* ESM import */var h=r(26815);/* ESM import */var v=r(97669);/* ESM import */var m=r(60860);/* ESM import */var g=r(76487);/* ESM import */var b=r(17106);/* ESM import */var y=r(54354);/* ESM import */var _=r(30633);/* ESM import */var w=r(29535);/* ESM import */var x=r(22456);/* ESM import */var E=r(34403);/* ESM import */var Z=r(84978);function S(){var e=(0,o._)(["\n      &::before {\n        content: '';\n        position: absolute;\n        inset: 0;\n        background: ",";\n        color: ",";\n        border: 1px solid transparent;\n        -webkit-mask:\n          linear-gradient(#fff 0 0) padding-box,\n          linear-gradient(#fff 0 0);\n        -webkit-mask-composite: xor;\n        mask-composite: exclude;\n        border-radius: 6px;\n      }\n    "]);S=function t(){return e};return e}function O(){var e=(0,o._)(["\n        padding-left: ",";\n      "]);O=function t(){return e};return e}function k(){var e=(0,o._)(["\n        &.tutor-input-field {\n          height: 56px;\n          padding-bottom: ",";\n        }\n      "]);k=function t(){return e};return e}function T(){var e=(0,o._)(["\n        background-color: ",";\n      "]);T=function t(){return e};return e}function C(){var e=(0,o._)(["\n        position: relative;\n        border: none;\n        background: transparent;\n      "]);C=function t(){return e};return e}function R(){var e=(0,o._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);R=function t(){return e};return e}function A(){var e=(0,o._)(["\n          border-color: ",";\n          background-color: ",";\n        "]);A=function t(){return e};return e}function M(){var e=(0,o._)(["\n      padding-left: calc("," + 1px);\n    "]);M=function t(){return e};return e}function P(){var e=(0,o._)(["\n        color: ",";\n\n        &:hover {\n          text-decoration: underline;\n        }\n      "]);P=function t(){return e};return e}function D(){var e=(0,o._)(["\n      min-width: 200px;\n    "]);D=function t(){return e};return e}function I(){var e=(0,o._)(["\n      background-color: ",";\n    "]);I=function t(){return e};return e}function L(){var e=(0,o._)(["\n      background-color: ",";\n      position: relative;\n\n      &::before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 3px;\n        height: 100%;\n        background-color: ",";\n        border-radius: 0 "," "," 0;\n      }\n    "]);L=function t(){return e};return e}function F(){var e=(0,o._)(["\n      transform: rotate(180deg);\n    "]);F=function t(){return e};return e}var N=e=>{var{options:t,field:r,fieldState:o,onChange:u=E/* .noop */.ZT,label:c,placeholder:f="",disabled:m,readOnly:g,loading:w,isSearchable:S=false,isInlineLabel:O,hideCaret:k,listLabel:T,isClearable:C=false,helpText:R,removeOptionsMinWidth:A=false,leftIcon:M,removeBorder:P,dataAttribute:D,isSecondary:I=false,isMagicAi:L=false,isAiOutline:F=false,selectOnFocus:N,optionItemCss:j}=e;var U;var W=(0,d.useCallback)(()=>t.find(e=>e.value===r.value)||{label:"",value:"",description:""},[r.value,t]);var z=(0,d.useMemo)(()=>t.some(e=>(0,x/* .isDefined */.$K)(e.description)),[t]);var[J,q]=(0,d.useState)((U=W())===null||U===void 0?void 0:U.label);var[H,V]=(0,d.useState)(false);var[$,G]=(0,d.useState)("");var[X,K]=(0,d.useState)(false);var Q=(0,d.useRef)(null);var Y=(0,d.useRef)(null);var ee=(0,d.useRef)(null);var et=(0,d.useRef)(null);var er=(0,d.useMemo)(()=>{if(S){return t.filter(e=>{var{label:t}=e;return t.toLowerCase().includes($.toLowerCase())})}return t},[$,S,t]);var en=(0,d.useMemo)(()=>{return t.find(e=>e.value===r.value)},[r.value,t]);var ei=(0,n._)({},(0,x/* .isDefined */.$K)(D)&&{[D]:true});(0,d.useEffect)(()=>{var e;q((e=W())===null||e===void 0?void 0:e.label)},[r.value,W]);(0,d.useEffect)(()=>{if(X){var e;q((e=W())===null||e===void 0?void 0:e.label)}},[W,X]);var ea=(e,t)=>{t===null||t===void 0?void 0:t.stopPropagation();if(!e.disabled){r.onChange(e.value);u(e);G("");V(false);K(false)}};var{activeIndex:eo,setActiveIndex:es}=(0,_/* .useSelectKeyboardNavigation */.U)({options:er,isOpen:X,selectedValue:r.value,onSelect:ea,onClose:()=>{K(false);V(false);G("")}});(0,d.useEffect)(()=>{if(X&&eo>=0&&et.current){et.current.scrollIntoView({block:"nearest",behavior:"smooth"})}},[X,eo]);return/*#__PURE__*/(0,s/* .jsx */.tZ)(Z/* ["default"] */.Z,{fieldState:o,field:r,label:c,disabled:m||t.length===0,readOnly:g,loading:w,isInlineLabel:O,helpText:R,removeBorder:P,isSecondary:I,isMagicAi:L,children:e=>{var u,c;var{css:d}=e,_=(0,a._)(e,["css"]);return/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:B.mainWrapper,children:[/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:B.inputWrapper(F),ref:Y,children:[/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:B.leftIcon,children:[/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{when:M,children:M}),/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{when:en===null||en===void 0?void 0:en.icon,children:e=>/*#__PURE__*/(0,s/* .jsx */.tZ)(h/* ["default"] */.Z,{name:e,width:32,height:32})})]}),/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:{width:"100%"},children:[/*#__PURE__*/(0,s/* .jsx */.tZ)("input",(0,i._)((0,n._)({},_,ei),{ref:e=>{r.ref(e);// @ts-ignore
Q.current=e;// this is not ideal but it is the only way to set ref to the input element
},className:"tutor-input-field",css:[d,B.input({hasLeftIcon:!!M||!!(en===null||en===void 0?void 0:en.icon),hasDescription:z,hasError:!!o.error,isMagicAi:L,isAiOutline:F})],autoComplete:"off",readOnly:g||!S,placeholder:f,value:H?$:J,title:J,onClick:e=>{var t;e.stopPropagation();K(e=>!e);(t=Q.current)===null||t===void 0?void 0:t.focus()},onKeyDown:e=>{if(e.key==="Enter"){var t;e.preventDefault();K(e=>!e);(t=Q.current)===null||t===void 0?void 0:t.focus()}if(e.key==="Tab"){K(false)}},onFocus:N&&S?e=>{e.target.select()}:undefined,onChange:e=>{q(e.target.value);if(S){V(true);G(e.target.value)}},"data-select":true})),/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{when:z,children:/*#__PURE__*/(0,s/* .jsx */.tZ)("span",{css:B.description({hasLeftIcon:!!M}),title:(u=W())===null||u===void 0?void 0:u.description,children:(c=W())===null||c===void 0?void 0:c.description})})]}),!k&&!w&&/*#__PURE__*/(0,s/* .jsx */.tZ)("button",{tabIndex:-1,type:"button",css:B.caretButton({isOpen:X}),onClick:()=>{var e;K(e=>!e);(e=Q.current)===null||e===void 0?void 0:e.focus()},disabled:m||g||t.length===0,children:/*#__PURE__*/(0,s/* .jsx */.tZ)(h/* ["default"] */.Z,{name:"chevronDown",width:20,height:20})})]}),/*#__PURE__*/(0,s/* .jsx */.tZ)(v/* ["default"] */.Z,{triggerRef:Y,isOpen:X,dependencies:[er.length],animationType:y/* .AnimationType.slideDown */.ru.slideDown,closePopover:()=>{K(false);V(false);G("")},children:/*#__PURE__*/(0,s/* .jsxs */.BX)("ul",{css:[B.options(A)],children:[!!T&&/*#__PURE__*/(0,s/* .jsx */.tZ)("li",{css:B.listLabel,children:T}),/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{when:er.length>0,fallback:/*#__PURE__*/(0,s/* .jsx */.tZ)("li",{css:B.emptyState,children:(0,l.__)("No options available","tutor")}),children:er.map((e,t)=>/*#__PURE__*/(0,s/* .jsx */.tZ)("li",{ref:e.value===r.value?ee:eo===t?et:null,css:[B.optionItem({isSelected:e.value===r.value,isActive:t===eo,isDisabled:!!e.disabled}),j],children:/*#__PURE__*/(0,s/* .jsxs */.BX)("button",{type:"button",css:B.label,onClick:t=>{if(!e.disabled){ea(e,t)}},disabled:e.disabled,title:e.label,onMouseOver:()=>es(t),onMouseLeave:()=>t!==eo&&es(-1),onFocus:()=>es(t),"aria-selected":eo===t,children:[/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{when:e.icon,children:/*#__PURE__*/(0,s/* .jsx */.tZ)(h/* ["default"] */.Z,{name:e.icon,width:32,height:32})}),/*#__PURE__*/(0,s/* .jsx */.tZ)("span",{children:e.label})]})},String(e.value)))}),C&&/*#__PURE__*/(0,s/* .jsx */.tZ)("div",{css:B.clearButton({isDisabled:J===""}),children:/*#__PURE__*/(0,s/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",disabled:J==="",icon:/*#__PURE__*/(0,s/* .jsx */.tZ)(h/* ["default"] */.Z,{name:"delete"}),onClick:()=>{r.onChange(null);q("");G("");K(false)},children:(0,l.__)("Clear","tutor")})})]})})]})}})};/* ESM default export */const j=N;var B={mainWrapper:/*#__PURE__*/(0,u/* .css */.iv)("width:100%;"),inputWrapper:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,u/* .css */.iv)("width:100%;display:flex;justify-content:space-between;align-items:center;position:relative;",e&&(0,u/* .css */.iv)(S(),m/* .colorTokens.ai.gradient_1 */.Jv.ai.gradient_1,m/* .colorTokens.text.primary */.Jv.text.primary))},leftIcon:/*#__PURE__*/(0,u/* .css */.iv)("position:absolute;left:",m/* .spacing["8"] */.W0["8"],";",w/* .styleUtils.display.flex */.i.display.flex(),";align-items:center;height:100%;color:",m/* .colorTokens.icon["default"] */.Jv.icon["default"],";"),input:e=>{var{hasLeftIcon:t,hasDescription:r,hasError:n=false,isMagicAi:i=false,isAiOutline:a=false}=e;return/*#__PURE__*/(0,u/* .css */.iv)("&[data-select]{",g/* .typography.body */.c.body(),";width:100%;cursor:pointer;padding-right:",m/* .spacing["32"] */.W0["32"],";",w/* .styleUtils.textEllipsis */.i.textEllipsis,";background-color:transparent;background-color:",m/* .colorTokens.background.white */.Jv.background.white,";",t&&(0,u/* .css */.iv)(O(),m/* .spacing["48"] */.W0["48"])," ",r&&(0,u/* .css */.iv)(k(),m/* .spacing["24"] */.W0["24"])," ",n&&(0,u/* .css */.iv)(T(),m/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail)," ",a&&(0,u/* .css */.iv)(C()),":focus{",w/* .styleUtils.inputFocus */.i.inputFocus,";",i&&(0,u/* .css */.iv)(R(),m/* .colorTokens.stroke.magicAi */.Jv.stroke.magicAi,m/* .colorTokens.background.magicAi["8"] */.Jv.background.magicAi["8"])," ",n&&(0,u/* .css */.iv)(A(),m/* .colorTokens.stroke.danger */.Jv.stroke.danger,m/* .colorTokens.background.status.errorFail */.Jv.background.status.errorFail),"}}")},description:e=>{var{hasLeftIcon:t}=e;return/*#__PURE__*/(0,u/* .css */.iv)(g/* .typography.small */.c.small(),";",w/* .styleUtils.text.ellipsis */.i.text.ellipsis(1),"    color:",m/* .colorTokens.text.hints */.Jv.text.hints,";position:absolute;bottom:",m/* .spacing["8"] */.W0["8"],";padding-inline:calc(",m/* .spacing["16"] */.W0["16"]," + 1px) ",m/* .spacing["32"] */.W0["32"],";",t&&(0,u/* .css */.iv)(M(),m/* .spacing["48"] */.W0["48"]))},listLabel:/*#__PURE__*/(0,u/* .css */.iv)(g/* .typography.body */.c.body(),";color:",m/* .colorTokens.text.subdued */.Jv.text.subdued,";min-height:40px;display:flex;align-items:center;padding-left:",m/* .spacing["16"] */.W0["16"],";"),clearButton:e=>{var{isDisabled:t=false}=e;return/*#__PURE__*/(0,u/* .css */.iv)("padding:",m/* .spacing["4"] */.W0["4"]," ",m/* .spacing["8"] */.W0["8"],";border-top:1px solid ",m/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";& > button{padding:0;width:100%;font-size:",m/* .fontSize["12"] */.JB["12"],";> span{justify-content:center;}",!t&&(0,u/* .css */.iv)(P(),m/* .colorTokens.text.title */.Jv.text.title),"}")},options:e=>/*#__PURE__*/(0,u/* .css */.iv)("z-index:",m/* .zIndex.dropdown */.W5.dropdown,";background-color:",m/* .colorTokens.background.white */.Jv.background.white,";list-style-type:none;box-shadow:",m/* .shadow.popover */.AF.popover,";padding:",m/* .spacing["4"] */.W0["4"]," 0;margin:0;max-height:500px;border-radius:",m/* .borderRadius["6"] */.E0["6"],";",w/* .styleUtils.overflowYAuto */.i.overflowYAuto,";scrollbar-gutter:auto;",!e&&(0,u/* .css */.iv)(D())),optionItem:e=>{var{isSelected:t=false,isActive:r=false,isDisabled:n=false}=e;return/*#__PURE__*/(0,u/* .css */.iv)(g/* .typography.body */.c.body(),";min-height:36px;height:100%;width:100%;display:flex;align-items:center;transition:background-color 0.3s ease-in-out;cursor:",n?"not-allowed":"pointer",";opacity:",n?.5:1,";",r&&(0,u/* .css */.iv)(I(),m/* .colorTokens.background.hover */.Jv.background.hover),"    &:hover{background-color:",!n&&m/* .colorTokens.background.hover */.Jv.background.hover,";}",!n&&t&&(0,u/* .css */.iv)(L(),m/* .colorTokens.background.active */.Jv.background.active,m/* .colorTokens.action.primary["default"] */.Jv.action.primary["default"],m/* .borderRadius["6"] */.E0["6"],m/* .borderRadius["6"] */.E0["6"]))},label:/*#__PURE__*/(0,u/* .css */.iv)(w/* .styleUtils.resetButton */.i.resetButton,";",w/* .styleUtils.text.ellipsis */.i.text.ellipsis(1),";color:",m/* .colorTokens.text.title */.Jv.text.title,";width:100%;height:100%;display:flex;align-items:center;gap:",m/* .spacing["8"] */.W0["8"],";margin:0 ",m/* .spacing["12"] */.W0["12"],";padding:",m/* .spacing["6"] */.W0["6"]," 0;text-align:left;line-height:",m/* .lineHeight["24"] */.Nv["24"],";word-break:break-all;cursor:pointer;&:hover,&:focus,&:active{background-color:transparent;color:",m/* .colorTokens.text.title */.Jv.text.title,";}span{flex-shrink:0;",w/* .styleUtils.text.ellipsis */.i.text.ellipsis(1),"      width:100%;}"),arrowUpDown:/*#__PURE__*/(0,u/* .css */.iv)("color:",m/* .colorTokens.icon["default"] */.Jv.icon["default"],";display:flex;justify-content:center;align-items:center;margin-top:",m/* .spacing["2"] */.W0["2"],";"),optionsContainer:/*#__PURE__*/(0,u/* .css */.iv)("position:absolute;overflow:hidden auto;min-width:16px;max-width:calc(100% - 32px);"),caretButton:e=>{var{isOpen:t=false}=e;return/*#__PURE__*/(0,u/* .css */.iv)(w/* .styleUtils.resetButton */.i.resetButton,";position:absolute;right:",m/* .spacing["4"] */.W0["4"],";display:flex;align-items:center;transition:transform 0.3s ease-in-out;color:",m/* .colorTokens.icon["default"] */.Jv.icon["default"],";border-radius:",m/* .borderRadius["4"] */.E0["4"],";padding:",m/* .spacing["6"] */.W0["6"],";height:100%;&:focus,&:active,&:hover{background:none;color:",m/* .colorTokens.icon["default"] */.Jv.icon["default"],";}&:focus-visible{outline:2px solid ",m/* .colorTokens.stroke.brand */.Jv.stroke.brand,";}",t&&(0,u/* .css */.iv)(F()))},emptyState:/*#__PURE__*/(0,u/* .css */.iv)(w/* .styleUtils.flexCenter */.i.flexCenter(),";padding:",m/* .spacing["8"] */.W0["8"],";")}},92386:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(35944);/* ESM import */var o=r(70917);/* ESM import */var s=r(25959);/* ESM import */var u=r(60860);/* ESM import */var l=r(52357);/* ESM import */var c=r(84978);var d=e=>{var{field:t,fieldState:r,label:o,disabled:u,loading:l,labelPosition:d="left",helpText:f,isHidden:h,labelCss:v,onChange:m}=e;return/*#__PURE__*/(0,a/* .jsx */.tZ)(c/* ["default"] */.Z,{label:o,field:t,fieldState:r,loading:l,helpText:f,isHidden:h,isInlineLabel:true,children:e=>{return/*#__PURE__*/(0,a/* .jsx */.tZ)("div",{css:p.wrapper,children:/*#__PURE__*/(0,a/* .jsx */.tZ)(s/* ["default"] */.Z,(0,i._)((0,n._)({},t,e),{disabled:u,checked:t.value,labelCss:v,labelPosition:d,onChange:()=>{t.onChange(!t.value);m===null||m===void 0?void 0:m(!t.value)}}))})}})};/* ESM default export */const f=(0,l/* .withVisibilityControl */.v)(d);var p={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;gap:",u/* .spacing["40"] */.W0["40"],";")}},3473:function(e,t,r){"use strict";r.d(t,{Z:()=>b});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(58865);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(87363);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(60860);/* ESM import */var d=r(76487);/* ESM import */var f=r(52357);/* ESM import */var p=r(29535);/* ESM import */var h=r(84978);function v(){var e=(0,a._)(["\n        resize: vertical;\n      "]);v=function t(){return e};return e}var m=6;var g=e=>{var{label:t,rows:r=m,columns:a,maxLimit:s,field:l,fieldState:c,disabled:d,readOnly:f,loading:p,placeholder:v,helpText:g,onChange:b,onKeyDown:_,isHidden:w,enableResize:x=true,isSecondary:E=false,isMagicAi:Z=false,inputCss:S,maxHeight:O,autoResize:k=false}=e;var T;var C=(T=l.value)!==null&&T!==void 0?T:"";var R=(0,u.useRef)(null);var A=undefined;if(s){A={maxLimit:s,inputCharacter:C.toString().length}}var M=()=>{if(R.current){if(O){R.current.style.maxHeight="".concat(O,"px")}R.current.style.height="auto";R.current.style.height="".concat(R.current.scrollHeight,"px")}};(0,u.useLayoutEffect)(()=>{if(k){M()}// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{label:t,field:l,fieldState:c,disabled:d,readOnly:f,loading:p,placeholder:v,helpText:g,isHidden:w,characterCount:A,isSecondary:E,isMagicAi:Z,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.tZ)(o/* .Fragment */.HY,{children:/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:y.container(x,S),children:/*#__PURE__*/(0,o/* .jsx */.tZ)("textarea",(0,i._)((0,n._)({},l,e),{ref:e=>{l.ref(e);// @ts-ignore
R.current=e;// this is not ideal but it is the only way to set ref to the input element
},style:{maxHeight:O?"".concat(O,"px"):"none"},className:"tutor-input-field",value:C,onChange:e=>{var{value:t}=e.target;if(s&&t.trim().length>s){return}l.onChange(t);if(b){b(t)}if(k){M()}},onKeyDown:e=>{_===null||_===void 0?void 0:_(e.key)},autoComplete:"off",rows:r,cols:a}))})})}})};/* ESM default export */const b=(0,f/* .withVisibilityControl */.v)(g);var y={container:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false,t=arguments.length>1?arguments[1]:void 0;return/*#__PURE__*/(0,s/* .css */.iv)("position:relative;display:flex;textarea{",d/* .typography.body */.c.body(),";height:auto;padding:",c/* .spacing["8"] */.W0["8"]," ",c/* .spacing["12"] */.W0["12"],";resize:none;",p/* .styleUtils.overflowYAuto */.i.overflowYAuto,";&.tutor-input-field{",t,";}",e&&(0,s/* .css */.iv)(v()),"}")}}},41004:function(e,t,r){"use strict";r.d(t,{X:()=>l});/* ESM import */var n=r(35944);/* ESM import */var i=r(60860);/* ESM import */var a=r(76487);/* ESM import */var o=r(36352);/* ESM import */var s=r(29535);/* ESM import */var u=r(70917);var l=e=>{var{options:t,onChange:r}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:c.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(o/* ["default"] */.Z,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.tZ)("button",{type:"button",onClick:()=>r(e.value),css:c.item,children:e.label},t)}})})};var c={wrapper:/*#__PURE__*/(0,u/* .css */.iv)("display:flex;flex-direction:column;padding-block:",i/* .spacing["8"] */.W0["8"],";max-height:400px;overflow-y:auto;"),item:/*#__PURE__*/(0,u/* .css */.iv)(s/* .styleUtils.resetButton */.i.resetButton,";",a/* .typography.caption */.c.caption(),";width:100%;padding:",i/* .spacing["4"] */.W0["4"]," ",i/* .spacing["16"] */.W0["16"],";color:",i/* .colorTokens.text.subdued */.Jv.text.subdued,";display:flex;align-items:center;&:hover{background-color:",i/* .colorTokens.background.hover */.Jv.background.hover,";color:",i/* .colorTokens.text.title */.Jv.text.title,";}")}},29142:function(e,t,r){"use strict";r.d(t,{z:()=>h});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(35944);/* ESM import */var o=r(78150);/* ESM import */var s=r(82325);/* ESM import */var u=r(699);/* ESM import */var l=r(60860);/* ESM import */var c=r(70917);/* ESM import */var d=r(38003);/* ESM import */var f=/*#__PURE__*/r.n(d);/* ESM import */var p=r(52293);var h=e=>{var{form:t}=e;return/*#__PURE__*/(0,a/* .jsxs */.BX)("div",{css:v.wrapper,children:[/*#__PURE__*/(0,a/* .jsx */.tZ)(p/* .Controller */.Qr,{control:t.control,name:"characters",render:e=>/*#__PURE__*/(0,a/* .jsx */.tZ)(o/* ["default"] */.Z,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Character Limit","tutor"),type:"number"}))}),/*#__PURE__*/(0,a/* .jsx */.tZ)(p/* .Controller */.Qr,{control:t.control,name:"language",render:e=>/*#__PURE__*/(0,a/* .jsx */.tZ)(s/* ["default"] */.Z,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Language","tutor"),options:u/* .languageOptions */.V1}))}),/*#__PURE__*/(0,a/* .jsx */.tZ)(p/* .Controller */.Qr,{control:t.control,name:"tone",render:e=>/*#__PURE__*/(0,a/* .jsx */.tZ)(s/* ["default"] */.Z,(0,i._)((0,n._)({},e),{isMagicAi:true,options:u/* .toneOptions */.NZ,label:(0,d.__)("Tone","tutor")}))}),/*#__PURE__*/(0,a/* .jsx */.tZ)(p/* .Controller */.Qr,{control:t.control,name:"format",render:e=>/*#__PURE__*/(0,a/* .jsx */.tZ)(s/* ["default"] */.Z,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Format","tutor"),options:u/* .formatOptions */.Xy}))})]})};var v={wrapper:/*#__PURE__*/(0,c/* .css */.iv)("display:grid;grid-template-columns:repeat(2,1fr);gap:",l/* .spacing["16"] */.W0["16"],";")}},51761:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(35944);/* ESM import */var i=r(97503);/* ESM import */var a=r(60860);/* ESM import */var o=r(70917);var s=()=>{return/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:l.container,children:[/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:l.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"20%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"40%",height:"12px"})]}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:l.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"80%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.tZ)(i/* ["default"] */.Z,{animation:true,isMagicAi:true,width:"80%",height:"12px"})]})]})};/* ESM default export */const u=s;var l={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",a/* .spacing["8"] */.W0["8"],";"),container:/*#__PURE__*/(0,o/* .css */.iv)("display:flex;flex-direction:column;gap:",a/* .spacing["32"] */.W0["32"],";")}},54273:function(e,t,r){"use strict";r.d(t,{Z:()=>D});/* ESM import */var n=r(76150);/* ESM import */var i=r(7409);/* ESM import */var a=r(99282);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(38003);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(87363);/* ESM import */var d=/*#__PURE__*/r.n(c);/* ESM import */var f=r(52293);/* ESM import */var p=r(19398);/* ESM import */var h=r(53052);/* ESM import */var v=r(26815);/* ESM import */var m=r(97669);/* ESM import */var g=r(3473);/* ESM import */var b=r(41004);/* ESM import */var y=r(29142);/* ESM import */var _=r(51761);/* ESM import */var w=r(74053);/* ESM import */var x=r(699);/* ESM import */var E=r(60860);/* ESM import */var Z=r(76487);/* ESM import */var S=r(17106);/* ESM import */var O=r(54354);/* ESM import */var k=r(37861);/* ESM import */var T=r(15287);/* ESM import */var C=r(29535);/* ESM import */var R=r(34403);/* ESM import */var A=r(22128);var M=[(0,u.__)("Mastering Digital Marketing: A Complete Guide","tutor"),(0,u.__)("The Ultimate Photoshop Course for Beginners","tutor"),(0,u.__)("Python Programming: From Zero to Hero","tutor"),(0,u.__)("Creative Writing Essentials: Unlock Your Storytelling Potential","tutor"),(0,u.__)("The Complete Guide to Web Development with React","tutor"),(0,u.__)("Master Public Speaking: Deliver Powerful Presentations","tutor"),(0,u.__)("Excel for Business: From Basics to Advanced Analytics","tutor"),(0,u.__)("Fitness Fundamentals: Build Strength and Confidence","tutor"),(0,u.__)("Photography Made Simple: Capture Stunning Shots","tutor"),(0,u.__)("Financial Freedom: Learn the Basics of Investing","tutor")];var P=e=>{var{title:t,icon:r,closeModal:l,field:d,format:Z="essay",characters:C=250,is_html:P=false,fieldLabel:D="",fieldPlaceholder:L=""}=e;var F=(0,k/* .useFormWithGlobalError */.O)({defaultValues:{prompt:"",characters:C,language:"english",tone:"formal",format:Z}});var N=(0,T/* .useMagicTextGenerationMutation */.px)();var j=(0,T/* .useModifyContentMutation */.e3)();var[B,U]=(0,c.useState)([]);var[W,z]=(0,c.useState)(0);var[J,q]=(0,c.useState)(false);var[H,V]=(0,c.useState)(null);var $=(0,c.useRef)(null);var G=(0,c.useRef)(null);var X=(0,c.useMemo)(()=>{return B[W]},[B,W]);var K=F.watch("prompt");function Q(e){U(t=>[e,...t]);z(0)}function Y(e,t){return(0,n._)(function*(){if(B.length===0){return}var r=B[W];if(e==="translation"&&!!t){var n=yield j.mutateAsync({type:"translation",content:r,language:t,is_html:P});if(n.data){Q(n.data)}return}if(e==="change_tone"&&!!t){var i=yield j.mutateAsync({type:"change_tone",content:r,tone:t,is_html:P});if(i.data){Q(i.data)}return}var a=yield j.mutateAsync({type:e,content:r,is_html:P});if(a.data){Q(a.data)}})()}(0,c.useEffect)(()=>{F.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.tZ)(A/* ["default"] */.Z,{onClose:l,title:t,icon:r,maxWidth:524,children:/*#__PURE__*/(0,o/* .jsxs */.BX)("form",{onSubmit:F.handleSubmit(e=>(0,n._)(function*(){var t=yield N.mutateAsync((0,a._)((0,i._)({},e),{is_html:P}));if(t.data){Q(t.data)}})()),children:[/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:I.container,children:[/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:I.fieldsWrapper,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(f/* .Controller */.Qr,{control:F.control,name:"prompt",render:e=>/*#__PURE__*/(0,o/* .jsx */.tZ)(g/* ["default"] */.Z,(0,a._)((0,i._)({},e),{label:D||(0,u.__)("Craft Your Course Description","tutor"),placeholder:L||(0,u.__)("Provide a brief overview of your course topic, target audience, and key takeaways","tutor"),rows:4,isMagicAi:true}))}),/*#__PURE__*/(0,o/* .jsxs */.BX)("button",{type:"button",css:I.inspireButton,onClick:()=>{var e=M.length;var t=Math.floor(Math.random()*e);F.reset((0,a._)((0,i._)({},F.getValues()),{prompt:M[t]}))},children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"bulbLine"}),(0,u.__)("Inspire Me","tutor")]})]}),/*#__PURE__*/(0,o/* .jsx */.tZ)(S/* ["default"] */.Z,{when:!N.isPending&&!j.isPending,fallback:/*#__PURE__*/(0,o/* .jsx */.tZ)(_/* ["default"] */.Z,{}),children:/*#__PURE__*/(0,o/* .jsxs */.BX)(S/* ["default"] */.Z,{when:B.length>0,fallback:/*#__PURE__*/(0,o/* .jsx */.tZ)(y/* .PromptControls */.z,{form:F}),children:[/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{children:[/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:I.actionBar,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:I.navigation,children:/*#__PURE__*/(0,o/* .jsxs */.BX)(S/* ["default"] */.Z,{when:B.length>1,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",onClick:()=>z(e=>Math.max(0,e-1)),disabled:W===0,children:/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:!w/* .isRTL */.dZ?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:I.pageInfo,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)("span",{children:W+1})," / ",B.length]}),/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",onClick:()=>z(e=>Math.min(B.length-1,e+1)),disabled:W===B.length-1,children:/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:!w/* .isRTL */.dZ?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,o/* .jsx */.tZ)(p/* ["default"] */.Z,{variant:"text",onClick:()=>(0,n._)(function*(){if(B.length===0){return}var e=B[W];yield(0,R/* .copyToClipboard */.vQ)(e);q(true);setTimeout(()=>{q(false)},1500)})(),children:/*#__PURE__*/(0,o/* .jsx */.tZ)(S/* ["default"] */.Z,{when:J,fallback:/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"copy",width:20,height:20}),children:/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"checkFilled",width:20,height:20,style:/*#__PURE__*/(0,s/* .css */.iv)("color:",E/* .colorTokens.text.success */.Jv.text.success," !important;")})})})]}),/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:I.content,dangerouslySetInnerHTML:{__html:X}})]}),/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{css:I.otherActions,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,onClick:()=>Y("rephrase"),children:(0,u.__)("Rephrase","tutor")}),/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,onClick:()=>Y("make_shorter"),children:(0,u.__)("Make Shorter","tutor")}),/*#__PURE__*/(0,o/* .jsxs */.BX)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,ref:$,onClick:()=>V("tone"),children:[(0,u.__)("Change Tone","tutor"),/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsxs */.BX)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,ref:G,onClick:()=>V("translate"),children:[(0,u.__)("Translate to","tutor"),/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,onClick:()=>Y("write_as_bullets"),children:(0,u.__)("Write as Bullets","tutor")}),/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,onClick:()=>Y("make_longer"),children:(0,u.__)("Make Longer","tutor")}),/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",roundedFull:false,onClick:()=>Y("simplify_language"),children:(0,u.__)("Simplify Language","tutor")})]})]})})]}),/*#__PURE__*/(0,o/* .jsx */.tZ)(m/* ["default"] */.Z,{isOpen:H==="tone",triggerRef:$,arrow:true,closePopover:()=>V(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.ru.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.tZ)(b/* .OptionList */.X,{options:x/* .toneOptions */.NZ,onChange:e=>(0,n._)(function*(){V(null);yield Y("change_tone",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.tZ)(m/* ["default"] */.Z,{isOpen:H==="translate",triggerRef:G,closePopover:()=>V(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.ru.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.tZ)(b/* .OptionList */.X,{options:x/* .languageOptions */.V1,onChange:e=>(0,n._)(function*(){V(null);yield Y("translation",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:I.footer,children:/*#__PURE__*/(0,o/* .jsxs */.BX)(S/* ["default"] */.Z,{when:B.length>0,fallback:/*#__PURE__*/(0,o/* .jsxs */.BX)(h/* ["default"] */.Z,{type:"submit",disabled:N.isPending||!K||j.isPending,children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(v/* ["default"] */.Z,{name:"magicWand",width:24,height:24}),(0,u.__)("Generate Now","tutor")]}),children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"outline",type:"submit",disabled:N.isPending||!K||j.isPending,children:(0,u.__)("Generate Again","tutor")}),/*#__PURE__*/(0,o/* .jsx */.tZ)(h/* ["default"] */.Z,{variant:"primary",disabled:N.isPending||B.length===0||j.isPending,onClick:()=>{d.onChange(B[W]);l()},children:(0,u.__)("Use This","tutor")})]})})]})})};/* ESM default export */const D=P;var I={container:/*#__PURE__*/(0,s/* .css */.iv)("padding:",E/* .spacing["20"] */.W0["20"],";display:flex;flex-direction:column;gap:",E/* .spacing["16"] */.W0["16"],";"),fieldsWrapper:/*#__PURE__*/(0,s/* .css */.iv)("position:relative;textarea{padding-bottom:",E/* .spacing["40"] */.W0["40"]," !important;}"),footer:/*#__PURE__*/(0,s/* .css */.iv)("padding:",E/* .spacing["12"] */.W0["12"]," ",E/* .spacing["16"] */.W0["16"],";display:flex;align-items:center;justify-content:end;gap:",E/* .spacing["10"] */.W0["10"],";box-shadow:0px 1px 0px 0px #e4e5e7 inset;button{width:fit-content;}"),pageInfo:/*#__PURE__*/(0,s/* .css */.iv)(Z/* .typography.caption */.c.caption(),";color:",E/* .colorTokens.text.hints */.Jv.text.hints,";& > span{font-weight:",E/* .fontWeight.medium */.Ue.medium,";color:",E/* .colorTokens.text.primary */.Jv.text.primary,";}"),inspireButton:/*#__PURE__*/(0,s/* .css */.iv)(C/* .styleUtils.resetButton */.i.resetButton,";",Z/* .typography.small */.c.small(),";position:absolute;height:28px;bottom:",E/* .spacing["12"] */.W0["12"],";left:",E/* .spacing["12"] */.W0["12"],";border:1px solid ",E/* .colorTokens.stroke.brand */.Jv.stroke.brand,";border-radius:",E/* .borderRadius["4"] */.E0["4"],";display:flex;align-items:center;gap:",E/* .spacing["4"] */.W0["4"],";color:",E/* .colorTokens.text.brand */.Jv.text.brand,";padding-inline:",E/* .spacing["12"] */.W0["12"],";background-color:",E/* .colorTokens.background.white */.Jv.background.white,";&:hover{background-color:",E/* .colorTokens.background.brand */.Jv.background.brand,";color:",E/* .colorTokens.text.white */.Jv.text.white,";}&:focus-visible{outline:2px solid ",E/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}&:disabled{background-color:",E/* .colorTokens.background.disable */.Jv.background.disable,";color:",E/* .colorTokens.text.disable */.Jv.text.disable,";}"),navigation:/*#__PURE__*/(0,s/* .css */.iv)("margin-left:-",E/* .spacing["8"] */.W0["8"],";display:flex;align-items:center;"),content:/*#__PURE__*/(0,s/* .css */.iv)(Z/* .typography.caption */.c.caption(),";height:180px;overflow-y:auto;background-color:",E/* .colorTokens.background.magicAi["default"] */.Jv.background.magicAi["default"],";border-radius:",E/* .borderRadius["6"] */.E0["6"],";padding:",E/* .spacing["6"] */.W0["6"]," ",E/* .spacing["12"] */.W0["12"],";color:",E/* .colorTokens.text.magicAi */.Jv.text.magicAi,";"),actionBar:/*#__PURE__*/(0,s/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;"),otherActions:/*#__PURE__*/(0,s/* .css */.iv)("display:flex;gap:",E/* .spacing["10"] */.W0["10"],";flex-wrap:wrap;& > button{width:fit-content;}")}},22128:function(e,t,r){"use strict";r.d(t,{Z:()=>y});/* ESM import */var n=r(58865);/* ESM import */var i=r(35944);/* ESM import */var a=r(70917);/* ESM import */var o=r(26815);/* ESM import */var s=r(68214);/* ESM import */var u=r(62067);/* ESM import */var l=r(74053);/* ESM import */var c=r(60860);/* ESM import */var d=r(76487);/* ESM import */var f=r(17106);/* ESM import */var p=r(68675);/* ESM import */var h=r(29535);function v(){var e=(0,n._)(["\n      max-width: 100vw;\n      width: 100vw;\n      height: 95vh;\n    "]);v=function t(){return e};return e}function m(){var e=(0,n._)(["\n      position: absolute;\n      right: ",";\n      top: ",";\n    "]);m=function t(){return e};return e}function g(){var e=(0,n._)(["\n      height: calc(100% - ","px);\n    "]);g=function t(){return e};return e}var b=e=>{var{children:t,onClose:r,title:n,subtitle:a,icon:c,entireHeader:d,actions:h,fullScreen:v,modalStyle:m,maxWidth:g=l/* .modal.BASIC_MODAL_MAX_WIDTH */.oC.BASIC_MODAL_MAX_WIDTH,isCloseAble:b=true,blurTriggerElement:y=true}=e;(0,p/* .useScrollLock */.Pr)();return/*#__PURE__*/(0,i/* .jsx */.tZ)(u/* ["default"] */.Z,{blurPrevious:y,children:/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:[_.container({isFullScreen:v}),m],style:{maxWidth:"".concat(g,"px")},children:[/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:_.header({hasEntireHeader:!!d}),children:[/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:!d,fallback:d,children:/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:_.headerContent,children:[/*#__PURE__*/(0,i/* .jsxs */.BX)("div",{css:_.iconWithTitle,children:[/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:c,children:c}),/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:n,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("p",{css:_.title,children:n})})]}),/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:a,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("span",{css:_.subtitle,children:a})})]})}),/*#__PURE__*/(0,i/* .jsx */.tZ)("div",{css:_.actionsWrapper({hasEntireHeader:!!d}),children:/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:h,fallback:/*#__PURE__*/(0,i/* .jsx */.tZ)(f/* ["default"] */.Z,{when:b,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("button",{"data-cy":"close-modal",type:"button",css:_.closeButton,onClick:r,children:/*#__PURE__*/(0,i/* .jsx */.tZ)(o/* ["default"] */.Z,{name:"timesThin",width:24,height:24})})}),children:h})})]}),/*#__PURE__*/(0,i/* .jsx */.tZ)("div",{css:_.content({isFullScreen:v}),children:/*#__PURE__*/(0,i/* .jsx */.tZ)(s/* ["default"] */.Z,{children:t})})]})})};/* ESM default export */const y=b;var _={container:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.iv)("position:relative;background:",c/* .colorTokens.background.white */.Jv.background.white,";box-shadow:",c/* .shadow.modal */.AF.modal,";border-radius:",c/* .borderRadius["10"] */.E0["10"],";overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",t&&(0,a/* .css */.iv)(v())," ",c/* .Breakpoint.smallTablet */.Uo.smallTablet,"{width:90%;}")},header:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.iv)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",!t?"".concat(l/* .modal.BASIC_MODAL_HEADER_HEIGHT */.oC.BASIC_MODAL_HEADER_HEIGHT,"px"):"auto",";background:",c/* .colorTokens.background.white */.Jv.background.white,";border-bottom:",!t?"1px solid ".concat(c/* .colorTokens.stroke.divider */.Jv.stroke.divider):"none",";padding-inline:",c/* .spacing["16"] */.W0["16"],";")},headerContent:/*#__PURE__*/(0,a/* .css */.iv)("place-self:center start;display:inline-flex;align-items:center;gap:",c/* .spacing["12"] */.W0["12"],";"),iconWithTitle:/*#__PURE__*/(0,a/* .css */.iv)("display:inline-flex;align-items:center;gap:",c/* .spacing["4"] */.W0["4"],";color:",c/* .colorTokens.icon["default"] */.Jv.icon["default"],";"),title:/*#__PURE__*/(0,a/* .css */.iv)(d/* .typography.body */.c.body("medium"),";color:",c/* .colorTokens.text.title */.Jv.text.title,";"),subtitle:/*#__PURE__*/(0,a/* .css */.iv)(h/* .styleUtils.text.ellipsis */.i.text.ellipsis(1)," ",d/* .typography.caption */.c.caption(),";color:",c/* .colorTokens.text.hints */.Jv.text.hints,";"),actionsWrapper:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.iv)("place-self:center end;display:inline-flex;gap:",c/* .spacing["16"] */.W0["16"],";",t&&(0,a/* .css */.iv)(m(),c/* .spacing["16"] */.W0["16"],c/* .spacing["16"] */.W0["16"]))},closeButton:/*#__PURE__*/(0,a/* .css */.iv)(h/* .styleUtils.resetButton */.i.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",c/* .borderRadius.circle */.E0.circle,";background:",c/* .colorTokens.background.white */.Jv.background.white,";&:focus,&:active,&:hover{background:",c/* .colorTokens.background.white */.Jv.background.white,";}svg{color:",c/* .colorTokens.icon["default"] */.Jv.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",c/* .colorTokens.icon.hover */.Jv.icon.hover,";}}:focus{box-shadow:",c/* .shadow.focus */.AF.focus,";}"),content:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.iv)("background-color:",c/* .colorTokens.background.white */.Jv.background.white,";overflow-y:auto;max-height:90vh;",t&&(0,a/* .css */.iv)(g(),l/* .modal.BASIC_MODAL_HEADER_HEIGHT */.oC.BASIC_MODAL_HEADER_HEIGHT))}}},6293:function(e,t,r){"use strict";r.d(t,{Z:()=>d});/* ESM import */var n=r(35944);/* ESM import */var i=r(70917);/* ESM import */var a=r(38003);/* ESM import */var o=/*#__PURE__*/r.n(a);/* ESM import */var s=r(19398);/* ESM import */var u=r(22128);/* ESM import */var l=r(60860);var c=e=>{var{title:t,description:r,confirmButtonText:i,cancelButtonText:o,confirmButtonVariant:l,closeModal:c,onConfirm:d,isLoading:p=false,icon:h,maxWidth:v=460}=e;return/*#__PURE__*/(0,n/* .jsxs */.BX)(u/* ["default"] */.Z,{icon:h,onClose:()=>c({action:"CLOSE"}),title:t,maxWidth:v,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:f.content,children:r!==null&&r!==void 0?r:(0,a.__)("Once you perform this action this can’t be undone.","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:f.footerWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(s/* ["default"] */.Z,{variant:"text",onClick:()=>c({action:"CLOSE"}),size:"small",children:o!==null&&o!==void 0?o:(0,a.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.tZ)(s/* ["default"] */.Z,{variant:l!==null&&l!==void 0?l:"danger",size:"small",loading:p,onClick:()=>{if(d){d()}else{c({action:"CONFIRM"})}},children:i!==null&&i!==void 0?i:(0,a.__)("Delete","tutor")})]})]})};/* ESM default export */const d=c;var f={content:/*#__PURE__*/(0,i/* .css */.iv)("font-size:",l/* .fontSize["14"] */.JB["14"],";line-height:",l/* .lineHeight["20"] */.Nv["20"],";color:",l/* .colorTokens.text.subdued */.Jv.text.subdued,";padding:",l/* .spacing["20"] */.W0["20"],";"),footerWrapper:/*#__PURE__*/(0,i/* .css */.iv)("display:flex;justify-content:end;gap:",l/* .spacing["8"] */.W0["8"],";padding:",l/* .spacing["12"] */.W0["12"]," ",l/* .spacing["16"] */.W0["16"],";box-shadow:",l/* .shadow.dividerTop */.AF.dividerTop,";")}},63260:function(e,t,r){"use strict";r.d(t,{D:()=>g,d:()=>m});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(58865);/* ESM import */var o=r(35944);/* ESM import */var s=r(70917);/* ESM import */var u=r(87363);/* ESM import */var l=/*#__PURE__*/r.n(u);/* ESM import */var c=r(60860);/* ESM import */var d=r(54354);/* ESM import */var f=r(34403);function p(){var e=(0,a._)(["\n      background: linear-gradient(\n        73.09deg,\n        rgba(255, 150, 69, 0.4) 18.05%,\n        rgba(255, 100, 113, 0.4) 30.25%,\n        rgba(207, 110, 189, 0.4) 55.42%,\n        rgba(164, 119, 209, 0.4) 71.66%,\n        rgba(62, 100, 222, 0.4) 97.9%\n      );\n      opacity: 1;\n      backdrop-filter: blur(10px);\n    "]);p=function t(){return e};return e}var h={backdrop:e=>{var{magicAi:t=false}=e;return/*#__PURE__*/(0,s/* .css */.iv)("position:fixed;background-color:",c/* .colorTokens.background.modal */.Jv.background.modal,";opacity:0.7;inset:0;z-index:",c/* .zIndex.negative */.W5.negative,";",t&&(0,s/* .css */.iv)(p()))},container:/*#__PURE__*/(0,s/* .css */.iv)("z-index:",c/* .zIndex.highest */.W5.highest,";position:fixed;display:flex;justify-content:center;top:0;left:0;width:100%;height:100%;")};var v=/*#__PURE__*/l().createContext({showModal:()=>Promise.resolve({action:"CLOSE"}),closeModal:f/* .noop */.ZT,updateModal:f/* .noop */.ZT,hasModalOnStack:false});var m=()=>(0,u.useContext)(v);var g=e=>{var{children:t}=e;var[r,a]=(0,u.useState)({modals:[]});var s=(0,u.useCallback)(e=>{var{component:t,props:r,closeOnOutsideClick:o=false,closeOnEscape:s=true,isMagicAi:u=false,depthIndex:l=c/* .zIndex.modal */.W5.modal,id:d}=e;return new Promise(e=>{a(a=>(0,i._)((0,n._)({},a),{modals:[...a.modals,{component:t,props:r,resolve:e,closeOnOutsideClick:o,closeOnEscape:s,id:d||(0,f/* .nanoid */.x0)(),depthIndex:l,isMagicAi:u}]}))})},[]);var p=(0,u.useCallback)(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"CLOSE"};a(t=>{var r=t.modals[t.modals.length-1];r===null||r===void 0?void 0:r.resolve(e);return(0,i._)((0,n._)({},t),{modals:t.modals.slice(0,t.modals.length-1)})})},[]);var m=(0,u.useCallback)((e,t)=>{a(r=>{var a=r.modals.findIndex(t=>t.id===e);if(a===-1)return r;var o=[...r.modals];var s=o[a];o[a]=(0,i._)((0,n._)({},s),{props:(0,n._)({},s.props,t)});return(0,i._)((0,n._)({},r),{modals:o})})},[]);var{transitions:g}=(0,d/* .useAnimation */._7)({keys:e=>e.id,data:r.modals,animationType:d/* .AnimationType.slideUp */.ru.slideUp,animationDuration:250});var b=(0,u.useMemo)(()=>{return r.modals.length>0},[r.modals]);(0,u.useEffect)(()=>{var e=e=>{var t;var n=document.querySelectorAll(".tutor-portal-popover");var i=!!document.body.classList.contains("modal-open");if(e.key==="Escape"&&((t=r.modals[r.modals.length-1])===null||t===void 0?void 0:t.closeOnEscape)&&!n.length&&!i){p({action:"CLOSE"})}};if(r.modals.length>0){document.addEventListener("keydown",e,true)}return()=>{document.removeEventListener("keydown",e,true)};// eslint-disable-next-line react-hooks/exhaustive-deps
},[r.modals.length,p]);return/*#__PURE__*/(0,o/* .jsxs */.BX)(v.Provider,{value:{showModal:s,closeModal:p,updateModal:m,hasModalOnStack:b},children:[t,g((e,t,r,a)=>{return/*#__PURE__*/(0,o/* .jsxs */.BX)("div",{"data-cy":"tutor-modal",css:[h.container,{zIndex:t.depthIndex||c/* .zIndex.modal */.W5.modal+a}],children:[/*#__PURE__*/(0,o/* .jsx */.tZ)(d/* .AnimatedDiv */.XJ,{style:(0,i._)((0,n._)({},e),{width:"100%"}),hideOnOverflow:false,children:/*#__PURE__*/l().createElement(t.component,(0,i._)((0,n._)({},t.props),{closeModal:p}))}),/*#__PURE__*/(0,o/* .jsx */.tZ)("div",{css:h.backdrop({magicAi:t.isMagicAi}),onKeyUp:f/* .noop */.ZT,tabIndex:-1,// This is not ideal to attach a click event on a non-interactive element like div,
// but in this case we have to do it.
onClick:()=>{if(t.closeOnOutsideClick){p({action:"CLOSE"})}}})]},t.id)})]})}},31342:function(e,t,r){"use strict";r.d(t,{Z:()=>b});/* ESM import */var n=r(35944);/* ESM import */var i=r(70917);/* ESM import */var a=r(38003);/* ESM import */var o=/*#__PURE__*/r.n(a);/* ESM import */var s=r(19398);/* ESM import */var u=r(26815);/* ESM import */var l=r(22128);/* ESM import */var c=r(34039);/* ESM import */var d=r(60860);/* ESM import */var f=r(76487);/* ESM import */var p=r(36352);/* ESM import */var h=r(17106);/* ESM import */var v=r(29535);var m={title:/*#__PURE__*/(0,n/* .jsxs */.BX)(n/* .Fragment */.HY,{children:[(0,a.__)("Upgrade to Tutor LMS Pro today and experience the power of ","tutor"),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:v/* .styleUtils.aiGradientText */.i.aiGradientText,children:(0,a.__)("AI Studio","tutor")})]}),message:(0,a.__)("Upgrade your plan to access the AI feature","tutor"),featuresTitle:(0,a.__)("Don’t miss out on this game-changing feature!","tutor"),features:[(0,a.__)("Generate a complete course outline in seconds!","tutor"),(0,a.__)("Let the AI Studio create Quizzes on your behalf and give your brain a well-deserved break.","tutor"),(0,a.__)("Generate images, customize backgrounds, and even remove unwanted objects with ease.","tutor"),(0,a.__)("Say goodbye to typos and grammar errors with AI-powered copy editing.","tutor")],footer:/*#__PURE__*/(0,n/* .jsx */.tZ)(s/* ["default"] */.Z,{onClick:()=>window.open(c/* ["default"].TUTOR_PRICING_PAGE */.Z.TUTOR_PRICING_PAGE,"_blank","noopener"),icon:/*#__PURE__*/(0,n/* .jsx */.tZ)(u/* ["default"] */.Z,{name:"crown",width:24,height:24}),children:(0,a.__)("Get Tutor LMS Pro","tutor")})};var g=e=>{var{title:t=m.title,message:r=m.message,featuresTitle:i=m.featuresTitle,features:o=m.features,closeModal:s,image:c,image2x:d,footer:f=m.footer}=e;return/*#__PURE__*/(0,n/* .jsx */.tZ)(l/* ["default"] */.Z,{onClose:s,entireHeader:/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{css:y.message,children:r}),maxWidth:496,children:/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:y.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{when:t,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("h4",{css:y.title,children:t})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{when:c,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("img",{css:y.image,src:c,alt:typeof t==="string"?t:(0,a.__)("Illustration","tutor"),srcSet:d?"".concat(c," ").concat(d," 2x"):undefined})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("h6",{css:y.featuresTiTle,children:i})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{when:o.length,children:/*#__PURE__*/(0,n/* .jsx */.tZ)("div",{css:y.features,children:/*#__PURE__*/(0,n/* .jsx */.tZ)(p/* ["default"] */.Z,{each:o,children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.BX)("div",{css:y.feature,children:[/*#__PURE__*/(0,n/* .jsx */.tZ)(u/* ["default"] */.Z,{name:"materialCheck",width:20,height:20,style:y.checkIcon}),/*#__PURE__*/(0,n/* .jsx */.tZ)("span",{children:e})]},t)})})}),/*#__PURE__*/(0,n/* .jsx */.tZ)(h/* ["default"] */.Z,{when:f,children:f})]})})};/* ESM default export */const b=g;var y={wrapper:/*#__PURE__*/(0,i/* .css */.iv)("padding:0 ",d/* .spacing["24"] */.W0["24"]," ",d/* .spacing["32"] */.W0["32"]," ",d/* .spacing["24"] */.W0["24"],";",v/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",d/* .spacing["16"] */.W0["16"],";"),message:/*#__PURE__*/(0,i/* .css */.iv)(f/* .typography.small */.c.small(),";color:",d/* .colorTokens.text.subdued */.Jv.text.subdued,";padding-left:",d/* .spacing["8"] */.W0["8"],";padding-top:",d/* .spacing["24"] */.W0["24"],";padding-bottom:",d/* .spacing["4"] */.W0["4"],";"),title:/*#__PURE__*/(0,i/* .css */.iv)(f/* .typography.heading6 */.c.heading6("medium"),";color:",d/* .colorTokens.text.primary */.Jv.text.primary,";text-wrap:pretty;"),image:/*#__PURE__*/(0,i/* .css */.iv)("height:270px;width:100%;object-fit:cover;object-position:center;border-radius:",d/* .borderRadius["8"] */.E0["8"],";"),featuresTiTle:/*#__PURE__*/(0,i/* .css */.iv)(f/* .typography.body */.c.body("medium"),";color:",d/* .colorTokens.text.primary */.Jv.text.primary,";text-wrap:pretty;"),features:/*#__PURE__*/(0,i/* .css */.iv)(v/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",d/* .spacing["4"] */.W0["4"],";padding-right:",d/* .spacing["48"] */.W0["48"],";"),feature:/*#__PURE__*/(0,i/* .css */.iv)(v/* .styleUtils.display.flex */.i.display.flex(),";gap:",d/* .spacing["12"] */.W0["12"],";",f/* .typography.small */.c.small(),";color:",d/* .colorTokens.text.title */.Jv.text.title,";span{text-wrap:pretty;}"),checkIcon:/*#__PURE__*/(0,i/* .css */.iv)("flex-shrink:0;color:",d/* .colorTokens.text.success */.Jv.text.success,";")}},99678:function(e,t,r){"use strict";r.d(t,{Z:()=>D});/* ESM import */var n=r(76150);/* ESM import */var i=r(7409);/* ESM import */var a=r(99282);/* ESM import */var o=r(58865);/* ESM import */var s=r(35944);/* ESM import */var u=r(70917);/* ESM import */var l=r(38003);/* ESM import */var c=/*#__PURE__*/r.n(l);/* ESM import */var d=r(87363);/* ESM import */var f=/*#__PURE__*/r.n(d);/* ESM import */var p=r(52293);/* ESM import */var h=r(87056);/* ESM import */var v=r(19398);/* ESM import */var m=r(78150);/* ESM import */var g=r(92386);/* ESM import */var b=r(22128);/* ESM import */var y=r(34039);/* ESM import */var _=r(74053);/* ESM import */var w=r(60860);/* ESM import */var x=r(76487);/* ESM import */var E=r(17106);/* ESM import */var Z=r(37861);/* ESM import */var S=r(15287);/* ESM import */var O=r(29535);/* ESM import */var k=r(25481);function T(){var e=(0,o._)(["\n      padding: ",";\n      padding-top: ",";\n    "]);T=function t(){return e};return e}var C,R;var A=((C=y/* .tutorConfig.settings */.y.settings)===null||C===void 0?void 0:C.chatgpt_enable)==="on";var M=(R=y/* .tutorConfig.current_user.roles */.y.current_user.roles)===null||R===void 0?void 0:R.includes(_/* .TutorRoles.ADMINISTRATOR */.er.ADMINISTRATOR);var P=e=>{var{closeModal:t,image:r,image2x:o}=e;var u=(0,Z/* .useFormWithGlobalError */.O)({defaultValues:{openAIApiKey:"",enable_open_ai:A},shouldFocusError:true});var c=(0,S/* .useSaveOpenAiSettingsMutation */.W8)();var f=e=>(0,n._)(function*(){var r=yield c.mutateAsync({chatgpt_api_key:e.openAIApiKey,chatgpt_enable:e.enable_open_ai?1:0});if(r.status_code===200){t({action:"CONFIRM"});window.location.reload()}})();(0,d.useEffect)(()=>{u.setFocus("openAIApiKey");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,s/* .jsx */.tZ)(b/* ["default"] */.Z,{onClose:()=>t({action:"CLOSE"}),title:M?(0,l.__)("Set OpenAI API key","tutor"):undefined,entireHeader:M?undefined:/*#__PURE__*/(0,s/* .jsx */.tZ)(s/* .Fragment */.HY,{children:" "}),maxWidth:560,children:/*#__PURE__*/(0,s/* .jsx */.tZ)("div",{css:I.wrapper({isCurrentUserAdmin:M}),children:/*#__PURE__*/(0,s/* .jsx */.tZ)(E/* ["default"] */.Z,{when:M,fallback:/*#__PURE__*/(0,s/* .jsxs */.BX)(s/* .Fragment */.HY,{children:[/*#__PURE__*/(0,s/* .jsx */.tZ)("img",{css:I.image,src:r,srcSet:o?"".concat(r," 1x, ").concat(o," 2x"):"".concat(r," 1x"),alt:(0,l.__)("Connect API KEY","tutor")}),/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{children:[/*#__PURE__*/(0,s/* .jsx */.tZ)("div",{css:I.message,children:(0,l.__)("API is not connected","tutor")}),/*#__PURE__*/(0,s/* .jsx */.tZ)("div",{css:I.title,children:(0,l.__)("Please, ask your Admin to connect the API with Tutor LMS Pro.","tutor")})]})]}),children:/*#__PURE__*/(0,s/* .jsxs */.BX)(s/* .Fragment */.HY,{children:[/*#__PURE__*/(0,s/* .jsxs */.BX)("form",{css:I.formWrapper,onSubmit:u.handleSubmit(f),children:[/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:I.infoText,children:[/*#__PURE__*/(0,s/* .jsx */.tZ)("div",{dangerouslySetInnerHTML:{/* translators: %1$s and %2$s are opening and closing anchor tags for the "OpenAI User settings" link */__html:(0,l.sprintf)((0,l.__)("Find your Secret API key in your %1$sOpenAI User settings%2$s and paste it here to connect OpenAI with your Tutor LMS website.","tutor"),'<a href="'.concat(y/* ["default"].CHATGPT_PLATFORM_URL */.Z.CHATGPT_PLATFORM_URL,'" target="_blank" rel="noopener noreferrer">'),"</a>")}}),/*#__PURE__*/(0,s/* .jsx */.tZ)(h/* ["default"] */.Z,{type:"info",icon:"warning",children:(0,l.__)("The page will reload after submission. Make sure to save the course information.","tutor")})]}),/*#__PURE__*/(0,s/* .jsx */.tZ)(p/* .Controller */.Qr,{name:"openAIApiKey",control:u.control,rules:(0,k/* .requiredRule */.n0)(),render:e=>/*#__PURE__*/(0,s/* .jsx */.tZ)(m/* ["default"] */.Z,(0,a._)((0,i._)({},e),{type:"password",isPassword:true,label:(0,l.__)("OpenAI API key","tutor"),placeholder:(0,l.__)("Enter your OpenAI API key","tutor")}))}),/*#__PURE__*/(0,s/* .jsx */.tZ)(p/* .Controller */.Qr,{name:"enable_open_ai",control:u.control,render:e=>/*#__PURE__*/(0,s/* .jsx */.tZ)(g/* ["default"] */.Z,(0,a._)((0,i._)({},e),{label:(0,l.__)("Enable OpenAI","tutor")}))})]}),/*#__PURE__*/(0,s/* .jsxs */.BX)("div",{css:I.formFooter,children:[/*#__PURE__*/(0,s/* .jsx */.tZ)(v/* ["default"] */.Z,{onClick:()=>t({action:"CLOSE"}),variant:"text",size:"small",children:(0,l.__)("Cancel","tutor")}),/*#__PURE__*/(0,s/* .jsx */.tZ)(v/* ["default"] */.Z,{size:"small",onClick:u.handleSubmit(f),loading:c.isPending,children:(0,l.__)("Save","tutor")})]})]})})})})};/* ESM default export */const D=P;var I={wrapper:e=>{var{isCurrentUserAdmin:t}=e;return/*#__PURE__*/(0,u/* .css */.iv)(O/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",w/* .spacing["20"] */.W0["20"],";",!t&&(0,u/* .css */.iv)(T(),w/* .spacing["24"] */.W0["24"],w/* .spacing["6"] */.W0["6"]))},formWrapper:/*#__PURE__*/(0,u/* .css */.iv)(O/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",w/* .spacing["20"] */.W0["20"],";padding:",w/* .spacing["16"] */.W0["16"]," ",w/* .spacing["16"] */.W0["16"]," 0 ",w/* .spacing["16"] */.W0["16"],";"),infoText:/*#__PURE__*/(0,u/* .css */.iv)(x/* .typography.small */.c.small(),";",O/* .styleUtils.display.flex */.i.display.flex("column"),";gap:",w/* .spacing["8"] */.W0["8"],";color:",w/* .colorTokens.text.subdued */.Jv.text.subdued,";a{",O/* .styleUtils.resetButton */.i.resetButton,"      color:",w/* .colorTokens.text.brand */.Jv.text.brand,";}"),formFooter:/*#__PURE__*/(0,u/* .css */.iv)(O/* .styleUtils.display.flex */.i.display.flex(),";justify-content:flex-end;gap:",w/* .spacing["16"] */.W0["16"],";border-top:1px solid ",w/* .colorTokens.stroke.divider */.Jv.stroke.divider,";padding:",w/* .spacing["16"] */.W0["16"],";"),image:/*#__PURE__*/(0,u/* .css */.iv)("height:310px;width:100%;object-fit:cover;object-position:center;border-radius:",w/* .borderRadius["8"] */.E0["8"],";"),message:/*#__PURE__*/(0,u/* .css */.iv)(x/* .typography.small */.c.small(),";color:",w/* .colorTokens.text.subdued */.Jv.text.subdued,";"),title:/*#__PURE__*/(0,u/* .css */.iv)(x/* .typography.heading4 */.c.heading4("medium"),";color:",w/* .colorTokens.text.primary */.Jv.text.primary,";margin-top:",w/* .spacing["4"] */.W0["4"],";text-wrap:pretty;")}},34039:function(e,t,r){"use strict";r.d(t,{Z:()=>u,y:()=>o});var n,i;var a={ID:0,ajaxurl:"",site_url:"",home_url:"",site_title:"",base_path:"",tutor_url:"",tutor_pro_url:"",dashboard_url:"",nonce_key:"",_tutor_nonce:"",loading_icon_url:"",placeholder_img_src:"",enable_lesson_classic_editor:"",tutor_frontend_dashboard_url:"",backend_course_list_url:"",backend_bundle_list_url:"",frontend_course_list_url:"",frontend_bundle_list_url:"",wp_date_format:"",wp_rest_nonce:"",is_admin:"",is_admin_bar_showing:"",max_upload_size:"",content_change_event:"",is_tutor_course_edit:"",assignment_max_file_allowed:"",current_page:"",quiz_answer_display_time:"",is_ssl:"",course_list_page_url:"",course_post_type:"",local:"",difficulty_levels:[],supported_video_sources:[],edd_products:[],bp_groups:[],timezones:{},addons_data:[],current_user:{data:{id:"",user_login:"",user_pass:"",user_nicename:"",user_email:"",user_url:"",user_registered:"",user_activation_key:"",user_status:"",display_name:""},caps:{},cap_key:"",roles:[],allcaps:{},filter:null},settings:{monetize_by:"tutor",enable_course_marketplace:"off",course_permalink_base:"",supported_video_sources:"",enrollment_expiry_enabled:"off",enable_q_and_a_on_course:"off",instructor_can_delete_course:"off",instructor_can_change_course_author:"off",instructor_can_manage_co_instructors:"off",chatgpt_enable:"off",course_builder_logo_url:"",chatgpt_key_exist:false,hide_admin_bar_for_users:"off",enable_redirect_on_course_publish_from_frontend:"off",instructor_can_publish_course:"off",youtube_api_key_exist:false,membership_only_mode:false,enable_tax:false,enable_individual_tax_control:false,is_tax_included_in_price:false},tutor_currency:{symbol:"",currency:"",position:"",thousand_separator:"",decimal_separator:"",no_of_decimal:""},visibility_control:{course_builder:{}}};var o=window._tutorobject||a;window.ajaxurl=o.ajaxurl;var s={TUTOR_SITE_URL:o.site_url,WP_AJAX_BASE_URL:o.ajaxurl,WP_API_BASE_URL:"".concat(((n=window.wpApiSettings)===null||n===void 0?void 0:n.root)||"").concat(((i=window.wpApiSettings)===null||i===void 0?void 0:i.versionString)||""),VIDEO_SOURCES_SETTINGS_URL:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=course#field_supported_video_sources"),MONETIZATION_SETTINGS_URL:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=monetization"),TUTOR_PRICING_PAGE:"https://tutorlms.com/pricing/",TUTOR_ADDONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-addons"),CHATGPT_PLATFORM_URL:"https://platform.openai.com/account/api-keys",TUTOR_MY_COURSES_PAGE_URL:"".concat(o.tutor_frontend_dashboard_url,"/my-courses"),TUTOR_SUPPORT_PAGE_URL:"https://tutorlms.com/support",TUTOR_SUBSCRIPTIONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-subscriptions"),TUTOR_ENROLLMENTS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=enrollments"),TUTOR_COUPONS_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor_coupons"),TUTOR_IMPORT_EXPORT_PAGE:"".concat(o.site_url,"/wp-admin/admin.php?page=tutor-tools&sub_page=import_export")};/* ESM default export */const u=s},74053:function(e,t,r){"use strict";r.d(t,{AO:()=>S,E_:()=>Z,Tb:()=>o,WQ:()=>m,YB:()=>w,dR:()=>E,dZ:()=>v,er:()=>x,gK:()=>u,iM:()=>y,j9:()=>T,oC:()=>_,t8:()=>O});/* ESM import */var n=r(38003);/* ESM import */var i=/*#__PURE__*/r.n(n);/* ESM import */var a=r(60860);var o=5*1024*1024;var s=/* unused pure expression or super */null&&["image/jpeg","image/png","image/gif"];var u=10;var l=48;var c=7;var d=3;var f="/product";var p="/category";var h="/tag";var v=document.dir==="rtl";var m="32px";var g="46px";var b=window.innerWidth;var y={isAboveDesktop:b>=a/* .DesktopBreakpoint */.Mi,isAboveTablet:b>=a/* .TabletBreakpoint */.cf,isAboveMobile:b>=a/* .MobileBreakpoint */.UM,isAboveSmallMobile:b>=a/* .SmallMobileBreakpoint */._0};var _={HEADER_HEIGHT:56,MARGIN_TOP:88,BASIC_MODAL_HEADER_HEIGHT:50,BASIC_MODAL_MAX_WIDTH:1218};var w={MIN_NOTEBOOK_HEIGHT:430,MIN_NOTEBOOK_WIDTH:360,NOTEBOOK_HEADER:50};var x={ADMINISTRATOR:"administrator",TUTOR_INSTRUCTOR:"tutor_instructor",SUBSCRIBER:"subscriber"};var E=/*#__PURE__*/function(e){e["notebook"]="tutor_course_builder_notebook";return e}({});var Z=/*#__PURE__*/function(e){e["day"]="dd";e["month"]="MMM";e["year"]="yyyy";e["yearMonthDay"]="yyyy-LL-dd";e["monthDayYear"]="MMM dd, yyyy";e["hoursMinutes"]="hh:mm a";e["yearMonthDayHourMinuteSecond"]="yyyy-MM-dd hh:mm:ss";e["yearMonthDayHourMinuteSecond24H"]="yyyy-MM-dd HH:mm:ss";e["monthDayYearHoursMinutes"]="MMM dd, yyyy, hh:mm a";e["localMonthDayYearHoursMinutes"]="PPp";e["activityDate"]="MMM dd, yyyy hh:mm aa";e["validityDate"]="dd MMMM yyyy";e["dayMonthYear"]="do MMMM, yyyy";return e}({});var S=/*#__PURE__*/function(e){e["COURSE_BUNDLE"]="course-bundle";e["SUBSCRIPTION"]="subscription";e["SOCIAL_LOGIN"]="social-login";e["CONTENT_DRIP"]="content-drip";e["TUTOR_MULTI_INSTRUCTORS"]="tutor-multi-instructors";e["TUTOR_ASSIGNMENTS"]="tutor-assignments";e["TUTOR_COURSE_PREVIEW"]="tutor-course-preview";e["TUTOR_COURSE_ATTACHMENTS"]="tutor-course-attachments";e["TUTOR_GOOGLE_MEET_INTEGRATION"]="google-meet";e["TUTOR_REPORT"]="tutor-report";e["EMAIL"]="tutor-email";e["CALENDAR"]="calendar";e["NOTIFICATIONS"]="tutor-notifications";e["GOOGLE_CLASSROOM_INTEGRATION"]="google-classroom";e["TUTOR_ZOOM_INTEGRATION"]="tutor-zoom";e["QUIZ_EXPORT_IMPORT"]="quiz-import-export";e["ENROLLMENT"]="enrollments";e["TUTOR_CERTIFICATE"]="tutor-certificate";e["GRADEBOOK"]="gradebook";e["TUTOR_PREREQUISITES"]="tutor-prerequisites";e["BUDDYPRESS"]="buddypress";e["WOOCOMMERCE_SUBSCRIPTIONS"]="wc-subscriptions";e["PAID_MEMBERSHIPS_PRO"]="pmpro";e["RESTRICT_CONTENT_PRO"]="restrict-content-pro";e["WEGLOT"]="tutor-weglot";e["WPML_MULTILINGUAL_CMS"]="tutor-wpml";e["H5P_INTEGRATION"]="h5p";e["CONTENT_BANK"]="content-bank";return e}({});var O={YOUTUBE:/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,VIMEO:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,// eslint-disable-next-line no-useless-escape
EXTERNAL_URL:/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,SHORTCODE:/^\[.*\]$/};var k=[{label:(0,n.__)("Public","tutor"),value:"publish"},{label:(0,n.__)("Password Protected","tutor"),value:"password_protected"},{label:(0,n.__)("Private","tutor"),value:"private"}];var T={COURSE_BUILDER:{BASICS:{FEATURED_IMAGE:"course_builder.basics_featured_image",INTRO_VIDEO:"course_builder.basics_intro_video",SCHEDULING_OPTIONS:"course_builder.basics_scheduling_options",PRICING_OPTIONS:"course_builder.basics_pricing_options",CATEGORIES:"course_builder.basics_categories",TAGS:"course_builder.basics_tags",AUTHOR:"course_builder.basics_author",INSTRUCTORS:"course_builder.basics_instructors",OPTIONS:{GENERAL:"course_builder.basics_options_general",CONTENT_DRIP:"course_builder.basics_options_content_drip",ENROLLMENT:"course_builder.basics_options_enrollment"}},CURRICULUM:{LESSON:{FEATURED_IMAGE:"course_builder.curriculum_lesson_featured_image",VIDEO:"course_builder.curriculum_lesson_video",VIDEO_PLAYBACK_TIME:"course_builder.curriculum_lesson_video_playback_time",EXERCISE_FILES:"course_builder.curriculum_lesson_exercise_files",LESSON_PREVIEW:"course_builder.curriculum_lesson_lesson_preview"}},ADDITIONAL:{COURSE_BENEFITS:"course_builder.additional_course_benefits",COURSE_TARGET_AUDIENCE:"course_builder.additional_course_target_audience",TOTAL_COURSE_DURATION:"course_builder.additional_total_course_duration",COURSE_MATERIALS_INCLUDES:"course_builder.additional_course_material_includes",COURSE_REQUIREMENTS:"course_builder.additional_course_requirements",CERTIFICATES:"course_builder.additional_certificate",ATTACHMENTS:"course_builder.additional_attachments",SCHEDULE_LIVE_CLASS:"course_builder.additional_schedule_live_class"}}};var C=/* unused pure expression or super */null&&{NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"};var R=/* unused pure expression or super */null&&{name:"checkbox",// eslint-disable-next-line @typescript-eslint/no-explicit-any
value:"",onChange:()=>{},onBlur:()=>{},ref:()=>{}};var A=/* unused pure expression or super */null&&{invalid:false,isTouched:false,isDirty:false,isValidating:false,error:undefined}},699:function(e,t,r){"use strict";r.d(t,{NZ:()=>o,V1:()=>a,Xy:()=>s});/* ESM import */var n=r(38003);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=[{label:"English",value:"english"},{label:"简体中文",value:"simplified-chinese"},{label:"繁體中文",value:"traditional-chinese"},{label:"Español",value:"spanish"},{label:"Français",value:"french"},{label:"日本語",value:"japanese"},{label:"Deutsch",value:"german"},{label:"Português",value:"portuguese"},{label:"العربية",value:"arabic"},{label:"Русский",value:"russian"},{label:"Italiano",value:"italian"},{label:"한국어",value:"korean"},{label:"हिन्दी",value:"hindi"},{label:"Nederlands",value:"dutch"},{label:"Polski",value:"polish"},{label:"አማርኛ",value:"amharic"},{label:"Български",value:"bulgarian"},{label:"বাংলা",value:"bengali"},{label:"Čeština",value:"czech"},{label:"Dansk",value:"danish"},{label:"Ελληνικά",value:"greek"},{label:"Eesti",value:"estonian"},{label:"فارسی",value:"persian"},{label:"Filipino",value:"filipino"},{label:"Hrvatski",value:"croatian"},{label:"Magyar",value:"hungarian"},{label:"Bahasa Indonesia",value:"indonesian"},{label:"Lietuvių",value:"lithuanian"},{label:"Latviešu",value:"latvian"},{label:"Melayu",value:"malay"},{label:"Norsk",value:"norwegian"},{label:"Română",value:"romanian"},{label:"Slovenčina",value:"slovak"},{label:"Slovenščina",value:"slovenian"},{label:"Српски",value:"serbian"},{label:"Svenska",value:"swedish"},{label:"ภาษาไทย",value:"thai"},{label:"Türkçe",value:"turkish"},{label:"Українська",value:"ukrainian"},{label:"اردو",value:"urdu"},{label:"Tiếng Việt",value:"vietnamese"}];var o=[{label:(0,n.__)("Formal","tutor"),value:"formal"},{label:(0,n.__)("Casual","tutor"),value:"casual"},{label:(0,n.__)("Professional","tutor"),value:"professional"},{label:(0,n.__)("Enthusiastic","tutor"),value:"enthusiastic"},{label:(0,n.__)("Informational","tutor"),value:"informational"},{label:(0,n.__)("Funny","tutor"),value:"funny"}];var s=[{label:(0,n.__)("Title","tutor"),value:"title"},{label:(0,n.__)("Essay","tutor"),value:"essay"},{label:(0,n.__)("Paragraph","tutor"),value:"paragraph"},{label:(0,n.__)("Outline","tutor"),value:"outline"}]},60860:function(e,t,r){"use strict";r.d(t,{AF:()=>v,E0:()=>m,I8:()=>u,J9:()=>a,JB:()=>d,Jv:()=>l,Mi:()=>w,Nv:()=>p,UM:()=>y,Ue:()=>f,Uo:()=>x,V4:()=>E,W0:()=>c,W5:()=>g,_0:()=>b,cf:()=>_,xQ:()=>s});/* ESM import */var n=r(86138);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=64;var o=355;var s=56;var u={inter:"'Inter', sans-serif;",roboto:"'Roboto', sans-serif;",sfProDisplay:"'SF Pro Display', sans-serif;"};var l={brand:{blue:"#0049f8",black:"#092844"},ai:{gradient_1:"linear-gradient(73.09deg, #FF9645 18.05%, #FF6471 30.25%, #CF6EBD 55.42%, #A477D1 71.66%, #3E64DE 97.9%)",gradient_1_rtl:"linear-gradient(73.09deg, #3E64DE 97.9%, #A477D1 28.34%, #CF6EBD 44.58%, #FF6471 69.75%, #FF9645 81.95%)",gradient_2:"linear-gradient(71.97deg, #FF9645 18.57%, #FF6471 63.71%, #CF6EBD 87.71%, #9B62D4 107.71%, #3E64DE 132.85%)",gradient_2_rtl:"linear-gradient(71.97deg, #3E64DE -67.15%, #9B62D4 -92.29%, #CF6EBD 87.71%, #FF6471 36.29%, #FF9645 81.43%)"},text:{primary:"#212327",title:"#41454f",subdued:"#5b616f",hints:"#767c8e",disable:"#a4a8b2",white:"#ffffff",brand:"#3a62e0",success:"#239c46",warning:"#bd7e00",error:"#f44337",status:{processing:"#007a66",pending:"#a8710d",failed:"#cc1213",completed:"#097336",onHold:"#ac0640",cancelled:"#6f7073",primary:"#3e64de"},wp:"#2271b1",magicAi:"#484F66",ai:{purple:"#9D50FF",gradient:"linear-gradient(73.09deg, #FF9645 18.05%, #FF6471 30.25%, #CF6EBD 55.42%, #A477D1 71.66%, #3E64DE 97.9%)"}},surface:{tutor:"#ffffff",wordpress:"#f1f1f1",navbar:"#F5F5F5",courseBuilder:"#F8F8F8"},background:{brand:"#3e64de",white:"#ffffff",black:"#000000",default:"#f4f6f9",hover:"#f5f6fa",active:"#f0f1f5",disable:"#ebecf0",modal:"#161616",dark10:"#212327",dark20:"#31343b",dark30:"#41454f",null:"#ffffff",success:{fill30:"#F5FBF7",fill40:"#E5F5EB"},warning:{fill40:"#FDF4E3"},status:{success:"#e5f5eb",warning:"#fdf4e3",drip:"#e9edfb",onHold:"#fae8ef",processing:"#e5f9f6",errorFail:"#ffebeb",cancelled:"#eceef2",refunded:"#e5f5f5"},magicAi:{default:"#FBF6FF",skeleton:"#FEF4FF",8:i()("#C984FE",.08)}},icon:{default:"#9197a8",hover:"#4b505c",subdued:"#7e838f",hints:"#b6b9c2",disable:{default:"#b8bdcc",background:"#cbced6",muted:"#dedede"},white:"#ffffff",brand:"#446ef5",wp:"#007cba",error:"#f55e53",warning:"#ffb505",success:"#22a848",drop:"#4761b8",processing:"#00a388"},stroke:{default:"#c3c5cb",hover:"#9095a3",bold:"#41454f",disable:"#dcdfe5",divider:"#e0e2ea",border:"#cdcfd5",white:"#ffffff",brand:"#577fff",neutral:"#7391f0",success:{default:"#4eba6d",fill70:"#6AC088"},warning:"#f5ba63",danger:"#ff9f99",status:{success:"#c8e5d2",warning:"#fae5c5",processing:"#c3e5e0",onHold:"#f1c1d2",cancelled:"#e1e1e8",refunded:"#ccebea",fail:"#fdd9d7"},magicAi:"#C984FE"},border:{neutral:"#C8C8C8",tertiary:"#F5F5F5"},action:{primary:{default:"#3e64de",hover:"#3a5ccc",focus:"#00cceb",active:"#3453b8",disable:"#e3e6eb",wp:"#2271b1",wp_hover:"#135e96"},secondary:{default:"#e9edfb",hover:"#d6dffa",active:"#d0d9f2"},outline:{default:"#ffffff",hover:"#e9edfb",active:"#e1e7fa",disable:"#cacfe0"}},wordpress:{primary:"#2271b1",primaryLight:"#007cba",hoverShape:"#7faee6",sidebarChildText:"#4ea2e6",childBg:"#2d3337",mainBg:"#1e2327",text:"#b5bcc2"},design:{dark:"#1a1b1e",grey:"#41454f",white:"#ffffff",brand:"#3e64de",success:"#24a148",warning:"#ed9700",error:"#f44337"},primary:{main:"#3e64de",100:"#28408e",90:"#395bca",80:"#6180e4",70:"#95aaed",60:"#bdcaf1",50:"#d2dbf5",40:"#e9edfb",30:"#f6f8fd"},color:{black:{main:"#212327",100:"#0b0c0e",90:"#1a1b1e",80:"#31343b",70:"#41454f",60:"#5b616f",50:"#727889",40:"#9ca0ac",30:"#b4b7c0",20:"#c0c3cb",10:"#cdcfd5",8:"#e3e6eb",5:"#eff1f6",3:"#f4f6f9",2:"#fcfcfd",0:"#ffffff"},danger:{main:"#f44337",100:"#c62828",90:"#e53935",80:"#ef5350",70:"#e57373",60:"#fbb4af",50:"#fdd9d7",40:"#feeceb",30:"#fff7f7"},success:{main:"#24a148",100:"#075a2a",90:"#007a38",80:"#3aaa5a",70:"#6ac088",60:"#99d4ae",50:"#cbe9d5",40:"#e5f5eb",30:"#f5fbf7"},warning:{main:"#ed9700",100:"#895800",90:"#e08e00",80:"#f3a33c",70:"#f5ba63",60:"#f9d093",50:"#fce7c7",40:"#fdf4e3",30:"#fefbf4"}},bg:{gray20:"#e3e5eb",white:"#ffffff",error:"#f46363",success:"#24a148",light:"#f9fafc",brand:"#E6ECFF"},ribbon:{red:"linear-gradient(to bottom, #ee0014 0%,#c10010 12.23%,#ee0014 100%)",orange:"linear-gradient(to bottom, #ff7c02 0%,#df6c00 12.23%,#f78010 100%)",green:"linear-gradient(to bottom, #02ff49 0%,#00bb35 12.23%,#04ca3c 100%)",blue:"linear-gradient(to bottom, #0267ff 3.28%,#004bbb 12.23%,#0453ca 100%)"},additionals:{lightMint:"#ebfffb",lightPurple:"#f4e8f8",lightRed:"#ffebeb",lightYellow:"#fffaeb",lightCoffee:"#fcf4ee",lightPurple2:"#f7ebfe",lightBlue:"#edf1fd"}};var c={0:"0",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",16:"16px",20:"20px",24:"24px",28:"28px",32:"32px",36:"36px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",96:"96px",128:"128px",256:"256px",512:"512px"};var d={10:"0.625rem",11:"0.688rem",12:"0.75rem",13:"0.813rem",14:"0.875rem",15:"0.938rem",16:"1rem",18:"1.125rem",20:"1.25rem",24:"1.5rem",28:"1.75rem",30:"1.875rem",32:"2rem",36:"2.25rem",40:"2.5rem",48:"3rem",56:"3.5rem",60:"3.75rem",64:"4rem",80:"5rem"};var f={thin:100,extraLight:200,light:300,regular:400,medium:500,semiBold:600,bold:700,extraBold:800,black:900};var p={12:"0.5rem",14:"0.75rem",15:"0.90rem",16:"1rem",18:"1.125rem",20:"1.25rem",21:"1.313rem",22:"1.375rem",24:"1.5rem",26:"1.625rem",28:"1.75rem",32:"2rem",30:"1.875rem",34:"2.125rem",36:"2.25rem",40:"2.5rem",44:"2.75rem",48:"3rem",56:"3.5rem",58:"3.625rem",64:"4rem",70:"4.375rem",81:"5.063rem"};var h=/* unused pure expression or super */null&&{tight:"-0.05em",normal:"0",wide:"0.05em",extraWide:"0.1em"};var v={focus:"0px 0px 0px 0px rgba(255, 255, 255, 1), 0px 0px 0px 3px rgba(0, 73, 248, 0.9)",button:"0px 1px 0.25px rgba(17, 18, 19, 0.08), inset 0px -1px 0.25px rgba(17, 18, 19, 0.24)",combinedButton:"0px 1px 0px rgba(0, 0, 0, 0.05), inset 0px -1px 0px #bcbfc3, inset 1px 0px 0px #bbbfc3, inset 0px 1px 0px #bbbfc3",combinedButtonExtend:"0px 1px 0px rgba(0, 0, 0, 0.05), inset 0px -1px 0px #bcbfc3, inset 1px 0px 0px #bbbfc3, inset 0px 1px 0px #bbbfc3, inset -1px 0px 0px #bbbfc3",insetButtonPressed:"inset 0px 2px 0px rgba(17, 18, 19, 0.08)",card:"0px 2px 1px rgba(17, 18, 19, 0.05), 0px 0px 1px rgba(17, 18, 19, 0.25)",popover:"0px 6px 22px rgba(17, 18, 19, 0.08), 0px 4px 10px rgba(17, 18, 19, 0.1)",modal:"0px 0px 2px rgba(17, 18, 19, 0.2), 0px 30px 72px rgba(17, 18, 19, 0.2)",base:"0px 1px 3px rgba(17, 18, 19, 0.15)",input:"0px 1px 0px rgba(17, 18, 19, 0.05)",switch:"0px 2px 4px 0px #0000002A",tabs:"inset 0px -1px 0px #dbdcdf",dividerTop:"inset 0px 1px 0px #E4E5E7",underline:"0px 1px 0px #C9CBCF",drag:"3px 7px 8px 0px #00000014",dropList:"0px 6px 20px 0px rgba(28, 49, 104, 0.1)",notebook:"0 0 4px 0 rgba(0, 30, 43, 0.16)",scrollable:"0px -2px 2px 0px #00000014",footer:"0px 1px 0px 0px #E4E5E7 inset"};var m={2:"2px",4:"4px",5:"5px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",20:"20px",24:"24px",30:"30px",40:"40px",50:"50px",54:"54px",circle:"50%",card:"8px",min:"4px",input:"6px"};var g={negative:-1,positive:1,dropdown:2,level:0,sidebar:9,header:10,footer:10,modal:25,notebook:1e5,highest:99999};var b=480;var y=782;var _=992;var w=1280;var x={smallMobile:"@media(max-width: ".concat(b,"px)"),mobile:"@media(max-width: ".concat(y,"px)"),smallTablet:"@media(max-width: ".concat(_-1,"px)"),tablet:"@media(max-width: ".concat(w-1,"px)"),desktop:"@media(min-width: ".concat(w,"px)")};var E=1006},76487:function(e,t,r){"use strict";r.d(t,{c:()=>a});/* ESM import */var n=r(60860);/* ESM import */var i=r(70917);var a={heading1:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["80"] */.JB["80"],";line-height:",n/* .lineHeight["81"] */.Nv["81"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},heading2:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["60"] */.JB["60"],";line-height:",n/* .lineHeight["70"] */.Nv["70"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},heading3:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["40"] */.JB["40"],";line-height:",n/* .lineHeight["48"] */.Nv["48"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},heading4:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["30"] */.JB["30"],";line-height:",n/* .lineHeight["40"] */.Nv["40"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},heading5:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["24"] */.JB["24"],";line-height:",n/* .lineHeight["34"] */.Nv["34"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},heading6:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["20"] */.JB["20"],";line-height:",n/* .lineHeight["30"] */.Nv["30"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},body:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["16"] */.JB["16"],";line-height:",n/* .lineHeight["26"] */.Nv["26"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},caption:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["15"] */.JB["15"],";line-height:",n/* .lineHeight["24"] */.Nv["24"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},small:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["13"] */.JB["13"],";line-height:",n/* .lineHeight["18"] */.Nv["18"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")},tiny:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.iv)("font-size:",n/* .fontSize["11"] */.JB["11"],";line-height:",n/* .lineHeight["16"] */.Nv["16"],";color:",n/* .colorTokens.text.primary */.Jv.text.primary,";font-weight:",n/* .fontWeight */.Ue[e],";font-family:",n/* .fontFamily.inter */.I8.inter,";")}}},36352:function(e,t,r){"use strict";r.d(t,{Z:()=>i});var n=e=>{var{each:t,children:r,fallback:n=null}=e;if(t.length===0){return n}return t.map((e,t)=>{return r(e,t)})};/* ESM default export */const i=n},17106:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(22456);var i=e=>{return(0,n/* .isDefined */.$K)(e)&&!!e};var a=e=>{var{when:t,children:r,fallback:n=null}=e;var a=i(t);if(a){return typeof r==="function"?r(t):r}return n};/* ESM default export */const o=a},52357:function(e,t,r){"use strict";r.d(t,{v:()=>s});/* ESM import */var n=r(7409);/* ESM import */var i=r(98848);/* ESM import */var a=r(35944);/* ESM import */var o=r(72501);var s=e=>{return t=>{var{visibilityKey:r}=t,s=(0,i._)(t,["visibilityKey"]);var u=(0,o/* ["default"] */.Z)(r);if(!u){return null}// @ts-ignore
return/*#__PURE__*/(0,a/* .jsx */.tZ)(e,(0,n._)({},s))}}},54354:function(e,t,r){"use strict";r.d(t,{XJ:()=>f,_7:()=>d,ru:()=>l});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(98848);/* ESM import */var o=r(35944);/* ESM import */var s=r(6154);/* ESM import */var u=r(14909);var l=/*#__PURE__*/function(e){e[e["slideDown"]=0]="slideDown";e[e["slideUp"]=1]="slideUp";e[e["slideLeft"]=2]="slideLeft";e[e["slideRight"]=3]="slideRight";e[e["collapseExpand"]=4]="collapseExpand";e[e["zoomIn"]=5]="zoomIn";e[e["zoomOut"]=6]="zoomOut";e[e["fadeIn"]=7]="fadeIn";e[e["sidebar"]=8]="sidebar";return e}({});var c=100;var d=e=>{var{data:t,animationType:r=4,slideThreshold:i=20,animationDuration:a=150,minOpacity:o=0,maxOpacity:l=1,easing:d=s/* .easings.easeInOutQuad */.Z5.easeInOutQuad,debounceMeasure:f=false,keys:p}=e;var h=Array.isArray(t)?t.length>0:!!t;var[v,m]=(0,u/* ["default"] */.Z)({debounce:f?a+c:0});var g=(0,s/* .useSpring */.q_)({from:{height:0,opacity:o,y:0},to:{height:h?m.height:0,opacity:h?l:o,y:h?0:i*-1},config:{duration:a,easing:d}});var b=(0,s/* .useSpring */.q_)({from:{x:0},to:{x:h?0:i*-1},config:{duration:a,easing:d}});var y={x:0,y:0};switch(r){case 0:y.y=i*-1;y.x=0;break;case 1:y.y=i;y.x=0;break;case 2:y.x=i;y.y=0;break;case 3:y.x=i*-1;y.y=0;break}var _=(0,s/* .useTransition */.Yz)(t,{keys:p||(e=>{return e}),from:(0,n._)({opacity:o},y,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),enter:(0,n._)({opacity:l,x:0,y:0},r===5&&{transform:"scale(1)"},r===6&&{transform:"scale(1)"},r===7&&{opacity:1}),leave:(0,n._)({opacity:o},y,r===5&&{transform:"scale(0.8)"},r===6&&{transform:"scale(1.2)"},r===7&&{opacity:0}),config:{duration:a,easing:d}});return{animationStyle:r===8?b:g,ref:v,transitions:_}};var f=e=>{var{children:t,style:r,hideOnOverflow:u=true}=e,l=(0,a._)(e,["children","style","hideOnOverflow"]);return/*#__PURE__*/(0,o/* .jsx */.tZ)(s/* .animated.div */.q.div,(0,i._)((0,n._)({},l),{style:(0,i._)((0,n._)({},r),{overflow:u?"hidden":"initial"}),children:t}))}},93283:function(e,t,r){"use strict";r.d(t,{J:()=>o});/* ESM import */var n=r(22456);/* ESM import */var i=r(89250);/* ESM import */var a=r(12599);var o=e=>{var t=(0,i/* .useLocation */.TH)();var r=(0,a/* .matchRoutes */.fp)(e,t);if(!(0,n/* .isDefined */.$K)(r)){return t.pathname}var o=r.find(e=>e.pathname===t.pathname);return(o===null||o===void 0?void 0:o.route.path)||""}},37861:function(e,t,r){"use strict";r.d(t,{O:()=>u});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(87363);/* ESM import */var o=/*#__PURE__*/r.n(a);/* ESM import */var s=r(52293);var u=e=>{var[t,r]=(0,a.useState)();var o=(0,s/* .useForm */.cI)(e);return(0,i._)((0,n._)({},o),{submitError:t,setSubmitError:r})}},98567:function(e,t,r){"use strict";r.d(t,{Uv:()=>A,VC:()=>x,h_:()=>w,lM:()=>R});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(35944);/* ESM import */var o=r(70917);/* ESM import */var s=r(87363);/* ESM import */var u=/*#__PURE__*/r.n(s);/* ESM import */var l=r(61533);/* ESM import */var c=/*#__PURE__*/r.n(l);/* ESM import */var d=r(62067);/* ESM import */var f=r(63260);/* ESM import */var p=r(74053);/* ESM import */var h=r(60860);/* ESM import */var v=r(54354);/* ESM import */var m=r(68675);/* ESM import */var g=r(29535);/* ESM import */var b=r(34403);var y={SAFE_MARGIN:12,MAX_OFFSET_VERTICAL:6,MAX_OFFSET_HORIZONTAL:12,CENTER_OFFSET:8};var _=4;var w={TOP:"top",TOP_LEFT:"topLeft",TOP_RIGHT:"topRight",RIGHT:"right",RIGHT_TOP:"rightTop",RIGHT_BOTTOM:"rightBottom",BOTTOM:"bottom",BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:"bottomRight",LEFT:"left",LEFT_TOP:"leftTop",LEFT_BOTTOM:"leftBottom",MIDDLE:"middle",ABSOLUTE_CENTER:"absoluteCenter"};var x=e=>{var t={[w.TOP]:w.TOP,[w.TOP_LEFT]:w.TOP_RIGHT,[w.TOP_RIGHT]:w.TOP_LEFT,[w.RIGHT]:w.LEFT,[w.RIGHT_TOP]:w.LEFT_TOP,[w.RIGHT_BOTTOM]:w.LEFT_BOTTOM,[w.BOTTOM]:w.BOTTOM,[w.BOTTOM_LEFT]:w.BOTTOM_RIGHT,[w.BOTTOM_RIGHT]:w.BOTTOM_LEFT,[w.LEFT]:w.RIGHT,[w.LEFT_TOP]:w.RIGHT_TOP,[w.LEFT_BOTTOM]:w.RIGHT_BOTTOM,[w.MIDDLE]:w.MIDDLE,[w.ABSOLUTE_CENTER]:w.ABSOLUTE_CENTER};return t[e]||e};var E=e=>{return{top:e.top,left:-e.left}};var Z=(e,t)=>{var{width:r,height:n}=t;return{top:e.top<0,bottom:e.top+n>window.innerHeight,left:e.left<0,right:e.left+r>window.innerWidth}};var S=(e,t)=>{return e.startsWith("top")&&t.top||e.startsWith("bottom")&&t.bottom||e.startsWith("left")&&t.left||e.startsWith("right")&&t.right};var O=(e,t,r,n,i)=>{var{width:a,height:o}=r;var{top:s,left:u}=i;var l=t.left+t.width/2-a/2;var c=t.top+t.height/2-o/2;var d={[w.TOP]:{top:t.top-o-n,left:l},[w.TOP_LEFT]:{top:t.top-o-n,left:t.left},[w.TOP_RIGHT]:{top:t.top-o-n,left:t.right-a},[w.BOTTOM]:{top:t.bottom+n,left:l},[w.BOTTOM_LEFT]:{top:t.bottom+n,left:t.left},[w.BOTTOM_RIGHT]:{top:t.bottom+n,left:t.right-a},[w.LEFT]:{top:c,left:t.left-a-n},[w.LEFT_TOP]:{top:t.top,left:t.left-a-n},[w.LEFT_BOTTOM]:{top:t.bottom-o,left:t.left-a-n},[w.RIGHT]:{top:c,left:t.right+n},[w.RIGHT_TOP]:{top:t.top,left:t.right+n},[w.RIGHT_BOTTOM]:{top:t.bottom-o,left:t.right+n},[w.MIDDLE]:{top:c,left:l},[w.ABSOLUTE_CENTER]:{top:window.innerHeight/2-o/2,left:window.innerWidth/2-a/2}};var f=d[e]||d[w.BOTTOM];return{top:f.top+s,left:f.left+u}};var k=(e,t,r,n,i,a)=>{var o={[w.TOP]:w.BOTTOM,[w.TOP_LEFT]:w.BOTTOM_LEFT,[w.TOP_RIGHT]:w.BOTTOM_RIGHT,[w.BOTTOM]:w.TOP,[w.BOTTOM_LEFT]:w.TOP_LEFT,[w.BOTTOM_RIGHT]:w.TOP_RIGHT,[w.LEFT]:w.RIGHT,[w.LEFT_TOP]:w.RIGHT_TOP,[w.LEFT_BOTTOM]:w.RIGHT_BOTTOM,[w.RIGHT]:w.LEFT,[w.RIGHT_TOP]:w.LEFT_TOP,[w.RIGHT_BOTTOM]:w.LEFT_BOTTOM,[w.MIDDLE]:w.MIDDLE,[w.ABSOLUTE_CENTER]:w.ABSOLUTE_CENTER};var s=Z(e,r);var u=S(t,s);if(!u){return{position:e,placement:t}}// Try opposite placement
var l=o[t];var c=O(l,n,r,i,a);var d=Z(c,r);var f=S(l,d);if(!f){return{position:c,placement:l}}return{position:e,placement:t}};var T=(e,t,r,n)=>{var{width:i,height:a}=n;// Skip arrow for covered triggers or special placements
var o=[w.MIDDLE,w.ABSOLUTE_CENTER].includes(e);var s=r.left<t.left+y.SAFE_MARGIN&&r.left+i>t.right-y.SAFE_MARGIN&&r.top<t.top+y.SAFE_MARGIN&&r.top+a>t.bottom-y.SAFE_MARGIN;if(o||s)return{};var u=e.startsWith("top")||e.startsWith("bottom");var l=e.startsWith("left")||e.startsWith("right");if(u){var c=t.left+t.width/2;var d=Math.max(y.SAFE_MARGIN,Math.min(i-y.MAX_OFFSET_VERTICAL,c-r.left))-y.CENTER_OFFSET;if(p/* .isRTL */.dZ){d=i-d-y.CENTER_OFFSET*2}return{arrowLeft:d}}if(l){var f=t.top+t.height/2;var h=Math.max(y.SAFE_MARGIN,Math.min(a-y.MAX_OFFSET_HORIZONTAL,f-r.top))-y.CENTER_OFFSET;return{arrowTop:h}}return{}};var C=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_;var{width:n,height:i}=t;return{left:Math.max(r,Math.min(window.innerWidth-n-r,e.left)),top:Math.max(r,Math.min(window.innerHeight-i-r,e.top))}};var R=e=>{var{isOpen:t,triggerRef:r,placement:a=w.BOTTOM,arrow:o=false,gap:u=10,autoAdjustOverflow:l=true,positionModifier:c={top:0,left:0},dependencies:d=[]}=e;var f=(0,s.useMemo)(()=>r||{current:null},[r]);var h=(0,s.useRef)(null);var[v,m]=(0,s.useState)(0);var[g,b]=(0,s.useState)({left:0,top:0,placement:w.BOTTOM});var y=(0,s.useMemo)(()=>{return p/* .isRTL */.dZ?x(a):a},[a]);var _=(0,s.useMemo)(()=>{return p/* .isRTL */.dZ?E(c):c},[c]);(0,s.useEffect)(()=>{if(!f.current)return;m(f.current.getBoundingClientRect().width)},[f]);(0,s.useEffect)(()=>{if(!t||!f.current||!h.current)return;var e=f.current.getBoundingClientRect();var r=h.current.getBoundingClientRect();var a={width:r.width||e.width,height:r.height};var s=O(y,e,a,u,_);var c=y;if(l){var d=k(s,y,a,e,u,_);s=d.position;c=d.placement}s=C(s,a);var p=o?T(c,e,s,a):{};b((0,n._)((0,i._)((0,n._)({},s),{placement:c}),p))},[f,h,t,y,_,u,o,l,// eslint-disable-next-line react-hooks/exhaustive-deps
...d]);return{position:g,triggerWidth:v,triggerRef:f,popoverRef:h}};var A=e=>{var{isOpen:t,children:r,onClickOutside:n,onEscape:i,animationType:o=v/* .AnimationType.slideDown */.ru.slideDown}=e;var{hasModalOnStack:u}=(0,f/* .useModal */.d)();(0,m/* .useScrollLock */.Pr)(t);(0,s.useEffect)(()=>{var e=e=>{if(e.key==="Escape"){i===null||i===void 0?void 0:i()}};if(!t)return;document.addEventListener("keydown",e,true);return()=>{document.removeEventListener("keydown",e,true)}},[t,u,i]);var{transitions:c}=(0,v/* .useAnimation */._7)({data:t,animationType:o});return c((e,t)=>{if(!t){return null}return/*#__PURE__*/(0,l.createPortal)(/*#__PURE__*/(0,a/* .jsx */.tZ)(v/* .AnimatedDiv */.XJ,{css:M.wrapper,style:e,children:/*#__PURE__*/(0,a/* .jsx */.tZ)(d/* ["default"] */.Z,{children:/*#__PURE__*/(0,a/* .jsxs */.BX)("div",{className:"tutor-portal-popover",role:"presentation",children:[/*#__PURE__*/(0,a/* .jsx */.tZ)("div",{css:M.backdrop,onKeyUp:b/* .noop */.ZT,onClick:e=>{e.stopPropagation();n===null||n===void 0?void 0:n()}}),r]})})}),document.body)})};var M={wrapper:/*#__PURE__*/(0,o/* .css */.iv)("position:fixed;z-index:",h/* .zIndex.highest */.W5.highest,";inset:0;"),backdrop:/*#__PURE__*/(0,o/* .css */.iv)(g/* .styleUtils.centeredFlex */.i.centeredFlex,";position:fixed;inset:0;z-index:",h/* .zIndex.negative */.W5.negative,";")}},68675:function(e,t,r){"use strict";r.d(t,{Pr:()=>h});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=null;var o=[];var s=null;var u=()=>{if(a!==null)return a;var e=document.createElement("div");e.style.visibility="hidden";e.style.overflow="scroll";e.style.width="100px";document.body.appendChild(e);var t=document.createElement("div");t.style.width="100%";e.appendChild(t);a=e.offsetWidth-t.offsetWidth;document.body.removeChild(e);return a};var l=()=>{if(s){return}var e=u();var t=window.innerWidth>document.documentElement.clientWidth;s={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight};document.body.style.overflow="hidden";if(t&&e>0){var r=parseInt(window.getComputedStyle(document.body).paddingRight||"0",10);document.body.style.paddingRight="".concat(r+e,"px")}};var c=()=>{if(!s){return}document.body.style.overflow=s.overflow;document.body.style.paddingRight=s.paddingRight;s=null};var d=()=>{var e=Symbol("scroll-lock");o.push(e);if(o.length===1){l()}return e};var f=new Set;var p=e=>{var t=o.indexOf(e);if(t===-1){return}o.splice(t,1);f.delete(e);if(o.length===0&&f.size===0){c()}};var h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:true;var t=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!e){if(t.current){p(t.current);t.current=null}return}t.current=d();return()=>{if(t.current){var e=t.current;t.current=null;f.add(e);requestAnimationFrame(()=>{p(e)})}}},[e])}},30633:function(e,t,r){"use strict";r.d(t,{U:()=>a});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);var a=e=>{var{options:t,isOpen:r,onSelect:i,onClose:a,selectedValue:o}=e;var[s,u]=(0,n.useState)(-1);var l=(0,n.useCallback)(e=>{if(!r)return;var n=(e,r)=>{var n;var i=e;var a=r==="down"?1:-1;do{i+=a;if(i<0)i=t.length-1;if(i>=t.length)i=0}while(i>=0&&i<t.length&&t[i].disabled)if((n=t[i])===null||n===void 0?void 0:n.disabled){return e}return i};switch(e.key){case"ArrowDown":e.preventDefault();u(e=>{var t=n(e===-1?0:e,"down");return t});break;case"ArrowUp":e.preventDefault();u(e=>{var t=n(e===-1?0:e,"up");return t});break;case"Enter":e.preventDefault();e.stopPropagation();if(s>=0&&s<t.length){var o=t[s];if(!o.disabled){a();i(o)}}break;case"Escape":e.preventDefault();e.stopPropagation();a();break;default:break}},[r,t,s,i,a]);(0,n.useEffect)(()=>{if(r){if(s===-1){var e=t.findIndex(e=>e.value===o);var n=e>=0?e:t.findIndex(e=>!e.disabled);u(n)}document.addEventListener("keydown",l,true);return()=>document.removeEventListener("keydown",l,true)}},[r,l,t,o,s]);(0,n.useEffect)(()=>{if(!r){u(-1)}},[r]);var c=(0,n.useCallback)(e=>{var r;if(!((r=t[e])===null||r===void 0?void 0:r.disabled)){u(e)}},[t]);return{activeIndex:s,setActiveIndex:c}}},72501:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(87363);/* ESM import */var i=/*#__PURE__*/r.n(n);/* ESM import */var a=r(34039);/* ESM import */var o=r(22456);/**
 * Custom hook to control the visibility of fields based on the provided visibility key and context.
 *
 * @param {string} visibilityKey - The key used to determine the visibility of the field.
 * @returns {boolean} - Returns true if the field should be visible, false otherwise.
 */var s=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return(0,n.useMemo)(()=>{var t;// If no visibility key provided, always show the field
if(!(0,o/* .isDefined */.$K)(e)){return true}var[r,n]=(e===null||e===void 0?void 0:e.split("."))||[];if(!(0,o/* .isDefined */.$K)(r)||!(0,o/* .isDefined */.$K)(n)){return true}var i=a/* .tutorConfig */.y===null||a/* .tutorConfig */.y===void 0?void 0:(t=a/* .tutorConfig.visibility_control */.y.visibility_control)===null||t===void 0?void 0:t[r];if(!i){return true}var s=a/* .tutorConfig.current_user.roles */.y.current_user.roles;var u=s.includes("administrator")?"admin":"instructor";var l="".concat(n,"_").concat(u);if(!Object.keys(i).includes(l)){return true}return i[l]==="on"},[e])};/* ESM default export */const u=s},97669:function(e,t,r){"use strict";r.d(t,{Z:()=>g});/* ESM import */var n=r(58865);/* ESM import */var i=r(35944);/* ESM import */var a=r(70917);/* ESM import */var o=r(74053);/* ESM import */var s=r(60860);/* ESM import */var u=r(54354);/* ESM import */var l=r(98567);function c(){var e=(0,n._)(["\n              border-left: 8px solid transparent;\n              border-right: 8px solid transparent;\n              border-top: 8px solid ",";\n              border-bottom: none;\n              left: ",";\n              bottom: -8px;\n              transform: ",";\n            "]);c=function t(){return e};return e}function d(){var e=(0,n._)(["\n              border-left: 8px solid transparent;\n              border-right: 8px solid transparent;\n              border-bottom: 8px solid ",";\n              border-top: none;\n              left: ",";\n              top: -8px;\n              transform: ",";\n            "]);d=function t(){return e};return e}function f(){var e=(0,n._)(["\n              border-top: 8px solid transparent;\n              border-bottom: 8px solid transparent;\n              border-left: 8px solid ",";\n              border-right: none;\n              right: -8px;\n              top: ",";\n              transform: ",";\n            "]);f=function t(){return e};return e}function p(){var e=(0,n._)(["\n              border-top: 8px solid transparent;\n              border-bottom: 8px solid transparent;\n              border-right: 8px solid ",";\n              border-left: none;\n              left: -8px;\n              top: ",";\n              transform: ",";\n            "]);p=function t(){return e};return e}function h(){var e=(0,n._)(["\n            content: '';\n            position: absolute;\n            width: 0;\n            height: 0;\n            border-color: transparent;\n            border-style: solid;\n            ","\n            ","\n            ","\n            ","\n          "]);h=function t(){return e};return e}var v=e=>{var{children:t,placement:r=l/* .POPOVER_PLACEMENTS.BOTTOM */.h_.BOTTOM,triggerRef:n,isOpen:a,gap:s,maxWidth:c,closePopover:d,closeOnEscape:f=true,animationType:p=u/* .AnimationType.slideLeft */.ru.slideLeft,arrow:h=false,autoAdjustOverflow:v=true,positionModifier:g={top:0,left:0},dependencies:b=[]}=e;var{position:y,triggerWidth:_,popoverRef:w}=(0,l/* .usePortalPopover */.lM)({triggerRef:n,isOpen:a,autoAdjustOverflow:v,placement:r,arrow:h,gap:s,positionModifier:g,dependencies:b});return/*#__PURE__*/(0,i/* .jsx */.tZ)(l/* .Portal */.Uv,{isOpen:a,onClickOutside:d,animationType:p,onEscape:f?d:undefined,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("div",{css:m.wrapper({placement:o/* .isRTL */.dZ?(0,l/* .getMirroredPlacement */.VC)(y.placement):y.placement,hideArrow:!h||y.arrowLeft===undefined&&y.arrowTop===undefined,arrowLeft:y.arrowLeft,arrowTop:y.arrowTop}),style:{left:y.left,top:y.top,maxWidth:c!==null&&c!==void 0?c:_},ref:w,children:/*#__PURE__*/(0,i/* .jsx */.tZ)("div",{css:m.content,children:t})})})};var m={wrapper:e=>{var{placement:t,hideArrow:r,arrowLeft:n,arrowTop:i}=e;return/*#__PURE__*/(0,a/* .css */.iv)("position:absolute;width:100%;z-index:",s/* .zIndex.dropdown */.W5.dropdown,";&::before{",t&&!r?(0,a/* .css */.iv)(h(),t.startsWith("top")&&(0,a/* .css */.iv)(c(),s/* .colorTokens.stroke.white */.Jv.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("bottom")&&(0,a/* .css */.iv)(d(),s/* .colorTokens.stroke.white */.Jv.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("left")&&(0,a/* .css */.iv)(f(),s/* .colorTokens.stroke.white */.Jv.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none"),t.startsWith("right")&&(0,a/* .css */.iv)(p(),s/* .colorTokens.stroke.white */.Jv.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none")):"","}")},content:/*#__PURE__*/(0,a/* .css */.iv)("background-color:",s/* .colorTokens.background.white */.Jv.background.white,";box-shadow:",s/* .shadow.popover */.AF.popover,";border-radius:",s/* .borderRadius["6"] */.E0["6"],";::-webkit-scrollbar{background-color:",s/* .colorTokens.background.white */.Jv.background.white,";width:10px;}::-webkit-scrollbar-thumb{background-color:",s/* .colorTokens.action.secondary["default"] */.Jv.action.secondary["default"],";border-radius:",s/* .borderRadius["6"] */.E0["6"],";}")};/* ESM default export */const g=v},15287:function(e,t,r){"use strict";r.d(t,{F3:()=>S,H9:()=>y,LK:()=>k,QL:()=>d,W8:()=>A,Ye:()=>E,e3:()=>g,px:()=>v,tg:()=>C,vN:()=>p,wl:()=>w});/* ESM import */var n=r(7409);/* ESM import */var i=r(65228);/* ESM import */var a=r(99469);/* ESM import */var o=r(13985);/* ESM import */var s=r(82340);/* ESM import */var u=r(84225);/* ESM import */var l=r(34403);var c=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].GENERATE_AI_IMAGE */.Z.GENERATE_AI_IMAGE,e)};var d=()=>{return(0,i/* .useMutation */.D)({mutationFn:c})};var f=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].MAGIC_FILL_AI_IMAGE */.Z.MAGIC_FILL_AI_IMAGE,e).then(e=>e.data.data[0].b64_json)};var p=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:f,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var h=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].MAGIC_TEXT_GENERATION */.Z.MAGIC_TEXT_GENERATION,e)};var v=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:h,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var m=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].MAGIC_AI_MODIFY_CONTENT */.Z.MAGIC_AI_MODIFY_CONTENT,e)};var g=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:m,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var b=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].USE_AI_GENERATED_IMAGE */.Z.USE_AI_GENERATED_IMAGE,e)};var y=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:b,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var _=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].GENERATE_COURSE_CONTENT */.Z.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var w=e=>{var{showToast:t}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationKey:["GenerateCourseContent",e],mutationFn:_,onError:e=>{t({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(e)})}})};var x=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].GENERATE_COURSE_CONTENT */.Z.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var E=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:x,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var Z=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].GENERATE_COURSE_TOPIC_CONTENT */.Z.GENERATE_COURSE_TOPIC_CONTENT,e,{signal:e.signal})};var S=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:Z,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var O=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].SAVE_AI_GENERATED_COURSE_CONTENT */.Z.SAVE_AI_GENERATED_COURSE_CONTENT,e)};var k=()=>{var{showToast:e}=(0,o/* .useToast */.p)();var t=(0,a/* .useQueryClient */.NL)();return(0,i/* .useMutation */.D)({mutationFn:O,onSuccess(){t.invalidateQueries({queryKey:["CourseDetails"]})},onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var T=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].GENERATE_QUIZ_QUESTIONS */.Z.GENERATE_QUIZ_QUESTIONS,e,{signal:e.signal})};var C=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:T,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})};var R=e=>{return s/* .wpAjaxInstance.post */.R.post(u/* ["default"].OPEN_AI_SAVE_SETTINGS */.Z.OPEN_AI_SAVE_SETTINGS,(0,n._)({},e))};var A=()=>{var{showToast:e}=(0,o/* .useToast */.p)();return(0,i/* .useMutation */.D)({mutationFn:R,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.Mo)(t)})}})}},82340:function(e,t,r){"use strict";r.d(t,{B:()=>l,R:()=>c});/* ESM import */var n=r(7409);/* ESM import */var i=r(99282);/* ESM import */var a=r(12008);/* ESM import */var o=r(34039);/* ESM import */var s=r(17673);/* ESM import */var u=r(2713);a/* ["default"].defaults.paramsSerializer */.Z.defaults.paramsSerializer=e=>{return s.stringify(e)};var l=a/* ["default"].create */.Z.create({baseURL:o/* ["default"].WP_API_BASE_URL */.Z.WP_API_BASE_URL});l.interceptors.request.use(e=>{var t;(t=e).headers||(t.headers={});e.headers["X-WP-Nonce"]=o/* .tutorConfig.wp_rest_nonce */.y.wp_rest_nonce;if(e.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())){if(e.data){e.data=(0,u/* .convertToFormData */.wh)(e.data,e.method)}if(["put","patch"].includes(e.method.toLowerCase())){e.method="POST"}}if(e.params){e.params=(0,u/* .serializeParams */.tW)(e.params)}if(e.method&&["get","delete"].includes(e.method.toLowerCase())){e.params=(0,i._)((0,n._)({},e.params),{_method:e.method})}return e},e=>{return Promise.reject(e)});l.interceptors.response.use(e=>{return Promise.resolve(e).then(e=>e)});var c=a/* ["default"].create */.Z.create({baseURL:o/* ["default"].WP_AJAX_BASE_URL */.Z.WP_AJAX_BASE_URL});c.interceptors.request.use(e=>{var t,r;(t=e).headers||(t.headers={});// config.headers['X-WP-Nonce'] = tutorConfig._tutor_nonce;
// We will use REST methods while using but wp ajax only sent via post method.
e.method="POST";if(e.params){e.params=(0,u/* .serializeParams */.tW)(e.params)}(r=e).data||(r.data={});var a=o/* .tutorConfig.nonce_key */.y.nonce_key;var s=o/* .tutorConfig._tutor_nonce */.y._tutor_nonce;e.data=(0,i._)((0,n._)({},e.data,e.params),{action:e.url,[a]:s});e.data=(0,u/* .convertToFormData */.wh)(e.data,e.method);e.params={};e.url=undefined;return e},e=>Promise.reject(e));c.interceptors.response.use(e=>Promise.resolve(e).then(e=>e.data))},78151:function(e,t,r){"use strict";r.d(t,{Y:()=>a});/* ESM import */var n=r(22456);/* ESM import */var i=r(34403);var a=(e,t)=>{return r=>{var{variants:a,defaultVariants:o}=e;var s=[];if((0,n/* .isDefined */.$K)(t)){s.push(t)}var u=(0,i/* .getObjectKeys */.Zt)(a).map(e=>{var t=r[e];var n=o[e];if(t===null){return null}var i=t||n;return a[e][i]});s.push(...u.filter(n/* .isDefined */.$K));return s}}},84225:function(e,t,r){"use strict";r.d(t,{Z:()=>i});var n={ADMIN_AJAX:"wp-admin/admin-ajax.php",TAGS:"course-tag",CATEGORIES:"course-category",USERS:"users",USERS_LIST:"tutor_user_list",ORDER_DETAILS:"tutor_order_details",ADMIN_COMMENT:"tutor_order_comment",ORDER_MARK_AS_PAID:"tutor_order_paid",ORDER_REFUND:"tutor_order_refund",ORDER_CANCEL:"tutor_order_cancel",ADD_ORDER_DISCOUNT:"tutor_order_discount",COURSE_LIST:"course_list",BUNDLE_LIST:"tutor_get_bundle_list",CATEGORY_LIST:"category_list",CREATED_COURSE:"tutor_create_course",TUTOR_INSTRUCTOR_SEARCH:"tutor_course_instructor_search",TUTOR_YOUTUBE_VIDEO_DURATION:"tutor_youtube_video_duration",TUTOR_UNLINK_PAGE_BUILDER:"tutor_unlink_page_builder",// AI CONTENT GENERATION
GENERATE_AI_IMAGE:"tutor_pro_generate_image",MAGIC_FILL_AI_IMAGE:"tutor_pro_magic_fill_image",MAGIC_TEXT_GENERATION:"tutor_pro_generate_text_content",MAGIC_AI_MODIFY_CONTENT:"tutor_pro_modify_text_content",USE_AI_GENERATED_IMAGE:"tutor_pro_use_magic_image",OPEN_AI_SAVE_SETTINGS:"tutor_pro_chatgpt_save_settings",GENERATE_COURSE_CONTENT:"tutor_pro_generate_course_content",GENERATE_COURSE_TOPIC_CONTENT:"tutor_pro_generate_course_topic_content",SAVE_AI_GENERATED_COURSE_CONTENT:"tutor_pro_ai_course_create",GENERATE_QUIZ_QUESTIONS:"tutor_pro_generate_quiz_questions",// SUBSCRIPTION
GET_SUBSCRIPTIONS_LIST:"tutor_subscription_plans",SAVE_SUBSCRIPTION:"tutor_subscription_plan_save",DELETE_SUBSCRIPTION:"tutor_subscription_plan_delete",DUPLICATE_SUBSCRIPTION:"tutor_subscription_plan_duplicate",SORT_SUBSCRIPTION:"tutor_subscription_plan_sort",// COURSE
GET_COURSE_DETAILS:"tutor_course_details",UPDATE_COURSE:"tutor_update_course",GET_COURSE_LIST:"tutor_course_list",// WOO COMMERCE PRODUCTS
GET_WC_PRODUCTS:"tutor_get_wc_products",GET_WC_PRODUCT_DETAILS:"tutor_get_wc_product",// QUIZ
GET_QUIZ_DETAILS:"tutor_quiz_details",SAVE_QUIZ:"tutor_quiz_builder_save",QUIZ_IMPORT_DATA:"quiz_import_data",QUIZ_EXPORT_DATA:"quiz_export_data",DELETE_QUIZ:"tutor_quiz_delete",// ZOOM
GET_ZOOM_MEETING_DETAILS:"tutor_zoom_meeting_details",SAVE_ZOOM_MEETING:"tutor_zoom_save_meeting",DELETE_ZOOM_MEETING:"tutor_zoom_delete_meeting",// GOOGLE MEET
GET_GOOGLE_MEET_DETAILS:"tutor_google_meet_meeting_details",SAVE_GOOGLE_MEET:"tutor_google_meet_new_meeting",DELETE_GOOGLE_MEET:"tutor_google_meet_delete",// TOPIC
GET_COURSE_CONTENTS:"tutor_course_contents",SAVE_TOPIC:"tutor_save_topic",DELETE_TOPIC:"tutor_delete_topic",DELETE_TOPIC_CONTENT:"tutor_delete_lesson",UPDATE_COURSE_CONTENT_ORDER:"tutor_update_course_content_order",DUPLICATE_CONTENT:"tutor_duplicate_content",ADD_CONTENT_BANK_CONTENT_TO_COURSE:"tutor_content_bank_add_content_to_course",DELETE_CONTENT_BANK_CONTENT_FROM_COURSE:"tutor_content_bank_remove_content_from_course",// LESSON
GET_LESSON_DETAILS:"tutor_lesson_details",SAVE_LESSON:"tutor_save_lesson",// ASSIGNMENT
GET_ASSIGNMENT_DETAILS:"tutor_assignment_details",SAVE_ASSIGNMENT:"tutor_assignment_save",// TAX SETTINGS
GET_TAX_SETTINGS:"tutor_get_tax_settings",GET_H5P_QUIZ_CONTENT:"tutor_h5p_list_quiz_contents",GET_H5P_LESSON_CONTENT:"tutor_h5p_list_lesson_contents",GET_H5P_QUIZ_CONTENT_BY_ID:"tutor_h5p_quiz_content_by_id",// PAYMENT SETTINGS
GET_PAYMENT_SETTINGS:"tutor_payment_settings",GET_PAYMENT_GATEWAYS:"tutor_payment_gateways",INSTALL_PAYMENT_GATEWAY:"tutor_install_payment_gateway",REMOVE_PAYMENT_GATEWAY:"tutor_remove_payment_gateway",// ADDON LIST
GET_ADDON_LIST:"tutor_get_all_addons",ADDON_ENABLE_DISABLE:"addon_enable_disable",// INSTALL PLUGIN
TUTOR_INSTALL_PLUGIN:"tutor_install_plugin",// COUPON
GET_COUPON_DETAILS:"tutor_coupon_details",CREATE_COUPON:"tutor_coupon_create",UPDATE_COUPON:"tutor_coupon_update",COUPON_APPLIES_TO:"tutor_coupon_applies_to_list",// ENROLLMENT
CREATE_ENROLLMENT:"tutor_enroll_bulk_student",GET_COURSE_BUNDLE_LIST:"tutor_course_bundle_list",GET_UNENROLLED_USERS:"tutor_unenrolled_users",// MEMBERSHIP
GET_MEMBERSHIP_PLANS:"tutor_membership_plans",SAVE_MEMBERSHIP_PLAN:"tutor_membership_plan_save",DUPLICATE_MEMBERSHIP_PLAN:"tutor_membership_plan_duplicate",DELETE_MEMBERSHIP_PLAN:"tutor_membership_plan_delete",// COURSE BUNDLE
GET_BUNDLE_DETAILS:"tutor_get_course_bundle_data",UPDATE_BUNDLE:"tutor_create_course_bundle",ADD_REMOVE_COURSE_TO_BUNDLE:"tutor_add_remove_course_to_bundle",// IMPORT EXPORT
GET_EXPORTABLE_CONTENT:"tutor_pro_exportable_contents",EXPORT_CONTENTS:"tutor_pro_export",EXPORT_SETTINGS_FREE:"tutor_export_settings",IMPORT_CONTENTS:"tutor_pro_import",IMPORT_SETTINGS_FREE:"tutor_import_settings",GET_IMPORT_EXPORT_HISTORY:"tutor_pro_export_import_history",DELETE_IMPORT_EXPORT_HISTORY:"tutor_pro_delete_export_import_history",// CONTENT BANK
GET_CONTENT_BANK_COLLECTIONS:"tutor_content_bank_collections",SAVE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_save",DELETE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_delete",GET_CONTENT_BANK_CONTENTS:"tutor_content_bank_contents",DELETE_CONTENT_BANK_CONTENTS:"tutor_content_bank_content_delete",GET_CONTENT_DETAILS:"tutor_pro_get_content_details",GET_CONTENT_BANK_LESSON_DETAILS:"tutor_content_bank_lesson_details",GET_CONTENT_BANK_ASSIGNMENT_DETAILS:"tutor_content_bank_assignment_details",SAVE_CONTENT_BANK_LESSON_CONTENT:"tutor_content_bank_lesson_save",SAVE_CONTENT_BANK_ASSIGNMENT_CONTENT:"tutor_content_bank_assignment_save",SAVE_QUESTION_CONTENT:"tutor_content_bank_question_save",GET_CONTENT_BANK_QUESTION_DETAILS:"tutor_content_bank_question_details",DUPLICATE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_duplicate",MOVE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_move",DUPLICATE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_duplicate",IMPORT_FROM_COURSES:"tutor_content_bank_content_synchronize"};/* ESM default export */const i=n},2713:function(e,t,r){"use strict";r.d(t,{tW:()=>c,wh:()=>l});/* ESM import */var n=r(34403);/* ESM import */var i=r(22456);var a=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.keys(e).reduce((r,n)=>{var i=e[n];if(typeof i==="object"&&!isPrimitivesArray(i)&&!isFileOrBlob(i)){return _object_spread({},r,a(_object_spread({},i),"".concat(t).concat(n,".")))}return _object_spread_props(_object_spread({},r),{["".concat(t).concat(n)]:i})},{})};var o=(e,t)=>{var r=e;if(r.status===404||r.status===403||r.status===500){return{nonFieldErrors:["Unexpected error!"]}}var n=a(t);var i=a(r.data);var{non_field_errors:o}=i,s=_object_without_properties(i,["non_field_errors"]);var u=isStringArray(o)?o:[];for(var l of Object.keys(s)){if(!(l in n)){var c=i[l];if(isStringArray(c)){u.push(...c)}}}return{nonFieldErrors:u.map(translateBeErrorMessage),fieldErrors:Object.keys(i).filter(e=>e in n).reduce((e,t)=>{var r=i[t];if(isStringArray(r)){return _object_spread_props(_object_spread({},e),{[t]:r.map(translateBeErrorMessage)})}return e},{})}};var s=(e,t,r)=>{if(!isAxiosError(e)||!e.response){throw e}var{fieldErrors:n,nonFieldErrors:i}=o(e.response,r);if(i===null||i===void 0?void 0:i.length){t.setSubmitError(i[0])}if(n){for(var a of Object.keys(n)){var s=n[a];if(s.length>0){t.setError(a,{message:s[0]})}}}};var u=(e,t)=>{return r=>_async_to_generator(function*(){e.setSubmitError(undefined);try{yield t(r)}catch(t){s(t,e,r)}})()};var l=(e,t)=>{var r=function(t){var r=e[t];if(Array.isArray(r)){r.forEach((e,r)=>{if((0,n/* .isFileOrBlob */.ub)(e)||(0,i/* .isString */.HD)(e)){a.append("".concat(t,"[").concat(r,"]"),e)}else if((0,i/* .isBoolean */.jn)(e)||(0,i/* .isNumber */.hj)(e)){a.append("".concat(t,"[").concat(r,"]"),e.toString())}else if(typeof e==="object"&&e!==null){a.append("".concat(t,"[").concat(r,"]"),JSON.stringify(e))}else{a.append("".concat(t,"[").concat(r,"]"),e)}})}else{if((0,n/* .isFileOrBlob */.ub)(r)||(0,i/* .isString */.HD)(r)){a.append(t,r)}else if((0,i/* .isBoolean */.jn)(r)){a.append(t,r.toString())}else if((0,i/* .isNumber */.hj)(r)){a.append(t,"".concat(r))}else if(typeof r==="object"&&r!==null){a.append(t,JSON.stringify(r))}else{a.append(t,r)}}};var a=new FormData;for(var o of Object.keys(e))r(o);a.append("_method",t.toUpperCase());return a};var c=e=>{var t={};for(var r in e){var n=e[r];if(!(0,i/* .isDefined */.$K)(n)){t[r]="null"}else if((0,i/* .isBoolean */.jn)(n)){t[r]=n===true?"true":"false"}else{t[r]=n}}return t}},29535:function(e,t,r){"use strict";r.d(t,{C:()=>c,i:()=>d});/* ESM import */var n=r(58865);/* ESM import */var i=r(60860);/* ESM import */var a=r(70917);/* ESM import */var o=r(76487);function s(){var e=(0,n._)(["\n      flex-direction: column;\n    "]);s=function t(){return e};return e}function u(){var e=(0,n._)(["\n      background-color: ",";\n    "]);u=function t(){return e};return e}function l(){var e=(0,n._)(["\n      cursor: grabbing;\n    "]);l=function t(){return e};return e}var c=()=>/*#__PURE__*/(0,a/* .css */.iv)("body.tutor-backend-tutor-content-bank{@media screen and (max-width:600px){#wpadminbar{position:fixed;}}}*,::after,::before{box-sizing:border-box;}html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0;font-family:",i/* .fontFamily.inter */.I8.inter,";height:100%;}main{display:block;}h1{font-size:2em;margin:0.67em 0;}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace,monospace;font-size:1em;}a{background-color:transparent;&:hover{color:inherit;}}li{list-style:none;margin:0;}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder;}code,kbd,samp{font-family:monospace,monospace;font-size:1em;}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sub{bottom:-0.25em;}sup{top:-0.5em;}img{border-style:none;}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible;}button,select{text-transform:none;}button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}fieldset{padding:0.35em 0.75em 0.625em;}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline;}textarea{overflow:auto;height:auto;}[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}[type='search']::-webkit-search-decoration{-webkit-appearance:none;}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block;}summary{display:list-item;}template{display:none;}[hidden]{display:none;}:is(h1,h2,h3,h4,h5,h6,p){padding:0;margin:0;text-transform:unset;}table{th{text-align:-webkit-match-parent;}}");var d={centeredFlex:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;justify-content:center;align-items:center;width:100%;height:100%;"),flexCenter:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,a/* .css */.iv)("display:flex;justify-content:center;align-items:center;flex-direction:row;",e==="column"&&(0,a/* .css */.iv)(s()))},boxReset:/*#__PURE__*/(0,a/* .css */.iv)("padding:0;"),ulReset:/*#__PURE__*/(0,a/* .css */.iv)("list-style:none;padding:0;margin:0;"),resetButton:/*#__PURE__*/(0,a/* .css */.iv)("background:none;border:none;outline:none;box-shadow:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.I8.inter,";cursor:pointer;"),cardInnerSection:/*#__PURE__*/(0,a/* .css */.iv)("padding:",i/* .spacing["20"] */.W0["20"]," ",i/* .spacing["20"] */.W0["20"]," ",i/* .spacing["24"] */.W0["24"]," ",i/* .spacing["20"] */.W0["20"],";display:flex;flex-direction:column;gap:",i/* .spacing["24"] */.W0["24"],";"),fieldGroups:e=>/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:column;gap:",i/* .spacing */.W0[e],";"),titleAliasWrapper:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:column;gap:",i/* .spacing["12"] */.W0["12"],";"),inlineSwitch:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;justify-content:space-between;align-items:center;"),overflowYAuto:/*#__PURE__*/(0,a/* .css */.iv)("overflow-y:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",i/* .colorTokens.primary["40"] */.Jv.primary["40"],";width:3px;}::-webkit-scrollbar-thumb{background-color:",i/* .colorTokens.design.brand */.Jv.design.brand,";border-radius:",i/* .borderRadius["30"] */.E0["30"],";}"),overflowXAuto:/*#__PURE__*/(0,a/* .css */.iv)("overflow-x:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",i/* .colorTokens.primary["40"] */.Jv.primary["40"],";height:3px;}::-webkit-scrollbar-thumb{background-color:",i/* .colorTokens.design.brand */.Jv.design.brand,";border-radius:",i/* .borderRadius["30"] */.E0["30"],";}"),textEllipsis:/*#__PURE__*/(0,a/* .css */.iv)("text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),container:/*#__PURE__*/(0,a/* .css */.iv)("width:",i/* .containerMaxWidth */.V4,"px;margin:0 auto;"),display:{flex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:",e,";")},inlineFlex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,a/* .css */.iv)("display:inline-flex;flex-direction:",e,";")},none:/*#__PURE__*/(0,a/* .css */.iv)("display:none;"),block:/*#__PURE__*/(0,a/* .css */.iv)("display:block;"),inlineBlock:/*#__PURE__*/(0,a/* .css */.iv)("display:inline-block;")},text:{ellipsis:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;return/*#__PURE__*/(0,a/* .css */.iv)("white-space:normal;display:-webkit-box;-webkit-line-clamp:",e,";-webkit-box-orient:vertical;overflow:hidden;-webkit-box-pack:end;")},align:{center:/*#__PURE__*/(0,a/* .css */.iv)("text-align:center;"),left:/*#__PURE__*/(0,a/* .css */.iv)("text-align:left;"),right:/*#__PURE__*/(0,a/* .css */.iv)("text-align:right;"),justify:/*#__PURE__*/(0,a/* .css */.iv)("text-align:justify;")}},inputFocus:/*#__PURE__*/(0,a/* .css */.iv)("box-shadow:none;border-color:",i/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;"),dateAndTimeWrapper:/*#__PURE__*/(0,a/* .css */.iv)("display:grid;grid-template-columns:5.5fr 4.5fr;border-radius:",i/* .borderRadius["6"] */.E0["6"],";position:relative;&::before{content:'';position:absolute;top:0;left:0;right:0;height:40px;outline:2px solid transparent;outline-offset:1px;border-radius:",i/* .borderRadius["6"] */.E0["6"],";pointer-events:none;z-index:1;transition:outline-color 0.2s ease-in-out;}&:focus-within::before{outline-color:",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";}> div{&:first-of-type{input{border-top-right-radius:0;border-bottom-right-radius:0;&:focus{box-shadow:none;outline:none;}}}&:last-of-type{input{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;&:focus{box-shadow:none;outline:none;}}}}"),inputCurrencyStyle:/*#__PURE__*/(0,a/* .css */.iv)("font-size:",i/* .fontSize["18"] */.JB["18"],";color:",i/* .colorTokens.icon.subdued */.Jv.icon.subdued,";"),crossButton:/*#__PURE__*/(0,a/* .css */.iv)("border:none;outline:none;padding:0;margin:0;text-align:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",i/* .borderRadius.circle */.E0.circle,";background:",i/* .colorTokens.background.white */.Jv.background.white,";transition:opacity 0.3s ease-in-out;svg{color:",i/* .colorTokens.icon["default"] */.Jv.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",i/* .colorTokens.icon.hover */.Jv.icon.hover,";}}:focus{box-shadow:",i/* .shadow.focus */.AF.focus,";}"),aiGradientText:/*#__PURE__*/(0,a/* .css */.iv)("background:",i/* .colorTokens.text.ai.gradient */.Jv.text.ai.gradient,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;"),actionButton:/*#__PURE__*/(0,a/* .css */.iv)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;color:",i/* .colorTokens.icon["default"] */.Jv.icon["default"],";display:flex;cursor:pointer;transition:color 0.3s ease-in-out;:hover:not(:disabled),:focus:not(:disabled),:active:not(:disabled){background:none;color:",i/* .colorTokens.icon.brand */.Jv.icon.brand,";}:disabled{color:",i/* .colorTokens.icon.disable.background */.Jv.icon.disable.background,";cursor:not-allowed;}:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;border-radius:",i/* .borderRadius["2"] */.E0["2"],";}"),backButton:/*#__PURE__*/(0,a/* .css */.iv)("background-color:transparent;width:32px;height:32px;padding:0;margin:0;flex-shrink:0;display:flex;align-items:center;justify-content:center;border:1px solid ",i/* .colorTokens.border.neutral */.Jv.border.neutral,";border-radius:",i/* .borderRadius["4"] */.E0["4"],";outline:none;color:",i/* .colorTokens.icon["default"] */.Jv.icon["default"],";transition:color 0.3s ease-in-out;cursor:pointer;:hover{color:",i/* .colorTokens.icon.hover */.Jv.icon.hover,";}&:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}"),optionCheckButton:/*#__PURE__*/(0,a/* .css */.iv)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.I8.inter,";cursor:pointer;height:32px;width:32px;border-radius:",i/* .borderRadius.circle */.E0.circle,";opacity:0;:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";}"),optionCounter:e=>{var{isEditing:t,isSelected:r=false}=e;return/*#__PURE__*/(0,a/* .css */.iv)("height:",i/* .spacing["24"] */.W0["24"],";width:",i/* .spacing["24"] */.W0["24"],";border-radius:",i/* .borderRadius.min */.E0.min,";",o/* .typography.caption */.c.caption("medium"),";color:",i/* .colorTokens.text.subdued */.Jv.text.subdued,";background-color:",i/* .colorTokens.background["default"] */.Jv.background["default"],";text-align:center;",r&&!t&&(0,a/* .css */.iv)(u(),i/* .colorTokens.bg.white */.Jv.bg.white))},optionDragButton:e=>{var{isOverlay:t}=e;return/*#__PURE__*/(0,a/* .css */.iv)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.I8.inter,";cursor:grab;display:flex;align-items:center;justify-content:center;transform:rotate(90deg);color:",i/* .colorTokens.icon["default"] */.Jv.icon["default"],";cursor:grab;place-self:center center;border-radius:",i/* .borderRadius["2"] */.E0["2"],";&:focus,&:active,&:hover{background:none;color:",i/* .colorTokens.icon["default"] */.Jv.icon["default"],";}:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}",t&&(0,a/* .css */.iv)(l()))},optionInputWrapper:/*#__PURE__*/(0,a/* .css */.iv)("display:flex;flex-direction:column;width:100%;gap:",i/* .spacing["12"] */.W0["12"],";input,textarea{background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.I8.inter,";",o/* .typography.caption */.c.caption(),";flex:1;color:",i/* .colorTokens.text.subdued */.Jv.text.subdued,";padding:",i/* .spacing["4"] */.W0["4"]," ",i/* .spacing["10"] */.W0["10"],";border:1px solid ",i/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";border-radius:",i/* .borderRadius["6"] */.E0["6"],";resize:vertical;cursor:text;&:focus{box-shadow:none;border-color:",i/* .colorTokens.stroke["default"] */.Jv.stroke["default"],";outline:2px solid ",i/* .colorTokens.stroke.brand */.Jv.stroke.brand,";outline-offset:1px;}}"),objectFit:function(){var{fit:e,position:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{fit:"cover",position:"center"};return/*#__PURE__*/(0,a/* .css */.iv)("object-fit:",e,";object-position:",t,";")},inputClearButton:/*#__PURE__*/(0,a/* .css */.iv)("position:absolute;top:50%;right:",i/* .spacing["4"] */.W0["4"],";transform:translateY(-50%);background-color:",i/* .colorTokens.background.white */.Jv.background.white,";border-radius:",i/* .borderRadius["2"] */.E0["2"],";&:not(:disabled):not([aria-disabled='true']):hover,&:not(:disabled):not([aria-disabled='true']):focus{background-color:",i/* .colorTokens.background.hover */.Jv.background.hover,";}")}},22456:function(e,t,r){"use strict";r.d(t,{$K:()=>a,HD:()=>o,Kn:()=>d,dP:()=>f,hj:()=>l,jn:()=>c});var n=(e,t)=>{return t in e};var i=e=>{return e.isAxiosError};var a=e=>{return e!==undefined&&e!==null};function o(e){return typeof e==="string"||e instanceof String}function s(e){return!!e&&Array.isArray(e)&&(!e.length||typeof e[0]!=="object")}function u(e){return s(e)&&(!e.length||typeof e[0]==="string"||e[0]instanceof String)}function l(e){return typeof e==="number"||e instanceof Number}function c(e){return typeof e==="boolean"||e instanceof Boolean}function d(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var f={NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"}},34403:function(e,t,r){"use strict";// EXPORTS
r.d(t,{o3:()=>/* binding */V,x0:()=>/* binding */C,aV:()=>/* binding */el,lL:()=>/* binding */ef,Zt:()=>/* binding */G,sZ:()=>/* binding */N,Xl:()=>/* binding */ea,ub:()=>/* binding */k,k6:()=>/* binding */es,Ao:()=>/* binding */M,qH:()=>/* binding */et,jv:()=>/* binding */q,td:()=>/* binding */z,TQ:()=>/* binding */I,Mo:()=>/* binding */en,WK:()=>/* binding */Y,ZT:()=>/* binding */Z,ro:()=>/* binding */eo,w6:()=>/* binding */S,P2:()=>/* binding */H,vj:()=>/* binding */P,hk:()=>/* binding */eu,nP:()=>/* binding */ee,vQ:()=>/* binding */er,yP:()=>/* binding */ei,VH:()=>/* binding */L,zt:()=>/* binding */X});// UNUSED EXPORTS: generateCouponCode, formatSeconds, objectToQueryParams, wait, makeFirstCharacterUpperCase, getValueInArray, arrayRange, transformParams, formatSubscriptionRepeatUnit, arrayIntersect, extractIdOnly, formatReadAbleBytesToBytes, assertIsDefined, hasDuplicateEntries, getObjectEntries, mapInBetween
// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_async_to_generator.js
var n=r(76150);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread.js
var i=r(7409);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread_props.js
var a=r(99282);// EXTERNAL MODULE: external "wp.i18n"
var o=r(38003);// EXTERNAL MODULE: ./node_modules/date-fns/esm/addMinutes/index.js
var s=r(58545);// EXTERNAL MODULE: ./node_modules/date-fns/esm/format/index.js
var u=r(32449);// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js
const l=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);/* ESM default export */const c={randomUUID:l};// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
let d;const f=new Uint8Array(16);function p(){// lazy load so that environments that need to polyfill have a chance to do so
if(!d){// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
d=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!d){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return d(f)};// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */const h=[];for(let e=0;e<256;++e){h.push((e+256).toString(16).slice(1))}function v(e,t=0){// Note: Be careful editing this code!  It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]}function m(e,t=0){const r=v(e,t);// Consistency check for valid UUID.  If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if(!validate(r)){throw TypeError("Stringified UUID is invalid")}return r}/* ESM default export */const g=/* unused pure expression or super */null&&m;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
function b(e,t,r){if(c.randomUUID&&!t&&!e){return c.randomUUID()}e=e||{};const n=e.random||(e.rng||p)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
n[6]=n[6]&15|64;n[8]=n[8]&63|128;// Copy bytes to buffer, if provided
if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=n[e]}return t}return v(n)}/* ESM default export */const y=b;// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var _=r(34039);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var w=r(74053);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/types.ts
var x=r(22456);// CONCATENATED MODULE: ./assets/react/v3/shared/utils/util.ts
function E(e,t){if(e===undefined||e===null){throw new Error(t)}}var Z=()=>{};var S=e=>Array.from(Array(e).keys());var O=(e,t)=>Array.from({length:t-e},(t,r)=>r+e);var k=e=>{return e instanceof Blob||e instanceof File};var T=e=>{return Array.isArray(e)?e:e?[e]:[]};// Generate unique id
var C=()=>y();// Generate coupon code
var R=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;var t=e;var r="MSOP0123456789ABCDEFGHNRVUKYTJLZXIW";var n="";while(t--){n+=r[Math.random()*35|0]}return n};// Useful for mock api call
var A=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Promise(t=>setTimeout(t,e))};/**
 * Move one array item from one index to another index
 * (don't change the original array) instead return a new one.
 *
 * @param arr Array
 * @param fromIndex Number
 * @param toIndex Number
 * @returns new Array
 */var M=(e,t,r)=>{var n=[...e];var i=t;var a=r;if(t<0){i=e.length+t}if(t>=0&&t<e.length){if(r<0){a=e.length+r}var[o]=n.splice(i,1);if(o){n.splice(a,0,o)}}return n};var P=e=>{var t=e.split(".");var r=t.pop();return r?".".concat(r):""};var D=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:true;var n={};for(var i of e){var a,o;var s=t(i);s=r?s:s.toString().toLowerCase();(a=n)[o=s]||(a[o]=0);n[s]++;var u=n[s];if(u&&u>1){return true}}return false};var I=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;var n=new Set(e.map(e=>e.id));var o=e.filter(e=>{if(r.has(e.id)){return false}if(t===0){return e.parent===0||!n.has(e.parent)}return e.parent===t});return o.reduce((t,n)=>{r.add(n.id);var o=I(e,n.id,r);return[...t,(0,a._)((0,i._)({},n),{children:o})]},[])};var L=(e,t)=>{var r="0";if(!e){r="100%"}else if(e&&t>0){if(t>1){r="".concat(23+32*(t-1),"px")}else{r="23px"}}return r};var F=e=>{var t,r;var n=((t=e.sort)===null||t===void 0?void 0:t.direction)==="desc"?"-":"";return _object_spread({limit:e.limit,offset:e.offset,sort:((r=e.sort)===null||r===void 0?void 0:r.property)&&"".concat(n).concat(e.sort.property)},e.filter)};var N=(e,t)=>Math.floor(Math.random()*(t-e))+e;var j=(e,t,r,n,i)=>{return(e-t)*(i-n)/(r-t)+n};var B=e=>{return e.map(e=>e.id)};var U=(e,t)=>{var r=new Set(e);var n=new Set(t);var i=[];for(var a of r){if(n.has(a)){i.push(a)}}return i};var W=e=>{if(!e)return e;var t=e.charAt(0).toUpperCase();var r=e.slice(1);return"".concat(t).concat(r)};var z=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;if(!e||e<=1){return"0 Bytes"}var r=1024;var n=Math.max(0,t);var i=[(0,o.__)("Bytes","tutor"),(0,o.__)("KB","tutor"),(0,o.__)("MB","tutor"),(0,o.__)("GB","tutor"),(0,o.__)("TB","tutor"),(0,o.__)("PB","tutor"),(0,o.__)("EB","tutor"),(0,o.__)("ZB","tutor"),(0,o.__)("YB","tutor")];var a=Math.floor(Math.log(e)/Math.log(r));return"".concat(Number.parseFloat((e/r**a).toFixed(n))," ").concat(i[a])};var J=e=>{if(!e||typeof e!=="string"){return 0}var[t,r]=e.split(" ");var n=parseFloat(t);var i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var a=i.indexOf(r);if(a===-1){return 0}return n*1024**a};var q=(e,t)=>{return e.replace(t?/[^0-9.-]/g:/[^0-9.]/g,"").replace(/(?!^)-/g,"").replace(/(\..*)\./g,"$1")};var H=(e,t)=>{var r=false;return function n(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++){i[a]=arguments[a]}if(!r){e.apply(this,i);r=true;setTimeout(()=>{r=false},t)}}};var V=e=>{return JSON.parse(e)};var $=e=>{var t=Math.floor(e/3600).toString().padStart(2,"0");var r=Math.floor(e%3600/60).toString().padStart(2,"0");var n=Math.floor(e%60);if(t==="00"){return"".concat(r,":").concat(n," mins")}return"".concat(t,":").concat(r,":").concat(n," hrs")};var G=e=>{if(!(0,x/* .isDefined */.$K)(e)||!(0,x/* .isObject */.Kn)(e)){return[]}return Object.keys(e)};var X=e=>{return Object.values(e)};var K=e=>{return Object.entries(e)};function Q(e){var t=new URLSearchParams;for(var r in e){if(r in e){t.append(r,e[r])}}return t.toString()}var Y=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w/* .DateFormats.yearMonthDayHourMinuteSecond24H */.E_.yearMonthDayHourMinuteSecond24H;var r=e.getTimezoneOffset();var n=(0,s["default"])(e,r);return(0,u["default"])(n,t)};var ee=e=>{var t=new Date(e);var r=t.getTimezoneOffset();return(0,s["default"])(t,-r)};var et=e=>{return(e||"").replace(/\r\n/g,"\n")};var er=e=>{return new Promise((t,r)=>{if(navigator.clipboard&&window.isSecureContext){navigator.clipboard.writeText(e).then(()=>t()).catch(e=>r(e))}else{var n=document.createElement("textarea");n.value=e;document.body.appendChild(n);n.select();try{// if navigator.clipboard is not available, use document.execCommand('copy')
document.execCommand("copy");t()}catch(e){r(e)}finally{document.body.removeChild(n);// Clean up
}}})};var en=e=>{if(!e||!e.response||!e.response.data){return(0,o.__)("Something went wrong","tutor")}var t=e.response.data.message;if(e.response.data.status_code===422&&e.response.data.data){t=e.response.data.data[Object.keys(e.response.data.data)[0]]}return t||(0,o.__)("Something went wrong","tutor")};var ei=e=>(0,n._)(function*(){try{var t=yield fetch(e);var r=yield t.blob();var n=new FileReader;return new Promise((e,t)=>{n.readAsDataURL(r);n.onload=()=>e(n.result);n.onerror=e=>t(e)})}catch(e){throw new Error("Failed to fetch and convert image: ".concat(e))}})();var ea=(e,t)=>{if(e==="trash"){return"trash"}if(t==="private"){return"private"}if(e==="future"){return"future"}if(t==="password_protected"&&e!=="draft"){return"publish"}return e};var eo=e=>{var t;return!!((t=_/* .tutorConfig.addons_data.find */.y.addons_data.find(t=>t.base_name===e))===null||t===void 0?void 0:t.is_enabled)};var es=e=>{if(!e||typeof e!=="string"){return""}return e.normalize("NFKD")// Normalize accented characters into base forms + diacritics
.replace(/[\u0300-\u036f]/g,"")// Remove combining diacritical marks
.toLowerCase()// Remove special characters !~@#$%^&*(){}[]|\;:"',./?
// Remove characters that are NOT:
// - Basic Latin letters and numbers (a-z, 0-9)
// - Spaces and hyphens
// - Latin Extended (À-ž, etc.)
// - Greek and Coptic (Α-ω)
// - Cyrillic (А-я)
// - Hebrew (א-ת)
// - Arabic (ا-ي)
// - Devanagari (Hindi)
// - Thai
// - Tamil
// - Georgian
// - Hangul Jamo (Korean building blocks)
// - Hiragana (Japanese)
// - Katakana (Japanese)
// - CJK Unified Ideographs (Chinese/Japanese/Korean characters)
// - Hangul Syllables (Korean)
// - Hangul Compatibility Jamo
// - Hangul Jamo Extended-A
// - Hangul Jamo Extended-B
.replace(/[^a-z0-9\s\-\u00C0-\u024F\u0370-\u03FF\u0400-\u04FF\u0590-\u05FF\u0600-\u06FF\u0900-\u097F\u0E00-\u0E7F\u0B80-\u0BFF\u10A0-\u10FF\u1100-\u11FF\u3130-\u318F\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF]/g,"").replace(/\s+/g,"-")// Replace multiple spaces with single dash
.replace(/-+/g,"-")// Replace multiple dashes with single dash
.replace(/^-+|-+$/g,"")// Remove leading and trailing dashes
};var eu=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=[];t.forEach(e=>{if(e.slotKey){e.fields[e.slotKey].forEach(e=>{n.push(e.name)})}else{Object.keys(e.fields).forEach(t=>{e.fields[t].forEach(e=>{n.push(e.name)})})}});return n};var el=e=>{var t=new DOMParser;var r=t.parseFromString(e,"text/html");return r.body.textContent||""};var ec=e=>{var{unit:t="hour",value:r,useLySuffix:n=false,capitalize:i=true,showSingular:a=false}=e;if(t==="until_cancellation"){var o=__("Until Cancellation","tutor");return i?ed(o):o}var s={hour:{// translators: %d is the number of hours
plural:__("%d hours","tutor"),// translators: %d is the number of hours
singular:__("%d hour","tutor"),suffix:__("hourly","tutor"),base:__("hour","tutor")},day:{// translators: %d is the number of days
plural:__("%d days","tutor"),// translators: %d is the number of days
singular:__("%d day","tutor"),suffix:__("daily","tutor"),base:__("day","tutor")},week:{// translators: %d is the number of weeks
plural:__("%d weeks","tutor"),// translators: %d is the number of weeks
singular:__("%d week","tutor"),suffix:__("weekly","tutor"),base:__("week","tutor")},month:{// translators: %d is the number of months
plural:__("%d months","tutor"),// translators: %d is the number of months
singular:__("%d month","tutor"),suffix:__("monthly","tutor"),base:__("month","tutor")},year:{// translators: %d is the number of years
plural:__("%d years","tutor"),// translators: %d is the number of years
singular:__("%d year","tutor"),suffix:__("yearly","tutor"),base:__("year","tutor")}};if(!s[t]){return""}var u="";if(r>1){u=sprintf(s[t].plural,r)}else if(a){u=sprintf(s[t].singular,r)}else if(n){u=s[t].suffix}else{u=s[t].base}return i?ed(u):u};var ed=e=>{return e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")};var ef=e=>{var t=Math.floor(e/3600);var r=Math.floor(e%3600/60);var n=e%60;return{hours:t,minutes:r,seconds:n}}},25481:function(e,t,r){"use strict";r.d(t,{Ek:()=>l,T9:()=>c,n0:()=>o,xB:()=>d});/* ESM import */var n=r(38003);/* ESM import */var i=/*#__PURE__*/r.n(n);/* ESM import */var a=r(12274);var o=()=>({required:{value:true,message:(0,n.__)("This field is required","tutor")}});var s=e=>{var{maxValue:t,message:r}=e;return{maxLength:{value:t,message:r||__("Max. value should be ".concat(t),"tutor")}}};var u=()=>({validate:e=>{if((e===null||e===void 0?void 0:e.amount)===undefined){return __("The field is required","tutor")}return undefined}});var l=e=>{if(!(0,a["default"])(new Date(e||""))){return(0,n.__)("Invalid date entered!","tutor")}return undefined};var c=e=>({validate:t=>{if(t&&e<t.length){return(0,n.__)("Maximum ".concat(e," character supported"),"tutor")}return undefined}});var d=e=>{if(!e){return undefined}var t=(0,n.__)("Invalid time entered!","tutor");var[r,i]=e.split(":");if(!r||!i){return t}var[a,o]=i.split(" ");if(!a||!o){return t}if(r.length!==2||a.length!==2){return t}if(Number(r)<1||Number(r)>12){return t}if(Number(a)<0||Number(a)>59){return t}if(!["am","pm"].includes(o.toLowerCase())){return t}return undefined}},87363:function(e){"use strict";e.exports=React},61533:function(e){"use strict";e.exports=ReactDOM},38003:function(e){"use strict";e.exports=wp.i18n},58133:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){"@babel/helpers - typeof";return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}},72864:function(e,t,r){"use strict";r.d(t,{Ab:()=>o,Fr:()=>s,G$:()=>a,JM:()=>w,K$:()=>d,MS:()=>n,h5:()=>u,lK:()=>g,uj:()=>i});var n="-ms-";var i="-moz-";var a="-webkit-";var o="comm";var s="rule";var u="decl";var l="@page";var c="@media";var d="@import";var f="@charset";var p="@viewport";var h="@supports";var v="@document";var m="@namespace";var g="@keyframes";var b="@font-face";var y="@counter-style";var _="@font-feature-values";var w="@layer"},22300:function(e,t,r){"use strict";r.d(t,{cD:()=>a,qR:()=>i});/* ESM import */var n=r(11147);/**
 * @param {function[]} collection
 * @return {function}
 */function i(e){var t=(0,n/* .sizeof */.Ei)(e);return function(r,n,i,a){var o="";for(var s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}/**
 * @param {function} callback
 * @return {function}
 */function a(e){return function(t){if(!t.root){if(t=t.return)e(t)}}}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 */function o(e,t,r,n){if(e.length>-1){if(!e.return)switch(e.type){case DECLARATION:e.return=prefix(e.value,e.length,r);return;case KEYFRAMES:return serialize([copy(e,{value:replace(e.value,"@","@"+WEBKIT)})],n);case RULESET:if(e.length)return combine(e.props,function(t){switch(match(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return serialize([copy(e,{props:[replace(t,/:(read-\w+)/,":"+MOZ+"$1")]})],n);// :placeholder
case"::placeholder":return serialize([copy(e,{props:[replace(t,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,MS+"input-$1")]})],n)}return""})}}}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 */function s(e){switch(e.type){case RULESET:e.props=e.props.map(function(t){return combine(tokenize(t),function(t,r,n){switch(charat(t,0)){// \f
case 12:return substr(t,1,strlen(t));// \0 ( + > ~
case 0:case 40:case 43:case 62:case 126:return t;// :
case 58:if(n[++r]==="global")n[r]="",n[++r]="\f"+substr(n[r],r=1,-1);// \s
case 32:return r===1?"":t;default:switch(r){case 0:e=t;return sizeof(n)>1?"":t;case r=sizeof(n)-1:case 2:return r===2?t+e+e:t+e;default:return t}}})})}}},79593:function(e,t,r){"use strict";r.d(t,{MY:()=>o});/* ESM import */var n=r(72864);/* ESM import */var i=r(11147);/* ESM import */var a=r(70128);/**
 * @param {string} value
 * @return {object[]}
 */function o(e){return(0,a/* .dealloc */.cE)(s("",null,null,null,[""],e=(0,a/* .alloc */.un)(e),0,[0],e))}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {string[]} rule
 * @param {string[]} rules
 * @param {string[]} rulesets
 * @param {number[]} pseudo
 * @param {number[]} points
 * @param {string[]} declarations
 * @return {object}
 */function s(e,t,r,n,o,d,f,p,h){var v=0;var m=0;var g=f;var b=0;var y=0;var _=0;var w=1;var x=1;var E=1;var Z=0;var S="";var O=o;var k=d;var T=n;var C=S;while(x)switch(_=Z,Z=(0,a/* .next */.lp)()){// (
case 40:if(_!=108&&(0,i/* .charat */.uO)(C,g-1)==58){if((0,i/* .indexof */.Cw)(C+=(0,i/* .replace */.gx)((0,a/* .delimit */.iF)(Z),"&","&\f"),"&\f")!=-1)E=-1;break}// " ' [
case 34:case 39:case 91:C+=(0,a/* .delimit */.iF)(Z);break;// \t \n \r \s
case 9:case 10:case 13:case 32:C+=(0,a/* .whitespace */.Qb)(_);break;// \
case 92:C+=(0,a/* .escaping */.kq)((0,a/* .caret */.Ud)()-1,7);continue;// /
case 47:switch((0,a/* .peek */.fj)()){case 42:case 47:;(0,i/* .append */.R3)(l((0,a/* .commenter */.q6)((0,a/* .next */.lp)(),(0,a/* .caret */.Ud)()),t,r),h);break;default:C+="/"}break;// {
case 123*w:p[v++]=(0,i/* .strlen */.to)(C)*E;// } ; \0
case 125*w:case 59:case 0:switch(Z){// \0 }
case 0:case 125:x=0;// ;
case 59+m:if(E==-1)C=(0,i/* .replace */.gx)(C,/\f/g,"");if(y>0&&(0,i/* .strlen */.to)(C)-g)(0,i/* .append */.R3)(y>32?c(C+";",n,r,g-1):c((0,i/* .replace */.gx)(C," ","")+";",n,r,g-2),h);break;// @ ;
case 59:C+=";";// { rule/at-rule
default:;(0,i/* .append */.R3)(T=u(C,t,r,v,m,o,p,S,O=[],k=[],g),d);if(Z===123)if(m===0)s(C,t,T,T,O,d,g,p,k);else switch(b===99&&(0,i/* .charat */.uO)(C,3)===110?100:b){// d l m s
case 100:case 108:case 109:case 115:s(e,T,T,n&&(0,i/* .append */.R3)(u(e,T,T,0,0,o,p,S,o,O=[],g),k),o,k,g,p,n?O:k);break;default:s(C,T,T,T,[""],k,0,p,k)}}v=m=y=0,w=E=1,S=C="",g=f;break;// :
case 58:g=1+(0,i/* .strlen */.to)(C),y=_;default:if(w<1){if(Z==123)--w;else if(Z==125&&w++==0&&(0,a/* .prev */.mp)()==125)continue}switch(C+=(0,i/* .from */.Dp)(Z),Z*w){// &
case 38:E=m>0?1:(C+="\f",-1);break;// ,
case 44:p[v++]=((0,i/* .strlen */.to)(C)-1)*E,E=1;break;// @
case 64:// -
if((0,a/* .peek */.fj)()===45)C+=(0,a/* .delimit */.iF)((0,a/* .next */.lp)());b=(0,a/* .peek */.fj)(),m=g=(0,i/* .strlen */.to)(S=C+=(0,a/* .identifier */.QU)((0,a/* .caret */.Ud)())),Z++;break;// -
case 45:if(_===45&&(0,i/* .strlen */.to)(C)==2)w=0}}return d}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} index
 * @param {number} offset
 * @param {string[]} rules
 * @param {number[]} points
 * @param {string} type
 * @param {string[]} props
 * @param {string[]} children
 * @param {number} length
 * @return {object}
 */function u(e,t,r,o,s,u,l,c,d,f,p){var h=s-1;var v=s===0?u:[""];var m=(0,i/* .sizeof */.Ei)(v);for(var g=0,b=0,y=0;g<o;++g)for(var _=0,w=(0,i/* .substr */.tb)(e,h+1,h=(0,i/* .abs */.Wn)(b=l[g])),x=e;_<m;++_)if(x=(0,i/* .trim */.fy)(b>0?v[_]+" "+w:(0,i/* .replace */.gx)(w,/&\f/g,v[_])))d[y++]=x;return(0,a/* .node */.dH)(e,t,r,s===0?n/* .RULESET */.Fr:c,d,f,p)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @return {object}
 */function l(e,t,r){return(0,a/* .node */.dH)(e,t,r,n/* .COMMENT */.Ab,(0,i/* .from */.Dp)((0,a/* .char */.Tb)()),(0,i/* .substr */.tb)(e,2,-2),0)}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} length
 * @return {object}
 */function c(e,t,r,o){return(0,a/* .node */.dH)(e,t,r,n/* .DECLARATION */.h5,(0,i/* .substr */.tb)(e,0,o),(0,i/* .substr */.tb)(e,o+1,-1),o)}},18185:function(e,t,r){"use strict";r.d(t,{P:()=>o,q:()=>a});/* ESM import */var n=r(72864);/* ESM import */var i=r(11147);/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function a(e,t){var r="";var n=(0,i/* .sizeof */.Ei)(e);for(var a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function o(e,t,r,o){switch(e.type){case n/* .LAYER */.JM:if(e.children.length)break;case n/* .IMPORT */.K$:case n/* .DECLARATION */.h5:return e.return=e.return||e.value;case n/* .COMMENT */.Ab:return"";case n/* .KEYFRAMES */.lK:return e.return=e.value+"{"+a(e.children,o)+"}";case n/* .RULESET */.Fr:e.value=e.props.join(",")}return(0,i/* .strlen */.to)(r=a(e.children,o))?e.return=e.value+"{"+r+"}":""}},70128:function(e,t,r){"use strict";r.d(t,{FK:()=>s,JG:()=>d,QU:()=>T,Qb:()=>E,Tb:()=>f,Ud:()=>m,cE:()=>_,dH:()=>c,fj:()=>v,iF:()=>w,kq:()=>S,lp:()=>h,mp:()=>p,q6:()=>k,r:()=>b,tP:()=>g,un:()=>y});/* ESM import */var n=r(11147);var i=1;var a=1;var o=0;var s=0;var u=0;var l="";/**
 * @param {string} value
 * @param {object | null} root
 * @param {object | null} parent
 * @param {string} type
 * @param {string[] | string} props
 * @param {object[] | string} children
 * @param {number} length
 */function c(e,t,r,n,o,s,u){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:i,column:a,length:u,return:""}}/**
 * @param {object} root
 * @param {object} props
 * @return {object}
 */function d(e,t){return(0,n/* .assign */.f0)(c("",null,null,"",null,null,0),e,{length:-e.length},t)}/**
 * @return {number}
 */function f(){return u}/**
 * @return {number}
 */function p(){u=s>0?(0,n/* .charat */.uO)(l,--s):0;if(a--,u===10)a=1,i--;return u}/**
 * @return {number}
 */function h(){u=s<o?(0,n/* .charat */.uO)(l,s++):0;if(a++,u===10)a=1,i++;return u}/**
 * @return {number}
 */function v(){return(0,n/* .charat */.uO)(l,s)}/**
 * @return {number}
 */function m(){return s}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function g(e,t){return(0,n/* .substr */.tb)(l,e,t)}/**
 * @param {number} type
 * @return {number}
 */function b(e){switch(e){// \0 \t \n \r \s whitespace token
case 0:case 9:case 10:case 13:case 32:return 5;// ! + , / > @ ~ isolate token
case 33:case 43:case 44:case 47:case 62:case 64:case 126:// ; { } breakpoint token
case 59:case 123:case 125:return 4;// : accompanied token
case 58:return 3;// " ' ( [ opening delimit token
case 34:case 39:case 40:case 91:return 2;// ) ] closing delimit token
case 41:case 93:return 1}return 0}/**
 * @param {string} value
 * @return {any[]}
 */function y(e){return i=a=1,o=(0,n/* .strlen */.to)(l=e),s=0,[]}/**
 * @param {any} value
 * @return {any}
 */function _(e){return l="",e}/**
 * @param {number} type
 * @return {string}
 */function w(e){return(0,n/* .trim */.fy)(g(s-1,O(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function x(e){return _(Z(y(e)))}/**
 * @param {number} type
 * @return {string}
 */function E(e){while(u=v())if(u<33)h();else break;return b(e)>2||b(u)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function Z(e){while(h())switch(b(u)){case 0:append(T(s-1),e);break;case 2:append(w(u),e);break;default:append(from(u),e)}return e}/**
 * @param {number} index
 * @param {number} count
 * @return {string}
 */function S(e,t){while(--t&&h())// not 0-9 A-F a-f
if(u<48||u>102||u>57&&u<65||u>70&&u<97)break;return g(e,m()+(t<6&&v()==32&&h()==32))}/**
 * @param {number} type
 * @return {number}
 */function O(e){while(h())switch(u){// ] ) " '
case e:return s;// " '
case 34:case 39:if(e!==34&&e!==39)O(u);break;// (
case 40:if(e===41)O(e);break;// \
case 92:h();break}return s}/**
 * @param {number} type
 * @param {number} index
 * @return {number}
 */function k(e,t){while(h())// //
if(e+u===47+10)break;else if(e+u===42+42&&v()===47)break;return"/*"+g(t,s-1)+"*"+(0,n/* .from */.Dp)(e===47?e:h())}/**
 * @param {number} index
 * @return {string}
 */function T(e){while(!b(v()))h();return g(e,s)}},11147:function(e,t,r){"use strict";r.d(t,{$e:()=>m,Cw:()=>c,Dp:()=>i,EQ:()=>u,Ei:()=>h,R3:()=>v,Wn:()=>n,f0:()=>a,fy:()=>s,gx:()=>l,tb:()=>f,to:()=>p,uO:()=>d,vp:()=>o});/**
 * @param {number}
 * @return {number}
 */var n=Math.abs;/**
 * @param {number}
 * @return {string}
 */var i=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var a=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function o(e,t){return d(e,0)^45?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function s(e){return e.trim()}/**
 * @param {string} value
 * @param {RegExp} pattern
 * @return {string?}
 */function u(e,t){return(e=t.exec(e))?e[0]:e}/**
 * @param {string} value
 * @param {(string|RegExp)} pattern
 * @param {string} replacement
 * @return {string}
 */function l(e,t,r){return e.replace(t,r)}/**
 * @param {string} value
 * @param {string} search
 * @return {number}
 */function c(e,t){return e.indexOf(t)}/**
 * @param {string} value
 * @param {number} index
 * @return {number}
 */function d(e,t){return e.charCodeAt(t)|0}/**
 * @param {string} value
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function f(e,t,r){return e.slice(t,r)}/**
 * @param {string} value
 * @return {number}
 */function p(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function h(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function v(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function m(e,t){return e.map(t).join("")}},23618:function(e,t,r){"use strict";r.d(t,{He:()=>l,Ld:()=>E,eC:()=>f,f3:()=>u,iG:()=>d,rS:()=>h,sb:()=>g,ys:()=>s});/* ESM import */var n=r(90009);/* ESM import */var i=r(87363);// src/Animated.ts
var a=Symbol.for("Animated:node");var o=e=>!!e&&e[a]===e;var s=e=>e&&e[a];var u=(e,t)=>(0,n/* .defineHidden */.dE)(e,a,t);var l=e=>e&&e[a]&&e[a].getPayload();var c=class{constructor(){u(this,this)}/** Get every `AnimatedValue` used by this node. */getPayload(){return this.payload||[]}};// src/AnimatedValue.ts
var d=class extends c{constructor(e){super();this._value=e;this.done=true;this.durationProgress=0;if(n.is.num(this._value)){this.lastPosition=this._value}}/** @internal */static create(e){return new d(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){if(n.is.num(e)){this.lastPosition=e;if(t){e=Math.round(e/t)*t;if(this.done){this.lastPosition=e}}}if(this._value===e){return false}this._value=e;return true}reset(){const{done:e}=this;this.done=false;if(n.is.num(this._value)){this.elapsedTime=0;this.durationProgress=0;this.lastPosition=this._value;if(e)this.lastVelocity=null;this.v0=null}}};// src/AnimatedString.ts
var f=class extends d{constructor(e){super(0);this._string=null;this._toString=(0,n/* .createInterpolator */.mD)({output:[e,e]})}/** @internal */static create(e){return new f(e)}getValue(){const e=this._string;return e==null?this._string=this._toString(this._value):e}setValue(e){if(n.is.str(e)){if(e==this._string){return false}this._string=e;this._value=1}else if(super.setValue(e)){this._string=null}else{return false}return true}reset(e){if(e){this._toString=(0,n/* .createInterpolator */.mD)({output:[this.getValue(),e]})}this._value=0;super.reset()}};// src/AnimatedArray.ts
// src/AnimatedObject.ts
// src/context.ts
var p={dependencies:null};// src/AnimatedObject.ts
var h=class extends c{constructor(e){super();this.source=e;this.setValue(e)}getValue(e){const t={};(0,n/* .eachProp */.rU)(this.source,(r,i)=>{if(o(r)){t[i]=r.getValue(e)}else if((0,n/* .hasFluidValue */.j$)(r)){t[i]=(0,n/* .getFluidValue */.je)(r)}else if(!e){t[i]=r}});return t}/** Replace the raw object data */setValue(e){this.source=e;this.payload=this._makePayload(e)}reset(){if(this.payload){(0,n/* .each */.S6)(this.payload,e=>e.reset())}}/** Create a payload set. */_makePayload(e){if(e){const t=/* @__PURE__ */new Set;(0,n/* .eachProp */.rU)(e,this._addToPayload,t);return Array.from(t)}}/** Add to a payload set. */_addToPayload(e){if(p.dependencies&&(0,n/* .hasFluidValue */.j$)(e)){p.dependencies.add(e)}const t=l(e);if(t){(0,n/* .each */.S6)(t,e=>this.add(e))}}};// src/AnimatedArray.ts
var v=class extends h{constructor(e){super(e)}/** @internal */static create(e){return new v(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();if(e.length==t.length){return t.map((t,r)=>t.setValue(e[r])).some(Boolean)}super.setValue(e.map(m));return true}};function m(e){const t=(0,n/* .isAnimatedString */.Df)(e)?f:d;return t.create(e)}// src/getAnimatedType.ts
function g(e){const t=s(e);return t?t.constructor:n.is.arr(e)?v:(0,n/* .isAnimatedString */.Df)(e)?f:d}// src/createHost.ts
// src/withAnimated.tsx
var b=(e,t)=>{const r=// Function components must use "forwardRef" to avoid being
// re-rendered on every animation frame.
!n.is.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,i.forwardRef)((a,o)=>{const s=(0,i.useRef)(null);const u=r&&// eslint-disable-next-line react-hooks/rules-of-hooks
(0,i.useCallback)(e=>{s.current=w(o,e)},[o]);const[l,c]=_(a,t);const d=(0,n/* .useForceUpdate */.NW)();const f=()=>{const e=s.current;if(r&&!e){return}const n=e?t.applyAnimatedValues(e,l.getValue(true)):false;if(n===false){d()}};const p=new y(f,c);const h=(0,i.useRef)();(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>{h.current=p;(0,n/* .each */.S6)(c,e=>(0,n/* .addFluidObserver */.UI)(e,p));return()=>{if(h.current){(0,n/* .each */.S6)(h.current.deps,e=>(0,n/* .removeFluidObserver */.iL)(e,h.current));n/* .raf.cancel */.Wn.cancel(h.current.update)}}});(0,i.useEffect)(f,[]);(0,n/* .useOnce */.tf)(()=>()=>{const e=h.current;(0,n/* .each */.S6)(e.deps,t=>(0,n/* .removeFluidObserver */.iL)(t,e))});const v=t.getComponentProps(l.getValue());return /* @__PURE__ */i.createElement(e,{...v,ref:u})})};var y=class{constructor(e,t){this.update=e;this.deps=t}eventObserved(e){if(e.type=="change"){n/* .raf.write */.Wn.write(this.update)}}};function _(e,t){const r=/* @__PURE__ */new Set;p.dependencies=r;if(e.style)e={...e,style:t.createAnimatedStyle(e.style)};e=new h(e);p.dependencies=null;return[e,r]}function w(e,t){if(e){if(n.is.fun(e))e(t);else e.current=t}return t}// src/createHost.ts
var x=Symbol.for("AnimatedComponent");var E=(e,{applyAnimatedValues:t=()=>false,createAnimatedStyle:r=e=>new h(e),getComponentProps:i=e=>e}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:i};const o=e=>{const t=Z(e)||"Anonymous";if(n.is.str(e)){e=o[e]||(o[e]=b(e,a))}else{e=e[x]||(e[x]=b(e,a))}e.displayName=`Animated(${t})`;return e};(0,n/* .eachProp */.rU)(e,(t,r)=>{if(n.is.arr(e)){r=Z(t)}o[r]=o(t)});return{animated:o}};var Z=e=>n.is.str(e)?e:e&&n.is.str(e.displayName)?e.displayName:n.is.fun(e)&&e.name||null;//# sourceMappingURL=react-spring_animated.modern.mjs.map
},99968:function(e,t,r){"use strict";r.d(t,{OH:()=>/* reexport safe */n.OH,Yz:()=>eS,Z5:()=>/* reexport safe */n.Z5,q_:()=>e_});/* ESM import */var n=r(90009);/* ESM import */var i=r(87363);/* ESM import */var a=r(23618);// src/hooks/useChain.ts
// src/helpers.ts
function o(e,...t){return n.is.fun(e)?e(...t):e}var s=(e,t)=>e===true||!!(t&&e&&(n.is.fun(e)?e(t):(0,n/* .toArray */.qo)(e).includes(t)));var u=(e,t)=>n.is.obj(e)?t&&e[t]:e;var l=(e,t)=>e.default===true?e[t]:e.default?e.default[t]:void 0;var c=e=>e;var d=(e,t=c)=>{let r=f;if(e.default&&e.default!==true){e=e.default;r=Object.keys(e)}const i={};for(const a of r){const r=t(e[a],a);if(!n.is.und(r)){i[a]=r}}return i};var f=["config","onProps","onStart","onChange","onPause","onResume","onRest"];var p={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,// Transition props
items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,// Internal props
keys:1,callId:1,parentId:1};function h(e){const t={};let r=0;(0,n/* .eachProp */.rU)(e,(e,n)=>{if(!p[n]){t[n]=e;r++}});if(r){return t}}function v(e){const t=h(e);if(t){const r={to:t};(0,n/* .eachProp */.rU)(e,(e,n)=>n in t||(r[n]=e));return r}return{...e}}function m(e){e=(0,n/* .getFluidValue */.je)(e);return n.is.arr(e)?e.map(m):(0,n/* .isAnimatedString */.Df)(e)?n/* .Globals.createStringInterpolator */.OH.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function g(e){for(const t in e)return true;return false}function b(e){return n.is.fun(e)||n.is.arr(e)&&n.is.obj(e[0])}function y(e,t){e.ref?.delete(e);t?.delete(e)}function _(e,t){if(t&&e.ref!==t){e.ref?.delete(e);t.add(e);e.ref=t}}// src/hooks/useChain.ts
function w(e,t,r=1e3){useIsomorphicLayoutEffect(()=>{if(t){let n=0;each(e,(e,i)=>{const a=e.current;if(a.length){let s=r*t[i];if(isNaN(s))s=n;else n=s;each(a,e=>{each(e.queue,e=>{const t=e.delay;e.delay=e=>s+o(t||0,e)})});e.start()}})}else{let t=Promise.resolve();each(e,e=>{const r=e.current;if(r.length){const n=r.map(e=>{const t=e.queue;e.queue=[];return t});t=t.then(()=>{each(r,(e,t)=>each(n[t]||[],t=>e.queue.push(t)));return Promise.all(e.start())})}})}})}// src/hooks/useSpring.ts
// src/hooks/useSprings.ts
// src/SpringValue.ts
// src/AnimationConfig.ts
// src/constants.ts
var x={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};// src/AnimationConfig.ts
var E={...x.default,mass:1,damping:1,easing:n/* .easings.linear */.Z5.linear,clamp:false};var Z=class{constructor(){/**
     * The initial velocity of one or more values.
     *
     * @default 0
     */this.velocity=0;Object.assign(this,E)}};function S(e,t,r){if(r){r={...r};O(r,t);t={...r,...t}}O(e,t);Object.assign(e,t);for(const t in E){if(e[t]==null){e[t]=E[t]}}let{frequency:i,damping:a}=e;const{mass:o}=e;if(!n.is.und(i)){if(i<.01)i=.01;if(a<0)a=0;e.tension=Math.pow(2*Math.PI/i,2)*o;e.friction=4*Math.PI*a*o/i}return e}function O(e,t){if(!n.is.und(t.decay)){e.duration=void 0}else{const r=!n.is.und(t.tension)||!n.is.und(t.friction);if(r||!n.is.und(t.frequency)||!n.is.und(t.damping)||!n.is.und(t.mass)){e.duration=void 0;e.decay=void 0}if(r){e.frequency=void 0}}}// src/Animation.ts
var k=[];var T=class{constructor(){this.changed=false;this.values=k;this.toValues=null;this.fromValues=k;this.config=new Z;this.immediate=false}};// src/scheduleProps.ts
function C(e,{key:t,props:r,defaultProps:i,state:a,actions:u}){return new Promise((l,c)=>{let d;let f;let p=s(r.cancel??i?.cancel,t);if(p){m()}else{if(!n.is.und(r.pause)){a.paused=s(r.pause,t)}let e=i?.pause;if(e!==true){e=a.paused||s(e,t)}d=o(r.delay||0,t);if(e){a.resumeQueue.add(v);u.pause()}else{u.resume();v()}}function h(){a.resumeQueue.add(v);a.timeouts.delete(f);f.cancel();d=f.time-n/* .raf.now */.Wn.now()}function v(){if(d>0&&!n/* .Globals.skipAnimation */.OH.skipAnimation){a.delayed=true;f=n/* .raf.setTimeout */.Wn.setTimeout(m,d);a.pauseQueue.add(h);a.timeouts.add(f)}else{m()}}function m(){if(a.delayed){a.delayed=false}a.pauseQueue.delete(h);a.timeouts.delete(f);if(e<=(a.cancelId||0)){p=true}try{u.start({...r,callId:e,cancel:p},l)}catch(e){c(e)}}})}// src/runAsync.ts
// src/AnimationResult.ts
var R=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?P(e.get()):t.every(e=>e.noop)?A(e.get()):M(e.get(),t.every(e=>e.finished));var A=e=>({value:e,noop:true,finished:true,cancelled:false});var M=(e,t,r=false)=>({value:e,finished:t,cancelled:r});var P=e=>({value:e,cancelled:true,finished:false});// src/runAsync.ts
function D(e,t,r,i){const{callId:a,parentId:o,onRest:s}=t;const{asyncTo:u,promise:l}=r;if(!o&&e===u&&!t.reset){return l}return r.promise=(async()=>{r.asyncId=a;r.asyncTo=e;const c=d(t,(e,t)=>// The `onRest` prop is only called when the `runAsync` promise is resolved.
    t==="onRest"?void 0:e);let f;let p;const h=new Promise((e,t)=>(f=e,p=t));const v=e=>{const t=// The `cancel` prop or `stop` method was used.
a<=(r.cancelId||0)&&P(i)||// The async `to` prop was replaced.
a!==r.asyncId&&M(i,false);if(t){e.result=t;p(e);throw e}};const m=(e,t)=>{const o=new L;const s=new F;return(async()=>{if(n/* .Globals.skipAnimation */.OH.skipAnimation){I(r);s.result=M(i,false);p(s);throw s}v(o);const u=n.is.obj(e)?{...e}:{...t,to:e};u.parentId=a;(0,n/* .eachProp */.rU)(c,(e,t)=>{if(n.is.und(u[t])){u[t]=e}});const l=await i.start(u);v(o);if(r.paused){await new Promise(e=>{r.resumeQueue.add(e)})}return l})()};let g;if(n/* .Globals.skipAnimation */.OH.skipAnimation){I(r);return M(i,false)}try{let t;if(n.is.arr(e)){t=(async e=>{for(const t of e){await m(t)}})(e)}else{t=Promise.resolve(e(m,i.stop.bind(i)))}await Promise.all([t.then(f),h]);g=M(i.get(),true,false)}catch(e){if(e instanceof L){g=e.result}else if(e instanceof F){g=e.result}else{throw e}}finally{if(a==r.asyncId){r.asyncId=o;r.asyncTo=o?u:void 0;r.promise=o?l:void 0}}if(n.is.fun(s)){n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>{s(g,i,i.item)})}return g})()}function I(e,t){(0,n/* .flush */.yl)(e.timeouts,e=>e.cancel());e.pauseQueue.clear();e.resumeQueue.clear();e.asyncId=e.asyncTo=e.promise=void 0;if(t)e.cancelId=t}var L=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}};var F=class extends Error{constructor(){super("SkipAnimationSignal")}};// src/FrameValue.ts
var N=e=>e instanceof B;var j=1;var B=class extends n/* .FluidValue */.B0{constructor(){super(...arguments);this.id=j++;this._priority=0}get priority(){return this._priority}set priority(e){if(this._priority!=e){this._priority=e;this._onPriorityChange(e)}}/** Get the current value */get(){const e=(0,a/* .getAnimated */.ys)(this);return e&&e.getValue()}/** Create a spring that maps our value to another value */to(...e){return n/* .Globals.to */.OH.to(this,e)}/** @deprecated Use the `to` method instead. */interpolate(...e){(0,n/* .deprecateInterpolate */.LW)();return n/* .Globals.to */.OH.to(this,e)}toJSON(){return this.get()}observerAdded(e){if(e==1)this._attach()}observerRemoved(e){if(e==0)this._detach()}/** Called when the first child is added. */_attach(){}/** Called when the last child is removed. */_detach(){}/** Tell our children about our new value */_onChange(e,t=false){(0,n/* .callFluidObservers */.k0)(this,{type:"change",parent:this,value:e,idle:t})}/** Tell our children about our new priority */_onPriorityChange(e){if(!this.idle){n/* .frameLoop.sort */.fT.sort(this)}(0,n/* .callFluidObservers */.k0)(this,{type:"priority",parent:this,priority:e})}};// src/SpringPhase.ts
var U=Symbol.for("SpringPhase");var W=1;var z=2;var J=4;var q=e=>(e[U]&W)>0;var H=e=>(e[U]&z)>0;var V=e=>(e[U]&J)>0;var $=(e,t)=>t?e[U]|=z|W:e[U]&=~z;var G=(e,t)=>t?e[U]|=J:e[U]&=~J;// src/SpringValue.ts
var X=class extends B{constructor(e,t){super();/** The animation state */this.animation=new T;/** Some props have customizable default values */this.defaultProps={};/** The state for `runAsync` calls */this._state={paused:false,delayed:false,pauseQueue:/* @__PURE__ */new Set,resumeQueue:/* @__PURE__ */new Set,timeouts:/* @__PURE__ */new Set};/** The promise resolvers of pending `start` calls */this._pendingCalls=/* @__PURE__ */new Set;/** The counter for tracking `scheduleProps` calls */this._lastCallId=0;/** The last `scheduleProps` call that changed the `to` prop */this._lastToId=0;this._memoizedDuration=0;if(!n.is.und(e)||!n.is.und(t)){const r=n.is.obj(e)?{...e}:{...t,from:e};if(n.is.und(r.default)){r.default=true}this.start(r)}}/** Equals true when not advancing on each frame. */get idle(){return!(H(this)||this._state.asyncTo)||V(this)}get goal(){return(0,n/* .getFluidValue */.je)(this.animation.to)}get velocity(){const e=(0,a/* .getAnimated */.ys)(this);return e instanceof a/* .AnimatedValue */.iG?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}/**
   * When true, this value has been animated at least once.
   */get hasAnimated(){return q(this)}/**
   * When true, this value has an unfinished animation,
   * which is either active or paused.
   */get isAnimating(){return H(this)}/**
   * When true, all current and future animations are paused.
   */get isPaused(){return V(this)}/**
   *
   *
   */get isDelayed(){return this._state.delayed}/** Advance the current animation by a number of milliseconds */advance(e){let t=true;let r=false;const i=this.animation;let{toValues:o}=i;const{config:s}=i;const u=(0,a/* .getPayload */.He)(i.to);if(!u&&(0,n/* .hasFluidValue */.j$)(i.to)){o=(0,n/* .toArray */.qo)((0,n/* .getFluidValue */.je)(i.to))}i.values.forEach((l,c)=>{if(l.done)return;const d=// Animated strings always go from 0 to 1.
l.constructor==a/* .AnimatedString */.eC?1:u?u[c].lastPosition:o[c];let f=i.immediate;let p=d;if(!f){p=l.lastPosition;if(s.tension<=0){l.done=true;return}let t=l.elapsedTime+=e;const r=i.fromValues[c];const a=l.v0!=null?l.v0:l.v0=n.is.arr(s.velocity)?s.velocity[c]:s.velocity;let o;const u=s.precision||(r==d?.005:Math.min(1,Math.abs(d-r)*.001));if(!n.is.und(s.duration)){let n=1;if(s.duration>0){if(this._memoizedDuration!==s.duration){this._memoizedDuration=s.duration;if(l.durationProgress>0){l.elapsedTime=s.duration*l.durationProgress;t=l.elapsedTime+=e}}n=(s.progress||0)+t/this._memoizedDuration;n=n>1?1:n<0?0:n;l.durationProgress=n}p=r+s.easing(n)*(d-r);o=(p-l.lastPosition)/e;f=n==1}else if(s.decay){const e=s.decay===true?.998:s.decay;const n=Math.exp(-(1-e)*t);p=r+a/(1-e)*(1-n);f=Math.abs(l.lastPosition-p)<=u;o=a*n}else{o=l.lastVelocity==null?a:l.lastVelocity;const t=s.restVelocity||u/10;const i=s.clamp?0:s.bounce;const c=!n.is.und(i);const h=r==d?l.v0>0:r<d;let v;let m=false;const g=1;const b=Math.ceil(e/g);for(let e=0;e<b;++e){v=Math.abs(o)>t;if(!v){f=Math.abs(d-p)<=u;if(f){break}}if(c){m=p==d||p>d==h;if(m){o=-o*i;p=d}}const e=-s.tension*1e-6*(p-d);const r=-s.friction*.001*o;const n=(e+r)/s.mass;o=o+n*g;p=p+o*g}}l.lastVelocity=o;if(Number.isNaN(p)){console.warn(`Got NaN while animating:`,this);f=true}}if(u&&!u[c].done){f=false}if(f){l.done=true}else{t=false}if(l.setValue(p,s.round)){r=true}});const l=(0,a/* .getAnimated */.ys)(this);const c=l.getValue();if(t){const e=(0,n/* .getFluidValue */.je)(i.to);if((c!==e||r)&&!s.decay){l.setValue(e);this._onChange(e)}else if(r&&s.decay){this._onChange(c)}this._stop()}else if(r){this._onChange(c)}}/** Set the current value, while stopping the current animation */set(e){n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>{this._stop();this._focus(e);this._set(e)});return this}/**
   * Freeze the active animation in time, as well as any updates merged
   * before `resume` is called.
   */pause(){this._update({pause:true})}/** Resume the animation if paused. */resume(){this._update({pause:false})}/** Skip to the end of the current animation. */finish(){if(H(this)){const{to:e,config:t}=this.animation;n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>{this._onStart();if(!t.decay){this._set(e,false)}this._stop()})}return this}/** Push props into the pending queue. */update(e){const t=this.queue||(this.queue=[]);t.push(e);return this}start(e,t){let r;if(!n.is.und(e)){r=[n.is.obj(e)?e:{...t,to:e}]}else{r=this.queue||[];this.queue=[]}return Promise.all(r.map(e=>{const t=this._update(e);return t})).then(e=>R(this,e))}/**
   * Stop the current animation, and cancel any delayed updates.
   *
   * Pass `true` to call `onRest` with `cancelled: true`.
   */stop(e){const{to:t}=this.animation;this._focus(this.get());I(this._state,e&&this._lastCallId);n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>this._stop(t,e));return this}/** Restart the animation. */reset(){this._update({reset:true})}/** @internal */eventObserved(e){if(e.type=="change"){this._start()}else if(e.type=="priority"){this.priority=e.priority+1}}/**
   * Parse the `to` and `from` range from the given `props` object.
   *
   * This also ensures the initial value is available to animated components
   * during the render phase.
   */_prepareNode(e){const t=this.key||"";let{to:r,from:i}=e;r=n.is.obj(r)?r[t]:r;if(r==null||b(r)){r=void 0}i=n.is.obj(i)?i[t]:i;if(i==null){i=void 0}const o={to:r,from:i};if(!q(this)){if(e.reverse)[r,i]=[i,r];i=(0,n/* .getFluidValue */.je)(i);if(!n.is.und(i)){this._set(i)}else if(!(0,a/* .getAnimated */.ys)(this)){this._set(r)}}return o}/** Every update is processed by this method before merging. */_update({...e},t){const{key:r,defaultProps:i}=this;if(e.default)Object.assign(i,d(e,(e,t)=>/^on/.test(t)?u(e,r):e));en(this,e,"onProps");ei(this,"onProps",e,this);const a=this._prepareNode(e);if(Object.isFrozen(this)){throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?")}const o=this._state;return C(++this._lastCallId,{key:r,props:e,defaultProps:i,state:o,actions:{pause:()=>{if(!V(this)){G(this,true);(0,n/* .flushCalls */.bl)(o.pauseQueue);ei(this,"onPause",M(this,K(this,this.animation.to)),this)}},resume:()=>{if(V(this)){G(this,false);if(H(this)){this._resume()}(0,n/* .flushCalls */.bl)(o.resumeQueue);ei(this,"onResume",M(this,K(this,this.animation.to)),this)}},start:this._merge.bind(this,a)}}).then(r=>{if(e.loop&&r.finished&&!(t&&r.noop)){const t=Q(e);if(t){return this._update(t,true)}}return r})}/** Merge props into the current animation */_merge(e,t,r){if(t.cancel){this.stop(true);return r(P(this))}const i=!n.is.und(e.to);const u=!n.is.und(e.from);if(i||u){if(t.callId>this._lastToId){this._lastToId=t.callId}else{return r(P(this))}}const{key:l,defaultProps:c,animation:d}=this;const{to:f,from:p}=d;let{to:h=f,from:v=p}=e;if(u&&!i&&(!t.default||n.is.und(h))){h=v}if(t.reverse)[h,v]=[v,h];const g=!(0,n/* .isEqual */.Xy)(v,p);if(g){d.from=v}v=(0,n/* .getFluidValue */.je)(v);const y=!(0,n/* .isEqual */.Xy)(h,f);if(y){this._focus(h)}const _=b(t.to);const{config:w}=d;const{decay:x,velocity:E}=w;if(i||u){w.velocity=0}if(t.config&&!_){S(w,o(t.config,l),// Avoid calling the same "config" prop twice.
t.config!==c.config?o(c.config,l):void 0)}let Z=(0,a/* .getAnimated */.ys)(this);if(!Z||n.is.und(h)){return r(M(this,true))}const O=// When `reset` is undefined, the `from` prop implies `reset: true`,
// except for declarative updates. When `reset` is defined, there
// must exist a value to animate from.
n.is.und(t.reset)?u&&!t.default:!n.is.und(v)&&s(t.reset,l);const k=O?v:this.get();const T=m(h);const C=n.is.num(T)||n.is.arr(T)||(0,n/* .isAnimatedString */.Df)(T);const R=!_&&(!C||s(c.immediate||t.immediate,l));if(y){const e=(0,a/* .getAnimatedType */.sb)(h);if(e!==Z.constructor){if(R){Z=this._set(T)}else throw Error(`Cannot animate between ${Z.constructor.name} and ${e.name}, as the "to" prop suggests`)}}const I=Z.constructor;let L=(0,n/* .hasFluidValue */.j$)(h);let F=false;if(!L){const e=O||!q(this)&&g;if(y||e){F=(0,n/* .isEqual */.Xy)(m(k),T);L=!F}if(!(0,n/* .isEqual */.Xy)(d.immediate,R)&&!R||!(0,n/* .isEqual */.Xy)(w.decay,x)||!(0,n/* .isEqual */.Xy)(w.velocity,E)){L=true}}if(F&&H(this)){if(d.changed&&!O){L=true}else if(!L){this._stop(f)}}if(!_){if(L||(0,n/* .hasFluidValue */.j$)(f)){d.values=Z.getPayload();d.toValues=(0,n/* .hasFluidValue */.j$)(h)?null:I==a/* .AnimatedString */.eC?[1]:(0,n/* .toArray */.qo)(T)}if(d.immediate!=R){d.immediate=R;if(!R&&!O){this._set(f)}}if(L){const{onRest:e}=d;(0,n/* .each */.S6)(er,e=>en(this,t,e));const i=M(this,K(this,f));(0,n/* .flushCalls */.bl)(this._pendingCalls,i);this._pendingCalls.add(r);if(d.changed)n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>{d.changed=!O;e?.(i,this);if(O){o(c.onRest,i)}else{d.onStart?.(i,this)}})}}if(O){this._set(k)}if(_){r(D(t.to,t,this._state,this))}else if(L){this._start()}else if(H(this)&&!y){this._pendingCalls.add(r)}else{r(A(k))}}/** Update the `animation.to` value, which might be a `FluidValue` */_focus(e){const t=this.animation;if(e!==t.to){if((0,n/* .getFluidObservers */.Ll)(this)){this._detach()}t.to=e;if((0,n/* .getFluidObservers */.Ll)(this)){this._attach()}}}_attach(){let e=0;const{to:t}=this.animation;if((0,n/* .hasFluidValue */.j$)(t)){(0,n/* .addFluidObserver */.UI)(t,this);if(N(t)){e=t.priority+1}}this.priority=e}_detach(){const{to:e}=this.animation;if((0,n/* .hasFluidValue */.j$)(e)){(0,n/* .removeFluidObserver */.iL)(e,this)}}/**
   * Update the current value from outside the frameloop,
   * and return the `Animated` node.
   */_set(e,t=true){const r=(0,n/* .getFluidValue */.je)(e);if(!n.is.und(r)){const e=(0,a/* .getAnimated */.ys)(this);if(!e||!(0,n/* .isEqual */.Xy)(r,e.getValue())){const i=(0,a/* .getAnimatedType */.sb)(r);if(!e||e.constructor!=i){(0,a/* .setAnimated */.f3)(this,i.create(r))}else{e.setValue(r)}if(e){n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>{this._onChange(r,t)})}}}return(0,a/* .getAnimated */.ys)(this)}_onStart(){const e=this.animation;if(!e.changed){e.changed=true;ei(this,"onStart",M(this,K(this,e.to)),this)}}_onChange(e,t){if(!t){this._onStart();o(this.animation.onChange,e,this)}o(this.defaultProps.onChange,e,this);super._onChange(e,t)}// This method resets the animation state (even if already animating) to
// ensure the latest from/to range is used, and it also ensures this spring
// is added to the frameloop.
_start(){const e=this.animation;(0,a/* .getAnimated */.ys)(this).reset((0,n/* .getFluidValue */.je)(e.to));if(!e.immediate){e.fromValues=e.values.map(e=>e.lastPosition)}if(!H(this)){$(this,true);if(!V(this)){this._resume()}}}_resume(){if(n/* .Globals.skipAnimation */.OH.skipAnimation){this.finish()}else{n/* .frameLoop.start */.fT.start(this)}}/**
   * Exit the frameloop and notify `onRest` listeners.
   *
   * Always wrap `_stop` calls with `batchedUpdates`.
   */_stop(e,t){if(H(this)){$(this,false);const r=this.animation;(0,n/* .each */.S6)(r.values,e=>{e.done=true});if(r.toValues){r.onChange=r.onPause=r.onResume=void 0}(0,n/* .callFluidObservers */.k0)(this,{type:"idle",parent:this});const i=t?P(this.get()):M(this.get(),K(this,e??r.to));(0,n/* .flushCalls */.bl)(this._pendingCalls,i);if(r.changed){r.changed=false;ei(this,"onRest",i,this)}}}};function K(e,t){const r=m(t);const i=m(e.get());return(0,n/* .isEqual */.Xy)(i,r)}function Q(e,t=e.loop,r=e.to){const n=o(t);if(n){const i=n!==true&&v(n);const a=(i||e).reverse;const o=!i||i.reset;return Y({...e,loop:t,// Avoid updating default props when looping.
default:false,// Never loop the `pause` prop.
pause:void 0,// For the "reverse" prop to loop as expected, the "to" prop
// must be undefined. The "reverse" prop is ignored when the
// "to" prop is an array or function.
to:!a||b(r)?r:void 0,// Ignore the "from" prop except on reset.
from:o?e.from:void 0,reset:o,// The "loop" prop can return a "useSpring" props object to
// override any of the original props.
...i})}}function Y(e){const{to:t,from:r}=e=v(e);const i=/* @__PURE__ */new Set;if(n.is.obj(t))et(t,i);if(n.is.obj(r))et(r,i);e.keys=i.size?Array.from(i):null;return e}function ee(e){const t=Y(e);if(n.is.und(t.default)){t.default=d(t)}return t}function et(e,t){(0,n/* .eachProp */.rU)(e,(e,r)=>e!=null&&t.add(r))}var er=["onStart","onRest","onChange","onPause","onResume"];function en(e,t,r){e.animation[r]=t[r]!==l(t,r)?u(t[r],e.key):void 0}function ei(e,t,...r){e.animation[t]?.(...r);e.defaultProps[t]?.(...r)}// src/Controller.ts
var ea=["onStart","onChange","onRest"];var eo=1;var es=class{constructor(e,t){this.id=eo++;/** The animated values */this.springs={};/** The queue of props passed to the `update` method. */this.queue=[];/** The counter for tracking `scheduleProps` calls */this._lastAsyncId=0;/** The values currently being animated */this._active=/* @__PURE__ */new Set;/** The values that changed recently */this._changed=/* @__PURE__ */new Set;/** Equals false when `onStart` listeners can be called */this._started=false;/** State used by the `runAsync` function */this._state={paused:false,pauseQueue:/* @__PURE__ */new Set,resumeQueue:/* @__PURE__ */new Set,timeouts:/* @__PURE__ */new Set};/** The event queues that are flushed once per frame maximum */this._events={onStart:/* @__PURE__ */new Map,onChange:/* @__PURE__ */new Map,onRest:/* @__PURE__ */new Map};this._onFrame=this._onFrame.bind(this);if(t){this._flush=t}if(e){this.start({default:true,...e})}}/**
   * Equals `true` when no spring values are in the frameloop, and
   * no async animation is currently active.
   */get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>{return e.idle&&!e.isDelayed&&!e.isPaused})}get item(){return this._item}set item(e){this._item=e}/** Get the current values of our springs */get(){const e={};this.each((t,r)=>e[r]=t.get());return e}/** Set the current values without animating. */set(e){for(const t in e){const r=e[t];if(!n.is.und(r)){this.springs[t].set(r)}}}/** Push an update onto the queue of each value. */update(e){if(e){this.queue.push(Y(e))}return this}/**
   * Start the queued animations for every spring, and resolve the returned
   * promise once all queued animations have finished or been cancelled.
   *
   * When you pass a queue (instead of nothing), that queue is used instead of
   * the queued animations added with the `update` method, which are left alone.
   */start(e){let{queue:t}=this;if(e){t=(0,n/* .toArray */.qo)(e).map(Y)}else{this.queue=[]}if(this._flush){return this._flush(this,t)}eh(this,t);return eu(this,t)}/** @internal */stop(e,t){if(e!==!!e){t=e}if(t){const r=this.springs;(0,n/* .each */.S6)((0,n/* .toArray */.qo)(t),t=>r[t].stop(!!e))}else{I(this._state,this._lastAsyncId);this.each(t=>t.stop(!!e))}return this}/** Freeze the active animation in time */pause(e){if(n.is.und(e)){this.start({pause:true})}else{const t=this.springs;(0,n/* .each */.S6)((0,n/* .toArray */.qo)(e),e=>t[e].pause())}return this}/** Resume the animation if paused. */resume(e){if(n.is.und(e)){this.start({pause:false})}else{const t=this.springs;(0,n/* .each */.S6)((0,n/* .toArray */.qo)(e),e=>t[e].resume())}return this}/** Call a function once per spring value */each(e){(0,n/* .eachProp */.rU)(this.springs,e)}/** @internal Called at the end of every animation frame */_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events;const i=this._active.size>0;const a=this._changed.size>0;if(i&&!this._started||a&&!this._started){this._started=true;(0,n/* .flush */.yl)(e,([e,t])=>{t.value=this.get();e(t,this,this._item)})}const o=!i&&this._started;const s=a||o&&r.size?this.get():null;if(a&&t.size){(0,n/* .flush */.yl)(t,([e,t])=>{t.value=s;e(t,this,this._item)})}if(o){this._started=false;(0,n/* .flush */.yl)(r,([e,t])=>{t.value=s;e(t,this,this._item)})}}/** @internal */eventObserved(e){if(e.type=="change"){this._changed.add(e.parent);if(!e.idle){this._active.add(e.parent)}}else if(e.type=="idle"){this._active.delete(e.parent)}else return;n/* .raf.onFrame */.Wn.onFrame(this._onFrame)}};function eu(e,t){return Promise.all(t.map(t=>el(e,t))).then(t=>R(e,t))}async function el(e,t,r){const{keys:i,to:a,from:o,loop:s,onRest:u,onResolve:c}=t;const d=n.is.obj(t.default)&&t.default;if(s){t.loop=false}if(a===false)t.to=null;if(o===false)t.from=null;const f=n.is.arr(a)||n.is.fun(a)?a:void 0;if(f){t.to=void 0;t.onRest=void 0;if(d){d.onRest=void 0}}else{(0,n/* .each */.S6)(ea,r=>{const i=t[r];if(n.is.fun(i)){const n=e["_events"][r];t[r]=({finished:e,cancelled:t})=>{const r=n.get(i);if(r){if(!e)r.finished=false;if(t)r.cancelled=true}else{n.set(i,{value:null,finished:e||false,cancelled:t||false})}};if(d){d[r]=t[r]}}})}const p=e["_state"];if(t.pause===!p.paused){p.paused=t.pause;(0,n/* .flushCalls */.bl)(t.pause?p.pauseQueue:p.resumeQueue)}else if(p.paused){t.pause=true}const h=(i||Object.keys(e.springs)).map(r=>e.springs[r].start(t));const v=t.cancel===true||l(t,"cancel")===true;if(f||v&&p.asyncId){h.push(C(++e["_lastAsyncId"],{props:t,state:p,actions:{pause:n/* .noop */.ZT,resume:n/* .noop */.ZT,start(t,r){if(v){I(p,e["_lastAsyncId"]);r(P(e))}else{t.onRest=u;r(D(f,t,p,e))}}}}))}if(p.paused){await new Promise(e=>{p.resumeQueue.add(e)})}const m=R(e,await Promise.all(h));if(s&&m.finished&&!(r&&m.noop)){const r=Q(t,s,a);if(r){eh(e,[r]);return el(e,r,true)}}if(c){n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>c(m,e,e.item))}return m}function ec(e,t){const r={...e.springs};if(t){(0,n/* .each */.S6)((0,n/* .toArray */.qo)(t),e=>{if(n.is.und(e.keys)){e=Y(e)}if(!n.is.obj(e.to)){e={...e,to:void 0}}ep(r,e,e=>{return ef(e)})})}ed(e,r);return r}function ed(e,t){(0,n/* .eachProp */.rU)(t,(t,r)=>{if(!e.springs[r]){e.springs[r]=t;(0,n/* .addFluidObserver */.UI)(t,e)}})}function ef(e,t){const r=new X;r.key=e;if(t){(0,n/* .addFluidObserver */.UI)(r,t)}return r}function ep(e,t,r){if(t.keys){(0,n/* .each */.S6)(t.keys,n=>{const i=e[n]||(e[n]=r(n));i["_prepareNode"](t)})}}function eh(e,t){(0,n/* .each */.S6)(t,t=>{ep(e.springs,t,t=>{return ef(t,e)})})}// src/SpringContext.tsx
var ev=({children:e,...t})=>{const r=(0,i.useContext)(em);const a=t.pause||!!r.pause,o=t.immediate||!!r.immediate;t=(0,n/* .useMemoOne */.Pr)(()=>({pause:a,immediate:o}),[a,o]);const{Provider:s}=em;return /* @__PURE__ */i.createElement(s,{value:t},e)};var em=eg(ev,{});ev.Provider=em.Provider;ev.Consumer=em.Consumer;function eg(e,t){Object.assign(e,i.createContext(t));e.Provider._context=e;e.Consumer._context=e;return e}// src/SpringRef.ts
var eb=()=>{const e=[];const t=function(t){(0,n/* .deprecateDirectCall */.ZR)();const i=[];(0,n/* .each */.S6)(e,(e,a)=>{if(n.is.und(t)){i.push(e.start())}else{const n=r(t,e,a);if(n){i.push(e.start(n))}}});return i};t.current=e;t.add=function(t){if(!e.includes(t)){e.push(t)}};t.delete=function(t){const r=e.indexOf(t);if(~r)e.splice(r,1)};t.pause=function(){(0,n/* .each */.S6)(e,e=>e.pause(...arguments));return this};t.resume=function(){(0,n/* .each */.S6)(e,e=>e.resume(...arguments));return this};t.set=function(t){(0,n/* .each */.S6)(e,(e,r)=>{const i=n.is.fun(t)?t(r,e):t;if(i){e.set(i)}})};t.start=function(t){const r=[];(0,n/* .each */.S6)(e,(e,i)=>{if(n.is.und(t)){r.push(e.start())}else{const n=this._getProps(t,e,i);if(n){r.push(e.start(n))}}});return r};t.stop=function(){(0,n/* .each */.S6)(e,e=>e.stop(...arguments));return this};t.update=function(t){(0,n/* .each */.S6)(e,(e,r)=>e.update(this._getProps(t,e,r)));return this};const r=function(e,t,r){return n.is.fun(e)?e(r,t):e};t._getProps=r;return t};// src/hooks/useSprings.ts
function ey(e,t,r){const a=n.is.fun(t)&&t;if(a&&!r)r=[];const o=(0,i.useMemo)(()=>a||arguments.length==3?eb():void 0,[]);const s=(0,i.useRef)(0);const u=(0,n/* .useForceUpdate */.NW)();const l=(0,i.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const r=ec(e,t);const n=s.current>0&&!l.queue.length&&!Object.keys(r).some(t=>!e.springs[t]);return n?eu(e,t):new Promise(n=>{ed(e,r);l.queue.push(()=>{n(eu(e,t))});u()})}}),[]);const c=(0,i.useRef)([...l.ctrls]);const d=[];const f=(0,n/* .usePrev */.zH)(e)||0;(0,i.useMemo)(()=>{(0,n/* .each */.S6)(c.current.slice(e,f),e=>{y(e,o);e.stop(true)});c.current.length=e;p(f,e)},[e]);(0,i.useMemo)(()=>{p(0,Math.min(f,e))},r);function p(e,r){for(let n=e;n<r;n++){const e=c.current[n]||(c.current[n]=new es(null,l.flush));const r=a?a(n,e):t[n];if(r){d[n]=ee(r)}}}const h=c.current.map((e,t)=>ec(e,d[t]));const v=(0,i.useContext)(ev);const m=(0,n/* .usePrev */.zH)(v);const b=v!==m&&g(v);(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>{s.current++;l.ctrls=c.current;const{queue:e}=l;if(e.length){l.queue=[];(0,n/* .each */.S6)(e,e=>e())}(0,n/* .each */.S6)(c.current,(e,t)=>{o?.add(e);if(b){e.start({default:v})}const r=d[t];if(r){_(e,r.ref);if(e.ref){e.queue.push(r)}else{e.start(r)}}})});(0,n/* .useOnce */.tf)(()=>()=>{(0,n/* .each */.S6)(l.ctrls,e=>e.stop(true))});const w=h.map(e=>({...e}));return o?[w,o]:w}// src/hooks/useSpring.ts
function e_(e,t){const r=n.is.fun(e);const[[i],a]=ey(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[i,a]:i}// src/hooks/useSpringRef.ts
var ew=()=>eb();var ex=()=>useState(ew)[0];// src/hooks/useSpringValue.ts
var eE=(e,t)=>{const r=useConstant(()=>new X(e,t));useOnce2(()=>()=>{r.stop()});return r};// src/hooks/useTrail.ts
function eZ(e,t,r){const n=is10.fun(t)&&t;if(n&&!r)r=[];let i=true;let a=void 0;const o=ey(e,(e,r)=>{const o=n?n(e,r):t;a=o.ref;i=i&&o.reverse;return o},// Ensure the props function is called when no deps exist.
// This works around the 3 argument rule.
r||[{}]);useIsomorphicLayoutEffect3(()=>{each6(o[1].current,(e,t)=>{const r=o[1].current[t+(i?1:-1)];_(e,a);if(e.ref){if(r){e.update({to:r.springs})}return}if(r){e.start({to:r.springs})}else{e.start()}})},r);if(n||arguments.length==3){const e=a??o[1];e["_getProps"]=(t,r,n)=>{const i=is10.fun(t)?t(n,r):t;if(i){const t=e.current[n+(i.reverse?1:-1)];if(t)i.to=t.springs;return i}};return o}return o[0]}// src/hooks/useTransition.tsx
function eS(e,t,r){const a=n.is.fun(t)&&t;const{reset:s,sort:u,trail:l=0,expires:c=true,exitBeforeEnter:f=false,onDestroyed:p,ref:h,config:m}=a?a():t;const b=(0,i.useMemo)(()=>a||arguments.length==3?eb():void 0,[]);const w=(0,n/* .toArray */.qo)(e);const x=[];const E=(0,i.useRef)(null);const Z=s?null:E.current;(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>{E.current=x});(0,n/* .useOnce */.tf)(()=>{(0,n/* .each */.S6)(x,e=>{b?.add(e.ctrl);e.ctrl.ref=b});return()=>{(0,n/* .each */.S6)(E.current,e=>{if(e.expired){clearTimeout(e.expirationId)}y(e.ctrl,b);e.ctrl.stop(true)})}});const S=ek(w,a?a():t,Z);const O=s&&E.current||[];(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>(0,n/* .each */.S6)(O,({ctrl:e,item:t,key:r})=>{y(e,b);o(p,t,r)}));const k=[];if(Z)(0,n/* .each */.S6)(Z,(e,t)=>{if(e.expired){clearTimeout(e.expirationId);O.push(e)}else{t=k[t]=S.indexOf(e.key);if(~t)x[t]=e}});(0,n/* .each */.S6)(w,(e,t)=>{if(!x[t]){x[t]={key:S[t],item:e,phase:"mount"/* MOUNT */,ctrl:new es};x[t].ctrl.item=e}});if(k.length){let e=-1;const{leave:r}=a?a():t;(0,n/* .each */.S6)(k,(t,n)=>{const i=Z[n];if(~t){e=x.indexOf(i);x[e]={...i,item:w[t]}}else if(r){x.splice(++e,0,i)}})}if(n.is.fun(u)){x.sort((e,t)=>u(e.item,t.item))}let T=-l;const C=(0,n/* .useForceUpdate */.NW)();const R=d(t);const A=/* @__PURE__ */new Map;const M=(0,i.useRef)(/* @__PURE__ */new Map);const P=(0,i.useRef)(false);(0,n/* .each */.S6)(x,(e,r)=>{const i=e.key;const s=e.phase;const u=a?a():t;let d;let p;const g=o(u.delay||0,i);if(s=="mount"/* MOUNT */){d=u.enter;p="enter"/* ENTER */}else{const e=S.indexOf(i)<0;if(s!="leave"/* LEAVE */){if(e){d=u.leave;p="leave"/* LEAVE */}else if(d=u.update){p="update"/* UPDATE */}else return}else if(!e){d=u.enter;p="enter"/* ENTER */}else return}d=o(d,e.item,r);d=n.is.obj(d)?v(d):{to:d};if(!d.config){const t=m||R.config;d.config=o(t,e.item,r,p)}T+=l;const b={...R,// we need to add our props.delay value you here.
delay:g+T,ref:h,immediate:u.immediate,// This prevents implied resets.
reset:false,// Merge any phase-specific props.
...d};if(p=="enter"/* ENTER */&&n.is.und(b.from)){const i=a?a():t;const s=n.is.und(i.initial)||Z?i.from:i.initial;b.from=o(s,e.item,r)}const{onResolve:y}=b;b.onResolve=e=>{o(y,e);const t=E.current;const r=t.find(e=>e.key===i);if(!r)return;if(e.cancelled&&r.phase!="update"/* UPDATE */){return}if(r.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if(r.phase=="leave"/* LEAVE */){const t=o(c,r.item);if(t!==false){const n=t===true?0:t;r.expired=true;if(!e&&n>0){if(n<=0x7fffffff)r.expirationId=setTimeout(C,n);return}}}if(e&&t.some(e=>e.expired)){M.current.delete(r);if(f){P.current=true}C()}}};const _=ec(e.ctrl,b);if(p==="leave"/* LEAVE */&&f){M.current.set(e,{phase:p,springs:_,payload:b})}else{A.set(e,{phase:p,springs:_,payload:b})}});const D=(0,i.useContext)(ev);const I=(0,n/* .usePrev */.zH)(D);const L=D!==I&&g(D);(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>{if(L){(0,n/* .each */.S6)(x,e=>{e.ctrl.start({default:D})})}},[D]);(0,n/* .each */.S6)(A,(e,t)=>{if(M.current.size){const e=x.findIndex(e=>e.key===t.key);x.splice(e,1)}});(0,n/* .useIsomorphicLayoutEffect */.LI)(()=>{(0,n/* .each */.S6)(M.current.size?M.current:A,({phase:e,payload:t},r)=>{const{ctrl:n}=r;r.phase=e;b?.add(n);if(L&&e=="enter"/* ENTER */){n.start({default:D})}if(t){_(n,t.ref);if((n.ref||b)&&!P.current){n.update(t)}else{n.start(t);if(P.current){P.current=false}}}})},s?void 0:r);const F=e=>/* @__PURE__ */i.createElement(i.Fragment,null,x.map((t,r)=>{const{springs:a}=A.get(t)||t.ctrl;const o=e({...a},t.item,t,r);return o&&o.type?/* @__PURE__ */i.createElement(o.type,{...o.props,key:n.is.str(t.key)||n.is.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return b?[F,b]:F}var eO=1;function ek(e,{key:t,keys:r=t},i){if(r===null){const t=/* @__PURE__ */new Set;return e.map(e=>{const r=i&&i.find(r=>r.item===e&&r.phase!=="leave"/* LEAVE */&&!t.has(r));if(r){t.add(r);return r.key}return eO++})}return n.is.und(r)?e:n.is.fun(r)?e.map(r):(0,n/* .toArray */.qo)(r)}// src/hooks/useScroll.ts
var eT=({container:e,...t}={})=>{const[r,n]=e_(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);useIsomorphicLayoutEffect5(()=>{const t=onScroll(({x:e,y:t})=>{n.start({scrollX:e.current,scrollXProgress:e.progress,scrollY:t.current,scrollYProgress:t.progress})},{container:e?.current||void 0});return()=>{each8(Object.values(r),e=>e.stop());t()}},[]);return r};// src/hooks/useResize.ts
var eC=({container:e,...t})=>{const[r,n]=e_(()=>({width:0,height:0,...t}),[]);useIsomorphicLayoutEffect6(()=>{const t=onResize(({width:e,height:t})=>{n.start({width:e,height:t,immediate:r.width.get()===0||r.height.get()===0})},{container:e?.current||void 0});return()=>{each9(Object.values(r),e=>e.stop());t()}},[]);return r};// src/hooks/useInView.ts
var eR=/* unused pure expression or super */null&&{any:0,all:1};function eA(e,t){const[r,n]=useState2(false);const i=useRef3();const a=is12.fun(e)&&e;const o=a?a():{};const{to:s={},from:u={},...l}=o;const c=a?t:e;const[d,f]=e_(()=>({from:u,...l}),[]);useIsomorphicLayoutEffect7(()=>{const e=i.current;const{root:t,once:a,amount:o="any",...l}=c??{};if(!e||a&&r||typeof IntersectionObserver==="undefined")return;const d=/* @__PURE__ */new WeakMap;const p=()=>{if(s){f.start(s)}n(true);const e=()=>{if(u){f.start(u)}n(false)};return a?void 0:e};const h=e=>{e.forEach(e=>{const t=d.get(e.target);if(e.isIntersecting===Boolean(t)){return}if(e.isIntersecting){const t=p();if(is12.fun(t)){d.set(e.target,t)}else{v.unobserve(e.target)}}else if(t){t();d.delete(e.target)}})};const v=new IntersectionObserver(h,{root:t&&t.current||void 0,threshold:typeof o==="number"||Array.isArray(o)?o:eR[o],...l});v.observe(e);return()=>v.unobserve(e)},[c]);if(a){return[i,d]}return[i,r]}// src/components/Spring.tsx
function eM({children:e,...t}){return e(e_(t))}// src/components/Trail.tsx
function eP({items:e,children:t,...r}){const n=eZ(e.length,r);return e.map((e,r)=>{const i=t(e,r);return is13.fun(i)?i(n[r]):i})}// src/components/Transition.tsx
function eD({items:e,children:t,...r}){return eS(e,r)(t)}// src/interpolate.ts
// src/Interpolation.ts
var eI=class extends B{constructor(e,t){super();this.source=e;/** Equals false when in the frameloop */this.idle=true;/** The inputs which are currently animating */this._active=/* @__PURE__ */new Set;this.calc=(0,n/* .createInterpolator */.mD)(...t);const r=this._get();const i=(0,a/* .getAnimatedType */.sb)(r);(0,a/* .setAnimated */.f3)(this,i.create(r))}advance(e){const t=this._get();const r=this.get();if(!(0,n/* .isEqual */.Xy)(t,r)){(0,a/* .getAnimated */.ys)(this).setValue(t);this._onChange(t,this.idle)}if(!this.idle&&eF(this._active)){eN(this)}}_get(){const e=n.is.arr(this.source)?this.source.map(n/* .getFluidValue */.je):(0,n/* .toArray */.qo)((0,n/* .getFluidValue */.je)(this.source));return this.calc(...e)}_start(){if(this.idle&&!eF(this._active)){this.idle=false;(0,n/* .each */.S6)((0,a/* .getPayload */.He)(this),e=>{e.done=false});if(n/* .Globals.skipAnimation */.OH.skipAnimation){n/* .raf.batchedUpdates */.Wn.batchedUpdates(()=>this.advance());eN(this)}else{n/* .frameLoop.start */.fT.start(this)}}}// Observe our sources only when we're observed.
_attach(){let e=1;(0,n/* .each */.S6)((0,n/* .toArray */.qo)(this.source),t=>{if((0,n/* .hasFluidValue */.j$)(t)){(0,n/* .addFluidObserver */.UI)(t,this)}if(N(t)){if(!t.idle){this._active.add(t)}e=Math.max(e,t.priority+1)}});this.priority=e;this._start()}// Stop observing our sources once we have no observers.
_detach(){(0,n/* .each */.S6)((0,n/* .toArray */.qo)(this.source),e=>{if((0,n/* .hasFluidValue */.j$)(e)){(0,n/* .removeFluidObserver */.iL)(e,this)}});this._active.clear();eN(this)}/** @internal */eventObserved(e){if(e.type=="change"){if(e.idle){this.advance()}else{this._active.add(e.parent);this._start()}}else if(e.type=="idle"){this._active.delete(e.parent)}else if(e.type=="priority"){this.priority=(0,n/* .toArray */.qo)(this.source).reduce((e,t)=>Math.max(e,(N(t)?t.priority:0)+1),0)}}};function eL(e){return e.idle!==false}function eF(e){return!e.size||Array.from(e).every(eL)}function eN(e){if(!e.idle){e.idle=true;(0,n/* .each */.S6)((0,a/* .getPayload */.He)(e),e=>{e.done=true});(0,n/* .callFluidObservers */.k0)(e,{type:"idle",parent:e})}}// src/interpolate.ts
var ej=(e,...t)=>new eI(e,t);var eB=(e,...t)=>(deprecateInterpolate2(),new eI(e,t));// src/globals.ts
n/* .Globals.assign */.OH.assign({createStringInterpolator:n/* .createStringInterpolator */.qS,to:(e,t)=>new eI(e,t)});var eU=n/* .frameLoop.advance */.fT.advance;// src/index.ts
//# sourceMappingURL=react-spring_core.modern.mjs.map
},96009:function(e,t,r){"use strict";r.d(t,{W:()=>i});// src/index.ts
var n=_();var i=e=>v(e,n);var a=_();i.write=e=>v(e,a);var o=_();i.onStart=e=>v(e,o);var s=_();i.onFrame=e=>v(e,s);var u=_();i.onFinish=e=>v(e,u);var l=[];i.setTimeout=(e,t)=>{const r=i.now()+t;const n=()=>{const e=l.findIndex(e=>e.cancel==n);if(~e)l.splice(e,1);p-=~e?1:0};const a={time:r,handler:e,cancel:n};l.splice(c(r),0,a);p+=1;m();return a};var c=e=>~(~l.findIndex(t=>t.time>e)||~l.length);i.cancel=e=>{o.delete(e);s.delete(e);u.delete(e);n.delete(e);a.delete(e)};i.sync=e=>{h=true;i.batchedUpdates(e);h=false};i.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...e){t=e;i.onStart(r)}n.handler=e;n.cancel=()=>{o.delete(r);t=null};return n};var d=typeof window!="undefined"?window.requestAnimationFrame:// eslint-disable-next-line @typescript-eslint/no-empty-function
()=>{};i.use=e=>d=e;i.now=typeof performance!="undefined"?()=>performance.now():Date.now;i.batchedUpdates=e=>e();i.catch=console.error;i.frameLoop="always";i.advance=()=>{if(i.frameLoop!=="demand"){console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand")}else{y()}};var f=-1;var p=0;var h=false;function v(e,t){if(h){t.delete(e);e(0)}else{t.add(e);m()}}function m(){if(f<0){f=0;if(i.frameLoop!=="demand"){d(b)}}}function g(){f=-1}function b(){if(~f){d(b);i.batchedUpdates(y)}}function y(){const e=f;f=i.now();const t=c(f);if(t){w(l.splice(0,t),e=>e.handler());p-=t}if(!p){g();return}o.flush();n.flush(e?Math.min(64,f-e):16.667);s.flush();a.flush();u.flush()}function _(){let e=/* @__PURE__ */new Set;let t=e;return{add(r){p+=t==e&&!e.has(r)?1:0;e.add(r)},delete(r){p-=t==e&&e.has(r)?1:0;return e.delete(r)},flush(r){if(t.size){e=/* @__PURE__ */new Set;p-=t.size;w(t,t=>t(r)&&e.add(t));p+=e.size;t=e}}}}function w(e,t){e.forEach(e=>{try{t(e)}catch(e){i.catch(e)}})}var x=/* unused pure expression or super */null&&{/** The number of pending tasks */count(){return p},/** Whether there's a raf update loop running */isRunning(){return f>=0},/** Clear internal state. Never call from update loop! */clear(){f=-1;l=[];o=_();n=_();s=_();a=_();u=_();p=0}};//# sourceMappingURL=react-spring_rafz.modern.mjs.map
},90009:function(e,t,r){"use strict";r.d(t,{B0:()=>ey,Df:()=>eB,LI:()=>e5,LW:()=>eF,Ll:()=>em,NW:()=>e8,O9:()=>I,OH:()=>s,Pr:()=>e9,S6:()=>f,UI:()=>ew,Wn:()=>/* reexport safe */n.W,Xy:()=>d,Z5:()=>ed,ZR:()=>ej,ZT:()=>u,bl:()=>m,dE:()=>l,fT:()=>T,iL:()=>ex,is:()=>c,j$:()=>eh,je:()=>ev,k0:()=>eb,mD:()=>et,qS:()=>eP,qo:()=>h,rU:()=>p,tf:()=>te,yl:()=>v,zH:()=>tr});/* ESM import */var n=r(96009);/* ESM import */var i=r(87363);var a=Object.defineProperty;var o=(e,t)=>{for(var r in t)a(e,r,{get:t[r],enumerable:true})};// src/globals.ts
var s={};o(s,{assign:()=>E,colors:()=>_,createStringInterpolator:()=>b,skipAnimation:()=>w,to:()=>y,willAdvance:()=>x});// src/helpers.ts
function u(){}var l=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});var c={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e==="function",str:e=>typeof e==="string",num:e=>typeof e==="number",und:e=>e===void 0};function d(e,t){if(c.arr(e)){if(!c.arr(t)||e.length!==t.length)return false;for(let r=0;r<e.length;r++){if(e[r]!==t[r])return false}return true}return e===t}var f=(e,t)=>e.forEach(t);function p(e,t,r){if(c.arr(e)){for(let n=0;n<e.length;n++){t.call(r,e[n],`${n}`)}return}for(const n in e){if(e.hasOwnProperty(n)){t.call(r,e[n],n)}}}var h=e=>c.und(e)?[]:c.arr(e)?e:[e];function v(e,t){if(e.size){const r=Array.from(e);e.clear();f(r,t)}}var m=(e,...t)=>v(e,e=>e(...t));var g=()=>typeof window==="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);// src/globals.ts
var b;var y;var _=null;var w=false;var x=u;var E=e=>{if(e.to)y=e.to;if(e.now)n/* .raf.now */.W.now=e.now;if(e.colors!==void 0)_=e.colors;if(e.skipAnimation!=null)w=e.skipAnimation;if(e.createStringInterpolator)b=e.createStringInterpolator;if(e.requestAnimationFrame)n/* .raf.use */.W.use(e.requestAnimationFrame);if(e.batchedUpdates)n/* .raf.batchedUpdates */.W.batchedUpdates=e.batchedUpdates;if(e.willAdvance)x=e.willAdvance;if(e.frameLoop)n/* .raf.frameLoop */.W.frameLoop=e.frameLoop};// src/FrameLoop.ts
var Z=/* @__PURE__ */new Set;var S=[];var O=[];var k=0;var T={get idle(){return!Z.size&&!S.length},/** Advance the given animation on every frame until idle. */start(e){if(k>e.priority){Z.add(e);n/* .raf.onStart */.W.onStart(C)}else{R(e);(0,n/* .raf */.W)(M)}},/** Advance all animations by the given time. */advance:M,/** Call this when an animation's priority changes. */sort(e){if(k){n/* .raf.onFrame */.W.onFrame(()=>T.sort(e))}else{const t=S.indexOf(e);if(~t){S.splice(t,1);A(e)}}},/**
   * Clear all animations. For testing purposes.
   *
   * ☠️ Never call this from within the frameloop.
   */clear(){S=[];Z.clear()}};function C(){Z.forEach(R);Z.clear();(0,n/* .raf */.W)(M)}function R(e){if(!S.includes(e))A(e)}function A(e){S.splice(P(S,t=>t.priority>e.priority),0,e)}function M(e){const t=O;for(let r=0;r<S.length;r++){const n=S[r];k=n.priority;if(!n.idle){x(n);n.advance(e);if(!n.idle){t.push(n)}}}k=0;O=S;O.length=0;S=t;return S.length>0}function P(e,t){const r=e.findIndex(t);return r<0?e.length:r}// src/clamp.ts
var D=(e,t,r)=>Math.min(Math.max(r,e),t);// src/colors.ts
var I={transparent:0,aliceblue:0xf0f8ffff,antiquewhite:0xfaebd7ff,aqua:0xffffff,aquamarine:0x7fffd4ff,azure:0xf0ffffff,beige:0xf5f5dcff,bisque:0xffe4c4ff,black:255,blanchedalmond:0xffebcdff,blue:65535,blueviolet:0x8a2be2ff,brown:0xa52a2aff,burlywood:0xdeb887ff,burntsienna:0xea7e5dff,cadetblue:0x5f9ea0ff,chartreuse:0x7fff00ff,chocolate:0xd2691eff,coral:0xff7f50ff,cornflowerblue:0x6495edff,cornsilk:0xfff8dcff,crimson:0xdc143cff,cyan:0xffffff,darkblue:35839,darkcyan:9145343,darkgoldenrod:0xb8860bff,darkgray:0xa9a9a9ff,darkgreen:6553855,darkgrey:0xa9a9a9ff,darkkhaki:0xbdb76bff,darkmagenta:0x8b008bff,darkolivegreen:0x556b2fff,darkorange:0xff8c00ff,darkorchid:0x9932ccff,darkred:0x8b0000ff,darksalmon:0xe9967aff,darkseagreen:0x8fbc8fff,darkslateblue:0x483d8bff,darkslategray:0x2f4f4fff,darkslategrey:0x2f4f4fff,darkturquoise:0xced1ff,darkviolet:0x9400d3ff,deeppink:0xff1493ff,deepskyblue:0xbfffff,dimgray:0x696969ff,dimgrey:0x696969ff,dodgerblue:0x1e90ffff,firebrick:0xb22222ff,floralwhite:0xfffaf0ff,forestgreen:0x228b22ff,fuchsia:0xff00ffff,gainsboro:0xdcdcdcff,ghostwhite:0xf8f8ffff,gold:0xffd700ff,goldenrod:0xdaa520ff,gray:0x808080ff,green:8388863,greenyellow:0xadff2fff,grey:0x808080ff,honeydew:0xf0fff0ff,hotpink:0xff69b4ff,indianred:0xcd5c5cff,indigo:0x4b0082ff,ivory:0xfffff0ff,khaki:0xf0e68cff,lavender:0xe6e6faff,lavenderblush:0xfff0f5ff,lawngreen:0x7cfc00ff,lemonchiffon:0xfffacdff,lightblue:0xadd8e6ff,lightcoral:0xf08080ff,lightcyan:0xe0ffffff,lightgoldenrodyellow:0xfafad2ff,lightgray:0xd3d3d3ff,lightgreen:0x90ee90ff,lightgrey:0xd3d3d3ff,lightpink:0xffb6c1ff,lightsalmon:0xffa07aff,lightseagreen:0x20b2aaff,lightskyblue:0x87cefaff,lightslategray:0x778899ff,lightslategrey:0x778899ff,lightsteelblue:0xb0c4deff,lightyellow:0xffffe0ff,lime:0xff00ff,limegreen:0x32cd32ff,linen:0xfaf0e6ff,magenta:0xff00ffff,maroon:0x800000ff,mediumaquamarine:0x66cdaaff,mediumblue:52735,mediumorchid:0xba55d3ff,mediumpurple:0x9370dbff,mediumseagreen:0x3cb371ff,mediumslateblue:0x7b68eeff,mediumspringgreen:0xfa9aff,mediumturquoise:0x48d1ccff,mediumvioletred:0xc71585ff,midnightblue:0x191970ff,mintcream:0xf5fffaff,mistyrose:0xffe4e1ff,moccasin:0xffe4b5ff,navajowhite:0xffdeadff,navy:33023,oldlace:0xfdf5e6ff,olive:0x808000ff,olivedrab:0x6b8e23ff,orange:0xffa500ff,orangered:0xff4500ff,orchid:0xda70d6ff,palegoldenrod:0xeee8aaff,palegreen:0x98fb98ff,paleturquoise:0xafeeeeff,palevioletred:0xdb7093ff,papayawhip:0xffefd5ff,peachpuff:0xffdab9ff,peru:0xcd853fff,pink:0xffc0cbff,plum:0xdda0ddff,powderblue:0xb0e0e6ff,purple:0x800080ff,rebeccapurple:0x663399ff,red:0xff0000ff,rosybrown:0xbc8f8fff,royalblue:0x4169e1ff,saddlebrown:0x8b4513ff,salmon:0xfa8072ff,sandybrown:0xf4a460ff,seagreen:0x2e8b57ff,seashell:0xfff5eeff,sienna:0xa0522dff,silver:0xc0c0c0ff,skyblue:0x87ceebff,slateblue:0x6a5acdff,slategray:0x708090ff,slategrey:0x708090ff,snow:0xfffafaff,springgreen:0xff7fff,steelblue:0x4682b4ff,tan:0xd2b48cff,teal:8421631,thistle:0xd8bfd8ff,tomato:0xff6347ff,turquoise:0x40e0d0ff,violet:0xee82eeff,wheat:0xf5deb3ff,white:0xffffffff,whitesmoke:0xf5f5f5ff,yellow:0xffff00ff,yellowgreen:0x9acd32ff};// src/colorMatchers.ts
var L="[-+]?\\d*\\.?\\d+";var F=L+"%";function N(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var j=new RegExp("rgb"+N(L,L,L));var B=new RegExp("rgba"+N(L,L,L,L));var U=new RegExp("hsl"+N(L,F,F));var W=new RegExp("hsla"+N(L,F,F,L));var z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var J=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var q=/^#([0-9a-fA-F]{6})$/;var H=/^#([0-9a-fA-F]{8})$/;// src/normalizeColor.ts
function V(e){let t;if(typeof e==="number"){return e>>>0===e&&e>=0&&e<=0xffffffff?e:null}if(t=q.exec(e))return parseInt(t[1]+"ff",16)>>>0;if(_&&_[e]!==void 0){return _[e]}if(t=j.exec(e)){return(X(t[1])<<24|// r
X(t[2])<<16|// g
X(t[3])<<8|// b
255)>>>// a
0}if(t=B.exec(e)){return(X(t[1])<<24|// r
X(t[2])<<16|// g
X(t[3])<<8|// b
Q(t[4]))>>>// a
0}if(t=z.exec(e)){return parseInt(t[1]+t[1]+// r
t[2]+t[2]+// g
t[3]+t[3]+// b
"ff",// a
16)>>>0}if(t=H.exec(e))return parseInt(t[1],16)>>>0;if(t=J.exec(e)){return parseInt(t[1]+t[1]+// r
t[2]+t[2]+// g
t[3]+t[3]+// b
t[4]+t[4],// a
16)>>>0}if(t=U.exec(e)){return(G(K(t[1]),// h
Y(t[2]),// s
Y(t[3]))|255)>>>// a
0}if(t=W.exec(e)){return(G(K(t[1]),// h
Y(t[2]),// s
Y(t[3]))|Q(t[4]))>>>// a
0}return null}function $(e,t,r){if(r<0)r+=1;if(r>1)r-=1;if(r<1/6)return e+(t-e)*6*r;if(r<1/2)return t;if(r<2/3)return e+(t-e)*(2/3-r)*6;return e}function G(e,t,r){const n=r<.5?r*(1+t):r+t-r*t;const i=2*r-n;const a=$(i,n,e+1/3);const o=$(i,n,e);const s=$(i,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function X(e){const t=parseInt(e,10);if(t<0)return 0;if(t>255)return 255;return t}function K(e){const t=parseFloat(e);return(t%360+360)%360/360}function Q(e){const t=parseFloat(e);if(t<0)return 0;if(t>1)return 255;return Math.round(t*255)}function Y(e){const t=parseFloat(e);if(t<0)return 0;if(t>100)return 1;return t/100}// src/colorToRgba.ts
function ee(e){let t=V(e);if(t===null)return e;t=t||0;const r=(t&0xff000000)>>>24;const n=(t&0xff0000)>>>16;const i=(t&65280)>>>8;const a=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${a})`}// src/createInterpolator.ts
var et=(e,t,r)=>{if(c.fun(e)){return e}if(c.arr(e)){return et({range:e,output:t,extrapolate:r})}if(c.str(e.output[0])){return b(e)}const n=e;const i=n.output;const a=n.range||[0,1];const o=n.extrapolateLeft||n.extrapolate||"extend";const s=n.extrapolateRight||n.extrapolate||"extend";const u=n.easing||(e=>e);return e=>{const t=en(e,a);return er(e,a[t],a[t+1],i[t],i[t+1],u,o,s,n.map)}};function er(e,t,r,n,i,a,o,s,u){let l=u?u(e):e;if(l<t){if(o==="identity")return l;else if(o==="clamp")l=t}if(l>r){if(s==="identity")return l;else if(s==="clamp")l=r}if(n===i)return n;if(t===r)return e<=t?n:i;if(t===-Infinity)l=-l;else if(r===Infinity)l=l-t;else l=(l-t)/(r-t);l=a(l);if(n===-Infinity)l=-l;else if(i===Infinity)l=l+n;else l=l*(i-n)+n;return l}function en(e,t){for(var r=1;r<t.length-1;++r)if(t[r]>=e)break;return r-1}// src/easings.ts
var ei=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e;const i=t==="end"?Math.floor(n):Math.ceil(n);return D(0,1,i/e)};var ea=1.70158;var eo=ea*1.525;var es=ea+1;var eu=2*Math.PI/3;var el=2*Math.PI/4.5;var ec=e=>{const t=7.5625;const r=2.75;if(e<1/r){return t*e*e}else if(e<2/r){return t*(e-=1.5/r)*e+.75}else if(e<2.5/r){return t*(e-=2.25/r)*e+.9375}else{return t*(e-=2.625/r)*e+.984375}};var ed={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>es*e*e*e-ea*e*e,easeOutBack:e=>1+es*Math.pow(e-1,3)+ea*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((eo+1)*2*e-eo)/2:(Math.pow(2*e-2,2)*((eo+1)*(e*2-2)+eo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*eu),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*eu)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*el))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*el)/2+1,easeInBounce:e=>1-ec(1-e),easeOutBounce:ec,easeInOutBounce:e=>e<.5?(1-ec(1-2*e))/2:(1+ec(2*e-1))/2,steps:ei};// src/fluids.ts
var ef=Symbol.for("FluidValue.get");var ep=Symbol.for("FluidValue.observers");var eh=e=>Boolean(e&&e[ef]);var ev=e=>e&&e[ef]?e[ef]():e;var em=e=>e[ep]||null;function eg(e,t){if(e.eventObserved){e.eventObserved(t)}else{e(t)}}function eb(e,t){const r=e[ep];if(r){r.forEach(e=>{eg(e,t)})}}var ey=class{constructor(e){if(!e&&!(e=this.get)){throw Error("Unknown getter")}e_(this,e)}};ef,ep;var e_=(e,t)=>eE(e,ef,t);function ew(e,t){if(e[ef]){let r=e[ep];if(!r){eE(e,ep,r=/* @__PURE__ */new Set)}if(!r.has(t)){r.add(t);if(e.observerAdded){e.observerAdded(r.size,t)}}}return t}function ex(e,t){const r=e[ep];if(r&&r.has(t)){const n=r.size-1;if(n){r.delete(t)}else{e[ep]=null}if(e.observerRemoved){e.observerRemoved(n,t)}}}var eE=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});// src/regexs.ts
var eZ=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var eS=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;var eO=new RegExp(`(${eZ.source})(%|[a-z]+)`,"i");var ek=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;var eT=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;// src/variableToRgba.ts
var eC=e=>{const[t,r]=eR(e);if(!t||g()){return e}const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n){return n.trim()}else if(r&&r.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(t){return t}else{return e}}else if(r&&eT.test(r)){return eC(r)}else if(r){return r}return e};var eR=e=>{const t=eT.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};// src/stringInterpolation.ts
var eA;var eM=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`;var eP=e=>{if(!eA)eA=_?// match color names, ignore partial matches
new RegExp(`(${Object.keys(_).join("|")})(?!\\w)`,"g"):// never match
/^\b$/;const t=e.output.map(e=>{return ev(e).replace(eT,eC).replace(eS,ee).replace(eA,ee)});const r=t.map(e=>e.match(eZ).map(Number));const n=r[0].map((e,t)=>r.map(e=>{if(!(t in e)){throw Error('The arity of each "output" value must be equal')}return e[t]}));const i=n.map(t=>et({...e,output:t}));return e=>{const r=!eO.test(t[0])&&t.find(e=>eO.test(e))?.replace(eZ,"");let n=0;return t[0].replace(eZ,()=>`${i[n++](e)}${r||""}`).replace(ek,eM)}};// src/deprecations.ts
var eD="react-spring: ";var eI=e=>{const t=e;let r=false;if(typeof t!="function"){throw new TypeError(`${eD}once requires a function parameter`)}return(...e)=>{if(!r){t(...e);r=true}}};var eL=eI(console.warn);function eF(){eL(`${eD}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var eN=eI(console.warn);function ej(){eN(`${eD}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}// src/isAnimatedString.ts
function eB(e){return c.str(e)&&(e[0]=="#"||/\d/.test(e)||// Do not identify a CSS variable as an AnimatedString if its SSR
!g()&&eT.test(e)||e in(_||{}))}// src/dom-events/scroll/index.ts
// src/dom-events/resize/resizeElement.ts
var eU;var eW=/* @__PURE__ */new WeakMap;var ez=e=>e.forEach(({target:e,contentRect:t})=>{return eW.get(e)?.forEach(e=>e(t))});function eJ(e,t){if(!eU){if(typeof ResizeObserver!=="undefined"){eU=new ResizeObserver(ez)}}let r=eW.get(t);if(!r){r=/* @__PURE__ */new Set;eW.set(t,r)}r.add(e);if(eU){eU.observe(t)}return()=>{const r=eW.get(t);if(!r)return;r.delete(e);if(!r.size&&eU){eU.unobserve(t)}}}// src/dom-events/resize/resizeWindow.ts
var eq=/* @__PURE__ */new Set;var eH;var eV=()=>{const e=()=>{eq.forEach(e=>e({width:window.innerWidth,height:window.innerHeight}))};window.addEventListener("resize",e);return()=>{window.removeEventListener("resize",e)}};var e$=e=>{eq.add(e);if(!eH){eH=eV()}return()=>{eq.delete(e);if(!eq.size&&eH){eH();eH=void 0}}};// src/dom-events/resize/index.ts
var eG=(e,{container:t=document.documentElement}={})=>{if(t===document.documentElement){return e$(e)}else{return eJ(e,t)}};// src/progress.ts
var eX=(e,t,r)=>t-e===0?1:(r-e)/(t-e);// src/dom-events/scroll/ScrollHandler.ts
var eK=/* unused pure expression or super */null&&{x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};var eQ=class{constructor(e,t){this.createAxis=()=>({current:0,progress:0,scrollLength:0});this.updateAxis=e=>{const t=this.info[e];const{length:r,position:n}=eK[e];t.current=this.container[`scroll${n}`];t.scrollLength=this.container[`scroll${r}`]-this.container[`client${r}`];t.progress=eX(0,t.scrollLength,t.current)};this.update=()=>{this.updateAxis("x");this.updateAxis("y")};this.sendEvent=()=>{this.callback(this.info)};this.advance=()=>{this.update();this.sendEvent()};this.callback=e;this.container=t;this.info={time:0,x:this.createAxis(),y:this.createAxis()}}};// src/dom-events/scroll/index.ts
var eY=/* @__PURE__ */new WeakMap;var e0=/* @__PURE__ */new WeakMap;var e1=/* @__PURE__ */new WeakMap;var e2=e=>e===document.documentElement?window:e;var e4=(e,{container:t=document.documentElement}={})=>{let r=e1.get(t);if(!r){r=/* @__PURE__ */new Set;e1.set(t,r)}const n=new eQ(e,t);r.add(n);if(!eY.has(t)){const e=()=>{r?.forEach(e=>e.advance());return true};eY.set(t,e);const n=e2(t);window.addEventListener("resize",e,{passive:true});if(t!==document.documentElement){e0.set(t,eG(e,{container:t}))}n.addEventListener("scroll",e,{passive:true})}const i=eY.get(t);raf3(i);return()=>{raf3.cancel(i);const e=e1.get(t);if(!e)return;e.delete(n);if(e.size)return;const r=eY.get(t);eY.delete(t);if(r){e2(t).removeEventListener("scroll",r);window.removeEventListener("resize",r);e0.get(t)?.()}}};// src/hooks/useConstant.ts
function e3(e){const t=useRef(null);if(t.current===null){t.current=e()}return t.current}// src/hooks/useForceUpdate.ts
// src/hooks/useIsMounted.ts
// src/hooks/useIsomorphicLayoutEffect.ts
var e5=g()?i.useEffect:i.useLayoutEffect;// src/hooks/useIsMounted.ts
var e6=()=>{const e=(0,i.useRef)(false);e5(()=>{e.current=true;return()=>{e.current=false}},[]);return e};// src/hooks/useForceUpdate.ts
function e8(){const e=(0,i.useState)()[1];const t=e6();return()=>{if(t.current){e(Math.random())}}}// src/hooks/useMemoOne.ts
function e9(e,t){const[r]=(0,i.useState)(()=>({inputs:t,result:e()}));const n=(0,i.useRef)();const a=n.current;let o=a;if(o){const r=Boolean(t&&o.inputs&&e7(t,o.inputs));if(!r){o={inputs:t,result:e()}}}else{o=r}(0,i.useEffect)(()=>{n.current=o;if(a==r){r.inputs=r.result=void 0}},[o]);return o.result}function e7(e,t){if(e.length!==t.length){return false}for(let r=0;r<e.length;r++){if(e[r]!==t[r]){return false}}return true}// src/hooks/useOnce.ts
var te=e=>(0,i.useEffect)(e,tt);var tt=[];// src/hooks/usePrev.ts
function tr(e){const t=(0,i.useRef)();(0,i.useEffect)(()=>{t.current=e});return t.current}// src/hooks/useReducedMotion.ts
var tn=()=>{const[e,t]=useState3(null);e5(()=>{const e=window.matchMedia("(prefers-reduced-motion)");const r=e=>{t(e.matches);E({skipAnimation:e.matches})};r(e);if(e.addEventListener){e.addEventListener("change",r)}else{e.addListener(r)}return()=>{if(e.removeEventListener){e.removeEventListener("change",r)}else{e.removeListener(r)}}},[]);return e};// src/index.ts
//# sourceMappingURL=react-spring_shared.modern.mjs.map
},6154:function(e,t,r){"use strict";r.d(t,{Yz:()=>/* reexport safe */n.Yz,Z5:()=>/* reexport safe */n.Z5,q:()=>E,q_:()=>/* reexport safe */n.q_});/* ESM import */var n=r(99968);/* ESM import */var i=r(61533);/* ESM import */var a=r(90009);/* ESM import */var o=r(23618);// src/index.ts
// src/applyAnimatedValues.ts
var s=/^--/;function u(e,t){if(t==null||typeof t==="boolean"||t==="")return"";if(typeof t==="number"&&t!==0&&!s.test(e)&&!(d.hasOwnProperty(e)&&d[e]))return t+"px";return(""+t).trim()}var l={};function c(e,t){if(!e.nodeType||!e.setAttribute){return false}const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter";const{className:n,style:i,children:a,scrollTop:o,scrollLeft:c,viewBox:d,...f}=t;const p=Object.values(f);const h=Object.keys(f).map(t=>r||e.hasAttribute(t)?t:l[t]||(l[t]=t.replace(/([A-Z])/g,// Attributes are written in dash case
    e=>"-"+e.toLowerCase())));if(a!==void 0){e.textContent=a}for(const t in i){if(i.hasOwnProperty(t)){const r=u(t,i[t]);if(s.test(t)){e.style.setProperty(t,r)}else{e.style[t]=r}}}h.forEach((t,r)=>{e.setAttribute(t,p[r])});if(n!==void 0){e.className=n}if(o!==void 0){e.scrollTop=o}if(c!==void 0){e.scrollLeft=c}if(d!==void 0){e.setAttribute("viewBox",d)}}var d={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,// SVG-related properties
fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};var f=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1);var p=["Webkit","Ms","Moz","O"];d=Object.keys(d).reduce((e,t)=>{p.forEach(r=>e[f(r,t)]=e[t]);return e},d);// src/AnimatedStyle.ts
var h=/^(matrix|translate|scale|rotate|skew)/;var v=/^(translate)/;var m=/^(rotate|skew)/;var g=(e,t)=>a.is.num(e)&&e!==0?e+t:e;var b=(e,t)=>a.is.arr(e)?e.every(e=>b(e,t)):a.is.num(e)?e===t:parseFloat(e)===t;var y=class extends o/* .AnimatedObject */.rS{constructor({x:e,y:t,z:r,...n}){const i=[];const o=[];if(e||t||r){i.push([e||0,t||0,r||0]);o.push(e=>[`translate3d(${e.map(e=>g(e,"px")).join(",")})`,// prettier-ignore
    b(e,0)])}(0,a/* .eachProp */.rU)(n,(e,t)=>{if(t==="transform"){i.push([e||""]);o.push(e=>[e,e===""])}else if(h.test(t)){delete n[t];if(a.is.und(e))return;const r=v.test(t)?"px":m.test(t)?"deg":"";i.push((0,a/* .toArray */.qo)(e));o.push(t==="rotate3d"?([e,t,n,i])=>[`rotate3d(${e},${t},${n},${g(i,r)})`,b(i,0)]:e=>[`${t}(${e.map(e=>g(e,r)).join(",")})`,b(e,t.startsWith("scale")?1:0)])}});if(i.length){n.transform=new _(i,o)}super(n)}};var _=class extends a/* .FluidValue */.B0{constructor(e,t){super();this.inputs=e;this.transforms=t;this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="";let t=true;(0,a/* .each */.S6)(this.inputs,(r,n)=>{const i=(0,a/* .getFluidValue */.je)(r[0]);const[o,s]=this.transforms[n](a.is.arr(i)?i:r.map(a/* .getFluidValue */.je));e+=" "+o;t=t&&s});return t?"none":e}// Start observing our inputs once we have an observer.
observerAdded(e){if(e==1)(0,a/* .each */.S6)(this.inputs,e=>(0,a/* .each */.S6)(e,e=>(0,a/* .hasFluidValue */.j$)(e)&&(0,a/* .addFluidObserver */.UI)(e,this)))}// Stop observing our inputs once we have no observers.
observerRemoved(e){if(e==0)(0,a/* .each */.S6)(this.inputs,e=>(0,a/* .each */.S6)(e,e=>(0,a/* .hasFluidValue */.j$)(e)&&(0,a/* .removeFluidObserver */.iL)(e,this)))}eventObserved(e){if(e.type=="change"){this._value=null}(0,a/* .callFluidObservers */.k0)(this,e)}};// src/primitives.ts
var w=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr",// SVG
"circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];// src/index.ts
n/* .Globals.assign */.OH.assign({batchedUpdates:i.unstable_batchedUpdates,createStringInterpolator:a/* .createStringInterpolator */.qS,colors:a/* .colors */.O9});var x=(0,o/* .createHost */.Ld)(w,{applyAnimatedValues:c,createAnimatedStyle:e=>new y(e),// eslint-disable-next-line @typescript-eslint/no-unused-vars
getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r});var E=x.animated;//# sourceMappingURL=react-spring_web.modern.mjs.map
},76150:function(e,t,r){"use strict";r.d(t,{_:()=>i});function n(e,t,r,n,i,a,o){try{var s=e[a](o);var u=s.value}catch(e){r(e);return}if(s.done)t(u);else Promise.resolve(u).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,u,"next",e)}function u(e){n(o,i,a,s,u,"throw",e)}s(undefined)})}}},27412:function(e,t,r){"use strict";r.d(t,{_:()=>n});function n(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else e[t]=r;return e}},7409:function(e,t,r){"use strict";r.d(t,{_:()=>i});/* ESM import */var n=r(27412);function i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var i=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}i.forEach(function(t){(0,n._)(e,t,r[t])})}return e}},99282:function(e,t,r){"use strict";r.d(t,{_:()=>i});function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function i(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors)Object.defineProperties(e,Object.getOwnPropertyDescriptors(t));else{n(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}},98848:function(e,t,r){"use strict";// EXPORTS
r.d(t,{_:()=>/* binding */i});// CONCATENATED MODULE: ./node_modules/@swc/helpers/esm/_object_without_properties_loose.js
function n(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r};// CONCATENATED MODULE: ./node_modules/@swc/helpers/esm/_object_without_properties.js
function i(e,t){if(e==null)return{};var r=n(e,t);var i,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++){i=o[a];if(t.indexOf(i)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,i))continue;r[i]=e[i]}}return r}},58865:function(e,t,r){"use strict";r.d(t,{_:()=>n});function n(e,t){if(!t)t=e.slice(0);return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},21037:function(e,t,r){"use strict";r.d(t,{j:()=>o});/* ESM import */var n=r(83562);/* ESM import */var i=r(49982);// src/focusManager.ts
var a=class extends n/* .Subscribable */.l{#e;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.sk&&window.addEventListener){const t=()=>e();window.addEventListener("visibilitychange",t,false);return()=>{window.removeEventListener("visibilitychange",t)}}return}}onSubscribe(){if(!this.#t){this.setEventListener(this.#r)}}onUnsubscribe(){if(!this.hasListeners()){this.#t?.();this.#t=void 0}}setEventListener(e){this.#r=e;this.#t?.();this.#t=e(e=>{if(typeof e==="boolean"){this.setFocused(e)}else{this.onFocus()}})}setFocused(e){const t=this.#e!==e;if(t){this.#e=e;this.onFocus()}}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){if(typeof this.#e==="boolean"){return this.#e}return globalThis.document?.visibilityState!=="hidden"}};var o=new a;//# sourceMappingURL=focusManager.js.map
},31307:function(e,t,r){"use strict";r.d(t,{R:()=>s,m:()=>o});/* ESM import */var n=r(93242);/* ESM import */var i=r(25369);/* ESM import */var a=r(24031);// src/mutation.ts
var o=class extends i/* .Removable */.F{#n;#i;#a;constructor(e){super();this.mutationId=e.mutationId;this.#i=e.mutationCache;this.#n=[];this.state=e.state||s();this.setOptions(e.options);this.scheduleGc()}setOptions(e){this.options=e;this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){if(!this.#n.includes(e)){this.#n.push(e);this.clearGcTimeout();this.#i.notify({type:"observerAdded",mutation:this,observer:e})}}removeObserver(e){this.#n=this.#n.filter(t=>t!==e);this.scheduleGc();this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){if(!this.#n.length){if(this.state.status==="pending"){this.scheduleGc()}else{this.#i.remove(this)}}}continue(){return this.#a?.continue()??// continuing a mutation assumes that variables are set, mutation must have been dehydrated before
this.execute(this.state.variables)}async execute(e){const t=()=>{this.#o({type:"continue"})};this.#a=(0,a/* .createRetryer */.Mz)({fn:()=>{if(!this.options.mutationFn){return Promise.reject(new Error("No mutationFn found"))}return this.options.mutationFn(e)},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});const r=this.state.status==="pending";const n=!this.#a.canStart();try{if(r){t()}else{this.#o({type:"pending",variables:e,isPaused:n});await this.#i.config.onMutate?.(e,this);const t=await this.options.onMutate?.(e);if(t!==this.state.context){this.#o({type:"pending",context:t,variables:e,isPaused:n})}}const i=await this.#a.start();await this.#i.config.onSuccess?.(i,e,this.state.context,this);await this.options.onSuccess?.(i,e,this.state.context);await this.#i.config.onSettled?.(i,null,this.state.variables,this.state.context,this);await this.options.onSettled?.(i,null,e,this.state.context);this.#o({type:"success",data:i});return i}catch(t){try{await this.#i.config.onError?.(t,e,this.state.context,this);await this.options.onError?.(t,e,this.state.context);await this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this);await this.options.onSettled?.(void 0,t,e,this.state.context);throw t}finally{this.#o({type:"error",error:t})}}finally{this.#i.runNext(this)}}#o(e){const t=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:true};case"continue":return{...t,isPaused:false};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:false};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:false,status:"error"}}};this.state=t(this.state);n/* .notifyManager.batch */.Vr.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)});this.#i.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:false,status:"idle",variables:void 0,submittedAt:0}}//# sourceMappingURL=mutation.js.map
},6010:function(e,t,r){"use strict";r.d(t,{X:()=>s});/* ESM import */var n=r(31307);/* ESM import */var i=r(93242);/* ESM import */var a=r(83562);/* ESM import */var o=r(49982);// src/mutationObserver.ts
var s=class extends a/* .Subscribable */.l{#s;#u=void 0;#l;#c;constructor(e,t){super();this.#s=e;this.setOptions(t);this.bindMethods();this.#d()}bindMethods(){this.mutate=this.mutate.bind(this);this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#s.defaultMutationOptions(e);if(!(0,o/* .shallowEqualObjects */.VS)(this.options,t)){this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#l,observer:this})}if(t?.mutationKey&&this.options.mutationKey&&(0,o/* .hashKey */.Ym)(t.mutationKey)!==(0,o/* .hashKey */.Ym)(this.options.mutationKey)){this.reset()}else if(this.#l?.state.status==="pending"){this.#l.setOptions(this.options)}}onUnsubscribe(){if(!this.hasListeners()){this.#l?.removeObserver(this)}}onMutationUpdate(e){this.#d();this.#f(e)}getCurrentResult(){return this.#u}reset(){this.#l?.removeObserver(this);this.#l=void 0;this.#d();this.#f()}mutate(e,t){this.#c=t;this.#l?.removeObserver(this);this.#l=this.#s.getMutationCache().build(this.#s,this.options);this.#l.addObserver(this);return this.#l.execute(e)}#d(){const e=this.#l?.state??(0,n/* .getDefaultState */.R)();this.#u={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#f(e){i/* .notifyManager.batch */.Vr.batch(()=>{if(this.#c&&this.hasListeners()){const t=this.#u.variables;const r=this.#u.context;if(e?.type==="success"){this.#c.onSuccess?.(e.data,t,r);this.#c.onSettled?.(e.data,null,t,r)}else if(e?.type==="error"){this.#c.onError?.(e.error,t,r);this.#c.onSettled?.(void 0,e.error,t,r)}}this.listeners.forEach(e=>{e(this.#u)})})}};//# sourceMappingURL=mutationObserver.js.map
},93242:function(e,t,r){"use strict";r.d(t,{Vr:()=>a});// src/notifyManager.ts
var n=e=>setTimeout(e,0);function i(){let e=[];let t=0;let r=e=>{e()};let i=e=>{e()};let a=n;const o=n=>{if(t){e.push(n)}else{a(()=>{r(n)})}};const s=()=>{const t=e;e=[];if(t.length){a(()=>{i(()=>{t.forEach(e=>{r(e)})})})}};return{batch:e=>{let r;t++;try{r=e()}finally{t--;if(!t){s()}}return r},/**
     * All calls to the wrapped function will be batched.
     */batchCalls:e=>{return(...t)=>{o(()=>{e(...t)})}},schedule:o,/**
     * Use this method to set a custom notify function.
     * This can be used to for example wrap notifications with `React.act` while running tests.
     */setNotifyFunction:e=>{r=e},/**
     * Use this method to set a custom function to batch notifications together into a single tick.
     * By default React Query will use the batch function provided by ReactDOM or React Native.
     */setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{a=e}}}var a=i();//# sourceMappingURL=notifyManager.js.map
},72226:function(e,t,r){"use strict";r.d(t,{N:()=>o});/* ESM import */var n=r(83562);/* ESM import */var i=r(49982);// src/onlineManager.ts
var a=class extends n/* .Subscribable */.l{#p=true;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.sk&&window.addEventListener){const t=()=>e(true);const r=()=>e(false);window.addEventListener("online",t,false);window.addEventListener("offline",r,false);return()=>{window.removeEventListener("online",t);window.removeEventListener("offline",r)}}return}}onSubscribe(){if(!this.#t){this.setEventListener(this.#r)}}onUnsubscribe(){if(!this.hasListeners()){this.#t?.();this.#t=void 0}}setEventListener(e){this.#r=e;this.#t?.();this.#t=e(this.setOnline.bind(this))}setOnline(e){const t=this.#p!==e;if(t){this.#p=e;this.listeners.forEach(t=>{t(e)})}}isOnline(){return this.#p}};var o=new a;//# sourceMappingURL=onlineManager.js.map
},84424:function(e,t,r){"use strict";r.d(t,{A:()=>s,z:()=>u});/* ESM import */var n=r(49982);/* ESM import */var i=r(93242);/* ESM import */var a=r(24031);/* ESM import */var o=r(25369);// src/query.ts
var s=class extends o/* .Removable */.F{#h;#v;#m;#s;#a;#g;#b;constructor(e){super();this.#b=false;this.#g=e.defaultOptions;this.setOptions(e.options);this.observers=[];this.#s=e.client;this.#m=this.#s.getQueryCache();this.queryKey=e.queryKey;this.queryHash=e.queryHash;this.#h=l(this.options);this.state=e.state??this.#h;this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){this.options={...this.#g,...e};this.updateGcTime(this.options.gcTime)}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle"){this.#m.remove(this)}}setData(e,t){const r=(0,n/* .replaceData */.oE)(this.state.data,e,this.options);this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual});return r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;this.#a?.cancel(e);return t?t.then(n/* .noop */.ZT).catch(n/* .noop */.ZT):Promise.resolve()}destroy(){super.destroy();this.cancel({silent:true})}reset(){this.destroy();this.setState(this.#h)}isActive(){return this.observers.some(e=>(0,n/* .resolveEnabled */.Nc)(e.options.enabled,this)!==false)}isDisabled(){if(this.getObserversCount()>0){return!this.isActive()}return this.options.queryFn===n/* .skipToken */.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){if(this.getObserversCount()>0){return this.observers.some(e=>(0,n/* .resolveStaleTime */.KC)(e.options.staleTime,this)==="static")}return false}isStale(){if(this.getObserversCount()>0){return this.observers.some(e=>e.getCurrentResult().isStale)}return this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){if(this.state.data===void 0){return true}if(e==="static"){return false}if(this.state.isInvalidated){return true}return!(0,n/* .timeUntilStale */.Kp)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:false});this.#a?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:false});this.#a?.continue()}addObserver(e){if(!this.observers.includes(e)){this.observers.push(e);this.clearGcTimeout();this.#m.notify({type:"observerAdded",query:this,observer:e})}}removeObserver(e){if(this.observers.includes(e)){this.observers=this.observers.filter(t=>t!==e);if(!this.observers.length){if(this.#a){if(this.#b){this.#a.cancel({revert:true})}else{this.#a.cancelRetry()}}this.scheduleGc()}this.#m.notify({type:"observerRemoved",query:this,observer:e})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated){this.#o({type:"invalidate"})}}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch){this.cancel({silent:true})}else if(this.#a){this.#a.continueRetry();return this.#a.promise}}if(e){this.setOptions(e)}if(!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);if(e){this.setOptions(e.options)}}if(false){}const r=new AbortController;const i=e=>{Object.defineProperty(e,"signal",{enumerable:true,get:()=>{this.#b=true;return r.signal}})};const o=()=>{const e=(0,n/* .ensureQueryFn */.cG)(this.options,t);const r=()=>{const e={client:this.#s,queryKey:this.queryKey,meta:this.meta};i(e);return e};const a=r();this.#b=false;if(this.options.persister){return this.options.persister(e,a,this)}return e(a)};const s=()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};i(e);return e};const u=s();this.options.behavior?.onFetch(u,this);this.#v=this.state;if(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta){this.#o({type:"fetch",meta:u.fetchOptions?.meta})}const l=e=>{if(!((0,a/* .isCancelledError */.DV)(e)&&e.silent)){this.#o({type:"error",error:e})}if(!(0,a/* .isCancelledError */.DV)(e)){this.#m.config.onError?.(e,this);this.#m.config.onSettled?.(this.state.data,e,this)}this.scheduleGc()};this.#a=(0,a/* .createRetryer */.Mz)({initialPromise:t?.initialPromise,fn:u.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(e===void 0){if(false){}l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){l(e);return}this.#m.config.onSuccess?.(e,this);this.#m.config.onSettled?.(e,this.state.error,this);this.scheduleGc()},onError:l,onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>true});return this.#a.start()}#o(e){const t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...u(t.data,this.options),fetchMeta:e.meta??null};case"success":this.#v=void 0;return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:false,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;if((0,a/* .isCancelledError */.DV)(r)&&r.revert&&this.#v){return{...this.#v,fetchStatus:"idle"}}return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:true};case"setState":return{...t,...e.state}}};this.state=t(this.state);i/* .notifyManager.batch */.Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()});this.#m.notify({query:this,type:"updated",action:e})})}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a/* .canFetch */.Kw)(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function l(e){const t=typeof e.initialData==="function"?e.initialData():e.initialData;const r=t!==void 0;const n=r?typeof e.initialDataUpdatedAt==="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:false,status:r?"success":"pending",fetchStatus:"idle"}}//# sourceMappingURL=query.js.map
},14987:function(e,t,r){"use strict";r.d(t,{z:()=>l});/* ESM import */var n=r(21037);/* ESM import */var i=r(93242);/* ESM import */var a=r(84424);/* ESM import */var o=r(83562);/* ESM import */var s=r(2329);/* ESM import */var u=r(49982);// src/queryObserver.ts
var l=class extends o/* .Subscribable */.l{constructor(e,t){super();this.options=t;this.#s=e;this.#y=null;this.#_=(0,s/* .pendingThenable */.O)();if(!this.options.experimental_prefetchInRender){this.#_.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))}this.bindMethods();this.setOptions(t)}#s;#w=void 0;#x=void 0;#u=void 0;#E;#Z;#_;#y;#S;#O;// This property keeps track of the last query with defined data.
// It will be used to pass the previous data and query to the placeholder function between renders.
#k;#T;#C;#R;#A=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){this.#w.addObserver(this);if(d(this.#w,this.options)){this.#M()}else{this.updateResult()}this.#P()}}onUnsubscribe(){if(!this.hasListeners()){this.destroy()}}shouldFetchOnReconnect(){return f(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set;this.#D();this.#I();this.#w.removeObserver(this)}setOptions(e){const t=this.options;const r=this.#w;this.options=this.#s.defaultQueryOptions(e);if(this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof(0,u/* .resolveEnabled */.Nc)(this.options.enabled,this.#w)!=="boolean"){throw new Error("Expected enabled to be a boolean or a callback that returns a boolean")}this.#L();this.#w.setOptions(this.options);if(t._defaulted&&!(0,u/* .shallowEqualObjects */.VS)(this.options,t)){this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this})}const n=this.hasListeners();if(n&&p(this.#w,r,this.options,t)){this.#M()}this.updateResult();if(n&&(this.#w!==r||(0,u/* .resolveEnabled */.Nc)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Nc)(t.enabled,this.#w)||(0,u/* .resolveStaleTime */.KC)(this.options.staleTime,this.#w)!==(0,u/* .resolveStaleTime */.KC)(t.staleTime,this.#w))){this.#F()}const i=this.#N();if(n&&(this.#w!==r||(0,u/* .resolveEnabled */.Nc)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Nc)(t.enabled,this.#w)||i!==this.#R)){this.#j(i)}}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e);const r=this.createResult(t,e);if(v(this,r)){this.#u=r;this.#Z=this.options;this.#E=this.#w.state}return r}getCurrentResult(){return this.#u}trackResult(e,t){return new Proxy(e,{get:(e,r)=>{this.trackProp(r);t?.(r);return Reflect.get(e,r)}})}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e);const r=this.#s.getQueryCache().build(this.#s,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#M({...e,cancelRefetch:e.cancelRefetch??true}).then(()=>{this.updateResult();return this.#u})}#M(e){this.#L();let t=this.#w.fetch(this.options,e);if(!e?.throwOnError){t=t.catch(u/* .noop */.ZT)}return t}#F(){this.#D();const e=(0,u/* .resolveStaleTime */.KC)(this.options.staleTime,this.#w);if(u/* .isServer */.sk||this.#u.isStale||!(0,u/* .isValidTimeout */.PN)(e)){return}const t=(0,u/* .timeUntilStale */.Kp)(this.#u.dataUpdatedAt,e);const r=t+1;this.#T=setTimeout(()=>{if(!this.#u.isStale){this.updateResult()}},r)}#N(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#w):this.options.refetchInterval)??false}#j(e){this.#I();this.#R=e;if(u/* .isServer */.sk||(0,u/* .resolveEnabled */.Nc)(this.options.enabled,this.#w)===false||!(0,u/* .isValidTimeout */.PN)(this.#R)||this.#R===0){return}this.#C=setInterval(()=>{if(this.options.refetchIntervalInBackground||n/* .focusManager.isFocused */.j.isFocused()){this.#M()}},this.#R)}#P(){this.#F();this.#j(this.#N())}#D(){if(this.#T){clearTimeout(this.#T);this.#T=void 0}}#I(){if(this.#C){clearInterval(this.#C);this.#C=void 0}}createResult(e,t){const r=this.#w;const n=this.options;const i=this.#u;const o=this.#E;const l=this.#Z;const c=e!==r;const f=c?e.state:this.#x;const{state:v}=e;let m={...v};let g=false;let b;if(t._optimisticResults){const i=this.hasListeners();const o=!i&&d(e,t);const s=i&&p(e,r,t,n);if(o||s){m={...m,...(0,a/* .fetchState */.z)(v.data,e.options)}}if(t._optimisticResults==="isRestoring"){m.fetchStatus="idle"}}let{error:y,errorUpdatedAt:_,status:w}=m;b=m.data;let x=false;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let e;if(i?.isPlaceholderData&&t.placeholderData===l?.placeholderData){e=i.data;x=true}else{e=typeof t.placeholderData==="function"?t.placeholderData(this.#k?.state.data,this.#k):t.placeholderData}if(e!==void 0){w="success";b=(0,u/* .replaceData */.oE)(i?.data,e,t);g=true}}if(t.select&&b!==void 0&&!x){if(i&&b===o?.data&&t.select===this.#S){b=this.#O}else{try{this.#S=t.select;b=t.select(b);b=(0,u/* .replaceData */.oE)(i?.data,b,t);this.#O=b;this.#y=null}catch(e){this.#y=e}}}if(this.#y){y=this.#y;b=this.#O;_=Date.now();w="error"}const E=m.fetchStatus==="fetching";const Z=w==="pending";const S=w==="error";const O=Z&&E;const k=b!==void 0;const T={status:w,fetchStatus:m.fetchStatus,isPending:Z,isSuccess:w==="success",isError:S,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:_,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!Z,isLoadingError:S&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:S&&k,isStale:h(e,t),refetch:this.refetch,promise:this.#_,isEnabled:(0,u/* .resolveEnabled */.Nc)(t.enabled,e)!==false};const C=T;if(this.options.experimental_prefetchInRender){const t=e=>{if(C.status==="error"){e.reject(C.error)}else if(C.data!==void 0){e.resolve(C.data)}};const n=()=>{const e=this.#_=C.promise=(0,s/* .pendingThenable */.O)();t(e)};const i=this.#_;switch(i.status){case"pending":if(e.queryHash===r.queryHash){t(i)}break;case"fulfilled":if(C.status==="error"||C.data!==i.value){n()}break;case"rejected":if(C.status!=="error"||C.error!==i.reason){n()}break}}return C}updateResult(){const e=this.#u;const t=this.createResult(this.#w,this.options);this.#E=this.#w.state;this.#Z=this.options;if(this.#E.data!==void 0){this.#k=this.#w}if((0,u/* .shallowEqualObjects */.VS)(t,e)){return}this.#u=t;const r=()=>{if(!e){return true}const{notifyOnChangeProps:t}=this.options;const r=typeof t==="function"?t():t;if(r==="all"||!r&&!this.#A.size){return true}const n=new Set(r??this.#A);if(this.options.throwOnError){n.add("error")}return Object.keys(this.#u).some(t=>{const r=t;const i=this.#u[r]!==e[r];return i&&n.has(r)})};this.#f({listeners:r()})}#L(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#w){return}const t=this.#w;this.#w=e;this.#x=e.state;if(this.hasListeners()){t?.removeObserver(this);e.addObserver(this)}}onQueryUpdate(){this.updateResult();if(this.hasListeners()){this.#P()}}#f(e){i/* .notifyManager.batch */.Vr.batch(()=>{if(e.listeners){this.listeners.forEach(e=>{e(this.#u)})}this.#s.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function c(e,t){return(0,u/* .resolveEnabled */.Nc)(t.enabled,e)!==false&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===false)}function d(e,t){return c(e,t)||e.state.data!==void 0&&f(e,t,t.refetchOnMount)}function f(e,t,r){if((0,u/* .resolveEnabled */.Nc)(t.enabled,e)!==false&&(0,u/* .resolveStaleTime */.KC)(t.staleTime,e)!=="static"){const n=typeof r==="function"?r(e):r;return n==="always"||n!==false&&h(e,t)}return false}function p(e,t,r,n){return(e!==t||(0,u/* .resolveEnabled */.Nc)(n.enabled,e)===false)&&(!r.suspense||e.state.status!=="error")&&h(e,r)}function h(e,t){return(0,u/* .resolveEnabled */.Nc)(t.enabled,e)!==false&&e.isStaleByTime((0,u/* .resolveStaleTime */.KC)(t.staleTime,e))}function v(e,t){if(!(0,u/* .shallowEqualObjects */.VS)(e.getCurrentResult(),t)){return true}return false}//# sourceMappingURL=queryObserver.js.map
},25369:function(e,t,r){"use strict";r.d(t,{F:()=>i});/* ESM import */var n=r(49982);// src/removable.ts
var i=class{#B;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout();if((0,n/* .isValidTimeout */.PN)(this.gcTime)){this.#B=setTimeout(()=>{this.optionalRemove()},this.gcTime)}}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n/* .isServer */.sk?Infinity:5*60*1e3))}clearGcTimeout(){if(this.#B){clearTimeout(this.#B);this.#B=void 0}}};//# sourceMappingURL=removable.js.map
},24031:function(e,t,r){"use strict";r.d(t,{DV:()=>c,Kw:()=>u,Mz:()=>d});/* ESM import */var n=r(21037);/* ESM import */var i=r(72226);/* ESM import */var a=r(2329);/* ESM import */var o=r(49982);// src/retryer.ts
function s(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")==="online"?i/* .onlineManager.isOnline */.N.isOnline():true}var l=class extends Error{constructor(e){super("CancelledError");this.revert=e?.revert;this.silent=e?.silent}};function c(e){return e instanceof l}function d(e){let t=false;let r=0;let c=false;let d;const f=(0,a/* .pendingThenable */.O)();const p=t=>{if(!c){y(new l(t));e.abort?.()}};const h=()=>{t=true};const v=()=>{t=false};const m=()=>n/* .focusManager.isFocused */.j.isFocused()&&(e.networkMode==="always"||i/* .onlineManager.isOnline */.N.isOnline())&&e.canRun();const g=()=>u(e.networkMode)&&e.canRun();const b=t=>{if(!c){c=true;e.onSuccess?.(t);d?.();f.resolve(t)}};const y=t=>{if(!c){c=true;e.onError?.(t);d?.();f.reject(t)}};const _=()=>{return new Promise(t=>{d=e=>{if(c||m()){t(e)}};e.onPause?.()}).then(()=>{d=void 0;if(!c){e.onContinue?.()}})};const w=()=>{if(c){return}let n;const i=r===0?e.initialPromise:void 0;try{n=i??e.fn()}catch(e){n=Promise.reject(e)}Promise.resolve(n).then(b).catch(n=>{if(c){return}const i=e.retry??(o/* .isServer */.sk?0:3);const a=e.retryDelay??s;const u=typeof a==="function"?a(r,n):a;const l=i===true||typeof i==="number"&&r<i||typeof i==="function"&&i(r,n);if(t||!l){y(n);return}r++;e.onFail?.(r,n);(0,o/* .sleep */._v)(u).then(()=>{return m()?void 0:_()}).then(()=>{if(t){y(n)}else{w()}})})};return{promise:f,cancel:p,continue:()=>{d?.();return f},cancelRetry:h,continueRetry:v,canStart:g,start:()=>{if(g()){w()}else{_().then(w)}return f}}}//# sourceMappingURL=retryer.js.map
},83562:function(e,t,r){"use strict";r.d(t,{l:()=>n});// src/subscribable.ts
var n=class{constructor(){this.listeners=/* @__PURE__ */new Set;this.subscribe=this.subscribe.bind(this)}subscribe(e){this.listeners.add(e);this.onSubscribe();return()=>{this.listeners.delete(e);this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};//# sourceMappingURL=subscribable.js.map
},2329:function(e,t,r){"use strict";r.d(t,{O:()=>n});// src/thenable.ts
function n(){let e;let t;const r=new Promise((r,n)=>{e=r;t=n});r.status="pending";r.catch(()=>{});function n(e){Object.assign(r,e);delete r.resolve;delete r.reject}r.resolve=t=>{n({status:"fulfilled",value:t});e(t)};r.reject=e=>{n({status:"rejected",reason:e});t(e)};return r}function i(e){let t;e.then(e=>{t=e;return e},noop)?.catch(noop);if(t!==void 0){return{data:t}}return void 0}//# sourceMappingURL=thenable.js.map
},49982:function(e,t,r){"use strict";r.d(t,{CN:()=>S,Ht:()=>Z,KC:()=>u,Kp:()=>s,L3:()=>k,Nc:()=>l,PN:()=>o,Rm:()=>f,SE:()=>a,VS:()=>m,VX:()=>E,Wk:()=>x,X7:()=>d,Ym:()=>p,ZT:()=>i,_v:()=>_,_x:()=>c,cG:()=>O,oE:()=>w,sk:()=>n,to:()=>h});// src/utils.ts
var n=typeof window==="undefined"||"Deno"in globalThis;function i(){}function a(e,t){return typeof e==="function"?e(t):e}function o(e){return typeof e==="number"&&e>=0&&e!==Infinity}function s(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return typeof e==="function"?e(t):e}function l(e,t){return typeof e==="function"?e(t):e}function c(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==f(o,t.options)){return false}}else if(!h(t.queryKey,o)){return false}}if(r!=="all"){const e=t.isActive();if(r==="active"&&!e){return false}if(r==="inactive"&&e){return false}}if(typeof s==="boolean"&&t.isStale()!==s){return false}if(i&&i!==t.state.fetchStatus){return false}if(a&&!a(t)){return false}return true}function d(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey){return false}if(r){if(p(t.options.mutationKey)!==p(a)){return false}}else if(!h(t.options.mutationKey,a)){return false}}if(n&&t.state.status!==n){return false}if(i&&!i(t)){return false}return true}function f(e,t){const r=t?.queryKeyHashFn||p;return r(e)}function p(e){return JSON.stringify(e,(e,t)=>b(t)?Object.keys(t).sort().reduce((e,r)=>{e[r]=t[r];return e},{}):t)}function h(e,t){if(e===t){return true}if(typeof e!==typeof t){return false}if(e&&t&&typeof e==="object"&&typeof t==="object"){return Object.keys(t).every(r=>h(e[r],t[r]))}return false}function v(e,t){if(e===t){return e}const r=g(e)&&g(t);if(r||b(e)&&b(t)){const n=r?e:Object.keys(e);const i=n.length;const a=r?t:Object.keys(t);const o=a.length;const s=r?[]:{};const u=new Set(n);let l=0;for(let n=0;n<o;n++){const i=r?n:a[n];if((!r&&u.has(i)||r)&&e[i]===void 0&&t[i]===void 0){s[i]=void 0;l++}else{s[i]=v(e[i],t[i]);if(s[i]===e[i]&&e[i]!==void 0){l++}}}return i===o&&l===i?e:s}return t}function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length){return false}for(const r in e){if(e[r]!==t[r]){return false}}return true}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!y(e)){return false}const t=e.constructor;if(t===void 0){return true}const r=t.prototype;if(!y(r)){return false}if(!r.hasOwnProperty("isPrototypeOf")){return false}if(Object.getPrototypeOf(e)!==Object.prototype){return false}return true}function y(e){return Object.prototype.toString.call(e)==="[object Object]"}function _(e){return new Promise(t=>{setTimeout(t,e)})}function w(e,t,r){if(typeof r.structuralSharing==="function"){return r.structuralSharing(e,t)}else if(r.structuralSharing!==false){if(false){}return v(e,t)}return t}function x(e){return e}function E(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Z(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var S=Symbol();function O(e,t){if(false){}if(!e.queryFn&&t?.initialPromise){return()=>t.initialPromise}if(!e.queryFn||e.queryFn===S){return()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}return e.queryFn}function k(e,t){if(typeof e==="function"){return e(...t)}return!!e}//# sourceMappingURL=utils.js.map
},47932:function(e,t,r){"use strict";r.d(t,{S:()=>a});/* ESM import */var n=r(87363);"use client";// src/IsRestoringProvider.ts
var i=n.createContext(false);var a=()=>n.useContext(i);var o=i.Provider;//# sourceMappingURL=IsRestoringProvider.js.map
},99469:function(e,t,r){"use strict";r.d(t,{NL:()=>o,aH:()=>s});/* ESM import */var n=r(87363);/* ESM import */var i=r(85893);"use client";// src/QueryClientProvider.tsx
var a=n.createContext(void 0);var o=e=>{const t=n.useContext(a);if(e){return e}if(!t){throw new Error("No QueryClient set, use QueryClientProvider to set one")}return t};var s=({client:e,children:t})=>{n.useEffect(()=>{e.mount();return()=>{e.unmount()}},[e]);return/* @__PURE__ */(0,i.jsx)(a.Provider,{value:e,children:t})};//# sourceMappingURL=QueryClientProvider.js.map
},39404:function(e,t,r){"use strict";r.d(t,{_:()=>s});/* ESM import */var n=r(87363);/* ESM import */var i=r(85893);"use client";// src/QueryErrorResetBoundary.tsx
function a(){let e=false;return{clearReset:()=>{e=false},reset:()=>{e=true},isReset:()=>{return e}}}var o=n.createContext(a());var s=()=>n.useContext(o);var u=({children:e})=>{const[t]=React.useState(()=>a());return /* @__PURE__ */jsx(o.Provider,{value:t,children:typeof e==="function"?e(t):e})};//# sourceMappingURL=QueryErrorResetBoundary.js.map
},48590:function(e,t,r){"use strict";r.d(t,{JN:()=>o,KJ:()=>s,pf:()=>a});/* ESM import */var n=r(87363);/* ESM import */var i=r(49982);"use client";// src/errorBoundaryUtils.ts
var a=(e,t)=>{if(e.suspense||e.throwOnError||e.experimental_prefetchInRender){if(!t.isReset()){e.retryOnMount=false}}};var o=e=>{n.useEffect(()=>{e.clearReset()},[e])};var s=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>{return e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||(0,i/* .shouldThrowError */.L3)(r,[e.error,n]))};//# sourceMappingURL=errorBoundaryUtils.js.map
},75322:function(e,t,r){"use strict";r.d(t,{A8:()=>i,SB:()=>o,Z$:()=>a,j8:()=>s});// src/suspense.ts
var n=(e,t)=>t.state.data===void 0;var i=e=>{if(e.suspense){const t=e=>e==="static"?e:Math.max(e??1e3,1e3);const r=e.staleTime;e.staleTime=typeof r==="function"?(...e)=>t(r(...e)):t(r);if(typeof e.gcTime==="number"){e.gcTime=Math.max(e.gcTime,1e3)}}};var a=(e,t)=>e.isLoading&&e.isFetching&&!t;var o=(e,t)=>e?.suspense&&t.isPending;var s=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});//# sourceMappingURL=suspense.js.map
},30065:function(e,t,r){"use strict";r.d(t,{r:()=>d});/* ESM import */var n=r(87363);/* ESM import */var i=r(93242);/* ESM import */var a=r(49982);/* ESM import */var o=r(99469);/* ESM import */var s=r(39404);/* ESM import */var u=r(48590);/* ESM import */var l=r(47932);/* ESM import */var c=r(75322);"use client";// src/useBaseQuery.ts
function d(e,t,r){if(false){}const d=(0,l/* .useIsRestoring */.S)();const f=(0,s/* .useQueryErrorResetBoundary */._)();const p=(0,o/* .useQueryClient */.NL)(r);const h=p.defaultQueryOptions(e);p.getDefaultOptions().queries?._experimental_beforeQuery?.(h);if(false){}h._optimisticResults=d?"isRestoring":"optimistic";(0,c/* .ensureSuspenseTimers */.A8)(h);(0,u/* .ensurePreventErrorBoundaryRetry */.pf)(h,f);(0,u/* .useClearResetErrorBoundary */.JN)(f);const v=!p.getQueryCache().get(h.queryHash);const[m]=n.useState(()=>new t(p,h));const g=m.getOptimisticResult(h);const b=!d&&e.subscribed!==false;n.useSyncExternalStore(n.useCallback(e=>{const t=b?m.subscribe(i/* .notifyManager.batchCalls */.Vr.batchCalls(e)):a/* .noop */.ZT;m.updateResult();return t},[m,b]),()=>m.getCurrentResult(),()=>m.getCurrentResult());n.useEffect(()=>{m.setOptions(h)},[h,m]);if((0,c/* .shouldSuspend */.SB)(h,g)){throw(0,c/* .fetchOptimistic */.j8)(h,m,f)}if((0,u/* .getHasError */.KJ)({result:g,errorResetBoundary:f,throwOnError:h.throwOnError,query:p.getQueryCache().get(h.queryHash),suspense:h.suspense})){throw g.error};p.getDefaultOptions().queries?._experimental_afterQuery?.(h,g);if(h.experimental_prefetchInRender&&!a/* .isServer */.sk&&(0,c/* .willFetch */.Z$)(g,d)){const e=v?// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
(0,c/* .fetchOptimistic */.j8)(h,m,f):// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
p.getQueryCache().get(h.queryHash)?.promise;e?.catch(a/* .noop */.ZT).finally(()=>{m.updateResult()})}return!h.notifyOnChangeProps?m.trackResult(g):g}//# sourceMappingURL=useBaseQuery.js.map
},65228:function(e,t,r){"use strict";r.d(t,{D:()=>u});/* ESM import */var n=r(87363);/* ESM import */var i=r(6010);/* ESM import */var a=r(93242);/* ESM import */var o=r(49982);/* ESM import */var s=r(99469);"use client";// src/useMutation.ts
function u(e,t){const r=(0,s/* .useQueryClient */.NL)(t);const[u]=n.useState(()=>new i/* .MutationObserver */.X(r,e));n.useEffect(()=>{u.setOptions(e)},[u,e]);const l=n.useSyncExternalStore(n.useCallback(e=>u.subscribe(a/* .notifyManager.batchCalls */.Vr.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult());const c=n.useCallback((e,t)=>{u.mutate(e,t).catch(o/* .noop */.ZT)},[u]);if(l.error&&(0,o/* .shouldThrowError */.L3)(u.options.throwOnError,[l.error])){throw l.error}return{...l,mutate:c,mutateAsync:l.mutate}}//# sourceMappingURL=useMutation.js.map
},24333:function(e,t,r){"use strict";r.d(t,{a:()=>a});/* ESM import */var n=r(14987);/* ESM import */var i=r(30065);"use client";// src/useQuery.ts
function a(e,t){return(0,i/* .useBaseQuery */.r)(e,n/* .QueryObserver */.z,t)}//# sourceMappingURL=useQuery.js.map
},10184:function(e,t,r){"use strict";r.d(t,{Z:()=>d});/* ESM import */var n=r(6455);/* ESM import */var i=r(11065);/* ESM import */var a=r(97023);/* ESM import */var o=r(41859);/* ESM import */var s=r(43046);const u={http:i/* ["default"] */.Z,xhr:a/* ["default"] */.Z,fetch:o/* ["default"] */.Z};n/* ["default"].forEach */.Z.forEach(u,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){// eslint-disable-next-line no-empty
}Object.defineProperty(e,"adapterName",{value:t})}});const l=e=>`- ${e}`;const c=e=>n/* ["default"].isFunction */.Z.isFunction(e)||e===null||e===false;/* ESM default export */const d={getAdapter:e=>{e=n/* ["default"].isArray */.Z.isArray(e)?e:[e];const{length:t}=e;let r;let i;const a={};for(let n=0;n<t;n++){r=e[n];let t;i=r;if(!c(r)){i=u[(t=String(r)).toLowerCase()];if(i===undefined){throw new s/* ["default"] */.Z(`Unknown adapter '${t}'`)}}if(i){break}a[t||"#"+n]=i}if(!i){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build"));let r=t?e.length>1?"since :\n"+e.map(l).join("\n"):" "+l(e[0]):"as no adapter specified";throw new s/* ["default"] */.Z(`There is no suitable adapter to dispatch the request `+r,"ERR_NOT_SUPPORT")}return i},adapters:u}},41859:function(e,t,r){"use strict";r.d(t,{Z:()=>x});/* ESM import */var n=r(94090);/* ESM import */var i=r(6455);/* ESM import */var a=r(43046);/* ESM import */var o=r(15730);/* ESM import */var s=r(47007);/* ESM import */var u=r(92716);/* ESM import */var l=r(52955);/* ESM import */var c=r(35051);/* ESM import */var d=r(2079);const f=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const p=f&&typeof ReadableStream==="function";// used only inside the fetch adapter
const h=f&&(typeof TextEncoder==="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer()));const v=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const m=p&&v(()=>{let e=false;const t=new Request(n/* ["default"].origin */.Z.origin,{body:new ReadableStream,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t});const g=64*1024;const b=p&&v(()=>i/* ["default"].isReadableStream */.Z.isReadableStream(new Response("").body));const y={stream:b&&(e=>e.body)};f&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!y[t]&&(y[t]=i/* ["default"].isFunction */.Z.isFunction(e[t])?e=>e[t]():(e,r)=>{throw new a/* ["default"] */.Z(`Response type '${t}' is not supported`,a/* ["default"].ERR_NOT_SUPPORT */.Z.ERR_NOT_SUPPORT,r)})})})(new Response);const _=async e=>{if(e==null){return 0}if(i/* ["default"].isBlob */.Z.isBlob(e)){return e.size}if(i/* ["default"].isSpecCompliantForm */.Z.isSpecCompliantForm(e)){const t=new Request(n/* ["default"].origin */.Z.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(i/* ["default"].isArrayBufferView */.Z.isArrayBufferView(e)||i/* ["default"].isArrayBuffer */.Z.isArrayBuffer(e)){return e.byteLength}if(i/* ["default"].isURLSearchParams */.Z.isURLSearchParams(e)){e=e+""}if(i/* ["default"].isString */.Z.isString(e)){return(await h(e)).byteLength}};const w=async(e,t)=>{const r=i/* ["default"].toFiniteNumber */.Z.toFiniteNumber(e.getContentLength());return r==null?_(t):r};/* ESM default export */const x=f&&(async e=>{let{url:t,method:r,data:n,signal:f,cancelToken:p,timeout:h,onDownloadProgress:v,onUploadProgress:_,responseType:x,headers:E,withCredentials:Z="same-origin",fetchOptions:S}=(0,c/* ["default"] */.Z)(e);x=x?(x+"").toLowerCase():"text";let O=(0,o/* ["default"] */.Z)([f,p&&p.toAbortSignal()],h);let k;const T=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let C;try{if(_&&m&&r!=="get"&&r!=="head"&&(C=await w(E,n))!==0){let e=new Request(t,{method:"POST",body:n,duplex:"half"});let r;if(i/* ["default"].isFormData */.Z.isFormData(n)&&(r=e.headers.get("content-type"))){E.setContentType(r)}if(e.body){const[t,r]=(0,l/* .progressEventDecorator */.sg)(C,(0,l/* .progressEventReducer */.Iz)((0,l/* .asyncDecorator */.Mj)(_)));n=(0,s/* .trackStream */.A6)(e.body,g,t,r)}}if(!i/* ["default"].isString */.Z.isString(Z)){Z=Z?"include":"omit"}// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const a="credentials"in Request.prototype;k=new Request(t,{...S,signal:O,method:r.toUpperCase(),headers:E.normalize().toJSON(),body:n,duplex:"half",credentials:a?Z:undefined});let o=await fetch(k,S);const c=b&&(x==="stream"||x==="response");if(b&&(v||c&&T)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=i/* ["default"].toFiniteNumber */.Z.toFiniteNumber(o.headers.get("content-length"));const[r,n]=v&&(0,l/* .progressEventDecorator */.sg)(t,(0,l/* .progressEventReducer */.Iz)((0,l/* .asyncDecorator */.Mj)(v),true))||[];o=new Response((0,s/* .trackStream */.A6)(o.body,g,r,()=>{n&&n();T&&T()}),e)}x=x||"text";let f=await y[i/* ["default"].findKey */.Z.findKey(y,x)||"text"](o,e);!c&&T&&T();return await new Promise((t,r)=>{(0,d/* ["default"] */.Z)(t,r,{data:f,headers:u/* ["default"].from */.Z.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:k})})}catch(t){T&&T();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new a/* ["default"] */.Z("Network Error",a/* ["default"].ERR_NETWORK */.Z.ERR_NETWORK,e,k),{cause:t.cause||t})}throw a/* ["default"].from */.Z.from(t,t&&t.code,e,k)}})},97023:function(e,t,r){"use strict";r.d(t,{Z:()=>h});/* ESM import */var n=r(6455);/* ESM import */var i=r(2079);/* ESM import */var a=r(27218);/* ESM import */var o=r(43046);/* ESM import */var s=r(7402);/* ESM import */var u=r(67594);/* ESM import */var l=r(94090);/* ESM import */var c=r(92716);/* ESM import */var d=r(52955);/* ESM import */var f=r(35051);const p=typeof XMLHttpRequest!=="undefined";/* ESM default export */const h=p&&function(e){return new Promise(function t(t,r){const p=(0,f/* ["default"] */.Z)(e);let h=p.data;const v=c/* ["default"].from */.Z.from(p.headers).normalize();let{responseType:m,onUploadProgress:g,onDownloadProgress:b}=p;let y;let _,w;let x,E;function Z(){x&&x();// flush events
E&&E();// flush events
p.cancelToken&&p.cancelToken.unsubscribe(y);p.signal&&p.signal.removeEventListener("abort",y)}let S=new XMLHttpRequest;S.open(p.method.toUpperCase(),p.url,true);// Set the request timeout in MS
S.timeout=p.timeout;function O(){if(!S){return}// Prepare the response
const n=c/* ["default"].from */.Z.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders());const a=!m||m==="text"||m==="json"?S.responseText:S.response;const o={data:a,status:S.status,statusText:S.statusText,headers:n,config:e,request:S};(0,i/* ["default"] */.Z)(function e(e){t(e);Z()},function e(e){r(e);Z()},o);// Clean up request
S=null}if("onloadend"in S){// Use onloadend if available
S.onloadend=O}else{// Listen for ready state to emulate onloadend
S.onreadystatechange=function e(){if(!S||S.readyState!==4){return}// The request errored out and we didn't get a response, this will be
// handled by onerror instead
// With one exception: request that using file: protocol, most browsers
// will return status as 0 even though it's a successful request
if(S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)){return}// readystate handler is calling before onerror or ontimeout handlers,
// so we should call onloadend on the next 'tick'
setTimeout(O)}}// Handle browser request cancellation (as opposed to a manual cancellation)
S.onabort=function t(){if(!S){return}r(new o/* ["default"] */.Z("Request aborted",o/* ["default"].ECONNABORTED */.Z.ECONNABORTED,e,S));// Clean up request
S=null};// Handle low level network errors
S.onerror=function t(){// Real errors are hidden from us by the browser
// onerror should only fire if it's a network error
r(new o/* ["default"] */.Z("Network Error",o/* ["default"].ERR_NETWORK */.Z.ERR_NETWORK,e,S));// Clean up request
S=null};// Handle timeout
S.ontimeout=function t(){let t=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded";const n=p.transitional||a/* ["default"] */.Z;if(p.timeoutErrorMessage){t=p.timeoutErrorMessage}r(new o/* ["default"] */.Z(t,n.clarifyTimeoutError?o/* ["default"].ETIMEDOUT */.Z.ETIMEDOUT:o/* ["default"].ECONNABORTED */.Z.ECONNABORTED,e,S));// Clean up request
S=null};// Remove Content-Type if data is undefined
h===undefined&&v.setContentType(null);// Add headers to the request
if("setRequestHeader"in S){n/* ["default"].forEach */.Z.forEach(v.toJSON(),function e(e,t){S.setRequestHeader(t,e)})}// Add withCredentials to request if needed
if(!n/* ["default"].isUndefined */.Z.isUndefined(p.withCredentials)){S.withCredentials=!!p.withCredentials}// Add responseType to request if needed
if(m&&m!=="json"){S.responseType=p.responseType}// Handle progress if needed
if(b){[w,E]=(0,d/* .progressEventReducer */.Iz)(b,true);S.addEventListener("progress",w)}// Not all browsers support upload events
if(g&&S.upload){[_,x]=(0,d/* .progressEventReducer */.Iz)(g);S.upload.addEventListener("progress",_);S.upload.addEventListener("loadend",x)}if(p.cancelToken||p.signal){// Handle cancellation
// eslint-disable-next-line func-names
y=t=>{if(!S){return}r(!t||t.type?new s/* ["default"] */.Z(null,e,S):t);S.abort();S=null};p.cancelToken&&p.cancelToken.subscribe(y);if(p.signal){p.signal.aborted?y():p.signal.addEventListener("abort",y)}}const k=(0,u/* ["default"] */.Z)(p.url);if(k&&l/* ["default"].protocols.indexOf */.Z.protocols.indexOf(k)===-1){r(new o/* ["default"] */.Z("Unsupported protocol "+k+":",o/* ["default"].ERR_BAD_REQUEST */.Z.ERR_BAD_REQUEST,e));return}// Send the request
S.send(h||null)})}},12008:function(e,t,r){"use strict";r.d(t,{Z:()=>x});/* ESM import */var n=r(6455);/* ESM import */var i=r(4876);/* ESM import */var a=r(11784);/* ESM import */var o=r(30814);/* ESM import */var s=r(167);/* ESM import */var u=r(47615);/* ESM import */var l=r(7402);/* ESM import */var c=r(87950);/* ESM import */var d=r(14753);/* ESM import */var f=r(42277);/* ESM import */var p=r(46617);/* ESM import */var h=r(43046);/* ESM import */var v=r(89641);/* ESM import */var m=r(42495);/* ESM import */var g=r(92716);/* ESM import */var b=r(10184);/* ESM import */var y=r(3804);/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 *
 * @returns {Axios} A new instance of Axios
 */function _(e){const t=new a/* ["default"] */.Z(e);const r=(0,i/* ["default"] */.Z)(a/* ["default"].prototype.request */.Z.prototype.request,t);// Copy axios.prototype to instance
n/* ["default"].extend */.Z.extend(r,a/* ["default"].prototype */.Z.prototype,t,{allOwnKeys:true});// Copy context to instance
n/* ["default"].extend */.Z.extend(r,t,null,{allOwnKeys:true});// Factory for creating new instances
r.create=function t(t){return _((0,o/* ["default"] */.Z)(e,t))};return r}// Create the default instance to be exported
const w=_(s/* ["default"] */.Z);// Expose Axios class to allow class inheritance
w.Axios=a/* ["default"] */.Z;// Expose Cancel & CancelToken
w.CanceledError=l/* ["default"] */.Z;w.CancelToken=c/* ["default"] */.Z;w.isCancel=d/* ["default"] */.Z;w.VERSION=f/* .VERSION */.q;w.toFormData=p/* ["default"] */.Z;// Expose AxiosError class
w.AxiosError=h/* ["default"] */.Z;// alias for CanceledError for backward compatibility
w.Cancel=w.CanceledError;// Expose all/spread
w.all=function e(e){return Promise.all(e)};w.spread=v/* ["default"] */.Z;// Expose isAxiosError
w.isAxiosError=m/* ["default"] */.Z;// Expose mergeConfig
w.mergeConfig=o/* ["default"] */.Z;w.AxiosHeaders=g/* ["default"] */.Z;w.formToJSON=e=>(0,u/* ["default"] */.Z)(n/* ["default"].isHTMLForm */.Z.isHTMLForm(e)?new FormData(e):e);w.getAdapter=b/* ["default"].getAdapter */.Z.getAdapter;w.HttpStatusCode=y/* ["default"] */.Z;w.default=w;// this module should only have a default export
/* ESM default export */const x=w},87950:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(7402);/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @param {Function} executor The executor function.
 *
 * @returns {CancelToken}
 */class i{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise(function e(e){t=e});const r=this;// eslint-disable-next-line func-names
this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null});// eslint-disable-next-line func-names
this.promise.then=e=>{let t;// eslint-disable-next-line func-names
const n=new Promise(e=>{r.subscribe(e);t=e}).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e(function e(e,i,a){if(r.reason){// Cancellation has already been requested
return}r.reason=new n/* ["default"] */.Z(e,i,a);t(r.reason)})}/**
   * Throws a `CanceledError` if cancellation has been requested.
   */throwIfRequested(){if(this.reason){throw this.reason}}/**
   * Subscribe to the cancel signal
   */subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}/**
   * Unsubscribe from the cancel signal
   */unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}/**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */static source(){let e;const t=new i(function t(t){e=t});return{token:t,cancel:e}}}/* ESM default export */const a=i},7402:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(43046);/* ESM import */var i=r(6455);/**
 * A `CanceledError` is an object that is thrown when an operation is canceled.
 *
 * @param {string=} message The message.
 * @param {Object=} config The config.
 * @param {Object=} request The request.
 *
 * @returns {CanceledError} The created error.
 */function a(e,t,r){// eslint-disable-next-line no-eq-null,eqeqeq
n/* ["default"].call */.Z.call(this,e==null?"canceled":e,n/* ["default"].ERR_CANCELED */.Z.ERR_CANCELED,t,r);this.name="CanceledError"}i/* ["default"].inherits */.Z.inherits(a,n/* ["default"] */.Z,{__CANCEL__:true});/* ESM default export */const o=a},14753:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){return!!(e&&e.__CANCEL__)}},11784:function(e,t,r){"use strict";r.d(t,{Z:()=>p});/* ESM import */var n=r(6455);/* ESM import */var i=r(7235);/* ESM import */var a=r(32713);/* ESM import */var o=r(52838);/* ESM import */var s=r(30814);/* ESM import */var u=r(5139);/* ESM import */var l=r(11037);/* ESM import */var c=r(92716);const d=l/* ["default"].validators */.Z.validators;/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 *
 * @return {Axios} A new instance of Axios
 */class f{constructor(e){this.defaults=e||{};this.interceptors={request:new a/* ["default"] */.Z,response:new a/* ["default"] */.Z}}/**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;// slice off the Error: ... line
const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=r;// match without the 2 top stack lines
}else if(r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))){e.stack+="\n"+r}}catch(e){// ignore the case where "stack" is an un-writable property
}}throw e}}_request(e,t){/*eslint no-param-reassign:0*/// Allow for axios('example/url'[, config]) a la fetch API
if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=(0,s/* ["default"] */.Z)(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:a}=t;if(r!==undefined){l/* ["default"].assertOptions */.Z.assertOptions(r,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},false)}if(i!=null){if(n/* ["default"].isFunction */.Z.isFunction(i)){t.paramsSerializer={serialize:i}}else{l/* ["default"].assertOptions */.Z.assertOptions(i,{encode:d.function,serialize:d.function},true)}}// Set config.allowAbsoluteUrls
if(t.allowAbsoluteUrls!==undefined){// do nothing
}else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}l/* ["default"].assertOptions */.Z.assertOptions(t,{baseUrl:d.spelling("baseURL"),withXsrfToken:d.spelling("withXSRFToken")},true);// Set config.method
t.method=(t.method||this.defaults.method||"get").toLowerCase();// Flatten headers
let u=a&&n/* ["default"].merge */.Z.merge(a.common,a[t.method]);a&&n/* ["default"].forEach */.Z.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]});t.headers=c/* ["default"].concat */.Z.concat(u,a);// filter out skipped interceptors
const f=[];let p=true;this.interceptors.request.forEach(function e(e){if(typeof e.runWhen==="function"&&e.runWhen(t)===false){return}p=p&&e.synchronous;f.unshift(e.fulfilled,e.rejected)});const h=[];this.interceptors.response.forEach(function e(e){h.push(e.fulfilled,e.rejected)});let v;let m=0;let g;if(!p){const e=[o/* ["default"].bind */.Z.bind(this),undefined];e.unshift(...f);e.push(...h);g=e.length;v=Promise.resolve(t);while(m<g){v=v.then(e[m++],e[m++])}return v}g=f.length;let b=t;m=0;while(m<g){const e=f[m++];const t=f[m++];try{b=e(b)}catch(e){t.call(this,e);break}}try{v=o/* ["default"].call */.Z.call(this,b)}catch(e){return Promise.reject(e)}m=0;g=h.length;while(m<g){v=v.then(h[m++],h[m++])}return v}getUri(e){e=(0,s/* ["default"] */.Z)(this.defaults,e);const t=(0,u/* ["default"] */.Z)(e.baseURL,e.url,e.allowAbsoluteUrls);return(0,i/* ["default"] */.Z)(t,e.params,e.paramsSerializer)}}// Provide aliases for supported request methods
n/* ["default"].forEach */.Z.forEach(["delete","get","head","options"],function e(e){/*eslint func-names:0*/f.prototype[e]=function(t,r){return this.request((0,s/* ["default"] */.Z)(r||{},{method:e,url:t,data:(r||{}).data}))}});n/* ["default"].forEach */.Z.forEach(["post","put","patch"],function e(e){/*eslint func-names:0*/function t(t){return function r(r,n,i){return this.request((0,s/* ["default"] */.Z)(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t();f.prototype[e+"Form"]=t(true)});/* ESM default export */const p=f},43046:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(6455);/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [config] The config.
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 *
 * @returns {Error} The created error.
 */function i(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);if(i){this.response=i;this.status=i.status?i.status:null}}n/* ["default"].inherits */.Z.inherits(i,Error,{toJSON:function e(){return{// Standard
message:this.message,name:this.name,// Microsoft
description:this.description,number:this.number,// Mozilla
fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
config:n/* ["default"].toJSONObject */.Z.toJSONObject(this.config),code:this.code,status:this.status}}});const a=i.prototype;const o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{o[e]={value:e}});Object.defineProperties(i,o);Object.defineProperty(a,"isAxiosError",{value:true});// eslint-disable-next-line func-names
i.from=(e,t,r,o,s,u)=>{const l=Object.create(a);n/* ["default"].toFlatObject */.Z.toFlatObject(e,l,function e(e){return e!==Error.prototype},e=>{return e!=="isAxiosError"});i.call(l,e.message,t,r,o,s);l.cause=e;l.name=e.name;u&&Object.assign(l,u);return l};/* ESM default export */const s=i},92716:function(e,t,r){"use strict";r.d(t,{Z:()=>h});/* ESM import */var n=r(6455);/* ESM import */var i=r(7445);const a=Symbol("internals");function o(e){return e&&String(e).trim().toLowerCase()}function s(e){if(e===false||e==null){return e}return n/* ["default"].isArray */.Z.isArray(e)?e.map(s):String(e)}function u(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}const l=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function c(e,t,r,i,a){if(n/* ["default"].isFunction */.Z.isFunction(i)){return i.call(this,t,r)}if(a){t=r}if(!n/* ["default"].isString */.Z.isString(t))return;if(n/* ["default"].isString */.Z.isString(i)){return t.indexOf(i)!==-1}if(n/* ["default"].isRegExp */.Z.isRegExp(i)){return i.test(t)}}function d(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>{return t.toUpperCase()+r})}function f(e,t){const r=n/* ["default"].toCamelCase */.Z.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})})}class p{constructor(e){e&&this.set(e)}set(e,t,r){const a=this;function u(e,t,r){const i=o(t);if(!i){throw new Error("header name must be a non-empty string")}const u=n/* ["default"].findKey */.Z.findKey(a,i);if(!u||a[u]===undefined||r===true||r===undefined&&a[u]!==false){a[u||t]=s(e)}}const c=(e,t)=>n/* ["default"].forEach */.Z.forEach(e,(e,r)=>u(e,r,t));if(n/* ["default"].isPlainObject */.Z.isPlainObject(e)||e instanceof this.constructor){c(e,t)}else if(n/* ["default"].isString */.Z.isString(e)&&(e=e.trim())&&!l(e)){c((0,i/* ["default"] */.Z)(e),t)}else if(n/* ["default"].isObject */.Z.isObject(e)&&n/* ["default"].isIterable */.Z.isIterable(e)){let r={},i,a;for(const t of e){if(!n/* ["default"].isArray */.Z.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[a=t[0]]=(i=r[a])?n/* ["default"].isArray */.Z.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}c(r,t)}else{e!=null&&u(t,e,r)}return this}get(e,t){e=o(e);if(e){const r=n/* ["default"].findKey */.Z.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return u(e)}if(n/* ["default"].isFunction */.Z.isFunction(t)){return t.call(this,e,r)}if(n/* ["default"].isRegExp */.Z.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=o(e);if(e){const r=n/* ["default"].findKey */.Z.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||c(this,this[r],r,t)))}return false}delete(e,t){const r=this;let i=false;function a(e){e=o(e);if(e){const a=n/* ["default"].findKey */.Z.findKey(r,e);if(a&&(!t||c(r,r[a],a,t))){delete r[a];i=true}}}if(n/* ["default"].isArray */.Z.isArray(e)){e.forEach(a)}else{a(e)}return i}clear(e){const t=Object.keys(this);let r=t.length;let n=false;while(r--){const i=t[r];if(!e||c(this,this[i],i,e,true)){delete this[i];n=true}}return n}normalize(e){const t=this;const r={};n/* ["default"].forEach */.Z.forEach(this,(i,a)=>{const o=n/* ["default"].findKey */.Z.findKey(r,a);if(o){t[o]=s(i);delete t[a];return}const u=e?d(a):String(a).trim();if(u!==a){delete t[a]}t[u]=s(i);r[u]=true});return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);n/* ["default"].forEach */.Z.forEach(this,(r,i)=>{r!=null&&r!==false&&(t[i]=e&&n/* ["default"].isArray */.Z.isArray(r)?r.join(", "):r)});return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);t.forEach(e=>r.set(e));return r}static accessor(e){const t=this[a]=this[a]={accessors:{}};const r=t.accessors;const i=this.prototype;function s(e){const t=o(e);if(!r[t]){f(i,e);r[t]=true}}n/* ["default"].isArray */.Z.isArray(e)?e.forEach(s):s(e);return this}}p.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);// reserved names hotfix
n/* ["default"].reduceDescriptors */.Z.reduceDescriptors(p.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);// map `set` => `Set`
return{get:()=>e,set(e){this[r]=e}}});n/* ["default"].freezeMethods */.Z.freezeMethods(p);/* ESM default export */const h=p},32713:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(6455);class i{constructor(){this.handlers=[]}/**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */use(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1}/**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
   */eject(e){if(this.handlers[e]){this.handlers[e]=null}}/**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */clear(){if(this.handlers){this.handlers=[]}}/**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */forEach(e){n/* ["default"].forEach */.Z.forEach(this.handlers,function t(t){if(t!==null){e(t)}})}}/* ESM default export */const a=i},5139:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(60807);/* ESM import */var i=r(42296);/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 *
 * @returns {string} The combined full path
 */function a(e,t,r){let a=!(0,n/* ["default"] */.Z)(t);if(e&&(a||r==false)){return(0,i/* ["default"] */.Z)(e,t)}return t}},52838:function(e,t,r){"use strict";r.d(t,{Z:()=>c});/* ESM import */var n=r(50623);/* ESM import */var i=r(14753);/* ESM import */var a=r(167);/* ESM import */var o=r(7402);/* ESM import */var s=r(92716);/* ESM import */var u=r(10184);/**
 * Throws a `CanceledError` if cancellation has been requested.
 *
 * @param {Object} config The config that is to be used for the request
 *
 * @returns {void}
 */function l(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new o/* ["default"] */.Z(null,e)}}/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 *
 * @returns {Promise} The Promise to be fulfilled
 */function c(e){l(e);e.headers=s/* ["default"].from */.Z.from(e.headers);// Transform request data
e.data=n/* ["default"].call */.Z.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=u/* ["default"].getAdapter */.Z.getAdapter(e.adapter||a/* ["default"].adapter */.Z.adapter);return t(e).then(function t(t){l(e);// Transform response data
t.data=n/* ["default"].call */.Z.call(e,e.transformResponse,t);t.headers=s/* ["default"].from */.Z.from(t.headers);return t},function t(t){if(!(0,i/* ["default"] */.Z)(t)){l(e);// Transform response data
if(t&&t.response){t.response.data=n/* ["default"].call */.Z.call(e,e.transformResponse,t.response);t.response.headers=s/* ["default"].from */.Z.from(t.response.headers)}}return Promise.reject(t)})}},30814:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(6455);/* ESM import */var i=r(92716);const a=e=>e instanceof i/* ["default"] */.Z?{...e}:e;/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 *
 * @returns {Object} New object resulting from merging config2 to config1
 */function o(e,t){// eslint-disable-next-line no-param-reassign
t=t||{};const r={};function i(e,t,r,i){if(n/* ["default"].isPlainObject */.Z.isPlainObject(e)&&n/* ["default"].isPlainObject */.Z.isPlainObject(t)){return n/* ["default"].merge.call */.Z.merge.call({caseless:i},e,t)}else if(n/* ["default"].isPlainObject */.Z.isPlainObject(t)){return n/* ["default"].merge */.Z.merge({},t)}else if(n/* ["default"].isArray */.Z.isArray(t)){return t.slice()}return t}// eslint-disable-next-line consistent-return
function o(e,t,r,a){if(!n/* ["default"].isUndefined */.Z.isUndefined(t)){return i(e,t,r,a)}else if(!n/* ["default"].isUndefined */.Z.isUndefined(e)){return i(undefined,e,r,a)}}// eslint-disable-next-line consistent-return
function s(e,t){if(!n/* ["default"].isUndefined */.Z.isUndefined(t)){return i(undefined,t)}}// eslint-disable-next-line consistent-return
function u(e,t){if(!n/* ["default"].isUndefined */.Z.isUndefined(t)){return i(undefined,t)}else if(!n/* ["default"].isUndefined */.Z.isUndefined(e)){return i(undefined,e)}}// eslint-disable-next-line consistent-return
function l(r,n,a){if(a in t){return i(r,n)}else if(a in e){return i(undefined,r)}}const c={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:l,headers:(e,t,r)=>o(a(e),a(t),r,true)};n/* ["default"].forEach */.Z.forEach(Object.keys({...e,...t}),function i(i){const a=c[i]||o;const s=a(e[i],t[i],i);n/* ["default"].isUndefined */.Z.isUndefined(s)&&a!==l||(r[i]=s)});return r}},2079:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(43046);/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 *
 * @returns {object} The response.
 */function i(e,t,r){const i=r.config.validateStatus;if(!r.status||!i||i(r.status)){e(r)}else{t(new n/* ["default"] */.Z("Request failed with status code "+r.status,[n/* ["default"].ERR_BAD_REQUEST */.Z.ERR_BAD_REQUEST,n/* ["default"].ERR_BAD_RESPONSE */.Z.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}},50623:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(6455);/* ESM import */var i=r(167);/* ESM import */var a=r(92716);/**
 * Transform the data for a request or a response
 *
 * @param {Array|Function} fns A single function or Array of functions
 * @param {?Object} response The response object
 *
 * @returns {*} The resulting transformed data
 */function o(e,t){const r=this||i/* ["default"] */.Z;const o=t||r;const s=a/* ["default"].from */.Z.from(o.headers);let u=o.data;n/* ["default"].forEach */.Z.forEach(e,function e(e){u=e.call(r,u,s.normalize(),t?t.status:undefined)});s.normalize();return u}},167:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(6455);/* ESM import */var i=r(43046);/* ESM import */var a=r(27218);/* ESM import */var o=r(46617);/* ESM import */var s=r(37292);/* ESM import */var u=r(94090);/* ESM import */var l=r(47615);/**
 * It takes a string, tries to parse it, and if it fails, it returns the stringified version
 * of the input
 *
 * @param {any} rawValue - The value to be stringified.
 * @param {Function} parser - A function that parses a string into a JavaScript object.
 * @param {Function} encoder - A function that takes a value and returns a string.
 *
 * @returns {string} A stringified version of the rawValue.
 */function c(e,t,r){if(n/* ["default"].isString */.Z.isString(e)){try{(t||JSON.parse)(e);return n/* ["default"].trim */.Z.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const d={transitional:a/* ["default"] */.Z,adapter:["xhr","http","fetch"],transformRequest:[function e(e,t){const r=t.getContentType()||"";const i=r.indexOf("application/json")>-1;const a=n/* ["default"].isObject */.Z.isObject(e);if(a&&n/* ["default"].isHTMLForm */.Z.isHTMLForm(e)){e=new FormData(e)}const u=n/* ["default"].isFormData */.Z.isFormData(e);if(u){return i?JSON.stringify((0,l/* ["default"] */.Z)(e)):e}if(n/* ["default"].isArrayBuffer */.Z.isArrayBuffer(e)||n/* ["default"].isBuffer */.Z.isBuffer(e)||n/* ["default"].isStream */.Z.isStream(e)||n/* ["default"].isFile */.Z.isFile(e)||n/* ["default"].isBlob */.Z.isBlob(e)||n/* ["default"].isReadableStream */.Z.isReadableStream(e)){return e}if(n/* ["default"].isArrayBufferView */.Z.isArrayBufferView(e)){return e.buffer}if(n/* ["default"].isURLSearchParams */.Z.isURLSearchParams(e)){t.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return e.toString()}let d;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1){return(0,s/* ["default"] */.Z)(e,this.formSerializer).toString()}if((d=n/* ["default"].isFileList */.Z.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return(0,o/* ["default"] */.Z)(d?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",false);return c(e)}return e}],transformResponse:[function e(e){const t=this.transitional||d.transitional;const r=t&&t.forcedJSONParsing;const a=this.responseType==="json";if(n/* ["default"].isResponse */.Z.isResponse(e)||n/* ["default"].isReadableStream */.Z.isReadableStream(e)){return e}if(e&&n/* ["default"].isString */.Z.isString(e)&&(r&&!this.responseType||a)){const r=t&&t.silentJSONParsing;const n=!r&&a;try{return JSON.parse(e)}catch(e){if(n){if(e.name==="SyntaxError"){throw i/* ["default"].from */.Z.from(e,i/* ["default"].ERR_BAD_RESPONSE */.Z.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return e}],/**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:u/* ["default"].classes.FormData */.Z.classes.FormData,Blob:u/* ["default"].classes.Blob */.Z.classes.Blob},validateStatus:function e(e){return e>=200&&e<300},headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":undefined}}};n/* ["default"].forEach */.Z.forEach(["delete","get","head","post","put","patch"],e=>{d.headers[e]={}});/* ESM default export */const f=d},27218:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/* ESM default export */const n={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false}},42277:function(e,t,r){"use strict";r.d(t,{q:()=>n});const n="1.11.0"},86051:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(46617);/**
 * It encodes a string by replacing all characters that are not in the unreserved set with
 * their percent-encoded equivalents
 *
 * @param {string} str - The string to encode.
 *
 * @returns {string} The encoded string.
 */function i(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function e(e){return t[e]})}/**
 * It takes a params object and converts it to a FormData object
 *
 * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
 * @param {Object<string, any>} options - The options object passed to the Axios constructor.
 *
 * @returns {void}
 */function a(e,t){this._pairs=[];e&&(0,n/* ["default"] */.Z)(e,this,t)}const o=a.prototype;o.append=function e(e,t){this._pairs.push([e,t])};o.toString=function e(e){const t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map(function e(e){return t(e[0])+"="+t(e[1])},"").join("&")};/* ESM default export */const s=a},3804:function(e,t,r){"use strict";r.d(t,{Z:()=>i});const n={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent: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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(n).forEach(([e,t])=>{n[t]=e});/* ESM default export */const i=n},4876:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e,t){return function r(){return e.apply(t,arguments)}}},7235:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(6455);/* ESM import */var i=r(86051);/**
 * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
 * URI encoded counterparts
 *
 * @param {string} val The value to be encoded.
 *
 * @returns {string} The encoded value.
 */function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @param {?(object|Function)} options
 *
 * @returns {string} The formatted url
 */function o(e,t,r){/*eslint no-param-reassign:0*/if(!t){return e}const o=r&&r.encode||a;if(n/* ["default"].isFunction */.Z.isFunction(r)){r={serialize:r}}const s=r&&r.serialize;let u;if(s){u=s(t,r)}else{u=n/* ["default"].isURLSearchParams */.Z.isURLSearchParams(t)?t.toString():new i/* ["default"] */.Z(t,r).toString(o)}if(u){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+u}return e}},42296:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 *
 * @returns {string} The combined URL
 */function n(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},15730:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(7402);/* ESM import */var i=r(43046);/* ESM import */var a=r(6455);const o=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r=new AbortController;let o;const s=function(e){if(!o){o=true;l();const t=e instanceof Error?e:this.reason;r.abort(t instanceof i/* ["default"] */.Z?t:new n/* ["default"] */.Z(t instanceof Error?t.message:t))}};let u=t&&setTimeout(()=>{u=null;s(new i/* ["default"] */.Z(`timeout ${t} of ms exceeded`,i/* ["default"].ETIMEDOUT */.Z.ETIMEDOUT))},t);const l=()=>{if(e){u&&clearTimeout(u);u=null;e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)});e=null}};e.forEach(e=>e.addEventListener("abort",s));const{signal:c}=r;c.unsubscribe=()=>a/* ["default"].asap */.Z.asap(l);return c}};/* ESM default export */const s=o},39909:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(6455);/* ESM import */var i=r(94090);/* ESM default export */const a=i/* ["default"].hasStandardBrowserEnv */.Z.hasStandardBrowserEnv?// Standard browser envs support document.cookie
{write(e,t,r,i,a,o){const s=[e+"="+encodeURIComponent(t)];n/* ["default"].isNumber */.Z.isNumber(r)&&s.push("expires="+new Date(r).toGMTString());n/* ["default"].isString */.Z.isString(i)&&s.push("path="+i);n/* ["default"].isString */.Z.isString(a)&&s.push("domain="+a);o===true&&s.push("secure");document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:// Non-standard browser env (web workers, react-native) lack needed support.
{write(){},read(){return null},remove(){}}},47615:function(e,t,r){"use strict";r.d(t,{Z:()=>s});/* ESM import */var n=r(6455);/**
 * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
 *
 * @param {string} name - The name of the property to get.
 *
 * @returns An array of strings.
 */function i(e){// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return n/* ["default"].matchAll */.Z.matchAll(/\w+|\[(\w*)]/g,e).map(e=>{return e[0]==="[]"?"":e[1]||e[0]})}/**
 * Convert an array to an object.
 *
 * @param {Array<any>} arr - The array to convert to an object.
 *
 * @returns An object with the same keys and values as the array.
 */function a(e){const t={};const r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++){a=r[n];t[a]=e[a]}return t}/**
 * It takes a FormData object and returns a JavaScript object
 *
 * @param {string} formData The FormData object to convert to JSON.
 *
 * @returns {Object<string, any> | null} The converted object.
 */function o(e){function t(e,r,i,o){let s=e[o++];if(s==="__proto__")return true;const u=Number.isFinite(+s);const l=o>=e.length;s=!s&&n/* ["default"].isArray */.Z.isArray(i)?i.length:s;if(l){if(n/* ["default"].hasOwnProp */.Z.hasOwnProp(i,s)){i[s]=[i[s],r]}else{i[s]=r}return!u}if(!i[s]||!n/* ["default"].isObject */.Z.isObject(i[s])){i[s]=[]}const c=t(e,r,i[s],o);if(c&&n/* ["default"].isArray */.Z.isArray(i[s])){i[s]=a(i[s])}return!u}if(n/* ["default"].isFormData */.Z.isFormData(e)&&n/* ["default"].isFunction */.Z.isFunction(e.entries)){const r={};n/* ["default"].forEachEntry */.Z.forEachEntry(e,(e,n)=>{t(i(e),n,r,0)});return r}return null}/* ESM default export */const s=o},60807:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 *
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */function n(e){// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},42495:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(6455);/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 *
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */function i(e){return n/* ["default"].isObject */.Z.isObject(e)&&e.isAxiosError===true}},26822:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(94090);/* ESM default export */const i=n/* ["default"].hasStandardBrowserEnv */.Z.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,n/* ["default"].origin */.Z.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(n/* ["default"].origin */.Z.origin),n/* ["default"].navigator */.Z.navigator&&/(msie|trident)/i.test(n/* ["default"].navigator.userAgent */.Z.navigator.userAgent)):()=>true},11065:function(e,t,r){"use strict";r.d(t,{Z:()=>n});// eslint-disable-next-line strict
/* ESM default export */const n=null},7445:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(6455);// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const i=n/* ["default"].toObjectSet */.Z.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"]);/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} rawHeaders Headers needing to be parsed
 *
 * @returns {Object} Headers parsed into an object
 *//* ESM default export */const a=e=>{const t={};let r;let n;let a;e&&e.split("\n").forEach(function e(e){a=e.indexOf(":");r=e.substring(0,a).trim().toLowerCase();n=e.substring(a+1).trim();if(!r||t[r]&&i[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}});return t}},67594:function(e,t,r){"use strict";r.d(t,{Z:()=>n});function n(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},52955:function(e,t,r){"use strict";r.d(t,{Iz:()=>o,Mj:()=>u,sg:()=>s});/* ESM import */var n=r(65667);/* ESM import */var i=r(20225);/* ESM import */var a=r(6455);const o=(e,t,r=3)=>{let a=0;const o=(0,n/* ["default"] */.Z)(50,250);return(0,i/* ["default"] */.Z)(r=>{const n=r.loaded;const i=r.lengthComputable?r.total:undefined;const s=n-a;const u=o(s);const l=n<=i;a=n;const c={loaded:n,total:i,progress:i?n/i:undefined,bytes:s,rate:u?u:undefined,estimated:u&&i&&l?(i-n)/u:undefined,event:r,lengthComputable:i!=null,[t?"download":"upload"]:true};e(c)},r)};const s=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]};const u=e=>(...t)=>a/* ["default"].asap */.Z.asap(()=>e(...t))},35051:function(e,t,r){"use strict";r.d(t,{Z:()=>d});/* ESM import */var n=r(94090);/* ESM import */var i=r(6455);/* ESM import */var a=r(26822);/* ESM import */var o=r(39909);/* ESM import */var s=r(5139);/* ESM import */var u=r(30814);/* ESM import */var l=r(92716);/* ESM import */var c=r(7235);/* ESM default export */const d=e=>{const t=(0,u/* ["default"] */.Z)({},e);let{data:r,withXSRFToken:d,xsrfHeaderName:f,xsrfCookieName:p,headers:h,auth:v}=t;t.headers=h=l/* ["default"].from */.Z.from(h);t.url=(0,c/* ["default"] */.Z)((0,s/* ["default"] */.Z)(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);// HTTP basic authentication
if(v){h.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):"")))}let m;if(i/* ["default"].isFormData */.Z.isFormData(r)){if(n/* ["default"].hasStandardBrowserEnv */.Z.hasStandardBrowserEnv||n/* ["default"].hasStandardBrowserWebWorkerEnv */.Z.hasStandardBrowserWebWorkerEnv){h.setContentType(undefined);// Let the browser set it
}else if((m=h.getContentType())!==false){// fix semicolon duplication issue for ReactNative FormData implementation
const[e,...t]=m?m.split(";").map(e=>e.trim()).filter(Boolean):[];h.setContentType([e||"multipart/form-data",...t].join("; "))}}// Add xsrf header
// This is only done if running in a standard browser environment.
// Specifically not if we're in a web worker, or react-native.
if(n/* ["default"].hasStandardBrowserEnv */.Z.hasStandardBrowserEnv){d&&i/* ["default"].isFunction */.Z.isFunction(d)&&(d=d(t));if(d||d!==false&&(0,a/* ["default"] */.Z)(t.url)){// Add xsrf header
const e=f&&p&&o/* ["default"].read */.Z.read(p);if(e){h.set(f,e)}}}return t}},65667:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/**
 * Calculate data maxRate
 * @param {Number} [samplesCount= 10]
 * @param {Number} [min= 1000]
 * @returns {Function}
 */function n(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let a=0;let o;t=t!==undefined?t:1e3;return function s(s){const u=Date.now();const l=n[a];if(!o){o=u}r[i]=s;n[i]=u;let c=a;let d=0;while(c!==i){d+=r[c++];c=c%e}i=(i+1)%e;if(i===a){a=(a+1)%e}if(u-o<t){return}const f=l&&u-l;return f?Math.round(d*1e3/f):undefined}}/* ESM default export */const i=n},89641:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 *
 * @returns {Function}
 */function n(e){return function t(t){return e.apply(null,t)}}},20225:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/**
 * Throttle decorator
 * @param {Function} fn
 * @param {Number} freq
 * @return {Function}
 */function n(e,t){let r=0;let n=1e3/t;let i;let a;const o=(t,n=Date.now())=>{r=n;i=null;if(a){clearTimeout(a);a=null}e(...t)};const s=(...e)=>{const t=Date.now();const s=t-r;if(s>=n){o(e,t)}else{i=e;if(!a){a=setTimeout(()=>{a=null;o(i)},n-s)}}};const u=()=>i&&o(i);return[s,u]}/* ESM default export */const i=n},46617:function(e,t,r){"use strict";r.d(t,{Z:()=>f});/* ESM import */var n=r(6455);/* ESM import */var i=r(43046);/* ESM import */var a=r(11065);// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
/**
 * Determines if the given thing is a array or js object.
 *
 * @param {string} thing - The object or array to be visited.
 *
 * @returns {boolean}
 */function o(e){return n/* ["default"].isPlainObject */.Z.isPlainObject(e)||n/* ["default"].isArray */.Z.isArray(e)}/**
 * It removes the brackets from the end of a string
 *
 * @param {string} key - The key of the parameter.
 *
 * @returns {string} the key without the brackets.
 */function s(e){return n/* ["default"].endsWith */.Z.endsWith(e,"[]")?e.slice(0,-2):e}/**
 * It takes a path, a key, and a boolean, and returns a string
 *
 * @param {string} path - The path to the current key.
 * @param {string} key - The key of the current object being iterated over.
 * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
 *
 * @returns {string} The path to the current key.
 */function u(e,t,r){if(!e)return t;return e.concat(t).map(function e(e,t){// eslint-disable-next-line no-param-reassign
e=s(e);return!r&&t?"["+e+"]":e}).join(r?".":"")}/**
 * If the array is an array and none of its elements are visitable, then it's a flat array.
 *
 * @param {Array<any>} arr - The array to check
 *
 * @returns {boolean}
 */function l(e){return n/* ["default"].isArray */.Z.isArray(e)&&!e.some(o)}const c=n/* ["default"].toFlatObject */.Z.toFlatObject(n/* ["default"] */.Z,{},null,function e(e){return/^is[A-Z]/.test(e)});/**
 * Convert a data object to FormData
 *
 * @param {Object} obj
 * @param {?Object} [formData]
 * @param {?Object} [options]
 * @param {Function} [options.visitor]
 * @param {Boolean} [options.metaTokens = true]
 * @param {Boolean} [options.dots = false]
 * @param {?Boolean} [options.indexes = false]
 *
 * @returns {Object}
 **//**
 * It converts an object into a FormData object
 *
 * @param {Object<any, any>} obj - The object to convert to form data.
 * @param {string} formData - The FormData object to append to.
 * @param {Object<string, any>} options
 *
 * @returns
 */function d(e,t,r){if(!n/* ["default"].isObject */.Z.isObject(e)){throw new TypeError("target must be an object")}// eslint-disable-next-line no-param-reassign
t=t||new(a/* ["default"] */.Z||FormData);// eslint-disable-next-line no-param-reassign
r=n/* ["default"].toFlatObject */.Z.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,function e(e,t){// eslint-disable-next-line no-eq-null,eqeqeq
return!n/* ["default"].isUndefined */.Z.isUndefined(t[e])});const d=r.metaTokens;// eslint-disable-next-line no-use-before-define
const f=r.visitor||b;const p=r.dots;const h=r.indexes;const v=r.Blob||typeof Blob!=="undefined"&&Blob;const m=v&&n/* ["default"].isSpecCompliantForm */.Z.isSpecCompliantForm(t);if(!n/* ["default"].isFunction */.Z.isFunction(f)){throw new TypeError("visitor must be a function")}function g(e){if(e===null)return"";if(n/* ["default"].isDate */.Z.isDate(e)){return e.toISOString()}if(n/* ["default"].isBoolean */.Z.isBoolean(e)){return e.toString()}if(!m&&n/* ["default"].isBlob */.Z.isBlob(e)){throw new i/* ["default"] */.Z("Blob is not supported. Use a Buffer instead.")}if(n/* ["default"].isArrayBuffer */.Z.isArrayBuffer(e)||n/* ["default"].isTypedArray */.Z.isTypedArray(e)){return m&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}/**
   * Default visitor.
   *
   * @param {*} value
   * @param {String|Number} key
   * @param {Array<String|Number>} path
   * @this {FormData}
   *
   * @returns {boolean} return true to visit the each prop of the value recursively
   */function b(e,r,i){let a=e;if(e&&!i&&typeof e==="object"){if(n/* ["default"].endsWith */.Z.endsWith(r,"{}")){// eslint-disable-next-line no-param-reassign
r=d?r:r.slice(0,-2);// eslint-disable-next-line no-param-reassign
e=JSON.stringify(e)}else if(n/* ["default"].isArray */.Z.isArray(e)&&l(e)||(n/* ["default"].isFileList */.Z.isFileList(e)||n/* ["default"].endsWith */.Z.endsWith(r,"[]"))&&(a=n/* ["default"].toArray */.Z.toArray(e))){// eslint-disable-next-line no-param-reassign
r=s(r);a.forEach(function e(e,i){!(n/* ["default"].isUndefined */.Z.isUndefined(e)||e===null)&&t.append(// eslint-disable-next-line no-nested-ternary
h===true?u([r],i,p):h===null?r:r+"[]",g(e))});return false}}if(o(e)){return true}t.append(u(i,r,p),g(e));return false}const y=[];const _=Object.assign(c,{defaultVisitor:b,convertValue:g,isVisitable:o});function w(e,r){if(n/* ["default"].isUndefined */.Z.isUndefined(e))return;if(y.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}y.push(e);n/* ["default"].forEach */.Z.forEach(e,function e(e,i){const a=!(n/* ["default"].isUndefined */.Z.isUndefined(e)||e===null)&&f.call(t,e,n/* ["default"].isString */.Z.isString(i)?i.trim():i,r,_);if(a===true){w(e,r?r.concat(i):[i])}});y.pop()}if(!n/* ["default"].isObject */.Z.isObject(e)){throw new TypeError("data must be an object")}w(e);return t}/* ESM default export */const f=d},37292:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(6455);/* ESM import */var i=r(46617);/* ESM import */var a=r(94090);function o(e,t){return(0,i/* ["default"] */.Z)(e,new a/* ["default"].classes.URLSearchParams */.Z.classes.URLSearchParams,{visitor:function(e,t,r,i){if(a/* ["default"].isNode */.Z.isNode&&n/* ["default"].isBuffer */.Z.isBuffer(e)){this.append(t,e.toString("base64"));return false}return i.defaultVisitor.apply(this,arguments)},...t})}},47007:function(e,t,r){"use strict";r.d(t,{A6:()=>o});const n=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0;let i;while(n<r){i=n+t;yield e.slice(n,i);n=i}};const i=async function*(e,t){for await(const r of a(e)){yield*n(r,t)}};const a=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e){break}yield r}}finally{await t.cancel()}};const o=(e,t,r,n)=>{const a=i(e,t);let o=0;let s;let u=e=>{if(!s){s=true;n&&n(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await a.next();if(t){u();e.close();return}let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){u(e);throw e}},cancel(e){u(e);return a.return()}},{highWaterMark:2})}},11037:function(e,t,r){"use strict";r.d(t,{Z:()=>u});/* ESM import */var n=r(42277);/* ESM import */var i=r(43046);const a={};// eslint-disable-next-line func-names
["object","boolean","number","function","string","symbol"].forEach((e,t)=>{a[e]=function r(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const o={};/**
 * Transitional option validator
 *
 * @param {function|boolean?} validator - set to false if the transitional option has been removed
 * @param {string?} version - deprecated version / removed since version
 * @param {string?} message - some message with additional info
 *
 * @returns {function}
 */a.transitional=function e(e,t,r){function a(e,t){return"[Axios v"+n/* .VERSION */.q+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}// eslint-disable-next-line func-names
return(r,n,s)=>{if(e===false){throw new i/* ["default"] */.Z(a(n," has been removed"+(t?" in "+t:"")),i/* ["default"].ERR_DEPRECATED */.Z.ERR_DEPRECATED)}if(t&&!o[n]){o[n]=true;// eslint-disable-next-line no-console
console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))}return e?e(r,n,s):true}};a.spelling=function e(e){return(t,r)=>{// eslint-disable-next-line no-console
console.warn(`${r} is likely a misspelling of ${e}`);return true}};/**
 * Assert object's properties type
 *
 * @param {object} options
 * @param {object} schema
 * @param {boolean?} allowUnknown
 *
 * @returns {object}
 */function s(e,t,r){if(typeof e!=="object"){throw new i/* ["default"] */.Z("options must be an object",i/* ["default"].ERR_BAD_OPTION_VALUE */.Z.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let a=n.length;while(a-- >0){const o=n[a];const s=t[o];if(s){const t=e[o];const r=t===undefined||s(t,o,e);if(r!==true){throw new i/* ["default"] */.Z("option "+o+" must be "+r,i/* ["default"].ERR_BAD_OPTION_VALUE */.Z.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new i/* ["default"] */.Z("Unknown option "+o,i/* ["default"].ERR_BAD_OPTION */.Z.ERR_BAD_OPTION)}}}/* ESM default export */const u={assertOptions:s,validators:a}},54660:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/* ESM default export */const n=typeof Blob!=="undefined"?Blob:null},1197:function(e,t,r){"use strict";r.d(t,{Z:()=>n});/* ESM default export */const n=typeof FormData!=="undefined"?FormData:null},5899:function(e,t,r){"use strict";r.d(t,{Z:()=>i});/* ESM import */var n=r(86051);/* ESM default export */const i=typeof URLSearchParams!=="undefined"?URLSearchParams:n/* ["default"] */.Z},5255:function(e,t,r){"use strict";r.d(t,{Z:()=>o});/* ESM import */var n=r(5899);/* ESM import */var i=r(1197);/* ESM import */var a=r(54660);/* ESM default export */const o={isBrowser:true,classes:{URLSearchParams:n/* ["default"] */.Z,FormData:i/* ["default"] */.Z,Blob:a/* ["default"] */.Z},protocols:["http","https","file","blob","url","data"]}},64734:function(e,t,r){"use strict";r.r(t);r.d(t,{hasBrowserEnv:()=>n,hasStandardBrowserEnv:()=>a,hasStandardBrowserWebWorkerEnv:()=>o,navigator:()=>i,origin:()=>s});const n=typeof window!=="undefined"&&typeof document!=="undefined";const i=typeof navigator==="object"&&navigator||undefined;/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 *
 * @returns {boolean}
 */const a=n&&(!i||["ReactNative","NativeScript","NS"].indexOf(i.product)<0);/**
 * Determine if we're running in a standard browser webWorker environment
 *
 * Although the `isStandardBrowserEnv` method indicates that
 * `allows axios to run in a web worker`, the WebWorker will still be
 * filtered out due to its judgment standard
 * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
 * This leads to a problem when axios post `FormData` in webWorker
 */const o=(()=>{return typeof WorkerGlobalScope!=="undefined"&&// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();const s=n&&window.location.href||"http://localhost"},94090:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(5255);/* ESM import */var i=r(64734);/* ESM default export */const a={...i,...n/* ["default"] */.Z}},6455:function(e,t,r){"use strict";r.d(t,{Z:()=>ed});/* ESM import */var n=r(4876);// utils is a library of generic helper functions non-specific to axios
const{toString:i}=Object.prototype;const{getPrototypeOf:a}=Object;const{iterator:o,toStringTag:s}=Symbol;const u=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));const l=e=>{e=e.toLowerCase();return t=>u(t)===e};const c=e=>t=>typeof t===e;/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 *
 * @returns {boolean} True if value is an Array, otherwise false
 */const{isArray:d}=Array;/**
 * Determine if a value is undefined
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if the value is undefined, otherwise false
 */const f=c("undefined");/**
 * Determine if a value is a Buffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Buffer, otherwise false
 */function p(e){return e!==null&&!f(e)&&e.constructor!==null&&!f(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */const h=l("ArrayBuffer");/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */function v(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&h(e.buffer)}return t}/**
 * Determine if a value is a String
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a String, otherwise false
 */const m=c("string");/**
 * Determine if a value is a Function
 *
 * @param {*} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */const g=c("function");/**
 * Determine if a value is a Number
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Number, otherwise false
 */const b=c("number");/**
 * Determine if a value is an Object
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an Object, otherwise false
 */const y=e=>e!==null&&typeof e==="object";/**
 * Determine if a value is a Boolean
 *
 * @param {*} thing The value to test
 * @returns {boolean} True if value is a Boolean, otherwise false
 */const _=e=>e===true||e===false;/**
 * Determine if a value is a plain Object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a plain Object, otherwise false
 */const w=e=>{if(u(e)!=="object"){return false}const t=a(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(s in e)&&!(o in e)};/**
 * Determine if a value is an empty object (safely handles Buffers)
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is an empty object, otherwise false
 */const x=e=>{// Early return for non-objects or Buffers to prevent RangeError
if(!y(e)||p(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){// Fallback for any other objects that might cause RangeError with Object.keys()
return false}};/**
 * Determine if a value is a Date
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Date, otherwise false
 */const E=l("Date");/**
 * Determine if a value is a File
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */const Z=l("File");/**
 * Determine if a value is a Blob
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Blob, otherwise false
 */const S=l("Blob");/**
 * Determine if a value is a FileList
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a File, otherwise false
 */const O=l("FileList");/**
 * Determine if a value is a Stream
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a Stream, otherwise false
 */const k=e=>y(e)&&g(e.pipe);/**
 * Determine if a value is a FormData
 *
 * @param {*} thing The value to test
 *
 * @returns {boolean} True if value is an FormData, otherwise false
 */const T=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||g(e.append)&&((t=u(e))==="formdata"||// detect form-data instance
t==="object"&&g(e.toString)&&e.toString()==="[object FormData]"))};/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */const C=l("URLSearchParams");const[R,A,M,P]=["ReadableStream","Request","Response","Headers"].map(l);/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 *
 * @returns {String} The String freed of excess whitespace
 */const D=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 *
 * @param {Boolean} [allOwnKeys = false]
 * @returns {any}
 */function I(e,t,{allOwnKeys:r=false}={}){// Don't bother if no value provided
if(e===null||typeof e==="undefined"){return}let n;let i;// Force an array if not already something iterable
if(typeof e!=="object"){/*eslint no-param-reassign:0*/e=[e]}if(d(e)){// Iterate over array values
for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{// Buffer check
if(p(e)){return}// Iterate over object keys
const i=r?Object.getOwnPropertyNames(e):Object.keys(e);const a=i.length;let o;for(n=0;n<a;n++){o=i[n];t.call(null,e[o],o,e)}}}function L(e,t){if(p(e)){return null}t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}const F=(()=>{/*eslint no-undef:0*/if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const N=e=>!f(e)&&e!==F;/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 *
 * @returns {Object} Result of all merge properties
 */function j(){const{caseless:e}=N(this)&&this||{};const t={};const r=(r,n)=>{const i=e&&L(t,n)||n;if(w(t[i])&&w(r)){t[i]=j(t[i],r)}else if(w(r)){t[i]=j({},r)}else if(d(r)){t[i]=r.slice()}else{t[i]=r}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&I(arguments[e],r)}return t}/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 *
 * @param {Boolean} [allOwnKeys]
 * @returns {Object} The resulting value of object a
 */const B=(e,t,r,{allOwnKeys:i}={})=>{I(t,(t,i)=>{if(r&&g(t)){e[i]=(0,n/* ["default"] */.Z)(t,r)}else{e[i]=t}},{allOwnKeys:i});return e};/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 *
 * @returns {string} content value without BOM
 */const U=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};/**
 * Inherit the prototype methods from one constructor into another
 * @param {function} constructor
 * @param {function} superConstructor
 * @param {object} [props]
 * @param {object} [descriptors]
 *
 * @returns {void}
 */const W=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};/**
 * Resolve object with deep prototype chain to a flat object
 * @param {Object} sourceObj source object
 * @param {Object} [destObj]
 * @param {Function|Boolean} [filter]
 * @param {Function} [propFilter]
 *
 * @returns {Object}
 */const z=(e,t,r,n)=>{let i;let o;let s;const u={};t=t||{};// eslint-disable-next-line no-eq-null,eqeqeq
if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){s=i[o];if((!n||n(s,e,t))&&!u[s]){t[s]=e[s];u[s]=true}}e=r!==false&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t};/**
 * Determines whether a string ends with the characters of a specified string
 *
 * @param {String} str
 * @param {String} searchString
 * @param {Number} [position= 0]
 *
 * @returns {boolean}
 */const J=(e,t,r)=>{e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r};/**
 * Returns new array from array like object or null if failed
 *
 * @param {*} [thing]
 *
 * @returns {?Array}
 */const q=e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r};/**
 * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
 * thing passed in is an instance of Uint8Array
 *
 * @param {TypedArray}
 *
 * @returns {Array}
 */// eslint-disable-next-line func-names
const H=(e=>{// eslint-disable-next-line func-names
return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&a(Uint8Array));/**
 * For each entry in the object, call the function with the key and value.
 *
 * @param {Object<any, any>} obj - The object to iterate over.
 * @param {Function} fn - The function to call for each entry.
 *
 * @returns {void}
 */const V=(e,t)=>{const r=e&&e[o];const n=r.call(e);let i;while((i=n.next())&&!i.done){const r=i.value;t.call(e,r[0],r[1])}};/**
 * It takes a regular expression and a string, and returns an array of all the matches
 *
 * @param {string} regExp - The regular expression to match against.
 * @param {string} str - The string to search.
 *
 * @returns {Array<boolean>}
 */const $=(e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n};/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */const G=l("HTMLFormElement");const X=e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function e(e,t,r){return t.toUpperCase()+r})};/* Creating a function that will check if an object has a property. */const K=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);/**
 * Determine if a value is a RegExp object
 *
 * @param {*} val The value to test
 *
 * @returns {boolean} True if value is a RegExp object, otherwise false
 */const Q=l("RegExp");const Y=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};I(r,(r,i)=>{let a;if((a=t(r,i,e))!==false){n[i]=a||r}});Object.defineProperties(e,n)};/**
 * Makes all methods read-only
 * @param {Object} obj
 */const ee=e=>{Y(e,(t,r)=>{// skip restricted props in strict mode
if(g(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!g(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})};const et=(e,t)=>{const r={};const n=e=>{e.forEach(e=>{r[e]=true})};d(e)?n(e):n(String(e).split(t));return r};const er=()=>{};const en=(e,t)=>{return e!=null&&Number.isFinite(e=+e)?e:t};/**
 * If the thing is a FormData object, return true, otherwise return false.
 *
 * @param {unknown} thing - The thing to check.
 *
 * @returns {boolean}
 */function ei(e){return!!(e&&g(e.append)&&e[s]==="FormData"&&e[o])}const ea=e=>{const t=new Array(10);const r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0){return}//Buffer check
if(p(e)){return e}if(!("toJSON"in e)){t[n]=e;const i=d(e)?[]:{};I(e,(e,t)=>{const a=r(e,n+1);!f(a)&&(i[t]=a)});t[n]=undefined;return i}}return e};return r(e,0)};const eo=l("AsyncFunction");const es=e=>e&&(y(e)||g(e))&&g(e.then)&&g(e.catch);// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
const eu=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{F.addEventListener("message",({source:r,data:n})=>{if(r===F&&n===e){t.length&&t.shift()()}},false);return r=>{t.push(r);F.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",g(F.postMessage));const el=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(F):typeof process!=="undefined"&&process.nextTick||eu;// *********************
const ec=e=>e!=null&&g(e[o]);/* ESM default export */const ed={isArray:d,isArrayBuffer:h,isBuffer:p,isFormData:T,isArrayBufferView:v,isString:m,isNumber:b,isBoolean:_,isObject:y,isPlainObject:w,isEmptyObject:x,isReadableStream:R,isRequest:A,isResponse:M,isHeaders:P,isUndefined:f,isDate:E,isFile:Z,isBlob:S,isRegExp:Q,isFunction:g,isStream:k,isURLSearchParams:C,isTypedArray:H,isFileList:O,forEach:I,merge:j,extend:B,trim:D,stripBOM:U,inherits:W,toFlatObject:z,kindOf:u,kindOfTest:l,endsWith:J,toArray:q,forEachEntry:V,matchAll:$,isHTMLForm:G,hasOwnProperty:K,hasOwnProp:K,reduceDescriptors:Y,freezeMethods:ee,toObjectSet:et,toCamelCase:X,noop:er,toFiniteNumber:en,findKey:L,global:F,isContextDefined:N,isSpecCompliantForm:ei,toJSONObject:ea,isAsyncFn:eo,isThenable:es,setImmediate:eu,asap:el,isIterable:ec}},18241:function(e,t,r){"use strict";r.d(t,{Uy:()=>en});// src/utils/env.ts
var n=Symbol.for("immer-nothing");var i=Symbol.for("immer-draftable");var a=Symbol.for("immer-state");// src/utils/errors.ts
var o=false?0:[];function s(e,...t){if(false){}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}// src/utils/common.ts
var u=Object.getPrototypeOf;function l(e){return!!e&&!!e[a]}function c(e){if(!e)return false;return f(e)||Array.isArray(e)||!!e[i]||!!e.constructor?.[i]||_(e)||w(e)}var d=Object.prototype.constructor.toString();function f(e){if(!e||typeof e!=="object")return false;const t=u(e);if(t===null){return true}const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return true;return typeof r=="function"&&Function.toString.call(r)===d}function p(e){if(!l(e))s(15,e);return e[a].base_}function h(e,t){if(v(e)===0/* Object */){Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)})}else{e.forEach((r,n)=>t(n,r,e))}}function v(e){const t=e[a];return t?t.type_:Array.isArray(e)?1/* Array */:_(e)?2/* Map */:w(e)?3/* Set */:0/* Object */}function m(e,t){return v(e)===2/* Map */?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g(e,t){return v(e)===2/* Map */?e.get(t):e[t]}function b(e,t,r){const n=v(e);if(n===2/* Map */)e.set(t,r);else if(n===3/* Set */){e.add(r)}else e[t]=r}function y(e,t){if(e===t){return e!==0||1/e===1/t}else{return e!==e&&t!==t}}function _(e){return e instanceof Map}function w(e){return e instanceof Set}function x(e){return e.copy_||e.base_}function E(e,t){if(_(e)){return new Map(e)}if(w(e)){return new Set(e)}if(Array.isArray(e))return Array.prototype.slice.call(e);const r=f(e);if(t===true||t==="class_only"&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n];const a=t[i];if(a.writable===false){a.writable=true;a.configurable=true}if(a.get||a.set)t[i]={configurable:true,writable:true,// could live with !!desc.set as well here...
enumerable:a.enumerable,value:e[i]}}return Object.create(u(e),t)}else{const t=u(e);if(t!==null&&r){return{...e}}const n=Object.create(t);return Object.assign(n,e)}}function Z(e,t=false){if(O(e)||l(e)||!c(e))return e;if(v(e)>1){e.set=e.add=e.clear=e.delete=S}Object.freeze(e);if(t)Object.entries(e).forEach(([e,t])=>Z(t,true));return e}function S(){s(2)}function O(e){return Object.isFrozen(e)}// src/utils/plugins.ts
var k={};function T(e){const t=k[e];if(!t){s(0,e)}return t}function C(e,t){if(!k[e])k[e]=t}// src/core/scope.ts
var R;function A(){return R}function M(e,t){return{drafts_:[],parent_:e,immer_:t,// Whenever the modified draft contains a draft from another scope, we
// need to prevent auto-freezing so the unowned draft can be finalized.
canAutoFreeze_:true,unfinalizedDrafts_:0}}function P(e,t){if(t){T("Patches");e.patches_=[];e.inversePatches_=[];e.patchListener_=t}}function D(e){I(e);e.drafts_.forEach(F);e.drafts_=null}function I(e){if(e===R){R=e.parent_}}function L(e){return R=M(R,e)}function F(e){const t=e[a];if(t.type_===0/* Object */||t.type_===1/* Array */)t.revoke_();else t.revoked_=true}// src/core/finalize.ts
function N(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];const i=e!==void 0&&e!==r;if(i){if(r[a].modified_){D(t);s(4)}if(c(e)){e=j(t,e);if(!t.parent_)U(t,e)}if(t.patches_){T("Patches").generateReplacementPatches_(r[a].base_,e,t.patches_,t.inversePatches_)}}else{e=j(t,r,[])}D(t);if(t.patches_){t.patchListener_(t.patches_,t.inversePatches_)}return e!==n?e:void 0}function j(e,t,r){if(O(t))return t;const n=t[a];if(!n){h(t,(i,a)=>B(e,n,t,i,a,r));return t}if(n.scope_!==e)return t;if(!n.modified_){U(e,n.base_,true);return n.base_}if(!n.finalized_){n.finalized_=true;n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t;let a=false;if(n.type_===3/* Set */){i=new Set(t);t.clear();a=true}h(i,(i,o)=>B(e,n,t,i,o,r,a));U(e,t,false);if(r&&e.patches_){T("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}}return n.copy_}function B(e,t,r,n,i,a,o){if(false){}if(l(i)){const o=a&&t&&t.type_!==3/* Set */&&// Set objects are atomic since they have no keys.
!m(t.assigned_,n)?a.concat(n):void 0;const s=j(e,i,o);b(r,n,s);if(l(s)){e.canAutoFreeze_=false}else return}else if(o){r.add(i)}if(c(i)&&!O(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1){return}j(e,i);if((!t||!t.scope_.parent_)&&typeof n!=="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n))U(e,i)}}function U(e,t,r=false){if(!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_){Z(t,r)}}// src/core/proxy.ts
function W(e,t){const r=Array.isArray(e);const n={type_:r?1/* Array */:0/* Object */,// Track which produce call this is associated with.
scope_:t?t.scope_:A(),// True for both shallow and deep changes.
modified_:false,// Used during finalization.
finalized_:false,// Track which properties have been assigned (true) or deleted (false).
assigned_:{},// The parent draft state.
parent_:t,// The base state.
base_:e,// The base proxy.
draft_:null,// set below
// The base copy with any updated values.
copy_:null,// Called by the `produce` function.
revoke_:null,isManual_:false};let i=n;let a=z;if(r){i=[n];a=J}const{revoke:o,proxy:s}=Proxy.revocable(i,a);n.draft_=s;n.revoke_=o;return s}var z={get(e,t){if(t===a)return e;const r=x(e);if(!m(r,t)){return H(e,r,t)}const n=r[t];if(e.finalized_||!c(n)){return n}if(n===q(e.base_,t)){G(e);return e.copy_[t]=K(n,e)}return n},has(e,t){return t in x(e)},ownKeys(e){return Reflect.ownKeys(x(e))},set(e,t,r){const n=V(x(e),t);if(n?.set){n.set.call(e.draft_,r);return true}if(!e.modified_){const n=q(x(e),t);const i=n?.[a];if(i&&i.base_===r){e.copy_[t]=r;e.assigned_[t]=false;return true}if(y(r,n)&&(r!==void 0||m(e.base_,t)))return true;G(e);$(e)}if(e.copy_[t]===r&&// special case: handle new props with value 'undefined'
(r!==void 0||t in e.copy_)||// special case: NaN
Number.isNaN(r)&&Number.isNaN(e.copy_[t]))return true;e.copy_[t]=r;e.assigned_[t]=true;return true},deleteProperty(e,t){if(q(e.base_,t)!==void 0||t in e.base_){e.assigned_[t]=false;G(e);$(e)}else{delete e.assigned_[t]}if(e.copy_){delete e.copy_[t]}return true},// Note: We never coerce `desc.value` into an Immer draft, because we can't make
// the same guarantee in ES5 mode.
getOwnPropertyDescriptor(e,t){const r=x(e);const n=Reflect.getOwnPropertyDescriptor(r,t);if(!n)return n;return{writable:true,configurable:e.type_!==1/* Array */||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){s(11)},getPrototypeOf(e){return u(e.base_)},setPrototypeOf(){s(12)}};var J={};h(z,(e,t)=>{J[e]=function(){arguments[0]=arguments[0][0];return t.apply(this,arguments)}});J.deleteProperty=function(e,t){if(false){}return J.set.call(this,e,t,void 0)};J.set=function(e,t,r){if(false){}return z.set.call(this,e[0],t,r,e[0])};function q(e,t){const r=e[a];const n=r?x(r):e;return n[t]}function H(e,t,r){const n=V(t,r);return n?`value`in n?n.value:// This is a very special case, if the prop is a getter defined by the
// prototype, we should invoke it with the draft as context!
n.get?.call(e.draft_):void 0}function V(e,t){if(!(t in e))return void 0;let r=u(e);while(r){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=u(r)}return void 0}function $(e){if(!e.modified_){e.modified_=true;if(e.parent_){$(e.parent_)}}}function G(e){if(!e.copy_){e.copy_=E(e.base_,e.scope_.immer_.useStrictShallowCopy_)}}// src/core/immerClass.ts
var X=class{constructor(e){this.autoFreeze_=true;this.useStrictShallowCopy_=false;/**
     * The `produce` function takes a value and a "recipe function" (whose
     * return value often depends on the base state). The recipe function is
     * free to mutate its first argument however it wants. All mutations are
     * only ever applied to a __copy__ of the base state.
     *
     * Pass only a function to create a "curried producer" which relieves you
     * from passing the recipe function every time.
     *
     * Only plain objects and arrays are made mutable. All other objects are
     * considered uncopyable.
     *
     * Note: This function is __bound__ to its `Immer` instance.
     *
     * @param {any} base - the initial state
     * @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified
     * @param {Function} patchListener - optional function that will be called with all the patches produced here
     * @returns {any} a new state, or the initial state if nothing was modified
     */this.produce=(e,t,r)=>{if(typeof e==="function"&&typeof t!=="function"){const r=t;t=e;const n=this;return function e(i=r,...a){return n.produce(i,e=>t.call(this,e,...a))}}if(typeof t!=="function")s(6);if(r!==void 0&&typeof r!=="function")s(7);let i;if(c(e)){const n=L(this);const a=K(e,void 0);let o=true;try{i=t(a);o=false}finally{if(o)D(n);else I(n)}P(n,r);return N(i,n)}else if(!e||typeof e!=="object"){i=t(e);if(i===void 0)i=e;if(i===n)i=void 0;if(this.autoFreeze_)Z(i,true);if(r){const t=[];const n=[];T("Patches").generateReplacementPatches_(e,i,t,n);r(t,n)}return i}else s(1,e)};this.produceWithPatches=(e,t)=>{if(typeof e==="function"){return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r))}let r,n;const i=this.produce(e,t,(e,t)=>{r=e;n=t});return[i,r,n]};if(typeof e?.autoFreeze==="boolean")this.setAutoFreeze(e.autoFreeze);if(typeof e?.useStrictShallowCopy==="boolean")this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){if(!c(e))s(8);if(l(e))e=Q(e);const t=L(this);const r=K(e,void 0);r[a].isManual_=true;I(t);return r}finishDraft(e,t){const r=e&&e[a];if(!r||!r.isManual_)s(9);const{scope_:n}=r;P(n,t);return N(void 0,n)}/**
   * Pass true to automatically freeze all copies created by Immer.
   *
   * By default, auto-freezing is enabled.
   */setAutoFreeze(e){this.autoFreeze_=e}/**
   * Pass true to enable strict shallow copy.
   *
   * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
   */setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}if(r>-1){t=t.slice(r+1)}const n=T("Patches").applyPatches_;if(l(e)){return n(e,t)}return this.produce(e,e=>n(e,t))}};function K(e,t){const r=_(e)?T("MapSet").proxyMap_(e,t):w(e)?T("MapSet").proxySet_(e,t):W(e,t);const n=t?t.scope_:A();n.drafts_.push(r);return r}// src/core/current.ts
function Q(e){if(!l(e))s(10,e);return Y(e)}function Y(e){if(!c(e)||O(e))return e;const t=e[a];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=true;r=E(e,t.scope_.immer_.useStrictShallowCopy_)}else{r=E(e,true)}h(r,(e,t)=>{b(r,e,Y(t))});if(t){t.finalized_=false}return r}// src/plugins/patches.ts
function ee(){const e=16;if(false){}const t="replace";const r="add";const a="remove";function o(e,t,r,n){switch(e.type_){case 0/* Object */:case 2/* Map */:return f(e,t,r,n);case 1/* Array */:return d(e,t,r,n);case 3/* Set */:return p(e,t,r,n)}}function d(e,n,i,o){let{base_:s,assigned_:u}=e;let l=e.copy_;if(l.length<s.length){;[s,l]=[l,s];[i,o]=[o,i]}for(let e=0;e<s.length;e++){if(u[e]&&l[e]!==s[e]){const r=n.concat([e]);i.push({op:t,path:r,// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value:E(l[e])});o.push({op:t,path:r,value:E(s[e])})}}for(let e=s.length;e<l.length;e++){const t=n.concat([e]);i.push({op:r,path:t,// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value:E(l[e])})}for(let e=l.length-1;s.length<=e;--e){const t=n.concat([e]);o.push({op:a,path:t})}}function f(e,n,i,o){const{base_:s,copy_:u}=e;h(e.assigned_,(e,l)=>{const c=g(s,e);const d=g(u,e);const f=!l?a:m(s,e)?t:r;if(c===d&&f===t)return;const p=n.concat(e);i.push(f===a?{op:f,path:p}:{op:f,path:p,value:d});o.push(f===r?{op:a,path:p}:f===a?{op:r,path:p,value:E(c)}:{op:t,path:p,value:E(c)})})}function p(e,t,n,i){let{base_:o,copy_:s}=e;let u=0;o.forEach(e=>{if(!s.has(e)){const o=t.concat([u]);n.push({op:a,path:o,value:e});i.unshift({op:r,path:o,value:e})}u++});u=0;s.forEach(e=>{if(!o.has(e)){const o=t.concat([u]);n.push({op:r,path:o,value:e});i.unshift({op:a,path:o,value:e})}u++})}function b(e,r,i,a){i.push({op:t,path:[],value:r===n?void 0:r});a.push({op:t,path:[],value:e})}function y(n,i){i.forEach(i=>{const{path:o,op:u}=i;let l=n;for(let t=0;t<o.length-1;t++){const r=v(l);let n=o[t];if(typeof n!=="string"&&typeof n!=="number"){n=""+n}if((r===0/* Object */||r===1/* Array */)&&(n==="__proto__"||n==="constructor"))s(e+3);if(typeof l==="function"&&n==="prototype")s(e+3);l=g(l,n);if(typeof l!=="object")s(e+2,o.join("/"))}const c=v(l);const d=x(i.value);const f=o[o.length-1];switch(u){case t:switch(c){case 2/* Map */:return l.set(f,d);case 3/* Set */:s(e);default:return l[f]=d}case r:switch(c){case 1/* Array */:return f==="-"?l.push(d):l.splice(f,0,d);case 2/* Map */:return l.set(f,d);case 3/* Set */:return l.add(d);default:return l[f]=d}case a:switch(c){case 1/* Array */:return l.splice(f,1);case 2/* Map */:return l.delete(f);case 3/* Set */:return l.delete(i.value);default:return delete l[f]}default:s(e+1,u)}});return n}function x(e){if(!c(e))return e;if(Array.isArray(e))return e.map(x);if(_(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,x(t)]));if(w(e))return new Set(Array.from(e).map(x));const t=Object.create(u(e));for(const r in e)t[r]=x(e[r]);if(m(e,i))t[i]=e[i];return t}function E(e){if(l(e)){return x(e)}else return e}C("Patches",{applyPatches_:y,generatePatches_:o,generateReplacementPatches_:b})}// src/plugins/mapset.ts
function et(){class e extends Map{constructor(e,t){super();this[a]={type_:2/* Map */,parent_:t,scope_:t?t.scope_:A(),modified_:false,finalized_:false,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:false,revoked_:false}}get size(){return x(this[a]).size}has(e){return x(this[a]).has(e)}set(e,t){const n=this[a];u(n);if(!x(n).has(e)||x(n).get(e)!==t){r(n);$(n);n.assigned_.set(e,true);n.copy_.set(e,t);n.assigned_.set(e,true)}return this}delete(e){if(!this.has(e)){return false}const t=this[a];u(t);r(t);$(t);if(t.base_.has(e)){t.assigned_.set(e,false)}else{t.assigned_.delete(e)}t.copy_.delete(e);return true}clear(){const e=this[a];u(e);if(x(e).size){r(e);$(e);e.assigned_=/* @__PURE__ */new Map;h(e.base_,t=>{e.assigned_.set(t,false)});e.copy_.clear()}}forEach(e,t){const r=this[a];x(r).forEach((r,n,i)=>{e.call(t,this.get(n),n,this)})}get(e){const t=this[a];u(t);const n=x(t).get(e);if(t.finalized_||!c(n)){return n}if(n!==t.base_.get(e)){return n}const i=K(n,t);r(t);t.copy_.set(e,i);return i}keys(){return x(this[a]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();if(t.done)return t;const r=this.get(t.value);return{done:false,value:r}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const r=this.get(t.value);return{done:false,value:[t.value,r]}}}}[(a,Symbol.iterator)](){return this.entries()}}function t(t,r){return new e(t,r)}function r(e){if(!e.copy_){e.assigned_=/* @__PURE__ */new Map;e.copy_=new Map(e.base_)}}class n extends Set{constructor(e,t){super();this[a]={type_:3/* Set */,parent_:t,scope_:t?t.scope_:A(),modified_:false,finalized_:false,copy_:void 0,base_:e,draft_:this,drafts_:/* @__PURE__ */new Map,revoked_:false,isManual_:false}}get size(){return x(this[a]).size}has(e){const t=this[a];u(t);if(!t.copy_){return t.base_.has(e)}if(t.copy_.has(e))return true;if(t.drafts_.has(e)&&t.copy_.has(t.drafts_.get(e)))return true;return false}add(e){const t=this[a];u(t);if(!this.has(e)){o(t);$(t);t.copy_.add(e)}return this}delete(e){if(!this.has(e)){return false}const t=this[a];u(t);o(t);$(t);return t.copy_.delete(e)||(t.drafts_.has(e)?t.copy_.delete(t.drafts_.get(e)):/* istanbul ignore next */false)}clear(){const e=this[a];u(e);if(x(e).size){o(e);$(e);e.copy_.clear()}}values(){const e=this[a];u(e);o(e);return e.copy_.values()}entries(){const e=this[a];u(e);o(e);return e.copy_.entries()}keys(){return this.values()}[(a,Symbol.iterator)](){return this.values()}forEach(e,t){const r=this.values();let n=r.next();while(!n.done){e.call(t,n.value,n.value,this);n=r.next()}}}function i(e,t){return new n(e,t)}function o(e){if(!e.copy_){e.copy_=/* @__PURE__ */new Set;e.base_.forEach(t=>{if(c(t)){const r=K(t,e);e.drafts_.set(t,r);e.copy_.add(r)}else{e.copy_.add(t)}})}}function u(e){if(e.revoked_)s(3,JSON.stringify(x(e)))}C("MapSet",{proxyMap_:t,proxySet_:i})}// src/immer.ts
var er=new X;var en=er.produce;var ei=er.produceWithPatches.bind(er);var ea=er.setAutoFreeze.bind(er);var eo=er.setUseStrictShallowCopy.bind(er);var es=er.applyPatches.bind(er);var eu=er.createDraft.bind(er);var el=er.finishDraft.bind(er);function ec(e){return e}function ed(e){return e}//# sourceMappingURL=immer.mjs.map
},52293:function(e,t,r){"use strict";r.d(t,{Dq:()=>eJ,Gc:()=>O,Qr:()=>F,RV:()=>k,cI:()=>eq,qo:()=>I});/* ESM import */var n=r(87363);var i=e=>e.type==="checkbox";var a=e=>e instanceof Date;var o=e=>e==null;const s=e=>typeof e==="object";var u=e=>!o(e)&&!Array.isArray(e)&&s(e)&&!a(e);var l=e=>u(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e;var c=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e;var d=(e,t)=>e.has(c(t));var f=e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")};var p=typeof window!=="undefined"&&typeof window.HTMLElement!=="undefined"&&typeof document!=="undefined";function h(e){let t;const r=Array.isArray(e);const n=typeof FileList!=="undefined"?e instanceof FileList:false;if(e instanceof Date){t=new Date(e)}else if(!(p&&(e instanceof Blob||n))&&(r||u(e))){t=r?[]:Object.create(Object.getPrototypeOf(e));if(!r&&!f(e)){t=e}else{for(const r in e){if(e.hasOwnProperty(r)){t[r]=h(e[r])}}}}else{return e}return t}var v=e=>/^\w*$/.test(e);var m=e=>e===undefined;var g=e=>Array.isArray(e)?e.filter(Boolean):[];var b=e=>g(e.replace(/["|']|\]/g,"").split(/\.|\[/));var y=(e,t,r)=>{if(!t||!u(e)){return r}const n=(v(t)?[t]:b(t)).reduce((e,t)=>o(e)?e:e[t],e);return m(n)||n===e?m(e[t])?r:e[t]:n};var _=e=>typeof e==="boolean";var w=(e,t,r)=>{let n=-1;const i=v(t)?[t]:b(t);const a=i.length;const o=a-1;while(++n<a){const t=i[n];let a=r;if(n!==o){const r=e[t];a=u(r)||Array.isArray(r)?r:!isNaN(+i[n+1])?[]:{}}if(t==="__proto__"||t==="constructor"||t==="prototype"){return}e[t]=a;e=e[t]}};const x={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"};const E={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};const Z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};const S=n.createContext(null);S.displayName="HookFormContext";/**
 * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
 *
 * @returns return all useForm methods
 *
 * @example
 * ```tsx
 * function App() {
 *   const methods = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   return (
 *     <FormProvider {...methods} >
 *       <form onSubmit={methods.handleSubmit(onSubmit)}>
 *         <NestedInput />
 *         <input type="submit" />
 *       </form>
 *     </FormProvider>
 *   );
 * }
 *
 *  function NestedInput() {
 *   const { register } = useFormContext(); // retrieve all hook methods
 *   return <input {...register("test")} />;
 * }
 * ```
 */const O=()=>n.useContext(S);/**
 * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
 *
 * @param props - all useForm methods
 *
 * @example
 * ```tsx
 * function App() {
 *   const methods = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   return (
 *     <FormProvider {...methods} >
 *       <form onSubmit={methods.handleSubmit(onSubmit)}>
 *         <NestedInput />
 *         <input type="submit" />
 *       </form>
 *     </FormProvider>
 *   );
 * }
 *
 *  function NestedInput() {
 *   const { register } = useFormContext(); // retrieve all hook methods
 *   return <input {...register("test")} />;
 * }
 * ```
 */const k=e=>{const{children:t,...r}=e;return n.createElement(S.Provider,{value:r},t)};var T=(e,t,r,n=true)=>{const i={defaultValues:t._defaultValues};for(const a in e){Object.defineProperty(i,a,{get:()=>{const i=a;if(t._proxyFormState[i]!==E.all){t._proxyFormState[i]=!n||E.all}r&&(r[i]=true);return e[i]}})}return i};const C=typeof window!=="undefined"?n.useLayoutEffect:n.useEffect;/**
 * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)
 *
 * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, handleSubmit, control } = useForm({
 *     defaultValues: {
 *     firstName: "firstName"
 *   }});
 *   const { dirtyFields } = useFormState({
 *     control
 *   });
 *   const onSubmit = (data) => console.log(data);
 *
 *   return (
 *     <form onSubmit={handleSubmit(onSubmit)}>
 *       <input {...register("firstName")} placeholder="First Name" />
 *       {dirtyFields.firstName && <p>Field is dirty.</p>}
 *       <input type="submit" />
 *     </form>
 *   );
 * }
 * ```
 */function R(e){const t=O();const{control:r=t.control,disabled:i,name:a,exact:o}=e||{};const[s,u]=n.useState(r._formState);const l=n.useRef({isDirty:false,isLoading:false,dirtyFields:false,touchedFields:false,validatingFields:false,isValidating:false,isValid:false,errors:false});C(()=>r._subscribe({name:a,formState:l.current,exact:o,callback:e=>{!i&&u({...r._formState,...e})}}),[a,i,o]);n.useEffect(()=>{l.current.isValid&&r._setValid(true)},[r]);return n.useMemo(()=>T(s,r,l.current,false),[s,r])}var A=e=>typeof e==="string";var M=(e,t,r,n,i)=>{if(A(e)){n&&t.watch.add(e);return y(r,e,i)}if(Array.isArray(e)){return e.map(e=>(n&&t.watch.add(e),y(r,e)))}n&&(t.watchAll=true);return r};var P=e=>o(e)||!s(e);function D(e,t,r=new WeakSet){if(P(e)||P(t)){return e===t}if(a(e)&&a(t)){return e.getTime()===t.getTime()}const n=Object.keys(e);const i=Object.keys(t);if(n.length!==i.length){return false}if(r.has(e)||r.has(t)){return true}r.add(e);r.add(t);for(const o of n){const n=e[o];if(!i.includes(o)){return false}if(o!=="ref"){const e=t[o];if(a(n)&&a(e)||u(n)&&u(e)||Array.isArray(n)&&Array.isArray(e)?!D(n,e,r):n!==e){return false}}}return true}/**
 * Custom hook to subscribe to field change and isolate re-rendering at the component level.
 *
 * @remarks
 *
 * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
 *
 * @example
 * ```tsx
 * const { control } = useForm();
 * const values = useWatch({
 *   name: "fieldName"
 *   control,
 * })
 * ```
 */function I(e){const t=O();const{control:r=t.control,name:i,defaultValue:a,disabled:o,exact:s,compute:u}=e||{};const l=n.useRef(a);const c=n.useRef(u);const d=n.useRef(undefined);c.current=u;const f=n.useMemo(()=>r._getWatch(i,l.current),[r,i]);const[p,h]=n.useState(c.current?c.current(f):f);C(()=>r._subscribe({name:i,formState:{values:true},exact:s,callback:e=>{if(!o){const t=M(i,r._names,e.values||r._formValues,false,l.current);if(c.current){const e=c.current(t);if(!D(e,d.current)){h(e);d.current=e}}else{h(t)}}}}),[r,o,i,s]);n.useEffect(()=>r._removeUnmounted());return p}/**
 * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)
 *
 * @param props - the path name to the form field value, and validation rules.
 *
 * @returns field properties, field and form state. {@link UseControllerReturn}
 *
 * @example
 * ```tsx
 * function Input(props) {
 *   const { field, fieldState, formState } = useController(props);
 *   return (
 *     <div>
 *       <input {...field} placeholder={props.name} />
 *       <p>{fieldState.isTouched && "Touched"}</p>
 *       <p>{formState.isSubmitted ? "submitted" : ""}</p>
 *     </div>
 *   );
 * }
 * ```
 */function L(e){const t=O();const{name:r,disabled:i,control:a=t.control,shouldUnregister:o,defaultValue:s}=e;const u=d(a._names.array,r);const c=n.useMemo(()=>y(a._formValues,r,y(a._defaultValues,r,s)),[a,r,s]);const f=I({control:a,name:r,defaultValue:c,exact:true});const p=R({control:a,name:r,exact:true});const v=n.useRef(e);const g=n.useRef(a.register(r,{...e.rules,value:f,..._(e.disabled)?{disabled:e.disabled}:{}}));v.current=e;const b=n.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:true,get:()=>!!y(p.errors,r)},isDirty:{enumerable:true,get:()=>!!y(p.dirtyFields,r)},isTouched:{enumerable:true,get:()=>!!y(p.touchedFields,r)},isValidating:{enumerable:true,get:()=>!!y(p.validatingFields,r)},error:{enumerable:true,get:()=>y(p.errors,r)}}),[p,r]);const E=n.useCallback(e=>g.current.onChange({target:{value:l(e),name:r},type:x.CHANGE}),[r]);const Z=n.useCallback(()=>g.current.onBlur({target:{value:y(a._formValues,r),name:r},type:x.BLUR}),[r,a._formValues]);const S=n.useCallback(e=>{const t=y(a._fields,r);if(t&&e){t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()}}},[a._fields,r]);const k=n.useMemo(()=>({name:r,value:f,..._(i)||p.disabled?{disabled:p.disabled||i}:{},onChange:E,onBlur:Z,ref:S}),[r,i,p.disabled,E,Z,S,f]);n.useEffect(()=>{const e=a._options.shouldUnregister||o;a.register(r,{...v.current.rules,..._(v.current.disabled)?{disabled:v.current.disabled}:{}});const t=(e,t)=>{const r=y(a._fields,e);if(r&&r._f){r._f.mount=t}};t(r,true);if(e){const e=h(y(a._options.defaultValues,r));w(a._defaultValues,r,e);if(m(y(a._formValues,r))){w(a._formValues,r,e)}}!u&&a.register(r);return()=>{(u?e&&!a._state.action:e)?a.unregister(r):t(r,false)}},[r,a,u,o]);n.useEffect(()=>{a._setDisabledField({disabled:i,name:r})},[i,r,a]);return n.useMemo(()=>({field:k,formState:p,fieldState:b}),[k,p,b])}/**
 * Component based on `useController` hook to work with controlled component.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)
 *
 * @param props - the path name to the form field value, and validation rules.
 *
 * @returns provide field handler functions, field and form state.
 *
 * @example
 * ```tsx
 * function App() {
 *   const { control } = useForm<FormValues>({
 *     defaultValues: {
 *       test: ""
 *     }
 *   });
 *
 *   return (
 *     <form>
 *       <Controller
 *         control={control}
 *         name="test"
 *         render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (
 *           <>
 *             <input
 *               onChange={onChange} // send value to hook form
 *               onBlur={onBlur} // notify when input is touched
 *               value={value} // return updated value
 *               ref={ref} // set ref for focus management
 *             />
 *             <p>{formState.isSubmitted ? "submitted" : ""}</p>
 *             <p>{fieldState.isTouched ? "touched" : ""}</p>
 *           </>
 *         )}
 *       />
 *     </form>
 *   );
 * }
 * ```
 */const F=e=>e.render(L(e));const N=e=>{const t={};for(const r of Object.keys(e)){if(s(e[r])&&e[r]!==null){const n=N(e[r]);for(const e of Object.keys(n)){t[`${r}.${e}`]=n[e]}}else{t[r]=e[r]}}return t};const j="post";/**
 * Form component to manage submission.
 *
 * @param props - to setup submission detail. {@link FormProps}
 *
 * @returns form component or headless render prop.
 *
 * @example
 * ```tsx
 * function App() {
 *   const { control, formState: { errors } } = useForm();
 *
 *   return (
 *     <Form action="/api" control={control}>
 *       <input {...register("name")} />
 *       <p>{errors?.root?.server && 'Server error'}</p>
 *       <button>Submit</button>
 *     </Form>
 *   );
 * }
 * ```
 */function B(e){const t=O();const[r,n]=React.useState(false);const{control:i=t.control,onSubmit:a,children:o,action:s,method:u=j,headers:l,encType:c,onError:d,render:f,onSuccess:p,validateStatus:h,...v}=e;const m=async t=>{let r=false;let n="";await i.handleSubmit(async e=>{const o=new FormData;let f="";try{f=JSON.stringify(e)}catch(e){}const v=N(i._formValues);for(const e in v){o.append(e,v[e])}if(a){await a({data:e,event:t,method:u,formData:o,formDataJson:f})}if(s){try{const e=[l&&l["Content-Type"],c].some(e=>e&&e.includes("json"));const t=await fetch(String(s),{method:u,headers:{...l,...c&&c!=="multipart/form-data"?{"Content-Type":c}:{}},body:e?f:o});if(t&&(h?!h(t.status):t.status<200||t.status>=300)){r=true;d&&d({response:t});n=String(t.status)}else{p&&p({response:t})}}catch(e){r=true;d&&d({error:e})}}})(t);if(r&&e.control){e.control._subjects.state.next({isSubmitSuccessful:false});e.control.setError("root.server",{type:n})}};React.useEffect(()=>{n(true)},[]);return f?React.createElement(React.Fragment,null,f({submit:m})):React.createElement("form",{noValidate:r,action:s,method:u,encType:c,onSubmit:m,...v},o)}var U=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||true}}:{};var W=e=>Array.isArray(e)?e:[e];var z=()=>{let e=[];const t=t=>{for(const r of e){r.next&&r.next(t)}};const r=t=>{e.push(t);return{unsubscribe:()=>{e=e.filter(e=>e!==t)}}};const n=()=>{e=[]};return{get observers(){return e},next:t,subscribe:r,unsubscribe:n}};var J=e=>u(e)&&!Object.keys(e).length;var q=e=>e.type==="file";var H=e=>typeof e==="function";var V=e=>{if(!p){return false}const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)};var $=e=>e.type===`select-multiple`;var G=e=>e.type==="radio";var X=e=>G(e)||i(e);var K=e=>V(e)&&e.isConnected;function Q(e,t){const r=t.slice(0,-1).length;let n=0;while(n<r){e=m(e)?n++:e[t[n++]]}return e}function Y(e){for(const t in e){if(e.hasOwnProperty(t)&&!m(e[t])){return false}}return true}function ee(e,t){const r=Array.isArray(t)?t:v(t)?[t]:b(t);const n=r.length===1?e:Q(e,r);const i=r.length-1;const a=r[i];if(n){delete n[a]}if(i!==0&&(u(n)&&J(n)||Array.isArray(n)&&Y(n))){ee(e,r.slice(0,-1))}return e}var et=e=>{for(const t in e){if(H(e[t])){return true}}return false};function er(e,t={}){const r=Array.isArray(e);if(u(e)||r){for(const r in e){if(Array.isArray(e[r])||u(e[r])&&!et(e[r])){t[r]=Array.isArray(e[r])?[]:{};er(e[r],t[r])}else if(!o(e[r])){t[r]=true}}}return t}function en(e,t,r){const n=Array.isArray(e);if(u(e)||n){for(const n in e){if(Array.isArray(e[n])||u(e[n])&&!et(e[n])){if(m(t)||P(r[n])){r[n]=Array.isArray(e[n])?er(e[n],[]):{...er(e[n])}}else{en(e[n],o(t)?{}:t[n],r[n])}}else{r[n]=!D(e[n],t[n])}}}return r}var ei=(e,t)=>en(e,t,er(t));const ea={value:false,isValid:false};const eo={value:true,isValid:true};var es=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||e[0].value===""?eo:{value:e[0].value,isValid:true}:eo:ea}return ea};var eu=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>m(e)?e:t?e===""?NaN:e?+e:e:r&&A(e)?new Date(e):n?n(e):e;const el={isValid:false,value:null};var ec=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:true,value:t.value}:e,el):el;function ed(e){const t=e.ref;if(q(t)){return t.files}if(G(t)){return ec(e.refs).value}if($(t)){return[...t.selectedOptions].map(({value:e})=>e)}if(i(t)){return es(e.refs).value}return eu(m(t.value)?e.ref.value:t.value,e)}var ef=(e,t,r,n)=>{const i={};for(const r of e){const e=y(t,r);e&&w(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}};var ep=e=>e instanceof RegExp;var eh=e=>m(e)?e:ep(e)?e.source:u(e)?ep(e.value)?e.value.source:e.value:e;var ev=e=>({isOnSubmit:!e||e===E.onSubmit,isOnBlur:e===E.onBlur,isOnChange:e===E.onChange,isOnAll:e===E.all,isOnTouch:e===E.onTouched});const em="AsyncFunction";var eg=e=>!!e&&!!e.validate&&!!(H(e.validate)&&e.validate.constructor.name===em||u(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===em));var eb=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);var ey=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const e_=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const r=y(e,i);if(r){const{_f:e,...a}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n){return true}else if(e.ref&&t(e.ref,e.name)&&!n){return true}else{if(e_(a,t)){break}}}else if(u(a)){if(e_(a,t)){break}}}}return};function ew(e,t,r){const n=y(e,r);if(n||v(r)){return{error:n,name:r}}const i=r.split(".");while(i.length){const n=i.join(".");const a=y(t,n);const o=y(e,n);if(a&&!Array.isArray(a)&&r!==n){return{name:r}}if(o&&o.type){return{name:n,error:o}}if(o&&o.root&&o.root.type){return{name:`${n}.root`,error:o.root}}i.pop()}return{name:r}}var ex=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return J(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!n||E.all))};var eE=(e,t,r)=>!e||!t||e===t||W(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));var eZ=(e,t,r,n,i)=>{if(i.isOnAll){return false}else if(!r&&i.isOnTouch){return!(t||e)}else if(r?n.isOnBlur:i.isOnBlur){return!e}else if(r?n.isOnChange:i.isOnChange){return e}return true};var eS=(e,t)=>!g(y(e,t)).length&&ee(e,t);var eO=(e,t,r)=>{const n=W(y(e,r));w(n,"root",t[r]);w(e,r,n);return e};var ek=e=>A(e);function eT(e,t,r="validate"){if(ek(e)||Array.isArray(e)&&e.every(ek)||_(e)&&!e){return{type:r,message:ek(e)?e:"",ref:t}}}var eC=e=>u(e)&&!ep(e)?e:{value:e,message:""};var eR=async(e,t,r,n,a,s)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:p,min:h,max:v,pattern:g,validate:b,name:w,valueAsNumber:x,mount:E}=e._f;const S=y(r,w);if(!E||t.has(w)){return{}}const O=c?c[0]:l;const k=e=>{if(a&&O.reportValidity){O.setCustomValidity(_(e)?"":e||"");O.reportValidity()}};const T={};const C=G(l);const R=i(l);const M=C||R;const P=(x||q(l))&&m(l.value)&&m(S)||V(l)&&l.value===""||S===""||Array.isArray(S)&&!S.length;const D=U.bind(null,w,n,T);const I=(e,t,r,n=Z.maxLength,i=Z.minLength)=>{const a=e?t:r;T[w]={type:e?n:i,message:a,ref:l,...D(e?n:i,a)}};if(s?!Array.isArray(S)||!S.length:d&&(!M&&(P||o(S))||_(S)&&!S||R&&!es(c).isValid||C&&!ec(c).isValid)){const{value:e,message:t}=ek(d)?{value:!!d,message:d}:eC(d);if(e){T[w]={type:Z.required,message:t,ref:O,...D(Z.required,t)};if(!n){k(t);return T}}}if(!P&&(!o(h)||!o(v))){let e;let t;const r=eC(v);const i=eC(h);if(!o(S)&&!isNaN(S)){const n=l.valueAsNumber||(S?+S:S);if(!o(r.value)){e=n>r.value}if(!o(i.value)){t=n<i.value}}else{const n=l.valueAsDate||new Date(S);const a=e=>new Date(new Date().toDateString()+" "+e);const o=l.type=="time";const s=l.type=="week";if(A(r.value)&&S){e=o?a(S)>a(r.value):s?S>r.value:n>new Date(r.value)}if(A(i.value)&&S){t=o?a(S)<a(i.value):s?S<i.value:n<new Date(i.value)}}if(e||t){I(!!e,r.message,i.message,Z.max,Z.min);if(!n){k(T[w].message);return T}}}if((f||p)&&!P&&(A(S)||s&&Array.isArray(S))){const e=eC(f);const t=eC(p);const r=!o(e.value)&&S.length>+e.value;const i=!o(t.value)&&S.length<+t.value;if(r||i){I(r,e.message,t.message);if(!n){k(T[w].message);return T}}}if(g&&!P&&A(S)){const{value:e,message:t}=eC(g);if(ep(e)&&!S.match(e)){T[w]={type:Z.pattern,message:t,ref:l,...D(Z.pattern,t)};if(!n){k(t);return T}}}if(b){if(H(b)){const e=await b(S,r);const t=eT(e,O);if(t){T[w]={...t,...D(Z.validate,t.message)};if(!n){k(t.message);return T}}}else if(u(b)){let e={};for(const t in b){if(!J(e)&&!n){break}const i=eT(await b[t](S,r),O,t);if(i){e={...i,...D(t,i.message)};k(i.message);if(n){T[w]=e}}}if(!J(e)){T[w]={ref:O,...e};if(!n){return T}}}}k(true);return T};const eA={mode:E.onSubmit,reValidateMode:E.onChange,shouldFocusError:true};function eM(e={}){let t={...eA,...e};let r={submitCount:0,isDirty:false,isReady:false,isLoading:H(t.defaultValues),isValidating:false,isSubmitted:false,isSubmitting:false,isSubmitSuccessful:false,isValid:false,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||false};let n={};let s=u(t.defaultValues)||u(t.values)?h(t.defaultValues||t.values)||{}:{};let c=t.shouldUnregister?{}:h(s);let f={action:false,mount:false,watch:false};let v={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set};let b;let Z=0;const S={isDirty:false,dirtyFields:false,validatingFields:false,touchedFields:false,isValidating:false,isValid:false,errors:false};let O={...S};const k={array:z(),state:z()};const T=t.criteriaMode===E.all;const C=e=>t=>{clearTimeout(Z);Z=setTimeout(e,t)};const R=async e=>{if(!t.disabled&&(S.isValid||O.isValid||e)){const e=t.resolver?J((await U()).errors):await Q(n,true);if(e!==r.isValid){k.state.next({isValid:e})}}};const P=(e,n)=>{if(!t.disabled&&(S.isValidating||S.validatingFields||O.isValidating||O.validatingFields)){(e||Array.from(v.mount)).forEach(e=>{if(e){n?w(r.validatingFields,e,n):ee(r.validatingFields,e)}});k.state.next({validatingFields:r.validatingFields,isValidating:!J(r.validatingFields)})}};const I=(e,i=[],a,o,u=true,l=true)=>{if(o&&a&&!t.disabled){f.action=true;if(l&&Array.isArray(y(n,e))){const t=a(y(n,e),o.argA,o.argB);u&&w(n,e,t)}if(l&&Array.isArray(y(r.errors,e))){const t=a(y(r.errors,e),o.argA,o.argB);u&&w(r.errors,e,t);eS(r.errors,e)}if((S.touchedFields||O.touchedFields)&&l&&Array.isArray(y(r.touchedFields,e))){const t=a(y(r.touchedFields,e),o.argA,o.argB);u&&w(r.touchedFields,e,t)}if(S.dirtyFields||O.dirtyFields){r.dirtyFields=ei(s,c)}k.state.next({name:e,isDirty:et(e,i),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else{w(c,e,i)}};const L=(e,t)=>{w(r.errors,e,t);k.state.next({errors:r.errors})};const F=e=>{r.errors=e;k.state.next({errors:r.errors,isValid:false})};const N=(e,t,r,i)=>{const a=y(n,e);if(a){const n=y(c,e,m(r)?y(s,e):r);m(n)||i&&i.defaultChecked||t?w(c,e,t?n:ed(a._f)):ea(e,n);f.mount&&R()}};const j=(e,n,i,a,o)=>{let u=false;let l=false;const c={name:e};if(!t.disabled){if(!i||a){if(S.isDirty||O.isDirty){l=r.isDirty;r.isDirty=c.isDirty=et();u=l!==c.isDirty}const t=D(y(s,e),n);l=!!y(r.dirtyFields,e);t?ee(r.dirtyFields,e):w(r.dirtyFields,e,true);c.dirtyFields=r.dirtyFields;u=u||(S.dirtyFields||O.dirtyFields)&&l!==!t}if(i){const t=y(r.touchedFields,e);if(!t){w(r.touchedFields,e,i);c.touchedFields=r.touchedFields;u=u||(S.touchedFields||O.touchedFields)&&t!==i}}u&&o&&k.state.next(c)}return u?c:{}};const B=(e,n,i,a)=>{const o=y(r.errors,e);const s=(S.isValid||O.isValid)&&_(n)&&r.isValid!==n;if(t.delayError&&i){b=C(()=>L(e,i));b(t.delayError)}else{clearTimeout(Z);b=null;i?w(r.errors,e,i):ee(r.errors,e)}if((i?!D(o,i):o)||!J(a)||s){const t={...a,...s&&_(n)?{isValid:n}:{},errors:r.errors,name:e};r={...r,...t};k.state.next(t)}};const U=async e=>{P(e,true);const r=await t.resolver(c,t.context,ef(e||v.mount,n,t.criteriaMode,t.shouldUseNativeValidation));P(e);return r};const G=async e=>{const{errors:t}=await U(e);if(e){for(const n of e){const e=y(t,n);e?w(r.errors,n,e):ee(r.errors,n)}}else{r.errors=t}return t};const Q=async(e,n,i={valid:true})=>{for(const a in e){const o=e[a];if(o){const{_f:e,...s}=o;if(e){const s=v.array.has(e.name);const u=o._f&&eg(o._f);if(u&&S.validatingFields){P([a],true)}const l=await eR(o,v.disabled,c,T,t.shouldUseNativeValidation&&!n,s);if(u&&S.validatingFields){P([a])}if(l[e.name]){i.valid=false;if(n){break}}!n&&(y(l,e.name)?s?eO(r.errors,l,e.name):w(r.errors,e.name,l[e.name]):ee(r.errors,e.name))}!J(s)&&await Q(s,n,i)}}return i.valid};const Y=()=>{for(const e of v.unMount){const t=y(n,e);t&&(t._f.refs?t._f.refs.every(e=>!K(e)):!K(t._f.ref))&&eL(e)}v.unMount=new Set};const et=(e,r)=>!t.disabled&&(e&&r&&w(c,e,r),!D(em(),s));const er=(e,t,r)=>M(e,v,{...f.mount?c:m(t)?s:A(e)?{[e]:t}:t},r,t);const en=e=>g(y(f.mount?c:s,e,t.shouldUnregister?y(s,e,[]):[]));const ea=(e,t,r={})=>{const a=y(n,e);let s=t;if(a){const r=a._f;if(r){!r.disabled&&w(c,e,eu(t,r));s=V(r.ref)&&o(t)?"":t;if($(r.ref)){[...r.ref.options].forEach(e=>e.selected=s.includes(e.value))}else if(r.refs){if(i(r.ref)){r.refs.forEach(e=>{if(!e.defaultChecked||!e.disabled){if(Array.isArray(s)){e.checked=!!s.find(t=>t===e.value)}else{e.checked=s===e.value||!!s}}})}else{r.refs.forEach(e=>e.checked=e.value===s)}}else if(q(r.ref)){r.ref.value=""}else{r.ref.value=s;if(!r.ref.type){k.state.next({name:e,values:h(c)})}}}}(r.shouldDirty||r.shouldTouch)&&j(e,s,r.shouldTouch,r.shouldDirty,true);r.shouldValidate&&ep(e)};const eo=(e,t,r)=>{for(const i in t){if(!t.hasOwnProperty(i)){return}const o=t[i];const s=e+"."+i;const l=y(n,s);(v.array.has(e)||u(o)||l&&!l._f)&&!a(o)?eo(s,o,r):ea(s,o,r)}};const es=(e,t,i={})=>{const a=y(n,e);const u=v.array.has(e);const l=h(t);w(c,e,l);if(u){k.array.next({name:e,values:h(c)});if((S.isDirty||S.dirtyFields||O.isDirty||O.dirtyFields)&&i.shouldDirty){k.state.next({name:e,dirtyFields:ei(s,c),isDirty:et(e,l)})}}else{a&&!a._f&&!o(l)?eo(e,l,i):ea(e,l,i)}ey(e,v)&&k.state.next({...r,name:e});k.state.next({name:f.mount?e:undefined,values:h(c)})};const el=async e=>{f.mount=true;const i=e.target;let o=i.name;let s=true;const u=y(n,o);const d=e=>{s=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||D(e,y(c,o,e))};const p=ev(t.mode);const m=ev(t.reValidateMode);if(u){let a;let f;const g=i.type?ed(u._f):l(e);const _=e.type===x.BLUR||e.type===x.FOCUS_OUT;const E=!eb(u._f)&&!t.resolver&&!y(r.errors,o)&&!u._f.deps||eZ(_,y(r.touchedFields,o),r.isSubmitted,m,p);const Z=ey(o,v,_);w(c,o,g);if(_){if(!i||!i.readOnly){u._f.onBlur&&u._f.onBlur(e);b&&b(0)}}else if(u._f.onChange){u._f.onChange(e)}const C=j(o,g,_);const A=!J(C)||Z;!_&&k.state.next({name:o,type:e.type,values:h(c)});if(E){if(S.isValid||O.isValid){if(t.mode==="onBlur"){if(_){R()}}else if(!_){R()}}return A&&k.state.next({name:o,...Z?{}:C})}!_&&Z&&k.state.next({...r});if(t.resolver){const{errors:e}=await U([o]);d(g);if(s){const t=ew(r.errors,n,o);const i=ew(e,n,t.name||o);a=i.error;o=i.name;f=J(e)}}else{P([o],true);a=(await eR(u,v.disabled,c,T,t.shouldUseNativeValidation))[o];P([o]);d(g);if(s){if(a){f=false}else if(S.isValid||O.isValid){f=await Q(n,true)}}}if(s){u._f.deps&&ep(u._f.deps);B(o,f,a,C)}}};const ec=(e,t)=>{if(y(r.errors,t)&&e.focus){e.focus();return 1}return};const ep=async(e,i={})=>{let a;let o;const s=W(e);if(t.resolver){const t=await G(m(e)?e:s);a=J(t);o=e?!s.some(e=>y(t,e)):a}else if(e){o=(await Promise.all(s.map(async e=>{const t=y(n,e);return await Q(t&&t._f?{[e]:t}:t)}))).every(Boolean);!(!o&&!r.isValid)&&R()}else{o=a=await Q(n)}k.state.next({...!A(e)||(S.isValid||O.isValid)&&a!==r.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:r.errors});i.shouldFocus&&!o&&e_(n,ec,e?s:v.mount);return o};const em=e=>{const t={...f.mount?c:s};return m(e)?t:A(e)?y(t,e):e.map(e=>y(t,e))};const ek=(e,t)=>({invalid:!!y((t||r).errors,e),isDirty:!!y((t||r).dirtyFields,e),error:y((t||r).errors,e),isValidating:!!y(r.validatingFields,e),isTouched:!!y((t||r).touchedFields,e)});const eT=e=>{e&&W(e).forEach(e=>ee(r.errors,e));k.state.next({errors:e?r.errors:{}})};const eC=(e,t,i)=>{const a=(y(n,e,{_f:{}})._f||{}).ref;const o=y(r.errors,e)||{};// Don't override existing error messages elsewhere in the object tree.
const{ref:s,message:u,type:l,...c}=o;w(r.errors,e,{...c,...t,ref:a});k.state.next({name:e,errors:r.errors,isValid:false});i&&i.shouldFocus&&a&&a.focus&&a.focus()};const eP=(e,t)=>H(e)?k.state.subscribe({next:r=>"values"in r&&e(er(undefined,t),r)}):er(e,t,true);const eD=e=>k.state.subscribe({next:t=>{if(eE(e.name,t.name,e.exact)&&ex(t,e.formState||S,eH,e.reRenderRoot)){e.callback({values:{...c},...r,...t,defaultValues:s})}}}).unsubscribe;const eI=e=>{f.mount=true;O={...O,...e.formState};return eD({...e,formState:O})};const eL=(e,i={})=>{for(const a of e?W(e):v.mount){v.mount.delete(a);v.array.delete(a);if(!i.keepValue){ee(n,a);ee(c,a)}!i.keepError&&ee(r.errors,a);!i.keepDirty&&ee(r.dirtyFields,a);!i.keepTouched&&ee(r.touchedFields,a);!i.keepIsValidating&&ee(r.validatingFields,a);!t.shouldUnregister&&!i.keepDefaultValue&&ee(s,a)}k.state.next({values:h(c)});k.state.next({...r,...!i.keepDirty?{}:{isDirty:et()}});!i.keepIsValid&&R()};const eF=({disabled:e,name:t})=>{if(_(e)&&f.mount||!!e||v.disabled.has(t)){e?v.disabled.add(t):v.disabled.delete(t)}};const eN=(e,r={})=>{let i=y(n,e);const a=_(r.disabled)||_(t.disabled);w(n,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:true,...r}});v.mount.add(e);if(i){eF({disabled:_(r.disabled)?r.disabled:t.disabled,name:e})}else{N(e,true,r.value)}return{...a?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:eh(r.min),max:eh(r.max),minLength:eh(r.minLength),maxLength:eh(r.maxLength),pattern:eh(r.pattern)}:{},name:e,onChange:el,onBlur:el,ref:a=>{if(a){eN(e,r);i=y(n,e);const t=m(a.value)?a.querySelectorAll?a.querySelectorAll("input,select,textarea")[0]||a:a:a;const o=X(t);const u=i._f.refs||[];if(o?u.find(e=>e===t):t===i._f.ref){return}w(n,e,{_f:{...i._f,...o?{refs:[...u.filter(K),t,...Array.isArray(y(s,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}});N(e,false,undefined,t)}else{i=y(n,e,{});if(i._f){i._f.mount=false}(t.shouldUnregister||r.shouldUnregister)&&!(d(v.array,e)&&f.action)&&v.unMount.add(e)}}}};const ej=()=>t.shouldFocusError&&e_(n,ec,v.mount);const eB=e=>{if(_(e)){k.state.next({disabled:e});e_(n,(t,r)=>{const i=y(n,r);if(i){t.disabled=i._f.disabled||e;if(Array.isArray(i._f.refs)){i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e})}}},0,false)}};const eU=(e,i)=>async a=>{let o=undefined;if(a){a.preventDefault&&a.preventDefault();a.persist&&a.persist()}let s=h(c);k.state.next({isSubmitting:true});if(t.resolver){const{errors:e,values:t}=await U();r.errors=e;s=h(t)}else{await Q(n)}if(v.disabled.size){for(const e of v.disabled){ee(s,e)}}ee(r.errors,"root");if(J(r.errors)){k.state.next({errors:{}});try{await e(s,a)}catch(e){o=e}}else{if(i){await i({...r.errors},a)}ej();setTimeout(ej)}k.state.next({isSubmitted:true,isSubmitting:false,isSubmitSuccessful:J(r.errors)&&!o,submitCount:r.submitCount+1,errors:r.errors});if(o){throw o}};const eW=(e,t={})=>{if(y(n,e)){if(m(t.defaultValue)){es(e,h(y(s,e)))}else{es(e,t.defaultValue);w(s,e,h(t.defaultValue))}if(!t.keepTouched){ee(r.touchedFields,e)}if(!t.keepDirty){ee(r.dirtyFields,e);r.isDirty=t.defaultValue?et(e,h(y(s,e))):et()}if(!t.keepError){ee(r.errors,e);S.isValid&&R()}k.state.next({...r})}};const ez=(e,i={})=>{const a=e?h(e):s;const o=h(a);const u=J(e);const l=u?s:o;if(!i.keepDefaultValues){s=a}if(!i.keepValues){if(i.keepDirtyValues){const e=new Set([...v.mount,...Object.keys(ei(s,c))]);for(const t of Array.from(e)){y(r.dirtyFields,t)?w(l,t,y(c,t)):es(t,y(l,t))}}else{if(p&&m(e)){for(const e of v.mount){const t=y(n,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(V(e)){const t=e.closest("form");if(t){t.reset();break}}}}}if(i.keepFieldsRef){for(const e of v.mount){es(e,y(l,e))}}else{n={}}}c=t.shouldUnregister?i.keepDefaultValues?h(s):{}:h(l);k.array.next({values:{...l}});k.state.next({values:{...l}})}v={mount:i.keepDirtyValues?v.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:false,focus:""};f.mount=!S.isValid||!!i.keepIsValid||!!i.keepDirtyValues;f.watch=!!t.shouldUnregister;k.state.next({submitCount:i.keepSubmitCount?r.submitCount:0,isDirty:u?false:i.keepDirty?r.isDirty:!!(i.keepDefaultValues&&!D(e,s)),isSubmitted:i.keepIsSubmitted?r.isSubmitted:false,dirtyFields:u?{}:i.keepDirtyValues?i.keepDefaultValues&&c?ei(s,c):r.dirtyFields:i.keepDefaultValues&&e?ei(s,e):i.keepDirty?r.dirtyFields:{},touchedFields:i.keepTouched?r.touchedFields:{},errors:i.keepErrors?r.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?r.isSubmitSuccessful:false,isSubmitting:false,defaultValues:s})};const eJ=(e,t)=>ez(H(e)?e(c):e,t);const eq=(e,t={})=>{const r=y(n,e);const i=r&&r._f;if(i){const e=i.refs?i.refs[0]:i.ref;if(e.focus){e.focus();t.shouldSelect&&H(e.select)&&e.select()}}};const eH=e=>{r={...r,...e}};const eV=()=>H(t.defaultValues)&&t.defaultValues().then(e=>{eJ(e,t.resetOptions);k.state.next({isLoading:false})});const e$={control:{register:eN,unregister:eL,getFieldState:ek,handleSubmit:eU,setError:eC,_subscribe:eD,_runSchema:U,_focusError:ej,_getWatch:er,_getDirty:et,_setValid:R,_setFieldArray:I,_setDisabledField:eF,_setErrors:F,_getFieldArray:en,_reset:ez,_resetDefaultValues:eV,_removeUnmounted:Y,_disableForm:eB,_subjects:k,_proxyFormState:S,get _fields(){return n},get _formValues(){return c},get _state(){return f},set _state(value){f=value},get _defaultValues(){return s},get _names(){return v},set _names(value){v=value},get _formState(){return r},get _options(){return t},set _options(value){t={...t,...value}}},subscribe:eI,trigger:ep,register:eN,handleSubmit:eU,watch:eP,setValue:es,getValues:em,reset:eJ,resetField:eW,clearErrors:eT,unregister:eL,setError:eC,setFocus:eq,getFieldState:ek};return{...e$,formControl:e$}}var eP=()=>{if(typeof crypto!=="undefined"&&crypto.randomUUID){return crypto.randomUUID()}const e=typeof performance==="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})};var eD=(e,t,r={})=>r.shouldFocus||m(r.shouldFocus)?r.focusName||`${e}.${m(r.focusIndex)?t:r.focusIndex}.`:"";var eI=(e,t)=>[...e,...W(t)];var eL=e=>Array.isArray(e)?e.map(()=>undefined):undefined;function eF(e,t,r){return[...e.slice(0,t),...W(r),...e.slice(t)]}var eN=(e,t,r)=>{if(!Array.isArray(e)){return[]}if(m(e[r])){e[r]=undefined}e.splice(r,0,e.splice(t,1)[0]);return e};var ej=(e,t)=>[...W(t),...W(e)];function eB(e,t){let r=0;const n=[...e];for(const e of t){n.splice(e-r,1);r++}return g(n).length?n:[]}var eU=(e,t)=>m(t)?[]:eB(e,W(t).sort((e,t)=>e-t));var eW=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};var ez=(e,t,r)=>{e[t]=r;return e};/**
 * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)
 *
 * @param props - useFieldArray props
 *
 * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, control, handleSubmit, reset, trigger, setError } = useForm({
 *     defaultValues: {
 *       test: []
 *     }
 *   });
 *   const { fields, append } = useFieldArray({
 *     control,
 *     name: "test"
 *   });
 *
 *   return (
 *     <form onSubmit={handleSubmit(data => console.log(data))}>
 *       {fields.map((item, index) => (
 *          <input key={item.id} {...register(`test.${index}.firstName`)}  />
 *       ))}
 *       <button type="button" onClick={() => append({ firstName: "bill" })}>
 *         append
 *       </button>
 *       <input type="submit" />
 *     </form>
 *   );
 * }
 * ```
 */function eJ(e){const t=O();const{control:r=t.control,name:i,keyName:a="id",shouldUnregister:o,rules:s}=e;const[u,l]=n.useState(r._getFieldArray(i));const c=n.useRef(r._getFieldArray(i).map(eP));const d=n.useRef(u);const f=n.useRef(false);d.current=u;r._names.array.add(i);n.useMemo(()=>s&&r.register(i,s),[r,s,i]);C(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){const t=y(e,i);if(Array.isArray(t)){l(t);c.current=t.map(eP)}}}}).unsubscribe,[r,i]);const p=n.useCallback(e=>{f.current=true;r._setFieldArray(i,e)},[r,i]);const v=(e,t)=>{const n=W(h(e));const a=eI(r._getFieldArray(i),n);r._names.focus=eD(i,a.length-1,t);c.current=eI(c.current,n.map(eP));p(a);l(a);r._setFieldArray(i,a,eI,{argA:eL(e)})};const m=(e,t)=>{const n=W(h(e));const a=ej(r._getFieldArray(i),n);r._names.focus=eD(i,0,t);c.current=ej(c.current,n.map(eP));p(a);l(a);r._setFieldArray(i,a,ej,{argA:eL(e)})};const g=e=>{const t=eU(r._getFieldArray(i),e);c.current=eU(c.current,e);p(t);l(t);!Array.isArray(y(r._fields,i))&&w(r._fields,i,undefined);r._setFieldArray(i,t,eU,{argA:e})};const b=(e,t,n)=>{const a=W(h(t));const o=eF(r._getFieldArray(i),e,a);r._names.focus=eD(i,e,n);c.current=eF(c.current,e,a.map(eP));p(o);l(o);r._setFieldArray(i,o,eF,{argA:e,argB:eL(t)})};const _=(e,t)=>{const n=r._getFieldArray(i);eW(n,e,t);eW(c.current,e,t);p(n);l(n);r._setFieldArray(i,n,eW,{argA:e,argB:t},false)};const x=(e,t)=>{const n=r._getFieldArray(i);eN(n,e,t);eN(c.current,e,t);p(n);l(n);r._setFieldArray(i,n,eN,{argA:e,argB:t},false)};const Z=(e,t)=>{const n=h(t);const a=ez(r._getFieldArray(i),e,n);c.current=[...a].map((t,r)=>!t||r===e?eP():c.current[r]);p(a);l([...a]);r._setFieldArray(i,a,ez,{argA:e,argB:n},true,false)};const S=e=>{const t=W(h(e));c.current=t.map(eP);p([...t]);l([...t]);r._setFieldArray(i,[...t],e=>e,{},true,false)};n.useEffect(()=>{r._state.action=false;ey(i,r._names)&&r._subjects.state.next({...r._formState});if(f.current&&(!ev(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ev(r._options.reValidateMode).isOnSubmit){if(r._options.resolver){r._runSchema([i]).then(e=>{const t=y(e.errors,i);const n=y(r._formState.errors,i);if(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type){t?w(r._formState.errors,i,t):ee(r._formState.errors,i);r._subjects.state.next({errors:r._formState.errors})}})}else{const e=y(r._fields,i);if(e&&e._f&&!(ev(r._options.reValidateMode).isOnSubmit&&ev(r._options.mode).isOnSubmit)){eR(e,r._names.disabled,r._formValues,r._options.criteriaMode===E.all,r._options.shouldUseNativeValidation,true).then(e=>!J(e)&&r._subjects.state.next({errors:eO(r._formState.errors,e,i)}))}}}r._subjects.state.next({name:i,values:h(r._formValues)});r._names.focus&&e_(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus){e.focus();return 1}return});r._names.focus="";r._setValid();f.current=false},[u,i,r]);n.useEffect(()=>{!y(r._formValues,i)&&r._setFieldArray(i);return()=>{const e=(e,t)=>{const n=y(r._fields,e);if(n&&n._f){n._f.mount=t}};r._options.shouldUnregister||o?r.unregister(i):e(i,false)}},[i,r,a,o]);return{swap:n.useCallback(_,[p,i,r]),move:n.useCallback(x,[p,i,r]),prepend:n.useCallback(m,[p,i,r]),append:n.useCallback(v,[p,i,r]),remove:n.useCallback(g,[p,i,r]),insert:n.useCallback(b,[p,i,r]),update:n.useCallback(Z,[p,i,r]),replace:n.useCallback(S,[p,i,r]),fields:n.useMemo(()=>u.map((e,t)=>({...e,[a]:c.current[t]||eP()})),[u,a])}}/**
 * Custom hook to manage the entire form.
 *
 * @remarks
 * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)
 *
 * @param props - form configuration and validation parameters.
 *
 * @returns methods - individual functions to manage the form state. {@link UseFormReturn}
 *
 * @example
 * ```tsx
 * function App() {
 *   const { register, handleSubmit, watch, formState: { errors } } = useForm();
 *   const onSubmit = data => console.log(data);
 *
 *   console.log(watch("example"));
 *
 *   return (
 *     <form onSubmit={handleSubmit(onSubmit)}>
 *       <input defaultValue="test" {...register("example")} />
 *       <input {...register("exampleRequired", { required: true })} />
 *       {errors.exampleRequired && <span>This field is required</span>}
 *       <button>Submit</button>
 *     </form>
 *   );
 * }
 * ```
 */function eq(e={}){const t=n.useRef(undefined);const r=n.useRef(undefined);const[i,a]=n.useState({isDirty:false,isValidating:false,isLoading:H(e.defaultValues),isSubmitted:false,isSubmitting:false,isSubmitSuccessful:false,isValid:false,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||false,isReady:false,defaultValues:H(e.defaultValues)?undefined:e.defaultValues});if(!t.current){if(e.formControl){t.current={...e.formControl,formState:i};if(e.defaultValues&&!H(e.defaultValues)){e.formControl.reset(e.defaultValues,e.resetOptions)}}else{const{formControl:r,...n}=eM(e);t.current={...n,formState:i}}}const o=t.current.control;o._options=e;C(()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:true});a(e=>({...e,isReady:true}));o._formState.isReady=true;return e},[o]);n.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]);n.useEffect(()=>{if(e.mode){o._options.mode=e.mode}if(e.reValidateMode){o._options.reValidateMode=e.reValidateMode}},[o,e.mode,e.reValidateMode]);n.useEffect(()=>{if(e.errors){o._setErrors(e.errors);o._focusError()}},[o,e.errors]);n.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]);n.useEffect(()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();if(e!==i.isDirty){o._subjects.state.next({isDirty:e})}}},[o,i.isDirty]);n.useEffect(()=>{if(e.values&&!D(e.values,r.current)){o._reset(e.values,{keepFieldsRef:true,...o._options.resetOptions});r.current=e.values;a(e=>({...e}))}else{o._resetDefaultValues()}},[o,e.values]);n.useEffect(()=>{if(!o._state.mount){o._setValid();o._state.mount=true}if(o._state.watch){o._state.watch=false;o._subjects.state.next({...o._formState})}o._removeUnmounted()});t.current.formState=T(i,o);return t.current}//# sourceMappingURL=index.esm.mjs.map
},14909:function(e,t,r){"use strict";r.d(t,{Z:()=>a});/* ESM import */var n=r(87363);function i(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function a({debounce:e,scroll:t,polyfill:r,offsetSize:l}={debounce:0,scroll:!1,offsetSize:!1}){const d=r||(typeof window=="undefined"?class{}:window.ResizeObserver);if(!d)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[f,p]=(0,n.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=(0,n.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:f,orientationHandler:null}),v=e?typeof e=="number"?e:e.scroll:null,m=e?typeof e=="number"?e:e.resize:null,g=(0,n.useRef)(!1);(0,n.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));const[b,y,_]=(0,n.useMemo)(()=>{const e=()=>{if(!h.current.element)return;const{left:e,top:t,width:r,height:n,bottom:i,right:a,x:o,y:s}=h.current.element.getBoundingClientRect(),u={left:e,top:t,width:r,height:n,bottom:i,right:a,x:o,y:s};h.current.element instanceof HTMLElement&&l&&(u.height=h.current.element.offsetHeight,u.width=h.current.element.offsetWidth),Object.freeze(u),g.current&&!c(h.current.lastBounds,u)&&p(h.current.lastBounds=u)};return[e,m?i(e,m):e,v?i(e,v):e]},[p,l,v,m]);function w(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",_,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function x(){h.current.element&&(h.current.resizeObserver=new d(_),h.current.resizeObserver.observe(h.current.element),t&&h.current.scrollContainers&&h.current.scrollContainers.forEach(e=>e.addEventListener("scroll",_,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{_()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}const E=e=>{!e||e===h.current.element||(w(),h.current.element=e,h.current.scrollContainers=u(e),x())};return s(_,!!t),o(y),(0,n.useEffect)(()=>{w(),x()},[t,_,y]),(0,n.useEffect)(()=>w,[]),[E,f,b]}function o(e){(0,n.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function s(e,t){(0,n.useEffect)(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[e,t])}function u(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(e=>e==="auto"||e==="scroll")&&t.push(e),[...t,...u(e.parentElement)]}const l=["x","y","top","bottom","left","right","width","height"],c=(e,t)=>l.every(r=>e[r]===t[r]);//# sourceMappingURL=index.js.map
}};/************************************************************************/// The module cache
var t={};// The require function
function r(n){// Check if module is in cache
var i=t[n];if(i!==undefined){return i.exports}// Create a new module (and put it into the cache)
var a=t[n]={id:n,exports:{}};// Execute the module function
e[n](a,a.exports,r);// Return the exports of the module
return a.exports}// expose the modules object (__webpack_modules__)
r.m=e;/************************************************************************/// webpack/runtime/compat_get_default_export
(()=>{// getDefaultExport function for compatibility with non-ESM modules
r.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;r.d(t,{a:t});return t}})();// webpack/runtime/define_property_getters
(()=>{r.d=(e,t)=>{for(var n in t){if(r.o(t,n)&&!r.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();// webpack/runtime/ensure_chunk
(()=>{r.f={};// This file contains only the entry chunk.
// The chunk loading function for additional chunks
r.e=e=>{return Promise.all(Object.keys(r.f).reduce((t,n)=>{r.f[n](e,t);return t},[]))}})();// webpack/runtime/get javascript chunk filename
(()=>{// This function allow to reference chunks
r.u=e=>{// return url for filenames not based on template
if(e==="694")return"js/lazy-chunks/tutor-course-builder-basic.js?ver=3.9.3";if(e==="501")return"js/lazy-chunks/tutor-course-builder-curriculum.js?ver=3.9.3";if(e==="85")return"js/lazy-chunks/tutor-course-builder-additional.js?ver=3.9.3";if(e==="922")return"js/lazy-chunks/tutor-course-builder-icon.js?ver=3.9.3";// return url for filenames based on template
return""+e+".javascript"}})();// webpack/runtime/get mini-css chunk filename
(()=>{// This function allow to reference chunks
r.miniCssF=e=>{// return url for filenames not based on template
// return url for filenames based on template
return""+e+".css"}})();// webpack/runtime/get_full_hash
(()=>{r.h=()=>"1821cba9800375cb"})();// webpack/runtime/global
(()=>{r.g=(()=>{if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}})()})();// webpack/runtime/has_own_property
(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();// webpack/runtime/load_script
(()=>{var e={};var t="tutor:";// loadScript function to load a script via script tag
r.l=function(n,i,a,o){if(e[n]){e[n].push(i);return}var s,u;if(a!==undefined){var l=document.getElementsByTagName("script");for(var c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){s=d;break}}}if(!s){u=true;s=document.createElement("script");s.charset="utf-8";s.timeout=120;if(r.nc){s.setAttribute("nonce",r.nc)}s.setAttribute("data-webpack",t+a);s.src=n}e[n]=[i];var f=function(t,r){s.onerror=s.onload=null;clearTimeout(p);var i=e[n];delete e[n];s.parentNode&&s.parentNode.removeChild(s);i&&i.forEach(function(e){return e(r)});if(t)return t(r)};var p=setTimeout(f.bind(null,undefined,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror);s.onload=f.bind(null,s.onload);u&&document.head.appendChild(s)}})();// webpack/runtime/make_namespace_object
(()=>{// define __esModule on exports
r.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();// webpack/runtime/nonce
(()=>{r.nc=undefined})();// webpack/runtime/rspack_version
(()=>{r.rv=()=>"1.4.11"})();// webpack/runtime/auto_public_path
(()=>{var e;if(r.g.importScripts)e=r.g.location+"";var t=r.g.document;if(!e&&t){// Technically we could use `document.currentScript instanceof window.HTMLScriptElement`,
// but an attacker could try to inject `<script>HTMLScriptElement = HTMLImageElement</script>`
// and use `<img name="currentScript" src="https://attacker.controlled.server/"></img>`
if(t.currentScript&&t.currentScript.tagName.toUpperCase()==="SCRIPT")e=t.currentScript.src;if(!e){var n=t.getElementsByTagName("script");if(n.length){var i=n.length-1;while(i>-1&&(!e||!/^http(s?):/.test(e)))e=n[i--].src}}}// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration",
// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.',
if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");r.p=e+"../"})();// webpack/runtime/jsonp_chunk_loading
(()=>{// object to store loaded and loading chunks
// undefined = chunk not loaded, null = chunk preloaded/prefetched
// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
var e={"732":0};r.f.j=function(t,n){// JSONP chunk loading for javascript
var i=r.o(e,t)?e[t]:undefined;if(i!==0){// 0 means "already installed".
// a Promise means "currently loading".
if(i){n.push(i[2])}else{if(true){// setup Promise in chunk cache
var a=new Promise((r,n)=>i=e[t]=[r,n]);n.push(i[2]=a);// start chunk loading
var o=r.p+r.u(t);// create error before stack unwound to get useful stacktrace later
var s=new Error;var u=function(n){if(r.o(e,t)){i=e[t];if(i!==0)e[t]=undefined;if(i){var a=n&&(n.type==="load"?"missing":n.type);var o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")";s.name="ChunkLoadError";s.type=a;s.request=o;i[1](s)}}};r.l(o,u,"chunk-"+t,t)}}}};// install a JSONP callback for chunk loading
var t=(t,n)=>{var[i,a,o]=n;// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var s,u,l=0;if(i.some(t=>e[t]!==0)){for(s in a){if(r.o(a,s)){r.m[s]=a[s]}}if(o)var c=o(r)}if(t)t(n);for(;l<i.length;l++){u=i[l];if(r.o(e,u)&&e[u]){e[u][0]()}e[u]=0}};var n=self["webpackChunktutor"]=self["webpackChunktutor"]||[];n.forEach(t.bind(null,0));n.push=t.bind(null,n.push.bind(n))})();// webpack/runtime/rspack_unique_id
(()=>{r.ruid="bundler=rspack@1.4.11"})();/************************************************************************/var n={};// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(()=>{"use strict";// EXTERNAL MODULE: ./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var e=r(35944);// EXTERNAL MODULE: external "React"
var t=r(87363);var n=/*#__PURE__*/r.n(t);// EXTERNAL MODULE: ./node_modules/react-dom/client.js
var i=r(20745);// EXTERNAL MODULE: ./assets/react/v3/shared/components/ErrorBoundary.tsx
var a=r(68214);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/config/routes.tsx + 34 modules
var o=r(20203);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var s=r(75537);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Toast.tsx
var u=r(13985);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var l=r(74053);// EXTERNAL MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var c=r(54697);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
var d=r(87685);// EXTERNAL MODULE: ./node_modules/cssjanus/src/cssjanus.js
var f=r(43832);var p=/*#__PURE__*/r.n(f);// CONCATENATED MODULE: ./node_modules/stylis/src/Enum.js
var h="-ms-";var v="-moz-";var m="-webkit-";var g="comm";var b="rule";var y="decl";var _="@page";var w="@media";var x="@import";var E="@charset";var Z="@viewport";var S="@supports";var O="@document";var k="@namespace";var T="@keyframes";var C="@font-face";var R="@counter-style";var A="@font-feature-values";var M="@layer";var P="@scope";// CONCATENATED MODULE: ./node_modules/stylis/src/Serializer.js
/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function D(e,t){var r="";for(var n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}/**
 * @param {object} element
 * @param {number} index
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function I(e,t,r,n){switch(e.type){case LAYER:if(e.children.length)break;case IMPORT:case NAMESPACE:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return"";case KEYFRAMES:return e.return=e.value+"{"+D(e.children,n)+"}";case RULESET:if(!strlen(e.value=e.props.join(",")))return""}return strlen(r=D(e.children,n))?e.return=e.value+"{"+r+"}":""};// CONCATENATED MODULE: ./node_modules/stylis/src/Utility.js
/**
 * @param {number}
 * @return {number}
 */var L=Math.abs;/**
 * @param {number}
 * @return {string}
 */var F=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var N=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function j(e,t){return J(e,0)^45?(((t<<2^J(e,0))<<2^J(e,1))<<2^J(e,2))<<2^J(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function B(e){return e.trim()}/**
 * @param {string} value
 * @param {RegExp} pattern
 * @return {string?}
 */function U(e,t){return(e=t.exec(e))?e[0]:e}/**
 * @param {string} value
 * @param {(string|RegExp)} pattern
 * @param {string} replacement
 * @return {string}
 */function W(e,t,r){return e.replace(t,r)}/**
 * @param {string} value
 * @param {string} search
 * @param {number} position
 * @return {number}
 */function z(e,t,r){return e.indexOf(t,r)}/**
 * @param {string} value
 * @param {number} index
 * @return {number}
 */function J(e,t){return e.charCodeAt(t)|0}/**
 * @param {string} value
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function q(e,t,r){return e.slice(t,r)}/**
 * @param {string} value
 * @return {number}
 */function H(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function V(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function $(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function G(e,t){return e.map(t).join("")}/**
 * @param {string[]} array
 * @param {RegExp} pattern
 * @return {string[]}
 */function X(e,t){return e.filter(function(e){return!U(e,t)})};// CONCATENATED MODULE: ./node_modules/stylis/src/Tokenizer.js
var K=1;var Q=1;var Y=0;var ee=0;var et=0;var er="";/**
 * @param {string} value
 * @param {object | null} root
 * @param {object | null} parent
 * @param {string} type
 * @param {string[] | string} props
 * @param {object[] | string} children
 * @param {object[]} siblings
 * @param {number} length
 */function en(e,t,r,n,i,a,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:K,column:Q,length:o,return:"",siblings:s}}/**
 * @param {object} root
 * @param {object} props
 * @return {object}
 */function ei(e,t){return assign(en("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}/**
 * @param {object} root
 */function ea(e){while(e.root)e=ei(e.root,{children:[e]});append(e,e.siblings)}/**
 * @return {number}
 */function eo(){return et}/**
 * @return {number}
 */function es(){et=ee>0?J(er,--ee):0;if(Q--,et===10)Q=1,K--;return et}/**
 * @return {number}
 */function eu(){et=ee<Y?J(er,ee++):0;if(Q++,et===10)Q=1,K++;return et}/**
 * @return {number}
 */function el(){return J(er,ee)}/**
 * @return {number}
 */function ec(){return ee}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function ed(e,t){return q(er,e,t)}/**
 * @param {number} type
 * @return {number}
 */function ef(e){switch(e){// \0 \t \n \r \s whitespace token
case 0:case 9:case 10:case 13:case 32:return 5;// ! + , / > @ ~ isolate token
case 33:case 43:case 44:case 47:case 62:case 64:case 126:// ; { } breakpoint token
case 59:case 123:case 125:return 4;// : accompanied token
case 58:return 3;// " ' ( [ opening delimit token
case 34:case 39:case 40:case 91:return 2;// ) ] closing delimit token
case 41:case 93:return 1}return 0}/**
 * @param {string} value
 * @return {any[]}
 */function ep(e){return K=Q=1,Y=H(er=e),ee=0,[]}/**
 * @param {any} value
 * @return {any}
 */function eh(e){return er="",e}/**
 * @param {number} type
 * @return {string}
 */function ev(e){return B(ed(ee-1,e_(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function em(e){return eh(eb(ep(e)))}/**
 * @param {number} type
 * @return {string}
 */function eg(e){while(et=el())if(et<33)eu();else break;return ef(e)>2||ef(et)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function eb(e){while(eu())switch(ef(et)){case 0:append(ex(ee-1),e);break;case 2:append(ev(et),e);break;default:append(from(et),e)}return e}/**
 * @param {number} index
 * @param {number} count
 * @return {string}
 */function ey(e,t){while(--t&&eu())// not 0-9 A-F a-f
if(et<48||et>102||et>57&&et<65||et>70&&et<97)break;return ed(e,ec()+(t<6&&el()==32&&eu()==32))}/**
 * @param {number} type
 * @return {number}
 */function e_(e){while(eu())switch(et){// ] ) " '
case e:return ee;// " '
case 34:case 39:if(e!==34&&e!==39)e_(et);break;// (
case 40:if(e===41)e_(e);break;// \
case 92:eu();break}return ee}/**
 * @param {number} type
 * @param {number} index
 * @return {number}
 */function ew(e,t){while(eu())// //
if(e+et===47+10)break;else if(e+et===42+42&&el()===47)break;return"/*"+ed(t,ee-1)+"*"+F(e===47?e:eu())}/**
 * @param {number} index
 * @return {string}
 */function ex(e){while(!ef(el()))eu();return ed(e,ee)};// CONCATENATED MODULE: ./node_modules/stylis/src/Parser.js
/**
 * @param {string} value
 * @return {object[]}
 */function eE(e){return eh(eZ("",null,null,null,[""],e=ep(e),0,[0],e))}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {string[]} rule
 * @param {string[]} rules
 * @param {string[]} rulesets
 * @param {number[]} pseudo
 * @param {number[]} points
 * @param {string[]} declarations
 * @return {object}
 */function eZ(e,t,r,n,i,a,o,s,u){var l=0;var c=0;var d=o;var f=0;var p=0;var h=0;var v=1;var m=1;var g=1;var b=0;var y="";var _=i;var w=a;var x=n;var E=y;while(m)switch(h=b,b=eu()){// (
case 40:if(h!=108&&J(E,d-1)==58){if(z(E+=W(ev(b),"&","&\f"),"&\f",L(l?s[l-1]:0))!=-1)g=-1;break}// " ' [
case 34:case 39:case 91:E+=ev(b);break;// \t \n \r \s
case 9:case 10:case 13:case 32:E+=eg(h);break;// \
case 92:E+=ey(ec()-1,7);continue;// /
case 47:switch(el()){case 42:case 47:$(eO(ew(eu(),ec()),t,r,u),u);if((ef(h||1)==5||ef(el()||1)==5)&&H(E)&&q(E,-1,void 0)!==" ")E+=" ";break;default:E+="/"}break;// {
case 123*v:s[l++]=H(E)*g;// } ; \0
case 125*v:case 59:case 0:switch(b){// \0 }
case 0:case 125:m=0;// ;
case 59+c:if(g==-1)E=W(E,/\f/g,"");if(p>0&&(H(E)-d||v===0&&h===47))$(p>32?ek(E+";",n,r,d-1,u):ek(W(E," ","")+";",n,r,d-2,u),u);break;// @ ;
case 59:E+=";";// { rule/at-rule
default:$(x=eS(E,t,r,l,c,i,s,y,_=[],w=[],d,a),a);if(b===123)if(c===0)eZ(E,t,x,x,_,a,d,s,w);else{switch(f){// c(ontainer)
case 99:if(J(E,3)===110)break;// l(ayer)
case 108:if(J(E,2)===97)break;default:c=0;// d(ocument) m(edia) s(upports)
case 100:case 109:case 115:}if(c)eZ(e,x,x,n&&$(eS(e,x,x,0,0,i,s,y,i,_=[],d,w),w),i,w,d,s,n?_:w);else eZ(E,x,x,x,[""],w,0,s,w)}}l=c=p=0,v=g=1,y=E="",d=o;break;// :
case 58:d=1+H(E),p=h;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&es()==125)continue}switch(E+=F(b),b*v){// &
case 38:g=c>0?1:(E+="\f",-1);break;// ,
case 44:s[l++]=(H(E)-1)*g,g=1;break;// @
case 64:// -
if(el()===45)E+=ev(eu());f=el(),c=d=H(y=E+=ex(ec())),b++;break;// -
case 45:if(h===45&&H(E)==2)v=0}}return a}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} index
 * @param {number} offset
 * @param {string[]} rules
 * @param {number[]} points
 * @param {string} type
 * @param {string[]} props
 * @param {string[]} children
 * @param {number} length
 * @param {object[]} siblings
 * @return {object}
 */function eS(e,t,r,n,i,a,o,s,u,l,c,d){var f=i-1;var p=i===0?a:[""];var h=V(p);for(var v=0,m=0,g=0;v<n;++v)for(var y=0,_=q(e,f+1,f=L(m=o[v])),w=e;y<h;++y)if(w=B(m>0?p[y]+" "+_:W(_,/&\f/g,p[y])))u[g++]=w;return en(e,t,r,i===0?b:s,u,l,c,d)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @param {object[]} siblings
 * @return {object}
 */function eO(e,t,r,n){return en(e,t,r,g,F(eo()),q(e,2,-2),0,n)}/**
 * @param {string} value
 * @param {object} root
 * @param {object?} parent
 * @param {number} length
 * @param {object[]} siblings
 * @return {object}
 */function ek(e,t,r,n,i){return en(e,t,r,y,q(e,0,n),q(e,n+1,-1),n,i)};// CONCATENATED MODULE: ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
function eT(e,t,r){switch(e.type){case x:case y:case g:return e.return=e.return||e.value;case b:{e.value=Array.isArray(e.props)?e.props.join(","):e.props;if(Array.isArray(e.children)){e.children.forEach(function(e){if(e.type===g)e.children=e.value})}}}var n=D(Array.prototype.concat(e.children),eT);return H(n)?e.return=e.value+"{"+n+"}":""}function eC(e,t,r,n){if(e.type===T||e.type===S||e.type===b&&(!e.parent||e.parent.type===w||e.parent.type===b)){var i=p().transform(eT(e,t,r));e.children=i?eE(i)[0].children:[];e.return=""}}// stable identifier that will not be dropped by minification unless the whole module
// is unused
Object.defineProperty(eC,"name",{value:"stylisRTLPlugin"});/* ESM default export */const eR=eC;//# sourceMappingURL=stylis-rtl.js.map
;// CONCATENATED MODULE: ./assets/react/v3/shared/components/RTLProvider.tsx
var eA=(0,c/* ["default"] */.Z)({stylisPlugins:[eR],key:"rtl"});var eM=t=>{var{children:r}=t;if(l/* .isRTL */.dZ){return/*#__PURE__*/(0,e/* .jsx */.tZ)(d.C,{value:eA,children:r})}return/*#__PURE__*/(0,e/* .jsx */.tZ)(e/* .Fragment */.HY,{children:r})};/* ESM default export */const eP=eM;// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/Modal.tsx
var eD=r(63260);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var eI=r(29535);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var eL=r(70917);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/utils.js
var eF=r(49982);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/query.js
var eN=r(84424);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/notifyManager.js
var ej=r(93242);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/subscribable.js
var eB=r(83562);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/queryCache.js
// src/queryCache.ts
var eU=class extends eB/* .Subscribable */.l{constructor(e={}){super();this.config=e;this.#U=/* @__PURE__ */new Map}#U;build(e,t,r){const n=t.queryKey;const i=t.queryHash??(0,eF/* .hashQueryKeyByOptions */.Rm)(n,t);let a=this.get(i);if(!a){a=new eN/* .Query */.A({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)});this.add(a)}return a}add(e){if(!this.#U.has(e.queryHash)){this.#U.set(e.queryHash,e);this.notify({type:"added",query:e})}}remove(e){const t=this.#U.get(e.queryHash);if(t){e.destroy();if(t===e){this.#U.delete(e.queryHash)}this.notify({type:"removed",query:e})}}clear(){ej/* .notifyManager.batch */.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#U.get(e)}getAll(){return[...this.#U.values()]}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eF/* .matchQuery */._x)(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,eF/* .matchQuery */._x)(e,t)):t}notify(e){ej/* .notifyManager.batch */.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ej/* .notifyManager.batch */.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ej/* .notifyManager.batch */.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};//# sourceMappingURL=queryCache.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/mutation.js
var eW=r(31307);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/mutationCache.js
// src/mutationCache.ts
var ez=class extends eB/* .Subscribable */.l{constructor(e={}){super();this.config=e;this.#W=/* @__PURE__ */new Set;this.#z=/* @__PURE__ */new Map;this.#J=0}#W;#z;#J;build(e,t,r){const n=new eW/* .Mutation */.m({mutationCache:this,mutationId:++this.#J,options:e.defaultMutationOptions(t),state:r});this.add(n);return n}add(e){this.#W.add(e);const t=eJ(e);if(typeof t==="string"){const r=this.#z.get(t);if(r){r.push(e)}else{this.#z.set(t,[e])}}this.notify({type:"added",mutation:e})}remove(e){if(this.#W.delete(e)){const t=eJ(e);if(typeof t==="string"){const r=this.#z.get(t);if(r){if(r.length>1){const t=r.indexOf(e);if(t!==-1){r.splice(t,1)}}else if(r[0]===e){this.#z.delete(t)}}}}this.notify({type:"removed",mutation:e})}canRun(e){const t=eJ(e);if(typeof t==="string"){const r=this.#z.get(t);const n=r?.find(e=>e.state.status==="pending");return!n||n===e}else{return true}}runNext(e){const t=eJ(e);if(typeof t==="string"){const r=this.#z.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}else{return Promise.resolve()}}clear(){ej/* .notifyManager.batch */.Vr.batch(()=>{this.#W.forEach(e=>{this.notify({type:"removed",mutation:e})});this.#W.clear();this.#z.clear()})}getAll(){return Array.from(this.#W)}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eF/* .matchMutation */.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,eF/* .matchMutation */.X7)(e,t))}notify(e){ej/* .notifyManager.batch */.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return ej/* .notifyManager.batch */.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(eF/* .noop */.ZT))))}};function eJ(e){return e.options.scope?.id}//# sourceMappingURL=mutationCache.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/focusManager.js
var eq=r(21037);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/onlineManager.js
var eH=r(72226);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
// src/infiniteQueryBehavior.ts
function eV(e){return{onFetch:(t,r)=>{const n=t.options;const i=t.fetchOptions?.meta?.fetchMore?.direction;const a=t.state.data?.pages||[];const o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]};let u=0;const l=async()=>{let r=false;const l=e=>{Object.defineProperty(e,"signal",{enumerable:true,get:()=>{if(t.signal.aborted){r=true}else{t.signal.addEventListener("abort",()=>{r=true})}return t.signal}})};const c=(0,eF/* .ensureQueryFn */.cG)(t.options,t.fetchOptions);const d=async(e,n,i)=>{if(r){return Promise.reject()}if(n==null&&e.pages.length){return Promise.resolve(e)}const a=()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};l(e);return e};const o=a();const s=await c(o);const{maxPages:u}=t.options;const d=i?eF/* .addToStart */.Ht:eF/* .addToEnd */.VX;return{pages:d(e.pages,s,u),pageParams:d(e.pageParams,n,u)}};if(i&&a.length){const e=i==="backward";const t=e?eG:e$;const r={pages:a,pageParams:o};const u=t(n,r);s=await d(r,u,e)}else{const t=e??a.length;do{const e=u===0?o[0]??n.initialPageParam:e$(n,s);if(u>0&&e==null){break}s=await d(s,e);u++}while(u<t)}return s};if(t.options.persister){t.fetchFn=()=>{return t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}}else{t.fetchFn=l}}}}function e$(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function eG(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function eX(e,t){if(!t)return false;return e$(e,t)!=null}function eK(e,t){if(!t||!e.getPreviousPageParam)return false;return eG(e,t)!=null}//# sourceMappingURL=infiniteQueryBehavior.js.map
;// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/queryClient.js
// src/queryClient.ts
var eQ=class{#q;#i;#g;#H;#V;#$;#G;#X;constructor(e={}){this.#q=e.queryCache||new eU;this.#i=e.mutationCache||new ez;this.#g=e.defaultOptions||{};this.#H=/* @__PURE__ */new Map;this.#V=/* @__PURE__ */new Map;this.#$=0}mount(){this.#$++;if(this.#$!==1)return;this.#G=eq/* .focusManager.subscribe */.j.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#q.onFocus()}});this.#X=eH/* .onlineManager.subscribe */.N.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#q.onOnline()}})}unmount(){this.#$--;if(this.#$!==0)return;this.#G?.();this.#G=void 0;this.#X?.();this.#X=void 0}isFetching(e){return this.#q.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}/**
   * Imperative (non-reactive) way to retrieve data for a QueryKey.
   * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
   *
   * Hint: Do not use this function inside a component, because it won't receive updates.
   * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
   */getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e);const r=this.#q.build(this,t);const n=r.state.data;if(n===void 0){return this.fetchQuery(e)}if(e.revalidateIfStale&&r.isStaleByTime((0,eF/* .resolveStaleTime */.KC)(t.staleTime,r))){void this.prefetchQuery(t)}return Promise.resolve(n)}getQueriesData(e){return this.#q.findAll(e).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e});const i=this.#q.get(n.queryHash);const a=i?.state.data;const o=(0,eF/* .functionalUpdate */.SE)(t,a);if(o===void 0){return void 0}return this.#q.build(this,n).setData(o,{...r,manual:true})}setQueriesData(e,t,r){return ej/* .notifyManager.batch */.Vr.batch(()=>this.#q.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#q.get(t.queryHash)?.state}removeQueries(e){const t=this.#q;ej/* .notifyManager.batch */.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#q;return ej/* .notifyManager.batch */.Vr.batch(()=>{r.findAll(e).forEach(e=>{e.reset()});return this.refetchQueries({type:"active",...e},t)})}cancelQueries(e,t={}){const r={revert:true,...t};const n=ej/* .notifyManager.batch */.Vr.batch(()=>this.#q.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(eF/* .noop */.ZT).catch(eF/* .noop */.ZT)}invalidateQueries(e,t={}){return ej/* .notifyManager.batch */.Vr.batch(()=>{this.#q.findAll(e).forEach(e=>{e.invalidate()});if(e?.refetchType==="none"){return Promise.resolve()}return this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)})}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??true};const n=ej/* .notifyManager.batch */.Vr.batch(()=>this.#q.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);if(!r.throwOnError){t=t.catch(eF/* .noop */.ZT)}return e.state.fetchStatus==="paused"?Promise.resolve():t}));return Promise.all(n).then(eF/* .noop */.ZT)}fetchQuery(e){const t=this.defaultQueryOptions(e);if(t.retry===void 0){t.retry=false}const r=this.#q.build(this,t);return r.isStaleByTime((0,eF/* .resolveStaleTime */.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(eF/* .noop */.ZT).catch(eF/* .noop */.ZT)}fetchInfiniteQuery(e){e.behavior=eV(e.pages);return this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(eF/* .noop */.ZT).catch(eF/* .noop */.ZT)}ensureInfiniteQueryData(e){e.behavior=eV(e.pages);return this.ensureQueryData(e)}resumePausedMutations(){if(eH/* .onlineManager.isOnline */.N.isOnline()){return this.#i.resumePausedMutations()}return Promise.resolve()}getQueryCache(){return this.#q}getMutationCache(){return this.#i}getDefaultOptions(){return this.#g}setDefaultOptions(e){this.#g=e}setQueryDefaults(e,t){this.#H.set((0,eF/* .hashKey */.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#H.values()];const r={};t.forEach(t=>{if((0,eF/* .partialMatchKey */.to)(e,t.queryKey)){Object.assign(r,t.defaultOptions)}});return r}setMutationDefaults(e,t){this.#V.set((0,eF/* .hashKey */.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#V.values()];const r={};t.forEach(t=>{if((0,eF/* .partialMatchKey */.to)(e,t.mutationKey)){Object.assign(r,t.defaultOptions)}});return r}defaultQueryOptions(e){if(e._defaulted){return e}const t={...this.#g.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:true};if(!t.queryHash){t.queryHash=(0,eF/* .hashQueryKeyByOptions */.Rm)(t.queryKey,t)}if(t.refetchOnReconnect===void 0){t.refetchOnReconnect=t.networkMode!=="always"}if(t.throwOnError===void 0){t.throwOnError=!!t.suspense}if(!t.networkMode&&t.persister){t.networkMode="offlineFirst"}if(t.queryFn===eF/* .skipToken */.CN){t.enabled=false}return t}defaultMutationOptions(e){if(e?._defaulted){return e}return{...this.#g.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:true}}clear(){this.#q.clear();this.#i.clear()}};//# sourceMappingURL=queryClient.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var eY=r(99469);// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js
var e0=r(89250);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/App.tsx
var e1=()=>{var[r]=(0,t.useState)(()=>new eQ({defaultOptions:{queries:{retry:false,refetchOnWindowFocus:false,networkMode:"always"},mutations:{retry:false,networkMode:"always"}}}));var n=(0,e0/* .useRoutes */.V$)(o/* ["default"] */.Z);return/*#__PURE__*/(0,e/* .jsx */.tZ)(eP,{children:/*#__PURE__*/(0,e/* .jsx */.tZ)(eY/* .QueryClientProvider */.aH,{client:r,children:/*#__PURE__*/(0,e/* .jsx */.tZ)(u/* ["default"] */.Z,{position:"bottom-center",children:/*#__PURE__*/(0,e/* .jsx */.tZ)(s/* .CourseBuilderSlotProvider */.b,{children:/*#__PURE__*/(0,e/* .jsxs */.BX)(eD/* .ModalProvider */.D,{children:[/*#__PURE__*/(0,e/* .jsx */.tZ)(eL/* .Global */.xB,{styles:[(0,eI/* .createGlobalCss */.C)()]}),n]})})})})})};/* ESM default export */const e2=e1;// EXTERNAL MODULE: external "ReactDOM"
var e4=r(61533);// EXTERNAL MODULE: ./node_modules/@remix-run/router/dist/router.js
var e3=r(12599);// CONCATENATED MODULE: ./node_modules/react-router-dom/dist/index.js
/**
 * React Router DOM v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function e5(){e5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return e5.apply(this,arguments)}function e6(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var i,a;for(a=0;a<n.length;a++){i=n[a];if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}const e8="get";const e9="application/x-www-form-urlencoded";function e7(e){return e!=null&&typeof e.tagName==="string"}function te(e){return e7(e)&&e.tagName.toLowerCase()==="button"}function tt(e){return e7(e)&&e.tagName.toLowerCase()==="form"}function tr(e){return e7(e)&&e.tagName.toLowerCase()==="input"}function tn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ti(e,t){return e.button===0&&// Ignore everything but left clicks
(!t||t==="_self")&&// Let browser handle "target=_blank" etc.
!tn(e)// Ignore clicks with modifier keys
}/**
 * Creates a URLSearchParams object using the given initializer.
 *
 * This is identical to `new URLSearchParams(init)` except it also
 * supports arrays as values in the object form of the initializer
 * instead of just strings. This is convenient when you need multiple
 * values for a given key, but don't want to use an array initializer.
 *
 * For example, instead of:
 *
 *   let searchParams = new URLSearchParams([
 *     ['sort', 'name'],
 *     ['sort', 'price']
 *   ]);
 *
 * you can do:
 *
 *   let searchParams = createSearchParams({
 *     sort: ['name', 'price']
 *   });
 */function ta(e){if(e===void 0){e=""}return new URLSearchParams(typeof e==="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}function to(e,t){let r=ta(e);if(t){// Use `defaultSearchParams.forEach(...)` here instead of iterating of
// `defaultSearchParams.keys()` to work-around a bug in Firefox related to
// web extensions. Relevant Bugzilla tickets:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1414602
// https://bugzilla.mozilla.org/show_bug.cgi?id=1023984
t.forEach((e,n)=>{if(!r.has(n)){t.getAll(n).forEach(e=>{r.append(n,e)})}})}return r}// One-time check for submitter support
let ts=null;function tu(){if(ts===null){try{new FormData(document.createElement("form"),// @ts-expect-error if FormData supports the submitter parameter, this will throw
0);ts=false}catch(e){ts=true}}return ts}const tl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tc(e){if(e!=null&&!tl.has(e)){false?0:void 0;return null}return e}function td(e,t){let r;let n;let i;let a;let o;if(tt(e)){// When grabbing the action from the element, it will have had the basename
// prefixed to ensure non-JS scenarios work, so strip it since we'll
// re-prefix in the router
let o=e.getAttribute("action");n=o?stripBasename(o,t):null;r=e.getAttribute("method")||e8;i=tc(e.getAttribute("enctype"))||e9;a=new FormData(e)}else if(te(e)||tr(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null){throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>')}// <button>/<input type="submit"> may override attributes of <form>
// When grabbing the action from the element, it will have had the basename
// prefixed to ensure non-JS scenarios work, so strip it since we'll
// re-prefix in the router
let s=e.getAttribute("formaction")||o.getAttribute("action");n=s?stripBasename(s,t):null;r=e.getAttribute("formmethod")||o.getAttribute("method")||e8;i=tc(e.getAttribute("formenctype"))||tc(o.getAttribute("enctype"))||e9;// Build a FormData object populated from a form and submitter
a=new FormData(o,e);// If this browser doesn't support the `FormData(el, submitter)` format,
// then tack on the submitter value at the end.  This is a lightweight
// solution that is not 100% spec compliant.  For complete support in older
// browsers, consider using the `formdata-submitter-polyfill` package
if(!tu()){let{name:t,type:r,value:n}=e;if(r==="image"){let e=t?t+".":"";a.append(e+"x","0");a.append(e+"y","0")}else if(t){a.append(t,n)}}}else if(e7(e)){throw new Error("Cannot submit element that is not <form>, <button>, or "+'<input type="submit|image">')}else{r=e8;n=null;i=e9;o=e}// Send body for <Form encType="text/plain" so we encode it into text
if(a&&i==="text/plain"){o=a;a=undefined}return{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}const tf=/* unused pure expression or super */null&&["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],tp=/* unused pure expression or super */null&&["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],th=/* unused pure expression or super */null&&["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];// HEY YOU! DON'T TOUCH THIS VARIABLE!
//
// It is replaced with the proper version at build time via a babel plugin in
// the rollup config.
//
// Export a global property onto the window for React Router detection by the
// Core Web Vitals Technology Report.  This way they can configure the `wappalyzer`
// to detect and properly classify live websites as being built with React Router:
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
const tv="6";try{window.__reactRouterVersion=tv}catch(e){// no-op
}function tm(e,t){return createRouter({basename:t==null?void 0:t.basename,future:e5({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createBrowserHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||tb(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function tg(e,t){return createRouter({basename:t==null?void 0:t.basename,future:e5({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createHashHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||tb(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function tb(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;if(t&&t.errors){t=e5({},t,{errors:ty(t.errors)})}return t}function ty(e){if(!e)return null;let t=Object.entries(e);let r={};for(let[e,n]of t){// Hey you!  If you change this, please change the corresponding logic in
// serializeErrors in react-router-dom/server.tsx :)
if(n&&n.__type==="RouteErrorResponse"){r[e]=new UNSAFE_ErrorResponseImpl(n.status,n.statusText,n.data,n.internal===true)}else if(n&&n.__type==="Error"){// Attempt to reconstruct the right type of Error (i.e., ReferenceError)
if(n.__subType){let t=window[n.__subType];if(typeof t==="function"){try{// @ts-expect-error
let i=new t(n.message);// Wipe away the client-side stack trace.  Nothing to fill it in with
// because we don't serialize SSR stack traces for security reasons
i.stack="";r[e]=i}catch(e){// no-op - fall through and create a normal Error
}}}if(r[e]==null){let t=new Error(n.message);// Wipe away the client-side stack trace.  Nothing to fill it in with
// because we don't serialize SSR stack traces for security reasons
t.stack="";r[e]=t}}else{r[e]=n}}return r}const t_=/*#__PURE__*//* unused pure expression or super */null&&React.createContext({isTransitioning:false});if(false){}const tw=/*#__PURE__*/t.createContext(new Map);if(false){}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Components
////////////////////////////////////////////////////////////////////////////////
/**
  Webpack + React 17 fails to compile on any of the following because webpack
  complains that `startTransition` doesn't exist in `React`:
  * import { startTransition } from "react"
  * import * as React from from "react";
    "startTransition" in React ? React.startTransition(() => setState()) : setState()
  * import * as React from from "react";
    "startTransition" in React ? React["startTransition"](() => setState()) : setState()

  Moving it to a constant such as the following solves the Webpack/React 17 issue:
  * import * as React from from "react";
    const START_TRANSITION = "startTransition";
    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()

  However, that introduces webpack/terser minification issues in production builds
  in React 18 where minification/obfuscation ends up removing the call of
  React.startTransition entirely from the first half of the ternary.  Grabbing
  this exported reference once up front resolves that issue.

  See https://github.com/remix-run/react-router/issues/10579
*/const tx="startTransition";const tE=t[tx];const tZ="flushSync";const tS=e4[tZ];const tO="useId";const tk=t[tO];function tT(e){if(tE){tE(e)}else{e()}}function tC(e){if(tS){tS(e)}else{e()}}class tR{constructor(){this.status="pending";this.promise=new Promise((e,t)=>{this.resolve=t=>{if(this.status==="pending"){this.status="resolved";e(t)}};this.reject=e=>{if(this.status==="pending"){this.status="rejected";t(e)}}})}}/**
 * Given a Remix Router instance, render the appropriate UI
 */function tA(e){let{fallbackElement:t,router:r,future:n}=e;let[i,a]=React.useState(r.state);let[o,s]=React.useState();let[u,l]=React.useState({isTransitioning:false});let[c,d]=React.useState();let[f,p]=React.useState();let[h,v]=React.useState();let m=React.useRef(new Map);let{v7_startTransition:g}=n||{};let b=React.useCallback(e=>{if(g){tT(e)}else{e()}},[g]);let y=React.useCallback((e,t)=>{let{deletedFetchers:n,flushSync:i,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{if(e.data!==undefined){m.current.set(t,e.data)}});n.forEach(e=>m.current.delete(e));let u=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!=="function";// If this isn't a view transition or it's not available in this browser,
// just update and be done with it
if(!o||u){if(i){tC(()=>a(e))}else{b(()=>a(e))}return}// flushSync + startViewTransition
if(i){// Flush through the context to mark DOM elements as transition=ing
tC(()=>{// Cancel any pending transitions
if(f){c&&c.resolve();f.skipTransition()}l({isTransitioning:true,flushSync:true,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});// Update the DOM
let t=r.window.document.startViewTransition(()=>{tC(()=>a(e))});// Clean up after the animation completes
t.finished.finally(()=>{tC(()=>{d(undefined);p(undefined);s(undefined);l({isTransitioning:false})})});tC(()=>p(t));return}// startTransition + startViewTransition
if(f){// Interrupting an in-progress transition, cancel and let everything flush
// out, and then kick off a new transition from the interruption state
c&&c.resolve();f.skipTransition();v({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}else{// Completed navigation update with opted-in view transitions, let 'er rip
s(e);l({isTransitioning:true,flushSync:false,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}},[r.window,f,c,m,b]);// Need to use a layout effect here so we are subscribed early enough to
// pick up on any render-driven redirects/navigations (useEffect/<Navigate>)
React.useLayoutEffect(()=>r.subscribe(y),[r,y]);// When we start a view transition, create a Deferred we can use for the
// eventual "completed" render
React.useEffect(()=>{if(u.isTransitioning&&!u.flushSync){d(new tR)}},[u]);// Once the deferred is created, kick off startViewTransition() to update the
// DOM and then wait on the Deferred to resolve (indicating the DOM update has
// happened)
React.useEffect(()=>{if(c&&o&&r.window){let e=o;let t=c.promise;let n=r.window.document.startViewTransition(async()=>{b(()=>a(e));await t});n.finished.finally(()=>{d(undefined);p(undefined);s(undefined);l({isTransitioning:false})});p(n)}},[b,o,c,r.window]);// When the new location finally renders and is committed to the DOM, this
// effect will run to resolve the transition
React.useEffect(()=>{if(c&&o&&i.location.key===o.location.key){c.resolve()}},[c,f,i.location,o]);// If we get interrupted with a new navigation during a transition, we skip
// the active transition, let it cleanup, then kick it off again here
React.useEffect(()=>{if(!u.isTransitioning&&h){s(h.state);l({isTransitioning:true,flushSync:false,currentLocation:h.currentLocation,nextLocation:h.nextLocation});v(undefined)}},[u.isTransitioning,h]);React.useEffect(()=>{false?0:void 0;// Only log this once on initial mount
// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);let _=React.useMemo(()=>{return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:n==null?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:true,state:t,preventScrollReset:n==null?void 0:n.preventScrollReset})}},[r]);let w=r.basename||"/";let x=React.useMemo(()=>({router:r,navigator:_,static:false,basename:w}),[r,_,w]);let E=React.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n,r.future),[n,r.future]);// The fragment and {null} here are important!  We need them to keep React 18's
// useId happy when we are server-rendering since we may have a <script> here
// containing the hydrated server-side staticContext (from StaticRouterProvider).
// useId relies on the component tree structure to generate deterministic id's
// so we need to ensure it remains the same on the client even though
// we don't need the <script> tag
return /*#__PURE__*/React.createElement(React.Fragment,null,/*#__PURE__*/React.createElement(UNSAFE_DataRouterContext.Provider,{value:x},/*#__PURE__*/React.createElement(UNSAFE_DataRouterStateContext.Provider,{value:i},/*#__PURE__*/React.createElement(tw.Provider,{value:m.current},/*#__PURE__*/React.createElement(t_.Provider,{value:u},/*#__PURE__*/React.createElement(Router,{basename:w,location:i.location,navigationType:i.historyAction,navigator:_,future:E},i.initialized||r.future.v7_partialHydration?/*#__PURE__*/React.createElement(tM,{routes:r.routes,future:r.future,state:i}):t))))),null)}// Memoize to avoid re-renders when updating `ViewTransitionContext`
const tM=/*#__PURE__*//* unused pure expression or super */null&&React.memo(tP);function tP(e){let{routes:t,future:r,state:n}=e;return UNSAFE_useRoutesImpl(t,undefined,n,r)}/**
 * A `<Router>` for use in web browsers. Provides the cleanest URLs.
 */function tD(e){let{basename:t,children:r,future:n,window:i}=e;let a=React.useRef();if(a.current==null){a.current=createBrowserHistory({window:i,v5Compat:true})}let o=a.current;let[s,u]=React.useState({action:o.action,location:o.location});let{v7_startTransition:l}=n||{};let c=React.useCallback(e=>{l&&tE?tE(()=>u(e)):u(e)},[u,l]);React.useLayoutEffect(()=>o.listen(c),[o,c]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n),[n]);return /*#__PURE__*/React.createElement(Router,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}/**
 * A `<Router>` for use in web browsers. Stores the location in the hash
 * portion of the URL so it is not sent to the server.
 */function tI(e){let{basename:r,children:n,future:i,window:a}=e;let o=t.useRef();if(o.current==null){o.current=(0,e3/* .createHashHistory */.q_)({window:a,v5Compat:true})}let s=o.current;let[u,l]=t.useState({action:s.action,location:s.location});let{v7_startTransition:c}=i||{};let d=t.useCallback(e=>{c&&tE?tE(()=>l(e)):l(e)},[l,c]);t.useLayoutEffect(()=>s.listen(d),[s,d]);t.useEffect(()=>(0,e0/* .UNSAFE_logV6DeprecationWarnings */.$A)(i),[i]);return /*#__PURE__*/t.createElement(e0/* .Router */.F0,{basename:r,children:n,location:u.location,navigationType:u.action,navigator:s,future:i})}/**
 * A `<Router>` that accepts a pre-instantiated history object. It's important
 * to note that using your own history object is highly discouraged and may add
 * two versions of the history library to your bundles unless you use the same
 * version of the history library that React Router uses internally.
 */function tL(e){let{basename:t,children:r,future:n,history:i}=e;let[a,o]=React.useState({action:i.action,location:i.location});let{v7_startTransition:s}=n||{};let u=React.useCallback(e=>{s&&tE?tE(()=>o(e)):o(e)},[o,s]);React.useLayoutEffect(()=>i.listen(u),[i,u]);React.useEffect(()=>UNSAFE_logV6DeprecationWarnings(n),[n]);return /*#__PURE__*/React.createElement(Router,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}if(false){}const tF=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";const tN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;/**
 * The public API for rendering a history-aware `<a>`.
 */const tj=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef(function e(e,t){let{onClick:r,relative:n,reloadDocument:i,replace:a,state:o,target:s,to:u,preventScrollReset:l,viewTransition:c}=e,d=e6(e,tf);let{basename:f}=React.useContext(UNSAFE_NavigationContext);// Rendered into <a href> for absolute URLs
let p;let h=false;if(typeof u==="string"&&tN.test(u)){// Render the absolute href server- and client-side
p=u;// Only check for external origins client-side
if(tF){try{let e=new URL(window.location.href);let t=u.startsWith("//")?new URL(e.protocol+u):new URL(u);let r=stripBasename(t.pathname,f);if(t.origin===e.origin&&r!=null){// Strip the protocol/origin/basename for same-origin absolute URLs
u=r+t.search+t.hash}else{h=true}}catch(e){// We can't do external URL detection without a valid URL
false?0:void 0}}}// Rendered into <a href> for relative URLs
let v=useHref(u,{relative:n});let m=t$(u,{replace:a,state:o,target:s,preventScrollReset:l,relative:n,viewTransition:c});function g(e){if(r)r(e);if(!e.defaultPrevented){m(e)}}return(/*#__PURE__*/// eslint-disable-next-line jsx-a11y/anchor-has-content
React.createElement("a",e5({},d,{href:p||v,onClick:h||i?r:g,ref:t,target:s})))});if(false){}/**
 * A `<Link>` wrapper that knows if it's "active" or not.
 */const tB=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef(function e(e,t){let{"aria-current":r="page",caseSensitive:n=false,className:i="",end:a=false,style:o,to:s,viewTransition:u,children:l}=e,c=e6(e,tp);let d=useResolvedPath(s,{relative:c.relative});let f=useLocation();let p=React.useContext(UNSAFE_DataRouterStateContext);let{navigator:h,basename:v}=React.useContext(UNSAFE_NavigationContext);let m=p!=null&&// Conditional usage is OK here because the usage of a data router is static
// eslint-disable-next-line react-hooks/rules-of-hooks
t7(d)&&u===true;let g=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname;let b=f.pathname;let y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;if(!n){b=b.toLowerCase();y=y?y.toLowerCase():null;g=g.toLowerCase()}if(y&&v){y=stripBasename(y,v)||y}// If the `to` has a trailing slash, look at that exact spot.  Otherwise,
// we're looking for a slash _after_ what's in `to`.  For example:
//
// <NavLink to="/users"> and <NavLink to="/users/">
// both want to look for a / at index 6 to match URL `/users/matt`
const _=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let w=b===g||!a&&b.startsWith(g)&&b.charAt(_)==="/";let x=y!=null&&(y===g||!a&&y.startsWith(g)&&y.charAt(g.length)==="/");let E={isActive:w,isPending:x,isTransitioning:m};let Z=w?r:undefined;let S;if(typeof i==="function"){S=i(E)}else{// If the className prop is not a function, we use a default `active`
// class for <NavLink />s that are active. In v5 `active` was the default
// value for `activeClassName`, but we are removing that API and can still
// use the old default behavior for a cleaner upgrade path and keep the
// simple styling rules working as they currently do.
S=[i,w?"active":null,x?"pending":null,m?"transitioning":null].filter(Boolean).join(" ")}let O=typeof o==="function"?o(E):o;return /*#__PURE__*/React.createElement(tj,e5({},c,{"aria-current":Z,className:S,ref:t,style:O,to:s,viewTransition:u}),typeof l==="function"?l(E):l)});if(false){}/**
 * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
 * that the interaction with the server is with `fetch` instead of new document
 * requests, allowing components to add nicer UX to the page as the form is
 * submitted and returns with data.
 */const tU=/*#__PURE__*//* unused pure expression or super */null&&React.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:i,replace:a,state:o,method:s=e8,action:u,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:f}=e,p=e6(e,th);let h=tY();let v=t0(u,{relative:c});let m=s.toLowerCase()==="get"?"get":"post";let g=e=>{l&&l(e);if(e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;let i=(t==null?void 0:t.getAttribute("formmethod"))||s;h(t||e.currentTarget,{fetcherKey:r,method:i,navigate:n,replace:a,state:o,relative:c,preventScrollReset:d,viewTransition:f})};return /*#__PURE__*/React.createElement("form",e5({ref:t,method:m,action:v,onSubmit:i?l:g},p))});if(false){}/**
 * This component will emulate the browser's scroll restoration on location
 * changes.
 */function tW(e){let{getKey:t,storageKey:r}=e;t5({getKey:t,storageKey:r});return null}if(false){}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region Hooks
////////////////////////////////////////////////////////////////////////////////
var tz;(function(e){e["UseScrollRestoration"]="useScrollRestoration";e["UseSubmit"]="useSubmit";e["UseSubmitFetcher"]="useSubmitFetcher";e["UseFetcher"]="useFetcher";e["useViewTransitionState"]="useViewTransitionState"})(tz||(tz={}));var tJ;(function(e){e["UseFetcher"]="useFetcher";e["UseFetchers"]="useFetchers";e["UseScrollRestoration"]="useScrollRestoration"})(tJ||(tJ={}));// Internal hooks
function tq(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function tH(e){let t=React.useContext(UNSAFE_DataRouterContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}function tV(e){let t=React.useContext(UNSAFE_DataRouterStateContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}// External hooks
/**
 * Handles the click behavior for router `<Link>` components. This is useful if
 * you need to create custom `<Link>` components with the same click behavior we
 * use in our exported `<Link>`.
 */function t$(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t;let u=useNavigate();let l=useLocation();let c=useResolvedPath(e,{relative:o});return React.useCallback(t=>{if(ti(t,r)){t.preventDefault();// If the URL hasn't changed, a regular <a> will do a replace instead of
// a push, so do the same here unless the replace prop is explicitly set
let r=n!==undefined?n:createPath(l)===createPath(c);u(e,{replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[l,u,c,n,i,r,e,a,o,s])}/**
 * A convenient wrapper for reading and writing search parameters via the
 * URLSearchParams interface.
 */function tG(e){false?0:void 0;let t=React.useRef(ta(e));let r=React.useRef(false);let n=useLocation();let i=React.useMemo(()=>// Only merge in the defaults if we haven't yet called setSearchParams.
    // Once we call that we want those to take precedence, otherwise you can't
    // remove a param with setSearchParams({}) if it has an initial value
    to(n.search,r.current?null:t.current),[n.search]);let a=useNavigate();let o=React.useCallback((e,t)=>{const n=ta(typeof e==="function"?e(i):e);r.current=true;a("?"+n,t)},[a,i]);return[i,o]}function tX(){if(typeof document==="undefined"){throw new Error("You are calling submit during the server render. "+"Try calling submit within a `useEffect` or callback instead.")}}let tK=0;let tQ=()=>"__"+String(++tK)+"__";/**
 * Returns a function that may be used to programmatically submit a form (or
 * some arbitrary data) to the server.
 */function tY(){let{router:e}=tH(tz.UseSubmit);let{basename:t}=React.useContext(UNSAFE_NavigationContext);let r=UNSAFE_useRouteId();return React.useCallback(function(n,i){if(i===void 0){i={}}tX();let{action:a,method:o,encType:s,formData:u,body:l}=td(n,t);if(i.navigate===false){let t=i.fetcherKey||tQ();e.fetch(t,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else{e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:u,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})}},[e,t,r])}// v7: Eventually we should deprecate this entirely in favor of using the
// router method directly?
function t0(e,t){let{relative:r}=t===void 0?{}:t;let{basename:n}=React.useContext(UNSAFE_NavigationContext);let i=React.useContext(UNSAFE_RouteContext);!i?false?0:UNSAFE_invariant(false):void 0;let[a]=i.matches.slice(-1);// Shallow clone path so we can modify it below, otherwise we modify the
// object referenced by useMemo inside useResolvedPath
let o=e5({},useResolvedPath(e?e:".",{relative:r}));// If no action was specified, browsers will persist current search params
// when determining the path, so match that behavior
// https://github.com/remix-run/remix/issues/927
let s=useLocation();if(e==null){// Safe to write to this directly here since if action was undefined, we
// would have called useResolvedPath(".") which will never include a search
o.search=s.search;// When grabbing search params from the URL, remove any included ?index param
// since it might not apply to our contextual route.  We add it back based
// on match.route.index below
let e=new URLSearchParams(o.search);let t=e.getAll("index");let r=t.some(e=>e==="");if(r){e.delete("index");t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();o.search=r?"?"+r:""}}if((!e||e===".")&&a.route.index){o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"}// If we're operating within a basename, prepend it to the pathname prior
// to creating the form action.  If this is a root navigation, then just use
// the raw basename which allows the basename to have full control over the
// presence of a trailing slash on root actions
if(n!=="/"){o.pathname=o.pathname==="/"?n:joinPaths([n,o.pathname])}return createPath(o)}// TODO: (v7) Change the useFetcher generic default from `any` to `unknown`
/**
 * Interacts with route loaders and actions without causing a navigation. Great
 * for any interaction that stays on the same page.
 */function t1(e){var t;let{key:r}=e===void 0?{}:e;let{router:n}=tH(tz.UseFetcher);let i=tV(tJ.UseFetcher);let a=React.useContext(tw);let o=React.useContext(UNSAFE_RouteContext);let s=(t=o.matches[o.matches.length-1])==null?void 0:t.route.id;!a?false?0:UNSAFE_invariant(false):void 0;!o?false?0:UNSAFE_invariant(false):void 0;!(s!=null)?false?0:UNSAFE_invariant(false):void 0;// Fetcher key handling
// OK to call conditionally to feature detect `useId`
// eslint-disable-next-line react-hooks/rules-of-hooks
let u=tk?tk():"";let[l,c]=React.useState(r||u);if(r&&r!==l){c(r)}else if(!l){// We will only fall through here when `useId` is not available
c(tQ())}// Registration/cleanup
React.useEffect(()=>{n.getFetcher(l);return()=>{// Tell the router we've unmounted - if v7_fetcherPersist is enabled this
// will not delete immediately but instead queue up a delete after the
// fetcher returns to an `idle` state
n.deleteFetcher(l)}},[n,l]);// Fetcher additions
let d=React.useCallback((e,t)=>{!s?false?0:UNSAFE_invariant(false):void 0;n.fetch(l,s,e,t)},[l,s,n]);let f=tY();let p=React.useCallback((e,t)=>{f(e,e5({},t,{navigate:false,fetcherKey:l}))},[l,f]);let h=React.useMemo(()=>{let e=/*#__PURE__*/React.forwardRef((e,t)=>{return /*#__PURE__*/React.createElement(tU,e5({},e,{navigate:false,fetcherKey:l,ref:t}))});if(false){}return e},[l]);// Exposed FetcherWithComponents
let v=i.fetchers.get(l)||IDLE_FETCHER;let m=a.get(l);let g=React.useMemo(()=>e5({Form:h,submit:p,load:d},v,{data:m}),[h,p,d,v,m]);return g}/**
 * Provides all fetchers currently on the page. Useful for layouts and parent
 * routes that need to provide pending/optimistic UI regarding the fetch.
 */function t2(){let e=tV(tJ.UseFetchers);return Array.from(e.fetchers.entries()).map(e=>{let[t,r]=e;return e5({},r,{key:t})})}const t4="react-router-scroll-positions";let t3=/* unused pure expression or super */null&&{};/**
 * When rendered inside a RouterProvider, will restore scroll positions on navigations
 */function t5(e){let{getKey:t,storageKey:r}=e===void 0?{}:e;let{router:n}=tH(tz.UseScrollRestoration);let{restoreScrollPosition:i,preventScrollReset:a}=tV(tJ.UseScrollRestoration);let{basename:o}=React.useContext(UNSAFE_NavigationContext);let s=useLocation();let u=useMatches();let l=useNavigation();// Trigger manual scroll restoration while we're active
React.useEffect(()=>{window.history.scrollRestoration="manual";return()=>{window.history.scrollRestoration="auto"}},[]);// Save positions on pagehide
t8(React.useCallback(()=>{if(l.state==="idle"){let e=(t?t(s,u):null)||s.key;t3[e]=window.scrollY}try{sessionStorage.setItem(r||t4,JSON.stringify(t3))}catch(e){false?0:void 0}window.history.scrollRestoration="auto"},[r,t,l.state,s,u]));// Read in any saved scroll locations
if(typeof document!=="undefined"){// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||t4);if(e){t3=JSON.parse(e)}}catch(e){// no-op, use default empty object
}},[r]);// Enable scroll restoration in the router
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{let e=t&&o!=="/"?(e,r)=>t(e5({},e,{pathname:stripBasename(e.pathname,o)||e.pathname}),r):t;let r=n==null?void 0:n.enableScrollRestoration(t3,()=>window.scrollY,e);return()=>r&&r()},[n,o,t]);// Restore scrolling when state.restoreScrollPosition changes
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useLayoutEffect(()=>{// Explicit false means don't do anything (used for submissions)
if(i===false){return}// been here before, scroll to it
if(typeof i==="number"){window.scrollTo(0,i);return}// try to scroll to the hash
if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}// Don't reset if this navigation opted out
if(a===true){return}// otherwise go to the top on new locations
window.scrollTo(0,0)},[s,i,a])}}/**
 * Setup a callback to be fired on the window's `beforeunload` event. This is
 * useful for saving some data to `window.localStorage` just before the page
 * refreshes.
 *
 * Note: The `callback` argument should be a function created with
 * `React.useCallback()`.
 */function t6(e,t){let{capture:r}=t||{};React.useEffect(()=>{let t=r!=null?{capture:r}:undefined;window.addEventListener("beforeunload",e,t);return()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}/**
 * Setup a callback to be fired on the window's `pagehide` event. This is
 * useful for saving some data to `window.localStorage` just before the page
 * refreshes.  This event is better supported than beforeunload across browsers.
 *
 * Note: The `callback` argument should be a function created with
 * `React.useCallback()`.
 */function t8(e,t){let{capture:r}=t||{};React.useEffect(()=>{let t=r!=null?{capture:r}:undefined;window.addEventListener("pagehide",e,t);return()=>{window.removeEventListener("pagehide",e,t)}},[e,r])}/**
 * Wrapper around useBlocker to show a window.confirm prompt to users instead
 * of building a custom UI with useBlocker.
 *
 * Warning: This has *a lot of rough edges* and behaves very differently (and
 * very incorrectly in some cases) across browsers if user click addition
 * back/forward navigations while the confirm is open.  Use at your own risk.
 */function t9(e){let{when:t,message:r}=e;let n=useBlocker(t);React.useEffect(()=>{if(n.state==="blocked"){let e=window.confirm(r);if(e){// This timeout is needed to avoid a weird "race" on POP navigations
// between the `window.history` revert navigation and the result of
// `window.confirm`
setTimeout(n.proceed,0)}else{n.reset()}}},[n,r]);React.useEffect(()=>{if(n.state==="blocked"&&!t){n.reset()}},[n,t])}/**
 * Return a boolean indicating if there is an active view transition to the
 * given href.  You can use this value to render CSS classes or viewTransitionName
 * styles onto your elements
 *
 * @param href The destination href
 * @param [opts.relative] Relative routing type ("route" | "path")
 */function t7(e,t){if(t===void 0){t={}}let r=React.useContext(t_);!(r!=null)?false?0:UNSAFE_invariant(false):void 0;let{basename:n}=tH(tz.useViewTransitionState);let i=useResolvedPath(e,{relative:t.relative});if(!r.isTransitioning){return false}let a=stripBasename(r.currentLocation.pathname,n)||r.currentLocation.pathname;let o=stripBasename(r.nextLocation.pathname,n)||r.nextLocation.pathname;// Transition is active if we're going to or coming from the indicated
// destination.  This ensures that other PUSH navigations that reverse
// an indicated transition apply.  I.e., on the list view you have:
//
//   <NavLink to="/details/1" viewTransition>
//
// If you click the breadcrumb back to the list view:
//
//   <NavLink to="/list" viewTransition>
//
// We should apply the transition because it's indicated as active going
// from /list -> /details/1 and therefore should be active on the reverse
// (even though this isn't strictly a POP reverse)
return matchPath(i.pathname,o)!=null||matchPath(i.pathname,a)!=null}//#endregion
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/index.tsx
var re=i.createRoot(document.getElementById("tutor-course-builder"));re.render(/*#__PURE__*/(0,e/* .jsx */.tZ)(n().StrictMode,{children:/*#__PURE__*/(0,e/* .jsx */.tZ)(tI,{children:/*#__PURE__*/(0,e/* .jsx */.tZ)(a/* ["default"] */.Z,{children:/*#__PURE__*/(0,e/* .jsx */.tZ)(e2,{})})})}))})()})();