(()=>{var e={25815:function(e,t,r){"use strict";r.d(t,{A:()=>y});/* import */var n=r(65047);/* import */var i=r(65070);/* import */var a=r(30735);/* import */var o=r(7230);/* import */var s=r(97467);/* import */var u=r(35095);/* import */var l=r(27292);var c=function e(e,t,r){var n=0;var a=0;while(true){n=a;a=(0,i/* .peek */.se)();// &\f
if(n===38&&a===12){t[r]=1}if((0,i/* .token */.Sh)(a)){break}(0,i/* .next */.K2)()}return(0,i/* .slice */.di)(e,i/* .position */.G1)};var d=function e(e,t){// pretend we've started with a comma
var r=-1;var n=44;do{switch((0,i/* .token */.Sh)(n)){case 0:// &\f
if(n===38&&(0,i/* .peek */.se)()===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 */.G1-1,t,r);break;case 2:e[r]+=(0,i/* .delimit */.Tb)(n);break;case 4:// comma
if(n===44){// colon
e[++r]=(0,i/* .peek */.se)()===58?"&\f":"";t[r]=e[r].length;break}// fallthrough
default:e[r]+=(0,a/* .from */.HT)(n)}}while(n=(0,i/* .next */.K2)())return e};var f=function e(e,t){return(0,i/* .dealloc */.VF)(d((0,i/* .alloc */.c4)(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 */.tW)(e,t)){// color-adjust
case 5103:return o/* .WEBKIT */.j+"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 */.j+e+e;// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:case 4246:case 4810:case 6968:case 2756:return o/* .WEBKIT */.j+e+o/* .MOZ */.vd+e+o.MS+e+e;// flex, flex-direction
case 6828:case 4268:return o/* .WEBKIT */.j+e+o.MS+e+e;// order
case 6165:return o/* .WEBKIT */.j+e+o.MS+"flex-"+e+e;// align-items
case 5187:return o/* .WEBKIT */.j+e+(0,a/* .replace */.HC)(e,/(\w+).+(:[^]+)/,o/* .WEBKIT */.j+"box-$1$2"+o.MS+"flex-$1$2")+e;// align-self
case 5443:return o/* .WEBKIT */.j+e+o.MS+"flex-item-"+(0,a/* .replace */.HC)(e,/flex-|-self/,"")+e;// align-content
case 4675:return o/* .WEBKIT */.j+e+o.MS+"flex-line-pack"+(0,a/* .replace */.HC)(e,/align-content|flex-|-self/,"")+e;// flex-shrink
case 5548:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"shrink","negative")+e;// flex-basis
case 5292:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"basis","preferred-size")+e;// flex-grow
case 6060:return o/* .WEBKIT */.j+"box-"+(0,a/* .replace */.HC)(e,"-grow","")+o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,"grow","positive")+e;// transition
case 4554:return o/* .WEBKIT */.j+(0,a/* .replace */.HC)(e,/([^-])(transform)/g,"$1"+o/* .WEBKIT */.j+"$2")+e;// cursor
case 6187:return(0,a/* .replace */.HC)((0,a/* .replace */.HC)((0,a/* .replace */.HC)(e,/(zoom-|grab)/,o/* .WEBKIT */.j+"$1"),/(image-set)/,o/* .WEBKIT */.j+"$1"),e,"")+e;// background, background-image
case 5495:case 3959:return(0,a/* .replace */.HC)(e,/(image-set\([^]*)/,o/* .WEBKIT */.j+"$1"+"$`$1");// justify-content
case 4968:return(0,a/* .replace */.HC)((0,a/* .replace */.HC)(e,/(.+:)(flex-)?(.*)/,o/* .WEBKIT */.j+"box-pack:$3"+o.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o/* .WEBKIT */.j+e+e;// (margin|padding)-inline-(start|end)
case 4095:case 3583:case 4068:case 2532:return(0,a/* .replace */.HC)(e,/(.+)-inline(.+)/,o/* .WEBKIT */.j+"$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 */.b2)(e)-1-t>6)switch((0,a/* .charat */.wN)(e,t+1)){// (m)ax-content, (m)in-content
case 109:// -
if((0,a/* .charat */.wN)(e,t+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return(0,a/* .replace */.HC)(e,/(.+:)(.+)-([^]+)/,"$1"+o/* .WEBKIT */.j+"$2-$3"+"$1"+o/* .MOZ */.vd+((0,a/* .charat */.wN)(e,t+3)==108?"$3":"$2-$3"))+e;// (s)tretch
case 115:return~(0,a/* .indexof */.K5)(e,"stretch")?m((0,a/* .replace */.HC)(e,"stretch","fill-available"),t)+e:e}break;// position: sticky
case 4949:// (s)ticky?
if((0,a/* .charat */.wN)(e,t+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch((0,a/* .charat */.wN)(e,(0,a/* .strlen */.b2)(e)-3-(~(0,a/* .indexof */.K5)(e,"!important")&&10))){// stic(k)y
case 107:return(0,a/* .replace */.HC)(e,":",":"+o/* .WEBKIT */.j)+e;// (inline-)?fl(e)x
case 101:return(0,a/* .replace */.HC)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o/* .WEBKIT */.j+((0,a/* .charat */.wN)(e,14)===45?"inline-":"")+"box$3"+"$1"+o/* .WEBKIT */.j+"$2$3"+"$1"+o.MS+"$2box$3")+e}break;// writing-mode
case 5936:switch((0,a/* .charat */.wN)(e,t+11)){// vertical-l(r)
case 114:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;// vertical-r(l)
case 108:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;// horizontal(-)tb
case 45:return o/* .WEBKIT */.j+e+o.MS+(0,a/* .replace */.HC)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o/* .WEBKIT */.j+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 */.LU:e["return"]=m(e.value,e.length);break;case o/* .KEYFRAMES */.Sv:return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{value:(0,a/* .replace */.HC)(e.value,"@","@"+o/* .WEBKIT */.j)})],n);case o/* .RULESET */.XZ:if(e.length)return(0,a/* .combine */.kg)(e.props,function(t){switch((0,a/* .match */.YW)(t,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case":read-only":case":read-write":return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(read-\w+)/,":"+o/* .MOZ */.vd+"$1")]})],n);// :placeholder
case"::placeholder":return(0,s/* .serialize */.l)([(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(plac\w+)/,":"+o/* .WEBKIT */.j+"input-$1")]}),(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(t,/:(plac\w+)/,":"+o/* .MOZ */.vd+"$1")]}),(0,i/* .copy */.C)(e,{props:[(0,a/* .replace */.HC)(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 */.A,(0,u/* .rulesheet */.MY)(function(e){p.insert(e)})];var g=(0,u/* .middleware */.r1)(f.concat(i,m));var y=function e(e){return(0,s/* .serialize */.l)((0,l/* .compile */.wE)(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 */.v({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 _}},35137:function(e,t,r){"use strict";r.d(t,{A:()=>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)}},36289:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){var t=Object.create(null);return function(r){if(t[r]===undefined)t[r]=e(r);return t[r]}}},24684:function(e,t,r){"use strict";r.d(t,{C:()=>d,E:()=>S,T:()=>h,c:()=>A,h:()=>_,w:()=>p});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(25815);/* import */var o=r(30041);/* import */var s=r(23917);/* import */var u=r(71287);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"] */.A)({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 A=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 x=function e(e){var t=e.cache,r=e.serialized,n=e.isStringTag;(0,o/* .registerStyles */.SF)(t,r,n);(0,u/* .useInsertionEffectAlwaysWithSyncFallback */.s)(function(){return(0,o/* .insertStyles */.sk)(t,r,n)});return null};var E=/* #__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 */.Rk)(t.registered,u,e.className)}else if(e.className!=null){c=e.className+" "}var d=(0,s/* .serializeStyles */.J)(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(x,{cache:t,serialized:d,isStringTag:typeof a==="string"}),/*#__PURE__*/n.createElement(a,f))});var S=E},17437:function(e,t,r){"use strict";r.d(t,{AH:()=>h,i7:()=>v,mL:()=>p,n:()=>f});/* import */var n=r(24684);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);/* import */var o=r(30041);/* import */var s=r(71287);/* import */var u=r(23917);/* import */var l=r(25815);/* import */var c=r(4146);/* 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 */.J)([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 */.i)(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 */.i)(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 */.sk)(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 */.J)(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)})},2445:function(e,t,r){"use strict";r.d(t,{FD:()=>p,FK:()=>d,Y:()=>f});/* import */var n=r(74848);/* import */var i=r(24684);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(25815);/* import */var u=r(4146);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(71287);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)}},23917:function(e,t,r){"use strict";r.d(t,{J:()=>b});/* import */var n=r(35137);/* import */var i=r(83969);/* import */var a=r(36289);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"] */.A)(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"] */.A[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"] */.A)(a)+c;return{name:f,styles:a,next:g}}},65047:function(e,t,r){"use strict";r.d(t,{v:()=>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}()},83969:function(e,t,r){"use strict";r.d(t,{A:()=>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}},71287:function(e,t,r){"use strict";r.d(t,{i:()=>u,s:()=>s});/* import */var n=r(41594);/* 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},30041:function(e,t,r){"use strict";r.d(t,{Rk:()=>i,SF:()=>a,sk:()=>o});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)}}},23424:function(e,t,r){"use strict";r.d(t,{U:()=>p});/* import */var n=r(97310);/* import */var i=r(6979);/* import */var a=r(43341);/* import */var o=r(25128);/* import */var s=r(1206);/* import */var u=r(40571);/* import */var l=r(80844);/* import */var c=r(5581);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 */.vq)(e)?(0,a/* ["default"] */.A)(e):e.contextElement?(0,a/* ["default"] */.A)(e.contextElement):[],popper:(0,a/* ["default"] */.A)(t)};// Orders the modifiers based on their dependencies and `phase`
// properties
var i=(0,s/* ["default"] */.A)((0,l/* ["default"] */.A)([].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"] */.A)(t,(0,o/* ["default"] */.A)(r),h.options.strategy==="fixed"),popper:(0,i/* ["default"] */.A)(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"] */.A)(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
},85446:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(5581);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 */.Ng)(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}},86354:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(5581);/* import */var i=r(36906);/* import */var a=r(58979);/* import */var o=r(22283);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 */.sb)(e)){u=e.offsetWidth>0?(0,i/* .round */.LI)(s.width)/e.offsetWidth||1:1;l=e.offsetHeight>0?(0,i/* .round */.LI)(s.height)/e.offsetHeight||1:1}var c=(0,n/* .isElement */.vq)(e)?(0,a/* ["default"] */.A)(e):window,d=c.visualViewport;var f=!(0,o/* ["default"] */.A)()&&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}}},72883:function(e,t,r){"use strict";r.d(t,{A:()=>_});/* import */var n=r(14278);/* import */var i=r(55487);/* import */var a=r(38848);/* import */var o=r(43341);/* import */var s=r(25128);/* import */var u=r(19760);/* import */var l=r(40271);/* import */var c=r(5581);/* import */var d=r(86354);/* import */var f=r(52083);/* import */var p=r(85446);/* import */var h=r(67604);/* import */var v=r(44426);/* import */var m=r(36906);function g(e,t){var r=(0,d/* ["default"] */.A)(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 */.R9?(0,v/* ["default"] */.A)((0,i/* ["default"] */.A)(e,r)):(0,c/* .isElement */.vq)(t)?g(t,r):(0,v/* ["default"] */.A)((0,a/* ["default"] */.A)((0,u/* ["default"] */.A)(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"] */.A)((0,f/* ["default"] */.A)(e));var r=["absolute","fixed"].indexOf((0,l/* ["default"] */.A)(e).position)>=0;var n=r&&(0,c/* .isHTMLElement */.sb)(e)?(0,s/* ["default"] */.A)(e):e;if(!(0,c/* .isElement */.vq)(n)){return[]}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
return t.filter(function(e){return(0,c/* .isElement */.vq)(e)&&(0,p/* ["default"] */.A)(e,n)&&(0,h/* ["default"] */.A)(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 */.T9)(i.top,t.top);t.right=(0,m/* .min */.jk)(i.right,t.right);t.bottom=(0,m/* .min */.jk)(i.bottom,t.bottom);t.left=(0,m/* .max */.T9)(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}},97310:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(86354);/* import */var i=r(33318);/* import */var a=r(67604);/* import */var o=r(5581);/* import */var s=r(50793);/* import */var u=r(19760);/* import */var l=r(10134);/* import */var c=r(36906);function d(e){var t=e.getBoundingClientRect();var r=(0,c/* .round */.LI)(t.width)/e.offsetWidth||1;var n=(0,c/* .round */.LI)(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 */.sb)(t);var f=(0,o/* .isHTMLElement */.sb)(t)&&d(t);var p=(0,u/* ["default"] */.A)(t);var h=(0,n/* ["default"] */.A)(e,f,r);var v={scrollLeft:0,scrollTop:0};var m={x:0,y:0};if(c||!c&&!r){if((0,a/* ["default"] */.A)(t)!=="body"||// https://github.com/popperjs/popper-core/issues/1078
(0,l/* ["default"] */.A)(p)){v=(0,i/* ["default"] */.A)(t)}if((0,o/* .isHTMLElement */.sb)(t)){m=(0,n/* ["default"] */.A)(t,true);m.x+=t.clientLeft;m.y+=t.clientTop}else if(p){m.x=(0,s/* ["default"] */.A)(p)}}return{x:h.left+v.scrollLeft-m.x,y:h.top+v.scrollTop-m.y,width:h.width,height:h.height}}},40271:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(58979);function i(e){return(0,n/* ["default"] */.A)(e).getComputedStyle(e)}},19760:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(5581);function i(e){// $FlowFixMe[incompatible-return]: assume body is always available
return(((0,n/* .isElement */.vq)(e)?e.ownerDocument:e.document)||window.document).documentElement}},38848:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(19760);/* import */var i=r(40271);/* import */var a=r(50793);/* import */var o=r(30222);/* import */var s=r(36906);// 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"] */.A)(e);var u=(0,o/* ["default"] */.A)(e);var l=(t=e.ownerDocument)==null?void 0:t.body;var c=(0,s/* .max */.T9)(r.scrollWidth,r.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0);var d=(0,s/* .max */.T9)(r.scrollHeight,r.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0);var f=-u.scrollLeft+(0,a/* ["default"] */.A)(e);var p=-u.scrollTop;if((0,i/* ["default"] */.A)(l||r).direction==="rtl"){f+=(0,s/* .max */.T9)(r.clientWidth,l?l.clientWidth:0)-c}return{width:c,height:d,x:f,y:p}}},36233:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},6979:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(86354);// 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"] */.A)(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}}},67604:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e?(e.nodeName||"").toLowerCase():null}},33318:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(30222);/* import */var i=r(58979);/* import */var a=r(5581);/* import */var o=r(36233);function s(e){if(e===(0,i/* ["default"] */.A)(e)||!(0,a/* .isHTMLElement */.sb)(e)){return(0,n/* ["default"] */.A)(e)}else{return(0,o/* ["default"] */.A)(e)}}},25128:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(58979);/* import */var i=r(67604);/* import */var a=r(40271);/* import */var o=r(5581);/* import */var s=r(92063);/* import */var u=r(52083);/* import */var l=r(72398);function c(e){if(!(0,o/* .isHTMLElement */.sb)(e)||// https://github.com/popperjs/popper-core/issues/837
(0,a/* ["default"] */.A)(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"] */.A)());var r=/Trident/i.test((0,l/* ["default"] */.A)());if(r&&(0,o/* .isHTMLElement */.sb)(e)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var n=(0,a/* ["default"] */.A)(e);if(n.position==="fixed"){return null}}var s=(0,u/* ["default"] */.A)(e);if((0,o/* .isShadowRoot */.Ng)(s)){s=s.host}while((0,o/* .isHTMLElement */.sb)(s)&&["html","body"].indexOf((0,i/* ["default"] */.A)(s))<0){var c=(0,a/* ["default"] */.A)(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"] */.A)(e);var r=c(e);while(r&&(0,s/* ["default"] */.A)(r)&&(0,a/* ["default"] */.A)(r).position==="static"){r=c(r)}if(r&&((0,i/* ["default"] */.A)(r)==="html"||(0,i/* ["default"] */.A)(r)==="body"&&(0,a/* ["default"] */.A)(r).position==="static")){return t}return r||d(e)||t}},52083:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(67604);/* import */var i=r(19760);/* import */var a=r(5581);function o(e){if((0,n/* ["default"] */.A)(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 */.Ng)(e)?e.host:null)||// ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
(0,i/* ["default"] */.A)(e)// fallback
)}},69970:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(52083);/* import */var i=r(10134);/* import */var a=r(67604);/* import */var o=r(5581);function s(e){if(["html","body","#document"].indexOf((0,a/* ["default"] */.A)(e))>=0){// $FlowFixMe[incompatible-return]: assume body is always available
return e.ownerDocument.body}if((0,o/* .isHTMLElement */.sb)(e)&&(0,i/* ["default"] */.A)(e)){return e}return s((0,n/* ["default"] */.A)(e))}},55487:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(58979);/* import */var i=r(19760);/* import */var a=r(50793);/* import */var o=r(22283);function s(e,t){var r=(0,n/* ["default"] */.A)(e);var s=(0,i/* ["default"] */.A)(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"] */.A)();if(p||!p&&t==="fixed"){d=u.offsetLeft;f=u.offsetTop}}return{width:l,height:c,x:d+(0,a/* ["default"] */.A)(e),y:f}}},58979:function(e,t,r){"use strict";r.d(t,{A:()=>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}},30222:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(58979);function i(e){var t=(0,n/* ["default"] */.A)(e);var r=t.pageXOffset;var i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}},50793:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(86354);/* import */var i=r(19760);/* import */var a=r(30222);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"] */.A)((0,i/* ["default"] */.A)(e)).left+(0,a/* ["default"] */.A)(e).scrollLeft}},5581:function(e,t,r){"use strict";r.d(t,{Ng:()=>o,sb:()=>a,vq:()=>i});/* import */var n=r(58979);function i(e){var t=(0,n/* ["default"] */.A)(e).Element;return e instanceof t||e instanceof Element}function a(e){var t=(0,n/* ["default"] */.A)(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"] */.A)(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}},22283:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(72398);function i(){return!/^((?!chrome|android).)*safari/i.test((0,n/* ["default"] */.A)())}},10134:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(40271);function i(e){// Firefox wants us to check `-x` and `-y` variations as well
var t=(0,n/* ["default"] */.A)(e),r=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+i)}},92063:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(67604);function i(e){return["table","td","th"].indexOf((0,n/* ["default"] */.A)(e))>=0}},43341:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(69970);/* import */var i=r(52083);/* import */var a=r(58979);/* import */var o=r(10134);/*
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"] */.A)(e);var l=u===((r=e.ownerDocument)==null?void 0:r.body);var c=(0,a/* ["default"] */.A)(u);var d=l?[c].concat(c.visualViewport||[],(0,o/* ["default"] */.A)(u)?u:[]):u;var f=t.concat(d);return l?f:f.concat(s((0,i/* ["default"] */.A)(d)))}},14278:function(e,t,r){"use strict";r.d(t,{DD:()=>m,GM:()=>O,Mn:()=>n,OM:()=>u,Ol:()=>v,R9:()=>f,WY:()=>d,_N:()=>c,ir:()=>h,kb:()=>o,ni:()=>l,pG:()=>a,qZ:()=>s,sQ:()=>i,xf:()=>p});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 A="afterMain";// modifier with the purpose to write to the DOM (or write into a framework state)
var x="beforeWrite";var E="write";var S="afterWrite";var O=[g,b,y,_,w,A,x,E,S]},16607:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(67604);/* import */var i=r(5581);// 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 */.sb)(o)||!(0,n/* ["default"] */.A)(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 */.sb)(a)||!(0,n/* ["default"] */.A)(a)){return}Object.assign(a.style,u);Object.keys(o).forEach(function(e){a.removeAttribute(e)})})}}// eslint-disable-next-line import/no-unused-modules
/* export default */const s={name:"applyStyles",enabled:true,phase:"write",fn:a,effect:o,requires:["computeStyles"]}},78256:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(32632);/* import */var i=r(6979);/* import */var a=r(85446);/* import */var o=r(25128);/* import */var s=r(39703);/* import */var u=r(86523);/* import */var l=r(54318);/* import */var c=r(71007);/* import */var d=r(14278);// 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"] */.A)(typeof e!=="number"?e:(0,c/* ["default"] */.A)(e,d/* .basePlacements */.OM))};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"] */.A)(r.placement);var v=(0,s/* ["default"] */.A)(h);var m=[d/* .left */.kb,d/* .right */.pG].indexOf(h)>=0;var g=m?"height":"width";if(!c||!p){return}var b=f(l.padding,r);var y=(0,i/* ["default"] */.A)(c);var _=v==="y"?d/* .top */.Mn:d/* .left */.kb;var w=v==="y"?d/* .bottom */.sQ:d/* .right */.pG;var A=r.rects.reference[g]+r.rects.reference[v]-p[v]-r.rects.popper[g];var x=p[v]-r.rects.reference[v];var E=(0,o/* ["default"] */.A)(c);var S=E?v==="y"?E.clientHeight||0:E.clientWidth||0:0;var O=A/2-x/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 I=(0,u/* .within */.u)(k,C,T);// Prevents breaking syntax highlighting...
var R=v;r.modifiersData[a]=(t={},t[R]=I,t.centerOffset=I-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"] */.A)(t.elements.popper,i)){return}t.elements.arrow=i}// eslint-disable-next-line import/no-unused-modules
/* export default */const v={name:"arrow",enabled:true,phase:"main",fn:p,effect:h,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},1262:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(14278);/* import */var i=r(25128);/* import */var a=r(58979);/* import */var o=r(19760);/* import */var s=r(40271);/* import */var u=r(32632);/* import */var l=r(98101);/* import */var c=r(36906);// 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 */.LI)(r*i)/i||0,y:(0,c/* .round */.LI)(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,A=w===void 0?0:w;var x=typeof g==="function"?g({x:_,y:A}):{x:_,y:A};_=x.x;A=x.y;var E=p.hasOwnProperty("x");var S=p.hasOwnProperty("y");var O=n/* .left */.kb;var k=n/* .top */.Mn;var T=window;if(m){var C=(0,i/* ["default"] */.A)(r);var I="clientHeight";var R="clientWidth";if(C===(0,a/* ["default"] */.A)(r)){C=(0,o/* ["default"] */.A)(r);if((0,s/* ["default"] */.A)(C).position!=="static"&&h==="absolute"){I="scrollHeight";R="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 */.Mn||(l===n/* .left */.kb||l===n/* .right */.pG)&&c===n/* .end */._N){k=n/* .bottom */.sQ;var D=b&&C===T&&T.visualViewport?T.visualViewport.height:C[I];A-=D-u.height;A*=v?1:-1}if(l===n/* .left */.kb||(l===n/* .top */.Mn||l===n/* .bottom */.sQ)&&c===n/* .end */._N){O=n/* .right */.pG;var P=b&&C===T&&T.visualViewport?T.visualViewport.width:C[R];_-=P-u.width;_*=v?1:-1}}var M=Object.assign({position:h},m&&d);var F=g===true?f({x:_,y:A},(0,a/* ["default"] */.A)(r)):{x:_,y:A};_=F.x;A=F.y;if(v){var Y;return Object.assign({},M,(Y={},Y[k]=S?"0":"",Y[O]=E?"0":"",Y.transform=(T.devicePixelRatio||1)<=1?"translate("+_+"px, "+A+"px)":"translate3d("+_+"px, "+A+"px, 0)",Y))}return Object.assign({},M,(t={},t[k]=S?A+"px":"",t[O]=E?_+"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"] */.A)(t.placement),variation:(0,l/* ["default"] */.A)(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
/* export default */const v={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:h,data:{}}},59068:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(58979);// 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"] */.A)(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
/* export default */const o={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:a,data:{}}},40958:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(61688);/* import */var i=r(32632);/* import */var a=r(26771);/* import */var o=r(69913);/* import */var s=r(36281);/* import */var u=r(14278);/* import */var l=r(98101);// eslint-disable-next-line import/no-unused-modules
function c(e){if((0,i/* ["default"] */.A)(e)===u/* .auto */.qZ){return[]}var t=(0,n/* ["default"] */.A)(e);return[(0,a/* ["default"] */.A)(e),t,(0,a/* ["default"] */.A)(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:_,A=r.allowedAutoPlacements;var x=t.options.placement;var E=(0,i/* ["default"] */.A)(x);var S=E===x;var O=v||(S||!w?[(0,n/* ["default"] */.A)(x)]:c(x));var k=[x].concat(O).reduce(function(e,r){return e.concat((0,i/* ["default"] */.A)(r)===u/* .auto */.qZ?(0,s/* ["default"] */.A)(t,{placement:r,boundary:g,rootBoundary:b,padding:m,flipVariations:w,allowedAutoPlacements:A}):r)},[]);var T=t.rects.reference;var C=t.rects.popper;var I=new Map;var R=true;var D=k[0];for(var P=0;P<k.length;P++){var M=k[P];var F=(0,i/* ["default"] */.A)(M);var Y=(0,l/* ["default"] */.A)(M)===u/* .start */.ni;var L=[u/* .top */.Mn,u/* .bottom */.sQ].indexOf(F)>=0;var H=L?"width":"height";var N=(0,o/* ["default"] */.A)(t,{placement:M,boundary:g,rootBoundary:b,altBoundary:y,padding:m});var j=L?Y?u/* .right */.pG:u/* .left */.kb:Y?u/* .bottom */.sQ:u/* .top */.Mn;if(T[H]>C[H]){j=(0,n/* ["default"] */.A)(j)}var U=(0,n/* ["default"] */.A)(j);var B=[];if(f){B.push(N[F]<=0)}if(h){B.push(N[j]<=0,N[U]<=0)}if(B.every(function(e){return e})){D=M;R=false;break}I.set(M,B)}if(R){// `2` may be desired in some cases – research later
var z=w?3:1;var K=function e(e){var t=k.find(function(t){var r=I.get(t);if(r){return r.slice(0,e).every(function(e){return e})}});if(t){D=t;return"break"}};for(var q=z;q>0;q--){var V=K(q);if(V==="break")break}}if(t.placement!==D){t.modifiersData[a]._skip=true;t.placement=D;t.reset=true}}// eslint-disable-next-line import/no-unused-modules
/* export default */const f={name:"flip",enabled:true,phase:"main",fn:d,requiresIfExists:["offset"],data:{_skip:false}}},89081:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(14278);/* import */var i=r(69913);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 */.Mn,n/* .right */.pG,n/* .bottom */.sQ,n/* .left */.kb].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"] */.A)(t,{elementContext:"reference"});var c=(0,i/* ["default"] */.A)(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
/* export default */const u={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:s}},18490:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(32632);/* import */var i=r(14278);// eslint-disable-next-line import/no-unused-modules
function a(e,t,r){var a=(0,n/* ["default"] */.A)(e);var o=[i/* .left */.kb,i/* .top */.Mn].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 */.kb,i/* .right */.pG].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 */.DD.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
/* export default */const s={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:o}},85059:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(1815);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"] */.A)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}// eslint-disable-next-line import/no-unused-modules
/* export default */const a={name:"popperOffsets",enabled:true,phase:"read",fn:i,data:{}}},52089:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(14278);/* import */var i=r(32632);/* import */var a=r(39703);/* import */var o=r(56442);/* import */var s=r(86523);/* import */var u=r(6979);/* import */var l=r(25128);/* import */var c=r(69913);/* import */var d=r(98101);/* import */var f=r(67364);/* import */var p=r(36906);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,A=r.padding,x=r.tether,E=x===void 0?true:x,S=r.tetherOffset,O=S===void 0?0:S;var k=(0,c/* ["default"] */.A)(t,{boundary:y,rootBoundary:_,padding:A,altBoundary:w});var T=(0,i/* ["default"] */.A)(t.placement);var C=(0,d/* ["default"] */.A)(t.placement);var I=!C;var R=(0,a/* ["default"] */.A)(T);var D=(0,o/* ["default"] */.A)(R);var P=t.modifiersData.popperOffsets;var M=t.rects.reference;var F=t.rects.popper;var Y=typeof O==="function"?O(Object.assign({},t.rects,{placement:t.placement})):O;var L=typeof Y==="number"?{mainAxis:Y,altAxis:Y}:Object.assign({mainAxis:0,altAxis:0},Y);var H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null;var N={x:0,y:0};if(!P){return}if(m){var j;var U=R==="y"?n/* .top */.Mn:n/* .left */.kb;var B=R==="y"?n/* .bottom */.sQ:n/* .right */.pG;var z=R==="y"?"height":"width";var K=P[R];var q=K+k[U];var V=K-k[B];var W=E?-F[z]/2:0;var G=C===n/* .start */.ni?M[z]:F[z];var $=C===n/* .start */.ni?-F[z]:-M[z];// We need to include the arrow in the calculation so the arrow doesn't go
// outside the reference bounds
var Q=t.elements.arrow;var X=E&&Q?(0,u/* ["default"] */.A)(Q):{width:0,height:0};var J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,f/* ["default"] */.A)();var Z=J[U];var ee=J[B];// 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,M[z],X[z]);var er=I?M[z]/2-W-et-Z-L.mainAxis:G-et-Z-L.mainAxis;var en=I?-M[z]/2+W+et+ee+L.mainAxis:$+et+ee+L.mainAxis;var ei=t.elements.arrow&&(0,l/* ["default"] */.A)(t.elements.arrow);var ea=ei?R==="y"?ei.clientTop||0:ei.clientLeft||0:0;var eo=(j=H==null?void 0:H[R])!=null?j:0;var es=K+er-eo-ea;var eu=K+en-eo;var el=(0,s/* .within */.u)(E?(0,p/* .min */.jk)(q,es):q,K,E?(0,p/* .max */.T9)(V,eu):V);P[R]=el;N[R]=el-K}if(b){var ec;var ed=R==="x"?n/* .top */.Mn:n/* .left */.kb;var ef=R==="x"?n/* .bottom */.sQ:n/* .right */.pG;var ep=P[D];var eh=D==="y"?"height":"width";var ev=ep+k[ed];var em=ep-k[ef];var eg=[n/* .top */.Mn,n/* .left */.kb].indexOf(T)!==-1;var eb=(ec=H==null?void 0:H[D])!=null?ec:0;var ey=eg?ev:ep-M[eh]-F[eh]-eb+L.altAxis;var e_=eg?ep+M[eh]+F[eh]-eb-L.altAxis:em;var ew=E&&eg?(0,s/* .withinMaxClamp */.P)(ey,ep,e_):(0,s/* .within */.u)(E?ey:ev,ep,E?e_:em);P[D]=ew;N[D]=ew-ep}t.modifiersData[h]=N}// eslint-disable-next-line import/no-unused-modules
/* export default */const v={name:"preventOverflow",enabled:true,phase:"main",fn:h,requiresIfExists:["offset"]}},71576:function(e,t,r){"use strict";r.d(t,{n:()=>h});/* import */var n=r(23424);/* import */var i=r(59068);/* import */var a=r(85059);/* import */var o=r(1262);/* import */var s=r(16607);/* import */var u=r(18490);/* import */var l=r(40958);/* import */var c=r(52089);/* import */var d=r(78256);/* import */var f=r(89081);var p=[i/* ["default"] */.A,a/* ["default"] */.A,o/* ["default"] */.A,s/* ["default"] */.A,u/* ["default"] */.A,l/* ["default"] */.A,c/* ["default"] */.A,d/* ["default"] */.A,f/* ["default"] */.A];var h=/*#__PURE__*/(0,n/* .popperGenerator */.U)({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
},36281:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(98101);/* import */var i=r(14278);/* import */var a=r(69913);/* import */var o=r(32632);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 */.DD:f;var h=(0,n/* ["default"] */.A)(s);var v=h?d?i/* .variationPlacements */.Ol:i/* .variationPlacements.filter */.Ol.filter(function(e){return(0,n/* ["default"] */.A)(e)===h}):i/* .basePlacements */.OM;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"] */.A)(e,{placement:r,boundary:u,rootBoundary:l,padding:c})[(0,o/* ["default"] */.A)(r)];return t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}},1815:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(32632);/* import */var i=r(98101);/* import */var a=r(39703);/* import */var o=r(14278);function s(e){var t=e.reference,r=e.element,s=e.placement;var u=s?(0,n/* ["default"] */.A)(s):null;var l=s?(0,i/* ["default"] */.A)(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 */.Mn:f={x:c,y:t.y-r.height};break;case o/* .bottom */.sQ:f={x:c,y:t.y+t.height};break;case o/* .right */.pG:f={x:t.x+t.width,y:d};break;case o/* .left */.kb:f={x:t.x-r.width,y:d};break;default:f={x:t.x,y:t.y}}var p=u?(0,a/* ["default"] */.A)(u):null;if(p!=null){var h=p==="y"?"height":"width";switch(l){case o/* .start */.ni:f[p]=f[p]-(t[h]/2-r[h]/2);break;case o/* .end */._N:f[p]=f[p]+(t[h]/2-r[h]/2);break;default:}}return f}},40571:function(e,t,r){"use strict";r.d(t,{A:()=>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}}},69913:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(72883);/* import */var i=r(19760);/* import */var a=r(86354);/* import */var o=r(1815);/* import */var s=r(44426);/* import */var u=r(14278);/* import */var l=r(5581);/* import */var c=r(54318);/* import */var d=r(71007);// 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 */.WY:m,b=r.rootBoundary,y=b===void 0?u/* .viewport */.R9:b,_=r.elementContext,w=_===void 0?u/* .popper */.xf:_,A=r.altBoundary,x=A===void 0?false:A,E=r.padding,S=E===void 0?0:E;var O=(0,c/* ["default"] */.A)(typeof S!=="number"?S:(0,d/* ["default"] */.A)(S,u/* .basePlacements */.OM));var k=w===u/* .popper */.xf?u/* .reference */.ir:u/* .popper */.xf;var T=e.rects.popper;var C=e.elements[x?k:w];var I=(0,n/* ["default"] */.A)((0,l/* .isElement */.vq)(C)?C:C.contextElement||(0,i/* ["default"] */.A)(e.elements.popper),g,y,v);var R=(0,a/* ["default"] */.A)(e.elements.reference);var D=(0,o/* ["default"] */.A)({reference:R,element:T,strategy:"absolute",placement:p});var P=(0,s/* ["default"] */.A)(Object.assign({},T,D));var M=w===u/* .popper */.xf?P:R;// positive = overflowing the clipping rect
// 0 or negative = within the clipping rect
var F={top:I.top-M.top+O.top,bottom:M.bottom-I.bottom+O.bottom,left:I.left-M.left+O.left,right:M.right-I.right+O.right};var Y=e.modifiersData.offset;// Offsets can be applied only to the popper element
if(w===u/* .popper */.xf&&Y){var L=Y[p];Object.keys(F).forEach(function(e){var t=[u/* .right */.pG,u/* .bottom */.sQ].indexOf(e)>=0?1:-1;var r=[u/* .top */.Mn,u/* .bottom */.sQ].indexOf(e)>=0?"y":"x";F[e]+=L[r]*t})}return F}},71007:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e,t){return t.reduce(function(t,r){t[r]=e;return t},{})}},56442:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e==="x"?"y":"x"}},32632:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e.split("-")[0]}},67364:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(){return{top:0,right:0,bottom:0,left:0}}},39703:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},61688:function(e,t,r){"use strict";r.d(t,{A:()=>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]})}},26771:function(e,t,r){"use strict";r.d(t,{A:()=>i});var n={start:"end",end:"start"};function i(e){return e.replace(/start|end/g,function(e){return n[e]})}},98101:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return e.split("-")[1]}},36906:function(e,t,r){"use strict";r.d(t,{LI:()=>a,T9:()=>n,jk:()=>i});var n=Math.max;var i=Math.min;var a=Math.round},80844:function(e,t,r){"use strict";r.d(t,{A:()=>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]})}},54318:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(67364);function i(e){return Object.assign({},(0,n/* ["default"] */.A)(),e)}},1206:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(14278);// 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 */.GM.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}},44426:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},72398:function(e,t,r){"use strict";r.d(t,{A:()=>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}},86523:function(e,t,r){"use strict";r.d(t,{P:()=>a,u:()=>i});/* import */var n=r(36906);function i(e,t,r){return(0,n/* .max */.T9)(e,(0,n/* .min */.jk)(t,r))}function a(e,t,r){var n=i(e,t,r);return n>r?r:n}},45588:function(e,t,r){"use strict";r.d(t,{Gh:()=>$,HS:()=>X,Oi:()=>l,Rr:()=>v,TM:()=>u,pX:()=>ep,pb:()=>U,rc:()=>i,tH:()=>ei,ue:()=>w,yD:()=>G});/**
 * @remix-run/router v1.23.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 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:A.location,delta:t})}}function y(e,t){d=i.Push;let n=p(A.location,e,t);if(r)r(n,e);m=g()+1;let a=f(n,m);let o=A.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:A.location,delta:1})}}function _(e,t){d=i.Replace;let n=p(A.location,e,t);if(r)r(n,e);m=g();let a=f(n,m);let o=A.createHref(n);c.replaceState(a,"",o);if(u&&v){v({action:d,location:A.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 A={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 A}//#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 A(e,t,r,false)}function A(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=E(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=j(a);s=Y(o[e],t,n)}return s}function x(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 E(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=X([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+'".'));E(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:M(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
    :F(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}const k=/^:[\w-]+$/;const T=3;const C=2;const I=1;const R=10;const D=-2;const P=e=>e==="*";function M(e,t){let r=e.split("/");let n=r.length;if(r.some(P)){n+=D}if(t){n+=C}return r.filter(e=>!P(e)).reduce((e,t)=>e+(k.test(t)?T:t===""?I:R),n)}function F(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 Y(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=H({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);let d=s.route;if(!c&&u&&r&&!n[n.length-1].route.index){c=H({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:X([a,c.pathname]),pathnameBase:J(X([a,c.pathnameBase])),route:d});if(c.pathnameBase!=="/"){a=X([a,c.pathnameBase])}}return o}/**
 * Returns a path with params interpolated.
 *
 * @see https://reactrouter.com/v6/utils/generate-path
 */function L(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 H(e,t){if(typeof e==="string"){e={path:e,caseSensitive:false,end:true}}let[r,n]=N(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 N(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 j(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)||"/"}const B=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const z=e=>B.test(e);/**
 * Returns a resolved path object relative to the given pathname.
 *
 * @see https://reactrouter.com/v6/utils/resolve-path
 */function K(e,t){if(t===void 0){t="/"}let{pathname:r,search:n="",hash:i=""}=typeof e==="string"?v(e):e;let a;if(r){if(z(r)){a=r}else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/");c(false,"Pathnames cannot have embedded double slashes - normalizing "+(e+" -> "+r))}if(r.startsWith("/")){a=q(r.substring(1),"/")}else{a=q(r,t)}}}else{a=t}return{pathname:a,search:Z(n),hash:ee(i)}}function q(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 V(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 W(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 G(e,t){let r=W(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 $(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("?"),V("?","pathname","search",a));l(!a.pathname||!a.pathname.includes("#"),V("#","pathname","hash",a));l(!a.search||!a.search.includes("#"),V("#","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=K(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 Q(e){// Empty strings should be treated the same as / paths
return e===""||e.pathname===""?"/":typeof e==="string"?v(e).pathname:e.pathname}/**
 * @private
 */const X=e=>e.join("/").replace(/\/\/+/g,"/");/**
 * @private
 */const J=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");/**
 * @private
 */const Z=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e;/**
 * @private
 */const ee=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 et=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 er{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 en(e,t){return new er(e,typeof t==="number"?{status:t}:t)}class ei extends Error{}class ea{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 ei("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 ei){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]:es(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function eo(e){return e instanceof Promise&&e._tracked===true}function es(e){if(!eo(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 eu=function e(e,t){if(t===void 0){t={}}let r=typeof t==="number"?{status:t}:t;return new ea(e,r)};/**
 * A redirect response. Sets the status code and the `Location` header.
 * Defaults to "302 Found".
 */const el=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 ec=(e,t)=>{let r=el(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 ed=(e,t)=>{let r=el(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 ef{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 ep(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.internal==="boolean"&&"data"in e}const eh=["post","put","patch","delete"];const ev=new Set(eh);const em=["get",...eh];const eg=new Set(em);const eb=new Set([301,302,303,307,308]);const ey=new Set([307,308]);const e_=/* unused pure expression or super */null&&{state:"idle",location:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const ew=/* unused pure expression or super */null&&{state:"idle",data:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined};const eA=/* unused pure expression or super */null&&{state:"unblocked",proceed:undefined,reset:undefined,location:undefined};const ex=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const eE=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});const eS="remix-router-transitions";//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createRouter
////////////////////////////////////////////////////////////////////////////////
/**
 * Create a router and listen to history POP navigations
 */function eO(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=eE}// 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||ez;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 E=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 I=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=e4(404,{pathname:e.history.location.pathname});let{matches:r,route:n}=e6(u);T=r;I={[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=to(T,u,e.history.location.pathname);if(t.active){T=null}}let R;if(!T){R=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=to(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()
R=false}else if(!T.some(e=>e.route.loader)){// If we've got no loaders to run, then we're good to go
R=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);R=T.slice(0,e+1).every(e=>!eY(e.route,t,r))}else{R=T.every(e=>!eY(e.route,t,r))}}else{// Without partial hydration - we're initialized if we were provided any
// hydrationData - which is expected to be complete
R=e.hydrationData!=null}let D;let P={historyAction:e.history.action,location:e.history.location,matches:T,initialized:R,navigation:e_,// 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||I,fetchers:new Map,blockers:new Map};// -- Stateful internal variables to manage navigations --
// Current navigation in progress (to be committed in completeNavigation)
let M=i.Pop;// Should the current navigation prevent the scroll reset if scroll cannot
// be restored?
let F=false;// AbortController for the active navigation
let Y;// Should the current navigation enable document.startViewTransition?
let L=false;// Store applied view transitions so we can apply them on POP
let H=new Map;// Cleanup function for persisting applied transitions to sessionStorage
let N=null;// We use this to avoid touching history in completeNavigation if a
// revalidation is entirely uninterrupted
let j=false;// Use this internal flag to force revalidation of all loaders:
//  - submissions (completed or interrupted)
//  - useRevalidator()
//  - X-Remix-Revalidate (from redirect)
let B=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 K=new Set;// AbortControllers for any in-flight fetchers
let q=new Map;// Track loads based on the order in which they started
let V=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 W=-1;// Fetchers that triggered data reloads as a result of their actions
let G=new Map;// Fetchers that triggered redirect navigations
let $=new Set;// Most recent href/match for fetcher.load calls for fetchers
let Q=new Map;// Ref-count mounted fetchers so we know when it's ok to clean them up
let X=new Map;// Fetchers that have requested a delete when using v7_fetcherPersist,
// they'll be officially removed after they return to idle
let J=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 Z=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=eX({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
eQ(a,{state:"blocked",location:n,proceed(){eQ(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,eA);ea({blockers:e})}});return}return el(r,n)});if(r){// FIXME: This feels gross.  How can we cleanup the lines between
// scrollRestoration/appliedTransitions persistance?
t_(t,H);let e=()=>tw(t,H);t.addEventListener("pagehide",e);N=()=>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 D}// Clean up a router and it's side effects
function en(){if(b){b()}if(N){N()}y.clear();Y&&Y.abort();P.fetchers.forEach((e,t)=>eR(t));P.blockers.forEach((e,t)=>eq(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(J.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
J.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=>eR(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=>J.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&&tu(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?e0(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,eA))}// Always respect the user flag.  Otherwise don't reset on mutation
// submission navigations unless they redirect
let v=F===true||P.navigation.formMethod!=null&&tu(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(j);else if(M===i.Pop);else if(M===i.Push){e.history.push(t,t.state)}else if(M===i.Replace){e.history.replace(t,t.state)}let m;// On POP, enable transitions if they were enabled on the original navigation
if(M===i.Pop){// Forward takes precedence so they behave like the original navigation
let e=H.get(P.location.pathname);if(e&&e.has(t.pathname)){m={currentLocation:P.location,nextLocation:t}}else if(H.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(L){// Store the applied transition on PUSH/REPLACE
let e=H.get(P.location.pathname);if(e){e.add(t.pathname)}else{e=new Set([t.pathname]);H.set(P.location.pathname,e)}m={currentLocation:P.location,nextLocation:t}}ea(n({},r,{actionData:f,loaderData:p,historyAction:M,location:t,initialized:true,navigation:e_,revalidation:"idle",restoreScrollPosition:ta(t,r.matches||P.matches),preventScrollReset:v,blockers:h}),{viewTransitionOpts:m,flushSync:l===true});// Reset stateful navigation vars
M=i.Pop;F=false;L=false;j=false;B=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=eD(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}=eP(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&&tu(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=eX({currentLocation:l,nextLocation:c,historyAction:h});if(b){// Put the blocker into a blocked state
eQ(b,{state:"blocked",location:c,proceed(){eQ(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,eA);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(M||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,// Proxy through any rending view transition
enableViewTransition:L===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
Y&&Y.abort();Y=null;M=t;j=(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);F=(i&&i.preventScrollReset)===true;L=(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&&!B&&e7(P.location,r)&&!(i&&i.submission&&tu(i.submission.formMethod))){eo(r,{matches:s},{flushSync:l});return}let c=to(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}=eJ(r.pathname);eo(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:l});return}// Create a controller/Request for this navigation
Y=new AbortController;let p=e$(e.history,r,Y.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=[e2(s).route.id,{type:g.error,error:i.pendingError}]}else if(i&&i.submission&&tu(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(tt(n)&&ep(n.error)&&n.error.status===404){Y=null;eo(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}});return}}s=t.matches||s;h=t.pendingActionResult;o=tv(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=e$(e.history,p.url,p.signal)}// Call loaders
let{shortCircuited:v,matches:m,loaderData:b,errors:y}=await ed(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
Y=null;eo(r,n({matches:m||s},e1(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=tm(t,r);ea({navigation:s},{flushSync:o.flushSync===true});if(a){let r=await ts(n,t.pathname,e.signal);if(r.type==="aborted"){return{shortCircuited:true}}else if(r.type==="error"){let e=e2(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}=eJ(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=tp(n,t);if(!l.route.action&&!l.route.lazy){u={type:g.error,error:e4(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(tr(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=eG(u.response.headers.get("Location"),new URL(e.url),f);t=r===P.location.pathname+P.location.search}await eb(e,u,true,{submission:r,replace:t});return{shortCircuited:true}}if(te(u)){throw e4(400,{type:"defer-action"})}if(tt(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=e2(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){M=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 ed(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||tv(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||th(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=!j&&(!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=ef(v);ea(n({navigation:g},e!==undefined?{actionData:e}:{}),{flushSync:h})}let e=await ts(i,r.pathname,t.signal);if(e.type==="aborted"){return{shortCircuited:true}}else if(e.type==="error"){let t=e2(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(!e.matches){let{error:e,notFoundMatches:t,route:n}=eJ(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}else{i=e.matches}}let _=d||u;let[w,A]=eF(e.history,P,i,b,r,m.v7_partialHydration&&p===true,m.v7_skipActionErrorRevalidation,B,z,K,J,Q,$,_,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
e3(e=>!(i&&i.some(t=>t.route.id===e))||w&&w.some(t=>t.route.id===e));W=++V;// Short circuit if we have no loaders to run
if(w.length===0&&A.length===0){let e=eN();eo(r,n({matches:i,loaderData:{},// Commit pending error if we're short circuiting
errors:v&&tt(v[1])?{[v[0]]:v[1].error}:null},e1(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=ef(v);if(t!==undefined){e.actionData=t}}if(A.length>0){e.fetchers=eh(A)}ea(e,{flushSync:h})}A.forEach(e=>{eL(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 x=()=>A.forEach(e=>eL(e.key));if(Y){Y.signal.addEventListener("abort",x)}let{loaderResults:E,fetcherResults:S}=await eO(P,i,w,A,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(Y){Y.signal.removeEventListener("abort",x)}A.forEach(e=>q.delete(e.key));// If any loaders returned a redirect Response, start a new REPLACE navigation
let O=e5(E);if(O){await eb(t,O.result,true,{replace:c});return{shortCircuited:true}}O=e5(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
$.add(O.key);await eb(t,O.result,true,{replace:c});return{shortCircuited:true}}// Process and commit output from loaders
let{loaderData:k,errors:T}=eZ(P,i,E,v,A,S,Z);// Wire up subscribers to update loaderData as promises settle
Z.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){Z.delete(t)}})});// Preserve SSR errors during partial hydration
if(m.v7_partialHydration&&p&&P.errors){T=n({},P.errors,T)}let C=eN();let I=eU(W);let R=C||I||A.length>0;return n({matches:i,loaderData:k,errors:T},R?{fetchers:new Map(P.fetchers)}:{})}function ef(e){if(e&&!tt(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=tg(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.")}eL(e);let i=(n&&n.flushSync)===true;let o=d||u;let s=eD(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=to(l,o,s);if(c.active&&c.matches){l=c.matches}if(!l){eC(e,t,e4(404,{pathname:s}),{flushSync:i});return}let{path:p,submission:h,error:v}=eP(m.v7_normalizeFormMethod,true,s,n);if(v){eC(e,t,v,{flushSync:i});return}let g=tp(l,p);let b=(n&&n.preventScrollReset)===true;if(h&&tu(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
Q.set(e,{routeId:t,path:p});eg(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();Q.delete(t);function h(e){if(!e.route.action&&!e.route.lazy){let e=e4(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,tb(p,v),{flushSync:s});let g=new AbortController;let b=e$(e.history,n,g.signal,p);if(o){let e=await ts(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,e4(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=tp(a,n);if(h(i)){return}}}// Call the action for the fetcher
q.set(t,g);let y=V;let _=await eS("action",P,b,[i],a,t);let A=_[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&&J.has(t)){if(tr(A)||tt(A)){eT(t,ty(undefined));return}// Let SuccessResult's fall through for revalidation
}else{if(tr(A)){q.delete(t);if(W>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,ty(undefined));return}else{$.add(t);eT(t,tg(p));return eb(b,A,false,{fetcherSubmission:p,preventScrollReset:c})}}// Process any non-redirect errors thrown
if(tt(A)){eC(t,r,A.error);return}}if(te(A)){throw e4(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 x=P.navigation.location||P.location;let E=e$(e.history,x,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=++V;G.set(t,k);let T=tg(p,A.data);P.fetchers.set(t,T);let[C,I]=eF(e.history,P,O,p,x,false,m.v7_skipActionErrorRevalidation,B,z,K,J,Q,$,S,f,[i.route.id,A]);// 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
I.filter(e=>e.key!==t).forEach(e=>{let t=e.key;let r=P.fetchers.get(t);let n=tg(undefined,r?r.data:undefined);P.fetchers.set(t,n);eL(t);if(e.controller){q.set(t,e.controller)}});ea({fetchers:new Map(P.fetchers)});let R=()=>I.forEach(e=>eL(e.key));g.signal.addEventListener("abort",R);let{loaderResults:D,fetcherResults:F}=await eO(P,O,C,I,E);if(g.signal.aborted){return}g.signal.removeEventListener("abort",R);G.delete(t);q.delete(t);I.forEach(e=>q.delete(e.key));let L=e5(D);if(L){return eb(E,L.result,false,{preventScrollReset:c})}L=e5(F);if(L){// 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
$.add(L.key);return eb(E,L.result,false,{preventScrollReset:c})}// Process and commit output from loaders
let{loaderData:H,errors:N}=eZ(P,O,D,undefined,I,F,Z);// 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=ty(A.data);P.fetchers.set(t,e)}eU(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>W){l(M,"Expected pending action");Y&&Y.abort();eo(P.navigation.location,{matches:O,loaderData:H,errors:N,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:N,loaderData:e0(P.loaderData,H,O,N),fetchers:new Map(P.fetchers)});B=false}}// Call the matched loader for fetcher.load(), handling redirects, errors, etc.
async function eg(t,r,n,i,a,o,s,u,c){let d=P.fetchers.get(t);eT(t,tg(c,d?d.data:undefined),{flushSync:s});let f=new AbortController;let p=e$(e.history,n,f.signal);if(o){let e=await ts(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,e4(404,{pathname:n}),{flushSync:s});return}else{a=e.matches;i=tp(a,n)}}// Call the loader for this fetcher route match
q.set(t,f);let h=V;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(te(m)){m=await td(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(J.has(t)){eT(t,ty(undefined));return}// If the loader threw a redirect Response, start a new REPLACE navigation
if(tr(m)){if(W>h){// A new navigation was kicked off after our loader started, so that
// should take precedence over this redirect navigation
eT(t,ty(undefined));return}else{$.add(t);await eb(p,m,false,{preventScrollReset:u});return}}// Process any non-redirect errors thrown
if(tt(m)){eC(t,r,m.error);return}l(!te(m),"Unhandled fetcher deferred data");// Put the fetcher back into an idle state
eT(t,ty(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 eb(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")){B=true}let m=o.response.headers.get("Location");l(m,"Expected a Location header on the redirect Response");m=eG(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(ex.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
Y=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=th(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 A=c||d;if(ey.has(o.response.status)&&A&&tu(A.formMethod)){await el(b,g,{submission:n({},A,{formAction:m}),// Preserve these flags across redirects
preventScrollReset:h||F,enableViewTransition:s?L:undefined})}else{// If we have a navigation submission, we will preserve it through the
// redirect navigation
let e=tv(g,c);await el(b,g,{overrideNavigation:e,// Send fetcher submissions through for shouldRevalidate
fetcherSubmission:d,// Preserve these flags across redirects
preventScrollReset:h||F,enableViewTransition:s?L: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 eK(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(e9(t)){let n=t.result;l[e]={type:g.redirect,response:eW(n,r,e,i,f,m.v7_relativeSplatPath)}}else{l[e]=await eV(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,e$(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:e4(404,{pathname:r.path})}})}}));let l=await s;let c=(await u).reduce((e,t)=>Object.assign(e,t),{});await Promise.all([tl(r,l,a.signal,o,t.loaderData),tc(r,c,i)]);return{loaderResults:l,fetcherResults:c}}function ek(){// Every interruption triggers a revalidation
B=true;// Cancel pending route-level deferreds and mark cancelled routes for
// revalidation
z.push(...e3());// Abort in-flight fetcher loads
Q.forEach((e,t)=>{if(q.has(t)){K.add(t)}eL(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=e2(P.matches,t);eR(e);ea({errors:{[i.route.id]:r},fetchers:new Map(P.fetchers)},{flushSync:(n&&n.flushSync)===true})}function eI(e){X.set(e,(X.get(e)||0)+1);// If this fetcher was previously marked for deletion, unmark it since we
// have a new instance
if(J.has(e)){J.delete(e)}return P.fetchers.get(e)||ew}function eR(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"&&G.has(e))){eL(e)}Q.delete(e);G.delete(e);$.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){J.delete(e)}K.delete(e);P.fetchers.delete(e)}function eM(e){let t=(X.get(e)||0)-1;if(t<=0){X.delete(e);J.add(e);if(!m.v7_fetcherPersist){eR(e)}}else{X.set(e,t)}ea({fetchers:new Map(P.fetchers)})}function eL(e){let t=q.get(e);if(t){t.abort();q.delete(e)}}function eH(e){for(let t of e){let e=eI(t);let r=ty(e.data);P.fetchers.set(t,r)}}function eN(){let e=[];let t=false;for(let r of $){let n=P.fetchers.get(r);l(n,"Expected fetcher: "+r);if(n.state==="loading"){$.delete(r);e.push(r);t=true}}eH(e);return t}function eU(e){let t=[];for(let[r,n]of G){if(n<e){let e=P.fetchers.get(r);l(e,"Expected fetcher: "+r);if(e.state==="loading"){eL(r);G.delete(r);t.push(r)}}}eH(t);return t.length>0}function eB(e,t){let r=P.blockers.get(e)||eA;if(ee.get(e)!==t){ee.set(e,t)}return r}function eq(e){P.blockers.delete(e);ee.delete(e)}// Utility function to update blockers, ensuring valid state transitions
function eQ(e,t){let r=P.blockers.get(e)||eA;// 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 eX(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 eJ(e){let t=e4(404,{pathname:e});let r=d||u;let{matches:n,route:i}=e6(r);// Cancel all pending deferred on 404s since we don't keep any routes
e3();return{notFoundMatches:n,route:i,error:t}}function e3(e){let t=[];Z.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);Z.delete(n)}});return t}// Opt in to capturing and reporting scroll positions during navigations,
// used by the <ScrollRestoration> component
function e8(e,t,r){E=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===e_){k=true;let e=ta(P.location,P.matches);if(e!=null){ea({restoreScrollPosition:e})}}return()=>{E=null;O=null;S=null}}function tn(e,t){if(S){let r=S(e,t.map(e=>x(e,P.loaderData)));return r||e.key}return e.key}function ti(e,t){if(E&&O){let r=tn(e,t);E[r]=O()}}function ta(e,t){if(E){let r=tn(e,t);let n=E[r];if(typeof n==="number"){return n}}return null}function to(e,t,r){if(v){if(!e){let e=A(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=A(t,r,f,true);return{active:true,matches:e}}}}return{active:false,matches:null}}async function ts(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;ej(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=A(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 tf(e){s={};d=_(e,o,undefined,s)}function tA(e,t){let r=d==null;let n=d||u;ej(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({})}}D={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:e8,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:eI,deleteFetcher:eM,dispose:en,getBlocker:eB,deleteBlocker:eq,patchRoutes:tA,_internalFetchControllers:q,_internalActiveDeferreds:Z,// TODO: Remove setRoutes, it's temporary to avoid dealing with
// updating the tree while validating the update algorithm.
_internalSetRoutes:tf};return D}//#endregion
////////////////////////////////////////////////////////////////////////////////
//#region createStaticHandler
////////////////////////////////////////////////////////////////////////////////
const ek=Symbol("deferred");function eT(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=eE}// 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(!ts(l)&&l!=="HEAD"){let e=e4(405,{method:l});let{matches:t,route:r}=e6(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=e4(404,{pathname:c.pathname});let{matches:t,route:r}=e6(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(ta(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(!ts(u)&&u!=="HEAD"&&u!=="OPTIONS"){throw e4(405,{method:u})}else if(!c){throw e4(404,{pathname:l.pathname})}let f=r?c.find(e=>e.route.id===r):tp(c,l);if(r&&!f){throw e4(403,{pathname:l.pathname,routeId:r})}else if(!f){// This should never hit I don't think?
throw e4(404,{pathname:l.pathname})}let v=await d(e,l,c,n,a||null,false,f);if(ta(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[ek]=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(tu(e.method.toLowerCase())){let n=await f(e,r,s||tp(r,t),i,a,o,s!=null);return n}let u=await v(e,r,i,a,o,s);return ta(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(e8(e)&&ta(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(to(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=e4(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){eI(e,u,o)}}if(tr(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(te(l)){let e=e4(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(tt(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(tt(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:e2(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:ep(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 e4(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:s==null?void 0:s.route.id})}let c=s?[s]:u&&tt(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&&tt(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){eI(e,l,o)}// Process and commit output from loaders
let p=new Map;let h=eJ(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 eK(c||ez,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(e9(r)){let n=r.result;// Throw redirects and let the server handle them with an HTTP redirect
throw eW(n,t,e.route.id,s,i,o.v7_relativeSplatPath)}if(ta(r.result)&&u){// For SSR single-route requests, we want to hand Responses back
// directly without unwrapping
throw r}f[e.route.id]=await eV(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 eC(e,t,r){let i=n({},t,{statusCode:ep(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}});return i}function eI(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 eR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==undefined)}function eD(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=$(i?i:".",G(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=tf(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:X([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 eP(e,t,r,n){// Return location verbatim on non-submission navigations
if(!n||!eR(n)){return{path:r}}if(n.formMethod&&!ts(n.formMethod)){return{path:r,error:e4(405,{method:n.formMethod})}}let i=()=>({path:r,error:e4(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(!tu(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(!tu(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=eQ(n.formData);c=n.formData}else if(n.body instanceof FormData){u=eQ(n.body);c=n.body}else if(n.body instanceof URLSearchParams){u=n.body;c=eX(u)}else if(n.body==null){u=new URLSearchParams;c=new FormData}else{try{u=new URLSearchParams(n.body);c=eX(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(tu(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&&tf(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 eF(e,t,r,i,a,o,s,u,l,c,d,f,p,h,v,m){let g=m?tt(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&&tt(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 A=m?m[1].statusCode:undefined;let x=s&&A&&A>=400;let E=_.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 eY(a,t.loaderData,t.errors)}// Always call the loader on new route instances and pending defer cancellations
if(eL(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 eN(e,n({currentUrl:b,currentParams:s.params,nextUrl:y,nextParams:c.params},i,{actionResult:g,actionStatus:A,defaultShouldRevalidate:x?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||eH(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=tp(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=eN(f,n({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},i,{actionResult:g,actionStatus:A,defaultShouldRevalidate:x?false:u}))}if(m){S.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}});return[E,S]}function eY(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 eL(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 eH(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 eN(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r==="boolean"){return r}}return t.defaultShouldRevalidate}function ej(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=>eU(e,t)));let u=_(s,i,[e||"_","patch",String(((a=o)==null?void 0:a.length)||"0")],n);o.push(...u)}function eU(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=>eU(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 ez(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 eK(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?eq(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 eq(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 e4(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 e4(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 eV(e){let{result:t,type:r}=e;if(ta(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 ef(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(tn(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 ef(((n=t.init)==null?void 0:n.status)||500,undefined,t.data),statusCode:ep(t)?t.status:undefined,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):undefined}}return{type:g.error,error:t,statusCode:ep(t)?t.status:undefined}}if(ti(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(tn(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 eW(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(!ex.test(o)){let s=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=eD(new URL(t.url),s,i,true,o,a);e.headers.set("Location",o)}return e}function eG(e,t,r){if(ex.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 e$(e,t,r,n){let i=e.createURL(e3(t)).toString();let a={signal:r};if(n&&tu(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=eQ(n.formData)}else{// Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
a.body=n.formData}}return new Request(i,a)}function eQ(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 eX(e){let t=new FormData;for(let[r,n]of e.entries()){t.append(r,n)}return t}function eJ(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&&tt(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(!tr(p),"Cannot handle redirect results in processLoaderData");if(tt(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=e2(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=ep(p.error)?p.error.status:500}if(p.headers){c[f]=p.headers}}else{if(te(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 eZ(e,t,r,i,a,o,s){let{loaderData:u,errors:c}=eJ(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(tt(s)){let t=e2(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(tr(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(te(s)){// Should never get here, deferred data should be awaited for fetchers
// in resolveDeferredResults
l(false,"Unhandled fetcher deferred data")}else{let t=ty(s.data);e.fetchers.set(r,t)}});return{loaderData:u,errors:c}}function e0(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 e1(e){if(!e){return{}}return tt(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 e2(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 e6(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 e4(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 ef(e||500,s,new Error(u),true)}// Find any returned redirect errors, starting from the lowest match
function e5(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(tr(n)){return{key:r,result:n}}}}function e3(e){let t=typeof e==="string"?v(e):e;return h(n({},t,{hash:""}))}function e7(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 e8(e){return e!=null&&typeof e==="object"&&"type"in e&&"result"in e&&(e.type===g.data||e.type===g.error)}function e9(e){return ta(e.result)&&eb.has(e.result.status)}function te(e){return e.type===g.deferred}function tt(e){return e.type===g.error}function tr(e){return(e&&e.type)===g.redirect}function tn(e){return typeof e==="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ti(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 ta(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.headers==="object"&&typeof e.body!=="undefined"}function to(e){if(!ta(e)){return false}let t=e.status;let r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function ts(e){return eg.has(e.toLowerCase())}function tu(e){return ev.has(e.toLowerCase())}async function tl(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&&!eH(c,l)&&(i&&i[l.route.id])!==undefined;if(te(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 td(u,r,false).then(e=>{if(e){t[s]=e}})}}}async function tc(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(te(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 td(s,o.signal,true).then(e=>{if(e){t[i]=e}})}}}async function td(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 tf(e){return new URLSearchParams(e).getAll("index").some(e=>e==="")}function tp(e,t){let r=typeof t==="string"?v(t).search:t.search;if(e[e.length-1].route.index&&tf(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=W(e);return n[n.length-1]}function th(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 tv(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 tm(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 tg(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 tb(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 ty(e){let t={state:"idle",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined,json:undefined,text:undefined,data:e};return t}function t_(e,t){try{let r=e.sessionStorage.getItem(eS);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 tw(e,t){if(t.size>0){let r={};for(let[e,n]of t){r[e]=[...n]}try{e.sessionStorage.setItem(eS,JSON.stringify(r))}catch(e){c(false,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}//#endregion
//# sourceMappingURL=router.js.map
},82826:function(e,t,r){"use strict";r.d(t,{A:()=>S});/* import */var n=r(52274);/* import */var i=r(41594);/* import */var a=/*#__PURE__*/r.n(i);/* import */var o=r(75206);/* 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,A=w===void 0?true:w,x=t.__source,E=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],I=T[1];var R=(0,i.useState)({}),D=R[0],P=R[1];var M=(0,i.useState)(),F=M[0],Y=M[1];var L=g(function(){return{container:d(),renders:1}});var H=Object.assign({ignoreAttributes:A},S,{content:L.container});if(O){if(false){}H.trigger="manual";H.hideOnClick=false}if(k){_=true}var N=H;var j=H.plugins||[];if(p){N=Object.assign({},H,{plugins:k&&l.data!=null?[].concat(j,[{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;Y(r.content)}}}}]):j,render:function e(){return{popper:L.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||L.ref||d(),Object.assign({},N,{plugins:[y].concat(H.plugins||[])}));L.instance=r;if(_){r.disable()}if(s){r.show()}if(k){l.hook({instance:r,content:n,props:N,setSingletonContent:Y})}I(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(L.renders===1){L.renders++;return}var t=L.instance;t.setProps(v(t.props,N));// 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:N,setSingletonContent:Y})}});m(function(){var e;if(!p){return}var t=L.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(D.placement!==r.placement||D.referenceHidden!==(n==null?void 0:n.isReferenceHidden)||D.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={}}}])})})},[D.placement,D.referenceHidden,D.escaped].concat(U));return /*#__PURE__*/a().createElement(a().Fragment,null,r?/*#__PURE__*/(0,i.cloneElement)(r,{ref:function e(e){L.ref=e;c(r.ref,e)}}):null,C&&/*#__PURE__*/(0,o.createPortal)(p?p(f(D),F,L.instance):n,L.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 A=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 x=/*#__PURE__*//* unused pure expression or super */null&&w(createSingleton);var E=/*#__PURE__*/A(/*#__PURE__*/_(n/* ["default"] */.Ay),{render:function e(){return""}});/* export default */const S=E;//# sourceMappingURL=tippy-react-headless.esm.js.map
},81242: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+_+"*",A=l+"(?:\\s*"+c+"|"+w+")?",x="((?:-?"+A+")|(?:inherit|auto))",E="(?:-?"+l+"(?:\\s*"+c+")?)",S="(?:\\+|\\-|\\*|\\/)",O="(?:\\(|\\)|\\t| )",k="(?:"+O+"|"+E+"|"+S+"){3,}",T="(?:calc\\((?:"+k+")\\))",C="((?:-?"+A+")|(?:inherit|auto)|"+T+")",I="((?:margin|padding|border-width)\\s*:\\s*)",R="((?:-color|border-style)\\s*:\\s*)",D="(#?"+_+"+|(?: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+")*?",M="(?![a-zA-Z])",F="(?!("+_+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+o+")*?{)",Y="(?!"+P+p+"\\))",L="(?="+P+p+"\\))",H="(\\s*(?:!important\\s*)?[;}])",// Regular expressions
N=/`TMP`/g,j=/`TMPLTR`/g,U=/`TMPRTL`/g,B=new RegExp(g,"gi"),z=new RegExp("("+m+F+"[^;}]+;?)","gi"),K=new RegExp("("+m+v+"})","gi"),q=new RegExp("("+d+")ltr","gi"),V=new RegExp("("+d+")rtl","gi"),W=new RegExp(h+"(left)"+M+Y+F,"gi"),G=new RegExp(h+"(right)"+M+Y+F,"gi"),$=new RegExp(h+"(left)"+L,"gi"),Q=new RegExp(h+"(right)"+L,"gi"),X=/(:dir\( *)ltr( *\))/g,J=/(:dir\( *)rtl( *\))/g,Z=new RegExp(h+"(ltr)"+L,"gi"),ee=new RegExp(h+"(rtl)"+L,"gi"),et=new RegExp(h+"([ns]?)e-resize","gi"),er=new RegExp(h+"([ns]?)w-resize","gi"),en=new RegExp(I+C+"(\\s+)"+C+"(\\s+)"+C+"(\\s+)"+C+H,"gi"),ei=new RegExp(R+D+"(\\s+)"+D+"(\\s+)"+D+"(\\s+)"+D+H,"gi"),ea=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+A+")","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*)"+x+"(?:(?:\\s+"+x+")(?:\\s+"+x+")?(?:\\s+"+x+")?)?"+"(?:(?:(?:\\s*\\/\\s*)"+x+")(?:\\s+"+x+")?(?:\\s+"+x+")?(?:\\s+"+x+")?)?"+H,"gi"),eu=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+x,"gi"),el=new RegExp("(text-shadow\\s*:\\s*)"+x+"(\\s*)"+D,"gi"),ec=new RegExp("(text-shadow\\s*:\\s*)"+D+"(\\s*)"+x,"gi"),ed=new RegExp("(text-shadow\\s*:\\s*)"+x,"gi"),ef=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+x+"(\\s*\\))","gi"),ep=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+x+"((?:\\s*,\\s*"+x+"){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(K,a),d=new n(B,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(X,"$1"+t+"$2").replace(J,"$1"+r+"$2").replace(Z,"$1"+e).replace(ee,"$1ltr").replace(N,"rtl").replace(j,"ltr").replace(U,"rtl")}if(u.transformEdgeInUrl){// Replace 'left' with 'right' and vice versa in background URLs
s=s.replace($,"$1"+e).replace(Q,"$1left").replace(N,"right")}// Transform rules
s=s// Replace direction: ltr; with direction: rtl; and vice versa.
.replace(q,"$1"+e).replace(V,"$1ltr").replace(N,"rtl")// Flip rules like left: , padding-right: , etc.
.replace(W,"$1"+e).replace(G,"$1left").replace(N,"right")// Flip East and West in rules like cursor: nw-resize;
.replace(et,"$1$2"+e).replace(er,"$1$2e-resize").replace(N,"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}},66631:function(e,t,r){"use strict";r.d(t,{A:()=>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}},36014:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(6969);/* export default */const i=n/* ["default"] */.A},71858:function(e,t,r){"use strict";r.d(t,{q:()=>i});var n={};function i(){return n}function a(e){n=e}},11270:function(e,t,r){"use strict";r.d(t,{A:()=>v});/* import */var n=r(25117);/* import */var i=r(89610);/* import */var a=r(24127);/* import */var o=r(25785);/* import */var s=r(50464);/* import */var u=r(66631);/* import */var l=r(91536);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 */.A.y(e,t)},// Local week-numbering year
Y:function e(e,t,r,n){var i=(0,s/* ["default"] */.A)(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"] */.A)(o,2)}// Ordinal number
if(t==="Yo"){return r.ordinalNumber(a,{unit:"year"})}// Padding
return(0,u/* ["default"] */.A)(a,t.length)},// ISO week-numbering year
R:function e(e,t){var r=(0,a/* ["default"] */.A)(e);// Padding
return(0,u/* ["default"] */.A)(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"] */.A)(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"] */.A)(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"] */.A)(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 */.A.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"] */.A)(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"] */.A)(e,n);if(t==="wo"){return r.ordinalNumber(i,{unit:"week"})}return(0,u/* ["default"] */.A)(i,t.length)},// ISO week of year
I:function e(e,t,r){var n=(0,i/* ["default"] */.A)(e);if(t==="Io"){return r.ordinalNumber(n,{unit:"week"})}return(0,u/* ["default"] */.A)(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 */.A.d(e,t)},// Day of year
D:function e(e,t,r){var i=(0,n/* ["default"] */.A)(e);if(t==="Do"){return r.ordinalNumber(i,{unit:"dayOfYear"})}return(0,u/* ["default"] */.A)(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"] */.A)(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"] */.A)(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"] */.A)(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 */.A.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 */.A.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"] */.A)(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"] */.A)(n,t.length)},// Minute
m:function e(e,t,r){if(t==="mo"){return r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"})}return l/* ["default"].m */.A.m(e,t)},// Second
s:function e(e,t,r){if(t==="so"){return r.ordinalNumber(e.getUTCSeconds(),{unit:"second"})}return l/* ["default"].s */.A.s(e,t)},// Fraction of second
S:function e(e,t){return l/* ["default"].S */.A.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"] */.A)(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"] */.A)(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"] */.A)(a,2)}function p(e,t){if(e%60===0){var r=e>0?"-":"+";return r+(0,u/* ["default"] */.A)(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"] */.A)(Math.floor(i/60),2);var o=(0,u/* ["default"] */.A)(i%60,2);return n+a+r+o}/* export default */const v=d},91536:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(66631);/*
 * |     | 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"] */.A)(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"] */.A)(r+1,2)},// Day of the month
d:function e(e,t){return(0,n/* ["default"] */.A)(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"] */.A)(e.getUTCHours()%12||12,t.length)},// Hour [0-23]
H:function e(e,t){return(0,n/* ["default"] */.A)(e.getUTCHours(),t.length)},// Minute
m:function e(e,t){return(0,n/* ["default"] */.A)(e.getUTCMinutes(),t.length)},// Second
s:function e(e,t){return(0,n/* ["default"] */.A)(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"] */.A)(a,t.length)}};/* export default */const a=i},91788:function(e,t,r){"use strict";r.d(t,{A:()=>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};/* export default */const s=o},67044:function(e,t,r){"use strict";r.d(t,{A:()=>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()}},25117:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(10123);/* import */var i=r(70551);var a=864e5;function o(e){(0,i/* ["default"] */.A)(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}},89610:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(10123);/* import */var i=r(9411);/* import */var a=r(37182);/* import */var o=r(70551);var s=6048e5;function u(e){(0,o/* ["default"] */.A)(1,arguments);var t=(0,n["default"])(e);var r=(0,i/* ["default"] */.A)(t).getTime()-(0,a/* ["default"] */.A)(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}},24127:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(10123);/* import */var i=r(70551);/* import */var a=r(9411);function o(e){(0,i/* ["default"] */.A)(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"] */.A)(o);var u=new Date(0);u.setUTCFullYear(r,0,4);u.setUTCHours(0,0,0,0);var l=(0,a/* ["default"] */.A)(u);if(t.getTime()>=s.getTime()){return r+1}else if(t.getTime()>=l.getTime()){return r}else{return r-1}}},25785:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(10123);/* import */var i=r(89742);/* import */var a=r(79003);/* import */var o=r(70551);var s=6048e5;function u(e,t){(0,o/* ["default"] */.A)(1,arguments);var r=(0,n["default"])(e);var u=(0,i/* ["default"] */.A)(r,t).getTime()-(0,a/* ["default"] */.A)(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}},50464:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(10123);/* import */var i=r(70551);/* import */var a=r(89742);/* import */var o=r(94188);/* import */var s=r(71858);function u(e,t){var r,u,l,c,d,f,p,h;(0,i/* ["default"] */.A)(1,arguments);var v=(0,n["default"])(e);var m=v.getUTCFullYear();var g=(0,s/* .getDefaultOptions */.q)();var b=(0,o/* ["default"] */.A)((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"] */.A)(y,t);var w=new Date(0);w.setUTCFullYear(m,0,b);w.setUTCHours(0,0,0,0);var A=(0,a/* ["default"] */.A)(w,t);if(v.getTime()>=_.getTime()){return m+1}else if(v.getTime()>=A.getTime()){return m}else{return m-1}}},41109:function(e,t,r){"use strict";r.d(t,{ef:()=>a,lJ:()=>s,xM:()=>o});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"))}}},70551:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e,t){if(t.length<e){throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}}},9411:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(10123);/* import */var i=r(70551);function a(e){(0,i/* ["default"] */.A)(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}},37182:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(24127);/* import */var i=r(9411);/* import */var a=r(70551);function o(e){(0,a/* ["default"] */.A)(1,arguments);var t=(0,n/* ["default"] */.A)(e);var r=new Date(0);r.setUTCFullYear(t,0,4);r.setUTCHours(0,0,0,0);var o=(0,i/* ["default"] */.A)(r);return o}},89742:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(10123);/* import */var i=r(70551);/* import */var a=r(94188);/* import */var o=r(71858);function s(e,t){var r,s,u,l,c,d,f,p;(0,i/* ["default"] */.A)(1,arguments);var h=(0,o/* .getDefaultOptions */.q)();var v=(0,a/* ["default"] */.A)((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}},79003:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(50464);/* import */var i=r(70551);/* import */var a=r(89742);/* import */var o=r(94188);/* import */var s=r(71858);function u(e,t){var r,u,l,c,d,f,p,h;(0,i/* ["default"] */.A)(1,arguments);var v=(0,s/* .getDefaultOptions */.q)();var m=(0,o/* ["default"] */.A)((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"] */.A)(e,t);var b=new Date(0);b.setUTCFullYear(g,0,m);b.setUTCHours(0,0,0,0);var y=(0,a/* ["default"] */.A)(b,t);return y}},94188:function(e,t,r){"use strict";r.d(t,{A:()=>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)}},7767:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(94188);/* import */var i=r(10123);/* import */var a=r(70551);/**
 * @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"] */.A)(2,arguments);var r=(0,i["default"])(e).getTime();var o=(0,n/* ["default"] */.A)(t);return new Date(r+o)}},92890:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>s});/* import */var n=r(94188);/* import */var i=r(7767);/* import */var a=r(70551);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"] */.A)(2,arguments);var r=(0,n/* ["default"] */.A)(t);return(0,i/* ["default"] */.A)(e,r*o)}},57499:function(e,t,r){"use strict";r.d(t,{Cg:()=>o,_m:()=>u,s0:()=>s});/**
 * 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},53429:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>y});/* import */var n=r(86828);/* import */var i=r(25654);/* import */var a=r(10123);/* import */var o=r(11270);/* import */var s=r(91788);/* import */var u=r(67044);/* import */var l=r(41109);/* import */var c=r(94188);/* import */var d=r(70551);/* import */var f=r(71858);/* import */var p=r(36014);// 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,A,x,E,S,O,k,T,C,I,R,D,P,M,F;(0,d/* ["default"] */.A)(2,arguments);var Y=String(t);var L=(0,f/* .getDefaultOptions */.q)();var H=(m=(g=r===null||r===void 0?void 0:r.locale)!==null&&g!==void 0?g:L.locale)!==null&&m!==void 0?m:p/* ["default"] */.A;var N=(0,c/* ["default"] */.A)((y=(w=(A=(x=r===null||r===void 0?void 0:r.firstWeekContainsDate)!==null&&x!==void 0?x:r===null||r===void 0?void 0:(E=r.locale)===null||E===void 0?void 0:(S=E.options)===null||S===void 0?void 0:S.firstWeekContainsDate)!==null&&A!==void 0?A:L.firstWeekContainsDate)!==null&&w!==void 0?w:(O=L.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(!(N>=1&&N<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var j=(0,c/* ["default"] */.A)((T=(C=(I=(R=r===null||r===void 0?void 0:r.weekStartsOn)!==null&&R!==void 0?R:r===null||r===void 0?void 0:(D=r.locale)===null||D===void 0?void 0:(P=D.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&I!==void 0?I:L.weekStartsOn)!==null&&C!==void 0?C:(M=L.locale)===null||M===void 0?void 0:(F=M.options)===null||F===void 0?void 0:F.weekStartsOn)!==null&&T!==void 0?T:0);// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
if(!(j>=0&&j<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(!H.localize){throw new RangeError("locale must contain localize property")}if(!H.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 B=(0,u/* ["default"] */.A)(U);var z=(0,i/* ["default"] */.A)(U,B);var K={firstWeekContainsDate:N,weekStartsOn:j,locale:H,_originalDate:U};var q=Y.match(v).map(function(e){var t=e[0];if(t==="p"||t==="P"){var r=s/* ["default"] */.A[t];return r(e,H.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"] */.A[i];if(a){if(!(r!==null&&r!==void 0&&r.useAdditionalWeekYearTokens)&&(0,l/* .isProtectedWeekYearToken */.xM)(n)){(0,l/* .throwProtectedError */.lJ)(n,t,String(e))}if(!(r!==null&&r!==void 0&&r.useAdditionalDayOfYearTokens)&&(0,l/* .isProtectedDayOfYearToken */.ef)(n)){(0,l/* .throwProtectedError */.lJ)(n,t,String(e))}return a(z,n,H.localize,K)}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,"'")}},27813:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* import */var n=r(10123);/* import */var i=r(70551);/**
 * @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"] */.A)(2,arguments);var r=(0,n["default"])(e);var a=(0,n["default"])(t);return r.getTime()<a.getTime()}},15290:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* import */var n=r(82284);/* import */var i=r(70551);/**
 * @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"] */.A)(1,arguments);return e instanceof Date||(0,n/* ["default"] */.A)(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}},86828:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>o});/* import */var n=r(15290);/* import */var i=r(10123);/* import */var a=r(70551);/**
 * @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"] */.A)(1,arguments);if(!(0,n["default"])(e)&&typeof e!=="number"){return false}var t=(0,i["default"])(e);return!isNaN(Number(t))}},95047:function(e,t,r){"use strict";r.d(t,{A:()=>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}}},14797:function(e,t,r){"use strict";r.d(t,{A:()=>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]}}},13091:function(e,t,r){"use strict";r.d(t,{A:()=>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}},46171:function(e,t,r){"use strict";r.d(t,{A:()=>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}}}},59475:function(e,t,r){"use strict";r.d(t,{A:()=>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};/* export default */const a=i},38878:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(95047);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"] */.A)({formats:i,defaultWidth:"full"}),time:(0,n/* ["default"] */.A)({formats:a,defaultWidth:"full"}),dateTime:(0,n/* ["default"] */.A)({formats:o,defaultWidth:"full"})};/* export default */const u=s},18860:function(e,t,r){"use strict";r.d(t,{A:()=>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]};/* export default */const a=i},71412:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(14797);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"] */.A)({values:i,defaultWidth:"wide"}),quarter:(0,n/* ["default"] */.A)({values:a,defaultWidth:"wide",argumentCallback:function e(e){return e-1}}),month:(0,n/* ["default"] */.A)({values:o,defaultWidth:"wide"}),day:(0,n/* ["default"] */.A)({values:s,defaultWidth:"wide"}),dayPeriod:(0,n/* ["default"] */.A)({values:u,defaultWidth:"wide",formattingValues:l,defaultFormattingWidth:"wide"})};/* export default */const f=d},79028:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(13091);/* import */var i=r(46171);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"] */.A)({matchPattern:a,parsePattern:o,valueCallback:function e(e){return parseInt(e,10)}}),era:(0,n/* ["default"] */.A)({matchPatterns:s,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any"}),quarter:(0,n/* ["default"] */.A)({matchPatterns:l,defaultMatchWidth:"wide",parsePatterns:c,defaultParseWidth:"any",valueCallback:function e(e){return e+1}}),month:(0,n/* ["default"] */.A)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,n/* ["default"] */.A)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),dayPeriod:(0,n/* ["default"] */.A)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:m,defaultParseWidth:"any"})};/* export default */const b=g},6969:function(e,t,r){"use strict";r.d(t,{A:()=>l});/* import */var n=r(59475);/* import */var i=r(38878);/* import */var a=r(18860);/* import */var o=r(71412);/* import */var s=r(79028);/**
 * @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"] */.A,formatLong:i/* ["default"] */.A,formatRelative:a/* ["default"] */.A,localize:o/* ["default"] */.A,match:s/* ["default"] */.A,options:{weekStartsOn:0/* Sunday */,firstWeekContainsDate:1}};/* export default */const l=u},1806:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>o});/* import */var n=r(57499);/* import */var i=r(70551);/* import */var a=r(94188);/**
 * @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"] */.A)(1,arguments);var n=(0,a/* ["default"] */.A)((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(!x(t,s,l)){return new Date(NaN)}return b(t,s,l)}else{var c=new Date(0);if(!w(t,a,o)||!A(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(!E(r,i,a)){return NaN}return r*n/* .millisecondsInHour */.s0+i*n/* .millisecondsInMinute */.Cg+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 */.s0+a*n/* .millisecondsInMinute */.Cg)}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 A(e,t){return t>=1&&t<=(_(e)?366:365)}function x(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function E(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}},25654:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(7767);/* import */var i=r(70551);/* import */var a=r(94188);/**
 * @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"] */.A)(2,arguments);var r=(0,a/* ["default"] */.A)(t);return(0,n/* ["default"] */.A)(e,-r)}},10123:function(e,t,r){"use strict";r.r(t);r.d(t,{"default":()=>a});/* import */var n=r(82284);/* import */var i=r(70551);/**
 * @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"] */.A)(1,arguments);var t=Object.prototype.toString.call(e);// Clone the date
if(e instanceof Date||(0,n/* ["default"] */.A)(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)}}},37007: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)}}},4146:function(e,t,r){"use strict";var n=r(44363);/**
 * 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},9140:function(e,t,r){"use strict";t.__esModule=true;t["default"]=v;var n=o(r(12904));var i=o(r(97902));var a=o(r(90118));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 A=d.exec(w);if(!A){throw new a["default"](4,t,w)}return{red:parseInt(""+A[1],10),green:parseInt(""+A[2],10),blue:parseInt(""+A[3],10)}}var x=h.exec(t.substring(0,50));if(x){var E=parseInt(""+x[1],10);var S=parseInt(""+x[2],10)/100;var O=parseInt(""+x[3],10)/100;var k="rgb("+(0,n["default"])(E,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(""+x[4])>1?parseFloat(""+x[4])/100:parseFloat(""+x[4])}}throw new a["default"](5)}e.exports=t["default"]},96038:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=o(r(21061));var i=o(r(99496));var a=o(r(90118));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"]},3771:function(e,t,r){"use strict";t.__esModule=true;t["default"]=s;var n=o(r(9140));var i=o(r(96038));var a=o(r(90118));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"]},90118: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"]},12904: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"]},97902: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"]},99496: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"]},21061: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"]},11630: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}},59106: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))}},47186:function(e,t,r){"use strict";var n;n=/* unused reexport */r(11630);n=t.stringify=r(59106)},5338:function(e,t,r){"use strict";var n=r(75206);if(true){t.createRoot=n.createRoot;t.hydrateRoot=n.hydrateRoot}else{var i}},22799: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 A(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 A(e)||w(e)===c};t.isConcurrentMode=A;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},44363:function(e,t,r){"use strict";if(true){e.exports=r(22799)}else{}},47767:function(e,t,r){"use strict";r.d(t,{C5:()=>ef,Ix:()=>ev,V8:()=>eo,Ye:()=>T,Zp:()=>w,sv:()=>ep,zy:()=>m});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(45588);/**
 * React Router v6.30.2
 *
 * 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 */.Oi)(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():A()}function A(){!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(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 */.yD)(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 */.Gh)(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 */.HS)([t,o.pathname])}(!!n.replace?i.replace:i.push)(o,n.state,n)},[t,i,l,u,e]);return p}const x=/*#__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 E(){return React.useContext(x)}/**
 * 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(x.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 */.Oi)(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 */.Rr)(t):t;!(g==="/"||((w=e.pathname)==null?void 0:w.startsWith(g)))?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;_=e}else{_=y}let A=_.pathname||"/";let x=A;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=A.replace(/^\//,"").split("/");x="/"+t.slice(e.length).join("/")}let E=(0,a/* .matchRoutes */.ue)(e,{pathname:x});if(false){}let S=M(E&&E.map(e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,a/* .joinPaths */.HS)([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 */.HS)([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 */.rc.Pop}},S)}return S}function I(){let e=$();let t=(0,a/* .isRouteErrorResponse */.pX)(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 R=/*#__PURE__*/n.createElement(I,null);class D 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 M(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 */.Oi)(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||R;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(D,{location:r.location,revalidation:r.revalidation,component:f,error:o,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:true}}):v()},null)}var F=/*#__PURE__*/function(e){e["UseBlocker"]="useBlocker";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";return e}(F||{});var Y=/*#__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}(Y||{});function L(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function H(e){let t=n.useContext(s);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}function N(e){let t=n.useContext(u);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}function j(e){let t=n.useContext(f);!t?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return t}// Internal version with hookName-aware debugging
function U(e){let t=j(e);let r=t.matches[t.matches.length-1];!r.route.id?false?0:(0,a/* .UNSAFE_invariant */.Oi)(false):void 0;return r.route.id}/**
 * Returns the ID for the nearest contextual route
 */function B(){return U(Y.UseRouteId)}/**
 * Returns the current navigation, defaulting to an "idle" navigation when
 * no navigation is in progress
 */function z(){let e=N(Y.UseNavigation);return e.navigation}/**
 * Returns a revalidate function for manually triggering revalidation, as well
 * as the current state of any manual revalidations
 */function K(){let e=H(F.UseRevalidator);let t=N(Y.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}=N(Y.UseMatches);return React.useMemo(()=>e.map(e=>UNSAFE_convertRouteMatchToUiMatch(e,t)),[e,t])}/**
 * Returns the loader data for the nearest ancestor Route loader
 */function V(){let e=N(Y.UseLoaderData);let t=U(Y.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 W(e){let t=N(Y.UseRouteLoaderData);return t.loaderData[e]}/**
 * Returns the action data for the nearest ancestor Route action
 */function G(){let e=N(Y.UseActionData);let t=U(Y.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 $(){var e;let t=n.useContext(p);let r=N(Y.UseRouteError);let i=U(Y.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 Q(){let e=React.useContext(l);return e==null?void 0:e._data}/**
 * Returns the error from the nearest ancestor `<Await />` value
 */function X(){let e=React.useContext(l);return e==null?void 0:e._error}let J=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 Z(e){let{router:t,basename:r}=H(F.UseBlocker);let n=N(Y.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(++J);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}=H(F.UseNavigateStable);let t=U(Y.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 */.Oi)(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 */.Gh)(t,(0,a/* .UNSAFE_getResolveToMatches */.yD)(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 */.rc.Pop,navigator:u,static:l=false,future:f}=e;!!v()?false?0:(0,a/* .UNSAFE_invariant */.Oi)(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 */.Rr)(i)}let{pathname:m="/",search:g="",hash:b="",state:y=null,key:_="default"}=i;let w=n.useMemo(()=>{let e=(0,a/* .stripBasename */.pb)(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(eA(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 */.tH){// 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=Q();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 eA(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,eA(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=eA(e.props.children,i)}r.push(a)});return r}/**
 * Renders the result of `matchRoutes()` into a React element.
 */function ex(e){return M(e)}function eE(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:eE,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation}).initialize()}//# sourceMappingURL=index.js.map
},21020: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(41594),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},74848:function(e,t,r){"use strict";if(true){e.exports=r(21020)}else{}},52274:function(e,t,r){"use strict";r.d(t,{Ay:()=>eP});/* import */var n=r(71576);/* import */var i=r(16607);/**!
* 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 A(e){return e.split("-")[0]}function x(e){return[].slice.call(e)}function E(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 I(e){if(O(e)){return[e]}if(k(e)){return x(e)}if(Array.isArray(e)){return e}return x(document.querySelectorAll(e))}function R(e,t){e.forEach(function(e){if(e){e.style.transitionDuration=t+"ms"}})}function D(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 M(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=A(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 F(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 Y(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 L={isTouch:false};var H=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 N(){if(L.isTouch){return}L.isTouch=true;if(window.performance){document.addEventListener("mousemove",j)}}/**
 * 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 j(){var e=performance.now();if(e-H<20){L.isTouch=false;document.removeEventListener("mousemove",j)}H=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 B(){document.addEventListener("touchstart",N,c);window.addEventListener("blur",U)}var z=typeof window!=="undefined"&&typeof document!=="undefined";var K=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 V(e){var t=/[ \t]{2,}/g;var r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function W(e){return V("\n  %ctippy.js\n\n  %c"+V(e)+"\n\n  %c👷‍ This is a development-only message. It will be removed in production.\n  ")}function G(e){return[W(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 $;if(false){}function Q(){$=new Set}function X(e,t){if(e&&!$.has(t)){var r;$.add(t);(r=console).warn.apply(r,G(t))}}function J(e,t){if(e&&!$.has(t)){var r;$.add(t);(r=console).error.apply(r,G(t))}}function Z(e){var t=!e;var r=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;J(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" "));J(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}X(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=x(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(E(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 A;var O=[];var k=m(eS,r.interactiveDebounce);var C;// ===========================================================================
// 🔑 Public members
// ===========================================================================
var I=ec++;var H=null;var N=w(r.plugins);var j={// 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:I,reference:e,popper:S(),popperInstance:H,props:r,state:j,plugins:N,// methods
clearDelayTimeouts:eL,setProps:eH,setContent:eN,show:ej,hide:eU,hideWithInteractivity:eB,enable:eF,disable:eY,unmount:ez,destroy:eK};// 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 B=r.render(U),z=B.popper,q=B.onUpdate;z.setAttribute("data-tippy-root","");z.id="tippy-"+U.id;U.popper=z;e._tippy=U;z._tippy=U;var V=N.map(function(e){return e.fn(U)});var W=e.hasAttribute("aria-expanded");eA();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){J().addEventListener("mousemove",k)}});return U;// ===========================================================================
// 🔒 Private methods
// ===========================================================================
function G(){var e=U.props.touch;return Array.isArray(e)?e:[e,0]}function $(){return G()[0]==="hold"}function Q(){var e;// @ts-ignore
return!!((e=U.props.render)!=null&&e.$$tippy)}function X(){return C||e}function J(){var e=X().parentNode;return e?P(e):document}function Z(){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||L.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}V.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(W||!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===X()?"true":"false")}else{e.removeAttribute("aria-expanded")}})}function eu(){J().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(L.isTouch){if(l||t.type==="mousedown"){return}}var r=t.composedPath&&t.composedPath()[0]||t.target;// Clicked on interactive popper
if(U.props.interactive&&Y(z,r)){return}// Clicked on the event listeners target
if(y(U.props.triggerTarget||e).some(function(e){return Y(e,r)})){if(L.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=J();e.addEventListener("mousedown",ep,true);e.addEventListener("touchend",ep,c);e.addEventListener("touchstart",ev,c);e.addEventListener("touchmove",eh,c)}function eg(){var e=J();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=Z().box;function n(e){if(e.target===r){F(r,"remove",n);t()}}// Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if(e===0){return t()}F(r,"remove",g);F(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 eA(){if($()){ew("touchstart",eE,{passive:true});ew("touchend",eO,{passive:true})}b(U.props.trigger).forEach(function(e){if(e==="manual"){return}ew(e,eE);switch(e){case"mouseenter":ew("mouseleave",eO);break;case"focus":ew(K?"focusout":"blur",ek);break;case"focusin":ew("focusout",ek);break}})}function ex(){O.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,i=e.options;t.removeEventListener(r,n,i)});O=[]}function eE(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){eM(e)}}function eS(e){var t=e.target;var n=X().contains(t)||z.contains(t);if(e.type==="mousemove"&&n){return}var i=eD().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(M(i,e)){eu();eM(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}eM(e)}function ek(e){if(U.props.trigger.indexOf("focusin")<0&&e.target!==X()){return}// If focus was moved to within the popper
if(U.props.interactive&&e.relatedTarget&&z.contains(e.relatedTarget)){return}eM(e)}function eT(e){return L.isTouch?$()!==e.type.indexOf("touch")>=0:false}function eC(){eI();var t=U.props,r=t.popperOptions,i=t.placement,a=t.offset,o=t.getReferenceClientRect,s=t.moveTransition;var u=Q()?el(z).arrow:null;var l=o?{getBoundingClientRect:o,contextElement:o.contextElement||X()}:e;var c={name:"$$tippy",enabled:true,phase:"beforeWrite",requires:["computeStyles"],fn:function e(e){var t=e.state;if(Q()){var r=Z(),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(Q()&&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 */.n)(l,z,Object.assign({},r,{placement:i,onFirstUpdate:A,modifiers:d}))}function eI(){if(U.popperInstance){U.popperInstance.destroy();U.popperInstance=null}}function eR(){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=X();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 eD(){return x(z.querySelectorAll("[data-tippy-root]"))}function eP(e){U.clearDelayTimeouts();if(e){en("onTrigger",[U,e])}em();var t=ee(true);var r=G(),n=r[0],a=r[1];if(L.isTouch&&n==="hold"&&a){t=a}if(t){i=setTimeout(function(){U.show()},t)}else{U.show()}}function eM(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 eF(){U.state.isEnabled=true}function eY(){// Disabling the instance should also hide it
// https://github.com/atomiks/tippy.js-react/issues/106
U.hide();U.state.isEnabled=false}function eL(){clearTimeout(i);clearTimeout(a);cancelAnimationFrame(o)}function eH(t){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}en("onBeforeUpdate",[U,t]);ex();var r=U.props;var n=es(e,Object.assign({},r,E(t),{ignoreAttributes:true}));U.props=n;eA();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(!)
eD().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 eN(e){U.setProps({content:e})}function ej(){/* 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=L.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(X().hasAttribute("disabled")){return}en("onShow",[U],false);if(U.props.onShow(U)===false){return}U.state.isVisible=true;if(Q()){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(Q()){var a=Z(),o=a.box,s=a.content;R([o,s],0)}A=function e(){var e;if(!U.state.isVisible||f){return}f=true;// reflow
void z.offsetHeight;z.style.transition=U.props.moveTransition;if(Q()&&U.props.animation){var t=Z(),r=t.box,n=t.content;R([r,n],i);D([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&&Q()){ey(i,function(){U.state.isShown=true;en("onShown",[U])})}};eR()}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(Q()){z.style.visibility="hidden"}eu();eg();et(true);if(Q()){var i=Z(),a=i.box,o=i.content;if(U.props.animation){R([a,o],n);D([a,o],"hidden")}}ei();eo();if(U.props.animation){if(Q()){eb(n,U.unmount)}}else{U.unmount()}}function eB(e){/* istanbul ignore else */if(false){}J().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}eI();// 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
eD().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 eK(){/* istanbul ignore else */if(false){}if(U.state.isDestroyed){return}U.clearDelayTimeouts();U.unmount();ex();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){}B();var n=Object.assign({},t,{plugins:r});var i=I(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=L;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"] */.A,{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;D([a],"visible")}},onShow:function e(){if(a){a.style.transitionDuration="0ms"}},onHide:function e(){if(a){D([a],"hidden")}}}}};function ew(){var e=S();e.className=s;D([e],"hidden");return e}var eA=/* unused pure expression or super */null&&{clientX:0,clientY:0};var ex=/* unused pure expression or super */null&&[];function eE(e){var t=e.clientX,r=e.clientY;eA={clientX:t,clientY:r}}function eS(e){e.addEventListener("mousemove",eE)}function eO(e){e.removeEventListener("mousemove",eE)}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){ex.push({instance:e,doc:r});eS(r)}}function p(){ex=ex.filter(function(t){return t.instance!==e});if(ex.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(eA);a=false}if(!s()){u()}}},onTrigger:function e(e,t){if(T(t)){eA={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 eI(A(e),t.getBoundingClientRect(),x(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=x(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 eI(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 eR=/* 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&&eD(a,t)||u&&eD(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 eD(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});/* export default */const eP=eh;//# sourceMappingURL=tippy-headless.esm.js.map
},14631:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-2x-45983f4c.webp"},75510:function(e,t,r){"use strict";e.exports=r.p+"js/images/generate-text-269f7e17.webp"},45748:function(e,t,r){"use strict";// EXPORTS
r.d(t,{P:()=>/* 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")}},46306:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */rl});// EXTERNAL MODULE: ./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(2445);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread.js
var i=r(71893);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread_props.js
var a=r(55456);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var o=r(17437);// EXTERNAL MODULE: external "React"
var s=r(41594);var u=/*#__PURE__*/r.n(s);// EXTERNAL MODULE: ./node_modules/react-hook-form/dist/index.esm.mjs
var l=r(49785);// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js
var c=r(47767);// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var d=r(97665);// EXTERNAL MODULE: external "wp.i18n"
var f=r(12470);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Button.tsx
var p=r(42338);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/MagicButton.tsx
var h=r(66273);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/SVGIcon.tsx
var v=r(90209);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Tooltip.tsx
var m=r(92229);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_async_to_generator.js
var g=r(41374);// EXTERNAL MODULE: ./node_modules/date-fns/esm/isBefore/index.js
var b=r(27813);// EXTERNAL MODULE: ./node_modules/date-fns/esm/format/index.js
var y=r(53429);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var _=r(31105);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_tagged_template_literal.js
var w=r(84577);// EXTERNAL MODULE: ./assets/react/v3/shared/config/styles.ts
var A=r(10840);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/useAnimation.tsx
var x=r(47617);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var E=r(36154);// EXTERNAL MODULE: ./assets/react/v3/shared/config/typography.ts
var S=r(24219);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/usePortalPopover.tsx
var O=r(94654);// EXTERNAL MODULE: ./assets/react/v3/shared/molecules/Popover.tsx
var k=r(35198);// 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 I(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n\n        &:hover,\n        &:focus,\n        &:active {\n          background-color: ",";\n          color: ",";\n        }\n      "]);I=function t(){return e};return e}function R(){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    "]);R=function t(){return e};return e}function D(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n      "]);D=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 M(){var e=(0,w._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);M=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      }\n\n      &:active:not(:disabled) {\n        background-color: ",";\n      }\n\n      ","\n    "]);F=function t(){return e};return e}function Y(){var e=(0,w._)(["\n        color: ",";\n        box-shadow: 0 0 0 1px ",";\n      "]);Y=function t(){return e};return e}function L(){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    "]);L=function t(){return e};return e}function H(){var e=(0,w._)(["\n        background-color: ",";\n        color: ",";\n      "]);H=function t(){return e};return e}function N(){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    "]);N=function t(){return e};return e}function j(){var e=(0,w._)(["\n        color: ",";\n\n        svg {\n          color: ",";\n        }\n      "]);j=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 B(){var e=(0,w._)(["\n      color: transparent;\n    "]);B=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 K(){var e=(0,w._)(["\n      border-color: ",";\n    "]);K=function t(){return e};return e}function q(){var e=(0,w._)(["\n      border-color: ",";\n    "]);q=function t(){return e};return e}function V(){var e=(0,w._)(["\n      border-color: ",";\n    "]);V=function t(){return e};return e}function W(){var e=(0,w._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 30px;\n        height: 30px;\n      }\n    "]);W=function t(){return e};return e}function G(){var e=(0,w._)(["\n      padding-inline: ",";\n\n      svg {\n        width: 20px;\n        height: 20px;\n      }\n    "]);G=function t(){return e};return e}function $(){var e=(0,w._)(["\n      color: ",";\n    "]);$=function t(){return e};return e}function Q(){var e=(0,w._)(["\n      pointer-events: none;\n      color: ",";\n    "]);Q=function t(){return e};return e}var X=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 */.FD)("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 */.Y)(n/* .Fragment */.FK,{children:c}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:[et.dropdownOptionContent,u],children:t})]}))};var J=e=>{var{type:t="button",text:r,children:o,variant:l="primary",placement:c=O/* .POPOVER_PLACEMENTS.BOTTOM_RIGHT */.zA.BOTTOM_RIGHT,animationType:d=x/* .AnimationType.slideUp */.J6.slideUp,size:f="regular",icon:p,iconPosition:h="left",loading:m=false,disabled:g=false,tabIndex:b=-1,onClick:y,buttonCss:w,buttonContentCss:A,dropdownMaxWidth:E="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[I,R]=(0,s.useState)(false);return/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:et.wrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("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 */.Y)("span",{css:et.spinner,children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("span",{css:[et.buttonContent({loading:m,disabled:g}),A],children:[p&&h==="left"&&/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:et.buttonIcon({iconPosition:h}),children:p}),r,p&&h==="right"&&/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:et.buttonIcon({iconPosition:h}),children:p})]})]})),/*#__PURE__*/(0,n/* .jsx */.Y)("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:()=>R(!I),children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:24,height:24})})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(k/* ["default"] */.A,{gap:4,maxWidth:E,placement:c,triggerRef:C,isOpen:I,closePopover:()=>R(false),animationType:d,children:/*#__PURE__*/(0,n/* .jsx */.Y)("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;R(false);(r=e.props)===null||r===void 0?void 0:r.onClick(t)}});return /*#__PURE__*/u().cloneElement(e,t)}return e})})})]})};J.Item=X;/* export default */const Z=J;var ee=/*#__PURE__*/(0,o/* .keyframes */.i7)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var et={wrapper:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.inlineFlex */.x.display.inlineFlex(),";align-items:center;border-radius:",A/* .borderRadius["6"] */.Vq["6"],";:focus-within{box-shadow:",A/* .shadow.focus */.r7.focus,";}"),button:e=>{var{variant:t,size:r,loading:n,disabled:i}=e;return/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";",S/* .typography.caption */.I.caption("medium"),"    display:inline-block;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;color:",A/* .colorTokens.text.primary */.I6.text.primary,";border:0;padding:",A/* .spacing["8"] */.YK["8"]," ",A/* .spacing["16"] */.YK["16"],";border-radius:",A/* .borderRadius["6"] */.Vq["6"]," 0 0 ",A/* .borderRadius["6"] */.Vq["6"],";z-index:",A/* .zIndex.level */.fE.level,";transition-property:box-shadow,background-color,opacity;transition-duration:150ms;transition-timing-function:ease-in-out;position:relative;",r==="large"&&(0,o/* .css */.AH)(T(),A/* .spacing["12"] */.YK["12"],A/* .spacing["32"] */.YK["32"])," ",r==="small"&&(0,o/* .css */.AH)(C(),A/* .fontSize["13"] */.J["13"],A/* .lineHeight["20"] */.K_["20"],A/* .spacing["6"] */.YK["6"],A/* .spacing["16"] */.YK["16"]),"    \n    ",t==="primary"&&(0,o/* .css */.AH)(R(),A/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],A/* .colorTokens.text.white */.I6.text.white,A/* .colorTokens.action.primary.hover */.I6.action.primary.hover,A/* .colorTokens.text.white */.I6.text.white,A/* .colorTokens.action.primary.active */.I6.action.primary.active,A/* .colorTokens.text.white */.I6.text.white,(i||n)&&(0,o/* .css */.AH)(I(),A/* .colorTokens.action.primary.disable */.I6.action.primary.disable,A/* .colorTokens.text.disable */.I6.text.disable,A/* .colorTokens.action.primary.disable */.I6.action.primary.disable,A/* .colorTokens.text.disable */.I6.text.disable))," ",t==="secondary"&&(0,o/* .css */.AH)(P(),A/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],A/* .colorTokens.text.brand */.I6.text.brand,A/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,A/* .colorTokens.action.secondary.active */.I6.action.secondary.active,(i||n)&&(0,o/* .css */.AH)(D(),A/* .colorTokens.action.primary.disable */.I6.action.primary.disable,A/* .colorTokens.text.disable */.I6.text.disable))," ",t==="secondary"&&(0,o/* .css */.AH)(F(),A/* .colorTokens.action.outline["default"] */.I6.action.outline["default"],A/* .colorTokens.text.brand */.I6.text.brand,A/* .colorTokens.stroke.brand */.I6.stroke.brand,A/* .colorTokens.action.outline.hover */.I6.action.outline.hover,A/* .colorTokens.action.outline.active */.I6.action.outline.active,(i||n)&&(0,o/* .css */.AH)(M(),A/* .colorTokens.text.disable */.I6.text.disable,A/* .colorTokens.action.outline.disable */.I6.action.outline.disable))," ",t==="tertiary"&&(0,o/* .css */.AH)(L(),A/* .colorTokens.background.white */.I6.background.white,A/* .colorTokens.text.subdued */.I6.text.subdued,A/* .colorTokens.stroke["default"] */.I6.stroke["default"],A/* .colorTokens.background.hover */.I6.background.hover,A/* .colorTokens.stroke.hover */.I6.stroke.hover,A/* .zIndex.positive */.fE.positive,A/* .colorTokens.background.active */.I6.background.active,A/* .colorTokens.stroke.hover */.I6.stroke.hover,(i||n)&&(0,o/* .css */.AH)(Y(),A/* .colorTokens.text.disable */.I6.text.disable,A/* .colorTokens.action.outline.disable */.I6.action.outline.disable))," ",t==="danger"&&(0,o/* .css */.AH)(N(),A/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,A/* .colorTokens.text.error */.I6.text.error,A/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,A/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,(i||n)&&(0,o/* .css */.AH)(H(),A/* .colorTokens.action.primary.disable */.I6.action.primary.disable,A/* .colorTokens.text.disable */.I6.text.disable))," ",t==="text"&&(0,o/* .css */.AH)(U(),A/* .colorTokens.text.subdued */.I6.text.subdued,A/* .spacing["4"] */.YK["4"],A/* .spacing["8"] */.YK["8"],A/* .colorTokens.icon["default"] */.I6.icon["default"],A/* .colorTokens.text.primary */.I6.text.primary,A/* .colorTokens.icon.brand */.I6.icon.brand,A/* .colorTokens.text.title */.I6.text.title,A/* .colorTokens.text.title */.I6.text.title,A/* .colorTokens.icon.brand */.I6.icon.brand,(i||n)&&(0,o/* .css */.AH)(j(),A/* .colorTokens.text.disable */.I6.text.disable,A/* .colorTokens.icon.disable */.I6.icon.disable)),":disabled{cursor:not-allowed;}")},buttonContent:e=>{var{loading:t,disabled:r}=e;return/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;",t&&!r&&(0,o/* .css */.AH)(B()))},buttonIcon:e=>{var{iconPosition:t}=e;return/*#__PURE__*/(0,o/* .css */.AH)("display:grid;place-items:center;margin-right:",A/* .spacing["6"] */.YK["6"],";",t==="right"&&(0,o/* .css */.AH)(z(),A/* .spacing["6"] */.YK["6"]))},spinner:/*#__PURE__*/(0,o/* .css */.AH)("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 */.AH)(E/* .styleUtils.flexCenter */.x.flexCenter(),"    padding-inline:",A/* .spacing["8"] */.YK["8"],";border-left:1px solid transparent;border-radius:0 ",A/* .borderRadius["6"] */.Vq["6"]," ",A/* .borderRadius["6"] */.Vq["6"]," 0;svg{width:24px;height:24px;}",t==="primary"&&(0,o/* .css */.AH)(K(),A/* .colorTokens.stroke.brand */.I6.stroke.brand)," ",t==="danger"&&(0,o/* .css */.AH)(q(),A/* .colorTokens.stroke.danger */.I6.stroke.danger)," ",n&&(0,o/* .css */.AH)(V(),A/* .colorTokens.stroke.disable */.I6.stroke.disable)," ",r==="large"&&(0,o/* .css */.AH)(W(),A/* .spacing["12"] */.YK["12"])," ",r==="small"&&(0,o/* .css */.AH)(G(),A/* .spacing["6"] */.YK["6"]))},dropdownWrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;padding-block:",A/* .spacing["6"] */.YK["6"],";"),dropdownOption:e=>{var{disabled:t,isDanger:r}=e;return/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";",S/* .typography.body */.I.body(),";color:",A/* .colorTokens.text.primary */.I6.text.primary,";width:100%;padding:",A/* .spacing["6"] */.YK["6"]," ",A/* .spacing["16"] */.YK["16"]," ",A/* .spacing["6"] */.YK["6"]," ",A/* .spacing["20"] */.YK["20"],";transition:background-color 0.3s ease-in-out;cursor:pointer;display:flex;align-items:center;gap:",A/* .spacing["8"] */.YK["8"],";outline:2px solid transparent;outline-offset:-2px;",r&&(0,o/* .css */.AH)($(),A/* .colorTokens.text.error */.I6.text.error),":hover{background-color:",A/* .colorTokens.background.hover */.I6.background.hover,";color:",r?A/* .colorTokens.text.error */.I6.text.error:A/* .colorTokens.text.title */.I6.text.title,";}:focus,:active{outline-color:",A/* .colorTokens.stroke.brand */.I6.stroke.brand,";}",t&&(0,o/* .css */.AH)(Q(),A/* .colorTokens.text.disable */.I6.text.disable),"    svg:first-of-type{color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";}")},dropdownOptionContent:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;svg{flex-shrink:0;}")};// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/Modal.tsx
var er=r(1448);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/BasicModalWrapper.tsx
var en=r(25405);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/Show.tsx
var ei=r(84133);// 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 */.Y)(en/* ["default"] */.A,{onClose:()=>s({action:"CLOSE"}),entireHeader:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:" "}),maxWidth:408,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[es.wrapper,l],children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:i,srcSet:a?"".concat(i," 1x, ").concat(a," 2x"):undefined,alt:o,css:es.image})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[es.body,c],children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:S/* .typography.heading5 */.I.heading5("medium"),children:t}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{css:es.message,children:r})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:es.footer,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:u,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{onClick:()=>s({action:"CLOSE"}),size:"small",children:(0,f.__)("Ok","tutor")}),children:u})})]})})};/* export default */const eo=ea;var es={wrapper:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.flex */.x.display.flex("column"),";padding:",A/* .spacing["24"] */.YK["24"],";gap:",A/* .spacing["24"] */.YK["24"],";"),image:/*#__PURE__*/(0,o/* .css */.AH)("width:100%;height:auto;object-position:center;object-fit:contain;"),body:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",A/* .spacing["8"] */.YK["8"],";"),message:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.subdued */.I6.text.subdued,";"),footer:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.flex */.x.display.flex(),";justify-content:flex-end;gap:",A/* .spacing["16"] */.YK["16"],";padding-top:",A/* .spacing["8"] */.YK["8"],";")};// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/services/course.ts
var eu=r(85398);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/utils/utils.ts
var el=r(5081);// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var ec=r(4892);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var ed=r(95729);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/types.ts
var ef=r(51298);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/util.ts + 4 modules
var ep=r(85713);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/config/route-configs.ts + 1 modules
var eh=r(45748);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var ev=r(70540);// 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 */.p)();var ey=()=>{var e,t,r,u,h;var{fields:m}=(0,ev/* .useCourseBuilderSlot */._)();var _=(0,l/* .useFormContext */.xW)();var w=(0,c/* .useNavigate */.Zp)();var{showModal:x}=(0,er/* .useModal */.h)();var S=(0,l/* .useWatch */.FH)({name:"post_status"});var O=(0,l/* .useWatch */.FH)({name:"visibility"});var k=(0,l/* .useWatch */.FH)({name:"preview_link"});var T=(0,l/* .useWatch */.FH)({name:"isScheduleEnabled"});var C=(0,l/* .useWatch */.FH)({name:"schedule_date"});var I=(0,l/* .useWatch */.FH)({name:"schedule_time"});var[R,D]=(0,s.useState)(S);var P=(0,d/* .useQueryClient */.jE)();var M=(0,eu/* .useCreateCourseMutation */.AA)();var F=(0,eu/* .useUpdateCourseMutation */.VD)();var Y=P.getQueryData(["CourseDetails",eb]);var L=_.formState.dirtyFields.schedule_date||_.formState.dirtyFields.schedule_time;var H=!!ec/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var N=(e=ec/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||e===void 0?void 0:e.includes(ed/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var j=(t=ec/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||t===void 0?void 0:t.includes(ed/* .TutorRoles.TUTOR_INSTRUCTOR */.gt.TUTOR_INSTRUCTOR);var U=((r=ec/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.instructor_can_delete_course)==="on"||N;var B=((u=ec/* .tutorConfig.settings */.P.settings)===null||u===void 0?void 0:u.hide_admin_bar_for_users)==="off";var z=((h=ec/* .tutorConfig.settings */.P.settings)===null||h===void 0?void 0:h.instructor_can_publish_course)==="on";var K=(e,t)=>(0,g._)(function*(){var r=e=>{Promise.resolve().then(()=>{_.trigger(e,{shouldFocus:true})})};var s=()=>{w(eh/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.P.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 */.P.settings)===null||u===void 0?void 0:u.monetize_by)==="edd"){s();r("course_product_id");return}if(H&&((l=ec/* .tutorConfig.settings */.P.settings)===null||l===void 0?void 0:l.monetize_by)==="wc"&&e.course_product_id!=="-1"||((c=ec/* .tutorConfig.settings */.P.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 */.Qw)(e,(0,ep/* .findSlotFields */.DE)({fields:m.Basic},{fields:m.Additional}));D(t);if(eb){var h;var v=(0,ep/* .determinePostStatus */.q9)(t,O);var g=yield F.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 */.UA.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,ep/* .convertToGMT */.dn)(new Date)}:{},e.isScheduleEnabled&&{edit_date:true},["subscription","membership"].includes(e.course_selling_option)&&(!(0,ef/* .isDefined */.O9)(Y.course_pricing.price)||Number(Y.course_pricing.price)===0)&&{course_price:1}));if(!g.data){return}if(t==="pending"){x({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 */.AH)("align-items:center;text-align:center;"),actions:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:E/* .styleUtils.flexCenter */.x.flexCenter(),children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{as:"a",href:window.location.href.includes("wp-admin")?ec/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url,size:"small",children:(0,f.__)("Back to Courses","tutor")})})}})}if(j&&((h=ec/* .tutorConfig.settings */.P.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 */.A.TUTOR_MY_COURSES_PAGE_URL}return}var A=yield M.mutateAsync((0,i._)({},d));if(A.data){window.location.href="".concat(ec/* ["default"].TUTOR_SITE_URL */.A.TUTOR_SITE_URL,"/wp-admin/admin.php?page=create-course&course_id=").concat(A.data)}})();var q=()=>{if(!z&&!N&&j){return{text:(0,f.__)("Submit","tutor"),action:"pending"}}var e=(0,b["default"])(new Date,new Date("".concat(C," ").concat(I)));var t=!eb||["pending","draft"].includes(S);if(t){var r=L&&T&&e;return{text:r?(0,f.__)("Schedule","tutor"):(0,f.__)("Publish","tutor"),action:r?"future":"publish"}}if(T){var n=L&&e;return{text:n?(0,f.__)("Schedule","tutor"):(0,f.__)("Update","tutor"),action:"future"}}return{text:(0,f.__)("Update","tutor"),action:"publish"}};var V=()=>{var e={text:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[E/* .styleUtils.display.flex */.x.display.flex(),{alignItems:"center"}],children:[(0,f.__)("Preview","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"linkExternal",width:24,height:24})]}),onClick:!eb||S==="draft"&&eb?()=>window.open(k,"_blank","noopener"):ep/* .noop */.lQ,isDanger:false,dataCy:"preview-course"};var t={text:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:(0,f.__)("Move to Trash","tutor")}),onClick:()=>(0,g._)(function*(){if(U){try{yield _.handleSubmit(e=>K(e,"trash"))()}finally{window.location.href=window.location.href.includes("wp-admin")?ec/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}}})(),isDanger:true,dataCy:"move-to-trash"};var r={text:/*#__PURE__*/(0,n/* .jsx */.Y)(n/* .Fragment */.FK,{children:(0,f.__)("Switch to Draft","tutor")}),onClick:_.handleSubmit(e=>K(e,"draft")),isDanger:false,dataCy:"switch-to-draft"};var o={text:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:[E/* .styleUtils.display.flex */.x.display.flex(),{alignItems:"center"}],children:[(0,f.__)("Legacy Mode","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"linkExternal",width:24,height:24})]}),onClick:()=>{var e=eb?"".concat(ec/* ["default"].TUTOR_SITE_URL */.A.TUTOR_SITE_URL,"/wp-admin/post.php?post=").concat(eb,"&action=edit"):"".concat(ec/* ["default"].TUTOR_SITE_URL */.A.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 */.Y)(n/* .Fragment */.FK,{children:(0,f.__)("Publish Immediately","tutor")}),onClick:_.handleSubmit(e=>K((0,a._)((0,i._)({},e),{isScheduleEnabled:false}),"publish")),isDanger:false,dataCy:"publish-immediately"};var u=[e];if((N||z)&&T&&(0,b["default"])(new Date,new Date("".concat(C," ").concat(I)))){u.unshift(s)}if(eb&&S!=="draft"){u.pop();if(N||z){u.push(r)}}if(N||U){u.push(t)}if(N||B){u.push(o)}return u};(0,s.useEffect)(()=>{if(F.isSuccess){_.reset(_.getValues())}// eslint-disable-next-line react-hooks/exhaustive-deps
},[F.isSuccess]);return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e_.headerRight,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:S==="draft"&&O!=="private",fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{as:"a",href:k,target:"_blank",variant:"text",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"linkExternal",width:24,height:24}),iconPosition:"right",disabled:!k,size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:(0,f.__)("Preview","tutor")})}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"upload",width:24,height:24}),loading:R==="draft"&&F.isPending,iconPosition:"left",buttonCss:/*#__PURE__*/(0,o/* .css */.AH)("padding-inline:",A/* .spacing["16"] */.YK["16"],";"),onClick:_.handleSubmit(e=>K(e,"draft")),size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:(0,f.__)("Save as Draft","tutor")})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:V().length>0,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{"data-cy":"course-builder-submit-button",size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",loading:M.isPending||["publish","future","pending"].includes(R)&&F.isPending,onClick:_.handleSubmit(e=>K(e,q().action)),children:q().text}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(Z,{"data-cy":"course-builder-submit-button",text:q().text,size:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"regular":"small",variant:"primary",loading:M.isPending||["publish","future","pending"].includes(R)&&F.isPending,onClick:_.handleSubmit(e=>K(e,q().action)),dropdownMaxWidth:T&&(0,b["default"])(new Date,new Date("".concat(C," ").concat(I)))?"190px":"164px",disabledDropdown:V().length===0,children:V().map((e,t)=>/*#__PURE__*/(0,n/* .jsx */.Y)(Z.Item,{text:e.text,onClick:e.onClick,isDanger:e.isDanger,"data-cy":e.dataCy},t))})})]})};var e_={headerRight:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["12"] */.YK["12"],";")};/* export default */const ew=ey;// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseNavigatorContext.tsx
var eA=r(21094);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/For.tsx
var ex=r(8501);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/Tracker.tsx
function eE(){var e=(0,w._)(["\n      color: ",";\n    "]);eE=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,eA/* .useCourseNavigator */._)();var t=(0,c/* .useNavigate */.Zp)();var r=(0,l/* .useFormContext */.xW)();var i=r.watch("post_title");var a=e=>(0,g._)(function*(){t(e.path)})();return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{"data-cy":"tutor-tracker",css:eC.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:e,children:e=>/*#__PURE__*/(0,n/* .jsxs */.FD)("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 */.Y)("span",{"data-element-id":true,children:e.indicator}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{"data-element-name":true,"data-isActive":e.isActive,children:e.label}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:e.indicator<3,children:/*#__PURE__*/(0,n/* .jsx */.Y)("span",{"data-element-indicator":true})})]},e.id)})})};/* export default */const eT=ek;var eC={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;"),element:e=>{var{isActive:t=false,isDisabled:r=false}=e;return/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";",E/* .styleUtils.display.flex */.x.display.flex(),";",S/* .typography.small */.I.small(),";padding:",A/* .spacing["4"] */.YK["4"]," ",A/* .spacing["0"] */.YK["0"]," ",A/* .spacing["4"] */.YK["4"]," ",A/* .spacing["8"] */.YK["8"],";gap:",A/* .spacing["8"] */.YK["8"],";align-items:center;&:hover,&:focus{background:none;box-shadow:none;color:",A/* .colorTokens.text.primary */.I6.text.primary,";}&:focus-visible{outline:2px solid ",A/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;border-radius:",A/* .borderRadius["4"] */.Vq["4"],";}&:is(:first-of-type){padding-left:0;}",t&&(0,o/* .css */.AH)(eE(),A/* .colorTokens.text.primary */.I6.text.primary)," ",r&&(0,o/* .css */.AH)(eS(),A/* .colorTokens.text.hints */.I6.text.hints),"    [data-element-id]{",E/* .styleUtils.display.flex */.x.display.flex(),";",S/* .typography.small */.I.small("bold"),";line-height:",A/* .lineHeight["20"] */.K_["20"],";width:24px;height:24px;border-radius:",A/* .borderRadius.circle */.Vq.circle,";justify-content:center;align-items:center;border:1px solid ",A/* .colorTokens.color.black["10"] */.I6.color.black["10"],";color:",A/* .colorTokens.text.hints */.I6.text.hints,";",t&&(0,o/* .css */.AH)(eO(),A/* .colorTokens.stroke.brand */.I6.stroke.brand,A/* .colorTokens.stroke.brand */.I6.stroke.brand,A/* .colorTokens.design.brand */.I6.design.brand,A/* .colorTokens.text.white */.I6.text.white),"}[data-element-indicator]{width:16px;height:2px;border-radius:",A/* .spacing["6"] */.YK["6"],";background-color:",A/* .colorTokens.stroke["default"] */.I6.stroke["default"],";margin-inline:4px;}",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{[data-element-name]:not([data-isActive='true']){display:none;}}")}};// EXTERNAL MODULE: ./assets/react/v3/shared/components/fields/FormTextareaInput.tsx
var eI=r(61046);// EXTERNAL MODULE: ./assets/react/v3/shared/hooks/useFormWithGlobalError.ts
var eR=r(57148);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/ContentGenerationContext.tsx
var eD={prompt:"",title:"",featured_image:"",description:"",topics:[],time:0};var eP={title:false,description:false,topic:false,content:false,quiz:false};var eM={title:"",description:"",topic:"",content:"",quiz:""};var eF=/*#__PURE__*/u().createContext({abortControllerRef:{current:null},abortStatus:[],currentStep:"prompt",setCurrentStep:ep/* .noop */.lQ,contents:[eD],updateContents:ep/* .noop */.lQ,pointer:0,setPointer:ep/* .noop */.lQ,appendContent:ep/* .noop */.lQ,removeContent:ep/* .noop */.lQ,appendLoading:ep/* .noop */.lQ,removeLoading:ep/* .noop */.lQ,appendErrors:ep/* .noop */.lQ,removeErrors:ep/* .noop */.lQ,currentContent:{},currentErrors:{},currentAbortStatus:false,loading:[{title:false,description:false,content:false,topic:false,quiz:false}],errors:[{title:"",description:"",topic:"",content:"",quiz:""}],updateErrors:ep/* .noop */.lQ,currentLoading:{},updateLoading:ep/* .noop */.lQ,updateAbortStatus:ep/* .noop */.lQ});var eY=()=>(0,s.useContext)(eF);var eL=e=>{var{children:t}=e;var r=(0,s.useRef)(null);var[o,u]=(0,s.useState)("prompt");var[l,c]=(0,s.useState)([eD]);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 A=(0,s.useMemo)(()=>{return g[d]},[d,g]);var x=(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 */.O9)(t)?t:d;c(t=>{var r,n;var o=[...t];(r=o)[n=b]||(r[n]=eD);o[b]=(0,a._)((0,i._)({},o[b],e),{counts:{topics:l,lessons:p,quizzes:v,assignments:g}});return o})},[d]);var E=(0,s.useCallback)((e,t)=>{var r=(0,ef/* .isDefined */.O9)(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 */.O9)(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 */.O9)(t)?t:d;b(t=>{var n=[...t];n[r]=e;return n})},[d]);var k=(0,s.useCallback)(()=>{c(e=>[...e,eD])},[]);var T=(0,s.useCallback)(()=>{c(e=>[...e].slice(0,-1))},[]);var C=(0,s.useCallback)(()=>{h(e=>[...e,eP])},[]);var I=(0,s.useCallback)(()=>{h(e=>[...e].slice(0,-1))},[]);var R=(0,s.useCallback)(()=>{m(e=>[...e,eM])},[]);var D=(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:x,updateLoading:E,updateErrors:S,updateAbortStatus:O,currentContent:y,currentLoading:_,currentErrors:w,currentAbortStatus:A,appendContent:k,removeContent:T,appendLoading:C,removeLoading:I,appendErrors:R,removeErrors:D};return/*#__PURE__*/(0,n/* .jsx */.Y)(eF.Provider,{value:P,children:t})};/* export default */const eH=eL;// EXTERNAL MODULE: ./assets/react/v3/shared/services/magic-ai.ts
var eN=r(36512);// CONCATENATED MODULE: ./assets/react/v3/public/images/course-generation-placeholders/course-generation-placeholder-blue.webp
const ej=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 eB=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 eK=r.p+"js/images/course-generation-placeholder-rust-e879972a.webp";// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/hooks/useGenerateCourseContent.ts
var eq=[ej,ez,eK,eU,eB];var eV=()=>{var{abortControllerRef:e,updateContents:t,updateLoading:r,updateErrors:n,updateAbortStatus:o}=eY();var s=(0,eN/* .useGenerateCourseContentMutation */.At)("title");var u=(0,eN/* .useGenerateCourseContentMutation */.At)("description");var l=(0,eN/* .useGenerateCourseTopicNamesMutation */.MZ)();var c=(0,eN/* .useGenerateCourseTopicContentMutation */.lM)();var d=(0,eN/* .useGenerateQuizQuestionsMutation */._8)();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 */._r)(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)});A.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 A=[];for(var x=0;x<_.length;x++)b(x);yield Promise.allSettled(A);r({quiz:false},f);var E=Date.now();t({topics:_,time:E-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 eW=e=>{var{onClose:t}=e;var r=(0,eR/* .useFormWithGlobalError */.p)({defaultValues:{prompt:""}});var{setCurrentStep:o}=eY();var{startGeneration:u}=eV();(0,s.useEffect)(()=>{r.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,n/* .jsxs */.FD)("form",{css:e$.container,onSubmit:r.handleSubmit(e=>(0,g._)(function*(){o("generation");u(e.prompt)})()),children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e$.header,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:e$.headerContent,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e$.iconWithTitle,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{css:e$.title,children:(0,f.__)("AI Studio","tutor")})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:e$.actionsWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:e$.closeButton,onClick:t,children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"timesThin",width:24,height:24})})})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:e$.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)(l/* .Controller */.xI,{control:r.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(eI/* ["default"] */.A,(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 */.Y)("div",{css:e$.footer,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(h/* ["default"] */.A,{type:"submit",disabled:r.watch("prompt")==="",children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicAi",width:24,height:24}),(0,f.__)("Generate Now","tutor")]})})]})};/* export default */const eG=eW;var e$={container:/*#__PURE__*/(0,o/* .css */.AH)("position:absolute;background:",A/* .colorTokens.background.white */.I6.background.white,";box-shadow:",A/* .shadow.modal */.r7.modal,";border-radius:",A/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;top:50%;left:50%;translate:-50% -50%;max-width:560px;width:100%;:dir(rtl){translate:50% -50%;}",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}"),header:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",ed/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT,"px;background:",A/* .colorTokens.background.white */.I6.background.white,";border-bottom:1px solid ",A/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding-inline:",A/* .spacing["16"] */.YK["16"],";"),headerContent:/*#__PURE__*/(0,o/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",A/* .spacing["12"] */.YK["12"],";"),iconWithTitle:/*#__PURE__*/(0,o/* .css */.AH)("display:inline-flex;align-items:center;gap:",A/* .spacing["4"] */.YK["4"],";color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.body */.I.body("medium"),";color:",A/* .colorTokens.text.title */.I6.text.title,";text-transform:capitalize;"),subtitle:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.hints */.I6.text.hints,";"),actionsWrapper:/*#__PURE__*/(0,o/* .css */.AH)("place-self:center end;display:inline-flex;gap:",A/* .spacing["16"] */.YK["16"],";"),closeButton:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",A/* .borderRadius.circle */.Vq.circle,";background:",A/* .colorTokens.background.white */.I6.background.white,";svg{color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",A/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",A/* .shadow.focus */.r7.focus,";}"),content:/*#__PURE__*/(0,o/* .css */.AH)("background-color:",A/* .colorTokens.background.white */.I6.background.white,";overflow-y:auto;width:100%;padding:",A/* .spacing["12"] */.YK["12"]," ",A/* .spacing["20"] */.YK["20"]," ",A/* .spacing["4"] */.YK["4"]," ",A/* .spacing["20"] */.YK["20"],";"),footer:/*#__PURE__*/(0,o/* .css */.AH)("padding:",A/* .spacing["8"] */.YK["8"]," ",A/* .spacing["20"] */.YK["20"]," ",A/* .spacing["12"] */.YK["12"]," ",A/* .spacing["20"] */.YK["20"],";")};// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Alert.tsx
var eQ=r(51550);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/LoadingSpinner.tsx
var eX=r(76017);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Toast.tsx
var eJ=r(45549);// EXTERNAL MODULE: ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs
var eZ=r(55787);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Skeleton.tsx
var e0=r(8875);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/TopicContentSkeleton.tsx
var e1=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e6.spacer,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e6.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"50%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e6.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"40%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:e6.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})]})};/* export default */const e2=e1;var e6={group:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;gap:",A/* .spacing["16"] */.YK["16"],";align-items:center;"),spacer:/*#__PURE__*/(0,o/* .css */.AH)("margin-left:",A/* .spacing["16"] */.YK["16"],";display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/ContentAccordion.tsx
function e4(){var e=(0,w._)(["\n      margin-top: ",";\n    "]);e4=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 e3={lesson:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"lesson",width:24,height:24,"data-lesson-icon":true}),assignment:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"assignment",width:24,height:24,"data-assignment-icon":true}),quiz:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"quiz",width:24,height:24,"data-quiz-icon":true})};var e7=e=>{var{data:t,setIsActive:r}=e;var{currentLoading:i}=eY();var a=i.content&&t.contents.length===0;var s=(0,eZ/* .useSpring */.zh)({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 */.FD)("div",{onClick:t.contents.length?r:ep/* .noop */.lQ,onKeyDown:ep/* .noop */.lQ,css:/*#__PURE__*/(0,o/* .css */.AH)("cursor:",t.contents.length?"pointer":"default",";"),children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:te.title,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:te.titleAndIcon({isActive:t.is_active}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)("p",{children:t.title})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("p",{children:[t.contents.length," ",(0,f.__)("Contents","tutor")]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:t.contents.length>0&&!a,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:a,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:/*#__PURE__*/(0,o/* .css */.AH)("margin-top:",A/* .spacing["16"] */.YK["16"],";"),children:/*#__PURE__*/(0,n/* .jsx */.Y)(e2,{})})}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(eZ/* .animated.div */.CS.div,{style:s,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:te.content(t.is_active),children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!a,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:t.contents,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("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 */.Y)(eX/* .GradientLoadingSpinner */.em,{}):e3[e.type],/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:e.title})]},t)}})})})})})]})};var e8=()=>{var{currentContent:e}=eY();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 */.Y)("div",{css:te.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.Y)(e7,{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)}})})};/* export default */const e9=e8;var te={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["24"] */.YK["24"],";"),content:e=>/*#__PURE__*/(0,o/* .css */.AH)("margin-left:",A/* .spacing["32"] */.YK["32"],";display:flex;flex-direction:column;gap:",A/* .spacing["8"] */.YK["8"],";",e&&(0,o/* .css */.AH)(e4(),A/* .spacing["16"] */.YK["16"]),";"),contentItem:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["8"] */.YK["8"],";[data-lesson-icon]{color:",A/* .colorTokens.icon.subdued */.I6.icon.subdued,";}[data-assignment-icon]{color:",A/* .colorTokens.icon.processing */.I6.icon.processing,";}[data-quiz-icon]{color:",A/* .colorTokens.design.warning */.I6.design.warning,";}"),titleAndIcon:e=>{var{isActive:t}=e;return/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["8"] */.YK["8"],";svg{transition:transform 0.3s ease-in-out;}",t&&(0,o/* .css */.AH)(e5()),";")},title:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;p{",S/* .typography.body */.I.body("medium"),";color:",A/* .colorTokens.text.subdued */.I6.text.subdued,";}& > p{",S/* .typography.caption */.I.caption(),";}")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/ContentSkeleton.tsx
var tt=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"85%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"60%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tn.group,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"16px",height:"16px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"})]})]})};/* export default */const tr=tt;var tn={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";width:100%;margin-top:",A/* .spacing["16"] */.YK["16"],";"),group:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;gap:",A/* .spacing["16"] */.YK["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 */.FD)("div",{css:to.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"20%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"2px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"70%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"30%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"90%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"95%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"35%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"65%",height:"16px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"80%",height:"16px"})]})};/* export default */const ta=ti;var to={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";width:100%;margin-top:",A/* .spacing["16"] */.YK["16"],";")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/ai-course-modal/loaders/TitleSkeleton.tsx
var ts=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tl.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"24px",height:"24px",isRound:true}),/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"24px"})]})};/* export default */const tu=ts;var tl={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["16"] */.YK["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 */.Y)("div",{css:th.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(e0/* ["default"] */.A,{isMagicAi:true,animation:true,width:"100%",height:"390px"})})};/* export default */const tp=tf;var th={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["16"] */.YK["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 */.p)();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:A,currentLoading:x,currentErrors:E,currentAbortStatus:S,setPointer:O,appendContent:k,appendLoading:T,appendErrors:C,errors:I}=eY();var{startGeneration:R,cancelGeneration:D}=eV();var P=(0,eN/* .useSaveAIGeneratedCourseContentMutation */.rR)();var M=(0,s.useRef)(null);var F=(0,s.useRef)(null);var Y=(0,eR/* .useFormWithGlobalError */.p)({defaultValues:{prompt:""}});var L=Y.watch("prompt");var{showToast:H}=(0,eJ/* .useToast */.d)();(0,s.useEffect)(()=>{var e;d(e=>{var t=(0,i._)({},e);var r=(0,ep/* .getObjectKeys */.Co)(t);for(var n of r){var o=t[n];var s=!x[n];var u=!!E[n];t[n]=(0,a._)((0,i._)({},o),{completed:s,hasError:u})}return t});(e=F.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},[x,E]);(0,s.useEffect)(()=>{if(m){var e;(e=M.current)===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth",block:"center"});Y.setFocus("prompt")}// eslint-disable-next-line react-hooks/exhaustive-deps
},[m]);var N=(0,ep/* .getObjectValues */.Ui)(x).some(e=>e);var j=N||m||!A.title||!((r=A.topics)===null||r===void 0?void 0:r.length)||!((o=A.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 */.Y)("div",{css:tx.container,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.left,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:Object.values(c).every(e=>!e.hasError)||A.title,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.errorWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("img",{css:tx.errorImage,src:td,srcSet:"".concat(td," 1x, ").concat(tc," 2x"),alt:(0,f.__)("Ai Studio Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:tx.errorMessage,children:(0,f.__)("An error occurred while generating course content. Please try again.","tutor")})]}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.title,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:!x.title,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tu,{}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"book",width:32,height:32}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{title:A.title,children:A.title})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.leftContentWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!x.title,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tp,{}),children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.imageWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:A.featured_image,alt:A.title})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!x.description,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(ta,{}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.section,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{children:(0,f.__)("Course Info","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{dangerouslySetInnerHTML:{__html:A.description}})})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!x.topic,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tr,{}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:(u=A.topics)===null||u===void 0?void 0:u.length,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.section,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{children:(0,f.__)("Course Content","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.content,children:/*#__PURE__*/(0,n/* .jsx */.Y)(e9,{})})]})})})]})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.right,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:b.length>1,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.navigator,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",disabled:_===0||N,onClick:()=>O(e=>Math.max(0,e-1)),children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:!ed/* .isRTL */.V8?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.navigatorContent,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:_+1}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:"/"}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:b.length})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",disabled:_>=b.length-1||N,onClick:()=>O(e=>Math.min(b.length-1,e+1)),children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:!ed/* .isRTL */.V8?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.rightContents,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:y,children:(e,t)=>{var r,i,a,o,s,u,l,d;var p=_!==t;var A=_===t&&!m;var x=b[t];var E=(0,ep/* .getObjectValues */.Ui)(y[t]).some(e=>e);var S=(0,ep/* .getObjectValues */.Ui)(I[t]).every(e=>e);var D=I[t];var P=w[t];var M=x.counts&&(0,ep/* .getObjectValues */.Ui)(x.counts).some(e=>e>0)||false;return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{ref:t===_&&!m?F:undefined,css:tx.box({deactivated:p,hasError:(0,ep/* .getObjectValues */.Ui)(I[t]).some(e=>e)||P||M,isActive:_===t&&!m}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.boxContent,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{children:E&&(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 */.Y)(ei/* ["default"] */.A,{when:b[t].prompt,children:e=>/*#__PURE__*/(0,n/* .jsxs */.FD)("p",{css:tx.subtitle,children:['"',e,'"']})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.items,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:E,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:!S,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!P,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:(0,ep/* .getObjectKeys */.Co)(D),children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.item,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c[e].error_label]},t)})}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.item,children:(x===null||x===void 0?void 0:(r=x.counts)===null||r===void 0?void 0:r.topics)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{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=x.counts)===null||i===void 0?void 0:i.topics)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),c.topic.error_label]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.item,children:(x===null||x===void 0?void 0:(a=x.counts)===null||a===void 0?void 0:a.lessons)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{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=x.counts)===null||o===void 0?void 0:o.lessons)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating lessons.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.item,children:(x===null||x===void 0?void 0:(s=x.counts)===null||s===void 0?void 0:s.quizzes)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{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=x.counts)===null||u===void 0?void 0:u.quizzes)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating quizzes.","tutor")]})||""}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:(0,ep/* .isAddonEnabled */.GR)(ed/* .Addons.TUTOR_ASSIGNMENTS */.oW.TUTOR_ASSIGNMENTS),children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.item,children:(x===null||x===void 0?void 0:(l=x.counts)===null||l===void 0?void 0:l.assignments)?/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{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=x.counts)===null||d===void 0?void 0:d.assignments)]}):!P&&/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"crossCircle",width:24,height:24,"data-check-icon":true,"data-error":true}),(0,f.__)("Error generating assignments.","tutor")]})||""})})]}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(ex/* ["default"] */.A,{each:(0,ep/* .getObjectKeys */.Co)(c),children:(e,t)=>{var r=c[e];return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.item,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:p,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!p,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:r.completed,fallback:/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[/*#__PURE__*/(0,n/* .jsx */.Y)(eX/* .GradientLoadingSpinner */.em,{}),r.loading_label]}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:r.hasError?"crossCircle":"checkFilledWhite",width:24,height:24,"data-check-icon":true}),r.completed_label]})})]},t)}})})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.boxFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:A,children:/*#__PURE__*/(0,n/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"primary_outline",disabled:N,onClick:()=>{g(true)},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,f.__)("Generate a New Course","tutor")]})}),/*#__PURE__*/(0,n/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"outline",disabled:N,onClick:()=>{O(y.length);T();k();C();R(b[t].prompt,y.length)},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"tryAgain",width:24,height:24}),(0,f.__)("Regenerate Course","tutor")]})]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:tx.overlayButton({hasAnyContent:M}),onClick:()=>{if(M){O(t)}},disabled:N||_===t})]},t)}}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!N&&!m&&!((A===null||A===void 0?void 0:A.topics.every(e=>e.contents.length))&&A.topics.length)&&!S,children:/*#__PURE__*/(0,n/* .jsx */.Y)(eQ/* ["default"] */.A,{icon:"warning",type:"danger",children:(0,f.__)("Failed to generate course content. Try again.","tutor")})}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:m,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tx.box({deactivated:true,hasError:false,isActive:true}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("form",{ref:M,css:tx.regenerateForm,onSubmit:Y.handleSubmit(e=>{g(false);O(y.length);T();k();C();R(e.prompt,y.length);Y.reset()}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(l/* .Controller */.xI,{control:Y.control,name:"prompt",render:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(eI/* ["default"] */.A,(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 */.FD)("div",{css:tx.formButtons,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{variant:"primary_outline",disabled:N,onClick:()=>{g(false);Y.reset()},children:(0,f.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)(h/* ["default"] */.A,{type:"submit",disabled:N||!L,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,f.__)("Generate Now","tutor")]})]})]})})})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tx.rightFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{variant:"primary_outline",onClick:()=>{if(N){D()}else{t()}},children:N?(0,f.__)("Stop Generation","tutor"):(0,f.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{variant:"primary",disabled:j,onClick:()=>{P.mutate({course_id:t_,payload:JSON.stringify(A)});t();H({type:"success",message:(0,f.__)("Course content stored into a local file.","tutor")})},children:(0,f.__)("Append the Course","tutor")})]})]})]})})};/* export default */const tA=tw;var tx={container:/*#__PURE__*/(0,o/* .css */.AH)("position:absolute;left:0;top:0;width:100%;height:100%;display:flex;justify-content:center;align-items:end;"),navigator:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;margin-left:-",A/* .spacing["16"] */.YK["16"],";margin-bottom:",A/* .spacing["16"] */.YK["16"],";"),navigatorContent:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["4"] */.YK["4"],";span{",S/* .typography.caption */.I.caption(),";}span:first-of-type{color:",A/* .colorTokens.text.primary */.I6.text.primary,";}"),wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;gap:",A/* .spacing["28"] */.YK["28"],";height:calc(100vh - ",A/* .spacing["56"] */.YK["56"],");width:1300px;",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;gap:",A/* .spacing["16"] */.YK["16"],";flex-wrap:wrap-reverse;",E/* .styleUtils.overflowYAuto */.x.overflowYAuto,";}"),regenerateForm:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";width:100%;button{width:auto;}"),formButtons:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;width:100%;justify-content:end;align-items:center;gap:",A/* .spacing["16"] */.YK["16"],";"),leftContentWrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";padding-inline:",A/* .spacing["40"] */.YK["40"],";margin-top:",A/* .spacing["8"] */.YK["8"],";"),box:e=>{var{deactivated:t,hasError:r,isActive:n}=e;return/*#__PURE__*/(0,o/* .css */.AH)("width:100%;border-radius:",A/* .borderRadius["8"] */.Vq["8"],";border:1px solid ",r?A/* .colorTokens.stroke.danger */.I6.stroke.danger:A/* .colorTokens.bg.brand */.I6.bg.brand,";padding:",A/* .spacing["16"] */.YK["16"]," ",A/* .spacing["12"] */.YK["12"],";display:flex;gap:",A/* .spacing["12"] */.YK["12"],";transition:border 0.3s ease;position:relative;svg{flex-shrink:0;}",t&&(0,o/* .css */.AH)(tv(),A/* .colorTokens.icon.disable.muted */.I6.icon.disable.muted)," ",!t&&(0,o/* .css */.AH)(tm(),r?A/* .colorTokens.stroke.danger */.I6.stroke.danger:A/* .colorTokens.bg.brand */.I6.bg.brand)," ",n&&(0,o/* .css */.AH)(tg(),A/* .colorTokens.stroke.brand */.I6.stroke.brand),":hover{border-color:",r?A/* .colorTokens.stroke.danger */.I6.stroke.danger:A/* .colorTokens.stroke.brand */.I6.stroke.brand,";background-color:",!n&&A/* .colorTokens.background.hover */.I6.background.hover,";}")},boxFooter:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["16"] */.YK["16"],";justify-content:end;button{width:auto;}"),rightContents:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";overflow-y:auto;height:100%;padding-right:",A/* .spacing["20"] */.YK["20"],";",E/* .styleUtils.overflowYAuto */.x.overflowYAuto,";"),rightFooter:/*#__PURE__*/(0,o/* .css */.AH)("margin-top:auto;padding-top:",A/* .spacing["16"] */.YK["16"],";padding-right:",A/* .spacing["20"] */.YK["20"],";display:flex;align-items:center;justify-content:center;gap:",A/* .spacing["12"] */.YK["12"],";"),subtitle:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.title */.I6.text.title,";"),boxContent:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["12"] */.YK["12"],";width:100%;h6{",S/* .typography.body */.I.body("medium"),";color:",A/* .colorTokens.color.black.main */.I6.color.black.main,";}p{",S/* .typography.caption */.I.caption("medium"),";color:",A/* .colorTokens.text.title */.I6.text.title,";}"),items:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["4"] */.YK["4"],";position:relative;[data-error='true']{color:",A/* .colorTokens.icon.error */.I6.icon.error,";}"),item:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["8"] */.YK["8"],";",S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.title */.I6.text.title,";",E/* .styleUtils.textEllipsis */.x.textEllipsis,";svg{color:",A/* .colorTokens.stroke.success.fill70 */.I6.stroke.success.fill70,";[data-error='true']{color:",A/* .colorTokens.icon.error */.I6.icon.error,";}}"),section:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";& > h5{",S/* .typography.heading6 */.I.heading6("medium"),";color:",A/* .colorTokens.text.primary */.I6.text.primary,";height:42px;border-bottom:1px solid ",A/* .colorTokens.stroke.border */.I6.stroke.border,";}"),content:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.hints */.I6.text.hints,";display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";h6{",S/* .typography.caption */.I.caption(),";color:",A/* .colorTokens.text.primary */.I6.text.primary,";}"),left:/*#__PURE__*/(0,o/* .css */.AH)("width:792px;background-color:",A/* .colorTokens.background.white */.I6.background.white,";border-radius:",A/* .borderRadius["12"] */.Vq["12"]," ",A/* .borderRadius["12"] */.Vq["12"]," 0 0;display:flex;flex-direction:column;gap:",A/* .spacing["16"] */.YK["16"],";overflow-y:auto;padding-bottom:",A/* .spacing["32"] */.YK["32"],";",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:100%;}"),right:/*#__PURE__*/(0,o/* .css */.AH)("width:480px;height:100%;background-color:",A/* .colorTokens.background.white */.I6.background.white,";border-radius:",A/* .borderRadius["12"] */.Vq["12"]," ",A/* .borderRadius["12"] */.Vq["12"]," 0 0;padding:",A/* .spacing["24"] */.YK["24"]," ",A/* .spacing["0"] */.YK["0"]," ",A/* .spacing["24"] */.YK["24"]," ",A/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;justify-content:space-between;",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:100%;border-radius:",A/* .borderRadius["12"] */.Vq["12"],";}"),title:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;gap:",A/* .spacing["8"] */.YK["8"],";color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";z-index:",A/* .zIndex.header */.fE.header,";min-height:40px;padding:",A/* .spacing["40"] */.YK["40"]," ",A/* .spacing["40"] */.YK["40"]," ",A/* .spacing["16"] */.YK["16"]," ",A/* .spacing["40"] */.YK["40"],";background-color:",A/* .colorTokens.background.white */.I6.background.white,";svg{flex-shrink:0;color:",A/* .colorTokens.text.ai.purple */.I6.text.ai.purple,";}& > h5{",S/* .typography.heading5 */.I.heading5("medium"),";",E/* .styleUtils.textEllipsis */.x.textEllipsis,";color:",A/* .colorTokens.text.ai.purple */.I6.text.ai.purple,";}"),imageWrapper:/*#__PURE__*/(0,o/* .css */.AH)("width:100%;height:390px;border-radius:",A/* .borderRadius["10"] */.Vq["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 */.AH)(E/* .styleUtils.flexCenter */.x.flexCenter("column"),";height:100%;color:",A/* .colorTokens.icon.error */.I6.icon.error,";text-align:center;gap:",A/* .spacing["16"] */.YK["16"],";"),errorImage:/*#__PURE__*/(0,o/* .css */.AH)("height:300px;width:100%;object-fit:cover;object-position:center;"),errorMessage:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.heading5 */.I.heading5("medium"),";color:",A/* .colorTokens.text.error */.I6.text.error,";margin-inline:",A/* .spacing["96"] */.YK["96"],";"),overlayButton:e=>{var{hasAnyContent:t}=e;return/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";position:absolute;top:0;left:0;width:100%;height:100%;",!t&&(0,o/* .css */.AH)(tb()),":disabled{cursor:default;}")}};// EXTERNAL MODULE: ./assets/react/v3/shared/components/FocusTrap.tsx
var tE=r(54527);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/modals/AICourseBuilderModal.tsx
var tS=e=>{var{closeModal:t}=e;var{currentStep:r}=eY();if(r==="prompt"){return/*#__PURE__*/(0,n/* .jsx */.Y)(eG,{onClose:t})}return/*#__PURE__*/(0,n/* .jsx */.Y)(tA,{onClose:t})};var tO=e=>{var{closeModal:t}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(eH,{children:/*#__PURE__*/(0,n/* .jsx */.Y)(tE/* ["default"] */.A,{children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:tT.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(tS,{closeModal:t})})})})};/* export default */const tk=tO;var tT={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("width:100vw;height:100vh;position:relative;")};// CONCATENATED MODULE: ./assets/react/v3/public/images/logo.svg
var tC,tI,tR;function tD(){return tD=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},tD.apply(null,arguments)}var tP=function e(e){return /*#__PURE__*/s.createElement("svg",tD({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"})),tI||(tI=/*#__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"})),tR||(tR=/*#__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"})))};/* export default */const tM=tP;// CONCATENATED MODULE: ./assets/react/v3/shared/components/Logo.tsx
var tF=e=>{var{wrapperCss:t}=e;var r;var i=!!ec/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;return/*#__PURE__*/(0,n/* .jsx */.Y)("button",{tabIndex:-1,type:"button",css:[E/* .styleUtils.resetButton */.x.resetButton,tY.logo,t],children:/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:i&&((r=ec/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.course_builder_logo_url),fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(tM,{width:108,height:24}),children:e=>/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:e,alt:"Tutor LMS"})})})};var tY={logo:/*#__PURE__*/(0,o/* .css */.AH)("padding-left:",A/* .spacing["32"] */.YK["32"],";cursor:default;&:focus,&:active,&:hover{background:none;}img{max-height:24px;width:auto;object-fit:contain;object-position:center;}",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{padding-left:",A/* .spacing["24"] */.YK["24"],";}",A/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-area:logo;padding-left:",A/* .spacing["16"] */.YK["16"],";}")};/* export default */const tL=tF;// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/ConfirmationModal.tsx
var tH=r(3013);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/ProIdentifierModal.tsx
var tN=r(85544);// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/SetupOpenAiModal.tsx
var tj=r(6463);// 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 tB=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 */.p)();var tK=()=>{var e,t,r,i,a;var o=(0,l/* .useFormContext */.xW)();var s=(0,d/* .useQueryClient */.jE)();var{currentIndex:u}=(0,eA/* .useCourseNavigator */._)();var{showModal:c}=(0,er/* .useModal */.h)();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 */.P.tutor_pro_url;var _=((t=ec/* .tutorConfig.settings */.P.settings)===null||t===void 0?void 0:t.chatgpt_enable)==="on";var w=(r=ec/* .tutorConfig.settings */.P.settings)===null||r===void 0?void 0:r.chatgpt_key_exist;var A=(i=ec/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||i===void 0?void 0:i.includes(ed/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var x=((a=ec/* .tutorConfig.settings */.P.settings)===null||a===void 0?void 0:a.hide_admin_bar_for_users)==="off";var S=()=>{if(!y){c({component:tN/* ["default"] */.A,props:{image:tB,image2x:tU}})}else if(!w){c({component:tj/* ["default"] */.A,props:{image:tB,image2x:tU}})}else{c({component:tk,isMagicAi:true,props:{title:(0,f.__)("Create with AI","tutor"),icon:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24})}})}};var O=()=>{if(b){c({component:tH/* ["default"] */.A,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 */.P.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}})}else{var e=window.location.href.includes("wp-admin");window.location.href=e?ec/* .tutorConfig.backend_course_list_url */.P.backend_course_list_url:ec/* .tutorConfig.frontend_course_list_url */.P.frontend_course_list_url}};return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tV.wrapper(A||x),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tL,{}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tV.container,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tV.titleAndTackerWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tV.titleAndTacker,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{css:tV.title,children:(0,f.__)("Course Builder","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:tV.divider,"data-title-divider":true}),/*#__PURE__*/(0,n/* .jsx */.Y)(eT,{})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)(ei/* ["default"] */.A,{when:u===0&&g===0&&(_||!y),children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:tV.divider}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:E/* .styleUtils.flexCenter */.x.flexCenter(),children:/*#__PURE__*/(0,n/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"plain",css:tV.magicButton,onClick:S,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicAiColorize",width:24,height:24}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:ed/* .CURRENT_VIEWPORT.isAboveTablet */.vN.isAboveTablet,children:(0,f.__)("Generate with AI","tutor")})]})})]})]}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ew,{})})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:tV.closeButtonWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop,children:/*#__PURE__*/(0,n/* .jsx */.Y)(ew,{})}),/*#__PURE__*/(0,n/* .jsx */.Y)(m/* ["default"] */.A,{delay:200,content:(0,f.__)("Exit","tutor"),placement:"left",children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{isIconOnly:true,size:"small",variant:"danger",buttonCss:tV.closeButton,"aria-label":(0,f.__)("Exit","tutor"),onClick:O,icon:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"cross",width:32,height:32})})})]})]})};/* export default */const tq=tK;var tV={wrapper:e=>/*#__PURE__*/(0,o/* .css */.AH)("height:",A/* .headerHeight */.$A,"px;width:100%;background-color:",A/* .colorTokens.surface.navbar */.I6.surface.navbar,";border-bottom:1px solid ",A/* .colorTokens.stroke.divider */.I6.stroke.divider,";display:grid;grid-template-columns:1fr ",A/* .containerMaxWidth */.iL,"px 1fr;align-items:center;position:sticky;top:",e?ed/* .WP_ADMIN_BAR_HEIGHT */.I4:"0px",";z-index:",A/* .zIndex.header */.fE.header,";",A/* .Breakpoint.tablet */.EA.tablet,"{grid-template-columns:auto 1fr auto;}",A/* .Breakpoint.smallMobile */.EA.smallMobile,"{height:auto;padding-block:",A/* .spacing["8"] */.YK["8"],";grid-template-areas:'logo closeButton'\n        'container container';row-gap:",A/* .spacing["8"] */.YK["8"],";}"),container:/*#__PURE__*/(0,o/* .css */.AH)("max-width:",A/* .containerMaxWidth */.iL,"px;width:100%;height:",A/* .headerHeight */.$A,"px;",E/* .styleUtils.display.flex */.x.display.flex(),";justify-content:space-between;align-items:center;",A/* .Breakpoint.tablet */.EA.tablet,"{[data-title-divider]{margin-left:",A/* .spacing["12"] */.YK["12"],";}}",A/* .Breakpoint.smallMobile */.EA.smallMobile,"{height:auto;grid-area:container;order:2;justify-content:center;[data-title-divider]{display:none;}}"),titleAndTackerWrapper:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;"),titleAndTacker:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.display.flex */.x.display.flex(),";gap:",A/* .spacing["12"] */.YK["12"],";align-items:center;margin-right:",A/* .spacing["16"] */.YK["16"],";"),divider:/*#__PURE__*/(0,o/* .css */.AH)("width:2px;height:16px;background-color:",A/* .colorTokens.stroke.divider */.I6.stroke.divider,";border-radius:",A/* .borderRadius["20"] */.Vq["20"],";"),title:/*#__PURE__*/(0,o/* .css */.AH)(S/* .typography.body */.I.body("medium"),";color:",A/* .colorTokens.text.subdued */.I6.text.subdued,";",A/* .Breakpoint.tablet */.EA.tablet,"{display:none;[data-title-divider]{display:none;}}"),closeButtonWrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;justify-content:flex-end;margin-right:",A/* .spacing["16"] */.YK["16"],";",A/* .Breakpoint.smallMobile */.EA.smallMobile,"{grid-area:closeButton;order:1;margin-right:",A/* .spacing["8"] */.YK["8"],";}"),closeButton:/*#__PURE__*/(0,o/* .css */.AH)("background-color:transparent;svg{color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:hover,&:focus{background-color:",A/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";svg{color:",A/* .colorTokens.icon.error */.I6.icon.error,";}}"),previewButton:/*#__PURE__*/(0,o/* .css */.AH)("color:",A/* .colorTokens.text.title */.I6.text.title,";svg{color:",A/* .colorTokens.icon["default"] */.I6.icon["default"],";}"),magicButton:/*#__PURE__*/(0,o/* .css */.AH)("display:inline-flex;align-items:center;gap:",A/* .spacing["4"] */.YK["4"],";padding-inline:",A/* .spacing["4"] */.YK["4"],";margin-left:",A/* .spacing["4"] */.YK["4"],";")};// EXTERNAL MODULE: ./node_modules/events/events.js
var tW=r(37007);// CONCATENATED MODULE: ./assets/react/v3/shared/utils/localStorage.ts
var tG=new tW.EventEmitter;var t$=(e,t)=>{localStorage.setItem(e,t)};var tQ=e=>{localStorage.removeItem(e)};var tX=e=>{if(typeof window!=="undefined"){return localStorage.getItem(e)||null}return null};// CONCATENATED MODULE: ./assets/react/v3/shared/hooks/useResize.ts
var tJ=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 */.O9)(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 */.nF)(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 */.O9)(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 */.O9)(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 */.O9)(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 tZ(){var e=(0,w._)(["\n      border-top-left-radius: ",";\n      background-color: ",";\n      box-shadow: ",";\n    "]);tZ=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 t6(){var e=(0,w._)(["\n      transform: rotate(180deg);\n    "]);t6=function t(){return e};return e}function t4(){var e=(0,w._)(["\n      display: none;\n    "]);t4=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,eZ/* .useSpring */.zh)({width:!e?ed/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH:ed/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,height:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT:!e?ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT:ed/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,config:{duration:300,easing:e=>e*(2-e)}});var{handleResize:_}=tJ({resizeDivRef:g,options:{minHeight:ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,minWidth:ed/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH}});var w=e=>{e.currentTarget.contentEditable="false";var t;var r=(0,ep/* .jsonParse */.Gl)((t=tX(ed/* .LocalStorageKeys.notebook */.Hh.notebook))!==null&&t!==void 0?t:"{}");t$(ed/* .LocalStorageKeys.notebook */.Hh.notebook,JSON.stringify((0,a._)((0,i._)({},r),{content:e.currentTarget.innerHTML})))};var A=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 x=t=>{t.preventDefault();t.stopPropagation();if(e||!u){return}if((0,ef/* .isDefined */.O9)(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 */.O9)(g.current)){var e=g.current;var{left:t,top:r,height:n,width:o}=e.style;var s=(0,ep/* .jsonParse */.Gl)(tX(ed/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");t$(ed/* .LocalStorageKeys.notebook */.Hh.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 */.nF)(e=>{if(!r||!(0,ef/* .isDefined */.O9)(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 */.O9)(g.current)){return}var e=g.current;var{left:t,top:r,height:n,width:s}=e.style;var u=(0,ep/* .jsonParse */.Gl)(tX(ed/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");if(t==="auto"||r==="auto"){return}t$(ed/* .LocalStorageKeys.notebook */.Hh.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 */.O9)(g.current)){return}var t=g.current;if(!u){t.style.left="auto";t.style.top="auto";t.style.height=ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?"".concat(ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,"px"):"".concat(ed/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,"px");return}if(!e&&u){var r;var n=(0,ep/* .jsonParse */.Gl)((r=tX(ed/* .LocalStorageKeys.notebook */.Hh.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 */.O9)(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 */.Gy.MIN_NOTEBOOK_WIDTH);t.style.top=l(a,window.innerHeight,ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT);t.style.width=c(s,window.innerWidth,ed/* .notebook.MIN_NOTEBOOK_WIDTH */.Gy.MIN_NOTEBOOK_WIDTH,i);t.style.height=c(o,window.innerHeight,ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,a);return}},[e,u]);(0,s.useEffect)(()=>{var e=(0,ep/* .jsonParse */.Gl)(tX(ed/* .LocalStorageKeys.notebook */.Hh.notebook)||"{}");if(e.content){m(e.content)}},[]);return/*#__PURE__*/(0,n/* .jsxs */.FD)(eZ/* .animated.div */.CS.div,{ref:g,css:t7.wrapper({isCollapsed:e,isFloating:u}),style:!u?(0,i._)({},y):{},children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!e,fallback:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:t7.verticalTitleWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:[E/* .styleUtils.resetButton */.x.resetButton,t7.verticalButton],onClick:()=>t(false),children:ed/* .CURRENT_VIEWPORT.isAboveDesktop */.vN.isAboveDesktop?(0,f.__)("Notebook","tutor"):/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"note",height:24,width:24})})}),children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t7.header({isCollapsed:e,isFloating:u}),onMouseDown:x,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:E/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),children:(0,f.__)("Notebook","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:t7.actions,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:!u,children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>{t(e=>!e);l(false)},buttonCss:t7.collapseButton({isCollapsed:e}),children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"plusMinus",height:24,width:24})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>l(e=>!e),children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:u?"arrowsIn":"arrowsOut",height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.Y)(ei/* ["default"] */.A,{when:u,children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",size:"small",onClick:()=>{l(false);t(true)},children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"cross",height:24,width:24})})})]})]})}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:t7.notebookWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{ref:b,css:t7.notebook({isCollapsed:e}),onBlur:e=>w(e),onPaste:e=>A(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 */.Y)(ei/* ["default"] */.A,{when:u&&!e,children:/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",css:t7.textFieldExpand,onMouseDown:e=>_(e,"bottom-right"),onMouseUp:S,children:/*#__PURE__*/(0,n/* .jsx */.Y)(v/* ["default"] */.A,{name:"textFieldExpand",height:16,width:16})})})]})};/* export default */const t3=t5;var t7={wrapper:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,o/* .css */.AH)("position:fixed;background-color:",A/* .colorTokens.background.active */.I6.background.active,";bottom:0;right:0;height:",ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,"px;border-radius:",A/* .borderRadius.card */.Vq.card," 0 0 0;transition:box-shadow background-color 0.3s ease-in-out;box-shadow:",A/* .shadow.notebook */.r7.notebook,";z-index:",A/* .zIndex.notebook */.fE.notebook,";overflow:hidden;&:focus-within{outline:2px solid ",A/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",!t&&(0,o/* .css */.AH)(tZ(),A/* .borderRadius.card */.Vq.card,A/* .colorTokens.background.white */.I6.background.white,A/* .shadow.dropList */.r7.dropList)," ",r&&(0,o/* .css */.AH)(t0(),A/* .borderRadius.card */.Vq.card))},verticalTitleWrapper:/*#__PURE__*/(0,o/* .css */.AH)("position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-90deg);background-color:",A/* .colorTokens.background.active */.I6.background.active,";color:",A/* .colorTokens.text.title */.I6.text.title,";",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{transform:translate(-50%,-50%) rotate(0deg);}"),verticalButton:/*#__PURE__*/(0,o/* .css */.AH)("text-align:center;width:",ed/* .notebook.MIN_NOTEBOOK_HEIGHT */.Gy.MIN_NOTEBOOK_HEIGHT,"px;height:",ed/* .notebook.NOTEBOOK_HEADER */.Gy.NOTEBOOK_HEADER,"px;",S/* .typography.body */.I.body("bold"),";&:focus,&:active,&:hover{background:none;color:",A/* .colorTokens.text.primary */.I6.text.primary,";}"),header:e=>{var{isCollapsed:t,isFloating:r}=e;return/*#__PURE__*/(0,o/* .css */.AH)("display:flex;justify-content:space-between;align-items:center;padding:",A/* .spacing["12"] */.YK["12"]," ",A/* .spacing["16"] */.YK["16"],";",S/* .typography.body */.I.body("medium"),";color:transparent;",r&&(0,o/* .css */.AH)(t1(),A/* .colorTokens.text.title */.I6.text.title)," ",!t&&(0,o/* .css */.AH)(t2(),A/* .colorTokens.stroke.divider */.I6.stroke.divider,A/* .spacing["8"] */.YK["8"],A/* .spacing["12"] */.YK["12"],A/* .colorTokens.text.title */.I6.text.title))},actions:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;"),collapseButton:e=>{var{isCollapsed:t}=e;return/*#__PURE__*/(0,o/* .css */.AH)("transition:all 0.3s ease-in-out;",!t&&(0,o/* .css */.AH)(t6()))},notebookWrapper:/*#__PURE__*/(0,o/* .css */.AH)("padding-block:",A/* .spacing["16"] */.YK["16"],";width:100%;height:calc(100% - ",ed/* .notebook.NOTEBOOK_HEADER */.Gy.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 */.AH)(E/* .styleUtils.overflowYAuto */.x.overflowYAuto,";padding-inline:",A/* .spacing["16"] */.YK["16"],";outline:none;word-wrap:break-word;height:100%;white-space:pre-wrap;",t&&(0,o/* .css */.AH)(t4()))},textFieldExpand:/*#__PURE__*/(0,o/* .css */.AH)(E/* .styleUtils.resetButton */.x.resetButton,";position:absolute;bottom:",A/* .spacing["4"] */.YK["4"],";right:",A/* .spacing["4"] */.YK["4"],";user-select:none;color:",A/* .colorTokens.icon.hints */.I6.icon.hints,";cursor:nwse-resize;")};// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/layouts/Layout.tsx
var t8=()=>{var{fields:e}=(0,ev/* .useCourseBuilderSlot */._)();var t=(0,el/* .getCourseId */.p)();var r=(0,eR/* .useFormWithGlobalError */.p)({defaultValues:eu/* .courseDefaultData */.dQ,shouldFocusError:true,mode:"onChange"});var o=(0,eu/* .useCourseDetailsQuery */.p1)(Number(t));(0,s.useEffect)(()=>{if(o.data){var t=Object.keys(r.formState.dirtyFields);var n=(0,eu/* .convertCourseDataToFormData */.KV)(o.data,(0,ep/* .findSlotFields */.DE)({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 */.Y)(l/* .FormProvider */.Op,(0,a._)((0,i._)({},r),{children:/*#__PURE__*/(0,n/* .jsx */.Y)(eA/* .CourseNavigatorProvider */.A,{children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:re.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(tq,{}),/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:re.contentWrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(c/* .Outlet */.sv,{})}),/*#__PURE__*/(0,n/* .jsx */.Y)(t3,{})]})})}))};/* export default */const t9=t8;var re={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("background-color:",A/* .colorTokens.surface.courseBuilder */.I6.surface.courseBuilder,";"),contentWrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;max-width:",A/* .containerMaxWidth */.iL,"px;width:100%;min-height:calc(100vh - ",A/* .headerHeight */.$A,"px);margin:0 auto;",A/* .Breakpoint.smallTablet */.EA.smallTablet,"{padding-inline:",A/* .spacing["12"] */.YK["12"],";padding-bottom:",A/* .spacing["56"] */.YK["56"],";}")};// EXTERNAL MODULE: ./assets/react/v3/shared/components/ErrorBoundary.tsx
var rt=r(66238);// CONCATENATED MODULE: ./assets/react/v3/shared/components/RouteSuspense.tsx
var rr=e=>{var{component:t}=e;var{pathname:r}=(0,c/* .useLocation */.zy)();return/*#__PURE__*/(0,n/* .jsx */.Y)(rt/* ["default"] */.A,{children:/*#__PURE__*/(0,n/* .jsx */.Y)(s.Suspense,{fallback:/*#__PURE__*/(0,n/* .jsx */.Y)(eX/* .LoadingOverlay */.p8,{}),children:t})},r)};/* export default */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 */.P.course_builder_basic_locales,"tutor");return r.e(/* import() | tutor-course-builder-basic */"639").then(r.bind(r,50651))});ra=/*#__PURE__*/u().lazy(()=>{(0,f.setLocaleData)(ec/* .tutorConfig.course_builder_curriculum_locales */.P.course_builder_curriculum_locales,"tutor");return r.e(/* import() | tutor-course-builder-curriculum */"410").then(r.bind(r,80280))});ro=/*#__PURE__*/u().lazy(()=>{(0,f.setLocaleData)(ec/* .tutorConfig.course_builder_additional_locales */.P.course_builder_additional_locales,"tutor");return r.e(/* import() | tutor-course-builder-additional */"132").then(r.bind(r,44917))});rs=/*#__PURE__*/u().lazy(()=>r.e(/* import() | tutor-course-builder-icon */"456").then(r.bind(r,12799)))}var ru=[{path:eh/* .CourseBuilderRouteConfigs.Home.template */.P.Home.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(t9,{}),children:[{index:true,element:/*#__PURE__*/(0,n/* .jsx */.Y)(c/* .Navigate */.C5,{to:eh/* .CourseBuilderRouteConfigs.CourseBasics.template */.P.CourseBasics.template,replace:true})},{path:eh/* .CourseBuilderRouteConfigs.CourseBasics.template */.P.CourseBasics.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(ri,{})})},{path:eh/* .CourseBuilderRouteConfigs.CourseCurriculum.template */.P.CourseCurriculum.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(ra,{})})},{path:eh/* .CourseBuilderRouteConfigs.CourseAdditional.template */.P.CourseAdditional.template,element:/*#__PURE__*/(0,n/* .jsx */.Y)(rn,{component:/*#__PURE__*/(0,n/* .jsx */.Y)(ro,{})})},...false?0:[]]},{path:"*",element:/*#__PURE__*/(0,n/* .jsx */.Y)(c/* .Navigate */.C5,{to:eh/* .CourseBuilderRouteConfigs.Home.template */.P.Home.template,replace:true})}];/* export default */const rl=ru},70540:function(e,t,r){"use strict";r.d(t,{E:()=>f,_:()=>p});/* import */var n=r(2445);/* import */var i=r(1932);/* import */var a=r(41594);/* 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 */.jM)(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 */.Y)(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}},21094:function(e,t,r){"use strict";r.d(t,{A:()=>_,_:()=>y});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(2445);/* import */var o=r(45748);/* import */var s=r(46306);/* import */var u=r(85398);/* import */var l=r(5081);/* import */var c=r(78635);/* import */var d=r(51298);/* import */var f=r(85713);/* import */var p=r(12470);/* import */var h=/*#__PURE__*/r.n(p);/* import */var v=r(41594);/* import */var m=/*#__PURE__*/r.n(v);var g=[{indicator:1,id:"basic",label:(0,p.__)("Basics","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseBasics.buildLink */.P.CourseBasics.buildLink(),isDisabled:false,isActive:true},{indicator:2,id:"curriculum",label:(0,p.__)("Curriculum","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseCurriculum.buildLink */.P.CourseCurriculum.buildLink(),isDisabled:true,isActive:false},{indicator:3,id:"additional",label:(0,p.__)("Additional","tutor"),path:o/* .CourseBuilderRouteConfigs.CourseAdditional.buildLink */.P.CourseAdditional.buildLink(),isDisabled:true,isActive:false}];var b=/*#__PURE__*/m().createContext({steps:g,setSteps:f/* .noop */.lQ,updateStepByIndex:f/* .noop */.lQ,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 */.G)(s/* ["default"] */.A);var p=(0,l/* .getCourseId */.p)();var h=(0,u/* .useCourseDetailsQuery */.p1)(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 */.O9)(m)){return}o(e=>e.map(e=>{return(0,i._)((0,n._)({},e),{isDisabled:false})}))},[m]);return/*#__PURE__*/(0,a/* .jsx */.Y)(b.Provider,{value:{steps:r,setSteps:o,updateStepByIndex:y,currentIndex:_,courseContent:m},children:t})}},85398:function(e,t,r){"use strict";r.d(t,{AA:()=>O,Cz:()=>j,KV:()=>E,Qw:()=>x,VD:()=>T,Wn:()=>D,aN:()=>H,b8:()=>M,dQ:()=>A,p1:()=>I,s1:()=>Y,sx:()=>B});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(94747);/* import */var o=r(97665);/* import */var s=r(97286);/* import */var u=r(12470);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(53429);/* import */var d=r(27813);/* import */var f=r(86828);/* import */var p=r(1806);/* import */var h=r(45549);/* import */var v=r(4892);/* import */var m=r(95729);/* import */var g=r(53127);/* import */var b=r(37381);/* import */var y=r(51298);/* import */var _=r(85713);var w=v/* .tutorConfig.current_user.data */.P.current_user.data;var A={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 x=(e,t)=>{var r,a,o,s,u,l;var p,h,g,b,y,w,A,x,E,S,O,k,T,C,I;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 */.UA.yearMonthDayHourMinuteSecond24H),post_date_gmt:(0,_/* .convertToGMT */.dn)(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]":(A=e.course_benefits)!==null&&A!==void 0?A:"","additional_content[course_target_audience]":(x=e.course_target_audience)!==null&&x!==void 0?x:"","additional_content[course_duration][hours]":(E=e.course_duration_hours)!==null&&E!==void 0?E: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 */.GR)(m/* .Addons.TUTOR_MULTI_INSTRUCTORS */.oW.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 */.GR)(m/* .Addons.TUTOR_PREREQUISITES */.oW.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:(I=(u=e.coming_soon_thumbnail)===null||u===void 0?void 0:u.id)!==null&&I!==void 0?I: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 */.dn)(new Date("".concat(e.enrollment_starts_date," ").concat(e.enrollment_starts_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H):"","course_settings[enrollment_ends_at]":(0,f["default"])(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)))?(0,_/* .convertToGMT */.dn)(new Date("".concat(e.enrollment_ends_date," ").concat(e.enrollment_ends_time)),m/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.yearMonthDayHourMinuteSecond24H):"","course_settings[pause_enrollment]":e.pause_enrollment?"yes":"no"}),Object.fromEntries(t.map(t=>{return[t,e[t]]})),!!((l=v/* .tutorConfig.settings */.P.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 E=(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 */.P.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 */.GR)(m/* .Addons.CONTENT_DRIP */.oW.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 */.GR)(m/* .Addons.BUDDYPRESS */.oW.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 */.UA.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 */.UA.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 */.g1)(e.course_settings.enrollment_starts_at),m/* .DateFormats.yearMonthDay */.UA.yearMonthDay):"",enrollment_starts_time:(0,f["default"])(new Date(e.course_settings.enrollment_starts_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_starts_at),m/* .DateFormats.hoursMinutes */.UA.hoursMinutes):"",enrollment_ends_date:(0,f["default"])(new Date(e.course_settings.enrollment_ends_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_ends_at),m/* .DateFormats.yearMonthDay */.UA.yearMonthDay):"",enrollment_ends_time:(0,f["default"])(new Date(e.course_settings.enrollment_ends_at))?(0,c["default"])((0,_/* .convertGMTtoLocalDate */.g1)(e.course_settings.enrollment_ends_at),m/* .DateFormats.hoursMinutes */.UA.hoursMinutes):"",pause_enrollment:e.course_settings.pause_enrollment==="yes"},Object.fromEntries(t.map(t=>{return[t,e[t]]}))),{tax_on_single:(0,y/* .isDefined */.O9)(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 */.O9)(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 */.b.post(b/* ["default"].CREATED_COURSE */.A.CREATED_COURSE,e)};var O=()=>{var{showToast:e}=(0,h/* .useToast */.d)();return(0,a/* .useMutation */.n)({mutationFn:S,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,_/* .convertToErrorMessage */.EL)(t)})}})};var k=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].UPDATE_COURSE */.A.UPDATE_COURSE,e)};var T=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({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 */.EL)(t)})}})};var C=e=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_COURSE_DETAILS */.A.GET_COURSE_DETAILS,{params:{course_id:e}})};var I=e=>{return(0,s/* .useQuery */.I)({queryKey:["CourseDetails",e],queryFn:()=>C(e).then(e=>{return e.data}),enabled:!!e})};var R=e=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_WC_PRODUCTS */.A.GET_WC_PRODUCTS,{params:(0,n._)({exclude_linked_products:true},e&&{course_id:e})})};var D=(e,t)=>{return(0,s/* .useQuery */.I)({queryKey:["WcProducts"],queryFn:()=>R(t).then(e=>e.data),enabled:e==="wc"})};var P=(e,t)=>{return g/* .wpAjaxInstance.get */.b.get(b/* ["default"].GET_WC_PRODUCT_DETAILS */.A.GET_WC_PRODUCT_DETAILS,{params:{product_id:e,course_id:t}})};var M=(e,t,r,n)=>{return(0,s/* .useQuery */.I)({queryKey:["WcProductDetails",e,t],queryFn:()=>P(e,t).then(e=>e.data),enabled:!!e&&r==="paid"&&n==="wc"})};var F=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].SAVE_ZOOM_MEETING */.A.SAVE_ZOOM_MEETING,e)};var Y=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:F,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 */.EL)(t)})}})};var L=e=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].DELETE_ZOOM_MEETING */.A.DELETE_ZOOM_MEETING,{meeting_id:e})};var H=e=>{var{showToast:t}=(0,h/* .useToast */.d)();var r=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:L,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 */.EL)(e)})}})};var N=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 */.b.post(b/* ["default"].SAVE_GOOGLE_MEET */.A.SAVE_GOOGLE_MEET,t)};var j=()=>{var{showToast:e}=(0,h/* .useToast */.d)();var t=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({mutationFn:N,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 */.EL)(t)})}})};var U=(e,t)=>{return g/* .wpAjaxInstance.post */.b.post(b/* ["default"].DELETE_GOOGLE_MEET */.A.DELETE_GOOGLE_MEET,{"post-id":e,"event-id":t})};var B=(e,t)=>{var{showToast:r}=(0,h/* .useToast */.d)();var n=(0,o/* .useQueryClient */.jE)();return(0,a/* .useMutation */.n)({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 */.EL)(e)})}})};var z=e=>{return wpAjaxInstance.post(endpoints.TUTOR_YOUTUBE_VIDEO_DURATION,{video_id:e})};var K=()=>{return useMutation({mutationFn:z})}},5081:function(e,t,r){"use strict";r.d(t,{E:()=>i,p:()=>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,"")}},51550:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(2445);/* import */var i=r(17437);/* import */var a=r(10840);/* import */var o=r(24219);/* import */var s=r(84133);/* import */var u=r(90209);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 */.FD)("div",{css:f.wrapper({type:r}),children:[/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{when:i,children:e=>/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{style:f.icon({type:r}),name:e,height:24,width:24})}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:t})]})};/* export default */const d=c;var f={wrapper:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)(o/* .typography.caption */.I.caption(),";display:flex;align-items:start;padding:",a/* .spacing["8"] */.YK["8"]," ",a/* .spacing["12"] */.YK["12"],";width:100%;border-radius:",a/* .borderRadius.card */.Vq.card,";gap:",a/* .spacing["4"] */.YK["4"],";background-color:",l.background[t],";color:",l.text[t],";")},icon:e=>{var{type:t}=e;return/*#__PURE__*/(0,i/* .css */.AH)("color:",l.icon[t],";flex-shrink:0;")}}},42338:function(e,t,r){"use strict";r.d(t,{A:()=>w});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(31105);/* import */var o=r(84577);/* import */var s=r(2445);/* import */var u=r(17437);/* import */var l=r(41594);/* import */var c=/*#__PURE__*/r.n(l);/* import */var d=r(90209);/* import */var f=r(10840);/* import */var p=r(24219);/* import */var h=r(63939);/* import */var v=r(36154);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 A=/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[l&&!f&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.spinner,children:/*#__PURE__*/(0,s/* .jsx */.Y)(d/* ["default"] */.A,{name:"spinner",width:18,height:18})}),/*#__PURE__*/(0,s/* .jsxs */.FD)("span",{css:[E.buttonContent({loading:l,disabled:f}),m],children:[p&&h==="left"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:l,hasChildren:!!c}),children:p}),c,p&&h==="right"&&/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:E.buttonIcon({iconPosition:h,loading:l,hasChildren:!!c}),children:p})]})]});if(g==="a"){var{href:x,target:O,rel:k,download:T,onClick:C}=_,I=(0,a._)(_,["href","target","rel","download","onClick"]);// Auto-add security attributes for external links
var R=typeof x==="string"&&(x.startsWith("http")||x.startsWith("//"));var D=O==="_blank"&&R?"".concat(k?"".concat(k," "):"","noopener noreferrer"):k;return/*#__PURE__*/(0,s/* .jsx */.Y)("a",(0,i._)((0,n._)({ref:t,css:w,href:f||l?undefined:x,target:f||l?undefined:O,rel:D,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},I),{children:A}))}var{type:P="button",onClick:M,form:F,name:Y,value:L}=_,H=(0,a._)(_,["type","onClick","form","name","value"]);return/*#__PURE__*/(0,s/* .jsx */.Y)("button",(0,i._)((0,n._)({ref:t,type:P,css:w,disabled:f||l,tabIndex:b,onClick:M,form:F,name:Y,value:L,"data-size":u},H),{children:A}))});_.displayName="Button";/* export default */const w=_;var A=/*#__PURE__*/(0,u/* .keyframes */.i7)("0%{transform:rotate(0);}100%{transform:rotate(360deg);}");var x={notOutlined:/*#__PURE__*/(0,u/* .css */.AH)("&:disabled,&[aria-disabled='true']{background-color:",f/* .colorTokens.action.primary.disable */.I6.action.primary.disable,";color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}"),outlined:/*#__PURE__*/(0,u/* .css */.AH)("&:disabled,&[aria-disabled='true']{background-color:transparent;border:none;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.action.outline.disable */.I6.action.outline.disable,";color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}"),text:/*#__PURE__*/(0,u/* .css */.AH)("&:disabled,&[aria-disabled='true']{color:",f/* .colorTokens.text.disable */.I6.text.disable,";svg{color:",f/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"],";}}")};var E={base:/*#__PURE__*/(0,u/* .css */.AH)(v/* .styleUtils.resetButton */.x.resetButton,";",v/* .styleUtils.display.inlineFlex */.x.display.inlineFlex(),";justify-content:center;align-items:center;",p/* .typography.caption */.I.caption("medium"),";",v/* .styleUtils.text.align.center */.x.text.align.center,";color:",f/* .colorTokens.text.white */.I6.text.white,";text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:0;padding:",f/* .spacing["8"] */.YK["8"]," ",f/* .spacing["32"] */.YK["32"],";border-radius:",f/* .borderRadius["6"] */.Vq["6"],";z-index:",f/* .zIndex.level */.fE.level,";transition:all 150ms ease-in-out;position:relative;svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}&:disabled,&[aria-disabled='true']{cursor:not-allowed;}&:not(:disabled):not([aria-disabled='true']){&:focus{box-shadow:",f/* .shadow.focus */.r7.focus,";}&:focus-visible{box-shadow:none;outline:2px solid ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}}"),variant:{primary:/*#__PURE__*/(0,u/* .css */.AH)("background-color:",f/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],";",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.I6.text.white,";background-color:",f/* .colorTokens.action.primary.hover */.I6.action.primary.hover,";}&:active{background-color:",f/* .colorTokens.action.primary.active */.I6.action.primary.active,";color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),secondary:/*#__PURE__*/(0,u/* .css */.AH)("background-color:",f/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";}&:active{background-color:",f/* .colorTokens.action.secondary.active */.I6.action.secondary.active,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";}}"),tertiary:/*#__PURE__*/(0,u/* .css */.AH)("box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke["default"] */.I6.stroke["default"],";color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.hover */.I6.background.hover,";box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.hover */.I6.stroke.hover,";color:",f/* .colorTokens.text.title */.I6.text.title,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}}&:active{background-color:",f/* .colorTokens.background.active */.I6.background.active,";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}}}"),danger:/*#__PURE__*/(0,u/* .css */.AH)("background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";color:",f/* .colorTokens.text.error */.I6.text.error,";svg{color:",f/* .colorTokens.icon.error */.I6.icon.error,";}",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus,&:active{background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";color:",f/* .colorTokens.text.error */.I6.text.error,";}}"),WP:/*#__PURE__*/(0,u/* .css */.AH)("background-color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";",x.notOutlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.I6.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.I6.text.white,";}&:active{background-color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";}}"),text:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",f/* .spacing["8"] */.YK["8"],";svg{color:",f/* .colorTokens.icon.hints */.I6.icon.hints,";}",x.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:transparent;color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}}&:active{background-color:transparent;color:",f/* .colorTokens.text.subdued */.I6.text.subdued,";}}")},outlined:{primary:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),secondary:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;box-shadow:inset 0px 0px 0px 1px ",f/* .colorTokens.stroke.brand */.I6.stroke.brand,";color:",f/* .colorTokens.text.brand */.I6.text.brand,";svg{color:",f/* .colorTokens.icon.brand */.I6.icon.brand,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";}}"),tertiary:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;",x.outlined,";"),danger:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;border:1px solid ",f/* .colorTokens.stroke.danger */.I6.stroke.danger,";",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail,";}}"),WP:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;border:1px solid ",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";color:",f/* .colorTokens.action.primary.wp */.I6.action.primary.wp,";svg{color:",f/* .colorTokens.icon.wp */.I6.icon.wp,";}",x.outlined,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{background-color:",f/* .colorTokens.action.primary.wp_hover */.I6.action.primary.wp_hover,";color:",f/* .colorTokens.text.white */.I6.text.white,";svg{color:",f/* .colorTokens.icon.white */.I6.icon.white,";}}}"),text:/*#__PURE__*/(0,u/* .css */.AH)("background-color:transparent;border:none;color:",f/* .colorTokens.text.primary */.I6.text.primary,";",x.text,";&:not(:disabled):not([aria-disabled='true']){&:hover,&:focus{color:",f/* .colorTokens.text.brand */.I6.text.brand,";}}"),none:/*#__PURE__*/(0,u/* .css */.AH)()},size:{regular:/*#__PURE__*/(0,u/* .css */.AH)("padding:",f/* .spacing["8"] */.YK["8"]," ",f/* .spacing["32"] */.YK["32"],";",p/* .typography.caption */.I.caption("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:40px;"),large:/*#__PURE__*/(0,u/* .css */.AH)("padding:",f/* .spacing["12"] */.YK["12"]," ",f/* .spacing["40"] */.YK["40"],";",p/* .typography.body */.I.body("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:48px;"),small:/*#__PURE__*/(0,u/* .css */.AH)("padding:",f/* .spacing["6"] */.YK["6"]," ",f/* .spacing["16"] */.YK["16"],";",p/* .typography.small */.I.small("medium"),";color:",f/* .colorTokens.text.white */.I6.text.white,";min-height:32px;")},isIconOnly:{true:/*#__PURE__*/(0,u/* .css */.AH)("aspect-ratio:1 / 1;&[data-size='regular']{padding:",f/* .spacing["8"] */.YK["8"],";width:40px;}&[data-size='large']{padding:",f/* .spacing["12"] */.YK["12"],";width:48px;}&[data-size='small']{padding:",f/* .spacing["6"] */.YK["6"],";width:32px;}"),false:/*#__PURE__*/(0,u/* .css */.AH)()},isLoading:{true:/*#__PURE__*/(0,u/* .css */.AH)("opacity:0.8;cursor:wait;"),false:/*#__PURE__*/(0,u/* .css */.AH)()},iconWrapper:{left:/*#__PURE__*/(0,u/* .css */.AH)("order:-1;"),right:/*#__PURE__*/(0,u/* .css */.AH)("order:1;")},buttonContent:e=>{var{loading:t,disabled:r,isIconOnly:n}=e;return/*#__PURE__*/(0,u/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;",n&&"justify-content: center;"," ",t&&!r&&(0,u/* .css */.AH)(m()))},buttonIcon:e=>{var{iconPosition:t,loading:r,hasChildren:n=true}=e;return/*#__PURE__*/(0,u/* .css */.AH)("display:grid;place-items:center;margin-right:",f/* .spacing["4"] */.YK["4"],";",t==="right"&&(0,u/* .css */.AH)(g(),f/* .spacing["4"] */.YK["4"])," ",r&&(0,u/* .css */.AH)(b())," ",!n&&(0,u/* .css */.AH)(y()))},spinner:/*#__PURE__*/(0,u/* .css */.AH)("position:absolute;visibility:visible;display:flex;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);& svg{animation:",A," 1s linear infinite;}")};var S=(0,h/* .createVariation */.s)({variants:{size:{regular:E.size.regular,large:E.size.large,small:E.size.small},isLoading:{true:E.isLoading.true,false:E.isLoading.false},iconOnly:{true:E.isIconOnly.true,false:E.isIconOnly.false},variant:{primary:E.variant.primary,secondary:E.variant.secondary,tertiary:E.variant.tertiary,danger:E.variant.danger,WP:E.variant.WP,text:E.variant.text},outlined:{primary:E.outlined.primary,secondary:E.outlined.secondary,tertiary:E.outlined.tertiary,danger:E.outlined.danger,WP:E.outlined.WP,text:E.outlined.text,none:E.outlined.none}},defaultVariants:{variant:"primary",outlined:"none",size:"regular",isLoading:"false",iconOnly:"false"}},E.base)},76017:function(e,t,r){"use strict";r.d(t,{Ay:()=>v,YE:()=>f,em:()=>h,p8:()=>d});/* import */var n=r(2445);/* import */var i=r(10840);/* import */var a=r(17437);var o=/*#__PURE__*/(0,a/* .keyframes */.i7)("0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var s=/*#__PURE__*/(0,a/* .keyframes */.i7)("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 */.i7)("	0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");var l={fullscreen:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;"),loadingOverlay:/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;top:0;bottom:0;right:0;left:0;display:flex;align-items:center;justify-content:center;"),loadingSection:/*#__PURE__*/(0,a/* .css */.AH)("width:100%;height:100px;display:flex;justify-content:center;align-items:center;"),svg:/*#__PURE__*/(0,a/* .css */.AH)("animation:",o," 1.4s linear infinite;"),spinnerPath:/*#__PURE__*/(0,a/* .css */.AH)("stroke-dasharray:180;stroke-dashoffset:0;transform-origin:center;animation:",s," 1.4s linear infinite;"),spinGradient:/*#__PURE__*/(0,a/* .css */.AH)("transition:transform;transform-origin:center;animation:",u," 1s infinite linear;")};var c=e=>{var{size:t=30,color:r=i/* .colorTokens.icon.disable["default"] */.I6.icon.disable["default"]}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)("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 */.Y)("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 */.Y)("div",{css:l.loadingOverlay,children:/*#__PURE__*/(0,n/* .jsx */.Y)(c,{})})};var f=()=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:l.loadingSection,children:/*#__PURE__*/(0,n/* .jsx */.Y)(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 */.FD)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[/*#__PURE__*/(0,n/* .jsx */.Y)("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 */.Y)("defs",{children:/*#__PURE__*/(0,n/* .jsxs */.FD)("linearGradient",{id:"paint0_linear_2402_3559",x1:"4.50105",y1:"12",x2:"21.6571",y2:"6.7847",gradientUnits:"userSpaceOnUse",children:[/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{stopColor:"#FF9645"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.152804",stopColor:"#FF6471"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.467993",stopColor:"#CF6EBD"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"0.671362",stopColor:"#A477D1"}),/*#__PURE__*/(0,n/* .jsx */.Y)("stop",{offset:"1",stopColor:"#3E64DE"})]})})]})};/* export default */const v=c},66273:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(31105);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(41594);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(95729);/* import */var d=r(10840);/* import */var f=r(24219);/* import */var p=r(63939);/* import */var h=r(36154);/* import */var v=r(76017);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 */.Y)("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 */.Y)("span",{css:b.buttonSpan,children:p?/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.Ay,{size:24}):l})}))});/* export default */const g=m;var b={buttonSpan:/*#__PURE__*/(0,s/* .css */.AH)(h/* .styleUtils.flexCenter */.x.flexCenter(),";z-index:",d/* .zIndex.positive */.fE.positive,";"),base:/*#__PURE__*/(0,s/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";",f/* .typography.small */.I.small("medium"),";display:flex;gap:",d/* .spacing["4"] */.YK["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 */.I6.stroke.brand,";outline-offset:1px;}&:disabled{cursor:not-allowed;background:",d/* .colorTokens.action.primary.disable */.I6.action.primary.disable,";pointer-events:none;color:",d/* .colorTokens.text.disable */.I6.text.disable,";border-color:",d/* .colorTokens.stroke.disable */.I6.stroke.disable,";}"),default:e=>/*#__PURE__*/(0,s/* .css */.AH)("background:",!e?d/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1:d/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";color:",d/* .colorTokens.text.white */.I6.text.white,";&::before{content:'';position:absolute;inset:0;background:",!e?d/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.I6.ai.gradient_2_rtl,";opacity:0;transition:opacity 0.5s ease;}&:hover::before{opacity:1;}"),secondary:/*#__PURE__*/(0,s/* .css */.AH)("background-color:",d/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";color:",d/* .colorTokens.text.brand */.I6.text.brand,";border-radius:",d/* .borderRadius["6"] */.Vq["6"],";&:hover{background-color:",d/* .colorTokens.action.secondary.hover */.I6.action.secondary.hover,";}"),outline:/*#__PURE__*/(0,s/* .css */.AH)("position:relative;&::before{content:'';position:absolute;inset:0;background:",d/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,";color:",d/* .colorTokens.text.primary */.I6.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 */.I6.ai.gradient_2,";}}"),primaryOutline:/*#__PURE__*/(0,s/* .css */.AH)("border:1px solid ",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";&:hover{background-color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.text.white */.I6.text.white,";}"),primary:/*#__PURE__*/(0,s/* .css */.AH)("background-color:",d/* .colorTokens.brand.blue */.I6.brand.blue,";color:",d/* .colorTokens.text.white */.I6.text.white,";"),ghost:/*#__PURE__*/(0,s/* .css */.AH)("background-color:transparent;color:",d/* .colorTokens.text.subdued */.I6.text.subdued,";border-radius:",d/* .borderRadius["4"] */.Vq["4"],";&:hover{color:",d/* .colorTokens.text.primary */.I6.text.primary,";}"),plain:/*#__PURE__*/(0,s/* .css */.AH)("span{background:",!c/* .isRTL */.V8?d/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient:d/* .colorTokens.ai.gradient_1_rtl */.I6.ai.gradient_1_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;&:hover{background:",!c/* .isRTL */.V8?d/* .colorTokens.ai.gradient_2 */.I6.ai.gradient_2:d/* .colorTokens.ai.gradient_2_rtl */.I6.ai.gradient_2_rtl,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;}}"),size:{default:/*#__PURE__*/(0,s/* .css */.AH)("height:32px;padding-inline:",d/* .spacing["12"] */.YK["12"],";padding-block:",d/* .spacing["4"] */.YK["4"],";"),sm:/*#__PURE__*/(0,s/* .css */.AH)("height:24px;padding-inline:",d/* .spacing["10"] */.YK["10"],";"),icon:/*#__PURE__*/(0,s/* .css */.AH)("width:32px;height:32px;")},rounded:{true:/*#__PURE__*/(0,s/* .css */.AH)("border-radius:",d/* .borderRadius["54"] */.Vq["54"],";&::before{border-radius:",d/* .borderRadius["54"] */.Vq["54"],";}"),false:/*#__PURE__*/(0,s/* .css */.AH)("border-radius:",d/* .borderRadius["4"] */.Vq["4"],";&::before{border-radius:",d/* .borderRadius["4"] */.Vq["4"],";}")}};var y=(0,p/* .createVariation */.s)({variants:{variant:{default:b.default(c/* .isRTL */.V8),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)},90209:function(e,t,r){"use strict";r.d(t,{A:()=>m});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(31105);/* import */var o=r(84577);/* import */var s=r(2445);/* import */var u=r(4892);/* import */var l=r(17437);/* import */var c=r(41594);/* 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 A=m?m.viewBox:"0 0 ".concat(r," ").concat(o);if(!m&&!y){return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",{viewBox:A,children:/*#__PURE__*/(0,s/* .jsx */.Y)("rect",{width:r,height:o,fill:"transparent"})})}return/*#__PURE__*/(0,s/* .jsx */.Y)("svg",(0,i._)((0,n._)({css:[u,{width:r,height:o},g.svg({isColorIcon:l})],xmlns:"http://www.w3.org/2000/svg",viewBox:A},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 */.P.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";/* export default */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 */.AH)("transition:filter 0.3s ease-in-out;",t&&(0,l/* .css */.AH)(f()),";")}}},8875:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(84577);/* import */var i=r(2445);/* import */var a=r(10840);/* import */var o=r(51298);/* import */var s=r(17437);/* import */var u=r(41594);/* 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 */.Y)("span",{ref:t,css:m.skeleton(r,n,a,o,s,u),className:l})});/* export default */const h=p;var v={wave:/*#__PURE__*/(0,s/* .keyframes */.i7)("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 */.AH)("display:block;width:",(0,o/* .isNumber */.Et)(e)?"".concat(e,"px"):e,";height:",(0,o/* .isNumber */.Et)(t)?"".concat(t,"px"):t,";border-radius:",a/* .borderRadius["6"] */.Vq["6"],";background-color:",!n?"rgba(0, 0, 0, 0.11)":a/* .colorTokens.background.magicAi.skeleton */.I6.background.magicAi.skeleton,";position:relative;-webkit-mask-image:-webkit-radial-gradient(center,white,black);overflow:hidden;",i&&(0,s/* .css */.AH)(c(),a/* .borderRadius.circle */.Vq.circle)," ",r&&(0,s/* .css */.AH)(f(),n&&(0,s/* .css */.AH)(d()),u,v.wave))}},89266:function(e,t,r){"use strict";r.d(t,{A:()=>_});/* import */var n=r(84577);/* import */var i=r(2445);/* import */var a=r(10840);/* import */var o=r(24219);/* import */var s=r(84133);/* import */var u=r(85713);/* import */var l=r(17437);/* import */var c=r(41594);/* import */var d=/*#__PURE__*/r.n(c);/* import */var f=r(76017);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 */.AH)("&[data-input]{all:unset;appearance:none;border:0;width:40px;height:24px;background:",a/* .colorTokens.color.black["10"] */.I6.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 */.AH)(p()),"      &::before{display:none !important;}&:focus{border:none;outline:none;box-shadow:none;}&:focus-visible{outline:2px solid ",a/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:after{content:'';position:absolute;top:3px;left:",a/* .spacing["4"] */.YK["4"],";width:18px;height:18px;background:",a/* .colorTokens.background.white */.I6.background.white,";border-radius:",a/* .borderRadius.circle */.Vq.circle,";box-shadow:",a/* .shadow["switch"] */.r7["switch"],";transition:left 0.25s cubic-bezier(0.785,0.135,0.15,0.86);",e==="small"&&(0,l/* .css */.AH)(h()),"}&:checked{background:",a/* .colorTokens.primary.main */.I6.primary.main,";&:after{left:18px;",e==="small"&&(0,l/* .css */.AH)(v()),"}}&:disabled{pointer-events:none;filter:none;opacity:0.5;}}"),labelStyles:e=>/*#__PURE__*/(0,l/* .css */.AH)(o/* .typography.caption */.I.caption(),";color:",e?a/* .colorTokens.text.title */.I6.text.title:a/* .colorTokens.text.subdued */.I6.text.subdued,";"),wrapperStyle:e=>/*#__PURE__*/(0,l/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:fit-content;flex-direction:",e==="left"?"row":"row-reverse",";column-gap:",a/* .spacing["12"] */.YK["12"],";position:relative;"),spinner:e=>/*#__PURE__*/(0,l/* .css */.AH)("display:flex;position:absolute;top:50%;transform:translateY(-50%);",e&&(0,l/* .css */.AH)(m())," ",!e&&(0,l/* .css */.AH)(g()))};var y=/*#__PURE__*/d().forwardRef((e,t)=>{var{id:r=(0,u/* .nanoid */.Ak)(),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 */.FD)("div",{css:b.wrapperStyle(h),children:[a&&/*#__PURE__*/(0,i/* .jsx */.Y)("label",{css:[b.labelStyles(l||false),v],htmlFor:r,children:a}),/*#__PURE__*/(0,i/* .jsx */.Y)("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 */.Y)(s/* ["default"] */.A,{when:d,children:/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:b.spinner(!!l),children:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.Ay,{size:m==="small"?12:20})})})]})});/* export default */const _=y},45549:function(e,t,r){"use strict";r.d(t,{A:()=>D,d:()=>I});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(84577);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(55787);/* import */var l=r(41594);/* import */var c=/*#__PURE__*/r.n(l);/* import */var d=r(10840);/* import */var f=r(24219);/* import */var p=r(47617);/* import */var h=r(51298);/* import */var v=r(85713);/* import */var m=r(42338);/* import */var g=r(90209);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 A(){var e=(0,a._)(["\n      right: ",";\n      bottom: ",";\n    "]);A=function t(){return e};return e}function x(){var e=(0,a._)(["\n      left: 50%;\n      bottom: ",";\n      transform: translateX(-50%);\n    "]);x=function t(){return e};return e}function E(){var e=(0,a._)(["\n      background: ",";\n    "]);E=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 I=()=>(0,l.useContext)(C);var R=e=>{var{children:t,position:r="bottom-right"}=e;var[a,s]=(0,l.useState)([]);var c=(0,u/* .useTransition */.pn)(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 */.Ak)()});s(e=>[t,...e]);var r;if(!(0,h/* .isBoolean */.Lm)(t.autoCloseDelay)&&t.autoCloseDelay){r=setTimeout(()=>{s(e=>e.slice(0,-1))},t.autoCloseDelay)}return()=>{clearTimeout(r)}},[]);return/*#__PURE__*/(0,o/* .jsxs */.FD)(C.Provider,{value:{showToast:d},children:[t,/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:P.toastWrapper(r),children:c((e,t)=>{return/*#__PURE__*/(0,o/* .jsxs */.FD)(p/* .AnimatedDiv */.LK,{"data-cy":"tutor-toast",style:e,css:P.toastItem(t.type),children:[/*#__PURE__*/(0,o/* .jsx */.Y)("h5",{css:P.message,children:t.message}),/*#__PURE__*/(0,o/* .jsx */.Y)(m/* ["default"] */.A,{variant:"text",onClick:()=>{s(e=>e.filter(e=>e.id!==t.id))},children:/*#__PURE__*/(0,o/* .jsx */.Y)(g/* ["default"] */.A,{name:"timesAlt",width:16,height:16})})]},t.id)})})]})};/* export default */const D=R;var P={toastWrapper:e=>/*#__PURE__*/(0,s/* .css */.AH)("display:flex;flex-direction:column;gap:",d/* .spacing["16"] */.YK["16"],";max-width:400px;position:fixed;z-index:",d/* .zIndex.highest */.fE.highest,";",e==="top-left"&&(0,s/* .css */.AH)(b(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="top-right"&&(0,s/* .css */.AH)(y(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="top-center"&&(0,s/* .css */.AH)(_(),d/* .spacing["20"] */.YK["20"])," ",e==="bottom-left"&&(0,s/* .css */.AH)(w(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="bottom-right"&&(0,s/* .css */.AH)(A(),d/* .spacing["20"] */.YK["20"],d/* .spacing["20"] */.YK["20"])," ",e==="bottom-center"&&(0,s/* .css */.AH)(x(),d/* .spacing["20"] */.YK["20"])),toastItem:e=>/*#__PURE__*/(0,s/* .css */.AH)("width:100%;min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:",d/* .spacing["16"] */.YK["16"],";border-radius:",d/* .borderRadius["6"] */.Vq["6"],";padding:",d/* .spacing["16"] */.YK["16"],";svg > path{color:",d/* .colorTokens.icon.white */.I6.icon.white,";}",e==="dark"&&(0,s/* .css */.AH)(E(),d/* .colorTokens.color.black.main */.I6.color.black.main)," ",e==="danger"&&(0,s/* .css */.AH)(S(),d/* .colorTokens.design.error */.I6.design.error)," ",e==="success"&&(0,s/* .css */.AH)(O(),d/* .colorTokens.design.success */.I6.design.success)," ",e==="warning"&&(0,s/* .css */.AH)(k(),d/* .colorTokens.color.warning["70"] */.I6.color.warning["70"],d/* .colorTokens.text.primary */.I6.text.primary,d/* .colorTokens.text.primary */.I6.text.primary)),message:/*#__PURE__*/(0,s/* .css */.AH)(f/* .typography.body */.I.body(),";color:",d/* .colorTokens.text.white */.I6.text.white,";"),timesIcon:/*#__PURE__*/(0,s/* .css */.AH)("path{color:",d/* .colorTokens.icon.white */.I6.icon.white,";}")}},92229:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(84577);/* import */var o=r(2445);/* import */var s=r(10840);/* import */var u=r(47617);/* import */var l=r(17437);/* import */var c=r(55787);/* import */var d=r(82826);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 */.zh)(()=>v);if(h)return t;var w=()=>{_.start({opacity:1,transform:"scale(1)",config:m})};var A=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 */.Y)(d/* ["default"] */.A,{render:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(u/* .AnimatedDiv */.LK,(0,i._)((0,n._)({style:b,hideOnOverflow:false},e),{css:y.contentBox(l),children:r}))},animation:true,onMount:w,onHide:A,allowHTML:a,delay:[p,100],hideOnClick:f,placement:l,visible:g,zIndex:s/* .zIndex.highest */.fE.highest,children:/*#__PURE__*/(0,o/* .jsx */.Y)("div",{children:t})})};/* export default */const b=g;var y={contentBox:e=>/*#__PURE__*/(0,l/* .css */.AH)("max-width:250px;width:100%;background-color:",s/* .colorTokens.color.black.main */.I6.color.black.main,";color:",s/* .colorTokens.text.white */.I6.text.white,";border-radius:",s/* .borderRadius["6"] */.Vq["6"],";padding:",s/* .spacing["4"] */.YK["4"]," ",s/* .spacing["8"] */.YK["8"],";font-size:",s/* .fontSize["15"] */.J["15"],";line-height:",s/* .lineHeight["20"] */.K_["20"],";position:relative;&::before{content:'';height:8px;width:8px;background-color:",s/* .colorTokens.color.black.main */.I6.color.black.main,";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%) rotate(45deg);",e==="right"&&(0,l/* .css */.AH)(f())," ",e==="bottom"&&(0,l/* .css */.AH)(p())," ",e==="left"&&(0,l/* .css */.AH)(h()),"}")}},66238:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(2445);var i;if(false){}else{// eslint-disable-next-line @typescript-eslint/no-require-imports
i=r(86312)/* ["default"] */.A}var a=e=>{var{children:t}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)(i,{children:t})};/* export default */const o=a},86312:function(e,t,r){"use strict";// EXPORTS
r.d(t,{A:()=>/* binding */g});// EXTERNAL MODULE: ./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js
var n=r(2445);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var i=r(17437);// EXTERNAL MODULE: external "wp.i18n"
var a=r(12470);// EXTERNAL MODULE: external "React"
var o=r(41594);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Button.tsx
var s=r(42338);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/SVGIcon.tsx
var u=r(90209);// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var l=r(4892);// EXTERNAL MODULE: ./assets/react/v3/shared/config/styles.ts
var c=r(10840);// EXTERNAL MODULE: ./assets/react/v3/shared/config/typography.ts
var d=r(24219);// EXTERNAL MODULE: ./assets/react/v3/shared/controls/Show.tsx
var f=r(84133);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var p=r(36154);// 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 */.Y)("div",{css:b.container,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionErrorWrapper,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionErrorHeader,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("img",{src:v,srcSet:"".concat(h," 2x"),alt:(0,a.__)("Error","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("h5",{css:d/* .typography.heading5 */.I.heading5("medium"),children:(0,a.__)("Oops! Something went wrong","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.instructions,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("p",{children:(0,a.__)("Try the following steps to resolve the issue:","tutor")}),/*#__PURE__*/(0,n/* .jsxs */.FD)("ul",{children:[/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,a.__)("Refresh the page.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,a.__)("Clear your browser cache.","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(f/* ["default"] */.A,{when:l/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url,children:/*#__PURE__*/(0,n/* .jsx */.Y)("li",{children:(0,a.__)("Ensure the Free and Pro plugins are on the same version.","tutor")})})]})]})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.productionFooter,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("div",{children:/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{variant:"secondary",icon:/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{name:"refresh",height:24,width:24}),onClick:()=>window.location.reload(),children:(0,a.__)("Reload","tutor")})}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:b.support,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("Still having trouble?","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("Contact","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("a",{href:l/* ["default"].TUTOR_SUPPORT_PAGE_URL */.A.TUTOR_SUPPORT_PAGE_URL,children:(0,a.__)("Support","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:(0,a.__)("for assistance.","tutor")})]})]})]})})}return this.props.children}constructor(e){super(e);this.state={hasError:false}}}/* export default */const g=m;var b={container:/*#__PURE__*/(0,i/* .css */.AH)("width:100%;height:auto;display:flex;justify-content:center;align-items:center;"),productionErrorWrapper:/*#__PURE__*/(0,i/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",c/* .spacing["20"] */.YK["20"],";max-width:500px;width:100%;"),productionErrorHeader:/*#__PURE__*/(0,i/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;padding:",c/* .spacing["32"] */.YK["32"],";background:",c/* .colorTokens.background.white */.I6.background.white,";border-radius:",c/* .borderRadius["12"] */.Vq["12"],";box-shadow:0px -4px 0px 0px #ff0000;gap:",c/* .spacing["16"] */.YK["16"],";h5{text-align:center;}img{height:104px;width:101px;object-position:center;object-fit:contain;}"),instructions:/*#__PURE__*/(0,i/* .css */.AH)("width:100%;max-width:333px;p{width:100%;",d/* .typography.caption */.I.caption(),";margin-bottom:",c/* .spacing["4"] */.YK["4"],";}ul{padding-left:",c/* .spacing["16"] */.YK["16"],";li{",d/* .typography.caption */.I.caption(),";color:",c/* .colorTokens.text.title */.I6.text.title,";list-style:unset;margin-bottom:",c/* .spacing["2"] */.YK["2"],";&::marker{color:",c/* .colorTokens.icon["default"] */.I6.icon["default"],";}}}"),productionFooter:/*#__PURE__*/(0,i/* .css */.AH)(p/* .styleUtils.display.flex */.x.display.flex("column"),";align-items:center;gap:",c/* .spacing["12"] */.YK["12"],";"),support:/*#__PURE__*/(0,i/* .css */.AH)(p/* .styleUtils.flexCenter */.x.flexCenter("row"),";text-align:center;flex-wrap:wrap;gap:",c/* .spacing["4"] */.YK["4"],";",d/* .typography.caption */.I.caption(),";color:",c/* .colorTokens.text.title */.I6.text.title,";a{color:",c/* .colorTokens.text.brand */.I6.text.brand,";text-decoration:none;}")}},54527:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(41594);/* 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})};/* export default */const o=a},66279:function(e,t,r){"use strict";r.d(t,{A:()=>D});/* import */var n=r(84577);/* import */var i=r(2445);/* import */var a=r(17437);/* import */var o=r(12470);/* import */var s=/*#__PURE__*/r.n(o);/* import */var u=r(76017);/* import */var l=r(90209);/* import */var c=r(92229);/* import */var d=r(10840);/* import */var f=r(24219);/* import */var p=r(84133);/* import */var h=r(36154);/* import */var v=r(51298);/* import */var m=r(85713);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 A(){var e=(0,n._)(["\n        border-color: transparent;\n      "]);A=function t(){return e};return e}function x(){var e=(0,n._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);x=function t(){return e};return e}function E(){var e=(0,n._)(["\n          border-color: ",";\n        "]);E=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 I(){var e=(0,n._)(["\n      ",";\n    "]);I=function t(){return e};return e}var R=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:A=false,characterCount:x,isSecondary:E=false,inputStyle:S,onClickAiButton:O,isMagicAi:k=false,generateWithAi:T=false,replaceEntireLabel:C=false}=e;var I;var R=(0,m/* .nanoid */.Ak)();var D=[P.input({variant:g,hasFieldError:!!r.error,removeBorder:A,readOnly:s,hasHelpText:!!_,isSecondary:E,isMagicAi:k})];if((0,v/* .isDefined */.O9)(S)){D.push(S)}var M=/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.inputWrapper,children:[n({id:R,name:t.name,css:D,"aria-invalid":r.error?"true":"false",disabled:a,readOnly:s,placeholder:y,className:"tutor-input-field"}),b&&/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:P.loader,children:/*#__PURE__*/(0,i/* .jsx */.Y)(u/* ["default"] */.Ay,{size:20,color:d/* .colorTokens.icon["default"] */.I6.icon["default"]})})]});return/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.container({disabled:a,isHidden:w}),"data-cy":"form-field-wrapper",children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.inputContainer(h),children:[(f||_)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:P.labelContainer,children:[f&&/*#__PURE__*/(0,i/* .jsxs */.FD)("label",{htmlFor:R,css:P.label(h,C),children:[f,/*#__PURE__*/(0,i/* .jsx */.Y)(p/* ["default"] */.A,{when:T,children:/*#__PURE__*/(0,i/* .jsx */.Y)("button",{type:"button",onClick:()=>{O===null||O===void 0?void 0:O()},css:P.aiButton,children:/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{name:"magicAiColorize",width:32,height:32})})})]}),_&&!C&&/*#__PURE__*/(0,i/* .jsx */.Y)(c/* ["default"] */.A,{content:_,placement:"top",allowHTML:true,children:/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{name:"info",width:20,height:20})})]}),x?/*#__PURE__*/(0,i/* .jsx */.Y)(c/* ["default"] */.A,{placement:"right",hideOnClick:false,content:x.maxLimit-x.inputCharacter>=0?x.maxLimit-x.inputCharacter:(0,o.__)("Limit exceeded","tutor"),children:M}):M]}),((I=r.error)===null||I===void 0?void 0:I.message)&&/*#__PURE__*/(0,i/* .jsxs */.FD)("p",{css:P.errorLabel(!!r.error,h),children:[/*#__PURE__*/(0,i/* .jsx */.Y)(l/* ["default"] */.A,{style:P.alertIcon,name:"info",width:20,height:20})," ",r.error.message]})]})};/* export default */const D=R;var P={container:e=>{var{disabled:t,isHidden:r}=e;return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;position:relative;background:inherit;width:100%;",t&&(0,a/* .css */.AH)(g())," ",r&&(0,a/* .css */.AH)(b()))},inputContainer:e=>/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;gap:",d/* .spacing["4"] */.YK["4"],";width:100%;",e&&(0,a/* .css */.AH)(y(),d/* .spacing["12"] */.YK["12"])),input:e=>/*#__PURE__*/(0,a/* .css */.AH)("&.tutor-input-field{",f/* .typography.body */.I.body("regular"),";width:100%;border-radius:",d/* .borderRadius["6"] */.Vq["6"],";border:1px solid ",d/* .colorTokens.stroke["default"] */.I6.stroke["default"],";padding:",d/* .spacing["8"] */.YK["8"]," ",d/* .spacing["16"] */.YK["16"],";color:",d/* .colorTokens.text.title */.I6.text.title,";appearance:textfield;&:not(textarea){height:40px;}",e.hasHelpText&&(0,a/* .css */.AH)(_(),d/* .spacing["32"] */.YK["32"],d/* .spacing["12"] */.YK["12"])," ",e.removeBorder&&(0,a/* .css */.AH)(w())," ",e.isSecondary&&(0,a/* .css */.AH)(A()),":focus{",h/* .styleUtils.inputFocus */.x.inputFocus,";",e.isMagicAi&&(0,a/* .css */.AH)(x(),d/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,d/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",e.hasFieldError&&(0,a/* .css */.AH)(E(),d/* .colorTokens.stroke.danger */.I6.stroke.danger),"}::-webkit-outer-spin-button,::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{",f/* .typography.caption */.I.caption("regular"),";color:",d/* .colorTokens.text.hints */.I6.text.hints,";",e.isSecondary&&(0,a/* .css */.AH)(S(),d/* .colorTokens.text.hints */.I6.text.hints),"}",e.hasFieldError&&(0,a/* .css */.AH)(O(),d/* .colorTokens.stroke.danger */.I6.stroke.danger,d/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",e.readOnly&&(0,a/* .css */.AH)(k(),d/* .colorTokens.background.disable */.I6.background.disable,d/* .colorTokens.background.disable */.I6.background.disable),"}"),errorLabel:(e,t)=>/*#__PURE__*/(0,a/* .css */.AH)(f/* .typography.small */.I.small(),";line-height:",d/* .lineHeight["20"] */.K_["20"],";display:flex;align-items:start;margin-top:",d/* .spacing["4"] */.YK["4"],";",t&&(0,a/* .css */.AH)(T())," ",e&&(0,a/* .css */.AH)(C(),d/* .colorTokens.text.status.onHold */.I6.text.status.onHold),"    & svg{margin-right:",d/* .spacing["2"] */.YK["2"],";transform:rotate(180deg);}"),labelContainer:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;gap:",d/* .spacing["4"] */.YK["4"],";> div{display:flex;color:",d/* .colorTokens.color.black["30"] */.I6.color.black["30"],";}"),label:(e,t)=>/*#__PURE__*/(0,a/* .css */.AH)(f/* .typography.caption */.I.caption(),";margin:0px;width:",t?"100%":"auto",";color:",d/* .colorTokens.text.title */.I6.text.title,";display:flex;align-items:center;gap:",d/* .spacing["4"] */.YK["4"],";",e&&(0,a/* .css */.AH)(I(),f/* .typography.caption */.I.caption())),aiButton:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";width:32px;height:32px;border-radius:",d/* .borderRadius["4"] */.Vq["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 */.I6.stroke.brand,";}"),inputWrapper:/*#__PURE__*/(0,a/* .css */.AH)("position:relative;"),loader:/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;top:50%;right:",d/* .spacing["12"] */.YK["12"],";transform:translateY(-50%);display:flex;"),alertIcon:/*#__PURE__*/(0,a/* .css */.AH)("flex-shrink:0;")}},35304:function(e,t,r){"use strict";r.d(t,{A:()=>P});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(84577);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(12470);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(41594);/* import */var d=/*#__PURE__*/r.n(c);/* import */var f=r(42338);/* import */var p=r(90209);/* import */var h=r(66279);/* import */var v=r(74645);/* import */var m=r(1448);/* import */var g=r(85544);/* import */var b=r(6463);/* import */var y=r(4892);/* import */var _=r(10840);/* import */var w=r(84133);/* import */var A=r(85123);/* import */var x=r(51298);/* import */var E=r(85713);/* import */var S=r(14631);/* import */var O=r(75510);/* import */var k=r(36154);function T(){var e=(0,a._)(["\n      svg {\n        color: ",";\n      }\n    "]);T=function t(){return e};return e}var C;var I=!!y/* .tutorConfig.tutor_pro_url */.P.tutor_pro_url;var R=(C=y/* .tutorConfig.settings */.P.settings)===null||C===void 0?void 0:C.chatgpt_key_exist;var D=e=>{var{label:t,type:r="text",maxLimit:a,field:s,fieldState:l,disabled:d,readOnly:y,loading:_,placeholder:A,helpText:T,onChange:C,onKeyDown:D,isHidden:P,isClearable:F=false,isSecondary:Y=false,removeBorder:L,dataAttribute:H,isInlineLabel:N=false,isPassword:j=false,style:U,selectOnFocus:B=false,autoFocus:z=false,generateWithAi:K=false,isMagicAi:q=false,allowNegative:V=false,onClickAiButton:W}=e;var[G,$]=(0,c.useState)(r);var{showModal:Q}=(0,m/* .useModal */.h)();var X=(0,c.useRef)(null);var J;var Z=(J=s.value)!==null&&J!==void 0?J:"";var ee=undefined;if(G==="number"){Z=(0,E/* .parseNumberOnly */.TW)("".concat(Z),V).replace(/(\..*)\./g,"$1")}if(a){ee={maxLimit:a,inputCharacter:Z.toString().length}}var et=(0,n._)({},(0,x/* .isDefined */.O9)(H)&&{[H]:true});var er=()=>{if(!I){Q({component:g/* ["default"] */.A,props:{image:O,image2x:S}})}else if(!R){Q({component:b/* ["default"] */.A,props:{image:O,image2x:S}})}else{Q({component:v/* ["default"] */.A,isMagicAi:true,props:{title:(0,u.__)("AI Studio","tutor"),icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{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")}});W===null||W===void 0?void 0:W()}};return/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{label:t,field:s,fieldState:l,disabled:d,readOnly:y,loading:_,placeholder:A,helpText:T,isHidden:P,characterCount:ee,isSecondary:Y,removeBorder:L,isInlineLabel:N,inputStyle:U,generateWithAi:K,onClickAiButton:er,isMagicAi:q,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(o/* .Fragment */.FK,{children:/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:M.container(F||j),children:[/*#__PURE__*/(0,o/* .jsx */.Y)("input",(0,i._)((0,n._)({},s,e,et),{type:G==="number"?"text":G,value:Z,autoFocus:z,onChange:e=>{var{value:t}=e.target;var r=G==="number"?(0,E/* .parseNumberOnly */.TW)(t):t;s.onChange(r);if(C){C(r)}},onClick:e=>{e.stopPropagation()},onKeyDown:e=>{e.stopPropagation();D===null||D===void 0?void 0:D(e.key)},autoComplete:"off",ref:e=>{s.ref(e);// @ts-ignore
X.current=e;// this is not ideal but it is the only way to set ref to the input element
},onFocus:()=>{if(!B||!X.current){return}X.current.select()}})),/*#__PURE__*/(0,o/* .jsx */.Y)(w/* ["default"] */.A,{when:j,children:/*#__PURE__*/(0,o/* .jsx */.Y)(f/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>$(e=>e==="password"?"text":"password"),icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{name:"eye",width:24,height:24}),"aria-label":(0,u.__)("Show/Hide Password","tutor"),buttonCss:M.eyeButton({type:G})})}),/*#__PURE__*/(0,o/* .jsx */.Y)(w/* ["default"] */.A,{when:F&&!!s.value&&G!=="password",children:/*#__PURE__*/(0,o/* .jsx */.Y)(f/* ["default"] */.A,{isIconOnly:true,variant:"text",size:"small",onClick:()=>s.onChange(""),buttonCss:k/* .styleUtils.inputClearButton */.x.inputClearButton,icon:/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{name:"cross",width:24,height:24}),"aria-label":(0,u.__)("Clear","tutor")})})]})})}})};/* export default */const P=(0,A/* .withVisibilityControl */.M)(D);var M={container:e=>/*#__PURE__*/(0,s/* .css */.AH)("position:relative;display:flex;input{&.tutor-input-field{",e&&"padding-right: ".concat(_/* .spacing["36"] */.YK["36"],";"),";}}"),eyeButton:e=>{var{type:t}=e;return/*#__PURE__*/(0,s/* .css */.AH)(k/* .styleUtils.inputClearButton */.x.inputClearButton,";",t!=="password"&&(0,s/* .css */.AH)(T(),_/* .colorTokens.icon.brand */.I6.icon.brand))}}},59976:function(e,t,r){"use strict";r.d(t,{A:()=>N});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(31105);/* import */var o=r(84577);/* import */var s=r(2445);/* import */var u=r(17437);/* import */var l=r(12470);/* import */var c=/*#__PURE__*/r.n(l);/* import */var d=r(41594);/* import */var f=/*#__PURE__*/r.n(d);/* import */var p=r(42338);/* import */var h=r(90209);/* import */var v=r(35198);/* import */var m=r(10840);/* import */var g=r(24219);/* import */var b=r(84133);/* import */var y=r(47617);/* import */var _=r(67198);/* import */var w=r(36154);/* import */var A=r(51298);/* import */var x=r(85713);/* import */var E=r(66279);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 I(){var e=(0,o._)(["\n          outline-color: ",";\n          background-color: ",";\n        "]);I=function t(){return e};return e}function R(){var e=(0,o._)(["\n          border-color: ",";\n          background-color: ",";\n        "]);R=function t(){return e};return e}function D(){var e=(0,o._)(["\n      padding-left: calc("," + 1px);\n    "]);D=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 M(){var e=(0,o._)(["\n      min-width: 200px;\n    "]);M=function t(){return e};return e}function F(){var e=(0,o._)(["\n      background-color: ",";\n    "]);F=function t(){return e};return e}function Y(){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    "]);Y=function t(){return e};return e}function L(){var e=(0,o._)(["\n      transform: rotate(180deg);\n    "]);L=function t(){return e};return e}var H=e=>{var{options:t,field:r,fieldState:o,onChange:u=x/* .noop */.lQ,label:c,placeholder:f="",disabled:m,readOnly:g,loading:w,isSearchable:S=false,isInlineLabel:O,hideCaret:k,listLabel:T,isClearable:C=false,helpText:I,removeOptionsMinWidth:R=false,leftIcon:D,removeBorder:P,dataAttribute:M,isSecondary:F=false,isMagicAi:Y=false,isAiOutline:L=false,selectOnFocus:H,optionItemCss:N}=e;var U;var B=(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,A/* .isDefined */.O9)(e.description)),[t]);var[K,q]=(0,d.useState)((U=B())===null||U===void 0?void 0:U.label);var[V,W]=(0,d.useState)(false);var[G,$]=(0,d.useState)("");var[Q,X]=(0,d.useState)(false);var J=(0,d.useRef)(null);var Z=(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(G.toLowerCase())})}return t},[G,S,t]);var en=(0,d.useMemo)(()=>{return t.find(e=>e.value===r.value)},[r.value,t]);var ei=(0,n._)({},(0,A/* .isDefined */.O9)(M)&&{[M]:true});(0,d.useEffect)(()=>{var e;q((e=B())===null||e===void 0?void 0:e.label)},[r.value,B]);(0,d.useEffect)(()=>{if(Q){var e;q((e=B())===null||e===void 0?void 0:e.label)}},[B,Q]);var ea=(e,t)=>{t===null||t===void 0?void 0:t.stopPropagation();if(!e.disabled){r.onChange(e.value);u(e);$("");W(false);X(false)}};var{activeIndex:eo,setActiveIndex:es}=(0,_/* .useSelectKeyboardNavigation */.v)({options:er,isOpen:Q,selectedValue:r.value,onSelect:ea,onClose:()=>{X(false);W(false);$("")}});(0,d.useEffect)(()=>{if(Q&&eo>=0&&et.current){et.current.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Q,eo]);return/*#__PURE__*/(0,s/* .jsx */.Y)(E/* ["default"] */.A,{fieldState:o,field:r,label:c,disabled:m||t.length===0,readOnly:g,loading:w,isInlineLabel:O,helpText:I,removeBorder:P,isSecondary:F,isMagicAi:Y,children:e=>{var u,c;var{css:d}=e,_=(0,a._)(e,["css"]);return/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:j.mainWrapper,children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:j.inputWrapper(L),ref:Z,children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:j.leftIcon,children:[/*#__PURE__*/(0,s/* .jsx */.Y)(b/* ["default"] */.A,{when:D,children:D}),/*#__PURE__*/(0,s/* .jsx */.Y)(b/* ["default"] */.A,{when:en===null||en===void 0?void 0:en.icon,children:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:e,width:32,height:32})})]}),/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:{width:"100%"},children:[/*#__PURE__*/(0,s/* .jsx */.Y)("input",(0,i._)((0,n._)({},_,ei),{ref:e=>{r.ref(e);// @ts-ignore
J.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,j.input({hasLeftIcon:!!D||!!(en===null||en===void 0?void 0:en.icon),hasDescription:z,hasError:!!o.error,isMagicAi:Y,isAiOutline:L})],autoComplete:"off",readOnly:g||!S,placeholder:f,value:V?G:K,title:K,onClick:e=>{var t;e.stopPropagation();X(e=>!e);(t=J.current)===null||t===void 0?void 0:t.focus()},onKeyDown:e=>{if(e.key==="Enter"){var t;e.preventDefault();X(e=>!e);(t=J.current)===null||t===void 0?void 0:t.focus()}if(e.key==="Tab"){X(false)}},onFocus:H&&S?e=>{e.target.select()}:undefined,onChange:e=>{q(e.target.value);if(S){W(true);$(e.target.value)}},"data-select":true})),/*#__PURE__*/(0,s/* .jsx */.Y)(b/* ["default"] */.A,{when:z,children:/*#__PURE__*/(0,s/* .jsx */.Y)("span",{css:j.description({hasLeftIcon:!!D}),title:(u=B())===null||u===void 0?void 0:u.description,children:(c=B())===null||c===void 0?void 0:c.description})})]}),!k&&!w&&/*#__PURE__*/(0,s/* .jsx */.Y)("button",{tabIndex:-1,type:"button",css:j.caretButton({isOpen:Q}),onClick:()=>{var e;X(e=>!e);(e=J.current)===null||e===void 0?void 0:e.focus()},disabled:m||g||t.length===0,children:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:"chevronDown",width:20,height:20})})]}),/*#__PURE__*/(0,s/* .jsx */.Y)(v/* ["default"] */.A,{triggerRef:Z,isOpen:Q,dependencies:[er.length],animationType:y/* .AnimationType.slideDown */.J6.slideDown,closePopover:()=>{X(false);W(false);$("")},children:/*#__PURE__*/(0,s/* .jsxs */.FD)("ul",{css:[j.options(R)],children:[!!T&&/*#__PURE__*/(0,s/* .jsx */.Y)("li",{css:j.listLabel,children:T}),/*#__PURE__*/(0,s/* .jsx */.Y)(b/* ["default"] */.A,{when:er.length>0,fallback:/*#__PURE__*/(0,s/* .jsx */.Y)("li",{css:j.emptyState,children:(0,l.__)("No options available","tutor")}),children:er.map((e,t)=>/*#__PURE__*/(0,s/* .jsx */.Y)("li",{ref:e.value===r.value?ee:eo===t?et:null,css:[j.optionItem({isSelected:e.value===r.value,isActive:t===eo,isDisabled:!!e.disabled}),N],children:/*#__PURE__*/(0,s/* .jsxs */.FD)("button",{type:"button",css:j.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 */.Y)(b/* ["default"] */.A,{when:e.icon,children:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:e.icon,width:32,height:32})}),/*#__PURE__*/(0,s/* .jsx */.Y)("span",{children:e.label})]})},String(e.value)))}),C&&/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:j.clearButton({isDisabled:K===""}),children:/*#__PURE__*/(0,s/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",disabled:K==="",icon:/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{name:"delete"}),onClick:()=>{r.onChange(null);q("");$("");X(false)},children:(0,l.__)("Clear","tutor")})})]})})]})}})};/* export default */const N=H;var j={mainWrapper:/*#__PURE__*/(0,u/* .css */.AH)("width:100%;"),inputWrapper:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:false;return/*#__PURE__*/(0,u/* .css */.AH)("width:100%;display:flex;justify-content:space-between;align-items:center;position:relative;",e&&(0,u/* .css */.AH)(S(),m/* .colorTokens.ai.gradient_1 */.I6.ai.gradient_1,m/* .colorTokens.text.primary */.I6.text.primary))},leftIcon:/*#__PURE__*/(0,u/* .css */.AH)("position:absolute;left:",m/* .spacing["8"] */.YK["8"],";",w/* .styleUtils.display.flex */.x.display.flex(),";align-items:center;height:100%;color:",m/* .colorTokens.icon["default"] */.I6.icon["default"],";"),input:e=>{var{hasLeftIcon:t,hasDescription:r,hasError:n=false,isMagicAi:i=false,isAiOutline:a=false}=e;return/*#__PURE__*/(0,u/* .css */.AH)("&[data-select]{",g/* .typography.body */.I.body(),";width:100%;cursor:pointer;padding-right:",m/* .spacing["32"] */.YK["32"],";",w/* .styleUtils.textEllipsis */.x.textEllipsis,";background-color:transparent;background-color:",m/* .colorTokens.background.white */.I6.background.white,";",t&&(0,u/* .css */.AH)(O(),m/* .spacing["48"] */.YK["48"])," ",r&&(0,u/* .css */.AH)(k(),m/* .spacing["24"] */.YK["24"])," ",n&&(0,u/* .css */.AH)(T(),m/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail)," ",a&&(0,u/* .css */.AH)(C()),":focus{",w/* .styleUtils.inputFocus */.x.inputFocus,";",i&&(0,u/* .css */.AH)(I(),m/* .colorTokens.stroke.magicAi */.I6.stroke.magicAi,m/* .colorTokens.background.magicAi["8"] */.I6.background.magicAi["8"])," ",n&&(0,u/* .css */.AH)(R(),m/* .colorTokens.stroke.danger */.I6.stroke.danger,m/* .colorTokens.background.status.errorFail */.I6.background.status.errorFail),"}}")},description:e=>{var{hasLeftIcon:t}=e;return/*#__PURE__*/(0,u/* .css */.AH)(g/* .typography.small */.I.small(),";",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"    color:",m/* .colorTokens.text.hints */.I6.text.hints,";position:absolute;bottom:",m/* .spacing["8"] */.YK["8"],";padding-inline:calc(",m/* .spacing["16"] */.YK["16"]," + 1px) ",m/* .spacing["32"] */.YK["32"],";",t&&(0,u/* .css */.AH)(D(),m/* .spacing["48"] */.YK["48"]))},listLabel:/*#__PURE__*/(0,u/* .css */.AH)(g/* .typography.body */.I.body(),";color:",m/* .colorTokens.text.subdued */.I6.text.subdued,";min-height:40px;display:flex;align-items:center;padding-left:",m/* .spacing["16"] */.YK["16"],";"),clearButton:e=>{var{isDisabled:t=false}=e;return/*#__PURE__*/(0,u/* .css */.AH)("padding:",m/* .spacing["4"] */.YK["4"]," ",m/* .spacing["8"] */.YK["8"],";border-top:1px solid ",m/* .colorTokens.stroke["default"] */.I6.stroke["default"],";& > button{padding:0;width:100%;font-size:",m/* .fontSize["12"] */.J["12"],";> span{justify-content:center;}",!t&&(0,u/* .css */.AH)(P(),m/* .colorTokens.text.title */.I6.text.title),"}")},options:e=>/*#__PURE__*/(0,u/* .css */.AH)("z-index:",m/* .zIndex.dropdown */.fE.dropdown,";background-color:",m/* .colorTokens.background.white */.I6.background.white,";list-style-type:none;box-shadow:",m/* .shadow.popover */.r7.popover,";padding:",m/* .spacing["4"] */.YK["4"]," 0;margin:0;max-height:500px;border-radius:",m/* .borderRadius["6"] */.Vq["6"],";",w/* .styleUtils.overflowYAuto */.x.overflowYAuto,";scrollbar-gutter:auto;",!e&&(0,u/* .css */.AH)(M())),optionItem:e=>{var{isSelected:t=false,isActive:r=false,isDisabled:n=false}=e;return/*#__PURE__*/(0,u/* .css */.AH)(g/* .typography.body */.I.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 */.AH)(F(),m/* .colorTokens.background.hover */.I6.background.hover),"    &:hover{background-color:",!n&&m/* .colorTokens.background.hover */.I6.background.hover,";}",!n&&t&&(0,u/* .css */.AH)(Y(),m/* .colorTokens.background.active */.I6.background.active,m/* .colorTokens.action.primary["default"] */.I6.action.primary["default"],m/* .borderRadius["6"] */.Vq["6"],m/* .borderRadius["6"] */.Vq["6"]))},label:/*#__PURE__*/(0,u/* .css */.AH)(w/* .styleUtils.resetButton */.x.resetButton,";",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),";color:",m/* .colorTokens.text.title */.I6.text.title,";width:100%;height:100%;display:flex;align-items:center;gap:",m/* .spacing["8"] */.YK["8"],";margin:0 ",m/* .spacing["12"] */.YK["12"],";padding:",m/* .spacing["6"] */.YK["6"]," 0;text-align:left;line-height:",m/* .lineHeight["24"] */.K_["24"],";word-break:break-all;cursor:pointer;&:hover,&:focus,&:active{background-color:transparent;color:",m/* .colorTokens.text.title */.I6.text.title,";}span{flex-shrink:0;",w/* .styleUtils.text.ellipsis */.x.text.ellipsis(1),"      width:100%;}"),arrowUpDown:/*#__PURE__*/(0,u/* .css */.AH)("color:",m/* .colorTokens.icon["default"] */.I6.icon["default"],";display:flex;justify-content:center;align-items:center;margin-top:",m/* .spacing["2"] */.YK["2"],";"),optionsContainer:/*#__PURE__*/(0,u/* .css */.AH)("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 */.AH)(w/* .styleUtils.resetButton */.x.resetButton,";position:absolute;right:",m/* .spacing["4"] */.YK["4"],";display:flex;align-items:center;transition:transform 0.3s ease-in-out;color:",m/* .colorTokens.icon["default"] */.I6.icon["default"],";border-radius:",m/* .borderRadius["4"] */.Vq["4"],";padding:",m/* .spacing["6"] */.YK["6"],";height:100%;&:focus,&:active,&:hover{background:none;color:",m/* .colorTokens.icon["default"] */.I6.icon["default"],";}&:focus-visible{outline:2px solid ",m/* .colorTokens.stroke.brand */.I6.stroke.brand,";}",t&&(0,u/* .css */.AH)(L()))},emptyState:/*#__PURE__*/(0,u/* .css */.AH)(w/* .styleUtils.flexCenter */.x.flexCenter(),";padding:",m/* .spacing["8"] */.YK["8"],";")}},39246:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(2445);/* import */var o=r(17437);/* import */var s=r(89266);/* import */var u=r(10840);/* import */var l=r(85123);/* import */var c=r(66279);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 */.Y)(c/* ["default"] */.A,{label:o,field:t,fieldState:r,loading:l,helpText:f,isHidden:h,isInlineLabel:true,children:e=>{return/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:p.wrapper,children:/*#__PURE__*/(0,a/* .jsx */.Y)(s/* ["default"] */.A,(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)}}))})}})};/* export default */const f=(0,l/* .withVisibilityControl */.M)(d);var p={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;gap:",u/* .spacing["40"] */.YK["40"],";")}},61046:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(84577);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(41594);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(10840);/* import */var d=r(24219);/* import */var f=r(85123);/* import */var p=r(36154);/* import */var h=r(66279);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:A=true,isSecondary:x=false,isMagicAi:E=false,inputCss:S,maxHeight:O,autoResize:k=false}=e;var T;var C=(T=l.value)!==null&&T!==void 0?T:"";var I=(0,u.useRef)(null);var R=undefined;if(s){R={maxLimit:s,inputCharacter:C.toString().length}}var D=()=>{if(I.current){if(O){I.current.style.maxHeight="".concat(O,"px")}I.current.style.height="auto";I.current.style.height="".concat(I.current.scrollHeight,"px")}};(0,u.useLayoutEffect)(()=>{if(k){D()}// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{label:t,field:l,fieldState:c,disabled:d,readOnly:f,loading:p,placeholder:v,helpText:g,isHidden:w,characterCount:R,isSecondary:x,isMagicAi:E,children:e=>{return/*#__PURE__*/(0,o/* .jsx */.Y)(o/* .Fragment */.FK,{children:/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:y.container(A,S),children:/*#__PURE__*/(0,o/* .jsx */.Y)("textarea",(0,i._)((0,n._)({},l,e),{ref:e=>{l.ref(e);// @ts-ignore
I.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){D()}},onKeyDown:e=>{_===null||_===void 0?void 0:_(e.key)},autoComplete:"off",rows:r,cols:a}))})})}})};/* export default */const b=(0,f/* .withVisibilityControl */.M)(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 */.AH)("position:relative;display:flex;textarea{",d/* .typography.body */.I.body(),";height:auto;padding:",c/* .spacing["8"] */.YK["8"]," ",c/* .spacing["12"] */.YK["12"],";resize:none;",p/* .styleUtils.overflowYAuto */.x.overflowYAuto,";&.tutor-input-field{",t,";}",e&&(0,s/* .css */.AH)(v()),"}")}}},21958:function(e,t,r){"use strict";r.d(t,{m:()=>l});/* import */var n=r(2445);/* import */var i=r(10840);/* import */var a=r(24219);/* import */var o=r(8501);/* import */var s=r(36154);/* import */var u=r(17437);var l=e=>{var{options:t,onChange:r}=e;return/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:c.wrapper,children:/*#__PURE__*/(0,n/* .jsx */.Y)(o/* ["default"] */.A,{each:t,children:(e,t)=>{return/*#__PURE__*/(0,n/* .jsx */.Y)("button",{type:"button",onClick:()=>r(e.value),css:c.item,children:e.label},t)}})})};var c={wrapper:/*#__PURE__*/(0,u/* .css */.AH)("display:flex;flex-direction:column;padding-block:",i/* .spacing["8"] */.YK["8"],";max-height:400px;overflow-y:auto;"),item:/*#__PURE__*/(0,u/* .css */.AH)(s/* .styleUtils.resetButton */.x.resetButton,";",a/* .typography.caption */.I.caption(),";width:100%;padding:",i/* .spacing["4"] */.YK["4"]," ",i/* .spacing["16"] */.YK["16"],";color:",i/* .colorTokens.text.subdued */.I6.text.subdued,";display:flex;align-items:center;&:hover{background-color:",i/* .colorTokens.background.hover */.I6.background.hover,";color:",i/* .colorTokens.text.title */.I6.text.title,";}")}},34357:function(e,t,r){"use strict";r.d(t,{p:()=>h});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(2445);/* import */var o=r(35304);/* import */var s=r(59976);/* import */var u=r(72894);/* import */var l=r(10840);/* import */var c=r(17437);/* import */var d=r(12470);/* import */var f=/*#__PURE__*/r.n(d);/* import */var p=r(49785);var h=e=>{var{form:t}=e;return/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{css:v.wrapper,children:[/*#__PURE__*/(0,a/* .jsx */.Y)(p/* .Controller */.xI,{control:t.control,name:"characters",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(o/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Character Limit","tutor"),type:"number"}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(p/* .Controller */.xI,{control:t.control,name:"language",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(s/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Language","tutor"),options:u/* .languageOptions */.Po}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(p/* .Controller */.xI,{control:t.control,name:"tone",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(s/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,options:u/* .toneOptions */.HF,label:(0,d.__)("Tone","tutor")}))}),/*#__PURE__*/(0,a/* .jsx */.Y)(p/* .Controller */.xI,{control:t.control,name:"format",render:e=>/*#__PURE__*/(0,a/* .jsx */.Y)(s/* ["default"] */.A,(0,i._)((0,n._)({},e),{isMagicAi:true,label:(0,d.__)("Format","tutor"),options:u/* .formatOptions */.or}))})]})};var v={wrapper:/*#__PURE__*/(0,c/* .css */.AH)("display:grid;grid-template-columns:repeat(2,1fr);gap:",l/* .spacing["16"] */.YK["16"],";")}},75689:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(2445);/* import */var i=r(8875);/* import */var a=r(10840);/* import */var o=r(17437);var s=()=>{return/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:l.container,children:[/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:l.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"20%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"40%",height:"12px"})]}),/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:l.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"80%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"100%",height:"12px"}),/*#__PURE__*/(0,n/* .jsx */.Y)(i/* ["default"] */.A,{animation:true,isMagicAi:true,width:"80%",height:"12px"})]})]})};/* export default */const u=s;var l={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",a/* .spacing["8"] */.YK["8"],";"),container:/*#__PURE__*/(0,o/* .css */.AH)("display:flex;flex-direction:column;gap:",a/* .spacing["32"] */.YK["32"],";")}},74645:function(e,t,r){"use strict";r.d(t,{A:()=>M});/* import */var n=r(41374);/* import */var i=r(71893);/* import */var a=r(55456);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(12470);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(41594);/* import */var d=/*#__PURE__*/r.n(c);/* import */var f=r(49785);/* import */var p=r(42338);/* import */var h=r(66273);/* import */var v=r(90209);/* import */var m=r(35198);/* import */var g=r(61046);/* import */var b=r(21958);/* import */var y=r(34357);/* import */var _=r(75689);/* import */var w=r(95729);/* import */var A=r(72894);/* import */var x=r(10840);/* import */var E=r(24219);/* import */var S=r(84133);/* import */var O=r(47617);/* import */var k=r(57148);/* import */var T=r(36512);/* import */var C=r(36154);/* import */var I=r(85713);/* import */var R=r(25405);var D=[(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:E="essay",characters:C=250,is_html:P=false,fieldLabel:M="",fieldPlaceholder:Y=""}=e;var L=(0,k/* .useFormWithGlobalError */.p)({defaultValues:{prompt:"",characters:C,language:"english",tone:"formal",format:E}});var H=(0,T/* .useMagicTextGenerationMutation */.TF)();var N=(0,T/* .useModifyContentMutation */.cj)();var[j,U]=(0,c.useState)([]);var[B,z]=(0,c.useState)(0);var[K,q]=(0,c.useState)(false);var[V,W]=(0,c.useState)(null);var G=(0,c.useRef)(null);var $=(0,c.useRef)(null);var Q=(0,c.useMemo)(()=>{return j[B]},[j,B]);var X=L.watch("prompt");function J(e){U(t=>[e,...t]);z(0)}function Z(e,t){return(0,n._)(function*(){if(j.length===0){return}var r=j[B];if(e==="translation"&&!!t){var n=yield N.mutateAsync({type:"translation",content:r,language:t,is_html:P});if(n.data){J(n.data)}return}if(e==="change_tone"&&!!t){var i=yield N.mutateAsync({type:"change_tone",content:r,tone:t,is_html:P});if(i.data){J(i.data)}return}var a=yield N.mutateAsync({type:e,content:r,is_html:P});if(a.data){J(a.data)}})()}(0,c.useEffect)(()=>{L.setFocus("prompt");// eslint-disable-next-line react-hooks/exhaustive-deps
},[]);return/*#__PURE__*/(0,o/* .jsx */.Y)(R/* ["default"] */.A,{onClose:l,title:t,icon:r,maxWidth:524,children:/*#__PURE__*/(0,o/* .jsxs */.FD)("form",{onSubmit:L.handleSubmit(e=>(0,n._)(function*(){var t=yield H.mutateAsync((0,a._)((0,i._)({},e),{is_html:P}));if(t.data){J(t.data)}})()),children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.container,children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.fieldsWrapper,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(f/* .Controller */.xI,{control:L.control,name:"prompt",render:e=>/*#__PURE__*/(0,o/* .jsx */.Y)(g/* ["default"] */.A,(0,a._)((0,i._)({},e),{label:M||(0,u.__)("Craft Your Course Description","tutor"),placeholder:Y||(0,u.__)("Provide a brief overview of your course topic, target audience, and key takeaways","tutor"),rows:4,isMagicAi:true}))}),/*#__PURE__*/(0,o/* .jsxs */.FD)("button",{type:"button",css:F.inspireButton,onClick:()=>{var e=D.length;var t=Math.floor(Math.random()*e);L.reset((0,a._)((0,i._)({},L.getValues()),{prompt:D[t]}))},children:[/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"bulbLine"}),(0,u.__)("Inspire Me","tutor")]})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(S/* ["default"] */.A,{when:!H.isPending&&!N.isPending,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(_/* ["default"] */.A,{}),children:/*#__PURE__*/(0,o/* .jsxs */.FD)(S/* ["default"] */.A,{when:j.length>0,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(y/* .PromptControls */.p,{form:L}),children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{children:[/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.actionBar,children:[/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.navigation,children:/*#__PURE__*/(0,o/* .jsxs */.FD)(S/* ["default"] */.A,{when:j.length>1,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>z(e=>Math.max(0,e-1)),disabled:B===0,children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:!w/* .isRTL */.V8?"chevronLeft":"chevronRight",width:20,height:20})}),/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.pageInfo,children:[/*#__PURE__*/(0,o/* .jsx */.Y)("span",{children:B+1})," / ",j.length]}),/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>z(e=>Math.min(j.length-1,e+1)),disabled:B===j.length-1,children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:!w/* .isRTL */.V8?"chevronRight":"chevronLeft",width:20,height:20})})]})}),/*#__PURE__*/(0,o/* .jsx */.Y)(p/* ["default"] */.A,{variant:"text",onClick:()=>(0,n._)(function*(){if(j.length===0){return}var e=j[B];yield(0,I/* .copyToClipboard */.lW)(e);q(true);setTimeout(()=>{q(false)},1500)})(),children:/*#__PURE__*/(0,o/* .jsx */.Y)(S/* ["default"] */.A,{when:K,fallback:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"copy",width:20,height:20}),children:/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"checkFilled",width:20,height:20,style:/*#__PURE__*/(0,s/* .css */.AH)("color:",x/* .colorTokens.text.success */.I6.text.success," !important;")})})})]}),/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.content,dangerouslySetInnerHTML:{__html:Q}})]}),/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{css:F.otherActions,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("rephrase"),children:(0,u.__)("Rephrase","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("make_shorter"),children:(0,u.__)("Make Shorter","tutor")}),/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,ref:G,onClick:()=>W("tone"),children:[(0,u.__)("Change Tone","tutor"),/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,ref:$,onClick:()=>W("translate"),children:[(0,u.__)("Translate to","tutor"),/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"chevronDown",width:16,height:16})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("write_as_bullets"),children:(0,u.__)("Write as Bullets","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("make_longer"),children:(0,u.__)("Make Longer","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",roundedFull:false,onClick:()=>Z("simplify_language"),children:(0,u.__)("Simplify Language","tutor")})]})]})})]}),/*#__PURE__*/(0,o/* .jsx */.Y)(m/* ["default"] */.A,{isOpen:V==="tone",triggerRef:G,arrow:true,closePopover:()=>W(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.J6.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.Y)(b/* .OptionList */.m,{options:A/* .toneOptions */.HF,onChange:e=>(0,n._)(function*(){W(null);yield Z("change_tone",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.Y)(m/* ["default"] */.A,{isOpen:V==="translate",triggerRef:$,closePopover:()=>W(null),maxWidth:"160px",animationType:O/* .AnimationType.slideDown */.J6.slideDown,children:/*#__PURE__*/(0,o/* .jsx */.Y)(b/* .OptionList */.m,{options:A/* .languageOptions */.Po,onChange:e=>(0,n._)(function*(){W(null);yield Z("translation",e)})()})}),/*#__PURE__*/(0,o/* .jsx */.Y)("div",{css:F.footer,children:/*#__PURE__*/(0,o/* .jsxs */.FD)(S/* ["default"] */.A,{when:j.length>0,fallback:/*#__PURE__*/(0,o/* .jsxs */.FD)(h/* ["default"] */.A,{type:"submit",disabled:H.isPending||!X||N.isPending,children:[/*#__PURE__*/(0,o/* .jsx */.Y)(v/* ["default"] */.A,{name:"magicWand",width:24,height:24}),(0,u.__)("Generate Now","tutor")]}),children:[/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"outline",type:"submit",disabled:H.isPending||!X||N.isPending,children:(0,u.__)("Generate Again","tutor")}),/*#__PURE__*/(0,o/* .jsx */.Y)(h/* ["default"] */.A,{variant:"primary",disabled:H.isPending||j.length===0||N.isPending,onClick:()=>{d.onChange(j[B]);l()},children:(0,u.__)("Use This","tutor")})]})})]})})};/* export default */const M=P;var F={container:/*#__PURE__*/(0,s/* .css */.AH)("padding:",x/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",x/* .spacing["16"] */.YK["16"],";"),fieldsWrapper:/*#__PURE__*/(0,s/* .css */.AH)("position:relative;textarea{padding-bottom:",x/* .spacing["40"] */.YK["40"]," !important;}"),footer:/*#__PURE__*/(0,s/* .css */.AH)("padding:",x/* .spacing["12"] */.YK["12"]," ",x/* .spacing["16"] */.YK["16"],";display:flex;align-items:center;justify-content:end;gap:",x/* .spacing["10"] */.YK["10"],";box-shadow:0px 1px 0px 0px #e4e5e7 inset;button{width:fit-content;}"),pageInfo:/*#__PURE__*/(0,s/* .css */.AH)(E/* .typography.caption */.I.caption(),";color:",x/* .colorTokens.text.hints */.I6.text.hints,";& > span{font-weight:",x/* .fontWeight.medium */.Wy.medium,";color:",x/* .colorTokens.text.primary */.I6.text.primary,";}"),inspireButton:/*#__PURE__*/(0,s/* .css */.AH)(C/* .styleUtils.resetButton */.x.resetButton,";",E/* .typography.small */.I.small(),";position:absolute;height:28px;bottom:",x/* .spacing["12"] */.YK["12"],";left:",x/* .spacing["12"] */.YK["12"],";border:1px solid ",x/* .colorTokens.stroke.brand */.I6.stroke.brand,";border-radius:",x/* .borderRadius["4"] */.Vq["4"],";display:flex;align-items:center;gap:",x/* .spacing["4"] */.YK["4"],";color:",x/* .colorTokens.text.brand */.I6.text.brand,";padding-inline:",x/* .spacing["12"] */.YK["12"],";background-color:",x/* .colorTokens.background.white */.I6.background.white,";&:hover{background-color:",x/* .colorTokens.background.brand */.I6.background.brand,";color:",x/* .colorTokens.text.white */.I6.text.white,";}&:focus-visible{outline:2px solid ",x/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}&:disabled{background-color:",x/* .colorTokens.background.disable */.I6.background.disable,";color:",x/* .colorTokens.text.disable */.I6.text.disable,";}"),navigation:/*#__PURE__*/(0,s/* .css */.AH)("margin-left:-",x/* .spacing["8"] */.YK["8"],";display:flex;align-items:center;"),content:/*#__PURE__*/(0,s/* .css */.AH)(E/* .typography.caption */.I.caption(),";height:180px;overflow-y:auto;background-color:",x/* .colorTokens.background.magicAi["default"] */.I6.background.magicAi["default"],";border-radius:",x/* .borderRadius["6"] */.Vq["6"],";padding:",x/* .spacing["6"] */.YK["6"]," ",x/* .spacing["12"] */.YK["12"],";color:",x/* .colorTokens.text.magicAi */.I6.text.magicAi,";"),actionBar:/*#__PURE__*/(0,s/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;"),otherActions:/*#__PURE__*/(0,s/* .css */.AH)("display:flex;gap:",x/* .spacing["10"] */.YK["10"],";flex-wrap:wrap;& > button{width:fit-content;}")}},25405:function(e,t,r){"use strict";r.d(t,{A:()=>y});/* import */var n=r(84577);/* import */var i=r(2445);/* import */var a=r(17437);/* import */var o=r(90209);/* import */var s=r(66238);/* import */var u=r(54527);/* import */var l=r(95729);/* import */var c=r(10840);/* import */var d=r(24219);/* import */var f=r(84133);/* import */var p=r(54203);/* import */var h=r(36154);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 */.yl.BASIC_MODAL_MAX_WIDTH,isCloseAble:b=true,blurTriggerElement:y=true}=e;(0,p/* .useScrollLock */.K$)();return/*#__PURE__*/(0,i/* .jsx */.Y)(u/* ["default"] */.A,{blurPrevious:y,children:/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:[_.container({isFullScreen:v}),m],style:{maxWidth:"".concat(g,"px")},children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:_.header({hasEntireHeader:!!d}),children:[/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:!d,fallback:d,children:/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:_.headerContent,children:[/*#__PURE__*/(0,i/* .jsxs */.FD)("div",{css:_.iconWithTitle,children:[/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:c,children:c}),/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:n,children:/*#__PURE__*/(0,i/* .jsx */.Y)("p",{css:_.title,children:n})})]}),/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:a,children:/*#__PURE__*/(0,i/* .jsx */.Y)("span",{css:_.subtitle,children:a})})]})}),/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:_.actionsWrapper({hasEntireHeader:!!d}),children:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:h,fallback:/*#__PURE__*/(0,i/* .jsx */.Y)(f/* ["default"] */.A,{when:b,children:/*#__PURE__*/(0,i/* .jsx */.Y)("button",{"data-cy":"close-modal",type:"button",css:_.closeButton,onClick:r,children:/*#__PURE__*/(0,i/* .jsx */.Y)(o/* ["default"] */.A,{name:"timesThin",width:24,height:24})})}),children:h})})]}),/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:_.content({isFullScreen:v}),children:/*#__PURE__*/(0,i/* .jsx */.Y)(s/* ["default"] */.A,{children:t})})]})})};/* export default */const y=b;var _={container:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("position:relative;background:",c/* .colorTokens.background.white */.I6.background.white,";box-shadow:",c/* .shadow.modal */.r7.modal,";border-radius:",c/* .borderRadius["10"] */.Vq["10"],";overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",t&&(0,a/* .css */.AH)(v())," ",c/* .Breakpoint.smallTablet */.EA.smallTablet,"{width:90%;}")},header:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;align-items:center;justify-content:space-between;width:100%;height:",!t?"".concat(l/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT,"px"):"auto",";background:",c/* .colorTokens.background.white */.I6.background.white,";border-bottom:",!t?"1px solid ".concat(c/* .colorTokens.stroke.divider */.I6.stroke.divider):"none",";padding-inline:",c/* .spacing["16"] */.YK["16"],";")},headerContent:/*#__PURE__*/(0,a/* .css */.AH)("place-self:center start;display:inline-flex;align-items:center;gap:",c/* .spacing["12"] */.YK["12"],";"),iconWithTitle:/*#__PURE__*/(0,a/* .css */.AH)("display:inline-flex;align-items:center;gap:",c/* .spacing["4"] */.YK["4"],";color:",c/* .colorTokens.icon["default"] */.I6.icon["default"],";"),title:/*#__PURE__*/(0,a/* .css */.AH)(d/* .typography.body */.I.body("medium"),";color:",c/* .colorTokens.text.title */.I6.text.title,";"),subtitle:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.text.ellipsis */.x.text.ellipsis(1)," ",d/* .typography.caption */.I.caption(),";color:",c/* .colorTokens.text.hints */.I6.text.hints,";"),actionsWrapper:e=>{var{hasEntireHeader:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("place-self:center end;display:inline-flex;gap:",c/* .spacing["16"] */.YK["16"],";",t&&(0,a/* .css */.AH)(m(),c/* .spacing["16"] */.YK["16"],c/* .spacing["16"] */.YK["16"]))},closeButton:/*#__PURE__*/(0,a/* .css */.AH)(h/* .styleUtils.resetButton */.x.resetButton,";display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:",c/* .borderRadius.circle */.Vq.circle,";background:",c/* .colorTokens.background.white */.I6.background.white,";&:focus,&:active,&:hover{background:",c/* .colorTokens.background.white */.I6.background.white,";}svg{color:",c/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",c/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",c/* .shadow.focus */.r7.focus,";}"),content:e=>{var{isFullScreen:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("background-color:",c/* .colorTokens.background.white */.I6.background.white,";overflow-y:auto;max-height:90vh;",t&&(0,a/* .css */.AH)(g(),l/* .modal.BASIC_MODAL_HEADER_HEIGHT */.yl.BASIC_MODAL_HEADER_HEIGHT))}}},3013:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(2445);/* import */var i=r(17437);/* import */var a=r(12470);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(42338);/* import */var u=r(25405);/* import */var l=r(10840);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 */.FD)(u/* ["default"] */.A,{icon:h,onClose:()=>c({action:"CLOSE"}),title:t,maxWidth:v,children:[/*#__PURE__*/(0,n/* .jsx */.Y)("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 */.FD)("div",{css:f.footerWrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{variant:"text",onClick:()=>c({action:"CLOSE"}),size:"small",children:o!==null&&o!==void 0?o:(0,a.__)("Cancel","tutor")}),/*#__PURE__*/(0,n/* .jsx */.Y)(s/* ["default"] */.A,{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")})]})]})};/* export default */const d=c;var f={content:/*#__PURE__*/(0,i/* .css */.AH)("font-size:",l/* .fontSize["14"] */.J["14"],";line-height:",l/* .lineHeight["20"] */.K_["20"],";color:",l/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",l/* .spacing["20"] */.YK["20"],";"),footerWrapper:/*#__PURE__*/(0,i/* .css */.AH)("display:flex;justify-content:end;gap:",l/* .spacing["8"] */.YK["8"],";padding:",l/* .spacing["12"] */.YK["12"]," ",l/* .spacing["16"] */.YK["16"],";box-shadow:",l/* .shadow.dividerTop */.r7.dividerTop,";")}},1448:function(e,t,r){"use strict";r.d(t,{Z:()=>g,h:()=>m});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(84577);/* import */var o=r(2445);/* import */var s=r(17437);/* import */var u=r(41594);/* import */var l=/*#__PURE__*/r.n(u);/* import */var c=r(10840);/* import */var d=r(47617);/* import */var f=r(85713);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 */.AH)("position:fixed;background-color:",c/* .colorTokens.background.modal */.I6.background.modal,";opacity:0.7;inset:0;z-index:",c/* .zIndex.negative */.fE.negative,";",t&&(0,s/* .css */.AH)(p()))},container:/*#__PURE__*/(0,s/* .css */.AH)("z-index:",c/* .zIndex.highest */.fE.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 */.lQ,updateModal:f/* .noop */.lQ,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 */.fE.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 */.Ak)(),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 */.sM)({keys:e=>e.id,data:r.modals,animationType:d/* .AnimationType.slideUp */.J6.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 */.FD)(v.Provider,{value:{showModal:s,closeModal:p,updateModal:m,hasModalOnStack:b},children:[t,g((e,t,r,a)=>{return/*#__PURE__*/(0,o/* .jsxs */.FD)("div",{"data-cy":"tutor-modal",css:[h.container,{zIndex:t.depthIndex||c/* .zIndex.modal */.fE.modal+a}],children:[/*#__PURE__*/(0,o/* .jsx */.Y)(d/* .AnimatedDiv */.LK,{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 */.Y)("div",{css:h.backdrop({magicAi:t.isMagicAi}),onKeyUp:f/* .noop */.lQ,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)})]})}},85544:function(e,t,r){"use strict";r.d(t,{A:()=>b});/* import */var n=r(2445);/* import */var i=r(17437);/* import */var a=r(12470);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(42338);/* import */var u=r(90209);/* import */var l=r(25405);/* import */var c=r(4892);/* import */var d=r(10840);/* import */var f=r(24219);/* import */var p=r(8501);/* import */var h=r(84133);/* import */var v=r(36154);var m={title:/*#__PURE__*/(0,n/* .jsxs */.FD)(n/* .Fragment */.FK,{children:[(0,a.__)("Upgrade to Tutor LMS Pro today and experience the power of ","tutor"),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:v/* .styleUtils.aiGradientText */.x.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 */.Y)(s/* ["default"] */.A,{onClick:()=>window.open(c/* ["default"].TUTOR_PRICING_PAGE */.A.TUTOR_PRICING_PAGE,"_blank","noopener"),icon:/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{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 */.Y)(l/* ["default"] */.A,{onClose:s,entireHeader:/*#__PURE__*/(0,n/* .jsx */.Y)("span",{css:y.message,children:r}),maxWidth:496,children:/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:y.wrapper,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:t,children:/*#__PURE__*/(0,n/* .jsx */.Y)("h4",{css:y.title,children:t})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:c,children:/*#__PURE__*/(0,n/* .jsx */.Y)("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 */.Y)(h/* ["default"] */.A,{when:i,children:/*#__PURE__*/(0,n/* .jsx */.Y)("h6",{css:y.featuresTiTle,children:i})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:o.length,children:/*#__PURE__*/(0,n/* .jsx */.Y)("div",{css:y.features,children:/*#__PURE__*/(0,n/* .jsx */.Y)(p/* ["default"] */.A,{each:o,children:(e,t)=>/*#__PURE__*/(0,n/* .jsxs */.FD)("div",{css:y.feature,children:[/*#__PURE__*/(0,n/* .jsx */.Y)(u/* ["default"] */.A,{name:"materialCheck",width:20,height:20,style:y.checkIcon}),/*#__PURE__*/(0,n/* .jsx */.Y)("span",{children:e})]},t)})})}),/*#__PURE__*/(0,n/* .jsx */.Y)(h/* ["default"] */.A,{when:f,children:f})]})})};/* export default */const b=g;var y={wrapper:/*#__PURE__*/(0,i/* .css */.AH)("padding:0 ",d/* .spacing["24"] */.YK["24"]," ",d/* .spacing["32"] */.YK["32"]," ",d/* .spacing["24"] */.YK["24"],";",v/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",d/* .spacing["16"] */.YK["16"],";"),message:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.small */.I.small(),";color:",d/* .colorTokens.text.subdued */.I6.text.subdued,";padding-left:",d/* .spacing["8"] */.YK["8"],";padding-top:",d/* .spacing["24"] */.YK["24"],";padding-bottom:",d/* .spacing["4"] */.YK["4"],";"),title:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.heading6 */.I.heading6("medium"),";color:",d/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),image:/*#__PURE__*/(0,i/* .css */.AH)("height:270px;width:100%;object-fit:cover;object-position:center;border-radius:",d/* .borderRadius["8"] */.Vq["8"],";"),featuresTiTle:/*#__PURE__*/(0,i/* .css */.AH)(f/* .typography.body */.I.body("medium"),";color:",d/* .colorTokens.text.primary */.I6.text.primary,";text-wrap:pretty;"),features:/*#__PURE__*/(0,i/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",d/* .spacing["4"] */.YK["4"],";padding-right:",d/* .spacing["48"] */.YK["48"],";"),feature:/*#__PURE__*/(0,i/* .css */.AH)(v/* .styleUtils.display.flex */.x.display.flex(),";gap:",d/* .spacing["12"] */.YK["12"],";",f/* .typography.small */.I.small(),";color:",d/* .colorTokens.text.title */.I6.text.title,";span{text-wrap:pretty;}"),checkIcon:/*#__PURE__*/(0,i/* .css */.AH)("flex-shrink:0;color:",d/* .colorTokens.text.success */.I6.text.success,";")}},6463:function(e,t,r){"use strict";r.d(t,{A:()=>M});/* import */var n=r(41374);/* import */var i=r(71893);/* import */var a=r(55456);/* import */var o=r(84577);/* import */var s=r(2445);/* import */var u=r(17437);/* import */var l=r(12470);/* import */var c=/*#__PURE__*/r.n(l);/* import */var d=r(41594);/* import */var f=/*#__PURE__*/r.n(d);/* import */var p=r(49785);/* import */var h=r(51550);/* import */var v=r(42338);/* import */var m=r(35304);/* import */var g=r(39246);/* import */var b=r(25405);/* import */var y=r(4892);/* import */var _=r(95729);/* import */var w=r(10840);/* import */var A=r(24219);/* import */var x=r(84133);/* import */var E=r(57148);/* import */var S=r(36512);/* import */var O=r(36154);/* import */var k=r(6192);function T(){var e=(0,o._)(["\n      padding: ",";\n      padding-top: ",";\n    "]);T=function t(){return e};return e}var C,I;var R=((C=y/* .tutorConfig.settings */.P.settings)===null||C===void 0?void 0:C.chatgpt_enable)==="on";var D=(I=y/* .tutorConfig.current_user.roles */.P.current_user.roles)===null||I===void 0?void 0:I.includes(_/* .TutorRoles.ADMINISTRATOR */.gt.ADMINISTRATOR);var P=e=>{var{closeModal:t,image:r,image2x:o}=e;var u=(0,E/* .useFormWithGlobalError */.p)({defaultValues:{openAIApiKey:"",enable_open_ai:R},shouldFocusError:true});var c=(0,S/* .useSaveOpenAiSettingsMutation */.dK)();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 */.Y)(b/* ["default"] */.A,{onClose:()=>t({action:"CLOSE"}),title:D?(0,l.__)("Set OpenAI API key","tutor"):undefined,entireHeader:D?undefined:/*#__PURE__*/(0,s/* .jsx */.Y)(s/* .Fragment */.FK,{children:" "}),maxWidth:560,children:/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.wrapper({isCurrentUserAdmin:D}),children:/*#__PURE__*/(0,s/* .jsx */.Y)(x/* ["default"] */.A,{when:D,fallback:/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[/*#__PURE__*/(0,s/* .jsx */.Y)("img",{css:F.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 */.FD)("div",{children:[/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.message,children:(0,l.__)("API is not connected","tutor")}),/*#__PURE__*/(0,s/* .jsx */.Y)("div",{css:F.title,children:(0,l.__)("Please, ask your Admin to connect the API with Tutor LMS Pro.","tutor")})]})]}),children:/*#__PURE__*/(0,s/* .jsxs */.FD)(s/* .Fragment */.FK,{children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("form",{css:F.formWrapper,onSubmit:u.handleSubmit(f),children:[/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:F.infoText,children:[/*#__PURE__*/(0,s/* .jsx */.Y)("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 */.A.CHATGPT_PLATFORM_URL,'" target="_blank" rel="noopener noreferrer">'),"</a>")}}),/*#__PURE__*/(0,s/* .jsx */.Y)(h/* ["default"] */.A,{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 */.Y)(p/* .Controller */.xI,{name:"openAIApiKey",control:u.control,rules:(0,k/* .requiredRule */.WN)(),render:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(m/* ["default"] */.A,(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 */.Y)(p/* .Controller */.xI,{name:"enable_open_ai",control:u.control,render:e=>/*#__PURE__*/(0,s/* .jsx */.Y)(g/* ["default"] */.A,(0,a._)((0,i._)({},e),{label:(0,l.__)("Enable OpenAI","tutor")}))})]}),/*#__PURE__*/(0,s/* .jsxs */.FD)("div",{css:F.formFooter,children:[/*#__PURE__*/(0,s/* .jsx */.Y)(v/* ["default"] */.A,{onClick:()=>t({action:"CLOSE"}),variant:"text",size:"small",children:(0,l.__)("Cancel","tutor")}),/*#__PURE__*/(0,s/* .jsx */.Y)(v/* ["default"] */.A,{size:"small",onClick:u.handleSubmit(f),loading:c.isPending,children:(0,l.__)("Save","tutor")})]})]})})})})};/* export default */const M=P;var F={wrapper:e=>{var{isCurrentUserAdmin:t}=e;return/*#__PURE__*/(0,u/* .css */.AH)(O/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["20"] */.YK["20"],";",!t&&(0,u/* .css */.AH)(T(),w/* .spacing["24"] */.YK["24"],w/* .spacing["6"] */.YK["6"]))},formWrapper:/*#__PURE__*/(0,u/* .css */.AH)(O/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["20"] */.YK["20"],";padding:",w/* .spacing["16"] */.YK["16"]," ",w/* .spacing["16"] */.YK["16"]," 0 ",w/* .spacing["16"] */.YK["16"],";"),infoText:/*#__PURE__*/(0,u/* .css */.AH)(A/* .typography.small */.I.small(),";",O/* .styleUtils.display.flex */.x.display.flex("column"),";gap:",w/* .spacing["8"] */.YK["8"],";color:",w/* .colorTokens.text.subdued */.I6.text.subdued,";a{",O/* .styleUtils.resetButton */.x.resetButton,"      color:",w/* .colorTokens.text.brand */.I6.text.brand,";}"),formFooter:/*#__PURE__*/(0,u/* .css */.AH)(O/* .styleUtils.display.flex */.x.display.flex(),";justify-content:flex-end;gap:",w/* .spacing["16"] */.YK["16"],";border-top:1px solid ",w/* .colorTokens.stroke.divider */.I6.stroke.divider,";padding:",w/* .spacing["16"] */.YK["16"],";"),image:/*#__PURE__*/(0,u/* .css */.AH)("height:310px;width:100%;object-fit:cover;object-position:center;border-radius:",w/* .borderRadius["8"] */.Vq["8"],";"),message:/*#__PURE__*/(0,u/* .css */.AH)(A/* .typography.small */.I.small(),";color:",w/* .colorTokens.text.subdued */.I6.text.subdued,";"),title:/*#__PURE__*/(0,u/* .css */.AH)(A/* .typography.heading4 */.I.heading4("medium"),";color:",w/* .colorTokens.text.primary */.I6.text.primary,";margin-top:",w/* .spacing["4"] */.YK["4"],";text-wrap:pretty;")}},4892:function(e,t,r){"use strict";r.d(t,{A:()=>u,P:()=>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")};/* export default */const u=s},95729:function(e,t,r){"use strict";r.d(t,{Gy:()=>w,Hh:()=>x,I4:()=>m,UA:()=>E,V8:()=>v,gt:()=>A,j8:()=>O,oW:()=>S,qP:()=>T,re:()=>u,vN:()=>y,w3:()=>o,yl:()=>_});/* import */var n=r(12470);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(10840);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 */.cH,isAboveTablet:b>=a/* .TabletBreakpoint */.uh,isAboveMobile:b>=a/* .MobileBreakpoint */.G2,isAboveSmallMobile:b>=a/* .SmallMobileBreakpoint */.PB};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 A={ADMINISTRATOR:"administrator",TUTOR_INSTRUCTOR:"tutor_instructor",SUBSCRIBER:"subscriber"};var x=/*#__PURE__*/function(e){e["notebook"]="tutor_course_builder_notebook";return e}({});var E=/*#__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 I=/* unused pure expression or super */null&&{name:"checkbox",// eslint-disable-next-line @typescript-eslint/no-explicit-any
value:"",onChange:()=>{},onBlur:()=>{},ref:()=>{}};var R=/* unused pure expression or super */null&&{invalid:false,isTouched:false,isDirty:false,isValidating:false,error:undefined}},72894:function(e,t,r){"use strict";r.d(t,{HF:()=>o,Po:()=>a,or:()=>s});/* import */var n=r(12470);/* 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"}]},10840:function(e,t,r){"use strict";r.d(t,{$A:()=>a,EA:()=>A,G2:()=>y,I6:()=>l,J:()=>d,K_:()=>p,P3:()=>s,PB:()=>b,Vq:()=>m,Wy:()=>f,YK:()=>c,cH:()=>w,fE:()=>g,iL:()=>x,mw:()=>u,r7:()=>v,uh:()=>_});/* import */var n=r(3771);/* 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 A={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 x=1006},24219:function(e,t,r){"use strict";r.d(t,{I:()=>a});/* import */var n=r(10840);/* import */var i=r(17437);var a={heading1:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["80"] */.J["80"],";line-height:",n/* .lineHeight["81"] */.K_["81"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},heading2:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["60"] */.J["60"],";line-height:",n/* .lineHeight["70"] */.K_["70"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},heading3:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["40"] */.J["40"],";line-height:",n/* .lineHeight["48"] */.K_["48"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},heading4:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["30"] */.J["30"],";line-height:",n/* .lineHeight["40"] */.K_["40"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},heading5:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["24"] */.J["24"],";line-height:",n/* .lineHeight["34"] */.K_["34"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},heading6:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["20"] */.J["20"],";line-height:",n/* .lineHeight["30"] */.K_["30"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},body:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["16"] */.J["16"],";line-height:",n/* .lineHeight["26"] */.K_["26"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},caption:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["15"] */.J["15"],";line-height:",n/* .lineHeight["24"] */.K_["24"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},small:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["13"] */.J["13"],";line-height:",n/* .lineHeight["18"] */.K_["18"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")},tiny:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"regular";return/*#__PURE__*/(0,i/* .css */.AH)("font-size:",n/* .fontSize["11"] */.J["11"],";line-height:",n/* .lineHeight["16"] */.K_["16"],";color:",n/* .colorTokens.text.primary */.I6.text.primary,";font-weight:",n/* .fontWeight */.Wy[e],";font-family:",n/* .fontFamily.inter */.mw.inter,";")}}},8501:function(e,t,r){"use strict";r.d(t,{A:()=>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)})};/* export default */const i=n},84133:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(51298);var i=e=>{return(0,n/* .isDefined */.O9)(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};/* export default */const o=a},85123:function(e,t,r){"use strict";r.d(t,{M:()=>s});/* import */var n=r(71893);/* import */var i=r(31105);/* import */var a=r(2445);/* import */var o=r(91612);var s=e=>{return t=>{var{visibilityKey:r}=t,s=(0,i._)(t,["visibilityKey"]);var u=(0,o/* ["default"] */.A)(r);if(!u){return null}// @ts-ignore
return/*#__PURE__*/(0,a/* .jsx */.Y)(e,(0,n._)({},s))}}},47617:function(e,t,r){"use strict";r.d(t,{J6:()=>l,LK:()=>f,sM:()=>d});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(31105);/* import */var o=r(2445);/* import */var s=r(55787);/* import */var u=r(16653);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 */.le.easeInOutQuad,debounceMeasure:f=false,keys:p}=e;var h=Array.isArray(t)?t.length>0:!!t;var[v,m]=(0,u/* ["default"] */.A)({debounce:f?a+c:0});var g=(0,s/* .useSpring */.zh)({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 */.zh)({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 */.pn)(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 */.Y)(s/* .animated.div */.CS.div,(0,i._)((0,n._)({},l),{style:(0,i._)((0,n._)({},r),{overflow:u?"hidden":"initial"}),children:t}))}},78635:function(e,t,r){"use strict";r.d(t,{G:()=>o});/* import */var n=r(51298);/* import */var i=r(47767);/* import */var a=r(45588);var o=e=>{var t=(0,i/* .useLocation */.zy)();var r=(0,a/* .matchRoutes */.ue)(e,t);if(!(0,n/* .isDefined */.O9)(r)){return t.pathname}var o=r.find(e=>e.pathname===t.pathname);return(o===null||o===void 0?void 0:o.route.path)||""}},57148:function(e,t,r){"use strict";r.d(t,{p:()=>u});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(41594);/* import */var o=/*#__PURE__*/r.n(a);/* import */var s=r(49785);var u=e=>{var[t,r]=(0,a.useState)();var o=(0,s/* .useForm */.mN)(e);return(0,i._)((0,n._)({},o),{submitError:t,setSubmitError:r})}},94654:function(e,t,r){"use strict";r.d(t,{ZL:()=>R,tP:()=>I,ym:()=>A,zA:()=>w});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(2445);/* import */var o=r(17437);/* import */var s=r(41594);/* import */var u=/*#__PURE__*/r.n(s);/* import */var l=r(75206);/* import */var c=/*#__PURE__*/r.n(l);/* import */var d=r(54527);/* import */var f=r(1448);/* import */var p=r(95729);/* import */var h=r(10840);/* import */var v=r(47617);/* import */var m=r(54203);/* import */var g=r(36154);/* import */var b=r(85713);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 A=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 x=e=>{return{top:e.top,left:-e.left}};var E=(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=E(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=E(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 */.V8){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 I=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 */.V8?A(a):a},[a]);var _=(0,s.useMemo)(()=>{return p/* .isRTL */.V8?x(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 R=e=>{var{isOpen:t,children:r,onClickOutside:n,onEscape:i,animationType:o=v/* .AnimationType.slideDown */.J6.slideDown}=e;var{hasModalOnStack:u}=(0,f/* .useModal */.h)();(0,m/* .useScrollLock */.K$)(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 */.sM)({data:t,animationType:o});return c((e,t)=>{if(!t){return null}return/*#__PURE__*/(0,l.createPortal)(/*#__PURE__*/(0,a/* .jsx */.Y)(v/* .AnimatedDiv */.LK,{css:D.wrapper,style:e,children:/*#__PURE__*/(0,a/* .jsx */.Y)(d/* ["default"] */.A,{children:/*#__PURE__*/(0,a/* .jsxs */.FD)("div",{className:"tutor-portal-popover",role:"presentation",children:[/*#__PURE__*/(0,a/* .jsx */.Y)("div",{css:D.backdrop,onKeyUp:b/* .noop */.lQ,onClick:e=>{e.stopPropagation();n===null||n===void 0?void 0:n()}}),r]})})}),document.body)})};var D={wrapper:/*#__PURE__*/(0,o/* .css */.AH)("position:fixed;z-index:",h/* .zIndex.highest */.fE.highest,";inset:0;"),backdrop:/*#__PURE__*/(0,o/* .css */.AH)(g/* .styleUtils.centeredFlex */.x.centeredFlex,";position:fixed;inset:0;z-index:",h/* .zIndex.negative */.fE.negative,";")}},54203:function(e,t,r){"use strict";r.d(t,{K$:()=>h});/* import */var n=r(41594);/* 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])}},67198:function(e,t,r){"use strict";r.d(t,{v:()=>a});/* import */var n=r(41594);/* 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}}},91612:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(41594);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(4892);/* import */var o=r(51298);/**
 * 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 */.O9)(e)){return true}var[r,n]=(e===null||e===void 0?void 0:e.split("."))||[];if(!(0,o/* .isDefined */.O9)(r)||!(0,o/* .isDefined */.O9)(n)){return true}var i=a/* .tutorConfig */.P===null||a/* .tutorConfig */.P===void 0?void 0:(t=a/* .tutorConfig.visibility_control */.P.visibility_control)===null||t===void 0?void 0:t[r];if(!i){return true}var s=a/* .tutorConfig.current_user.roles */.P.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])};/* export default */const u=s},35198:function(e,t,r){"use strict";r.d(t,{A:()=>g});/* import */var n=r(84577);/* import */var i=r(2445);/* import */var a=r(17437);/* import */var o=r(95729);/* import */var s=r(10840);/* import */var u=r(47617);/* import */var l=r(94654);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 */.zA.BOTTOM,triggerRef:n,isOpen:a,gap:s,maxWidth:c,closePopover:d,closeOnEscape:f=true,animationType:p=u/* .AnimationType.slideLeft */.J6.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 */.tP)({triggerRef:n,isOpen:a,autoAdjustOverflow:v,placement:r,arrow:h,gap:s,positionModifier:g,dependencies:b});return/*#__PURE__*/(0,i/* .jsx */.Y)(l/* .Portal */.ZL,{isOpen:a,onClickOutside:d,animationType:p,onEscape:f?d:undefined,children:/*#__PURE__*/(0,i/* .jsx */.Y)("div",{css:m.wrapper({placement:o/* .isRTL */.V8?(0,l/* .getMirroredPlacement */.ym)(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 */.Y)("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 */.AH)("position:absolute;width:100%;z-index:",s/* .zIndex.dropdown */.fE.dropdown,";&::before{",t&&!r?(0,a/* .css */.AH)(h(),t.startsWith("top")&&(0,a/* .css */.AH)(c(),s/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("bottom")&&(0,a/* .css */.AH)(d(),s/* .colorTokens.stroke.white */.I6.stroke.white,n!==undefined?"".concat(n,"px"):"50%",n===undefined?"translateX(-50%)":"none"),t.startsWith("left")&&(0,a/* .css */.AH)(f(),s/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none"),t.startsWith("right")&&(0,a/* .css */.AH)(p(),s/* .colorTokens.stroke.white */.I6.stroke.white,i!==undefined?"".concat(i,"px"):"50%",i===undefined?"translateY(-50%)":"none")):"","}")},content:/*#__PURE__*/(0,a/* .css */.AH)("background-color:",s/* .colorTokens.background.white */.I6.background.white,";box-shadow:",s/* .shadow.popover */.r7.popover,";border-radius:",s/* .borderRadius["6"] */.Vq["6"],";::-webkit-scrollbar{background-color:",s/* .colorTokens.background.white */.I6.background.white,";width:10px;}::-webkit-scrollbar-thumb{background-color:",s/* .colorTokens.action.secondary["default"] */.I6.action.secondary["default"],";border-radius:",s/* .borderRadius["6"] */.Vq["6"],";}")};/* export default */const g=v},36512:function(e,t,r){"use strict";r.d(t,{At:()=>w,MZ:()=>x,R8:()=>d,TF:()=>v,_8:()=>C,ah:()=>y,cj:()=>g,dK:()=>R,lM:()=>S,rR:()=>k,wt:()=>p});/* import */var n=r(71893);/* import */var i=r(94747);/* import */var a=r(97665);/* import */var o=r(45549);/* import */var s=r(53127);/* import */var u=r(37381);/* import */var l=r(85713);var c=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_AI_IMAGE */.A.GENERATE_AI_IMAGE,e)};var d=()=>{return(0,i/* .useMutation */.n)({mutationFn:c})};var f=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_FILL_AI_IMAGE */.A.MAGIC_FILL_AI_IMAGE,e).then(e=>e.data.data[0].b64_json)};var p=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:f,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var h=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_TEXT_GENERATION */.A.MAGIC_TEXT_GENERATION,e)};var v=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:h,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var m=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].MAGIC_AI_MODIFY_CONTENT */.A.MAGIC_AI_MODIFY_CONTENT,e)};var g=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:m,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var b=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].USE_AI_GENERATED_IMAGE */.A.USE_AI_GENERATED_IMAGE,e)};var y=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:b,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var _=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_CONTENT */.A.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var w=e=>{var{showToast:t}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationKey:["GenerateCourseContent",e],mutationFn:_,onError:e=>{t({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(e)})}})};var A=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_CONTENT */.A.GENERATE_COURSE_CONTENT,e,{signal:e.signal})};var x=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:A,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var E=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_COURSE_TOPIC_CONTENT */.A.GENERATE_COURSE_TOPIC_CONTENT,e,{signal:e.signal})};var S=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:E,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var O=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].SAVE_AI_GENERATED_COURSE_CONTENT */.A.SAVE_AI_GENERATED_COURSE_CONTENT,e)};var k=()=>{var{showToast:e}=(0,o/* .useToast */.d)();var t=(0,a/* .useQueryClient */.jE)();return(0,i/* .useMutation */.n)({mutationFn:O,onSuccess(){t.invalidateQueries({queryKey:["CourseDetails"]})},onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var T=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].GENERATE_QUIZ_QUESTIONS */.A.GENERATE_QUIZ_QUESTIONS,e,{signal:e.signal})};var C=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:T,onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})};var I=e=>{return s/* .wpAjaxInstance.post */.b.post(u/* ["default"].OPEN_AI_SAVE_SETTINGS */.A.OPEN_AI_SAVE_SETTINGS,(0,n._)({},e))};var R=()=>{var{showToast:e}=(0,o/* .useToast */.d)();return(0,i/* .useMutation */.n)({mutationFn:I,onSuccess:t=>{e({type:"success",message:t.message})},onError:t=>{e({type:"danger",message:(0,l/* .convertToErrorMessage */.EL)(t)})}})}},53127:function(e,t,r){"use strict";r.d(t,{b:()=>c,v:()=>l});/* import */var n=r(71893);/* import */var i=r(55456);/* import */var a=r(57536);/* import */var o=r(4892);/* import */var s=r(47186);/* import */var u=r(62301);a/* ["default"].defaults.paramsSerializer */.A.defaults.paramsSerializer=e=>{return s.stringify(e)};var l=a/* ["default"].create */.A.create({baseURL:o/* ["default"].WP_API_BASE_URL */.A.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 */.P.wp_rest_nonce;if(e.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())){if(e.data){e.data=(0,u/* .convertToFormData */.jW)(e.data,e.method)}if(["put","patch"].includes(e.method.toLowerCase())){e.method="POST"}}if(e.params){e.params=(0,u/* .serializeParams */.hD)(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 */.A.create({baseURL:o/* ["default"].WP_AJAX_BASE_URL */.A.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 */.hD)(e.params)}(r=e).data||(r.data={});var a=o/* .tutorConfig.nonce_key */.P.nonce_key;var s=o/* .tutorConfig._tutor_nonce */.P._tutor_nonce;e.data=(0,i._)((0,n._)({},e.data,e.params),{action:e.url,[a]:s});e.data=(0,u/* .convertToFormData */.jW)(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))},63939:function(e,t,r){"use strict";r.d(t,{s:()=>a});/* import */var n=r(51298);/* import */var i=r(85713);var a=(e,t)=>{return r=>{var{variants:a,defaultVariants:o}=e;var s=[];if((0,n/* .isDefined */.O9)(t)){s.push(t)}var u=(0,i/* .getObjectKeys */.Co)(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 */.O9));return s}}},37381:function(e,t,r){"use strict";r.d(t,{A:()=>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"};/* export default */const i=n},62301:function(e,t,r){"use strict";r.d(t,{hD:()=>c,jW:()=>l});/* import */var n=r(85713);/* import */var i=r(51298);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 */.$X)(e)||(0,i/* .isString */.Kg)(e)){a.append("".concat(t,"[").concat(r,"]"),e)}else if((0,i/* .isBoolean */.Lm)(e)||(0,i/* .isNumber */.Et)(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 */.$X)(r)||(0,i/* .isString */.Kg)(r)){a.append(t,r)}else if((0,i/* .isBoolean */.Lm)(r)){a.append(t,r.toString())}else if((0,i/* .isNumber */.Et)(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 */.O9)(n)){t[r]="null"}else if((0,i/* .isBoolean */.Lm)(n)){t[r]=n===true?"true":"false"}else{t[r]=n}}return t}},36154:function(e,t,r){"use strict";r.d(t,{v:()=>c,x:()=>d});/* import */var n=r(84577);/* import */var i=r(10840);/* import */var a=r(17437);/* import */var o=r(24219);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 */.AH)("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 */.mw.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 */.AH)("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 */.AH)("display:flex;justify-content:center;align-items:center;flex-direction:row;",e==="column"&&(0,a/* .css */.AH)(s()))},boxReset:/*#__PURE__*/(0,a/* .css */.AH)("padding:0;"),ulReset:/*#__PURE__*/(0,a/* .css */.AH)("list-style:none;padding:0;margin:0;"),resetButton:/*#__PURE__*/(0,a/* .css */.AH)("background:none;border:none;outline:none;box-shadow:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.mw.inter,";cursor:pointer;"),cardInnerSection:/*#__PURE__*/(0,a/* .css */.AH)("padding:",i/* .spacing["20"] */.YK["20"]," ",i/* .spacing["20"] */.YK["20"]," ",i/* .spacing["24"] */.YK["24"]," ",i/* .spacing["20"] */.YK["20"],";display:flex;flex-direction:column;gap:",i/* .spacing["24"] */.YK["24"],";"),fieldGroups:e=>/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;gap:",i/* .spacing */.YK[e],";"),titleAliasWrapper:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;gap:",i/* .spacing["12"] */.YK["12"],";"),inlineSwitch:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;justify-content:space-between;align-items:center;"),overflowYAuto:/*#__PURE__*/(0,a/* .css */.AH)("overflow-y:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",i/* .colorTokens.primary["40"] */.I6.primary["40"],";width:3px;}::-webkit-scrollbar-thumb{background-color:",i/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",i/* .borderRadius["30"] */.Vq["30"],";}"),overflowXAuto:/*#__PURE__*/(0,a/* .css */.AH)("overflow-x:auto;scrollbar-gutter:stable;::-webkit-scrollbar{background-color:",i/* .colorTokens.primary["40"] */.I6.primary["40"],";height:3px;}::-webkit-scrollbar-thumb{background-color:",i/* .colorTokens.design.brand */.I6.design.brand,";border-radius:",i/* .borderRadius["30"] */.Vq["30"],";}"),textEllipsis:/*#__PURE__*/(0,a/* .css */.AH)("text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),container:/*#__PURE__*/(0,a/* .css */.AH)("width:",i/* .containerMaxWidth */.iL,"px;margin:0 auto;"),display:{flex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:",e,";")},inlineFlex:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"row";return/*#__PURE__*/(0,a/* .css */.AH)("display:inline-flex;flex-direction:",e,";")},none:/*#__PURE__*/(0,a/* .css */.AH)("display:none;"),block:/*#__PURE__*/(0,a/* .css */.AH)("display:block;"),inlineBlock:/*#__PURE__*/(0,a/* .css */.AH)("display:inline-block;")},text:{ellipsis:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;return/*#__PURE__*/(0,a/* .css */.AH)("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 */.AH)("text-align:center;"),left:/*#__PURE__*/(0,a/* .css */.AH)("text-align:left;"),right:/*#__PURE__*/(0,a/* .css */.AH)("text-align:right;"),justify:/*#__PURE__*/(0,a/* .css */.AH)("text-align:justify;")}},inputFocus:/*#__PURE__*/(0,a/* .css */.AH)("box-shadow:none;border-color:",i/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;"),dateAndTimeWrapper:/*#__PURE__*/(0,a/* .css */.AH)("display:grid;grid-template-columns:5.5fr 4.5fr;border-radius:",i/* .borderRadius["6"] */.Vq["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"] */.Vq["6"],";pointer-events:none;z-index:1;transition:outline-color 0.2s ease-in-out;}&:focus-within::before{outline-color:",i/* .colorTokens.stroke.brand */.I6.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 */.AH)("font-size:",i/* .fontSize["18"] */.J["18"],";color:",i/* .colorTokens.icon.subdued */.I6.icon.subdued,";"),crossButton:/*#__PURE__*/(0,a/* .css */.AH)("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 */.Vq.circle,";background:",i/* .colorTokens.background.white */.I6.background.white,";transition:opacity 0.3s ease-in-out;svg{color:",i/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;}:hover{svg{color:",i/* .colorTokens.icon.hover */.I6.icon.hover,";}}:focus{box-shadow:",i/* .shadow.focus */.r7.focus,";}"),aiGradientText:/*#__PURE__*/(0,a/* .css */.AH)("background:",i/* .colorTokens.text.ai.gradient */.I6.text.ai.gradient,";background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;"),actionButton:/*#__PURE__*/(0,a/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;color:",i/* .colorTokens.icon["default"] */.I6.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 */.I6.icon.brand,";}:disabled{color:",i/* .colorTokens.icon.disable.background */.I6.icon.disable.background,";cursor:not-allowed;}:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;border-radius:",i/* .borderRadius["2"] */.Vq["2"],";}"),backButton:/*#__PURE__*/(0,a/* .css */.AH)("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 */.I6.border.neutral,";border-radius:",i/* .borderRadius["4"] */.Vq["4"],";outline:none;color:",i/* .colorTokens.icon["default"] */.I6.icon["default"],";transition:color 0.3s ease-in-out;cursor:pointer;:hover{color:",i/* .colorTokens.icon.hover */.I6.icon.hover,";}&:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}"),optionCheckButton:/*#__PURE__*/(0,a/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.mw.inter,";cursor:pointer;height:32px;width:32px;border-radius:",i/* .borderRadius.circle */.Vq.circle,";opacity:0;:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.stroke.brand,";}"),optionCounter:e=>{var{isEditing:t,isSelected:r=false}=e;return/*#__PURE__*/(0,a/* .css */.AH)("height:",i/* .spacing["24"] */.YK["24"],";width:",i/* .spacing["24"] */.YK["24"],";border-radius:",i/* .borderRadius.min */.Vq.min,";",o/* .typography.caption */.I.caption("medium"),";color:",i/* .colorTokens.text.subdued */.I6.text.subdued,";background-color:",i/* .colorTokens.background["default"] */.I6.background["default"],";text-align:center;",r&&!t&&(0,a/* .css */.AH)(u(),i/* .colorTokens.bg.white */.I6.bg.white))},optionDragButton:e=>{var{isOverlay:t}=e;return/*#__PURE__*/(0,a/* .css */.AH)("background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.mw.inter,";cursor:grab;display:flex;align-items:center;justify-content:center;transform:rotate(90deg);color:",i/* .colorTokens.icon["default"] */.I6.icon["default"],";cursor:grab;place-self:center center;border-radius:",i/* .borderRadius["2"] */.Vq["2"],";&:focus,&:active,&:hover{background:none;color:",i/* .colorTokens.icon["default"] */.I6.icon["default"],";}:focus-visible{outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.stroke.brand,";outline-offset:1px;}",t&&(0,a/* .css */.AH)(l()))},optionInputWrapper:/*#__PURE__*/(0,a/* .css */.AH)("display:flex;flex-direction:column;width:100%;gap:",i/* .spacing["12"] */.YK["12"],";input,textarea{background:none;border:none;outline:none;padding:0;margin:0;text-align:inherit;font-family:",i/* .fontFamily.inter */.mw.inter,";",o/* .typography.caption */.I.caption(),";flex:1;color:",i/* .colorTokens.text.subdued */.I6.text.subdued,";padding:",i/* .spacing["4"] */.YK["4"]," ",i/* .spacing["10"] */.YK["10"],";border:1px solid ",i/* .colorTokens.stroke["default"] */.I6.stroke["default"],";border-radius:",i/* .borderRadius["6"] */.Vq["6"],";resize:vertical;cursor:text;&:focus{box-shadow:none;border-color:",i/* .colorTokens.stroke["default"] */.I6.stroke["default"],";outline:2px solid ",i/* .colorTokens.stroke.brand */.I6.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 */.AH)("object-fit:",e,";object-position:",t,";")},inputClearButton:/*#__PURE__*/(0,a/* .css */.AH)("position:absolute;top:50%;right:",i/* .spacing["4"] */.YK["4"],";transform:translateY(-50%);background-color:",i/* .colorTokens.background.white */.I6.background.white,";border-radius:",i/* .borderRadius["2"] */.Vq["2"],";&:not(:disabled):not([aria-disabled='true']):hover,&:not(:disabled):not([aria-disabled='true']):focus{background-color:",i/* .colorTokens.background.hover */.I6.background.hover,";}")}},51298:function(e,t,r){"use strict";r.d(t,{Et:()=>l,Gv:()=>d,Kg:()=>o,Lm:()=>c,O9:()=>a,cW:()=>f});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"}},85713:function(e,t,r){"use strict";// EXPORTS
r.d(t,{jT:()=>/* binding */el,Co:()=>/* binding */$,dn:()=>/* binding */Z,Ui:()=>/* binding */Q,$X:()=>/* binding */k,Ak:()=>/* binding */C,qz:()=>/* binding */es,g1:()=>/* binding */ee,lQ:()=>/* binding */E,uu:()=>/* binding */ef,q9:()=>/* binding */ea,EW:()=>/* binding */et,TW:()=>/* binding */q,y1:()=>/* binding */S,ww:()=>/* binding */F,EL:()=>/* binding */en,dS:()=>/* binding */P,Gl:()=>/* binding */W,DE:()=>/* binding */eu,tw:()=>/* binding */D,G0:()=>/* binding */H,nF:()=>/* binding */V,GR:()=>/* binding */eo,oj:()=>/* binding */Y,lW:()=>/* binding */er,_r:()=>/* binding */ei,z3:()=>/* binding */z});// UNUSED EXPORTS: formatSeconds, wait, getObjectEntries, assertIsDefined, makeFirstCharacterUpperCase, arrayIntersect, getValueInArray, extractIdOnly, mapInBetween, generateCouponCode, formatSubscriptionRepeatUnit, transformParams, objectToQueryParams, formatReadAbleBytesToBytes, hasDuplicateEntries, arrayRange
// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_async_to_generator.js
var n=r(41374);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread.js
var i=r(71893);// EXTERNAL MODULE: ./node_modules/@swc/helpers/esm/_object_spread_props.js
var a=r(55456);// EXTERNAL MODULE: external "wp.i18n"
var o=r(12470);// EXTERNAL MODULE: ./node_modules/date-fns/esm/addMinutes/index.js
var s=r(92890);// EXTERNAL MODULE: ./node_modules/date-fns/esm/format/index.js
var u=r(53429);// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js
const l=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);/* export default */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}/* export default */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)}/* export default */const y=b;// EXTERNAL MODULE: ./assets/react/v3/shared/config/config.ts
var _=r(4892);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var w=r(95729);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/types.ts
var A=r(51298);// CONCATENATED MODULE: ./assets/react/v3/shared/utils/util.ts
function x(e,t){if(e===undefined||e===null){throw new Error(t)}}var E=()=>{};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 I=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 R=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 D=(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 M=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 F=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=F(e,n.id,r);return[...t,(0,a._)((0,i._)({},n),{children:o})]},[])};var Y=(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 L=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 H=(e,t)=>Math.floor(Math.random()*(t-e))+e;var N=(e,t,r,n,i)=>{return(e-t)*(i-n)/(r-t)+n};var j=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 B=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 K=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 V=(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 W=e=>{return JSON.parse(e)};var G=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 $=e=>{if(!(0,A/* .isDefined */.O9)(e)||!(0,A/* .isObject */.Gv)(e)){return[]}return Object.keys(e)};var Q=e=>{return Object.values(e)};var X=e=>{return Object.entries(e)};function J(e){var t=new URLSearchParams;for(var r in e){if(r in e){t.append(r,e[r])}}return t.toString()}var Z=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w/* .DateFormats.yearMonthDayHourMinuteSecond24H */.UA.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 */.P.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}}},6192:function(e,t,r){"use strict";r.d(t,{Kh:()=>l,WN:()=>o,XA:()=>d,wA:()=>c});/* import */var n=r(12470);/* import */var i=/*#__PURE__*/r.n(n);/* import */var a=r(86828);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}},41594:function(e){"use strict";e.exports=React},75206:function(e){"use strict";e.exports=ReactDOM},12470:function(e){"use strict";e.exports=wp.i18n},82284:function(e,t,r){"use strict";r.d(t,{A:()=>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)}},7230:function(e,t,r){"use strict";r.d(t,{IO:()=>w,LU:()=>u,MS:()=>n,Sv:()=>g,XZ:()=>s,YK:()=>o,j:()=>a,vd:()=>i,yE:()=>d});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"},35095:function(e,t,r){"use strict";r.d(t,{MY:()=>a,r1:()=>i});/* import */var n=r(30735);/**
 * @param {function[]} collection
 * @return {function}
 */function i(e){var t=(0,n/* .sizeof */.FK)(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}}})})}}},27292:function(e,t,r){"use strict";r.d(t,{wE:()=>o});/* import */var n=r(7230);/* import */var i=r(30735);/* import */var a=r(65070);/**
 * @param {string} value
 * @return {object[]}
 */function o(e){return(0,a/* .dealloc */.VF)(s("",null,null,null,[""],e=(0,a/* .alloc */.c4)(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 A=1;var x=1;var E=0;var S="";var O=o;var k=d;var T=n;var C=S;while(A)switch(_=E,E=(0,a/* .next */.K2)()){// (
case 40:if(_!=108&&(0,i/* .charat */.wN)(C,g-1)==58){if((0,i/* .indexof */.K5)(C+=(0,i/* .replace */.HC)((0,a/* .delimit */.Tb)(E),"&","&\f"),"&\f")!=-1)x=-1;break}// " ' [
case 34:case 39:case 91:C+=(0,a/* .delimit */.Tb)(E);break;// \t \n \r \s
case 9:case 10:case 13:case 32:C+=(0,a/* .whitespace */.mw)(_);break;// \
case 92:C+=(0,a/* .escaping */.Nc)((0,a/* .caret */.OW)()-1,7);continue;// /
case 47:switch((0,a/* .peek */.se)()){case 42:case 47:;(0,i/* .append */.BC)(l((0,a/* .commenter */.nf)((0,a/* .next */.K2)(),(0,a/* .caret */.OW)()),t,r),h);break;default:C+="/"}break;// {
case 123*w:p[v++]=(0,i/* .strlen */.b2)(C)*x;// } ; \0
case 125*w:case 59:case 0:switch(E){// \0 }
case 0:case 125:A=0;// ;
case 59+m:if(x==-1)C=(0,i/* .replace */.HC)(C,/\f/g,"");if(y>0&&(0,i/* .strlen */.b2)(C)-g)(0,i/* .append */.BC)(y>32?c(C+";",n,r,g-1):c((0,i/* .replace */.HC)(C," ","")+";",n,r,g-2),h);break;// @ ;
case 59:C+=";";// { rule/at-rule
default:;(0,i/* .append */.BC)(T=u(C,t,r,v,m,o,p,S,O=[],k=[],g),d);if(E===123)if(m===0)s(C,t,T,T,O,d,g,p,k);else switch(b===99&&(0,i/* .charat */.wN)(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 */.BC)(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=x=1,S=C="",g=f;break;// :
case 58:g=1+(0,i/* .strlen */.b2)(C),y=_;default:if(w<1){if(E==123)--w;else if(E==125&&w++==0&&(0,a/* .prev */.YL)()==125)continue}switch(C+=(0,i/* .from */.HT)(E),E*w){// &
case 38:x=m>0?1:(C+="\f",-1);break;// ,
case 44:p[v++]=((0,i/* .strlen */.b2)(C)-1)*x,x=1;break;// @
case 64:// -
if((0,a/* .peek */.se)()===45)C+=(0,a/* .delimit */.Tb)((0,a/* .next */.K2)());b=(0,a/* .peek */.se)(),m=g=(0,i/* .strlen */.b2)(S=C+=(0,a/* .identifier */.Cv)((0,a/* .caret */.OW)())),E++;break;// -
case 45:if(_===45&&(0,i/* .strlen */.b2)(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 */.FK)(v);for(var g=0,b=0,y=0;g<o;++g)for(var _=0,w=(0,i/* .substr */.c1)(e,h+1,h=(0,i/* .abs */.tn)(b=l[g])),A=e;_<m;++_)if(A=(0,i/* .trim */.Bq)(b>0?v[_]+" "+w:(0,i/* .replace */.HC)(w,/&\f/g,v[_])))d[y++]=A;return(0,a/* .node */.rH)(e,t,r,s===0?n/* .RULESET */.XZ:c,d,f,p)}/**
 * @param {number} value
 * @param {object} root
 * @param {object?} parent
 * @return {object}
 */function l(e,t,r){return(0,a/* .node */.rH)(e,t,r,n/* .COMMENT */.YK,(0,i/* .from */.HT)((0,a/* .char */.Tp)()),(0,i/* .substr */.c1)(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 */.rH)(e,t,r,n/* .DECLARATION */.LU,(0,i/* .substr */.c1)(e,0,o),(0,i/* .substr */.c1)(e,o+1,-1),o)}},97467:function(e,t,r){"use strict";r.d(t,{A:()=>o,l:()=>a});/* import */var n=r(7230);/* import */var i=r(30735);/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function a(e,t){var r="";var n=(0,i/* .sizeof */.FK)(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 */.IO:if(e.children.length)break;case n/* .IMPORT */.yE:case n/* .DECLARATION */.LU:return e.return=e.return||e.value;case n/* .COMMENT */.YK:return"";case n/* .KEYFRAMES */.Sv:return e.return=e.value+"{"+a(e.children,o)+"}";case n/* .RULESET */.XZ:e.value=e.props.join(",")}return(0,i/* .strlen */.b2)(r=a(e.children,o))?e.return=e.value+"{"+r+"}":""}},65070:function(e,t,r){"use strict";r.d(t,{C:()=>d,Cv:()=>T,G1:()=>s,K2:()=>h,Nc:()=>S,OW:()=>m,Sh:()=>b,Tb:()=>w,Tp:()=>f,VF:()=>_,YL:()=>p,c4:()=>y,di:()=>g,mw:()=>x,nf:()=>k,rH:()=>c,se:()=>v});/* import */var n=r(30735);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 */.kp)(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 */.wN)(l,--s):0;if(a--,u===10)a=1,i--;return u}/**
 * @return {number}
 */function h(){u=s<o?(0,n/* .charat */.wN)(l,s++):0;if(a++,u===10)a=1,i++;return u}/**
 * @return {number}
 */function v(){return(0,n/* .charat */.wN)(l,s)}/**
 * @return {number}
 */function m(){return s}/**
 * @param {number} begin
 * @param {number} end
 * @return {string}
 */function g(e,t){return(0,n/* .substr */.c1)(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 */.b2)(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 */.Bq)(g(s-1,O(e===91?e+2:e===40?e+1:e)))}/**
 * @param {string} value
 * @return {string[]}
 */function A(e){return _(E(y(e)))}/**
 * @param {number} type
 * @return {string}
 */function x(e){while(u=v())if(u<33)h();else break;return b(e)>2||b(u)>3?"":" "}/**
 * @param {string[]} children
 * @return {string[]}
 */function E(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 */.HT)(e===47?e:h())}/**
 * @param {number} index
 * @return {string}
 */function T(e){while(!b(v()))h();return g(e,s)}},30735:function(e,t,r){"use strict";r.d(t,{BC:()=>v,Bq:()=>s,FK:()=>h,HC:()=>l,HT:()=>i,K5:()=>c,YW:()=>u,b2:()=>p,c1:()=>f,kg:()=>m,kp:()=>a,tW:()=>o,tn:()=>n,wN:()=>d});/**
 * @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("")}},59157:function(e,t,r){"use strict";r.d(t,{$s:()=>h,Ao:()=>s,De:()=>x,SJ:()=>g,nm:()=>l,pS:()=>f,rf:()=>d,uX:()=>u});/* import */var n=r(42089);/* import */var i=r(41594);// 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 */.OX)(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 */.kx)({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 */.kx)({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 */.FI)(this.source,(r,i)=>{if(o(r)){t[i]=r.getValue(e)}else if((0,n/* .hasFluidValue */.at)(r)){t[i]=(0,n/* .getFluidValue */.oq)(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 */.__)(this.payload,e=>e.reset())}}/** Create a payload set. */_makePayload(e){if(e){const t=/* @__PURE__ */new Set;(0,n/* .eachProp */.FI)(e,this._addToPayload,t);return Array.from(t)}}/** Add to a payload set. */_addToPayload(e){if(p.dependencies&&(0,n/* .hasFluidValue */.at)(e)){p.dependencies.add(e)}const t=l(e);if(t){(0,n/* .each */.__)(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 */.$7)(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 */.$7)(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 */.CH)();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 */.Es)(()=>{h.current=p;(0,n/* .each */.__)(c,e=>(0,n/* .addFluidObserver */.Ec)(e,p));return()=>{if(h.current){(0,n/* .each */.__)(h.current.deps,e=>(0,n/* .removeFluidObserver */.DV)(e,h.current));n/* .raf.cancel */.er.cancel(h.current.update)}}});(0,i.useEffect)(f,[]);(0,n/* .useOnce */.H5)(()=>()=>{const e=h.current;(0,n/* .each */.__)(e.deps,t=>(0,n/* .removeFluidObserver */.DV)(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 */.er.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 A=Symbol.for("AnimatedComponent");var x=(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=E(e)||"Anonymous";if(n.is.str(e)){e=o[e]||(o[e]=b(e,a))}else{e=e[A]||(e[A]=b(e,a))}e.displayName=`Animated(${t})`;return e};(0,n/* .eachProp */.FI)(e,(t,r)=>{if(n.is.arr(e)){r=E(t)}o[r]=o(t)});return{animated:o}};var E=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
},78309:function(e,t,r){"use strict";r.d(t,{RV:()=>/* reexport safe */n.RV,le:()=>/* reexport safe */n.le,pn:()=>eS,zh:()=>e_});/* import */var n=r(42089);/* import */var i=r(41594);/* import */var a=r(59157);// 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 */.$r)(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 */.FI)(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 */.FI)(e,(e,n)=>n in t||(r[n]=e));return r}return{...e}}function m(e){e=(0,n/* .getFluidValue */.oq)(e);return n.is.arr(e)?e.map(m):(0,n/* .isAnimatedString */.$7)(e)?n/* .Globals.createStringInterpolator */.RV.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 A={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 x={...A.default,mass:1,damping:1,easing:n/* .easings.linear */.le.linear,clamp:false};var E=class{constructor(){/**
     * The initial velocity of one or more values.
     *
     * @default 0
     */this.velocity=0;Object.assign(this,x)}};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 x){if(e[t]==null){e[t]=x[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 E;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 */.er.now()}function v(){if(d>0&&!n/* .Globals.skipAnimation */.RV.skipAnimation){a.delayed=true;f=n/* .raf.setTimeout */.er.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 I=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?P(e.get()):t.every(e=>e.noop)?R(e.get()):D(e.get(),t.every(e=>e.finished));var R=e=>({value:e,noop:true,finished:true,cancelled:false});var D=(e,t,r=false)=>({value:e,finished:t,cancelled:r});var P=e=>({value:e,cancelled:true,finished:false});// src/runAsync.ts
function M(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&&D(i,false);if(t){e.result=t;p(e);throw e}};const m=(e,t)=>{const o=new Y;const s=new L;return(async()=>{if(n/* .Globals.skipAnimation */.RV.skipAnimation){F(r);s.result=D(i,false);p(s);throw s}v(o);const u=n.is.obj(e)?{...e}:{...t,to:e};u.parentId=a;(0,n/* .eachProp */.FI)(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 */.RV.skipAnimation){F(r);return D(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=D(i.get(),true,false)}catch(e){if(e instanceof Y){g=e.result}else if(e instanceof L){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 */.er.batchedUpdates(()=>{s(g,i,i.item)})}return g})()}function F(e,t){(0,n/* .flush */.bX)(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 Y=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 L=class extends Error{constructor(){super("SkipAnimationSignal")}};// src/FrameValue.ts
var H=e=>e instanceof j;var N=1;var j=class extends n/* .FluidValue */.aq{constructor(){super(...arguments);this.id=N++;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 */.Ao)(this);return e&&e.getValue()}/** Create a spring that maps our value to another value */to(...e){return n/* .Globals.to */.RV.to(this,e)}/** @deprecated Use the `to` method instead. */interpolate(...e){(0,n/* .deprecateInterpolate */.ZJ)();return n/* .Globals.to */.RV.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 */.MI)(this,{type:"change",parent:this,value:e,idle:t})}/** Tell our children about our new priority */_onPriorityChange(e){if(!this.idle){n/* .frameLoop.sort */.WU.sort(this)}(0,n/* .callFluidObservers */.MI)(this,{type:"priority",parent:this,priority:e})}};// src/SpringPhase.ts
var U=Symbol.for("SpringPhase");var B=1;var z=2;var K=4;var q=e=>(e[U]&B)>0;var V=e=>(e[U]&z)>0;var W=e=>(e[U]&K)>0;var G=(e,t)=>t?e[U]|=z|B:e[U]&=~z;var $=(e,t)=>t?e[U]|=K:e[U]&=~K;// src/SpringValue.ts
var Q=class extends j{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!(V(this)||this._state.asyncTo)||W(this)}get goal(){return(0,n/* .getFluidValue */.oq)(this.animation.to)}get velocity(){const e=(0,a/* .getAnimated */.Ao)(this);return e instanceof a/* .AnimatedValue */.rf?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 V(this)}/**
   * When true, all current and future animations are paused.
   */get isPaused(){return W(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 */.nm)(i.to);if(!u&&(0,n/* .hasFluidValue */.at)(i.to)){o=(0,n/* .toArray */.$r)((0,n/* .getFluidValue */.oq)(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 */.pS?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 */.Ao)(this);const c=l.getValue();if(t){const e=(0,n/* .getFluidValue */.oq)(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 */.er.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(V(this)){const{to:e,config:t}=this.animation;n/* .raf.batchedUpdates */.er.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=>I(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());F(this._state,e&&this._lastCallId);n/* .raf.batchedUpdates */.er.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 */.oq)(i);if(!n.is.und(i)){this._set(i)}else if(!(0,a/* .getAnimated */.Ao)(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(!W(this)){$(this,true);(0,n/* .flushCalls */.Wd)(o.pauseQueue);ei(this,"onPause",D(this,X(this,this.animation.to)),this)}},resume:()=>{if(W(this)){$(this,false);if(V(this)){this._resume()}(0,n/* .flushCalls */.Wd)(o.resumeQueue);ei(this,"onResume",D(this,X(this,this.animation.to)),this)}},start:this._merge.bind(this,a)}}).then(r=>{if(e.loop&&r.finished&&!(t&&r.noop)){const t=J(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 */.n4)(v,p);if(g){d.from=v}v=(0,n/* .getFluidValue */.oq)(v);const y=!(0,n/* .isEqual */.n4)(h,f);if(y){this._focus(h)}const _=b(t.to);const{config:w}=d;const{decay:A,velocity:x}=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 E=(0,a/* .getAnimated */.Ao)(this);if(!E||n.is.und(h)){return r(D(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 */.$7)(T);const I=!_&&(!C||s(c.immediate||t.immediate,l));if(y){const e=(0,a/* .getAnimatedType */.SJ)(h);if(e!==E.constructor){if(I){E=this._set(T)}else throw Error(`Cannot animate between ${E.constructor.name} and ${e.name}, as the "to" prop suggests`)}}const F=E.constructor;let Y=(0,n/* .hasFluidValue */.at)(h);let L=false;if(!Y){const e=O||!q(this)&&g;if(y||e){L=(0,n/* .isEqual */.n4)(m(k),T);Y=!L}if(!(0,n/* .isEqual */.n4)(d.immediate,I)&&!I||!(0,n/* .isEqual */.n4)(w.decay,A)||!(0,n/* .isEqual */.n4)(w.velocity,x)){Y=true}}if(L&&V(this)){if(d.changed&&!O){Y=true}else if(!Y){this._stop(f)}}if(!_){if(Y||(0,n/* .hasFluidValue */.at)(f)){d.values=E.getPayload();d.toValues=(0,n/* .hasFluidValue */.at)(h)?null:F==a/* .AnimatedString */.pS?[1]:(0,n/* .toArray */.$r)(T)}if(d.immediate!=I){d.immediate=I;if(!I&&!O){this._set(f)}}if(Y){const{onRest:e}=d;(0,n/* .each */.__)(er,e=>en(this,t,e));const i=D(this,X(this,f));(0,n/* .flushCalls */.Wd)(this._pendingCalls,i);this._pendingCalls.add(r);if(d.changed)n/* .raf.batchedUpdates */.er.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(M(t.to,t,this._state,this))}else if(Y){this._start()}else if(V(this)&&!y){this._pendingCalls.add(r)}else{r(R(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 */.Wg)(this)){this._detach()}t.to=e;if((0,n/* .getFluidObservers */.Wg)(this)){this._attach()}}}_attach(){let e=0;const{to:t}=this.animation;if((0,n/* .hasFluidValue */.at)(t)){(0,n/* .addFluidObserver */.Ec)(t,this);if(H(t)){e=t.priority+1}}this.priority=e}_detach(){const{to:e}=this.animation;if((0,n/* .hasFluidValue */.at)(e)){(0,n/* .removeFluidObserver */.DV)(e,this)}}/**
   * Update the current value from outside the frameloop,
   * and return the `Animated` node.
   */_set(e,t=true){const r=(0,n/* .getFluidValue */.oq)(e);if(!n.is.und(r)){const e=(0,a/* .getAnimated */.Ao)(this);if(!e||!(0,n/* .isEqual */.n4)(r,e.getValue())){const i=(0,a/* .getAnimatedType */.SJ)(r);if(!e||e.constructor!=i){(0,a/* .setAnimated */.uX)(this,i.create(r))}else{e.setValue(r)}if(e){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>{this._onChange(r,t)})}}}return(0,a/* .getAnimated */.Ao)(this)}_onStart(){const e=this.animation;if(!e.changed){e.changed=true;ei(this,"onStart",D(this,X(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 */.Ao)(this).reset((0,n/* .getFluidValue */.oq)(e.to));if(!e.immediate){e.fromValues=e.values.map(e=>e.lastPosition)}if(!V(this)){G(this,true);if(!W(this)){this._resume()}}}_resume(){if(n/* .Globals.skipAnimation */.RV.skipAnimation){this.finish()}else{n/* .frameLoop.start */.WU.start(this)}}/**
   * Exit the frameloop and notify `onRest` listeners.
   *
   * Always wrap `_stop` calls with `batchedUpdates`.
   */_stop(e,t){if(V(this)){G(this,false);const r=this.animation;(0,n/* .each */.__)(r.values,e=>{e.done=true});if(r.toValues){r.onChange=r.onPause=r.onResume=void 0}(0,n/* .callFluidObservers */.MI)(this,{type:"idle",parent:this});const i=t?P(this.get()):D(this.get(),X(this,e??r.to));(0,n/* .flushCalls */.Wd)(this._pendingCalls,i);if(r.changed){r.changed=false;ei(this,"onRest",i,this)}}}};function X(e,t){const r=m(t);const i=m(e.get());return(0,n/* .isEqual */.n4)(i,r)}function J(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 Z({...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 Z(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=Z(e);if(n.is.und(t.default)){t.default=d(t)}return t}function et(e,t){(0,n/* .eachProp */.FI)(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(Z(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 */.$r)(e).map(Z)}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 */.__)((0,n/* .toArray */.$r)(t),t=>r[t].stop(!!e))}else{F(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 */.__)((0,n/* .toArray */.$r)(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 */.__)((0,n/* .toArray */.$r)(e),e=>t[e].resume())}return this}/** Call a function once per spring value */each(e){(0,n/* .eachProp */.FI)(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 */.bX)(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 */.bX)(t,([e,t])=>{t.value=s;e(t,this,this._item)})}if(o){this._started=false;(0,n/* .flush */.bX)(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 */.er.onFrame(this._onFrame)}};function eu(e,t){return Promise.all(t.map(t=>el(e,t))).then(t=>I(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 */.__)(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 */.Wd)(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 */.lQ,resume:n/* .noop */.lQ,start(t,r){if(v){F(p,e["_lastAsyncId"]);r(P(e))}else{t.onRest=u;r(M(f,t,p,e))}}}}))}if(p.paused){await new Promise(e=>{p.resumeQueue.add(e)})}const m=I(e,await Promise.all(h));if(s&&m.finished&&!(r&&m.noop)){const r=J(t,s,a);if(r){eh(e,[r]);return el(e,r,true)}}if(c){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>c(m,e,e.item))}return m}function ec(e,t){const r={...e.springs};if(t){(0,n/* .each */.__)((0,n/* .toArray */.$r)(t),e=>{if(n.is.und(e.keys)){e=Z(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 */.FI)(t,(t,r)=>{if(!e.springs[r]){e.springs[r]=t;(0,n/* .addFluidObserver */.Ec)(t,e)}})}function ef(e,t){const r=new Q;r.key=e;if(t){(0,n/* .addFluidObserver */.Ec)(r,t)}return r}function ep(e,t,r){if(t.keys){(0,n/* .each */.__)(t.keys,n=>{const i=e[n]||(e[n]=r(n));i["_prepareNode"](t)})}}function eh(e,t){(0,n/* .each */.__)(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 */.MA)(()=>({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 */.HX)();const i=[];(0,n/* .each */.__)(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 */.__)(e,e=>e.pause(...arguments));return this};t.resume=function(){(0,n/* .each */.__)(e,e=>e.resume(...arguments));return this};t.set=function(t){(0,n/* .each */.__)(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 */.__)(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 */.__)(e,e=>e.stop(...arguments));return this};t.update=function(t){(0,n/* .each */.__)(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 */.CH)();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 */.NQ)(e)||0;(0,i.useMemo)(()=>{(0,n/* .each */.__)(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 */.NQ)(v);const b=v!==m&&g(v);(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{s.current++;l.ctrls=c.current;const{queue:e}=l;if(e.length){l.queue=[];(0,n/* .each */.__)(e,e=>e())}(0,n/* .each */.__)(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 */.H5)(()=>()=>{(0,n/* .each */.__)(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 eA=()=>useState(ew)[0];// src/hooks/useSpringValue.ts
var ex=(e,t)=>{const r=useConstant(()=>new Q(e,t));useOnce2(()=>()=>{r.stop()});return r};// src/hooks/useTrail.ts
function eE(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 */.$r)(e);const A=[];const x=(0,i.useRef)(null);const E=s?null:x.current;(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{x.current=A});(0,n/* .useOnce */.H5)(()=>{(0,n/* .each */.__)(A,e=>{b?.add(e.ctrl);e.ctrl.ref=b});return()=>{(0,n/* .each */.__)(x.current,e=>{if(e.expired){clearTimeout(e.expirationId)}y(e.ctrl,b);e.ctrl.stop(true)})}});const S=ek(w,a?a():t,E);const O=s&&x.current||[];(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>(0,n/* .each */.__)(O,({ctrl:e,item:t,key:r})=>{y(e,b);o(p,t,r)}));const k=[];if(E)(0,n/* .each */.__)(E,(e,t)=>{if(e.expired){clearTimeout(e.expirationId);O.push(e)}else{t=k[t]=S.indexOf(e.key);if(~t)A[t]=e}});(0,n/* .each */.__)(w,(e,t)=>{if(!A[t]){A[t]={key:S[t],item:e,phase:"mount"/* MOUNT */,ctrl:new es};A[t].ctrl.item=e}});if(k.length){let e=-1;const{leave:r}=a?a():t;(0,n/* .each */.__)(k,(t,n)=>{const i=E[n];if(~t){e=A.indexOf(i);A[e]={...i,item:w[t]}}else if(r){A.splice(++e,0,i)}})}if(n.is.fun(u)){A.sort((e,t)=>u(e.item,t.item))}let T=-l;const C=(0,n/* .useForceUpdate */.CH)();const I=d(t);const R=/* @__PURE__ */new Map;const D=(0,i.useRef)(/* @__PURE__ */new Map);const P=(0,i.useRef)(false);(0,n/* .each */.__)(A,(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||I.config;d.config=o(t,e.item,r,p)}T+=l;const b={...I,// 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)||E?i.from:i.initial;b.from=o(s,e.item,r)}const{onResolve:y}=b;b.onResolve=e=>{o(y,e);const t=x.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)){D.current.delete(r);if(f){P.current=true}C()}}};const _=ec(e.ctrl,b);if(p==="leave"/* LEAVE */&&f){D.current.set(e,{phase:p,springs:_,payload:b})}else{R.set(e,{phase:p,springs:_,payload:b})}});const M=(0,i.useContext)(ev);const F=(0,n/* .usePrev */.NQ)(M);const Y=M!==F&&g(M);(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{if(Y){(0,n/* .each */.__)(A,e=>{e.ctrl.start({default:M})})}},[M]);(0,n/* .each */.__)(R,(e,t)=>{if(D.current.size){const e=A.findIndex(e=>e.key===t.key);A.splice(e,1)}});(0,n/* .useIsomorphicLayoutEffect */.Es)(()=>{(0,n/* .each */.__)(D.current.size?D.current:R,({phase:e,payload:t},r)=>{const{ctrl:n}=r;r.phase=e;b?.add(n);if(Y&&e=="enter"/* ENTER */){n.start({default:M})}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 L=e=>/* @__PURE__ */i.createElement(i.Fragment,null,A.map((t,r)=>{const{springs:a}=R.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?[L,b]:L}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 */.$r)(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 eI=/* unused pure expression or super */null&&{any:0,all:1};function eR(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:eI[o],...l});v.observe(e);return()=>v.unobserve(e)},[c]);if(a){return[i,d]}return[i,r]}// src/components/Spring.tsx
function eD({children:e,...t}){return e(e_(t))}// src/components/Trail.tsx
function eP({items:e,children:t,...r}){const n=eE(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 eM({items:e,children:t,...r}){return eS(e,r)(t)}// src/interpolate.ts
// src/Interpolation.ts
var eF=class extends j{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 */.kx)(...t);const r=this._get();const i=(0,a/* .getAnimatedType */.SJ)(r);(0,a/* .setAnimated */.uX)(this,i.create(r))}advance(e){const t=this._get();const r=this.get();if(!(0,n/* .isEqual */.n4)(t,r)){(0,a/* .getAnimated */.Ao)(this).setValue(t);this._onChange(t,this.idle)}if(!this.idle&&eL(this._active)){eH(this)}}_get(){const e=n.is.arr(this.source)?this.source.map(n/* .getFluidValue */.oq):(0,n/* .toArray */.$r)((0,n/* .getFluidValue */.oq)(this.source));return this.calc(...e)}_start(){if(this.idle&&!eL(this._active)){this.idle=false;(0,n/* .each */.__)((0,a/* .getPayload */.nm)(this),e=>{e.done=false});if(n/* .Globals.skipAnimation */.RV.skipAnimation){n/* .raf.batchedUpdates */.er.batchedUpdates(()=>this.advance());eH(this)}else{n/* .frameLoop.start */.WU.start(this)}}}// Observe our sources only when we're observed.
_attach(){let e=1;(0,n/* .each */.__)((0,n/* .toArray */.$r)(this.source),t=>{if((0,n/* .hasFluidValue */.at)(t)){(0,n/* .addFluidObserver */.Ec)(t,this)}if(H(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 */.__)((0,n/* .toArray */.$r)(this.source),e=>{if((0,n/* .hasFluidValue */.at)(e)){(0,n/* .removeFluidObserver */.DV)(e,this)}});this._active.clear();eH(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 */.$r)(this.source).reduce((e,t)=>Math.max(e,(H(t)?t.priority:0)+1),0)}}};function eY(e){return e.idle!==false}function eL(e){return!e.size||Array.from(e).every(eY)}function eH(e){if(!e.idle){e.idle=true;(0,n/* .each */.__)((0,a/* .getPayload */.nm)(e),e=>{e.done=true});(0,n/* .callFluidObservers */.MI)(e,{type:"idle",parent:e})}}// src/interpolate.ts
var eN=(e,...t)=>new eF(e,t);var ej=(e,...t)=>(deprecateInterpolate2(),new eF(e,t));// src/globals.ts
n/* .Globals.assign */.RV.assign({createStringInterpolator:n/* .createStringInterpolator */.Rs,to:(e,t)=>new eF(e,t)});var eU=n/* .frameLoop.advance */.WU.advance;// src/index.ts
//# sourceMappingURL=react-spring_core.modern.mjs.map
},56853:function(e,t,r){"use strict";r.d(t,{e:()=>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 A=/* 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
},42089:function(e,t,r){"use strict";r.d(t,{$7:()=>ej,$r:()=>h,CH:()=>e7,DV:()=>eA,Ec:()=>ew,Es:()=>e5,FI:()=>p,H5:()=>te,HX:()=>eN,MA:()=>e8,MI:()=>eb,NQ:()=>tr,OX:()=>l,RV:()=>s,Rs:()=>eP,Tj:()=>F,WU:()=>T,Wd:()=>m,Wg:()=>em,ZJ:()=>eL,__:()=>f,aq:()=>ey,at:()=>eh,bX:()=>v,er:()=>/* reexport safe */n.e,is:()=>c,kx:()=>et,lQ:()=>u,le:()=>ed,n4:()=>d,oq:()=>ev});/* import */var n=r(56853);/* import */var i=r(41594);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:()=>x,colors:()=>_,createStringInterpolator:()=>b,skipAnimation:()=>w,to:()=>y,willAdvance:()=>A});// 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 A=u;var x=e=>{if(e.to)y=e.to;if(e.now)n/* .raf.now */.e.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 */.e.use(e.requestAnimationFrame);if(e.batchedUpdates)n/* .raf.batchedUpdates */.e.batchedUpdates=e.batchedUpdates;if(e.willAdvance)A=e.willAdvance;if(e.frameLoop)n/* .raf.frameLoop */.e.frameLoop=e.frameLoop};// src/FrameLoop.ts
var E=/* @__PURE__ */new Set;var S=[];var O=[];var k=0;var T={get idle(){return!E.size&&!S.length},/** Advance the given animation on every frame until idle. */start(e){if(k>e.priority){E.add(e);n/* .raf.onStart */.e.onStart(C)}else{I(e);(0,n/* .raf */.e)(D)}},/** Advance all animations by the given time. */advance:D,/** Call this when an animation's priority changes. */sort(e){if(k){n/* .raf.onFrame */.e.onFrame(()=>T.sort(e))}else{const t=S.indexOf(e);if(~t){S.splice(t,1);R(e)}}},/**
   * Clear all animations. For testing purposes.
   *
   * ☠️ Never call this from within the frameloop.
   */clear(){S=[];E.clear()}};function C(){E.forEach(I);E.clear();(0,n/* .raf */.e)(D)}function I(e){if(!S.includes(e))R(e)}function R(e){S.splice(P(S,t=>t.priority>e.priority),0,e)}function D(e){const t=O;for(let r=0;r<S.length;r++){const n=S[r];k=n.priority;if(!n.idle){A(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 M=(e,t,r)=>Math.min(Math.max(r,e),t);// src/colors.ts
var F={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 Y="[-+]?\\d*\\.?\\d+";var L=Y+"%";function H(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var N=new RegExp("rgb"+H(Y,Y,Y));var j=new RegExp("rgba"+H(Y,Y,Y,Y));var U=new RegExp("hsl"+H(Y,L,L));var B=new RegExp("hsla"+H(Y,L,L,Y));var z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;var K=/^#([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 V=/^#([0-9a-fA-F]{8})$/;// src/normalizeColor.ts
function W(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=N.exec(e)){return(Q(t[1])<<24|// r
Q(t[2])<<16|// g
Q(t[3])<<8|// b
255)>>>// a
0}if(t=j.exec(e)){return(Q(t[1])<<24|// r
Q(t[2])<<16|// g
Q(t[3])<<8|// b
J(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=V.exec(e))return parseInt(t[1],16)>>>0;if(t=K.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($(X(t[1]),// h
Z(t[2]),// s
Z(t[3]))|255)>>>// a
0}if(t=B.exec(e)){return($(X(t[1]),// h
Z(t[2]),// s
Z(t[3]))|J(t[4]))>>>// a
0}return null}function G(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 $(e,t,r){const n=r<.5?r*(1+t):r+t-r*t;const i=2*r-n;const a=G(i,n,e+1/3);const o=G(i,n,e);const s=G(i,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function Q(e){const t=parseInt(e,10);if(t<0)return 0;if(t>255)return 255;return t}function X(e){const t=parseFloat(e);return(t%360+360)%360/360}function J(e){const t=parseFloat(e);if(t<0)return 0;if(t>1)return 255;return Math.round(t*255)}function Z(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=W(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 M(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)=>ex(e,ef,t);function ew(e,t){if(e[ef]){let r=e[ep];if(!r){ex(e,ep,r=/* @__PURE__ */new Set)}if(!r.has(t)){r.add(t);if(e.observerAdded){e.observerAdded(r.size,t)}}}return t}function eA(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 ex=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:true,configurable:true});// src/regexs.ts
var eE=/[+\-]?(?: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(`(${eE.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]=eI(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 eI=e=>{const t=eT.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};// src/stringInterpolation.ts
var eR;var eD=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`;var eP=e=>{if(!eR)eR=_?// 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(eR,ee)});const r=t.map(e=>e.match(eE).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(eE,"");let n=0;return t[0].replace(eE,()=>`${i[n++](e)}${r||""}`).replace(ek,eD)}};// src/deprecations.ts
var eM="react-spring: ";var eF=e=>{const t=e;let r=false;if(typeof t!="function"){throw new TypeError(`${eM}once requires a function parameter`)}return(...e)=>{if(!r){t(...e);r=true}}};var eY=eF(console.warn);function eL(){eY(`${eM}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var eH=eF(console.warn);function eN(){eH(`${eM}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 ej(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 eB=/* @__PURE__ */new WeakMap;var ez=e=>e.forEach(({target:e,contentRect:t})=>{return eB.get(e)?.forEach(e=>e(t))});function eK(e,t){if(!eU){if(typeof ResizeObserver!=="undefined"){eU=new ResizeObserver(ez)}}let r=eB.get(t);if(!r){r=/* @__PURE__ */new Set;eB.set(t,r)}r.add(e);if(eU){eU.observe(t)}return()=>{const r=eB.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 eV;var eW=()=>{const e=()=>{eq.forEach(e=>e({width:window.innerWidth,height:window.innerHeight}))};window.addEventListener("resize",e);return()=>{window.removeEventListener("resize",e)}};var eG=e=>{eq.add(e);if(!eV){eV=eW()}return()=>{eq.delete(e);if(!eq.size&&eV){eV();eV=void 0}}};// src/dom-events/resize/index.ts
var e$=(e,{container:t=document.documentElement}={})=>{if(t===document.documentElement){return eG(e)}else{return eK(e,t)}};// src/progress.ts
var eQ=(e,t,r)=>t-e===0?1:(r-e)/(t-e);// src/dom-events/scroll/ScrollHandler.ts
var eX=/* unused pure expression or super */null&&{x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};var eJ=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}=eX[e];t.current=this.container[`scroll${n}`];t.scrollLength=this.container[`scroll${r}`]-this.container[`client${r}`];t.progress=eQ(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 eZ=/* @__PURE__ */new WeakMap;var e0=/* @__PURE__ */new WeakMap;var e1=/* @__PURE__ */new WeakMap;var e2=e=>e===document.documentElement?window:e;var e6=(e,{container:t=document.documentElement}={})=>{let r=e1.get(t);if(!r){r=/* @__PURE__ */new Set;e1.set(t,r)}const n=new eJ(e,t);r.add(n);if(!eZ.has(t)){const e=()=>{r?.forEach(e=>e.advance());return true};eZ.set(t,e);const n=e2(t);window.addEventListener("resize",e,{passive:true});if(t!==document.documentElement){e0.set(t,e$(e,{container:t}))}n.addEventListener("scroll",e,{passive:true})}const i=eZ.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=eZ.get(t);eZ.delete(t);if(r){e2(t).removeEventListener("scroll",r);window.removeEventListener("resize",r);e0.get(t)?.()}}};// src/hooks/useConstant.ts
function e4(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 e3=()=>{const e=(0,i.useRef)(false);e5(()=>{e.current=true;return()=>{e.current=false}},[]);return e};// src/hooks/useForceUpdate.ts
function e7(){const e=(0,i.useState)()[1];const t=e3();return()=>{if(t.current){e(Math.random())}}}// src/hooks/useMemoOne.ts
function e8(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&&e9(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 e9(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);x({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
},55787:function(e,t,r){"use strict";r.d(t,{CS:()=>x,le:()=>/* reexport safe */n.le,pn:()=>/* reexport safe */n.pn,zh:()=>/* reexport safe */n.zh});/* import */var n=r(78309);/* import */var i=r(75206);/* import */var a=r(42089);/* import */var o=r(59157);// 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 */.$s{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 */.FI)(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 */.$r)(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 */.aq{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 */.__)(this.inputs,(r,n)=>{const i=(0,a/* .getFluidValue */.oq)(r[0]);const[o,s]=this.transforms[n](a.is.arr(i)?i:r.map(a/* .getFluidValue */.oq));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 */.__)(this.inputs,e=>(0,a/* .each */.__)(e,e=>(0,a/* .hasFluidValue */.at)(e)&&(0,a/* .addFluidObserver */.Ec)(e,this)))}// Stop observing our inputs once we have no observers.
observerRemoved(e){if(e==0)(0,a/* .each */.__)(this.inputs,e=>(0,a/* .each */.__)(e,e=>(0,a/* .hasFluidValue */.at)(e)&&(0,a/* .removeFluidObserver */.DV)(e,this)))}eventObserved(e){if(e.type=="change"){this._value=null}(0,a/* .callFluidObservers */.MI)(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 */.RV.assign({batchedUpdates:i.unstable_batchedUpdates,createStringInterpolator:a/* .createStringInterpolator */.Rs,colors:a/* .colors */.Tj});var A=(0,o/* .createHost */.De)(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 x=A.animated;//# sourceMappingURL=react-spring_web.modern.mjs.map
},41374: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)})}}},50467: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}},71893:function(e,t,r){"use strict";r.d(t,{_:()=>i});/* import */var n=r(50467);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}},55456: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}},31105: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}},84577: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)}}))}},29658:function(e,t,r){"use strict";r.d(t,{m:()=>o});/* import */var n=r(66500);/* import */var i=r(24880);// src/focusManager.ts
var a=class extends n/* .Subscribable */.Q{#e;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.S$&&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
},36158:function(e,t,r){"use strict";r.d(t,{$:()=>s,s:()=>o});/* import */var n=r(26261);/* import */var i=r(71692);/* import */var a=r(58904);// src/mutation.ts
var o=class extends i/* .Removable */.k{#n;#i;#a;#o;constructor(e){super();this.#n=e.client;this.mutationId=e.mutationId;this.#a=e.mutationCache;this.#i=[];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.#i.includes(e)){this.#i.push(e);this.clearGcTimeout();this.#a.notify({type:"observerAdded",mutation:this,observer:e})}}removeObserver(e){this.#i=this.#i.filter(t=>t!==e);this.scheduleGc();this.#a.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){if(!this.#i.length){if(this.state.status==="pending"){this.scheduleGc()}else{this.#a.remove(this)}}}continue(){return this.#o?.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.#s({type:"continue"})};const r={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,a/* .createRetryer */.II)({fn:()=>{if(!this.options.mutationFn){return Promise.reject(new Error("No mutationFn found"))}return this.options.mutationFn(e,r)},onFail:(e,t)=>{this.#s({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const n=this.state.status==="pending";const i=!this.#o.canStart();try{if(n){t()}else{this.#s({type:"pending",variables:e,isPaused:i});await this.#a.config.onMutate?.(e,this,r);const t=await this.options.onMutate?.(e,r);if(t!==this.state.context){this.#s({type:"pending",context:t,variables:e,isPaused:i})}}const a=await this.#o.start();await this.#a.config.onSuccess?.(a,e,this.state.context,this,r);await this.options.onSuccess?.(a,e,this.state.context,r);await this.#a.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r);await this.options.onSettled?.(a,null,e,this.state.context,r);this.#s({type:"success",data:a});return a}catch(t){try{await this.#a.config.onError?.(t,e,this.state.context,this,r);await this.options.onError?.(t,e,this.state.context,r);await this.#a.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r);await this.options.onSettled?.(void 0,t,e,this.state.context,r);throw t}finally{this.#s({type:"error",error:t})}}finally{this.#a.runNext(this)}}#s(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 */.jG.batch(()=>{this.#i.forEach(t=>{t.onMutationUpdate(e)});this.#a.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
},61388:function(e,t,r){"use strict";r.d(t,{_:()=>s});/* import */var n=r(36158);/* import */var i=r(26261);/* import */var a=r(66500);/* import */var o=r(24880);// src/mutationObserver.ts
var s=class extends a/* .Subscribable */.Q{#n;#u=void 0;#l;#c;constructor(e,t){super();this.#n=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.#n.defaultMutationOptions(e);if(!(0,o/* .shallowEqualObjects */.f8)(this.options,t)){this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#l,observer:this})}if(t?.mutationKey&&this.options.mutationKey&&(0,o/* .hashKey */.EN)(t.mutationKey)!==(0,o/* .hashKey */.EN)(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.#n.getMutationCache().build(this.#n,this.options);this.#l.addObserver(this);return this.#l.execute(e)}#d(){const e=this.#l?.state??(0,n/* .getDefaultState */.$)();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 */.jG.batch(()=>{if(this.#c&&this.hasListeners()){const t=this.#u.variables;const r=this.#u.context;const n={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){this.#c.onSuccess?.(e.data,t,r,n);this.#c.onSettled?.(e.data,null,t,r,n)}else if(e?.type==="error"){this.#c.onError?.(e.error,t,r,n);this.#c.onSettled?.(void 0,e.error,t,r,n)}}this.listeners.forEach(e=>{e(this.#u)})})}};//# sourceMappingURL=mutationObserver.js.map
},26261:function(e,t,r){"use strict";r.d(t,{jG:()=>o});/* import */var n=r(52775);// src/notifyManager.ts
var i=n/* .systemSetTimeoutZero */.Zq;function a(){let e=[];let t=0;let r=e=>{e()};let n=e=>{e()};let a=i;const o=n=>{if(t){e.push(n)}else{a(()=>{r(n)})}};const s=()=>{const t=e;e=[];if(t.length){a(()=>{n(()=>{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=>{n=e},setScheduler:e=>{a=e}}}var o=a();//# sourceMappingURL=notifyManager.js.map
},96035:function(e,t,r){"use strict";r.d(t,{t:()=>o});/* import */var n=r(66500);/* import */var i=r(24880);// src/onlineManager.ts
var a=class extends n/* .Subscribable */.Q{#p=true;#t;#r;constructor(){super();this.#r=e=>{if(!i/* .isServer */.S$&&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
},79757:function(e,t,r){"use strict";r.d(t,{X:()=>s,k:()=>u});/* import */var n=r(24880);/* import */var i=r(26261);/* import */var a=r(58904);/* import */var o=r(71692);// src/query.ts
var s=class extends o/* .Removable */.k{#h;#v;#m;#n;#o;#g;#b;constructor(e){super();this.#b=false;this.#g=e.defaultOptions;this.setOptions(e.options);this.observers=[];this.#n=e.client;this.#m=this.#n.getQueryCache();this.queryKey=e.queryKey;this.queryHash=e.queryHash;this.#h=c(this.options);this.state=e.state??this.#h;this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(e){this.options={...this.#g,...e};this.updateGcTime(this.options.gcTime);if(this.state&&this.state.data===void 0){const e=c(this.options);if(e.data!==void 0){this.setState(l(e.data,e.dataUpdatedAt));this.#h=e}}}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle"){this.#m.remove(this)}}setData(e,t){const r=(0,n/* .replaceData */.pl)(this.state.data,e,this.options);this.#s({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual});return r}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#o?.promise;this.#o?.cancel(e);return t?t.then(n/* .noop */.lQ).catch(n/* .noop */.lQ):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 */.Eh)(e.options.enabled,this)!==false)}isDisabled(){if(this.getObserversCount()>0){return!this.isActive()}return this.options.queryFn===n/* .skipToken */.hT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){if(this.getObserversCount()>0){return this.observers.some(e=>(0,n/* .resolveStaleTime */.d2)(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 */.j3)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:false});this.#o?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:false});this.#o?.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.#o){if(this.#b){this.#o.cancel({revert:true})}else{this.#o.cancelRetry()}}this.scheduleGc()}this.#m.notify({type:"observerRemoved",query:this,observer:e})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated){this.#s({type:"invalidate"})}}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&// If the promise in the retyer is already rejected, we have to definitely
// re-start the fetch; there is a chance that the query is still in a
// pending state when that happens
this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch){this.cancel({silent:true})}else if(this.#o){this.#o.continueRetry();return this.#o.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 */.ZM)(this.options,t);const r=()=>{const e={client:this.#n,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.#n,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.#s({type:"fetch",meta:u.fetchOptions?.meta})}this.#o=(0,a/* .createRetryer */.II)({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:e=>{if(e instanceof a/* .CancelledError */.cc&&e.revert){this.setState({...this.#v,fetchStatus:"idle"})}r.abort()},onFail:(e,t)=>{this.#s({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>true});try{const e=await this.#o.start();if(e===void 0){if(false){}throw new Error(`${this.queryHash} data is undefined`)}this.setData(e);this.#m.config.onSuccess?.(e,this);this.#m.config.onSettled?.(e,this.state.error,this);return e}catch(e){if(e instanceof a/* .CancelledError */.cc){if(e.silent){return this.#o.promise}else if(e.revert){if(this.state.data===void 0){throw e}return this.state.data}}this.#s({type:"error",error:e});this.#m.config.onError?.(e,this);this.#m.config.onSettled?.(this.state.data,e,this);throw e}finally{this.scheduleGc()}}#s(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":const r={...t,...l(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};this.#v=e.manual?r:void 0;return r;case"error":const n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:true};case"setState":return{...t,...e.state}}};this.state=t(this.state);i/* .notifyManager.batch */.jG.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 */.v_)(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function l(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:false,status:"success"}}function c(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
},1651:function(e,t,r){"use strict";r.d(t,{$:()=>c});/* import */var n=r(29658);/* import */var i=r(26261);/* import */var a=r(79757);/* import */var o=r(66500);/* import */var s=r(94658);/* import */var u=r(24880);/* import */var l=r(52775);// src/queryObserver.ts
var c=class extends o/* .Subscribable */.Q{constructor(e,t){super();this.options=t;this.#n=e;this.#y=null;this.#_=(0,s/* .pendingThenable */.T)();this.bindMethods();this.setOptions(t)}#n;#w=void 0;#A=void 0;#u=void 0;#x;#E;#_;#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;#I;#R=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){this.#w.addObserver(this);if(f(this.#w,this.options)){this.#D()}else{this.updateResult()}this.#P()}}onUnsubscribe(){if(!this.hasListeners()){this.destroy()}}shouldFetchOnReconnect(){return p(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set;this.#M();this.#F();this.#w.removeObserver(this)}setOptions(e){const t=this.options;const r=this.#w;this.options=this.#n.defaultQueryOptions(e);if(this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!=="boolean"){throw new Error("Expected enabled to be a boolean or a callback that returns a boolean")}this.#Y();this.#w.setOptions(this.options);if(t._defaulted&&!(0,u/* .shallowEqualObjects */.f8)(this.options,t)){this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this})}const n=this.hasListeners();if(n&&h(this.#w,r,this.options,t)){this.#D()}this.updateResult();if(n&&(this.#w!==r||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Eh)(t.enabled,this.#w)||(0,u/* .resolveStaleTime */.d2)(this.options.staleTime,this.#w)!==(0,u/* .resolveStaleTime */.d2)(t.staleTime,this.#w))){this.#L()}const i=this.#H();if(n&&(this.#w!==r||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)!==(0,u/* .resolveEnabled */.Eh)(t.enabled,this.#w)||i!==this.#I)){this.#N(i)}}getOptimisticResult(e){const t=this.#n.getQueryCache().build(this.#n,e);const r=this.createResult(t,e);if(m(this,r)){this.#u=r;this.#E=this.options;this.#x=this.#w.state}return r}getCurrentResult(){return this.#u}trackResult(e,t){return new Proxy(e,{get:(e,r)=>{this.trackProp(r);t?.(r);if(r==="promise"){this.trackProp("data");if(!this.options.experimental_prefetchInRender&&this.#_.status==="pending"){this.#_.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))}}return Reflect.get(e,r)}})}trackProp(e){this.#R.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#n.defaultQueryOptions(e);const r=this.#n.getQueryCache().build(this.#n,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#D({...e,cancelRefetch:e.cancelRefetch??true}).then(()=>{this.updateResult();return this.#u})}#D(e){this.#Y();let t=this.#w.fetch(this.options,e);if(!e?.throwOnError){t=t.catch(u/* .noop */.lQ)}return t}#L(){this.#M();const e=(0,u/* .resolveStaleTime */.d2)(this.options.staleTime,this.#w);if(u/* .isServer */.S$||this.#u.isStale||!(0,u/* .isValidTimeout */.gn)(e)){return}const t=(0,u/* .timeUntilStale */.j3)(this.#u.dataUpdatedAt,e);const r=t+1;this.#T=l/* .timeoutManager.setTimeout */.zs.setTimeout(()=>{if(!this.#u.isStale){this.updateResult()}},r)}#H(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#w):this.options.refetchInterval)??false}#N(e){this.#F();this.#I=e;if(u/* .isServer */.S$||(0,u/* .resolveEnabled */.Eh)(this.options.enabled,this.#w)===false||!(0,u/* .isValidTimeout */.gn)(this.#I)||this.#I===0){return}this.#C=l/* .timeoutManager.setInterval */.zs.setInterval(()=>{if(this.options.refetchIntervalInBackground||n/* .focusManager.isFocused */.m.isFocused()){this.#D()}},this.#I)}#P(){this.#L();this.#N(this.#H())}#M(){if(this.#T){l/* .timeoutManager.clearTimeout */.zs.clearTimeout(this.#T);this.#T=void 0}}#F(){if(this.#C){l/* .timeoutManager.clearInterval */.zs.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.#x;const l=this.#E;const c=e!==r;const d=c?e.state:this.#A;const{state:p}=e;let m={...p};let g=false;let b;if(t._optimisticResults){const i=this.hasListeners();const o=!i&&f(e,t);const s=i&&h(e,r,t,n);if(o||s){m={...m,...(0,a/* .fetchState */.k)(p.data,e.options)}}if(t._optimisticResults==="isRestoring"){m.fetchStatus="idle"}}let{error:y,errorUpdatedAt:_,status:w}=m;b=m.data;let A=false;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let e;if(i?.isPlaceholderData&&t.placeholderData===l?.placeholderData){e=i.data;A=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 */.pl)(i?.data,e,t);g=true}}if(t.select&&b!==void 0&&!A){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 */.pl)(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 x=m.fetchStatus==="fetching";const E=w==="pending";const S=w==="error";const O=E&&x;const k=b!==void 0;const T={status:w,fetchStatus:m.fetchStatus,isPending:E,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>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!E,isLoadingError:S&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:S&&k,isStale:v(e,t),refetch:this.refetch,promise:this.#_,isEnabled:(0,u/* .resolveEnabled */.Eh)(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 */.T)();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.#x=this.#w.state;this.#E=this.options;if(this.#x.data!==void 0){this.#k=this.#w}if((0,u/* .shallowEqualObjects */.f8)(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.#R.size){return true}const n=new Set(r??this.#R);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()})}#Y(){const e=this.#n.getQueryCache().build(this.#n,this.options);if(e===this.#w){return}const t=this.#w;this.#w=e;this.#A=e.state;if(this.hasListeners()){t?.removeObserver(this);e.addObserver(this)}}onQueryUpdate(){this.updateResult();if(this.hasListeners()){this.#P()}}#f(e){i/* .notifyManager.batch */.jG.batch(()=>{if(e.listeners){this.listeners.forEach(e=>{e(this.#u)})}this.#n.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function d(e,t){return(0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===false)}function f(e,t){return d(e,t)||e.state.data!==void 0&&p(e,t,t.refetchOnMount)}function p(e,t,r){if((0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false&&(0,u/* .resolveStaleTime */.d2)(t.staleTime,e)!=="static"){const n=typeof r==="function"?r(e):r;return n==="always"||n!==false&&v(e,t)}return false}function h(e,t,r,n){return(e!==t||(0,u/* .resolveEnabled */.Eh)(n.enabled,e)===false)&&(!r.suspense||e.state.status!=="error")&&v(e,r)}function v(e,t){return(0,u/* .resolveEnabled */.Eh)(t.enabled,e)!==false&&e.isStaleByTime((0,u/* .resolveStaleTime */.d2)(t.staleTime,e))}function m(e,t){if(!(0,u/* .shallowEqualObjects */.f8)(e.getCurrentResult(),t)){return true}return false}//# sourceMappingURL=queryObserver.js.map
},71692:function(e,t,r){"use strict";r.d(t,{k:()=>a});/* import */var n=r(52775);/* import */var i=r(24880);// src/removable.ts
var a=class{#j;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout();if((0,i/* .isValidTimeout */.gn)(this.gcTime)){this.#j=n/* .timeoutManager.setTimeout */.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime)}}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i/* .isServer */.S$?Infinity:5*60*1e3))}clearGcTimeout(){if(this.#j){n/* .timeoutManager.clearTimeout */.zs.clearTimeout(this.#j);this.#j=void 0}}};//# sourceMappingURL=removable.js.map
},58904:function(e,t,r){"use strict";r.d(t,{II:()=>d,cc:()=>l,v_:()=>u});/* import */var n=r(29658);/* import */var i=r(96035);/* import */var a=r(94658);/* import */var o=r(24880);// src/retryer.ts
function s(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")==="online"?i/* .onlineManager.isOnline */.t.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;const d=(0,a/* .pendingThenable */.T)();const f=()=>d.status!=="pending";const p=t=>{if(!f()){const r=new l(t);y(r);e.onCancel?.(r)}};const h=()=>{t=true};const v=()=>{t=false};const m=()=>n/* .focusManager.isFocused */.m.isFocused()&&(e.networkMode==="always"||i/* .onlineManager.isOnline */.t.isOnline())&&e.canRun();const g=()=>u(e.networkMode)&&e.canRun();const b=e=>{if(!f()){c?.();d.resolve(e)}};const y=e=>{if(!f()){c?.();d.reject(e)}};const _=()=>{return new Promise(t=>{c=e=>{if(f()||m()){t(e)}};e.onPause?.()}).then(()=>{c=void 0;if(!f()){e.onContinue?.()}})};const w=()=>{if(f()){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(f()){return}const i=e.retry??(o/* .isServer */.S$?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 */.yy)(u).then(()=>{return m()?void 0:_()}).then(()=>{if(t){y(n)}else{w()}})})};return{promise:d,status:()=>d.status,cancel:p,continue:()=>{c?.();return d},cancelRetry:h,continueRetry:v,canStart:g,start:()=>{if(g()){w()}else{_().then(w)}return d}}}//# sourceMappingURL=retryer.js.map
},66500:function(e,t,r){"use strict";r.d(t,{Q:()=>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
},94658:function(e,t,r){"use strict";r.d(t,{T:()=>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
},52775:function(e,t,r){"use strict";r.d(t,{Zq:()=>o,zs:()=>a});// src/timeoutManager.ts
var n={// We need the wrapper function syntax below instead of direct references to
// global setTimeout etc.
//
// BAD: `setTimeout: setTimeout`
// GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
//
// If we use direct references here, then anything that wants to spy on or
// replace the global setTimeout (like tests) won't work since we'll already
// have a hard reference to the original implementation at the time when this
// file was imported.
setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var i=class{// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
// type at app boot; and if we leave that type, then any new timer provider
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
//
// We settle for type safety for the TimeoutProvider type, and accept that
// this class is unsafe internally to allow for extension.
#U=n;#B=false;setTimeoutProvider(e){if(false){}this.#U=e;if(false){}}setTimeout(e,t){if(false){}return this.#U.setTimeout(e,t)}clearTimeout(e){this.#U.clearTimeout(e)}setInterval(e,t){if(false){}return this.#U.setInterval(e,t)}clearInterval(e){this.#U.clearInterval(e)}};var a=new i;function o(e){setTimeout(e,0)}//# sourceMappingURL=timeoutManager.js.map
},24880:function(e,t,r){"use strict";r.d(t,{Cp:()=>v,EN:()=>h,Eh:()=>c,F$:()=>p,GU:()=>C,MK:()=>d,S$:()=>i,ZM:()=>T,ZZ:()=>O,Zw:()=>o,d2:()=>l,f8:()=>b,gn:()=>s,hT:()=>k,j3:()=>u,lQ:()=>a,nJ:()=>f,pl:()=>x,rX:()=>E,y9:()=>S,yy:()=>A});/* import */var n=r(52775);// src/utils.ts
var i=typeof window==="undefined"||"Deno"in globalThis;function a(){}function o(e,t){return typeof e==="function"?e(t):e}function s(e){return typeof e==="number"&&e>=0&&e!==Infinity}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return typeof e==="function"?e(t):e}function c(e,t){return typeof e==="function"?e(t):e}function d(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==p(o,t.options)){return false}}else if(!v(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 f(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey){return false}if(r){if(h(t.options.mutationKey)!==h(a)){return false}}else if(!v(t.options.mutationKey,a)){return false}}if(n&&t.state.status!==n){return false}if(i&&!i(t)){return false}return true}function p(e,t){const r=t?.queryKeyHashFn||h;return r(e)}function h(e){return JSON.stringify(e,(e,t)=>_(t)?Object.keys(t).sort().reduce((e,r)=>{e[r]=t[r];return e},{}):t)}function v(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=>v(e[r],t[r]))}return false}var m=Object.prototype.hasOwnProperty;function g(e,t){if(e===t){return e}const r=y(e)&&y(t);if(!r&&!(_(e)&&_(t)))return 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?new Array(o):{};let u=0;for(let n=0;n<o;n++){const o=r?n:a[n];const l=e[o];const c=t[o];if(l===c){s[o]=l;if(r?n<i:m.call(e,o))u++;continue}if(l===null||c===null||typeof l!=="object"||typeof c!=="object"){s[o]=c;continue}const d=g(l,c);s[o]=d;if(d===l)u++}return i===o&&u===i?e:s}function b(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 y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _(e){if(!w(e)){return false}const t=e.constructor;if(t===void 0){return true}const r=t.prototype;if(!w(r)){return false}if(!r.hasOwnProperty("isPrototypeOf")){return false}if(Object.getPrototypeOf(e)!==Object.prototype){return false}return true}function w(e){return Object.prototype.toString.call(e)==="[object Object]"}function A(e){return new Promise(t=>{n/* .timeoutManager.setTimeout */.zs.setTimeout(t,e)})}function x(e,t,r){if(typeof r.structuralSharing==="function"){return r.structuralSharing(e,t)}else if(r.structuralSharing!==false){if(false){}return g(e,t)}return t}function E(e){return e}function S(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function O(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var k=Symbol();function T(e,t){if(false){}if(!e.queryFn&&t?.initialPromise){return()=>t.initialPromise}if(!e.queryFn||e.queryFn===k){return()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}return e.queryFn}function C(e,t){if(typeof e==="function"){return e(...t)}return!!e}//# sourceMappingURL=utils.js.map
},3335:function(e,t,r){"use strict";r.d(t,{w:()=>a});/* import */var n=r(41594);"use client";// src/IsRestoringProvider.ts
var i=n.createContext(false);var a=()=>n.useContext(i);var o=i.Provider;//# sourceMappingURL=IsRestoringProvider.js.map
},97665:function(e,t,r){"use strict";r.d(t,{Ht:()=>s,jE:()=>o});/* import */var n=r(41594);/* import */var i=r(74848);"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
},96672:function(e,t,r){"use strict";r.d(t,{h:()=>s});/* import */var n=r(41594);/* import */var i=r(74848);"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
},68590:function(e,t,r){"use strict";r.d(t,{$1:()=>s,LJ:()=>a,wZ:()=>o});/* import */var n=r(41594);/* import */var i=r(24880);"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 */.GU)(r,[e.error,n]))};//# sourceMappingURL=errorBoundaryUtils.js.map
},60791:function(e,t,r){"use strict";r.d(t,{EU:()=>o,iL:()=>s,jv:()=>i,nE:()=>a});// src/suspense.ts
var n=(e,t)=>t.state.data===void 0;var i=e=>{if(e.suspense){const t=1e3;const r=e=>e==="static"?e:Math.max(e??t,t);const n=e.staleTime;e.staleTime=typeof n==="function"?(...e)=>r(n(...e)):r(n);if(typeof e.gcTime==="number"){e.gcTime=Math.max(e.gcTime,t)}}};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
},15985:function(e,t,r){"use strict";r.d(t,{t:()=>d});/* import */var n=r(41594);/* import */var i=r(26261);/* import */var a=r(24880);/* import */var o=r(97665);/* import */var s=r(96672);/* import */var u=r(68590);/* import */var l=r(3335);/* import */var c=r(60791);"use client";// src/useBaseQuery.ts
function d(e,t,r){if(false){}const d=(0,l/* .useIsRestoring */.w)();const f=(0,s/* .useQueryErrorResetBoundary */.h)();const p=(0,o/* .useQueryClient */.jE)(r);const h=p.defaultQueryOptions(e);p.getDefaultOptions().queries?._experimental_beforeQuery?.(h);if(false){}h._optimisticResults=d?"isRestoring":"optimistic";(0,c/* .ensureSuspenseTimers */.jv)(h);(0,u/* .ensurePreventErrorBoundaryRetry */.LJ)(h,f);(0,u/* .useClearResetErrorBoundary */.wZ)(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 */.jG.batchCalls(e)):a/* .noop */.lQ;m.updateResult();return t},[m,b]),()=>m.getCurrentResult(),()=>m.getCurrentResult());n.useEffect(()=>{m.setOptions(h)},[h,m]);if((0,c/* .shouldSuspend */.EU)(h,g)){throw(0,c/* .fetchOptimistic */.iL)(h,m,f)}if((0,u/* .getHasError */.$1)({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 */.S$&&(0,c/* .willFetch */.nE)(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 */.iL)(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 */.lQ).finally(()=>{m.updateResult()})}return!h.notifyOnChangeProps?m.trackResult(g):g}//# sourceMappingURL=useBaseQuery.js.map
},94747:function(e,t,r){"use strict";r.d(t,{n:()=>u});/* import */var n=r(41594);/* import */var i=r(61388);/* import */var a=r(26261);/* import */var o=r(24880);/* import */var s=r(97665);"use client";// src/useMutation.ts
function u(e,t){const r=(0,s/* .useQueryClient */.jE)(t);const[u]=n.useState(()=>new i/* .MutationObserver */._(r,e));n.useEffect(()=>{u.setOptions(e)},[u,e]);const l=n.useSyncExternalStore(n.useCallback(e=>u.subscribe(a/* .notifyManager.batchCalls */.jG.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult());const c=n.useCallback((e,t)=>{u.mutate(e,t).catch(o/* .noop */.lQ)},[u]);if(l.error&&(0,o/* .shouldThrowError */.GU)(u.options.throwOnError,[l.error])){throw l.error}return{...l,mutate:c,mutateAsync:l.mutate}}//# sourceMappingURL=useMutation.js.map
},97286:function(e,t,r){"use strict";r.d(t,{I:()=>a});/* import */var n=r(1651);/* import */var i=r(15985);"use client";// src/useQuery.ts
function a(e,t){return(0,i/* .useBaseQuery */.t)(e,n/* .QueryObserver */.$,t)}//# sourceMappingURL=useQuery.js.map
},36263:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(17275);/* import */var i=r(73119);/* import */var a=r(17013);/* import */var o=r(77960);/* import */var s=r(74062);/**
 * Known adapters mapping.
 * Provides environment-specific adapters for Axios:
 * - `http` for Node.js
 * - `xhr` for browsers
 * - `fetch` for fetch API-based requests
 * 
 * @type {Object<string, Function|Object>}
 */const u={http:i/* ["default"] */.A,xhr:a/* ["default"] */.A,fetch:{get:o/* .getFetch */.J}};// Assign adapter names for easier debugging and identification
n/* ["default"].forEach */.A.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})}});/**
 * Render a rejection reason string for unknown or unsupported adapters
 * 
 * @param {string} reason
 * @returns {string}
 */const l=e=>`- ${e}`;/**
 * Check if the adapter is resolved (function, null, or false)
 * 
 * @param {Function|null|false} adapter
 * @returns {boolean}
 */const c=e=>n/* ["default"].isFunction */.A.isFunction(e)||e===null||e===false;/**
 * Get the first suitable adapter from the provided list.
 * Tries each adapter in order until a supported one is found.
 * Throws an AxiosError if no adapter is suitable.
 * 
 * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
 * @param {Object} config - Axios request configuration
 * @throws {AxiosError} If no suitable adapter is available
 * @returns {Function} The resolved adapter function
 */function d(e,t){e=n/* ["default"].isArray */.A.isArray(e)?e:[e];const{length:r}=e;let i;let a;const o={};for(let l=0;l<r;l++){i=e[l];let r;a=i;if(!c(i)){a=u[(r=String(i)).toLowerCase()];if(a===undefined){throw new s/* ["default"] */.A(`Unknown adapter '${r}'`)}}if(a&&(n/* ["default"].isFunction */.A.isFunction(a)||(a=a.get(t)))){break}o[r||"#"+l]=a}if(!a){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build"));let t=r?e.length>1?"since :\n"+e.map(l).join("\n"):" "+l(e[0]):"as no adapter specified";throw new s/* ["default"] */.A(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return a}/**
 * Exports Axios adapters and utility to resolve an adapter
 *//* export default */const f={/**
   * Resolve an adapter from a list of adapter names or functions.
   * @type {Function}
   */getAdapter:d,/**
   * Exposes all known adapters
   * @type {Object<string, Function|Object>}
   */adapters:u}},77960:function(e,t,r){"use strict";r.d(t,{J:()=>_});/* import */var n=r(63820);/* import */var i=r(17275);/* import */var a=r(74062);/* import */var o=r(12723);/* import */var s=r(1791);/* import */var u=r(7110);/* import */var l=r(77837);/* import */var c=r(88382);/* import */var d=r(63853);const f=64*1024;const{isFunction:p}=i/* ["default"] */.A;const h=(({Request:e,Response:t})=>({Request:e,Response:t}))(i/* ["default"].global */.A.global);const{ReadableStream:v,TextEncoder:m}=i/* ["default"].global */.A.global;const g=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const b=e=>{e=i/* ["default"].merge.call */.A.merge.call({skipUndefined:true},h,e);const{fetch:t,Request:r,Response:b}=e;const y=t?p(t):typeof fetch==="function";const _=p(r);const w=p(b);if(!y){return false}const A=y&&p(v);const x=y&&(typeof m==="function"?(e=>t=>e.encode(t))(new m):async e=>new Uint8Array(await new r(e).arrayBuffer()));const E=_&&A&&g(()=>{let e=false;const t=new r(n/* ["default"].origin */.A.origin,{body:new v,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t});const S=w&&A&&g(()=>i/* ["default"].isReadableStream */.A.isReadableStream(new b("").body));const O={stream:S&&(e=>e.body)};y&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!O[e]&&(O[e]=(t,r)=>{let n=t&&t[e];if(n){return n.call(t)}throw new a/* ["default"] */.A(`Response type '${e}' is not supported`,a/* ["default"].ERR_NOT_SUPPORT */.A.ERR_NOT_SUPPORT,r)})})})();const k=async e=>{if(e==null){return 0}if(i/* ["default"].isBlob */.A.isBlob(e)){return e.size}if(i/* ["default"].isSpecCompliantForm */.A.isSpecCompliantForm(e)){const t=new r(n/* ["default"].origin */.A.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(i/* ["default"].isArrayBufferView */.A.isArrayBufferView(e)||i/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)){return e.byteLength}if(i/* ["default"].isURLSearchParams */.A.isURLSearchParams(e)){e=e+""}if(i/* ["default"].isString */.A.isString(e)){return(await x(e)).byteLength}};const T=async(e,t)=>{const r=i/* ["default"].toFiniteNumber */.A.toFiniteNumber(e.getContentLength());return r==null?k(t):r};return async e=>{let{url:n,method:p,data:h,signal:v,cancelToken:m,timeout:g,onDownloadProgress:y,onUploadProgress:w,responseType:A,headers:x,withCredentials:k="same-origin",fetchOptions:C}=(0,c/* ["default"] */.A)(e);let I=t||fetch;A=A?(A+"").toLowerCase():"text";let R=(0,o/* ["default"] */.A)([v,m&&m.toAbortSignal()],g);let D=null;const P=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let M;try{if(w&&E&&p!=="get"&&p!=="head"&&(M=await T(x,h))!==0){let e=new r(n,{method:"POST",body:h,duplex:"half"});let t;if(i/* ["default"].isFormData */.A.isFormData(h)&&(t=e.headers.get("content-type"))){x.setContentType(t)}if(e.body){const[t,r]=(0,l/* .progressEventDecorator */.Vj)(M,(0,l/* .progressEventReducer */.C1)((0,l/* .asyncDecorator */.mM)(w)));h=(0,s/* .trackStream */.E9)(e.body,f,t,r)}}if(!i/* ["default"].isString */.A.isString(k)){k=k?"include":"omit"}// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const t=_&&"credentials"in r.prototype;const a={...C,signal:R,method:p.toUpperCase(),headers:x.normalize().toJSON(),body:h,duplex:"half",credentials:t?k:undefined};D=_&&new r(n,a);let o=await (_?I(D,C):I(n,a));const c=S&&(A==="stream"||A==="response");if(S&&(y||c&&P)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=i/* ["default"].toFiniteNumber */.A.toFiniteNumber(o.headers.get("content-length"));const[r,n]=y&&(0,l/* .progressEventDecorator */.Vj)(t,(0,l/* .progressEventReducer */.C1)((0,l/* .asyncDecorator */.mM)(y),true))||[];o=new b((0,s/* .trackStream */.E9)(o.body,f,r,()=>{n&&n();P&&P()}),e)}A=A||"text";let v=await O[i/* ["default"].findKey */.A.findKey(O,A)||"text"](o,e);!c&&P&&P();return await new Promise((t,r)=>{(0,d/* ["default"] */.A)(t,r,{data:v,headers:u/* ["default"].from */.A.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:D})})}catch(t){P&&P();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new a/* ["default"] */.A("Network Error",a/* ["default"].ERR_NETWORK */.A.ERR_NETWORK,e,D),{cause:t.cause||t})}throw a/* ["default"].from */.A.from(t,t&&t.code,e,D)}}};const y=new Map;const _=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t;const a=[n,i,r];let o=a.length,s=o,u,l,c=y;while(s--){u=a[s];l=c.get(u);l===undefined&&c.set(u,l=s?new Map:b(t));c=l}return l};const w=_();/* unused export default */var A=/* unused pure expression or super */null&&w},17013:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(17275);/* import */var i=r(63853);/* import */var a=r(10807);/* import */var o=r(74062);/* import */var s=r(38458);/* import */var u=r(55579);/* import */var l=r(63820);/* import */var c=r(7110);/* import */var d=r(77837);/* import */var f=r(88382);const p=typeof XMLHttpRequest!=="undefined";/* export default */const h=p&&function(e){return new Promise(function t(t,r){const p=(0,f/* ["default"] */.A)(e);let h=p.data;const v=c/* ["default"].from */.A.from(p.headers).normalize();let{responseType:m,onUploadProgress:g,onDownloadProgress:b}=p;let y;let _,w;let A,x;function E(){A&&A();// flush events
x&&x();// 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 */.A.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"] */.A)(function e(e){t(e);E()},function e(e){r(e);E()},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"] */.A("Request aborted",o/* ["default"].ECONNABORTED */.A.ECONNABORTED,e,S));// Clean up request
S=null};// Handle low level network errors
S.onerror=function t(t){// Browsers deliver a ProgressEvent in XHR onerror
// (message may be empty; when present, surface it)
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
const n=t&&t.message?t.message:"Network Error";const i=new o/* ["default"] */.A(n,o/* ["default"].ERR_NETWORK */.A.ERR_NETWORK,e,S);// attach the underlying event for consumers who want details
i.event=t||null;r(i);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"] */.A;if(p.timeoutErrorMessage){t=p.timeoutErrorMessage}r(new o/* ["default"] */.A(t,n.clarifyTimeoutError?o/* ["default"].ETIMEDOUT */.A.ETIMEDOUT:o/* ["default"].ECONNABORTED */.A.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 */.A.forEach(v.toJSON(),function e(e,t){S.setRequestHeader(t,e)})}// Add withCredentials to request if needed
if(!n/* ["default"].isUndefined */.A.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,x]=(0,d/* .progressEventReducer */.C1)(b,true);S.addEventListener("progress",w)}// Not all browsers support upload events
if(g&&S.upload){[_,A]=(0,d/* .progressEventReducer */.C1)(g);S.upload.addEventListener("progress",_);S.upload.addEventListener("loadend",A)}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"] */.A(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"] */.A)(p.url);if(k&&l/* ["default"].protocols.indexOf */.A.protocols.indexOf(k)===-1){r(new o/* ["default"] */.A("Unsupported protocol "+k+":",o/* ["default"].ERR_BAD_REQUEST */.A.ERR_BAD_REQUEST,e));return}// Send the request
S.send(h||null)})}},57536:function(e,t,r){"use strict";r.d(t,{A:()=>A});/* import */var n=r(17275);/* import */var i=r(12125);/* import */var a=r(55978);/* import */var o=r(44662);/* import */var s=r(6013);/* import */var u=r(77887);/* import */var l=r(38458);/* import */var c=r(64874);/* import */var d=r(59575);/* import */var f=r(89888);/* import */var p=r(70665);/* import */var h=r(74062);/* import */var v=r(20605);/* import */var m=r(68562);/* import */var g=r(7110);/* import */var b=r(36263);/* import */var y=r(7693);/**
 * 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"] */.A(e);const r=(0,i/* ["default"] */.A)(a/* ["default"].prototype.request */.A.prototype.request,t);// Copy axios.prototype to instance
n/* ["default"].extend */.A.extend(r,a/* ["default"].prototype */.A.prototype,t,{allOwnKeys:true});// Copy context to instance
n/* ["default"].extend */.A.extend(r,t,null,{allOwnKeys:true});// Factory for creating new instances
r.create=function t(t){return _((0,o/* ["default"] */.A)(e,t))};return r}// Create the default instance to be exported
const w=_(s/* ["default"] */.A);// Expose Axios class to allow class inheritance
w.Axios=a/* ["default"] */.A;// Expose Cancel & CancelToken
w.CanceledError=l/* ["default"] */.A;w.CancelToken=c/* ["default"] */.A;w.isCancel=d/* ["default"] */.A;w.VERSION=f/* .VERSION */.x;w.toFormData=p/* ["default"] */.A;// Expose AxiosError class
w.AxiosError=h/* ["default"] */.A;// 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"] */.A;// Expose isAxiosError
w.isAxiosError=m/* ["default"] */.A;// Expose mergeConfig
w.mergeConfig=o/* ["default"] */.A;w.AxiosHeaders=g/* ["default"] */.A;w.formToJSON=e=>(0,u/* ["default"] */.A)(n/* ["default"].isHTMLForm */.A.isHTMLForm(e)?new FormData(e):e);w.getAdapter=b/* ["default"].getAdapter */.A.getAdapter;w.HttpStatusCode=y/* ["default"] */.A;w.default=w;// this module should only have a default export
/* export default */const A=w},64874:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(38458);/**
 * 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"] */.A(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}}}/* export default */const a=i},38458:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(74062);/* import */var i=r(17275);/**
 * 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 */.A.call(this,e==null?"canceled":e,n/* ["default"].ERR_CANCELED */.A.ERR_CANCELED,t,r);this.name="CanceledError"}i/* ["default"].inherits */.A.inherits(a,n/* ["default"] */.A,{__CANCEL__:true});/* export default */const o=a},59575:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){return!!(e&&e.__CANCEL__)}},55978:function(e,t,r){"use strict";r.d(t,{A:()=>p});/* import */var n=r(17275);/* import */var i=r(93967);/* import */var a=r(17352);/* import */var o=r(48683);/* import */var s=r(44662);/* import */var u=r(88262);/* import */var l=r(13390);/* import */var c=r(7110);const d=l/* ["default"].validators */.A.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"] */.A,response:new a/* ["default"] */.A}}/**
   * 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"] */.A)(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:a}=t;if(r!==undefined){l/* ["default"].assertOptions */.A.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 */.A.isFunction(i)){t.paramsSerializer={serialize:i}}else{l/* ["default"].assertOptions */.A.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 */.A.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 */.A.merge(a.common,a[t.method]);a&&n/* ["default"].forEach */.A.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]});t.headers=c/* ["default"].concat */.A.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 */.A.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;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 */.A.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"] */.A)(this.defaults,e);const t=(0,u/* ["default"] */.A)(e.baseURL,e.url,e.allowAbsoluteUrls);return(0,i/* ["default"] */.A)(t,e.params,e.paramsSerializer)}}// Provide aliases for supported request methods
n/* ["default"].forEach */.A.forEach(["delete","get","head","options"],function e(e){/*eslint func-names:0*/f.prototype[e]=function(t,r){return this.request((0,s/* ["default"] */.A)(r||{},{method:e,url:t,data:(r||{}).data}))}});n/* ["default"].forEach */.A.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"] */.A)(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[e]=t();f.prototype[e+"Form"]=t(true)});/* export default */const p=f},74062:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(17275);/**
 * 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 */.A.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 */.A.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 */.A.toFlatObject(e,l,function e(e){return e!==Error.prototype},e=>{return e!=="isAxiosError"});const c=e&&e.message?e.message:"Error";// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
const d=t==null&&e?e.code:t;i.call(l,c,d,r,o,s);// Chain the original error on the standard field; non-enumerable to avoid JSON noise
if(e&&l.cause==null){Object.defineProperty(l,"cause",{value:e,configurable:true})}l.name=e&&e.name||"Error";u&&Object.assign(l,u);return l};/* export default */const s=i},7110:function(e,t,r){"use strict";r.d(t,{A:()=>h});/* import */var n=r(17275);/* import */var i=r(43325);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 */.A.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 */.A.isFunction(i)){return i.call(this,t,r)}if(a){t=r}if(!n/* ["default"].isString */.A.isString(t))return;if(n/* ["default"].isString */.A.isString(i)){return t.indexOf(i)!==-1}if(n/* ["default"].isRegExp */.A.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 */.A.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 */.A.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 */.A.forEach(e,(e,r)=>u(e,r,t));if(n/* ["default"].isPlainObject */.A.isPlainObject(e)||e instanceof this.constructor){c(e,t)}else if(n/* ["default"].isString */.A.isString(e)&&(e=e.trim())&&!l(e)){c((0,i/* ["default"] */.A)(e),t)}else if(n/* ["default"].isObject */.A.isObject(e)&&n/* ["default"].isIterable */.A.isIterable(e)){let r={},i,a;for(const t of e){if(!n/* ["default"].isArray */.A.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}r[a=t[0]]=(i=r[a])?n/* ["default"].isArray */.A.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 */.A.findKey(this,e);if(r){const e=this[r];if(!t){return e}if(t===true){return u(e)}if(n/* ["default"].isFunction */.A.isFunction(t)){return t.call(this,e,r)}if(n/* ["default"].isRegExp */.A.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 */.A.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 */.A.findKey(r,e);if(a&&(!t||c(r,r[a],a,t))){delete r[a];i=true}}}if(n/* ["default"].isArray */.A.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 */.A.forEach(this,(i,a)=>{const o=n/* ["default"].findKey */.A.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 */.A.forEach(this,(r,i)=>{r!=null&&r!==false&&(t[i]=e&&n/* ["default"].isArray */.A.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 */.A.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 */.A.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 */.A.freezeMethods(p);/* export default */const h=p},17352:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(17275);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 {void}
   */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 */.A.forEach(this.handlers,function t(t){if(t!==null){e(t)}})}}/* export default */const a=i},88262:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(99034);/* import */var i=r(76787);/**
 * 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"] */.A)(t);if(e&&(a||r==false)){return(0,i/* ["default"] */.A)(e,t)}return t}},48683:function(e,t,r){"use strict";r.d(t,{A:()=>c});/* import */var n=r(19152);/* import */var i=r(59575);/* import */var a=r(6013);/* import */var o=r(38458);/* import */var s=r(7110);/* import */var u=r(36263);/**
 * 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"] */.A(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 */.A.from(e.headers);// Transform request data
e.data=n/* ["default"].call */.A.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 */.A.getAdapter(e.adapter||a/* ["default"].adapter */.A.adapter,e);return t(e).then(function t(t){l(e);// Transform response data
t.data=n/* ["default"].call */.A.call(e,e.transformResponse,t);t.headers=s/* ["default"].from */.A.from(t.headers);return t},function t(t){if(!(0,i/* ["default"] */.A)(t)){l(e);// Transform response data
if(t&&t.response){t.response.data=n/* ["default"].call */.A.call(e,e.transformResponse,t.response);t.response.headers=s/* ["default"].from */.A.from(t.response.headers)}}return Promise.reject(t)})}},44662:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(17275);/* import */var i=r(7110);const a=e=>e instanceof i/* ["default"] */.A?{...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 */.A.isPlainObject(e)&&n/* ["default"].isPlainObject */.A.isPlainObject(t)){return n/* ["default"].merge.call */.A.merge.call({caseless:i},e,t)}else if(n/* ["default"].isPlainObject */.A.isPlainObject(t)){return n/* ["default"].merge */.A.merge({},t)}else if(n/* ["default"].isArray */.A.isArray(t)){return t.slice()}return t}// eslint-disable-next-line consistent-return
function o(e,t,r,a){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(e,t,r,a)}else if(!n/* ["default"].isUndefined */.A.isUndefined(e)){return i(undefined,e,r,a)}}// eslint-disable-next-line consistent-return
function s(e,t){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(undefined,t)}}// eslint-disable-next-line consistent-return
function u(e,t){if(!n/* ["default"].isUndefined */.A.isUndefined(t)){return i(undefined,t)}else if(!n/* ["default"].isUndefined */.A.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 */.A.forEach(Object.keys({...e,...t}),function i(i){const a=c[i]||o;const s=a(e[i],t[i],i);n/* ["default"].isUndefined */.A.isUndefined(s)&&a!==l||(r[i]=s)});return r}},63853:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(74062);/**
 * 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"] */.A("Request failed with status code "+r.status,[n/* ["default"].ERR_BAD_REQUEST */.A.ERR_BAD_REQUEST,n/* ["default"].ERR_BAD_RESPONSE */.A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}},19152:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(17275);/* import */var i=r(6013);/* import */var a=r(7110);/**
 * 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"] */.A;const o=t||r;const s=a/* ["default"].from */.A.from(o.headers);let u=o.data;n/* ["default"].forEach */.A.forEach(e,function e(e){u=e.call(r,u,s.normalize(),t?t.status:undefined)});s.normalize();return u}},6013:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(17275);/* import */var i=r(74062);/* import */var a=r(10807);/* import */var o=r(70665);/* import */var s=r(31076);/* import */var u=r(63820);/* import */var l=r(77887);/**
 * 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 */.A.isString(e)){try{(t||JSON.parse)(e);return n/* ["default"].trim */.A.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}const d={transitional:a/* ["default"] */.A,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 */.A.isObject(e);if(a&&n/* ["default"].isHTMLForm */.A.isHTMLForm(e)){e=new FormData(e)}const u=n/* ["default"].isFormData */.A.isFormData(e);if(u){return i?JSON.stringify((0,l/* ["default"] */.A)(e)):e}if(n/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)||n/* ["default"].isBuffer */.A.isBuffer(e)||n/* ["default"].isStream */.A.isStream(e)||n/* ["default"].isFile */.A.isFile(e)||n/* ["default"].isBlob */.A.isBlob(e)||n/* ["default"].isReadableStream */.A.isReadableStream(e)){return e}if(n/* ["default"].isArrayBufferView */.A.isArrayBufferView(e)){return e.buffer}if(n/* ["default"].isURLSearchParams */.A.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"] */.A)(e,this.formSerializer).toString()}if((d=n/* ["default"].isFileList */.A.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return(0,o/* ["default"] */.A)(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 */.A.isResponse(e)||n/* ["default"].isReadableStream */.A.isReadableStream(e)){return e}if(e&&n/* ["default"].isString */.A.isString(e)&&(r&&!this.responseType||a)){const r=t&&t.silentJSONParsing;const n=!r&&a;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if(e.name==="SyntaxError"){throw i/* ["default"].from */.A.from(e,i/* ["default"].ERR_BAD_RESPONSE */.A.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 */.A.classes.FormData,Blob:u/* ["default"].classes.Blob */.A.classes.Blob},validateStatus:function e(e){return e>=200&&e<300},headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":undefined}}};n/* ["default"].forEach */.A.forEach(["delete","get","head","post","put","patch"],e=>{d.headers[e]={}});/* export default */const f=d},10807:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false}},89888:function(e,t,r){"use strict";r.d(t,{x:()=>n});const n="1.13.2"},95267:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(70665);/**
 * 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"] */.A)(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("&")};/* export default */const s=a},7693:function(e,t,r){"use strict";r.d(t,{A:()=>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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(n).forEach(([e,t])=>{n[t]=e});/* export default */const i=n},12125:function(e,t,r){"use strict";r.d(t,{A:()=>n});/**
 * Create a bound version of a function with a specified `this` context
 *
 * @param {Function} fn - The function to bind
 * @param {*} thisArg - The value to be passed as the `this` parameter
 * @returns {Function} A new function that will call the original function with the specified `this` context
 */function n(e,t){return function r(){return e.apply(t,arguments)}}},93967:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(17275);/* import */var i=r(95267);/**
 * 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,"+")}/**
 * 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 */.A.isFunction(r)){r={serialize:r}}const s=r&&r.serialize;let u;if(s){u=s(t,r)}else{u=n/* ["default"].isURLSearchParams */.A.isURLSearchParams(t)?t.toString():new i/* ["default"] */.A(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}},76787:function(e,t,r){"use strict";r.d(t,{A:()=>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}},12723:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(38458);/* import */var i=r(74062);/* import */var a=r(17275);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"] */.A?t:new n/* ["default"] */.A(t instanceof Error?t.message:t))}};let u=t&&setTimeout(()=>{u=null;s(new i/* ["default"] */.A(`timeout ${t} of ms exceeded`,i/* ["default"].ETIMEDOUT */.A.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 */.A.asap(l);return c}};/* export default */const s=o},9887:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(17275);/* import */var i=r(63820);/* export default */const a=i/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv?// Standard browser envs support document.cookie
{write(e,t,r,i,a,o,s){if(typeof document==="undefined")return;const u=[`${e}=${encodeURIComponent(t)}`];if(n/* ["default"].isNumber */.A.isNumber(r)){u.push(`expires=${new Date(r).toUTCString()}`)}if(n/* ["default"].isString */.A.isString(i)){u.push(`path=${i}`)}if(n/* ["default"].isString */.A.isString(a)){u.push(`domain=${a}`)}if(o===true){u.push("secure")}if(n/* ["default"].isString */.A.isString(s)){u.push(`SameSite=${s}`)}document.cookie=u.join("; ")},read(e){if(typeof document==="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):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(){}}},77887:function(e,t,r){"use strict";r.d(t,{A:()=>s});/* import */var n=r(17275);/**
 * 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 */.A.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 */.A.isArray(i)?i.length:s;if(l){if(n/* ["default"].hasOwnProp */.A.hasOwnProp(i,s)){i[s]=[i[s],r]}else{i[s]=r}return!u}if(!i[s]||!n/* ["default"].isObject */.A.isObject(i[s])){i[s]=[]}const c=t(e,r,i[s],o);if(c&&n/* ["default"].isArray */.A.isArray(i[s])){i[s]=a(i[s])}return!u}if(n/* ["default"].isFormData */.A.isFormData(e)&&n/* ["default"].isFunction */.A.isFunction(e.entries)){const r={};n/* ["default"].forEachEntry */.A.forEachEntry(e,(e,n)=>{t(i(e),n,r,0)});return r}return null}/* export default */const s=o},99034:function(e,t,r){"use strict";r.d(t,{A:()=>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)}},68562:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(17275);/**
 * 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 */.A.isObject(e)&&e.isAxiosError===true}},86305:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(63820);/* export default */const i=n/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv?((e,t)=>r=>{r=new URL(r,n/* ["default"].origin */.A.origin);return e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)})(new URL(n/* ["default"].origin */.A.origin),n/* ["default"].navigator */.A.navigator&&/(msie|trident)/i.test(n/* ["default"].navigator.userAgent */.A.navigator.userAgent)):()=>true},73119:function(e,t,r){"use strict";r.d(t,{A:()=>n});// eslint-disable-next-line strict
/* export default */const n=null},43325:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(17275);// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const i=n/* ["default"].toObjectSet */.A.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
 *//* export default */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}},55579:function(e,t,r){"use strict";r.d(t,{A:()=>n});function n(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},77837:function(e,t,r){"use strict";r.d(t,{C1:()=>o,Vj:()=>s,mM:()=>u});/* import */var n=r(93873);/* import */var i=r(30066);/* import */var a=r(17275);const o=(e,t,r=3)=>{let a=0;const o=(0,n/* ["default"] */.A)(50,250);return(0,i/* ["default"] */.A)(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 */.A.asap(()=>e(...t))},88382:function(e,t,r){"use strict";r.d(t,{A:()=>d});/* import */var n=r(63820);/* import */var i=r(17275);/* import */var a=r(86305);/* import */var o=r(9887);/* import */var s=r(88262);/* import */var u=r(44662);/* import */var l=r(7110);/* import */var c=r(93967);/* export default */const d=e=>{const t=(0,u/* ["default"] */.A)({},e);let{data:r,withXSRFToken:d,xsrfHeaderName:f,xsrfCookieName:p,headers:h,auth:v}=t;t.headers=h=l/* ["default"].from */.A.from(h);t.url=(0,c/* ["default"] */.A)((0,s/* ["default"] */.A)(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)):"")))}if(i/* ["default"].isFormData */.A.isFormData(r)){if(n/* ["default"].hasStandardBrowserEnv */.A.hasStandardBrowserEnv||n/* ["default"].hasStandardBrowserWebWorkerEnv */.A.hasStandardBrowserWebWorkerEnv){h.setContentType(undefined);// browser handles it
}else if(i/* ["default"].isFunction */.A.isFunction(r.getHeaders)){// Node.js FormData (like form-data package)
const e=r.getHeaders();// Only set safe headers to avoid overwriting security headers
const t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{if(t.includes(e.toLowerCase())){h.set(e,r)}})}}// 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 */.A.hasStandardBrowserEnv){d&&i/* ["default"].isFunction */.A.isFunction(d)&&(d=d(t));if(d||d!==false&&(0,a/* ["default"] */.A)(t.url)){// Add xsrf header
const e=f&&p&&o/* ["default"].read */.A.read(p);if(e){h.set(f,e)}}}return t}},93873:function(e,t,r){"use strict";r.d(t,{A:()=>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}}/* export default */const i=n},20605:function(e,t,r){"use strict";r.d(t,{A:()=>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)}}},30066:function(e,t,r){"use strict";r.d(t,{A:()=>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]}/* export default */const i=n},70665:function(e,t,r){"use strict";r.d(t,{A:()=>f});/* import */var n=r(17275);/* import */var i=r(74062);/* import */var a=r(73119);// 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 */.A.isPlainObject(e)||n/* ["default"].isArray */.A.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 */.A.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 */.A.isArray(e)&&!e.some(o)}const c=n/* ["default"].toFlatObject */.A.toFlatObject(n/* ["default"] */.A,{},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 */.A.isObject(e)){throw new TypeError("target must be an object")}// eslint-disable-next-line no-param-reassign
t=t||new(a/* ["default"] */.A||FormData);// eslint-disable-next-line no-param-reassign
r=n/* ["default"].toFlatObject */.A.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 */.A.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 */.A.isSpecCompliantForm(t);if(!n/* ["default"].isFunction */.A.isFunction(f)){throw new TypeError("visitor must be a function")}function g(e){if(e===null)return"";if(n/* ["default"].isDate */.A.isDate(e)){return e.toISOString()}if(n/* ["default"].isBoolean */.A.isBoolean(e)){return e.toString()}if(!m&&n/* ["default"].isBlob */.A.isBlob(e)){throw new i/* ["default"] */.A("Blob is not supported. Use a Buffer instead.")}if(n/* ["default"].isArrayBuffer */.A.isArrayBuffer(e)||n/* ["default"].isTypedArray */.A.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 */.A.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 */.A.isArray(e)&&l(e)||(n/* ["default"].isFileList */.A.isFileList(e)||n/* ["default"].endsWith */.A.endsWith(r,"[]"))&&(a=n/* ["default"].toArray */.A.toArray(e))){// eslint-disable-next-line no-param-reassign
r=s(r);a.forEach(function e(e,i){!(n/* ["default"].isUndefined */.A.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 */.A.isUndefined(e))return;if(y.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}y.push(e);n/* ["default"].forEach */.A.forEach(e,function e(e,i){const a=!(n/* ["default"].isUndefined */.A.isUndefined(e)||e===null)&&f.call(t,e,n/* ["default"].isString */.A.isString(i)?i.trim():i,r,_);if(a===true){w(e,r?r.concat(i):[i])}});y.pop()}if(!n/* ["default"].isObject */.A.isObject(e)){throw new TypeError("data must be an object")}w(e);return t}/* export default */const f=d},31076:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(17275);/* import */var i=r(70665);/* import */var a=r(63820);function o(e,t){return(0,i/* ["default"] */.A)(e,new a/* ["default"].classes.URLSearchParams */.A.classes.URLSearchParams,{visitor:function(e,t,r,i){if(a/* ["default"].isNode */.A.isNode&&n/* ["default"].isBuffer */.A.isBuffer(e)){this.append(t,e.toString("base64"));return false}return i.defaultVisitor.apply(this,arguments)},...t})}},1791:function(e,t,r){"use strict";r.d(t,{E9:()=>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})}},13390:function(e,t,r){"use strict";r.d(t,{A:()=>u});/* import */var n=r(89888);/* import */var i=r(74062);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 */.x+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}// eslint-disable-next-line func-names
return(r,n,s)=>{if(e===false){throw new i/* ["default"] */.A(a(n," has been removed"+(t?" in "+t:"")),i/* ["default"].ERR_DEPRECATED */.A.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"] */.A("options must be an object",i/* ["default"].ERR_BAD_OPTION_VALUE */.A.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"] */.A("option "+o+" must be "+r,i/* ["default"].ERR_BAD_OPTION_VALUE */.A.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new i/* ["default"] */.A("Unknown option "+o,i/* ["default"].ERR_BAD_OPTION */.A.ERR_BAD_OPTION)}}}/* export default */const u={assertOptions:s,validators:a}},66501:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n=typeof Blob!=="undefined"?Blob:null},98556:function(e,t,r){"use strict";r.d(t,{A:()=>n});/* export default */const n=typeof FormData!=="undefined"?FormData:null},60139:function(e,t,r){"use strict";r.d(t,{A:()=>i});/* import */var n=r(95267);/* export default */const i=typeof URLSearchParams!=="undefined"?URLSearchParams:n/* ["default"] */.A},56847:function(e,t,r){"use strict";r.d(t,{A:()=>o});/* import */var n=r(60139);/* import */var i=r(98556);/* import */var a=r(66501);/* export default */const o={isBrowser:true,classes:{URLSearchParams:n/* ["default"] */.A,FormData:i/* ["default"] */.A,Blob:a/* ["default"] */.A},protocols:["http","https","file","blob","url","data"]}},92569: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"},63820:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(56847);/* import */var i=r(92569);/* export default */const a={...i,...n/* ["default"] */.A}},17275:function(e,t,r){"use strict";r.d(t,{A:()=>ed});/* import */var n=r(12125);// 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 A=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 x=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 E=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[I,R,D,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 M=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 F(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 Y(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 L=(()=>{/*eslint no-undef:0*/if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const H=e=>!f(e)&&e!==L;/**
 * 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 N(){const{caseless:e,skipUndefined:t}=H(this)&&this||{};const r={};const n=(n,i)=>{const a=e&&Y(r,i)||i;if(w(r[a])&&w(n)){r[a]=N(r[a],n)}else if(w(n)){r[a]=N({},n)}else if(d(n)){r[a]=n.slice()}else if(!t||!f(n)){r[a]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&F(arguments[e],n)}return r}/**
 * 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 j=(e,t,r,{allOwnKeys:i}={})=>{F(t,(t,i)=>{if(r&&g(t)){e[i]=(0,n/* ["default"] */.A)(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 B=(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 K=(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 V=(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 W=(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 G=(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 $=l("HTMLFormElement");const Q=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 X=(({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 J=l("RegExp");const Z=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};F(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=>{Z(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)?[]:{};F(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)=>{L.addEventListener("message",({source:r,data:n})=>{if(r===L&&n===e){t.length&&t.shift()()}},false);return r=>{t.push(r);L.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",g(L.postMessage));const el=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(L):typeof process!=="undefined"&&process.nextTick||eu;// *********************
const ec=e=>e!=null&&g(e[o]);/* export default */const ed={isArray:d,isArrayBuffer:h,isBuffer:p,isFormData:T,isArrayBufferView:v,isString:m,isNumber:b,isBoolean:_,isObject:y,isPlainObject:w,isEmptyObject:A,isReadableStream:I,isRequest:R,isResponse:D,isHeaders:P,isUndefined:f,isDate:x,isFile:E,isBlob:S,isRegExp:J,isFunction:g,isStream:k,isURLSearchParams:C,isTypedArray:V,isFileList:O,forEach:F,merge:N,extend:j,trim:M,stripBOM:U,inherits:B,toFlatObject:z,kindOf:u,kindOfTest:l,endsWith:K,toArray:q,forEachEntry:W,matchAll:G,isHTMLForm:$,hasOwnProperty:X,hasOwnProp:X,reduceDescriptors:Z,freezeMethods:ee,toObjectSet:et,toCamelCase:Q,noop:er,toFiniteNumber:en,findKey:Y,global:L,isContextDefined:H,isSpecCompliantForm:ei,toJSONObject:ea,isAsyncFn:eo,isThenable:es,setImmediate:eu,asap:el,isIterable:ec}},1932:function(e,t,r){"use strict";r.d(t,{jM:()=>ea});// 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 p(e)||Array.isArray(e)||!!e[i]||!!e.constructor?.[i]||w(e)||A(e)}var d=Object.prototype.constructor.toString();var f=/* @__PURE__ */new WeakMap;function p(e){if(!e||typeof e!=="object")return false;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return true;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return true;if(typeof r!=="function")return false;let n=f.get(r);if(n===void 0){n=Function.toString.call(r);f.set(r,n)}return n===d}function h(e){if(!l(e))s(15,e);return e[a].base_}function v(e,t,r=true){if(m(e)===0/* Object */){const n=r?Reflect.ownKeys(e):Object.keys(e);n.forEach(r=>{t(r,e[r],e)})}else{e.forEach((r,n)=>t(n,r,e))}}function m(e){const t=e[a];return t?t.type_:Array.isArray(e)?1/* Array */:w(e)?2/* Map */:A(e)?3/* Set */:0/* Object */}function g(e,t){return m(e)===2/* Map */?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function b(e,t){return m(e)===2/* Map */?e.get(t):e[t]}function y(e,t,r){const n=m(e);if(n===2/* Map */)e.set(t,r);else if(n===3/* Set */){e.add(r)}else e[t]=r}function _(e,t){if(e===t){return e!==0||1/e===1/t}else{return e!==e&&t!==t}}function w(e){return e instanceof Map}function A(e){return e instanceof Set}function x(e){return e.copy_||e.base_}function E(e,t){if(w(e)){return new Map(e)}if(A(e)){return new Set(e)}if(Array.isArray(e))return Array.prototype.slice.call(e);const r=p(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 S(e,t=false){if(T(e)||l(e)||!c(e))return e;if(m(e)>1){Object.defineProperties(e,{set:k,add:k,clear:k,delete:k})}Object.freeze(e);if(t)Object.values(e).forEach(e=>S(e,true));return e}function O(){s(2)}var k={value:O};function T(e){if(e===null||typeof e!=="object")return true;return Object.isFrozen(e)}// src/utils/plugins.ts
var C={};function I(e){const t=C[e];if(!t){s(0,e)}return t}function R(e,t){if(!C[e])C[e]=t}// src/core/scope.ts
var D;function P(){return D}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 F(e,t){if(t){I("Patches");e.patches_=[];e.inversePatches_=[];e.patchListener_=t}}function Y(e){L(e);e.drafts_.forEach(N);e.drafts_=null}function L(e){if(e===D){D=e.parent_}}function H(e){return D=M(D,e)}function N(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 j(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_){Y(t);s(4)}if(c(e)){e=U(t,e);if(!t.parent_)z(t,e)}if(t.patches_){I("Patches").generateReplacementPatches_(r[a].base_,e,t.patches_,t.inversePatches_)}}else{e=U(t,r,[])}Y(t);if(t.patches_){t.patchListener_(t.patches_,t.inversePatches_)}return e!==n?e:void 0}function U(e,t,r){if(T(t))return t;const n=e.immer_.shouldUseStrictIteration();const i=t[a];if(!i){v(t,(n,a)=>B(e,i,t,n,a,r),n);return t}if(i.scope_!==e)return t;if(!i.modified_){z(e,i.base_,true);return i.base_}if(!i.finalized_){i.finalized_=true;i.scope_.unfinalizedDrafts_--;const t=i.copy_;let a=t;let o=false;if(i.type_===3/* Set */){a=new Set(t);t.clear();o=true}v(a,(n,a)=>B(e,i,t,n,a,r,o),n);z(e,t,false);if(r&&e.patches_){I("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}}return i.copy_}function B(e,t,r,n,i,a,o){if(i==null){return}if(typeof i!=="object"&&!o){return}const s=T(i);if(s&&!o){return}if(false){}if(l(i)){const o=a&&t&&t.type_!==3/* Set */&&// Set objects are atomic since they have no keys.
!g(t.assigned_,n)?a.concat(n):void 0;const s=U(e,i,o);y(r,n,s);if(l(s)){e.canAutoFreeze_=false}else return}else if(o){r.add(i)}if(c(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1){return}if(t&&t.base_&&t.base_[n]===i&&s){return}U(e,i);if((!t||!t.scope_.parent_)&&typeof n!=="symbol"&&(w(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n)))z(e,i)}}function z(e,t,r=false){if(!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_){S(t,r)}}// src/core/proxy.ts
function K(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_:P(),// 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=q;if(r){i=[n];a=V}const{revoke:o,proxy:s}=Proxy.revocable(i,a);n.draft_=s;n.revoke_=o;return s}var q={get(e,t){if(t===a)return e;const r=x(e);if(!g(r,t)){return G(e,r,t)}const n=r[t];if(e.finalized_||!c(n)){return n}if(n===W(e.base_,t)){X(e);return e.copy_[t]=Z(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=$(x(e),t);if(n?.set){n.set.call(e.draft_,r);return true}if(!e.modified_){const n=W(x(e),t);const i=n?.[a];if(i&&i.base_===r){e.copy_[t]=r;e.assigned_[t]=false;return true}if(_(r,n)&&(r!==void 0||g(e.base_,t)))return true;X(e);Q(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(W(e.base_,t)!==void 0||t in e.base_){e.assigned_[t]=false;X(e);Q(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 V={};v(q,(e,t)=>{V[e]=function(){arguments[0]=arguments[0][0];return t.apply(this,arguments)}});V.deleteProperty=function(e,t){if(false){}return V.set.call(this,e,t,void 0)};V.set=function(e,t,r){if(false){}return q.set.call(this,e[0],t,r,e[0])};function W(e,t){const r=e[a];const n=r?x(r):e;return n[t]}function G(e,t,r){const n=$(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 $(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 Q(e){if(!e.modified_){e.modified_=true;if(e.parent_){Q(e.parent_)}}}function X(e){if(!e.copy_){e.copy_=E(e.base_,e.scope_.immer_.useStrictShallowCopy_)}}// src/core/immerClass.ts
var J=class{constructor(e){this.autoFreeze_=true;this.useStrictShallowCopy_=false;this.useStrictIteration_=true;/**
     * 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=H(this);const a=Z(e,void 0);let o=true;try{i=t(a);o=false}finally{if(o)Y(n);else L(n)}F(n,r);return j(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_)S(i,true);if(r){const t=[];const n=[];I("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);if(typeof e?.useStrictIteration==="boolean")this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){if(!c(e))s(8);if(l(e))e=ee(e);const t=H(this);const r=Z(e,void 0);r[a].isManual_=true;L(t);return r}finishDraft(e,t){const r=e&&e[a];if(!r||!r.isManual_)s(9);const{scope_:n}=r;F(n,t);return j(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}/**
   * Pass false to use faster iteration that skips non-enumerable properties
   * but still handles symbols for compatibility.
   *
   * By default, strict iteration is enabled (includes all own properties).
   */setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=I("Patches").applyPatches_;if(l(e)){return n(e,t)}return this.produce(e,e=>n(e,t))}};function Z(e,t){const r=w(e)?I("MapSet").proxyMap_(e,t):A(e)?I("MapSet").proxySet_(e,t):K(e,t);const n=t?t.scope_:P();n.drafts_.push(r);return r}// src/core/current.ts
function ee(e){if(!l(e))s(10,e);return et(e)}function et(e){if(!c(e)||T(e))return e;const t=e[a];let r;let n=true;if(t){if(!t.modified_)return t.base_;t.finalized_=true;r=E(e,t.scope_.immer_.useStrictShallowCopy_);n=t.scope_.immer_.shouldUseStrictIteration()}else{r=E(e,true)}v(r,(e,t)=>{y(r,e,et(t))},n);if(t){t.finalized_=false}return r}// src/plugins/patches.ts
function er(){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:x(l[e])});o.push({op:t,path:r,value:x(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:x(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;v(e.assigned_,(e,l)=>{const c=b(s,e);const d=b(u,e);const f=!l?a:g(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:x(c)}:{op:t,path:p,value:x(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 h(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=m(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=b(l,n);if(typeof l!=="object")s(e+2,o.join("/"))}const c=m(l);const d=_(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 _(e){if(!c(e))return e;if(Array.isArray(e))return e.map(_);if(w(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,_(t)]));if(A(e))return new Set(Array.from(e).map(_));const t=Object.create(u(e));for(const r in e)t[r]=_(e[r]);if(g(e,i))t[i]=e[i];return t}function x(e){if(l(e)){return _(e)}else return e}R("Patches",{applyPatches_:y,generatePatches_:o,generateReplacementPatches_:h})}// src/plugins/mapset.ts
function en(){class e extends Map{constructor(e,t){super();this[a]={type_:2/* Map */,parent_:t,scope_:t?t.scope_:P(),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);Q(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);Q(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);Q(e);e.assigned_=/* @__PURE__ */new Map;v(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=Z(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_:P(),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);Q(t);t.copy_.add(e)}return this}delete(e){if(!this.has(e)){return false}const t=this[a];u(t);o(t);Q(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);Q(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=Z(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)))}R("MapSet",{proxyMap_:t,proxySet_:i})}// src/immer.ts
var ei=new J;var ea=ei.produce;var eo=/* @__PURE__ *//* unused pure expression or super */null&&ei.produceWithPatches.bind(ei);var es=/* @__PURE__ *//* unused pure expression or super */null&&ei.setAutoFreeze.bind(ei);var eu=/* @__PURE__ *//* unused pure expression or super */null&&ei.setUseStrictShallowCopy.bind(ei);var el=/* @__PURE__ *//* unused pure expression or super */null&&ei.setUseStrictIteration.bind(ei);var ec=/* @__PURE__ *//* unused pure expression or super */null&&ei.applyPatches.bind(ei);var ed=/* @__PURE__ *//* unused pure expression or super */null&&ei.createDraft.bind(ei);var ef=/* @__PURE__ *//* unused pure expression or super */null&&ei.finishDraft.bind(ei);function ep(e){return e}function eh(e){return e}//# sourceMappingURL=immer.mjs.map
},49785:function(e,t,r){"use strict";r.d(t,{FH:()=>F,Op:()=>k,jz:()=>eK,mN:()=>eq,xI:()=>L,xW:()=>O});/* import */var n=r(41594);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 A={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"};const x={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};const E={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://react.dev/reference/react/useContext) 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]!==x.all){t._proxyFormState[i]=!n||x.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 I(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 R=e=>typeof e==="string";var D=(e,t,r,n,i)=>{if(R(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 M(e,t,r=new WeakSet){if(P(e)||P(t)){return Object.is(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)?!M(n,e,r):!Object.is(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 F(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);const f=n.useRef(r);const p=n.useRef(i);c.current=u;const[h,v]=n.useState(()=>{const e=r._getWatch(i,l.current);return c.current?c.current(e):e});const m=n.useCallback(e=>{const t=D(i,r._names,e||r._formValues,false,l.current);return c.current?c.current(t):t},[r._formValues,r._names,i]);const g=n.useCallback(e=>{if(!o){const t=D(i,r._names,e||r._formValues,false,l.current);if(c.current){const e=c.current(t);if(!M(e,d.current)){v(e);d.current=e}}else{v(t)}}},[r._formValues,r._names,o,i]);C(()=>{if(f.current!==r||!M(p.current,i)){f.current=r;p.current=i;g()}return r._subscribe({name:i,formState:{values:true},exact:s,callback:e=>{g(e.values)}})},[r,s,i,g]);n.useEffect(()=>r._removeUnmounted());// If name or control changed for this render, synchronously reflect the
// latest value so callers (like useController) see the correct value
// immediately on the same render.
// Optimize: Check control reference first before expensive deepEqual
const b=f.current!==r;const y=p.current;// Cache the computed output to avoid duplicate calls within the same render
// We include shouldReturnImmediate in deps to ensure proper recomputation
const _=n.useMemo(()=>{if(o){return null}const e=!b&&!M(y,i);const t=b||e;return t?m():null},[o,b,i,y,m]);return _!==null?_:h}/**
 * 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 Y(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=F({control:a,name:r,defaultValue:c,exact:true});const p=I({control:a,name:r,exact:true});const v=n.useRef(e);const g=n.useRef(undefined);const b=n.useRef(a.register(r,{...e.rules,value:f,..._(e.disabled)?{disabled:e.disabled}:{}}));v.current=e;const x=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=>b.current.onChange({target:{value:l(e),name:r},type:A.CHANGE}),[r]);const S=n.useCallback(()=>b.current.onBlur({target:{value:y(a._formValues,r),name:r},type:A.BLUR}),[r,a._formValues]);const k=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 T=n.useMemo(()=>({name:r,value:f,..._(i)||p.disabled?{disabled:p.disabled||i}:{},onChange:E,onBlur:S,ref:k}),[r,i,p.disabled,E,S,k,f]);n.useEffect(()=>{const e=a._options.shouldUnregister||o;const t=g.current;if(t&&t!==r&&!u){a.unregister(t)}a.register(r,{...v.current.rules,..._(v.current.disabled)?{disabled:v.current.disabled}:{}});const n=(e,t)=>{const r=y(a._fields,e);if(r&&r._f){r._f.mount=t}};n(r,true);if(e){const e=h(y(a._options.defaultValues,r,v.current.defaultValue));w(a._defaultValues,r,e);if(m(y(a._formValues,r))){w(a._formValues,r,e)}}!u&&a.register(r);g.current=r;return()=>{(u?e&&!a._state.action:e)?a.unregister(r):n(r,false)}},[r,a,u,o]);n.useEffect(()=>{a._setDisabledField({disabled:i,name:r})},[i,r,a]);return n.useMemo(()=>({field:T,formState:p,fieldState:x}),[T,p,x])}/**
 * 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 L=e=>e.render(Y(e));const H=e=>{const t={};for(const r of Object.keys(e)){if(s(e[r])&&e[r]!==null){const n=H(e[r]);for(const e of Object.keys(n)){t[`${r}.${e}`]=n[e]}}else{t[r]=e[r]}}return t};const N="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 j(e){const t=O();const[r,n]=React.useState(false);const{control:i=t.control,onSubmit:a,children:o,action:s,method:u=N,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=H(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 B=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}};function K(e,t){const r={};for(const n in e){if(e.hasOwnProperty(n)){const i=e[n];const a=t[n];if(i&&u(i)&&a){const e=K(i,a);if(u(e)){r[n]=e}}else if(e[n]){r[n]=a}}}return r}var q=e=>u(e)&&!Object.keys(e).length;var V=e=>e.type==="file";var W=e=>typeof e==="function";var G=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 Q=e=>e.type==="radio";var X=e=>Q(e)||i(e);var J=e=>G(e)&&e.isConnected;function Z(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 ee(e){for(const t in e){if(e.hasOwnProperty(t)&&!m(e[t])){return false}}return true}function et(e,t){const r=Array.isArray(t)?t:v(t)?[t]:b(t);const n=r.length===1?e:Z(e,r);const i=r.length-1;const a=r[i];if(n){delete n[a]}if(i!==0&&(u(n)&&q(n)||Array.isArray(n)&&ee(n))){et(e,r.slice(0,-1))}return e}var er=e=>{for(const t in e){if(W(e[t])){return true}}return false};function en(e){return Array.isArray(e)||u(e)&&!er(e)}function ei(e,t={}){for(const r in e){const n=e[r];if(en(n)){t[r]=Array.isArray(n)?[]:{};ei(n,t[r])}else if(!m(n)){t[r]=true}}return t}function ea(e,t,r){if(!r){r=ei(t)}for(const n in e){const i=e[n];if(en(i)){if(m(t)||P(r[n])){r[n]=ei(i,Array.isArray(i)?[]:{})}else{ea(i,o(t)?{}:t[n],r[n])}}else{const e=t[n];r[n]=!M(i,e)}}return r}const eo={value:false,isValid:false};const es={value:true,isValid:true};var eu=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===""?es:{value:e[0].value,isValid:true}:es:eo}return eo};var el=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>m(e)?e:t?e===""?NaN:e?+e:e:r&&R(e)?new Date(e):n?n(e):e;const ec={isValid:false,value:null};var ed=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:true,value:t.value}:e,ec):ec;function ef(e){const t=e.ref;if(V(t)){return t.files}if(Q(t)){return ed(e.refs).value}if($(t)){return[...t.selectedOptions].map(({value:e})=>e)}if(i(t)){return eu(e.refs).value}return el(m(t.value)?e.ref.value:t.value,e)}var ep=(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 eh=e=>e instanceof RegExp;var ev=e=>m(e)?e:eh(e)?e.source:u(e)?eh(e.value)?e.value.source:e.value:e;var em=e=>({isOnSubmit:!e||e===x.onSubmit,isOnBlur:e===x.onBlur,isOnChange:e===x.onChange,isOnAll:e===x.all,isOnTouch:e===x.onTouched});const eg="AsyncFunction";var eb=e=>!!e&&!!e.validate&&!!(W(e.validate)&&e.validate.constructor.name===eg||u(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===eg));var ey=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);var e_=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const ew=(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(ew(a,t)){break}}}else if(u(a)){if(ew(a,t)){break}}}}return};function eA(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 q(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!n||x.all))};var eE=(e,t,r)=>!e||!t||e===t||B(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e)));var eS=(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 eO=(e,t)=>!g(y(e,t)).length&&et(e,t);var ek=(e,t,r)=>{const n=B(y(e,r));w(n,"root",t[r]);w(e,r,n);return e};function eT(e,t,r="validate"){if(R(e)||Array.isArray(e)&&e.every(R)||_(e)&&!e){return{type:r,message:R(e)?e:"",ref:t}}}var eC=e=>u(e)&&!eh(e)?e:{value:e,message:""};var eI=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:A,mount:x}=e._f;const S=y(r,w);if(!x||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=Q(l);const I=i(l);const D=C||I;const P=(A||V(l))&&m(l.value)&&m(S)||G(l)&&l.value===""||S===""||Array.isArray(S)&&!S.length;const M=U.bind(null,w,n,T);const F=(e,t,r,n=E.maxLength,i=E.minLength)=>{const a=e?t:r;T[w]={type:e?n:i,message:a,ref:l,...M(e?n:i,a)}};if(s?!Array.isArray(S)||!S.length:d&&(!D&&(P||o(S))||_(S)&&!S||I&&!eu(c).isValid||C&&!ed(c).isValid)){const{value:e,message:t}=R(d)?{value:!!d,message:d}:eC(d);if(e){T[w]={type:E.required,message:t,ref:O,...M(E.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(R(r.value)&&S){e=o?a(S)>a(r.value):s?S>r.value:n>new Date(r.value)}if(R(i.value)&&S){t=o?a(S)<a(i.value):s?S<i.value:n<new Date(i.value)}}if(e||t){F(!!e,r.message,i.message,E.max,E.min);if(!n){k(T[w].message);return T}}}if((f||p)&&!P&&(R(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){F(r,e.message,t.message);if(!n){k(T[w].message);return T}}}if(g&&!P&&R(S)){const{value:e,message:t}=eC(g);if(eh(e)&&!S.match(e)){T[w]={type:E.pattern,message:t,ref:l,...M(E.pattern,t)};if(!n){k(t);return T}}}if(b){if(W(b)){const e=await b(S,r);const t=eT(e,O);if(t){T[w]={...t,...M(E.validate,t.message)};if(!n){k(t.message);return T}}}else if(u(b)){let e={};for(const t in b){if(!q(e)&&!n){break}const i=eT(await b[t](S,r),O,t);if(i){e={...i,...M(t,i.message)};k(i.message);if(n){T[w]=e}}}if(!q(e)){T[w]={ref:O,...e};if(!n){return T}}}}k(true);return T};const eR={mode:x.onSubmit,reValidateMode:x.onChange,shouldFocusError:true};function eD(e={}){let t={...eR,...e};let r={submitCount:0,isDirty:false,isReady:false,isLoading:W(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 E=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===x.all;const C=e=>t=>{clearTimeout(E);E=setTimeout(e,t)};const I=async e=>{if(!t.disabled&&(S.isValid||O.isValid||e)){const e=t.resolver?q((await U()).errors):await Z(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):et(r.validatingFields,e)}});k.state.next({validatingFields:r.validatingFields,isValidating:!q(r.validatingFields)})}};const F=(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);eO(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=ea(s,c)}k.state.next({name:e,isDirty:er(e,i),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else{w(c,e,i)}};const Y=(e,t)=>{w(r.errors,e,t);k.state.next({errors:r.errors})};const L=e=>{r.errors=e;k.state.next({errors:r.errors,isValid:false})};const H=(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:ef(a._f)):eo(e,n);f.mount&&!f.action&&I()}};const N=(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=er();u=l!==c.isDirty}const t=M(y(s,e),n);l=!!y(r.dirtyFields,e);t?et(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 j=(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(()=>Y(e,i));b(t.delayError)}else{clearTimeout(E);b=null;i?w(r.errors,e,i):et(r.errors,e)}if((i?!M(o,i):o)||!q(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,ep(e||v.mount,n,t.criteriaMode,t.shouldUseNativeValidation));P(e);return r};const Q=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):et(r.errors,n)}}else{r.errors=t}return t};const Z=async(e,n,i={valid:true})=>{for(const a in e){const o=e[a];if(o){const{_f:e,...a}=o;if(e){const a=v.array.has(e.name);const s=o._f&&eb(o._f);if(s&&S.validatingFields){P([e.name],true)}const u=await eI(o,v.disabled,c,T,t.shouldUseNativeValidation&&!n,a);if(s&&S.validatingFields){P([e.name])}if(u[e.name]){i.valid=false;if(n){break}}!n&&(y(u,e.name)?a?ek(r.errors,u,e.name):w(r.errors,e.name,u[e.name]):et(r.errors,e.name))}!q(a)&&await Z(a,n,i)}}return i.valid};const ee=()=>{for(const e of v.unMount){const t=y(n,e);t&&(t._f.refs?t._f.refs.every(e=>!J(e)):!J(t._f.ref))&&eL(e)}v.unMount=new Set};const er=(e,r)=>!t.disabled&&(e&&r&&w(c,e,r),!M(eg(),s));const en=(e,t,r)=>D(e,v,{...f.mount?c:m(t)?s:R(e)?{[e]:t}:t},r,t);const ei=e=>g(y(f.mount?c:s,e,t.shouldUnregister?y(s,e,[]):[]));const eo=(e,t,r={})=>{const a=y(n,e);let s=t;if(a){const r=a._f;if(r){!r.disabled&&w(c,e,el(t,r));s=G(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(V(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)&&N(e,s,r.shouldTouch,r.shouldDirty,true);r.shouldValidate&&eh(e)};const es=(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)?es(s,o,r):eo(s,o,r)}};const eu=(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:ea(s,c),isDirty:er(e,l)})}}else{a&&!a._f&&!o(l)?es(e,l,i):eo(e,l,i)}e_(e,v)&&k.state.next({...r,name:e});k.state.next({name:f.mount?e:undefined,values:h(c)})};const ec=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())||M(e,y(c,o,e))};const p=em(t.mode);const m=em(t.reValidateMode);if(u){let a;let f;const g=i.type?ef(u._f):l(e);const _=e.type===A.BLUR||e.type===A.FOCUS_OUT;const x=!ey(u._f)&&!t.resolver&&!y(r.errors,o)&&!u._f.deps||eS(_,y(r.touchedFields,o),r.isSubmitted,m,p);const E=e_(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=N(o,g,_);const R=!q(C)||E;!_&&k.state.next({name:o,type:e.type,values:h(c)});if(x){if(S.isValid||O.isValid){if(t.mode==="onBlur"){if(_){I()}}else if(!_){I()}}return R&&k.state.next({name:o,...E?{}:C})}!_&&E&&k.state.next({...r});if(t.resolver){const{errors:e}=await U([o]);d(g);if(s){const t=eA(r.errors,n,o);const i=eA(e,n,t.name||o);a=i.error;o=i.name;f=q(e)}}else{P([o],true);a=(await eI(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 Z(n,true)}}}if(s){u._f.deps&&(!Array.isArray(u._f.deps)||u._f.deps.length>0)&&eh(u._f.deps);j(o,f,a,C)}}};const ed=(e,t)=>{if(y(r.errors,t)&&e.focus){e.focus();return 1}return};const eh=async(e,i={})=>{let a;let o;const s=B(e);if(t.resolver){const t=await Q(m(e)?e:s);a=q(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 Z(t&&t._f?{[e]:t}:t)}))).every(Boolean);!(!o&&!r.isValid)&&I()}else{o=a=await Z(n)}k.state.next({...!R(e)||(S.isValid||O.isValid)&&a!==r.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:r.errors});i.shouldFocus&&!o&&ew(n,ed,e?s:v.mount);return o};const eg=(e,t)=>{let n={...f.mount?c:s};if(t){n=K(t.dirtyFields?r.dirtyFields:r.touchedFields,n)}return m(e)?n:R(e)?y(n,e):e.map(e=>y(n,e))};const eT=(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 eC=e=>{e&&B(e).forEach(e=>et(r.errors,e));k.state.next({errors:e?r.errors:{}})};const eP=(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 eM=(e,t)=>W(e)?k.state.subscribe({next:r=>"values"in r&&e(en(undefined,t),r)}):en(e,t,true);const eF=e=>k.state.subscribe({next:t=>{if(eE(e.name,t.name,e.exact)&&ex(t,e.formState||S,eW,e.reRenderRoot)){e.callback({values:{...c},...r,...t,defaultValues:s})}}}).unsubscribe;const eY=e=>{f.mount=true;O={...O,...e.formState};return eF({...e,formState:O})};const eL=(e,i={})=>{for(const a of e?B(e):v.mount){v.mount.delete(a);v.array.delete(a);if(!i.keepValue){et(n,a);et(c,a)}!i.keepError&&et(r.errors,a);!i.keepDirty&&et(r.dirtyFields,a);!i.keepTouched&&et(r.touchedFields,a);!i.keepIsValidating&&et(r.validatingFields,a);!t.shouldUnregister&&!i.keepDefaultValue&&et(s,a)}k.state.next({values:h(c)});k.state.next({...r,...!i.keepDirty?{}:{isDirty:er()}});!i.keepIsValid&&I()};const eH=({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){eH({disabled:_(r.disabled)?r.disabled:t.disabled,name:e})}else{H(e,true,r.value)}return{...a?{disabled:r.disabled||t.disabled}:{},...t.progressive?{required:!!r.required,min:ev(r.min),max:ev(r.max),minLength:ev(r.minLength),maxLength:ev(r.maxLength),pattern:ev(r.pattern)}:{},name:e,onChange:ec,onBlur:ec,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(J),t,...Array.isArray(y(s,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}});H(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&&ew(n,ed,v.mount);const eU=e=>{if(_(e)){k.state.next({disabled:e});ew(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 eB=(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 Z(n)}if(v.disabled.size){for(const e of v.disabled){et(s,e)}}et(r.errors,"root");if(q(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:q(r.errors)&&!o,submitCount:r.submitCount+1,errors:r.errors});if(o){throw o}};const ez=(e,t={})=>{if(y(n,e)){if(m(t.defaultValue)){eu(e,h(y(s,e)))}else{eu(e,t.defaultValue);w(s,e,h(t.defaultValue))}if(!t.keepTouched){et(r.touchedFields,e)}if(!t.keepDirty){et(r.dirtyFields,e);r.isDirty=t.defaultValue?er(e,h(y(s,e))):er()}if(!t.keepError){et(r.errors,e);S.isValid&&I()}k.state.next({...r})}};const eK=(e,i={})=>{const a=e?h(e):s;const o=h(a);const u=q(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(ea(s,c))]);for(const t of Array.from(e)){y(r.dirtyFields,t)?w(l,t,y(c,t)):eu(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(G(e)){const t=e.closest("form");if(t){t.reset();break}}}}}if(i.keepFieldsRef){for(const e of v.mount){eu(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||!t.shouldUnregister&&!q(l);f.watch=!!t.shouldUnregister;k.state.next({submitCount:i.keepSubmitCount?r.submitCount:0,isDirty:u?false:i.keepDirty?r.isDirty:!!(i.keepDefaultValues&&!M(e,s)),isSubmitted:i.keepIsSubmitted?r.isSubmitted:false,dirtyFields:u?{}:i.keepDirtyValues?i.keepDefaultValues&&c?ea(s,c):r.dirtyFields:i.keepDefaultValues&&e?ea(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 eq=(e,t)=>eK(W(e)?e(c):e,t);const eV=(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&&W(e.select)&&e.select()}}};const eW=e=>{r={...r,...e}};const eG=()=>W(t.defaultValues)&&t.defaultValues().then(e=>{eq(e,t.resetOptions);k.state.next({isLoading:false})});const e$={control:{register:eN,unregister:eL,getFieldState:eT,handleSubmit:eB,setError:eP,_subscribe:eF,_runSchema:U,_focusError:ej,_getWatch:en,_getDirty:er,_setValid:I,_setFieldArray:F,_setDisabledField:eH,_setErrors:L,_getFieldArray:ei,_reset:eK,_resetDefaultValues:eG,_removeUnmounted:ee,_disableForm:eU,_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:eY,trigger:eh,register:eN,handleSubmit:eB,watch:eM,setValue:eu,getValues:eg,reset:eq,resetField:ez,clearErrors:eC,unregister:eL,setError:eP,setFocus:eV,getFieldState:eT};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 eM=(e,t,r={})=>r.shouldFocus||m(r.shouldFocus)?r.focusName||`${e}.${m(r.focusIndex)?t:r.focusIndex}.`:"";var eF=(e,t)=>[...e,...B(t)];var eY=e=>Array.isArray(e)?e.map(()=>undefined):undefined;function eL(e,t,r){return[...e.slice(0,t),...B(r),...e.slice(t)]}var eH=(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 eN=(e,t)=>[...B(t),...B(e)];function ej(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)?[]:ej(e,B(t).sort((e,t)=>e-t));var eB=(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 eK(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(false);r._names.array.add(i);n.useMemo(()=>s&&u.length>=0&&r.register(i,s),[r,i,u.length,s]);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 f=n.useCallback(e=>{d.current=true;r._setFieldArray(i,e)},[r,i]);const p=(e,t)=>{const n=B(h(e));const a=eF(r._getFieldArray(i),n);r._names.focus=eM(i,a.length-1,t);c.current=eF(c.current,n.map(eP));f(a);l(a);r._setFieldArray(i,a,eF,{argA:eY(e)})};const v=(e,t)=>{const n=B(h(e));const a=eN(r._getFieldArray(i),n);r._names.focus=eM(i,0,t);c.current=eN(c.current,n.map(eP));f(a);l(a);r._setFieldArray(i,a,eN,{argA:eY(e)})};const m=e=>{const t=eU(r._getFieldArray(i),e);c.current=eU(c.current,e);f(t);l(t);!Array.isArray(y(r._fields,i))&&w(r._fields,i,undefined);r._setFieldArray(i,t,eU,{argA:e})};const g=(e,t,n)=>{const a=B(h(t));const o=eL(r._getFieldArray(i),e,a);r._names.focus=eM(i,e,n);c.current=eL(c.current,e,a.map(eP));f(o);l(o);r._setFieldArray(i,o,eL,{argA:e,argB:eY(t)})};const b=(e,t)=>{const n=r._getFieldArray(i);eB(n,e,t);eB(c.current,e,t);f(n);l(n);r._setFieldArray(i,n,eB,{argA:e,argB:t},false)};const _=(e,t)=>{const n=r._getFieldArray(i);eH(n,e,t);eH(c.current,e,t);f(n);l(n);r._setFieldArray(i,n,eH,{argA:e,argB:t},false)};const A=(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]);f(a);l([...a]);r._setFieldArray(i,a,ez,{argA:e,argB:n},true,false)};const E=e=>{const t=B(h(e));c.current=t.map(eP);f([...t]);l([...t]);r._setFieldArray(i,[...t],e=>e,{},true,false)};n.useEffect(()=>{r._state.action=false;e_(i,r._names)&&r._subjects.state.next({...r._formState});if(d.current&&(!em(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!em(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):et(r._formState.errors,i);r._subjects.state.next({errors:r._formState.errors})}})}else{const e=y(r._fields,i);if(e&&e._f&&!(em(r._options.reValidateMode).isOnSubmit&&em(r._options.mode).isOnSubmit)){eI(e,r._names.disabled,r._formValues,r._options.criteriaMode===x.all,r._options.shouldUseNativeValidation,true).then(e=>!q(e)&&r._subjects.state.next({errors:ek(r._formState.errors,e,i)}))}}}r._subjects.state.next({name:i,values:h(r._formValues)});r._names.focus&&ew(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();d.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(b,[f,i,r]),move:n.useCallback(_,[f,i,r]),prepend:n.useCallback(v,[f,i,r]),append:n.useCallback(p,[f,i,r]),remove:n.useCallback(m,[f,i,r]),insert:n.useCallback(g,[f,i,r]),update:n.useCallback(A,[f,i,r]),replace:n.useCallback(E,[f,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:W(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:W(e.defaultValues)?undefined:e.defaultValues});if(!t.current){if(e.formControl){t.current={...e.formControl,formState:i};if(e.defaultValues&&!W(e.defaultValues)){e.formControl.reset(e.defaultValues,e.resetOptions)}}else{const{formControl:r,...n}=eD(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(()=>{var t;if(e.values&&!M(e.values,r.current)){o._reset(e.values,{keepFieldsRef:true,...o._options.resetOptions});if(!((t=o._options.resetOptions)===null||t===void 0?void 0:t.keepIsValid)){o._setValid()}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}/**
 * Watch component that subscribes to form field changes and re-renders when watched fields update.
 *
 * @param control - The form control object from useForm
 * @param names - Array of field names to watch for changes
 * @param render - The function that receives watched values and returns ReactNode
 * @returns The result of calling render function with watched values
 *
 * @example
 * The `Watch` component only re-render when the values of `foo`, `bar`, and `baz.qux` change.
 * The types of `foo`, `bar`, and `baz.qux` are precisely inferred.
 *
 * ```tsx
 * const { control } = useForm();
 *
 * <Watch
 *   control={control}
 *   names={['foo', 'bar', 'baz.qux']}
 *   render={([foo, bar, baz_qux]) => <div>{foo}{bar}{baz_qux}</div>}
 * />
 * ```
 */const eV=({control:e,names:t,render:r})=>r(F({control:e,name:t}));//# sourceMappingURL=index.esm.mjs.map
},16653:function(e,t,r){"use strict";r.d(t,{A:()=>a});/* import */var n=r(41594);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 A(){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 x=e=>{!e||e===h.current.element||(w(),h.current.element=e,h.current.scrollContainers=u(e),A())};return s(_,!!t),o(y),(0,n.useEffect)(()=>{w(),A()},[t,_,y]),(0,n.useEffect)(()=>w,[]),[x,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==="639")return"js/lazy-chunks/tutor-course-builder-basic.js?ver=3.9.12";if(e==="410")return"js/lazy-chunks/tutor-course-builder-curriculum.js?ver=3.9.12";if(e==="132")return"js/lazy-chunks/tutor-course-builder-additional.js?ver=3.9.12";if(e==="456")return"js/lazy-chunks/tutor-course-builder-icon.js?ver=3.9.12";// 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=()=>"e04c283dd7673e71"})();// 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.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.6.4"})();// 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={"388":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.6.4"})();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(2445);// EXTERNAL MODULE: external "React"
var t=r(41594);var n=/*#__PURE__*/r.n(t);// EXTERNAL MODULE: ./node_modules/react-dom/client.js
var i=r(5338);// EXTERNAL MODULE: ./assets/react/v3/shared/components/ErrorBoundary.tsx
var a=r(66238);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/config/routes.tsx + 34 modules
var o=r(46306);// EXTERNAL MODULE: ./assets/react/v3/entries/course-builder/contexts/CourseBuilderSlotContext.tsx
var s=r(70540);// EXTERNAL MODULE: ./assets/react/v3/shared/atoms/Toast.tsx
var u=r(45549);// EXTERNAL MODULE: ./assets/react/v3/shared/config/constants.ts
var l=r(95729);// EXTERNAL MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var c=r(25815);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
var d=r(24684);// EXTERNAL MODULE: ./node_modules/cssjanus/src/cssjanus.js
var f=r(81242);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 A="@import";var x="@charset";var E="@viewport";var S="@supports";var O="@document";var k="@namespace";var T="@keyframes";var C="@font-face";var I="@counter-style";var R="@font-feature-values";var D="@layer";var P="@scope";// CONCATENATED MODULE: ./node_modules/stylis/src/Serializer.js
/**
 * @param {object[]} children
 * @param {function} callback
 * @return {string}
 */function M(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 F(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+"{"+M(e.children,n)+"}";case RULESET:if(!strlen(e.value=e.props.join(",")))return""}return strlen(r=M(e.children,n))?e.return=e.value+"{"+r+"}":""};// CONCATENATED MODULE: ./node_modules/stylis/src/Utility.js
/**
 * @param {number}
 * @return {number}
 */var Y=Math.abs;/**
 * @param {number}
 * @return {string}
 */var L=String.fromCharCode;/**
 * @param {object}
 * @return {object}
 */var H=Object.assign;/**
 * @param {string} value
 * @param {number} length
 * @return {number}
 */function N(e,t){return K(e,0)^45?(((t<<2^K(e,0))<<2^K(e,1))<<2^K(e,2))<<2^K(e,3):0}/**
 * @param {string} value
 * @return {string}
 */function j(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 B(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 K(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 V(e){return e.length}/**
 * @param {any[]} value
 * @return {number}
 */function W(e){return e.length}/**
 * @param {any} value
 * @param {any[]} array
 * @return {any}
 */function G(e,t){return t.push(e),e}/**
 * @param {string[]} array
 * @param {function} callback
 * @return {string}
 */function $(e,t){return e.map(t).join("")}/**
 * @param {string[]} array
 * @param {RegExp} pattern
 * @return {string[]}
 */function Q(e,t){return e.filter(function(e){return!U(e,t)})};// CONCATENATED MODULE: ./node_modules/stylis/src/Tokenizer.js
var X=1;var J=1;var Z=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:X,column:J,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?K(er,--ee):0;if(J--,et===10)J=1,X--;return et}/**
 * @return {number}
 */function eu(){et=ee<Z?K(er,ee++):0;if(J++,et===10)J=1,X++;return et}/**
 * @return {number}
 */function el(){return K(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 X=J=1,Z=V(er=e),ee=0,[]}/**
 * @param {any} value
 * @return {any}
 */function eh(e){return er="",e}/**
 * @param {number} type
 * @return {string}
 */function ev(e){return j(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(eA(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)+"*"+L(e===47?e:eu())}/**
 * @param {number} index
 * @return {string}
 */function eA(e){while(!ef(el()))eu();return ed(e,ee)};// CONCATENATED MODULE: ./node_modules/stylis/src/Parser.js
/**
 * @param {string} value
 * @return {object[]}
 */function ex(e){return eh(eE("",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 eE(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 A=n;var x=y;while(m)switch(h=b,b=eu()){// (
case 40:if(h!=108&&K(x,d-1)==58){if(z(x+=B(ev(b),"&","&\f"),"&\f",Y(l?s[l-1]:0))!=-1)g=-1;break}// " ' [
case 34:case 39:case 91:x+=ev(b);break;// \t \n \r \s
case 9:case 10:case 13:case 32:x+=eg(h);break;// \
case 92:x+=ey(ec()-1,7);continue;// /
case 47:switch(el()){case 42:case 47:G(eO(ew(eu(),ec()),t,r,u),u);if((ef(h||1)==5||ef(el()||1)==5)&&V(x)&&q(x,-1,void 0)!==" ")x+=" ";break;default:x+="/"}break;// {
case 123*v:s[l++]=V(x)*g;// } ; \0
case 125*v:case 59:case 0:switch(b){// \0 }
case 0:case 125:m=0;// ;
case 59+c:if(g==-1)x=B(x,/\f/g,"");if(p>0&&(V(x)-d||v===0&&h===47))G(p>32?ek(x+";",n,r,d-1,u):ek(B(x," ","")+";",n,r,d-2,u),u);break;// @ ;
case 59:x+=";";// { rule/at-rule
default:G(A=eS(x,t,r,l,c,i,s,y,_=[],w=[],d,a),a);if(b===123)if(c===0)eE(x,t,A,A,_,a,d,s,w);else{switch(f){// c(ontainer)
case 99:if(K(x,3)===110)break;// l(ayer)
case 108:if(K(x,2)===97)break;default:c=0;// d(ocument) m(edia) s(upports)
case 100:case 109:case 115:}if(c)eE(e,A,A,n&&G(eS(e,A,A,0,0,i,s,y,i,_=[],d,w),w),i,w,d,s,n?_:w);else eE(x,A,A,A,[""],w,0,s,w)}}l=c=p=0,v=g=1,y=x="",d=o;break;// :
case 58:d=1+V(x),p=h;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&es()==125)continue}switch(x+=L(b),b*v){// &
case 38:g=c>0?1:(x+="\f",-1);break;// ,
case 44:s[l++]=(V(x)-1)*g,g=1;break;// @
case 64:// -
if(el()===45)x+=ev(eu());f=el(),c=d=V(y=x+=eA(ec())),b++;break;// -
case 45:if(h===45&&V(x)==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=W(p);for(var v=0,m=0,g=0;v<n;++v)for(var y=0,_=q(e,f+1,f=Y(m=o[v])),w=e;y<h;++y)if(w=j(m>0?p[y]+" "+_:B(_,/&\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,L(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 A: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=M(Array.prototype.concat(e.children),eT);return V(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?ex(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"});/* export default */const eI=eC;//# sourceMappingURL=stylis-rtl.js.map
;// CONCATENATED MODULE: ./assets/react/v3/shared/components/RTLProvider.tsx
var eR=(0,c/* ["default"] */.A)({stylisPlugins:[eI],key:"rtl"});var eD=t=>{var{children:r}=t;if(l/* .isRTL */.V8){return/*#__PURE__*/(0,e/* .jsx */.Y)(d.C,{value:eR,children:r})}return/*#__PURE__*/(0,e/* .jsx */.Y)(e/* .Fragment */.FK,{children:r})};/* export default */const eP=eD;// EXTERNAL MODULE: ./assets/react/v3/shared/components/modals/Modal.tsx
var eM=r(1448);// EXTERNAL MODULE: ./assets/react/v3/shared/utils/style-utils.ts
var eF=r(36154);// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js
var eY=r(17437);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/utils.js
var eL=r(24880);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/query.js
var eH=r(79757);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/notifyManager.js
var eN=r(26261);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/subscribable.js
var ej=r(66500);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/queryCache.js
// src/queryCache.ts
var eU=class extends ej/* .Subscribable */.Q{constructor(e={}){super();this.config=e;this.#z=/* @__PURE__ */new Map}#z;build(e,t,r){const n=t.queryKey;const i=t.queryHash??(0,eL/* .hashQueryKeyByOptions */.F$)(n,t);let a=this.get(i);if(!a){a=new eH/* .Query */.X({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.#z.has(e.queryHash)){this.#z.set(e.queryHash,e);this.notify({type:"added",query:e})}}remove(e){const t=this.#z.get(e.queryHash);if(t){e.destroy();if(t===e){this.#z.delete(e.queryHash)}this.notify({type:"removed",query:e})}}clear(){eN/* .notifyManager.batch */.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#z.get(e)}getAll(){return[...this.#z.values()]}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eL/* .matchQuery */.MK)(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,eL/* .matchQuery */.MK)(e,t)):t}notify(e){eN/* .notifyManager.batch */.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){eN/* .notifyManager.batch */.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){eN/* .notifyManager.batch */.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};//# sourceMappingURL=queryCache.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/mutation.js
var eB=r(36158);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/mutationCache.js
// src/mutationCache.ts
var ez=class extends ej/* .Subscribable */.Q{constructor(e={}){super();this.config=e;this.#K=/* @__PURE__ */new Set;this.#q=/* @__PURE__ */new Map;this.#V=0}#K;#q;#V;build(e,t,r){const n=new eB/* .Mutation */.s({client:e,mutationCache:this,mutationId:++this.#V,options:e.defaultMutationOptions(t),state:r});this.add(n);return n}add(e){this.#K.add(e);const t=eK(e);if(typeof t==="string"){const r=this.#q.get(t);if(r){r.push(e)}else{this.#q.set(t,[e])}}this.notify({type:"added",mutation:e})}remove(e){if(this.#K.delete(e)){const t=eK(e);if(typeof t==="string"){const r=this.#q.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.#q.delete(t)}}}}this.notify({type:"removed",mutation:e})}canRun(e){const t=eK(e);if(typeof t==="string"){const r=this.#q.get(t);const n=r?.find(e=>e.state.status==="pending");return!n||n===e}else{return true}}runNext(e){const t=eK(e);if(typeof t==="string"){const r=this.#q.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}else{return Promise.resolve()}}clear(){eN/* .notifyManager.batch */.jG.batch(()=>{this.#K.forEach(e=>{this.notify({type:"removed",mutation:e})});this.#K.clear();this.#q.clear()})}getAll(){return Array.from(this.#K)}find(e){const t={exact:true,...e};return this.getAll().find(e=>(0,eL/* .matchMutation */.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,eL/* .matchMutation */.nJ)(e,t))}notify(e){eN/* .notifyManager.batch */.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return eN/* .notifyManager.batch */.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(eL/* .noop */.lQ))))}};function eK(e){return e.options.scope?.id}//# sourceMappingURL=mutationCache.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/focusManager.js
var eq=r(29658);// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/onlineManager.js
var eV=r(96035);// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
// src/infiniteQueryBehavior.ts
function eW(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,eL/* .ensureQueryFn */.ZM)(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?eL/* .addToStart */.ZZ:eL/* .addToEnd */.y9;return{pages:d(e.pages,s,u),pageParams:d(e.pageParams,n,u)}};if(i&&a.length){const e=i==="backward";const t=e?e$:eG;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:eG(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 eG(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 e$(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function eQ(e,t){if(!t)return false;return eG(e,t)!=null}function eX(e,t){if(!t||!e.getPreviousPageParam)return false;return e$(e,t)!=null}//# sourceMappingURL=infiniteQueryBehavior.js.map
;// CONCATENATED MODULE: ./node_modules/@tanstack/query-core/build/modern/queryClient.js
// src/queryClient.ts
var eJ=class{#W;#a;#g;#G;#$;#Q;#X;#J;constructor(e={}){this.#W=e.queryCache||new eU;this.#a=e.mutationCache||new ez;this.#g=e.defaultOptions||{};this.#G=/* @__PURE__ */new Map;this.#$=/* @__PURE__ */new Map;this.#Q=0}mount(){this.#Q++;if(this.#Q!==1)return;this.#X=eq/* .focusManager.subscribe */.m.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#W.onFocus()}});this.#J=eV/* .onlineManager.subscribe */.t.subscribe(async e=>{if(e){await this.resumePausedMutations();this.#W.onOnline()}})}unmount(){this.#Q--;if(this.#Q!==0)return;this.#X?.();this.#X=void 0;this.#J?.();this.#J=void 0}isFetching(e){return this.#W.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#a.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.#W.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e);const r=this.#W.build(this,t);const n=r.state.data;if(n===void 0){return this.fetchQuery(e)}if(e.revalidateIfStale&&r.isStaleByTime((0,eL/* .resolveStaleTime */.d2)(t.staleTime,r))){void this.prefetchQuery(t)}return Promise.resolve(n)}getQueriesData(e){return this.#W.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.#W.get(n.queryHash);const a=i?.state.data;const o=(0,eL/* .functionalUpdate */.Zw)(t,a);if(o===void 0){return void 0}return this.#W.build(this,n).setData(o,{...r,manual:true})}setQueriesData(e,t,r){return eN/* .notifyManager.batch */.jG.batch(()=>this.#W.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#W.get(t.queryHash)?.state}removeQueries(e){const t=this.#W;eN/* .notifyManager.batch */.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const r=this.#W;return eN/* .notifyManager.batch */.jG.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=eN/* .notifyManager.batch */.jG.batch(()=>this.#W.findAll(e).map(e=>e.cancel(r)));return Promise.all(n).then(eL/* .noop */.lQ).catch(eL/* .noop */.lQ)}invalidateQueries(e,t={}){return eN/* .notifyManager.batch */.jG.batch(()=>{this.#W.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=eN/* .notifyManager.batch */.jG.batch(()=>this.#W.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);if(!r.throwOnError){t=t.catch(eL/* .noop */.lQ)}return e.state.fetchStatus==="paused"?Promise.resolve():t}));return Promise.all(n).then(eL/* .noop */.lQ)}fetchQuery(e){const t=this.defaultQueryOptions(e);if(t.retry===void 0){t.retry=false}const r=this.#W.build(this,t);return r.isStaleByTime((0,eL/* .resolveStaleTime */.d2)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(eL/* .noop */.lQ).catch(eL/* .noop */.lQ)}fetchInfiniteQuery(e){e.behavior=eW(e.pages);return this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(eL/* .noop */.lQ).catch(eL/* .noop */.lQ)}ensureInfiniteQueryData(e){e.behavior=eW(e.pages);return this.ensureQueryData(e)}resumePausedMutations(){if(eV/* .onlineManager.isOnline */.t.isOnline()){return this.#a.resumePausedMutations()}return Promise.resolve()}getQueryCache(){return this.#W}getMutationCache(){return this.#a}getDefaultOptions(){return this.#g}setDefaultOptions(e){this.#g=e}setQueryDefaults(e,t){this.#G.set((0,eL/* .hashKey */.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#G.values()];const r={};t.forEach(t=>{if((0,eL/* .partialMatchKey */.Cp)(e,t.queryKey)){Object.assign(r,t.defaultOptions)}});return r}setMutationDefaults(e,t){this.#$.set((0,eL/* .hashKey */.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#$.values()];const r={};t.forEach(t=>{if((0,eL/* .partialMatchKey */.Cp)(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,eL/* .hashQueryKeyByOptions */.F$)(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===eL/* .skipToken */.hT){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.#W.clear();this.#a.clear()}};//# sourceMappingURL=queryClient.js.map
// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
var eZ=r(97665);// EXTERNAL MODULE: ./node_modules/react-router/dist/index.js
var e0=r(47767);// CONCATENATED MODULE: ./assets/react/v3/entries/course-builder/components/App.tsx
var e1=()=>{var[r]=(0,t.useState)(()=>new eJ({defaultOptions:{queries:{retry:false,refetchOnWindowFocus:false,networkMode:"always"},mutations:{retry:false,networkMode:"always"}}}));var n=(0,e0/* .useRoutes */.Ye)(o/* ["default"] */.A);return/*#__PURE__*/(0,e/* .jsx */.Y)(eP,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(eZ/* .QueryClientProvider */.Ht,{client:r,children:/*#__PURE__*/(0,e/* .jsx */.Y)(u/* ["default"] */.A,{position:"bottom-center",children:/*#__PURE__*/(0,e/* .jsx */.Y)(s/* .CourseBuilderSlotProvider */.E,{children:/*#__PURE__*/(0,e/* .jsxs */.FD)(eM/* .ModalProvider */.Z,{children:[/*#__PURE__*/(0,e/* .jsx */.Y)(eY/* .Global */.mL,{styles:[(0,eF/* .createGlobalCss */.v)()]}),n]})})})})})};/* export default */const e2=e1;// EXTERNAL MODULE: external "ReactDOM"
var e6=r(75206);// EXTERNAL MODULE: ./node_modules/@remix-run/router/dist/router.js
var e4=r(45588);// CONCATENATED MODULE: ./node_modules/react-router-dom/dist/index.js
/**
 * React Router DOM v6.30.2
 *
 * 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 e3(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 e7="get";const e8="application/x-www-form-urlencoded";function e9(e){return e!=null&&typeof e.tagName==="string"}function te(e){return e9(e)&&e.tagName.toLowerCase()==="button"}function tt(e){return e9(e)&&e.tagName.toLowerCase()==="form"}function tr(e){return e9(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")||e7;i=tc(e.getAttribute("enctype"))||e8;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")||e7;i=tc(e.getAttribute("formenctype"))||tc(o.getAttribute("enctype"))||e8;// 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(e9(e)){throw new Error("Cannot submit element that is not <form>, <button>, or "+'<input type="submit|image">')}else{r=e7;n=null;i=e8;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 tA="startTransition";const tx=t[tA];const tE="flushSync";const tS=e6[tE];const tO="useId";const tk=t[tO];function tT(e){if(tx){tx(e)}else{e()}}function tC(e){if(tS){tS(e)}else{e()}}class tI{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 tR(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 tI)}},[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 A=React.useMemo(()=>({router:r,navigator:_,static:false,basename:w}),[r,_,w]);let x=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:A},/*#__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:x},i.initialized||r.future.v7_partialHydration?/*#__PURE__*/React.createElement(tD,{routes:r.routes,future:r.future,state:i}):t))))),null)}// Memoize to avoid re-renders when updating `ViewTransitionContext`
const tD=/*#__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 tM(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&&tx?tx(()=>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 tF(e){let{basename:r,children:n,future:i,window:a}=e;let o=t.useRef();if(o.current==null){o.current=(0,e4/* .createHashHistory */.TM)({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&&tx?tx(()=>l(e)):l(e)},[l,c]);t.useLayoutEffect(()=>s.listen(d),[s,d]);t.useEffect(()=>(0,e0/* .UNSAFE_logV6DeprecationWarnings */.V8)(i),[i]);return /*#__PURE__*/t.createElement(e0/* .Router */.Ix,{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 tY(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&&tx?tx(()=>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 tL=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";const tH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;/**
 * The public API for rendering a history-aware `<a>`.
 */const tN=/*#__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=e3(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"&&tH.test(u)){// Render the absolute href server- and client-side
p=u;// Only check for external origins client-side
if(tL){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=tG(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 tj=/*#__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=e3(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
t9(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 A=y!=null&&(y===g||!a&&y.startsWith(g)&&y.charAt(g.length)==="/");let x={isActive:w,isPending:A,isTransitioning:m};let E=w?r:undefined;let S;if(typeof i==="function"){S=i(x)}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,A?"pending":null,m?"transitioning":null].filter(Boolean).join(" ")}let O=typeof o==="function"?o(x):o;return /*#__PURE__*/React.createElement(tN,e5({},c,{"aria-current":E,className:S,ref:t,style:O,to:s,viewTransition:u}),typeof l==="function"?l(x):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=e7,action:u,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:f}=e,p=e3(e,th);let h=tZ();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 tB(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 tK;(function(e){e["UseFetcher"]="useFetcher";e["UseFetchers"]="useFetchers";e["UseScrollRestoration"]="useScrollRestoration"})(tK||(tK={}));// Internal hooks
function tq(e){return e+" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router."}function tV(e){let t=React.useContext(UNSAFE_DataRouterContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}function tW(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 tG(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 t$(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 tQ(){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 tX=0;let tJ=()=>"__"+String(++tX)+"__";/**
 * Returns a function that may be used to programmatically submit a form (or
 * some arbitrary data) to the server.
 */function tZ(){let{router:e}=tV(tz.UseSubmit);let{basename:t}=React.useContext(UNSAFE_NavigationContext);let r=UNSAFE_useRouteId();return React.useCallback(function(n,i){if(i===void 0){i={}}tQ();let{action:a,method:o,encType:s,formData:u,body:l}=td(n,t);if(i.navigate===false){let t=i.fetcherKey||tJ();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}=tV(tz.UseFetcher);let i=tW(tK.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(tJ())}// 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=tZ();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=tW(tK.UseFetchers);return Array.from(e.fetchers.entries()).map(e=>{let[t,r]=e;return e5({},r,{key:t})})}const t6="react-router-scroll-positions";let t4=/* 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}=tV(tz.UseScrollRestoration);let{restoreScrollPosition:i,preventScrollReset:a}=tW(tK.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
t7(React.useCallback(()=>{if(l.state==="idle"){let e=(t?t(s,u):null)||s.key;t4[e]=window.scrollY}try{sessionStorage.setItem(r||t6,JSON.stringify(t4))}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||t6);if(e){t4=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(t4,()=>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 t3(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 t7(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 t8(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 t9(e,t){if(t===void 0){t={}}let r=React.useContext(t_);!(r!=null)?false?0:UNSAFE_invariant(false):void 0;let{basename:n}=tV(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 */.Y)(n().StrictMode,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(tF,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(a/* ["default"] */.A,{children:/*#__PURE__*/(0,e/* .jsx */.Y)(e2,{})})})}))})()})();